@udecode/plate-core
Advanced tools
Comparing version 6.4.1 to 7.0.0
# @udecode/plate-core | ||
## 7.0.0 | ||
### Major Changes | ||
- [#1190](https://github.com/udecode/plate/pull/1190) by [@zbeyens](https://github.com/zbeyens) – | ||
- renamed: | ||
- `SPEditor` to `PEditor` (note that `PlateEditor` is the new default) | ||
- `SPRenderNodeProps` to `PlateRenderNodeProps` | ||
- `SPRenderElementProps` to `PlateRenderElementProps` | ||
- `SPRenderLeafProps` to `PlateRenderLeafProps` | ||
- `useEventEditorId` to `usePlateEventId` | ||
- `useStoreEditorOptions` to `usePlateOptions` | ||
- `useStoreEditorRef` to `usePlateEditorRef` | ||
- `useStoreEditorSelection` to `usePlateSelection` | ||
- `useStoreEditorState` to `usePlateEditorState` | ||
- `useStoreEditorValue` to `usePlateValue` | ||
- `useStoreEnabled` to `usePlateEnabled` | ||
- `useStorePlate` to `usePlatePlugins` | ||
- `useStorePlatePluginKeys` to `usePlateKeys` | ||
- `useStoreState` to `usePlateState` | ||
- `getPlateId`: Get the last focused editor id, else get the last blurred editor id, else get the first editor id, else `null` | ||
- `getPlateState`: | ||
- removed first parameter `state` | ||
- previously when giving no parameter, it was returning the first editor. Now it's returning the editor with id = `getPlateId()`. It means `useEventEditorId('focus')` is no longer needed for | ||
- `usePlateEditorRef` | ||
- `usePlateEditorState` | ||
- `usePlateX`... | ||
### Minor Changes | ||
- [#1190](https://github.com/udecode/plate/pull/1190) by [@zbeyens](https://github.com/zbeyens) – | ||
- `getEditableRenderElement`: now uses plugins `injectChildComponent` to wrap `children` (lowest) | ||
- `getEditableRenderElement`: now uses plugins `injectParentComponent` to wrap `component` (highest) | ||
- new store selectors: | ||
- `getPlateEditorRef` | ||
- `getPlateEnabled` | ||
- `getPlateKeys` | ||
- `getPlatePlugins` | ||
- `getPlateSelection` | ||
- `getPlateValue` | ||
- `getPlateEventId` | ||
Types: | ||
- `PlatePlugin`, `PlatePluginEditor` new fields: | ||
- `injectChildComponent`: Inject child component around any node children. | ||
- `injectParentComponent`: Inject parent component around any node `component`. | ||
- `overrideProps` supports arrays. | ||
- `SPRenderNodeProps` new fields: | ||
- `editor: PlateEditor` | ||
- `plugins: PlatePlugin` | ||
- new types: | ||
- `PlateEditor<T = {}>`: default editor type used in Plate, assuming we all use history and react editors. | ||
- `InjectComponent` | ||
```ts | ||
type InjectComponent = <T = AnyObject>( | ||
props: PlateRenderElementProps & T | ||
) => RenderFunction<PlateRenderElementProps> | undefined; | ||
``` | ||
## 6.4.1 | ||
@@ -196,3 +258,3 @@ | ||
- `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. | ||
- `usePlateEventId`: a new selector. Get the editor id by `event` key. | ||
- `useStoreEditorSelection`: a new selector. Get the editor selection which is updated on editor change. | ||
@@ -199,0 +261,0 @@ - `useStoreEditorState`: a new selector. Get editor state which is updated on editor change. Similar to `useSlate`. |
/// <reference types="react" /> | ||
import { RenderLeafProps } from 'slate-react'; | ||
export declare const DefaultLeaf: ({ attributes, children, text, leaf, ...props }: RenderLeafProps) => JSX.Element; | ||
import { TRenderLeafProps } from '../types/TRenderLeafProps'; | ||
export declare const DefaultLeaf: ({ attributes, children, text, leaf, ...props }: TRenderLeafProps) => JSX.Element; | ||
//# sourceMappingURL=DefaultLeaf.d.ts.map |
/** | ||
* @file Automatically generated by barrelsby. | ||
*/ | ||
export * from './DefaultLeaf'; | ||
export * from './EditablePlugins'; | ||
@@ -5,0 +6,0 @@ export * from './EditorStateEffect'; |
import React from 'react'; | ||
import { EditableProps } from 'slate-react/dist/components/editable'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
import { UsePlateEffectsOptions } from '../types/UsePlateEffectsOptions'; | ||
import { UseSlatePropsOptions } from '../types/UseSlatePropsOptions'; | ||
export interface PlateProps<T extends SPEditor = SPEditor> extends UsePlateEffectsOptions<T>, UseSlatePropsOptions { | ||
export interface PlateProps<T = {}> extends UsePlateEffectsOptions<T>, UseSlatePropsOptions { | ||
/** | ||
@@ -20,3 +19,3 @@ * The children rendered inside `Slate` before the `Editable` component. | ||
} | ||
export declare const Plate: <T extends SPEditor = SPEditor>({ children, renderEditable, ...options }: PlateProps<T>) => JSX.Element | null; | ||
export declare const Plate: <T>({ children, renderEditable, ...options }: PlateProps<T>) => JSX.Element | null; | ||
//# sourceMappingURL=Plate.d.ts.map |
@@ -1,11 +0,8 @@ | ||
import { HistoryEditor } from 'slate-history/dist/history-editor'; | ||
import { ReactEditor } from 'slate-react'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
import { TEditor } from '../types/TEditor'; | ||
import { PlateEditor } from '../types/PlateEditor'; | ||
/** | ||
* Typed {@link useSlateStatic} & SPEditor. | ||
* Typed {@link useSlateStatic} & PlateEditor. | ||
* Needs to be called in a child component of `Plate`. | ||
* Else, use `useStoreEditorRef`. | ||
* Else, use `usePlateEditorRef`. | ||
*/ | ||
export declare const useEditorRef: <T extends TEditor<import("..").AnyObject> = ReactEditor & HistoryEditor>() => T & SPEditor; | ||
export declare const useEditorRef: <T = {}>() => PlateEditor<T>; | ||
//# sourceMappingURL=useEditorRef.d.ts.map |
@@ -1,11 +0,8 @@ | ||
import { HistoryEditor } from 'slate-history/dist/history-editor'; | ||
import { ReactEditor } from 'slate-react'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
import { TEditor } from '../types/TEditor'; | ||
import { PlateEditor } from '../types/PlateEditor'; | ||
/** | ||
* Typed {@link useSlate} & SPEditor. | ||
* Typed {@link useSlate} & PlateEditor. | ||
* Needs to be called in a child component of `Plate`. | ||
* Else, use `useStoreEditorState`. | ||
* Else, use `usePlateEditorState`. | ||
*/ | ||
export declare const useEditorState: <T extends TEditor<import("..").AnyObject> = ReactEditor & HistoryEditor>() => T & SPEditor; | ||
export declare const useEditorState: <T = {}>() => PlateEditor<T>; | ||
//# sourceMappingURL=useEditorState.d.ts.map |
@@ -1,2 +0,1 @@ | ||
import { SPEditor } from '../../types/SPEditor'; | ||
import { UsePlateOptions } from '../../types/UsePlateOptions'; | ||
@@ -7,3 +6,3 @@ /** | ||
*/ | ||
export declare const usePlate: <T extends SPEditor = SPEditor>({ id, components, editor, initialValue, value, options, plugins, onChange, editableProps, normalizeInitialValue, }: UsePlateOptions<T>) => { | ||
export declare const usePlate: <T = {}>({ id, components, editor, initialValue, value, options, plugins, onChange, editableProps, normalizeInitialValue, }: UsePlateOptions<T>) => { | ||
slateProps: Omit<import("../..").SlateProps, "children">; | ||
@@ -10,0 +9,0 @@ editableProps: import("slate-react/dist/components/editable").EditableProps; |
@@ -1,2 +0,1 @@ | ||
import { SPEditor } from '../../types/SPEditor'; | ||
import { UsePlateEffectsOptions } from '../../types/UsePlateEffectsOptions'; | ||
@@ -7,3 +6,3 @@ /** | ||
*/ | ||
export declare const usePlateEffects: <T extends SPEditor = SPEditor>({ id, value, editor, enabled, components, options, initialValue, normalizeInitialValue, plugins, }: UsePlateEffectsOptions<T>) => void; | ||
export declare const usePlateEffects: <T = {}>({ id, value, editor, enabled, components, options, initialValue, normalizeInitialValue, plugins, }: UsePlateEffectsOptions<T>) => void; | ||
//# sourceMappingURL=usePlateEffects.d.ts.map |
@@ -1,3 +0,1 @@ | ||
import { Editor } from 'slate'; | ||
import { HistoryEditor } from 'slate-history'; | ||
import { WithOverride } from '../types/PlatePlugin/WithOverride'; | ||
@@ -7,7 +5,7 @@ /** | ||
*/ | ||
export declare const withHistoryPersist: WithOverride<Editor, HistoryEditor>; | ||
export declare const withHistoryPersist: WithOverride; | ||
/** | ||
* @see {@link withHistoryPersist} | ||
*/ | ||
export declare const createHistoryPlugin: () => import("..").PlatePlugin<import("..").SPEditor>; | ||
export declare const createHistoryPlugin: () => import("..").PlatePlugin<{}>; | ||
//# sourceMappingURL=createHistoryPlugin.d.ts.map |
import { PlatePlugin } from '../types/PlatePlugin/PlatePlugin'; | ||
import { WithOverride } from '../types/PlatePlugin/WithOverride'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
export interface WithInlineVoidOptions<T extends SPEditor = SPEditor> { | ||
plugins?: PlatePlugin<T>[]; | ||
export interface WithInlineVoidOptions { | ||
plugins?: PlatePlugin[]; | ||
inlineTypes?: string[]; | ||
@@ -13,7 +12,7 @@ voidTypes?: string[]; | ||
*/ | ||
export declare const withInlineVoid: <T extends SPEditor = SPEditor>({ plugins, inlineTypes, voidTypes, }: WithInlineVoidOptions<T>) => WithOverride<T, {}>; | ||
export declare const withInlineVoid: ({ plugins, inlineTypes, voidTypes, }: WithInlineVoidOptions) => WithOverride; | ||
/** | ||
* @see {@link withInlineVoid} | ||
*/ | ||
export declare const createInlineVoidPlugin: (options_0: WithInlineVoidOptions<SPEditor>) => PlatePlugin<SPEditor>; | ||
export declare const createInlineVoidPlugin: (options_0: WithInlineVoidOptions) => PlatePlugin<{}>; | ||
//# sourceMappingURL=createInlineVoidPlugin.d.ts.map |
/** | ||
* @see {@link withReact} | ||
*/ | ||
export declare const createReactPlugin: () => import("..").PlatePlugin<import("..").SPEditor>; | ||
export declare const createReactPlugin: () => import("..").PlatePlugin<{}>; | ||
//# sourceMappingURL=createReactPlugin.d.ts.map |
/** | ||
* @file Automatically generated by barrelsby. | ||
*/ | ||
export * from './useEventEditorId'; | ||
export * from './getEventEditorState'; | ||
export * from './usePlateEventId'; | ||
//# sourceMappingURL=index.d.ts.map |
import { PlateActions } from '../../types/PlateStore'; | ||
import { SPEditor } from '../../types/SPEditor'; | ||
export declare const usePlateActions: <T extends SPEditor = SPEditor>(storeId?: string | null | undefined) => PlateActions<T>; | ||
export declare const usePlateActions: <T = {}>(storeId?: string | null | undefined) => PlateActions<T>; | ||
//# sourceMappingURL=plate.actions.d.ts.map |
@@ -6,3 +6,3 @@ import { PlateStates } from '../../types/PlateStore'; | ||
*/ | ||
export declare const plateStore: import("zustand").StoreApi<PlateStates<import("../..").SPEditor>>; | ||
export declare const plateStore: import("zustand").StoreApi<PlateStates<{}>>; | ||
/** | ||
@@ -12,3 +12,3 @@ * Plate store. | ||
*/ | ||
export declare const usePlateStore: import("zustand").UseStore<PlateStates<import("../..").SPEditor>>; | ||
export declare const usePlateStore: import("zustand").UseStore<PlateStates<{}>>; | ||
//# sourceMappingURL=plate.store.d.ts.map |
@@ -1,3 +0,2 @@ | ||
import { PlateState, PlateStates } from '../../../types/PlateStore'; | ||
import { SPEditor } from '../../../types/SPEditor'; | ||
import { PlateState } from '../../../types/PlateStore'; | ||
/** | ||
@@ -7,3 +6,3 @@ * If id is defined, get the state by id. | ||
*/ | ||
export declare const getPlateState: <T extends SPEditor = SPEditor>(state: PlateStates<T>, id?: string | null | undefined) => PlateState<T> | undefined; | ||
export declare const getPlateState: <T = {}>(id?: string | null | undefined) => PlateState<T> | null; | ||
//# sourceMappingURL=getPlateState.d.ts.map |
/** | ||
* @file Automatically generated by barrelsby. | ||
*/ | ||
export * from './getPlateId'; | ||
export * from './getPlateState'; | ||
export * from './useStoreEditorEnabled'; | ||
export * from './useStoreEditorOptions'; | ||
export * from './useStoreEditorRef'; | ||
export * from './useStoreEditorSelection'; | ||
export * from './useStoreEditorState'; | ||
export * from './useStoreEditorValue'; | ||
export * from './useStorePlate'; | ||
export * from './useStorePlatePluginKeys'; | ||
export * from './useStoreState'; | ||
export * from './usePlateEditorRef'; | ||
export * from './usePlateEditorState'; | ||
export * from './usePlateEnabled'; | ||
export * from './usePlateKeys'; | ||
export * from './usePlateOptions'; | ||
export * from './usePlatePlugins'; | ||
export * from './usePlateSelection'; | ||
export * from './usePlateState'; | ||
export * from './usePlateValue'; | ||
//# sourceMappingURL=index.d.ts.map |
import { PlateState, PlateStates } from '../types/PlateStore'; | ||
export declare const getStateById: (state: PlateStates, id: string) => PlateState<import("..").SPEditor>; | ||
export declare const getStateById: (state: PlateStates, id: string) => PlateState<{}>; | ||
export declare const mergeState: (stateToMerge: Partial<PlateState>, stateId?: string | undefined) => void | "" | undefined; | ||
export declare const getSetStateByKey: <T>(key: string, stateId?: string | undefined) => (value: T, id?: string | undefined) => void | "" | undefined; | ||
//# sourceMappingURL=zustand.utils.d.ts.map |
@@ -5,7 +5,7 @@ /** | ||
export * from './EventEditorStore'; | ||
export * from './PlateEditor'; | ||
export * from './PlateRenderElementProps'; | ||
export * from './PlateRenderLeafProps'; | ||
export * from './PlateRenderNodeProps'; | ||
export * from './PlateStore'; | ||
export * from './SPEditor'; | ||
export * from './SPRenderElementProps'; | ||
export * from './SPRenderLeafProps'; | ||
export * from './SPRenderNodeProps'; | ||
export * from './SlateProps'; | ||
@@ -12,0 +12,0 @@ export * from './TAncestor'; |
import { NodeEntry, Range } from 'slate'; | ||
import { SPEditor } from '../SPEditor'; | ||
import { PlateEditor } from '../PlateEditor'; | ||
/** | ||
@@ -8,3 +8,3 @@ * Function used to decorate ranges. | ||
*/ | ||
export declare type Decorate<T extends SPEditor = SPEditor> = (editor: T) => (entry: NodeEntry) => Range[] | undefined; | ||
export declare type Decorate<T = {}> = (editor: PlateEditor<T>) => (entry: NodeEntry) => Range[] | undefined; | ||
//# sourceMappingURL=Decorate.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { SPEditor } from '../SPEditor'; | ||
import { PlateEditor } from '../PlateEditor'; | ||
import { TDescendant } from '../TDescendant'; | ||
@@ -14,3 +14,3 @@ import { HandlerReturnType } from './DOMHandlers'; | ||
*/ | ||
export declare type Deserialize<T extends SPEditor = SPEditor> = (editor: T) => { | ||
export declare type Deserialize<T = {}> = (editor: PlateEditor<T>) => { | ||
element?: DeserializeNode[]; | ||
@@ -17,0 +17,0 @@ leaf?: DeserializeNode[]; |
import { AnimationEvent, ClipboardEvent, CompositionEvent, DragEvent, FocusEvent, FormEvent, KeyboardEvent, MouseEvent, PointerEvent, SyntheticEvent, TouchEvent, TransitionEvent, UIEvent, WheelEvent } from 'react'; | ||
import { SPEditor } from '../SPEditor'; | ||
import { PlateEditor } from '../PlateEditor'; | ||
/** | ||
@@ -8,166 +8,166 @@ * If true, the next handlers will be skipped. | ||
declare type ReturnType = HandlerReturnType; | ||
export declare type DOMHandler<K extends keyof DOMHandlers, T extends SPEditor = SPEditor> = NonNullable<DOMHandlers<T>[K]>; | ||
export declare type KeyboardHandler<T extends SPEditor = SPEditor> = DOMHandler<'onKeyDown', T>; | ||
export interface DOMHandlers<T extends SPEditor = SPEditor> { | ||
onCopy?: (editor: T) => (event: ClipboardEvent) => ReturnType; | ||
onCopyCapture?: (editor: T) => (event: ClipboardEvent) => ReturnType; | ||
onCut?: (editor: T) => (event: ClipboardEvent) => ReturnType; | ||
onCutCapture?: (editor: T) => (event: ClipboardEvent) => ReturnType; | ||
onPaste?: (editor: T) => (event: ClipboardEvent) => ReturnType; | ||
onPasteCapture?: (editor: T) => (event: ClipboardEvent) => ReturnType; | ||
onCompositionEnd?: (editor: T) => (event: CompositionEvent) => ReturnType; | ||
onCompositionEndCapture?: (editor: T) => (event: CompositionEvent) => ReturnType; | ||
onCompositionStart?: (editor: T) => (event: CompositionEvent) => ReturnType; | ||
onCompositionStartCapture?: (editor: T) => (event: CompositionEvent) => ReturnType; | ||
onCompositionUpdate?: (editor: T) => (event: CompositionEvent) => ReturnType; | ||
onCompositionUpdateCapture?: (editor: T) => (event: CompositionEvent) => ReturnType; | ||
onFocus?: (editor: T) => (event: FocusEvent) => ReturnType; | ||
onFocusCapture?: (editor: T) => (event: FocusEvent) => ReturnType; | ||
onBlur?: (editor: T) => (event: FocusEvent) => ReturnType; | ||
onBlurCapture?: (editor: T) => (event: FocusEvent) => ReturnType; | ||
onDOMBeforeInput?: (editor: T) => (event: Event) => ReturnType; | ||
onBeforeInput?: (editor: T) => (event: FormEvent) => ReturnType; | ||
onBeforeInputCapture?: (editor: T) => (event: FormEvent) => ReturnType; | ||
onInput?: (editor: T) => (event: FormEvent) => ReturnType; | ||
onInputCapture?: (editor: T) => (event: FormEvent) => ReturnType; | ||
onReset?: (editor: T) => (event: FormEvent) => ReturnType; | ||
onResetCapture?: (editor: T) => (event: FormEvent) => ReturnType; | ||
onSubmit?: (editor: T) => (event: FormEvent) => ReturnType; | ||
onSubmitCapture?: (editor: T) => (event: FormEvent) => ReturnType; | ||
onInvalid?: (editor: T) => (event: FormEvent) => ReturnType; | ||
onInvalidCapture?: (editor: T) => (event: FormEvent) => ReturnType; | ||
onLoad?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onLoadCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onError?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onErrorCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onKeyDown?: (editor: T) => (event: KeyboardEvent) => ReturnType; | ||
onKeyDownCapture?: (editor: T) => (event: KeyboardEvent) => ReturnType; | ||
onKeyPress?: (editor: T) => (event: KeyboardEvent) => ReturnType; | ||
onKeyPressCapture?: (editor: T) => (event: KeyboardEvent) => ReturnType; | ||
onKeyUp?: (editor: T) => (event: KeyboardEvent) => ReturnType; | ||
onKeyUpCapture?: (editor: T) => (event: KeyboardEvent) => ReturnType; | ||
onAbort?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onAbortCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onCanPlay?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onCanPlayCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onCanPlayThrough?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onCanPlayThroughCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onDurationChange?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onDurationChangeCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onEmptied?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onEmptiedCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onEncrypted?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onEncryptedCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onEnded?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onEndedCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onLoadedData?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onLoadedDataCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onLoadedMetadata?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onLoadedMetadataCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onLoadStart?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onLoadStartCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onPause?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onPauseCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onPlay?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onPlayCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onPlaying?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onPlayingCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onProgress?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onProgressCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onRateChange?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onRateChangeCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onSeeked?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onSeekedCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onSeeking?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onSeekingCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onStalled?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onStalledCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onSuspend?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onSuspendCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onTimeUpdate?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onTimeUpdateCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onVolumeChange?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onVolumeChangeCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onWaiting?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onWaitingCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onAuxClick?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onAuxClickCapture?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onClick?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onClickCapture?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onContextMenu?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onContextMenuCapture?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onDoubleClick?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onDoubleClickCapture?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onDrag?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDragCapture?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDragEnd?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDragEndCapture?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDragEnter?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDragEnterCapture?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDragExit?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDragExitCapture?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDragLeave?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDragLeaveCapture?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDragOver?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDragOverCapture?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDragStart?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDragStartCapture?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDrop?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onDropCapture?: (editor: T) => (event: DragEvent) => ReturnType; | ||
onMouseDown?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onMouseDownCapture?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onMouseEnter?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onMouseLeave?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onMouseMove?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onMouseMoveCapture?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onMouseOut?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onMouseOutCapture?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onMouseOver?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onMouseOverCapture?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onMouseUp?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onMouseUpCapture?: (editor: T) => (event: MouseEvent) => ReturnType; | ||
onSelect?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onSelectCapture?: (editor: T) => (event: SyntheticEvent) => ReturnType; | ||
onTouchCancel?: (editor: T) => (event: TouchEvent) => ReturnType; | ||
onTouchCancelCapture?: (editor: T) => (event: TouchEvent) => ReturnType; | ||
onTouchEnd?: (editor: T) => (event: TouchEvent) => ReturnType; | ||
onTouchEndCapture?: (editor: T) => (event: TouchEvent) => ReturnType; | ||
onTouchMove?: (editor: T) => (event: TouchEvent) => ReturnType; | ||
onTouchMoveCapture?: (editor: T) => (event: TouchEvent) => ReturnType; | ||
onTouchStart?: (editor: T) => (event: TouchEvent) => ReturnType; | ||
onTouchStartCapture?: (editor: T) => (event: TouchEvent) => ReturnType; | ||
onPointerDown?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerDownCapture?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerMove?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerMoveCapture?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerUp?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerUpCapture?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerCancel?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerCancelCapture?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerEnter?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerEnterCapture?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerLeave?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerLeaveCapture?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerOver?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerOverCapture?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerOut?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onPointerOutCapture?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onGotPointerCapture?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onGotPointerCaptureCapture?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onLostPointerCapture?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onLostPointerCaptureCapture?: (editor: T) => (event: PointerEvent) => ReturnType; | ||
onScroll?: (editor: T) => (event: UIEvent) => ReturnType; | ||
onScrollCapture?: (editor: T) => (event: UIEvent) => ReturnType; | ||
onWheel?: (editor: T) => (event: WheelEvent) => ReturnType; | ||
onWheelCapture?: (editor: T) => (event: WheelEvent) => ReturnType; | ||
onAnimationStart?: (editor: T) => (event: AnimationEvent) => ReturnType; | ||
onAnimationStartCapture?: (editor: T) => (event: AnimationEvent) => ReturnType; | ||
onAnimationEnd?: (editor: T) => (event: AnimationEvent) => ReturnType; | ||
onAnimationEndCapture?: (editor: T) => (event: AnimationEvent) => ReturnType; | ||
onAnimationIteration?: (editor: T) => (event: AnimationEvent) => ReturnType; | ||
onAnimationIterationCapture?: (editor: T) => (event: AnimationEvent) => ReturnType; | ||
onTransitionEnd?: (editor: T) => (event: TransitionEvent) => ReturnType; | ||
onTransitionEndCapture?: (editor: T) => (event: TransitionEvent) => ReturnType; | ||
export declare type DOMHandler<K extends keyof DOMHandlers, T> = NonNullable<DOMHandlers<T>[K]>; | ||
export declare type KeyboardHandler<T = {}> = DOMHandler<'onKeyDown', T>; | ||
export interface DOMHandlers<T = {}> { | ||
onCopy?: (editor: PlateEditor<T>) => (event: ClipboardEvent) => ReturnType; | ||
onCopyCapture?: (editor: PlateEditor<T>) => (event: ClipboardEvent) => ReturnType; | ||
onCut?: (editor: PlateEditor<T>) => (event: ClipboardEvent) => ReturnType; | ||
onCutCapture?: (editor: PlateEditor<T>) => (event: ClipboardEvent) => ReturnType; | ||
onPaste?: (editor: PlateEditor<T>) => (event: ClipboardEvent) => ReturnType; | ||
onPasteCapture?: (editor: PlateEditor<T>) => (event: ClipboardEvent) => ReturnType; | ||
onCompositionEnd?: (editor: PlateEditor<T>) => (event: CompositionEvent) => ReturnType; | ||
onCompositionEndCapture?: (editor: PlateEditor<T>) => (event: CompositionEvent) => ReturnType; | ||
onCompositionStart?: (editor: PlateEditor<T>) => (event: CompositionEvent) => ReturnType; | ||
onCompositionStartCapture?: (editor: PlateEditor<T>) => (event: CompositionEvent) => ReturnType; | ||
onCompositionUpdate?: (editor: PlateEditor<T>) => (event: CompositionEvent) => ReturnType; | ||
onCompositionUpdateCapture?: (editor: PlateEditor<T>) => (event: CompositionEvent) => ReturnType; | ||
onFocus?: (editor: PlateEditor<T>) => (event: FocusEvent) => ReturnType; | ||
onFocusCapture?: (editor: PlateEditor<T>) => (event: FocusEvent) => ReturnType; | ||
onBlur?: (editor: PlateEditor<T>) => (event: FocusEvent) => ReturnType; | ||
onBlurCapture?: (editor: PlateEditor<T>) => (event: FocusEvent) => ReturnType; | ||
onDOMBeforeInput?: (editor: PlateEditor<T>) => (event: Event) => ReturnType; | ||
onBeforeInput?: (editor: PlateEditor<T>) => (event: FormEvent) => ReturnType; | ||
onBeforeInputCapture?: (editor: PlateEditor<T>) => (event: FormEvent) => ReturnType; | ||
onInput?: (editor: PlateEditor<T>) => (event: FormEvent) => ReturnType; | ||
onInputCapture?: (editor: PlateEditor<T>) => (event: FormEvent) => ReturnType; | ||
onReset?: (editor: PlateEditor<T>) => (event: FormEvent) => ReturnType; | ||
onResetCapture?: (editor: PlateEditor<T>) => (event: FormEvent) => ReturnType; | ||
onSubmit?: (editor: PlateEditor<T>) => (event: FormEvent) => ReturnType; | ||
onSubmitCapture?: (editor: PlateEditor<T>) => (event: FormEvent) => ReturnType; | ||
onInvalid?: (editor: PlateEditor<T>) => (event: FormEvent) => ReturnType; | ||
onInvalidCapture?: (editor: PlateEditor<T>) => (event: FormEvent) => ReturnType; | ||
onLoad?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onLoadCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onError?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onErrorCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onKeyDown?: (editor: PlateEditor<T>) => (event: KeyboardEvent) => ReturnType; | ||
onKeyDownCapture?: (editor: PlateEditor<T>) => (event: KeyboardEvent) => ReturnType; | ||
onKeyPress?: (editor: PlateEditor<T>) => (event: KeyboardEvent) => ReturnType; | ||
onKeyPressCapture?: (editor: PlateEditor<T>) => (event: KeyboardEvent) => ReturnType; | ||
onKeyUp?: (editor: PlateEditor<T>) => (event: KeyboardEvent) => ReturnType; | ||
onKeyUpCapture?: (editor: PlateEditor<T>) => (event: KeyboardEvent) => ReturnType; | ||
onAbort?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onAbortCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onCanPlay?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onCanPlayCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onCanPlayThrough?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onCanPlayThroughCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onDurationChange?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onDurationChangeCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onEmptied?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onEmptiedCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onEncrypted?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onEncryptedCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onEnded?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onEndedCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onLoadedData?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onLoadedDataCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onLoadedMetadata?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onLoadedMetadataCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onLoadStart?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onLoadStartCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onPause?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onPauseCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onPlay?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onPlayCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onPlaying?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onPlayingCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onProgress?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onProgressCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onRateChange?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onRateChangeCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onSeeked?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onSeekedCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onSeeking?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onSeekingCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onStalled?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onStalledCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onSuspend?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onSuspendCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onTimeUpdate?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onTimeUpdateCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onVolumeChange?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onVolumeChangeCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onWaiting?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onWaitingCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onAuxClick?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onAuxClickCapture?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onClick?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onClickCapture?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onContextMenu?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onContextMenuCapture?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onDoubleClick?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onDoubleClickCapture?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onDrag?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDragCapture?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDragEnd?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDragEndCapture?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDragEnter?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDragEnterCapture?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDragExit?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDragExitCapture?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDragLeave?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDragLeaveCapture?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDragOver?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDragOverCapture?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDragStart?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDragStartCapture?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDrop?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onDropCapture?: (editor: PlateEditor<T>) => (event: DragEvent) => ReturnType; | ||
onMouseDown?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onMouseDownCapture?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onMouseEnter?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onMouseLeave?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onMouseMove?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onMouseMoveCapture?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onMouseOut?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onMouseOutCapture?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onMouseOver?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onMouseOverCapture?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onMouseUp?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onMouseUpCapture?: (editor: PlateEditor<T>) => (event: MouseEvent) => ReturnType; | ||
onSelect?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onSelectCapture?: (editor: PlateEditor<T>) => (event: SyntheticEvent) => ReturnType; | ||
onTouchCancel?: (editor: PlateEditor<T>) => (event: TouchEvent) => ReturnType; | ||
onTouchCancelCapture?: (editor: PlateEditor<T>) => (event: TouchEvent) => ReturnType; | ||
onTouchEnd?: (editor: PlateEditor<T>) => (event: TouchEvent) => ReturnType; | ||
onTouchEndCapture?: (editor: PlateEditor<T>) => (event: TouchEvent) => ReturnType; | ||
onTouchMove?: (editor: PlateEditor<T>) => (event: TouchEvent) => ReturnType; | ||
onTouchMoveCapture?: (editor: PlateEditor<T>) => (event: TouchEvent) => ReturnType; | ||
onTouchStart?: (editor: PlateEditor<T>) => (event: TouchEvent) => ReturnType; | ||
onTouchStartCapture?: (editor: PlateEditor<T>) => (event: TouchEvent) => ReturnType; | ||
onPointerDown?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerDownCapture?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerMove?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerMoveCapture?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerUp?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerUpCapture?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerCancel?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerCancelCapture?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerEnter?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerEnterCapture?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerLeave?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerLeaveCapture?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerOver?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerOverCapture?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerOut?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onPointerOutCapture?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onGotPointerCapture?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onGotPointerCaptureCapture?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onLostPointerCapture?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onLostPointerCaptureCapture?: (editor: PlateEditor<T>) => (event: PointerEvent) => ReturnType; | ||
onScroll?: (editor: PlateEditor<T>) => (event: UIEvent) => ReturnType; | ||
onScrollCapture?: (editor: PlateEditor<T>) => (event: UIEvent) => ReturnType; | ||
onWheel?: (editor: PlateEditor<T>) => (event: WheelEvent) => ReturnType; | ||
onWheelCapture?: (editor: PlateEditor<T>) => (event: WheelEvent) => ReturnType; | ||
onAnimationStart?: (editor: PlateEditor<T>) => (event: AnimationEvent) => ReturnType; | ||
onAnimationStartCapture?: (editor: PlateEditor<T>) => (event: AnimationEvent) => ReturnType; | ||
onAnimationEnd?: (editor: PlateEditor<T>) => (event: AnimationEvent) => ReturnType; | ||
onAnimationEndCapture?: (editor: PlateEditor<T>) => (event: AnimationEvent) => ReturnType; | ||
onAnimationIteration?: (editor: PlateEditor<T>) => (event: AnimationEvent) => ReturnType; | ||
onAnimationIterationCapture?: (editor: PlateEditor<T>) => (event: AnimationEvent) => ReturnType; | ||
onTransitionEnd?: (editor: PlateEditor<T>) => (event: TransitionEvent) => ReturnType; | ||
onTransitionEndCapture?: (editor: PlateEditor<T>) => (event: TransitionEvent) => ReturnType; | ||
} | ||
export {}; | ||
//# sourceMappingURL=DOMHandlers.d.ts.map |
@@ -7,2 +7,3 @@ /** | ||
export * from './Deserialize'; | ||
export * from './InjectComponent'; | ||
export * from './OnChange'; | ||
@@ -9,0 +10,0 @@ export * from './OverrideProps'; |
@@ -1,2 +0,2 @@ | ||
import { SPEditor } from '../SPEditor'; | ||
import { PlateEditor } from '../PlateEditor'; | ||
import { TNode } from '../TNode'; | ||
@@ -9,3 +9,3 @@ import { HandlerReturnType } from './DOMHandlers'; | ||
*/ | ||
export declare type OnChange<T extends SPEditor = SPEditor> = (editor: T) => (value: TNode[]) => HandlerReturnType; | ||
export declare type OnChange<T = {}> = (editor: PlateEditor<T>) => (value: TNode[]) => HandlerReturnType; | ||
//# sourceMappingURL=OnChange.d.ts.map |
@@ -0,4 +1,4 @@ | ||
import { PlateEditor } from '../PlateEditor'; | ||
import { GetNodeProps } from '../PlatePluginOptions/GetNodeProps'; | ||
import { SPEditor } from '../SPEditor'; | ||
export declare type OverrideProps<T extends SPEditor = SPEditor> = (editor: T) => GetNodeProps; | ||
export declare type OverrideProps<T = {}> = (editor: PlateEditor<T>) => GetNodeProps; | ||
//# sourceMappingURL=OverrideProps.d.ts.map |
@@ -1,5 +0,6 @@ | ||
import { SPEditor } from '../SPEditor'; | ||
import { PlateEditor } from '../PlateEditor'; | ||
import { Decorate } from './Decorate'; | ||
import { Deserialize } from './Deserialize'; | ||
import { DOMHandlers } from './DOMHandlers'; | ||
import { InjectComponent } from './InjectComponent'; | ||
import { OnChange } from './OnChange'; | ||
@@ -21,5 +22,5 @@ import { OverrideProps } from './OverrideProps'; | ||
*/ | ||
export interface PlatePlugin<T extends SPEditor = SPEditor> extends PlatePluginSerialize<T>, PlatePluginElement<T>, PlatePluginLeaf<T> { | ||
export interface PlatePlugin<T = {}> extends PlatePluginSerialize<T>, PlatePluginElement<T>, PlatePluginLeaf<T> { | ||
} | ||
export interface PlatePluginEditor<T extends SPEditor = SPEditor> extends Partial<DOMHandlers<T>> { | ||
export interface PlatePluginEditor<T = {}> extends Partial<DOMHandlers<T>> { | ||
/** | ||
@@ -30,6 +31,10 @@ * @see {@link Decorate} | ||
/** | ||
* Plugin keys to support configuration. | ||
* Inject child component around any node children. | ||
*/ | ||
pluginKeys?: string | string[]; | ||
injectChildComponent?: InjectComponent | InjectComponent[]; | ||
/** | ||
* Inject parent component around any node `component`. | ||
*/ | ||
injectParentComponent?: InjectComponent | InjectComponent[]; | ||
/** | ||
* @see {@link OnChange} | ||
@@ -41,4 +46,8 @@ */ | ||
*/ | ||
overrideProps?: OverrideProps<T>; | ||
overrideProps?: OverrideProps<T> | OverrideProps<T>[]; | ||
/** | ||
* Plugin keys to support configuration. | ||
*/ | ||
pluginKeys?: string | string[]; | ||
/** | ||
* Editor method overriders. | ||
@@ -48,3 +57,3 @@ */ | ||
} | ||
export interface PlatePluginSerialize<T extends SPEditor = SPEditor> { | ||
export interface PlatePluginSerialize<T = {}> { | ||
/** | ||
@@ -59,13 +68,13 @@ * @see {@link DeserializeHtml} | ||
} | ||
export interface PlatePluginNode<T extends SPEditor = SPEditor> extends PlatePluginSerialize<T>, PlatePluginEditor<T> { | ||
export interface PlatePluginNode<T = {}> extends PlatePluginSerialize<T>, PlatePluginEditor<T> { | ||
/** | ||
* Void element types. | ||
*/ | ||
voidTypes?: (editor: T) => string[]; | ||
voidTypes?: (editor: PlateEditor<T>) => string[]; | ||
} | ||
export interface PlatePluginElement<T extends SPEditor = SPEditor> extends PlatePluginNode<T> { | ||
export interface PlatePluginElement<T = {}> extends PlatePluginNode<T> { | ||
/** | ||
* Inline element types. | ||
*/ | ||
inlineTypes?: (editor: T) => string[]; | ||
inlineTypes?: (editor: PlateEditor<T>) => string[]; | ||
/** | ||
@@ -76,3 +85,3 @@ * @see {@link RenderElement} | ||
} | ||
export interface PlatePluginLeaf<T extends SPEditor = SPEditor> extends PlatePluginNode<T> { | ||
export interface PlatePluginLeaf<T = {}> extends PlatePluginNode<T> { | ||
/** | ||
@@ -79,0 +88,0 @@ * @see {@link RenderLeaf} |
/// <reference types="react" /> | ||
import { SPEditor } from '../SPEditor'; | ||
import { SPRenderElementProps } from '../SPRenderElementProps'; | ||
import { PlateEditor } from '../PlateEditor'; | ||
import { PlateRenderElementProps } from '../PlateRenderElementProps'; | ||
/** | ||
@@ -9,3 +9,3 @@ * Function used to render an element. | ||
*/ | ||
export declare type RenderElement<T extends SPEditor = SPEditor> = (editor: T) => (props: SPRenderElementProps) => JSX.Element | undefined; | ||
export declare type RenderElement<T = {}> = (editor: PlateEditor<T>) => (props: PlateRenderElementProps) => JSX.Element | undefined; | ||
//# sourceMappingURL=RenderElement.d.ts.map |
/// <reference types="react" /> | ||
import { SPEditor } from '../SPEditor'; | ||
import { TRenderLeafProps } from '../TRenderLeafProps'; | ||
import { PlateEditor } from '../PlateEditor'; | ||
import { PlateRenderLeafProps } from '../PlateRenderLeafProps'; | ||
/** | ||
@@ -13,3 +13,3 @@ * Function used to render the children of a leaf. | ||
*/ | ||
export declare type RenderLeaf<T extends SPEditor = SPEditor> = (editor: T) => (props: TRenderLeafProps) => JSX.Element; | ||
export declare type RenderLeaf<T = {}> = (editor: PlateEditor<T>) => (props: PlateRenderLeafProps) => JSX.Element; | ||
//# sourceMappingURL=RenderLeaf.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { TEditor } from '../TEditor'; | ||
import { PlateEditor } from '../PlateEditor'; | ||
/** | ||
@@ -6,3 +6,3 @@ * Plate plugin overriding the `editor` methods. | ||
*/ | ||
export declare type WithOverride<TEditorInput extends TEditor = TEditor, TEditorOutputExtension = {}> = <T extends TEditorInput>(editor: T) => T & TEditorOutputExtension; | ||
export declare type WithOverride<TEditorInput = {}, TEditorOutputExtension = {}> = (editor: PlateEditor<TEditorInput>) => PlateEditor<TEditorInput> & TEditorOutputExtension; | ||
//# sourceMappingURL=WithOverride.d.ts.map |
@@ -1,7 +0,7 @@ | ||
import { SPRenderElementProps } from '../SPRenderElementProps'; | ||
import { SPRenderLeafProps } from '../SPRenderLeafProps'; | ||
import { PlateRenderElementProps } from '../PlateRenderElementProps'; | ||
import { PlateRenderLeafProps } from '../PlateRenderLeafProps'; | ||
/** | ||
* Map slate node properties to component props. | ||
*/ | ||
export declare type GetNodeProps = (props: SPRenderElementProps | SPRenderLeafProps) => NodeProps | undefined; | ||
export declare type GetNodeProps = (props: PlateRenderElementProps | PlateRenderLeafProps) => NodeProps | undefined; | ||
/** | ||
@@ -8,0 +8,0 @@ * Props passed from `getNodeProps` option. |
@@ -12,2 +12,7 @@ import { FunctionComponent } from 'react'; | ||
/** | ||
* Element or mark type. | ||
* @default pluginKey | ||
*/ | ||
type: string; | ||
/** | ||
* Node properties to delete. | ||
@@ -43,7 +48,2 @@ */ | ||
overrideProps?: GetNodeProps | NodeProps; | ||
/** | ||
* Element or mark type. | ||
* @default plugin key | ||
*/ | ||
type: string; | ||
}; | ||
@@ -50,0 +50,0 @@ /** |
@@ -5,3 +5,3 @@ import { PlatePluginOptions } from './PlateOptions'; | ||
*/ | ||
export declare type RenderNodeOptions = Pick<PlatePluginOptions, 'type' | 'component' | 'getNodeProps' | 'overrideProps'>; | ||
export declare type RenderNodeOptions = Pick<PlatePluginOptions, 'component' | 'getNodeProps' | 'overrideProps'> & Pick<Required<PlatePluginOptions>, 'type'>; | ||
//# sourceMappingURL=RenderNodeOptions.d.ts.map |
import { Editor } from 'slate'; | ||
import { PlatePlugin } from './PlatePlugin/PlatePlugin'; | ||
import { SPEditor } from './SPEditor'; | ||
import { PlateEditor } from './PlateEditor'; | ||
import { TDescendant } from './TDescendant'; | ||
@@ -12,3 +12,3 @@ /** | ||
export declare type EditorId = string | null | undefined; | ||
export declare type PlateState<T extends SPEditor = SPEditor> = { | ||
export declare type PlateState<T = {}> = { | ||
/** | ||
@@ -18,3 +18,3 @@ * Slate editor reference. | ||
*/ | ||
editor?: T; | ||
editor?: PlateEditor<T>; | ||
/** | ||
@@ -49,4 +49,4 @@ * A key that is incremented on each editor change. | ||
*/ | ||
export declare type PlateStates<T extends SPEditor = SPEditor> = Record<string, PlateState<T>>; | ||
export declare type PlateActions<T extends SPEditor = SPEditor> = { | ||
export declare type PlateStates<T = {}> = Record<string, PlateState<T>>; | ||
export declare type PlateActions<T = {}> = { | ||
/** | ||
@@ -53,0 +53,0 @@ * Remove state by id. Called by `Plate` on unmount. |
import { PlateOptions, PlatePluginComponent } from './PlatePluginOptions/PlateOptions'; | ||
import { EditorId, PlateState } from './PlateStore'; | ||
import { SPEditor } from './SPEditor'; | ||
/** | ||
* `usePlateEffects` options | ||
*/ | ||
export interface UsePlateEffectsOptions<T extends SPEditor = SPEditor> extends Partial<Pick<PlateState<T>, 'editor' | 'value' | 'enabled' | 'plugins'>> { | ||
export interface UsePlateEffectsOptions<T = {}> extends Partial<Pick<PlateState<T>, 'editor' | 'value' | 'enabled' | 'plugins'>> { | ||
id?: EditorId; | ||
@@ -9,0 +8,0 @@ /** |
@@ -1,2 +0,1 @@ | ||
import { SPEditor } from './SPEditor'; | ||
import { UseEditablePropsOptions } from './UseEditablePropsOptions'; | ||
@@ -8,3 +7,3 @@ import { UsePlateEffectsOptions } from './UsePlateEffectsOptions'; | ||
*/ | ||
export declare type UsePlateOptions<T extends SPEditor = SPEditor> = UseSlatePropsOptions & UseEditablePropsOptions & UsePlateEffectsOptions<T>; | ||
export declare type UsePlateOptions<T = {}> = UseSlatePropsOptions & UseEditablePropsOptions & UsePlateEffectsOptions<T>; | ||
//# sourceMappingURL=UsePlateOptions.d.ts.map |
@@ -6,3 +6,4 @@ /** | ||
export * from './FunctionProperties'; | ||
export * from './RenderFunction'; | ||
export * from './WithOptional'; | ||
//# sourceMappingURL=index.d.ts.map |
/// <reference types="react" /> | ||
import { PlatePluginOptions } from '../types/PlatePluginOptions/PlateOptions'; | ||
import { SPRenderElementProps } from '../types/SPRenderElementProps'; | ||
import { RenderNodeOptions } from '../types/PlatePluginOptions/RenderNodeOptions'; | ||
import { PlateRenderElementProps } from '../types/PlateRenderElementProps'; | ||
/** | ||
@@ -9,3 +9,3 @@ * Get a `Editable.renderElement` handler for `options.type`. | ||
*/ | ||
export declare const getEditableRenderElement: (options: PlatePluginOptions[]) => (props: SPRenderElementProps) => JSX.Element | undefined; | ||
export declare const getEditableRenderElement: (options: RenderNodeOptions[]) => (props: PlateRenderElementProps) => JSX.Element | undefined; | ||
//# sourceMappingURL=getEditableRenderElement.d.ts.map |
import { RenderNodeOptions } from '../types/PlatePluginOptions/RenderNodeOptions'; | ||
import { SPRenderLeafProps } from '../types/SPRenderLeafProps'; | ||
import { PlateRenderLeafProps } from '../types/PlateRenderLeafProps'; | ||
/** | ||
@@ -8,3 +8,3 @@ * Get a `Editable.renderLeaf` handler for `options.type`. | ||
*/ | ||
export declare const getEditableRenderLeaf: ({ type, component: Leaf, getNodeProps, overrideProps, }: RenderNodeOptions) => (props: SPRenderLeafProps) => any; | ||
export declare const getEditableRenderLeaf: ({ type, component: Leaf, getNodeProps, overrideProps, }: RenderNodeOptions) => (props: PlateRenderLeafProps) => any; | ||
//# sourceMappingURL=getEditableRenderLeaf.d.ts.map |
@@ -0,3 +1,3 @@ | ||
import { PlateEditor } from '../types/PlateEditor'; | ||
import { PlateOptions } from '../types/PlatePluginOptions/PlateOptions'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
import { AnyObject } from '../types/utility/AnyObject'; | ||
@@ -7,3 +7,3 @@ /** | ||
*/ | ||
export declare const getEditorOptions: <T = AnyObject>(editor?: SPEditor | undefined) => PlateOptions<T>; | ||
export declare const getEditorOptions: <T = AnyObject, E = {}>(editor?: PlateEditor<E> | undefined) => PlateOptions<T>; | ||
//# sourceMappingURL=getEditorOptions.d.ts.map |
@@ -0,7 +1,7 @@ | ||
import { PlateEditor } from '../types/PlateEditor'; | ||
import { PlatePlugin } from '../types/PlatePlugin/PlatePlugin'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
/** | ||
* Get inline types from the plugins | ||
*/ | ||
export declare const getInlineTypes: <T extends SPEditor = SPEditor>(editor: T, plugins: PlatePlugin<T>[]) => string[]; | ||
export declare const getInlineTypes: <T = {}>(editor: PlateEditor<T>, plugins: PlatePlugin<T>[]) => string[]; | ||
//# sourceMappingURL=getInlineTypes.d.ts.map |
@@ -0,8 +1,8 @@ | ||
import { PlateEditor } from '../types/PlateEditor'; | ||
import { PlatePluginOptions } from '../types/PlatePluginOptions/PlateOptions'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
import { AnyObject } from '../types/utility/AnyObject'; | ||
/** | ||
* Get SP options by plugin key. | ||
* Get plugin options by plugin key. | ||
*/ | ||
export declare const getPlatePluginOptions: <T = AnyObject>(editor?: SPEditor | undefined, pluginKey?: string) => PlatePluginOptions<T>; | ||
export declare const getPlatePluginOptions: <T = AnyObject, E = {}>(editor?: PlateEditor<E> | undefined, pluginKey?: string) => PlatePluginOptions<T>; | ||
//# sourceMappingURL=getPlatePluginOptions.d.ts.map |
@@ -1,6 +0,6 @@ | ||
import { SPEditor } from '../types/SPEditor'; | ||
import { PlateEditor } from '../types/PlateEditor'; | ||
/** | ||
* Get SP type option by plugin key. | ||
* Get plugin type option by plugin key. | ||
*/ | ||
export declare const getPlatePluginType: (editor?: SPEditor | undefined, pluginKey?: string | undefined) => string; | ||
export declare const getPlatePluginType: <T = {}>(editor?: PlateEditor<T> | undefined, pluginKey?: string | undefined) => string; | ||
//# sourceMappingURL=getPlatePluginType.d.ts.map |
@@ -1,3 +0,3 @@ | ||
import { SPEditor } from '../types/SPEditor'; | ||
export declare const getPlatePluginTypes: (pluginKey: string | string[]) => (editor: SPEditor) => string[]; | ||
import { PlateEditor } from '../types/PlateEditor'; | ||
export declare const getPlatePluginTypes: (pluginKey: string | string[]) => (editor: PlateEditor) => string[]; | ||
//# sourceMappingURL=getPlatePluginTypes.d.ts.map |
import { WithOverride } from '../types'; | ||
import { PlatePlugin } from '../types/PlatePlugin/PlatePlugin'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
/** | ||
* Helper to get a plate plugin returning `withOverrides` | ||
*/ | ||
export declare const getPlatePluginWithOverrides: <T extends SPEditor = SPEditor, V extends (...args: any) => WithOverride<T, {}> = (...args: any) => WithOverride<T, {}>>(withOverrides: V) => (...options: Parameters<V>) => PlatePlugin<T>; | ||
export declare const getPlatePluginWithOverrides: <T = {}, O = {}, V extends (...args: any) => WithOverride<T, O> = (...args: any) => WithOverride<T, O>>(withOverrides: V) => (...options: Parameters<V>) => PlatePlugin<T & O>; | ||
//# sourceMappingURL=getPlatePluginWithOverrides.d.ts.map |
import { RenderNodeOptions } from '../types/PlatePluginOptions/RenderNodeOptions'; | ||
import { SPRenderNodeProps } from '../types/SPRenderNodeProps'; | ||
import { PlateRenderNodeProps } from '../types/PlateRenderNodeProps'; | ||
/** | ||
* Computes `className` and `nodeProps` | ||
* Get node props: `nodeProps`, `className`, `overrideProps` | ||
*/ | ||
export declare const getRenderNodeProps: ({ attributes, overrideProps, type, getNodeProps, props, }: Omit<RenderNodeOptions, "component"> & { | ||
props: SPRenderNodeProps; | ||
export declare const getRenderNodeProps: <T extends PlateRenderNodeProps>({ attributes, overrideProps, type, getNodeProps, props: _props, }: Omit<RenderNodeOptions, "component"> & { | ||
props: T; | ||
attributes?: any; | ||
}) => { | ||
}) => T & { | ||
className: string; | ||
@@ -11,0 +11,0 @@ nodeProps: any; |
@@ -0,7 +1,7 @@ | ||
import { PlateEditor } from '../types/PlateEditor'; | ||
import { PlatePlugin } from '../types/PlatePlugin/PlatePlugin'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
/** | ||
* Get void types from the plugins | ||
*/ | ||
export declare const getVoidTypes: (editor: SPEditor, plugins: PlatePlugin[]) => string[]; | ||
export declare const getVoidTypes: (editor: PlateEditor, plugins: PlatePlugin[]) => string[]; | ||
//# sourceMappingURL=getVoidTypes.d.ts.map |
@@ -1,6 +0,15 @@ | ||
import { SPEditor } from '../types/SPEditor'; | ||
import { PlateEditor } from '../types/PlateEditor'; | ||
/** | ||
* Map plugins keys to SP options | ||
* Map plugins keys to plugin options | ||
*/ | ||
export declare const mapPlatePluginKeysToOptions: (editor: SPEditor, pluginKey: string | string[]) => never[]; | ||
export declare const mapPlatePluginKeysToOptions: <T = {}>(editor: PlateEditor<T>, pluginKey: string | string[]) => { | ||
type: string; | ||
clear?: string | string[] | undefined; | ||
component?: import("..").PlatePluginComponent | undefined; | ||
defaultType?: string | undefined; | ||
deserialize?: Partial<import("..").DeserializeOptions> | undefined; | ||
getNodeProps?: import("..").GetNodeProps | undefined; | ||
hotkey?: string | string[] | undefined; | ||
overrideProps?: import("..").GetNodeProps | import("..").NodeProps | undefined; | ||
}[]; | ||
//# sourceMappingURL=mapPlatePluginKeysToOptions.d.ts.map |
import { EditableProps } from 'slate-react/dist/components/editable'; | ||
import { PlateEditor } from '../types/PlateEditor'; | ||
import { PlatePlugin } from '../types/PlatePlugin/PlatePlugin'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
/** | ||
@@ -8,3 +8,3 @@ * @see {@link Decorate}. | ||
*/ | ||
export declare const pipeDecorate: (editor: SPEditor, plugins?: PlatePlugin[]) => EditableProps['decorate']; | ||
export declare const pipeDecorate: (editor: PlateEditor, plugins?: PlatePlugin[]) => EditableProps['decorate']; | ||
//# sourceMappingURL=pipeDecorate.d.ts.map |
import { SyntheticEvent } from 'react'; | ||
import { EditableProps } from 'slate-react/dist/components/editable'; | ||
import { PlateEditor } from '../types/PlateEditor'; | ||
import { DOMHandlers } from '../types/PlatePlugin/DOMHandlers'; | ||
import { PlatePlugin } from '../types/PlatePlugin/PlatePlugin'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
/** | ||
@@ -17,7 +17,7 @@ * Check if an event is overrided by a handler. | ||
*/ | ||
export declare const pipeHandler: <K extends keyof DOMHandlers<SPEditor>>(editor: SPEditor, { editableProps, handlerKey, plugins, }: { | ||
export declare const pipeHandler: <K extends keyof DOMHandlers<{}>>(editor: PlateEditor, { editableProps, handlerKey, plugins, }: { | ||
editableProps?: EditableProps | undefined; | ||
handlerKey: K; | ||
plugins?: PlatePlugin<SPEditor>[] | undefined; | ||
plugins?: PlatePlugin<{}>[] | undefined; | ||
}) => ((event: any) => void) | undefined; | ||
//# sourceMappingURL=pipeHandler.d.ts.map |
@@ -0,5 +1,5 @@ | ||
import { PlateEditor } from '../types/PlateEditor'; | ||
import { OnChange } from '../types/PlatePlugin/OnChange'; | ||
import { PlatePlugin } from '../types/PlatePlugin/PlatePlugin'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
export declare const pipeOnChange: (editor: SPEditor, plugins?: PlatePlugin[]) => ReturnType<OnChange>; | ||
export declare const pipeOnChange: (editor: PlateEditor, plugins?: PlatePlugin[]) => ReturnType<OnChange>; | ||
//# sourceMappingURL=pipeOnChange.d.ts.map |
import { EditableProps } from 'slate-react/dist/components/editable'; | ||
import { PlateEditor } from '../types/PlateEditor'; | ||
import { PlatePlugin } from '../types/PlatePlugin/PlatePlugin'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
/** | ||
* @see {@link RenderElement} | ||
*/ | ||
export declare const pipeRenderElement: (editor: SPEditor, plugins?: PlatePlugin[]) => EditableProps['renderElement']; | ||
export declare const pipeRenderElement: (editor: PlateEditor, plugins?: PlatePlugin[]) => EditableProps['renderElement']; | ||
//# sourceMappingURL=pipeRenderElement.d.ts.map |
import { EditableProps } from 'slate-react/dist/components/editable'; | ||
import { PlateEditor } from '../types/PlateEditor'; | ||
import { PlatePlugin } from '../types/PlatePlugin/PlatePlugin'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
/** | ||
* @see {@link RenderLeaf} | ||
*/ | ||
export declare const pipeRenderLeaf: (editor: SPEditor, plugins?: PlatePlugin[]) => EditableProps['renderLeaf']; | ||
export declare const pipeRenderLeaf: (editor: PlateEditor, plugins?: PlatePlugin[]) => EditableProps['renderLeaf']; | ||
//# sourceMappingURL=pipeRenderLeaf.d.ts.map |
import { PlatePlugin } from '../types/PlatePlugin/PlatePlugin'; | ||
import { WithOverride } from '../types/PlatePlugin/WithOverride'; | ||
import { PlateOptions, PlatePluginComponent } from '../types/PlatePluginOptions/PlateOptions'; | ||
import { SPEditor } from '../types/SPEditor'; | ||
import { TEditor } from '../types/TEditor'; | ||
export interface WithPlateOptions<T extends SPEditor = SPEditor> { | ||
import { PlatePluginComponent, PlatePluginOptions, PluginKey } from '../types/PlatePluginOptions/PlateOptions'; | ||
export interface WithPlateOptions { | ||
id?: string | null; | ||
plugins?: PlatePlugin<T>[]; | ||
options?: PlateOptions; | ||
plugins?: PlatePlugin[]; | ||
options?: Record<PluginKey, Partial<PlatePluginOptions>>; | ||
components?: Record<string, PlatePluginComponent>; | ||
@@ -17,5 +15,5 @@ } | ||
* - `key`: random key for the <Slate> component so each time the editor is created, the component resets. | ||
* - `options`: {@link PlateOptions} | ||
* - `options`: Plate options | ||
*/ | ||
export declare const withPlate: <T extends SPEditor = SPEditor>({ id, plugins, options, components, }?: WithPlateOptions<T>) => WithOverride<TEditor<import("..").AnyObject>, T>; | ||
export declare const withPlate: ({ id, plugins, options: _options, components, }?: WithPlateOptions) => WithOverride; | ||
//# sourceMappingURL=withPlate.d.ts.map |
{ | ||
"name": "@udecode/plate-core", | ||
"version": "6.4.1", | ||
"version": "7.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 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 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
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
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
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
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
1202547
229
9266