@clevertask/scribe 0.1.5 → 0.1.6

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.
@@ -1,4 +1,4 @@
1
- import { i as e } from "./dist-RuuEA1GJ.js";
1
+ import { i as e } from "./dist-Cp938P7P.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";
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../BarMenu-V1uRL3bt.js";
1
+ import { t as e } from "../../BarMenu-CXaFlpRJ.js";
2
2
  export { e as default };
@@ -1,6 +1,6 @@
1
- import { i as e } from "../../dist-RuuEA1GJ.js";
1
+ import { i as e } from "../../dist-Cp938P7P.js";
2
2
  import { getPopupMountTarget as t } from "../Scribe/extension/getPopupMountTarget.js";
3
- import { t as n } from "../../menus-CzX7kyXn.js";
3
+ import { t as n } from "../../menus-CakIdDdY.js";
4
4
  import { Flex as r, IconButton as i } from "@radix-ui/themes";
5
5
  import { useCallback as a } from "react";
6
6
  import { jsx as o } from "react/jsx-runtime";
@@ -1,8 +1,8 @@
1
- import { i as e } from "../../dist-RuuEA1GJ.js";
1
+ import { i as e } from "../../dist-Cp938P7P.js";
2
2
  import { getPopupMountTarget as t } from "../Scribe/extension/getPopupMountTarget.js";
3
3
  import n from "./LinkEditor.js";
4
4
  import { hideLinkBubbleMenu as r, linkBubbleMenuPluginKey as i } from "./linkBubbleMenuPlugin.js";
5
- import { t as a } from "../../menus-CzX7kyXn.js";
5
+ import { t as a } from "../../menus-CakIdDdY.js";
6
6
  import { Box as o } from "@radix-ui/themes";
