@clevertask/scribe 0.1.31 → 0.1.33
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-Bm5IfWVV.js → BarMenu-KDCTLxwU.js} +1 -1
- package/dist/components/Menu/BarMenu.js +1 -1
- package/dist/components/Menu/BubbleMenu.js +2 -2
- package/dist/components/Menu/CalloutBubbleMenu.js +2 -2
- package/dist/components/Menu/LinkBubbleMenu.js +2 -2
- package/dist/components/Menu/Mobile/ListOptionBar.js +1 -1
- package/dist/components/Menu/TableBubbleMenu.js +3 -3
- package/dist/components/Menu/TableHeightSettings.js +1 -1
- package/dist/components/Menu/linkBubbleMenuPlugin.js +1 -1
- package/dist/components/Scribe/extension/callout.js +1 -1
- package/dist/components/Scribe/extension/emoji/suggest.js +1 -1
- package/dist/components/Scribe/extension/extension-link.js +1 -1
- package/dist/components/Scribe/extension/extension-markdown-paste.js +2 -2
- package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/commands.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/render-html.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/schema.js +1 -1
- package/dist/components/Scribe/extension/index.js +1 -1
- package/dist/components/Scribe/extension/resizable-table.js +2 -2
- package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +3 -3
- package/dist/components/Scribe/extension/slashCommand/index.js +2 -2
- package/dist/components/Scribe/extension/slashCommand/renderItems.js +1 -1
- package/dist/components/Scribe/extension/table-layout.js +1 -1
- package/dist/components/Scribe/extension/tableOfContents.js +1 -1
- package/dist/components/Scribe/index.d.ts.map +1 -1
- package/dist/components/Scribe/index.js +5 -5
- package/dist/{dist-BoAzo5MN.js → dist-B0QTAeBQ.js} +816 -644
- package/dist/{dist-SM4NoN4h.js → dist-D2ylH0wL.js} +144 -126
- package/dist/{dist-BqlzKS-_.js → dist-Dn1WHiQf.js} +2 -2
- package/dist/document-node-capabilities.js +1 -1
- package/dist/{extension-dz0CIf3r.js → extension-BpvJtqXe.js} +2 -2
- package/dist/{extension-link-DxIXGCtV.js → extension-link-DvMmKOua.js} +2 -2
- package/dist/{html-to-markdown-DeRG9OPm.js → html-to-markdown-CsSZIegJ.js} +1 -1
- package/dist/main.js +2 -2
- package/dist/{markdown-to-html-tCPjQ5u6.js → markdown-to-html-YkhBwkrX.js} +225 -217
- package/dist/{menus-BKxcTUsl.js → menus-DcCI3Z7f.js} +5 -5
- package/dist/purify.es-BpCmlcgS.js +877 -0
- package/dist/{rolldown-runtime-CtkjhSXr.js → rolldown-runtime-gFifre8I.js} +1 -1
- package/dist/{schema-extensions-B9hR1VrD.js → schema-extensions-CROueYL8.js} +6 -6
- package/dist/schema-extensions.js +1 -1
- package/dist/schema.js +1 -1
- package/dist/{table-layout-ClqaGg1E.js → table-layout-CARP38M-.js} +2 -2
- package/dist/utils/html-to-markdown.js +1 -1
- package/dist/utils/index.js +4 -4
- package/dist/utils/markdown-to-html.js +1 -1
- package/package.json +52 -52
- package/dist/purify.es-CSWcs7f1.js +0 -844
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-
|
|
2
|
-
import { L as t, O as n, t as r } from "./dist-
|
|
1
|
+
import { t as e } from "./rolldown-runtime-gFifre8I.js";
|
|
2
|
+
import { L as t, O as n, t as r } from "./dist-B0QTAeBQ.js";
|
|
3
3
|
import { Plugin as i, PluginKey as a } from "@tiptap/pm/state";
|
|
4
4
|
import * as o from "react";
|
|
5
5
|
import s, { createContext as c, forwardRef as l, useContext as u, useDebugValue as d, useEffect as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g, version as _ } from "react";
|
|
6
6
|
import v, { flushSync as y } from "react-dom";
|
|
7
|
-
import { Fragment as b, jsx as x, jsxs as
|
|
7
|
+
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
8
8
|
//#region builtin:esm-external-require-react
|
|
9
|
-
var
|
|
9
|
+
var C = /* @__PURE__ */ e(((e, t) => {
|
|
10
10
|
t.exports = Object.prototype.hasOwnProperty.call(o, "module.exports") ? o["module.exports"] : { ...o };
|
|
11
|
-
})),
|
|
12
|
-
var t =
|
|
11
|
+
})), ee = /* @__PURE__ */ e(((e) => {
|
|
12
|
+
var t = C();
|
|
13
13
|
function n(e, t) {
|
|
14
14
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
15
15
|
}
|
|
@@ -46,7 +46,7 @@ var S = /* @__PURE__ */ e(((e, t) => {
|
|
|
46
46
|
}
|
|
47
47
|
var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? u : c;
|
|
48
48
|
e.useSyncExternalStore = t.useSyncExternalStore === void 0 ? d : t.useSyncExternalStore;
|
|
49
|
-
})),
|
|
49
|
+
})), te = /* @__PURE__ */ e(((e) => {
|
|
50
50
|
process.env.NODE_ENV !== "production" && (function() {
|
|
51
51
|
function t(e, t) {
|
|
52
52
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
@@ -89,18 +89,18 @@ var S = /* @__PURE__ */ e(((e, t) => {
|
|
|
89
89
|
return t();
|
|
90
90
|
}
|
|
91
91
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
92
|
-
var a =
|
|
92
|
+
var a = C(), 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;
|
|
93
93
|
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());
|
|
94
94
|
})();
|
|
95
|
-
})),
|
|
96
|
-
t.exports = process.env.NODE_ENV === "production" ?
|
|
97
|
-
})),
|
|
98
|
-
function
|
|
95
|
+
})), w = /* @__PURE__ */ e(((e, t) => {
|
|
96
|
+
t.exports = process.env.NODE_ENV === "production" ? ee() : te();
|
|
97
|
+
})), T = w(), { getOwnPropertyNames: ne, getOwnPropertySymbols: re } = Object, { hasOwnProperty: ie } = Object.prototype;
|
|
98
|
+
function E(e, t) {
|
|
99
99
|
return function(n, r, i) {
|
|
100
100
|
return e(n, r, i) && t(n, r, i);
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function D(e) {
|
|
104
104
|
return function(t, n, r) {
|
|
105
105
|
if (!t || !n || typeof t != "object" || typeof n != "object") return e(t, n, r);
|
|
106
106
|
let { cache: i } = r, a = i.get(t), o = i.get(n);
|
|
@@ -110,17 +110,17 @@ function E(e) {
|
|
|
110
110
|
return i.delete(t), i.delete(n), s;
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function ae(e) {
|
|
114
114
|
return e?.[Symbol.toStringTag];
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
return
|
|
116
|
+
function O(e) {
|
|
117
|
+
return ne(e).concat(re(e));
|
|
118
118
|
}
|
|
119
|
-
var
|
|
120
|
-
function
|
|
119
|
+
var oe = Object.hasOwn || ((e, t) => ie.call(e, t));
|
|
120
|
+
function k(e, t) {
|
|
121
121
|
return e === t || !e && !t && e !== e && t !== t;
|
|
122
122
|
}
|
|
123
|
-
var
|
|
123
|
+
var se = "__v", ce = "__o", le = "_owner", ue = 64, { getOwnPropertyDescriptor: A, keys: j } = Object, { propertyIsEnumerable: M } = Object.prototype, de = A(Object.getPrototypeOf(Int8Array.prototype), Symbol.toStringTag).get;
|
|
124
124
|
function fe(e, t) {
|
|
125
125
|
return e.byteLength === t.byteLength && R(new Uint8Array(e), new Uint8Array(t));
|
|
126
126
|
}
|
|
@@ -134,15 +134,31 @@ function me(e, t) {
|
|
|
134
134
|
return e.byteLength === t.byteLength && R(new Uint8Array(e.buffer, e.byteOffset, e.byteLength), new Uint8Array(t.buffer, t.byteOffset, t.byteLength));
|
|
135
135
|
}
|
|
136
136
|
function he(e, t) {
|
|
137
|
-
return
|
|
138
|
-
}
|
|
139
|
-
function
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
137
|
+
return k(e.getTime(), t.getTime());
|
|
138
|
+
}
|
|
139
|
+
function ge(e, t, n) {
|
|
140
|
+
if (e.name !== t.name || e.message !== t.message || e.stack !== t.stack) return !1;
|
|
141
|
+
let r = e.cause, i = t.cause;
|
|
142
|
+
if (r !== i && !n.equals(r, i, "cause", "cause", e, t, n)) return !1;
|
|
143
|
+
let a = e.errors, o = t.errors;
|
|
144
|
+
if (a !== o && !n.equals(a, o, "errors", "errors", e, t, n)) return !1;
|
|
145
|
+
let s = j(e), c = j(t), l = s.length;
|
|
146
|
+
if (!l && !c.length) return !0;
|
|
147
|
+
let u = 0, d;
|
|
148
|
+
for (; l-- > 0;) if (d = s[l], d !== "cause" && d !== "errors") {
|
|
149
|
+
if (d !== c[l] && !M.call(t, d) || !n.equals(e[d], t[d], d, d, e, t, n)) return !1;
|
|
150
|
+
++u;
|
|
151
|
+
}
|
|
152
|
+
let f = c.length - u;
|
|
153
|
+
return !f || f === +!!M.call(t, "cause") + +!!M.call(t, "errors");
|
|
154
|
+
}
|
|
155
|
+
function _e(e, t) {
|
|
143
156
|
return e === t;
|
|
144
157
|
}
|
|
145
|
-
function
|
|
158
|
+
function ve(e, t, n) {
|
|
159
|
+
return e.name === t.name && e.message === t.message && e.stack === t.stack && I(e, t, n);
|
|
160
|
+
}
|
|
161
|
+
function N(e, t, n) {
|
|
146
162
|
let r = e.size;
|
|
147
163
|
if (r !== t.size) return !1;
|
|
148
164
|
if (!r) return !0;
|
|
@@ -166,24 +182,25 @@ function M(e, t, n) {
|
|
|
166
182
|
}
|
|
167
183
|
return !0;
|
|
168
184
|
}
|
|
169
|
-
var
|
|
170
|
-
function
|
|
171
|
-
let r =
|
|
172
|
-
if (
|
|
173
|
-
|
|
185
|
+
var P = k;
|
|
186
|
+
function F(e, t, n) {
|
|
187
|
+
let r = j(e), i = j(t), a = r.length;
|
|
188
|
+
if (i.length !== a) return !1;
|
|
189
|
+
let o = a <= ue, s;
|
|
190
|
+
for (; a-- > 0;) if (s = r[a], !B(e, t, s) && (s !== i[a] && !(o ? i.includes(s) : M.call(t, s)) || !n.equals(e[s], t[s], s, s, e, t, n))) return !1;
|
|
174
191
|
return !0;
|
|
175
192
|
}
|
|
176
|
-
function
|
|
177
|
-
let r =
|
|
178
|
-
if (
|
|
193
|
+
function I(e, t, n) {
|
|
194
|
+
let r = O(e), i = r.length;
|
|
195
|
+
if (O(t).length !== i) return !1;
|
|
179
196
|
let a, o, s;
|
|
180
|
-
for (; i-- > 0;) if (a = r[i], !B(e, t, n, a) || (o =
|
|
197
|
+
for (; i-- > 0;) if (a = r[i], !B(e, t, a) && (!oe(t, a) || !n.equals(e[a], t[a], a, a, e, t, n)) || (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;
|
|
181
198
|
return !0;
|
|
182
199
|
}
|
|
183
|
-
function
|
|
184
|
-
return
|
|
200
|
+
function ye(e, t) {
|
|
201
|
+
return k(e.valueOf(), t.valueOf());
|
|
185
202
|
}
|
|
186
|
-
function
|
|
203
|
+
function be(e, t) {
|
|
187
204
|
return e.source === t.source && e.flags === t.flags;
|
|
188
205
|
}
|
|
189
206
|
function L(e, t, n) {
|
|
@@ -215,20 +232,20 @@ function R(e, t) {
|
|
|
215
232
|
for (; n-- > 0;) if (e[n] !== t[n]) return !1;
|
|
216
233
|
return !0;
|
|
217
234
|
}
|
|
218
|
-
function
|
|
219
|
-
return e.href === t.href || e.protocol === t.protocol && e.username === t.username && e.password === t.password && e.host === t.host && e.pathname === t.pathname && e.hash === t.hash &&
|
|
235
|
+
function xe(e, t) {
|
|
236
|
+
return e.href === t.href || e.protocol === t.protocol && e.username === t.username && e.password === t.password && e.host === t.host && e.pathname === t.pathname && e.hash === t.hash && Se(e.searchParams, t.searchParams);
|
|
220
237
|
}
|
|
221
|
-
function
|
|
238
|
+
function Se(e, t) {
|
|
222
239
|
let n = e.toString(), r = t.toString();
|
|
223
240
|
return n === r || z(n) === z(r);
|
|
224
241
|
}
|
|
225
242
|
function z(e) {
|
|
226
243
|
return e.split("&").sort().join("&");
|
|
227
244
|
}
|
|
228
|
-
function B(e, t, n
|
|
229
|
-
return (
|
|
245
|
+
function B(e, t, n) {
|
|
246
|
+
return (n === le || n === ce || n === se) && !!(e.$$typeof || t.$$typeof);
|
|
230
247
|
}
|
|
231
|
-
var
|
|
248
|
+
var Ce = "[object ArrayBuffer]", we = "[object Arguments]", Te = "[object Boolean]", Ee = "[object DataView]", De = "[object Date]", Oe = "[object Error]", ke = "[object Map]", Ae = "[object Number]", je = "[object Object]", Me = "[object RegExp]", Ne = "[object Set]", Pe = "[object String]", Fe = {
|
|
232
249
|
"[object Int8Array]": !0,
|
|
233
250
|
"[object Uint8Array]": !0,
|
|
234
251
|
"[object Uint8ClampedArray]": !0,
|
|
@@ -241,8 +258,8 @@ var be = "[object ArrayBuffer]", xe = "[object Arguments]", Se = "[object Boolea
|
|
|
241
258
|
"[object Float64Array]": !0,
|
|
242
259
|
"[object BigInt64Array]": !0,
|
|
243
260
|
"[object BigUint64Array]": !0
|
|
244
|
-
},
|
|
245
|
-
function
|
|
261
|
+
}, Ie = "[object URL]", Le = Object.prototype.toString;
|
|
262
|
+
function Re({ 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 }) {
|
|
246
263
|
return function(h, g, _) {
|
|
247
264
|
if (h === g) return !0;
|
|
248
265
|
if (h == null || g == null) return !1;
|
|
@@ -258,23 +275,23 @@ function Fe({ areArrayBuffersEqual: e, areArraysEqual: t, areDataViewsEqual: n,
|
|
|
258
275
|
if (y === Map) return o(h, g, _);
|
|
259
276
|
if (y === Set) return d(h, g, _);
|
|
260
277
|
if (y == null) return c(h, g, _);
|
|
261
|
-
let b =
|
|
262
|
-
if (b ===
|
|
263
|
-
if (b ===
|
|
264
|
-
if (b ===
|
|
265
|
-
if (b ===
|
|
266
|
-
if (b ===
|
|
267
|
-
if (b ===
|
|
268
|
-
if (b ===
|
|
269
|
-
if (b ===
|
|
270
|
-
if (
|
|
271
|
-
if (b ===
|
|
272
|
-
if (b ===
|
|
273
|
-
if (b ===
|
|
278
|
+
let b = Le.call(h);
|
|
279
|
+
if (b === De) return r(h, g, _);
|
|
280
|
+
if (b === Me) return u(h, g, _);
|
|
281
|
+
if (b === ke) return o(h, g, _);
|
|
282
|
+
if (b === Ne) return d(h, g, _);
|
|
283
|
+
if (b === je) return typeof h.then != "function" && typeof g.then != "function" && c(h, g, _);
|
|
284
|
+
if (b === Ie) return p(h, g, _);
|
|
285
|
+
if (b === Oe) return i(h, g, _);
|
|
286
|
+
if (b === we) return c(h, g, _);
|
|
287
|
+
if (Fe[b]) return f(h, g, _);
|
|
288
|
+
if (b === Ce) return e(h, g, _);
|
|
289
|
+
if (b === Ee) return n(h, g, _);
|
|
290
|
+
if (b === Te || b === Ae || b === Pe) return l(h, g, _);
|
|
274
291
|
if (m) {
|
|
275
292
|
let e = m[b];
|
|
276
293
|
if (!e) {
|
|
277
|
-
let t =
|
|
294
|
+
let t = ae(h);
|
|
278
295
|
t && (e = m[t]);
|
|
279
296
|
}
|
|
280
297
|
if (e) return e(h, g, _);
|
|
@@ -282,26 +299,26 @@ function Fe({ areArrayBuffersEqual: e, areArraysEqual: t, areDataViewsEqual: n,
|
|
|
282
299
|
return !1;
|
|
283
300
|
};
|
|
284
301
|
}
|
|
285
|
-
function
|
|
302
|
+
function ze({ circular: e, createCustomConfig: t, strict: n }) {
|
|
286
303
|
let r = {
|
|
287
304
|
areArrayBuffersEqual: fe,
|
|
288
|
-
areArraysEqual: n ?
|
|
305
|
+
areArraysEqual: n ? I : pe,
|
|
289
306
|
areDataViewsEqual: me,
|
|
290
307
|
areDatesEqual: he,
|
|
291
|
-
areErrorsEqual: n ?
|
|
292
|
-
areFunctionsEqual:
|
|
293
|
-
areMapsEqual: n ?
|
|
294
|
-
areNumbersEqual:
|
|
295
|
-
areObjectsEqual: n ?
|
|
296
|
-
arePrimitiveWrappersEqual:
|
|
297
|
-
areRegExpsEqual:
|
|
298
|
-
areSetsEqual: n ?
|
|
299
|
-
areTypedArraysEqual: n ?
|
|
300
|
-
areUrlsEqual:
|
|
308
|
+
areErrorsEqual: n ? ve : ge,
|
|
309
|
+
areFunctionsEqual: _e,
|
|
310
|
+
areMapsEqual: n ? E(N, I) : N,
|
|
311
|
+
areNumbersEqual: P,
|
|
312
|
+
areObjectsEqual: n ? I : F,
|
|
313
|
+
arePrimitiveWrappersEqual: ye,
|
|
314
|
+
areRegExpsEqual: be,
|
|
315
|
+
areSetsEqual: n ? E(L, I) : L,
|
|
316
|
+
areTypedArraysEqual: n ? E(R, I) : R,
|
|
317
|
+
areUrlsEqual: xe,
|
|
301
318
|
unknownTagComparators: void 0
|
|
302
319
|
};
|
|
303
320
|
if (t && (r = Object.assign({}, r, t(r))), e) {
|
|
304
|
-
let e =
|
|
321
|
+
let e = D(r.areArraysEqual), t = D(r.areErrorsEqual), n = D(r.areMapsEqual), i = D(r.areObjectsEqual), a = D(r.areSetsEqual);
|
|
305
322
|
r = Object.assign({}, r, {
|
|
306
323
|
areArraysEqual: e,
|
|
307
324
|
areErrorsEqual: t,
|
|
@@ -312,12 +329,12 @@ function Ie({ circular: e, createCustomConfig: t, strict: n }) {
|
|
|
312
329
|
}
|
|
313
330
|
return r;
|
|
314
331
|
}
|
|
315
|
-
function
|
|
332
|
+
function Be(e) {
|
|
316
333
|
return function(t, n, r, i, a, o, s) {
|
|
317
334
|
return e(t, n, s);
|
|
318
335
|
};
|
|
319
336
|
}
|
|
320
|
-
function
|
|
337
|
+
function Ve({ circular: e, comparator: t, createState: n, equals: r, strict: i }) {
|
|
321
338
|
if (n) return function(a, o) {
|
|
322
339
|
let { cache: s = e ? /* @__PURE__ */ new WeakMap() : void 0, meta: c } = n();
|
|
323
340
|
return t(a, o, {
|
|
@@ -345,35 +362,36 @@ function Re({ circular: e, comparator: t, createState: n, equals: r, strict: i }
|
|
|
345
362
|
return t(e, n, a);
|
|
346
363
|
};
|
|
347
364
|
}
|
|
348
|
-
|
|
349
|
-
|
|
365
|
+
V(), V({ strict: !0 });
|
|
366
|
+
var He = V({ circular: !0 });
|
|
367
|
+
V({
|
|
350
368
|
circular: !0,
|
|
351
369
|
strict: !0
|
|
352
|
-
}), V({ createInternalComparator: () =>
|
|
370
|
+
}), V({ createInternalComparator: () => k }), V({
|
|
353
371
|
strict: !0,
|
|
354
|
-
createInternalComparator: () =>
|
|
372
|
+
createInternalComparator: () => k
|
|
355
373
|
}), V({
|
|
356
374
|
circular: !0,
|
|
357
|
-
createInternalComparator: () =>
|
|
375
|
+
createInternalComparator: () => k
|
|
358
376
|
}), V({
|
|
359
377
|
circular: !0,
|
|
360
|
-
createInternalComparator: () =>
|
|
378
|
+
createInternalComparator: () => k,
|
|
361
379
|
strict: !0
|
|
362
380
|
});
|
|
363
381
|
function V(e = {}) {
|
|
364
|
-
let { circular: t = !1, createInternalComparator: n, createState: r, strict: i = !1 } = e, a =
|
|
365
|
-
return
|
|
382
|
+
let { circular: t = !1, createInternalComparator: n, createState: r, strict: i = !1 } = e, a = Re(ze(e));
|
|
383
|
+
return Ve({
|
|
366
384
|
circular: t,
|
|
367
385
|
comparator: a,
|
|
368
386
|
createState: r,
|
|
369
|
-
equals: n ? n(a) :
|
|
387
|
+
equals: n ? n(a) : Be(a),
|
|
370
388
|
strict: i
|
|
371
389
|
});
|
|
372
390
|
}
|
|
373
391
|
//#endregion
|
|
374
392
|
//#region node_modules/.pnpm/use-sync-external-store@1.7.0_react@19.2.5/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
|
|
375
|
-
var
|
|
376
|
-
var t =
|
|
393
|
+
var Ue = /* @__PURE__ */ e(((e) => {
|
|
394
|
+
var t = C(), n = w();
|
|
377
395
|
function r(e, t) {
|
|
378
396
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
379
397
|
}
|
|
@@ -417,13 +435,13 @@ var Be = /* @__PURE__ */ e(((e) => {
|
|
|
417
435
|
f.hasValue = !0, f.value = p;
|
|
418
436
|
}, [p]), l(p), p;
|
|
419
437
|
};
|
|
420
|
-
})),
|
|
438
|
+
})), We = /* @__PURE__ */ e(((e) => {
|
|
421
439
|
process.env.NODE_ENV !== "production" && (function() {
|
|
422
440
|
function t(e, t) {
|
|
423
441
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
424
442
|
}
|
|
425
443
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
426
|
-
var n =
|
|
444
|
+
var n = C(), r = w(), i = typeof Object.is == "function" ? Object.is : t, a = r.useSyncExternalStore, o = n.useRef, s = n.useEffect, c = n.useMemo, l = n.useDebugValue;
|
|
427
445
|
e.useSyncExternalStoreWithSelector = function(e, t, n, r, u) {
|
|
428
446
|
var d = o(null);
|
|
429
447
|
if (d.current === null) {
|
|
@@ -464,10 +482,10 @@ var Be = /* @__PURE__ */ e(((e) => {
|
|
|
464
482
|
}, [p]), l(p), p;
|
|
465
483
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
466
484
|
})();
|
|
467
|
-
})),
|
|
468
|
-
t.exports = process.env.NODE_ENV === "production" ?
|
|
485
|
+
})), Ge = (/* @__PURE__ */ e(((e, t) => {
|
|
486
|
+
t.exports = process.env.NODE_ENV === "production" ? Ue() : We();
|
|
469
487
|
})))();
|
|
470
|
-
function
|
|
488
|
+
function Ke(e, r) {
|
|
471
489
|
if (e.isDestroyed || r.defaultPrevented || !r.cancelable || !e.isEditable || r.inputType !== "insertParagraph" && r.inputType !== "insertLineBreak" || !t() && !n()) return;
|
|
472
490
|
let i = e.view, a = i.root, o = (a.getSelection?.call(a) ?? i.dom.ownerDocument.getSelection())?.anchorNode, s = (o?.nodeType === 1 ? o : o?.parentElement)?.closest("[data-node-view-content-react]");
|
|
473
491
|
if (!s || !i.dom.contains(s)) return;
|
|
@@ -483,15 +501,15 @@ function Ue(e, r) {
|
|
|
483
501
|
});
|
|
484
502
|
i.someProp("handleKeyDown", (e) => e(i, l)) ? (r.preventDefault(), i.input.lastIOSEnter = 0, clearTimeout(i.input.lastIOSEnterFallbackTimeout)) : c === 13 && (i.input.lastKeyCode = c);
|
|
485
503
|
}
|
|
486
|
-
var H = new a("reactMobileEnter"),
|
|
504
|
+
var H = new a("reactMobileEnter"), qe = (...e) => (t) => {
|
|
487
505
|
e.forEach((e) => {
|
|
488
506
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
489
507
|
});
|
|
490
|
-
},
|
|
491
|
-
let t = (0,
|
|
508
|
+
}, Je = ({ contentComponent: e }) => {
|
|
509
|
+
let t = (0, T.useSyncExternalStore)(e.subscribe, e.getSnapshot, e.getServerSnapshot);
|
|
492
510
|
return /* @__PURE__ */ x(b, { children: Object.values(t) });
|
|
493
511
|
};
|
|
494
|
-
function
|
|
512
|
+
function Ye() {
|
|
495
513
|
let e = /* @__PURE__ */ new Set(), t = {}, n = !1, r = () => {
|
|
496
514
|
!n && e.size && (n = !0, queueMicrotask(() => {
|
|
497
515
|
n = !1, e.forEach((e) => e());
|
|
@@ -521,7 +539,7 @@ function Ke() {
|
|
|
521
539
|
}
|
|
522
540
|
};
|
|
523
541
|
}
|
|
524
|
-
var
|
|
542
|
+
var Xe = class extends s.Component {
|
|
525
543
|
constructor(e) {
|
|
526
544
|
super(e), this.editorContentRef = s.createRef();
|
|
527
545
|
}
|
|
@@ -536,9 +554,9 @@ var qe = class extends s.Component {
|
|
|
536
554
|
if (e && !e.isDestroyed && e.view.dom?.parentNode) {
|
|
537
555
|
if (e.contentComponent) return;
|
|
538
556
|
let t = this.editorContentRef.current;
|
|
539
|
-
t.append(...e.view.dom.parentNode.childNodes), e.setOptions({ element: t }), e.contentComponent =
|
|
557
|
+
t.append(...e.view.dom.parentNode.childNodes), e.setOptions({ element: t }), e.contentComponent = Ye(), e.createNodeViews(), e.registerPlugin(new i({
|
|
540
558
|
key: H,
|
|
541
|
-
props: { handleDOMEvents: { beforeinput: (t, n) =>
|
|
559
|
+
props: { handleDOMEvents: { beforeinput: (t, n) => Ke(e, n) } }
|
|
542
560
|
})), e.isEditorContentInitialized = !0, this.forceUpdate();
|
|
543
561
|
}
|
|
544
562
|
}
|
|
@@ -555,19 +573,19 @@ var qe = class extends s.Component {
|
|
|
555
573
|
}
|
|
556
574
|
render() {
|
|
557
575
|
let { editor: e, innerRef: t, ...n } = this.props;
|
|
558
|
-
return /* @__PURE__ */
|
|
559
|
-
ref:
|
|
576
|
+
return /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("div", {
|
|
577
|
+
ref: qe(t, this.editorContentRef),
|
|
560
578
|
...n
|
|
561
|
-
}), e?.contentComponent && /* @__PURE__ */ x(
|
|
579
|
+
}), e?.contentComponent && /* @__PURE__ */ x(Je, { contentComponent: e.contentComponent })] });
|
|
562
580
|
}
|
|
563
|
-
},
|
|
581
|
+
}, Ze = l((e, t) => {
|
|
564
582
|
let n = s.useMemo(() => Math.floor(Math.random() * 4294967295).toString(), [e.editor]);
|
|
565
|
-
return s.createElement(
|
|
583
|
+
return s.createElement(Xe, {
|
|
566
584
|
key: n,
|
|
567
585
|
innerRef: t,
|
|
568
586
|
...e
|
|
569
587
|
});
|
|
570
|
-
}), U = s.memo(
|
|
588
|
+
}), U = s.memo(Ze), Qe = typeof window < "u" ? p : f, $e = class {
|
|
571
589
|
constructor(e) {
|
|
572
590
|
this.transactionNumber = 0, this.lastTransactionNumber = 0, this.subscribers = /* @__PURE__ */ new Set(), this.editor = e, this.lastSnapshot = {
|
|
573
591
|
editor: e,
|
|
@@ -603,10 +621,10 @@ var qe = class extends s.Component {
|
|
|
603
621
|
}
|
|
604
622
|
};
|
|
605
623
|
function W(e) {
|
|
606
|
-
let [t] = g(() => new
|
|
607
|
-
return
|
|
624
|
+
let [t] = g(() => new $e(e.editor)), n = (0, Ge.useSyncExternalStoreWithSelector)(t.subscribe, t.getSnapshot, t.getServerSnapshot, e.selector, e.equalityFn ?? He);
|
|
625
|
+
return Qe(() => t.watch(e.editor), [e.editor, t]), d(n), n;
|
|
608
626
|
}
|
|
609
|
-
var G = process.env.NODE_ENV !== "production", K = typeof window > "u",
|
|
627
|
+
var G = process.env.NODE_ENV !== "production", K = typeof window > "u", et = K || !!(typeof window < "u" && window.next), tt = class e {
|
|
610
628
|
constructor(e) {
|
|
611
629
|
this.editor = null, this.subscriptions = /* @__PURE__ */ new Set(), this.isComponentMounted = !1, this.previousDeps = null, this.instanceId = "", this.options = e, this.subscriptions = /* @__PURE__ */ new Set(), this.setEditor(this.getInitialEditor()), this.scheduleDestroy(), this.getEditor = this.getEditor.bind(this), this.getServerSnapshot = this.getServerSnapshot.bind(this), this.subscribe = this.subscribe.bind(this), this.refreshEditorInstance = this.refreshEditorInstance.bind(this), this.scheduleDestroy = this.scheduleDestroy.bind(this), this.onRender = this.onRender.bind(this), this.createEditor = this.createEditor.bind(this);
|
|
612
630
|
}
|
|
@@ -615,7 +633,7 @@ var G = process.env.NODE_ENV !== "production", K = typeof window > "u", Ze = K |
|
|
|
615
633
|
}
|
|
616
634
|
getInitialEditor() {
|
|
617
635
|
let e = this.options.current.immediatelyRender, t = e ?? !0;
|
|
618
|
-
return K ? (t && G && console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches"), t = !1) :
|
|
636
|
+
return K ? (t && G && console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches"), t = !1) : et && e === void 0 && (t = !1, G && console.warn("Next.js detected. `immediatelyRender` defaults to false to avoid hydration mismatches. Pass `immediatelyRender: true` explicitly if you are rendering the editor only on the client.")), t ? this.createEditor() : null;
|
|
619
637
|
}
|
|
620
638
|
createEditor() {
|
|
621
639
|
let e = {
|
|
@@ -730,10 +748,10 @@ var G = process.env.NODE_ENV !== "production", K = typeof window > "u", Ze = K |
|
|
|
730
748
|
}, 1);
|
|
731
749
|
}
|
|
732
750
|
};
|
|
733
|
-
function
|
|
751
|
+
function nt(e = {}, t = []) {
|
|
734
752
|
let n = h(e);
|
|
735
753
|
n.current = e;
|
|
736
|
-
let [r] = g(() => new
|
|
754
|
+
let [r] = g(() => new tt(n)), i = (0, T.useSyncExternalStore)(r.subscribe, r.getEditor, r.getServerSnapshot);
|
|
737
755
|
return d(i), f(r.onRender(t)), W({
|
|
738
756
|
editor: i,
|
|
739
757
|
selector: ({ transactionNumber: t }) => e.shouldRerenderOnTransaction === !1 || e.shouldRerenderOnTransaction === void 0 ? null : e.immediatelyRender && t === 0 ? 0 : t + 1
|
|
@@ -741,13 +759,13 @@ function $e(e = {}, t = []) {
|
|
|
741
759
|
}
|
|
742
760
|
var q = c({ editor: null });
|
|
743
761
|
q.Consumer;
|
|
744
|
-
var
|
|
762
|
+
var J = () => u(q), rt = c({
|
|
745
763
|
onDragStart: () => {},
|
|
746
764
|
nodeViewContentChildren: void 0,
|
|
747
765
|
nodeViewContentRef: () => {}
|
|
748
|
-
}),
|
|
766
|
+
}), it = () => u(rt);
|
|
749
767
|
s.forwardRef((e, t) => {
|
|
750
|
-
let { onDragStart: n } =
|
|
768
|
+
let { onDragStart: n } = it(), r = e.as || "div";
|
|
751
769
|
return /* @__PURE__ */ x(r, {
|
|
752
770
|
...e,
|
|
753
771
|
ref: t,
|
|
@@ -759,30 +777,30 @@ s.forwardRef((e, t) => {
|
|
|
759
777
|
}
|
|
760
778
|
});
|
|
761
779
|
});
|
|
762
|
-
function
|
|
780
|
+
function Y(e) {
|
|
763
781
|
return !!(typeof e == "function" && e.prototype && e.prototype.isReactComponent);
|
|
764
782
|
}
|
|
765
|
-
function
|
|
783
|
+
function X(e) {
|
|
766
784
|
return !(typeof e != "object" || !e.$$typeof || e.$$typeof.toString() !== "Symbol(react.forward_ref)" && e.$$typeof.description !== "react.forward_ref");
|
|
767
785
|
}
|
|
768
|
-
function
|
|
786
|
+
function at(e) {
|
|
769
787
|
return !(typeof e != "object" || !e.$$typeof || e.$$typeof.toString() !== "Symbol(react.memo)" && e.$$typeof.description !== "react.memo");
|
|
770
788
|
}
|
|
771
|
-
function
|
|
772
|
-
if (
|
|
773
|
-
if (
|
|
789
|
+
function ot(e) {
|
|
790
|
+
if (Y(e) || X(e)) return !0;
|
|
791
|
+
if (at(e)) {
|
|
774
792
|
let t = e.type;
|
|
775
|
-
if (t) return
|
|
793
|
+
if (t) return Y(t) || X(t);
|
|
776
794
|
}
|
|
777
795
|
return !1;
|
|
778
796
|
}
|
|
779
|
-
function
|
|
797
|
+
function st() {
|
|
780
798
|
try {
|
|
781
799
|
if (_) return parseInt(_.split(".")[0], 10) >= 19;
|
|
782
800
|
} catch {}
|
|
783
801
|
return !1;
|
|
784
802
|
}
|
|
785
|
-
var
|
|
803
|
+
var ct = class {
|
|
786
804
|
constructor(e, { editor: t, props: n = {}, as: r = "div", className: i = "" }) {
|
|
787
805
|
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 ? y(() => {
|
|
788
806
|
this.render();
|
|
@@ -793,7 +811,7 @@ var at = class {
|
|
|
793
811
|
render() {
|
|
794
812
|
var e;
|
|
795
813
|
if (this.destroyed) return;
|
|
796
|
-
let t = this.component, n = this.props, r = this.editor, i =
|
|
814
|
+
let t = this.component, n = this.props, r = this.editor, i = st(), a = ot(t), o = { ...n };
|
|
797
815
|
o.ref && !(i || a) && delete o.ref, !o.ref && (i || a) && (o.ref = (e) => {
|
|
798
816
|
this.ref = e;
|
|
799
817
|
}), this.reactElement = /* @__PURE__ */ x(t, { ...o }), r == null || (e = r.contentComponent) == null || e.setRenderer(this.id, this);
|
|
@@ -833,7 +851,7 @@ var Z = c({ get editor() {
|
|
|
833
851
|
throw Error("useTiptap must be used within a <Tiptap> provider");
|
|
834
852
|
} });
|
|
835
853
|
Z.displayName = "TiptapContext";
|
|
836
|
-
var
|
|
854
|
+
var lt = () => u(Z);
|
|
837
855
|
function Q({ children: e, ...t }) {
|
|
838
856
|
let n = "editor" in t ? t.editor : t.instance;
|
|
839
857
|
if (!n) throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");
|
|
@@ -848,7 +866,7 @@ function Q({ children: e, ...t }) {
|
|
|
848
866
|
}
|
|
849
867
|
Q.displayName = "Tiptap";
|
|
850
868
|
function $({ ...e }) {
|
|
851
|
-
let { editor: t } =
|
|
869
|
+
let { editor: t } = lt();
|
|
852
870
|
return /* @__PURE__ */ x(U, {
|
|
853
871
|
editor: t,
|
|
854
872
|
...e
|
|
@@ -856,4 +874,4 @@ function $({ ...e }) {
|
|
|
856
874
|
}
|
|
857
875
|
$.displayName = "Tiptap.Content", Object.assign(Q, { Content: $ });
|
|
858
876
|
//#endregion
|
|
859
|
-
export { W as a,
|
|
877
|
+
export { W as a, nt as i, ct as n, J as r, U as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as e } from "./dist-
|
|
1
|
+
import { f as e } from "./dist-B0QTAeBQ.js";
|
|
2
2
|
import { a as t, c as n, i as r, r as i } from "./floating-ui.dom-CmJ6iBdh.js";
|
|
3
3
|
import { Plugin as a, PluginKey as o } from "@tiptap/pm/state";
|
|
4
4
|
import { Decoration as s, DecorationSet as c } from "@tiptap/pm/view";
|
|
5
|
-
//#region node_modules/.pnpm/@tiptap+suggestion@3.
|
|
5
|
+
//#region node_modules/.pnpm/@tiptap+suggestion@3.32.0_@floating-ui+dom@1.8.0_@tiptap+core@3.32.0_@tiptap+pm@3.32.0__@tiptap+pm@3.32.0/node_modules/@tiptap/suggestion/dist/index.js
|
|
6
6
|
function l(t) {
|
|
7
7
|
let { char: n, allowSpaces: r, allowToIncludeChar: i, allowedPrefixes: a, startOfLine: o, $position: s } = t, c = r && !i, l = e(n), u = RegExp(`\\s${l}$`), d = o ? "^" : "", f = i ? "" : l, p = RegExp(c ? `${d}${l}.*?(?=\\s${f}|$)` : `${d}(?:^)?${l}[^\\s${f}]*`, "gm"), m = s.nodeBefore?.isText && s.nodeBefore.text;
|
|
8
8
|
if (!m) return null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e } from "./table-layout-
|
|
1
|
+
import { i as e } from "./table-layout-CARP38M-.js";
|
|
2
2
|
import { CALLOUT_VARIANTS as t } from "./components/Scribe/extension/callout.js";
|
|
3
3
|
import { EXTERNAL_LINK_PREVIEW_DISPLAYS as n } from "./components/Scribe/extension/external-link-preview/types.js";
|
|
4
4
|
//#region lib/document-node-capabilities.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./schema-extensions-
|
|
1
|
+
import { n as e, r as t, t as n } from "./schema-extensions-CROueYL8.js";
|
|
2
2
|
import r from "./components/Scribe/extension/extension-markdown-paste.js";
|
|
3
3
|
import { SlashCommand as i } from "./components/Scribe/extension/slashCommand/index.js";
|
|
4
4
|
import a from "./components/Scribe/extension/extension-selectedText.js";
|
|
@@ -7,7 +7,7 @@ import { getSlashCommandContext as s, getSuggestionItems as c } from "./componen
|
|
|
7
7
|
import l from "./components/Scribe/extension/emoji/suggest.js";
|
|
8
8
|
import { ScribeTableOfContents as u } from "./components/Scribe/extension/tableOfContents.js";
|
|
9
9
|
import { ExternalLinkPreview as d } from "./components/Scribe/extension/external-link-preview/index.js";
|
|
10
|
-
//#region node_modules/.pnpm/@tiptap+extension-focus@3.
|
|
10
|
+
//#region node_modules/.pnpm/@tiptap+extension-focus@3.32.0_@tiptap+extensions@3.32.0_@tiptap+core@3.32.0_@tiptap+pm@3.32.0__@tiptap+pm@3.32.0_/node_modules/@tiptap/extension-focus/dist/index.js
|
|
11
11
|
var f = e, p = t, m = (e) => {
|
|
12
12
|
let { items: t, render: m, ...h } = e.slashCommand ?? {}, g = n({ enableUndoRedo: e.enableUndoRedo });
|
|
13
13
|
return [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as e, R as t, b as n, d as r, g as i, h as a, i as o, n as s, o as c, p as l, r as u, u as d, y as f, z as p } from "./dist-
|
|
1
|
+
import { B as e, R as t, b as n, d as r, g as i, h as a, i as o, n as s, o as c, p as l, r as u, u as d, y as f, z as p } from "./dist-B0QTAeBQ.js";
|
|
2
2
|
import { Plugin as m, PluginKey as h } from "@tiptap/pm/state";
|
|
3
3
|
import { ReplaceStep as g } from "@tiptap/pm/transform";
|
|
4
4
|
import { isHistoryTransaction as _ } from "@tiptap/pm/history";
|
|
@@ -513,7 +513,7 @@ function wt(e, t = null, n = null) {
|
|
|
513
513
|
return a;
|
|
514
514
|
}
|
|
515
515
|
//#endregion
|
|
516
|
-
//#region node_modules/.pnpm/@tiptap+extension-link@3.
|
|
516
|
+
//#region node_modules/.pnpm/@tiptap+extension-link@3.32.0_@tiptap+core@3.32.0_@tiptap+pm@3.32.0__@tiptap+pm@3.32.0/node_modules/@tiptap/extension-link/dist/index.js
|
|
517
517
|
var Tt = "[\0- \xA0 -\u2029 ]", Et = new RegExp(Tt), Dt = RegExp(`${Tt}$`), Ot = RegExp(`${Tt}+$`), kt = new RegExp(Tt, "g");
|
|
518
518
|
function At(e, t, r) {
|
|
519
519
|
let i = e.doc.resolve(t.to);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeExternalLinkPreviewElement as e, normalizeExternalLinkPreviewsInTree as t } from "./components/Scribe/extension/external-link-preview/serialization.js";
|
|
2
|
-
import { t as n } from "./purify.es-
|
|
2
|
+
import { t as n } from "./purify.es-BpCmlcgS.js";
|
|
3
3
|
//#region node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.browser.es.js
|
|
4
4
|
function r(e) {
|
|
5
5
|
for (var t = 1; t < arguments.length; t++) {
|
package/dist/main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
5
|
-
import { t as c } from "./markdown-to-html-
|
|
4
|
+
import { t as s } from "./html-to-markdown-CsSZIegJ.js";
|
|
5
|
+
import { t as c } from "./markdown-to-html-YkhBwkrX.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";
|
|
8
8
|
import { SuggestionItemType as d } from "./components/Scribe/extension/slashCommand/items.js";
|