@fibery/prosemirror-schema 4.22.0 → 4.23.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.
Files changed (79) hide show
  1. package/lib/index.d.ts +10 -10
  2. package/lib/index.js +9 -31
  3. package/lib/src/attr-constraints.d.ts +15 -12
  4. package/lib/src/attr-constraints.js +128 -168
  5. package/lib/src/block-id-utils.d.ts +10 -7
  6. package/lib/src/block-id-utils.js +16 -39
  7. package/lib/src/create-schema.d.ts +16 -15
  8. package/lib/src/create-schema.js +204 -249
  9. package/lib/src/marks/code.d.ts +5 -2
  10. package/lib/src/marks/code.js +10 -10
  11. package/lib/src/marks/em.d.ts +5 -2
  12. package/lib/src/marks/em.js +19 -16
  13. package/lib/src/marks/hint-query.d.ts +5 -2
  14. package/lib/src/marks/hint-query.js +19 -22
  15. package/lib/src/marks/link.d.ts +5 -2
  16. package/lib/src/marks/link.js +40 -36
  17. package/lib/src/marks/linked-highlight.d.ts +9 -7
  18. package/lib/src/marks/linked-highlight.js +38 -51
  19. package/lib/src/marks/strike.d.ts +5 -2
  20. package/lib/src/marks/strike.js +6 -6
  21. package/lib/src/marks/strong.d.ts +5 -2
  22. package/lib/src/marks/strong.js +29 -29
  23. package/lib/src/marks/text-background-color.d.ts +15 -12
  24. package/lib/src/marks/text-background-color.js +63 -81
  25. package/lib/src/marks/underline.d.ts +5 -2
  26. package/lib/src/marks/underline.js +6 -6
  27. package/lib/src/nodes/callout.d.ts +29 -26
  28. package/lib/src/nodes/callout.js +55 -58
  29. package/lib/src/nodes/check-item.d.ts +13 -10
  30. package/lib/src/nodes/check-item.js +32 -33
  31. package/lib/src/nodes/check-list.d.ts +14 -11
  32. package/lib/src/nodes/check-list.js +23 -30
  33. package/lib/src/nodes/code-block.d.ts +5 -2
  34. package/lib/src/nodes/code-block.js +70 -101
  35. package/lib/src/nodes/column.d.ts +5 -2
  36. package/lib/src/nodes/column.js +28 -34
  37. package/lib/src/nodes/columns.d.ts +5 -2
  38. package/lib/src/nodes/columns.js +34 -36
  39. package/lib/src/nodes/emoji.d.ts +28 -26
  40. package/lib/src/nodes/emoji.js +38 -47
  41. package/lib/src/nodes/entity.d.ts +18 -16
  42. package/lib/src/nodes/entity.js +48 -49
  43. package/lib/src/nodes/fibery-view.d.ts +5 -2
  44. package/lib/src/nodes/fibery-view.js +38 -42
  45. package/lib/src/nodes/file.d.ts +37 -34
  46. package/lib/src/nodes/file.js +41 -40
  47. package/lib/src/nodes/heading.d.ts +6 -3
  48. package/lib/src/nodes/heading.js +57 -33
  49. package/lib/src/nodes/image-block.d.ts +5 -2
  50. package/lib/src/nodes/image-block.js +43 -42
  51. package/lib/src/nodes/important.d.ts +5 -2
  52. package/lib/src/nodes/important.js +14 -10
  53. package/lib/src/nodes/math-display.d.ts +5 -2
  54. package/lib/src/nodes/math-display.js +14 -15
  55. package/lib/src/nodes/math-inline.d.ts +5 -2
  56. package/lib/src/nodes/math-inline.js +14 -15
  57. package/lib/src/nodes/media.d.ts +6 -3
  58. package/lib/src/nodes/media.js +52 -68
  59. package/lib/src/nodes/mention.d.ts +12 -9
  60. package/lib/src/nodes/mention.js +36 -37
  61. package/lib/src/nodes/note.d.ts +5 -2
  62. package/lib/src/nodes/note.js +14 -10
  63. package/lib/src/nodes/paragraph.d.ts +5 -2
  64. package/lib/src/nodes/paragraph.js +32 -26
  65. package/lib/src/nodes/table-nodes.d.ts +5 -2
  66. package/lib/src/nodes/table-nodes.js +16 -20
  67. package/lib/src/nodes/types/inline-content.d.ts +10 -8
  68. package/lib/src/nodes/types/inline-content.js +0 -2
  69. package/lib/src/nodes/types/text.d.ts +7 -4
  70. package/lib/src/nodes/types/text.js +0 -2
  71. package/lib/src/nodes/video.d.ts +7 -4
  72. package/lib/src/nodes/video.js +49 -54
  73. package/lib/src/resizable-node-attrs.d.ts +29 -26
  74. package/lib/src/resizable-node-attrs.js +23 -34
  75. package/lib/src/transcription-node-attrs.d.ts +10 -7
  76. package/lib/src/transcription-node-attrs.js +8 -8
  77. package/lib/test-helpers/index.d.ts +7 -4
  78. package/lib/test-helpers/index.js +11 -15
  79. package/package.json +11 -4
