@udecode/plate-core
Advanced tools
Comparing version 9.3.1 to 10.0.0
# @udecode/plate-core | ||
## 10.0.0 | ||
### Minor Changes | ||
- [#1377](https://github.com/udecode/plate/pull/1377) by [@zbeyens](https://github.com/zbeyens) – | ||
- new dep: jotai | ||
- `Plate`: | ||
- set the store only if it's not already set (e.g. controlled use-case) | ||
- there is now a jotai provider with plate id so it can be used by plate selectors if no id is given as parameter. | ||
- `PlateProvider`: Create plate store and mount/unmount if `id` prop updates. `id` can be `string[]`. Use this component on top of components using plate hook selectors, otherwise your components would not rerender on change. Not needed for plate non-hook selectors (getters). | ||
- `useCreatePlateStore`: hook that creates a plate store into the plates store, if not defined. | ||
- `usePlateId`: returns the provider plate id (if any). | ||
- `usePlateStore`: if the hook is used before the plate store is created, it will console warn "The plate hooks must be used inside the `<PlateProvider id={id}>` component's context." | ||
- | ||
### Patch Changes | ||
- [#1377](https://github.com/udecode/plate/pull/1377) by [@zbeyens](https://github.com/zbeyens) – | ||
- `eventEditorSelectors.focus()` should now return the currently focused editor id, and `null` if no editor is focused. | ||
## 9.3.1 | ||
@@ -4,0 +24,0 @@ |
@@ -6,3 +6,3 @@ /** | ||
export * from './EditablePlugins'; | ||
export * from './EditorProvider'; | ||
export * from './PlateProvider'; | ||
export * from './EditorRefEffect'; | ||
@@ -9,0 +9,0 @@ export * from './EditorStateEffect'; |
@@ -7,2 +7,3 @@ /** | ||
export * from './usePlate/index'; | ||
export * from './useCreatePlateStore'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,4 +0,15 @@ | ||
import { EditorId } from '../../types/PlateStore'; | ||
export declare type EventEditorKey = 'blur' | 'focus' | 'last'; | ||
export declare type EventEditorState = Record<EventEditorKey, EditorId | null>; | ||
export declare type EventEditorState = { | ||
/** | ||
* Last editor id that has been blurred. | ||
*/ | ||
blur: string | null; | ||
/** | ||
* Editor id that is currently being focused. | ||
*/ | ||
focus: string | null; | ||
/** | ||
* Last editor id. | ||
*/ | ||
last: string | null; | ||
}; | ||
/** | ||
@@ -5,0 +16,0 @@ * Store where the keys are event names and the values are editor ids. |
@@ -6,2 +6,3 @@ /** | ||
export * from './plate/index'; | ||
export { plateIdAtom } from './plateIdAtom'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -25,3 +25,3 @@ import { PlatesStoreState } from '../../types/PlateStore'; | ||
}, {}>; | ||
has(id: string): boolean; | ||
has(id?: string | string[] | undefined): boolean; | ||
}>; | ||
@@ -49,3 +49,3 @@ export declare const platesActions: import("@udecode/zustood").SetRecord<PlatesStoreState> & { | ||
}, {}>; | ||
has(id: string): boolean; | ||
has(id?: string | string[] | undefined): boolean; | ||
}>; | ||
@@ -60,3 +60,3 @@ export declare const usePlatesSelectors: import("@udecode/zustood").StoreApiUse<PlatesStoreState, { | ||
}, {}>; | ||
has(id: string): boolean; | ||
has(id?: string | string[] | undefined): boolean; | ||
}>; | ||
@@ -63,0 +63,0 @@ export declare const getPlateActions: (id?: string | undefined) => import("@udecode/zustood").SetRecord<import("../../types/PlateStore").PlateStoreState<{}>> & { |
{ | ||
"name": "@udecode/plate-core", | ||
"version": "9.3.1", | ||
"version": "10.0.0", | ||
"description": "The core architecture of Plate – a plugin system for slate", | ||
@@ -43,2 +43,3 @@ "keywords": [ | ||
"clsx": "1.1.1", | ||
"jotai": "1.5.3", | ||
"lodash": "4.17.21", | ||
@@ -45,0 +46,0 @@ "use-deep-compare": "1.1.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2339649
553
20593
11
+ Addedjotai@1.5.3
+ Addedjotai@1.5.3(transitive)