7
7
  import { useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
8
8
  import { jsx as f } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { i as e } from "../../../dist-RuuEA1GJ.js";
1
+ import { i as e } from "../../../dist-Cp938P7P.js";
2
2
  import { Button as t, Flex as n } from "@radix-ui/themes";
3
3
  import { useCallback as r } from "react";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { n as e } from "../../../../dist-RuuEA1GJ.js";
1
+ import { n as e } from "../../../../dist-Cp938P7P.js";
2
2
  import { getPopupMountTarget as t } from "../getPopupMountTarget.js";
3
3
  import { t as n } from "../../../../tippy.esm-D9LL2xiE.js";
4
4
  import { EmojiList as r } from "./EmojiList.js";
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../../../rolldown-runtime-B8UxIWdF.js";
1
+ import { t as e } from "../../../../rolldown-runtime-CtkjhSXr.js";
2
2
  import { Box as t, ScrollArea as n, Text as r } from "@radix-ui/themes";
3
3
  import { forwardRef as i, useCallback as a, useImperativeHandle as o, useState as s } from "react";
4
4
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { n as e } from "../../../../dist-RuuEA1GJ.js";
1
+ import { n as e } from "../../../../dist-Cp938P7P.js";
2
2
  import { getPopupMountTarget as t } from "../getPopupMountTarget.js";
3
3
  import { t as n } from "../../../../tippy.esm-D9LL2xiE.js";
4
4
  import { SlashCommandList as r } from "./SlashCommandList.js";
@@ -1,5 +1,5 @@
1
- import { n as e, t } from "../../BarMenu-V1uRL3bt.js";
2
- import { t as n } from "../../dist-RuuEA1GJ.js";
1
+ import { n as e, t } from "../../BarMenu-CXaFlpRJ.js";
2
+ import { t as n } from "../../dist-Cp938P7P.js";
3
3
  import { t as r } from "../../dist-BQjH-i-q.js";
4
4
  import i from "../Menu/LinkBubbleMenu.js";
5
5
  import { t as a } from "../../html-to-markdown-CrNOkSye.js";
@@ -1,95 +1,98 @@
1
- import { n as e, t } from "./rolldown-runtime-B8UxIWdF.js";
1
+ import { t as e } from "./rolldown-runtime-CtkjhSXr.js";
2
+ import * as t from "react";
2
3
  import n, { createContext as r, forwardRef as i, useContext as a, useDebugValue as o, useEffect as s, useLayoutEffect as c, useMemo as l, useState as u, version as d } from "react";
3
4
  import f, { flushSync as p } from "react-dom";
4
5
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
5
- //#region node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.5/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
6
- var _ = /* @__PURE__ */ t(((t) => {
7
- var n = e("react");
8
- function r(e, t) {
6
+ //#region builtin:esm-external-require-react
7
+ var _ = /* @__PURE__ */ e(((e, n) => {
8
+ n.exports = { ...t };
9
+ })), v = /* @__PURE__ */ e(((e) => {
10
+ var t = _();
11
+ function n(e, t) {
9
12
  return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
10
13
  }
11
- var i = typeof Object.is == "function" ? Object.is : r, a = n.useState, o = n.useEffect, s = n.useLayoutEffect, c = n.useDebugValue;
12
- function l(e, t) {
13
- var n = t(), r = a({ inst: {
14
+ var r = typeof Object.is == "function" ? Object.is : n, i = t.useState, a = t.useEffect, o = t.useLayoutEffect, s = t.useDebugValue;
15
+ function c(e, t) {
16
+ var n = t(), r = i({ inst: {
14
17
  value: n,
15
18
  getSnapshot: t
16
- } }), i = r[0].inst, l = r[1];
17
- return s(function() {
18
- i.value = n, i.getSnapshot = t, u(i) && l({ inst: i });
19
+ } }), c = r[0].inst, u = r[1];
20
+ return o(function() {
21
+ c.value = n, c.getSnapshot = t, l(c) && u({ inst: c });
19
22
  }, [
20
23
  e,
21
24
  n,
22
25
  t
23
- ]), o(function() {
24
- return u(i) && l({ inst: i }), e(function() {
25
- u(i) && l({ inst: i });
26
+ ]), a(function() {
27
+ return l(c) && u({ inst: c }), e(function() {
28
+ l(c) && u({ inst: c });
26
29
  });
27
- }, [e]), c(n), n;
30
+ }, [e]), s(n), n;
28
31
  }
29
- function u(e) {
32
+ function l(e) {
30
33
  var t = e.getSnapshot;
31
34
  e = e.value;
32
35
  try {
33
36
  var n = t();
34
- return !i(e, n);
37
+ return !r(e, n);
35
38
  } catch {
36
39
  return !0;
37
40
  }
38
41
  }
39
- function d(e, t) {
42
+ function u(e, t) {
40
43
  return t();
41
44
  }
42
- var f = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? d : l;
43
- t.useSyncExternalStore = n.useSyncExternalStore === void 0 ? f : n.useSyncExternalStore;
44
- })), v = /* @__PURE__ */ t(((t) => {
45
+ var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? u : c;
46
+ e.useSyncExternalStore = t.useSyncExternalStore === void 0 ? d : t.useSyncExternalStore;
47
+ })), y = /* @__PURE__ */ e(((e) => {
45
48
  process.env.NODE_ENV !== "production" && (function() {
46
- function n(e, t) {
49
+ function t(e, t) {
47
50
  return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
48
51
  }
49
- function r(e, t) {
50
- f || o.startTransition === void 0 || (f = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
52
+ function n(e, t) {
53
+ d || a.startTransition === void 0 || (d = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
51
54
  var n = t();
52
- if (!p) {
53
- var r = t();
54
- s(n, r) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), p = !0);
55
+ if (!f) {
56
+ var i = t();
57
+ o(n, i) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), f = !0);
55
58
  }
56
- r = c({ inst: {
59
+ i = s({ inst: {
57
60
  value: n,
58
61
  getSnapshot: t
59
62
  } });
60
- var a = r[0].inst, m = r[1];
61
- return u(function() {
62
- a.value = n, a.getSnapshot = t, i(a) && m({ inst: a });
63
+ var p = i[0].inst, m = i[1];
64
+ return l(function() {
65
+ p.value = n, p.getSnapshot = t, r(p) && m({ inst: p });
63
66
  }, [
64
67
  e,
65
68
  n,
66
69
  t
67
- ]), l(function() {
68
- return i(a) && m({ inst: a }), e(function() {
69
- i(a) && m({ inst: a });
70
+ ]), c(function() {
71
+ return r(p) && m({ inst: p }), e(function() {
72
+ r(p) && m({ inst: p });
70
73
  });
71
- }, [e]), d(n), n;
74
+ }, [e]), u(n), n;
72
75
  }
73
- function i(e) {
76
+ function r(e) {
74
77
  var t = e.getSnapshot;
75
78
  e = e.value;
76
79
  try {
77
80
  var n = t();
78
- return !s(e, n);
81
+ return !o(e, n);
79
82
  } catch {
80
83
  return !0;
81
84
  }
82
85
  }
83
- function a(e, t) {
86
+ function i(e, t) {
84
87
  return t();
85
88
  }
86
89
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
87
- var o = e("react"), s = typeof Object.is == "function" ? Object.is : n, c = o.useState, l = o.useEffect, u = o.useLayoutEffect, d = o.useDebugValue, f = !1, p = !1, m = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? a : r;
88
- t.useSyncExternalStore = o.useSyncExternalStore === void 0 ? m : o.useSyncExternalStore, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
90
+ var a = _(), o = typeof Object.is == "function" ? Object.is : t, s = a.useState, c = a.useEffect, l = a.useLayoutEffect, u = a.useDebugValue, d = !1, f = !1, p = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? i : n;
91
+ e.useSyncExternalStore = a.useSyncExternalStore === void 0 ? p : a.useSyncExternalStore, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
89
92
  })();
90
- })), y = /* @__PURE__ */ t(((e, t) => {
91
- process.env.NODE_ENV === "production" ? t.exports = _() : t.exports = v();
92
- })), b = y(), { getOwnPropertyNames: x, getOwnPropertySymbols: S } = Object, { hasOwnProperty: ee } = Object.prototype;
93
+ })), b = /* @__PURE__ */ e(((e, t) => {
94
+ process.env.NODE_ENV === "production" ? t.exports = v() : t.exports = y();
95
+ })), ee = b(), { getOwnPropertyNames: te, getOwnPropertySymbols: x } = Object, { hasOwnProperty: S } = Object.prototype;
93
96
  function C(e, t) {
94
97
  return function(n, r, i) {
95
98
  return e(n, r, i) && t(n, r, i);
@@ -105,31 +108,31 @@ function w(e) {
105
108
  return i.delete(t), i.delete(n), s;
106
109
  };
107
110
  }
108
- function te(e) {
111
+ function T(e) {
109
112
  return e?.[Symbol.toStringTag];
110
113
  }
111
- function T(e) {
112
- return x(e).concat(S(e));
114
+ function E(e) {
115
+ return te(e).concat(x(e));
113
116
  }
114
- var ne = Object.hasOwn || ((e, t) => ee.call(e, t));
115
- function E(e, t) {
117
+ var D = Object.hasOwn || ((e, t) => S.call(e, t));
118
+ function O(e, t) {
116
119
  return e === t || !e && !t && e !== e && t !== t;
117
120
  }
118
- var re = "__v", ie = "__o", ae = "_owner", { getOwnPropertyDescriptor: D, keys: O } = Object;
119
- function k(e, t) {
120
- return e.byteLength === t.byteLength && R(new Uint8Array(e), new Uint8Array(t));
121
+ var k = "__v", ne = "__o", re = "_owner", { getOwnPropertyDescriptor: A, keys: j } = Object;
122
+ function ie(e, t) {
123
+ return e.byteLength === t.byteLength && z(new Uint8Array(e), new Uint8Array(t));
121
124
  }
122
- function A(e, t, n) {
125
+ function ae(e, t, n) {
123
126
  let r = e.length;
124
127
  if (t.length !== r) return !1;
125
128
  for (; r-- > 0;) if (!n.equals(e[r], t[r], r, r, e, t, n)) return !1;
126
129
  return !0;
127
130
  }
128
131
  function oe(e, t) {
129
- return e.byteLength === t.byteLength && R(new Uint8Array(e.buffer, e.byteOffset, e.byteLength), new Uint8Array(t.buffer, t.byteOffset, t.byteLength));
132
+ return e.byteLength === t.byteLength && z(new Uint8Array(e.buffer, e.byteOffset, e.byteLength), new Uint8Array(t.buffer, t.byteOffset, t.byteLength));
130
133
  }
131
134
  function se(e, t) {
132
- return E(e.getTime(), t.getTime());
135
+ return O(e.getTime(), t.getTime());
133
136
  }
134
137
  function ce(e, t) {
135
138
  return e.name === t.name && e.message === t.message && e.cause === t.cause && e.stack === t.stack;
@@ -137,7 +140,7 @@ function ce(e, t) {
137
140
  function le(e, t) {
138
141
  return e === t;
139
142
  }
140
- function j(e, t, n) {
143
+ function M(e, t, n) {
141
144
  let r = e.size;
142
145
  if (r !== t.size) return !1;
143
146
  if (!r) return !0;
@@ -161,27 +164,27 @@ function j(e, t, n) {
161
164
  }
162
165
  return !0;
163
166
  }
164
- var M = E;
165
- function N(e, t, n) {
166
- let r = O(e), i = r.length;
167
- if (O(t).length !== i) return !1;
168
- for (; i-- > 0;) if (!B(e, t, n, r[i])) return !1;
167
+ var N = O;
168
+ function P(e, t, n) {
169
+ let r = j(e), i = r.length;
170
+ if (j(t).length !== i) return !1;
171
+ for (; i-- > 0;) if (!V(e, t, n, r[i])) return !1;
169
172
  return !0;
170
173
  }
171
- function P(e, t, n) {
172
- let r = T(e), i = r.length;
173
- if (T(t).length !== i) return !1;
174
+ function F(e, t, n) {
175
+ let r = E(e), i = r.length;
176
+ if (E(t).length !== i) return !1;
174
177
  let a, o, s;
175
- for (; i-- > 0;) if (a = r[i], !B(e, t, n, a) || (o = D(e, a), s = D(t, a), (o || s) && (!o || !s || o.configurable !== s.configurable || o.enumerable !== s.enumerable || o.writable !== s.writable))) return !1;
178
+ for (; i-- > 0;) if (a = r[i], !V(e, t, n, a) || (o = A(e, a), s = A(t, a), (o || s) && (!o || !s || o.configurable !== s.configurable || o.enumerable !== s.enumerable || o.writable !== s.writable))) return !1;
176
179
  return !0;
177
180
  }
178
- function F(e, t) {
179
- return E(e.valueOf(), t.valueOf());
180
- }
181
181
  function I(e, t) {
182
+ return O(e.valueOf(), t.valueOf());
183
+ }
184
+ function L(e, t) {
182
185
  return e.source === t.source && e.flags === t.flags;
183
186
  }
184
- function L(e, t, n) {
187
+ function R(e, t, n) {
185
188
  let r = e.size;
186
189
  if (r !== t.size) return !1;
187
190
  if (!r) return !0;
@@ -199,19 +202,19 @@ function L(e, t, n) {
199
202
  }
200
203
  return !0;
201
204
  }
202
- function R(e, t) {
205
+ function z(e, t) {
203
206
  let n = e.byteLength;
204
207
  if (t.byteLength !== n || e.byteOffset !== t.byteOffset) return !1;
205
208
  for (; n-- > 0;) if (e[n] !== t[n]) return !1;
206
209
  return !0;
207
210
  }
208
- function z(e, t) {
211
+ function B(e, t) {
209
212
  return e.hostname === t.hostname && e.pathname === t.pathname && e.protocol === t.protocol && e.port === t.port && e.hash === t.hash && e.username === t.username && e.password === t.password;
210
213
  }
211
- function B(e, t, n, r) {
212
- return (r === ae || r === ie || r === re) && (e.$$typeof || t.$$typeof) ? !0 : ne(t, r) && n.equals(e[r], t[r], r, r, e, t, n);
214
+ function V(e, t, n, r) {
215
+ return (r === re || r === ne || r === k) && (e.$$typeof || t.$$typeof) ? !0 : D(t, r) && n.equals(e[r], t[r], r, r, e, t, n);
213
216
  }
214
- var V = "[object ArrayBuffer]", H = "[object Arguments]", U = "[object Boolean]", W = "[object DataView]", ue = "[object Date]", de = "[object Error]", fe = "[object Map]", pe = "[object Number]", me = "[object Object]", he = "[object RegExp]", ge = "[object Set]", _e = "[object String]", ve = {
217
+ var H = "[object ArrayBuffer]", U = "[object Arguments]", W = "[object Boolean]", ue = "[object DataView]", de = "[object Date]", fe = "[object Error]", pe = "[object Map]", me = "[object Number]", he = "[object Object]", ge = "[object RegExp]", _e = "[object Set]", ve = "[object String]", ye = {
215
218
  "[object Int8Array]": !0,
216
219
  "[object Uint8Array]": !0,
217
220
  "[object Uint8ClampedArray]": !0,
@@ -224,8 +227,8 @@ var V = "[object ArrayBuffer]", H = "[object Arguments]", U = "[object Boolean]"
224
227
  "[object Float64Array]": !0,
225
228
  "[object BigInt64Array]": !0,
226
229
  "[object BigUint64Array]": !0
227
- }, ye = "[object URL]", be = Object.prototype.toString;
228
- function G({ areArrayBuffersEqual: e, areArraysEqual: t, areDataViewsEqual: n, areDatesEqual: r, areErrorsEqual: i, areFunctionsEqual: a, areMapsEqual: o, areNumbersEqual: s, areObjectsEqual: c, arePrimitiveWrappersEqual: l, areRegExpsEqual: u, areSetsEqual: d, areTypedArraysEqual: f, areUrlsEqual: p, unknownTagComparators: m }) {
230
+ }, be = "[object URL]", xe = Object.prototype.toString;
231
+ function Se({ areArrayBuffersEqual: e, areArraysEqual: t, areDataViewsEqual: n, areDatesEqual: r, areErrorsEqual: i, areFunctionsEqual: a, areMapsEqual: o, areNumbersEqual: s, areObjectsEqual: c, arePrimitiveWrappersEqual: l, areRegExpsEqual: u, areSetsEqual: d, areTypedArraysEqual: f, areUrlsEqual: p, unknownTagComparators: m }) {
229
232
  return function(h, g, _) {
230
233
  if (h === g) return !0;
231
234
  if (h == null || g == null) return !1;
@@ -240,23 +243,23 @@ function G({ areArrayBuffersEqual: e, areArraysEqual: t, areDataViewsEqual: n, a
240
243
  if (y === RegExp) return u(h, g, _);
241
244
  if (y === Map) return o(h, g, _);
242
245
  if (y === Set) return d(h, g, _);
243
- let b = be.call(h);
244
- if (b === ue) return r(h, g, _);
245
- if (b === he) return u(h, g, _);
246
- if (b === fe) return o(h, g, _);
247
- if (b === ge) return d(h, g, _);
248
- if (b === me) return typeof h.then != "function" && typeof g.then != "function" && c(h, g, _);
249
- if (b === ye) return p(h, g, _);
250
- if (b === de) return i(h, g, _);
251
- if (b === H) return c(h, g, _);
252
- if (ve[b]) return f(h, g, _);
253
- if (b === V) return e(h, g, _);
254
- if (b === W) return n(h, g, _);
255
- if (b === U || b === pe || b === _e) return l(h, g, _);
246
+ let b = xe.call(h);
247
+ if (b === de) return r(h, g, _);
248
+ if (b === ge) return u(h, g, _);
249
+ if (b === pe) return o(h, g, _);
250
+ if (b === _e) return d(h, g, _);
251
+ if (b === he) return typeof h.then != "function" && typeof g.then != "function" && c(h, g, _);
252
+ if (b === be) return p(h, g, _);
253
+ if (b === fe) return i(h, g, _);
254
+ if (b === U) return c(h, g, _);
255
+ if (ye[b]) return f(h, g, _);
256
+ if (b === H) return e(h, g, _);
257
+ if (b === ue) return n(h, g, _);
258
+ if (b === W || b === me || b === ve) return l(h, g, _);
256
259
  if (m) {
257
260
  let e = m[b];
258
261
  if (!e) {
259
- let t = te(h);
262
+ let t = T(h);
260
263
  t && (e = m[t]);
261
264
  }
262
265
  if (e) return e(h, g, _);
@@ -264,22 +267,22 @@ function G({ areArrayBuffersEqual: e, areArraysEqual: t, areDataViewsEqual: n, a
264
267
  return !1;
265
268
  };
266
269
  }
267
- function xe({ circular: e, createCustomConfig: t, strict: n }) {
270
+ function Ce({ circular: e, createCustomConfig: t, strict: n }) {
268
271
  let r = {
269
- areArrayBuffersEqual: k,
270
- areArraysEqual: n ? P : A,
272
+ areArrayBuffersEqual: ie,
273
+ areArraysEqual: n ? F : ae,
271
274
  areDataViewsEqual: oe,
272
275
  areDatesEqual: se,
273
276
  areErrorsEqual: ce,
274
277
  areFunctionsEqual: le,
275
- areMapsEqual: n ? C(j, P) : j,
276
- areNumbersEqual: M,
277
- areObjectsEqual: n ? P : N,
278
- arePrimitiveWrappersEqual: F,
279
- areRegExpsEqual: I,
280
- areSetsEqual: n ? C(L, P) : L,
281
- areTypedArraysEqual: n ? C(R, P) : R,
282
- areUrlsEqual: z,
278
+ areMapsEqual: n ? C(M, F) : M,
279
+ areNumbersEqual: N,
280
+ areObjectsEqual: n ? F : P,
281
+ arePrimitiveWrappersEqual: I,
282
+ areRegExpsEqual: L,
283
+ areSetsEqual: n ? C(R, F) : R,
284
+ areTypedArraysEqual: n ? C(z, F) : z,
285
+ areUrlsEqual: B,
283
286
  unknownTagComparators: void 0
284
287
  };
285
288
  if (t && (r = Object.assign({}, r, t(r))), e) {
@@ -293,12 +296,12 @@ function xe({ circular: e, createCustomConfig: t, strict: n }) {
293
296
  }
294
297
  return r;
295
298
  }
296
- function Se(e) {
299
+ function we(e) {
297
300
  return function(t, n, r, i, a, o, s) {
298
301
  return e(t, n, s);
299
302
  };
300
303
  }
301
- function Ce({ circular: e, comparator: t, createState: n, equals: r, strict: i }) {
304
+ function Te({ circular: e, comparator: t, createState: n, equals: r, strict: i }) {
302
305
  if (n) return function(a, o) {
303
306
  let { cache: s = e ? /* @__PURE__ */ new WeakMap() : void 0, meta: c } = n();
304
307
  return t(a, o, {
@@ -326,41 +329,41 @@ function Ce({ circular: e, comparator: t, createState: n, equals: r, strict: i }
326
329
  return t(e, n, a);
327
330
  };
328
331
  }
329
- var we = K();
330
- K({ strict: !0 }), K({ circular: !0 }), K({
332
+ var Ee = G();
333
+ G({ strict: !0 }), G({ circular: !0 }), G({
331
334
  circular: !0,
332
335
  strict: !0
333
- }), K({ createInternalComparator: () => E }), K({
336
+ }), G({ createInternalComparator: () => O }), G({
334
337
  strict: !0,
335
- createInternalComparator: () => E
336
- }), K({
338
+ createInternalComparator: () => O
339
+ }), G({
337
340
  circular: !0,
338
- createInternalComparator: () => E
339
- }), K({
341
+ createInternalComparator: () => O
342
+ }), G({
340
343
  circular: !0,
341
- createInternalComparator: () => E,
344
+ createInternalComparator: () => O,
342
345
  strict: !0
343
346
  });
344
- function K(e = {}) {
345
- let { circular: t = !1, createInternalComparator: n, createState: r, strict: i = !1 } = e, a = G(xe(e));
346
- return Ce({
347
+ function G(e = {}) {
348
+ let { circular: t = !1, createInternalComparator: n, createState: r, strict: i = !1 } = e, a = Se(Ce(e));
349
+ return Te({
347
350
  circular: t,
348
351
  comparator: a,
349
352
  createState: r,
350
- equals: n ? n(a) : Se(a),
353
+ equals: n ? n(a) : we(a),
351
354
  strict: i
352
355
  });
353
356
  }
354
357
  //#endregion
355
358
  //#region node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.5/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
356
- var Te = /* @__PURE__ */ t(((t) => {
357
- var n = e("react"), r = y();
358
- function i(e, t) {
359
+ var De = /* @__PURE__ */ e(((e) => {
360
+ var t = _(), n = b();
361
+ function r(e, t) {
359
362
  return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
360
363
  }
361
- var a = typeof Object.is == "function" ? Object.is : i, o = r.useSyncExternalStore, s = n.useRef, c = n.useEffect, l = n.useMemo, u = n.useDebugValue;
362
- t.useSyncExternalStoreWithSelector = function(e, t, n, r, i) {
363
- var d = s(null);
364
+ var i = typeof Object.is == "function" ? Object.is : r, a = n.useSyncExternalStore, o = t.useRef, s = t.useEffect, c = t.useMemo, l = t.useDebugValue;
365
+ e.useSyncExternalStoreWithSelector = function(e, t, n, r, u) {
366
+ var d = o(null);
364
367
  if (d.current === null) {
365
368
  var f = {
366
369
  hasValue: !1,
@@ -368,45 +371,45 @@ var Te = /* @__PURE__ */ t(((t) => {
368
371
  };
369
372
  d.current = f;
370
373
  } else f = d.current;
371
- d = l(function() {
374
+ d = c(function() {
372
375
  function e(e) {
373
- if (!o) {
374
- if (o = !0, s = e, e = r(e), i !== void 0 && f.hasValue) {
376
+ if (!a) {
377
+ if (a = !0, o = e, e = r(e), u !== void 0 && f.hasValue) {
375
378
  var t = f.value;
376
- if (i(t, e)) return c = t;
379
+ if (u(t, e)) return s = t;
377
380
  }
378
- return c = e;
381
+ return s = e;
379
382
  }
380
- if (t = c, a(s, e)) return t;
383
+ if (t = s, i(o, e)) return t;
381
384
  var n = r(e);
382
- return i !== void 0 && i(t, n) ? (s = e, t) : (s = e, c = n);
385
+ return u !== void 0 && u(t, n) ? (o = e, t) : (o = e, s = n);
383
386
  }
384
- var o = !1, s, c, l = n === void 0 ? null : n;
387
+ var a = !1, o, s, c = n === void 0 ? null : n;
385
388
  return [function() {
386
389
  return e(t());
387
- }, l === null ? void 0 : function() {
388
- return e(l());
390
+ }, c === null ? void 0 : function() {
391
+ return e(c());
389
392
  }];
390
393
  }, [
391
394
  t,
392
395
  n,
393
396
  r,
394
- i
397
+ u
395
398
  ]);
396
- var p = o(e, d[0], d[1]);
397
- return c(function() {
399
+ var p = a(e, d[0], d[1]);
400
+ return s(function() {
398
401
  f.hasValue = !0, f.value = p;
399
- }, [p]), u(p), p;
402
+ }, [p]), l(p), p;
400
403
  };
401
- })), Ee = /* @__PURE__ */ t(((t) => {
404
+ })), Oe = /* @__PURE__ */ e(((e) => {
402
405
  process.env.NODE_ENV !== "production" && (function() {
403
- function n(e, t) {
406
+ function t(e, t) {
404
407
  return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
405
408
  }
406
409
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
407
- var r = e("react"), i = y(), a = typeof Object.is == "function" ? Object.is : n, o = i.useSyncExternalStore, s = r.useRef, c = r.useEffect, l = r.useMemo, u = r.useDebugValue;
408
- t.useSyncExternalStoreWithSelector = function(e, t, n, r, i) {
409
- var d = s(null);
410
+ var n = _(), r = b(), i = typeof Object.is == "function" ? Object.is : t, a = r.useSyncExternalStore, o = n.useRef, s = n.useEffect, c = n.useMemo, l = n.useDebugValue;
411
+ e.useSyncExternalStoreWithSelector = function(e, t, n, r, u) {
412
+ var d = o(null);
410
413
  if (d.current === null) {
411
414
  var f = {
412
415
  hasValue: !1,
@@ -414,48 +417,48 @@ var Te = /* @__PURE__ */ t(((t) => {
414
417
  };
415
418
  d.current = f;
416
419
  } else f = d.current;
417
- d = l(function() {
420
+ d = c(function() {
418
421
  function e(e) {
419
- if (!o) {
420
- if (o = !0, s = e, e = r(e), i !== void 0 && f.hasValue) {
422
+ if (!a) {
423
+ if (a = !0, o = e, e = r(e), u !== void 0 && f.hasValue) {
421
424
  var t = f.value;
422
- if (i(t, e)) return c = t;
425
+ if (u(t, e)) return s = t;
423
426
  }
424
- return c = e;
427
+ return s = e;
425
428
  }
426
- if (t = c, a(s, e)) return t;
429
+ if (t = s, i(o, e)) return t;
427
430
  var n = r(e);
428
- return i !== void 0 && i(t, n) ? (s = e, t) : (s = e, c = n);
431
+ return u !== void 0 && u(t, n) ? (o = e, t) : (o = e, s = n);
429
432
  }
430
- var o = !1, s, c, l = n === void 0 ? null : n;
433
+ var a = !1, o, s, c = n === void 0 ? null : n;
431
434
  return [function() {
432
435
  return e(t());
433
- }, l === null ? void 0 : function() {
434
- return e(l());
436
+ }, c === null ? void 0 : function() {
437
+ return e(c());
435
438
  }];
436
439
  }, [
437
440
  t,
438
441
  n,
439
442
  r,
440
- i
443
+ u
441
444
  ]);
442
- var p = o(e, d[0], d[1]);
443
- return c(function() {
445
+ var p = a(e, d[0], d[1]);
446
+ return s(function() {
444
447
  f.hasValue = !0, f.value = p;
445
- }, [p]), u(p), p;
448
+ }, [p]), l(p), p;
446
449
  }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
447
450
  })();
448
- })), De = (/* @__PURE__ */ t(((e, t) => {
449
- process.env.NODE_ENV === "production" ? t.exports = Te() : t.exports = Ee();
450
- })))(), Oe = (...e) => (t) => {
451
+ })), ke = (/* @__PURE__ */ e(((e, t) => {
452
+ process.env.NODE_ENV === "production" ? t.exports = De() : t.exports = Oe();
453
+ })))(), Ae = (...e) => (t) => {
451
454
  e.forEach((e) => {
452
455
  typeof e == "function" ? e(t) : e && (e.current = t);
453
456
  });
454
- }, ke = ({ contentComponent: e }) => {
455
- let t = (0, b.useSyncExternalStore)(e.subscribe, e.getSnapshot, e.getServerSnapshot);
457
+ }, je = ({ contentComponent: e }) => {
458
+ let t = (0, ee.useSyncExternalStore)(e.subscribe, e.getSnapshot, e.getServerSnapshot);
456
459
  return /* @__PURE__ */ h(m, { children: Object.values(t) });
457
460
  };
458
- function Ae() {
461
+ function Me() {
459
462
  let e = /* @__PURE__ */ new Set(), t = {}, n = !1, r = () => {
460
463
  n || !e.size || (n = !0, queueMicrotask(() => {
461
464
  n = !1, e.forEach((e) => e());
@@ -485,7 +488,7 @@ function Ae() {
485
488
  }
486
489
  };
487
490
  }
488
- var je = class extends n.Component {
491
+ var Ne = class extends n.Component {
489
492
  constructor(e) {
490
493
  super(e), this.editorContentRef = n.createRef();
491
494
  }
@@ -500,7 +503,7 @@ var je = class extends n.Component {
500
503
  if (e && !e.isDestroyed && e.view.dom?.parentNode) {
501
504
  if (e.contentComponent) return;
502
505
  let t = this.editorContentRef.current;
503
- t.append(...e.view.dom.parentNode.childNodes), e.setOptions({ element: t }), e.contentComponent = Ae(), e.createNodeViews(), e.isEditorContentInitialized = !0, this.forceUpdate();
506
+ t.append(...e.view.dom.parentNode.childNodes), e.setOptions({ element: t }), e.contentComponent = Me(), e.createNodeViews(), e.isEditorContentInitialized = !0, this.forceUpdate();
504
507
  }
505
508
  }
506
509
  componentWillUnmount() {
@@ -517,18 +520,18 @@ var je = class extends n.Component {
517
520
  render() {
518
521
  let { editor: e, innerRef: t, ...n } = this.props;
519
522
  return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
520
- ref: Oe(t, this.editorContentRef),
523
+ ref: Ae(t, this.editorContentRef),
521
524
  ...n
522
- }), e?.contentComponent && /* @__PURE__ */ h(ke, { contentComponent: e.contentComponent })] });
525
+ }), e?.contentComponent && /* @__PURE__ */ h(je, { contentComponent: e.contentComponent })] });
523
526
  }
524
- }, Me = i((e, t) => {
527
+ }, Pe = i((e, t) => {
525
528
  let r = n.useMemo(() => Math.floor(Math.random() * 4294967295).toString(), [e.editor]);
526
- return n.createElement(je, {
529
+ return n.createElement(Ne, {
527
530
  key: r,
528
531
  innerRef: t,
529
532
  ...e
530
533
  });
531
- }), q = n.memo(Me), Ne = typeof window < "u" ? c : s, Pe = class {
534
+ }), K = n.memo(Pe), Fe = typeof window < "u" ? c : s, Ie = class {
532
535
  constructor(e) {
533
536
  this.transactionNumber = 0, this.lastTransactionNumber = 0, this.subscribers = /* @__PURE__ */ new Set(), this.editor = e, this.lastSnapshot = {
534
537
  editor: e,
@@ -563,20 +566,20 @@ var je = class extends n.Component {
563
566
  }
564
567
  }
565
568
  };
566
- function Fe(e) {
567
- let [t] = u(() => new Pe(e.editor)), n = (0, De.useSyncExternalStoreWithSelector)(t.subscribe, t.getSnapshot, t.getServerSnapshot, e.selector, e.equalityFn ?? we);
568
- return Ne(() => t.watch(e.editor), [e.editor, t]), o(n), n;
569
+ function Le(e) {
570
+ let [t] = u(() => new Ie(e.editor)), n = (0, ke.useSyncExternalStoreWithSelector)(t.subscribe, t.getSnapshot, t.getServerSnapshot, e.selector, e.equalityFn ?? Ee);
571
+ return Fe(() => t.watch(e.editor), [e.editor, t]), o(n), n;
569
572
  }
570
573
  process.env.NODE_ENV, typeof window > "u" || typeof window < "u" && window.next;
571
- var J = r({ editor: null });
572
- J.Consumer;
573
- var Ie = () => a(J), Le = r({
574
+ var q = r({ editor: null });
575
+ q.Consumer;
576
+ var Re = () => a(q), ze = r({
574
577
  onDragStart: () => {},
575
578
  nodeViewContentChildren: void 0,
576
579
  nodeViewContentRef: () => {}
577
- }), Re = () => a(Le);
580
+ }), J = () => a(ze);
578
581
  n.forwardRef((e, t) => {
579
- let { onDragStart: n } = Re();
582
+ let { onDragStart: n } = J();
580
583
  return /* @__PURE__ */ h(e.as || "div", {
581
584
  ...e,
582
585
  ref: t,
@@ -594,24 +597,24 @@ function Y(e) {
594
597
  function X(e) {
595
598
  return !!(typeof e == "object" && e.$$typeof && (e.$$typeof.toString() === "Symbol(react.forward_ref)" || e.$$typeof.description === "react.forward_ref"));
596
599
  }
597
- function ze(e) {
600
+ function Be(e) {
598
601
  return !!(typeof e == "object" && e.$$typeof && (e.$$typeof.toString() === "Symbol(react.memo)" || e.$$typeof.description === "react.memo"));
599
602
  }
600
- function Be(e) {
603
+ function Ve(e) {
601
604
  if (Y(e) || X(e)) return !0;
602
- if (ze(e)) {
605
+ if (Be(e)) {
603
606
  let t = e.type;
604
607
  if (t) return Y(t) || X(t);
605
608
  }
606
609
  return !1;
607
610
  }
608
- function Ve() {
611
+ function He() {
609
612
  try {
610
613
  if (d) return parseInt(d.split(".")[0], 10) >= 19;
611
614
  } catch {}
612
615
  return !1;
613
616
  }
614
- var He = class {
617
+ var Ue = class {
615
618
  constructor(e, { editor: t, props: n = {}, as: r = "div", className: i = "" }) {
616
619
  this.ref = null, this.destroyed = !1, this.id = Math.floor(Math.random() * 4294967295).toString(), this.component = e, this.editor = t, this.props = n, this.element = document.createElement(r), this.element.classList.add("react-renderer"), i && this.element.classList.add(...i.split(" ")), this.editor.isEditorContentInitialized ? p(() => {
617
620
  this.render();
@@ -622,7 +625,7 @@ var He = class {
622
625
  render() {
623
626
  var e;
624
627
  if (this.destroyed) return;
625
- let t = this.component, n = this.props, r = this.editor, i = Ve(), a = Be(t), o = { ...n };
628
+ let t = this.component, n = this.props, r = this.editor, i = He(), a = Ve(t), o = { ...n };
626
629
  o.ref && !(i || a) && delete o.ref, !o.ref && (i || a) && (o.ref = (e) => {
627
630
  this.ref = e;
628
631
  }), this.reactElement = /* @__PURE__ */ h(t, { ...o }), (e = r?.contentComponent) == null || e.setRenderer(this.id, this);
@@ -660,12 +663,12 @@ var Z = r({ get editor() {
660
663
  throw Error("useTiptap must be used within a <Tiptap> provider");
661
664
  } });
662
665
  Z.displayName = "TiptapContext";
663
- var Ue = () => a(Z);
666
+ var We = () => a(Z);
664
667
  function Q({ children: e, ...t }) {
665
668
  let n = "editor" in t ? t.editor : t.instance;
666
669
  if (!n) throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");
667
670
  let r = l(() => ({ editor: n }), [n]), i = l(() => ({ editor: n }), [n]);
668
- return /* @__PURE__ */ h(J.Provider, {
671
+ return /* @__PURE__ */ h(q.Provider, {
669
672
  value: i,
670
673
  children: /* @__PURE__ */ h(Z.Provider, {
671
674
  value: r,
@@ -675,12 +678,12 @@ function Q({ children: e, ...t }) {
675
678
  }
676
679
  Q.displayName = "Tiptap";
677
680
  function $({ ...e }) {
678
- let { editor: t } = Ue();
679
- return /* @__PURE__ */ h(q, {
681
+ let { editor: t } = We();
682
+ return /* @__PURE__ */ h(K, {
680
683
  editor: t,
681
684
  ...e
682
685
  });
683
686
  }
684
687
  $.displayName = "Tiptap.Content", Object.assign(Q, { Content: $ });
685
688
  //#endregion
686
- export { Fe as i, He as n, Ie as r, q as t };
689
+ export { Le as i, Ue as n, Re as r, K as t };
@@ -1,4 +1,4 @@
1
- import { r as e } from "./dist-RuuEA1GJ.js";
1
+ import { r as e } from "./dist-Cp938P7P.js";
2
2
  import { a as t, i as n, r } from "./dist-CnXCIcnl.js";
3
3
  import { A as i, C as a, I as o, S as s, n as c } from "./dist-BQjH-i-q.js";
4
4
  import { a as l, c as u, i as d, l as f, n as p, o as m, s as h, t as g, u as _ } from "./floating-ui.dom-rih69525.js";
@@ -0,0 +1,4 @@
1
+ //#region \0rolldown/runtime.js
2
+ var e = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports);
3
+ //#endregion
4
+ export { e as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clevertask/scribe",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
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": [
@@ -88,11 +88,11 @@
88
88
  "react": ">=18.3.1 <20.0.0",
89
89
  "react-dom": ">=18.3.1 <20.0.0"
90
90
  },
91
- "prepublishOnly": "npm run build",
92
91
  "scripts": {
93
92
  "dev": "vite",
94
- "build": "vite build && npm run build:style && tsc -p tsconfig.types.json --noCheck",
93
+ "build": "vite build && npm run check:browser-bundle && npm run build:style && tsc -p tsconfig.types.json --noCheck",
95
94
  "build:style": "mkdir -p ./dist && cp ./lib/styles/main.css ./dist/main.css",
95
+ "check:browser-bundle": "node scripts/check-browser-bundle.mjs",
96
96
  "lint": "oxlint . --report-unused-disable-directives --deny-warnings",
97
97
  "preview": "vite preview",
98
98
  "fmt": "oxfmt",
@@ -1,7 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var e = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), t = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
3
- if (typeof require < "u") return require.apply(this, arguments);
4
- throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
5
- });
6
- //#endregion
7
- export { t as n, e as t };