Skip to content

Releases: umaranis/svelte-lexical

0.6.0

03 Jun 13:02
Compare
Choose a tag to compare

Breaking Change

breaking: NestedComposer initialNodes prop removed and implicit namespace setting

Features

feat: new theme with dark mode
feat: dark mode support in the playground
feat: new system light-dark theme with theme selector and image components
feat: embed youtube video
feat: Twitter plugin with tweet embedding functionality
feat: add Bluesky integration with post embedding functionality
feat: add touch support for Table Cell Resizer
feat: use Tab key for indent & outdent
feat: use ThemeSelector and ThemeImage in playground
feat: add link to images
feat: add OnChangePlugin plugin
feat: upgrade lexical from 0.27.1 to 0.31.0

Bug Fixes

bug: stabilize text format dropdown width in toolbar
bug: correct import path for DefaultEditorTheme
bug: Table Hover buttons are not shown when resizer cursor shows up
bug: exception when changing formatting back to normal
bug: Debug TreeView selection indicator off by one
bug: Move ListItemNode text style inheritance to custom properties and CSS
bug: fix Table action menu visibility with cell overflow
bug: move ColorPickerDialog out of the TableActionMenu to control the visibility independently
bug: update tableFrozenRow class to include tableScrollableWrapper
bug: clear formatting should also clear any indent/outdent if applied
bug: missing bluesky icon from playground
bug: floating toolbar position for end-aligned text
bug: update event listeners from mouseup to pointerup for better touch support
bug: clear blockelement formatting along with textNode
bug: use natural dimensions for inherited image size (svg)
bug: Color Picker dialog - don't close onChange
bug: Color Picker - reflect any color updates sent from parent component

Performance

perf: increase size limit for richtext-editor assets to 104 kb
perf: bluesky plugin adds ~8kb to the playground (can be reduced by using server api - oembed)
perf: increase size limit to 206kb for playground
perf: update size-limit by 1 kb for plaintext demo

Build

build: add .svelte.ts and .svelte.js to ESLint config
build: switch from npm to pnpm for publishing package
build: upgrade svelte to the latest version
build: migrate string literals to update tag constants
build: publint suggestion to include git URL in package.json
build: add custom words to cSpell configuration

Documentation

docs: update clear editor content guide
docs: Add new Clear Editor Content documentation
docs: fix landing image dimensions on mobile devices
docs: fix link in npm package README.md

Tests

test: refactor autolink tests for reliability
test: collaboration - $handleNormalizationMergeConflicts
test: add tests for table cell resize
test: delete table with merged cells
test: enhance HorizontalRule tests to validate behavior with ListItemNode and clipboard operations
test: add functionality to paste tables with merged cells and select cells by coordinates
test: skip legacy events in HTML copy and paste tests; add new regression test for multi-line HTML paste
test: mark flaky test as fixme for collaboration scenarios
test: fix failing selection test after ThemeSelector added to the page
test: add test for deleting text by line forwards with control+K
test: markdown shortcut
test: add functionality to prevent negative indents
test: Table cell line breaks behave differently from the intended HTML behavior

Refactor

refactor: deprecate KEY_MODIFIER_COMMAND and use KEY_DOWN_COMMAND
refactor: Add a default delete handler for NodeSelection
refactor: add type predicate to objectKlassEquals
refactor: playground - turn on horizontal scroll for tables by default; control the feature using app settings for tests
refactor: allow initial color to be set when opening Color Picker dialog
refactor: move all default theme files into default folder
refactor: use CAN_USE_DOM from @lexical/utils
refactor: rename and deprecate some table utils
refactor: use registerCheckList
refactor: support custom cursor sync in CollaborationPlugin

0.5.3

19 Mar 08:25
Compare
Choose a tag to compare

Breaking change

  • breaking: refactor font size update methods

New Features

  • feat: export all $create..Node methods to programmatically create content

Bug fixes

  • bug: HR not selection outline not displayed in some demos
  • bug: fix the shell styling for more examples

Docs

  • docs: update README for website package
  • docs: add features to the website
  • docs: add column layout, collaboration and markdown shortcut plugin guides
  • docs: add import/export guides for JSON, HTML, and Markdown formats
  • docs: add guides for theme customization, read/edit modes, and plugin integration
  • docs: update readme from root to the library
  • docs: getting started guide

