From dfbde8bd856e1e646e3d8fe2cbf1df8f9b8c67c3 Mon Sep 17 00:00:00 2001 From: Ziad Beyens Date: Sun, 9 May 2021 00:37:05 +0200 Subject: [PATCH] Revert "docs" --- .changeset/core-major-1.md | 8 ------ .changeset/core-major-2.md | 13 --------- .changeset/core-major-3.md | 13 --------- .changeset/core-major-eight-poems-travel.md | 25 ++++++++++++++++ .changeset/core-minor-1.md | 6 ---- .changeset/core-minor-10.md | 7 ----- .changeset/core-minor-11.md | 5 ---- .changeset/core-minor-2.md | 10 ------- .changeset/core-minor-3.md | 6 ---- .changeset/core-minor-4.md | 5 ---- .changeset/core-minor-5.md | 6 ---- .changeset/core-minor-6.md | 5 ---- .changeset/core-minor-7.md | 6 ---- .changeset/core-minor-8.md | 6 ---- .changeset/core-minor-9.md | 9 ------ .changeset/core-minor-eight-poems-travel.md | 32 +++++++++++++++++++++ 16 files changed, 57 insertions(+), 105 deletions(-) delete mode 100644 .changeset/core-major-1.md delete mode 100644 .changeset/core-major-2.md delete mode 100644 .changeset/core-major-3.md create mode 100644 .changeset/core-major-eight-poems-travel.md delete mode 100644 .changeset/core-minor-1.md delete mode 100644 .changeset/core-minor-10.md delete mode 100644 .changeset/core-minor-11.md delete mode 100644 .changeset/core-minor-2.md delete mode 100644 .changeset/core-minor-3.md delete mode 100644 .changeset/core-minor-4.md delete mode 100644 .changeset/core-minor-5.md delete mode 100644 .changeset/core-minor-6.md delete mode 100644 .changeset/core-minor-7.md delete mode 100644 .changeset/core-minor-8.md delete mode 100644 .changeset/core-minor-9.md create mode 100644 .changeset/core-minor-eight-poems-travel.md diff --git a/.changeset/core-major-1.md b/.changeset/core-major-1.md deleted file mode 100644 index f5ef99cc0a..0000000000 --- a/.changeset/core-major-1.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@udecode/slate-plugins-core": major ---- - -renamed: `useTSlate` to `useEditorState`, -`useTSlateStatic` to `useEditorRef`, -`useStoreEditor` to `useStoreEditorRef` - diff --git a/.changeset/core-major-2.md b/.changeset/core-major-2.md deleted file mode 100644 index ba11b00769..0000000000 --- a/.changeset/core-major-2.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@udecode/slate-plugins-core": major ---- - -removed: `useEditorId` in favor of `useEditorRef().id`, -`useEditorOptions` in favor of `useEditorRef().options`, -`useSlatePluginOptions` in favor of -`getSlatePluginOptions(useEditorRef(), pluginKey)`, `useSlatePluginType` -in favor of `getSlatePluginType(useEditorRef(), pluginKey)`, -`pipeOnDOMBeforeInput` in favor of `pipeHandler`, -`pipeOnKeyDown` in favor of `pipeHandler` - - diff --git a/.changeset/core-major-3.md b/.changeset/core-major-3.md deleted file mode 100644 index 253aca96a4..0000000000 --- a/.changeset/core-major-3.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@udecode/slate-plugins-core": major ---- - -types: -renamed: -`SlatePluginsState` to `SlatePluginsStates`, -`State` to `SlatePluginsState`. -removed: -`OnDOMBeforeInput`, -`OnKeyDown` in favor of `KeyboardHandler` - - diff --git a/.changeset/core-major-eight-poems-travel.md b/.changeset/core-major-eight-poems-travel.md new file mode 100644 index 0000000000..15915d9213 --- /dev/null +++ b/.changeset/core-major-eight-poems-travel.md @@ -0,0 +1,25 @@ +--- + +"@udecode/slate-plugins-core": major +------------------------------------ + +- renamed: + - `useTSlate` to `useEditorState` + - `useTSlateStatic` to `useEditorRef` + - `useStoreEditor` to `useStoreEditorRef` +- removed: + - `useEditorId` in favor of `useEditorRef().id` + - `useEditorOptions` in favor of `useEditorRef().options` + - `useSlatePluginOptions` in favor of + `getSlatePluginOptions(useEditorRef(), pluginKey)` + - `useSlatePluginType` in favor of + `getSlatePluginType(useEditorRef(), pluginKey)` + - `pipeOnDOMBeforeInput` in favor of `pipeHandler` + - `pipeOnKeyDown` in favor of `pipeHandler` +- types: + - renamed: + - `SlatePluginsState` to `SlatePluginsStates` + - `State` to `SlatePluginsState` + - removed: + - `OnDOMBeforeInput` in favor of + - `OnKeyDown` in favor of `KeyboardHandler` diff --git a/.changeset/core-minor-1.md b/.changeset/core-minor-1.md deleted file mode 100644 index 4391e3d121..0000000000 --- a/.changeset/core-minor-1.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@udecode/slate-plugins-core": minor ---- - -`useEditableProps` (used by `SlatePlugins`): new fields returned: all -handler props from the plugins (if defined) diff --git a/.changeset/core-minor-10.md b/.changeset/core-minor-10.md deleted file mode 100644 index 397ac401b5..0000000000 --- a/.changeset/core-minor-10.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@udecode/slate-plugins-core": minor ---- - -`SlatePluginsState` (store interface): a new field `keyChange` -incremented by `SlatePlugins` on `useSlate` update. A new field -`selection = editor.selection` updated on `useSlate` update. \ No newline at end of file diff --git a/.changeset/core-minor-11.md b/.changeset/core-minor-11.md deleted file mode 100644 index 0cf964df1a..0000000000 --- a/.changeset/core-minor-11.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@udecode/slate-plugins-core": minor ---- - -`pipeHandler`: a new function. Generic pipe for handlers. \ No newline at end of file diff --git a/.changeset/core-minor-2.md b/.changeset/core-minor-2.md deleted file mode 100644 index 6aef75ec9a..0000000000 --- a/.changeset/core-minor-2.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@udecode/slate-plugins-core": minor ---- - -`useEditableProps` (used by `SlatePlugins`): new core plugins with the -following fields: -`onFocus: setEventEditorId('focus', id)`, -`onBlur: setEventEditorId('blur', id)` , -You can add your own handlers in -a plugin diff --git a/.changeset/core-minor-3.md b/.changeset/core-minor-3.md deleted file mode 100644 index 785c6811b3..0000000000 --- a/.changeset/core-minor-3.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@udecode/slate-plugins-core": minor ---- - -`EditorStateEffect`: a new component used by `SlatePlugins` to update -the editor state. diff --git a/.changeset/core-minor-4.md b/.changeset/core-minor-4.md deleted file mode 100644 index 62971c1c51..0000000000 --- a/.changeset/core-minor-4.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@udecode/slate-plugins-core": minor ---- - -`setEventEditorId`: a new action. Set an editor id by event key. diff --git a/.changeset/core-minor-5.md b/.changeset/core-minor-5.md deleted file mode 100644 index 1427c5e3af..0000000000 --- a/.changeset/core-minor-5.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@udecode/slate-plugins-core": minor ---- - -`eventEditorStore`, `useEventEditorStore`: a new store. Store where - the keys are event names and the values are editor ids. diff --git a/.changeset/core-minor-6.md b/.changeset/core-minor-6.md deleted file mode 100644 index 23a0fdac90..0000000000 --- a/.changeset/core-minor-6.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@udecode/slate-plugins-core": minor ---- - -`useEventEditorId`: a new selector. Get the editor id by `event` key. \ No newline at end of file diff --git a/.changeset/core-minor-7.md b/.changeset/core-minor-7.md deleted file mode 100644 index 23ed92ccba..0000000000 --- a/.changeset/core-minor-7.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@udecode/slate-plugins-core": minor ---- - -`useStoreEditorSelection`: a new selector. Get the editor selection -which is updated on editor change. \ No newline at end of file diff --git a/.changeset/core-minor-8.md b/.changeset/core-minor-8.md deleted file mode 100644 index fd5dfbdb41..0000000000 --- a/.changeset/core-minor-8.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@udecode/slate-plugins-core": minor ---- - -`useStoreEditorState`: a new selector. Get editor state which is updated -on editor change. Similar to `useSlate`. \ No newline at end of file diff --git a/.changeset/core-minor-9.md b/.changeset/core-minor-9.md deleted file mode 100644 index 4e59e66750..0000000000 --- a/.changeset/core-minor-9.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@udecode/slate-plugins-core": minor ---- - -`SlatePlugin`: the previous plugin could implement the following -handlers: `onChange`, `onDOMBeforeInput` and `onKeyDown`. The plugins -now implement all DOM handlers: clipboard, composition, focus, form, -image, keyboard, media, mouse, selection, touch, pointer, ui, wheel -animation and transition events. \ No newline at end of file diff --git a/.changeset/core-minor-eight-poems-travel.md b/.changeset/core-minor-eight-poems-travel.md new file mode 100644 index 0000000000..1efc625a94 --- /dev/null +++ b/.changeset/core-minor-eight-poems-travel.md @@ -0,0 +1,32 @@ +--- +"@udecode/slate-plugins-core": minor +--- + +- `useEditableProps` (used by `SlatePlugins`): + - new fields returned: all handler props from the plugins (if defined) + - new core plugins with the following fields: + - `onFocus: setEventEditorId('focus', id)` + - `onBlur: setEventEditorId('blur', id)` + - You can add your own handlers in a plugin +- `EditorStateEffect`: a new component used by `SlatePlugins` to update + the editor state. +- `setEventEditorId`: a new action. Set an editor id by event key. +- `eventEditorStore`, `useEventEditorStore`: a new store. Store where + the keys are event names and the values are editor ids. +- `useEventEditorId`: a new selector. Get the editor id by `event` + key. +- `useStoreEditorSelection`: a new selector. Get the editor selection + which is updated on editor change. +- `useStoreEditorState`: a new selector. Get editor state which is + updated on editor change. Similar to `useSlate`. +- `SlatePlugin`: the previous plugin could implement the following + handlers: `onChange`, `onDOMBeforeInput` and `onKeyDown`. The plugins + now implement all DOM handlers: clipboard, composition, focus, form, + image, keyboard, media, mouse, selection, touch, pointer, ui, wheel + animation and transition events. +- `SlatePluginsState` (store interface): + - a new field `keyChange` incremented by + `SlatePlugins` on `useSlate` update. + - a new field `selection = editor.selection` updated on `useSlate` + update. +- `pipeHandler`: a new function. Generic pipe for handlers.