@fibery/prosemirror-schema 4.23.0 → 4.23.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.
Files changed (79) hide show
  1. package/lib/index.d.ts +8 -8
  2. package/lib/index.js +7 -7
  3. package/package.json +7 -33
  4. package/lib/test-helpers/index.d.ts +0 -7
  5. package/lib/test-helpers/index.js +0 -17
  6. /package/lib/{src/attr-constraints.d.ts → attr-constraints.d.ts} +0 -0
  7. /package/lib/{src/attr-constraints.js → attr-constraints.js} +0 -0
  8. /package/lib/{src/block-id-utils.d.ts → block-id-utils.d.ts} +0 -0
  9. /package/lib/{src/block-id-utils.js → block-id-utils.js} +0 -0
  10. /package/lib/{src/create-schema.d.ts → create-schema.d.ts} +0 -0
  11. /package/lib/{src/create-schema.js → create-schema.js} +0 -0
  12. /package/lib/{src/marks → marks}/code.d.ts +0 -0
  13. /package/lib/{src/marks → marks}/code.js +0 -0
  14. /package/lib/{src/marks → marks}/em.d.ts +0 -0
  15. /package/lib/{src/marks → marks}/em.js +0 -0
  16. /package/lib/{src/marks → marks}/hint-query.d.ts +0 -0
  17. /package/lib/{src/marks → marks}/hint-query.js +0 -0
  18. /package/lib/{src/marks → marks}/link.d.ts +0 -0
  19. /package/lib/{src/marks → marks}/link.js +0 -0
  20. /package/lib/{src/marks → marks}/linked-highlight.d.ts +0 -0
  21. /package/lib/{src/marks → marks}/linked-highlight.js +0 -0
  22. /package/lib/{src/marks → marks}/strike.d.ts +0 -0
  23. /package/lib/{src/marks → marks}/strike.js +0 -0
  24. /package/lib/{src/marks → marks}/strong.d.ts +0 -0
  25. /package/lib/{src/marks → marks}/strong.js +0 -0
  26. /package/lib/{src/marks → marks}/text-background-color.d.ts +0 -0
  27. /package/lib/{src/marks → marks}/text-background-color.js +0 -0
  28. /package/lib/{src/marks → marks}/underline.d.ts +0 -0
  29. /package/lib/{src/marks → marks}/underline.js +0 -0
  30. /package/lib/{src/nodes → nodes}/callout.d.ts +0 -0
  31. /package/lib/{src/nodes → nodes}/callout.js +0 -0
  32. /package/lib/{src/nodes → nodes}/check-item.d.ts +0 -0
  33. /package/lib/{src/nodes → nodes}/check-item.js +0 -0
  34. /package/lib/{src/nodes → nodes}/check-list.d.ts +0 -0
  35. /package/lib/{src/nodes → nodes}/check-list.js +0 -0
  36. /package/lib/{src/nodes → nodes}/code-block.d.ts +0 -0
  37. /package/lib/{src/nodes → nodes}/code-block.js +0 -0
  38. /package/lib/{src/nodes → nodes}/column.d.ts +0 -0
  39. /package/lib/{src/nodes → nodes}/column.js +0 -0
  40. /package/lib/{src/nodes → nodes}/columns.d.ts +0 -0
  41. /package/lib/{src/nodes → nodes}/columns.js +0 -0
  42. /package/lib/{src/nodes → nodes}/emoji.d.ts +0 -0
  43. /package/lib/{src/nodes → nodes}/emoji.js +0 -0
  44. /package/lib/{src/nodes → nodes}/entity.d.ts +0 -0
  45. /package/lib/{src/nodes → nodes}/entity.js +0 -0
  46. /package/lib/{src/nodes → nodes}/fibery-view.d.ts +0 -0
  47. /package/lib/{src/nodes → nodes}/fibery-view.js +0 -0
  48. /package/lib/{src/nodes → nodes}/file.d.ts +0 -0
  49. /package/lib/{src/nodes → nodes}/file.js +0 -0
  50. /package/lib/{src/nodes → nodes}/heading.d.ts +0 -0
  51. /package/lib/{src/nodes → nodes}/heading.js +0 -0
  52. /package/lib/{src/nodes → nodes}/image-block.d.ts +0 -0
  53. /package/lib/{src/nodes → nodes}/image-block.js +0 -0
  54. /package/lib/{src/nodes → nodes}/important.d.ts +0 -0
  55. /package/lib/{src/nodes → nodes}/important.js +0 -0
  56. /package/lib/{src/nodes → nodes}/math-display.d.ts +0 -0
  57. /package/lib/{src/nodes → nodes}/math-display.js +0 -0
  58. /package/lib/{src/nodes → nodes}/math-inline.d.ts +0 -0
  59. /package/lib/{src/nodes → nodes}/math-inline.js +0 -0
  60. /package/lib/{src/nodes → nodes}/media.d.ts +0 -0
  61. /package/lib/{src/nodes → nodes}/media.js +0 -0
  62. /package/lib/{src/nodes → nodes}/mention.d.ts +0 -0
  63. /package/lib/{src/nodes → nodes}/mention.js +0 -0
  64. /package/lib/{src/nodes → nodes}/note.d.ts +0 -0
  65. /package/lib/{src/nodes → nodes}/note.js +0 -0
  66. /package/lib/{src/nodes → nodes}/paragraph.d.ts +0 -0
  67. /package/lib/{src/nodes → nodes}/paragraph.js +0 -0
  68. /package/lib/{src/nodes → nodes}/table-nodes.d.ts +0 -0
  69. /package/lib/{src/nodes → nodes}/table-nodes.js +0 -0
  70. /package/lib/{src/nodes → nodes}/types/inline-content.d.ts +0 -0
  71. /package/lib/{src/nodes → nodes}/types/inline-content.js +0 -0
  72. /package/lib/{src/nodes → nodes}/types/text.d.ts +0 -0
  73. /package/lib/{src/nodes → nodes}/types/text.js +0 -0
  74. /package/lib/{src/nodes → nodes}/video.d.ts +0 -0
  75. /package/lib/{src/nodes → nodes}/video.js +0 -0
  76. /package/lib/{src/resizable-node-attrs.d.ts → resizable-node-attrs.d.ts} +0 -0
  77. /package/lib/{src/resizable-node-attrs.js → resizable-node-attrs.js} +0 -0
  78. /package/lib/{src/transcription-node-attrs.d.ts → transcription-node-attrs.d.ts} +0 -0
  79. /package/lib/{src/transcription-node-attrs.js → transcription-node-attrs.js} +0 -0
