-
Notifications
You must be signed in to change notification settings - Fork 785
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,81 @@ | ||
For older changelogs, see https://github.com/udecode/plate/blob/main/docs | ||
|
||
# 44.0.1 | ||
|
||
## @udecode/plate-core@44.0.0 | ||
|
||
### Major Changes | ||
|
||
- [#4048](https://github.com/udecode/plate/pull/4048) by [@zbeyens](https://github.com/zbeyens) – | ||
|
||
- Support React 19 | ||
- Upgraded to `zustand-x@6` | ||
- `eventEditorSelectors` -> `EventEditorStore.get` | ||
- `eventEditorActions` -> `EventEditorStore.set` | ||
- `useEventEditorSelectors` -> `useEventEditorValue(key)` | ||
- Upgraded to `jotai-x@2` | ||
- `usePlateEditorStore` -> `usePlateStore` | ||
- `usePlateActions` -> `usePlateSet` | ||
- Remove `editor.setPlateState`, use `usePlateSet` instead | ||
- `usePlateSelectors` -> `usePlateValue` | ||
- `usePlateStates` -> `usePlateState` | ||
- Moving plugin options hooks into standalone hooks to be compatible with React Compiler | ||
- `editor.useOption`, `ctx.useOption` -> `usePluginOption(plugin, key, ...args)` | ||
- `editor.useOptions`, `ctx.useOptions` -> `usePluginOption(plugin, 'state')` | ||
- New hook `usePluginOptions(plugin, selector)` to select plugin options (Zustand way). | ||
- We were supporting adding selectors to plugins using `extendOptions`. Those were mixed up with the options state, leading to potential conflicts and confusion. | ||
- The plugin method is renamed to `extendSelectors` | ||
- Selectors are now internally stored in `plugin.selectors` instead of `plugin.options`, but this does not change how you access those: using `editor.getOption(plugin, 'selectorName')`, `ctx.getOption('selectorName')` or above hooks. | ||
- Selector types are no longer in the 2nd generic type of `PluginConfig`, we're adding a 5th generic type for it. | ||
|
||
```ts | ||
// Before: | ||
export type BlockSelectionConfig = PluginConfig< | ||
'blockSelection', | ||
{ selectedIds?: Set<string>; } & BlockSelectionSelectors, | ||
>; | ||
|
||
// After: | ||
export type BlockSelectionConfig = PluginConfig< | ||
'blockSelection', | ||
{ selectedIds?: Set<string>; }, | ||
{}, // API | ||
{}, // Transforms | ||
BlockSelectionSelectors, // Selectors | ||
}> | ||
``` | ||
## @udecode/[email protected] | ||
### Major Changes | ||
- [#4048](https://github.com/udecode/plate/pull/4048) by [@zbeyens](https://github.com/zbeyens) – Upgrade to `jotai-x@2`. [Migration](https://github.com/udecode/jotai-x/blob/main/packages/jotai-x/CHANGELOG.md#211) needed only if you use `useCommentStore` | ||
## @udecode/[email protected] | ||
### Major Changes | ||
- [#4048](https://github.com/udecode/plate/pull/4048) by [@zbeyens](https://github.com/zbeyens) – Upgrade to `zustand-x@2`. [Migration](https://github.com/udecode/zustand-x/blob/main/packages/zustand-x/CHANGELOG.md#600) needed only if you use one of these stores: | ||
- `ImagePreviewStore` | ||
- `FloatingMediaStore` | ||
- [#4048](https://github.com/udecode/plate/pull/4048) by [@zbeyens](https://github.com/zbeyens) – Upgrade to `jotai-x@2`. [Migration](https://github.com/udecode/jotai-x/blob/main/packages/jotai-x/CHANGELOG.md#211) needed only if you use `usePlaceholderStore` | ||
## @udecode/[email protected] | ||
### Major Changes | ||
- [#4048](https://github.com/udecode/plate/pull/4048) by [@zbeyens](https://github.com/zbeyens) – Upgrade to `jotai-x@2`. [Migration](https://github.com/udecode/jotai-x/blob/main/packages/jotai-x/CHANGELOG.md#211) needed only if you use `useResizableStore` | ||
## @udecode/[email protected] | ||
### Major Changes | ||
- [#4048](https://github.com/udecode/plate/pull/4048) by [@zbeyens](https://github.com/zbeyens) – Move store state `selectedCells` and `selectedTables` from `useTableStore` to `TablePlugin` options store. This fixes the issue to get access to those state outside a table element (e.g. the toolbar) | ||
- [#4048](https://github.com/udecode/plate/pull/4048) by [@zbeyens](https://github.com/zbeyens) – Upgrade to `jotai-x@2`. [Migration](https://github.com/udecode/jotai-x/blob/main/packages/jotai-x/CHANGELOG.md#211) needed only if you use `useTableStore` | ||
# 43.0.0 | ||
No breaking changes. Upgraded all dependencies to the latest version. | ||
|