@fibery/prosemirror-schema 4.13.0 → 4.14.1
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.js +4 -0
- package/lib/src/marks/linked-highlight.d.ts +2 -2
- package/lib/src/nodes/callout.js +1 -1
- package/lib/src/nodes/math-display.d.ts +2 -0
- package/lib/src/nodes/math-display.js +16 -0
- package/lib/src/nodes/math-inline.d.ts +2 -0
- package/lib/src/nodes/math-inline.js +16 -0
- package/lib/src/resizable-node-attrs.js +4 -4
- package/lib/src/transcription-node-attrs.js +1 -2
- package/package.json +4 -4
package/lib/src/create-schema.js
CHANGED
|
@@ -16,6 +16,8 @@ const mention_1 = require("./nodes/mention");
|
|
|
16
16
|
const fibery_view_1 = require("./nodes/fibery-view");
|
|
17
17
|
const check_list_1 = require("./nodes/check-list");
|
|
18
18
|
const check_item_1 = require("./nodes/check-item");
|
|
19
|
+
const math_display_1 = require("./nodes/math-display");
|
|
20
|
+
const math_inline_1 = require("./nodes/math-inline");
|
|
19
21
|
const code_block_1 = require("./nodes/code-block");
|
|
20
22
|
const video_1 = require("./nodes/video");
|
|
21
23
|
const file_1 = require("./nodes/file");
|
|
@@ -56,6 +58,8 @@ const createSchema = ({ sharedColorGenerator = null, headingToDOM = null, mediaT
|
|
|
56
58
|
callout: callout_1.callout,
|
|
57
59
|
columns: columns_1.columns,
|
|
58
60
|
column: column_1.column,
|
|
61
|
+
math_display: math_display_1.math_display,
|
|
62
|
+
math_inline: math_inline_1.math_inline,
|
|
59
63
|
};
|
|
60
64
|
let actualNodes = (0, prosemirror_schema_list_1.addListNodes)(base.spec.nodes, "paragraph block*", "block")
|
|
61
65
|
.append({ ...table_nodes_1.tableNodes })
|
|
@@ -3,9 +3,9 @@ type Generator = {
|
|
|
3
3
|
generate: (typeId?: string) => string;
|
|
4
4
|
};
|
|
5
5
|
export declare const makeLinkedHighlight: ({ sharedColorGenerator }: {
|
|
6
|
-
sharedColorGenerator?: Generator
|
|
6
|
+
sharedColorGenerator?: Generator;
|
|
7
7
|
}) => MarkSpec;
|
|
8
8
|
export declare const makeLinkedHighlightEntity: ({ sharedColorGenerator }: {
|
|
9
|
-
sharedColorGenerator?: Generator
|
|
9
|
+
sharedColorGenerator?: Generator;
|
|
10
10
|
}) => MarkSpec;
|
|
11
11
|
export {};
|
package/lib/src/nodes/callout.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
],
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
],
|
|
16
|
+
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.defaultWidth = exports.defaultHeight = void 0;
|
|
4
|
+
exports.createDefaultAttrs = createDefaultAttrs;
|
|
5
|
+
exports.createParseDomAttrs = createParseDomAttrs;
|
|
6
|
+
exports.createToDomAttrs = createToDomAttrs;
|
|
4
7
|
exports.defaultHeight = 400;
|
|
5
8
|
exports.defaultWidth = 900;
|
|
6
9
|
function createDefaultAttrs() {
|
|
@@ -19,7 +22,6 @@ function createDefaultAttrs() {
|
|
|
19
22
|
},
|
|
20
23
|
};
|
|
21
24
|
}
|
|
22
|
-
exports.createDefaultAttrs = createDefaultAttrs;
|
|
23
25
|
function createParseDomAttrs(dom) {
|
|
24
26
|
return {
|
|
25
27
|
nodeHeight: dom.getAttribute("data-node-height"),
|
|
@@ -28,7 +30,6 @@ function createParseDomAttrs(dom) {
|
|
|
28
30
|
nodeFullWidth: dom.getAttribute("data-node-full-width"),
|
|
29
31
|
};
|
|
30
32
|
}
|
|
31
|
-
exports.createParseDomAttrs = createParseDomAttrs;
|
|
32
33
|
function createToDomAttrs({ nodeHeight, nodeWidth, nodePageWidth, nodeFullWidth }) {
|
|
33
34
|
return {
|
|
34
35
|
"data-node-height": nodeHeight,
|
|
@@ -37,4 +38,3 @@ function createToDomAttrs({ nodeHeight, nodeWidth, nodePageWidth, nodeFullWidth
|
|
|
37
38
|
"data-node-full-width": nodeFullWidth,
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
|
-
exports.createToDomAttrs = createToDomAttrs;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createDefaultAttrs =
|
|
3
|
+
exports.createDefaultAttrs = createDefaultAttrs;
|
|
4
4
|
function createDefaultAttrs() {
|
|
5
5
|
return {
|
|
6
6
|
transcription: {
|
|
@@ -8,4 +8,3 @@ function createDefaultAttrs() {
|
|
|
8
8
|
},
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
exports.createDefaultAttrs = createDefaultAttrs;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/prosemirror-schema",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.14.1",
|
|
4
4
|
"description": "Fibery prosemirror schema",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"prosemirror-model": "1.19.4",
|
|
40
40
|
"prosemirror-schema-list": "1.3.0",
|
|
41
41
|
"prosemirror-tables": "1.3.7",
|
|
42
|
-
"typescript": "5.
|
|
43
|
-
"@fibery/
|
|
44
|
-
"@fibery/
|
|
42
|
+
"typescript": "5.8.3",
|
|
43
|
+
"@fibery/eslint-config": "8.6.1",
|
|
44
|
+
"@fibery/babel-preset": "7.4.0"
|
|
45
45
|
},
|
|
46
46
|
"jest": {
|
|
47
47
|
"testEnvironment": "jsdom",
|