package/lib/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { defaultHeight, defaultWidth } from "./src/resizable-node-attrs.js";
2
- import { EmojiOptions } from "./src/nodes/emoji.js";
3
- import { Basic, createSchema } from "./src/create-schema.js";
4
- import { AttrConstraint, AttrConstraintType, AttrValidationIssue, NODE_ATTR_CONSTRAINTS, validateAttrValue, validateAttrs } from "./src/attr-constraints.js";
5
- import { FIBERY_VIEW_TYPE, buildBlockIdAttrs, getBlockId, getBlockIdAttr, getFiberyViewRef, hasLegacyGuidAttr } from "./src/block-id-utils.js";
6
- import { DEFAULT_VIDEO_HEIGHT, DEFAULT_VIDEO_WIDTH } from "./src/nodes/video.js";
7
- import { DEFAULT_CALLOUT_ICON, DEFAULT_CALLOUT_ICON_TYPE } from "./src/nodes/callout.js";
8
- import { ColorToken } from "./src/marks/text-background-color.js";
1
+ import { AttrConstraint, AttrConstraintType, AttrValidationIssue, NODE_ATTR_CONSTRAINTS, validateAttrValue, validateAttrs } from "./attr-constraints.js";
2
+ import { FIBERY_VIEW_TYPE, buildBlockIdAttrs, getBlockId, getBlockIdAttr, getFiberyViewRef, hasLegacyGuidAttr } from "./block-id-utils.js";
3
+ import { EmojiOptions } from "./nodes/emoji.js";
4
+ import { Basic, createSchema } from "./create-schema.js";
5
+ import { defaultHeight, defaultWidth } from "./resizable-node-attrs.js";
6
+ import { DEFAULT_VIDEO_HEIGHT, DEFAULT_VIDEO_WIDTH } from "./nodes/video.js";
7
+ import { DEFAULT_CALLOUT_ICON, DEFAULT_CALLOUT_ICON_TYPE } from "./nodes/callout.js";
8
+ import { ColorToken } from "./marks/text-background-color.js";
9
9
  import { Node, Schema } from "prosemirror-model";
