@milkdown/preset-commonmark 5.3.2 → 5.3.3
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/index.d.ts +1 -34
- package/lib/index.es.js +51 -36
- package/lib/index.es.js.map +1 -1
- package/lib/src/index.d.ts +34 -0
- package/lib/src/index.d.ts.map +1 -0
- package/lib/{mark → src/mark}/code-inline.d.ts +1 -1
- package/lib/src/mark/code-inline.d.ts.map +1 -0
- package/lib/{mark → src/mark}/em.d.ts +1 -1
- package/lib/src/mark/em.d.ts.map +1 -0
- package/lib/src/mark/index.d.ts +6 -0
- package/lib/src/mark/index.d.ts.map +1 -0
- package/lib/{mark → src/mark}/link.d.ts +1 -1
- package/lib/src/mark/link.d.ts.map +1 -0
- package/lib/{mark → src/mark}/strong.d.ts +1 -1
- package/lib/src/mark/strong.d.ts.map +1 -0
- package/lib/{node → src/node}/blockquote.d.ts +1 -1
- package/lib/src/node/blockquote.d.ts.map +1 -0
- package/lib/{node → src/node}/bullet-list.d.ts +1 -1
- package/lib/src/node/bullet-list.d.ts.map +1 -0
- package/lib/{node → src/node}/code-fence.d.ts +1 -1
- package/lib/src/node/code-fence.d.ts.map +1 -0
- package/lib/{node → src/node}/doc.d.ts +1 -1
- package/lib/src/node/doc.d.ts.map +1 -0
- package/lib/{node → src/node}/hardbreak.d.ts +1 -1
- package/lib/src/node/hardbreak.d.ts.map +1 -0
- package/lib/{node → src/node}/heading.d.ts +1 -1
- package/lib/src/node/heading.d.ts.map +1 -0
- package/lib/{node → src/node}/hr.d.ts +1 -1
- package/lib/src/node/hr.d.ts.map +1 -0
- package/lib/{node → src/node}/image.d.ts +1 -1
- package/lib/src/node/image.d.ts.map +1 -0
- package/lib/{node → src/node}/index.d.ts +2 -2
- package/lib/src/node/index.d.ts.map +1 -0
- package/lib/{node → src/node}/list-item.d.ts +1 -1
- package/lib/src/node/list-item.d.ts.map +1 -0
- package/lib/{node → src/node}/ordered-list.d.ts +1 -1
- package/lib/src/node/ordered-list.d.ts.map +1 -0
- package/lib/{node → src/node}/paragraph.d.ts +1 -1
- package/lib/src/node/paragraph.d.ts.map +1 -0
- package/lib/{node → src/node}/text.d.ts +1 -1
- package/lib/src/node/text.d.ts.map +1 -0
- package/lib/{plugin → src/plugin}/filter-html.d.ts +0 -0
- package/lib/src/plugin/filter-html.d.ts.map +1 -0
- package/lib/src/plugin/index.d.ts +2 -0
- package/lib/src/plugin/index.d.ts.map +1 -0
- package/lib/{supported-keys.d.ts → src/supported-keys.d.ts} +0 -0
- package/lib/src/supported-keys.d.ts.map +1 -0
- package/lib/src/types.d.ts +5 -0
- package/package.json +6 -7
- package/src/mark/code-inline.ts +1 -2
- package/src/mark/link.ts +1 -2
- package/src/mark/strong.ts +1 -2
- package/src/node/blockquote.ts +1 -2
- package/src/node/code-fence.ts +1 -2
- package/src/node/heading.ts +35 -23
- package/src/node/hr.ts +1 -2
- package/src/node/image.ts +2 -3
- package/src/node/list-item.ts +1 -2
- package/src/node/paragraph.ts +8 -9
- package/lib/index.d.ts.map +0 -1
- package/lib/mark/code-inline.d.ts.map +0 -1
- package/lib/mark/em.d.ts.map +0 -1
- package/lib/mark/index.d.ts +0 -6
- package/lib/mark/index.d.ts.map +0 -1
- package/lib/mark/link.d.ts.map +0 -1
- package/lib/mark/strong.d.ts.map +0 -1
- package/lib/node/blockquote.d.ts.map +0 -1
- package/lib/node/bullet-list.d.ts.map +0 -1
- package/lib/node/code-fence.d.ts.map +0 -1
- package/lib/node/doc.d.ts.map +0 -1
- package/lib/node/hardbreak.d.ts.map +0 -1
- package/lib/node/heading.d.ts.map +0 -1
- package/lib/node/hr.d.ts.map +0 -1
- package/lib/node/image.d.ts.map +0 -1
- package/lib/node/index.d.ts.map +0 -1
- package/lib/node/list-item.d.ts.map +0 -1
- package/lib/node/ordered-list.d.ts.map +0 -1
- package/lib/node/paragraph.d.ts.map +0 -1
- package/lib/node/text.d.ts.map +0 -1
- package/lib/plugin/filter-html.d.ts.map +0 -1
- package/lib/plugin/index.d.ts +0 -2
- package/lib/plugin/index.d.ts.map +0 -1
- package/lib/supported-keys.d.ts.map +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AtomList } from '@milkdown/utils';
|
|
2
|
+
import { commonmarkPlugins } from './plugin';
|
|
3
|
+
export * from './mark';
|
|
4
|
+
export * from './node';
|
|
5
|
+
export * from './supported-keys';
|
|
6
|
+
export declare const commonmarkNodes: AtomList<(import("@milkdown/utils/lib/src/types").Metadata<import("@milkdown/utils/lib/src/types").GetPlugin<"CodeFence", {
|
|
7
|
+
languageList?: string[] | undefined;
|
|
8
|
+
}>> & import("@milkdown/core").MilkdownPlugin) | (import("@milkdown/utils/lib/src/types").Metadata<import("@milkdown/utils/lib/src/types").GetPlugin<string, import("./node").ImageOptions>> & import("@milkdown/core").MilkdownPlugin)>;
|
|
9
|
+
export { commonmarkPlugins };
|
|
10
|
+
export declare const commonmark: AtomList<(import("@milkdown/utils/lib/src/types").Metadata<import("@milkdown/utils/lib/src/types").GetPlugin<"CodeFence", {
|
|
11
|
+
languageList?: string[] | undefined;
|
|
12
|
+
}>> & import("@milkdown/core").MilkdownPlugin) | (import("@milkdown/utils/lib/src/types").Metadata<import("@milkdown/utils/lib/src/types").GetPlugin<string, import("./node").ImageOptions>> & import("@milkdown/core").MilkdownPlugin)>;
|
|
13
|
+
export declare const commands: {
|
|
14
|
+
readonly ToggleInlineCode: import("@milkdown/core").CmdKey<undefined>;
|
|
15
|
+
readonly ToggleItalic: import("@milkdown/core").CmdKey<undefined>;
|
|
16
|
+
readonly ToggleLink: import("@milkdown/core").CmdKey<string>;
|
|
17
|
+
readonly ToggleBold: import("@milkdown/core").CmdKey<undefined>;
|
|
18
|
+
readonly ModifyLink: import("@milkdown/core").CmdKey<string>;
|
|
19
|
+
readonly ModifyImage: import("@milkdown/core").CmdKey<string>;
|
|
20
|
+
readonly WrapInBlockquote: import("@milkdown/core").CmdKey<undefined>;
|
|
21
|
+
readonly WrapInBulletList: import("@milkdown/core").CmdKey<undefined>;
|
|
22
|
+
readonly WrapInOrderedList: import("@milkdown/core").CmdKey<undefined>;
|
|
23
|
+
readonly TurnIntoCodeFence: import("@milkdown/core").CmdKey<undefined>;
|
|
24
|
+
readonly TurnIntoHeading: import("@milkdown/core").CmdKey<number>;
|
|
25
|
+
readonly TurnIntoText: import("@milkdown/core").CmdKey<undefined>;
|
|
26
|
+
readonly InsertHardbreak: import("@milkdown/core").CmdKey<undefined>;
|
|
27
|
+
readonly InsertHr: import("@milkdown/core").CmdKey<string>;
|
|
28
|
+
readonly InsertImage: import("@milkdown/core").CmdKey<string>;
|
|
29
|
+
readonly SplitListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
30
|
+
readonly SinkListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
31
|
+
readonly LiftListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
32
|
+
};
|
|
33
|
+
export declare type Commands = typeof commands;
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAmB3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AAEjC,eAAO,MAAM,eAAe;;wOAAwC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,eAAO,MAAM,UAAU;;wOAA8D,CAAC;AAEtF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;CAwBX,CAAC;AACX,oBAAY,QAAQ,GAAG,OAAO,QAAQ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const ToggleInlineCode: import("@milkdown/core").CmdKey<undefined>;
|
|
2
|
-
export declare const codeInline: import("@milkdown/utils/lib/types").WithExtend<"CodeInline", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").MarkType<any>, {
|
|
2
|
+
export declare const codeInline: import("@milkdown/utils/lib/src/types").WithExtend<"CodeInline", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").MarkType<any>, {
|
|
3
3
|
id: string;
|
|
4
4
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").MarkSchema;
|
|
5
5
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").MarkViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-inline.d.ts","sourceRoot":"","sources":["code-inline.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB,4CAAiB,CAAC;AAE/C,eAAO,MAAM,UAAU;;;;EAyCrB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const ToggleItalic: import("@milkdown/core").CmdKey<undefined>;
|
|
2
|
-
export declare const em: import("@milkdown/utils/lib/types").WithExtend<"Em", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").MarkType<any>, {
|
|
2
|
+
export declare const em: import("@milkdown/utils/lib/src/types").WithExtend<"Em", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").MarkType<any>, {
|
|
3
3
|
id: string;
|
|
4
4
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").MarkSchema;
|
|
5
5
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").MarkViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"em.d.ts","sourceRoot":"","sources":["em.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,YAAY,4CAAiB,CAAC;AAE3C,eAAO,MAAM,EAAE;;;;EAgCZ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const marks: (import("@milkdown/utils/lib/src/types").Metadata<import("@milkdown/utils/lib/src/types").GetPlugin<string, import("@milkdown/utils").UnknownRecord>> & import("@milkdown/core").MilkdownPlugin)[];
|
|
2
|
+
export * from './code-inline';
|
|
3
|
+
export * from './em';
|
|
4
|
+
export * from './link';
|
|
5
|
+
export * from './strong';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,KAAK,oMAAyC,CAAC;AAE5D,cAAc,eAAe,CAAC;AAC9B,cAAc,MAAM,CAAC;AACrB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const ToggleLink: import("@milkdown/core").CmdKey<string>;
|
|
2
2
|
export declare const ModifyLink: import("@milkdown/core").CmdKey<string>;
|
|
3
|
-
export declare const link: import("@milkdown/utils/lib/types").WithExtend<string, import("@milkdown/utils").UnknownRecord, import("prosemirror-model").MarkType<any>, {
|
|
3
|
+
export declare const link: import("@milkdown/utils/lib/src/types").WithExtend<string, import("@milkdown/utils").UnknownRecord, import("prosemirror-model").MarkType<any>, {
|
|
4
4
|
id: string;
|
|
5
5
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").MarkSchema;
|
|
6
6
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").MarkViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["link.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU,yCAAyB,CAAC;AACjD,eAAO,MAAM,UAAU,yCAAyB,CAAC;AAEjD,eAAO,MAAM,IAAI;;;;EA8Gf,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const ToggleBold: import("@milkdown/core").CmdKey<undefined>;
|
|
2
|
-
export declare const strong: import("@milkdown/utils/lib/types").WithExtend<"Bold", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").MarkType<any>, {
|
|
2
|
+
export declare const strong: import("@milkdown/utils/lib/src/types").WithExtend<"Bold", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").MarkType<any>, {
|
|
3
3
|
id: string;
|
|
4
4
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").MarkSchema;
|
|
5
5
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").MarkViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strong.d.ts","sourceRoot":"","sources":["strong.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,UAAU,4CAAiB,CAAC;AACzC,eAAO,MAAM,MAAM;;;;EAwCjB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const WrapInBlockquote: import("@milkdown/core").CmdKey<undefined>;
|
|
2
|
-
export declare const blockquote: import("@milkdown/utils/lib/types").WithExtend<"Blockquote", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
2
|
+
export declare const blockquote: import("@milkdown/utils/lib/src/types").WithExtend<"Blockquote", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
3
3
|
id: string;
|
|
4
4
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").NodeSchema;
|
|
5
5
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").NodeViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockquote.d.ts","sourceRoot":"","sources":["blockquote.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB,4CAAiB,CAAC;AAE/C,eAAO,MAAM,UAAU;;;;EAyCrB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const WrapInBulletList: import("@milkdown/core").CmdKey<undefined>;
|
|
2
|
-
export declare const bulletList: import("@milkdown/utils/lib/types").WithExtend<"BulletList", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
2
|
+
export declare const bulletList: import("@milkdown/utils/lib/src/types").WithExtend<"BulletList", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
3
3
|
id: string;
|
|
4
4
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").NodeSchema;
|
|
5
5
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").NodeViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bullet-list.d.ts","sourceRoot":"","sources":["bullet-list.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,gBAAgB,4CAAiB,CAAC;AAE/C,eAAO,MAAM,UAAU;;;;EA8BrB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const backtickInputRegex: RegExp;
|
|
2
2
|
export declare const tildeInputRegex: RegExp;
|
|
3
3
|
export declare const TurnIntoCodeFence: import("@milkdown/core").CmdKey<undefined>;
|
|
4
|
-
export declare const codeFence: import("@milkdown/utils/lib/types").WithExtend<"CodeFence", {
|
|
4
|
+
export declare const codeFence: import("@milkdown/utils/lib/src/types").WithExtend<"CodeFence", {
|
|
5
5
|
languageList?: string[] | undefined;
|
|
6
6
|
}, import("prosemirror-model").NodeType<any>, {
|
|
7
7
|
id: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-fence.d.ts","sourceRoot":"","sources":["code-fence.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,kBAAkB,QAAoC,CAAC;AACpE,eAAO,MAAM,eAAe,QAAoC,CAAC;AAEjE,eAAO,MAAM,iBAAiB,4CAAiB,CAAC;AAGhD,eAAO,MAAM,SAAS;;;;;;EA2RpB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const doc: import("@milkdown/utils/lib/types").WithExtend<string, import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
1
|
+
export declare const doc: import("@milkdown/utils/lib/src/types").WithExtend<string, import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
2
2
|
id: string;
|
|
3
3
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").NodeSchema;
|
|
4
4
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").NodeViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc.d.ts","sourceRoot":"","sources":["doc.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,GAAG;;;;EAoBd,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const InsertHardbreak: import("@milkdown/core").CmdKey<undefined>;
|
|
2
|
-
export declare const hardbreak: import("@milkdown/utils/lib/types").WithExtend<"HardBreak", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
2
|
+
export declare const hardbreak: import("@milkdown/utils/lib/src/types").WithExtend<"HardBreak", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
3
3
|
id: string;
|
|
4
4
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").NodeSchema;
|
|
5
5
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").NodeViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hardbreak.d.ts","sourceRoot":"","sources":["hardbreak.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,eAAe,4CAAiB,CAAC;AAE9C,eAAO,MAAM,SAAS;;;;EAmEpB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SupportedKeys } from '../supported-keys';
|
|
2
2
|
declare type Keys = SupportedKeys['H1'] | SupportedKeys['H2'] | SupportedKeys['H3'] | SupportedKeys['H4'] | SupportedKeys['H5'] | SupportedKeys['H6'];
|
|
3
3
|
export declare const TurnIntoHeading: import("@milkdown/core").CmdKey<number>;
|
|
4
|
-
export declare const heading: import("@milkdown/utils/lib/types").WithExtend<Keys, import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
4
|
+
export declare const heading: import("@milkdown/utils/lib/src/types").WithExtend<Keys, import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
5
5
|
id: string;
|
|
6
6
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").NodeSchema;
|
|
7
7
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").NodeViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["heading.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAMlD,aAAK,IAAI,GACH,aAAa,CAAC,IAAI,CAAC,GACnB,aAAa,CAAC,IAAI,CAAC,GACnB,aAAa,CAAC,IAAI,CAAC,GACnB,aAAa,CAAC,IAAI,CAAC,GACnB,aAAa,CAAC,IAAI,CAAC,GACnB,aAAa,CAAC,IAAI,CAAC,CAAC;AAE1B,eAAO,MAAM,eAAe,yCAAyB,CAAC;AAEtD,eAAO,MAAM,OAAO;;;;EA8FlB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const InsertHr: import("@milkdown/core").CmdKey<string>;
|
|
2
|
-
export declare const hr: import("@milkdown/utils/lib/types").WithExtend<string, import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
2
|
+
export declare const hr: import("@milkdown/utils/lib/src/types").WithExtend<string, import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
3
3
|
id: string;
|
|
4
4
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").NodeSchema;
|
|
5
5
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").NodeViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hr.d.ts","sourceRoot":"","sources":["hr.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,QAAQ,yCAAyB,CAAC;AAC/C,eAAO,MAAM,EAAE;;;;EAyDb,CAAC"}
|
|
@@ -8,7 +8,7 @@ export declare type ImageOptions = {
|
|
|
8
8
|
failed: string;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
|
-
export declare const image: import("@milkdown/utils/lib/types").WithExtend<string, ImageOptions, import("prosemirror-model").NodeType<any>, {
|
|
11
|
+
export declare const image: import("@milkdown/utils/lib/src/types").WithExtend<string, ImageOptions, import("prosemirror-model").NodeType<any>, {
|
|
12
12
|
id: string;
|
|
13
13
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").NodeSchema;
|
|
14
14
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").NodeViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["image.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW,yCAAyB,CAAC;AAClD,eAAO,MAAM,WAAW,yCAAyB,CAAC;AAElD,oBAAY,YAAY,GAAG;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE;QACT,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAClB,CAAC;CACL,CAAC;AACF,eAAO,MAAM,KAAK;;;;EAkVhB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const nodes: ((import("@milkdown/utils/lib/types").Metadata<import("@milkdown/utils/lib/types").GetPlugin<"CodeFence", {
|
|
1
|
+
export declare const nodes: ((import("@milkdown/utils/lib/src/types").Metadata<import("@milkdown/utils/lib/src/types").GetPlugin<"CodeFence", {
|
|
2
2
|
languageList?: string[] | undefined;
|
|
3
|
-
}>> & import("@milkdown/core").MilkdownPlugin) | (import("@milkdown/utils/lib/types").Metadata<import("@milkdown/utils/lib/types").GetPlugin<string, import("./image").ImageOptions>> & import("@milkdown/core").MilkdownPlugin))[];
|
|
3
|
+
}>> & import("@milkdown/core").MilkdownPlugin) | (import("@milkdown/utils/lib/src/types").Metadata<import("@milkdown/utils/lib/src/types").GetPlugin<string, import("./image").ImageOptions>> & import("@milkdown/core").MilkdownPlugin))[];
|
|
4
4
|
export * from './blockquote';
|
|
5
5
|
export * from './bullet-list';
|
|
6
6
|
export * from './code-fence';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,KAAK;;2OAajB,CAAC;AAEF,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC"}
|
|
@@ -3,7 +3,7 @@ declare type Keys = SupportedKeys['SinkListItem'] | SupportedKeys['LiftListItem'
|
|
|
3
3
|
export declare const SplitListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
4
4
|
export declare const SinkListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
5
5
|
export declare const LiftListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
6
|
-
export declare const listItem: import("@milkdown/utils/lib/types").WithExtend<Keys, import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
6
|
+
export declare const listItem: import("@milkdown/utils/lib/src/types").WithExtend<Keys, import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
7
7
|
id: string;
|
|
8
8
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").NodeSchema;
|
|
9
9
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").NodeViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-item.d.ts","sourceRoot":"","sources":["list-item.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,aAAK,IAAI,GAAG,aAAa,CAAC,cAAc,CAAC,GAAG,aAAa,CAAC,cAAc,CAAC,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;AAI1G,eAAO,MAAM,aAAa,4CAAiB,CAAC;AAC5C,eAAO,MAAM,YAAY,4CAAiB,CAAC;AAC3C,eAAO,MAAM,YAAY,4CAAiB,CAAC;AAE3C,eAAO,MAAM,QAAQ;;;;EAuDnB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const WrapInOrderedList: import("@milkdown/core").CmdKey<undefined>;
|
|
2
|
-
export declare const orderedList: import("@milkdown/utils/lib/types").WithExtend<"OrderedList", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
2
|
+
export declare const orderedList: import("@milkdown/utils/lib/src/types").WithExtend<"OrderedList", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
3
3
|
id: string;
|
|
4
4
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").NodeSchema;
|
|
5
5
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").NodeViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ordered-list.d.ts","sourceRoot":"","sources":["ordered-list.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,iBAAiB,4CAAiB,CAAC;AAGhD,eAAO,MAAM,WAAW;;;;EAwDrB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const TurnIntoText: import("@milkdown/core").CmdKey<undefined>;
|
|
2
|
-
export declare const paragraph: import("@milkdown/utils/lib/types").WithExtend<"Text", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
2
|
+
export declare const paragraph: import("@milkdown/utils/lib/src/types").WithExtend<"Text", import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
3
3
|
id: string;
|
|
4
4
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").NodeSchema;
|
|
5
5
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").NodeViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["paragraph.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,YAAY,4CAAiB,CAAC;AAG3C,eAAO,MAAM,SAAS;;;;EA0CpB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const text: import("@milkdown/utils/lib/types").WithExtend<string, import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
1
|
+
export declare const text: import("@milkdown/utils/lib/src/types").WithExtend<string, import("@milkdown/utils").UnknownRecord, import("prosemirror-model").NodeType<any>, {
|
|
2
2
|
id: string;
|
|
3
3
|
schema: (ctx: import("@milkdown/core").Ctx) => import("@milkdown/core").NodeSchema;
|
|
4
4
|
view?: ((ctx: import("@milkdown/core").Ctx) => import("@milkdown/prose").NodeViewFactory) | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["text.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI;;;;EAiBd,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-html.d.ts","sourceRoot":"","sources":["filter-html.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,IAAI,EAAU,MAAM,OAAO,CAAC;AA0B9C,eAAO,MAAM,gBAAgB,eACE,IAAI,SAUlC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB,oMAI7B,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supported-keys.d.ts","sourceRoot":"","sources":["supported-keys.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;CAmBhB,CAAC;AAEX,oBAAY,aAAa,GAAG,OAAO,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milkdown/preset-commonmark",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./lib/index.es.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -17,11 +17,10 @@
|
|
|
17
17
|
"commonmark"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@
|
|
21
|
-
"@milkdown/
|
|
22
|
-
"@milkdown/
|
|
23
|
-
"@milkdown/
|
|
24
|
-
"@milkdown/utils": "5.3.2",
|
|
20
|
+
"@milkdown/prose": "5.3.3",
|
|
21
|
+
"@milkdown/core": "5.3.3",
|
|
22
|
+
"@milkdown/design-system": "5.3.3",
|
|
23
|
+
"@milkdown/utils": "5.3.3",
|
|
25
24
|
"remark-inline-links": "^6.0.0",
|
|
26
25
|
"tslib": "^2.3.1"
|
|
27
26
|
},
|
|
@@ -29,7 +28,7 @@
|
|
|
29
28
|
"start": "vite build --watch",
|
|
30
29
|
"test": "vitest",
|
|
31
30
|
"tsc": "tsc --noEmit",
|
|
32
|
-
"build": "vite build
|
|
31
|
+
"build": "vite build"
|
|
33
32
|
},
|
|
34
33
|
"readme": "# @milkdown/preset-commonmark\n\nCommon mark preset for [milkdown](https://saul-mirone.github.io/milkdown/).\nAdd support for commonmark.\n\n# Example Usage\n\n```typescript\nimport { Editor } from '@milkdown/core';\nimport { nord } from '@milkdown/theme-nord';\n\nimport { commonmark } from '@milkdown/preset-commonmark';\n\nEditor.make().use(nord).use(commonmark).create();\n```\n\n## Custom Keymap\n\n```typescript\nimport { commonmarkNodes, commonmarkPlugins, blockquote, SupportedKeys } from '@milkdown/preset-commonmark';\n\nconst nodes = commonmarkNodes.configure(blockquote, {\n keymap: {\n [SupportedKeys.Blockquote]: 'Mod-Shift-b',\n },\n});\n\nEditor.make().use(commonmarkPlugins).use(nodes);\n```\n\nKeymap supported:\n\n- HardBreak\n- Blockquote\n- BulletList\n- OrderedList\n- CodeFence\n- H1\n- H2\n- H3\n- H4\n- H5\n- H6\n- Text\n- CodeInline\n- Em\n- Bold\n- NextListItem\n- SinkListItem\n- LiftListItem\n\n## Custom Style\n\n```typescript\nimport { commonmark, Paragraph, Heading } from '@milkdown/commonmark';\n\nconst nodes = commonmark\n .configure(Paragraph, {\n className: () =>\n 'my-custom-paragraph'\n })\n .configure(Heading, {\n className: (attrs) =>\n `my-custom-heading my-h${attrs.level}`\n })\n\nnew Editor({ ... }).use(nodes);\n```\n\n## Other Options\n\n### Image\n\n- placeholder\n - loading: _string_. The placeholder of loading status.\n - empty: _string_. The placeholder of empty status.\n - failed: _string_. The placeholder of failed status.\n\n### CodeFence\n\n- languageList: _string[]_. The selectable languages list of code fence needs to be enabled.\n\n# License\n\nMilkdown is open sourced software licensed under [MIT license](https://github.com/Saul-Mirone/milkdown/blob/main/LICENSE).\n"
|
|
35
34
|
}
|
package/src/mark/code-inline.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
|
-
import { css } from '@emotion/css';
|
|
3
2
|
import { createCmd, createCmdKey } from '@milkdown/core';
|
|
4
3
|
import { markRule, toggleMark } from '@milkdown/prose';
|
|
5
4
|
import { createMark, createShortcut } from '@milkdown/utils';
|
|
@@ -13,7 +12,7 @@ export const ToggleInlineCode = createCmdKey();
|
|
|
13
12
|
|
|
14
13
|
export const codeInline = createMark<Keys>((utils) => {
|
|
15
14
|
const style = utils.getStyle(
|
|
16
|
-
({ palette, size, font }) =>
|
|
15
|
+
({ palette, size, font }, { css }) =>
|
|
17
16
|
css`
|
|
18
17
|
background-color: ${palette('neutral')};
|
|
19
18
|
color: ${palette('background')};
|
package/src/mark/link.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
|
-
import { css } from '@emotion/css';
|
|
3
2
|
import { createCmd, createCmdKey, schemaCtx } from '@milkdown/core';
|
|
4
3
|
import { InputRule, Node as ProseNode, TextSelection, toggleMark } from '@milkdown/prose';
|
|
5
4
|
import { createMark } from '@milkdown/utils';
|
|
@@ -8,7 +7,7 @@ export const ToggleLink = createCmdKey<string>();
|
|
|
8
7
|
export const ModifyLink = createCmdKey<string>();
|
|
9
8
|
const id = 'link';
|
|
10
9
|
export const link = createMark((utils) => {
|
|
11
|
-
const style = utils.getStyle((themeTool) => {
|
|
10
|
+
const style = utils.getStyle((themeTool, { css }) => {
|
|
12
11
|
const lineColor = themeTool.palette('line');
|
|
13
12
|
|
|
14
13
|
return css`
|
package/src/mark/strong.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
|
-
import { css } from '@emotion/css';
|
|
3
2
|
import { createCmd, createCmdKey } from '@milkdown/core';
|
|
4
3
|
import { markRule, toggleMark } from '@milkdown/prose';
|
|
5
4
|
import { createMark, createShortcut } from '@milkdown/utils';
|
|
@@ -11,7 +10,7 @@ const id = 'strong';
|
|
|
11
10
|
export const ToggleBold = createCmdKey();
|
|
12
11
|
export const strong = createMark<Keys>((utils) => {
|
|
13
12
|
const style = utils.getStyle(
|
|
14
|
-
() =>
|
|
13
|
+
(_, { css }) =>
|
|
15
14
|
css`
|
|
16
15
|
font-weight: 600;
|
|
17
16
|
`,
|
package/src/node/blockquote.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
|
-
import { css } from '@emotion/css';
|
|
3
2
|
import { createCmd, createCmdKey } from '@milkdown/core';
|
|
4
3
|
import { wrapIn, wrappingInputRule } from '@milkdown/prose';
|
|
5
4
|
import { createNode, createShortcut } from '@milkdown/utils';
|
|
@@ -14,7 +13,7 @@ export const WrapInBlockquote = createCmdKey();
|
|
|
14
13
|
|
|
15
14
|
export const blockquote = createNode<Keys>((utils) => {
|
|
16
15
|
const style = utils.getStyle(
|
|
17
|
-
(themeTool) =>
|
|
16
|
+
(themeTool, { css }) =>
|
|
18
17
|
css`
|
|
19
18
|
padding-left: 1.875rem;
|
|
20
19
|
line-height: 1.75rem;
|
package/src/node/code-fence.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
|
-
import { css } from '@emotion/css';
|
|
3
2
|
import { createCmd, createCmdKey, themeToolCtx } from '@milkdown/core';
|
|
4
3
|
import { setBlockType, textblockTypeInputRule } from '@milkdown/prose';
|
|
5
4
|
import { createNode, createShortcut } from '@milkdown/utils';
|
|
@@ -34,7 +33,7 @@ export const TurnIntoCodeFence = createCmdKey();
|
|
|
34
33
|
|
|
35
34
|
const id = 'fence';
|
|
36
35
|
export const codeFence = createNode<Keys, { languageList?: string[] }>((utils, options) => {
|
|
37
|
-
const style = utils.getStyle(({ palette, mixin, size, font }) => {
|
|
36
|
+
const style = utils.getStyle(({ palette, mixin, size, font }, { css }) => {
|
|
38
37
|
const { shadow, scrollbar, border } = mixin;
|
|
39
38
|
const { lineWidth, radius } = size;
|
|
40
39
|
return css`
|
package/src/node/heading.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
|
-
import { css } from '@emotion/css';
|
|
3
2
|
import { createCmd, createCmdKey } from '@milkdown/core';
|
|
4
3
|
import { setBlockType, textblockTypeInputRule } from '@milkdown/prose';
|
|
5
4
|
import { createNode, createShortcut } from '@milkdown/utils';
|
|
@@ -20,31 +19,44 @@ type Keys =
|
|
|
20
19
|
|
|
21
20
|
export const TurnIntoHeading = createCmdKey<number>();
|
|
22
21
|
|
|
23
|
-
export const heading = createNode<Keys>((utils
|
|
22
|
+
export const heading = createNode<Keys>((utils) => {
|
|
24
23
|
const id = 'heading';
|
|
25
|
-
const headingMap: Record<number, string> = {
|
|
26
|
-
1: css`
|
|
27
|
-
font-size: 3rem;
|
|
28
|
-
line-height: 3.5rem;
|
|
29
|
-
`,
|
|
30
|
-
2: css`
|
|
31
|
-
font-size: 2.125rem;
|
|
32
|
-
line-height: 2.25rem;
|
|
33
|
-
`,
|
|
34
|
-
3: css`
|
|
35
|
-
font-size: 1.5rem;
|
|
36
|
-
line-height: 1.5rem;
|
|
37
|
-
`,
|
|
38
|
-
};
|
|
39
24
|
|
|
40
25
|
const style = (level: number) =>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
26
|
+
utils.getStyle((_, { css }) => {
|
|
27
|
+
const headingMap: Record<number, string> = {
|
|
28
|
+
1: css`
|
|
29
|
+
font-size: 3rem;
|
|
30
|
+
line-height: 3.5rem;
|
|
31
|
+
`,
|
|
32
|
+
2: css`
|
|
33
|
+
font-size: 2.5rem;
|
|
34
|
+
line-height: 3rem;
|
|
35
|
+
`,
|
|
36
|
+
3: css`
|
|
37
|
+
font-size: 2.125rem;
|
|
38
|
+
line-height: 2.25rem;
|
|
39
|
+
`,
|
|
40
|
+
4: css`
|
|
41
|
+
font-size: 1.75rem;
|
|
42
|
+
line-height: 2rem;
|
|
43
|
+
`,
|
|
44
|
+
5: css`
|
|
45
|
+
font-size: 1.5rem;
|
|
46
|
+
line-height: 1.5rem;
|
|
47
|
+
`,
|
|
48
|
+
6: css`
|
|
49
|
+
font-size: 1.25rem;
|
|
50
|
+
line-height: 1.25rem;
|
|
51
|
+
`,
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
return css`
|
|
55
|
+
${headingMap[level] || ''}
|
|
56
|
+
margin: 2.5rem 0 !important;
|
|
57
|
+
font-weight: 400;
|
|
58
|
+
`;
|
|
59
|
+
});
|
|
48
60
|
|
|
49
61
|
return {
|
|
50
62
|
id,
|
package/src/node/hr.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
|
-
import { css } from '@emotion/css';
|
|
3
2
|
import { createCmd, createCmdKey, schemaCtx } from '@milkdown/core';
|
|
4
3
|
import { InputRule, Selection } from '@milkdown/prose';
|
|
5
4
|
import { createNode } from '@milkdown/utils';
|
|
@@ -8,7 +7,7 @@ const id = 'hr';
|
|
|
8
7
|
export const InsertHr = createCmdKey<string>();
|
|
9
8
|
export const hr = createNode((utils) => {
|
|
10
9
|
const style = utils.getStyle(
|
|
11
|
-
(themeTool) => css`
|
|
10
|
+
(themeTool, { css }) => css`
|
|
12
11
|
height: ${themeTool.size.lineWidth};
|
|
13
12
|
background-color: ${themeTool.palette('line')};
|
|
14
13
|
border-width: 0;
|
package/src/node/image.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
|
-
import { css } from '@emotion/css';
|
|
3
2
|
import { createCmd, createCmdKey, themeToolCtx } from '@milkdown/core';
|
|
4
3
|
import type { Icon } from '@milkdown/design-system';
|
|
5
4
|
import { findSelectedNodeOfType, InputRule } from '@milkdown/prose';
|
|
@@ -25,7 +24,7 @@ export const image = createNode<string, ImageOptions>((utils, options) => {
|
|
|
25
24
|
};
|
|
26
25
|
const isBlock = options?.isBlock ?? false;
|
|
27
26
|
const containerStyle = utils.getStyle(
|
|
28
|
-
(themeTool) =>
|
|
27
|
+
(themeTool, { css }) =>
|
|
29
28
|
css`
|
|
30
29
|
display: inline-block;
|
|
31
30
|
position: relative;
|
|
@@ -123,7 +122,7 @@ export const image = createNode<string, ImageOptions>((utils, options) => {
|
|
|
123
122
|
);
|
|
124
123
|
|
|
125
124
|
const style = utils.getStyle(
|
|
126
|
-
() =>
|
|
125
|
+
(_, { css }) =>
|
|
127
126
|
css`
|
|
128
127
|
display: inline-block;
|
|
129
128
|
margin: 0 auto;
|
package/src/node/list-item.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
|
-
import { css } from '@emotion/css';
|
|
3
2
|
import { createCmd, createCmdKey } from '@milkdown/core';
|
|
4
3
|
import { liftListItem, sinkListItem, splitListItem, wrappingInputRule } from '@milkdown/prose';
|
|
5
4
|
import { createNode, createShortcut } from '@milkdown/utils';
|
|
@@ -16,7 +15,7 @@ export const LiftListItem = createCmdKey();
|
|
|
16
15
|
|
|
17
16
|
export const listItem = createNode<Keys>((utils) => {
|
|
18
17
|
const style = utils.getStyle(
|
|
19
|
-
(themeTool) =>
|
|
18
|
+
(themeTool, { css }) =>
|
|
20
19
|
css`
|
|
21
20
|
&,
|
|
22
21
|
& > * {
|
package/src/node/paragraph.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
|
-
import { css } from '@emotion/css';
|
|
3
2
|
import { createCmd, createCmdKey } from '@milkdown/core';
|
|
4
3
|
import { setBlockType } from '@milkdown/prose';
|
|
5
4
|
import { createNode, createShortcut } from '@milkdown/utils';
|
|
@@ -11,14 +10,14 @@ type Keys = SupportedKeys['Text'];
|
|
|
11
10
|
export const TurnIntoText = createCmdKey();
|
|
12
11
|
|
|
13
12
|
const id = 'paragraph';
|
|
14
|
-
export const paragraph = createNode<Keys>((utils
|
|
15
|
-
const style =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
export const paragraph = createNode<Keys>((utils) => {
|
|
14
|
+
const style = utils.getStyle((_, { css }) => {
|
|
15
|
+
return css`
|
|
16
|
+
font-size: 1rem;
|
|
17
|
+
line-height: 1.5;
|
|
18
|
+
letter-spacing: 0.5px;
|
|
19
|
+
`;
|
|
20
|
+
});
|
|
22
21
|
|
|
23
22
|
return {
|
|
24
23
|
id,
|
package/lib/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAmB3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AAEjC,eAAO,MAAM,eAAe;;gOAAwC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,eAAO,MAAM,UAAU;;gOAA8D,CAAC;AAEtF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;CAwBX,CAAC;AACX,oBAAY,QAAQ,GAAG,OAAO,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code-inline.d.ts","sourceRoot":"","sources":["../../src/mark/code-inline.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB,4CAAiB,CAAC;AAE/C,eAAO,MAAM,UAAU;;;;EAyCrB,CAAC"}
|
package/lib/mark/em.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"em.d.ts","sourceRoot":"","sources":["../../src/mark/em.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,YAAY,4CAAiB,CAAC;AAE3C,eAAO,MAAM,EAAE;;;;EAgCZ,CAAC"}
|
package/lib/mark/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const marks: (import("@milkdown/utils/lib/types").Metadata<import("@milkdown/utils/lib/types").GetPlugin<string, import("@milkdown/utils").UnknownRecord>> & import("@milkdown/core").MilkdownPlugin)[];
|
|
2
|
-
export * from './code-inline';
|
|
3
|
-
export * from './em';
|
|
4
|
-
export * from './link';
|
|
5
|
-
export * from './strong';
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/mark/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mark/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,KAAK,4LAAyC,CAAC;AAE5D,cAAc,eAAe,CAAC;AAC9B,cAAc,MAAM,CAAC;AACrB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
package/lib/mark/link.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/mark/link.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU,yCAAyB,CAAC;AACjD,eAAO,MAAM,UAAU,yCAAyB,CAAC;AAEjD,eAAO,MAAM,IAAI;;;;EA8Gf,CAAC"}
|