@fibery/prosemirror-schema 4.16.1 → 4.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/src/create-schema.d.ts +6 -25
- package/lib/src/create-schema.js +59 -25
- package/lib/src/marks/code.d.ts +1 -1
- package/lib/src/marks/em.d.ts +4 -4
- package/lib/src/marks/em.js +4 -5
- package/lib/src/marks/hint-query.d.ts +1 -1
- package/lib/src/marks/link.d.ts +1 -1
- package/lib/src/marks/linked-highlight.d.ts +1 -1
- package/lib/src/marks/strike.d.ts +1 -1
- package/lib/src/marks/strong.d.ts +4 -4
- package/lib/src/marks/strong.js +5 -7
- package/lib/src/marks/text-background-color.d.ts +1 -1
- package/lib/src/marks/text-background-color.js +30 -10
- package/lib/src/marks/underline.d.ts +1 -1
- package/lib/src/nodes/check-item.d.ts +2 -2
- package/lib/src/nodes/check-list.d.ts +2 -2
- package/lib/src/nodes/code-block.d.ts +1 -1
- package/lib/src/nodes/column.d.ts +1 -1
- package/lib/src/nodes/columns.d.ts +1 -1
- package/lib/src/nodes/entity.d.ts +1 -1
- package/lib/src/nodes/fibery-view.d.ts +1 -1
- package/lib/src/nodes/heading.d.ts +1 -1
- package/lib/src/nodes/image-block.d.ts +1 -1
- package/lib/src/nodes/important.d.ts +1 -1
- package/lib/src/nodes/math-display.d.ts +1 -1
- package/lib/src/nodes/math-inline.d.ts +1 -1
- package/lib/src/nodes/media.d.ts +1 -1
- package/lib/src/nodes/mention.d.ts +1 -1
- package/lib/src/nodes/note.d.ts +1 -1
- package/lib/src/nodes/paragraph.d.ts +1 -1
- package/lib/src/nodes/table-nodes.d.ts +2 -1
- package/lib/src/nodes/types/inline-content.d.ts +3 -3
- package/lib/src/nodes/video.d.ts +1 -1
- package/lib/src/resizable-node-attrs.d.ts +1 -1
- package/lib/test-helpers/index.d.ts +1 -1
- package/package.json +24 -41
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Node
|
|
2
|
-
import {
|
|
1
|
+
import type { Node } from "prosemirror-model";
|
|
2
|
+
import { Schema, type NodeSpec, type MarkSpec } from "prosemirror-model";
|
|
3
|
+
import type { EmojiOptions } from "./nodes/emoji";
|
|
3
4
|
type Params = {
|
|
4
5
|
isImageBlockEnabled?: boolean;
|
|
5
6
|
fiberyViewEnabled?: boolean;
|
|
@@ -10,28 +11,8 @@ type Params = {
|
|
|
10
11
|
};
|
|
11
12
|
export declare const createSchema: ({ sharedColorGenerator, headingToDOM, mediaToDom, isImageBlockEnabled, fiberyViewEnabled, emojiOptions, }?: Params) => Schema;
|
|
12
13
|
export declare const Basic: {
|
|
13
|
-
nodes:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
blockquote: import("prosemirror-model").NodeSpec;
|
|
17
|
-
horizontal_rule: import("prosemirror-model").NodeSpec;
|
|
18
|
-
heading: import("prosemirror-model").NodeSpec;
|
|
19
|
-
code_block: import("prosemirror-model").NodeSpec;
|
|
20
|
-
text: import("prosemirror-model").NodeSpec;
|
|
21
|
-
image: import("prosemirror-model").NodeSpec;
|
|
22
|
-
hard_break: import("prosemirror-model").NodeSpec;
|
|
23
|
-
};
|
|
24
|
-
marks: {
|
|
25
|
-
link: import("prosemirror-model").MarkSpec;
|
|
26
|
-
em: import("prosemirror-model").MarkSpec;
|
|
27
|
-
strong: import("prosemirror-model").MarkSpec;
|
|
28
|
-
code: import("prosemirror-model").MarkSpec;
|
|
29
|
-
};
|
|
30
|
-
fibery: {
|
|
31
|
-
link: import("prosemirror-model").MarkSpec;
|
|
32
|
-
strike: import("prosemirror-model").MarkSpec;
|
|
33
|
-
underline: import("prosemirror-model").MarkSpec;
|
|
34
|
-
textBackgroundColor: import("prosemirror-model").MarkSpec;
|
|
35
|
-
};
|
|
14
|
+
nodes: Record<string, NodeSpec>;
|
|
15
|
+
marks: Record<string, MarkSpec>;
|
|
16
|
+
fibery: Record<string, MarkSpec>;
|
|
36
17
|
};
|
|
37
18
|
export {};
|
package/lib/src/create-schema.js
CHANGED
|
@@ -4,36 +4,36 @@ exports.Basic = exports.createSchema = void 0;
|
|
|
4
4
|
const prosemirror_model_1 = require("prosemirror-model");
|
|
5
5
|
const prosemirror_schema_basic_1 = require("prosemirror-schema-basic");
|
|
6
6
|
const prosemirror_schema_list_1 = require("prosemirror-schema-list");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
7
|
+
const code_1 = require("./marks/code");
|
|
8
|
+
const em_1 = require("./marks/em");
|
|
9
|
+
const hint_query_1 = require("./marks/hint-query");
|
|
10
|
+
const link_1 = require("./marks/link");
|
|
11
|
+
const linked_highlight_1 = require("./marks/linked-highlight");
|
|
12
|
+
const strike_1 = require("./marks/strike");
|
|
13
|
+
const strong_1 = require("./marks/strong");
|
|
14
|
+
const text_background_color_1 = require("./marks/text-background-color");
|
|
15
|
+
const underline_1 = require("./marks/underline");
|
|
16
|
+
const callout_1 = require("./nodes/callout");
|
|
17
|
+
const check_item_1 = require("./nodes/check-item");
|
|
18
|
+
const check_list_1 = require("./nodes/check-list");
|
|
19
|
+
const code_block_1 = require("./nodes/code-block");
|
|
20
|
+
const column_1 = require("./nodes/column");
|
|
21
|
+
const columns_1 = require("./nodes/columns");
|
|
22
|
+
const emoji_1 = require("./nodes/emoji");
|
|
14
23
|
const entity_1 = require("./nodes/entity");
|
|
15
|
-
const mention_1 = require("./nodes/mention");
|
|
16
24
|
const fibery_view_1 = require("./nodes/fibery-view");
|
|
17
|
-
const
|
|
18
|
-
const
|
|
25
|
+
const file_1 = require("./nodes/file");
|
|
26
|
+
const heading_1 = require("./nodes/heading");
|
|
27
|
+
const image_block_1 = require("./nodes/image-block");
|
|
28
|
+
const important_1 = require("./nodes/important");
|
|
19
29
|
const math_display_1 = require("./nodes/math-display");
|
|
20
30
|
const math_inline_1 = require("./nodes/math-inline");
|
|
21
|
-
const
|
|
31
|
+
const media_1 = require("./nodes/media");
|
|
32
|
+
const mention_1 = require("./nodes/mention");
|
|
33
|
+
const note_1 = require("./nodes/note");
|
|
34
|
+
const paragraph_1 = require("./nodes/paragraph");
|
|
35
|
+
const table_nodes_1 = require("./nodes/table-nodes");
|
|
22
36
|
const video_1 = require("./nodes/video");
|
|
23
|
-
const file_1 = require("./nodes/file");
|
|
24
|
-
const callout_1 = require("./nodes/callout");
|
|
25
|
-
const emoji_1 = require("./nodes/emoji");
|
|
26
|
-
const columns_1 = require("./nodes/columns");
|
|
27
|
-
const column_1 = require("./nodes/column");
|
|
28
|
-
const strike_1 = require("./marks/strike");
|
|
29
|
-
const underline_1 = require("./marks/underline");
|
|
30
|
-
const hint_query_1 = require("./marks/hint-query");
|
|
31
|
-
const text_background_color_1 = require("./marks/text-background-color");
|
|
32
|
-
const linked_highlight_1 = require("./marks/linked-highlight");
|
|
33
|
-
const link_1 = require("./marks/link");
|
|
34
|
-
const em_1 = require("./marks/em");
|
|
35
|
-
const strong_1 = require("./marks/strong");
|
|
36
|
-
const code_1 = require("./marks/code");
|
|
37
37
|
const createSchema = ({ sharedColorGenerator = null, headingToDOM = null, mediaToDom = null, isImageBlockEnabled = false, fiberyViewEnabled = false, emojiOptions, } = {}) => {
|
|
38
38
|
prosemirror_schema_basic_1.nodes.code_block = code_block_1.code_block;
|
|
39
39
|
prosemirror_schema_basic_1.nodes.paragraph = paragraph_1.paragraph;
|
|
@@ -81,6 +81,40 @@ const createSchema = ({ sharedColorGenerator = null, headingToDOM = null, mediaT
|
|
|
81
81
|
actualNodes = actualNodes.update("doc", {
|
|
82
82
|
content: `(block | columns)+`,
|
|
83
83
|
});
|
|
84
|
+
const listItemSpec = actualNodes.get("list_item");
|
|
85
|
+
actualNodes = actualNodes.update("list_item", {
|
|
86
|
+
...listItemSpec,
|
|
87
|
+
attrs: {
|
|
88
|
+
...(listItemSpec.attrs ?? {}),
|
|
89
|
+
state: { default: null },
|
|
90
|
+
id: { default: null },
|
|
91
|
+
},
|
|
92
|
+
parseDOM: [
|
|
93
|
+
{
|
|
94
|
+
tag: "li[data-check-item-state]",
|
|
95
|
+
getAttrs: (dom) => {
|
|
96
|
+
const el = dom;
|
|
97
|
+
const state = el.getAttribute("data-check-item-state");
|
|
98
|
+
return {
|
|
99
|
+
state: state === "TODO" || state === "DONE" ? state : null,
|
|
100
|
+
id: el.getAttribute("data-list-item-id") ?? null,
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{ tag: "li" },
|
|
105
|
+
],
|
|
106
|
+
toDOM(node) {
|
|
107
|
+
const { state, id } = node.attrs;
|
|
108
|
+
const attrs = {};
|
|
109
|
+
if (state) {
|
|
110
|
+
attrs["data-check-item-state"] = state;
|
|
111
|
+
}
|
|
112
|
+
if (id) {
|
|
113
|
+
attrs["data-list-item-id"] = id;
|
|
114
|
+
}
|
|
115
|
+
return Object.keys(attrs).length ? ["li", attrs, 0] : ["li", 0];
|
|
116
|
+
},
|
|
117
|
+
});
|
|
84
118
|
return new prosemirror_model_1.Schema({
|
|
85
119
|
nodes: actualNodes,
|
|
86
120
|
marks: base.spec.marks
|
package/lib/src/marks/code.d.ts
CHANGED
package/lib/src/marks/em.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MarkSpec } from "prosemirror-model";
|
|
1
|
+
import type { MarkSpec } from "prosemirror-model";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
An emphasis mark. Rendered as an `<em>` element. Has parse rules
|
|
4
|
+
that also match `<i>` and `font-style: italic`.
|
|
5
|
+
*/
|
|
6
6
|
export declare const em: MarkSpec;
|
package/lib/src/marks/em.js
CHANGED
|
@@ -3,16 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.em = void 0;
|
|
4
4
|
const emDOM = ["em", 0];
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
An emphasis mark. Rendered as an `<em>` element. Has parse rules
|
|
7
|
+
that also match `<i>` and `font-style: italic`.
|
|
8
|
+
*/
|
|
9
9
|
exports.em = {
|
|
10
10
|
parseDOM: [
|
|
11
11
|
{ tag: "i" },
|
|
12
12
|
{ tag: "em" },
|
|
13
13
|
{ style: "font-style=italic" },
|
|
14
|
-
|
|
15
|
-
{ style: "font-style=normal", clearMark: (m) => m.type.name == "em" },
|
|
14
|
+
{ style: "font-style=normal", clearMark: (m) => m.type.name === "em" },
|
|
16
15
|
],
|
|
17
16
|
toDOM() {
|
|
18
17
|
return emDOM;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MarkSpec } from "prosemirror-model";
|
|
1
|
+
import type { MarkSpec } from "prosemirror-model";
|
|
2
2
|
export declare const hintQuery: MarkSpec;
|
package/lib/src/marks/link.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MarkSpec } from "prosemirror-model";
|
|
1
|
+
import type { MarkSpec } from "prosemirror-model";
|
|
2
2
|
export declare const strike: MarkSpec;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MarkSpec } from "prosemirror-model";
|
|
1
|
+
import type { MarkSpec } from "prosemirror-model";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
A strong mark. Rendered as `<strong>`, parse rules also match
|
|
4
|
+
`<b>` and `font-weight: bold`.
|
|
5
|
+
*/
|
|
6
6
|
export declare const strong: MarkSpec;
|
package/lib/src/marks/strong.js
CHANGED
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.strong = void 0;
|
|
4
4
|
const strongDOM = ["strong", 0];
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
A strong mark. Rendered as `<strong>`, parse rules also match
|
|
7
|
+
`<b>` and `font-weight: bold`.
|
|
8
|
+
*/
|
|
9
9
|
exports.strong = {
|
|
10
10
|
parseDOM: [
|
|
11
11
|
{ tag: "strong" },
|
|
@@ -15,12 +15,10 @@ exports.strong = {
|
|
|
15
15
|
{
|
|
16
16
|
tag: "b",
|
|
17
17
|
getAttrs: (dom) => {
|
|
18
|
-
|
|
19
|
-
return dom.style.fontWeight != "normal" && null;
|
|
18
|
+
return dom.style.fontWeight !== "normal" && null;
|
|
20
19
|
},
|
|
21
20
|
},
|
|
22
|
-
|
|
23
|
-
{ style: "font-weight=400", clearMark: (m) => m.type.name == "strong" },
|
|
21
|
+
{ style: "font-weight=400", clearMark: (m) => m.type.name === "strong" },
|
|
24
22
|
{
|
|
25
23
|
style: "font-weight",
|
|
26
24
|
getAttrs: (value) => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MarkSpec } from "prosemirror-model";
|
|
1
|
+
import type { MarkSpec } from "prosemirror-model";
|
|
2
2
|
export declare const textBackgroundColor: MarkSpec;
|
|
@@ -18,6 +18,7 @@ const isColorToken = (text) => {
|
|
|
18
18
|
};
|
|
19
19
|
// Previously we used to store raw color value in the attribute
|
|
20
20
|
const persistedRawColorToColorTokenLookup = {
|
|
21
|
+
["HIGHLIGHT-SEARCH"]: ColorToken.Yellow,
|
|
21
22
|
["#f6f1a2"]: ColorToken.Yellow,
|
|
22
23
|
["#d2faad"]: ColorToken.Green,
|
|
23
24
|
["#befccc"]: ColorToken.Aquamarine,
|
|
@@ -29,41 +30,60 @@ const persistedRawColorToColorTokenLookup = {
|
|
|
29
30
|
["#e7e9eb"]: ColorToken.Grey,
|
|
30
31
|
};
|
|
31
32
|
const validateColorToken = (color) => {
|
|
33
|
+
if (!color) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
32
36
|
if (isColorToken(color)) {
|
|
33
37
|
return color;
|
|
34
38
|
}
|
|
35
|
-
return persistedRawColorToColorTokenLookup[color] ||
|
|
39
|
+
return persistedRawColorToColorTokenLookup[color] || undefined;
|
|
36
40
|
};
|
|
37
|
-
const getClassName = (
|
|
38
|
-
return
|
|
41
|
+
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(` `);
|
|
39
53
|
};
|
|
40
54
|
exports.textBackgroundColor = {
|
|
41
55
|
attrs: {
|
|
42
56
|
guid: { default: "" },
|
|
43
|
-
color: { default:
|
|
57
|
+
color: { default: undefined },
|
|
58
|
+
bgColor: { default: undefined },
|
|
59
|
+
fgColor: { default: undefined },
|
|
44
60
|
},
|
|
45
61
|
parseDOM: [
|
|
46
62
|
{
|
|
47
63
|
tag: "span[data-text-background-color]",
|
|
48
64
|
getAttrs: (domNode) => {
|
|
49
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;
|
|
50
68
|
return {
|
|
51
|
-
|
|
69
|
+
bgColor: bgColor,
|
|
70
|
+
fgColor: fgColor,
|
|
52
71
|
};
|
|
53
72
|
},
|
|
54
73
|
},
|
|
55
74
|
],
|
|
56
75
|
toDOM(node) {
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
const
|
|
76
|
+
const bgColor = node.attrs.bgColor || node.attrs.color;
|
|
77
|
+
const fgColor = node.attrs.fgColor;
|
|
78
|
+
const bgColorToken = validateColorToken(bgColor);
|
|
60
79
|
return [
|
|
61
80
|
"span",
|
|
62
81
|
{
|
|
63
82
|
"data-text-background-color": "true",
|
|
64
83
|
"data-guid": node.attrs.guid,
|
|
65
|
-
"data-color":
|
|
66
|
-
|
|
84
|
+
"data-bg-color": bgColor || undefined,
|
|
85
|
+
"data-fg-color": fgColor || undefined,
|
|
86
|
+
class: getClassName(bgColorToken, fgColor),
|
|
67
87
|
},
|
|
68
88
|
];
|
|
69
89
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MarkSpec } from "prosemirror-model";
|
|
1
|
+
import type { MarkSpec } from "prosemirror-model";
|
|
2
2
|
export declare const underline: MarkSpec;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NodeSpec } from "prosemirror-model";
|
|
2
|
-
import { Inline } from "./types/inline-content";
|
|
1
|
+
import type { NodeSpec } from "prosemirror-model";
|
|
2
|
+
import type { Inline } from "./types/inline-content";
|
|
3
3
|
export interface CheckItemDefinition {
|
|
4
4
|
type: "check_item";
|
|
5
5
|
content?: Array<Inline>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NodeSpec } from "prosemirror-model";
|
|
2
|
-
import { CheckItemDefinition } from "./check-item";
|
|
1
|
+
import type { NodeSpec } from "prosemirror-model";
|
|
2
|
+
import type { CheckItemDefinition } from "./check-item";
|
|
3
3
|
export interface CheckListContent extends Array<CheckItemDefinition | CheckListDefinition> {
|
|
4
4
|
0: CheckItemDefinition;
|
|
5
5
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodeSpec } from "prosemirror-model";
|
|
1
|
+
import type { NodeSpec } from "prosemirror-model";
|
|
2
2
|
export declare const code_block: NodeSpec;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodeSpec } from "prosemirror-model";
|
|
1
|
+
import type { NodeSpec } from "prosemirror-model";
|
|
2
2
|
export declare const column: NodeSpec;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodeSpec } from "prosemirror-model";
|
|
1
|
+
import type { NodeSpec } from "prosemirror-model";
|
|
2
2
|
export declare const columns: NodeSpec;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodeSpec } from "prosemirror-model";
|
|
1
|
+
import type { NodeSpec } from "prosemirror-model";
|
|
2
2
|
export declare const fiberyView: NodeSpec;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodeSpec } from "prosemirror-model";
|
|
1
|
+
import type { NodeSpec } from "prosemirror-model";
|
|
2
2
|
export declare const imageBlock: NodeSpec;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodeSpec } from "prosemirror-model";
|
|
1
|
+
import type { NodeSpec } from "prosemirror-model";
|
|
2
2
|
export declare const important: NodeSpec;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodeSpec } from "prosemirror-model";
|
|
1
|
+
import type { NodeSpec } from "prosemirror-model";
|
|
2
2
|
export declare const math_display: NodeSpec;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodeSpec } from "prosemirror-model";
|
|
1
|
+
import type { NodeSpec } from "prosemirror-model";
|
|
2
2
|
export declare const math_inline: NodeSpec;
|
package/lib/src/nodes/media.d.ts
CHANGED
package/lib/src/nodes/note.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodeSpec } from "prosemirror-model";
|
|
1
|
+
import type { NodeSpec } from "prosemirror-model";
|
|
2
2
|
export declare const note: NodeSpec;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodeSpec } from "prosemirror-model";
|
|
1
|
+
import type { NodeSpec } from "prosemirror-model";
|
|
2
2
|
export declare const paragraph: NodeSpec;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { NodeSpec } from "prosemirror-model";
|
|
2
|
+
export declare const tableNodes: Record<string, NodeSpec>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { TextDefinition as Text } from "./text";
|
|
1
|
+
import type { EntityDefinition as Entity } from "../entity";
|
|
2
|
+
import type { MentionDefinition as Mention } from "../mention";
|
|
3
|
+
import type { TextDefinition as Text } from "./text";
|
|
4
4
|
interface MarksObject<T> {
|
|
5
5
|
marks?: Array<T>;
|
|
6
6
|
}
|
package/lib/src/nodes/video.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Schema, Node as PMNode, ParseOptions } from "prosemirror-model";
|
|
1
|
+
import type { Schema, Node as PMNode, ParseOptions } from "prosemirror-model";
|
|
2
2
|
export declare const fromHTML: (html: string, schema: Schema, options?: ParseOptions) => PMNode;
|
|
3
3
|
export declare const toDOM: (node: PMNode, schema: Schema) => Node;
|
|
4
4
|
export declare const toHTML: (node: PMNode, schema: Schema) => string;
|
package/package.json
CHANGED
|
@@ -1,66 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/prosemirror-schema",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.18.0",
|
|
4
|
+
"private": false,
|
|
4
5
|
"description": "Fibery prosemirror schema",
|
|
5
|
-
"main": "./lib/index.js",
|
|
6
|
-
"types": "./lib/index.d.ts",
|
|
7
6
|
"files": [
|
|
8
7
|
"/lib"
|
|
9
8
|
],
|
|
9
|
+
"main": "./lib/index.js",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
+
"@fibery/source": "./index.ts",
|
|
12
13
|
"types": "./lib/index.d.ts",
|
|
13
14
|
"default": "./lib/index.js"
|
|
14
15
|
},
|
|
15
|
-
"./src/nodes/fibery-section":
|
|
16
|
+
"./src/nodes/fibery-section": {
|
|
17
|
+
"@fibery/source": "./src/nodes/fibery-section.ts",
|
|
18
|
+
"default": "./lib/src/nodes/fibery-section.js"
|
|
19
|
+
},
|
|
16
20
|
"./src/nodes/fibery-section.d.ts": "./lib/src/nodes/fibery-section.d.ts",
|
|
17
21
|
"./lib/src/nodes/fibery-section": "./lib/src/nodes/fibery-section.js",
|
|
18
22
|
"./lib/src/nodes/fibery-section.d.ts": "./lib/src/nodes/fibery-section.d.ts"
|
|
19
23
|
},
|
|
20
|
-
"fiberyDevExports": {
|
|
21
|
-
".": "./index.ts",
|
|
22
|
-
"./src/nodes/fibery-section": "./src/nodes/fibery-section.ts"
|
|
23
|
-
},
|
|
24
|
-
"private": false,
|
|
25
24
|
"dependencies": {
|
|
25
|
+
"prosemirror-model": "1.25.4",
|
|
26
26
|
"prosemirror-schema-basic": "1.2.2",
|
|
27
|
+
"prosemirror-schema-list": "1.5.1",
|
|
28
|
+
"prosemirror-tables": "1.4.2",
|
|
27
29
|
"uuid": "11.1.0"
|
|
28
30
|
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"typescript": "6.0.1-rc",
|
|
33
|
+
"@fibery/babel-preset": "7.4.2"
|
|
34
|
+
},
|
|
29
35
|
"peerDependencies": {
|
|
30
36
|
"prosemirror-model": "1.25.4",
|
|
31
|
-
"prosemirror-schema-list": "1.
|
|
37
|
+
"prosemirror-schema-list": "1.5.1",
|
|
32
38
|
"prosemirror-tables": "1.4.2"
|
|
33
39
|
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@types/jest": "30.0.0",
|
|
36
|
-
"jest": "30.2.0",
|
|
37
|
-
"jest-junit": "16.0.0",
|
|
38
|
-
"prosemirror-model": "1.25.4",
|
|
39
|
-
"prosemirror-schema-list": "1.3.0",
|
|
40
|
-
"prosemirror-tables": "1.4.2",
|
|
41
|
-
"typescript": "5.9.3",
|
|
42
|
-
"@fibery/babel-preset": "7.4.2",
|
|
43
|
-
"@fibery/eslint-config": "9.0.1"
|
|
44
|
-
},
|
|
45
|
-
"jest": {
|
|
46
|
-
"testEnvironment": "jsdom",
|
|
47
|
-
"coveragePathIgnorePatterns": [
|
|
48
|
-
"/node_modules/"
|
|
49
|
-
],
|
|
50
|
-
"collectCoverageFrom": [
|
|
51
|
-
"src/**/*.{js,jsx,ts,tsx}",
|
|
52
|
-
"!src/**/*.d.ts"
|
|
53
|
-
],
|
|
54
|
-
"coverageReporters": [
|
|
55
|
-
"text",
|
|
56
|
-
"cobertura"
|
|
57
|
-
]
|
|
58
|
-
},
|
|
59
40
|
"scripts": {
|
|
60
|
-
"build": "rm -rf lib &&
|
|
61
|
-
"test": "
|
|
62
|
-
"test:ci": "
|
|
63
|
-
"test:coverage": "
|
|
64
|
-
"
|
|
65
|
-
|
|
41
|
+
"build": "rm -rf lib && tsc --project tsconfig.build.json",
|
|
42
|
+
"test": "../../scripts/test.sh",
|
|
43
|
+
"test:ci": "../../scripts/test.sh --ci",
|
|
44
|
+
"test:coverage": "../../scripts/test.sh --ci --coverage",
|
|
45
|
+
"check": "../../scripts/check.sh",
|
|
46
|
+
"lint": "../../scripts/lint.sh"
|
|
47
|
+
},
|
|
48
|
+
"types": "./lib/index.d.ts"
|
|
66
49
|
}
|