@udecode/plate-core
Advanced tools
Comparing version 5.3.1 to 6.0.0
# @udecode/plate-core | ||
## 6.0.0 | ||
### Patch Changes | ||
- [#1154](https://github.com/udecode/plate/pull/1154) by [@zbeyens](https://github.com/zbeyens) – fix: `PlatePluginComponent` type | ||
- [#1154](https://github.com/udecode/plate/pull/1154) by [@zbeyens](https://github.com/zbeyens) – generic type support: | ||
- `getEditorOptions` | ||
- `getPlatePluginOptions` | ||
- `PlatePluginOptions` | ||
- `PlateOptions` | ||
- [#1150](https://github.com/udecode/plate/pull/1150) by [@jeffsee55](https://github.com/jeffsee55) – | ||
- Fixes dependencie issue for React<17 users by using the classic `React.createElement` function rather than the newer `jsx-runtime` transform. | ||
- Per babel docs: https://babeljs.io/docs/en/babel-preset-react#with-a-configuration-file-recommended | ||
## 5.3.1 | ||
@@ -4,0 +21,0 @@ |
@@ -1,2 +0,2 @@ | ||
export declare const useStoreEditorOptions: (id?: string | null | undefined) => import("../../..").PlateOptions | undefined; | ||
export declare const useStoreEditorOptions: (id?: string | null | undefined) => import("../../..").PlateOptions<import("../../..").AnyObject> | undefined; | ||
//# sourceMappingURL=useStoreEditorOptions.d.ts.map |
@@ -43,3 +43,3 @@ import { SPEditor } from '../SPEditor'; | ||
*/ | ||
withOverrides?: WithOverride | WithOverride[]; | ||
withOverrides?: WithOverride<T> | WithOverride<T>[]; | ||
} | ||
@@ -46,0 +46,0 @@ export interface PlatePluginSerialize<T extends SPEditor = SPEditor> { |
import { FunctionComponent } from 'react'; | ||
import { SPRenderElementProps } from '../SPRenderElementProps'; | ||
import { SPRenderLeafProps } from '../SPRenderLeafProps'; | ||
import { AnyObject } from '../utility/AnyObject'; | ||
@@ -11,4 +9,4 @@ import { DeserializeOptions } from './DeserializeOptions'; | ||
*/ | ||
export declare type PlatePluginComponent = FunctionComponent<SPRenderElementProps | SPRenderLeafProps>; | ||
export interface PlatePluginOptions extends AnyObject { | ||
export declare type PlatePluginComponent = FunctionComponent; | ||
export declare type PlatePluginOptions<T = AnyObject> = T & { | ||
/** | ||
@@ -37,2 +35,6 @@ * Node properties to delete. | ||
/** | ||
* Hotkeys to listen to trigger a plugin action. | ||
*/ | ||
hotkey?: string | string[]; | ||
/** | ||
* If it's a function, its return value will override the component props. | ||
@@ -43,6 +45,2 @@ * If it's an object, it will override the component props. | ||
/** | ||
* Hotkeys to listen to trigger a plugin action. | ||
*/ | ||
hotkey?: string | string[]; | ||
/** | ||
* Element or mark type. | ||
@@ -52,3 +50,3 @@ * @default plugin key | ||
type: string; | ||
} | ||
}; | ||
/** | ||
@@ -65,3 +63,3 @@ * A unique key to store the plugin options by key. | ||
*/ | ||
export declare type PlateOptions = Record<PluginKey, PlatePluginOptions>; | ||
export declare type PlateOptions<T = AnyObject> = Record<PluginKey, PlatePluginOptions<T>>; | ||
//# sourceMappingURL=PlateOptions.d.ts.map |
/// <reference types="react" /> | ||
import { RenderNodeOptions } from '../types/PlatePluginOptions/RenderNodeOptions'; | ||
import { PlatePluginOptions } from '../types/PlatePluginOptions/PlateOptions'; | ||
import { SPRenderElementProps } from '../types/SPRenderElementProps'; | ||
@@ -9,3 +9,3 @@ /** | ||
*/ | ||
export declare const getEditableRenderElement: (options: RenderNodeOptions | RenderNodeOptions[]) => (props: SPRenderElementProps) => JSX.Element | undefined; | ||
export declare const getEditableRenderElement: (options: PlatePluginOptions[]) => (props: SPRenderElementProps) => JSX.Element | undefined; | ||
//# sourceMappingURL=getEditableRenderElement.d.ts.map |
import { PlateOptions } from '../types/PlatePluginOptions/PlateOptions'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
import { AnyObject } from '../types/utility/AnyObject'; | ||
/** | ||
* Get editor.options. | ||
*/ | ||
export declare const getEditorOptions: (editor?: SPEditor | undefined) => PlateOptions; | ||
export declare const getEditorOptions: <T = AnyObject>(editor?: SPEditor | undefined) => PlateOptions<T>; | ||
//# sourceMappingURL=getEditorOptions.d.ts.map |
@@ -0,6 +1,8 @@ | ||
import { PlatePluginOptions } from '../types/PlatePluginOptions/PlateOptions'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
import { AnyObject } from '../types/utility/AnyObject'; | ||
/** | ||
* Get SP options by plugin key. | ||
*/ | ||
export declare const getPlatePluginOptions: (editor?: SPEditor | undefined, pluginKey?: string) => import("..").PlatePluginOptions; | ||
export declare const getPlatePluginOptions: <T = AnyObject>(editor?: SPEditor | undefined, pluginKey?: string) => PlatePluginOptions<T>; | ||
//# sourceMappingURL=getPlatePluginOptions.d.ts.map |
@@ -24,2 +24,3 @@ /** | ||
export * from './pipeOnChange'; | ||
export * from './pipeOverrideProps'; | ||
export * from './pipeRenderElement'; | ||
@@ -26,0 +27,0 @@ export * from './pipeRenderLeaf'; |
@@ -5,3 +5,3 @@ import { SPEditor } from '../types/SPEditor'; | ||
*/ | ||
export declare const mapPlatePluginKeysToOptions: (editor: SPEditor, pluginKey: string | string[]) => import("..").PlatePluginOptions[]; | ||
export declare const mapPlatePluginKeysToOptions: (editor: SPEditor, pluginKey: string | string[]) => never[]; | ||
//# sourceMappingURL=mapPlatePluginKeysToOptions.d.ts.map |
{ | ||
"name": "@udecode/plate-core", | ||
"version": "5.3.1", | ||
"version": "6.0.0", | ||
"description": "The core architecture of Plate – a plugin system for slate", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
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
1180822
219
9092