@milkdown/preset-commonmark 7.0.0-next.0 → 7.0.0-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/composed/commands.d.ts.map +1 -1
- package/lib/composed/inputrules.d.ts.map +1 -1
- package/lib/composed/keymap.d.ts.map +1 -1
- package/lib/composed/plugins.d.ts +2 -1
- package/lib/composed/plugins.d.ts.map +1 -1
- package/lib/composed/schema.d.ts.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.es.js +15 -17
- package/lib/index.es.js.map +1 -1
- package/lib/mark/emphasis.d.ts.map +1 -1
- package/lib/mark/inline-code.d.ts.map +1 -1
- package/lib/mark/link.d.ts.map +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/image.d.ts.map +1 -1
- package/lib/node/list-item.d.ts +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 +0 -4
- 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-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/package.json +6 -6
- package/src/composed/commands.ts +1 -0
- package/src/composed/inputrules.ts +1 -0
- package/src/composed/keymap.ts +1 -0
- package/src/composed/plugins.ts +3 -1
- package/src/composed/schema.ts +1 -0
- package/src/index.ts +1 -0
- package/src/mark/emphasis.ts +5 -0
- package/src/mark/inline-code.ts +6 -0
- package/src/mark/link.ts +9 -0
- package/src/mark/strong.ts +6 -0
- package/src/node/blockquote.ts +7 -0
- package/src/node/bullet-list.ts +7 -0
- package/src/node/code-block.ts +10 -0
- package/src/node/doc.ts +1 -0
- package/src/node/hardbreak.ts +8 -0
- package/src/node/heading.ts +16 -2
- package/src/node/hr.ts +6 -0
- package/src/node/image.ts +11 -0
- package/src/node/list-item.ts +46 -1
- package/src/node/ordered-list.ts +6 -0
- package/src/node/paragraph.ts +6 -0
- package/src/node/text.ts +1 -0
- package/src/plugin/hardbreak-clear-mark-plugin.ts +1 -0
- package/src/plugin/hardbreak-filter-plugin.ts +3 -1
- package/src/plugin/inline-nodes-cursor-plugin.ts +1 -4
- package/src/plugin/inline-sync-plugin/config.ts +15 -1
- package/src/plugin/inline-sync-plugin/inline-sync-plugin.ts +5 -0
- package/src/plugin/remark-add-order-in-list-plugin.ts +1 -0
- package/src/plugin/remark-inline-link-plugin.ts +1 -0
- package/src/plugin/remark-line-break.ts +3 -0
- package/src/plugin/sync-heading-id-plugin.ts +2 -0
- package/src/plugin/sync-list-order-plugin.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/composed/commands.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/composed/commands.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAKnD,eAAO,MAAM,QAAQ,EAAE,cAAc,EAwBpC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputrules.d.ts","sourceRoot":"","sources":["../../src/composed/inputrules.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"inputrules.d.ts","sourceRoot":"","sources":["../../src/composed/inputrules.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAInD,eAAO,MAAM,UAAU,EAAE,cAAc,EAO/B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keymap.d.ts","sourceRoot":"","sources":["../../src/composed/keymap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"keymap.d.ts","sourceRoot":"","sources":["../../src/composed/keymap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAKnD,eAAO,MAAM,MAAM,EAAE,cAAc,EAa3B,CAAA"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { MilkdownPlugin } from '@milkdown/ctx';
|
|
2
|
+
export declare const plugins: MilkdownPlugin[];
|
|
2
3
|
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/composed/plugins.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/composed/plugins.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAInD,eAAO,MAAM,OAAO,EAAE,cAAc,EAgBnC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/composed/schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/composed/schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAKnD,eAAO,MAAM,MAAM,EAAE,cAAc,EA+C3B,CAAA"}
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAG1B,eAAO,MAAM,UAAU,0CAAyD,CAAA"}
|
package/lib/index.es.js
CHANGED
|
@@ -6,7 +6,7 @@ import { expectDomTypeError as b } from "@milkdown/exception";
|
|
|
6
6
|
import { textblockTypeInputRule as ee, wrappingInputRule as V, InputRule as te } from "@milkdown/prose/inputrules";
|
|
7
7
|
import { TextSelection as re, Selection as ne, PluginKey as N, Plugin as C } from "@milkdown/prose/state";
|
|
8
8
|
import { findSelectedNodeOfType as We } from "@milkdown/prose";
|
|
9
|
-
import { sinkListItem as qe,
|
|
9
|
+
import { sinkListItem as qe, liftListItem as Fe, splitListItem as Ve } from "@milkdown/prose/schema-list";
|
|
10
10
|
import { ReplaceStep as Ge, AddMarkStep as ze } from "@milkdown/prose/transform";
|
|
11
11
|
import { Decoration as J, DecorationSet as Q } from "@milkdown/prose/view";
|
|
12
12
|
import { visit as oe } from "unist-util-visit";
|
|
@@ -249,17 +249,15 @@ const ae = H("emphasis"), se = K("emphasis", (r) => ({
|
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
}), nt = I(
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
})
|
|
262
|
-
), M = u("WrapInHeading", () => (r) => (r ?? (r = 1), r < 1 ? S(L.type()) : S(T.type(), { level: r }))), ke = u("DowngradeHeading", () => () => (r, e, t) => {
|
|
252
|
+
}), nt = I((r) => ee(/^(?<hashes>#+)\s$/, T.type(), (e) => {
|
|
253
|
+
var s, l;
|
|
254
|
+
const t = ((l = (s = e.groups) == null ? void 0 : s.hashes) == null ? void 0 : l.length) || 0, n = r.get(R), { $from: o } = n.state.selection, a = o.node();
|
|
255
|
+
if (a.type.name === "heading") {
|
|
256
|
+
let c = Number(a.attrs.level) + Number(t);
|
|
257
|
+
return c > 6 && (c = 6), { level: c };
|
|
258
|
+
}
|
|
259
|
+
return { level: t };
|
|
260
|
+
})), M = u("WrapInHeading", () => (r) => (r ?? (r = 1), r < 1 ? S(L.type()) : S(T.type(), { level: r }))), ke = u("DowngradeHeading", () => () => (r, e, t) => {
|
|
263
261
|
const { $from: n } = r.selection, o = n.node();
|
|
264
262
|
if (o.type !== T.type() || !r.selection.empty || n.parentOffset !== 0)
|
|
265
263
|
return !1;
|
|
@@ -719,7 +717,7 @@ const ae = H("emphasis"), se = K("emphasis", (r) => ({
|
|
|
719
717
|
shortcuts: "Enter",
|
|
720
718
|
command: (r) => {
|
|
721
719
|
const e = r.get(m);
|
|
722
|
-
return () => e.call(
|
|
720
|
+
return () => e.call(_e.key);
|
|
723
721
|
}
|
|
724
722
|
},
|
|
725
723
|
SinkListItem: {
|
|
@@ -733,7 +731,7 @@ const ae = H("emphasis"), se = K("emphasis", (r) => ({
|
|
|
733
731
|
shortcuts: ["Shift-Tab", "Mod-["],
|
|
734
732
|
command: (r) => {
|
|
735
733
|
const e = r.get(m);
|
|
736
|
-
return () => e.call(
|
|
734
|
+
return () => e.call(Oe.key);
|
|
737
735
|
}
|
|
738
736
|
}
|
|
739
737
|
}), Mt = X("text", () => ({
|
|
@@ -802,8 +800,8 @@ const ae = H("emphasis"), se = K("emphasis", (r) => ({
|
|
|
802
800
|
Le,
|
|
803
801
|
xe,
|
|
804
802
|
De,
|
|
805
|
-
Oe,
|
|
806
803
|
_e,
|
|
804
|
+
Oe,
|
|
807
805
|
le,
|
|
808
806
|
pe,
|
|
809
807
|
de,
|
|
@@ -1156,7 +1154,7 @@ export {
|
|
|
1156
1154
|
it as insertImageCommand,
|
|
1157
1155
|
cr as insertImageInputRule,
|
|
1158
1156
|
Nt as keymap,
|
|
1159
|
-
|
|
1157
|
+
Oe as liftListItemCommand,
|
|
1160
1158
|
me as linkAttr,
|
|
1161
1159
|
v as linkSchema,
|
|
1162
1160
|
Te as listItemAttr,
|
|
@@ -1174,7 +1172,7 @@ export {
|
|
|
1174
1172
|
Pt as remarkLineBreak,
|
|
1175
1173
|
It as schema,
|
|
1176
1174
|
De as sinkListItemCommand,
|
|
1177
|
-
|
|
1175
|
+
_e as splitListItemCommand,
|
|
1178
1176
|
ce as strongAttr,
|
|
1179
1177
|
Ye as strongKeymap,
|
|
1180
1178
|
ie as strongSchema,
|