@fibery/prosemirror-schema 4.8.0 → 4.10.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.
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createSchema = void 0;
4
4
  const prosemirror_model_1 = require("prosemirror-model");
5
- // @ts-ignore
6
5
  const prosemirror_schema_basic_1 = require("prosemirror-schema-basic");
7
6
  const prosemirror_schema_list_1 = require("prosemirror-schema-list");
8
7
  const table_nodes_1 = require("./nodes/table-nodes");
@@ -34,10 +33,15 @@ const createSchema = ({ sharedColorGenerator = null, headingToDOM = null, mediaT
34
33
  prosemirror_schema_basic_1.nodes.code_block = code_block_1.code_block;
35
34
  prosemirror_schema_basic_1.nodes.paragraph = paragraph_1.paragraph;
36
35
  prosemirror_schema_basic_1.nodes.heading = (0, heading_1.makeHeading)({ headingToDOM });
37
- prosemirror_schema_basic_1.marks.link = (0, link_1.makeLink)(prosemirror_schema_basic_1.marks.link);
38
- prosemirror_schema_basic_1.marks.linkedhighlight = (0, linked_highlight_1.makeLinkedHighlight)({ sharedColorGenerator });
39
- prosemirror_schema_basic_1.marks.linkedhighlightentity = (0, linked_highlight_1.makeLinkedHighlightEntity)({ sharedColorGenerator });
40
- const base = new prosemirror_model_1.Schema({ nodes: prosemirror_schema_basic_1.nodes, marks: prosemirror_schema_basic_1.marks });
36
+ const base = new prosemirror_model_1.Schema({
37
+ nodes: prosemirror_schema_basic_1.nodes,
38
+ marks: {
39
+ ...prosemirror_schema_basic_1.marks,
40
+ link: (0, link_1.makeLink)(prosemirror_schema_basic_1.marks.link),
41
+ linkedhighlight: (0, linked_highlight_1.makeLinkedHighlight)({ sharedColorGenerator }),
42
+ linkedhighlightentity: (0, linked_highlight_1.makeLinkedHighlightEntity)({ sharedColorGenerator }),
43
+ },
44
+ });
41
45
  const customNodes = {
42
46
  note: note_1.note,
43
47
  important: important_1.important,
@@ -13,7 +13,11 @@ const makeLink = (baseLink) => {
13
13
  fixedHref = `https://${href}`;
14
14
  }
15
15
  }
16
- return ["a", { href: fixedHref, target: "_blank", class: "prosemirror-link", rel: "noopener noreferrer" }, 0];
16
+ return [
17
+ "a",
18
+ { href: fixedHref, target: "_blank", class: "prosemirror-link", rel: "noopener noreferrer nofollow" },
19
+ 0,
20
+ ];
17
21
  },
18
22
  };
19
23
  };
@@ -1,5 +1,12 @@
1
1
  export declare const file: {
2
2
  attrs: {
3
+ transcription: {
4
+ default: {
5
+ status: string;
6
+ userId: string;
7
+ inserted: boolean;
8
+ };
9
+ };
3
10
  src: {};
4
11
  title: {
5
12
  default: string;
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.file = void 0;
4
+ const transcription_node_attrs_1 = require("../transcription-node-attrs");
4
5
  exports.file = {
5
6
  attrs: {
6
7
  src: {},
7
8
  title: { default: "Untitled" },
8
9
  size: {},
9
10
  type: {},
11
+ ...(0, transcription_node_attrs_1.createDefaultAttrs)(),
10
12
  },
11
13
  inline: true,
12
14
  group: "inline",
@@ -10,8 +10,8 @@ exports.imageBlock = {
10
10
  ...(0, resizable_node_attrs_1.createDefaultAttrs)(),
11
11
  },
12
12
  // ----------------
13
- inline: false,
14
- group: "block",
13
+ inline: false, // inline: true,
14
+ group: "block", // group: "inline",
15
15
  content: "inline*",
16
16
  atom: true,
17
17
  // ----------------
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.video = void 0;
4
4
  const resizable_node_attrs_1 = require("../resizable-node-attrs");
5
+ const transcription_node_attrs_1 = require("../transcription-node-attrs");
5
6
  const DEFAULT_VIDEO_WIDTH = 400;
6
7
  const DEFAULT_VIDEO_HEIGHT = 200;
7
8
  exports.video = {
@@ -14,6 +15,7 @@ exports.video = {
14
15
  title: { default: "" },
15
16
  alignment: { default: ":alignment/block-center" },
16
17
  ...(0, resizable_node_attrs_1.createDefaultAttrs)(),
18
+ ...(0, transcription_node_attrs_1.createDefaultAttrs)(),
17
19
  },
18
20
  group: "block",
19
21
  draggable: true,
@@ -0,0 +1,9 @@
1
+ export declare function createDefaultAttrs(): {
2
+ transcription: {
3
+ default: {
4
+ status: string;
5
+ userId: string;
6
+ inserted: boolean;
7
+ };
8
+ };
9
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createDefaultAttrs = void 0;
4
+ function createDefaultAttrs() {
5
+ return {
6
+ transcription: {
7
+ default: { status: "IDLE", userId: "", inserted: false },
8
+ },
9
+ };
10
+ }
11
+ exports.createDefaultAttrs = createDefaultAttrs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fibery/prosemirror-schema",
3
- "version": "4.8.0",
3
+ "version": "4.10.0",
4
4
  "description": "Fibery prosemirror schema",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -23,25 +23,25 @@
23
23
  },
24
24
  "private": false,
25
25
  "dependencies": {
26
- "prosemirror-schema-basic": "1.0.0",
26
+ "prosemirror-schema-basic": "1.2.2",
27
27
  "uuid": "8.3.2"
28
28
  },
29
29
  "peerDependencies": {
30
- "prosemirror-model": "^1.18.2",
31
- "prosemirror-schema-list": "^1.2.2",
32
- "prosemirror-tables": "1.3.2"
30
+ "prosemirror-model": "^1.19.4",
31
+ "prosemirror-schema-list": "^1.3.0",
32
+ "prosemirror-tables": "1.3.7"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/jest": "27.0.1",
36
36
  "@types/uuid": "8.3.3",
37
37
  "jest": "27.5.1",
38
38
  "jest-junit": "13.0.0",
39
- "prosemirror-model": "1.18.2",
40
- "prosemirror-schema-list": "1.2.2",
41
- "prosemirror-tables": "1.3.2",
42
- "typescript": "5.1.6",
43
- "@fibery/eslint-config": "8.5.1",
44
- "@fibery/babel-preset": "7.4.0"
39
+ "prosemirror-model": "1.19.4",
40
+ "prosemirror-schema-list": "1.3.0",
41
+ "prosemirror-tables": "1.3.7",
42
+ "typescript": "5.4.3",
43
+ "@fibery/babel-preset": "7.4.0",
44
+ "@fibery/eslint-config": "8.6.0"
45
45
  },
46
46
  "jest": {
47
47
  "testEnvironment": "jsdom",