@clevertask/scribe 0.1.27 → 0.1.29

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 (57) hide show
  1. package/README.md +4 -2
  2. package/dist/{BarMenu-BGWT4Oyk.js → BarMenu-BC8XoC6e.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.d.ts.map +1 -1
  10. package/dist/components/Menu/TableBubbleMenu.js +145 -132
  11. package/dist/components/Menu/TableHeightSettings.d.ts +11 -0
  12. package/dist/components/Menu/TableHeightSettings.d.ts.map +1 -0
  13. package/dist/components/Menu/TableHeightSettings.js +156 -0
  14. package/dist/components/Menu/TableLayoutOptions.d.ts +5 -0
  15. package/dist/components/Menu/TableLayoutOptions.d.ts.map +1 -1
  16. package/dist/components/Menu/TableLayoutOptions.js +56 -39
  17. package/dist/components/Menu/linkBubbleMenuPlugin.js +1 -1
  18. package/dist/components/Scribe/extension/callout.js +7 -7
  19. package/dist/components/Scribe/extension/emoji/suggest.js +1 -1
  20. package/dist/components/Scribe/extension/extension-link.js +1 -1
  21. package/dist/components/Scribe/extension/extension-markdown-paste.js +1 -1
  22. package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
  23. package/dist/components/Scribe/extension/external-link-preview/commands.js +1 -1
  24. package/dist/components/Scribe/extension/external-link-preview/index.js +1 -1
  25. package/dist/components/Scribe/extension/external-link-preview/node-view.js +1 -1
  26. package/dist/components/Scribe/extension/external-link-preview/render-html.js +1 -1
  27. package/dist/components/Scribe/extension/external-link-preview/schema.js +1 -1
  28. package/dist/components/Scribe/extension/index.js +1 -1
  29. package/dist/components/Scribe/extension/resizable-table.d.ts +1 -0
  30. package/dist/components/Scribe/extension/resizable-table.d.ts.map +1 -1
  31. package/dist/components/Scribe/extension/resizable-table.js +64 -43
  32. package/dist/components/Scribe/extension/slashCommand/index.js +2 -2
  33. package/dist/components/Scribe/extension/slashCommand/renderItems.js +1 -1
  34. package/dist/components/Scribe/extension/table-layout.d.ts +5 -0
  35. package/dist/components/Scribe/extension/table-layout.d.ts.map +1 -1
  36. package/dist/components/Scribe/extension/table-layout.js +2 -2
  37. package/dist/components/Scribe/extension/tableOfContents.js +1 -1
  38. package/dist/components/Scribe/index.js +4 -4
  39. package/dist/{dist-BiognBi4.js → dist-B0xwy1Q5.js} +175 -154
  40. package/dist/{dist-Dk0fXvrc.js → dist-CDJRm4fL.js} +2 -2
  41. package/dist/{dist-xjmWZ-oh.js → dist-DnVcys79.js} +632 -571
  42. package/dist/document-node-capabilities.d.ts.map +1 -1
  43. package/dist/document-node-capabilities.js +5 -1
  44. package/dist/{extension-CBOxOV0e.js → extension-BPeoqfHR.js} +2 -2
  45. package/dist/{extension-link-DmM_EJTn.js → extension-link-RvaqaDqr.js} +319 -294
  46. package/dist/{html-to-markdown-DZ83bZ9I.js → html-to-markdown-DF93it73.js} +1 -1
  47. package/dist/main.css +2 -1
  48. package/dist/main.js +1 -1
  49. package/dist/{menus-BDXjZsFU.js → menus-scgppp2C.js} +25 -25
  50. package/dist/{schema-extensions-BXyGPwMf.js → schema-extensions-ITR9LEgX.js} +2025 -1898
  51. package/dist/schema-extensions.js +1 -1
  52. package/dist/schema.js +1 -1
  53. package/dist/{table-layout-B3sPDpEF.js → table-layout-iVolql5p.js} +180 -121
  54. package/dist/utils/html-to-markdown.d.ts.map +1 -1
  55. package/dist/utils/html-to-markdown.js +1 -1
  56. package/dist/utils/index.js +3 -3
  57. package/package.json +51 -51
@@ -504,7 +504,7 @@ var G = "scribe-table-break", K = /* @__PURE__ */ new Set([
504
504
  if (!r) return null;
505
505
  if (r === "left" || r === "center" || r === "right") return r;
506
506
  }, ue = (e) => {
507
- if (e.caption || e.tFoot || ce(e) || ["fit", "scroll"].includes(e.getAttribute("data-table-layout") ?? "") || e.getAttribute("data-table-limit-height") === "true" || e.getAttribute("data-table-sticky-header-row") === "true") return null;
507
+ if (e.caption || e.tFoot || ce(e) || ["fit", "scroll"].includes(e.getAttribute("data-table-layout") ?? "") || e.getAttribute("data-table-limit-height") === "true" || e.hasAttribute("data-table-max-height") || e.getAttribute("data-table-sticky-header-row") === "true") return null;
508
508
  let t = Array.from(e.rows), n = t[0]?.cells.length ?? 0;
509
509
  if (t.length === 0 || n === 0) return null;
510
510
  let r = t.map((e) => Array.from(e.cells));
package/dist/main.css CHANGED
@@ -395,6 +395,7 @@
395
395
  }
396
396
 
397
397
  .scribe-content .tiptap .tableWrapper {
398
+ --scribe-table-custom-max-height: initial;
398
399
  margin: 0 0 1rem;
399
400
  max-width: 100%;
400
401
  overflow-x: auto;
@@ -428,7 +429,7 @@
428
429
  }
429
430
 
430
431
  .scribe-content .tiptap .tableWrapper[data-table-limit-height="true"] {
431
- max-height: var(--scribe-table-max-height, 360px);
432
+ max-height: var(--scribe-table-custom-max-height, var(--scribe-table-max-height, 360px));
432
433
  overflow-y: auto;
433
434
  }
434
435
 
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CALLOUT_VARIANTS as e, CALLOUT_VARIANT_LABELS as t, Callout as n, DEFAULT_CALLOUT_VARIANT as r, isCalloutVariant as i } from "./components/Scribe/extension/callout.js";
2
2
  import { EXTERNAL_LINK_PREVIEW_DISPLAYS as a } from "./components/Scribe/extension/external-link-preview/types.js";
3
3
  import { EXTERNAL_LINK_PREVIEW_NODE_NAME as o } from "./components/Scribe/extension/external-link-preview/attributes.js";
4
- import { t as s } from "./html-to-markdown-DZ83bZ9I.js";
4
+ import { t as s } from "./html-to-markdown-DF93it73.js";
5
5
  import { t as c } from "./markdown-to-html-BoK5O_j-.js";
6
6
  import { isInViewport as l } from "./utils/is-in-viewport.js";
7
7
  import { convertLegacyMathDelimiters as u } from "./utils/convert-legacy-math-delimiters.js";
@@ -1,11 +1,11 @@
1
- import { E as e, N as t, T as n, n as r, z as i } from "./dist-xjmWZ-oh.js";
1
+ import { E as e, H as t, P as n, T as r, n as i } from "./dist-DnVcys79.js";
2
2
  import { a, c as o, i as s, l as c, n as l, o as u, s as d, t as f, u as p } from "./floating-ui.dom-CmJ6iBdh.js";
3
- import { a as m } from "./dist-BiognBi4.js";
3
+ import { a as m } from "./dist-B0xwy1Q5.js";
4
4
  import { NodeSelection as h, Plugin as g, PluginKey as _ } from "@tiptap/pm/state";
5
5
  import { CellSelection as v } from "@tiptap/pm/tables";
6
6
  import y, { useEffect as b, useLayoutEffect as x, useRef as S, useState as C } from "react";
7
7
  import { createPortal as w } from "react-dom";
8
- //#region node_modules/.pnpm/@tiptap+extension-bubble-menu@3.31.3_@tiptap+core@3.31.3_@tiptap+pm@3.31.3__@tiptap+pm@3.31.3/node_modules/@tiptap/extension-bubble-menu/dist/index.js
8
+ //#region node_modules/.pnpm/@tiptap+extension-bubble-menu@3.31.4_@tiptap+core@3.31.4_@tiptap+pm@3.31.4__@tiptap+pm@3.31.4/node_modules/@tiptap/extension-bubble-menu/dist/index.js
9
9
  function T(e, t) {
10
10
  let n = Math.min(e.top, t.top), r = Math.max(e.bottom, t.bottom), i = Math.min(e.left, t.left), a = Math.max(e.right, t.right) - i, o = r - n;
11
11
  return new DOMRect(i, n, a, o);
@@ -17,22 +17,22 @@ var E = class {
17
17
  }
18
18
  get virtualElement() {
19
19
  var e;
20
- let { selection: t } = this.editor.state, n = this.getReferencedVirtualElement?.call(this);
21
- if (n) return n;
20
+ let { selection: n } = this.editor.state, r = this.getReferencedVirtualElement?.call(this);
21
+ if (r) return r;
22
22
  if (!((e = this.view) != null && (e = e.dom) != null && e.parentNode)) return;
23
- let r = i(this.view, t.from, t.to), a = {
24
- getBoundingClientRect: () => r,
25
- getClientRects: () => [r]
23
+ let i = t(this.view, n.from, n.to), a = {
24
+ getBoundingClientRect: () => i,
25
+ getClientRects: () => [i]
26
26
  };
27
- if (t instanceof h) {
28
- let e = this.view.nodeDOM(t.from), n = e.dataset.nodeViewWrapper ? e : e.querySelector("[data-node-view-wrapper]");
29
- n && (e = n), e && (a = {
27
+ if (n instanceof h) {
28
+ let e = this.view.nodeDOM(n.from), t = e.dataset.nodeViewWrapper ? e : e.querySelector("[data-node-view-wrapper]");
29
+ t && (e = t), e && (a = {
30
30
  getBoundingClientRect: () => e.getBoundingClientRect(),
31
31
  getClientRects: () => [e.getBoundingClientRect()]
32
32
  });
33
33
  }
34
- if (t instanceof v) {
35
- let { $anchorCell: e, $headCell: n } = t, r = e ? e.pos : n.pos, i = n ? n.pos : e.pos, o = this.view.nodeDOM(r), s = this.view.nodeDOM(i);
34
+ if (n instanceof v) {
35
+ let { $anchorCell: e, $headCell: t } = n, r = e ? e.pos : t.pos, i = t ? t.pos : e.pos, o = this.view.nodeDOM(r), s = this.view.nodeDOM(i);
36
36
  if (!o || !s) return;
37
37
  let c = o === s ? o.getBoundingClientRect() : T(o.getBoundingClientRect(), s.getBoundingClientRect());
38
38
  a = {
@@ -42,7 +42,7 @@ var E = class {
42
42
  }
43
43
  return a;
44
44
  }
45
- constructor({ editor: e, element: n, view: r, pluginKey: i = "bubbleMenu", updateDelay: a = 250, resizeDelay: o = 60, shouldShow: s, appendTo: c, getReferencedVirtualElement: l, options: u }) {
45
+ constructor({ editor: e, element: t, view: r, pluginKey: i = "bubbleMenu", updateDelay: a = 250, resizeDelay: o = 60, shouldShow: s, appendTo: c, getReferencedVirtualElement: l, options: u }) {
46
46
  this.preventHide = !1, this.isVisible = !1, this.scrollTarget = window, this.floatingUIOptions = {
47
47
  strategy: "absolute",
48
48
  placement: "top",
@@ -58,8 +58,8 @@ var E = class {
58
58
  onHide: void 0,
59
59
  onUpdate: void 0,
60
60
  onDestroy: void 0
61
- }, this.shouldShow = ({ view: e, state: n, from: r, to: i }) => {
62
- let { doc: a, selection: o } = n, { empty: s } = o, c = !a.textBetween(r, i).length && t(n.selection), l = this.element.contains(document.activeElement);
61
+ }, this.shouldShow = ({ view: e, state: t, from: r, to: i }) => {
62
+ let { doc: a, selection: o } = t, { empty: s } = o, c = !a.textBetween(r, i).length && n(t.selection), l = this.element.contains(document.activeElement);
63
63
  return !(!(e.hasFocus() || l) || s || c || !this.editor.isEditable);
64
64
  }, this.mousedownHandler = () => {
65
65
  this.preventHide = !0;
@@ -98,7 +98,7 @@ var E = class {
98
98
  }, this.transactionHandler = ({ transaction: e }) => {
99
99
  let t = e.getMeta(this.pluginKey);
100
100
  t === "updatePosition" ? this.updatePosition() : t && typeof t == "object" && t.type === "updateOptions" ? this.updateOptions(t.options) : t === "hide" ? this.hide() : t === "show" && (this.updatePosition(), this.show());
101
- }, this.editor = e, this.element = n, this.view = r, this.pluginKey = i, this.updateDelay = a, this.resizeDelay = o, this.appendTo = c, this.scrollTarget = u?.scrollTarget ?? window, this.getReferencedVirtualElement = l, this.floatingUIOptions = {
101
+ }, this.editor = e, this.element = t, this.view = r, this.pluginKey = i, this.updateDelay = a, this.resizeDelay = o, this.appendTo = c, this.scrollTarget = u?.scrollTarget ?? window, this.getReferencedVirtualElement = l, this.floatingUIOptions = {
102
102
  ...this.floatingUIOptions,
103
103
  ...u
104
104
  }, this.element.tabIndex = 0, s && (this.shouldShow = s), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.addEventListener("dragstart", this.dragstartHandler), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.editor.on("transaction", this.transactionHandler), window.addEventListener("resize", this.resizeHandler), this.scrollTarget.addEventListener("scroll", this.resizeHandler), this.update(r, r.state), this.getShouldShow() && (this.show(), this.updatePosition());
@@ -167,7 +167,7 @@ var E = class {
167
167
  ...e
168
168
  })
169
169
  });
170
- r.create({
170
+ i.create({
171
171
  name: "bubbleMenu",
172
172
  addOptions() {
173
173
  return {
@@ -192,10 +192,10 @@ r.create({
192
192
  }
193
193
  });
194
194
  //#endregion
195
- //#region node_modules/.pnpm/@tiptap+extension-floating-menu@3.31.3_@floating-ui+dom@1.8.0_@tiptap+core@3.31.3_@tiptap+pm@3.31.3__@tiptap+pm@3.31.3/node_modules/@tiptap/extension-floating-menu/dist/index.js
195
+ //#region node_modules/.pnpm/@tiptap+extension-floating-menu@3.31.4_@floating-ui+dom@1.8.0_@tiptap+core@3.31.4_@tiptap+pm@3.31.4__@tiptap+pm@3.31.4/node_modules/@tiptap/extension-floating-menu/dist/index.js
196
196
  var O = class {
197
197
  getTextContent(t) {
198
- return n(t, { textSerializers: e(this.editor.schema) });
198
+ return r(t, { textSerializers: e(this.editor.schema) });
199
199
  }
200
200
  get middlewares() {
201
201
  let e = [];
@@ -270,10 +270,10 @@ var O = class {
270
270
  updatePosition() {
271
271
  var e;
272
272
  if (!((e = this.view) != null && (e = e.dom) != null && e.parentNode)) return;
273
- let { selection: t } = this.editor.state, n = i(this.view, t.from, t.to);
273
+ let { selection: n } = this.editor.state, r = t(this.view, n.from, n.to);
274
274
  s({
275
- getBoundingClientRect: () => n,
276
- getClientRects: () => [n]
275
+ getBoundingClientRect: () => r,
276
+ getClientRects: () => [r]
277
277
  }, this.element, {
278
278
  placement: this.floatingUIOptions.placement,
279
279
  strategy: this.floatingUIOptions.strategy,
@@ -307,7 +307,7 @@ var O = class {
307
307
  ...e
308
308
  })
309
309
  });
310
- r.create({
310
+ i.create({
311
311
  name: "floatingMenu",
312
312
  addOptions() {
313
313
  return {
@@ -337,7 +337,7 @@ r.create({
337
337
  }
338
338
  });
339
339
  //#endregion
340
- //#region node_modules/.pnpm/@tiptap+react@3.31.3_@floating-ui+dom@1.8.0_@tiptap+core@3.31.3_@tiptap+pm@3.31.3__@tip_2d9a4232cfdce73b845844c6e3920b12/node_modules/@tiptap/react/dist/menus/index.js
340
+ //#region node_modules/.pnpm/@tiptap+react@3.31.4_@floating-ui+dom@1.8.0_@tiptap+core@3.31.4_@tiptap+pm@3.31.4__@tip_a960cd7d357e8e15e820188dcbf9b60a/node_modules/@tiptap/react/dist/menus/index.js
341
341
  function A(e, t) {
342
342
  return e ?? new _(t);
343
343
  }