@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,43 +1,44 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.imageBlock = void 0;
4
- const resizable_node_attrs_1 = require("../resizable-node-attrs");
5
- exports.imageBlock = {
6
- attrs: {
7
- src: {},
8
- alt: { default: null },
9
- title: { default: null },
10
- size: { default: null },
11
- type: { default: null },
12
- ...(0, resizable_node_attrs_1.createDefaultAttrs)(),
13
- },
14
- inline: false,
15
- group: "block",
16
- content: "inline*",
17
- atom: true,
18
- draggable: true,
19
- parseDOM: [
20
- {
21
- tag: "img[src]",
22
- getAttrs(domNode) {
23
- const dom = domNode;
24
- return {
25
- src: dom.getAttribute("src"),
26
- title: dom.getAttribute("title"),
27
- alt: dom.getAttribute("alt"),
28
- ...(0, resizable_node_attrs_1.createParseDomAttrs)(dom),
29
- };
30
- },
31
- },
32
- ],
33
- toDOM(node) {
34
- const { src, alt, title } = node.attrs;
35
- const attrs = {
36
- src,
37
- alt,
38
- title,
39
- ...(0, resizable_node_attrs_1.createToDomAttrs)(node.attrs),
40
- };
41
- return ["div", {}, ["img", attrs]];
42
- },
1
+ import { createDefaultAttrs, createParseDomAttrs, createToDomAttrs } from "../resizable-node-attrs.js";
2
+ //#region src/nodes/image-block.ts
3
+ const imageBlock = {
4
+ attrs: {
5
+ src: {},
6
+ alt: { default: null },
7
+ title: { default: null },
8
+ size: { default: null },
9
+ type: { default: null },
10
+ ...createDefaultAttrs()
11
+ },
12
+ inline: false,
13
+ group: "block",
14
+ content: "inline*",
15
+ atom: true,
16
+ draggable: true,
17
+ parseDOM: [{
18
+ tag: "img[src]",
19
+ getAttrs(domNode) {
20
+ const dom = domNode;
21
+ return {
22
+ src: dom.getAttribute("src"),
23
+ title: dom.getAttribute("title"),
24
+ alt: dom.getAttribute("alt"),
25
+ ...createParseDomAttrs(dom)
26
+ };
27
+ }
28
+ }],
29
+ toDOM(node) {
30
+ const { src, alt, title } = node.attrs;
31
+ return [
32
+ "div",
33
+ {},
34
+ ["img", {
35
+ src,
36
+ alt,
37
+ title,
38
+ ...createToDomAttrs(node.attrs)
39
+ }]
40
+ ];
41
+ }
43
42
  };
43
+ //#endregion
44
+ export { imageBlock };
@@ -1,2 +1,5 @@
1
- import type { NodeSpec } from "prosemirror-model";
2
- export declare const important: NodeSpec;
1
+ import { NodeSpec } from "prosemirror-model";
2
+ //#region src/nodes/important.d.ts
3
+ declare const important: NodeSpec;
4
+ //#endregion
5
+ export { important };
@@ -1,11 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.important = void 0;
4
- exports.important = {
5
- content: "inline*",
6
- group: "block",
7
- parseDOM: [{ tag: "div.fibery-important" }],
8
- toDOM() {
9
- return ["div", { class: "fibery-important" }, ["p", 0]];
10
- },
1
+ //#region src/nodes/important.ts
2
+ const important = {
3
+ content: "inline*",
4
+ group: "block",
5
+ parseDOM: [{ tag: "div.fibery-important" }],
6
+ toDOM() {
7
+ return [
8
+ "div",
9
+ { class: "fibery-important" },
10
+ ["p", 0]
11
+ ];
12
+ }
11
13
  };
14
+ //#endregion
15
+ export { important };
@@ -1,2 +1,5 @@
1
- import type { NodeSpec } from "prosemirror-model";
2
- export declare const math_display: NodeSpec;
1
+ import { NodeSpec } from "prosemirror-model";
2
+ //#region src/nodes/math-display.d.ts
3
+ declare const math_display: NodeSpec;
4
+ //#endregion
5
+ export { math_display };
@@ -1,16 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.math_display = void 0;
4
- exports.math_display = {
5
- // important!
6
- group: "block math",
7
- content: "text*", // important!
8
- atom: true, // important!
9
- code: true, // important!
10
- toDOM: () => ["math-display", { class: "math-node" }, 0],
11
- parseDOM: [
12
- {
13
- tag: "math-display", // important!
14
- },
15
- ],
1
+ //#region src/nodes/math-display.ts
2
+ const math_display = {
3
+ group: "block math",
4
+ content: "text*",
5
+ atom: true,
6
+ code: true,
7
+ toDOM: () => [
8
+ "math-display",
9
+ { class: "math-node" },
10
+ 0
11
+ ],
12
+ parseDOM: [{ tag: "math-display" }]
16
13
  };
14
+ //#endregion
15
+ export { math_display };
@@ -1,2 +1,5 @@
1
- import type { NodeSpec } from "prosemirror-model";
2
- export declare const math_inline: NodeSpec;
1
+ import { NodeSpec } from "prosemirror-model";
2
+ //#region src/nodes/math-inline.d.ts
3
+ declare const math_inline: NodeSpec;
4
+ //#endregion
5
+ export { math_inline };
@@ -1,16 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.math_inline = void 0;
4
- exports.math_inline = {
5
- // important!
6
- group: "inline math",
7
- content: "text*", // important!
8
- inline: true, // important!
9
- atom: true, // important!
10
- toDOM: () => ["math-inline", { class: "math-node" }, 0],
11
- parseDOM: [
12
- {
13
- tag: "math-inline", // important!
14
- },
15
- ],
1
+ //#region src/nodes/math-inline.ts
2
+ const math_inline = {
3
+ group: "inline math",
4
+ content: "text*",
5
+ inline: true,
6
+ atom: true,
7
+ toDOM: () => [
8
+ "math-inline",
9
+ { class: "math-node" },
10
+ 0
11
+ ],
12
+ parseDOM: [{ tag: "math-inline" }]
16
13
  };
14
+ //#endregion
15
+ export { math_inline };
@@ -1,4 +1,7 @@
1
- import type { NodeSpec, Node } from "prosemirror-model";
2
- export declare const makeMedia: ({ mediaToDom }: {
3
- mediaToDom: ((node: Node) => HTMLElement) | null;
1
+ import { Node, NodeSpec } from "prosemirror-model";
2
+ //#region src/nodes/media.d.ts
3
+ declare const makeMedia: ({ mediaToDom }: {
4
+ mediaToDom: ((node: Node) => HTMLElement) | null;
4
5
  }) => NodeSpec;
6
+ //#endregion
7
+ export { makeMedia };
@@ -1,74 +1,58 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeMedia = void 0;
4
- const resizable_node_attrs_1 = require("../resizable-node-attrs");
1
+ import { createDefaultAttrs, createParseDomAttrs, createToDomAttrs } from "../resizable-node-attrs.js";
2
+ //#region src/nodes/media.ts
5
3
  function toBoolean(attr) {
6
- if (typeof attr === "boolean") {
7
- return attr;
8
- }
9
- if (typeof attr === "string") {
10
- if (attr === "false") {
11
- return false;
12
- }
13
- if (attr === "true") {
14
- return true;
15
- }
16
- }
17
- return Boolean(attr);
4
+ if (typeof attr === "boolean") return attr;
5
+ if (typeof attr === "string") {
6
+ if (attr === "false") return false;
7
+ if (attr === "true") return true;
8
+ }
9
+ return Boolean(attr);
18
10
  }
19
11
  function toNumberOrNull(value) {
20
- if (!value) {
21
- return null;
22
- }
23
- const parsed = parseFloat(value);
24
- return isNaN(parsed) ? null : parsed;
12
+ if (!value) return null;
13
+ const parsed = parseFloat(value);
14
+ return isNaN(parsed) ? null : parsed;
25
15
  }
26
16
  const makeMedia = ({ mediaToDom }) => ({
27
- inline: false,
28
- attrs: {
29
- url: {},
30
- compatibleMode: {
31
- default: false,
32
- },
33
- dynamicContent: {
34
- default: true,
35
- },
36
- aspectRatio: {
37
- default: null,
38
- },
39
- ...(0, resizable_node_attrs_1.createDefaultAttrs)(),
40
- },
41
- group: "block",
42
- draggable: true,
43
- parseDOM: [
44
- {
45
- tag: "div[data-url]",
46
- getAttrs(dom) {
47
- const htmlElement = dom;
48
- return {
49
- url: htmlElement.getAttribute("data-url"),
50
- dynamicContent: htmlElement.getAttribute("data-dynamic-content") !== "false",
51
- aspectRatio: toNumberOrNull(htmlElement.getAttribute("data-aspect-ratio")),
52
- compatibleMode: toBoolean(htmlElement.getAttribute("data-compatible-mode")),
53
- ...(0, resizable_node_attrs_1.createParseDomAttrs)(htmlElement),
54
- };
55
- },
56
- },
57
- ],
58
- toDOM(node) {
59
- if (mediaToDom) {
60
- return mediaToDom(node);
61
- }
62
- const { url, compatibleMode, dynamicContent, aspectRatio } = node.attrs;
63
- const attrs = {
64
- "data-url": url,
65
- "data-compatible-mode": compatibleMode,
66
- "data-dynamic-content": typeof dynamicContent === "boolean" ? String(dynamicContent) : "false",
67
- "data-aspect-ratio": aspectRatio,
68
- contenteditable: "false",
69
- ...(0, resizable_node_attrs_1.createToDomAttrs)(node),
70
- };
71
- return ["div", attrs, url];
72
- },
17
+ inline: false,
18
+ attrs: {
19
+ url: {},
20
+ compatibleMode: { default: false },
21
+ dynamicContent: { default: true },
22
+ aspectRatio: { default: null },
23
+ ...createDefaultAttrs()
24
+ },
25
+ group: "block",
26
+ draggable: true,
27
+ parseDOM: [{
28
+ tag: "div[data-url]",
29
+ getAttrs(dom) {
30
+ const htmlElement = dom;
31
+ return {
32
+ url: htmlElement.getAttribute("data-url"),
33
+ dynamicContent: htmlElement.getAttribute("data-dynamic-content") !== "false",
34
+ aspectRatio: toNumberOrNull(htmlElement.getAttribute("data-aspect-ratio")),
35
+ compatibleMode: toBoolean(htmlElement.getAttribute("data-compatible-mode")),
36
+ ...createParseDomAttrs(htmlElement)
37
+ };
38
+ }
39
+ }],
40
+ toDOM(node) {
41
+ if (mediaToDom) return mediaToDom(node);
42
+ const { url, compatibleMode, dynamicContent, aspectRatio } = node.attrs;
43
+ return [
44
+ "div",
45
+ {
46
+ "data-url": url,
47
+ "data-compatible-mode": compatibleMode,
48
+ "data-dynamic-content": typeof dynamicContent === "boolean" ? String(dynamicContent) : "false",
49
+ "data-aspect-ratio": aspectRatio,
50
+ contenteditable: "false",
51
+ ...createToDomAttrs(node)
52
+ },
53
+ url
54
+ ];
55
+ }
73
56
  });
74
- exports.makeMedia = makeMedia;
57
+ //#endregion
58
+ export { makeMedia };
@@ -1,11 +1,14 @@
1
- import type { NodeSpec } from "prosemirror-model";
2
- export interface MentionAttributes {
3
- id: string;
4
- typeId: string;
5
- name?: string;
1
+ import { NodeSpec } from "prosemirror-model";
2
+ //#region src/nodes/mention.d.ts
3
+ interface MentionAttributes {
4
+ id: string;
5
+ typeId: string;
6
+ name?: string;
6
7
  }
7
- export interface MentionDefinition {
8
- type: "mention";
9
- attrs: MentionAttributes;
8
+ interface MentionDefinition {
9
+ type: "mention";
10
+ attrs: MentionAttributes;
10
11
  }
11
- export declare const mention: NodeSpec;
12
+ declare const mention: NodeSpec;
13
+ //#endregion
14
+ export { MentionAttributes, MentionDefinition, mention };
@@ -1,38 +1,37 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mention = void 0;
4
- exports.mention = {
5
- inline: true,
6
- group: "inline",
7
- selectable: false,
8
- attrs: {
9
- id: { default: "" },
10
- name: { default: "" },
11
- typeId: { default: "" },
12
- meta: {
13
- default: {},
14
- },
15
- },
16
- parseDOM: [
17
- {
18
- tag: "span[data-mention-id]",
19
- getAttrs: (domNode) => {
20
- const dom = domNode;
21
- return {
22
- id: dom.getAttribute("data-mention-id"),
23
- name: dom.textContent,
24
- typeId: dom.getAttribute("data-mention-type-id"),
25
- };
26
- },
27
- },
28
- ],
29
- toDOM(node) {
30
- const { id, typeId, name } = node.attrs;
31
- const attrs = {
32
- "data-mention-id": id,
33
- "data-mention-type-id": typeId,
34
- contenteditable: "false",
35
- };
36
- return ["span", attrs, name];
37
- },
1
+ //#region src/nodes/mention.ts
2
+ const mention = {
3
+ inline: true,
4
+ group: "inline",
5
+ selectable: false,
6
+ attrs: {
7
+ id: { default: "" },
8
+ name: { default: "" },
9
+ typeId: { default: "" },
10
+ meta: { default: {} }
11
+ },
12
+ parseDOM: [{
13
+ tag: "span[data-mention-id]",
14
+ getAttrs: (domNode) => {
15
+ const dom = domNode;
16
+ return {
17
+ id: dom.getAttribute("data-mention-id"),
18
+ name: dom.textContent,
19
+ typeId: dom.getAttribute("data-mention-type-id")
20
+ };
21
+ }
22
+ }],
23
+ toDOM(node) {
24
+ const { id, typeId, name } = node.attrs;
25
+ return [
26
+ "span",
27
+ {
28
+ "data-mention-id": id,
29
+ "data-mention-type-id": typeId,
30
+ contenteditable: "false"
31
+ },
32
+ name
33
+ ];
34
+ }
38
35
  };
36
+ //#endregion
37
+ export { mention };
@@ -1,2 +1,5 @@
1
- import type { NodeSpec } from "prosemirror-model";
2
- export declare const note: NodeSpec;
1
+ import { NodeSpec } from "prosemirror-model";
2
+ //#region src/nodes/note.d.ts
3
+ declare const note: NodeSpec;
4
+ //#endregion
5
+ export { note };
@@ -1,11 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.note = void 0;
4
- exports.note = {
5
- content: "inline*",
6
- group: "block",
7
- toDOM() {
8
- return ["div", { class: "fibery-note" }, ["p", 0]];
9
- },
10
- parseDOM: [{ tag: "div.fibery-note" }],
1
+ //#region src/nodes/note.ts
2
+ const note = {
3
+ content: "inline*",
4
+ group: "block",
5
+ toDOM() {
6
+ return [
7
+ "div",
8
+ { class: "fibery-note" },
9
+ ["p", 0]
10
+ ];
11
+ },
12
+ parseDOM: [{ tag: "div.fibery-note" }]
11
13
  };
14
+ //#endregion
15
+ export { note };
@@ -1,2 +1,5 @@
1
- import type { NodeSpec } from "prosemirror-model";
2
- export declare const paragraph: NodeSpec;
1
+ import { NodeSpec } from "prosemirror-model";
2
+ //#region src/nodes/paragraph.d.ts
3
+ declare const paragraph: NodeSpec;
4
+ //#endregion
5
+ export { paragraph };
@@ -1,27 +1,33 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.paragraph = void 0;
4
- const uuid_1 = require("uuid");
5
- exports.paragraph = {
6
- content: "inline*",
7
- group: "block",
8
- attrs: {
9
- // "id" is the unified block identifier; "guid" is deprecated and mirrors
10
- // "id" until all consumers (client editor, fibery backend) read "id".
11
- id: { default: null },
12
- guid: { default: "" },
13
- },
14
- parseDOM: [
15
- {
16
- tag: "p",
17
- getAttrs: (dom) => {
18
- const id = dom.getAttribute("data-guid") || (0, uuid_1.v4)();
19
- return { id, guid: id };
20
- },
21
- },
22
- ],
23
- toDOM(node) {
24
- const id = node.attrs.id || node.attrs.guid;
25
- return ["p", { "data-id": id, "data-guid": id }, 0];
26
- },
1
+ import { v4 } from "uuid";
2
+ //#region src/nodes/paragraph.ts
3
+ const paragraph = {
4
+ content: "inline*",
5
+ group: "block",
6
+ attrs: {
7
+ id: { default: null },
8
+ guid: { default: "" }
9
+ },
10
+ parseDOM: [{
11
+ tag: "p",
12
+ getAttrs: (dom) => {
13
+ const id = dom.getAttribute("data-guid") || v4();
14
+ return {
15
+ id,
16
+ guid: id
17
+ };
18
+ }
19
+ }],
20
+ toDOM(node) {
21
+ const id = node.attrs.id || node.attrs.guid;
22
+ return [
23
+ "p",
24
+ {
25
+ "data-id": id,
26
+ "data-guid": id
27
+ },
28
+ 0
29
+ ];
30
+ }
27
31
  };
32
+ //#endregion
33
+ export { paragraph };
@@ -1,2 +1,5 @@
1
- import type { NodeSpec } from "prosemirror-model";
2
- export declare const tableNodes: Record<string, NodeSpec>;
1
+ import { NodeSpec } from "prosemirror-model";
2
+ //#region src/nodes/table-nodes.d.ts
3
+ declare const tableNodes: Record<string, NodeSpec>;
4
+ //#endregion
5
+ export { tableNodes };
@@ -1,21 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tableNodes = void 0;
4
- const prosemirror_tables_1 = require("prosemirror-tables");
5
- exports.tableNodes = (0, prosemirror_tables_1.tableNodes)({
6
- tableGroup: "block",
7
- cellContent: "block+",
8
- cellAttributes: {
9
- background: {
10
- default: null,
11
- getFromDOM(dom) {
12
- return dom.style.backgroundColor || null;
13
- },
14
- setDOMAttr(value, attrs) {
15
- if (value) {
16
- attrs.style = (attrs.style || "") + `background-color: ${value};`;
17
- }
18
- },
19
- },
20
- },
1
+ import { tableNodes as tableNodes$1 } from "prosemirror-tables";
2
+ //#region src/nodes/table-nodes.ts
3
+ const tableNodes = tableNodes$1({
4
+ tableGroup: "block",
5
+ cellContent: "block+",
6
+ cellAttributes: { background: {
7
+ default: null,
8
+ getFromDOM(dom) {
9
+ return dom.style.backgroundColor || null;
10
+ },
11
+ setDOMAttr(value, attrs) {
12
+ if (value) attrs.style = (attrs.style || "") + `background-color: ${value};`;
13
+ }
14
+ } }
21
15
  });
16
+ //#endregion
17
+ export { tableNodes };
@@ -1,10 +1,12 @@
1
- import type { EntityDefinition as Entity } from "../entity";
2
- import type { MentionDefinition as Mention } from "../mention";
3
- import type { TextDefinition as Text } from "./text";
1
+ import { EntityDefinition } from "../entity.js";
2
+ import { MentionDefinition } from "../mention.js";
3
+ import { TextDefinition } from "./text.js";
4
+ //#region src/nodes/types/inline-content.d.ts
4
5
  interface MarksObject<T> {
5
- marks?: Array<T>;
6
+ marks?: Array<T>;
6
7
  }
7
- export type InlineFormattedText = Text & MarksObject<unknown>;
8
- export type InlineAtomic = Mention | Entity | unknown;
9
- export type Inline = InlineFormattedText | InlineAtomic;
10
- export {};
8
+ type InlineFormattedText = TextDefinition & MarksObject<unknown>;
9
+ type InlineAtomic = MentionDefinition | EntityDefinition | unknown;
10
+ type Inline = InlineFormattedText | InlineAtomic;
11
+ //#endregion
12
+ export { Inline, InlineAtomic, InlineFormattedText };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,8 @@
1
- export interface TextDefinition {
2
- type: "text";
3
- text: string;
4
- marks?: Array<any>;
1
+ //#region src/nodes/types/text.d.ts
2
+ interface TextDefinition {
3
+ type: "text";
4
+ text: string;
5
+ marks?: Array<any>;
5
6
  }
7
+ //#endregion
8
+ export { TextDefinition };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });