@clevertask/scribe 0.1.18 → 0.1.19

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 +28 -0
  2. package/dist/components/Menu/BubbleMenu.js +1 -1
  3. package/dist/components/Menu/CalloutBubbleMenu.js +64 -64
  4. package/dist/components/Menu/LinkBubbleMenu.js +16 -16
  5. package/dist/components/Menu/TableBubbleMenu.js +1 -1
  6. package/dist/components/Scribe/extension/callout.js +1 -4
  7. package/dist/components/Scribe/extension/extension-markdown-paste.js +1 -1
  8. package/dist/components/Scribe/extension/external-link-preview/commands.js +37 -37
  9. package/dist/components/Scribe/extension/external-link-preview/index.d.ts +1 -2
  10. package/dist/components/Scribe/extension/external-link-preview/index.d.ts.map +1 -1
  11. package/dist/components/Scribe/extension/external-link-preview/index.js +20 -113
  12. package/dist/components/Scribe/extension/external-link-preview/node-view.js +6 -6
  13. package/dist/components/Scribe/extension/external-link-preview/paste.js +5 -5
  14. package/dist/components/Scribe/extension/external-link-preview/schema.d.ts +8 -0
  15. package/dist/components/Scribe/extension/external-link-preview/schema.d.ts.map +1 -0
  16. package/dist/components/Scribe/extension/external-link-preview/schema.js +100 -0
  17. package/dist/components/Scribe/extension/index.d.ts +2 -2
  18. package/dist/components/Scribe/extension/index.d.ts.map +1 -1
  19. package/dist/components/Scribe/extension/index.js +1 -1
  20. package/dist/components/Scribe/extension/slashCommand/index.js +32 -2
  21. package/dist/components/Scribe/index.js +2 -2
  22. package/dist/{slashCommand-D35jcSNp.js → dist-CzXFZHMF.js} +55 -80
  23. package/dist/extension-CKcvyrIW.js +57 -0
  24. package/dist/{html-to-markdown-CnlA8pb8.js → html-to-markdown-pY8ngCXa.js} +14 -14
  25. package/dist/main.js +6 -6
  26. package/dist/{markdown-to-html-BLzYd3Fu.js → markdown-to-html-COv0iaxr.js} +5 -5
  27. package/dist/{menus-Dy2dj4QT.js → menus-D1cst_3I.js} +104 -104
  28. package/dist/{extension-DOo9QT6U.js → schema-extensions-ChhE6XCo.js} +51918 -51953
  29. package/dist/schema-extensions.d.ts +20 -0
  30. package/dist/schema-extensions.d.ts.map +1 -0
  31. package/dist/schema-extensions.js +2 -0
  32. package/dist/schema.d.ts +17 -0
  33. package/dist/schema.d.ts.map +1 -0
  34. package/dist/schema.js +5 -0
  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 +8 -2
@@ -0,0 +1,20 @@
1
+ import type { AnyExtension } from "@tiptap/core";
2
+ import type { ScribeSchemaExtensionOptions } from "./schema";
3
+ type ScribeSchemaExtensionSet = {
4
+ starterKit: AnyExtension;
5
+ externalLinkPreview: AnyExtension;
6
+ callout: AnyExtension;
7
+ taskList: AnyExtension;
8
+ taskItem: AnyExtension;
9
+ tableKit: AnyExtension;
10
+ table: AnyExtension;
11
+ highlight: AnyExtension;
12
+ link: AnyExtension;
13
+ image: AnyExtension;
14
+ emoji: AnyExtension;
15
+ mathematics: AnyExtension;
16
+ typography: AnyExtension;
17
+ };
18
+ export declare const createScribeSchemaExtensionSet: ({ enableUndoRedo, }?: ScribeSchemaExtensionOptions) => ScribeSchemaExtensionSet;
19
+ export {};
20
+ //# sourceMappingURL=schema-extensions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-extensions.d.ts","sourceRoot":"","sources":["../lib/schema-extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAcjD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,KAAK,wBAAwB,GAAG;IAC9B,UAAU,EAAE,YAAY,CAAC;IACzB,mBAAmB,EAAE,YAAY,CAAC;IAClC,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,YAAY,CAAC;IACxB,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;IACpB,WAAW,EAAE,YAAY,CAAC;IAC1B,UAAU,EAAE,YAAY,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,8BAA8B,yBAExC,4BAA4B,KAAQ,wBAoCrC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./schema-extensions-ChhE6XCo.js";
2
+ export { e as createScribeSchemaExtensionSet };
@@ -0,0 +1,17 @@
1
+ import type { Extensions } from "@tiptap/core";
2
+ export type ScribeSchemaExtensionOptions = {
3
+ /**
4
+ * Enables Scribe's built-in undo and redo history. Schema-only consumers can
5
+ * disable it because history does not affect the ProseMirror document model.
6
+ */
7
+ enableUndoRedo?: boolean;
8
+ };
9
+ /**
10
+ * Build the schema-bearing Scribe extensions without importing Scribe's React
11
+ * editor UI or stylesheet.
12
+ *
13
+ * Consumer-owned document nodes must be appended separately. For example,
14
+ * CleverTask adds its resource-reference node to the returned extension list.
15
+ */
16
+ export declare const createScribeSchemaExtensions: (options?: ScribeSchemaExtensionOptions) => Extensions;
17
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../lib/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,MAAM,MAAM,4BAA4B,GAAG;IACzC;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,aAC9B,4BAA4B,KACpC,UAAoE,CAAC"}
package/dist/schema.js ADDED
@@ -0,0 +1,5 @@
1
+ import { t as e } from "./schema-extensions-ChhE6XCo.js";
2
+ //#region lib/schema.ts
3
+ var t = (t = {}) => Object.values(e(t));
4
+ //#endregion
5
+ export { t as createScribeSchemaExtensions };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../html-to-markdown-CnlA8pb8.js";
1
+ import { t as e } from "../html-to-markdown-pY8ngCXa.js";
2
2
  export { e as html2md };
