@milkdown/preset-commonmark 7.1.1 → 7.1.2-next.1
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/lib/__internal__/index.d.ts +3 -0
- package/lib/__internal__/index.d.ts.map +1 -0
- package/lib/{utils/index.d.ts → __internal__/serialize-text.d.ts} +1 -1
- package/lib/__internal__/serialize-text.d.ts.map +1 -0
- package/lib/__internal__/with-meta.d.ts +3 -0
- package/lib/__internal__/with-meta.d.ts.map +1 -0
- package/lib/index.es.js +1095 -575
- package/lib/index.es.js.map +1 -1
- package/lib/mark/emphasis.d.ts +1 -1
- package/lib/mark/emphasis.d.ts.map +1 -1
- package/lib/mark/inline-code.d.ts +1 -1
- package/lib/mark/inline-code.d.ts.map +1 -1
- package/lib/mark/link.d.ts +1 -1
- package/lib/mark/link.d.ts.map +1 -1
- package/lib/mark/strong.d.ts +1 -1
- package/lib/mark/strong.d.ts.map +1 -1
- package/lib/node/blockquote.d.ts.map +1 -1
- package/lib/node/bullet-list.d.ts.map +1 -1
- package/lib/node/code-block.d.ts.map +1 -1
- package/lib/node/doc.d.ts.map +1 -1
- package/lib/node/hardbreak.d.ts.map +1 -1
- package/lib/node/heading.d.ts.map +1 -1
- package/lib/node/hr.d.ts.map +1 -1
- package/lib/node/html.d.ts.map +1 -1
- package/lib/node/image.d.ts.map +1 -1
- package/lib/node/list-item.d.ts.map +1 -1
- package/lib/node/ordered-list.d.ts.map +1 -1
- package/lib/node/paragraph.d.ts.map +1 -1
- package/lib/node/text.d.ts.map +1 -1
- package/lib/plugin/hardbreak-clear-mark-plugin.d.ts.map +1 -1
- package/lib/plugin/hardbreak-filter-plugin.d.ts.map +1 -1
- package/lib/plugin/inline-nodes-cursor-plugin.d.ts.map +1 -1
- package/lib/plugin/inline-sync-plugin/config.d.ts.map +1 -1
- package/lib/plugin/inline-sync-plugin/inline-sync-plugin.d.ts.map +1 -1
- package/lib/plugin/remark-add-order-in-list-plugin.d.ts.map +1 -1
- package/lib/plugin/remark-html-transformer.d.ts.map +1 -1
- package/lib/plugin/remark-inline-link-plugin.d.ts.map +1 -1
- package/lib/plugin/remark-line-break.d.ts.map +1 -1
- package/lib/plugin/sync-heading-id-plugin.d.ts.map +1 -1
- package/lib/plugin/sync-list-order-plugin.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/__internal__/index.ts +3 -0
- package/src/{utils/index.ts → __internal__/serialize-text.ts} +3 -3
- package/src/__internal__/with-meta.ts +16 -0
- package/src/mark/emphasis.ts +31 -0
- package/src/mark/inline-code.ts +31 -0
- package/src/mark/link.ts +21 -0
- package/src/mark/strong.ts +31 -0
- package/src/node/blockquote.ts +36 -0
- package/src/node/bullet-list.ts +36 -0
- package/src/node/code-block.ts +41 -0
- package/src/node/doc.ts +6 -0
- package/src/node/hardbreak.ts +31 -0
- package/src/node/heading.ts +46 -1
- package/src/node/hr.ts +26 -0
- package/src/node/html.ts +16 -0
- package/src/node/image.ts +31 -0
- package/src/node/list-item.ts +41 -0
- package/src/node/ordered-list.ts +36 -0
- package/src/node/paragraph.ts +30 -1
- package/src/node/text.ts +6 -0
- package/src/plugin/hardbreak-clear-mark-plugin.ts +7 -1
- package/src/plugin/hardbreak-filter-plugin.ts +11 -0
- package/src/plugin/inline-nodes-cursor-plugin.ts +6 -0
- package/src/plugin/inline-sync-plugin/config.ts +6 -0
- package/src/plugin/inline-sync-plugin/inline-sync-plugin.ts +6 -0
- package/src/plugin/remark-add-order-in-list-plugin.ts +6 -0
- package/src/plugin/remark-html-transformer.ts +6 -0
- package/src/plugin/remark-inline-link-plugin.ts +6 -0
- package/src/plugin/remark-line-break.ts +6 -0
- package/src/plugin/sync-heading-id-plugin.ts +6 -0
- package/src/plugin/sync-list-order-plugin.ts +6 -0
- package/lib/utils/index.d.ts.map +0 -1
package/lib/mark/emphasis.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const emphasisAttr: import("@milkdown/utils").$MarkAttr;
|
|
2
|
-
export declare const emphasisSchema: import("@milkdown/utils").$MarkSchema
|
|
2
|
+
export declare const emphasisSchema: import("@milkdown/utils").$MarkSchema<"emphasis">;
|
|
3
3
|
export declare const toggleEmphasisCommand: import("@milkdown/utils").$Command<unknown>;
|
|
4
4
|
export declare const emphasisKeymap: import("@milkdown/utils").$UserKeymap<"emphasisKeymap", "ToggleEmphasis">;
|
|
5
5
|
//# sourceMappingURL=emphasis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emphasis.d.ts","sourceRoot":"","sources":["../../src/mark/emphasis.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"emphasis.d.ts","sourceRoot":"","sources":["../../src/mark/emphasis.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY,qCAAwB,CAAA;AAQjD,eAAO,MAAM,cAAc,mDAsBxB,CAAA;AAaH,eAAO,MAAM,qBAAqB,6CAA4E,CAAA;AAS9G,eAAO,MAAM,cAAc,2EAQzB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const inlineCodeAttr: import("@milkdown/utils").$MarkAttr;
|
|
2
|
-
export declare const inlineCodeSchema: import("@milkdown/utils").$MarkSchema
|
|
2
|
+
export declare const inlineCodeSchema: import("@milkdown/utils").$MarkSchema<"inlineCode">;
|
|
3
3
|
export declare const toggleInlineCodeCommand: import("@milkdown/utils").$Command<unknown>;
|
|
4
4
|
export declare const inlineCodeKeymap: import("@milkdown/utils").$UserKeymap<"inlineCodeKeymap", "ToggleInlineCode">;
|
|
5
5
|
//# sourceMappingURL=inline-code.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-code.d.ts","sourceRoot":"","sources":["../../src/mark/inline-code.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inline-code.d.ts","sourceRoot":"","sources":["../../src/mark/inline-code.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,cAAc,qCAA0B,CAAA;AAQrD,eAAO,MAAM,gBAAgB,qDAoB1B,CAAA;AAaH,eAAO,MAAM,uBAAuB,6CAyBlC,CAAA;AASF,eAAO,MAAM,gBAAgB,+EAQ3B,CAAA"}
|
package/lib/mark/link.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const linkAttr: import("@milkdown/utils").$MarkAttr;
|
|
2
|
-
export declare const linkSchema: import("@milkdown/utils").$MarkSchema
|
|
2
|
+
export declare const linkSchema: import("@milkdown/utils").$MarkSchema<"link">;
|
|
3
3
|
export type UpdateLinkCommandPayload = {
|
|
4
4
|
href?: string;
|
|
5
5
|
title?: string;
|
package/lib/mark/link.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/mark/link.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/mark/link.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,QAAQ,qCAAoB,CAAA;AAQzC,eAAO,MAAM,UAAU,+CAoCpB,CAAA;AAQH,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAGD,eAAO,MAAM,iBAAiB,8DAAmH,CAAA;AASjJ,eAAO,MAAM,iBAAiB,8DAyC5B,CAAA"}
|
package/lib/mark/strong.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const strongAttr: import("@milkdown/utils").$MarkAttr;
|
|
2
|
-
export declare const strongSchema: import("@milkdown/utils").$MarkSchema
|
|
2
|
+
export declare const strongSchema: import("@milkdown/utils").$MarkSchema<"strong">;
|
|
3
3
|
export declare const toggleStrongCommand: import("@milkdown/utils").$Command<unknown>;
|
|
4
4
|
export declare const strongKeymap: import("@milkdown/utils").$UserKeymap<"strongKeymap", "ToggleBold">;
|
|
5
5
|
//# sourceMappingURL=strong.d.ts.map
|
package/lib/mark/strong.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strong.d.ts","sourceRoot":"","sources":["../../src/mark/strong.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"strong.d.ts","sourceRoot":"","sources":["../../src/mark/strong.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,UAAU,qCAAsB,CAAA;AAQ7C,eAAO,MAAM,YAAY,iDAsBtB,CAAA;AAaH,eAAO,MAAM,mBAAmB,6CAAwE,CAAA;AASxG,eAAO,MAAM,YAAY,qEAQvB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockquote.d.ts","sourceRoot":"","sources":["../../src/node/blockquote.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"blockquote.d.ts","sourceRoot":"","sources":["../../src/node/blockquote.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAKlD,eAAO,MAAM,cAAc,qCAA0B,CAAA;AAQrD,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,YAAY,CAkBpD,CAAA;AAcH,eAAO,MAAM,yBAAyB,sCAA2E,CAAA;AAQjH,eAAO,MAAM,uBAAuB,6CAA4E,CAAA;AAShH,eAAO,MAAM,gBAAgB,+EAQ3B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bullet-list.d.ts","sourceRoot":"","sources":["../../src/node/bullet-list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bullet-list.d.ts","sourceRoot":"","sources":["../../src/node/bullet-list.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc,qCAA0B,CAAA;AAQrD,eAAO,MAAM,gBAAgB,sDAiD3B,CAAA;AAaF,eAAO,MAAM,yBAAyB,sCAAiF,CAAA;AAQvH,eAAO,MAAM,uBAAuB,6CAA4E,CAAA;AAShH,eAAO,MAAM,gBAAgB,+EAQ3B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../src/node/code-block.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../src/node/code-block.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,aAAa,qCAGvB,CAAA;AAQH,eAAO,MAAM,eAAe,qDAwD1B,CAAA;AAcF,eAAO,MAAM,wBAAwB,sCAEjC,CAAA;AASJ,eAAO,MAAM,sBAAsB,6CAA2G,CAAA;AAQ9I,eAAO,MAAM,8BAA8B;SAAwE,MAAM;cAAY,MAAM;EAOzI,CAAA;AASF,eAAO,MAAM,eAAe,6EAQ1B,CAAA"}
|
package/lib/node/doc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doc.d.ts","sourceRoot":"","sources":["../../src/node/doc.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"doc.d.ts","sourceRoot":"","sources":["../../src/node/doc.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,iCAenB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardbreak.d.ts","sourceRoot":"","sources":["../../src/node/hardbreak.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hardbreak.d.ts","sourceRoot":"","sources":["../../src/node/hardbreak.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,aAAa,qCAIxB,CAAA;AAQF,eAAO,MAAM,eAAe,oDA4BzB,CAAA;AAaH,eAAO,MAAM,sBAAsB,6CAiBjC,CAAA;AASF,eAAO,MAAM,eAAe,6EAQ1B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../src/node/heading.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAejD,eAAO,MAAM,kBAAkB,wCALU,IAAI,kCAK0C,CAAA;
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../src/node/heading.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAejD,eAAO,MAAM,kBAAkB,wCALU,IAAI,kCAK0C,CAAA;AAQvF,eAAO,MAAM,WAAW,qCAAuB,CAAA;AAQ/C,eAAO,MAAM,aAAa,kDAmDxB,CAAA;AAcF,eAAO,MAAM,sBAAsB,sCAgBjC,CAAA;AAUF,eAAO,MAAM,oBAAoB,4CAS/B,CAAA;AAUF,eAAO,MAAM,uBAAuB,6CAkBhC,CAAA;AAUJ,eAAO,MAAM,aAAa,sKAkDxB,CAAA"}
|
package/lib/node/hr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hr.d.ts","sourceRoot":"","sources":["../../src/node/hr.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hr.d.ts","sourceRoot":"","sources":["../../src/node/hr.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,qCAAkB,CAAA;AAQrC,eAAO,MAAM,QAAQ,6CAgBlB,CAAA;AAcH,eAAO,MAAM,iBAAiB,sCAS5B,CAAA;AAQF,eAAO,MAAM,eAAe,6CAkB1B,CAAA"}
|
package/lib/node/html.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../src/node/html.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../src/node/html.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ,qCAAoB,CAAA;AAOzC,eAAO,MAAM,UAAU,+CAyCrB,CAAA"}
|
package/lib/node/image.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/node/image.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/node/image.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS,qCAAqB,CAAA;AAQ3C,eAAO,MAAM,WAAW,gDAyDtB,CAAA;AAaF,MAAM,MAAM,yBAAyB,GAAG;IACtC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAID,eAAO,MAAM,kBAAkB,+DAa3B,CAAA;AASJ,eAAO,MAAM,kBAAkB,+DAkB7B,CAAA;AAUF,eAAO,MAAM,oBAAoB,sCAS/B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item.d.ts","sourceRoot":"","sources":["../../src/node/list-item.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list-item.d.ts","sourceRoot":"","sources":["../../src/node/list-item.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY,qCAAwB,CAAA;AAQjD,eAAO,MAAM,cAAc,oDA2DxB,CAAA;AAwBH,eAAO,MAAM,mBAAmB,6CAA4E,CAAA;AAmB5G,eAAO,MAAM,mBAAmB,6CAA6E,CAAA;AAoB7G,eAAO,MAAM,oBAAoB,6CAA8E,CAAA;AAW/G,eAAO,MAAM,cAAc,2GAsBzB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ordered-list.d.ts","sourceRoot":"","sources":["../../src/node/ordered-list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ordered-list.d.ts","sourceRoot":"","sources":["../../src/node/ordered-list.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,eAAe,qCAA2B,CAAA;AAQvD,eAAO,MAAM,iBAAiB,uDAiD3B,CAAA;AAaH,eAAO,MAAM,0BAA0B,sCAKrC,CAAA;AAQF,eAAO,MAAM,wBAAwB,6CAA8E,CAAA;AASnH,eAAO,MAAM,iBAAiB,iFAQ5B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../src/node/paragraph.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,qCAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../src/node/paragraph.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,qCAAyB,CAAA;AAQnD,eAAO,MAAM,eAAe,oDA0BzB,CAAA;AAYH,eAAO,MAAM,mBAAmB,6CAA6E,CAAA;AAS7G,eAAO,MAAM,eAAe,0EAQ1B,CAAA"}
|
package/lib/node/text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/node/text.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/node/text.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU,iCAcpB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardbreak-clear-mark-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/hardbreak-clear-mark-plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hardbreak-clear-mark-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/hardbreak-clear-mark-plugin.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,wBAAwB,kCAqCnC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardbreak-filter-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/hardbreak-filter-plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hardbreak-filter-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/hardbreak-filter-plugin.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,oBAAoB,kEAAwD,CAAA;AASzF,eAAO,MAAM,qBAAqB,kCAuBhC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-nodes-cursor-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/inline-nodes-cursor-plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inline-nodes-cursor-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/inline-nodes-cursor-plugin.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,uBAAuB,kCAmFlC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/plugin/inline-sync-plugin/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/plugin/inline-sync-plugin/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAOxD,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE;IACrC,QAAQ,EAAE,IAAI,CAAA;IACd,QAAQ,EAAE,IAAI,CAAA;IACd,GAAG,EAAE,GAAG,CAAA;IACR,EAAE,EAAE,WAAW,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACb,KAAK,OAAO,CAAA;AAGb,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb;AAGD,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,EAAE,mBAAmB,CAAA;IACtC,cAAc,EAAE,cAAc,CAAA;IAC9B,WAAW,EAAE,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAA;IACrC,eAAe,EAAE,CAAC,iBAAiB,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CACrE;AAGD,eAAO,MAAM,aAAa,EAAE,gBAyB3B,CAAA;AAaD,eAAO,MAAM,gBAAgB,sEAAgF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-sync-plugin.d.ts","sourceRoot":"","sources":["../../../src/plugin/inline-sync-plugin/inline-sync-plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inline-sync-plugin.d.ts","sourceRoot":"","sources":["../../../src/plugin/inline-sync-plugin/inline-sync-plugin.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,gBAAgB,kCAoD3B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remark-add-order-in-list-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/remark-add-order-in-list-plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remark-add-order-in-list-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/remark-add-order-in-list-plugin.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,0BAA0B,mCASrC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remark-html-transformer.d.ts","sourceRoot":"","sources":["../../src/plugin/remark-html-transformer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remark-html-transformer.d.ts","sourceRoot":"","sources":["../../src/plugin/remark-html-transformer.ts"],"names":[],"mappings":"AAoCA,eAAO,MAAM,qBAAqB,mCAahC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remark-inline-link-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/remark-inline-link-plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remark-inline-link-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/remark-inline-link-plugin.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,sBAAsB,mCAAmC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remark-line-break.d.ts","sourceRoot":"","sources":["../../src/plugin/remark-line-break.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remark-line-break.d.ts","sourceRoot":"","sources":["../../src/plugin/remark-line-break.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,eAAe,mCAmC1B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-heading-id-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/sync-heading-id-plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sync-heading-id-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/sync-heading-id-plugin.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,mBAAmB,kCA8C9B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-list-order-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/sync-list-order-plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sync-list-order-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/sync-list-order-plugin.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,mBAAmB,kCAyE9B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milkdown/preset-commonmark",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.1.1",
|
|
4
|
+
"version": "7.1.2-next.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -22,25 +22,25 @@
|
|
|
22
22
|
"src"
|
|
23
23
|
],
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@milkdown/core": "^7.
|
|
26
|
-
"@milkdown/ctx": "^7.
|
|
27
|
-
"@milkdown/prose": "^7.
|
|
28
|
-
"@milkdown/transformer": "^7.
|
|
25
|
+
"@milkdown/core": "^7.1.2-next.0",
|
|
26
|
+
"@milkdown/ctx": "^7.1.2-next.0",
|
|
27
|
+
"@milkdown/prose": "^7.1.2-next.0",
|
|
28
|
+
"@milkdown/transformer": "^7.1.2-next.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@sindresorhus/slugify": "^2.2.0",
|
|
32
32
|
"remark-inline-links": "^6.0.0",
|
|
33
33
|
"tslib": "^2.5.0",
|
|
34
34
|
"unist-util-visit": "^4.0.0",
|
|
35
|
-
"@milkdown/exception": "7.1.1",
|
|
36
|
-
"@milkdown/utils": "7.1.1"
|
|
35
|
+
"@milkdown/exception": "7.1.2-next.1",
|
|
36
|
+
"@milkdown/utils": "7.1.2-next.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/unist": "^2.0.6",
|
|
40
|
-
"@milkdown/core": "7.1.1",
|
|
41
|
-
"@milkdown/ctx": "7.1.1",
|
|
42
|
-
"@milkdown/prose": "7.1.1",
|
|
43
|
-
"@milkdown/transformer": "7.1.1"
|
|
40
|
+
"@milkdown/core": "7.1.2-next.1",
|
|
41
|
+
"@milkdown/ctx": "7.1.2-next.1",
|
|
42
|
+
"@milkdown/prose": "7.1.2-next.1",
|
|
43
|
+
"@milkdown/transformer": "7.1.2-next.1"
|
|
44
44
|
},
|
|
45
45
|
"nx": {
|
|
46
46
|
"targets": {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
2
|
import type { SerializerState } from '@milkdown/transformer'
|
|
3
|
-
import { Fragment } from '@milkdown/prose/model'
|
|
4
3
|
import type { Node } from '@milkdown/prose/model'
|
|
5
|
-
import {
|
|
4
|
+
import { Fragment } from '@milkdown/prose/model'
|
|
6
5
|
|
|
7
6
|
export const serializeText = (state: SerializerState, node: Node) => {
|
|
8
|
-
const lastIsHardBreak
|
|
7
|
+
const lastIsHardBreak
|
|
8
|
+
= node.childCount >= 1 && node.lastChild?.type.name === 'hardbreak'
|
|
9
9
|
if (!lastIsHardBreak) {
|
|
10
10
|
state.next(node.content)
|
|
11
11
|
return
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
|
+
import type { Meta, MilkdownPlugin } from '@milkdown/ctx'
|
|
3
|
+
|
|
4
|
+
export const withMeta = <T extends MilkdownPlugin>(
|
|
5
|
+
plugin: T,
|
|
6
|
+
meta: Partial<Meta> & Pick<Meta, 'displayName'>,
|
|
7
|
+
): T => {
|
|
8
|
+
Object.assign(plugin, {
|
|
9
|
+
meta: {
|
|
10
|
+
package: '@milkdown/preset-commonmark',
|
|
11
|
+
...meta,
|
|
12
|
+
},
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
return plugin
|
|
16
|
+
}
|
package/src/mark/emphasis.ts
CHANGED
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
import { commandsCtx } from '@milkdown/core'
|
|
3
3
|
import { toggleMark } from '@milkdown/prose/commands'
|
|
4
4
|
import { $command, $markAttr, $markSchema, $useKeymap } from '@milkdown/utils'
|
|
5
|
+
import { withMeta } from '../__internal__'
|
|
5
6
|
|
|
6
7
|
/// HTML attributes for the emphasis mark.
|
|
7
8
|
export const emphasisAttr = $markAttr('emphasis')
|
|
8
9
|
|
|
10
|
+
withMeta(emphasisAttr, {
|
|
11
|
+
displayName: 'Attr<emphasis>',
|
|
12
|
+
group: 'Emphasis',
|
|
13
|
+
})
|
|
14
|
+
|
|
9
15
|
/// Emphasis mark schema.
|
|
10
16
|
export const emphasisSchema = $markSchema('emphasis', ctx => ({
|
|
11
17
|
inclusive: false,
|
|
@@ -31,9 +37,24 @@ export const emphasisSchema = $markSchema('emphasis', ctx => ({
|
|
|
31
37
|
},
|
|
32
38
|
}))
|
|
33
39
|
|
|
40
|
+
withMeta(emphasisSchema.mark, {
|
|
41
|
+
displayName: 'MarkSchema<emphasis>',
|
|
42
|
+
group: 'Emphasis',
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
withMeta(emphasisSchema.ctx, {
|
|
46
|
+
displayName: 'MarkSchemaCtx<emphasis>',
|
|
47
|
+
group: 'Emphasis',
|
|
48
|
+
})
|
|
49
|
+
|
|
34
50
|
/// A command to toggle the emphasis mark.
|
|
35
51
|
export const toggleEmphasisCommand = $command('ToggleEmphasis', () => () => toggleMark(emphasisSchema.type()))
|
|
36
52
|
|
|
53
|
+
withMeta(toggleEmphasisCommand, {
|
|
54
|
+
displayName: 'Command<toggleEmphasisCommand>',
|
|
55
|
+
group: 'Emphasis',
|
|
56
|
+
})
|
|
57
|
+
|
|
37
58
|
/// Keymap for the emphasis mark.
|
|
38
59
|
/// - `Mod-i` - Toggle the emphasis mark.
|
|
39
60
|
export const emphasisKeymap = $useKeymap('emphasisKeymap', {
|
|
@@ -45,3 +66,13 @@ export const emphasisKeymap = $useKeymap('emphasisKeymap', {
|
|
|
45
66
|
},
|
|
46
67
|
},
|
|
47
68
|
})
|
|
69
|
+
|
|
70
|
+
withMeta(emphasisKeymap.ctx, {
|
|
71
|
+
displayName: 'KeymapCtx<emphasis>',
|
|
72
|
+
group: 'Emphasis',
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
withMeta(emphasisKeymap.shortcuts, {
|
|
76
|
+
displayName: 'Keymap<emphasis>',
|
|
77
|
+
group: 'Emphasis',
|
|
78
|
+
})
|
package/src/mark/inline-code.ts
CHANGED
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
import { commandsCtx } from '@milkdown/core'
|
|
3
3
|
import type { MarkType } from '@milkdown/prose/model'
|
|
4
4
|
import { $command, $markAttr, $markSchema, $useKeymap } from '@milkdown/utils'
|
|
5
|
+
import { withMeta } from '../__internal__'
|
|
5
6
|
|
|
6
7
|
/// HTML attributes for the inlineCode mark.
|
|
7
8
|
export const inlineCodeAttr = $markAttr('inlineCode')
|
|
8
9
|
|
|
10
|
+
withMeta(inlineCodeAttr, {
|
|
11
|
+
displayName: 'Attr<inlineCode>',
|
|
12
|
+
group: 'InlineCode',
|
|
13
|
+
})
|
|
14
|
+
|
|
9
15
|
/// InlineCode mark schema.
|
|
10
16
|
export const inlineCodeSchema = $markSchema('inlineCode', ctx => ({
|
|
11
17
|
priority: 100,
|
|
@@ -29,6 +35,16 @@ export const inlineCodeSchema = $markSchema('inlineCode', ctx => ({
|
|
|
29
35
|
},
|
|
30
36
|
}))
|
|
31
37
|
|
|
38
|
+
withMeta(inlineCodeSchema.mark, {
|
|
39
|
+
displayName: 'MarkSchema<inlineCode>',
|
|
40
|
+
group: 'InlineCode',
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
withMeta(inlineCodeSchema.ctx, {
|
|
44
|
+
displayName: 'MarkSchemaCtx<inlineCode>',
|
|
45
|
+
group: 'InlineCode',
|
|
46
|
+
})
|
|
47
|
+
|
|
32
48
|
/// A command to toggle the inlineCode mark.
|
|
33
49
|
export const toggleInlineCodeCommand = $command('ToggleInlineCode', () => () => (state, dispatch) => {
|
|
34
50
|
const { selection, tr } = state
|
|
@@ -57,6 +73,11 @@ export const toggleInlineCodeCommand = $command('ToggleInlineCode', () => () =>
|
|
|
57
73
|
return true
|
|
58
74
|
})
|
|
59
75
|
|
|
76
|
+
withMeta(toggleInlineCodeCommand, {
|
|
77
|
+
displayName: 'Command<toggleInlineCodeCommand>',
|
|
78
|
+
group: 'InlineCode',
|
|
79
|
+
})
|
|
80
|
+
|
|
60
81
|
/// Keymap for the inlineCode mark.
|
|
61
82
|
/// - `Mod-e` - Toggle the inlineCode mark.
|
|
62
83
|
export const inlineCodeKeymap = $useKeymap('inlineCodeKeymap', {
|
|
@@ -68,3 +89,13 @@ export const inlineCodeKeymap = $useKeymap('inlineCodeKeymap', {
|
|
|
68
89
|
},
|
|
69
90
|
},
|
|
70
91
|
})
|
|
92
|
+
|
|
93
|
+
withMeta(inlineCodeKeymap.ctx, {
|
|
94
|
+
displayName: 'KeymapCtx<inlineCode>',
|
|
95
|
+
group: 'InlineCode',
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
withMeta(inlineCodeKeymap.shortcuts, {
|
|
99
|
+
displayName: 'Keymap<inlineCode>',
|
|
100
|
+
group: 'InlineCode',
|
|
101
|
+
})
|
package/src/mark/link.ts
CHANGED
|
@@ -4,10 +4,16 @@ import { toggleMark } from '@milkdown/prose/commands'
|
|
|
4
4
|
import type { Node as ProseNode } from '@milkdown/prose/model'
|
|
5
5
|
import { TextSelection } from '@milkdown/prose/state'
|
|
6
6
|
import { $command, $markAttr, $markSchema } from '@milkdown/utils'
|
|
7
|
+
import { withMeta } from '../__internal__'
|
|
7
8
|
|
|
8
9
|
/// HTML attributes for the link mark.
|
|
9
10
|
export const linkAttr = $markAttr('link')
|
|
10
11
|
|
|
12
|
+
withMeta(linkAttr, {
|
|
13
|
+
displayName: 'Attr<link>',
|
|
14
|
+
group: 'Link',
|
|
15
|
+
})
|
|
16
|
+
|
|
11
17
|
/// Link mark schema.
|
|
12
18
|
export const linkSchema = $markSchema('link', ctx => ({
|
|
13
19
|
attrs: {
|
|
@@ -47,6 +53,11 @@ export const linkSchema = $markSchema('link', ctx => ({
|
|
|
47
53
|
},
|
|
48
54
|
}))
|
|
49
55
|
|
|
56
|
+
withMeta(linkSchema.mark, {
|
|
57
|
+
displayName: 'MarkSchema<link>',
|
|
58
|
+
group: 'Link',
|
|
59
|
+
})
|
|
60
|
+
|
|
50
61
|
/// @internal
|
|
51
62
|
export type UpdateLinkCommandPayload = {
|
|
52
63
|
href?: string
|
|
@@ -56,6 +67,11 @@ export type UpdateLinkCommandPayload = {
|
|
|
56
67
|
/// You can pass the `href` and `title` to the link.
|
|
57
68
|
export const toggleLinkCommand = $command('ToggleLink', () => (payload: UpdateLinkCommandPayload = {}) => toggleMark(linkSchema.type(), payload))
|
|
58
69
|
|
|
70
|
+
withMeta(toggleLinkCommand, {
|
|
71
|
+
displayName: 'Command<toggleLinkCommand>',
|
|
72
|
+
group: 'Link',
|
|
73
|
+
})
|
|
74
|
+
|
|
59
75
|
/// A command to update the link mark.
|
|
60
76
|
/// You can pass the `href` and `title` to update the link.
|
|
61
77
|
export const updateLinkCommand = $command('UpdateLink', () => (payload: UpdateLinkCommandPayload = {}) => (state, dispatch) => {
|
|
@@ -100,3 +116,8 @@ export const updateLinkCommand = $command('UpdateLink', () => (payload: UpdateLi
|
|
|
100
116
|
|
|
101
117
|
return true
|
|
102
118
|
})
|
|
119
|
+
|
|
120
|
+
withMeta(updateLinkCommand, {
|
|
121
|
+
displayName: 'Command<updateLinkCommand>',
|
|
122
|
+
group: 'Link',
|
|
123
|
+
})
|
package/src/mark/strong.ts
CHANGED
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
import { commandsCtx } from '@milkdown/core'
|
|
3
3
|
import { toggleMark } from '@milkdown/prose/commands'
|
|
4
4
|
import { $command, $markAttr, $markSchema, $useKeymap } from '@milkdown/utils'
|
|
5
|
+
import { withMeta } from '../__internal__'
|
|
5
6
|
|
|
6
7
|
/// HTML attributes for the strong mark.
|
|
7
8
|
export const strongAttr = $markAttr('strong')
|
|
8
9
|
|
|
10
|
+
withMeta(strongAttr, {
|
|
11
|
+
displayName: 'Attr<strong>',
|
|
12
|
+
group: 'Strong',
|
|
13
|
+
})
|
|
14
|
+
|
|
9
15
|
/// Strong mark schema.
|
|
10
16
|
export const strongSchema = $markSchema('strong', ctx => ({
|
|
11
17
|
inclusive: false,
|
|
@@ -31,9 +37,24 @@ export const strongSchema = $markSchema('strong', ctx => ({
|
|
|
31
37
|
},
|
|
32
38
|
}))
|
|
33
39
|
|
|
40
|
+
withMeta(strongSchema.mark, {
|
|
41
|
+
displayName: 'MarkSchema<strong>',
|
|
42
|
+
group: 'Strong',
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
withMeta(strongSchema.ctx, {
|
|
46
|
+
displayName: 'MarkSchemaCtx<strong>',
|
|
47
|
+
group: 'Strong',
|
|
48
|
+
})
|
|
49
|
+
|
|
34
50
|
/// A command to toggle the strong mark.
|
|
35
51
|
export const toggleStrongCommand = $command('ToggleStrong', () => () => toggleMark(strongSchema.type()))
|
|
36
52
|
|
|
53
|
+
withMeta(toggleStrongCommand, {
|
|
54
|
+
displayName: 'Command<toggleStrongCommand>',
|
|
55
|
+
group: 'Strong',
|
|
56
|
+
})
|
|
57
|
+
|
|
37
58
|
/// Keymap for the strong mark.
|
|
38
59
|
/// - `Mod-b` - Toggle the strong mark.
|
|
39
60
|
export const strongKeymap = $useKeymap('strongKeymap', {
|
|
@@ -45,3 +66,13 @@ export const strongKeymap = $useKeymap('strongKeymap', {
|
|
|
45
66
|
},
|
|
46
67
|
},
|
|
47
68
|
})
|
|
69
|
+
|
|
70
|
+
withMeta(strongKeymap.ctx, {
|
|
71
|
+
displayName: 'KeymapCtx<strong>',
|
|
72
|
+
group: 'Strong',
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
withMeta(strongKeymap.shortcuts, {
|
|
76
|
+
displayName: 'Keymap<strong>',
|
|
77
|
+
group: 'Strong',
|
|
78
|
+
})
|
package/src/node/blockquote.ts
CHANGED
|
@@ -4,10 +4,16 @@ import { wrapIn } from '@milkdown/prose/commands'
|
|
|
4
4
|
import { wrappingInputRule } from '@milkdown/prose/inputrules'
|
|
5
5
|
import type { $NodeSchema } from '@milkdown/utils'
|
|
6
6
|
import { $command, $inputRule, $nodeAttr, $nodeSchema, $useKeymap } from '@milkdown/utils'
|
|
7
|
+
import { withMeta } from '../__internal__'
|
|
7
8
|
|
|
8
9
|
/// HTML attributes for blockquote node.
|
|
9
10
|
export const blockquoteAttr = $nodeAttr('blockquote')
|
|
10
11
|
|
|
12
|
+
withMeta(blockquoteAttr, {
|
|
13
|
+
displayName: 'Attr<blockquote>',
|
|
14
|
+
group: 'Blockquote',
|
|
15
|
+
})
|
|
16
|
+
|
|
11
17
|
/// Schema for blockquote node.
|
|
12
18
|
export const blockquoteSchema: $NodeSchema<'blockquote'> = $nodeSchema('blockquote', ctx => ({
|
|
13
19
|
content: 'block+',
|
|
@@ -29,13 +35,33 @@ export const blockquoteSchema: $NodeSchema<'blockquote'> = $nodeSchema('blockquo
|
|
|
29
35
|
},
|
|
30
36
|
}))
|
|
31
37
|
|
|
38
|
+
withMeta(blockquoteSchema.node, {
|
|
39
|
+
displayName: 'NodeSchema<blockquote>',
|
|
40
|
+
group: 'Blockquote',
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
withMeta(blockquoteSchema.ctx, {
|
|
44
|
+
displayName: 'NodeSchemaCtx<blockquote>',
|
|
45
|
+
group: 'Blockquote',
|
|
46
|
+
})
|
|
47
|
+
|
|
32
48
|
/// This input rule will convert a line that starts with `> ` into a blockquote.
|
|
33
49
|
/// You can type `> ` at the start of a line to create a blockquote.
|
|
34
50
|
export const wrapInBlockquoteInputRule = $inputRule(() => wrappingInputRule(/^\s*>\s$/, blockquoteSchema.type()))
|
|
35
51
|
|
|
52
|
+
withMeta(wrapInBlockquoteInputRule, {
|
|
53
|
+
displayName: 'InputRule<wrapInBlockquoteInputRule>',
|
|
54
|
+
group: 'Blockquote',
|
|
55
|
+
})
|
|
56
|
+
|
|
36
57
|
/// This command will wrap the current selection in a blockquote.
|
|
37
58
|
export const wrapInBlockquoteCommand = $command('WrapInBlockquote', () => () => wrapIn(blockquoteSchema.type()))
|
|
38
59
|
|
|
60
|
+
withMeta(wrapInBlockquoteCommand, {
|
|
61
|
+
displayName: 'Command<wrapInBlockquoteCommand>',
|
|
62
|
+
group: 'Blockquote',
|
|
63
|
+
})
|
|
64
|
+
|
|
39
65
|
/// Keymap for blockquote.
|
|
40
66
|
/// - `Mod-Shift-b`: Wrap selection in blockquote.
|
|
41
67
|
export const blockquoteKeymap = $useKeymap('blockquoteKeymap', {
|
|
@@ -47,3 +73,13 @@ export const blockquoteKeymap = $useKeymap('blockquoteKeymap', {
|
|
|
47
73
|
},
|
|
48
74
|
},
|
|
49
75
|
})
|
|
76
|
+
|
|
77
|
+
withMeta(blockquoteKeymap.ctx, {
|
|
78
|
+
displayName: 'KeymapCtx<blockquote>',
|
|
79
|
+
group: 'Blockquote',
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
withMeta(blockquoteKeymap.shortcuts, {
|
|
83
|
+
displayName: 'Keymap<blockquote>',
|
|
84
|
+
group: 'Blockquote',
|
|
85
|
+
})
|
package/src/node/bullet-list.ts
CHANGED
|
@@ -4,10 +4,16 @@ import { expectDomTypeError } from '@milkdown/exception'
|
|
|
4
4
|
import { wrapIn } from '@milkdown/prose/commands'
|
|
5
5
|
import { wrappingInputRule } from '@milkdown/prose/inputrules'
|
|
6
6
|
import { $command, $inputRule, $nodeAttr, $nodeSchema, $useKeymap } from '@milkdown/utils'
|
|
7
|
+
import { withMeta } from '../__internal__'
|
|
7
8
|
|
|
8
9
|
/// HTML attributes for bullet list node.
|
|
9
10
|
export const bulletListAttr = $nodeAttr('bulletList')
|
|
10
11
|
|
|
12
|
+
withMeta(bulletListAttr, {
|
|
13
|
+
displayName: 'Attr<bulletList>',
|
|
14
|
+
group: 'BulletList',
|
|
15
|
+
})
|
|
16
|
+
|
|
11
17
|
/// Schema for bullet list node.
|
|
12
18
|
export const bulletListSchema = $nodeSchema('bullet_list', (ctx) => {
|
|
13
19
|
return {
|
|
@@ -60,12 +66,32 @@ export const bulletListSchema = $nodeSchema('bullet_list', (ctx) => {
|
|
|
60
66
|
}
|
|
61
67
|
})
|
|
62
68
|
|
|
69
|
+
withMeta(bulletListSchema.node, {
|
|
70
|
+
displayName: 'NodeSchema<bulletList>',
|
|
71
|
+
group: 'BulletList',
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
withMeta(bulletListSchema.ctx, {
|
|
75
|
+
displayName: 'NodeSchemaCtx<bulletList>',
|
|
76
|
+
group: 'BulletList',
|
|
77
|
+
})
|
|
78
|
+
|
|
63
79
|
/// Input rule for wrapping a block in bullet list node.
|
|
64
80
|
export const wrapInBulletListInputRule = $inputRule(() => wrappingInputRule(/^\s*([-+*])\s$/, bulletListSchema.type()))
|
|
65
81
|
|
|
82
|
+
withMeta(wrapInBulletListInputRule, {
|
|
83
|
+
displayName: 'InputRule<wrapInBulletListInputRule>',
|
|
84
|
+
group: 'BulletList',
|
|
85
|
+
})
|
|
86
|
+
|
|
66
87
|
/// Command for creating bullet list node.
|
|
67
88
|
export const wrapInBulletListCommand = $command('WrapInBulletList', () => () => wrapIn(bulletListSchema.type()))
|
|
68
89
|
|
|
90
|
+
withMeta(wrapInBulletListCommand, {
|
|
91
|
+
displayName: 'Command<wrapInBulletListCommand>',
|
|
92
|
+
group: 'BulletList',
|
|
93
|
+
})
|
|
94
|
+
|
|
69
95
|
/// Keymap for bullet list node.
|
|
70
96
|
/// - `Mod-Alt-8`: Wrap a block in bullet list.
|
|
71
97
|
export const bulletListKeymap = $useKeymap('bulletListKeymap', {
|
|
@@ -77,3 +103,13 @@ export const bulletListKeymap = $useKeymap('bulletListKeymap', {
|
|
|
77
103
|
},
|
|
78
104
|
},
|
|
79
105
|
})
|
|
106
|
+
|
|
107
|
+
withMeta(bulletListKeymap.ctx, {
|
|
108
|
+
displayName: 'KeymapCtx<bulletListKeymap>',
|
|
109
|
+
group: 'BulletList',
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
withMeta(bulletListKeymap.shortcuts, {
|
|
113
|
+
displayName: 'Keymap<bulletListKeymap>',
|
|
114
|
+
group: 'BulletList',
|
|
115
|
+
})
|