Build

  • build: update ESLint and fix issues
  • build: eslint version upgrade to 9.21.0
  • build: upgrade dependencies to recent versions
  • build: upgrade Vite from 5 to 6 (also upgrade vitest)
  • build: upgrade SvelteKit and adapter versions
  • build: update svelte and eslint and add onlyBuiltDependencies in pnpm-workspace.yaml
  • build: upgrade svelte-check to latest version
  • build: upgrade svelte to 5.22.5
  • build: upgrade publint and @eslint/js to the latest version

Testing

  • test: update post publish tests to exclude linting as they don't work because of --ignore-worspace

Performance

  • perf: increase size limit by 1kb for richtext-editor

0.5.2

05 Mar 12:12
Compare
Choose a tag to compare

Features

  • feat: table cell resize support
  • feat: add column widths to TableNode
  • feat: add row stripping
  • feat: add keyboard shortcuts various toolbar commands
  • feat: table horizontal scroll
  • feat: freeze first row of the table
  • feat: freeze first column of the table
  • feat: upgrade lexical from 0.17.0 to 0.27.1
  • feat: add typescript code formatting support
  • feat: table Cell vertical align (top, middle, bottom)
  • feat: allow passing in custom syncCursorPositions function to collab hook

Build

  • build: add post publish tests (ignore workspace)
  • build: upgrade prettier version to 3.4.2
  • build: update Node.js version to 20 in npm-publish workflow

Performance

  • perf: increase playground size limit from 175 to 191kb
  • perf: increase size limit for richtext editor to 102 kb
  • perf: richtext-editor demos increase size limit from 93 to 97kb
  • perf: increase size limit for plaintext editor to 45 to 70kb

Refactor

  • refactor: click and drag table selection in Firefox
  • refactor: get type and version properties super in exportJSON
  • refactor: update class names for horizontal rule selection styling
  • refactor: image component rerenders on every editor update
  • refactor: replace instanceof checks with isHTMLElement
  • refactor: TablePlugin - use code from the lexical package
  • refactor: remove duplicate TableCellResizePlugin
  • refactor: new name clearHighlight in lexical
  • refactor: table hover actions and add resize observer
  • refactor: ensure disconnect is called after connection is established in useYjsCollaboration
  • refactor: use registerList function
  • refactor: remove insertNodes workaround in ToolbarPlugin Yesterday 7:13β€―pm
  • refactor: add updateFromJSON and move more textFormat/textStyle to ElementNode

Docs

  • docs: add TableCellResizerPlugin to the list

Testing

  • test: svelte specific code to dynamically find browserName
  • test: add keyboard shortcuts for deleting lines on Mac
  • test: enhance e2e tests for nested lists and item insertion
  • test: add fixes for deleting forward and backward in Collapsible and Table elements
  • test: remove nested table navigation tests and add restrictions for nested tables
  • test: update copy and paste context menu tests and add HTML formatting test
  • test: add e2e tests for undo/redo functionality in collaborative editing
  • test: add e2e test for copying and pasting a table with an empty row
  • test: update nested list selection and add triple click selection test
  • test: update headings tests for enter key behavior and add regression test for character deletion
  • test: update Tab component to include class for tabNode spans
  • test: copy paste table from google sheet with custom column width
  • test: turn off flaky tests
  • test: mark flaky firefox tests as fixme
  • test: add proper-lockfile for exclusive clipboard access
  • test: add collaboration tests for handling dangling text and merging in YJS
  • test: shift+arrowdown into a table selects element after
  • test: new tests for tables

