@lofcz/platejs-markdown 52.3.5 → 52.3.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.d.ts CHANGED
@@ -1,109 +1,15 @@
1
- import { Descendant as Descendant$1, NodeKey, Nullable, OmitFirst, PluginConfig, SlateEditor, TElement, TListElement, TNodeMap, TText, Value } from "platejs";
1
+ import * as platejs2 from "platejs";
2
+ import { Descendant, NodeKey, Nullable, OmitFirst, PluginConfig, SlateEditor, TElement, TListElement, TNodeMap, TText, Value } from "platejs";
2
3
  import { MdxJsxFlowElement, MdxJsxFlowElement as MdMdxJsxFlowElement, MdxJsxTextElement, MdxJsxTextElement as MdMdxJsxTextElement } from "mdast-util-mdx";
3
4
  import { Options } from "remark-stringify";
4
5
  import { Plugin } from "unified";
5
6
  import { Token } from "marked";
6
7
  import baseRemarkMdx from "remark-mdx";
7
- import * as unistLib from "unist";
8
- import { StrictExtract } from "ts-essentials";
9
8
  import { Blockquote as MdBlockquote, Break as MdBreak, Code as MdCode, Content as MdContent, Definition as MdDefinition, Delete as MdDelete, Emphasis as MdEmphasis, FootnoteDefinition as MdFootnoteDefinition, FootnoteReference as MdFootnoteReference, Heading as MdHeading, Html as MdHtml, Image as MdImage, ImageReference as MdImageReference, InlineCode as MdInlineCode, Link as MdLink, LinkReference as MdLinkReference, List as MdList, ListItem as MdListItem, Paragraph as MdParagraph, PhrasingContent as MDPhrasingContent, Root, Root as MdRoot, RootContent as MdRootContent, Strong as MdStrong, Table as MdTable, TableCell as MdTableCell, TableRow as MdTableRow, Text as MdText, ThematicBreak as MdThematicBreak, Yaml as MdYaml } from "mdast";
10
9
  import { InlineMath as MdInlineMath, Math as MdMath } from "mdast-util-math";
10
+ import * as unistLib from "unist";
11
+ import { StrictExtract } from "ts-essentials";
11
12
 
