@lofcz/platejs-core 53.0.0 → 53.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-C-LKDYK-.d.ts → index-BooMghRU.d.ts} +78 -78
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.d.ts +180 -180
- package/dist/react/index.js +2 -2
- package/dist/static/index.d.ts +1 -1
- package/dist/static/index.js +2 -2
- package/dist/{static-HrbPXDQ1.js → static-DAs0P1Ms.js} +1 -1
- package/dist/{withSlate-DsAgt7dN.js → withSlate-Ck8dLhUt.js} +55 -41
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _platejs_slate30 from "@platejs/slate";
|
|
2
2
|
import { Ancestor, DOMRange, DecoratedRange, Descendant, Editor, EditorAboveOptions, EditorApi, EditorBase, EditorTransforms, InsertTextOptions, LeafPosition, NodeEntry, NodeOf, NodeOperation, Operation, Path, PathRef, Point, QueryNodeOptions, ScrollIntoViewOptions, TElement, TNode, TRange, TSelection, TText, TextOperation, Value } from "@platejs/slate";
|
|
3
3
|
import { nanoid as nanoid$1 } from "nanoid";
|
|
4
4
|
import { AnyObject, Deep2Partial, Modify, Nullable, OmitFirst, UnionToIntersection, UnknownObject } from "@udecode/utils";
|
|
@@ -200,9 +200,9 @@ declare const createStaticEditor: <V extends Value = Value, P extends AnyPluginC
|
|
|
200
200
|
declare const ViewPlugin: SlatePlugin<PluginConfig<"dom", {
|
|
201
201
|
scrollMode?: ScrollMode;
|
|
202
202
|
scrollOperations?: AutoScrollOperationsMap;
|
|
203
|
-
scrollOptions?:
|
|
203
|
+
scrollOptions?: _platejs_slate30.ScrollIntoViewOptions;
|
|
204
204
|
}, {
|
|
205
|
-
getFragment: () =>
|
|
205
|
+
getFragment: () => _platejs_slate30.Descendant[];
|
|
206
206
|
isScrolling: () => boolean;
|
|
207
207
|
}, {
|
|
208
208
|
withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
|
|
@@ -212,9 +212,9 @@ declare const ViewPlugin: SlatePlugin<PluginConfig<"dom", {
|
|
|
212
212
|
declare const getStaticPlugins: () => SlatePlugin<PluginConfig<"dom", {
|
|
213
213
|
scrollMode?: ScrollMode;
|
|
214
214
|
scrollOperations?: AutoScrollOperationsMap;
|
|
215
|
-
scrollOptions?:
|
|
215
|
+
scrollOptions?: _platejs_slate30.ScrollIntoViewOptions;
|
|
216
216
|
}, {
|
|
217
|
-
getFragment: () =>
|
|
217
|
+
getFragment: () => _platejs_slate30.Descendant[];
|
|
218
218
|
isScrolling: () => boolean;
|
|
219
219
|
}, {
|
|
220
220
|
withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
|
|
@@ -877,50 +877,6 @@ declare const HistoryPlugin: SlatePlugin<PluginConfig<"history", {}, {}, {}, {}>
|
|
|
877
877
|
//#region src/lib/plugins/ParserPlugin.d.ts
|
|
878
878
|
declare const ParserPlugin: SlatePlugin<PluginConfig<"parser", {}, {}, {}, {}>>;
|
|
879
879
|
//#endregion
|
|
880
|
-
//#region src/lib/plugins/dom/withScrolling.d.ts
|
|
881
|
-
type WithAutoScrollOptions = {
|
|
882
|
-
mode?: ScrollMode;
|
|
883
|
-
operations?: AutoScrollOperationsMap;
|
|
884
|
-
scrollOptions?: ScrollIntoViewOptions;
|
|
885
|
-
};
|
|
886
|
-
declare const withScrolling: (editor: SlateEditor, fn: () => void, options?: WithAutoScrollOptions) => void;
|
|
887
|
-
//#endregion
|
|
888
|
-
//#region src/lib/plugins/dom/DOMPlugin.d.ts
|
|
889
|
-
declare const AUTO_SCROLL: WeakMap<SlateEditor, boolean>;
|
|
890
|
-
type AutoScrollOperationsMap = Partial<Record<Operation['type'], boolean>>;
|
|
891
|
-
type DomConfig = PluginConfig<'dom', {
|
|
892
|
-
/** Choose the first or last matching operation as the scroll target */
|
|
893
|
-
scrollMode?: ScrollMode;
|
|
894
|
-
/**
|
|
895
|
-
* Operations map; false to disable an operation, true or undefined to
|
|
896
|
-
* enable
|
|
897
|
-
*/
|
|
898
|
-
scrollOperations?: AutoScrollOperationsMap;
|
|
899
|
-
/** Options passed to scrollIntoView */
|
|
900
|
-
scrollOptions?: ScrollIntoViewOptions;
|
|
901
|
-
}>;
|
|
902
|
-
/** Mode for picking target op when multiple enabled */
|
|
903
|
-
type ScrollMode = 'first' | 'last';
|
|
904
|
-
/**
|
|
905
|
-
* Placeholder plugin for DOM interaction, that could be replaced with
|
|
906
|
-
* ReactPlugin.
|
|
907
|
-
*/
|
|
908
|
-
declare const DOMPlugin: SlatePlugin<PluginConfig<"dom", {
|
|
909
|
-
/** Choose the first or last matching operation as the scroll target */
|
|
910
|
-
scrollMode?: ScrollMode;
|
|
911
|
-
/**
|
|
912
|
-
* Operations map; false to disable an operation, true or undefined to
|
|
913
|
-
* enable
|
|
914
|
-
*/
|
|
915
|
-
scrollOperations?: AutoScrollOperationsMap;
|
|
916
|
-
/** Options passed to scrollIntoView */
|
|
917
|
-
scrollOptions?: ScrollIntoViewOptions;
|
|
918
|
-
}, {
|
|
919
|
-
isScrolling: () => boolean;
|
|
920
|
-
}, {
|
|
921
|
-
withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
|
|
922
|
-
}, {}>>;
|
|
923
|
-
//#endregion
|
|
924
880
|
//#region src/lib/plugins/slate-extension/transforms/init.d.ts
|
|
925
881
|
type InitOptions = {
|
|
926
882
|
autoSelect?: boolean | 'end' | 'start';
|
|
@@ -1042,12 +998,56 @@ declare const SlateExtensionPlugin: SlatePlugin<PluginConfig<"slateExtension", {
|
|
|
1042
998
|
insertExitBreak: ((args_0?: InsertExitBreakOptions | undefined) => true | undefined) & ((args_0?: InsertExitBreakOptions | undefined) => true | undefined);
|
|
1043
999
|
liftBlock: ((args_0?: LiftBlockOptions | undefined) => true | undefined) & ((args_0?: LiftBlockOptions | undefined) => true | undefined);
|
|
1044
1000
|
resetBlock: ((args_0?: {
|
|
1045
|
-
at?:
|
|
1001
|
+
at?: _platejs_slate30.Path;
|
|
1046
1002
|
} | undefined) => true | undefined) & ((args_0?: {
|
|
1047
|
-
at?:
|
|
1003
|
+
at?: _platejs_slate30.Path;
|
|
1048
1004
|
} | undefined) => true | undefined);
|
|
1049
|
-
setValue: ((value?: string |
|
|
1050
|
-
apply: <N$1 extends
|
|
1005
|
+
setValue: ((value?: string | _platejs_slate30.Value | undefined) => void) & ((value?: string | _platejs_slate30.Value | undefined) => void);
|
|
1006
|
+
apply: <N$1 extends _platejs_slate30.TElement | TText>(operation: _platejs_slate30.Operation<N$1>) => void;
|
|
1007
|
+
}, {}>>;
|
|
1008
|
+
//#endregion
|
|
1009
|
+
//#region src/lib/plugins/dom/withScrolling.d.ts
|
|
1010
|
+
type WithAutoScrollOptions = {
|
|
1011
|
+
mode?: ScrollMode;
|
|
1012
|
+
operations?: AutoScrollOperationsMap;
|
|
1013
|
+
scrollOptions?: ScrollIntoViewOptions;
|
|
1014
|
+
};
|
|
1015
|
+
declare const withScrolling: (editor: SlateEditor, fn: () => void, options?: WithAutoScrollOptions) => void;
|
|
1016
|
+
//#endregion
|
|
1017
|
+
//#region src/lib/plugins/dom/DOMPlugin.d.ts
|
|
1018
|
+
declare const AUTO_SCROLL: WeakMap<SlateEditor, boolean>;
|
|
1019
|
+
type AutoScrollOperationsMap = Partial<Record<Operation['type'], boolean>>;
|
|
1020
|
+
type DomConfig = PluginConfig<'dom', {
|
|
1021
|
+
/** Choose the first or last matching operation as the scroll target */
|
|
1022
|
+
scrollMode?: ScrollMode;
|
|
1023
|
+
/**
|
|
1024
|
+
* Operations map; false to disable an operation, true or undefined to
|
|
1025
|
+
* enable
|
|
1026
|
+
*/
|
|
1027
|
+
scrollOperations?: AutoScrollOperationsMap;
|
|
1028
|
+
/** Options passed to scrollIntoView */
|
|
1029
|
+
scrollOptions?: ScrollIntoViewOptions;
|
|
1030
|
+
}>;
|
|
1031
|
+
/** Mode for picking target op when multiple enabled */
|
|
1032
|
+
type ScrollMode = 'first' | 'last';
|
|
1033
|
+
/**
|
|
1034
|
+
* Placeholder plugin for DOM interaction, that could be replaced with
|
|
1035
|
+
* ReactPlugin.
|
|
1036
|
+
*/
|
|
1037
|
+
declare const DOMPlugin: SlatePlugin<PluginConfig<"dom", {
|
|
1038
|
+
/** Choose the first or last matching operation as the scroll target */
|
|
1039
|
+
scrollMode?: ScrollMode;
|
|
1040
|
+
/**
|
|
1041
|
+
* Operations map; false to disable an operation, true or undefined to
|
|
1042
|
+
* enable
|
|
1043
|
+
*/
|
|
1044
|
+
scrollOperations?: AutoScrollOperationsMap;
|
|
1045
|
+
/** Options passed to scrollIntoView */
|
|
1046
|
+
scrollOptions?: ScrollIntoViewOptions;
|
|
1047
|
+
}, {
|
|
1048
|
+
isScrolling: () => boolean;
|
|
1049
|
+
}, {
|
|
1050
|
+
withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
|
|
1051
1051
|
}, {}>>;
|
|
1052
1052
|
//#endregion
|
|
1053
1053
|
//#region src/lib/plugins/navigation-feedback/types.d.ts
|
|
@@ -1109,7 +1109,7 @@ declare const NavigationFeedbackPlugin: SlatePlugin<PluginConfig<"navigationFeed
|
|
|
1109
1109
|
navigation: {
|
|
1110
1110
|
activeTarget: () => NavigationFeedbackActiveTarget | null;
|
|
1111
1111
|
clear: () => void;
|
|
1112
|
-
isTarget: (path:
|
|
1112
|
+
isTarget: (path: _platejs_slate30.Path) => boolean;
|
|
1113
1113
|
};
|
|
1114
1114
|
}, {
|
|
1115
1115
|
navigation: {
|
|
@@ -1353,25 +1353,17 @@ declare const getCorePlugins: ({
|
|
|
1353
1353
|
navigationFeedback,
|
|
1354
1354
|
nodeId,
|
|
1355
1355
|
plugins
|
|
1356
|
-
}: GetCorePluginsOptions) => (SlatePlugin<PluginConfig<"
|
|
1357
|
-
scrollMode?: ScrollMode;
|
|
1358
|
-
scrollOperations?: AutoScrollOperationsMap;
|
|
1359
|
-
scrollOptions?: _platejs_slate1.ScrollIntoViewOptions;
|
|
1360
|
-
}, {
|
|
1361
|
-
isScrolling: () => boolean;
|
|
1362
|
-
}, {
|
|
1363
|
-
withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
|
|
1364
|
-
}, {}>> | SlatePlugin<DebugConfig> | SlatePlugin<PluginConfig<"slateExtension", {
|
|
1356
|
+
}: GetCorePluginsOptions) => (SlatePlugin<DebugConfig> | SlatePlugin<PluginConfig<"slateExtension", {
|
|
1365
1357
|
onNodeChange: (options: {
|
|
1366
1358
|
editor: SlateEditor;
|
|
1367
|
-
node:
|
|
1368
|
-
operation:
|
|
1369
|
-
prevNode:
|
|
1359
|
+
node: _platejs_slate30.Descendant;
|
|
1360
|
+
operation: _platejs_slate30.NodeOperation;
|
|
1361
|
+
prevNode: _platejs_slate30.Descendant;
|
|
1370
1362
|
}) => void;
|
|
1371
1363
|
onTextChange: (options: {
|
|
1372
1364
|
editor: SlateEditor;
|
|
1373
|
-
node:
|
|
1374
|
-
operation:
|
|
1365
|
+
node: _platejs_slate30.Descendant;
|
|
1366
|
+
operation: _platejs_slate30.TextOperation;
|
|
1375
1367
|
prevText: string;
|
|
1376
1368
|
text: string;
|
|
1377
1369
|
}) => void;
|
|
@@ -1382,12 +1374,20 @@ declare const getCorePlugins: ({
|
|
|
1382
1374
|
insertExitBreak: ((args_0?: InsertExitBreakOptions | undefined) => true | undefined) & ((args_0?: InsertExitBreakOptions | undefined) => true | undefined);
|
|
1383
1375
|
liftBlock: ((args_0?: LiftBlockOptions | undefined) => true | undefined) & ((args_0?: LiftBlockOptions | undefined) => true | undefined);
|
|
1384
1376
|
resetBlock: ((args_0?: {
|
|
1385
|
-
at?:
|
|
1377
|
+
at?: _platejs_slate30.Path;
|
|
1386
1378
|
} | undefined) => true | undefined) & ((args_0?: {
|
|
1387
|
-
at?:
|
|
1379
|
+
at?: _platejs_slate30.Path;
|
|
1388
1380
|
} | undefined) => true | undefined);
|
|
1389
|
-
setValue: ((value?: string |
|
|
1390
|
-
apply: <N$1 extends
|
|
1381
|
+
setValue: ((value?: string | _platejs_slate30.Value | undefined) => void) & ((value?: string | _platejs_slate30.Value | undefined) => void);
|
|
1382
|
+
apply: <N$1 extends _platejs_slate30.TElement | _platejs_slate30.TText>(operation: _platejs_slate30.Operation<N$1>) => void;
|
|
1383
|
+
}, {}>> | SlatePlugin<PluginConfig<"dom", {
|
|
1384
|
+
scrollMode?: ScrollMode;
|
|
1385
|
+
scrollOperations?: AutoScrollOperationsMap;
|
|
1386
|
+
scrollOptions?: _platejs_slate30.ScrollIntoViewOptions;
|
|
1387
|
+
}, {
|
|
1388
|
+
isScrolling: () => boolean;
|
|
1389
|
+
}, {
|
|
1390
|
+
withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
|
|
1391
1391
|
}, {}>> | SlatePlugin<PluginConfig<"navigationFeedback", {
|
|
1392
1392
|
activeTarget: NavigationFeedbackStoredTarget | null;
|
|
1393
1393
|
duration: number;
|
|
@@ -1395,7 +1395,7 @@ declare const getCorePlugins: ({
|
|
|
1395
1395
|
navigation: {
|
|
1396
1396
|
activeTarget: () => NavigationFeedbackActiveTarget | null;
|
|
1397
1397
|
clear: () => void;
|
|
1398
|
-
isTarget: (path:
|
|
1398
|
+
isTarget: (path: _platejs_slate30.Path) => boolean;
|
|
1399
1399
|
};
|
|
1400
1400
|
}, {
|
|
1401
1401
|
navigation: {
|
|
@@ -1408,7 +1408,7 @@ declare const getCorePlugins: ({
|
|
|
1408
1408
|
element: HTMLElement | string;
|
|
1409
1409
|
collapseWhiteSpace?: boolean;
|
|
1410
1410
|
defaultElementPlugin?: WithRequiredKey;
|
|
1411
|
-
}) =>
|
|
1411
|
+
}) => _platejs_slate30.Descendant[];
|
|
1412
1412
|
}>, {}, {}>> | SlatePlugin<PluginConfig<"ast", {}, {}, {}, {}>> | SlatePlugin<PluginConfig<"nodeId", {
|
|
1413
1413
|
disableInsertOverrides?: boolean;
|
|
1414
1414
|
filterInline?: boolean;
|
|
@@ -1417,7 +1417,7 @@ declare const getCorePlugins: ({
|
|
|
1417
1417
|
normalizeInitialValue?: boolean;
|
|
1418
1418
|
reuseId?: boolean;
|
|
1419
1419
|
idCreator?: () => any;
|
|
1420
|
-
} &
|
|
1420
|
+
} & _platejs_slate30.QueryNodeOptions, {}, {
|
|
1421
1421
|
nodeId: {
|
|
1422
1422
|
normalize: () => void;
|
|
1423
1423
|
};
|
|
@@ -1457,7 +1457,7 @@ declare const HtmlPlugin: SlatePlugin<PluginConfig<"html", {}, Record<"html", {
|
|
|
1457
1457
|
element: HTMLElement | string;
|
|
1458
1458
|
collapseWhiteSpace?: boolean;
|
|
1459
1459
|
defaultElementPlugin?: WithRequiredKey;
|
|
1460
|
-
}) =>
|
|
1460
|
+
}) => _platejs_slate30.Descendant[];
|
|
1461
1461
|
}>, {}, {}>>;
|
|
1462
1462
|
//#endregion
|
|
1463
1463
|
//#region src/lib/plugins/html/constants.d.ts
|
|
@@ -3029,7 +3029,7 @@ declare const normalizeDescendantsToDocumentFragment: (editor: SlateEditor, {
|
|
|
3029
3029
|
}) => Descendant[];
|
|
3030
3030
|
//#endregion
|
|
3031
3031
|
//#region src/lib/utils/omitPluginContext.d.ts
|
|
3032
|
-
declare const omitPluginContext: <T extends SlatePluginContext<AnySlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "
|
|
3032
|
+
declare const omitPluginContext: <T extends SlatePluginContext<AnySlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "getOptions" | "getOption" | "tf" | "type" | "setOptions" | "setOption" | "plugin">;
|
|
3033
3033
|
//#endregion
|
|
3034
3034
|
//#region src/lib/utils/overridePluginsByKey.d.ts
|
|
3035
3035
|
/**
|
|
@@ -3048,4 +3048,4 @@ declare const pipeOnNodeChange: (editor: SlateEditor, node: Descendant, prevNode
|
|
|
3048
3048
|
//#region src/lib/utils/pipeOnTextChange.d.ts
|
|
3049
3049
|
declare const pipeOnTextChange: (editor: SlateEditor, node: Descendant, text: string, prevText: string, operation: TextOperation) => boolean;
|
|
3050
3050
|
//#endregion
|
|
3051
|
-
export { TSlateEditor as $, SlateHTMLProps as $a, Serializer as $i, cleanHtmlFontElements as $n,
|
|
3051
|
+
export { TSlateEditor as $, SlateHTMLProps as $a, Serializer as $i, cleanHtmlFontElements as $n, AUTO_SCROLL as $r, upsertInlineFormattingContext as $t, applyDeepToNodes as A, ResolvedInputRule as Aa, AnySlatePlugin as Ai, isHtmlInlineElement as An, AstPlugin as Ao, PlateError as Ar, BaseParagraphPlugin as At, ZustandStoreApi as B, getSelectedDomNode as Ba, InjectNodeProps as Bi, htmlBrToNewLine as Bn, navigate as Br, STATIC_VALUE_CREATED_AT as Bt, isSlateNode as C, InsertDataInputRuleContext as Ca, getPluginType as Ci, pipeDeserializeHtmlLeaf as Cn, SlateRenderLeaf as Co, NodeIdOptions as Cr, NodeComponents as Ct, isSlateText as D, MatchBlockFenceOptions as Da, createSlatePlugin as Di, isOlSymbol as Dn, SlateRenderElement as Do, DebugErrorType as Dr, SelectionRules as Dt, isSlateString as E, MarkInputRuleConfig as Ea, getEditorPlugin as Ei, parseHtmlDocument as En, pipeRenderElementStatic as Eo, normalizeNodeId as Er, PluginConfig as Et, RenderLeafProps as F, TextSubstitutionPattern as Fa, ExtendEditorApi as Fi, inlineTagNames as Fn, getEdgeNodes as Fr, withBreakRules as Ft, WithSlateOptions as G, getPluginDataAttributes as Ga, NodeStaticWrapperComponentReturnType as Gi, someHtmlElement as Gn, NAVIGATION_FEEDBACK_KEY as Gr, createBlockFenceInputRule as Gt, nanoid$1 as H, getSelectedDomBlocks as Ha, NodeStaticProps as Hi, getHtmlComments as Hn, flashTarget as Hr, LengthPlugin as Ht, RenderElementFn as I, stripSlateDataAttributes as Ia, ExtendEditorTransforms as Ii, htmlTextNodeToString as In, EdgeNodes as Ir, OverridePlugin as It, BaseEditor as J, ViewPlugin as Ja, Parser as Ji, deserializeHtmlElement as Jn, NavigationFeedbackPluginKey as Jr, createTextSubstitutionInputRule as Jt, createSlateEditor as K, createStaticString as Ka, NormalizeInitialValue as Ki, deserializeHtmlNodeChildren as Kn, NavigationFeedbackActiveTarget as Kr, createBlockStartInputRule as Kt, RenderElementProps as L, stripHtmlClassNames as La, HtmlDeserializer as Li, htmlStringToDOMNode as Ln, AffinityConfig as Lr, withOverrides as Lt, RenderTextFn as M, SelectionInputRuleContext as Ma, Deserializer as Mi, isHtmlElement as Mn, isNodeAffinity as Mr, withNormalizeRules as Mt, RenderTextProps as N, TextSubstitutionInputRuleConfig as Na, EditorPlugin as Ni, isHtmlComment as Nn, isNodesAffinity as Nr, withMergeRules as Nt, isSlateVoid as O, MatchBlockStartOptions as Oa, createTSlatePlugin as Oi, isHtmlText as On, pluginRenderElementStatic as Oo, DebugPlugin as Or, WithAnyKey as Ot, RenderLeafFn as P, TextSubstitutionMatch as Pa, ExtendEditor as Pi, isHtmlBlockElement as Pn, getMarkBoundaryAffinity as Pr, withDeleteRules as Pt, SlateEditor as Q, SlateElementProps as Qa, RenderStaticNodeWrapperProps as Qi, cleanHtmlLinkElements as Qn, NavigationNavigateOptions as Qr, endInlineFormattingContext as Qt, RenderChunkFn as R, pipeDecorate as Ra, HtmlSerializer as Ri, htmlElementToLeaf as Rn, AffinityPlugin as Rr, withNodeId as Rt, isSlateLeaf as S, InsertDataInputRule as Sa, getPluginKeys as Si, pluginDeserializeHtml as Sn, pluginRenderTextStatic as So, NodeIdConfig as Sr, NodeComponent as St, isSlatePluginNode as T, InsertTextInputRuleContext as Ta, getSlatePlugin as Ti, parseHtmlElement as Tn, pluginRenderLeafStatic as To, NormalizeNodeIdOptions as Tr, ParserOptions as Tt, BaseWithSlateOptions as U, getRenderNodeStaticProps as Ua, NodeStaticWrapperComponent as Ui, getDataNodeProps as Un, resolveNavigationFeedbackTarget as Ur, defineInputRule as Ut, createZustandStore$1 as V, getSelectedDomFragment as Va, LeafStaticProps as Vi, htmlBodyToFragment as Vn, clearNavigationFeedbackTarget as Vr, normalizeStaticValue as Vt, CreateSlateEditorOptions as W, getNodeDataAttributes as Wa, NodeStaticWrapperComponentProps as Wi, findHtmlElement as Wn, NavigationFeedbackPlugin as Wr, createRuleFactory as Wt, KeyofNodePlugins as X, getEditorDOMFromHtmlString as Xa, RenderStaticNodeWrapper as Xi, copyBlockMarksToSpanChild as Xn, NavigationFeedbackTarget as Xr, matchBlockStart as Xt, InferPlugins as Y, createStaticEditor as Ya, PartialEditorPlugin as Yi, deserializeHtml as Yn, NavigationFeedbackStoredTarget as Yr, matchBlockFence as Yt, KeyofPlugins as Z, SlateElement as Za, RenderStaticNodeWrapperFunction as Zi, cleanHtmlTextNodes as Zn, NavigationFlashTargetOptions as Zr, matchDelimitedInline as Zt, getInjectMatch as _, InputRulesConfig as _a, HistoryPlugin as _i, replaceTagName as _n, LeafStatic as _o, GetCorePluginsOptions as _r, InferOptions as _t, omitPluginContext as a, SlateShortcut as aa, withScrolling as ai, collapseWhiteSpaceChildren as an, StyledSlateElementProps as ao, CARRIAGE_RETURN as ar, BasePluginContext as at, isSlateEditor as b, InsertBreakInputRule as ba, getPluginByType as bi, preCleanHtml as bn, SlateRenderText as bo, ChunkingConfig as br, MatchRules as bt, isType as c, AnyInputRule as ca, setValue as ci, CollapseWhiteSpaceState as cn, useNodeAttributes as co, SPACE as cr, BaseTransformOptions as ct, isHotkey as d, BlockFenceInputRuleMatch as da, liftBlock as di, WhiteSpaceRule as dn, SlateRenderLeafProps as do, HtmlPlugin as dr, EditOnlyConfig as dt, SlatePlugin as ea, AutoScrollOperationsMap as ei, isLastNonEmptyTextOfInlineFormattingContext as en, SlateLeaf as eo, cleanHtmlEmptyElements as er, AnyPluginConfig as et, getSlateClass as f, BlockStartInputRuleConfig as fa, InsertExitBreakOptions as fi, unwrapHtmlElement as fn, SlateRenderNodeProps as fo, withChunking as fr, ExtendConfig as ft, getInjectedPlugins as g, InputRuleTarget as ga, ParserPlugin as gi, traverseHtmlComments as gn, ElementStatic as go, DebugConfig as gr, InferKey as gt, keyToDataAttribute as h, InputRuleBuilder as ha, init as hi, traverseHtmlElements as hn, serializeHtml as ho, CorePluginTransforms as hr, InferApi as ht, overridePluginsByKey as i, SlatePlugins as ia, WithAutoScrollOptions as ii, collapseWhiteSpaceElement as in, SlateTextProps as io, DeserializeHtmlNodeReturnType as ir, BasePlugin as it, EditableProps as j, ResolvedInputRulesMeta as ja, Decorate as ji, isHtmlFragmentHref as jn, setAffinitySelection as jr, ParagraphConfig as jt, ApplyDeepToNodesOptions as k, MatchDelimitedInlineOptions as ka, AnyEditorPlugin as ki, isHtmlTable as kn, HandlerReturnType as ko, LogLevel as kr, WithRequiredKey as kt, Hotkeys as l, BaseInputRule as la, resetBlock as li, TrimEndRule as ln, BoxStaticProps as lo, TAB as lr, BreakRules as lt, getNodeDataAttributeKeys as m, DelimitedInlineInputRuleMatch as ma, InitOptions as mi, traverseHtmlNode as mn, SerializeHtmlOptions as mo, CorePluginApi as mr, GetInjectNodePropsReturnType as mt, pipeOnNodeChange as n, SlatePluginContext as na, DomConfig as ni, collapseWhiteSpaceText as nn, SlateNodeProps as no, cleanHtmlBrElements as nr, BaseHtmlDeserializer as nt, normalizeDescendantsToDocumentFragment as o, TextStaticProps as oa, SlateExtensionConfig as oi, collapseWhiteSpace as on, StyledSlateLeafProps as oo, LINE_FEED as or, BasePluginNode as ot, getPluginNodeProps as p, BlockStartInputRuleMatch as pa, insertExitBreak as pi, traverseHtmlTexts as pn, SlateRenderTextProps as po, CorePlugin as pr, GetInjectNodePropsOptions as pt, withSlate as q, getStaticPlugins as qa, OverrideEditor as qi, deserializeHtmlNode as qn, NavigationFeedbackConfig as qr, createMarkInputRule as qt, pipeInsertDataQuery as r, SlatePluginMethods as ra, ScrollMode as ri, collapseWhiteSpaceNode as rn, SlateText as ro, DeserializeHtmlChildren as rr, BaseInjectProps as rt, mergeDeepToNodes as s, TransformOptions as sa, SlateExtensionPlugin as si, collapseString as sn, StyledSlateTextProps as so, NO_BREAK_SPACE as sr, BaseSerializer as st, pipeOnTextChange as t, SlatePluginConfig$1 as ta, DOMPlugin as ti, inferWhiteSpaceRule as tn, SlateLeafProps as to, cleanHtmlCrLf as tr, BaseDeserializer as tt, createHotkey as u, BlockFenceInputRuleConfig as ua, LiftBlockOptions as ui, TrimStartRule as un, SlateRenderElementProps as uo, ZERO_WIDTH_SPACE as ur, DeleteRules as ut, defaultsDeepToNodes as v, InputRulesDefinition as va, withPlateHistory as vi, removeHtmlSurroundings as vn, PlateStatic as vo, LengthConfig as vr, InferSelectors as vt, isSlatePluginElement as w, InsertTextInputRule as wa, getPluginTypes as wi, pipeDeserializeHtmlElement as wn, pipeRenderLeafStatic as wo, NodeIdPlugin as wr, NormalizeRules as wt, isSlateElement as x, InsertBreakInputRuleContext as xa, getPluginKey as xi, postCleanHtml as xn, pipeRenderTextStatic as xo, ChunkingPlugin as xr, MergeRules as xt, getSlateElements as y, InputRulesFactoryContext as ya, getContainerTypes as yi, removeHtmlNodesBetweenComments as yn, PlateStaticProps as yo, getCorePlugins as yr, InferTransforms as yt, RenderChunkProps as z, isSelectOutside as za, InferConfig as zi, htmlElementToElement as zn, ElementAffinity as zr, NormalizeStaticValueOptions as zt };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as TSlateEditor, $i as Serializer, $n as cleanHtmlFontElements, $r as
|
|
1
|
+
import { $ as TSlateEditor, $i as Serializer, $n as cleanHtmlFontElements, $r as AUTO_SCROLL, $t as upsertInlineFormattingContext, A as applyDeepToNodes, Aa as ResolvedInputRule, Ai as AnySlatePlugin, An as isHtmlInlineElement, Ao as AstPlugin, Ar as PlateError, At as BaseParagraphPlugin, B as ZustandStoreApi, Bi as InjectNodeProps, Bn as htmlBrToNewLine, Br as navigate, Bt as STATIC_VALUE_CREATED_AT, C as isSlateNode, Ca as InsertDataInputRuleContext, Ci as getPluginType, Cn as pipeDeserializeHtmlLeaf, Cr as NodeIdOptions, Ct as NodeComponents, D as isSlateText, Da as MatchBlockFenceOptions, Di as createSlatePlugin, Dn as isOlSymbol, Dr as DebugErrorType, Dt as SelectionRules, E as isSlateString, Ea as MarkInputRuleConfig, Ei as getEditorPlugin, En as parseHtmlDocument, Er as normalizeNodeId, Et as PluginConfig, F as RenderLeafProps, Fa as TextSubstitutionPattern, Fi as ExtendEditorApi, Fn as inlineTagNames, Fr as getEdgeNodes, Ft as withBreakRules, G as WithSlateOptions, Gi as NodeStaticWrapperComponentReturnType, Gn as someHtmlElement, Gr as NAVIGATION_FEEDBACK_KEY, Gt as createBlockFenceInputRule, H as nanoid, Hi as NodeStaticProps, Hn as getHtmlComments, Hr as flashTarget, Ht as LengthPlugin, I as RenderElementFn, Ii as ExtendEditorTransforms, In as htmlTextNodeToString, Ir as EdgeNodes, It as OverridePlugin, J as BaseEditor, Ji as Parser, Jn as deserializeHtmlElement, Jr as NavigationFeedbackPluginKey, Jt as createTextSubstitutionInputRule, K as createSlateEditor, Ki as NormalizeInitialValue, Kn as deserializeHtmlNodeChildren, Kr as NavigationFeedbackActiveTarget, Kt as createBlockStartInputRule, L as RenderElementProps, Li as HtmlDeserializer, Ln as htmlStringToDOMNode, Lr as AffinityConfig, Lt as withOverrides, M as RenderTextFn, Ma as SelectionInputRuleContext, Mi as Deserializer, Mn as isHtmlElement, Mr as isNodeAffinity, Mt as withNormalizeRules, N as RenderTextProps, Na as TextSubstitutionInputRuleConfig, Ni as EditorPlugin, Nn as isHtmlComment, Nr as isNodesAffinity, Nt as withMergeRules, O as isSlateVoid, Oa as MatchBlockStartOptions, Oi as createTSlatePlugin, On as isHtmlText, Or as DebugPlugin, Ot as WithAnyKey, P as RenderLeafFn, Pa as TextSubstitutionMatch, Pi as ExtendEditor, Pn as isHtmlBlockElement, Pr as getMarkBoundaryAffinity, Pt as withDeleteRules, Q as SlateEditor, Qi as RenderStaticNodeWrapperProps, Qn as cleanHtmlLinkElements, Qr as NavigationNavigateOptions, Qt as endInlineFormattingContext, R as RenderChunkFn, Ri as HtmlSerializer, Rn as htmlElementToLeaf, Rr as AffinityPlugin, Rt as withNodeId, S as isSlateLeaf, Sa as InsertDataInputRule, Si as getPluginKeys, Sn as pluginDeserializeHtml, Sr as NodeIdConfig, St as NodeComponent, T as isSlatePluginNode, Ta as InsertTextInputRuleContext, Ti as getSlatePlugin, Tn as parseHtmlElement, Tr as NormalizeNodeIdOptions, Tt as ParserOptions, U as BaseWithSlateOptions, Ui as NodeStaticWrapperComponent, Un as getDataNodeProps, Ur as resolveNavigationFeedbackTarget, Ut as defineInputRule, V as createZustandStore, Vi as LeafStaticProps, Vn as htmlBodyToFragment, Vr as clearNavigationFeedbackTarget, Vt as normalizeStaticValue, W as CreateSlateEditorOptions, Wi as NodeStaticWrapperComponentProps, Wn as findHtmlElement, Wr as NavigationFeedbackPlugin, Wt as createRuleFactory, X as KeyofNodePlugins, Xi as RenderStaticNodeWrapper, Xn as copyBlockMarksToSpanChild, Xr as NavigationFeedbackTarget, Xt as matchBlockStart, Y as InferPlugins, Yi as PartialEditorPlugin, Yn as deserializeHtml, Yr as NavigationFeedbackStoredTarget, Yt as matchBlockFence, Z as KeyofPlugins, Zi as RenderStaticNodeWrapperFunction, Zn as cleanHtmlTextNodes, Zr as NavigationFlashTargetOptions, Zt as matchDelimitedInline, _ as getInjectMatch, _a as InputRulesConfig, _i as HistoryPlugin, _n as replaceTagName, _r as GetCorePluginsOptions, _t as InferOptions, a as omitPluginContext, aa as SlateShortcut, ai as withScrolling, an as collapseWhiteSpaceChildren, ar as CARRIAGE_RETURN, at as BasePluginContext, b as isSlateEditor, ba as InsertBreakInputRule, bi as getPluginByType, bn as preCleanHtml, br as ChunkingConfig, bt as MatchRules, c as isType, ca as AnyInputRule, ci as setValue, cn as CollapseWhiteSpaceState, cr as SPACE, ct as BaseTransformOptions, d as isHotkey, da as BlockFenceInputRuleMatch, di as liftBlock, dn as WhiteSpaceRule, dr as HtmlPlugin, dt as EditOnlyConfig, ea as SlatePlugin, ei as AutoScrollOperationsMap, en as isLastNonEmptyTextOfInlineFormattingContext, er as cleanHtmlEmptyElements, et as AnyPluginConfig, f as getSlateClass, fa as BlockStartInputRuleConfig, fi as InsertExitBreakOptions, fn as unwrapHtmlElement, fr as withChunking, ft as ExtendConfig, g as getInjectedPlugins, ga as InputRuleTarget, gi as ParserPlugin, gn as traverseHtmlComments, gr as DebugConfig, gt as InferKey, h as keyToDataAttribute, ha as InputRuleBuilder, hi as init, hn as traverseHtmlElements, hr as CorePluginTransforms, ht as InferApi, i as overridePluginsByKey, ia as SlatePlugins, ii as WithAutoScrollOptions, in as collapseWhiteSpaceElement, ir as DeserializeHtmlNodeReturnType, it as BasePlugin, j as EditableProps, ja as ResolvedInputRulesMeta, ji as Decorate, jn as isHtmlFragmentHref, jr as setAffinitySelection, jt as ParagraphConfig, k as ApplyDeepToNodesOptions, ka as MatchDelimitedInlineOptions, ki as AnyEditorPlugin, kn as isHtmlTable, ko as HandlerReturnType, kr as LogLevel, kt as WithRequiredKey, l as Hotkeys, la as BaseInputRule, li as resetBlock, ln as TrimEndRule, lr as TAB, lt as BreakRules, m as getNodeDataAttributeKeys, ma as DelimitedInlineInputRuleMatch, mi as InitOptions, mn as traverseHtmlNode, mr as CorePluginApi, mt as GetInjectNodePropsReturnType, n as pipeOnNodeChange, na as SlatePluginContext, ni as DomConfig, nn as collapseWhiteSpaceText, nr as cleanHtmlBrElements, nt as BaseHtmlDeserializer, o as normalizeDescendantsToDocumentFragment, oa as TextStaticProps, oi as SlateExtensionConfig, on as collapseWhiteSpace, or as LINE_FEED, ot as BasePluginNode, p as getPluginNodeProps, pa as BlockStartInputRuleMatch, pi as insertExitBreak, pn as traverseHtmlTexts, pr as CorePlugin, pt as GetInjectNodePropsOptions, q as withSlate, qi as OverrideEditor, qn as deserializeHtmlNode, qr as NavigationFeedbackConfig, qt as createMarkInputRule, r as pipeInsertDataQuery, ra as SlatePluginMethods, ri as ScrollMode, rn as collapseWhiteSpaceNode, rr as DeserializeHtmlChildren, rt as BaseInjectProps, s as mergeDeepToNodes, sa as TransformOptions, si as SlateExtensionPlugin, sn as collapseString, sr as NO_BREAK_SPACE, st as BaseSerializer, t as pipeOnTextChange, ta as SlatePluginConfig, ti as DOMPlugin, tn as inferWhiteSpaceRule, tr as cleanHtmlCrLf, tt as BaseDeserializer, u as createHotkey, ua as BlockFenceInputRuleConfig, ui as LiftBlockOptions, un as TrimStartRule, ur as ZERO_WIDTH_SPACE, ut as DeleteRules, v as defaultsDeepToNodes, va as InputRulesDefinition, vi as withPlateHistory, vn as removeHtmlSurroundings, vr as LengthConfig, vt as InferSelectors, w as isSlatePluginElement, wa as InsertTextInputRule, wi as getPluginTypes, wn as pipeDeserializeHtmlElement, wr as NodeIdPlugin, wt as NormalizeRules, x as isSlateElement, xa as InsertBreakInputRuleContext, xi as getPluginKey, xn as postCleanHtml, xr as ChunkingPlugin, xt as MergeRules, y as getSlateElements, ya as InputRulesFactoryContext, yi as getContainerTypes, yn as removeHtmlNodesBetweenComments, yr as getCorePlugins, yt as InferTransforms, z as RenderChunkProps, zi as InferConfig, zn as htmlElementToElement, zr as ElementAffinity, zt as NormalizeStaticValueOptions } from "./index-BooMghRU";
|
|
2
2
|
export { AUTO_SCROLL, AffinityConfig, AffinityPlugin, AnyEditorPlugin, AnyInputRule, AnyPluginConfig, AnySlatePlugin, ApplyDeepToNodesOptions, AstPlugin, AutoScrollOperationsMap, BaseDeserializer, BaseEditor, BaseHtmlDeserializer, BaseInjectProps, BaseInputRule, BaseParagraphPlugin, BasePlugin, BasePluginContext, BasePluginNode, BaseSerializer, BaseTransformOptions, BaseWithSlateOptions, BlockFenceInputRuleConfig, BlockFenceInputRuleMatch, BlockStartInputRuleConfig, BlockStartInputRuleMatch, BreakRules, CARRIAGE_RETURN, ChunkingConfig, ChunkingPlugin, CollapseWhiteSpaceState, CorePlugin, CorePluginApi, CorePluginTransforms, CreateSlateEditorOptions, DOMPlugin, DebugConfig, DebugErrorType, DebugPlugin, Decorate, DeleteRules, DelimitedInlineInputRuleMatch, DeserializeHtmlChildren, DeserializeHtmlNodeReturnType, Deserializer, DomConfig, EdgeNodes, EditOnlyConfig, EditableProps, EditorPlugin, ElementAffinity, ExtendConfig, ExtendEditor, ExtendEditorApi, ExtendEditorTransforms, GetCorePluginsOptions, GetInjectNodePropsOptions, GetInjectNodePropsReturnType, HandlerReturnType, HistoryPlugin, Hotkeys, HtmlDeserializer, HtmlPlugin, HtmlSerializer, InferApi, InferConfig, InferKey, InferOptions, InferPlugins, InferSelectors, InferTransforms, InitOptions, InjectNodeProps, InputRuleBuilder, InputRuleTarget, InputRulesConfig, InputRulesDefinition, InputRulesFactoryContext, InsertBreakInputRule, InsertBreakInputRuleContext, InsertDataInputRule, InsertDataInputRuleContext, InsertExitBreakOptions, InsertTextInputRule, InsertTextInputRuleContext, KeyofNodePlugins, KeyofPlugins, LINE_FEED, LeafStaticProps, LengthConfig, LengthPlugin, LiftBlockOptions, LogLevel, MarkInputRuleConfig, MatchBlockFenceOptions, MatchBlockStartOptions, MatchDelimitedInlineOptions, MatchRules, MergeRules, NAVIGATION_FEEDBACK_KEY, NO_BREAK_SPACE, NavigationFeedbackActiveTarget, NavigationFeedbackConfig, NavigationFeedbackPlugin, NavigationFeedbackPluginKey, NavigationFeedbackStoredTarget, NavigationFeedbackTarget, NavigationFlashTargetOptions, NavigationNavigateOptions, NodeComponent, NodeComponents, NodeIdConfig, NodeIdOptions, NodeIdPlugin, NodeStaticProps, NodeStaticWrapperComponent, NodeStaticWrapperComponentProps, NodeStaticWrapperComponentReturnType, NormalizeInitialValue, NormalizeNodeIdOptions, NormalizeRules, NormalizeStaticValueOptions, OverrideEditor, OverridePlugin, ParagraphConfig, Parser, ParserOptions, ParserPlugin, PartialEditorPlugin, PlateError, PluginConfig, RenderChunkFn, RenderChunkProps, RenderElementFn, RenderElementProps, RenderLeafFn, RenderLeafProps, RenderStaticNodeWrapper, RenderStaticNodeWrapperFunction, RenderStaticNodeWrapperProps, RenderTextFn, RenderTextProps, ResolvedInputRule, ResolvedInputRulesMeta, SPACE, STATIC_VALUE_CREATED_AT, ScrollMode, SelectionInputRuleContext, SelectionRules, Serializer, SlateEditor, SlateExtensionConfig, SlateExtensionPlugin, SlatePlugin, SlatePluginConfig, SlatePluginContext, SlatePluginMethods, SlatePlugins, SlateShortcut, TAB, TSlateEditor, TextStaticProps, TextSubstitutionInputRuleConfig, TextSubstitutionMatch, TextSubstitutionPattern, TransformOptions, TrimEndRule, TrimStartRule, WhiteSpaceRule, WithAnyKey, WithAutoScrollOptions, WithRequiredKey, WithSlateOptions, ZERO_WIDTH_SPACE, ZustandStoreApi, applyDeepToNodes, cleanHtmlBrElements, cleanHtmlCrLf, cleanHtmlEmptyElements, cleanHtmlFontElements, cleanHtmlLinkElements, cleanHtmlTextNodes, clearNavigationFeedbackTarget, collapseString, collapseWhiteSpace, collapseWhiteSpaceChildren, collapseWhiteSpaceElement, collapseWhiteSpaceNode, collapseWhiteSpaceText, copyBlockMarksToSpanChild, createBlockFenceInputRule, createBlockStartInputRule, createHotkey, createMarkInputRule, createRuleFactory, createSlateEditor, createSlatePlugin, createTSlatePlugin, createTextSubstitutionInputRule, createZustandStore, defaultsDeepToNodes, defineInputRule, deserializeHtml, deserializeHtmlElement, deserializeHtmlNode, deserializeHtmlNodeChildren, endInlineFormattingContext, findHtmlElement, flashTarget, getContainerTypes, getCorePlugins, getDataNodeProps, getEdgeNodes, getEditorPlugin, getHtmlComments, getInjectMatch, getInjectedPlugins, getMarkBoundaryAffinity, getNodeDataAttributeKeys, getPluginByType, getPluginKey, getPluginKeys, getPluginNodeProps, getPluginType, getPluginTypes, getSlateClass, getSlateElements, getSlatePlugin, htmlBodyToFragment, htmlBrToNewLine, htmlElementToElement, htmlElementToLeaf, htmlStringToDOMNode, htmlTextNodeToString, inferWhiteSpaceRule, init, inlineTagNames, insertExitBreak, isHotkey, isHtmlBlockElement, isHtmlComment, isHtmlElement, isHtmlFragmentHref, isHtmlInlineElement, isHtmlTable, isHtmlText, isLastNonEmptyTextOfInlineFormattingContext, isNodeAffinity, isNodesAffinity, isOlSymbol, isSlateEditor, isSlateElement, isSlateLeaf, isSlateNode, isSlatePluginElement, isSlatePluginNode, isSlateString, isSlateText, isSlateVoid, isType, keyToDataAttribute, liftBlock, matchBlockFence, matchBlockStart, matchDelimitedInline, mergeDeepToNodes, nanoid, navigate, normalizeDescendantsToDocumentFragment, normalizeNodeId, normalizeStaticValue, omitPluginContext, overridePluginsByKey, parseHtmlDocument, parseHtmlElement, pipeDeserializeHtmlElement, pipeDeserializeHtmlLeaf, pipeInsertDataQuery, pipeOnNodeChange, pipeOnTextChange, pluginDeserializeHtml, postCleanHtml, preCleanHtml, removeHtmlNodesBetweenComments, removeHtmlSurroundings, replaceTagName, resetBlock, resolveNavigationFeedbackTarget, setAffinitySelection, setValue, someHtmlElement, traverseHtmlComments, traverseHtmlElements, traverseHtmlNode, traverseHtmlTexts, unwrapHtmlElement, upsertInlineFormattingContext, withBreakRules, withChunking, withDeleteRules, withMergeRules, withNodeId, withNormalizeRules, withOverrides, withPlateHistory, withScrolling, withSlate };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as isHtmlBlockElement, $t as defineInputRule, A as htmlStringToDOMNode, At as isSlatePluginElement, B as htmlBrToNewLine, Bt as withDeleteRules, C as resolveNavigationFeedbackTarget, Ct as getInjectMatch, D as HtmlPlugin, Dt as isSlateElement, E as LengthPlugin, Et as isSlateEditor, F as pipeDeserializeHtmlLeaf, Ft as applyDeepToNodes, G as inferWhiteSpaceRule, Gt as AstPlugin, H as deserializeHtmlNodeChildren, Ht as BaseParagraphPlugin, I as htmlElementToElement, It as OverridePlugin, J as collapseWhiteSpaceText, Jt as createMarkInputRule, K as collapseWhiteSpaceChildren, Kt as createBlockFenceInputRule, L as pipeDeserializeHtmlElement, Lt as withOverrides, M as deserializeHtmlNode, Mt as isSlateString, N as htmlTextNodeToString, Nt as isSlateText, O as parseHtmlDocument, Ot as isSlateLeaf, P as htmlElementToLeaf, Pt as isSlateVoid, Q as collapseString, Qt as matchDelimitedInline, R as pluginDeserializeHtml, Rt as withNormalizeRules, S as flashTarget, St as getInjectedPlugins, T as NavigationFeedbackPluginKey, Tt as getSlateElements, U as collapseWhiteSpace, Ut as HistoryPlugin, V as htmlBodyToFragment, Vt as withBreakRules, W as collapseWhiteSpaceElement, Wt as withPlateHistory, X as upsertInlineFormattingContext, Xt as matchBlockFence, Y as endInlineFormattingContext, Yt as createTextSubstitutionInputRule, Z as isLastNonEmptyTextOfInlineFormattingContext, Zt as matchBlockStart, _ as normalizeNodeId, _t as mergeDeepToNodes, a as pipeInsertDataQuery, an as getPluginTypes, at as DOMPlugin, b as navigate, bt as getNodeDataAttributeKeys, c as setValue, cn as createSlatePlugin, ct as PlateError, d as insertExitBreak, dt as AffinityPlugin, en as getContainerTypes, et as isHtmlInlineElement, f as init, ft as setAffinitySelection, g as NodeIdPlugin, gt as getEdgeNodes, h as pipeOnNodeChange, ht as getMarkBoundaryAffinity, i as ParserPlugin, in as getPluginType, it as AUTO_SCROLL, j as deserializeHtmlElement, jt as isSlatePluginNode, k as deserializeHtml, kt as isSlateNode, l as resetBlock, ln as createTSlatePlugin, lt as ChunkingPlugin, m as pipeOnTextChange, mt as isNodesAffinity, n as withSlate, nn as getPluginKey, nt as isHtmlText, o as normalizeDescendantsToDocumentFragment, on as getSlatePlugin, ot as withScrolling, pt as isNodeAffinity, q as collapseWhiteSpaceNode, qt as createBlockStartInputRule, r as getCorePlugins, rn as getPluginKeys, rt as isHtmlElement, s as SlateExtensionPlugin, sn as getEditorPlugin, st as DebugPlugin, t as createSlateEditor, tn as getPluginByType, tt as inlineTagNames, u as liftBlock, ut as withChunking, v as withNodeId, vt as getSlateClass, w as NAVIGATION_FEEDBACK_KEY, wt as defaultsDeepToNodes, x as clearNavigationFeedbackTarget, xt as keyToDataAttribute, y as NavigationFeedbackPlugin, yt as getPluginNodeProps, z as getDataNodeProps, zt as withMergeRules } from "./withSlate-
|
|
1
|
+
import { $ as isHtmlBlockElement, $t as defineInputRule, A as htmlStringToDOMNode, At as isSlatePluginElement, B as htmlBrToNewLine, Bt as withDeleteRules, C as resolveNavigationFeedbackTarget, Ct as getInjectMatch, D as HtmlPlugin, Dt as isSlateElement, E as LengthPlugin, Et as isSlateEditor, F as pipeDeserializeHtmlLeaf, Ft as applyDeepToNodes, G as inferWhiteSpaceRule, Gt as AstPlugin, H as deserializeHtmlNodeChildren, Ht as BaseParagraphPlugin, I as htmlElementToElement, It as OverridePlugin, J as collapseWhiteSpaceText, Jt as createMarkInputRule, K as collapseWhiteSpaceChildren, Kt as createBlockFenceInputRule, L as pipeDeserializeHtmlElement, Lt as withOverrides, M as deserializeHtmlNode, Mt as isSlateString, N as htmlTextNodeToString, Nt as isSlateText, O as parseHtmlDocument, Ot as isSlateLeaf, P as htmlElementToLeaf, Pt as isSlateVoid, Q as collapseString, Qt as matchDelimitedInline, R as pluginDeserializeHtml, Rt as withNormalizeRules, S as flashTarget, St as getInjectedPlugins, T as NavigationFeedbackPluginKey, Tt as getSlateElements, U as collapseWhiteSpace, Ut as HistoryPlugin, V as htmlBodyToFragment, Vt as withBreakRules, W as collapseWhiteSpaceElement, Wt as withPlateHistory, X as upsertInlineFormattingContext, Xt as matchBlockFence, Y as endInlineFormattingContext, Yt as createTextSubstitutionInputRule, Z as isLastNonEmptyTextOfInlineFormattingContext, Zt as matchBlockStart, _ as normalizeNodeId, _t as mergeDeepToNodes, a as pipeInsertDataQuery, an as getPluginTypes, at as DOMPlugin, b as navigate, bt as getNodeDataAttributeKeys, c as setValue, cn as createSlatePlugin, ct as PlateError, d as insertExitBreak, dt as AffinityPlugin, en as getContainerTypes, et as isHtmlInlineElement, f as init, ft as setAffinitySelection, g as NodeIdPlugin, gt as getEdgeNodes, h as pipeOnNodeChange, ht as getMarkBoundaryAffinity, i as ParserPlugin, in as getPluginType, it as AUTO_SCROLL, j as deserializeHtmlElement, jt as isSlatePluginNode, k as deserializeHtml, kt as isSlateNode, l as resetBlock, ln as createTSlatePlugin, lt as ChunkingPlugin, m as pipeOnTextChange, mt as isNodesAffinity, n as withSlate, nn as getPluginKey, nt as isHtmlText, o as normalizeDescendantsToDocumentFragment, on as getSlatePlugin, ot as withScrolling, pt as isNodeAffinity, q as collapseWhiteSpaceNode, qt as createBlockStartInputRule, r as getCorePlugins, rn as getPluginKeys, rt as isHtmlElement, s as SlateExtensionPlugin, sn as getEditorPlugin, st as DebugPlugin, t as createSlateEditor, tn as getPluginByType, tt as inlineTagNames, u as liftBlock, ut as withChunking, v as withNodeId, vt as getSlateClass, w as NAVIGATION_FEEDBACK_KEY, wt as defaultsDeepToNodes, x as clearNavigationFeedbackTarget, xt as keyToDataAttribute, y as NavigationFeedbackPlugin, yt as getPluginNodeProps, z as getDataNodeProps, zt as withMergeRules } from "./withSlate-Ck8dLhUt.js";
|
|
2
2
|
import { n as createHotkey, r as isHotkey, t as Hotkeys } from "./hotkeys-DI1HPO2Q.js";
|
|
3
3
|
import { nanoid } from "nanoid";
|
|
4
4
|
import { createVanillaStore as createZustandStore } from "zustand-x/vanilla";
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Ai as AnySlatePlugin, Ct as NodeComponents, Et as PluginConfig, F as RenderLeafProps, I as RenderElementFn, J as BaseEditor, Kr as NavigationFeedbackActiveTarget, L as RenderElementProps, M as RenderTextFn, N as RenderTextProps, Ot as WithAnyKey, P as RenderLeafFn, Pi as ExtendEditor$1, Q as SlateEditor, R as RenderChunkFn, St as NodeComponent, Tt as ParserOptions, U as BaseWithSlateOptions, Y as InferPlugins, Ya as createStaticEditor, _a as InputRulesConfig, _t as InferOptions,
|
|
2
|
-
import * as
|
|
1
|
+
import { Ai as AnySlatePlugin, Ct as NodeComponents, Et as PluginConfig, F as RenderLeafProps, I as RenderElementFn, J as BaseEditor, Kr as NavigationFeedbackActiveTarget, L as RenderElementProps, M as RenderTextFn, N as RenderTextProps, Ot as WithAnyKey, P as RenderLeafFn, Pi as ExtendEditor$1, Q as SlateEditor, R as RenderChunkFn, St as NodeComponent, Tt as ParserOptions, U as BaseWithSlateOptions, Y as InferPlugins, Ya as createStaticEditor, _a as InputRulesConfig, _t as InferOptions, at as BasePluginContext, bt as MatchRules, ct as BaseTransformOptions, ea as SlatePlugin, ei as AutoScrollOperationsMap, et as AnyPluginConfig, fi as InsertExitBreakOptions, gt as InferKey, hr as CorePluginTransforms, ht as InferApi, ii as WithAutoScrollOptions, it as BasePlugin, j as EditableProps, ja as ResolvedInputRulesMeta, ko as HandlerReturnType, kt as WithRequiredKey, mi as InitOptions, mr as CorePluginApi, mt as GetInjectNodePropsReturnType, na as SlatePluginContext, ni as DomConfig, nt as BaseHtmlDeserializer, pr as CorePlugin, pt as GetInjectNodePropsOptions, qr as NavigationFeedbackConfig, ri as ScrollMode, rt as BaseInjectProps, st as BaseSerializer, ta as SlatePluginConfig, tt as BaseDeserializer, ui as LiftBlockOptions, va as InputRulesDefinition, vt as InferSelectors, yo as PlateStaticProps, yt as InferTransforms, z as RenderChunkProps } from "../index-BooMghRU";
|
|
2
|
+
import * as _platejs_slate15 from "@platejs/slate";
|
|
3
3
|
import { DecoratedRange, Descendant, DescendantIn, Editor, EditorApi, EditorTransforms, ElementEntry, NodeEntry, NodeOperation, Operation, Path, TElement, TNode, TRange, TSelection, TText, TextOperation, Value, ValueOf } from "@platejs/slate";
|
|
4
4
|
import { AnyObject, Deep2Partial, Modify, Nullable, UnionToIntersection, UnknownObject } from "@udecode/utils";
|
|
5
5
|
import { DefaultPlaceholder, Editable, RenderPlaceholderProps, Slate, useComposing, useFocused, useReadOnly, useSelected, useSlateStatic, withReact } from "slate-react";
|
|
6
6
|
import React$1, { HTMLAttributes } from "react";
|
|
7
7
|
import { HotkeysEvent, HotkeysOptions, Keys } from "@udecode/react-hotkeys";
|
|
8
|
-
import * as
|
|
8
|
+
import * as jotai_x0 from "jotai-x";
|
|
9
9
|
import { JotaiStore, createAtomStore, useStoreAtomState, useStoreAtomValue, useStoreSetAtom } from "jotai-x";
|
|
10
10
|
import * as jotai10 from "jotai";
|
|
11
11
|
import { Atom, atom } from "jotai";
|
|
@@ -16,31 +16,31 @@ import { TCreatedStoreType, TEqualityChecker, createZustandStore, useStoreSelect
|
|
|
16
16
|
declare const SlateReactExtensionPlugin: PlatePlugin<PluginConfig<"slateExtension", {
|
|
17
17
|
onNodeChange: (options: {
|
|
18
18
|
editor: SlateEditor;
|
|
19
|
-
node:
|
|
20
|
-
operation:
|
|
21
|
-
prevNode:
|
|
19
|
+
node: _platejs_slate15.Descendant;
|
|
20
|
+
operation: _platejs_slate15.NodeOperation;
|
|
21
|
+
prevNode: _platejs_slate15.Descendant;
|
|
22
22
|
}) => void;
|
|
23
23
|
onTextChange: (options: {
|
|
24
24
|
editor: SlateEditor;
|
|
25
|
-
node:
|
|
26
|
-
operation:
|
|
25
|
+
node: _platejs_slate15.Descendant;
|
|
26
|
+
operation: _platejs_slate15.TextOperation;
|
|
27
27
|
prevText: string;
|
|
28
28
|
text: string;
|
|
29
29
|
}) => void;
|
|
30
30
|
}, {
|
|
31
31
|
redecorate: (() => void) & (() => void);
|
|
32
32
|
}, {
|
|
33
|
-
reset: (options:
|
|
33
|
+
reset: (options: _platejs_slate15.ResetOptions | undefined) => void;
|
|
34
34
|
init: ((args_0: InitOptions) => void) & ((args_0: InitOptions) => void);
|
|
35
35
|
insertExitBreak: ((args_0?: InsertExitBreakOptions | undefined) => true | undefined) & ((args_0?: InsertExitBreakOptions | undefined) => true | undefined);
|
|
36
36
|
liftBlock: ((args_0?: LiftBlockOptions | undefined) => true | undefined) & ((args_0?: LiftBlockOptions | undefined) => true | undefined);
|
|
37
37
|
resetBlock: ((args_0?: {
|
|
38
|
-
at?:
|
|
38
|
+
at?: _platejs_slate15.Path;
|
|
39
39
|
} | undefined) => true | undefined) & ((args_0?: {
|
|
40
|
-
at?:
|
|
40
|
+
at?: _platejs_slate15.Path;
|
|
41
41
|
} | undefined) => true | undefined);
|
|
42
|
-
setValue: ((value?: string |
|
|
43
|
-
apply: <N$1 extends
|
|
42
|
+
setValue: ((value?: string | _platejs_slate15.Value | undefined) => void) & ((value?: string | _platejs_slate15.Value | undefined) => void);
|
|
43
|
+
apply: <N$1 extends _platejs_slate15.TElement | _platejs_slate15.TText>(operation: _platejs_slate15.Operation<N$1>) => void;
|
|
44
44
|
}, {}>>;
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region src/react/plugins/event-editor/EventEditorPlugin.d.ts
|
|
@@ -100,7 +100,7 @@ declare const ParagraphPlugin: PlatePlugin<PluginConfig<"p", {}, {}, {}, {}>>;
|
|
|
100
100
|
declare const ReactPlugin: PlatePlugin<PluginConfig<"dom", {
|
|
101
101
|
scrollMode?: ScrollMode;
|
|
102
102
|
scrollOperations?: AutoScrollOperationsMap;
|
|
103
|
-
scrollOptions?:
|
|
103
|
+
scrollOptions?: _platejs_slate15.ScrollIntoViewOptions;
|
|
104
104
|
}, {
|
|
105
105
|
isScrolling: () => boolean;
|
|
106
106
|
}, {
|
|
@@ -810,35 +810,35 @@ declare const getPlateCorePlugins: ({
|
|
|
810
810
|
}) => (PlatePlugin<PluginConfig<"eventEditor", {}, {}, {}, {}>> | PlatePlugin<PluginConfig<"slateExtension", {
|
|
811
811
|
onNodeChange: (options: {
|
|
812
812
|
editor: SlateEditor;
|
|
813
|
-
node:
|
|
814
|
-
operation:
|
|
815
|
-
prevNode:
|
|
813
|
+
node: _platejs_slate15.Descendant;
|
|
814
|
+
operation: _platejs_slate15.NodeOperation;
|
|
815
|
+
prevNode: _platejs_slate15.Descendant;
|
|
816
816
|
}) => void;
|
|
817
817
|
onTextChange: (options: {
|
|
818
818
|
editor: SlateEditor;
|
|
819
|
-
node:
|
|
820
|
-
operation:
|
|
819
|
+
node: _platejs_slate15.Descendant;
|
|
820
|
+
operation: _platejs_slate15.TextOperation;
|
|
821
821
|
prevText: string;
|
|
822
822
|
text: string;
|
|
823
823
|
}) => void;
|
|
824
824
|
}, {
|
|
825
825
|
redecorate: (() => void) & (() => void);
|
|
826
826
|
}, {
|
|
827
|
-
reset: (options:
|
|
827
|
+
reset: (options: _platejs_slate15.ResetOptions | undefined) => void;
|
|
828
828
|
init: ((args_0: InitOptions) => void) & ((args_0: InitOptions) => void);
|
|
829
829
|
insertExitBreak: ((args_0?: InsertExitBreakOptions | undefined) => true | undefined) & ((args_0?: InsertExitBreakOptions | undefined) => true | undefined);
|
|
830
830
|
liftBlock: ((args_0?: LiftBlockOptions | undefined) => true | undefined) & ((args_0?: LiftBlockOptions | undefined) => true | undefined);
|
|
831
831
|
resetBlock: ((args_0?: {
|
|
832
|
-
at?:
|
|
832
|
+
at?: _platejs_slate15.Path;
|
|
833
833
|
} | undefined) => true | undefined) & ((args_0?: {
|
|
834
|
-
at?:
|
|
834
|
+
at?: _platejs_slate15.Path;
|
|
835
835
|
} | undefined) => true | undefined);
|
|
836
|
-
setValue: ((value?: string |
|
|
837
|
-
apply: <N$1 extends
|
|
836
|
+
setValue: ((value?: string | _platejs_slate15.Value | undefined) => void) & ((value?: string | _platejs_slate15.Value | undefined) => void);
|
|
837
|
+
apply: <N$1 extends _platejs_slate15.TElement | _platejs_slate15.TText>(operation: _platejs_slate15.Operation<N$1>) => void;
|
|
838
838
|
}, {}>> | PlatePlugin<PluginConfig<"dom", {
|
|
839
839
|
scrollMode?: ScrollMode;
|
|
840
840
|
scrollOperations?: AutoScrollOperationsMap;
|
|
841
|
-
scrollOptions?:
|
|
841
|
+
scrollOptions?: _platejs_slate15.ScrollIntoViewOptions;
|
|
842
842
|
}, {
|
|
843
843
|
isScrolling: () => boolean;
|
|
844
844
|
}, {
|
|
@@ -908,7 +908,7 @@ declare function getPlugin<C extends AnyPluginConfig = PluginConfig>(editor: Pla
|
|
|
908
908
|
} ? C : PlatePlugin<C>;
|
|
909
909
|
//#endregion
|
|
910
910
|
//#region src/react/plugin/omitPluginContext.d.ts
|
|
911
|
-
declare const omitPluginContext: <T extends PlatePluginContext<AnyPlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "
|
|
911
|
+
declare const omitPluginContext: <T extends PlatePluginContext<AnyPlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "getOptions" | "getOption" | "tf" | "type" | "setOptions" | "setOption" | "plugin">;
|
|
912
912
|
//#endregion
|
|
913
913
|
//#region src/react/plugin/toPlatePlugin.d.ts
|
|
914
914
|
type PlatePluginConfig$1<C extends AnyPluginConfig, EO = {}, EA = {}, ET = {}, ES = {}> = Omit<Partial<PlatePlugin<PluginConfig<C['key'], EO & InferOptions<C>, EA & InferApi<C>, ET & InferTransforms<C>, ES & InferSelectors<C>>>>, keyof PlatePluginMethods | 'api' | 'node' | 'options' | 'transforms'> & {
|
|
@@ -1065,11 +1065,11 @@ type ElementStoreState = {
|
|
|
1065
1065
|
entry: ElementEntry;
|
|
1066
1066
|
path: Path;
|
|
1067
1067
|
};
|
|
1068
|
-
declare const ElementProvider: React$1.FC<
|
|
1068
|
+
declare const ElementProvider: React$1.FC<jotai_x0.ProviderProps<{
|
|
1069
1069
|
element: TElement;
|
|
1070
1070
|
entry: ElementEntry;
|
|
1071
1071
|
path: Path;
|
|
1072
|
-
}>>, elementStore:
|
|
1072
|
+
}>>, elementStore: jotai_x0.StoreApi<ElementStoreState, object, "element">, useElementStore: jotai_x0.UseStoreApi<ElementStoreState, object>;
|
|
1073
1073
|
//#endregion
|
|
1074
1074
|
//#region src/react/stores/element/usePath.d.ts
|
|
1075
1075
|
/** Get the memoized path of the closest element. */
|
|
@@ -1194,7 +1194,7 @@ declare const createPlateStore: <E extends PlateEditor = PlateEditor>({
|
|
|
1194
1194
|
onTextChange,
|
|
1195
1195
|
onValueChange,
|
|
1196
1196
|
...state
|
|
1197
|
-
}?: Partial<PlateStoreState<E>>) =>
|
|
1197
|
+
}?: Partial<PlateStoreState<E>>) => jotai_x0.AtomStoreApi<PlateStoreState<E>, {
|
|
1198
1198
|
trackedEditor: jotai10.Atom<{
|
|
1199
1199
|
editor: any;
|
|
1200
1200
|
version: number | null;
|
|
@@ -1208,12 +1208,12 @@ declare const createPlateStore: <E extends PlateEditor = PlateEditor>({
|
|
|
1208
1208
|
version: number | null;
|
|
1209
1209
|
}>;
|
|
1210
1210
|
}, "plate">;
|
|
1211
|
-
declare const PlateStoreProvider: React$1.FC<
|
|
1211
|
+
declare const PlateStoreProvider: React$1.FC<jotai_x0.ProviderProps<{
|
|
1212
1212
|
composing: boolean | null;
|
|
1213
1213
|
decorate: ((options: {
|
|
1214
1214
|
editor: PlateEditor;
|
|
1215
|
-
entry:
|
|
1216
|
-
}) =>
|
|
1215
|
+
entry: _platejs_slate15.NodeEntry;
|
|
1216
|
+
}) => _platejs_slate15.TRange[]) | null;
|
|
1217
1217
|
isMounted: boolean | null;
|
|
1218
1218
|
primary: boolean | null;
|
|
1219
1219
|
readOnly: boolean | null;
|
|
@@ -1227,34 +1227,34 @@ declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
|
|
|
1227
1227
|
versionValue: number | null;
|
|
1228
1228
|
onChange: ((options: {
|
|
1229
1229
|
editor: PlateEditor;
|
|
1230
|
-
value:
|
|
1230
|
+
value: _platejs_slate15.Value;
|
|
1231
1231
|
}) => void) | null;
|
|
1232
1232
|
onNodeChange: ((options: {
|
|
1233
1233
|
editor: PlateEditor;
|
|
1234
|
-
node:
|
|
1235
|
-
operation:
|
|
1236
|
-
prevNode:
|
|
1234
|
+
node: _platejs_slate15.Descendant;
|
|
1235
|
+
operation: _platejs_slate15.NodeOperation;
|
|
1236
|
+
prevNode: _platejs_slate15.Descendant;
|
|
1237
1237
|
}) => void) | null;
|
|
1238
1238
|
onSelectionChange: ((options: {
|
|
1239
1239
|
editor: PlateEditor;
|
|
1240
|
-
selection:
|
|
1240
|
+
selection: _platejs_slate15.TSelection;
|
|
1241
1241
|
}) => void) | null;
|
|
1242
1242
|
onTextChange: ((options: {
|
|
1243
1243
|
editor: PlateEditor;
|
|
1244
|
-
node:
|
|
1245
|
-
operation:
|
|
1244
|
+
node: _platejs_slate15.Descendant;
|
|
1245
|
+
operation: _platejs_slate15.TextOperation;
|
|
1246
1246
|
prevText: string;
|
|
1247
1247
|
text: string;
|
|
1248
1248
|
}) => void) | null;
|
|
1249
1249
|
onValueChange: ((options: {
|
|
1250
1250
|
editor: PlateEditor;
|
|
1251
|
-
value:
|
|
1251
|
+
value: _platejs_slate15.Value;
|
|
1252
1252
|
}) => void) | null;
|
|
1253
1253
|
id: string;
|
|
1254
1254
|
containerRef: React$1.RefObject<HTMLDivElement | null>;
|
|
1255
1255
|
editor: PlateEditor;
|
|
1256
1256
|
scrollRef: React$1.RefObject<HTMLDivElement | null>;
|
|
1257
|
-
}>>, plateStore:
|
|
1257
|
+
}>>, plateStore: jotai_x0.StoreApi<PlateStoreState<PlateEditor>, {
|
|
1258
1258
|
trackedEditor: jotai10.Atom<{
|
|
1259
1259
|
editor: any;
|
|
1260
1260
|
version: number | null;
|
|
@@ -1267,52 +1267,52 @@ declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
|
|
|
1267
1267
|
value: any;
|
|
1268
1268
|
version: number | null;
|
|
1269
1269
|
}>;
|
|
1270
|
-
}, "plate">, usePlateLocalSet: <K$1 extends "decorate" | "
|
|
1271
|
-
composing:
|
|
1272
|
-
decorate:
|
|
1270
|
+
}, "plate">, usePlateLocalSet: <K$1 extends "decorate" | "renderLeaf" | "renderText" | "editor" | "id" | "onChange" | "renderElement" | "onNodeChange" | "onTextChange" | "readOnly" | "composing" | "isMounted" | "primary" | "renderChunk" | "versionDecorate" | "versionEditor" | "versionSelection" | "versionValue" | "onSelectionChange" | "onValueChange" | "containerRef" | "scrollRef" | "trackedEditor" | "trackedSelection" | "trackedValue">(key: K$1, options?: string | jotai_x0.UseAtomOptions) => ({
|
|
1271
|
+
composing: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1272
|
+
decorate: jotai_x0.SimpleWritableAtom<((options: {
|
|
1273
1273
|
editor: PlateEditor;
|
|
1274
|
-
entry:
|
|
1275
|
-
}) =>
|
|
1276
|
-
isMounted:
|
|
1277
|
-
primary:
|
|
1278
|
-
readOnly:
|
|
1279
|
-
renderChunk:
|
|
1280
|
-
renderElement:
|
|
1281
|
-
renderLeaf:
|
|
1282
|
-
renderText:
|
|
1283
|
-
versionDecorate:
|
|
1284
|
-
versionEditor:
|
|
1285
|
-
versionSelection:
|
|
1286
|
-
versionValue:
|
|
1287
|
-
onChange:
|
|
1274
|
+
entry: _platejs_slate15.NodeEntry;
|
|
1275
|
+
}) => _platejs_slate15.TRange[]) | null>;
|
|
1276
|
+
isMounted: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1277
|
+
primary: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1278
|
+
readOnly: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1279
|
+
renderChunk: jotai_x0.SimpleWritableAtom<RenderChunkFn | null>;
|
|
1280
|
+
renderElement: jotai_x0.SimpleWritableAtom<RenderElementFn | null>;
|
|
1281
|
+
renderLeaf: jotai_x0.SimpleWritableAtom<RenderLeafFn | null>;
|
|
1282
|
+
renderText: jotai_x0.SimpleWritableAtom<RenderTextFn | null>;
|
|
1283
|
+
versionDecorate: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1284
|
+
versionEditor: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1285
|
+
versionSelection: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1286
|
+
versionValue: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1287
|
+
onChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1288
1288
|
editor: PlateEditor;
|
|
1289
|
-
value:
|
|
1289
|
+
value: _platejs_slate15.Value;
|
|
1290
1290
|
}) => void) | null>;
|
|
1291
|
-
onNodeChange:
|
|
1291
|
+
onNodeChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1292
1292
|
editor: PlateEditor;
|
|
1293
|
-
node:
|
|
1294
|
-
operation:
|
|
1295
|
-
prevNode:
|
|
1293
|
+
node: _platejs_slate15.Descendant;
|
|
1294
|
+
operation: _platejs_slate15.NodeOperation;
|
|
1295
|
+
prevNode: _platejs_slate15.Descendant;
|
|
1296
1296
|
}) => void) | null>;
|
|
1297
|
-
onSelectionChange:
|
|
1297
|
+
onSelectionChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1298
1298
|
editor: PlateEditor;
|
|
1299
|
-
selection:
|
|
1299
|
+
selection: _platejs_slate15.TSelection;
|
|
1300
1300
|
}) => void) | null>;
|
|
1301
|
-
onTextChange:
|
|
1301
|
+
onTextChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1302
1302
|
editor: PlateEditor;
|
|
1303
|
-
node:
|
|
1304
|
-
operation:
|
|
1303
|
+
node: _platejs_slate15.Descendant;
|
|
1304
|
+
operation: _platejs_slate15.TextOperation;
|
|
1305
1305
|
prevText: string;
|
|
1306
1306
|
text: string;
|
|
1307
1307
|
}) => void) | null>;
|
|
1308
|
-
onValueChange:
|
|
1308
|
+
onValueChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1309
1309
|
editor: PlateEditor;
|
|
1310
|
-
value:
|
|
1310
|
+
value: _platejs_slate15.Value;
|
|
1311
1311
|
}) => void) | null>;
|
|
1312
|
-
id:
|
|
1313
|
-
containerRef:
|
|
1314
|
-
editor:
|
|
1315
|
-
scrollRef:
|
|
1312
|
+
id: jotai_x0.SimpleWritableAtom<string>;
|
|
1313
|
+
containerRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
|
|
1314
|
+
editor: jotai_x0.SimpleWritableAtom<PlateEditor>;
|
|
1315
|
+
scrollRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
|
|
1316
1316
|
} & {
|
|
1317
1317
|
trackedEditor: jotai10.Atom<{
|
|
1318
1318
|
editor: any;
|
|
@@ -1326,52 +1326,52 @@ declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
|
|
|
1326
1326
|
value: any;
|
|
1327
1327
|
version: number | null;
|
|
1328
1328
|
}>;
|
|
1329
|
-
})[K$1] extends jotai10.WritableAtom<infer _V, infer A extends unknown[], infer R> ? (...args: A) => R : never, usePlateLocalState: <K$1 extends "decorate" | "
|
|
1330
|
-
composing:
|
|
1331
|
-
decorate:
|
|
1329
|
+
})[K$1] extends jotai10.WritableAtom<infer _V, infer A extends unknown[], infer R> ? (...args: A) => R : never, usePlateLocalState: <K$1 extends "decorate" | "renderLeaf" | "renderText" | "editor" | "id" | "onChange" | "renderElement" | "onNodeChange" | "onTextChange" | "readOnly" | "composing" | "isMounted" | "primary" | "renderChunk" | "versionDecorate" | "versionEditor" | "versionSelection" | "versionValue" | "onSelectionChange" | "onValueChange" | "containerRef" | "scrollRef" | "trackedEditor" | "trackedSelection" | "trackedValue">(key: K$1, options?: string | jotai_x0.UseAtomOptions) => ({
|
|
1330
|
+
composing: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1331
|
+
decorate: jotai_x0.SimpleWritableAtom<((options: {
|
|
1332
1332
|
editor: PlateEditor;
|
|
1333
|
-
entry:
|
|
1334
|
-
}) =>
|
|
1335
|
-
isMounted:
|
|
1336
|
-
primary:
|
|
1337
|
-
readOnly:
|
|
1338
|
-
renderChunk:
|
|
1339
|
-
renderElement:
|
|
1340
|
-
renderLeaf:
|
|
1341
|
-
renderText:
|
|
1342
|
-
versionDecorate:
|
|
1343
|
-
versionEditor:
|
|
1344
|
-
versionSelection:
|
|
1345
|
-
versionValue:
|
|
1346
|
-
onChange:
|
|
1333
|
+
entry: _platejs_slate15.NodeEntry;
|
|
1334
|
+
}) => _platejs_slate15.TRange[]) | null>;
|
|
1335
|
+
isMounted: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1336
|
+
primary: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1337
|
+
readOnly: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1338
|
+
renderChunk: jotai_x0.SimpleWritableAtom<RenderChunkFn | null>;
|
|
1339
|
+
renderElement: jotai_x0.SimpleWritableAtom<RenderElementFn | null>;
|
|
1340
|
+
renderLeaf: jotai_x0.SimpleWritableAtom<RenderLeafFn | null>;
|
|
1341
|
+
renderText: jotai_x0.SimpleWritableAtom<RenderTextFn | null>;
|
|
1342
|
+
versionDecorate: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1343
|
+
versionEditor: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1344
|
+
versionSelection: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1345
|
+
versionValue: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1346
|
+
onChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1347
1347
|
editor: PlateEditor;
|
|
1348
|
-
value:
|
|
1348
|
+
value: _platejs_slate15.Value;
|
|
1349
1349
|
}) => void) | null>;
|
|
1350
|
-
onNodeChange:
|
|
1350
|
+
onNodeChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1351
1351
|
editor: PlateEditor;
|
|
1352
|
-
node:
|
|
1353
|
-
operation:
|
|
1354
|
-
prevNode:
|
|
1352
|
+
node: _platejs_slate15.Descendant;
|
|
1353
|
+
operation: _platejs_slate15.NodeOperation;
|
|
1354
|
+
prevNode: _platejs_slate15.Descendant;
|
|
1355
1355
|
}) => void) | null>;
|
|
1356
|
-
onSelectionChange:
|
|
1356
|
+
onSelectionChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1357
1357
|
editor: PlateEditor;
|
|
1358
|
-
selection:
|
|
1358
|
+
selection: _platejs_slate15.TSelection;
|
|
1359
1359
|
}) => void) | null>;
|
|
1360
|
-
onTextChange:
|
|
1360
|
+
onTextChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1361
1361
|
editor: PlateEditor;
|
|
1362
|
-
node:
|
|
1363
|
-
operation:
|
|
1362
|
+
node: _platejs_slate15.Descendant;
|
|
1363
|
+
operation: _platejs_slate15.TextOperation;
|
|
1364
1364
|
prevText: string;
|
|
1365
1365
|
text: string;
|
|
1366
1366
|
}) => void) | null>;
|
|
1367
|
-
onValueChange:
|
|
1367
|
+
onValueChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1368
1368
|
editor: PlateEditor;
|
|
1369
|
-
value:
|
|
1369
|
+
value: _platejs_slate15.Value;
|
|
1370
1370
|
}) => void) | null>;
|
|
1371
|
-
id:
|
|
1372
|
-
containerRef:
|
|
1373
|
-
editor:
|
|
1374
|
-
scrollRef:
|
|
1371
|
+
id: jotai_x0.SimpleWritableAtom<string>;
|
|
1372
|
+
containerRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
|
|
1373
|
+
editor: jotai_x0.SimpleWritableAtom<PlateEditor>;
|
|
1374
|
+
scrollRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
|
|
1375
1375
|
} & {
|
|
1376
1376
|
trackedEditor: jotai10.Atom<{
|
|
1377
1377
|
editor: any;
|
|
@@ -1385,7 +1385,7 @@ declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
|
|
|
1385
1385
|
value: any;
|
|
1386
1386
|
version: number | null;
|
|
1387
1387
|
}>;
|
|
1388
|
-
})[K$1] extends jotai10.WritableAtom<infer V, infer A extends unknown[], infer R> ? [V, (...args: A) => R] : never, usePlateLocalStore:
|
|
1388
|
+
})[K$1] extends jotai10.WritableAtom<infer V, infer A extends unknown[], infer R> ? [V, (...args: A) => R] : never, usePlateLocalStore: jotai_x0.UseStoreApi<PlateStoreState<PlateEditor>, {
|
|
1389
1389
|
trackedEditor: jotai10.Atom<{
|
|
1390
1390
|
editor: any;
|
|
1391
1391
|
version: number | null;
|
|
@@ -1398,52 +1398,52 @@ declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
|
|
|
1398
1398
|
value: any;
|
|
1399
1399
|
version: number | null;
|
|
1400
1400
|
}>;
|
|
1401
|
-
}>, usePlateLocalValue: <K$1 extends "decorate" | "
|
|
1402
|
-
composing:
|
|
1403
|
-
decorate:
|
|
1401
|
+
}>, usePlateLocalValue: <K$1 extends "decorate" | "renderLeaf" | "renderText" | "editor" | "id" | "onChange" | "renderElement" | "onNodeChange" | "onTextChange" | "readOnly" | "composing" | "isMounted" | "primary" | "renderChunk" | "versionDecorate" | "versionEditor" | "versionSelection" | "versionValue" | "onSelectionChange" | "onValueChange" | "containerRef" | "scrollRef" | "trackedEditor" | "trackedSelection" | "trackedValue", S = (({
|
|
1402
|
+
composing: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1403
|
+
decorate: jotai_x0.SimpleWritableAtom<((options: {
|
|
1404
1404
|
editor: PlateEditor;
|
|
1405
|
-
entry:
|
|
1406
|
-
}) =>
|
|
1407
|
-
isMounted:
|
|
1408
|
-
primary:
|
|
1409
|
-
readOnly:
|
|
1410
|
-
renderChunk:
|
|
1411
|
-
renderElement:
|
|
1412
|
-
renderLeaf:
|
|
1413
|
-
renderText:
|
|
1414
|
-
versionDecorate:
|
|
1415
|
-
versionEditor:
|
|
1416
|
-
versionSelection:
|
|
1417
|
-
versionValue:
|
|
1418
|
-
onChange:
|
|
1405
|
+
entry: _platejs_slate15.NodeEntry;
|
|
1406
|
+
}) => _platejs_slate15.TRange[]) | null>;
|
|
1407
|
+
isMounted: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1408
|
+
primary: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1409
|
+
readOnly: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1410
|
+
renderChunk: jotai_x0.SimpleWritableAtom<RenderChunkFn | null>;
|
|
1411
|
+
renderElement: jotai_x0.SimpleWritableAtom<RenderElementFn | null>;
|
|
1412
|
+
renderLeaf: jotai_x0.SimpleWritableAtom<RenderLeafFn | null>;
|
|
1413
|
+
renderText: jotai_x0.SimpleWritableAtom<RenderTextFn | null>;
|
|
1414
|
+
versionDecorate: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1415
|
+
versionEditor: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1416
|
+
versionSelection: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1417
|
+
versionValue: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1418
|
+
onChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1419
1419
|
editor: PlateEditor;
|
|
1420
|
-
value:
|
|
1420
|
+
value: _platejs_slate15.Value;
|
|
1421
1421
|
}) => void) | null>;
|
|
1422
|
-
onNodeChange:
|
|
1422
|
+
onNodeChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1423
1423
|
editor: PlateEditor;
|
|
1424
|
-
node:
|
|
1425
|
-
operation:
|
|
1426
|
-
prevNode:
|
|
1424
|
+
node: _platejs_slate15.Descendant;
|
|
1425
|
+
operation: _platejs_slate15.NodeOperation;
|
|
1426
|
+
prevNode: _platejs_slate15.Descendant;
|
|
1427
1427
|
}) => void) | null>;
|
|
1428
|
-
onSelectionChange:
|
|
1428
|
+
onSelectionChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1429
1429
|
editor: PlateEditor;
|
|
1430
|
-
selection:
|
|
1430
|
+
selection: _platejs_slate15.TSelection;
|
|
1431
1431
|
}) => void) | null>;
|
|
1432
|
-
onTextChange:
|
|
1432
|
+
onTextChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1433
1433
|
editor: PlateEditor;
|
|
1434
|
-
node:
|
|
1435
|
-
operation:
|
|
1434
|
+
node: _platejs_slate15.Descendant;
|
|
1435
|
+
operation: _platejs_slate15.TextOperation;
|
|
1436
1436
|
prevText: string;
|
|
1437
1437
|
text: string;
|
|
1438
1438
|
}) => void) | null>;
|
|
1439
|
-
onValueChange:
|
|
1439
|
+
onValueChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1440
1440
|
editor: PlateEditor;
|
|
1441
|
-
value:
|
|
1441
|
+
value: _platejs_slate15.Value;
|
|
1442
1442
|
}) => void) | null>;
|
|
1443
|
-
id:
|
|
1444
|
-
containerRef:
|
|
1445
|
-
editor:
|
|
1446
|
-
scrollRef:
|
|
1443
|
+
id: jotai_x0.SimpleWritableAtom<string>;
|
|
1444
|
+
containerRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
|
|
1445
|
+
editor: jotai_x0.SimpleWritableAtom<PlateEditor>;
|
|
1446
|
+
scrollRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
|
|
1447
1447
|
} & {
|
|
1448
1448
|
trackedEditor: jotai10.Atom<{
|
|
1449
1449
|
editor: any;
|
|
@@ -1459,51 +1459,51 @@ declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
|
|
|
1459
1459
|
}>;
|
|
1460
1460
|
})[K$1] extends jotai10.Atom<infer V> ? V : never)>(key: K$1, options?: ({
|
|
1461
1461
|
selector?: ((v: ({
|
|
1462
|
-
composing:
|
|
1463
|
-
decorate:
|
|
1462
|
+
composing: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1463
|
+
decorate: jotai_x0.SimpleWritableAtom<((options: {
|
|
1464
1464
|
editor: PlateEditor;
|
|
1465
|
-
entry:
|
|
1466
|
-
}) =>
|
|
1467
|
-
isMounted:
|
|
1468
|
-
primary:
|
|
1469
|
-
readOnly:
|
|
1470
|
-
renderChunk:
|
|
1471
|
-
renderElement:
|
|
1472
|
-
renderLeaf:
|
|
1473
|
-
renderText:
|
|
1474
|
-
versionDecorate:
|
|
1475
|
-
versionEditor:
|
|
1476
|
-
versionSelection:
|
|
1477
|
-
versionValue:
|
|
1478
|
-
onChange:
|
|
1465
|
+
entry: _platejs_slate15.NodeEntry;
|
|
1466
|
+
}) => _platejs_slate15.TRange[]) | null>;
|
|
1467
|
+
isMounted: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1468
|
+
primary: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1469
|
+
readOnly: jotai_x0.SimpleWritableAtom<boolean | null>;
|
|
1470
|
+
renderChunk: jotai_x0.SimpleWritableAtom<RenderChunkFn | null>;
|
|
1471
|
+
renderElement: jotai_x0.SimpleWritableAtom<RenderElementFn | null>;
|
|
1472
|
+
renderLeaf: jotai_x0.SimpleWritableAtom<RenderLeafFn | null>;
|
|
1473
|
+
renderText: jotai_x0.SimpleWritableAtom<RenderTextFn | null>;
|
|
1474
|
+
versionDecorate: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1475
|
+
versionEditor: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1476
|
+
versionSelection: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1477
|
+
versionValue: jotai_x0.SimpleWritableAtom<number | null>;
|
|
1478
|
+
onChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1479
1479
|
editor: PlateEditor;
|
|
1480
|
-
value:
|
|
1480
|
+
value: _platejs_slate15.Value;
|
|
1481
1481
|
}) => void) | null>;
|
|
1482
|
-
onNodeChange:
|
|
1482
|
+
onNodeChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1483
1483
|
editor: PlateEditor;
|
|
1484
|
-
node:
|
|
1485
|
-
operation:
|
|
1486
|
-
prevNode:
|
|
1484
|
+
node: _platejs_slate15.Descendant;
|
|
1485
|
+
operation: _platejs_slate15.NodeOperation;
|
|
1486
|
+
prevNode: _platejs_slate15.Descendant;
|
|
1487
1487
|
}) => void) | null>;
|
|
1488
|
-
onSelectionChange:
|
|
1488
|
+
onSelectionChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1489
1489
|
editor: PlateEditor;
|
|
1490
|
-
selection:
|
|
1490
|
+
selection: _platejs_slate15.TSelection;
|
|
1491
1491
|
}) => void) | null>;
|
|
1492
|
-
onTextChange:
|
|
1492
|
+
onTextChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1493
1493
|
editor: PlateEditor;
|
|
1494
|
-
node:
|
|
1495
|
-
operation:
|
|
1494
|
+
node: _platejs_slate15.Descendant;
|
|
1495
|
+
operation: _platejs_slate15.TextOperation;
|
|
1496
1496
|
prevText: string;
|
|
1497
1497
|
text: string;
|
|
1498
1498
|
}) => void) | null>;
|
|
1499
|
-
onValueChange:
|
|
1499
|
+
onValueChange: jotai_x0.SimpleWritableAtom<((options: {
|
|
1500
1500
|
editor: PlateEditor;
|
|
1501
|
-
value:
|
|
1501
|
+
value: _platejs_slate15.Value;
|
|
1502
1502
|
}) => void) | null>;
|
|
1503
|
-
id:
|
|
1504
|
-
containerRef:
|
|
1505
|
-
editor:
|
|
1506
|
-
scrollRef:
|
|
1503
|
+
id: jotai_x0.SimpleWritableAtom<string>;
|
|
1504
|
+
containerRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
|
|
1505
|
+
editor: jotai_x0.SimpleWritableAtom<PlateEditor>;
|
|
1506
|
+
scrollRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
|
|
1507
1507
|
} & {
|
|
1508
1508
|
trackedEditor: jotai10.Atom<{
|
|
1509
1509
|
editor: any;
|
|
@@ -1519,8 +1519,8 @@ declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
|
|
|
1519
1519
|
}>;
|
|
1520
1520
|
})[K$1] extends jotai10.Atom<infer V_1> ? V_1 : never, prevSelectorOutput?: S | undefined) => S) | undefined;
|
|
1521
1521
|
equalityFn?: ((prev: S, next: S) => boolean) | undefined;
|
|
1522
|
-
} &
|
|
1523
|
-
declare const usePlateStore: (id?: string) =>
|
|
1522
|
+
} & jotai_x0.UseAtomOptions) | undefined, deps?: unknown[]) => S;
|
|
1523
|
+
declare const usePlateStore: (id?: string) => jotai_x0.ReturnOfUseStoreApi<PlateStoreState<PlateEditor>, {
|
|
1524
1524
|
trackedEditor: jotai10.Atom<{
|
|
1525
1525
|
editor: any;
|
|
1526
1526
|
version: number | null;
|
|
@@ -1626,7 +1626,7 @@ declare function useEditorPluginOptions<C extends AnyPluginConfig, U>(editor: Pl
|
|
|
1626
1626
|
}): U;
|
|
1627
1627
|
//#endregion
|
|
1628
1628
|
//#region src/react/stores/plate-controller/plateControllerStore.d.ts
|
|
1629
|
-
declare const PlateController: React$1.FC<
|
|
1629
|
+
declare const PlateController: React$1.FC<jotai_x0.ProviderProps<{
|
|
1630
1630
|
activeId: string | null;
|
|
1631
1631
|
editorStores: Record<string, ({
|
|
1632
1632
|
get: <Value$1>(atom: Atom<Value$1>) => Value$1;
|
|
@@ -1668,7 +1668,7 @@ declare const PlateController: React$1.FC<jotai_x2.ProviderProps<{
|
|
|
1668
1668
|
dev_restore_atoms: (values: Iterable<readonly [Atom<unknown>, unknown]>) => void;
|
|
1669
1669
|
}>) | null>;
|
|
1670
1670
|
primaryEditorIds: string[];
|
|
1671
|
-
}>>, plateControllerStore:
|
|
1671
|
+
}>>, plateControllerStore: jotai_x0.StoreApi<{
|
|
1672
1672
|
activeId: jotai10.PrimitiveAtom<string | null> & {
|
|
1673
1673
|
init: string | null;
|
|
1674
1674
|
};
|
|
@@ -1754,7 +1754,7 @@ declare const PlateController: React$1.FC<jotai_x2.ProviderProps<{
|
|
|
1754
1754
|
primaryEditorIds: jotai10.PrimitiveAtom<string[]> & {
|
|
1755
1755
|
init: string[];
|
|
1756
1756
|
};
|
|
1757
|
-
}, object, "plateController">, _usePlateControllerStore:
|
|
1757
|
+
}, object, "plateController">, _usePlateControllerStore: jotai_x0.UseStoreApi<{
|
|
1758
1758
|
activeId: jotai10.PrimitiveAtom<string | null> & {
|
|
1759
1759
|
init: string | null;
|
|
1760
1760
|
};
|
|
@@ -1956,7 +1956,7 @@ declare const useEditableProps: ({
|
|
|
1956
1956
|
* if another node is updated in a way that affects this node's path, this hook
|
|
1957
1957
|
* will not return the new path.
|
|
1958
1958
|
*/
|
|
1959
|
-
declare const useNodePath: (node: TNode) =>
|
|
1959
|
+
declare const useNodePath: (node: TNode) => _platejs_slate15.Path | undefined;
|
|
1960
1960
|
//#endregion
|
|
1961
1961
|
//#region src/react/hooks/useSlateProps.d.ts
|
|
1962
1962
|
type SlateComponentProps = Omit<React$1.ComponentProps<typeof Slate>, 'children'>;
|
|
@@ -1971,7 +1971,7 @@ declare const useSlateProps: ({
|
|
|
1971
1971
|
}) => PlateSlateProps;
|
|
1972
1972
|
//#endregion
|
|
1973
1973
|
//#region src/react/utils/createPlateFallbackEditor.d.ts
|
|
1974
|
-
declare const createPlateFallbackEditor: (options?: CreatePlateEditorOptions) => TPlateEditor<
|
|
1974
|
+
declare const createPlateFallbackEditor: (options?: CreatePlateEditorOptions) => TPlateEditor<_platejs_slate15.Value, PlateCorePlugin>;
|
|
1975
1975
|
//#endregion
|
|
1976
1976
|
//#region src/react/utils/dom-attributes.d.ts
|
|
1977
1977
|
declare const DOM_HANDLERS: (keyof DOMHandlers)[];
|
package/dist/react/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Ht as BaseParagraphPlugin, at as DOMPlugin, cn as createSlatePlugin, lt as ChunkingPlugin, n as withSlate, p as isEditOnly, s as SlateExtensionPlugin, sn as getEditorPlugin$1, tn as getPluginByType, vt as getSlateClass, y as NavigationFeedbackPlugin$1, yt as getPluginNodeProps } from "../withSlate-
|
|
1
|
+
import { Ht as BaseParagraphPlugin, at as DOMPlugin, cn as createSlatePlugin, lt as ChunkingPlugin, n as withSlate, p as isEditOnly, s as SlateExtensionPlugin, sn as getEditorPlugin$1, tn as getPluginByType, vt as getSlateClass, y as NavigationFeedbackPlugin$1, yt as getPluginNodeProps } from "../withSlate-Ck8dLhUt.js";
|
|
2
2
|
import { t as Hotkeys } from "../hotkeys-DI1HPO2Q.js";
|
|
3
|
-
import { A as pipeInjectNodeProps, C as createStaticEditor, k as pipeDecorate, s as PlateStatic } from "../static-
|
|
3
|
+
import { A as pipeInjectNodeProps, C as createStaticEditor, k as pipeDecorate, s as PlateStatic } from "../static-DAs0P1Ms.js";
|
|
4
4
|
import { PathApi, createEditor } from "@platejs/slate";
|
|
5
5
|
import { isDefined } from "@udecode/utils";
|
|
6
6
|
import { DefaultPlaceholder, Editable, Slate, useComposing, useFocused, useReadOnly, useSelected, useSlateStatic, withReact } from "slate-react";
|
package/dist/static/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $a as SlateHTMLProps, Ba as getSelectedDomNode, Co as SlateRenderLeaf, Do as SlateRenderElement, Eo as pipeRenderElementStatic, Ga as getPluginDataAttributes, Ha as getSelectedDomBlocks, Ia as stripSlateDataAttributes, Ja as ViewPlugin, Ka as createStaticString, La as stripHtmlClassNames, Oo as pluginRenderElementStatic, Qa as SlateElementProps, Ra as pipeDecorate, So as pluginRenderTextStatic, To as pluginRenderLeafStatic, Ua as getRenderNodeStaticProps, Va as getSelectedDomFragment, Wa as getNodeDataAttributes, Xa as getEditorDOMFromHtmlString, Ya as createStaticEditor, Za as SlateElement, _o as LeafStatic, ao as StyledSlateElementProps, bo as SlateRenderText, co as useNodeAttributes, do as SlateRenderLeafProps, eo as SlateLeaf, fo as SlateRenderNodeProps, go as ElementStatic, ho as serializeHtml, io as SlateTextProps, lo as BoxStaticProps, mo as SerializeHtmlOptions, no as SlateNodeProps, oo as StyledSlateLeafProps, po as SlateRenderTextProps, qa as getStaticPlugins, ro as SlateText, so as StyledSlateTextProps, to as SlateLeafProps, uo as SlateRenderElementProps, vo as PlateStatic, wo as pipeRenderLeafStatic, xo as pipeRenderTextStatic, yo as PlateStaticProps, za as isSelectOutside } from "../index-
|
|
1
|
+
import { $a as SlateHTMLProps, Ba as getSelectedDomNode, Co as SlateRenderLeaf, Do as SlateRenderElement, Eo as pipeRenderElementStatic, Ga as getPluginDataAttributes, Ha as getSelectedDomBlocks, Ia as stripSlateDataAttributes, Ja as ViewPlugin, Ka as createStaticString, La as stripHtmlClassNames, Oo as pluginRenderElementStatic, Qa as SlateElementProps, Ra as pipeDecorate, So as pluginRenderTextStatic, To as pluginRenderLeafStatic, Ua as getRenderNodeStaticProps, Va as getSelectedDomFragment, Wa as getNodeDataAttributes, Xa as getEditorDOMFromHtmlString, Ya as createStaticEditor, Za as SlateElement, _o as LeafStatic, ao as StyledSlateElementProps, bo as SlateRenderText, co as useNodeAttributes, do as SlateRenderLeafProps, eo as SlateLeaf, fo as SlateRenderNodeProps, go as ElementStatic, ho as serializeHtml, io as SlateTextProps, lo as BoxStaticProps, mo as SerializeHtmlOptions, no as SlateNodeProps, oo as StyledSlateLeafProps, po as SlateRenderTextProps, qa as getStaticPlugins, ro as SlateText, so as StyledSlateTextProps, to as SlateLeafProps, uo as SlateRenderElementProps, vo as PlateStatic, wo as pipeRenderLeafStatic, xo as pipeRenderTextStatic, yo as PlateStaticProps, za as isSelectOutside } from "../index-BooMghRU";
|
|
2
2
|
export { BoxStaticProps, ElementStatic, LeafStatic, PlateStatic, PlateStaticProps, SerializeHtmlOptions, SlateElement, SlateElementProps, SlateHTMLProps, SlateLeaf, SlateLeafProps, SlateNodeProps, SlateRenderElement, SlateRenderElementProps, SlateRenderLeaf, SlateRenderLeafProps, SlateRenderNodeProps, SlateRenderText, SlateRenderTextProps, SlateText, SlateTextProps, StyledSlateElementProps, StyledSlateLeafProps, StyledSlateTextProps, ViewPlugin, createStaticEditor, createStaticString, getEditorDOMFromHtmlString, getNodeDataAttributes, getPluginDataAttributes, getRenderNodeStaticProps, getSelectedDomBlocks, getSelectedDomFragment, getSelectedDomNode, getStaticPlugins, isSelectOutside, pipeDecorate, pipeRenderElementStatic, pipeRenderLeafStatic, pipeRenderTextStatic, pluginRenderElementStatic, pluginRenderLeafStatic, pluginRenderTextStatic, serializeHtml, stripHtmlClassNames, stripSlateDataAttributes, useNodeAttributes };
|
package/dist/static/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../withSlate-
|
|
2
|
-
import { C as createStaticEditor, D as getSelectedDomNode, E as isSelectOutside, O as getSelectedDomFragment, S as useNodeAttributes, T as ViewPlugin, _ as getPluginDataAttributes, a as ElementStatic, b as SlateLeaf, c as pipeRenderTextStatic, d as pluginRenderElementStatic, f as stripSlateDataAttributes, g as getNodeDataAttributes, h as getRenderNodeStaticProps, i as pluginRenderLeafStatic, k as pipeDecorate, l as pluginRenderTextStatic, m as getSelectedDomBlocks, n as serializeHtml, o as LeafStatic, p as stripHtmlClassNames, r as pipeRenderLeafStatic, s as PlateStatic, t as getEditorDOMFromHtmlString, u as pipeRenderElementStatic, v as createStaticString, w as getStaticPlugins, x as SlateText, y as SlateElement } from "../static-
|
|
1
|
+
import "../withSlate-Ck8dLhUt.js";
|
|
2
|
+
import { C as createStaticEditor, D as getSelectedDomNode, E as isSelectOutside, O as getSelectedDomFragment, S as useNodeAttributes, T as ViewPlugin, _ as getPluginDataAttributes, a as ElementStatic, b as SlateLeaf, c as pipeRenderTextStatic, d as pluginRenderElementStatic, f as stripSlateDataAttributes, g as getNodeDataAttributes, h as getRenderNodeStaticProps, i as pluginRenderLeafStatic, k as pipeDecorate, l as pluginRenderTextStatic, m as getSelectedDomBlocks, n as serializeHtml, o as LeafStatic, p as stripHtmlClassNames, r as pipeRenderLeafStatic, s as PlateStatic, t as getEditorDOMFromHtmlString, u as pipeRenderElementStatic, v as createStaticString, w as getStaticPlugins, x as SlateText, y as SlateElement } from "../static-DAs0P1Ms.js";
|
|
3
3
|
|
|
4
4
|
export { ElementStatic, LeafStatic, PlateStatic, SlateElement, SlateLeaf, SlateText, ViewPlugin, createStaticEditor, createStaticString, getEditorDOMFromHtmlString, getNodeDataAttributes, getPluginDataAttributes, getRenderNodeStaticProps, getSelectedDomBlocks, getSelectedDomFragment, getSelectedDomNode, getStaticPlugins, isSelectOutside, pipeDecorate, pipeRenderElementStatic, pipeRenderLeafStatic, pipeRenderTextStatic, pluginRenderElementStatic, pluginRenderLeafStatic, pluginRenderTextStatic, serializeHtml, stripHtmlClassNames, stripSlateDataAttributes, useNodeAttributes };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ct as getInjectMatch, at as DOMPlugin, n as withSlate, p as isEditOnly, sn as getEditorPlugin, tn as getPluginByType, vt as getSlateClass, xt as keyToDataAttribute, yt as getPluginNodeProps } from "./withSlate-
|
|
1
|
+
import { Ct as getInjectMatch, at as DOMPlugin, n as withSlate, p as isEditOnly, sn as getEditorPlugin, tn as getPluginByType, vt as getSlateClass, xt as keyToDataAttribute, yt as getPluginNodeProps } from "./withSlate-Ck8dLhUt.js";
|
|
2
2
|
import { ElementApi, NodeApi, RangeApi, TextApi, createEditor, isElementDecorationsEqual, isTextDecorationsEqual } from "@platejs/slate";
|
|
3
3
|
import { isDefined } from "@udecode/utils";
|
|
4
4
|
import React from "react";
|
|
@@ -308,11 +308,10 @@ const resolvePlugin = (editor, _plugin) => {
|
|
|
308
308
|
let plugin = mergePlugins({}, _plugin);
|
|
309
309
|
plugin.__resolved = true;
|
|
310
310
|
if (plugin.__configuration) {
|
|
311
|
-
const configResult = plugin.__configuration(getEditorPlugin(editor, plugin));
|
|
312
|
-
if (
|
|
313
|
-
const normalizedInputRules = normalizeConfiguredInputRules(
|
|
311
|
+
const { inputRules: configInputRules, ...configResult } = plugin.__configuration(getEditorPlugin(editor, plugin));
|
|
312
|
+
if (configInputRules !== void 0) {
|
|
313
|
+
const normalizedInputRules = normalizeConfiguredInputRules(configInputRules);
|
|
314
314
|
plugin.__configuredInputRules = [...normalizeConfiguredInputRules(plugin.__configuredInputRules), ...normalizedInputRules];
|
|
315
|
-
configResult.inputRules = void 0;
|
|
316
315
|
}
|
|
317
316
|
plugin = mergePlugins(plugin, configResult);
|
|
318
317
|
plugin.__configuration = void 0;
|
|
@@ -629,12 +628,10 @@ const matchDelimitedInline = (context, { boundaryRe, close, followRe, open, requ
|
|
|
629
628
|
};
|
|
630
629
|
};
|
|
631
630
|
const getTextSubstitutionMatchRange = ({ match, trigger }) => {
|
|
632
|
-
const
|
|
633
|
-
const reversed = start.split("").reverse().join("");
|
|
634
|
-
const triggers = trigger ? Array.isArray(trigger) ? [...trigger] : [trigger] : [reversed.slice(-1)];
|
|
631
|
+
const triggers = trigger ? Array.isArray(trigger) ? [...trigger] : [trigger] : [match.slice(-1)];
|
|
635
632
|
return {
|
|
636
|
-
end: trigger ?
|
|
637
|
-
start,
|
|
633
|
+
end: trigger ? match : match.slice(0, -1),
|
|
634
|
+
start: match,
|
|
638
635
|
triggers
|
|
639
636
|
};
|
|
640
637
|
};
|
|
@@ -668,33 +665,46 @@ const getTextSubstitutionMatchPoints = (editor, { end, start }) => {
|
|
|
668
665
|
beforeStartMatchPoint
|
|
669
666
|
};
|
|
670
667
|
};
|
|
671
|
-
const
|
|
672
|
-
|
|
673
|
-
match,
|
|
674
|
-
trigger: pattern.trigger
|
|
675
|
-
}).triggers);
|
|
676
|
-
})));
|
|
677
|
-
const resolveTextSubstitution = ({ editor, patterns, text }) => {
|
|
668
|
+
const compilePatternsByTrigger = (patterns) => {
|
|
669
|
+
const byTrigger = /* @__PURE__ */ new Map();
|
|
678
670
|
for (const pattern of patterns) {
|
|
679
|
-
const matches = Array.isArray(pattern.match) ?
|
|
671
|
+
const matches = Array.isArray(pattern.match) ? pattern.match : [pattern.match];
|
|
672
|
+
const isPaired = Array.isArray(pattern.format);
|
|
680
673
|
for (const match of matches) {
|
|
681
674
|
const { end, start, triggers } = getTextSubstitutionMatchRange({
|
|
682
675
|
match,
|
|
683
676
|
trigger: pattern.trigger
|
|
684
677
|
});
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
end: Array.isArray(pattern.format) ? "" : end,
|
|
688
|
-
start
|
|
689
|
-
});
|
|
690
|
-
if (!points) continue;
|
|
691
|
-
return {
|
|
692
|
-
end: Array.isArray(pattern.format) ? "" : end,
|
|
678
|
+
const compiled = {
|
|
679
|
+
end: isPaired ? "" : end,
|
|
693
680
|
pattern,
|
|
694
|
-
|
|
681
|
+
start: isPaired ? start : ""
|
|
695
682
|
};
|
|
683
|
+
for (const trigger of triggers) {
|
|
684
|
+
let list = byTrigger.get(trigger);
|
|
685
|
+
if (!list) {
|
|
686
|
+
list = [];
|
|
687
|
+
byTrigger.set(trigger, list);
|
|
688
|
+
}
|
|
689
|
+
list.push(compiled);
|
|
690
|
+
}
|
|
696
691
|
}
|
|
697
692
|
}
|
|
693
|
+
return byTrigger;
|
|
694
|
+
};
|
|
695
|
+
const resolveTextSubstitution = ({ candidates, editor }) => {
|
|
696
|
+
for (const { end, pattern, start } of candidates) {
|
|
697
|
+
const points = getTextSubstitutionMatchPoints(editor, {
|
|
698
|
+
end,
|
|
699
|
+
start
|
|
700
|
+
});
|
|
701
|
+
if (!points) continue;
|
|
702
|
+
return {
|
|
703
|
+
end,
|
|
704
|
+
pattern,
|
|
705
|
+
points
|
|
706
|
+
};
|
|
707
|
+
}
|
|
698
708
|
};
|
|
699
709
|
const applyTextSubstitution = (editor, match) => {
|
|
700
710
|
const selection = editor.selection;
|
|
@@ -715,21 +725,25 @@ const applyTextSubstitution = (editor, match) => {
|
|
|
715
725
|
}
|
|
716
726
|
return true;
|
|
717
727
|
};
|
|
718
|
-
const createTextSubstitutionInputRule = ({ enabled, patterns, priority }) =>
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
editor
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
});
|
|
728
|
+
const createTextSubstitutionInputRule = ({ enabled, patterns, priority }) => {
|
|
729
|
+
const patternsByTrigger = compilePatternsByTrigger(patterns);
|
|
730
|
+
return defineInputRule({
|
|
731
|
+
enabled,
|
|
732
|
+
priority,
|
|
733
|
+
target: "insertText",
|
|
734
|
+
trigger: Array.from(patternsByTrigger.keys()),
|
|
735
|
+
resolve: ({ editor, text }) => {
|
|
736
|
+
if (!editor.selection || !editor.api.isCollapsed()) return;
|
|
737
|
+
const candidates = patternsByTrigger.get(text);
|
|
738
|
+
if (!candidates) return;
|
|
739
|
+
return resolveTextSubstitution({
|
|
740
|
+
candidates,
|
|
741
|
+
editor
|
|
742
|
+
});
|
|
743
|
+
},
|
|
744
|
+
apply: ({ editor }, match) => applyTextSubstitution(editor, match)
|
|
745
|
+
});
|
|
746
|
+
};
|
|
733
747
|
|
|
734
748
|
//#endregion
|
|
735
749
|
//#region src/lib/plugins/input-rules/internal/createInputRuleBuilder.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lofcz/platejs-core",
|
|
3
|
-
"version": "53.
|
|
3
|
+
"version": "53.1.6",
|
|
4
4
|
"description": "The core of Plate – a plugin system for slate",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contentEditable",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"slate": "0.124.1",
|
|
50
50
|
"slate-dom": "0.124.1",
|
|
51
51
|
"slate-hyperscript": "0.100.0",
|
|
52
|
-
"slate-react": "0.
|
|
52
|
+
"slate-react": "0.124.2",
|
|
53
53
|
"use-deep-compare": "^1.3.0",
|
|
54
54
|
"zustand": "^5.0.5",
|
|
55
55
|
"zustand-x": "6.2.1",
|
|
56
|
-
"@platejs/slate": "npm:@lofcz/platejs-slate@53.
|
|
56
|
+
"@platejs/slate": "npm:@lofcz/platejs-slate@53.1.1",
|
|
57
57
|
"@udecode/react-hotkeys": "npm:@lofcz/udecode-react-hotkeys@52.3.6",
|
|
58
58
|
"@udecode/react-utils": "npm:@lofcz/udecode-react-utils@52.3.4",
|
|
59
59
|
"@udecode/utils": "npm:@lofcz/udecode-utils@52.3.4"
|