@clevertask/scribe 0.1.20 → 0.1.22

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 (49) hide show
  1. package/README.md +3 -0
  2. package/dist/{BarMenu-sZGqMjQr.js → BarMenu-tPZoiOba.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 +6 -6
  8. package/dist/components/Menu/Mobile/ListOptionBar.js +1 -1
  9. package/dist/components/Menu/TableBubbleMenu.js +2 -2
  10. package/dist/components/Menu/linkBubbleMenuPlugin.js +1 -1
  11. package/dist/components/Scribe/extension/callout.js +1 -1
  12. package/dist/components/Scribe/extension/emoji/suggest.js +3 -3
  13. package/dist/components/Scribe/extension/extension-link.js +1 -1
  14. package/dist/components/Scribe/extension/extension-markdown-paste.js +2 -2
  15. package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
  16. package/dist/components/Scribe/extension/external-link-preview/commands.js +1 -1
  17. package/dist/components/Scribe/extension/external-link-preview/index.js +1 -1
  18. package/dist/components/Scribe/extension/external-link-preview/node-view.js +1 -1
  19. package/dist/components/Scribe/extension/external-link-preview/render-html.js +1 -1
  20. package/dist/components/Scribe/extension/external-link-preview/resolver.js +1 -1
  21. package/dist/components/Scribe/extension/external-link-preview/schema.js +1 -1
  22. package/dist/components/Scribe/extension/index.d.ts.map +1 -1
  23. package/dist/components/Scribe/extension/index.js +1 -1
  24. package/dist/components/Scribe/extension/resizable-table.js +1 -1
  25. package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +2 -2
  26. package/dist/components/Scribe/extension/slashCommand/index.js +2 -2
  27. package/dist/components/Scribe/extension/slashCommand/renderItems.js +2 -2
  28. package/dist/components/Scribe/extension/tableOfContents.js +3 -3
  29. package/dist/components/Scribe/index.js +4 -4
  30. package/dist/{dist-Bm6rBIf2.js → dist-Cer8ra_P.js} +2 -2
  31. package/dist/{dist-jjH04EIX.js → dist-ClNucvAM.js} +441 -435
  32. package/dist/{dist-BrbZZTdj.js → dist-D31OwZrM.js} +212 -161
  33. package/dist/{extension-BNjzWzJi.js → extension-BMUUYPzc.js} +3 -2
  34. package/dist/{extension-link-7ta0X4tP.js → extension-link-BQrkQZHi.js} +23 -23
  35. package/dist/{html-to-markdown-pY8ngCXa.js → html-to-markdown-D7PT8MhP.js} +1 -1
  36. package/dist/main.js +2 -2
  37. package/dist/{markdown-to-html-BSuSwB4B.js → markdown-to-html-ChfR7P_Y.js} +3 -3
  38. package/dist/{menus-i0cEakC3.js → menus-DLKcWlVX.js} +34 -34
  39. package/dist/{resizable-table-DFTyMlVu.js → resizable-table-DgMCiXeO.js} +3 -3
  40. package/dist/{schema-extensions-B-U6SbYg.js → schema-extensions-CQTswF0n.js} +1355 -1353
  41. package/dist/schema-extensions.d.ts +1 -0
  42. package/dist/schema-extensions.d.ts.map +1 -1
  43. package/dist/schema-extensions.js +1 -1
  44. package/dist/schema.js +1 -1
  45. package/dist/{tippy.esm-DOXqN1Qm.js → tippy.esm-8vSV0zL7.js} +6 -6
  46. package/dist/utils/html-to-markdown.js +1 -1
  47. package/dist/utils/index.js +4 -4
  48. package/dist/utils/markdown-to-html.js +1 -1
  49. package/package.json +56 -53
@@ -2,6 +2,7 @@ import type { AnyExtension } from "@tiptap/core";
2
2
  import type { ScribeSchemaExtensionOptions } from "./schema";
3
3
  type ScribeSchemaExtensionSet = {
4
4
  starterKit: AnyExtension;
5
+ code: AnyExtension;
5
6
  externalLinkPreview: AnyExtension;
6
7
  callout: AnyExtension;
7
8
  taskList: AnyExtension;
@@ -1 +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;AAc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,MAAM,8BAA8B,yBAExC,4BAA4B,KAAQ,wBAsCrC,CAAC"}
@@ -1,2 +1,2 @@
1
- import { t as e } from "./schema-extensions-B-U6SbYg.js";
1
+ import { t as e } from "./schema-extensions-CQTswF0n.js";
2
2
  export { e as createScribeSchemaExtensionSet };
package/dist/schema.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./schema-extensions-B-U6SbYg.js";
1
+ import { t as e } from "./schema-extensions-CQTswF0n.js";
2
2
  //#region lib/schema.ts
3
3
  var t = (t = {}) => Object.values(e(t));
4
4
  //#endregion
@@ -54,7 +54,7 @@ function v(e) {
54
54
  var t = e.state;
55
55
  Object.keys(t.elements).forEach(function(e) {
56
56
  var n = t.styles[e] || {}, r = t.attributes[e] || {}, i = t.elements[e];
57
- !g(i) || !p(i) || (Object.assign(i.style, n), Object.keys(r).forEach(function(e) {
57
+ g(i) && p(i) && (Object.assign(i.style, n), Object.keys(r).forEach(function(e) {
58
58
  var t = r[e];
59
59
  t === !1 ? i.removeAttribute(e) : i.setAttribute(e, t === !0 ? "" : t);
60
60
  }));
@@ -76,7 +76,7 @@ function y(e) {
76
76
  var r = t.elements[e], i = t.attributes[e] || {}, a = Object.keys(t.styles.hasOwnProperty(e) ? t.styles[e] : n[e]).reduce(function(e, t) {
77
77
  return e[t] = "", e;
78
78
  }, {});
79
- !g(r) || !p(r) || (Object.assign(r.style, a), Object.keys(i).forEach(function(e) {
79
+ g(r) && p(r) && (Object.assign(r.style, a), Object.keys(i).forEach(function(e) {
80
80
  r.removeAttribute(e);
81
81
  }));
82
82
  });
@@ -241,7 +241,7 @@ var H = function(e, t) {
241
241
  };
242
242
  function U(r) {
243
243
  var i, a = r.state, o = r.name, s = r.options, c = a.elements.arrow, l = a.modifiersData.popperOffsets, u = x(a.placement), d = L(u), f = ["left", "right"].indexOf(u) >= 0 ? "height" : "width";
244
- if (!(!c || !l)) {
244
+ if (c && l) {
245
245
  var p = H(s.padding, a), m = O(c), h = d === "y" ? "top" : n, g = d === "y" ? e : t, _ = a.rects.reference[f] + a.rects.reference[d] - l[d] - a.rects.popper[f], v = l[d] - a.rects.reference[d], y = I(c), b = y ? d === "y" ? y.clientHeight || 0 : y.clientWidth || 0 : 0, S = _ / 2 - v / 2, C = p[h], w = b - m[f] - p[g], T = b / 2 - m[f] / 2 + S, E = R(C, T, w), D = d;
246
246
  a.modifiersData[o] = (i = {}, i[D] = E, i.centerOffset = E - T, i);
247
247
  }
@@ -1368,7 +1368,7 @@ function on(e, t) {
1368
1368
  }
1369
1369
  }
1370
1370
  function F() {
1371
- w || !y.props.aria.expanded || dt(y.props.triggerTarget || e).forEach(function(e) {
1371
+ !w && y.props.aria.expanded && dt(y.props.triggerTarget || e).forEach(function(e) {
1372
1372
  y.props.interactive ? e.setAttribute("aria-expanded", y.state.isVisible && e === O() ? "true" : "false") : e.removeAttribute("aria-expanded");
1373
1373
  });
1374
1374
  }
@@ -1378,7 +1378,7 @@ function on(e, t) {
1378
1378
  });
1379
1379
  }
1380
1380
  function L(t) {
1381
- if (!(Z.isTouch && (c || t.type === "mousedown"))) {
1381
+ if (!Z.isTouch || !c && t.type !== "mousedown") {
1382
1382
  var n = t.composedPath && t.composedPath()[0] || t.target;
1383
1383
  if (!(y.props.interactive && Ot(x, n))) {
1384
1384
  if (dt(y.props.triggerTarget || e).some(function(e) {
@@ -1625,7 +1625,7 @@ function on(e, t) {
1625
1625
  }
1626
1626
  f = function() {
1627
1627
  var e;
1628
- if (!(!y.state.isVisible || l)) {
1628
+ if (y.state.isVisible && !l) {
1629
1629
  if (l = !0, x.offsetHeight, x.style.transition = y.props.moveTransition, D() && y.props.animation) {
1630
1630
  var t = A(), n = t.box, r = t.content;
1631
1631
  Ct([n, r], i), wt([n, r], "visible");
@@ -1,2 +1,2 @@
1
- import { t as e } from "../html-to-markdown-pY8ngCXa.js";
1
+ import { t as e } from "../html-to-markdown-D7PT8MhP.js";
2
2
  export { e as html2md };
@@ -1,9 +1,9 @@
1
- import { t as e } from "../dist-jjH04EIX.js";
2
- import { t } from "../html-to-markdown-pY8ngCXa.js";
3
- import { t as n } from "../markdown-to-html-BSuSwB4B.js";
1
+ import { t as e } from "../dist-ClNucvAM.js";
2
+ import { t } from "../html-to-markdown-D7PT8MhP.js";
3
+ import { t as n } from "../markdown-to-html-ChfR7P_Y.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-BNjzWzJi.js";
6
+ import { t as a } from "../extension-BMUUYPzc.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-BSuSwB4B.js";
1
+ import { t as e } from "../markdown-to-html-ChfR7P_Y.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.20",
3
+ "version": "0.1.22",
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": [
@@ -50,85 +50,87 @@
50
50
  "registry": "https://registry.npmjs.org/"
51
51
  },
52
52
  "dependencies": {
53
- "@tiptap/core": "3.30.5",
54
- "@tiptap/extension-bubble-menu": "3.30.5",
55
- "@tiptap/extension-floating-menu": "3.30.5",
56
- "@tiptap/react": "3.30.5",
57
- "@tiptap/suggestion": "3.30.5",
53
+ "@tiptap/core": "3.31.3",
54
+ "@tiptap/extension-bubble-menu": "3.31.3",
55
+ "@tiptap/extension-floating-menu": "3.31.3",
56
+ "@tiptap/react": "3.31.3",
57
+ "@tiptap/suggestion": "3.31.3",
58
58
  "clsx": "^2.1.1",
59
59
  "dompurify": "^3.4.14",
60
- "katex": "^0.18.4",
60
+ "katex": "^0.18.5",
61
61
  "marked": "^18.0.11",
62
62
  "tippy.js": "^6.3.7",
63
63
  "turndown": "^7.2.4"
64
64
  },
65
65
  "devDependencies": {
66
- "@playwright/test": "^1.62.1",
66
+ "@playwright/test": "^1.63.0",
67
67
  "@radix-ui/themes": "^3.3.0",
68
68
  "@testing-library/dom": "^10.4.1",
69
69
  "@testing-library/jest-dom": "^7.0.1",
70
70
  "@testing-library/react": "^16.3.3",
71
- "@tiptap/extension-blockquote": "3.30.5",
72
- "@tiptap/extension-bold": "3.30.5",
73
- "@tiptap/extension-bullet-list": "3.30.5",
74
- "@tiptap/extension-code": "3.30.5",
75
- "@tiptap/extension-code-block": "3.30.5",
76
- "@tiptap/extension-document": "3.30.5",
77
- "@tiptap/extension-dropcursor": "3.30.5",
78
- "@tiptap/extension-emoji": "3.30.5",
79
- "@tiptap/extension-focus": "3.30.5",
80
- "@tiptap/extension-gapcursor": "3.30.5",
81
- "@tiptap/extension-hard-break": "3.30.5",
82
- "@tiptap/extension-heading": "3.30.5",
83
- "@tiptap/extension-highlight": "3.30.5",
84
- "@tiptap/extension-horizontal-rule": "3.30.5",
85
- "@tiptap/extension-image": "3.30.5",
86
- "@tiptap/extension-italic": "3.30.5",
87
- "@tiptap/extension-link": "3.30.5",
88
- "@tiptap/extension-list": "3.30.5",
89
- "@tiptap/extension-list-item": "3.30.5",
90
- "@tiptap/extension-list-keymap": "3.30.5",
91
- "@tiptap/extension-mathematics": "3.30.5",
92
- "@tiptap/extension-ordered-list": "3.30.5",
93
- "@tiptap/extension-paragraph": "3.30.5",
94
- "@tiptap/extension-placeholder": "3.30.5",
95
- "@tiptap/extension-strike": "3.30.5",
96
- "@tiptap/extension-table": "3.30.5",
97
- "@tiptap/extension-table-cell": "3.30.5",
98
- "@tiptap/extension-table-header": "3.30.5",
99
- "@tiptap/extension-table-row": "3.30.5",
100
- "@tiptap/extension-task-item": "3.30.5",
101
- "@tiptap/extension-task-list": "3.30.5",
102
- "@tiptap/extension-text": "3.30.5",
103
- "@tiptap/extension-typography": "3.30.5",
104
- "@tiptap/extension-underline": "3.30.5",
105
- "@tiptap/extensions": "3.30.5",
106
- "@tiptap/html": "3.30.5",
107
- "@tiptap/pm": "3.30.5",
108
- "@tiptap/starter-kit": "3.30.5",
71
+ "@tiptap/extension-blockquote": "3.31.3",
72
+ "@tiptap/extension-bold": "3.31.3",
73
+ "@tiptap/extension-bullet-list": "3.31.3",
74
+ "@tiptap/extension-code": "3.31.3",
75
+ "@tiptap/extension-code-block": "3.31.3",
76
+ "@tiptap/extension-document": "3.31.3",
77
+ "@tiptap/extension-dropcursor": "3.31.3",
78
+ "@tiptap/extension-emoji": "3.31.3",
79
+ "@tiptap/extension-focus": "3.31.3",
80
+ "@tiptap/extension-gapcursor": "3.31.3",
81
+ "@tiptap/extension-hard-break": "3.31.3",
82
+ "@tiptap/extension-heading": "3.31.3",
83
+ "@tiptap/extension-highlight": "3.31.3",
84
+ "@tiptap/extension-horizontal-rule": "3.31.3",
85
+ "@tiptap/extension-image": "3.31.3",
86
+ "@tiptap/extension-italic": "3.31.3",
87
+ "@tiptap/extension-link": "3.31.3",
88
+ "@tiptap/extension-list": "3.31.3",
89
+ "@tiptap/extension-list-item": "3.31.3",
90
+ "@tiptap/extension-list-keymap": "3.31.3",
91
+ "@tiptap/extension-mathematics": "3.31.3",
92
+ "@tiptap/extension-ordered-list": "3.31.3",
93
+ "@tiptap/extension-paragraph": "3.31.3",
94
+ "@tiptap/extension-placeholder": "3.31.3",
95
+ "@tiptap/extension-strike": "3.31.3",
96
+ "@tiptap/extension-table": "3.31.3",
97
+ "@tiptap/extension-table-cell": "3.31.3",
98
+ "@tiptap/extension-table-header": "3.31.3",
99
+ "@tiptap/extension-table-row": "3.31.3",
100
+ "@tiptap/extension-task-item": "3.31.3",
101
+ "@tiptap/extension-task-list": "3.31.3",
102
+ "@tiptap/extension-text": "3.31.3",
103
+ "@tiptap/extension-typography": "3.31.3",
104
+ "@tiptap/extension-underline": "3.31.3",
105
+ "@tiptap/extensions": "3.31.3",
106
+ "@tiptap/html": "3.31.3",
107
+ "@tiptap/pm": "3.31.3",
108
+ "@tiptap/starter-kit": "3.31.3",
109
109
  "@types/lodash": "^4.17.25",
110
110
  "@types/node": "^24.13.3",
111
111
  "@types/react": "^19.2.18",
112
- "@types/react-dom": "^19.2.5",
112
+ "@types/react-dom": "^19.2.7",
113
113
  "@types/turndown": "^5.0.6",
114
114
  "@vitejs/plugin-react": "^6.1.1",
115
115
  "glob": "^13.0.6",
116
116
  "jsdom": "^30.0.1",
117
117
  "lodash": "^4.18.1",
118
- "oxfmt": "^0.65.0",
119
- "oxlint": "^1.80.0",
118
+ "oxfmt": "^0.66.0",
119
+ "oxlint": "^1.81.0",
120
120
  "typescript": "~7.0.2",
121
121
  "vite": "^8.2.2",
122
122
  "vite-plugin-lib-inject-css": "^2.2.2",
123
- "vitest": "^4.1.11"
123
+ "vitest": "^5.0.0"
124
124
  },
125
125
  "peerDependencies": {
126
126
  "@radix-ui/themes": ">=3.3.0",
127
- "@tiptap/pm": "3.30.5",
127
+ "@tiptap/pm": "3.31.3",
128
128
  "react": ">=18.3.1 <20.0.0",
129
129
  "react-dom": ">=18.3.1 <20.0.0"
130
130
  },
131
131
  "scripts": {
132
+ "check:tiptap-contract": "node scripts/sync-tiptap-contract.mjs --check",
133
+ "dependency-update:post": "node scripts/sync-tiptap-contract.mjs --write",
132
134
  "dev": "vite",
133
135
  "e2e": "pnpm run e2e:prepare && playwright test && pnpm run e2e:build-consumer",
134
136
  "e2e:build-consumer": "pnpm --dir e2e/consumer exec vite build",
@@ -142,7 +144,8 @@
142
144
  "preview": "vite preview",
143
145
  "fmt": "oxfmt",
144
146
  "fmt:check": "oxfmt --check",
145
- "test": "vitest run --config vitest.config.ts",
146
- "validate:deps": "pnpm run fmt:check && pnpm run lint && pnpm run test && pnpm run e2e:install && pnpm run e2e"
147
+ "test": "node scripts/sync-tiptap-contract.test.mjs && vitest run --config vitest.config.ts",
148
+ "test:tiptap-contract": "node scripts/sync-tiptap-contract.test.mjs",
149
+ "validate:deps": "pnpm run check:tiptap-contract && pnpm run fmt:check && pnpm run lint && pnpm run test && pnpm run e2e:install && pnpm run e2e"
147
150
  }
148
151
  }