12
- //#region src/lib/deserializer/utils/customMdxDeserialize.d.ts
13
- declare const customMdxDeserialize: (mdastNode: MdxJsxFlowElement | MdxJsxTextElement, deco: MdDecoration, options: DeserializeMdOptions) => any;
14
- //#endregion
15
- //#region src/lib/deserializer/utils/deserializeInlineMd.d.ts
16
- declare const deserializeInlineMd: (editor: SlateEditor, text: string, options?: DeserializeMdOptions) => Descendant[];
17
- //#endregion
18
- //#region src/lib/deserializer/utils/getDeserializerByKey.d.ts
19
- declare const getDeserializerByKey: (key: string, options: DeserializeMdOptions) => any;
20
- //#endregion
21
- //#region src/lib/deserializer/utils/getMergedOptionsDeserialize.d.ts
22
- /**
23
- * Merges Markdown configurations, following the principle that options take
24
- * precedence
25
- *
26
- * @param editor Editor instance used to get plugin default configurations
27
- * @param options User-provided options (higher priority)
28
- * @returns The final merged configuration
29
- */
30
- declare const getMergedOptionsDeserialize: (editor: SlateEditor, options?: DeserializeMdOptions) => DeserializeMdOptions;
31
- //#endregion
32
- //#region src/lib/deserializer/utils/getStyleValue.d.ts
33
- declare const getStyleValue: (mdastNode: MdMdxJsxTextElement, styleName: string) => string | undefined;
34
- //#endregion
35
- //#region src/lib/deserializer/utils/htmlToJsx.d.ts
36
- declare const htmlToJsx: (html: string) => string;
37
- //#endregion
38
- //#region src/lib/deserializer/utils/markdownToSlateNodesSafely.d.ts
39
- declare const markdownToSlateNodesSafely: (editor: SlateEditor, data: string, options?: Omit<DeserializeMdOptions, "editor">) => Descendant[];
40
- //#endregion
41
- //#region src/lib/deserializer/utils/parseMarkdownBlocks.d.ts
42
- type ParseMarkdownBlocksOptions = {
43
- /**
44
- * Token types to exclude from the output.
45
- *
46
- * @default ['space']
47
- */
48
- exclude?: string[];
49
- /**
50
- * Whether to trim the content.
51
- *
52
- * @default true
53
- */
54
- trim?: boolean;
55
- };
56
- declare const parseMarkdownBlocks: (content: string, {
57
- exclude,
58
- trim
59
- }?: ParseMarkdownBlocksOptions) => Token[];
60
- //#endregion
61
- //#region src/lib/deserializer/utils/splitIncompleteMdx.d.ts
62
- declare const splitIncompleteMdx: (data: string) => string[] | string;
63
- //#endregion
64
- //#region src/lib/deserializer/utils/stripMarkdown.d.ts
65
- declare const stripMarkdownBlocks: (text: string) => string;
66
- declare const stripMarkdownInline: (text: string) => string;
67
- declare const stripMarkdown: (text: string) => string;
68
- //#endregion
69
- //#region src/lib/deserializer/deserializeMd.d.ts
70
- type DeserializeMdOptions = {
71
- allowedNodes?: PlateType[] | null;
72
- allowNode?: AllowNodeConfig;
73
- disallowedNodes?: PlateType[] | null;
74
- editor?: SlateEditor;
75
- memoize?: boolean;
76
- parser?: ParseMarkdownBlocksOptions;
77
- preserveEmptyParagraphs?: boolean;
78
- remarkPlugins?: Plugin[];
79
- rules?: MdRules | null;
80
- splitLineBreaks?: boolean;
81
- withoutMdx?: boolean;
82
- onError?: (error: Error) => void;
83
- };
84
- declare const markdownToAstProcessor: (editor: SlateEditor, data: string, options?: DeserializeMdOptions) => Root;
85
- declare const markdownToSlateNodes: (editor: SlateEditor, data: string, options?: Omit<DeserializeMdOptions, "editor">) => Descendant$1[];
86
- declare const deserializeMd: (editor: SlateEditor, data: string, options?: Omit<DeserializeMdOptions, "editor">) => Value;
87
- declare module 'unified' {
88
- interface CompileResultMap {
89
- remarkToSlateNode: Descendant$1[];
90
- }
91
- }
92
- //# sourceMappingURL=deserializeMd.d.ts.map
93
- //#endregion
94
- //#region src/lib/deserializer/convertChildrenDeserialize.d.ts
95
- declare const convertChildrenDeserialize: (children: MdRootContent[], deco: MdDecoration, options: DeserializeMdOptions) => Descendant$1[];
96
- //#endregion
97
- //#region src/lib/deserializer/convertNodesDeserialize.d.ts
98
- declare const convertNodesDeserialize: (nodes: MdRootContent[], deco: MdDecoration, options: DeserializeMdOptions) => Descendant$1[];
99
- declare const buildSlateNode: (mdastNode: MdRootContent, deco: MdDecoration, options: DeserializeMdOptions) => Descendant$1[];
100
- //#endregion
101
- //#region src/lib/deserializer/convertTextsDeserialize.d.ts
102
- declare const convertTextsDeserialize: (mdastNode: MdDelete | MdEmphasis | MdStrong, deco: MdDecoration, options: DeserializeMdOptions) => any;
103
- //#endregion
104
- //#region src/lib/deserializer/mdastToSlate.d.ts
105
- declare const mdastToSlate: (node: Root, options: DeserializeMdOptions) => Descendant$1[];
106
- //#endregion
107
13
  //#region src/lib/serializer/serializeMd.d.ts
