@lofcz/platejs-core 53.1.6 → 53.1.8
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-BooMghRU.d.ts → index-BDSzA1zP.d.ts} +160 -98
- package/dist/index.d.ts +2 -2
- package/dist/index.js +14 -4
- package/dist/react/index.d.ts +230 -190
- package/dist/react/index.js +1014 -171
- package/dist/static/index.d.ts +1 -1
- package/dist/static/index.js +2 -2
- package/dist/{static-DAs0P1Ms.js → static-KMalmfNw.js} +3 -3
- package/dist/{withSlate-Ck8dLhUt.js → withSlate-NVP0S9vL.js} +236 -100
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _platejs_slate1 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_slate1.ScrollIntoViewOptions;
|
|
204
204
|
}, {
|
|
205
|
-
getFragment: () =>
|
|
205
|
+
getFragment: () => _platejs_slate1.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_slate1.ScrollIntoViewOptions;
|
|
216
216
|
}, {
|
|
217
|
-
getFragment: () =>
|
|
217
|
+
getFragment: () => _platejs_slate1.Descendant[];
|
|
218
218
|
isScrolling: () => boolean;
|
|
219
219
|
}, {
|
|
220
220
|
withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
|
|
@@ -565,9 +565,13 @@ interface NodeStaticWrapperComponentProps<C extends AnyPluginConfig = PluginConf
|
|
|
565
565
|
}
|
|
566
566
|
/** @deprecated Use {@link RenderStaticNodeWrapperFunction} instead. */
|
|
567
567
|
type NodeStaticWrapperComponentReturnType<C extends AnyPluginConfig = PluginConfig> = React.FC<SlateRenderElementProps<TElement, C>> | undefined;
|
|
568
|
+
type TransformInitialValue<C extends AnyPluginConfig = PluginConfig> = (ctx: SlatePluginContext<C> & {
|
|
569
|
+
value: Value;
|
|
570
|
+
}) => Value;
|
|
571
|
+
/** @deprecated Use {@link TransformInitialValue} instead. */
|
|
568
572
|
type NormalizeInitialValue<C extends AnyPluginConfig = PluginConfig> = (ctx: SlatePluginContext<C> & {
|
|
569
573
|
value: Value;
|
|
570
|
-
}) => void;
|
|
574
|
+
}) => Value | void;
|
|
571
575
|
type OverrideEditor<C extends AnyPluginConfig = PluginConfig> = (ctx: SlatePluginContext<C>) => {
|
|
572
576
|
api?: Deep2Partial<EditorApi & CorePluginApi> & { [K in keyof InferApi<C>]?: InferApi<C>[K] extends ((...args: any[]) => any) ? (...args: Parameters<InferApi<C>[K]>) => ReturnType<InferApi<C>[K]> : InferApi<C>[K] extends Record<string, (...args: any[]) => any> ? { [N in keyof InferApi<C>[K]]?: (...args: Parameters<InferApi<C>[K][N]>) => ReturnType<InferApi<C>[K][N]> } : never };
|
|
573
577
|
transforms?: Deep2Partial<EditorTransforms & CorePluginTransforms> & { [K in keyof InferTransforms<C>]?: InferTransforms<C>[K] extends ((...args: any[]) => any) ? (...args: Parameters<InferTransforms<C>[K]>) => ReturnType<InferTransforms<C>[K]> : InferTransforms<C>[K] extends Record<string, (...args: any[]) => any> ? { [N in keyof InferTransforms<C>[K]]?: (...args: Parameters<InferTransforms<C>[K][N]>) => ReturnType<InferTransforms<C>[K][N]> } : never };
|
|
@@ -605,6 +609,8 @@ type Serializer<C extends AnyPluginConfig = PluginConfig> = BaseSerializer & {
|
|
|
605
609
|
type SlatePlugin<C extends AnyPluginConfig = PluginConfig> = BasePlugin<C> & Nullable<{
|
|
606
610
|
decorate?: Decorate<WithAnyKey<C>>;
|
|
607
611
|
extendEditor?: ExtendEditor<WithAnyKey<C>>;
|
|
612
|
+
transformInitialValue?: TransformInitialValue<WithAnyKey<C>>;
|
|
613
|
+
/** @deprecated Use `transformInitialValue` instead. */
|
|
608
614
|
normalizeInitialValue?: NormalizeInitialValue<WithAnyKey<C>>;
|
|
609
615
|
}> & SlatePluginMethods<C> & {
|
|
610
616
|
handlers: Nullable<{
|
|
@@ -877,6 +883,50 @@ declare const HistoryPlugin: SlatePlugin<PluginConfig<"history", {}, {}, {}, {}>
|
|
|
877
883
|
//#region src/lib/plugins/ParserPlugin.d.ts
|
|
878
884
|
declare const ParserPlugin: SlatePlugin<PluginConfig<"parser", {}, {}, {}, {}>>;
|
|
879
885
|
//#endregion
|
|
886
|
+
//#region src/lib/plugins/dom/withScrolling.d.ts
|
|
887
|
+
type WithAutoScrollOptions = {
|
|
888
|
+
mode?: ScrollMode;
|
|
889
|
+
operations?: AutoScrollOperationsMap;
|
|
890
|
+
scrollOptions?: ScrollIntoViewOptions;
|
|
891
|
+
};
|
|
892
|
+
declare const withScrolling: (editor: SlateEditor, fn: () => void, options?: WithAutoScrollOptions) => void;
|
|
893
|
+
//#endregion
|
|
894
|
+
//#region src/lib/plugins/dom/DOMPlugin.d.ts
|
|
895
|
+
declare const AUTO_SCROLL: WeakMap<SlateEditor, boolean>;
|
|
896
|
+
type AutoScrollOperationsMap = Partial<Record<Operation['type'], boolean>>;
|
|
897
|
+
type DomConfig = PluginConfig<'dom', {
|
|
898
|
+
/** Choose the first or last matching operation as the scroll target */
|
|
899
|
+
scrollMode?: ScrollMode;
|
|
900
|
+
/**
|
|
901
|
+
* Operations map; false to disable an operation, true or undefined to
|
|
902
|
+
* enable
|
|
903
|
+
*/
|
|
904
|
+
scrollOperations?: AutoScrollOperationsMap;
|
|
905
|
+
/** Options passed to scrollIntoView */
|
|
906
|
+
scrollOptions?: ScrollIntoViewOptions;
|
|
907
|
+
}>;
|
|
908
|
+
/** Mode for picking target op when multiple enabled */
|
|
909
|
+
type ScrollMode = 'first' | 'last';
|
|
910
|
+
/**
|
|
911
|
+
* Placeholder plugin for DOM interaction, that could be replaced with
|
|
912
|
+
* ReactPlugin.
|
|
913
|
+
*/
|
|
914
|
+
declare const DOMPlugin: SlatePlugin<PluginConfig<"dom", {
|
|
915
|
+
/** Choose the first or last matching operation as the scroll target */
|
|
916
|
+
scrollMode?: ScrollMode;
|
|
917
|
+
/**
|
|
918
|
+
* Operations map; false to disable an operation, true or undefined to
|
|
919
|
+
* enable
|
|
920
|
+
*/
|
|
921
|
+
scrollOperations?: AutoScrollOperationsMap;
|
|
922
|
+
/** Options passed to scrollIntoView */
|
|
923
|
+
scrollOptions?: ScrollIntoViewOptions;
|
|
924
|
+
}, {
|
|
925
|
+
isScrolling: () => boolean;
|
|
926
|
+
}, {
|
|
927
|
+
withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
|
|
928
|
+
}, {}>>;
|
|
929
|
+
//#endregion
|
|
880
930
|
//#region src/lib/plugins/slate-extension/transforms/init.d.ts
|
|
881
931
|
type InitOptions = {
|
|
882
932
|
autoSelect?: boolean | 'end' | 'start';
|
|
@@ -998,56 +1048,12 @@ declare const SlateExtensionPlugin: SlatePlugin<PluginConfig<"slateExtension", {
|
|
|
998
1048
|
insertExitBreak: ((args_0?: InsertExitBreakOptions | undefined) => true | undefined) & ((args_0?: InsertExitBreakOptions | undefined) => true | undefined);
|
|
999
1049
|
liftBlock: ((args_0?: LiftBlockOptions | undefined) => true | undefined) & ((args_0?: LiftBlockOptions | undefined) => true | undefined);
|
|
1000
1050
|
resetBlock: ((args_0?: {
|
|
1001
|
-
at?:
|
|
1051
|
+
at?: _platejs_slate1.Path;
|
|
1002
1052
|
} | undefined) => true | undefined) & ((args_0?: {
|
|
1003
|
-
at?:
|
|
1053
|
+
at?: _platejs_slate1.Path;
|
|
1004
1054
|
} | undefined) => true | undefined);
|
|
1005
|
-
setValue: ((value?: string |
|
|
1006
|
-
apply: <N$1 extends
|
|
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;
|
|
1055
|
+
setValue: ((value?: string | _platejs_slate1.Value | undefined) => void) & ((value?: string | _platejs_slate1.Value | undefined) => void);
|
|
1056
|
+
apply: <N$1 extends _platejs_slate1.TElement | TText>(operation: _platejs_slate1.Operation<N$1>) => void;
|
|
1051
1057
|
}, {}>>;
|
|
1052
1058
|
//#endregion
|
|
1053
1059
|
//#region src/lib/plugins/navigation-feedback/types.d.ts
|
|
@@ -1109,7 +1115,7 @@ declare const NavigationFeedbackPlugin: SlatePlugin<PluginConfig<"navigationFeed
|
|
|
1109
1115
|
navigation: {
|
|
1110
1116
|
activeTarget: () => NavigationFeedbackActiveTarget | null;
|
|
1111
1117
|
clear: () => void;
|
|
1112
|
-
isTarget: (path:
|
|
1118
|
+
isTarget: (path: _platejs_slate1.Path) => boolean;
|
|
1113
1119
|
};
|
|
1114
1120
|
}, {
|
|
1115
1121
|
navigation: {
|
|
@@ -1217,13 +1223,35 @@ type NodeIdOptions = {
|
|
|
1217
1223
|
*/
|
|
1218
1224
|
idKey?: string;
|
|
1219
1225
|
/**
|
|
1220
|
-
*
|
|
1221
|
-
* are missing id. To disable this behavior, use `NodeIdPlugin.configure({
|
|
1222
|
-
* normalizeInitialValue: null })`.
|
|
1226
|
+
* Controls how missing ids are assigned in the initial value.
|
|
1223
1227
|
*
|
|
1224
|
-
*
|
|
1228
|
+
* - `'if-needed'`: normalize only when the first or last top-level node is
|
|
1229
|
+
* missing an id
|
|
1230
|
+
* - `'always'`: walk the whole initial value and fill any missing ids
|
|
1231
|
+
* - `false`: skip initial-value id assignment
|
|
1232
|
+
*
|
|
1233
|
+
* @default 'if-needed'
|
|
1225
1234
|
*/
|
|
1226
|
-
|
|
1235
|
+
initialValueIds?: false | 'always' | 'if-needed';
|
|
1236
|
+
/**
|
|
1237
|
+
* Legacy alias for `initialValueIds`.
|
|
1238
|
+
*
|
|
1239
|
+
* - `false`: only check the first and last top-level nodes
|
|
1240
|
+
* - `true`: walk the whole initial value and fill missing ids
|
|
1241
|
+
* - `null`: skip initial-value id assignment
|
|
1242
|
+
*
|
|
1243
|
+
* @deprecated Use `initialValueIds` instead.
|
|
1244
|
+
*/
|
|
1245
|
+
normalizeInitialValue?: boolean | null;
|
|
1246
|
+
/**
|
|
1247
|
+
* Reports duplicate-id scan cost during inserted-node normalization.
|
|
1248
|
+
*/
|
|
1249
|
+
onDuplicateIdScan?: (stats: {
|
|
1250
|
+
candidateCount: number;
|
|
1251
|
+
duration: number;
|
|
1252
|
+
existingCount: number;
|
|
1253
|
+
visitedCount: number;
|
|
1254
|
+
}) => void;
|
|
1227
1255
|
/**
|
|
1228
1256
|
* Reuse ids on undo/redo and copy/pasting if not existing in the document.
|
|
1229
1257
|
* This is disabled by default to avoid duplicate ids across documents.
|
|
@@ -1239,11 +1267,12 @@ type NodeIdOptions = {
|
|
|
1239
1267
|
idCreator?: () => any;
|
|
1240
1268
|
} & QueryNodeOptions;
|
|
1241
1269
|
type NormalizeNodeIdOptions = Pick<NodeIdOptions, 'allow' | 'exclude' | 'filter' | 'filterInline' | 'filterText' | 'idCreator' | 'idKey'>;
|
|
1242
|
-
/**
|
|
1243
|
-
* Normalize node IDs in a value without using editor operations. This is a pure
|
|
1244
|
-
* function that returns a new normalized value.
|
|
1245
|
-
*/
|
|
1246
1270
|
declare const normalizeNodeId: <V extends Value>(value: V, options?: NormalizeNodeIdOptions) => V;
|
|
1271
|
+
declare const normalizeNodeIdWithEditor: <V extends Value>(editor: {
|
|
1272
|
+
api: {
|
|
1273
|
+
isBlock: (node: Descendant) => boolean;
|
|
1274
|
+
};
|
|
1275
|
+
}, value: V, options?: NormalizeNodeIdOptions) => V;
|
|
1247
1276
|
type NodeIdConfig = PluginConfig<'nodeId', NodeIdOptions, {}, {
|
|
1248
1277
|
nodeId: {
|
|
1249
1278
|
normalize: () => void;
|
|
@@ -1276,13 +1305,35 @@ declare const NodeIdPlugin: SlatePlugin<PluginConfig<"nodeId", {
|
|
|
1276
1305
|
*/
|
|
1277
1306
|
idKey?: string;
|
|
1278
1307
|
/**
|
|
1279
|
-
*
|
|
1280
|
-
* are missing id. To disable this behavior, use `NodeIdPlugin.configure({
|
|
1281
|
-
* normalizeInitialValue: null })`.
|
|
1308
|
+
* Controls how missing ids are assigned in the initial value.
|
|
1282
1309
|
*
|
|
1283
|
-
*
|
|
1310
|
+
* - `'if-needed'`: normalize only when the first or last top-level node is
|
|
1311
|
+
* missing an id
|
|
1312
|
+
* - `'always'`: walk the whole initial value and fill any missing ids
|
|
1313
|
+
* - `false`: skip initial-value id assignment
|
|
1314
|
+
*
|
|
1315
|
+
* @default 'if-needed'
|
|
1284
1316
|
*/
|
|
1285
|
-
|
|
1317
|
+
initialValueIds?: false | "always" | "if-needed";
|
|
1318
|
+
/**
|
|
1319
|
+
* Legacy alias for `initialValueIds`.
|
|
1320
|
+
*
|
|
1321
|
+
* - `false`: only check the first and last top-level nodes
|
|
1322
|
+
* - `true`: walk the whole initial value and fill missing ids
|
|
1323
|
+
* - `null`: skip initial-value id assignment
|
|
1324
|
+
*
|
|
1325
|
+
* @deprecated Use `initialValueIds` instead.
|
|
1326
|
+
*/
|
|
1327
|
+
normalizeInitialValue?: boolean | null;
|
|
1328
|
+
/**
|
|
1329
|
+
* Reports duplicate-id scan cost during inserted-node normalization.
|
|
1330
|
+
*/
|
|
1331
|
+
onDuplicateIdScan?: (stats: {
|
|
1332
|
+
candidateCount: number;
|
|
1333
|
+
duration: number;
|
|
1334
|
+
existingCount: number;
|
|
1335
|
+
visitedCount: number;
|
|
1336
|
+
}) => void;
|
|
1286
1337
|
/**
|
|
1287
1338
|
* Reuse ids on undo/redo and copy/pasting if not existing in the document.
|
|
1288
1339
|
* This is disabled by default to avoid duplicate ids across documents.
|
|
@@ -1353,17 +1404,25 @@ declare const getCorePlugins: ({
|
|
|
1353
1404
|
navigationFeedback,
|
|
1354
1405
|
nodeId,
|
|
1355
1406
|
plugins
|
|
1356
|
-
}: GetCorePluginsOptions) => (SlatePlugin<
|
|
1407
|
+
}: GetCorePluginsOptions) => (SlatePlugin<PluginConfig<"dom", {
|
|
1408
|
+
scrollMode?: ScrollMode;
|
|
1409
|
+
scrollOperations?: AutoScrollOperationsMap;
|
|
1410
|
+
scrollOptions?: _platejs_slate1.ScrollIntoViewOptions;
|
|
1411
|
+
}, {
|
|
1412
|
+
isScrolling: () => boolean;
|
|
1413
|
+
}, {
|
|
1414
|
+
withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
|
|
1415
|
+
}, {}>> | SlatePlugin<DebugConfig> | SlatePlugin<PluginConfig<"slateExtension", {
|
|
1357
1416
|
onNodeChange: (options: {
|
|
1358
1417
|
editor: SlateEditor;
|
|
1359
|
-
node:
|
|
1360
|
-
operation:
|
|
1361
|
-
prevNode:
|
|
1418
|
+
node: _platejs_slate1.Descendant;
|
|
1419
|
+
operation: _platejs_slate1.NodeOperation;
|
|
1420
|
+
prevNode: _platejs_slate1.Descendant;
|
|
1362
1421
|
}) => void;
|
|
1363
1422
|
onTextChange: (options: {
|
|
1364
1423
|
editor: SlateEditor;
|
|
1365
|
-
node:
|
|
1366
|
-
operation:
|
|
1424
|
+
node: _platejs_slate1.Descendant;
|
|
1425
|
+
operation: _platejs_slate1.TextOperation;
|
|
1367
1426
|
prevText: string;
|
|
1368
1427
|
text: string;
|
|
1369
1428
|
}) => void;
|
|
@@ -1374,20 +1433,12 @@ declare const getCorePlugins: ({
|
|
|
1374
1433
|
insertExitBreak: ((args_0?: InsertExitBreakOptions | undefined) => true | undefined) & ((args_0?: InsertExitBreakOptions | undefined) => true | undefined);
|
|
1375
1434
|
liftBlock: ((args_0?: LiftBlockOptions | undefined) => true | undefined) & ((args_0?: LiftBlockOptions | undefined) => true | undefined);
|
|
1376
1435
|
resetBlock: ((args_0?: {
|
|
1377
|
-
at?:
|
|
1436
|
+
at?: _platejs_slate1.Path;
|
|
1378
1437
|
} | undefined) => true | undefined) & ((args_0?: {
|
|
1379
|
-
at?:
|
|
1438
|
+
at?: _platejs_slate1.Path;
|
|
1380
1439
|
} | undefined) => true | undefined);
|
|
1381
|
-
setValue: ((value?: string |
|
|
1382
|
-
apply: <N$1 extends
|
|
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;
|
|
1440
|
+
setValue: ((value?: string | _platejs_slate1.Value | undefined) => void) & ((value?: string | _platejs_slate1.Value | undefined) => void);
|
|
1441
|
+
apply: <N$1 extends _platejs_slate1.TElement | _platejs_slate1.TText>(operation: _platejs_slate1.Operation<N$1>) => void;
|
|
1391
1442
|
}, {}>> | SlatePlugin<PluginConfig<"navigationFeedback", {
|
|
1392
1443
|
activeTarget: NavigationFeedbackStoredTarget | null;
|
|
1393
1444
|
duration: number;
|
|
@@ -1395,7 +1446,7 @@ declare const getCorePlugins: ({
|
|
|
1395
1446
|
navigation: {
|
|
1396
1447
|
activeTarget: () => NavigationFeedbackActiveTarget | null;
|
|
1397
1448
|
clear: () => void;
|
|
1398
|
-
isTarget: (path:
|
|
1449
|
+
isTarget: (path: _platejs_slate1.Path) => boolean;
|
|
1399
1450
|
};
|
|
1400
1451
|
}, {
|
|
1401
1452
|
navigation: {
|
|
@@ -1408,16 +1459,23 @@ declare const getCorePlugins: ({
|
|
|
1408
1459
|
element: HTMLElement | string;
|
|
1409
1460
|
collapseWhiteSpace?: boolean;
|
|
1410
1461
|
defaultElementPlugin?: WithRequiredKey;
|
|
1411
|
-
}) =>
|
|
1462
|
+
}) => _platejs_slate1.Descendant[];
|
|
1412
1463
|
}>, {}, {}>> | SlatePlugin<PluginConfig<"ast", {}, {}, {}, {}>> | SlatePlugin<PluginConfig<"nodeId", {
|
|
1413
1464
|
disableInsertOverrides?: boolean;
|
|
1414
1465
|
filterInline?: boolean;
|
|
1415
1466
|
filterText?: boolean;
|
|
1416
1467
|
idKey?: string;
|
|
1417
|
-
|
|
1468
|
+
initialValueIds?: false | "always" | "if-needed";
|
|
1469
|
+
normalizeInitialValue?: boolean | null;
|
|
1470
|
+
onDuplicateIdScan?: (stats: {
|
|
1471
|
+
candidateCount: number;
|
|
1472
|
+
duration: number;
|
|
1473
|
+
existingCount: number;
|
|
1474
|
+
visitedCount: number;
|
|
1475
|
+
}) => void;
|
|
1418
1476
|
reuseId?: boolean;
|
|
1419
1477
|
idCreator?: () => any;
|
|
1420
|
-
} &
|
|
1478
|
+
} & _platejs_slate1.QueryNodeOptions, {}, {
|
|
1421
1479
|
nodeId: {
|
|
1422
1480
|
normalize: () => void;
|
|
1423
1481
|
};
|
|
@@ -1457,7 +1515,7 @@ declare const HtmlPlugin: SlatePlugin<PluginConfig<"html", {}, Record<"html", {
|
|
|
1457
1515
|
element: HTMLElement | string;
|
|
1458
1516
|
collapseWhiteSpace?: boolean;
|
|
1459
1517
|
defaultElementPlugin?: WithRequiredKey;
|
|
1460
|
-
}) =>
|
|
1518
|
+
}) => _platejs_slate1.Descendant[];
|
|
1461
1519
|
}>, {}, {}>>;
|
|
1462
1520
|
//#endregion
|
|
1463
1521
|
//#region src/lib/plugins/html/constants.d.ts
|
|
@@ -2156,7 +2214,7 @@ type BasePlugin<C extends AnyPluginConfig = PluginConfig> = {
|
|
|
2156
2214
|
* always be active.
|
|
2157
2215
|
* - `inject` (for `inject.nodeProps`): Edit-only by default (true if not
|
|
2158
2216
|
* specified). Set to `false` to always be active.
|
|
2159
|
-
* - `
|
|
2217
|
+
* - `transformInitialValue`: NOT edit-only by default (false if not specified).
|
|
2160
2218
|
* Set to `true` to make it edit-only.
|
|
2161
2219
|
*/
|
|
2162
2220
|
editOnly?: EditOnlyConfig | boolean;
|
|
@@ -2372,11 +2430,15 @@ type EditOnlyConfig = {
|
|
|
2372
2430
|
*/
|
|
2373
2431
|
inject?: boolean;
|
|
2374
2432
|
/**
|
|
2375
|
-
* If true, `
|
|
2433
|
+
* If true, `transformInitialValue` is only called when the editor is not
|
|
2376
2434
|
* read-only.
|
|
2377
2435
|
*
|
|
2378
2436
|
* @default false (This is an exception. It's not edit-only by default, even if `editOnly` is true or an object, unless explicitly set to true here).
|
|
2379
2437
|
*/
|
|
2438
|
+
transformInitialValue?: boolean;
|
|
2439
|
+
/**
|
|
2440
|
+
* @deprecated Use `transformInitialValue` instead.
|
|
2441
|
+
*/
|
|
2380
2442
|
normalizeInitialValue?: boolean;
|
|
2381
2443
|
/**
|
|
2382
2444
|
* If true, `render` functions are only active when the editor is not
|
|
@@ -2490,7 +2552,7 @@ type BaseEditor = EditorBase & {
|
|
|
2490
2552
|
/** Node types to plugin keys. */
|
|
2491
2553
|
types: Record<string, string>;
|
|
2492
2554
|
};
|
|
2493
|
-
|
|
2555
|
+
transformInitialValue: string[];
|
|
2494
2556
|
render: {
|
|
2495
2557
|
aboveEditable: string[];
|
|
2496
2558
|
aboveNodes: string[];
|
|
@@ -2695,7 +2757,7 @@ type BaseWithSlateOptions<P extends AnyPluginConfig = CorePlugin> = {
|
|
|
2695
2757
|
*/
|
|
2696
2758
|
skipInitialization?: boolean;
|
|
2697
2759
|
};
|
|
2698
|
-
type WithSlateOptions<V extends Value = Value, P extends AnyPluginConfig = CorePlugin> = BaseWithSlateOptions<P> & Pick<Partial<AnySlatePlugin>, 'api' | 'decorate' | 'extendEditor' | 'inject' | 'normalizeInitialValue' | 'options' | 'override' | 'transforms'> & {
|
|
2760
|
+
type WithSlateOptions<V extends Value = Value, P extends AnyPluginConfig = CorePlugin> = BaseWithSlateOptions<P> & Pick<Partial<AnySlatePlugin>, 'api' | 'decorate' | 'extendEditor' | 'inject' | 'transformInitialValue' | 'normalizeInitialValue' | 'options' | 'override' | 'transforms'> & {
|
|
2699
2761
|
/**
|
|
2700
2762
|
* Initial content for the editor.
|
|
2701
2763
|
*
|
|
@@ -3029,7 +3091,7 @@ declare const normalizeDescendantsToDocumentFragment: (editor: SlateEditor, {
|
|
|
3029
3091
|
}) => Descendant[];
|
|
3030
3092
|
//#endregion
|
|
3031
3093
|
//#region src/lib/utils/omitPluginContext.d.ts
|
|
3032
|
-
declare const omitPluginContext: <T extends SlatePluginContext<AnySlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "
|
|
3094
|
+
declare const omitPluginContext: <T extends SlatePluginContext<AnySlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "type" | "getOption" | "tf" | "setOptions" | "getOptions" | "setOption" | "plugin">;
|
|
3033
3095
|
//#endregion
|
|
3034
3096
|
//#region src/lib/utils/overridePluginsByKey.d.ts
|
|
3035
3097
|
/**
|
|
@@ -3048,4 +3110,4 @@ declare const pipeOnNodeChange: (editor: SlateEditor, node: Descendant, prevNode
|
|
|
3048
3110
|
//#region src/lib/utils/pipeOnTextChange.d.ts
|
|
3049
3111
|
declare const pipeOnTextChange: (editor: SlateEditor, node: Descendant, text: string, prevText: string, operation: TextOperation) => boolean;
|
|
3050
3112
|
//#endregion
|
|
3051
|
-
export { TSlateEditor as $,
|
|
3113
|
+
export { TSlateEditor as $, SlateElement as $a, RenderStaticNodeWrapperProps as $i, cleanHtmlFontElements as $n, NavigationNavigateOptions as $r, upsertInlineFormattingContext as $t, applyDeepToNodes as A, MatchBlockStartOptions as Aa, AnyEditorPlugin as Ai, isHtmlInlineElement as An, pluginRenderElementStatic as Ao, LogLevel as Ar, BaseParagraphPlugin as At, ZustandStoreApi as B, pipeDecorate as Ba, InferConfig as Bi, htmlBrToNewLine as Bn, ElementAffinity as Br, STATIC_VALUE_CREATED_AT as Bt, isSlateNode as C, InsertBreakInputRuleContext as Ca, getPluginKeys as Ci, pipeDeserializeHtmlLeaf as Cn, pipeRenderTextStatic as Co, NodeIdOptions as Cr, NodeComponents as Ct, isSlateText as D, InsertTextInputRuleContext as Da, getEditorPlugin as Di, isOlSymbol as Dn, pluginRenderLeafStatic as Do, normalizeNodeIdWithEditor as Dr, SelectionRules as Dt, isSlateString as E, InsertTextInputRule as Ea, getSlatePlugin as Ei, parseHtmlDocument as En, pipeRenderLeafStatic as Eo, normalizeNodeId as Er, PluginConfig as Et, RenderLeafProps as F, TextSubstitutionInputRuleConfig as Fa, ExtendEditor as Fi, inlineTagNames as Fn, getMarkBoundaryAffinity as Fr, withBreakRules as Ft, WithSlateOptions as G, getRenderNodeStaticProps as Ga, NodeStaticWrapperComponentProps as Gi, someHtmlElement as Gn, NavigationFeedbackPlugin as Gr, createBlockFenceInputRule as Gt, nanoid$1 as H, getSelectedDomNode as Ha, LeafStaticProps as Hi, getHtmlComments as Hn, clearNavigationFeedbackTarget as Hr, LengthPlugin as Ht, RenderElementFn as I, TextSubstitutionMatch as Ia, ExtendEditorApi as Ii, htmlTextNodeToString as In, getEdgeNodes as Ir, OverridePlugin as It, BaseEditor as J, createStaticString as Ja, OverrideEditor as Ji, deserializeHtmlElement as Jn, NavigationFeedbackConfig as Jr, createTextSubstitutionInputRule as Jt, createSlateEditor as K, getNodeDataAttributes as Ka, NodeStaticWrapperComponentReturnType as Ki, deserializeHtmlNodeChildren as Kn, NAVIGATION_FEEDBACK_KEY as Kr, createBlockStartInputRule as Kt, RenderElementProps as L, TextSubstitutionPattern as La, ExtendEditorTransforms as Li, htmlStringToDOMNode as Ln, EdgeNodes as Lr, withOverrides as Lt, RenderTextFn as M, ResolvedInputRule as Ma, Decorate as Mi, isHtmlElement as Mn, AstPlugin as Mo, setAffinitySelection as Mr, withNormalizeRules as Mt, RenderTextProps as N, ResolvedInputRulesMeta as Na, Deserializer as Ni, isHtmlComment as Nn, isNodeAffinity as Nr, withMergeRules as Nt, isSlateVoid as O, MarkInputRuleConfig as Oa, createSlatePlugin as Oi, isHtmlText as On, pipeRenderElementStatic as Oo, DebugErrorType as Or, WithAnyKey as Ot, RenderLeafFn as P, SelectionInputRuleContext as Pa, EditorPlugin as Pi, isHtmlBlockElement as Pn, isNodesAffinity as Pr, withDeleteRules as Pt, SlateEditor as Q, getEditorDOMFromHtmlString as Qa, RenderStaticNodeWrapperFunction as Qi, cleanHtmlLinkElements as Qn, NavigationFlashTargetOptions as Qr, endInlineFormattingContext as Qt, RenderChunkFn as R, stripSlateDataAttributes as Ra, HtmlDeserializer as Ri, htmlElementToLeaf as Rn, AffinityConfig as Rr, withNodeId as Rt, isSlateLeaf as S, InsertBreakInputRule as Sa, getPluginKey as Si, pluginDeserializeHtml as Sn, SlateRenderText as So, NodeIdConfig as Sr, NodeComponent as St, isSlatePluginNode as T, InsertDataInputRuleContext as Ta, getPluginTypes as Ti, parseHtmlElement as Tn, SlateRenderLeaf as To, NormalizeNodeIdOptions as Tr, ParserOptions as Tt, BaseWithSlateOptions as U, getSelectedDomFragment as Ua, NodeStaticProps as Ui, getDataNodeProps as Un, flashTarget as Ur, defineInputRule as Ut, createZustandStore$1 as V, isSelectOutside as Va, InjectNodeProps as Vi, htmlBodyToFragment as Vn, navigate as Vr, normalizeStaticValue as Vt, CreateSlateEditorOptions as W, getSelectedDomBlocks as Wa, NodeStaticWrapperComponent as Wi, findHtmlElement as Wn, resolveNavigationFeedbackTarget as Wr, createRuleFactory as Wt, KeyofNodePlugins as X, ViewPlugin as Xa, PartialEditorPlugin as Xi, copyBlockMarksToSpanChild as Xn, NavigationFeedbackStoredTarget as Xr, matchBlockStart as Xt, InferPlugins as Y, getStaticPlugins as Ya, Parser as Yi, deserializeHtml as Yn, NavigationFeedbackPluginKey as Yr, matchBlockFence as Yt, KeyofPlugins as Z, createStaticEditor as Za, RenderStaticNodeWrapper as Zi, cleanHtmlTextNodes as Zn, NavigationFeedbackTarget as Zr, matchDelimitedInline as Zt, getInjectMatch as _, InputRuleBuilder as _a, ParserPlugin as _i, replaceTagName as _n, serializeHtml as _o, GetCorePluginsOptions as _r, InferOptions as _t, omitPluginContext as a, SlatePlugins as aa, liftBlock as ai, collapseWhiteSpaceChildren as an, SlateText as ao, CARRIAGE_RETURN as ar, BasePluginContext as at, isSlateEditor as b, InputRulesDefinition as ba, getContainerTypes as bi, preCleanHtml as bn, PlateStatic as bo, ChunkingConfig as br, MatchRules as bt, isType as c, TransformInitialValue as ca, InitOptions as ci, CollapseWhiteSpaceState as cn, StyledSlateLeafProps as co, SPACE as cr, BaseTransformOptions as ct, isHotkey as d, BaseInputRule as da, AutoScrollOperationsMap as di, WhiteSpaceRule as dn, BoxStaticProps as do, HtmlPlugin as dr, EditOnlyConfig as dt, Serializer as ea, SlateExtensionConfig as ei, isLastNonEmptyTextOfInlineFormattingContext as en, SlateElementProps as eo, cleanHtmlEmptyElements as er, AnyPluginConfig as et, getSlateClass as f, BlockFenceInputRuleConfig as fa, DOMPlugin as fi, unwrapHtmlElement as fn, SlateRenderElementProps as fo, withChunking as fr, ExtendConfig as ft, getInjectedPlugins as g, DelimitedInlineInputRuleMatch as ga, withScrolling as gi, traverseHtmlComments as gn, SerializeHtmlOptions as go, DebugConfig as gr, InferKey as gt, keyToDataAttribute as h, BlockStartInputRuleMatch as ha, WithAutoScrollOptions as hi, traverseHtmlElements as hn, SlateRenderTextProps as ho, CorePluginTransforms as hr, InferApi as ht, overridePluginsByKey as i, SlatePluginMethods as ia, LiftBlockOptions as ii, collapseWhiteSpaceElement as in, SlateNodeProps as io, DeserializeHtmlNodeReturnType as ir, BasePlugin as it, EditableProps as j, MatchDelimitedInlineOptions as ja, AnySlatePlugin as ji, isHtmlFragmentHref as jn, HandlerReturnType as jo, PlateError as jr, ParagraphConfig as jt, ApplyDeepToNodesOptions as k, MatchBlockFenceOptions as ka, createTSlatePlugin as ki, isHtmlTable as kn, SlateRenderElement as ko, DebugPlugin as kr, WithRequiredKey as kt, Hotkeys as l, TransformOptions as la, init as li, TrimEndRule as ln, StyledSlateTextProps as lo, TAB as lr, BreakRules as lt, getNodeDataAttributeKeys as m, BlockStartInputRuleConfig as ma, ScrollMode as mi, traverseHtmlNode as mn, SlateRenderNodeProps as mo, CorePluginApi as mr, GetInjectNodePropsReturnType as mt, pipeOnNodeChange as n, SlatePluginConfig$1 as na, setValue as ni, collapseWhiteSpaceText as nn, SlateLeaf as no, cleanHtmlBrElements as nr, BaseHtmlDeserializer as nt, normalizeDescendantsToDocumentFragment as o, SlateShortcut as oa, InsertExitBreakOptions as oi, collapseWhiteSpace as on, SlateTextProps as oo, LINE_FEED as or, BasePluginNode as ot, getPluginNodeProps as p, BlockFenceInputRuleMatch as pa, DomConfig as pi, traverseHtmlTexts as pn, SlateRenderLeafProps as po, CorePlugin as pr, GetInjectNodePropsOptions as pt, withSlate as q, getPluginDataAttributes as qa, NormalizeInitialValue as qi, deserializeHtmlNode as qn, NavigationFeedbackActiveTarget as qr, createMarkInputRule as qt, pipeInsertDataQuery as r, SlatePluginContext as ra, resetBlock as ri, collapseWhiteSpaceNode as rn, SlateLeafProps as ro, DeserializeHtmlChildren as rr, BaseInjectProps as rt, mergeDeepToNodes as s, TextStaticProps as sa, insertExitBreak as si, collapseString as sn, StyledSlateElementProps as so, NO_BREAK_SPACE as sr, BaseSerializer as st, pipeOnTextChange as t, SlatePlugin as ta, SlateExtensionPlugin as ti, inferWhiteSpaceRule as tn, SlateHTMLProps as to, cleanHtmlCrLf as tr, BaseDeserializer as tt, createHotkey as u, AnyInputRule as ua, AUTO_SCROLL as ui, TrimStartRule as un, useNodeAttributes as uo, ZERO_WIDTH_SPACE as ur, DeleteRules as ut, defaultsDeepToNodes as v, InputRuleTarget as va, HistoryPlugin as vi, removeHtmlSurroundings as vn, ElementStatic as vo, LengthConfig as vr, InferSelectors as vt, isSlatePluginElement as w, InsertDataInputRule as wa, getPluginType as wi, pipeDeserializeHtmlElement as wn, pluginRenderTextStatic as wo, NodeIdPlugin as wr, NormalizeRules as wt, isSlateElement as x, InputRulesFactoryContext as xa, getPluginByType as xi, postCleanHtml as xn, PlateStaticProps as xo, ChunkingPlugin as xr, MergeRules as xt, getSlateElements as y, InputRulesConfig as ya, withPlateHistory as yi, removeHtmlNodesBetweenComments as yn, LeafStatic as yo, getCorePlugins as yr, InferTransforms as yt, RenderChunkProps as z, stripHtmlClassNames as za, HtmlSerializer as zi, htmlElementToElement as zn, AffinityPlugin as zr, NormalizeStaticValueOptions as zt };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as TSlateEditor, $i as
|
|
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 };
|
|
1
|
+
import { $ as TSlateEditor, $i as RenderStaticNodeWrapperProps, $n as cleanHtmlFontElements, $r as NavigationNavigateOptions, $t as upsertInlineFormattingContext, A as applyDeepToNodes, Aa as MatchBlockStartOptions, Ai as AnyEditorPlugin, An as isHtmlInlineElement, Ar as LogLevel, At as BaseParagraphPlugin, B as ZustandStoreApi, Bi as InferConfig, Bn as htmlBrToNewLine, Br as ElementAffinity, Bt as STATIC_VALUE_CREATED_AT, C as isSlateNode, Ca as InsertBreakInputRuleContext, Ci as getPluginKeys, Cn as pipeDeserializeHtmlLeaf, Cr as NodeIdOptions, Ct as NodeComponents, D as isSlateText, Da as InsertTextInputRuleContext, Di as getEditorPlugin, Dn as isOlSymbol, Dr as normalizeNodeIdWithEditor, Dt as SelectionRules, E as isSlateString, Ea as InsertTextInputRule, Ei as getSlatePlugin, En as parseHtmlDocument, Er as normalizeNodeId, Et as PluginConfig, F as RenderLeafProps, Fa as TextSubstitutionInputRuleConfig, Fi as ExtendEditor, Fn as inlineTagNames, Fr as getMarkBoundaryAffinity, Ft as withBreakRules, G as WithSlateOptions, Gi as NodeStaticWrapperComponentProps, Gn as someHtmlElement, Gr as NavigationFeedbackPlugin, Gt as createBlockFenceInputRule, H as nanoid, Hi as LeafStaticProps, Hn as getHtmlComments, Hr as clearNavigationFeedbackTarget, Ht as LengthPlugin, I as RenderElementFn, Ia as TextSubstitutionMatch, Ii as ExtendEditorApi, In as htmlTextNodeToString, Ir as getEdgeNodes, It as OverridePlugin, J as BaseEditor, Ji as OverrideEditor, Jn as deserializeHtmlElement, Jr as NavigationFeedbackConfig, Jt as createTextSubstitutionInputRule, K as createSlateEditor, Ki as NodeStaticWrapperComponentReturnType, Kn as deserializeHtmlNodeChildren, Kr as NAVIGATION_FEEDBACK_KEY, Kt as createBlockStartInputRule, L as RenderElementProps, La as TextSubstitutionPattern, Li as ExtendEditorTransforms, Ln as htmlStringToDOMNode, Lr as EdgeNodes, Lt as withOverrides, M as RenderTextFn, Ma as ResolvedInputRule, Mi as Decorate, Mn as isHtmlElement, Mo as AstPlugin, Mr as setAffinitySelection, Mt as withNormalizeRules, N as RenderTextProps, Na as ResolvedInputRulesMeta, Ni as Deserializer, Nn as isHtmlComment, Nr as isNodeAffinity, Nt as withMergeRules, O as isSlateVoid, Oa as MarkInputRuleConfig, Oi as createSlatePlugin, On as isHtmlText, Or as DebugErrorType, Ot as WithAnyKey, P as RenderLeafFn, Pa as SelectionInputRuleContext, Pi as EditorPlugin, Pn as isHtmlBlockElement, Pr as isNodesAffinity, Pt as withDeleteRules, Q as SlateEditor, Qi as RenderStaticNodeWrapperFunction, Qn as cleanHtmlLinkElements, Qr as NavigationFlashTargetOptions, Qt as endInlineFormattingContext, R as RenderChunkFn, Ri as HtmlDeserializer, Rn as htmlElementToLeaf, Rr as AffinityConfig, Rt as withNodeId, S as isSlateLeaf, Sa as InsertBreakInputRule, Si as getPluginKey, Sn as pluginDeserializeHtml, Sr as NodeIdConfig, St as NodeComponent, T as isSlatePluginNode, Ta as InsertDataInputRuleContext, Ti as getPluginTypes, Tn as parseHtmlElement, Tr as NormalizeNodeIdOptions, Tt as ParserOptions, U as BaseWithSlateOptions, Ui as NodeStaticProps, Un as getDataNodeProps, Ur as flashTarget, Ut as defineInputRule, V as createZustandStore, Vi as InjectNodeProps, Vn as htmlBodyToFragment, Vr as navigate, Vt as normalizeStaticValue, W as CreateSlateEditorOptions, Wi as NodeStaticWrapperComponent, Wn as findHtmlElement, Wr as resolveNavigationFeedbackTarget, Wt as createRuleFactory, X as KeyofNodePlugins, Xi as PartialEditorPlugin, Xn as copyBlockMarksToSpanChild, Xr as NavigationFeedbackStoredTarget, Xt as matchBlockStart, Y as InferPlugins, Yi as Parser, Yn as deserializeHtml, Yr as NavigationFeedbackPluginKey, Yt as matchBlockFence, Z as KeyofPlugins, Zi as RenderStaticNodeWrapper, Zn as cleanHtmlTextNodes, Zr as NavigationFeedbackTarget, Zt as matchDelimitedInline, _ as getInjectMatch, _a as InputRuleBuilder, _i as ParserPlugin, _n as replaceTagName, _r as GetCorePluginsOptions, _t as InferOptions, a as omitPluginContext, aa as SlatePlugins, ai as liftBlock, an as collapseWhiteSpaceChildren, ar as CARRIAGE_RETURN, at as BasePluginContext, b as isSlateEditor, ba as InputRulesDefinition, bi as getContainerTypes, bn as preCleanHtml, br as ChunkingConfig, bt as MatchRules, c as isType, ca as TransformInitialValue, ci as InitOptions, cn as CollapseWhiteSpaceState, cr as SPACE, ct as BaseTransformOptions, d as isHotkey, da as BaseInputRule, di as AutoScrollOperationsMap, dn as WhiteSpaceRule, dr as HtmlPlugin, dt as EditOnlyConfig, ea as Serializer, ei as SlateExtensionConfig, en as isLastNonEmptyTextOfInlineFormattingContext, er as cleanHtmlEmptyElements, et as AnyPluginConfig, f as getSlateClass, fa as BlockFenceInputRuleConfig, fi as DOMPlugin, fn as unwrapHtmlElement, fr as withChunking, ft as ExtendConfig, g as getInjectedPlugins, ga as DelimitedInlineInputRuleMatch, gi as withScrolling, gn as traverseHtmlComments, gr as DebugConfig, gt as InferKey, h as keyToDataAttribute, ha as BlockStartInputRuleMatch, hi as WithAutoScrollOptions, hn as traverseHtmlElements, hr as CorePluginTransforms, ht as InferApi, i as overridePluginsByKey, ia as SlatePluginMethods, ii as LiftBlockOptions, in as collapseWhiteSpaceElement, ir as DeserializeHtmlNodeReturnType, it as BasePlugin, j as EditableProps, ja as MatchDelimitedInlineOptions, ji as AnySlatePlugin, jn as isHtmlFragmentHref, jo as HandlerReturnType, jr as PlateError, jt as ParagraphConfig, k as ApplyDeepToNodesOptions, ka as MatchBlockFenceOptions, ki as createTSlatePlugin, kn as isHtmlTable, kr as DebugPlugin, kt as WithRequiredKey, l as Hotkeys, la as TransformOptions, li as init, ln as TrimEndRule, lr as TAB, lt as BreakRules, m as getNodeDataAttributeKeys, ma as BlockStartInputRuleConfig, mi as ScrollMode, mn as traverseHtmlNode, mr as CorePluginApi, mt as GetInjectNodePropsReturnType, n as pipeOnNodeChange, na as SlatePluginConfig, ni as setValue, nn as collapseWhiteSpaceText, nr as cleanHtmlBrElements, nt as BaseHtmlDeserializer, o as normalizeDescendantsToDocumentFragment, oa as SlateShortcut, oi as InsertExitBreakOptions, on as collapseWhiteSpace, or as LINE_FEED, ot as BasePluginNode, p as getPluginNodeProps, pa as BlockFenceInputRuleMatch, pi as DomConfig, pn as traverseHtmlTexts, pr as CorePlugin, pt as GetInjectNodePropsOptions, q as withSlate, qi as NormalizeInitialValue, qn as deserializeHtmlNode, qr as NavigationFeedbackActiveTarget, qt as createMarkInputRule, r as pipeInsertDataQuery, ra as SlatePluginContext, ri as resetBlock, rn as collapseWhiteSpaceNode, rr as DeserializeHtmlChildren, rt as BaseInjectProps, s as mergeDeepToNodes, sa as TextStaticProps, si as insertExitBreak, sn as collapseString, sr as NO_BREAK_SPACE, st as BaseSerializer, t as pipeOnTextChange, ta as SlatePlugin, ti as SlateExtensionPlugin, tn as inferWhiteSpaceRule, tr as cleanHtmlCrLf, tt as BaseDeserializer, u as createHotkey, ua as AnyInputRule, ui as AUTO_SCROLL, un as TrimStartRule, ur as ZERO_WIDTH_SPACE, ut as DeleteRules, v as defaultsDeepToNodes, va as InputRuleTarget, vi as HistoryPlugin, vn as removeHtmlSurroundings, vr as LengthConfig, vt as InferSelectors, w as isSlatePluginElement, wa as InsertDataInputRule, wi as getPluginType, wn as pipeDeserializeHtmlElement, wr as NodeIdPlugin, wt as NormalizeRules, x as isSlateElement, xa as InputRulesFactoryContext, xi as getPluginByType, xn as postCleanHtml, xr as ChunkingPlugin, xt as MergeRules, y as getSlateElements, ya as InputRulesConfig, yi as withPlateHistory, yn as removeHtmlNodesBetweenComments, yr as getCorePlugins, yt as InferTransforms, z as RenderChunkProps, zi as HtmlSerializer, zn as htmlElementToElement, zr as AffinityPlugin, zt as NormalizeStaticValueOptions } from "./index-BDSzA1zP";
|
|
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, TransformInitialValue, 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, normalizeNodeIdWithEditor, 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,11 +1,21 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as collapseString, $t as defineInputRule, A as deserializeHtml, At as isSlatePluginElement, B as getDataNodeProps, Bt as withDeleteRules, C as flashTarget, Ct as getInjectedPlugins, D as LengthPlugin, Dt as isSlateElement, E as NavigationFeedbackPluginKey, Et as isSlateEditor, F as htmlElementToLeaf, Ft as applyDeepToNodes, G as collapseWhiteSpaceElement, Gt as AstPlugin, H as htmlBodyToFragment, Ht as BaseParagraphPlugin, I as pipeDeserializeHtmlLeaf, It as OverridePlugin, J as collapseWhiteSpaceNode, Jt as createMarkInputRule, K as inferWhiteSpaceRule, Kt as createBlockFenceInputRule, L as htmlElementToElement, Lt as withOverrides, M as deserializeHtmlElement, Mt as isSlateString, N as deserializeHtmlNode, Nt as isSlateText, O as HtmlPlugin, Ot as isSlateLeaf, P as htmlTextNodeToString, Pt as isSlateVoid, Q as isLastNonEmptyTextOfInlineFormattingContext, Qt as matchDelimitedInline, R as pipeDeserializeHtmlElement, Rt as withNormalizeRules, S as clearNavigationFeedbackTarget, St as keyToDataAttribute, T as NAVIGATION_FEEDBACK_KEY, Tt as getSlateElements, U as deserializeHtmlNodeChildren, Ut as HistoryPlugin, V as htmlBrToNewLine, Vt as withBreakRules, W as collapseWhiteSpace, Wt as withPlateHistory, X as endInlineFormattingContext, Xt as matchBlockFence, Y as collapseWhiteSpaceText, Yt as createTextSubstitutionInputRule, Z as upsertInlineFormattingContext, Zt as matchBlockStart, _ as normalizeNodeId, _t as getEdgeNodes, a as pipeInsertDataQuery, an as getPluginTypes, at as AUTO_SCROLL, b as NavigationFeedbackPlugin, bt as getPluginNodeProps, c as setValue, cn as createSlatePlugin, ct as DebugPlugin, d as insertExitBreak, dt as withChunking, en as getContainerTypes, et as isHtmlBlockElement, f as init, ft as AffinityPlugin, g as NodeIdPlugin, gt as getMarkBoundaryAffinity, h as pipeOnNodeChange, ht as isNodesAffinity, i as ParserPlugin, in as getPluginType, it as isHtmlElement, j as htmlStringToDOMNode, jt as isSlatePluginNode, k as parseHtmlDocument, kt as isSlateNode, l as resetBlock, ln as createTSlatePlugin, lt as PlateError, m as pipeOnTextChange, mt as isNodeAffinity, n as withSlate, nn as getPluginKey, nt as inlineTagNames, o as normalizeDescendantsToDocumentFragment, on as getSlatePlugin, ot as DOMPlugin, pt as setAffinitySelection, q as collapseWhiteSpaceChildren, qt as createBlockStartInputRule, r as getCorePlugins, rn as getPluginKeys, rt as isHtmlText, s as SlateExtensionPlugin, sn as getEditorPlugin, st as withScrolling, t as createSlateEditor, tn as getPluginByType, tt as isHtmlInlineElement, u as liftBlock, ut as ChunkingPlugin, v as normalizeNodeIdWithEditor, vt as mergeDeepToNodes, w as resolveNavigationFeedbackTarget, wt as getInjectMatch, x as navigate, xt as getNodeDataAttributeKeys, y as withNodeId, yt as getSlateClass, z as pluginDeserializeHtml, zt as withMergeRules } from "./withSlate-NVP0S9vL.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";
|
|
5
|
+
import defaults from "lodash/defaults.js";
|
|
5
6
|
import castArray from "lodash/castArray.js";
|
|
6
|
-
import cloneDeep from "lodash/cloneDeep.js";
|
|
7
7
|
import defaultsDeep from "lodash/defaultsDeep.js";
|
|
8
8
|
|
|
9
|
+
//#region src/lib/utils/defaultsDeepToNodes.ts
|
|
10
|
+
/** Recursively merge a source object to children nodes with a query. */
|
|
11
|
+
const defaultsDeepToNodes = (options) => {
|
|
12
|
+
applyDeepToNodes({
|
|
13
|
+
...options,
|
|
14
|
+
apply: defaults
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
9
19
|
//#region src/lib/utils/isType.ts
|
|
10
20
|
/** Does the node match the type provided. */
|
|
11
21
|
const isType = (editor, node, key) => {
|
|
@@ -481,7 +491,7 @@ const replaceStaticMetadata = (value, createdAt) => {
|
|
|
481
491
|
};
|
|
482
492
|
const normalizeStaticValue = (value, options = {}) => {
|
|
483
493
|
const { createdAt = STATIC_VALUE_CREATED_AT, idCreator = createStaticIdFactory(), ...normalizeNodeIdOptions } = options;
|
|
484
|
-
return replaceStaticMetadata(normalizeNodeId(
|
|
494
|
+
return replaceStaticMetadata(normalizeNodeId(value, {
|
|
485
495
|
...normalizeNodeIdOptions,
|
|
486
496
|
idCreator
|
|
487
497
|
}), createdAt);
|
|
@@ -515,4 +525,4 @@ const overridePluginsByKey = (plugin, overrideByKey = {}, nested = false) => {
|
|
|
515
525
|
};
|
|
516
526
|
|
|
517
527
|
//#endregion
|
|
518
|
-
export { AUTO_SCROLL, AffinityPlugin, AstPlugin, BaseParagraphPlugin, CARRIAGE_RETURN, ChunkingPlugin, DOMPlugin, DebugPlugin, HistoryPlugin, Hotkeys, HtmlPlugin, LINE_FEED, LengthPlugin, NAVIGATION_FEEDBACK_KEY, NO_BREAK_SPACE, NavigationFeedbackPlugin, NavigationFeedbackPluginKey, NodeIdPlugin, OverridePlugin, ParserPlugin, PlateError, SPACE, STATIC_VALUE_CREATED_AT, SlateExtensionPlugin, TAB, ZERO_WIDTH_SPACE, 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 };
|
|
528
|
+
export { AUTO_SCROLL, AffinityPlugin, AstPlugin, BaseParagraphPlugin, CARRIAGE_RETURN, ChunkingPlugin, DOMPlugin, DebugPlugin, HistoryPlugin, Hotkeys, HtmlPlugin, LINE_FEED, LengthPlugin, NAVIGATION_FEEDBACK_KEY, NO_BREAK_SPACE, NavigationFeedbackPlugin, NavigationFeedbackPluginKey, NodeIdPlugin, OverridePlugin, ParserPlugin, PlateError, SPACE, STATIC_VALUE_CREATED_AT, SlateExtensionPlugin, TAB, ZERO_WIDTH_SPACE, 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, normalizeNodeIdWithEditor, 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 };
|