@@ -1,9 +1,9 @@
1
1
  import { t as e } from "../dist-CkWsQ5Lj.js";
2
- import { t } from "../html-to-markdown-CnlA8pb8.js";
3
- import { t as n } from "../markdown-to-html-BLzYd3Fu.js";
2
+ import { t } from "../html-to-markdown-pY8ngCXa.js";
3
+ import { t as n } from "../markdown-to-html-COv0iaxr.js";
4
4
  import { isInViewport as r } from "./is-in-viewport.js";
5
5
  import { convertLegacyMathDelimiters as i } from "./convert-legacy-math-delimiters.js";
6
- import { t as a } from "../extension-DOo9QT6U.js";
6
+ import { t as a } from "../extension-CKcvyrIW.js";
7
7
  //#region lib/utils/create-scribe-editor.ts
8
8
  function o({ content: n = "", editable: r = !1, enableUndoRedo: i, externalLinkPreview: o, onContentChange: s }) {
9
9
  return new e({
@@ -1,2 +1,2 @@
1
- import { t as e } from "../markdown-to-html-BLzYd3Fu.js";
1
+ import { t as e } from "../markdown-to-html-COv0iaxr.js";
2
2
  export { e as md2html };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clevertask/scribe",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "private": false,
5
5
  "description": "A Radix-based Tiptap rich text editor with a Notion-style block interface for viewing and creating content. Perfect for diverse needs like notes, documents, AI chat, Markdown parsing, and comments.",
6
6
  "keywords": [
@@ -37,6 +37,11 @@
37
37
  "import": "./dist/main.js",
38
38
  "default": "./dist/main.js"
39
39
  },
40
+ "./schema": {
41
+ "types": "./dist/schema.d.ts",
42
+ "import": "./dist/schema.js",
43
+ "default": "./dist/schema.js"
44
+ },
40
45
  "./styles.css": "./dist/main.css",
41
46
  "./dist/main.css": "./dist/main.css"
42
47
  },
@@ -98,6 +103,7 @@
98
103
  "@tiptap/extension-typography": "3.30.2",
99
104
  "@tiptap/extension-underline": "3.30.2",
100
105
  "@tiptap/extensions": "3.30.2",
106
+ "@tiptap/html": "3.30.2",
101
107
  "@tiptap/pm": "3.30.2",
102
108
  "@tiptap/starter-kit": "3.30.2",
103
109
  "@types/lodash": "^4.17.25",
@@ -130,7 +136,7 @@
130
136
  "e2e:install": "playwright install --with-deps chromium",
131
137
  "e2e:prepare": "pnpm run build && node scripts/prepare-package-consumer.mjs",
132
138
  "e2e:serve": "pnpm --dir e2e/consumer exec vite --force --strictPort --host 127.0.0.1 --port 5174",
133
- "build": "vite build && npm run build:style && tsc -p tsconfig.types.json --noCheck",
139
+ "build": "vite build && npm run build:style && tsc -p tsconfig.types.json --noCheck && node scripts/verify-headless-schema-build.mjs",
134
140
  "build:style": "mkdir -p ./dist && cp ./lib/styles/main.css ./dist/main.css",
135
141
  "lint": "oxlint . --report-unused-disable-directives --deny-warnings",
136
142
  "preview": "vite preview",