@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.
- package/dist/{BarMenu-V1uRL3bt.js → BarMenu-CXaFlpRJ.js} +1 -1
- package/dist/components/Menu/BarMenu.js +1 -1
- package/dist/components/Menu/BubbleMenu.js +2 -2
- package/dist/components/Menu/LinkBubbleMenu.js +2 -2
- package/dist/components/Menu/Mobile/ListOptionBar.js +1 -1
- package/dist/components/Scribe/extension/emoji/suggest.js +1 -1
- package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +1 -1
- package/dist/components/Scribe/extension/slashCommand/renderItems.js +1 -1
- package/dist/components/Scribe/index.js +2 -2
- package/dist/{dist-RuuEA1GJ.js → dist-Cp938P7P.js} +188 -185
- package/dist/{menus-CzX7kyXn.js → menus-CakIdDdY.js} +1 -1
- package/dist/rolldown-runtime-CtkjhSXr.js +4 -0
- package/package.json +3 -3
- package/dist/rolldown-runtime-B8UxIWdF.js +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e } from "./dist-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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 { n as e } from "../../../../dist-
|
|
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-
|
|
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-
|
|
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-
|
|
2
|
-
import { t as n } from "../../dist-
|
|
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 {
|
|
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
|
|
6
|
-
var _ = /* @__PURE__ */
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
12
|
-
function
|
|
13
|
-
var n = t(), r =
|
|
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
|
-
} }),
|
|
17
|
-
return
|
|
18
|
-
|
|
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
|
-
]),
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
+
]), a(function() {
|
|
27
|
+
return l(c) && u({ inst: c }), e(function() {
|
|
28
|
+
l(c) && u({ inst: c });
|
|
26
29
|
});
|
|
27
|
-
}, [e]),
|
|
30
|
+
}, [e]), s(n), n;
|
|
28
31
|
}
|
|
29
|
-
function
|
|
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 !
|
|
37
|
+
return !r(e, n);
|
|
35
38
|
} catch {
|
|
36
39
|
return !0;
|
|
37
40
|
}
|
|
38
41
|
}
|
|
39
|
-
function
|
|
42
|
+
function u(e, t) {
|
|
40
43
|
return t();
|
|
41
44
|
}
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
})),
|
|
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
|
|
49
|
+
function t(e, t) {
|
|
47
50
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
48
51
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
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 (!
|
|
53
|
-
var
|
|
54
|
-
|
|
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
|
-
|
|
59
|
+
i = s({ inst: {
|
|
57
60
|
value: n,
|
|
58
61
|
getSnapshot: t
|
|
59
62
|
} });
|
|
60
|
-
var
|
|
61
|
-
return
|
|
62
|
-
|
|
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
|
-
]),
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
+
]), c(function() {
|
|
71
|
+
return r(p) && m({ inst: p }), e(function() {
|
|
72
|
+
r(p) && m({ inst: p });
|
|
70
73
|
});
|
|
71
|
-
}, [e]),
|
|
74
|
+
}, [e]), u(n), n;
|
|
72
75
|
}
|
|
73
|
-
function
|
|
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 !
|
|
81
|
+
return !o(e, n);
|
|
79
82
|
} catch {
|
|
80
83
|
return !0;
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
|
-
function
|
|
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
|
|
88
|
-
|
|
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
|
-
})),
|
|
91
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
92
|
-
})),
|
|
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
|
|
111
|
+
function T(e) {
|
|
109
112
|
return e?.[Symbol.toStringTag];
|
|
110
113
|
}
|
|
111
|
-
function
|
|
112
|
-
return
|
|
114
|
+
function E(e) {
|
|
115
|
+
return te(e).concat(x(e));
|
|
113
116
|
}
|
|
114
|
-
var
|
|
115
|
-
function
|
|
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
|
|
119
|
-
function
|
|
120
|
-
return e.byteLength === t.byteLength &&
|
|
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
|
|
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 &&
|
|
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
|
|
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
|
|
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
|
|
165
|
-
function
|
|
166
|
-
let r =
|
|
167
|
-
if (
|
|
168
|
-
for (; i-- > 0;) if (!
|
|
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
|
|
172
|
-
let r =
|
|
173
|
-
if (
|
|
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], !
|
|
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
|
|
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
|
|
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
|
|
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
|
|
212
|
-
return (r ===
|
|
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
|
|
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
|
-
},
|
|
228
|
-
function
|
|
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 =
|
|
244
|
-
if (b ===
|
|
245
|
-
if (b ===
|
|
246
|
-
if (b ===
|
|
247
|
-
if (b ===
|
|
248
|
-
if (b ===
|
|
249
|
-
if (b ===
|
|
250
|
-
if (b ===
|
|
251
|
-
if (b ===
|
|
252
|
-
if (
|
|
253
|
-
if (b ===
|
|
254
|
-
if (b ===
|
|
255
|
-
if (b ===
|
|
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 =
|
|
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
|
|
270
|
+
function Ce({ circular: e, createCustomConfig: t, strict: n }) {
|
|
268
271
|
let r = {
|
|
269
|
-
areArrayBuffersEqual:
|
|
270
|
-
areArraysEqual: n ?
|
|
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(
|
|
276
|
-
areNumbersEqual:
|
|
277
|
-
areObjectsEqual: n ?
|
|
278
|
-
arePrimitiveWrappersEqual:
|
|
279
|
-
areRegExpsEqual:
|
|
280
|
-
areSetsEqual: n ? C(
|
|
281
|
-
areTypedArraysEqual: n ? C(
|
|
282
|
-
areUrlsEqual:
|
|
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
|
|
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
|
|
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
|
|
330
|
-
|
|
332
|
+
var Ee = G();
|
|
333
|
+
G({ strict: !0 }), G({ circular: !0 }), G({
|
|
331
334
|
circular: !0,
|
|
332
335
|
strict: !0
|
|
333
|
-
}),
|
|
336
|
+
}), G({ createInternalComparator: () => O }), G({
|
|
334
337
|
strict: !0,
|
|
335
|
-
createInternalComparator: () =>
|
|
336
|
-
}),
|
|
338
|
+
createInternalComparator: () => O
|
|
339
|
+
}), G({
|
|
337
340
|
circular: !0,
|
|
338
|
-
createInternalComparator: () =>
|
|
339
|
-
}),
|
|
341
|
+
createInternalComparator: () => O
|
|
342
|
+
}), G({
|
|
340
343
|
circular: !0,
|
|
341
|
-
createInternalComparator: () =>
|
|
344
|
+
createInternalComparator: () => O,
|
|
342
345
|
strict: !0
|
|
343
346
|
});
|
|
344
|
-
function
|
|
345
|
-
let { circular: t = !1, createInternalComparator: n, createState: r, strict: i = !1 } = e, a =
|
|
346
|
-
return
|
|
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) :
|
|
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
|
|
357
|
-
var
|
|
358
|
-
function
|
|
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
|
|
362
|
-
|
|
363
|
-
var d =
|
|
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 =
|
|
374
|
+
d = c(function() {
|
|
372
375
|
function e(e) {
|
|
373
|
-
if (!
|
|
374
|
-
if (
|
|
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 (
|
|
379
|
+
if (u(t, e)) return s = t;
|
|
377
380
|
}
|
|
378
|
-
return
|
|
381
|
+
return s = e;
|
|
379
382
|
}
|
|
380
|
-
if (t =
|
|
383
|
+
if (t = s, i(o, e)) return t;
|
|
381
384
|
var n = r(e);
|
|
382
|
-
return
|
|
385
|
+
return u !== void 0 && u(t, n) ? (o = e, t) : (o = e, s = n);
|
|
383
386
|
}
|
|
384
|
-
var
|
|
387
|
+
var a = !1, o, s, c = n === void 0 ? null : n;
|
|
385
388
|
return [function() {
|
|
386
389
|
return e(t());
|
|
387
|
-
},
|
|
388
|
-
return e(
|
|
390
|
+
}, c === null ? void 0 : function() {
|
|
391
|
+
return e(c());
|
|
389
392
|
}];
|
|
390
393
|
}, [
|
|
391
394
|
t,
|
|
392
395
|
n,
|
|
393
396
|
r,
|
|
394
|
-
|
|
397
|
+
u
|
|
395
398
|
]);
|
|
396
|
-
var p =
|
|
397
|
-
return
|
|
399
|
+
var p = a(e, d[0], d[1]);
|
|
400
|
+
return s(function() {
|
|
398
401
|
f.hasValue = !0, f.value = p;
|
|
399
|
-
}, [p]),
|
|
402
|
+
}, [p]), l(p), p;
|
|
400
403
|
};
|
|
401
|
-
})),
|
|
404
|
+
})), Oe = /* @__PURE__ */ e(((e) => {
|
|
402
405
|
process.env.NODE_ENV !== "production" && (function() {
|
|
403
|
-
function
|
|
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
|
|
408
|
-
|
|
409
|
-
var d =
|
|
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 =
|
|
420
|
+
d = c(function() {
|
|
418
421
|
function e(e) {
|
|
419
|
-
if (!
|
|
420
|
-
if (
|
|
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 (
|
|
425
|
+
if (u(t, e)) return s = t;
|
|
423
426
|
}
|
|
424
|
-
return
|
|
427
|
+
return s = e;
|
|
425
428
|
}
|
|
426
|
-
if (t =
|
|
429
|
+
if (t = s, i(o, e)) return t;
|
|
427
430
|
var n = r(e);
|
|
428
|
-
return
|
|
431
|
+
return u !== void 0 && u(t, n) ? (o = e, t) : (o = e, s = n);
|
|
429
432
|
}
|
|
430
|
-
var
|
|
433
|
+
var a = !1, o, s, c = n === void 0 ? null : n;
|
|
431
434
|
return [function() {
|
|
432
435
|
return e(t());
|
|
433
|
-
},
|
|
434
|
-
return e(
|
|
436
|
+
}, c === null ? void 0 : function() {
|
|
437
|
+
return e(c());
|
|
435
438
|
}];
|
|
436
439
|
}, [
|
|
437
440
|
t,
|
|
438
441
|
n,
|
|
439
442
|
r,
|
|
440
|
-
|
|
443
|
+
u
|
|
441
444
|
]);
|
|
442
|
-
var p =
|
|
443
|
-
return
|
|
445
|
+
var p = a(e, d[0], d[1]);
|
|
446
|
+
return s(function() {
|
|
444
447
|
f.hasValue = !0, f.value = p;
|
|
445
|
-
}, [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
|
-
})),
|
|
449
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
450
|
-
})))(),
|
|
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
|
-
},
|
|
455
|
-
let t = (0,
|
|
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
|
|
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
|
|
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 =
|
|
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:
|
|
523
|
+
ref: Ae(t, this.editorContentRef),
|
|
521
524
|
...n
|
|
522
|
-
}), e?.contentComponent && /* @__PURE__ */ h(
|
|
525
|
+
}), e?.contentComponent && /* @__PURE__ */ h(je, { contentComponent: e.contentComponent })] });
|
|
523
526
|
}
|
|
524
|
-
},
|
|
527
|
+
}, Pe = i((e, t) => {
|
|
525
528
|
let r = n.useMemo(() => Math.floor(Math.random() * 4294967295).toString(), [e.editor]);
|
|
526
|
-
return n.createElement(
|
|
529
|
+
return n.createElement(Ne, {
|
|
527
530
|
key: r,
|
|
528
531
|
innerRef: t,
|
|
529
532
|
...e
|
|
530
533
|
});
|
|
531
|
-
}),
|
|
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
|
|
567
|
-
let [t] = u(() => new
|
|
568
|
-
return
|
|
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
|
|
572
|
-
|
|
573
|
-
var
|
|
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
|
-
}),
|
|
580
|
+
}), J = () => a(ze);
|
|
578
581
|
n.forwardRef((e, t) => {
|
|
579
|
-
let { onDragStart: n } =
|
|
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
|
|
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
|
|
603
|
+
function Ve(e) {
|
|
601
604
|
if (Y(e) || X(e)) return !0;
|
|
602
|
-
if (
|
|
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
|
|
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
|
|
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 =
|
|
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
|
|
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(
|
|
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 } =
|
|
679
|
-
return /* @__PURE__ */ h(
|
|
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 {
|
|
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-
|
|
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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clevertask/scribe",
|
|
3
|
-
"version": "0.1.
|
|
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 };
|