10
10
  export { type AttrConstraint, type AttrConstraintType, type AttrValidationIssue, Basic, ColorToken, DEFAULT_CALLOUT_ICON, DEFAULT_CALLOUT_ICON_TYPE, DEFAULT_VIDEO_HEIGHT, DEFAULT_VIDEO_WIDTH, type EmojiOptions, FIBERY_VIEW_TYPE, NODE_ATTR_CONSTRAINTS, Node, Schema, buildBlockIdAttrs, createSchema, defaultHeight, defaultWidth, getBlockId, getBlockIdAttr, getFiberyViewRef, hasLegacyGuidAttr, validateAttrValue, validateAttrs };
package/lib/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { defaultHeight, defaultWidth } from "./src/resizable-node-attrs.js";
2
- import { ColorToken } from "./src/marks/text-background-color.js";
3
- import { DEFAULT_CALLOUT_ICON, DEFAULT_CALLOUT_ICON_TYPE } from "./src/nodes/callout.js";
4
- import { DEFAULT_VIDEO_HEIGHT, DEFAULT_VIDEO_WIDTH } from "./src/nodes/video.js";
5
- import { Basic, createSchema } from "./src/create-schema.js";
6
- import { NODE_ATTR_CONSTRAINTS, validateAttrValue, validateAttrs } from "./src/attr-constraints.js";
7
- import { FIBERY_VIEW_TYPE, buildBlockIdAttrs, getBlockId, getBlockIdAttr, getFiberyViewRef, hasLegacyGuidAttr } from "./src/block-id-utils.js";
1
+ import { NODE_ATTR_CONSTRAINTS, validateAttrValue, validateAttrs } from "./attr-constraints.js";
2
+ import { FIBERY_VIEW_TYPE, buildBlockIdAttrs, getBlockId, getBlockIdAttr, getFiberyViewRef, hasLegacyGuidAttr } from "./block-id-utils.js";
3
+ import { ColorToken } from "./marks/text-background-color.js";
4
+ import { DEFAULT_CALLOUT_ICON, DEFAULT_CALLOUT_ICON_TYPE } from "./nodes/callout.js";
5
+ import { defaultHeight, defaultWidth } from "./resizable-node-attrs.js";
6
+ import { DEFAULT_VIDEO_HEIGHT, DEFAULT_VIDEO_WIDTH } from "./nodes/video.js";
7
+ import { Basic, createSchema } from "./create-schema.js";
8
8
  import { Node, Schema } from "prosemirror-model";
9
9
  export { Basic, ColorToken, DEFAULT_CALLOUT_ICON, DEFAULT_CALLOUT_ICON_TYPE, DEFAULT_VIDEO_HEIGHT, DEFAULT_VIDEO_WIDTH, FIBERY_VIEW_TYPE, NODE_ATTR_CONSTRAINTS, Node, Schema, buildBlockIdAttrs, createSchema, defaultHeight, defaultWidth, getBlockId, getBlockIdAttr, getFiberyViewRef, hasLegacyGuidAttr, validateAttrValue, validateAttrs };
