@fileverse-dev/ddoc 6.0.1 → 6.0.3

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,5 +1,6 @@
1
- import { f as _, S as I, A as $, t as C } from "./tab-utils-CAcIp-Dt.mjs";
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, H = "DdocStoreRepaired", h = "updates", P = "custom", B = (e) => e instanceof Error ? e : new Error(String(e)), E = (e, r, n) => ({
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), W = (e, r = {}) => K(
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
- ), z = (e, r, n = {}) => {
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
- }, G = async (e, r = {}) => {
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
- }, J = (e, r = {}) => {
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
- }, Q = async (e) => {
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
- H as D,
364
+ W as D,
364
365
  T as a,
365
- G as b,
366
- J as d,
367
- Q as g,
368
- z as m,
369
- W as r
366
+ J as b,
367
+ Q as d,
368
+ X as g,
369
+ G as m,
370
+ z as r
370
371
  };
@@ -1,4 +1,4 @@
1
- import { c as s } from "./use-headless-editor-BIcZNvlS.mjs";
1
+ import { c as s } from "./use-headless-editor-CjWKprQH.mjs";
2
2
  const n = (e) => {
3
3
  const { getYjsConvertor: t, mergeYjsUpdates: r } = s(e);
4
4
  return { getYjsConvertor: t, mergeYjsUpdates: r };