Fixes

  • bug: apply correct column headers when column contains vertically merged cells
  • bug: correct theme selector syntax in TableHoverActionPlugin
  • bug: cater for multiple classes in theme when creating the selector
  • bug: make syncCursorPositionsFn optional in YjsCollaboration component
  • bug: improve character deletion around shadow roots and decorators
  • bug: workaround for delete character with emoji grapheme customers that do not include non-BMP code points
  • bug: don't show label for text color toolbar dropdown
  • bug: ensure rectangular table cell merge behavior
  • bug: don't call editor.update from within $ methods
  • bug: fix table hover actions button position for scrollable table
  • bug: multiple row insertion logic
  • bug: gear icon not showing on the playground settings button
  • bug: preserve the selection using the link editor from a table
  • bug: fix table selection issue when the mouse crosses over a portal
  • bug: Table Action Menu - fix UI issue with Merge Cells item
  • bug: fix importDOM for Layout plugin
  • bug: fix the placement of the fontSize button in the ToolbarPlugin and hide the vertical scroll
  • bug: disable table hover actions in read-only mode
  • bug: disable image focusing, adding caption and editing in read-only mode
  • bug: move table resize observer initialization to onMount - SSR issue
  • bug: toolbar font size input disable style similar to other components
  • bug: missing styles for table hover add buttons
  • bug: fix merged cell related edge cases
  • bug: fix toolbar font size input keyboard accessibility
  • bug: make style buttons in toolbar respect table selection
  • bug: fix issue where selecting a cell then dragging outside of table would not select entire table
  • bug: fix multiple node selection deletion
  • bug: fix tooltip for redo button with correct macOS shortcut
  • bug: fix auto link crash editor
  • bug: fix dropdown menu position calculation in TableActionMenu

0.5.1

20 Feb 12:00
Compare
Choose a tag to compare
  • feat: default shell theme included in the library (svelte-lexical/dist/themes/default)
  • feat: export functions for importing and exporting markdown
  • feat: functions for importing and exporting HTML
  • perf: remove unused styles
  • bug: on Safari, the toolbar drop-down stops showing up when the toolbar overflows - fix #87
  • bug: dropdown displays behind the backdrop of insert column layout dialog
  • bug: Code Action Menu doesn't show up for any theme other than playground
  • bug: update table action buttons to use theme-specific classes
  • build: use pnpm 9 in the pipeline

0.5.0

30 Dec 12:47
Compare
Choose a tag to compare

New Features

  • breaking: svelte-lexical is upgraded to Svelte 5
  • feat: include editor theme in the library

Bugs

  • bug: image caption button - when focused, enter and escape keys do not work
  • bug: editor loses focus after inserting image

Build

  • build: upgrade to ESLint version 9 with the new config file format

Tests

  • test: 36 new tests for table plugin
  • test: upgrade playwright to the latest version
  • test: fix async bug in test helper
  • test: tests having to load images fail when run from VSCode starting Playwright version 1.44.0 (fix #102)
  • test: rename CI jobs for better readability

Docs

  • docs: update more examples page

0.4.3

14 Nov 08:46
Compare
Choose a tag to compare

New Features

  • feat: table support
  • feat: add row and column buttons on table hover
  • feat: enhance Insert Table Dialog with close button and improved layout
  • feat: Table Menu for add row/column, delete, merge, cell color etc.
  • feat: Action bar button to toggle editor read-only mode

Bugs

  • bug: exception when turning debug view off and on #94
  • bug: readonly editor but enabled toolbar buttons
  • bug: editor loses focus after insert

Tests

  • test: tag flaky tests and sort attributes

Build

  • build: support for pnpm version 9

See more details at https://umaranis.com/2024/11/14/released-svelte-lexical-0-4-3-support-tables/

0.4.2

19 Sep 14:17
Compare
Choose a tag to compare

New Features

  • feat: Column Layout plugin to arrange content in columns (thanks to @Sulkar)
  • feat: add text color and background color pickers to toolbar (@umaranis)
  • feat: upgrade to lexical 0.17.0 from 0.14.5
  • feat: show image error UI when image loading fails
  • feat: theme class added to horizontal rule node
  • feat: image captions can now be disabled

Bugs

  • bug: can't remove link formatting from Auto Link
  • bug: insert an image inside another image's caption
  • bug: fix auto link node escapes on second "."
  • bug: support pasting Google Doc checklist
  • bug: changing font size does not take effect when clicking in the editor after change
  • bug: fix Auto Link styles on creation
  • bug: crash when heading or quote is selected for clear formatting
  • bug: with block decorator nodes error on indent
  • bug: Prismjs causing issues with dev build when npm is used #85
  • bug: code block doesn't render properly with small width editor

Tests

  • test: a lot of new tests
  • test: add more parallelism to tests running in CI
  • test: exclude legacy events tests in CI except chromium on windows

See more details at https://umaranis.com/2024/09/27/released-svelte-lexical-0-4-2-column-layout-plugin-and-color-picker/

0.4.1

12 Jun 22:10
Compare
Choose a tag to compare

New Features

  • feat: MardownShortcutPlugin - Create a markdown shortcuts plugin
  • feat: clear formatting command
  • feat: subscript and superscript support
  • feat: show empty paragraph formatting in dev tool
  • feat: toolbar - move Strikethrough into more formatting drop down
  • feat: support SvelteKit for MardownShortcutPlugin, LinkPlugin and AutoLinkPlugin
  • feat: allow transformers to be specified when defining Markdown Shortcuts Plugin
  • feat: upgrade lexical from 0.14.2 to 0.14.5

Performance

  • perf: build size reduced by ~10kb after lexical ESM changes

Bugs

  • bug: prettier v3 async not working with synchronous lexical update calls; also required estree plugin
  • bug: wrong logic for FloatingLinkEditorPlugin bad node
  • bug: Numbered list does not increment in ImageNode caption
  • bug: respect CSS zoom
  • bug: return unregister callback from onMount
  • bug: fix bulletting a node selection
  • bug: Unbullet one list item not the whole list
  • bug: support multiple windows
  • bug: Preserve bullet item indent on newline

Tests

  • test: passing tests increased from 137 to 287
  • test: fix strike through test

Docs

  • docs: new examples
  • docs: list of plugins
  • docs: react to svelte porting tips are moved under porting plugins page

Build

  • build: CI action script version upgrade to 4
  • build: upgrade y-websocket to v1.5.4
  • build: include @lexical/text as dependency after ESM fix
  • build: move plantext-editor and richtext-editor packages to vite 5
  • build: import 'IS_' and 'CAN_*' environment constants from @lexical/utils

0.4.0

06 Apr 03:47
Compare
Choose a tag to compare

Breaking Changes

  • breaking: upgrade to sveltekit 2
  • breaking: upgrade to vite 5
  • breaking: port svelte-lexical package from rollup to vite

New Features

  • feat: upgrade to lexical 0.14.2 from 0.11.2
  • feat: Font Size entry control
  • feat: Floating link editor for AutoLinkNode and conversion to LinkNode once modified
  • fest: Meta + Click opens a link in new window
  • feat: right click select images
  • feat: Support HTML export overrides from config for nested editors
  • feat: allow overriding HTML serialization behavior from the editor config
  • feat: add nodes replacement support for nested composer

Build and Test

  • build: upgrade to prettier 3 (supports ESM)
  • build: setup prettier for playground package
  • build: upgrade node version to 18 in CI
  • build: remove dependency on @lexical/text as ESM build not working
  • build: missing exports condition warning
  • build: fix eslint warning post upgrade
  • test: fix failing tests after upgrade
  • test: move from jest to vitest
  • perf: increase the size limit on playground from 162kb to 170kb
  • perf: move to native UUID

Bug Fixes

  • bug: allow setting className for checklist in theme
  • bug: Edit Link modal fix when link and extra text is selected
  • bug: Make autolinks work for formatted text
  • bug: link address is not shown if comment is set
  • bug: floating formatter toolbar position
  • bug: dispatching undo & redo states for collaboration
  • bug: divider not showing in dropdown
  • bug: fix Double Deletion on Backspace
  • bug: prevent file:/// img conversion
  • bug: image resizer fix
  • bug: add selection adjustments for node removal

0.3.5

05 Feb 07:20
Compare
Choose a tag to compare
  • breaking change: upgrade to svelte 4
  • feat: new logo for svelte-lexical
  • feat: added trash button to floatingLinkEditor plugin to remove the link
  • feat: Add a title to the link node to support titles in markdown
  • feat: Allow excluding specific properties from collab syncing via plugin
  • feat: View DOM HTML in Debug Tree View
  • feat: Add keyboard shortcut for adding hyperlinks
  • bug: misaligned drop down menus for sveltekit project #56
  • bug: fix unresponsive resize handle in Safari
  • bug: Editing a link and changing selection shows wrong link value
  • bug: toggle link using keyboard shortcut doesn't clear the link
  • bug: insert link through toolbar or shortcut doesn't open floating editor in edit mode
  • test: lot of new tests and update to existing tests
  • perf: size limit for library