package/package.json CHANGED
@@ -1,26 +1,20 @@
1
1
  {
2
2
  "name": "@fibery/prosemirror-schema",
3
- "version": "4.23.0",
4
- "private": false,
3
+ "version": "4.23.1",
5
4
  "description": "Fibery prosemirror schema",
5
+ "license": "UNLICENSED",
6
6
  "files": [
7
- "/lib"
7
+ "lib"
8
8
  ],
9
9
  "type": "module",
10
+ "sideEffects": false,
10
11
  "main": "./lib/index.js",
12
+ "types": "./lib/index.d.ts",
11
13
  "exports": {
12
14
  ".": {
13
- "@fibery/source": "./index.ts",
14
15
  "types": "./lib/index.d.ts",
15
16
  "default": "./lib/index.js"
16
- },
17
- "./src/nodes/fibery-section": {
18
- "@fibery/source": "./src/nodes/fibery-section.ts",
19
- "default": "./lib/src/nodes/fibery-section.js"
20
- },
21
- "./src/nodes/fibery-section.d.ts": "./lib/src/nodes/fibery-section.d.ts",
22
- "./lib/src/nodes/fibery-section": "./lib/src/nodes/fibery-section.js",
23
- "./lib/src/nodes/fibery-section.d.ts": "./lib/src/nodes/fibery-section.d.ts"
17
+ }
24
18
  },
25
19
  "dependencies": {
26
20
  "prosemirror-model": "1.25.4",
@@ -29,29 +23,9 @@
29
23
  "prosemirror-tables": "1.8.5",
30
24
  "uuid": "11.1.0"
31
25
  },
32
- "devDependencies": {
33
- "tsdown": "0.22.7",
34
- "typescript": "rc"
35
- },
36
26
  "peerDependencies": {
37
27
  "prosemirror-model": "1.25.4",
38
28
  "prosemirror-schema-list": "1.5.1",
39
29
  "prosemirror-tables": "1.8.5"
40
- },
41
- "size-limit": [
42
- {
43
- "path": "lib/**/*.js",
44
- "limit": "17 kB"
45
- }
46
- ],
47
- "scripts": {
48
- "build": "pnpm run typecheck && tsdown",
49
- "test": "../../scripts/test.sh",
50
- "test:ci": "../../scripts/test.sh --ci",
51
- "test:coverage": "../../scripts/test.sh --ci --coverage",
52
- "lint": "pnpm -w lint .",
53
- "typecheck": "../../scripts/typecheck.sh",
54
- "check": "../../scripts/check.sh"
55
- },
56
- "types": "./lib/index.d.ts"
30
+ }
57
31
  }
@@ -1,7 +0,0 @@
1
- import { Node as Node$1, ParseOptions, Schema } from "prosemirror-model";
2
- //#region test-helpers/index.d.ts
3
- declare const fromHTML: (html: string, schema: Schema, options?: ParseOptions) => Node$1;
4
- declare const toDOM: (node: Node$1, schema: Schema) => Node;
5
- declare const toHTML: (node: Node$1, schema: Schema) => string;
6
- //#endregion
7
- export { fromHTML, toDOM, toHTML };
@@ -1,17 +0,0 @@
1
- import { DOMParser, DOMSerializer, Fragment } from "prosemirror-model";
2
- //#region test-helpers/index.ts
3
- const fromHTML = (html, schema, options) => {
4
- const el = document.createElement("div");
5
- el.innerHTML = html;
6
- return DOMParser.fromSchema(schema).parse(el, options);
7
- };
8
- const toDOM = (node, schema) => {
9
- return DOMSerializer.fromSchema(schema).serializeFragment(Fragment.from(node));
10
- };
11
- const toHTML = (node, schema) => {
12
- const el = document.createElement("div");
13
- el.appendChild(toDOM(node, schema));
14
- return el.innerHTML;
15
- };
16
- //#endregion
17
- export { fromHTML, toDOM, toHTML };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes