@milkdown/preset-commonmark 5.2.1 → 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 +73 -53
- 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 +13 -25
- package/src/mark/code-inline.ts +6 -7
- package/src/mark/link.ts +1 -2
- package/src/mark/strong.ts +1 -2
- package/src/node/blockquote.ts +1 -2
- package/src/node/bullet-list.ts +1 -1
- package/src/node/code-fence.ts +7 -6
- package/src/node/heading.ts +36 -26
- package/src/node/hr.ts +1 -2
- package/src/node/image.ts +10 -7
- package/src/node/list-item.ts +1 -2
- package/src/node/ordered-list.ts +1 -1
- package/src/node/paragraph.ts +8 -9
- package/lib/index.cjs.js +0 -261
- package/lib/index.cjs.js.map +0 -1
- 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
package/lib/index.d.ts
CHANGED
|
@@ -1,34 +1 @@
|
|
|
1
|
-
|
|
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/types").Metadata<import("@milkdown/utils/lib/types").GetPlugin<"CodeFence", {
|
|
7
|
-
languageList?: string[] | undefined;
|
|
8
|
-
}>> & import("@milkdown/core").MilkdownPlugin) | (import("@milkdown/utils/lib/types").Metadata<import("@milkdown/utils/lib/types").GetPlugin<string, import("./node").ImageOptions>> & import("@milkdown/core").MilkdownPlugin)>;
|
|
9
|
-
export { commonmarkPlugins };
|
|
10
|
-
export declare const commonmark: AtomList<(import("@milkdown/utils/lib/types").Metadata<import("@milkdown/utils/lib/types").GetPlugin<"CodeFence", {
|
|
11
|
-
languageList?: string[] | undefined;
|
|
12
|
-
}>> & import("@milkdown/core").MilkdownPlugin) | (import("@milkdown/utils/lib/types").Metadata<import("@milkdown/utils/lib/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
|
|
1
|
+
export * from './src/index'
|
package/lib/index.es.js
CHANGED
|
@@ -18,7 +18,6 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { createMark, createShortcut, createNode, createPlugin, AtomList } from "@milkdown/utils";
|
|
21
|
-
import { css } from "@emotion/css";
|
|
22
21
|
import { createCmdKey, createCmd, schemaCtx, themeToolCtx } from "@milkdown/core";
|
|
23
22
|
import { markRule, toggleMark, TextSelection, InputRule, wrappingInputRule, wrapIn, textblockTypeInputRule, setBlockType, Plugin, PluginKey, ReplaceStep, AddMarkStep, Selection, findSelectedNodeOfType, splitListItem, sinkListItem, liftListItem } from "@milkdown/prose";
|
|
24
23
|
import links from "remark-inline-links";
|
|
@@ -45,7 +44,7 @@ const SupportedKeys = {
|
|
|
45
44
|
const id$a = "code_inline";
|
|
46
45
|
const ToggleInlineCode = createCmdKey();
|
|
47
46
|
const codeInline = createMark((utils) => {
|
|
48
|
-
const style = utils.getStyle(({ palette, size, font }) => css`
|
|
47
|
+
const style = utils.getStyle(({ palette, size, font }, { css }) => css`
|
|
49
48
|
background-color: ${palette("neutral")};
|
|
50
49
|
color: ${palette("background")};
|
|
51
50
|
border-radius: ${size.radius};
|
|
@@ -56,7 +55,9 @@ const codeInline = createMark((utils) => {
|
|
|
56
55
|
return {
|
|
57
56
|
id: id$a,
|
|
58
57
|
schema: () => ({
|
|
59
|
-
|
|
58
|
+
priority: 100,
|
|
59
|
+
code: true,
|
|
60
|
+
inclusive: false,
|
|
60
61
|
parseDOM: [{ tag: "code" }],
|
|
61
62
|
toDOM: (mark) => ["code", { class: utils.getClassName(mark.attrs, "code-inline", style) }],
|
|
62
63
|
parseMarkdown: {
|
|
@@ -69,9 +70,8 @@ const codeInline = createMark((utils) => {
|
|
|
69
70
|
},
|
|
70
71
|
toMarkdown: {
|
|
71
72
|
match: (mark) => mark.type.name === id$a,
|
|
72
|
-
runner: (state,
|
|
73
|
-
state.
|
|
74
|
-
return true;
|
|
73
|
+
runner: (state, mark, node) => {
|
|
74
|
+
state.withMark(mark, "inlineCode", node.text || "");
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}),
|
|
@@ -121,7 +121,7 @@ const ToggleLink = createCmdKey();
|
|
|
121
121
|
const ModifyLink = createCmdKey();
|
|
122
122
|
const id$8 = "link";
|
|
123
123
|
const link = createMark((utils) => {
|
|
124
|
-
const style = utils.getStyle((themeTool) => {
|
|
124
|
+
const style = utils.getStyle((themeTool, { css }) => {
|
|
125
125
|
const lineColor = themeTool.palette("line");
|
|
126
126
|
return css`
|
|
127
127
|
color: ${themeTool.palette("secondary")};
|
|
@@ -220,7 +220,7 @@ const link = createMark((utils) => {
|
|
|
220
220
|
const id$7 = "strong";
|
|
221
221
|
const ToggleBold = createCmdKey();
|
|
222
222
|
const strong = createMark((utils) => {
|
|
223
|
-
const style = utils.getStyle(() => css`
|
|
223
|
+
const style = utils.getStyle((_, { css }) => css`
|
|
224
224
|
font-weight: 600;
|
|
225
225
|
`);
|
|
226
226
|
return {
|
|
@@ -261,7 +261,7 @@ const marks = [codeInline(), em(), strong(), link()];
|
|
|
261
261
|
const id$6 = "blockquote";
|
|
262
262
|
const WrapInBlockquote = createCmdKey();
|
|
263
263
|
const blockquote = createNode((utils) => {
|
|
264
|
-
const style = utils.getStyle((themeTool) => css`
|
|
264
|
+
const style = utils.getStyle((themeTool, { css }) => css`
|
|
265
265
|
padding-left: 1.875rem;
|
|
266
266
|
line-height: 1.75rem;
|
|
267
267
|
border-left: 4px solid ${themeTool.palette("primary")};
|
|
@@ -326,7 +326,7 @@ const bulletList = createNode((utils) => {
|
|
|
326
326
|
inputRules: (nodeType) => [wrappingInputRule(/^\s*([-+*])\s$/, nodeType)],
|
|
327
327
|
commands: (nodeType) => [createCmd(WrapInBulletList, () => wrapIn(nodeType))],
|
|
328
328
|
shortcuts: {
|
|
329
|
-
[SupportedKeys.BulletList]: createShortcut(WrapInBulletList, "Mod-
|
|
329
|
+
[SupportedKeys.BulletList]: createShortcut(WrapInBulletList, "Mod-Alt-8")
|
|
330
330
|
}
|
|
331
331
|
};
|
|
332
332
|
});
|
|
@@ -353,7 +353,7 @@ const tildeInputRegex = /^~~~(?<language>[a-z]*)?[\s\n]$/;
|
|
|
353
353
|
const TurnIntoCodeFence = createCmdKey();
|
|
354
354
|
const id$5 = "fence";
|
|
355
355
|
const codeFence = createNode((utils, options) => {
|
|
356
|
-
const style = utils.getStyle(({ palette, mixin, size, font }) => {
|
|
356
|
+
const style = utils.getStyle(({ palette, mixin, size, font }, { css }) => {
|
|
357
357
|
const { shadow, scrollbar, border } = mixin;
|
|
358
358
|
const { lineWidth, radius } = size;
|
|
359
359
|
return css`
|
|
@@ -388,7 +388,7 @@ const codeFence = createNode((utils, options) => {
|
|
|
388
388
|
height: 2.625rem;
|
|
389
389
|
align-items: center;
|
|
390
390
|
|
|
391
|
-
& >
|
|
391
|
+
& > .icon {
|
|
392
392
|
width: 2.625rem;
|
|
393
393
|
height: 100%;
|
|
394
394
|
display: flex;
|
|
@@ -489,12 +489,12 @@ const codeFence = createNode((utils, options) => {
|
|
|
489
489
|
],
|
|
490
490
|
toDOM: (node) => {
|
|
491
491
|
return [
|
|
492
|
-
"
|
|
492
|
+
"pre",
|
|
493
493
|
{
|
|
494
494
|
"data-language": node.attrs.language,
|
|
495
495
|
class: utils.getClassName(node.attrs, "code-fence", style)
|
|
496
496
|
},
|
|
497
|
-
["
|
|
497
|
+
["code", { spellCheck: "false" }, 0]
|
|
498
498
|
];
|
|
499
499
|
},
|
|
500
500
|
parseMarkdown: {
|
|
@@ -547,7 +547,9 @@ const codeFence = createNode((utils, options) => {
|
|
|
547
547
|
valueWrapper.className = "code-fence_value";
|
|
548
548
|
const value = document.createElement("span");
|
|
549
549
|
valueWrapper.appendChild(value);
|
|
550
|
-
|
|
550
|
+
if (view.editable) {
|
|
551
|
+
valueWrapper.appendChild(ctx.get(themeToolCtx).slots.icon("downArrow"));
|
|
552
|
+
}
|
|
551
553
|
select.className = "code-fence_select";
|
|
552
554
|
select.addEventListener("mousedown", (e) => {
|
|
553
555
|
e.preventDefault();
|
|
@@ -708,38 +710,50 @@ const hardbreak = createNode((utils) => {
|
|
|
708
710
|
});
|
|
709
711
|
const headingIndex = Array(6).fill(0).map((_, i) => i + 1);
|
|
710
712
|
const TurnIntoHeading = createCmdKey();
|
|
711
|
-
const heading = createNode((utils
|
|
713
|
+
const heading = createNode((utils) => {
|
|
712
714
|
const id2 = "heading";
|
|
713
|
-
const
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
715
|
+
const style = (level) => utils.getStyle((_, { css }) => {
|
|
716
|
+
const headingMap = {
|
|
717
|
+
1: css`
|
|
718
|
+
font-size: 3rem;
|
|
719
|
+
line-height: 3.5rem;
|
|
720
|
+
`,
|
|
721
|
+
2: css`
|
|
722
|
+
font-size: 2.5rem;
|
|
723
|
+
line-height: 3rem;
|
|
724
|
+
`,
|
|
725
|
+
3: css`
|
|
726
|
+
font-size: 2.125rem;
|
|
727
|
+
line-height: 2.25rem;
|
|
728
|
+
`,
|
|
729
|
+
4: css`
|
|
730
|
+
font-size: 1.75rem;
|
|
731
|
+
line-height: 2rem;
|
|
732
|
+
`,
|
|
733
|
+
5: css`
|
|
734
|
+
font-size: 1.5rem;
|
|
735
|
+
line-height: 1.5rem;
|
|
736
|
+
`,
|
|
737
|
+
6: css`
|
|
738
|
+
font-size: 1.25rem;
|
|
739
|
+
line-height: 1.25rem;
|
|
740
|
+
`
|
|
741
|
+
};
|
|
742
|
+
return css`
|
|
743
|
+
${headingMap[level] || ""}
|
|
744
|
+
margin: 2.5rem 0 !important;
|
|
745
|
+
font-weight: 400;
|
|
746
|
+
`;
|
|
747
|
+
});
|
|
732
748
|
return {
|
|
733
749
|
id: id2,
|
|
734
750
|
schema: () => ({
|
|
735
751
|
content: "inline*",
|
|
736
752
|
group: "block",
|
|
753
|
+
defining: true,
|
|
737
754
|
attrs: {
|
|
738
755
|
level: {
|
|
739
756
|
default: 1
|
|
740
|
-
},
|
|
741
|
-
id: {
|
|
742
|
-
default: ""
|
|
743
757
|
}
|
|
744
758
|
},
|
|
745
759
|
parseDOM: headingIndex.map((x) => ({ tag: `h${x}`, attrs: { level: x } })),
|
|
@@ -787,7 +801,7 @@ const heading = createNode((utils, options) => {
|
|
|
787
801
|
const id$4 = "hr";
|
|
788
802
|
const InsertHr = createCmdKey();
|
|
789
803
|
const hr = createNode((utils) => {
|
|
790
|
-
const style = utils.getStyle((themeTool) => css`
|
|
804
|
+
const style = utils.getStyle((themeTool, { css }) => css`
|
|
791
805
|
height: ${themeTool.size.lineWidth};
|
|
792
806
|
background-color: ${themeTool.palette("line")};
|
|
793
807
|
border-width: 0;
|
|
@@ -852,7 +866,7 @@ const image = createNode((utils, options) => {
|
|
|
852
866
|
failed: "Image loads failed"
|
|
853
867
|
}, (_a = options == null ? void 0 : options.placeholder) != null ? _a : {});
|
|
854
868
|
const isBlock = (_b = options == null ? void 0 : options.isBlock) != null ? _b : false;
|
|
855
|
-
const containerStyle = utils.getStyle((themeTool) => css`
|
|
869
|
+
const containerStyle = utils.getStyle((themeTool, { css }) => css`
|
|
856
870
|
display: inline-block;
|
|
857
871
|
position: relative;
|
|
858
872
|
text-align: center;
|
|
@@ -944,7 +958,7 @@ const image = createNode((utils, options) => {
|
|
|
944
958
|
}
|
|
945
959
|
}
|
|
946
960
|
`);
|
|
947
|
-
const style = utils.getStyle(() => css`
|
|
961
|
+
const style = utils.getStyle((_, { css }) => css`
|
|
948
962
|
display: inline-block;
|
|
949
963
|
margin: 0 auto;
|
|
950
964
|
object-fit: contain;
|
|
@@ -970,7 +984,7 @@ const image = createNode((utils, options) => {
|
|
|
970
984
|
title: { default: null },
|
|
971
985
|
failed: { default: false },
|
|
972
986
|
loading: { default: true },
|
|
973
|
-
width: { default:
|
|
987
|
+
width: { default: null }
|
|
974
988
|
},
|
|
975
989
|
parseDOM: [
|
|
976
990
|
{
|
|
@@ -985,7 +999,7 @@ const image = createNode((utils, options) => {
|
|
|
985
999
|
src: dom.getAttribute("src") || "",
|
|
986
1000
|
alt: dom.getAttribute("alt"),
|
|
987
1001
|
title: dom.getAttribute("title") || dom.getAttribute("alt"),
|
|
988
|
-
width: dom.getAttribute("width")
|
|
1002
|
+
width: dom.getAttribute("width")
|
|
989
1003
|
};
|
|
990
1004
|
}
|
|
991
1005
|
}
|
|
@@ -1099,7 +1113,9 @@ const image = createNode((utils, options) => {
|
|
|
1099
1113
|
content.src = src;
|
|
1100
1114
|
content.title = title || alt;
|
|
1101
1115
|
content.alt = alt;
|
|
1102
|
-
|
|
1116
|
+
if (width) {
|
|
1117
|
+
content.width = width;
|
|
1118
|
+
}
|
|
1103
1119
|
if (src.length === 0) {
|
|
1104
1120
|
container.classList.add("system", "empty");
|
|
1105
1121
|
setIcon("image");
|
|
@@ -1115,7 +1131,9 @@ const image = createNode((utils, options) => {
|
|
|
1115
1131
|
content.src = src2;
|
|
1116
1132
|
content.alt = alt2;
|
|
1117
1133
|
content.title = title2 || alt2;
|
|
1118
|
-
|
|
1134
|
+
if (width2) {
|
|
1135
|
+
content.width = width2;
|
|
1136
|
+
}
|
|
1119
1137
|
if (loading2) {
|
|
1120
1138
|
loadImage(src2);
|
|
1121
1139
|
return true;
|
|
@@ -1149,7 +1167,7 @@ const SplitListItem = createCmdKey();
|
|
|
1149
1167
|
const SinkListItem = createCmdKey();
|
|
1150
1168
|
const LiftListItem = createCmdKey();
|
|
1151
1169
|
const listItem = createNode((utils) => {
|
|
1152
|
-
const style = utils.getStyle((themeTool) => css`
|
|
1170
|
+
const style = utils.getStyle((themeTool, { css }) => css`
|
|
1153
1171
|
&,
|
|
1154
1172
|
& > * {
|
|
1155
1173
|
margin: 0.5rem 0;
|
|
@@ -1250,17 +1268,19 @@ const orderedList = createNode((utils) => ({
|
|
|
1250
1268
|
],
|
|
1251
1269
|
commands: (nodeType) => [createCmd(WrapInOrderedList, () => wrapIn(nodeType))],
|
|
1252
1270
|
shortcuts: {
|
|
1253
|
-
[SupportedKeys.OrderedList]: createShortcut(WrapInOrderedList, "Mod-
|
|
1271
|
+
[SupportedKeys.OrderedList]: createShortcut(WrapInOrderedList, "Mod-Alt-7")
|
|
1254
1272
|
}
|
|
1255
1273
|
}));
|
|
1256
1274
|
const TurnIntoText = createCmdKey();
|
|
1257
1275
|
const id = "paragraph";
|
|
1258
|
-
const paragraph = createNode((utils
|
|
1259
|
-
const style = (
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1276
|
+
const paragraph = createNode((utils) => {
|
|
1277
|
+
const style = utils.getStyle((_, { css }) => {
|
|
1278
|
+
return css`
|
|
1279
|
+
font-size: 1rem;
|
|
1280
|
+
line-height: 1.5;
|
|
1281
|
+
letter-spacing: 0.5px;
|
|
1282
|
+
`;
|
|
1283
|
+
});
|
|
1264
1284
|
return {
|
|
1265
1285
|
id,
|
|
1266
1286
|
schema: () => ({
|