@lofcz/platejs-suggestion 52.0.11
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/LICENSE +24 -0
- package/README.md +5 -0
- package/dist/index.d.ts +218 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/react/index.d.ts +6 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +10 -0
- package/dist/react/index.js.map +1 -0
- package/dist/src-COX5sId2.js +914 -0
- package/dist/src-COX5sId2.js.map +1 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Ziad Beyens, Dylan Schiemann, Joe Anderson, Felix Feng
|
|
4
|
+
|
|
5
|
+
Unless otherwise specified in a LICENSE file within an individual package directory,
|
|
6
|
+
this license applies to all files in this repository outside of those package directories.
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in
|
|
16
|
+
all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
+
THE SOFTWARE.
|
package/README.md
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { Descendant, EditorNodesOptions, KEYS, Node, NodeEntry, OverrideEditor, PluginConfig, SetNodesOptions, SlateEditor, TElement, TInlineSuggestionData, TLocation, TNode, TRange, TSuggestionElement, TSuggestionText, TText, Text, UnknownObject, ValueOf } from "platejs";
|
|
2
|
+
import { ComputeDiffOptions } from "@platejs/diff";
|
|
3
|
+
|
|
4
|
+
//#region src/lib/BaseSuggestionPlugin.d.ts
|
|
5
|
+
type BaseSuggestionConfig = PluginConfig<'suggestion', {
|
|
6
|
+
currentUserId: string | null;
|
|
7
|
+
isSuggesting: boolean;
|
|
8
|
+
}, {
|
|
9
|
+
suggestion: {
|
|
10
|
+
dataList: (node: TSuggestionText) => TInlineSuggestionData[];
|
|
11
|
+
isBlockSuggestion: (node: TNode) => node is TSuggestionElement;
|
|
12
|
+
node: (options?: EditorNodesOptions & {
|
|
13
|
+
id?: string;
|
|
14
|
+
isText?: boolean;
|
|
15
|
+
}) => NodeEntry<TSuggestionElement | TSuggestionText> | undefined;
|
|
16
|
+
nodeId: (node: TElement | TSuggestionText) => string | undefined;
|
|
17
|
+
nodes: (options?: EditorNodesOptions & {
|
|
18
|
+
transient?: boolean;
|
|
19
|
+
}) => NodeEntry<TElement | TSuggestionText>[];
|
|
20
|
+
suggestionData: (node: TElement | TSuggestionText) => TInlineSuggestionData | TSuggestionElement['suggestion'] | undefined;
|
|
21
|
+
withoutSuggestions: (fn: () => void) => void;
|
|
22
|
+
};
|
|
23
|
+
}>;
|
|
24
|
+
declare const BaseSuggestionPlugin: any;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/lib/diffToSuggestions.d.ts
|
|
27
|
+
declare function diffToSuggestions<E extends SlateEditor>(editor: E, doc0: Descendant[], doc1: Descendant[], {
|
|
28
|
+
getDeleteProps,
|
|
29
|
+
getInsertProps,
|
|
30
|
+
getUpdateProps,
|
|
31
|
+
isInline,
|
|
32
|
+
...options
|
|
33
|
+
}?: Partial<ComputeDiffOptions>): ValueOf<E>;
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/lib/types.d.ts
|
|
36
|
+
type SuggestionEditorProps = {
|
|
37
|
+
activeSuggestionId?: string | null;
|
|
38
|
+
isSuggesting?: boolean;
|
|
39
|
+
};
|
|
40
|
+
type SuggestionUser = UnknownObject & {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
avatarUrl?: string;
|
|
44
|
+
};
|
|
45
|
+
type TResolvedSuggestion = {
|
|
46
|
+
createdAt: Date;
|
|
47
|
+
keyId: string;
|
|
48
|
+
suggestionId: string;
|
|
49
|
+
type: 'insert' | 'remove' | 'replace' | 'update';
|
|
50
|
+
userId: string;
|
|
51
|
+
newProperties?: any;
|
|
52
|
+
newText?: string;
|
|
53
|
+
properties?: any;
|
|
54
|
+
text?: string;
|
|
55
|
+
};
|
|
56
|
+
interface TSuggestion extends UnknownObject {
|
|
57
|
+
id: string;
|
|
58
|
+
isAccepted?: boolean;
|
|
59
|
+
isRejected?: boolean;
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/lib/withSuggestion.d.ts
|
|
63
|
+
declare const withSuggestion: OverrideEditor<BaseSuggestionConfig>;
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/lib/queries/findSuggestionNode.d.ts
|
|
66
|
+
declare const findInlineSuggestionNode: <E extends SlateEditor>(editor: E, options?: EditorNodesOptions<ValueOf<E>>) => any;
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/lib/queries/findSuggestionProps.d.ts
|
|
69
|
+
declare const findSuggestionProps: (editor: SlateEditor, {
|
|
70
|
+
at,
|
|
71
|
+
type
|
|
72
|
+
}: {
|
|
73
|
+
at: TLocation;
|
|
74
|
+
type: "insert" | "remove" | "update";
|
|
75
|
+
}) => {
|
|
76
|
+
id: string;
|
|
77
|
+
createdAt: number;
|
|
78
|
+
};
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/lib/transforms/acceptSuggestion.d.ts
|
|
81
|
+
declare const acceptSuggestion: (editor: SlateEditor, description: TResolvedSuggestion) => void;
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/lib/transforms/addMarkSuggestion.d.ts
|
|
84
|
+
declare const addMarkSuggestion: (editor: SlateEditor, key: string, value: any) => void;
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/lib/transforms/deleteFragmentSuggestion.d.ts
|
|
87
|
+
declare const deleteFragmentSuggestion: (editor: SlateEditor, {
|
|
88
|
+
reverse
|
|
89
|
+
}?: {
|
|
90
|
+
reverse?: boolean;
|
|
91
|
+
}) => string | undefined;
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/lib/transforms/deleteSuggestion.d.ts
|
|
94
|
+
/**
|
|
95
|
+
* Suggest deletion one character at a time until target point is reached.
|
|
96
|
+
* Suggest additions are safely deleted.
|
|
97
|
+
*/
|
|
98
|
+
declare const deleteSuggestion: (editor: SlateEditor, at: TRange, {
|
|
99
|
+
reverse
|
|
100
|
+
}?: {
|
|
101
|
+
reverse?: boolean;
|
|
102
|
+
}) => string | undefined;
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/lib/transforms/getSuggestionProps.d.ts
|
|
105
|
+
declare const getSuggestionProps: (editor: SlateEditor, node: Descendant, {
|
|
106
|
+
id,
|
|
107
|
+
createdAt,
|
|
108
|
+
suggestionDeletion,
|
|
109
|
+
suggestionUpdate,
|
|
110
|
+
transient
|
|
111
|
+
}?: {
|
|
112
|
+
id?: string;
|
|
113
|
+
createdAt?: number;
|
|
114
|
+
suggestionDeletion?: boolean;
|
|
115
|
+
suggestionUpdate?: any;
|
|
116
|
+
transient?: boolean;
|
|
117
|
+
}) => {
|
|
118
|
+
[x: string]: {
|
|
119
|
+
id: string;
|
|
120
|
+
createdAt: number;
|
|
121
|
+
type: string;
|
|
122
|
+
userId: any;
|
|
123
|
+
};
|
|
124
|
+
[KEYS.suggestion]: boolean;
|
|
125
|
+
} | {
|
|
126
|
+
[KEYS.suggestion]: {
|
|
127
|
+
id: string;
|
|
128
|
+
createdAt: number;
|
|
129
|
+
type: string;
|
|
130
|
+
userId: any;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/lib/transforms/insertFragmentSuggestion.d.ts
|
|
135
|
+
declare const insertFragmentSuggestion: (editor: SlateEditor, fragment: Descendant[], {
|
|
136
|
+
insertFragment
|
|
137
|
+
}?: {
|
|
138
|
+
insertFragment?: (fragment: Descendant[]) => void;
|
|
139
|
+
}) => void;
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/lib/transforms/insertTextSuggestion.d.ts
|
|
142
|
+
declare const insertTextSuggestion: (editor: SlateEditor, text: string) => void;
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region src/lib/transforms/rejectSuggestion.d.ts
|
|
145
|
+
declare const rejectSuggestion: (editor: SlateEditor, description: TResolvedSuggestion) => void;
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/lib/transforms/removeMarkSuggestion.d.ts
|
|
148
|
+
declare const removeMarkSuggestion: (editor: SlateEditor, key: string) => void;
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region src/lib/transforms/removeNodesSuggestion.d.ts
|
|
151
|
+
declare const removeNodesSuggestion: (editor: SlateEditor, nodes: NodeEntry<TElement | Text>[]) => void;
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/lib/transforms/setSuggestionNodes.d.ts
|
|
154
|
+
declare const setSuggestionNodes: (editor: SlateEditor, options?: {
|
|
155
|
+
createdAt?: number;
|
|
156
|
+
suggestionDeletion?: boolean;
|
|
157
|
+
suggestionId?: string;
|
|
158
|
+
} & SetNodesOptions) => void;
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region src/lib/utils/SkipSuggestionDeletes.d.ts
|
|
161
|
+
/**
|
|
162
|
+
* Recursively extracts text content from a node tree, excluding any text marked
|
|
163
|
+
* with "remove" suggestions. but include the text marked with "insert" and
|
|
164
|
+
* "update" suggestions.
|
|
165
|
+
*/
|
|
166
|
+
declare const SkipSuggestionDeletes: (editor: SlateEditor, node: Node) => string;
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/lib/utils/getActiveSuggestionDescriptions.d.ts
|
|
169
|
+
type TSuggestionCommonDescription = {
|
|
170
|
+
suggestionId: string;
|
|
171
|
+
userId: string;
|
|
172
|
+
};
|
|
173
|
+
type TSuggestionDeletionDescription = {
|
|
174
|
+
deletedText: string;
|
|
175
|
+
type: 'deletion';
|
|
176
|
+
} & TSuggestionCommonDescription;
|
|
177
|
+
type TSuggestionDescription = TSuggestionDeletionDescription | TSuggestionInsertionDescription | TSuggestionReplacementDescription;
|
|
178
|
+
type TSuggestionInsertionDescription = {
|
|
179
|
+
insertedText: string;
|
|
180
|
+
type: 'insertion';
|
|
181
|
+
} & TSuggestionCommonDescription;
|
|
182
|
+
type TSuggestionReplacementDescription = {
|
|
183
|
+
deletedText: string;
|
|
184
|
+
insertedText: string;
|
|
185
|
+
type: 'replacement';
|
|
186
|
+
} & TSuggestionCommonDescription;
|
|
187
|
+
/**
|
|
188
|
+
* Get the suggestion descriptions of the selected node. A node can have
|
|
189
|
+
* multiple suggestions (multiple users). Each description maps to a user
|
|
190
|
+
* suggestion.
|
|
191
|
+
*/
|
|
192
|
+
declare const getActiveSuggestionDescriptions: (editor: SlateEditor) => TSuggestionDescription[];
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region src/lib/utils/getSuggestionId.d.ts
|
|
195
|
+
declare const getSuggestionKeyId: (node: TElement | TText) => string | undefined;
|
|
196
|
+
declare const getInlineSuggestionData: (node: TElement | TText) => any;
|
|
197
|
+
declare const keyId2SuggestionId: (keyId: string) => string;
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region src/lib/utils/getSuggestionKeys.d.ts
|
|
200
|
+
declare const getSuggestionKey: (id?: string) => string;
|
|
201
|
+
declare const isSuggestionKey: (key: string) => boolean;
|
|
202
|
+
declare const getSuggestionKeys: (node: TNode) => string[];
|
|
203
|
+
declare const getSuggestionUserIdByKey: (key?: string | null) => string | null;
|
|
204
|
+
declare const getSuggestionUserIds: (node: TNode) => string[];
|
|
205
|
+
declare const getSuggestionUserId: (node: TNode) => string;
|
|
206
|
+
declare const isCurrentUserSuggestion: (editor: SlateEditor, node: TText) => boolean;
|
|
207
|
+
//#endregion
|
|
208
|
+
//#region src/lib/utils/getSuggestionNodeEntries.d.ts
|
|
209
|
+
declare const getSuggestionNodeEntries: <E extends SlateEditor>(editor: E, suggestionId: string, {
|
|
210
|
+
at,
|
|
211
|
+
...options
|
|
212
|
+
}?: EditorNodesOptions<ValueOf<E>>) => any;
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region src/lib/utils/getTransientSuggestionKey.d.ts
|
|
215
|
+
declare const getTransientSuggestionKey: () => string;
|
|
216
|
+
//#endregion
|
|
217
|
+
export { BaseSuggestionConfig, BaseSuggestionPlugin, SkipSuggestionDeletes, SuggestionEditorProps, SuggestionUser, TResolvedSuggestion, TSuggestion, TSuggestionCommonDescription, TSuggestionDeletionDescription, TSuggestionDescription, TSuggestionInsertionDescription, TSuggestionReplacementDescription, acceptSuggestion, addMarkSuggestion, deleteFragmentSuggestion, deleteSuggestion, diffToSuggestions, findInlineSuggestionNode, findSuggestionProps, getActiveSuggestionDescriptions, getInlineSuggestionData, getSuggestionKey, getSuggestionKeyId, getSuggestionKeys, getSuggestionNodeEntries, getSuggestionProps, getSuggestionUserId, getSuggestionUserIdByKey, getSuggestionUserIds, getTransientSuggestionKey, insertFragmentSuggestion, insertTextSuggestion, isCurrentUserSuggestion, isSuggestionKey, keyId2SuggestionId, rejectSuggestion, removeMarkSuggestion, removeNodesSuggestion, setSuggestionNodes, withSuggestion };
|
|
218
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/lib/BaseSuggestionPlugin.ts","../src/lib/diffToSuggestions.ts","../src/lib/types.ts","../src/lib/withSuggestion.ts","../src/lib/queries/findSuggestionNode.ts","../src/lib/queries/findSuggestionProps.ts","../src/lib/transforms/acceptSuggestion.ts","../src/lib/transforms/addMarkSuggestion.ts","../src/lib/transforms/deleteFragmentSuggestion.ts","../src/lib/transforms/deleteSuggestion.ts","../src/lib/transforms/getSuggestionProps.ts","../src/lib/transforms/insertFragmentSuggestion.ts","../src/lib/transforms/insertTextSuggestion.ts","../src/lib/transforms/rejectSuggestion.ts","../src/lib/transforms/removeMarkSuggestion.ts","../src/lib/transforms/removeNodesSuggestion.ts","../src/lib/transforms/setSuggestionNodes.ts","../src/lib/utils/SkipSuggestionDeletes.ts","../src/lib/utils/getActiveSuggestionDescriptions.ts","../src/lib/utils/getSuggestionId.ts","../src/lib/utils/getSuggestionKeys.ts","../src/lib/utils/getSuggestionNodeEntries.ts","../src/lib/utils/getTransientSuggestionKey.ts"],"sourcesContent":[],"mappings":";;;;KAoBY,oBAAA,GAAuB;;;AAAnC,CAAA,EAAA;EAWuB,UAAA,EAAA;IAAoB,QAAA,EAAA,CAAA,IAAA,EAApB,eAAoB,EAAA,GAAA,qBAAA,EAAA;IACX,iBAAA,EAAA,CAAA,IAAA,EAAA,KAAA,EAAA,GAAA,IAAA,IAAkB,kBAAlB;IAAkB,IAAA,EAAA,CAAA,OAGR,CAHQ,EAEhC,kBAFgC,GAAA;MAEhC,EAAA,CAAA,EAAA,MAAA;MACG,MAAA,CAAA,EAAA,OAAA;IAAqB,CAAA,EAAA,GAA/B,SAA+B,CAArB,kBAAqB,GAAA,eAAA,CAAA,GAAA,SAAA;IAA/B,MAAA,EAAA,CAAA,IAAA,EACU,QADV,GACqB,eADrB,EAAA,GA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GlBoBW;EAAoB,WAAA,EAAA,MAAA;EACX,IAAA,EAAA,UAAA;CAAkB,GkBlB9C,4BlBkB8C;AAEhC,KkBlBN,sBAAA,GACR,8BlBiBc,GkBhBd,+BlBgBc,GkBfd,iClBec;AACG,KkBbT,+BAAA,GlBaS;EAAqB,YAAA,EAAA,MAAA;EAA/B,IAAA,EAAA,WAAA;CACU,GkBXjB,4BlBWiB;AAAW,KkBTpB,iCAAA,GlBSoB;EAEd,WAAA,EAAA,MAAA;EACG,YAAA,EAAA,MAAA;EAAW,IAAA,EAAA,aAAA;CAArB,GkBRP,4BlBQO;;;;;;AAnBoC,ckBkBlC,+BlBlBkC,EAAA,CAAA,MAAA,EkBmBrC,WlBnBqC,EAAA,GkBoB5C,sBlBpB4C,EAAA;;;cmBflC,2BAA4B,WAAW;cAQvC,gCAAiC,WAAW;cAQ5C;;;cCVA;cAGA;cAGA,0BAA2B;ApBG5B,coBOC,wBpBPmB,EAAA,CAAA,GAAA,CAAA,EAAA,MAAA,GAAA,IAAA,EAAA,GAAA,MAAA,GAAA,IAAA;AAWT,coBDV,oBpBCU,EAAA,CAAA,IAAA,EoBDoB,KpBCpB,EAAA,GAAA,MAAA,EAAA;AAAoB,coBE9B,mBpBF8B,EAAA,CAAA,IAAA,EoBED,KpBFC,EAAA,GAAA,MAAA;AACX,coBInB,uBpBJmB,EAAA,CAAA,MAAA,EoBIgB,WpBJhB,EAAA,IAAA,EoBImC,KpBJnC,EAAA,GAAA,OAAA;;;cqBxBnB,qCAAsC,qBACzC;;;IAEiB,mBAAmB,QAAQ;;;cCRzC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { A as SkipSuggestionDeletes, C as getSuggestionUserIdByKey, D as getInlineSuggestionData, E as isSuggestionKey, O as getSuggestionKeyId, S as getSuggestionUserId, T as isCurrentUserSuggestion, _ as getTransientSuggestionKey, a as BaseSuggestionPlugin, b as getSuggestionKey, c as removeMarkSuggestion, d as deleteFragmentSuggestion, f as deleteSuggestion, g as findInlineSuggestionNode, h as findSuggestionProps, i as acceptSuggestion, k as keyId2SuggestionId, l as insertTextSuggestion, m as addMarkSuggestion, n as rejectSuggestion, o as withSuggestion, p as setSuggestionNodes, r as getSuggestionProps, s as removeNodesSuggestion, t as diffToSuggestions, u as insertFragmentSuggestion, v as getActiveSuggestionDescriptions, w as getSuggestionUserIds, x as getSuggestionKeys, y as getSuggestionNodeEntries } from "./src-COX5sId2.js";
|
|
2
|
+
|
|
3
|
+
export { BaseSuggestionPlugin, SkipSuggestionDeletes, acceptSuggestion, addMarkSuggestion, deleteFragmentSuggestion, deleteSuggestion, diffToSuggestions, findInlineSuggestionNode, findSuggestionProps, getActiveSuggestionDescriptions, getInlineSuggestionData, getSuggestionKey, getSuggestionKeyId, getSuggestionKeys, getSuggestionNodeEntries, getSuggestionProps, getSuggestionUserId, getSuggestionUserIdByKey, getSuggestionUserIds, getTransientSuggestionKey, insertFragmentSuggestion, insertTextSuggestion, isCurrentUserSuggestion, isSuggestionKey, keyId2SuggestionId, rejectSuggestion, removeMarkSuggestion, removeNodesSuggestion, setSuggestionNodes, withSuggestion };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/react/SuggestionPlugin.tsx"],"sourcesContent":[],"mappings":";;AAKa,cAAA,gBAAsD,EAAA,GAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { a as BaseSuggestionPlugin } from "../src-COX5sId2.js";
|
|
2
|
+
import { toPlatePlugin } from "platejs/react";
|
|
3
|
+
|
|
4
|
+
//#region src/react/SuggestionPlugin.tsx
|
|
5
|
+
/** @experimental Enables support for suggestions in the editor. */
|
|
6
|
+
const SuggestionPlugin = toPlatePlugin(BaseSuggestionPlugin);
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { SuggestionPlugin };
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["toPlatePlugin","BaseSuggestionPlugin","SuggestionPlugin"],"sources":["../../src/react/SuggestionPlugin.tsx"],"sourcesContent":["import { toPlatePlugin } from 'platejs/react';\n\nimport { BaseSuggestionPlugin } from '../lib/BaseSuggestionPlugin';\n\n/** @experimental Enables support for suggestions in the editor. */\nexport const SuggestionPlugin = toPlatePlugin(BaseSuggestionPlugin);\n"],"mappings":";;;;;AAKA,MAAaE,mBAAmBF,cAAcC,qBAAqB"}
|