@clevertask/scribe 0.1.21 → 0.1.23

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 (38) hide show
  1. package/README.md +32 -2
  2. package/dist/{BarMenu-tPZoiOba.js → BarMenu-DW95OBe1.js} +1 -1
  3. package/dist/assets/index.css +1 -1
  4. package/dist/components/Menu/BarMenu.js +1 -1
  5. package/dist/components/Menu/BubbleMenu.js +2 -2
  6. package/dist/components/Menu/CalloutBubbleMenu.js +2 -2
  7. package/dist/components/Menu/LinkBubbleMenu.js +2 -2
  8. package/dist/components/Menu/Mobile/ListOptionBar.js +1 -1
  9. package/dist/components/Menu/TableBubbleMenu.js +2 -2
  10. package/dist/components/Scribe/extension/emoji/suggest.js +1 -1
  11. package/dist/components/Scribe/extension/extension-markdown-paste.js +1 -1
  12. package/dist/components/Scribe/extension/external-link-preview/index.js +1 -1
  13. package/dist/components/Scribe/extension/external-link-preview/node-view.js +1 -1
  14. package/dist/components/Scribe/extension/index.d.ts.map +1 -1
  15. package/dist/components/Scribe/extension/index.js +1 -1
  16. package/dist/components/Scribe/extension/slashCommand/renderItems.js +1 -1
  17. package/dist/components/Scribe/index.js +4 -4
  18. package/dist/{dist-D31OwZrM.js → dist-_L8dTDsy.js} +1 -1
  19. package/dist/document-node-capabilities.d.ts +47 -0
  20. package/dist/document-node-capabilities.d.ts.map +1 -0
  21. package/dist/document-node-capabilities.js +406 -0
  22. package/dist/{extension-B-7qHi2u.js → extension-B7i7CZ1Y.js} +2 -1
  23. package/dist/{html-to-markdown-D7PT8MhP.js → html-to-markdown-CKpceHDk.js} +1 -1
  24. package/dist/main.js +2 -2
  25. package/dist/{markdown-to-html-ChfR7P_Y.js → markdown-to-html-zj2j0HLf.js} +18 -15
  26. package/dist/{menus-DLKcWlVX.js → menus-BhM4ctz2.js} +2 -2
  27. package/dist/{purify.es-DGv0-Lid.js → purify.es-CpMrJENN.js} +277 -277
  28. package/dist/{schema-extensions-BMJIwh-u.js → schema-extensions-ggKYCkRf.js} +1300 -1273
  29. package/dist/schema-extensions.d.ts +1 -0
  30. package/dist/schema-extensions.d.ts.map +1 -1
  31. package/dist/schema-extensions.js +1 -1
  32. package/dist/schema.d.ts +2 -0
  33. package/dist/schema.d.ts.map +1 -1
  34. package/dist/schema.js +4 -3
  35. package/dist/utils/html-to-markdown.js +1 -1
  36. package/dist/utils/index.js +3 -3
  37. package/dist/utils/markdown-to-html.js +1 -1
  38. package/package.json +10 -10
package/README.md CHANGED
@@ -39,7 +39,7 @@ A versatile, block-based rich text editor for diverse applications, built with T
39
39
  ## Installation
40
40
 
41
41
  ```bash
42
- npm install --save-exact @clevertask/scribe @tiptap/pm@3.30.5
42
+ npm install --save-exact @clevertask/scribe @tiptap/pm@3.31.3
43
43
  ```
44
44
 
45
45
  Scribe shares this exact ProseMirror runtime with consumer extensions. Keeping one
@@ -51,7 +51,7 @@ Use the schema subpath when a server or migration tool must parse Scribe content
51
51
  the React editor or Scribe's stylesheet:
52
52
 
53
53
  ```bash
54
- npm install --save-exact @clevertask/scribe @tiptap/core@3.30.5 @tiptap/html@3.30.5 @tiptap/pm@3.30.5
54
+ npm install --save-exact @clevertask/scribe @tiptap/core@3.31.3 @tiptap/html@3.31.3 @tiptap/pm@3.31.3
55
55
  ```
56
56
 
57
57
  ```ts
@@ -72,6 +72,36 @@ content containing those references.
72
72
  Pin Scribe and Tiptap to the exact versions used by the writing clients. This entry point makes the
73
73
  schema reusable; it does not make different schema versions interchangeable.
74
74
 
75
+ Scribe preserves inline code together with other text marks, such as bold and links. This applies
76
+ only to inline code; code-block text remains unmarked.
77
+
78
+ Servers can also inspect Scribe's document-node capabilities through the same headless entry:
79
+
80
+ ```ts
81
+ import {
82
+ createScribeDocumentNodeCapabilityManifest,
83
+ createScribeSchemaExtensions,
84
+ } from "@clevertask/scribe/schema";
85
+ import { getSchema } from "@tiptap/core";
86
+
87
+ const extensions = createScribeSchemaExtensions({ enableUndoRedo: false });
88
+ const capabilities = createScribeDocumentNodeCapabilityManifest(getSchema(extensions));
89
+
90
+ capabilities.paragraph.potentialOperations; // [{ type: "replace_content" }]
91
+ capabilities.callout.potentialOperations; // [{ type: "set_attributes", attributes: ["variant"] }]
92
+ capabilities.tableCell.potentialOperations; // []
93
+ ```
94
+
95
+ These are structural possibilities, not application permissions. An application must still check
96
+ authorization, the current node and its ancestors, protected descendants, revision visibility,
97
+ parser support, and size limits before it offers or performs a write.
98
+
99
+ If an application appends a consumer-owned node to the Scribe schema, it must also pass an exact
100
+ capability declaration to `createScribeDocumentNodeCapabilityManifest`. Use
101
+ `defineScribeDocumentNodeCapability` to type that declaration. Manifest creation fails when a node
102
+ is missing, duplicated, or no longer matches the schema. A custom node can declare no potential
103
+ operations and remain explicitly read-only.
104
+
75
105
  ## Usage
76
106
 
77
107
  ### Basic usage
@@ -1,4 +1,4 @@
1
- import { s as e } from "./dist-D31OwZrM.js";
1
+ import { s as e } from "./dist-_L8dTDsy.js";
2
2
  import { getPopupMountTarget as t } from "./components/Scribe/extension/getPopupMountTarget.js";
3
3
  import n from "./components/Menu/LinkEditor.js";
4
4
  import { hideLinkBubbleMenu as r } from "./components/Menu/linkBubbleMenuPlugin.js";