* add basePath prop to Range inside slate-react custom types, calculate absolute ranges on passing them into TextComponent
* code highlighting example improvements, minor markdown preview refactoring
* changeset added
* Revert "add basePath prop to Range inside slate-react custom types, calculate absolute ranges on passing them into TextComponent"
This reverts commit afa085c289bc67ce3d27dd33b1f074ab8153efe8.
* add basePath prop to Point inside slate-react custom types, resolve relative ranges on passing them to TextComponent
* Update changeset
* linter fixes
* remove redundant checks inside renderElement function
* custom types fixes for Range and Point in examples
* wrap intervals and ranges extractors in useMemo hook for running them only if editor.children is changed
* revert basePath changes, compare only offsets for MemoizedText decorations
* use an element as a key in decorations ranges map instead of id
* simplify code highlighting implementation, make code block nested
* fix code-highlighting example, add toolbar code block button
* remove redundant code
* fix code highlighting playwright integration test
* empty
* empty
* empty
* Begin move from cypress to playwright.
* Switch remaining tests to playwright, remove old cypress suppport files.
* Clean up playwright config
* Enable ff, and safari when on mac.
* Fix safari/ff mentions test
* Fix code-highlighting test on ff/safari
* Add a local retry as a few tests are flaky.
* Replace cypress w/ playwright in gitignore.
* Update to latest yarn to fix ci install?
* Update yarn.lock w/ yarn command.
* Fix mocha tests.
* Fix prettier
* Use stylesheet to give Editable components a default style
* Give Editors a unique id
* Use per-editor stylesheets to give editors a min-height
* Make editor min-height respond to changes in placeholder height
* Add changeset for stylesheet changes
* Prevent unnecessary creations of ResizeObservers
* Update yarn.lock
* test changes
* fix decoration not updating
* Add changeset
* Fix lint issues
* Tests with earlier version of Node.js
* Bump node version on CI
The base typescript config uses ESNext as target, so presumably the
latest node should be used.
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* Version Packages
* Update CHANGELOG.md
Add a missing changeset from one of the PRs.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* Upgrade `is-plain-object` to v5.0.0
The `is-plain-object` package recently had a major version upgrade that
broke libraries which import its default export, such as this one. This
causes issues when other packages in the same application require a
higher version of `is-plain-object`, resulting in an error originating
in Slate's codebase. To remedy this, Slate is now depending on
`is-plain-object@^5.0.0` and its import references across the codebase
have been updated.
Fixes#4499
* Add changeset
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* initial skeleton for jest testing
* run in serial mocha, then jest on slate-react only
* run-s without glob patterns https://github.com/yarnpkg/berry/issues/22
* don't run mocha on slate-react package
* use yarn run instead of run-s
* Migrate to yarn berry v3
* Fix yarn dependencies for linting
* Specifically invoke bash in yarn clean to make brace expansion work
* Upgrade cypress to 8.x to support yarn berry
* Try out yarn berry workaround for netlify
From https://answers.netlify.com/t/using-the-new-yarn-release-2-0-0-berry/8270
* Update .yarnrc.yml for syntax consistency
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* use rimraf for clean command with escaped glob pattern
* Use workspace:* resolution for workspace packages and rewrite yarn.lock
* set workspace package versions explicit again
* update peer dependencies
* disable import/named for ts and tsx files
* Replace 'key' with 'key=true' wherever babel complains
* replace all instances of key to someKey in tests to satisfy eslint and babel
* remove unnecessary yarn packageExtension and remove cross-env dependency
* upgrade yarn to latest
* Upgrade next.js to 10.x to support yarn berry
* update .yarnrc to satisfy netlify
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* Remove fast-deep-equal in favour of a custom slate-specific equality check that only supports nested objects
* Add array comparison to deep equal. Fix bug with multiple nested objects.