@@ -1,39 +1,43 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.link = void 0;
1
+ //#region src/marks/link.ts
4
2
  const httpRegex = /^[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b[-a-zA-Z0-9()@:%_+.~#?&/=]*$/;
5
3
  /**
6
- A link. Has `href` and `title` attributes. `title`
7
- defaults to the empty string. Rendered and parsed as an `<a>`
8
- element.
9
- */
10
- exports.link = {
11
- attrs: {
12
- href: {},
13
- title: { default: null },
14
- },
15
- inclusive: false,
16
- parseDOM: [
17
- {
18
- tag: "a[href]",
19
- getAttrs(domNode) {
20
- const dom = domNode;
21
- return { href: dom.getAttribute("href"), title: dom.getAttribute("title") };
22
- },
23
- },
24
- ],
25
- toDOM(node) {
26
- const { href } = node.attrs;
27
- let fixedHref = href;
28
- if (href && !href.startsWith("mailto:") && !fixedHref.startsWith("http") && !fixedHref.startsWith("/")) {
29
- if (httpRegex.test(href)) {
30
- fixedHref = `https://${href}`;
31
- }
32
- }
33
- return [
34
- "a",
35
- { href: fixedHref, target: "_blank", class: "prosemirror-link", rel: "noopener noreferrer nofollow" },
36
- 0,
37
- ];
38
- },
4
+ A link. Has `href` and `title` attributes. `title`
5
+ defaults to the empty string. Rendered and parsed as an `<a>`
6
+ element.
7
+ */
8
+ const link = {
9
+ attrs: {
10
+ href: {},
11
+ title: { default: null }
12
+ },
13
+ inclusive: false,
14
+ parseDOM: [{
15
+ tag: "a[href]",
16
+ getAttrs(domNode) {
17
+ const dom = domNode;
18
+ return {
19
+ href: dom.getAttribute("href"),
20
+ title: dom.getAttribute("title")
21
+ };
22
+ }
23
+ }],
24
+ toDOM(node) {
25
+ const { href } = node.attrs;
26
+ let fixedHref = href;
27
+ if (href && !href.startsWith("mailto:") && !fixedHref.startsWith("http") && !fixedHref.startsWith("/")) {
28
+ if (httpRegex.test(href)) fixedHref = `https://${href}`;
29
+ }
30
+ return [
31
+ "a",
32
+ {
33
+ href: fixedHref,
34
+ target: "_blank",
35
+ class: "prosemirror-link",
36
+ rel: "noopener noreferrer nofollow"
37
+ },
38
+ 0
39
+ ];
40
+ }
39
41
  };
42
+ //#endregion
43
+ export { link };
@@ -1,11 +1,13 @@
1
- import type { MarkSpec } from "prosemirror-model";
1
+ import { MarkSpec } from "prosemirror-model";
2
+ //#region src/marks/linked-highlight.d.ts
2
3
  type Generator = {
3
- generate: (typeId?: string) => string;
4
+ generate: (typeId?: string) => string;
4
5
  };
5
- export declare const makeLinkedHighlight: ({ sharedColorGenerator }: {
6
- sharedColorGenerator?: Generator;
6
+ declare const makeLinkedHighlight: ({ sharedColorGenerator }: {
7
+ sharedColorGenerator?: Generator;
7
8
  }) => MarkSpec;
8
- export declare const makeLinkedHighlightEntity: ({ sharedColorGenerator }: {
9
- sharedColorGenerator?: Generator;
9
+ declare const makeLinkedHighlightEntity: ({ sharedColorGenerator }: {
10
+ sharedColorGenerator?: Generator;
10
11
  }) => MarkSpec;
11
- export {};
12
+ //#endregion
13
+ export { makeLinkedHighlight, makeLinkedHighlightEntity };
@@ -1,57 +1,44 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeLinkedHighlightEntity = exports.makeLinkedHighlight = void 0;
4
- const hyphenatePascal = (str) => str
5
- .replace(/([a-z])([A-Z])/g, "$1-$2")
6
- .replace(/([A-Z]{2})[a-z]/, "$1-")
7
- .toLowerCase();
1
+ //#region src/marks/linked-highlight.ts
2
+ const hyphenatePascal = (str) => str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z]{2})[a-z]/, "$1-").toLowerCase();
8
3
  const createMark = (markType, sharedColorGenerator) => {
9
- const markTag = `span.${markType}`;
10
- const markClassName = `${markType}`;
11
- const preserveBool = (attr) => (attr === "true" ? true : attr === "false" ? false : attr);
12
- return {
13
- attrs: {
14
- id: {},
15
- meta: { default: {} },
16
- },
17
- inclusive: false,
18
- parseDOM: [
19
- {
20
- tag: markTag,
21
- getAttrs: ({ dataset }) => {
22
- return {
23
- id: dataset.id || false,
24
- meta: Object.keys(dataset)
25
- .filter((key) => key !== "id" && dataset[key] !== "false")
26
- .reduce((out, key) => ({ ...out, [key]: preserveBool(JSON.parse(dataset[key])) }), { type: markType }),
27
- };
28
- },
29
- },
30
- ],
31
- toDOM: ({ attrs }) => {
32
- const { id, meta } = attrs;
33
- const color = sharedColorGenerator ? sharedColorGenerator.generate(attrs) : "#EEEEEE";
34
- return [
35
- markTag,
36
- {
37
- class: markClassName,
38
- style: color ? `--${markType}-background-color:${color}` : ``,
39
- "data-id": id,
40
- ...Object.fromEntries(Object.keys(meta)
41
- .filter((key) => meta[key] !== false) // remove specials
42
- .map((key) => [`data-${hyphenatePascal(key)}`, JSON.stringify(meta[key])])),
43
- },
44
- ];
45
- },
46
- };
4
+ const markTag = `span.${markType}`;
5
+ const markClassName = `${markType}`;
6
+ const preserveBool = (attr) => attr === "true" ? true : attr === "false" ? false : attr;
7
+ return {
8
+ attrs: {
9
+ id: {},
10
+ meta: { default: {} }
11
+ },
12
+ inclusive: false,
13
+ parseDOM: [{
14
+ tag: markTag,
15
+ getAttrs: ({ dataset }) => {
16
+ return {
17
+ id: dataset.id || false,
18
+ meta: Object.keys(dataset).filter((key) => key !== "id" && dataset[key] !== "false").reduce((out, key) => ({
19
+ ...out,
20
+ [key]: preserveBool(JSON.parse(dataset[key]))
21
+ }), { type: markType })
22
+ };
23
+ }
24
+ }],
25
+ toDOM: ({ attrs }) => {
26
+ const { id, meta } = attrs;
27
+ const color = sharedColorGenerator ? sharedColorGenerator.generate(attrs) : "#EEEEEE";
28
+ return [markTag, {
29
+ class: markClassName,
30
+ style: color ? `--${markType}-background-color:${color}` : ``,
31
+ "data-id": id,
32
+ ...Object.fromEntries(Object.keys(meta).filter((key) => meta[key] !== false).map((key) => [`data-${hyphenatePascal(key)}`, JSON.stringify(meta[key])]))
33
+ }];
34
+ }
35
+ };
47
36
  };
48
37
  const makeLinkedHighlight = ({ sharedColorGenerator }) => {
49
- // @ts-expect-error todo: fix this
50
- return createMark("linkedhighlight", sharedColorGenerator);
38
+ return createMark("linkedhighlight", sharedColorGenerator);
51
39
  };
52
- exports.makeLinkedHighlight = makeLinkedHighlight;
53
40
  const makeLinkedHighlightEntity = ({ sharedColorGenerator }) => {
54
- // @ts-expect-error todo: fix this
55
- return createMark("linkedhighlightentity", sharedColorGenerator);
41
+ return createMark("linkedhighlightentity", sharedColorGenerator);
56
42
  };
57
- exports.makeLinkedHighlightEntity = makeLinkedHighlightEntity;
43
+ //#endregion
44
+ export { makeLinkedHighlight, makeLinkedHighlightEntity };
@@ -1,2 +1,5 @@
1
- import type { MarkSpec } from "prosemirror-model";
2
- export declare const strike: MarkSpec;
1
+ import { MarkSpec } from "prosemirror-model";
2
+ //#region src/marks/strike.d.ts
3
+ declare const strike: MarkSpec;
4
+ //#endregion
5
+ export { strike };
@@ -1,7 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.strike = void 0;
4
- exports.strike = {
5
- parseDOM: [{ tag: "strike" }, { style: "text-decoration=line-through" }],
6
- toDOM: () => ["strike"],
1
+ //#region src/marks/strike.ts
2
+ const strike = {
3
+ parseDOM: [{ tag: "strike" }, { style: "text-decoration=line-through" }],
4
+ toDOM: () => ["strike"]
7
5
  };
6
+ //#endregion
7
+ export { strike };
@@ -1,6 +1,9 @@
1
- import type { MarkSpec } from "prosemirror-model";
1
+ import { MarkSpec } from "prosemirror-model";
2
+ //#region src/marks/strong.d.ts
2
3
  /**
3
4
  A strong mark. Rendered as `<strong>`, parse rules also match
4
5
  `<b>` and `font-weight: bold`.
5
6
  */
6
- export declare const strong: MarkSpec;
7
+ declare const strong: MarkSpec;
8
+ //#endregion
9
+ export { strong };
@@ -1,32 +1,32 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.strong = void 0;
1
+ //#region src/marks/strong.ts
4
2
  const strongDOM = ["strong", 0];
5
3
  /**
6
- A strong mark. Rendered as `<strong>`, parse rules also match
7
- `<b>` and `font-weight: bold`.
8
- */
9
- exports.strong = {
10
- parseDOM: [
11
- { tag: "strong" },
12
- // This works around a Google Docs misbehavior where
13
- // pasted content will be inexplicably wrapped in `<b>`
14
- // tags with a font-weight normal.
15
- {
16
- tag: "b",
17
- getAttrs: (dom) => {
18
- return dom.style.fontWeight !== "normal" && null;
19
- },
20
- },
21
- { style: "font-weight=400", clearMark: (m) => m.type.name === "strong" },
22
- {
23
- style: "font-weight",
24
- getAttrs: (value) => {
25
- return /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null;
26
- },
27
- },
28
- ],
29
- toDOM() {
30
- return strongDOM;
31
- },
4
+ A strong mark. Rendered as `<strong>`, parse rules also match
5
+ `<b>` and `font-weight: bold`.
6
+ */
7
+ const strong = {
8
+ parseDOM: [
9
+ { tag: "strong" },
10
+ {
11
+ tag: "b",
12
+ getAttrs: (dom) => {
13
+ return dom.style.fontWeight !== "normal" && null;
14
+ }
15
+ },
16
+ {
17
+ style: "font-weight=400",
18
+ clearMark: (m) => m.type.name === "strong"
19
+ },
20
+ {
21
+ style: "font-weight",
22
+ getAttrs: (value) => {
23
+ return /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null;
24
+ }
25
+ }
26
+ ],
27
+ toDOM() {
28
+ return strongDOM;
29
+ }
32
30
  };
31
+ //#endregion
32
+ export { strong };
@@ -1,13 +1,16 @@
1
- import type { MarkSpec } from "prosemirror-model";
2
- export declare enum ColorToken {
3
- Yellow = "YELLOW",
4
- Green = "GREEN",
5
- Aquamarine = "AQUAMARINE",
6
- Aqua = "AQUA",
7
- Blue = "BLUE",
8
- Purple = "PURPLE",
9
- Pink = "PINK",
10
- Red = "RED",
11
- Grey = "GREY"
1
+ import { MarkSpec } from "prosemirror-model";
2
+ //#region src/marks/text-background-color.d.ts
3
+ declare enum ColorToken {
4
+ Yellow = "YELLOW",
5
+ Green = "GREEN",
6
+ Aquamarine = "AQUAMARINE",
7
+ Aqua = "AQUA",
8
+ Blue = "BLUE",
9
+ Purple = "PURPLE",
10
+ Pink = "PINK",
11
+ Red = "RED",
12
+ Grey = "GREY"
12
13
  }
13
- export declare const textBackgroundColor: MarkSpec;
14
+ declare const textBackgroundColor: MarkSpec;
15
+ //#endregion
16
+ export { ColorToken, textBackgroundColor };
@@ -1,90 +1,72 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.textBackgroundColor = exports.ColorToken = void 0;
4
- var ColorToken;
5
- (function (ColorToken) {
6
- ColorToken["Yellow"] = "YELLOW";
7
- ColorToken["Green"] = "GREEN";
8
- ColorToken["Aquamarine"] = "AQUAMARINE";
9
- ColorToken["Aqua"] = "AQUA";
10
- ColorToken["Blue"] = "BLUE";
11
- ColorToken["Purple"] = "PURPLE";
12
- ColorToken["Pink"] = "PINK";
13
- ColorToken["Red"] = "RED";
14
- ColorToken["Grey"] = "GREY";
15
- })(ColorToken || (exports.ColorToken = ColorToken = {}));
1
+ //#region src/marks/text-background-color.ts
2
+ let ColorToken = /* @__PURE__ */ function(ColorToken) {
3
+ ColorToken["Yellow"] = "YELLOW";
4
+ ColorToken["Green"] = "GREEN";
5
+ ColorToken["Aquamarine"] = "AQUAMARINE";
6
+ ColorToken["Aqua"] = "AQUA";
7
+ ColorToken["Blue"] = "BLUE";
8
+ ColorToken["Purple"] = "PURPLE";
9
+ ColorToken["Pink"] = "PINK";
10
+ ColorToken["Red"] = "RED";
11
+ ColorToken["Grey"] = "GREY";
12
+ return ColorToken;
13
+ }({});
16
14
  const isColorToken = (text) => {
17
- return Object.values(ColorToken).includes(text);
15
+ return Object.values(ColorToken).includes(text);
18
16
  };
19
- // Previously we used to store raw color value in the attribute
20
17
  const persistedRawColorToColorTokenLookup = {
21
- ["HIGHLIGHT-SEARCH"]: ColorToken.Yellow,
22
- ["#f6f1a2"]: ColorToken.Yellow,
23
- ["#d2faad"]: ColorToken.Green,
24
- ["#befccc"]: ColorToken.Aquamarine,
25
- ["#bbf9f8"]: ColorToken.Aqua,
26
- ["#e0f0fe"]: ColorToken.Blue,
27
- ["#f1ebfe"]: ColorToken.Purple,
28
- ["#fce7fb"]: ColorToken.Pink,
29
- ["#fce9e9"]: ColorToken.Red,
30
- ["#e7e9eb"]: ColorToken.Grey,
18
+ ["HIGHLIGHT-SEARCH"]: "YELLOW",
19
+ ["#f6f1a2"]: "YELLOW",
20
+ ["#d2faad"]: "GREEN",
21
+ ["#befccc"]: "AQUAMARINE",
22
+ ["#bbf9f8"]: "AQUA",
23
+ ["#e0f0fe"]: "BLUE",
24
+ ["#f1ebfe"]: "PURPLE",
25
+ ["#fce7fb"]: "PINK",
26
+ ["#fce9e9"]: "RED",
27
+ ["#e7e9eb"]: "GREY"
31
28
  };
32
29
  const validateColorToken = (color) => {
33
- if (!color) {
34
- return undefined;
35
- }
36
- if (isColorToken(color)) {
37
- return color;
38
- }
39
- return persistedRawColorToColorTokenLookup[color] || undefined;
30
+ if (!color) return;
31
+ if (isColorToken(color)) return color;
32
+ return persistedRawColorToColorTokenLookup[color] || void 0;
40
33
  };
41
34
  const getClassName = (bgColorToken, fgColorToken) => {
42
- return [
43
- `text-background-color`,
44
- bgColorToken ? `bg-${bgColorToken.toLowerCase()}` : null,
45
- fgColorToken
46
- ? bgColorToken
47
- ? `fg-on-bg-${fgColorToken.toLowerCase()}`
48
- : `fg-${fgColorToken.toLowerCase()}`
49
- : null,
50
- ]
51
- .filter(Boolean)
52
- .join(` `);
35
+ return [
36
+ `text-background-color`,
37
+ bgColorToken ? `bg-${bgColorToken.toLowerCase()}` : null,
38
+ fgColorToken ? bgColorToken ? `fg-on-bg-${fgColorToken.toLowerCase()}` : `fg-${fgColorToken.toLowerCase()}` : null
39
+ ].filter(Boolean).join(` `);
53
40
  };
54
- exports.textBackgroundColor = {
55
- attrs: {
56
- guid: { default: "" },
57
- color: { default: undefined },
58
- bgColor: { default: undefined },
59
- fgColor: { default: undefined },
60
- },
61
- parseDOM: [
62
- {
63
- tag: "span[data-text-background-color]",
64
- getAttrs: (domNode) => {
65
- const dom = domNode;
66
- const bgColor = dom.getAttribute("data-bg-color") || dom.getAttribute("data-color") || undefined;
67
- const fgColor = dom.getAttribute("data-fg-color") || undefined;
68
- return {
69
- bgColor: bgColor,
70
- fgColor: fgColor,
71
- };
72
- },
73
- },
74
- ],
75
- toDOM(node) {
76
- const bgColor = node.attrs.bgColor || node.attrs.color;
77
- const fgColor = node.attrs.fgColor;
78
- const bgColorToken = validateColorToken(bgColor);
79
- return [
80
- "span",
81
- {
82
- "data-text-background-color": "true",
83
- "data-guid": node.attrs.guid,
84
- "data-bg-color": bgColor || undefined,
85
- "data-fg-color": fgColor || undefined,
86
- class: getClassName(bgColorToken, fgColor),
87
- },
88
- ];
89
- },
41
+ const textBackgroundColor = {
42
+ attrs: {
43
+ guid: { default: "" },
44
+ color: { default: void 0 },
45
+ bgColor: { default: void 0 },
46
+ fgColor: { default: void 0 }
47
+ },
48
+ parseDOM: [{
49
+ tag: "span[data-text-background-color]",
50
+ getAttrs: (domNode) => {
51
+ const dom = domNode;
52
+ return {
53
+ bgColor: dom.getAttribute("data-bg-color") || dom.getAttribute("data-color") || void 0,
54
+ fgColor: dom.getAttribute("data-fg-color") || void 0
55
+ };
56
+ }
57
+ }],
58
+ toDOM(node) {
59
+ const bgColor = node.attrs.bgColor || node.attrs.color;
60
+ const fgColor = node.attrs.fgColor;
61
+ const bgColorToken = validateColorToken(bgColor);
62
+ return ["span", {
63
+ "data-text-background-color": "true",
64
+ "data-guid": node.attrs.guid,
65
+ "data-bg-color": bgColor || void 0,
66
+ "data-fg-color": fgColor || void 0,
67
+ class: getClassName(bgColorToken, fgColor)
68
+ }];
69
+ }
90
70
  };
71
+ //#endregion
72
+ export { ColorToken, textBackgroundColor };
@@ -1,2 +1,5 @@
1
- import type { MarkSpec } from "prosemirror-model";
2
- export declare const underline: MarkSpec;
1
+ import { MarkSpec } from "prosemirror-model";
2
+ //#region src/marks/underline.d.ts
3
+ declare const underline: MarkSpec;
4
+ //#endregion
5
+ export { underline };
@@ -1,7 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.underline = void 0;
4
- exports.underline = {
5
- parseDOM: [{ tag: "u" }, { style: "text-decoration=underline" }],
6
- toDOM: () => ["u"],
1
+ //#region src/marks/underline.ts
2
+ const underline = {
3
+ parseDOM: [{ tag: "u" }, { style: "text-decoration=underline" }],
4
+ toDOM: () => ["u"]
7
5
  };
6
+ //#endregion
7
+ export { underline };
@@ -1,28 +1,31 @@
1
- import type { EmojiOptions } from "./emoji";
2
- export declare const DEFAULT_CALLOUT_ICON_TYPE = "icon";
3
- export declare const DEFAULT_CALLOUT_ICON = "exclamation-circle";
4
- export declare const makeCallout: ({ getEmoji }?: EmojiOptions) => {
5
- attrs: {
6
- color: {
7
- default: string;
8
- };
9
- iconType: {
10
- default: string;
11
- };
12
- icon: {
13
- default: string;
14
- };
1
+ import { EmojiOptions } from "./emoji.js";
2
+ //#region src/nodes/callout.d.ts
3
+ declare const DEFAULT_CALLOUT_ICON_TYPE = "icon";
4
+ declare const DEFAULT_CALLOUT_ICON = "exclamation-circle";
5
+ declare const makeCallout: ({ getEmoji }?: EmojiOptions) => {
6
+ attrs: {
7
+ color: {
8
+ default: string;
15
9
  };
16
- group: string;
17
- content: string;
18
- defining: true;
19
- parseDOM: {
20
- tag: string;
21
- getAttrs(domNode: HTMLElement): {
22
- color: string | null;
23
- iconType: string | null;
24
- icon: string | null;
25
- };
26
- }[];
27
- toDOM(node: import("prosemirror-model").Node): [string, Record<string, string>, number];
10
+ iconType: {
11
+ default: string;
12
+ };
13
+ icon: {
14
+ default: string;
15
+ };
16
+ };
17
+ group: string;
18
+ content: string;
19
+ defining: true;
20
+ parseDOM: {
21
+ tag: string;
22
+ getAttrs(domNode: HTMLElement): {
23
+ color: string | null;
24
+ iconType: string | null;
25
+ icon: string | null;
26
+ };
27
+ }[];
28
+ toDOM(node: import("prosemirror-model").Node): [string, Record<string, string>, number];
28
29
  };
30
+ //#endregion
31
+ export { DEFAULT_CALLOUT_ICON, DEFAULT_CALLOUT_ICON_TYPE, makeCallout };