@fibery/prosemirror-schema 4.9.0 → 4.11.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.
@@ -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
  };
@@ -35,7 +35,7 @@ const createMark = (markType, sharedColorGenerator) => {
35
35
  markTag,
36
36
  {
37
37
  class: markClassName,
38
- style: color ? `background-color:${color}` : ``,
38
+ style: color ? `--${markType}-background-color:${color}` : ``,
39
39
  "data-id": id,
40
40
  ...Object.keys(meta)
41
41
  .filter((key) => meta[key] !== false) // remove specials
@@ -5,7 +5,7 @@ const uuid_1 = require("uuid");
5
5
  exports.check_item = {
6
6
  content: "inline*",
7
7
  defining: true,
8
- selectable: false,
8
+ selectable: true,
9
9
  marks: "_",
10
10
  attrs: {
11
11
  id: { default: "" },
@@ -5,7 +5,7 @@ const uuid_1 = require("uuid");
5
5
  exports.check_list = {
6
6
  group: "block",
7
7
  defining: true,
8
- selectable: false,
8
+ selectable: true,
9
9
  content: `(check_item)+ (check_item|check_list)*`,
10
10
  attrs: {
11
11
  id: { default: "" },
@@ -9,6 +9,9 @@ exports.entity = {
9
9
  id: { default: "" },
10
10
  text: { default: "" },
11
11
  typeId: { default: "" },
12
+ meta: {
13
+ default: {},
14
+ },
12
15
  },
13
16
  parseDOM: [
14
17
  {
@@ -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",
@@ -9,6 +9,9 @@ exports.mention = {
9
9
  id: { default: "" },
10
10
  name: { default: "" },
11
11
  typeId: { default: "" },
12
+ meta: {
13
+ default: {},
14
+ },
12
15
  },
13
16
  parseDOM: [
14
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.9.0",
3
+ "version": "4.11.0",
4
4
  "description": "Fibery prosemirror schema",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",