108
14
  type SerializeMdOptions = {
109
15
  allowedNodes?: PlateType[] | null;
@@ -117,14 +23,14 @@ type SerializeMdOptions = {
117
23
  remarkStringifyOptions?: Options | null;
118
24
  rules?: MdRules;
119
25
  spread?: boolean;
120
- value?: Descendant$1[];
26
+ value?: Descendant[];
121
27
  withBlockId?: boolean;
122
28
  };
123
29
  /** Serialize the editor value to Markdown. */
124
30
  declare const serializeMd: (editor: SlateEditor, options?: Omit<SerializeMdOptions, "editor">) => string;
125
31
  //#endregion
126
32
  //#region src/lib/serializer/convertNodesSerialize.d.ts
127
- declare const convertNodesSerialize: (nodes: Descendant$1[], options: SerializeMdOptions, isBlock?: boolean) => unistLib.Node[];
33
+ declare const convertNodesSerialize: (nodes: Descendant[], options: SerializeMdOptions, isBlock?: boolean) => unistLib.Node[];
128
34
  declare const buildMdastNode: (node: any, options: SerializeMdOptions, isBlock?: boolean) => any;
129
35
  //#endregion
130
36
  //#region src/lib/serializer/convertTextsSerialize.d.ts
@@ -137,6 +43,26 @@ declare function listToMdastTree(nodes: TListElement[], options: SerializeMdOpti
137
43
  //#region src/lib/serializer/serializeInlineMd.d.ts
138
44
  declare const serializeInlineMd: (editor: SlateEditor, options?: SerializeMdOptions) => string;
139
45
  //#endregion
46
+ //#region src/lib/serializer/serializeMdWithSourceMap.d.ts
47
+ type SelectionPath = number[];
48
+ type MarkdownSourceMapKind = 'block' | 'blockquote' | 'code_block' | 'heading' | 'list_item' | 'media' | 'paragraph' | 'table_cell';
49
+ type MarkdownSourceMapSegment = {
50
+ containsMdx: boolean;
51
+ endLine: number;
52
+ kind: MarkdownSourceMapKind;
53
+ markdown: string;
54
+ nodeId?: string;
55
+ path: SelectionPath;
56
+ pathKey: string;
57
+ startLine: number;
58
+ text: string;
59
+ };
60
+ type SerializeMdSourceMapResult = {
61
+ markdown: string;
62
+ segments: MarkdownSourceMapSegment[];
63
+ };
64
+ declare const serializeMdWithSourceMap: (editor: SlateEditor, options?: Omit<SerializeMdOptions, "editor">) => SerializeMdSourceMapResult;
65
+ //#endregion
140
66
  //#region src/lib/serializer/wrapWithBlockId.d.ts
141
67
  /**
142
68
  * Wraps an mdast node with a block element containing an ID attribute. Used for
@@ -254,12 +180,12 @@ type MdNodeMap = {
254
180
  * Get plate node type from mdast node type if the mdast is mdast only return
255
181
  * the mdast type itself.
256
182
  */
257
- declare const mdastToPlate: <T extends StrictMdType>(editor: SlateEditor, mdastType: T) => any;
183
+ declare const mdastToPlate: <T extends StrictMdType>(editor: SlateEditor, mdastType: T) => string;
258
184
  /**
259
185
  * Get mdast node type from plate element type if the plateType is plate only
260
186
  * return the plateType itself.
261
187
  */
262
- declare const plateToMdast: <T extends StrictPlateType>(plateType: T) => T | NonNullable<{
188
+ declare const plateToMdast: <T extends StrictPlateType>(plateType: T) => {
263
189
  readonly a: "link";
264
190
  readonly blockquote: "blockquote";
265
191
  readonly bold: "strong";
@@ -293,7 +219,108 @@ declare const plateToMdast: <T extends StrictPlateType>(plateType: T) => T | Non
293
219
  readonly toggle: "toggle";
294
220
  readonly tr: "tableRow";
295
221
  readonly underline: "u";
296
- }[T]>;
222
+ }[T];
223
+ //#endregion
224
+ //#region src/lib/deserializer/utils/customMdxDeserialize.d.ts
225
+ declare const customMdxDeserialize: (mdastNode: MdxJsxFlowElement | MdxJsxTextElement, deco: MdDecoration, options: DeserializeMdOptions) => any;
226
+ //#endregion
227
+ //#region src/lib/deserializer/utils/deserializeInlineMd.d.ts
228
+ declare const deserializeInlineMd: (editor: SlateEditor, text: string, options?: DeserializeMdOptions) => Descendant[] | {
229
+ text: string;
230
+ }[];
231
+ //#endregion
232
+ //#region src/lib/deserializer/utils/getDeserializerByKey.d.ts
233
+ declare const getDeserializerByKey: (key: string, options: DeserializeMdOptions) => any;
234
+ //#endregion
235
+ //#region src/lib/deserializer/utils/getMergedOptionsDeserialize.d.ts
236
+ /**
237
+ * Merges Markdown configurations, following the principle that options take
238
+ * precedence
239
+ *
240
+ * @param editor Editor instance used to get plugin default configurations
241
+ * @param options User-provided options (higher priority)
242
+ * @returns The final merged configuration
243
+ */
244
+ declare const getMergedOptionsDeserialize: (editor: SlateEditor, options?: DeserializeMdOptions) => DeserializeMdOptions;
245
+ //#endregion
246
+ //#region src/lib/deserializer/utils/getStyleValue.d.ts
247
+ declare const getStyleValue: (mdastNode: MdMdxJsxTextElement, styleName: string) => string | undefined;
248
+ //#endregion
249
+ //#region src/lib/deserializer/utils/htmlToJsx.d.ts
250
+ declare const htmlToJsx: (html: string) => string;
251
+ //#endregion
252
+ //#region src/lib/deserializer/utils/markdownToSlateNodesSafely.d.ts
253
+ declare const markdownToSlateNodesSafely: (editor: SlateEditor, data: string, options?: Omit<DeserializeMdOptions, "editor">) => (platejs2.TText | {
254
+ children: platejs2.Descendant[] | {
255
+ text: string;
256
+ }[];
257
+ type: string;
258
+ })[];
259
+ //#endregion
260
+ //#region src/lib/deserializer/utils/parseMarkdownBlocks.d.ts
261
+ type ParseMarkdownBlocksOptions = {
262
+ /**
263
+ * Token types to exclude from the output.
264
+ *
265
+ * @default ['space']
266
+ */
267
+ exclude?: string[];
268
+ /**
269
+ * Whether to trim the content.
270
+ *
271
+ * @default true
272
+ */
273
+ trim?: boolean;
274
+ };
275
+ declare const parseMarkdownBlocks: (content: string, {
276
+ exclude,
277
+ trim
278
+ }?: ParseMarkdownBlocksOptions) => Token[];
279
+ //#endregion
280
+ //#region src/lib/deserializer/utils/splitIncompleteMdx.d.ts
281
+ declare const splitIncompleteMdx: (data: string) => string[] | string;
282
+ //#endregion
283
+ //#region src/lib/deserializer/utils/stripMarkdown.d.ts
284
+ declare const stripMarkdownBlocks: (text: string) => string;
285
+ declare const stripMarkdownInline: (text: string) => string;
286
+ declare const stripMarkdown: (text: string) => string;
287
+ //#endregion
288
+ //#region src/lib/deserializer/deserializeMd.d.ts
289
+ type DeserializeMdOptions = {
290
+ allowedNodes?: PlateType[] | null;
291
+ allowNode?: AllowNodeConfig;
292
+ disallowedNodes?: PlateType[] | null;
293
+ editor?: SlateEditor;
294
+ memoize?: boolean;
295
+ parser?: ParseMarkdownBlocksOptions;
296
+ preserveEmptyParagraphs?: boolean;
297
+ remarkPlugins?: Plugin[];
298
+ rules?: MdRules | null;
299
+ splitLineBreaks?: boolean;
300
+ withoutMdx?: boolean;
301
+ onError?: (error: Error) => void;
302
+ };
303
+ declare const markdownToAstProcessor: (editor: SlateEditor, data: string, options?: DeserializeMdOptions) => Root;
304
+ declare const markdownToSlateNodes: (editor: SlateEditor, data: string, options?: Omit<DeserializeMdOptions, "editor">) => Descendant[];
305
+ declare const deserializeMd: (editor: SlateEditor, data: string, options?: Omit<DeserializeMdOptions, "editor">) => Value;
306
+ declare module 'unified' {
307
+ interface CompileResultMap {
308
+ remarkToSlateNode: Descendant[];
309
+ }
310
+ }
311
+ //#endregion
312
+ //#region src/lib/deserializer/convertChildrenDeserialize.d.ts
313
+ declare const convertChildrenDeserialize: (children: MdRootContent[], deco: MdDecoration, options: DeserializeMdOptions) => Descendant[];
314
+ //#endregion
315
+ //#region src/lib/deserializer/convertNodesDeserialize.d.ts
316
+ declare const convertNodesDeserialize: (nodes: MdRootContent[], deco: MdDecoration, options: DeserializeMdOptions) => Descendant[];
317
+ declare const buildSlateNode: (mdastNode: MdRootContent, deco: MdDecoration, options: DeserializeMdOptions) => Descendant[];
318
+ //#endregion
319
+ //#region src/lib/deserializer/convertTextsDeserialize.d.ts
320
+ declare const convertTextsDeserialize: (mdastNode: MdDelete | MdEmphasis | MdStrong, deco: MdDecoration, options: DeserializeMdOptions) => any;
321
+ //#endregion
322
+ //#region src/lib/deserializer/mdastToSlate.d.ts
323
+ declare const mdastToSlate: (node: Root, options: DeserializeMdOptions) => Descendant[];
297
324
  //#endregion
298
325
  //#region src/lib/MarkdownPlugin.d.ts
299
326
  type AllowNodeConfig = {
@@ -363,7 +390,73 @@ type MarkdownConfig = PluginConfig<'markdown', {
363
390
  serialize: OmitFirst<typeof serializeMd>;
364
391
  };
365
392
  }>;
366
- declare const MarkdownPlugin: any;
393
+ declare const MarkdownPlugin: platejs2.SlatePlugin<PluginConfig<"markdown", {
394
+ /**
395
+ * Configuration for allowed node types. Cannot be combined with
396
+ * disallowedNodes.
397
+ */
398
+ allowedNodes: PlateType[] | null;
399
+ /**
400
+ * Configuration for disallowed node types. Cannot be combined with
401
+ * allowedNodes.
402
+ *
403
+ * @default null
404
+ */
405
+ disallowedNodes: PlateType[] | null;
406
+ /**
407
+ * Array of remark plugins to extend Markdown parsing and serialization
408
+ * functionality. For example, you can add remark-gfm to support GFM syntax,
409
+ * remark-math to support mathematical formulas, etc. These plugins will be
410
+ * used during the parsing and generation of Markdown text.
411
+ *
412
+ * @default undefined
413
+ */
414
+ remarkPlugins: Plugin[];
415
+ /**
416
+ * Custom options passed to remark-stringify.
417
+ *
418
+ * @default null
419
+ */
420
+ remarkStringifyOptions: Options | null;
421
+ /**
422
+ * Rules that define how to convert Markdown syntax elements to Slate editor
423
+ * elements. Or rules that how to convert Slate editor elements to Markdown
424
+ * syntax elements. Includes conversion rules for elements such as
425
+ * paragraphs, headings, lists, links, images, etc.
426
+ *
427
+ * You can pass null disable default node parser.
428
+ *
429
+ * NOTE: don't forget pass `mark:true` when you custom inline nodes.
430
+ *
431
+ * @default null
432
+ */
433
+ rules: MdRules | null;
434
+ /**
435
+ * Custom filter function for nodes during deserialization and
436
+ * serialization.
437
+ *
438
+ * @default null
439
+ */
440
+ allowNode?: AllowNodeConfig;
441
+ /**
442
+ * Marks to treat as plain text without applying markdown formatting.
443
+ *
444
+ * @default null
445
+ */
446
+ plainMarks?: PlateType[] | null;
447
+ }, {
448
+ markdown: {
449
+ deserialize: OmitFirst<typeof deserializeMd>;
450
+ deserializeInline: OmitFirst<typeof deserializeInlineMd>;
451
+ serialize: OmitFirst<typeof serializeMd>;
452
+ };
453
+ } & Record<"markdown", {
454
+ deserialize: (data: string, options?: Omit<DeserializeMdOptions, "editor"> | undefined) => platejs2.Value;
455
+ deserializeInline: (text: string, options?: DeserializeMdOptions | undefined) => platejs2.Descendant[] | {
456
+ text: string;
457
+ }[];
458
+ serialize: (options?: Omit<SerializeMdOptions, "editor"> | undefined) => string;
459
+ }>, {}, {}>>;
367
460
  //#endregion
368
461
  //#region src/lib/plugins/remarkMdx.d.ts
369
462
  declare const remarkMdx: typeof baseRemarkMdx;
@@ -421,5 +514,4 @@ declare const tagRemarkPlugin: (pluginFn: any, tag: string) => {
421
514
  };
422
515
  declare const getRemarkPluginsWithoutMdx: (plugins: Plugin[]) => Plugin[];
423
516
  //#endregion
424
- export { AllowNodeConfig, DeserializeMdOptions, type MDPhrasingContent, MarkdownConfig, MarkdownPlugin, type MdBlockquote, type MdBreak, type MdCode, type MdContent, MdDecoration, type MdDefinition, type MdDelete, type MdEmphasis, type MdFootnoteDefinition, type MdFootnoteReference, type MdHeading, type MdHtml, type MdImage, type MdImageReference, type MdInlineCode, type MdInlineMath, type MdLink, type MdLinkReference, type MdList, type MdListItem, MdMark, type MdMath, type MdMdxJsxFlowElement, type MdMdxJsxTextElement, MdNodeParser, type MdParagraph, type MdRoot, type MdRootContent, MdRules, type MdStrong, type MdTable, type MdTableCell, type MdTableRow, type MdText, type MdThematicBreak, MdType, type MdYaml, MentionNode, ParseMarkdownBlocksOptions, PlateType, REMARK_MDX_TAG, SerializeMdOptions, StrictPlateType, basicMarkdownMarks, buildMdastNode, buildRules, buildSlateNode, columnRules, convertChildrenDeserialize, convertNodesDeserialize, convertNodesSerialize, convertTextsDeserialize, convertTextsSerialize, customMdxDeserialize, defaultRules, deserializeInlineMd, deserializeMd, fontRules, getCustomMark, getDeserializerByKey, getMergedOptionsDeserialize, getMergedOptionsSerialize, getRemarkPluginsWithoutMdx, getSerializerByKey, getStyleValue, htmlToJsx, listToMdastTree, markdownToAstProcessor, markdownToSlateNodes, markdownToSlateNodesSafely, mdastToPlate, mdastToSlate, mediaRules, parseAttributes, parseMarkdownBlocks, plateToMdast, propsToAttributes, remarkMdx, remarkMention, serializeInlineMd, serializeMd, splitIncompleteMdx, stripMarkdown, stripMarkdownBlocks, stripMarkdownInline, tagRemarkPlugin, type unistLib, unreachable, wrapWithBlockId };
425
- //# sourceMappingURL=index.d.ts.map
517
+ export { AllowNodeConfig, DeserializeMdOptions, type MDPhrasingContent, MarkdownConfig, MarkdownPlugin, MarkdownSourceMapKind, MarkdownSourceMapSegment, type MdBlockquote, type MdBreak, type MdCode, type MdContent, MdDecoration, type MdDefinition, type MdDelete, type MdEmphasis, type MdFootnoteDefinition, type MdFootnoteReference, type MdHeading, type MdHtml, type MdImage, type MdImageReference, type MdInlineCode, type MdInlineMath, type MdLink, type MdLinkReference, type MdList, type MdListItem, MdMark, type MdMath, type MdMdxJsxFlowElement, type MdMdxJsxTextElement, MdNodeParser, type MdParagraph, type MdRoot, type MdRootContent, MdRules, type MdStrong, type MdTable, type MdTableCell, type MdTableRow, type MdText, type MdThematicBreak, MdType, type MdYaml, MentionNode, ParseMarkdownBlocksOptions, PlateType, REMARK_MDX_TAG, SerializeMdOptions, SerializeMdSourceMapResult, StrictPlateType, basicMarkdownMarks, buildMdastNode, buildRules, buildSlateNode, columnRules, convertChildrenDeserialize, convertNodesDeserialize, convertNodesSerialize, convertTextsDeserialize, convertTextsSerialize, customMdxDeserialize, defaultRules, deserializeInlineMd, deserializeMd, fontRules, getCustomMark, getDeserializerByKey, getMergedOptionsDeserialize, getMergedOptionsSerialize, getRemarkPluginsWithoutMdx, getSerializerByKey, getStyleValue, htmlToJsx, listToMdastTree, markdownToAstProcessor, markdownToSlateNodes, markdownToSlateNodesSafely, mdastToPlate, mdastToSlate, mediaRules, parseAttributes, parseMarkdownBlocks, plateToMdast, propsToAttributes, remarkMdx, remarkMention, serializeInlineMd, serializeMd, serializeMdWithSourceMap, splitIncompleteMdx, stripMarkdown, stripMarkdownBlocks, stripMarkdownInline, tagRemarkPlugin, type unistLib, unreachable, wrapWithBlockId };