@milkdown/preset-gfm 5.5.0 → 6.0.0
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/README.md +4 -4
- package/lib/{src/auto-link.d.ts → auto-link.d.ts} +0 -0
- package/lib/auto-link.d.ts.map +1 -0
- package/lib/footnote/definition.d.ts +7 -0
- package/lib/footnote/definition.d.ts.map +1 -0
- package/lib/footnote/index.d.ts +3 -0
- package/lib/footnote/index.d.ts.map +1 -0
- package/lib/footnote/reference.d.ts +7 -0
- package/lib/footnote/reference.d.ts.map +1 -0
- package/lib/footnote/utils.d.ts +3 -0
- package/lib/footnote/utils.d.ts.map +1 -0
- package/lib/index.d.ts +37 -1
- package/lib/index.d.ts.map +1 -0
- package/lib/index.es.js +569 -426
- package/lib/index.es.js.map +1 -1
- package/lib/{src/strike-through.d.ts → strike-through.d.ts} +1 -1
- package/lib/strike-through.d.ts.map +1 -0
- package/lib/{src/supported-keys.d.ts → supported-keys.d.ts} +0 -0
- package/lib/supported-keys.d.ts.map +1 -0
- package/lib/{src/table → table}/command.d.ts +0 -0
- package/lib/table/command.d.ts.map +1 -0
- package/lib/{src/table → table}/index.d.ts +0 -0
- package/lib/table/index.d.ts.map +1 -0
- package/lib/{src/table → table}/nodes/index.d.ts +3 -3
- package/lib/table/nodes/index.d.ts.map +1 -0
- package/lib/{src/table → table}/nodes/schema.d.ts +0 -0
- package/lib/table/nodes/schema.d.ts.map +1 -0
- package/lib/{src/table → table}/operator-plugin/actions.d.ts +0 -0
- package/lib/table/operator-plugin/actions.d.ts.map +1 -0
- package/lib/{src/table → table}/operator-plugin/calc-pos.d.ts +0 -0
- package/lib/table/operator-plugin/calc-pos.d.ts.map +1 -0
- package/lib/{src/table → table}/operator-plugin/constant.d.ts +0 -0
- package/lib/table/operator-plugin/constant.d.ts.map +1 -0
- package/lib/{src/table → table}/operator-plugin/helper.d.ts +0 -0
- package/lib/table/operator-plugin/helper.d.ts.map +1 -0
- package/lib/{src/table → table}/operator-plugin/index.d.ts +0 -0
- package/lib/table/operator-plugin/index.d.ts.map +1 -0
- package/lib/table/operator-plugin/style.d.ts +3 -0
- package/lib/table/operator-plugin/style.d.ts.map +1 -0
- package/lib/{src/table → table}/operator-plugin/widget.d.ts +0 -0
- package/lib/table/operator-plugin/widget.d.ts.map +1 -0
- package/lib/{src/table → table}/utils.d.ts +1 -0
- package/lib/table/utils.d.ts.map +1 -0
- package/lib/{src/task-list-item.d.ts → task-list-item.d.ts} +1 -1
- package/lib/task-list-item.d.ts.map +1 -0
- package/package.json +36 -12
- package/src/footnote/definition.ts +184 -0
- package/src/footnote/index.ts +3 -0
- package/src/footnote/reference.ts +171 -0
- package/src/footnote/utils.ts +4 -0
- package/src/index.ts +5 -0
- package/src/strike-through.ts +2 -9
- package/src/table/nodes/index.ts +0 -2
- package/src/table/operator-plugin/actions.ts +9 -9
- package/src/table/operator-plugin/index.ts +9 -8
- package/src/table/operator-plugin/style.ts +109 -37
- package/src/table/operator-plugin/widget.ts +3 -4
- package/src/task-list-item.ts +62 -127
- package/lib/src/auto-link.d.ts.map +0 -1
- package/lib/src/index.d.ts +0 -36
- package/lib/src/index.d.ts.map +0 -1
- package/lib/src/strike-through.d.ts.map +0 -1
- package/lib/src/supported-keys.d.ts.map +0 -1
- package/lib/src/table/command.d.ts.map +0 -1
- package/lib/src/table/index.d.ts.map +0 -1
- package/lib/src/table/nodes/index.d.ts.map +0 -1
- package/lib/src/table/nodes/schema.d.ts.map +0 -1
- package/lib/src/table/nodes/style.d.ts +0 -3
- package/lib/src/table/nodes/style.d.ts.map +0 -1
- package/lib/src/table/operator-plugin/actions.d.ts.map +0 -1
- package/lib/src/table/operator-plugin/calc-pos.d.ts.map +0 -1
- package/lib/src/table/operator-plugin/constant.d.ts.map +0 -1
- package/lib/src/table/operator-plugin/helper.d.ts.map +0 -1
- package/lib/src/table/operator-plugin/index.d.ts.map +0 -1
- package/lib/src/table/operator-plugin/style.d.ts +0 -3
- package/lib/src/table/operator-plugin/style.d.ts.map +0 -1
- package/lib/src/table/operator-plugin/widget.d.ts.map +0 -1
- package/lib/src/table/utils.d.ts.map +0 -1
- package/lib/src/task-list-item.d.ts.map +0 -1
- package/src/table/nodes/style.ts +0 -170
package/README.md
CHANGED
|
@@ -17,9 +17,9 @@ Editor.make().use(nord).use(gfm).create();
|
|
|
17
17
|
## Custom Keymap
|
|
18
18
|
|
|
19
19
|
```typescript
|
|
20
|
-
import {
|
|
20
|
+
import { gfm, blockquote, SupportedKeys } from '@milkdown/preset-gfm';
|
|
21
21
|
|
|
22
|
-
const nodes =
|
|
22
|
+
const nodes = gfm.configure(blockquote, {
|
|
23
23
|
keymap: {
|
|
24
24
|
[SupportedKeys.Blockquote]: 'Mod-Shift-b',
|
|
25
25
|
},
|
|
@@ -57,9 +57,9 @@ Keymap supported:
|
|
|
57
57
|
## Custom Style
|
|
58
58
|
|
|
59
59
|
```typescript
|
|
60
|
-
import {
|
|
60
|
+
import { gfm, paragraph, heading } from '@milkdown/preset-gfm';
|
|
61
61
|
|
|
62
|
-
const nodes =
|
|
62
|
+
const nodes = gfm
|
|
63
63
|
.configure(paragraph, {
|
|
64
64
|
className: () => 'my-custom-paragraph',
|
|
65
65
|
})
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-link.d.ts","sourceRoot":"","sources":["../src/auto-link.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,SAAS,kCAAiC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const ModifyFootnoteDef: import("@milkdown/core").CmdKey<string>;
|
|
2
|
+
export declare const footnoteDefinition: import("@milkdown/utils/lib/types").WithExtend<string, import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
3
|
+
id: string;
|
|
4
|
+
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").NodeSchema;
|
|
5
|
+
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").NodeViewFactory) | undefined;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/footnote/definition.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,iBAAiB,yCAA4C,CAAC;AAE3E,eAAO,MAAM,kBAAkB;;;;EAqK7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/footnote/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const ModifyFootnoteRef: import("@milkdown/core").CmdKey<string>;
|
|
2
|
+
export declare const footnoteReference: import("@milkdown/utils/lib/types").WithExtend<string, import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
3
|
+
id: string;
|
|
4
|
+
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").NodeSchema;
|
|
5
|
+
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").NodeViewFactory) | undefined;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=reference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../src/footnote/reference.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,iBAAiB,yCAA4C,CAAC;AAG3E,eAAO,MAAM,iBAAiB;;;;EA+J5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/footnote/utils.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,UAAW,MAAM,WAA4B,CAAC;AAE3E,eAAO,MAAM,gBAAgB,UAAW,MAAM,WAA4B,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
import { AtomList } from '@milkdown/utils';
|
|
2
|
+
export * from './footnote';
|
|
3
|
+
export * from './strike-through';
|
|
4
|
+
export { SupportedKeys } from './supported-keys';
|
|
5
|
+
export { BreakTable, createTable, InsertTable, NextCell, PrevCell, table, } from './table';
|
|
6
|
+
export * from './task-list-item';
|
|
7
|
+
export { blockquote, bulletList, codeFence, codeInline, commonmark, commonmarkNodes, commonmarkPlugins, doc, em, hardbreak, heading, hr, image, InsertHardbreak, InsertHr, InsertImage, LiftListItem, link, listItem, ModifyImage, ModifyLink, orderedList, paragraph, SinkListItem, SplitListItem, strong, text, ToggleBold, ToggleInlineCode, ToggleItalic, ToggleLink, TurnIntoCodeFence, TurnIntoHeading, TurnIntoText, WrapInBlockquote, WrapInBulletList, WrapInOrderedList, } from '@milkdown/preset-commonmark';
|
|
8
|
+
export declare const gfm: AtomList<import("@milkdown/utils").$Prose | import("@milkdown/utils").$Remark | (import("@milkdown/utils/lib/types").Metadata<import("@milkdown/utils/lib/types").GetPlugin<string, import("@milkdown/preset-commonmark").ImageOptions>> & import("@milkdown/core").MilkdownPlugin) | (import("@milkdown/utils/lib/types").Metadata<import("@milkdown/utils/lib/types").GetPlugin<"CodeFence", {
|
|
9
|
+
languageList?: string[] | undefined;
|
|
10
|
+
}>> & import("@milkdown/core").MilkdownPlugin)>;
|
|
11
|
+
export declare const commands: {
|
|
12
|
+
readonly ToggleStrikeThrough: import("@milkdown/core").CmdKey<undefined>;
|
|
13
|
+
readonly TurnIntoTaskList: import("@milkdown/core").CmdKey<undefined>;
|
|
14
|
+
readonly SinkTaskListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
15
|
+
readonly LiftTaskListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
16
|
+
readonly SplitTaskListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
17
|
+
readonly ToggleInlineCode: import("@milkdown/core").CmdKey<undefined>;
|
|
18
|
+
readonly ToggleItalic: import("@milkdown/core").CmdKey<undefined>;
|
|
19
|
+
readonly ToggleLink: import("@milkdown/core").CmdKey<string>;
|
|
20
|
+
readonly ToggleBold: import("@milkdown/core").CmdKey<undefined>;
|
|
21
|
+
readonly ModifyLink: import("@milkdown/core").CmdKey<string>;
|
|
22
|
+
readonly ModifyImage: import("@milkdown/core").CmdKey<string>;
|
|
23
|
+
readonly WrapInBlockquote: import("@milkdown/core").CmdKey<undefined>;
|
|
24
|
+
readonly WrapInBulletList: import("@milkdown/core").CmdKey<undefined>;
|
|
25
|
+
readonly WrapInOrderedList: import("@milkdown/core").CmdKey<undefined>;
|
|
26
|
+
readonly TurnIntoCodeFence: import("@milkdown/core").CmdKey<undefined>;
|
|
27
|
+
readonly TurnIntoHeading: import("@milkdown/core").CmdKey<number>;
|
|
28
|
+
readonly TurnIntoText: import("@milkdown/core").CmdKey<undefined>;
|
|
29
|
+
readonly InsertHardbreak: import("@milkdown/core").CmdKey<undefined>;
|
|
30
|
+
readonly InsertHr: import("@milkdown/core").CmdKey<string>;
|
|
31
|
+
readonly InsertImage: import("@milkdown/core").CmdKey<string>;
|
|
32
|
+
readonly SplitListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
33
|
+
readonly SinkListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
34
|
+
readonly LiftListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
35
|
+
};
|
|
36
|
+
export declare type Commands = typeof commands;
|
|
37
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAgBpD,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACH,UAAU,EAEV,WAAW,EACX,WAAW,EACX,QAAQ,EACR,QAAQ,EAER,KAAK,GACR,MAAM,SAAS,CAAC;AACjB,cAAc,kBAAkB,CAAC;AACjC,OAAO,EACH,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EAEV,eAAe,EACf,iBAAiB,EAEjB,GAAG,EACH,EAAE,EACF,SAAS,EACT,OAAO,EACP,EAAE,EACF,KAAK,EAEL,eAAe,EACf,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,WAAW,EACX,SAAS,EACT,YAAY,EACZ,aAAa,EACb,MAAM,EACN,IAAI,EACJ,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,GACpB,MAAM,6BAA6B,CAAC;AAErC,eAAO,MAAM,GAAG;;+CASd,CAAC;AAEH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;CAOX,CAAC;AACX,oBAAY,QAAQ,GAAG,OAAO,QAAQ,CAAC"}
|