@fileverse-dev/ddoc 6.0.0 → 6.0.1-dist-slim.1
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/data-BCRDUrcS.mjs +59842 -0
- package/dist/{ddoc-persistence-C2ay3lLb.mjs → ddoc-persistence-DLdSviUr.mjs} +14 -13
- package/dist/headless-editor-utils.es.js +1 -1
- package/dist/index-BaWxoKsY.mjs +14053 -0
- package/dist/index.es.js +10746 -21538
- package/dist/markdown-source-pane-BJbpMXo2.mjs +143 -0
- package/dist/package/extensions/emoji/components/emoji-utils.d.ts +2 -2
- package/dist/persistence.es.js +1 -1
- package/dist/{split-view-toolbar-CbVFNI6B.mjs → split-view-toolbar-6aBSjsO2.mjs} +47 -46
- package/dist/tab-utils-BNFvrUAj.mjs +284 -0
- package/dist/use-headless-editor-BHUo3Yv-.mjs +43828 -0
- package/package.json +5 -2
- package/dist/index-D9uM5S2Y.mjs +0 -13126
- package/dist/markdown-source-pane-DWliRVLH.mjs +0 -6069
- package/dist/tab-utils-CAcIp-Dt.mjs +0 -313
- package/dist/use-headless-editor-C1g_Z67w.mjs +0 -161863
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fromUint8Array as _, toUint8Array as C } from "js-base64";
|
|
2
2
|
import * as m from "yjs";
|
|
3
|
+
import { S as I, A as $ } from "./tab-utils-BNFvrUAj.mjs";
|
|
3
4
|
const U = (e) => {
|
|
4
5
|
const r = [];
|
|
5
6
|
for (const [n, f] of e) {
|
|
@@ -32,7 +33,7 @@ const U = (e) => {
|
|
|
32
33
|
new TextEncoder().encode(N(e))
|
|
33
34
|
);
|
|
34
35
|
return _(new Uint8Array(r));
|
|
35
|
-
}, T = 8e3,
|
|
36
|
+
}, T = 8e3, W = "DdocStoreRepaired", h = "updates", P = "custom", B = (e) => e instanceof Error ? e : new Error(String(e)), E = (e, r, n) => ({
|
|
36
37
|
ddocId: e,
|
|
37
38
|
status: r,
|
|
38
39
|
encodedState: null,
|
|
@@ -122,10 +123,10 @@ const U = (e) => {
|
|
|
122
123
|
e,
|
|
123
124
|
"unavailable",
|
|
124
125
|
new Error("IndexedDB is unavailable")
|
|
125
|
-
) : await q(e, r) === !1 ? E(e, "missing") : F(e, r),
|
|
126
|
+
) : await q(e, r) === !1 ? E(e, "missing") : F(e, r), z = (e, r = {}) => K(
|
|
126
127
|
e,
|
|
127
128
|
r.timeoutMs ?? T
|
|
128
|
-
),
|
|
129
|
+
), G = (e, r, n = {}) => {
|
|
129
130
|
const f = n.timeoutMs ?? T, o = (s, u) => ({
|
|
130
131
|
...E(e, s, u),
|
|
131
132
|
changed: !1,
|
|
@@ -237,7 +238,7 @@ const U = (e) => {
|
|
|
237
238
|
} finally {
|
|
238
239
|
r.destroy();
|
|
239
240
|
}
|
|
240
|
-
},
|
|
241
|
+
}, J = async (e, r = {}) => {
|
|
241
242
|
const n = (o, t = 0, s) => ({
|
|
242
243
|
ddocId: e,
|
|
243
244
|
status: o,
|
|
@@ -308,7 +309,7 @@ const U = (e) => {
|
|
|
308
309
|
}
|
|
309
310
|
};
|
|
310
311
|
});
|
|
311
|
-
},
|
|
312
|
+
}, Q = (e, r = {}) => {
|
|
312
313
|
if (typeof indexedDB > "u")
|
|
313
314
|
return Promise.resolve({
|
|
314
315
|
ddocId: e,
|
|
@@ -351,7 +352,7 @@ const U = (e) => {
|
|
|
351
352
|
error: B(a.error ?? "dDoc IndexedDB delete failed")
|
|
352
353
|
});
|
|
353
354
|
});
|
|
354
|
-
},
|
|
355
|
+
}, X = async (e) => {
|
|
355
356
|
const r = new m.Doc();
|
|
356
357
|
try {
|
|
357
358
|
return m.applyUpdate(r, C(e)), await Y(r);
|
|
@@ -360,11 +361,11 @@ const U = (e) => {
|
|
|
360
361
|
}
|
|
361
362
|
};
|
|
362
363
|
export {
|
|
363
|
-
|
|
364
|
+
W as D,
|
|
364
365
|
T as a,
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
366
|
+
J as b,
|
|
367
|
+
Q as d,
|
|
368
|
+
X as g,
|
|
369
|
+
G as m,
|
|
370
|
+
z as r
|
|
370
371
|
};
|