@fileverse-dev/ddoc 4.3.2 → 4.3.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.
@@ -10901,7 +10901,7 @@ function Qg(e, t) {
10901
10901
  function Sz(e) {
10902
10902
  return typeof e == "function";
10903
10903
  }
10904
- function Sn(e, t = void 0, ...n) {
10904
+ function Tn(e, t = void 0, ...n) {
10905
10905
  return Sz(e) ? t ? e.bind(t)(...n) : e(...n) : e;
10906
10906
  }
10907
10907
  function Mle(e = {}) {
@@ -11057,22 +11057,22 @@ function Ole(e, t) {
11057
11057
  };
11058
11058
  }, {}), h = XS({
11059
11059
  ...p,
11060
- content: Sn(Ct(u, "content", d)),
11061
- marks: Sn(Ct(u, "marks", d)),
11062
- group: Sn(Ct(u, "group", d)),
11063
- inline: Sn(Ct(u, "inline", d)),
11064
- atom: Sn(Ct(u, "atom", d)),
11065
- selectable: Sn(Ct(u, "selectable", d)),
11066
- draggable: Sn(Ct(u, "draggable", d)),
11067
- code: Sn(Ct(u, "code", d)),
11068
- whitespace: Sn(Ct(u, "whitespace", d)),
11069
- linebreakReplacement: Sn(
11060
+ content: Tn(Ct(u, "content", d)),
11061
+ marks: Tn(Ct(u, "marks", d)),
11062
+ group: Tn(Ct(u, "group", d)),
11063
+ inline: Tn(Ct(u, "inline", d)),
11064
+ atom: Tn(Ct(u, "atom", d)),
11065
+ selectable: Tn(Ct(u, "selectable", d)),
11066
+ draggable: Tn(Ct(u, "draggable", d)),
11067
+ code: Tn(Ct(u, "code", d)),
11068
+ whitespace: Tn(Ct(u, "whitespace", d)),
11069
+ linebreakReplacement: Tn(
11070
11070
  Ct(u, "linebreakReplacement", d)
11071
11071
  ),
11072
- defining: Sn(Ct(u, "defining", d)),
11073
- isolating: Sn(Ct(u, "isolating", d)),
11072
+ defining: Tn(Ct(u, "defining", d)),
11073
+ isolating: Tn(Ct(u, "isolating", d)),
11074
11074
  attrs: Object.fromEntries(c.map(YS))
11075
- }), f = Sn(Ct(u, "parseHTML", d));
11075
+ }), f = Tn(Ct(u, "parseHTML", d));
11076
11076
  f && (h.parseDOM = f.map(
11077
11077
  (b) => GS(b, c)
11078
11078
  ));
@@ -11099,13 +11099,13 @@ function Ole(e, t) {
11099
11099
  };
11100
11100
  }, {}), h = XS({
11101
11101
  ...p,
11102
- inclusive: Sn(Ct(u, "inclusive", d)),
11103
- excludes: Sn(Ct(u, "excludes", d)),
11104
- group: Sn(Ct(u, "group", d)),
11105
- spanning: Sn(Ct(u, "spanning", d)),
11106
- code: Sn(Ct(u, "code", d)),
11102
+ inclusive: Tn(Ct(u, "inclusive", d)),
11103
+ excludes: Tn(Ct(u, "excludes", d)),
11104
+ group: Tn(Ct(u, "group", d)),
11105
+ spanning: Tn(Ct(u, "spanning", d)),
11106
+ code: Tn(Ct(u, "code", d)),
11107
11107
  attrs: Object.fromEntries(c.map(YS))
11108
- }), f = Sn(Ct(u, "parseHTML", d));
11108
+ }), f = Tn(Ct(u, "parseHTML", d));
11109
11109
  f && (h.parseDOM = f.map(
11110
11110
  (m) => GS(m, c)
11111
11111
  ));
@@ -11333,7 +11333,7 @@ function JS(e, t) {
11333
11333
  name: r.name,
11334
11334
  options: r.options,
11335
11335
  storage: r.storage
11336
- }, i = Sn(Ct(r, "group", o));
11336
+ }, i = Tn(Ct(r, "group", o));
11337
11337
  return typeof i != "string" ? !1 : i.split(" ").includes("list");
11338
11338
  }
11339
11339
  function yv(e, {
@@ -11871,7 +11871,7 @@ var EE = class {
11871
11871
  }
11872
11872
  get options() {
11873
11873
  return {
11874
- ...Sn(
11874
+ ...Tn(
11875
11875
  Ct(this, "addOptions", {
11876
11876
  name: this.name
11877
11877
  })
@@ -11880,7 +11880,7 @@ var EE = class {
11880
11880
  }
11881
11881
  get storage() {
11882
11882
  return {
11883
- ...Sn(
11883
+ ...Tn(
11884
11884
  Ct(this, "addStorage", {
11885
11885
  name: this.name,
11886
11886
  options: this.options
@@ -12261,7 +12261,7 @@ var xv = class {
12261
12261
  editor: this.editor,
12262
12262
  type: tF(t.name, this.schema)
12263
12263
  };
12264
- t.type === "mark" && ((n = Sn(Ct(t, "keepOnSplit", r))) == null || n) && this.splittableMarks.push(t.name);
12264
+ t.type === "mark" && ((n = Tn(Ct(t, "keepOnSplit", r))) == null || n) && this.splittableMarks.push(t.name);
12265
12265
  const o = Ct(t, "onBeforeCreate", r), i = Ct(t, "onCreate", r), s = Ct(t, "onUpdate", r), a = Ct(
12266
12266
  t,
12267
12267
  "onSelectionUpdate",
@@ -13231,7 +13231,7 @@ function ep(e) {
13231
13231
  return new Oi({
13232
13232
  find: e.find,
13233
13233
  handler: ({ state: t, range: n, match: r }) => {
13234
- const o = Sn(e.getAttributes, void 0, r);
13234
+ const o = Tn(e.getAttributes, void 0, r);
13235
13235
  if (o === !1 || o === null)
13236
13236
  return null;
13237
13237
  const { tr: i } = t, s = r[r.length - 1], a = r[0];
@@ -13251,7 +13251,7 @@ function lD(e) {
13251
13251
  return new Oi({
13252
13252
  find: e.find,
13253
13253
  handler: ({ state: t, range: n, match: r }) => {
13254
- const o = Sn(e.getAttributes, void 0, r) || {}, { tr: i } = t, s = n.from;
13254
+ const o = Tn(e.getAttributes, void 0, r) || {}, { tr: i } = t, s = n.from;
13255
13255
  let a = n.to;
13256
13256
  const l = e.type.create(o);
13257
13257
  if (r[1]) {
@@ -13273,7 +13273,7 @@ function uD(e) {
13273
13273
  return new Oi({
13274
13274
  find: e.find,
13275
13275
  handler: ({ state: t, range: n, match: r }) => {
13276
- const o = t.doc.resolve(n.from), i = Sn(e.getAttributes, void 0, r) || {};
13276
+ const o = t.doc.resolve(n.from), i = Tn(e.getAttributes, void 0, r) || {};
13277
13277
  if (!o.node(-1).canReplaceWith(o.index(-1), o.indexAfter(-1), e.type))
13278
13278
  return null;
13279
13279
  t.tr.delete(n.from, n.to).setBlockType(n.from, n.from, e.type, i);
@@ -13302,7 +13302,7 @@ function Gh(e) {
13302
13302
  return new Oi({
13303
13303
  find: e.find,
13304
13304
  handler: ({ state: t, range: n, match: r, chain: o }) => {
13305
- const i = Sn(e.getAttributes, void 0, r) || {}, s = t.tr.delete(n.from, n.to), l = s.doc.resolve(n.from).blockRange(), u = l && J8(l, e.type, i);
13305
+ const i = Tn(e.getAttributes, void 0, r) || {}, s = t.tr.delete(n.from, n.to), l = s.doc.resolve(n.from).blockRange(), u = l && J8(l, e.type, i);
13306
13306
  if (!u)
13307
13307
  return null;
13308
13308
  if (s.wrap(l, u), e.keepMarks && e.editor) {
@@ -13837,7 +13837,7 @@ function bc(e) {
13837
13837
  return new aD({
13838
13838
  find: e.find,
13839
13839
  handler: ({ state: t, range: n, match: r, pasteEvent: o }) => {
13840
- const i = Sn(e.getAttributes, void 0, r, o);
13840
+ const i = Tn(e.getAttributes, void 0, r, o);
13841
13841
  if (i === !1 || i === null)
13842
13842
  return null;
13843
13843
  const { tr: s } = t, a = r[r.length - 1], l = r[0];
@@ -25268,7 +25268,7 @@ class T0e {
25268
25268
  return i;
25269
25269
  }
25270
25270
  }
25271
- const j0e = (e) => new T0e().digest(e), Bn = new Lt("y-sync"), Ys = new Lt("y-undo"), xd = new Lt("yjs-cursor"), B0e = (e) => {
25271
+ const j0e = (e) => new T0e().digest(e), Sn = new Lt("y-sync"), Ys = new Lt("y-undo"), xd = new Lt("yjs-cursor"), B0e = (e) => {
25272
25272
  for (let n = 6; n < e.length; n++)
25273
25273
  e[n % 6] = e[n % 6] ^ e[n];
25274
25274
  return e.slice(0, 6);
@@ -25297,11 +25297,11 @@ t.sv.get(e.id.client) > e.id.clock && !Of(t.ds, e.id), M0e = [{ light: "#ecd4443
25297
25297
  const a = new U0e(e, i), l = new kt({
25298
25298
  props: {
25299
25299
  editable: (u) => {
25300
- const c = Bn.getState(u);
25300
+ const c = Sn.getState(u);
25301
25301
  return c.snapshot == null && c.prevSnapshot == null;
25302
25302
  }
25303
25303
  },
25304
- key: Bn,
25304
+ key: Sn,
25305
25305
  state: {
25306
25306
  /**
25307
25307
  * @returns {any}
@@ -25320,7 +25320,7 @@ t.sv.get(e.id.client) > e.id.clock && !Of(t.ds, e.id), M0e = [{ light: "#ecd4443
25320
25320
  permanentUserData: r
25321
25321
  }),
25322
25322
  apply: (u, c) => {
25323
- const d = u.getMeta(Bn);
25323
+ const d = u.getMeta(Sn);
25324
25324
  if (d !== void 0) {
25325
25325
  c = Object.assign({}, c);
25326
25326
  for (const p in d)
@@ -25359,7 +25359,7 @@ t.sv.get(e.id.client) > e.id.clock && !Of(t.ds, e.id), M0e = [{ light: "#ecd4443
25359
25359
  a.mux(() => {
25360
25360
  c.doc.transact((d) => {
25361
25361
  d.meta.set("addToHistory", c.addToHistory), a._prosemirrorChanged(u.state.doc);
25362
- }, Bn);
25362
+ }, Sn);
25363
25363
  });
25364
25364
  }
25365
25365
  },
@@ -25456,7 +25456,7 @@ class U0e {
25456
25456
  */
25457
25457
  renderSnapshot(t, n) {
25458
25458
  n || (n = kH(bH(), /* @__PURE__ */ new Map())), this.prosemirrorView.dispatch(
25459
- this._tr.setMeta(Bn, { snapshot: t, prevSnapshot: n })
25459
+ this._tr.setMeta(Sn, { snapshot: t, prevSnapshot: n })
25460
25460
  );
25461
25461
  }
25462
25462
  unrenderSnapshot() {
@@ -25473,7 +25473,7 @@ class U0e {
25473
25473
  this.prosemirrorView.state.doc.content.size,
25474
25474
  new it(Pe.from(t), 0, 0)
25475
25475
  );
25476
- n.setMeta(Bn, { snapshot: null, prevSnapshot: null }), this.prosemirrorView.dispatch(n);
25476
+ n.setMeta(Sn, { snapshot: null, prevSnapshot: null }), this.prosemirrorView.dispatch(n);
25477
25477
  });
25478
25478
  }
25479
25479
  _forceRerender() {
@@ -25495,7 +25495,7 @@ class U0e {
25495
25495
  r.setSelection(st.create(r.doc, o, i));
25496
25496
  }
25497
25497
  this.prosemirrorView.dispatch(
25498
- r.setMeta(Bn, { isChangeOrigin: !0, binding: this })
25498
+ r.setMeta(Sn, { isChangeOrigin: !0, binding: this })
25499
25499
  );
25500
25500
  });
25501
25501
  }
@@ -25556,9 +25556,9 @@ class U0e {
25556
25556
  new it(Pe.from(u), 0, 0)
25557
25557
  );
25558
25558
  this.prosemirrorView.dispatch(
25559
- c.setMeta(Bn, { isChangeOrigin: !0 })
25559
+ c.setMeta(Sn, { isChangeOrigin: !0 })
25560
25560
  );
25561
- }, Bn);
25561
+ }, Sn);
25562
25562
  });
25563
25563
  }
25564
25564
  /**
@@ -25567,7 +25567,7 @@ class U0e {
25567
25567
  */
25568
25568
  _typeChanged(t, n) {
25569
25569
  if (this.prosemirrorView == null) return;
25570
- const r = Bn.getState(this.prosemirrorView.state);
25570
+ const r = Sn.getState(this.prosemirrorView.state);
25571
25571
  if (t.length === 0 || r.snapshot != null || r.prevSnapshot != null) {
25572
25572
  this.renderSnapshot(r.snapshot, r.prevSnapshot);
25573
25573
  return;
@@ -25601,7 +25601,7 @@ class U0e {
25601
25601
  this.prosemirrorView.state.doc.content.size,
25602
25602
  new it(Pe.from(i), 0, 0)
25603
25603
  );
25604
- R0e(s, this.beforeTransactionSelection, this), s = s.setMeta(Bn, { isChangeOrigin: !0, isUndoRedoOperation: n.origin instanceof SH }), this.beforeTransactionSelection !== null && this._isLocalCursorInView() && s.scrollIntoView(), this.prosemirrorView.dispatch(s);
25604
+ R0e(s, this.beforeTransactionSelection, this), s = s.setMeta(Sn, { isChangeOrigin: !0, isUndoRedoOperation: n.origin instanceof SH }), this.beforeTransactionSelection !== null && this._isLocalCursorInView() && s.scrollIntoView(), this.prosemirrorView.dispatch(s);
25605
25605
  });
25606
25606
  }
25607
25607
  /**
@@ -25613,7 +25613,7 @@ class U0e {
25613
25613
  this,
25614
25614
  this.prosemirrorView.state
25615
25615
  );
25616
- }, Bn);
25616
+ }, Sn);
25617
25617
  }
25618
25618
  /**
25619
25619
  * View is ready to listen to changes. Register observers.
@@ -25706,7 +25706,7 @@ const eW = (e, t, n, r, o, i) => {
25706
25706
  } catch {
25707
25707
  return e.doc.transact((u) => {
25708
25708
  e._item.delete(u);
25709
- }, Bn), n.mapping.delete(e), null;
25709
+ }, Sn), n.mapping.delete(e), null;
25710
25710
  }
25711
25711
  }, P0e = (e, t, n, r, o, i) => {
25712
25712
  const s = [], a = e.toDelta(r, o, i);
@@ -25718,7 +25718,7 @@ const eW = (e, t, n, r, o, i) => {
25718
25718
  } catch {
25719
25719
  return e.doc.transact((u) => {
25720
25720
  e._item.delete(u);
25721
- }, Bn), null;
25721
+ }, Sn), null;
25722
25722
  }
25723
25723
  return s;
25724
25724
  }, z0e = (e, t) => {
@@ -25926,7 +25926,7 @@ const eW = (e, t, n, r, o, i) => {
25926
25926
  p.push(MD(o[h], r));
25927
25927
  t.insert(u, p);
25928
25928
  }
25929
- }, Bn);
25929
+ }, Sn);
25930
25930
  }, OD = (e, t) => !(t instanceof Array) && e.nodeName === t.type.name;
25931
25931
  let h1 = null;
25932
25932
  const K0e = () => {
@@ -25935,7 +25935,7 @@ const K0e = () => {
25935
25935
  h1
25936
25936
  );
25937
25937
  h1 = null, e.forEach((t, n) => {
25938
- const r = n.state.tr, o = Bn.getState(n.state);
25938
+ const r = n.state.tr, o = Sn.getState(n.state);
25939
25939
  o && o.binding && !o.binding.isDestroyed && (t.forEach((i, s) => {
25940
25940
  r.setMeta(s, i);
25941
25941
  }), n.dispatch(r));
@@ -26098,7 +26098,7 @@ const Z0e = (e, t, n) => e !== t, J0e = (e) => {
26098
26098
  style: `background-color: ${e.color}70`,
26099
26099
  class: "ProseMirror-yjs-selection"
26100
26100
  }), e1e = /^#[0-9a-fA-F]{6}$/, dj = (e, t, n, r, o) => {
26101
- const i = Bn.getState(e), s = i.doc, a = [];
26101
+ const i = Sn.getState(e), s = i.doc, a = [];
26102
26102
  return i.snapshot != null || i.prevSnapshot != null || i.binding.mapping.size === 0 ? Kt.create(e.doc, []) : (t.getStates().forEach((l, u) => {
26103
26103
  if (n(s.clientID, u, l) && l.cursor != null) {
26104
26104
  const c = l.user || {};
@@ -26150,7 +26150,7 @@ const Z0e = (e, t, n) => e !== t, J0e = (e) => {
26150
26150
  );
26151
26151
  },
26152
26152
  apply(s, a, l, u) {
26153
- const c = Bn.getState(u), d = s.getMeta(xd);
26153
+ const c = Sn.getState(u), d = s.getMeta(xd);
26154
26154
  return c && c.isChangeOrigin || d && d.awarenessUpdated ? dj(
26155
26155
  u,
26156
26156
  e,
@@ -26167,7 +26167,7 @@ const Z0e = (e, t, n) => e !== t, J0e = (e) => {
26167
26167
  const a = () => {
26168
26168
  s.docView && G0e(s, xd, { awarenessUpdated: !0 });
26169
26169
  }, l = () => {
26170
- const u = Bn.getState(s.state), c = e.getLocalState() || {};
26170
+ const u = Sn.getState(s.state), c = e.getLocalState() || {};
26171
26171
  if (s.hasFocus()) {
26172
26172
  const d = o(s.state), p = sp(
26173
26173
  d.anchor,
@@ -26214,8 +26214,8 @@ const Z0e = (e, t, n) => e !== t, J0e = (e) => {
26214
26214
  key: Ys,
26215
26215
  state: {
26216
26216
  init: (r, o) => {
26217
- const i = Bn.getState(o), s = n || new SH(i.type, {
26218
- trackedOrigins: new Set([Bn].concat(t)),
26217
+ const i = Sn.getState(o), s = n || new SH(i.type, {
26218
+ trackedOrigins: new Set([Sn].concat(t)),
26219
26219
  deleteFilter: (a) => i1e(a, e),
26220
26220
  captureTransaction: (a) => a.meta.get("addToHistory") !== !1
26221
26221
  });
@@ -26230,7 +26230,7 @@ const Z0e = (e, t, n) => e !== t, J0e = (e) => {
26230
26230
  * @returns {any}
26231
26231
  */
26232
26232
  apply: (r, o, i, s) => {
26233
- const a = Bn.getState(s).binding, l = o.undoManager, u = l.undoStack.length > 0, c = l.redoStack.length > 0;
26233
+ const a = Sn.getState(s).binding, l = o.undoManager, u = l.undoStack.length > 0, c = l.redoStack.length > 0;
26234
26234
  return a ? {
26235
26235
  undoManager: l,
26236
26236
  prevSel: ND(a, i),
@@ -26243,7 +26243,7 @@ const Z0e = (e, t, n) => e !== t, J0e = (e) => {
26243
26243
  }
26244
26244
  },
26245
26245
  view: (r) => {
26246
- const o = Bn.getState(r.state), i = Ys.getState(r.state).undoManager;
26246
+ const o = Sn.getState(r.state), i = Ys.getState(r.state).undoManager;
26247
26247
  return i.on("stack-item-added", ({ stackItem: s }) => {
26248
26248
  const a = o.binding;
26249
26249
  a && s.meta.set(a, Ys.getState(r.state).prevSel);
@@ -26258,7 +26258,7 @@ const Z0e = (e, t, n) => e !== t, J0e = (e) => {
26258
26258
  }
26259
26259
  }), Ld = new Lt("commentDecoration");
26260
26260
  function zs(e, t) {
26261
- const n = Bn.getState(t);
26261
+ const n = Sn.getState(t);
26262
26262
  if (!(n != null && n.binding))
26263
26263
  return null;
26264
26264
  const r = t.doc.content.size, { doc: o, type: i, binding: s } = n;
@@ -26280,7 +26280,7 @@ function zs(e, t) {
26280
26280
  }
26281
26281
  }
26282
26282
  function Rc(e, t) {
26283
- const n = Bn.getState(t);
26283
+ const n = Sn.getState(t);
26284
26284
  if (!(n != null && n.binding)) return null;
26285
26285
  const { doc: r, type: o, binding: i } = n;
26286
26286
  try {
@@ -26339,7 +26339,7 @@ function u1e(e, t) {
26339
26339
  );
26340
26340
  }
26341
26341
  function iW(e, t, n) {
26342
- const r = Bn.getState(e);
26342
+ const r = Sn.getState(e);
26343
26343
  if (!(r != null && r.binding) || t >= n)
26344
26344
  return null;
26345
26345
  const { type: o, binding: i } = r;
@@ -26454,7 +26454,7 @@ function x1e(e, t, n) {
26454
26454
  }
26455
26455
  const pj = (e, t, n) => () => x1e(e, t, n);
26456
26456
  function hj(e, t, n, r) {
26457
- const o = Bn.getState(t);
26457
+ const o = Sn.getState(t);
26458
26458
  if (!(o != null && o.binding))
26459
26459
  return Kt.empty;
26460
26460
  const i = [];
@@ -26574,14 +26574,16 @@ const v1e = Et.create({
26574
26574
  };
26575
26575
  },
26576
26576
  apply(n, r, o, i) {
26577
- if (n.docChanged || n.getMeta(Ld)) {
26578
- const s = n.docChanged ? null : r.decorations;
26577
+ var a;
26578
+ const s = !!((a = n.getMeta(Sn)) != null && a.isChangeOrigin);
26579
+ if (n.getMeta(Ld) || n.docChanged && s) {
26580
+ const l = n.docChanged ? null : r.decorations;
26579
26581
  return {
26580
26582
  decorations: hj(
26581
26583
  e(),
26582
26584
  i,
26583
26585
  t(),
26584
- s
26586
+ l
26585
26587
  )
26586
26588
  };
26587
26589
  }
@@ -26604,7 +26606,7 @@ function Cb(e, t, n) {
26604
26606
  return iW(e.state, t, n);
26605
26607
  }
26606
26608
  function F1e(e, t) {
26607
- const n = Bn.getState(e.state);
26609
+ const n = Sn.getState(e.state);
26608
26610
  if (!(n != null && n.binding)) return null;
26609
26611
  const { type: r, binding: o } = n;
26610
26612
  try {
@@ -26652,7 +26654,7 @@ function D1e(e, t, n) {
26652
26654
  }
26653
26655
  function k1e(e, t) {
26654
26656
  if (!t.isSuggestion) return !1;
26655
- const n = e.state, r = Bn.getState(n);
26657
+ const n = e.state, r = Sn.getState(n);
26656
26658
  if (!(r != null && r.binding)) return !1;
26657
26659
  const { doc: o, type: i, binding: s } = r;
26658
26660
  try {
@@ -63369,7 +63371,7 @@ var fG = Et.create({
63369
63371
  storage: e.storage
63370
63372
  };
63371
63373
  return {
63372
- allowGapCursor: (t = Sn(Ct(e, "allowGapCursor", n))) != null ? t : null
63374
+ allowGapCursor: (t = Tn(Ct(e, "allowGapCursor", n))) != null ? t : null
63373
63375
  };
63374
63376
  }
63375
63377
  }), K5e = Et.create({
@@ -67243,7 +67245,7 @@ const gEe = Gt.create({
67243
67245
  storage: e.storage
67244
67246
  };
67245
67247
  return {
67246
- tableRole: Sn(
67248
+ tableRole: Tn(
67247
67249
  Ct(e, "tableRole", t)
67248
67250
  )
67249
67251
  };
@@ -92916,7 +92918,7 @@ function RUe(e, t) {
92916
92918
  if (!(e instanceof t))
92917
92919
  throw new TypeError("Cannot call a class as a function");
92918
92920
  }
92919
- var Tn = function() {
92921
+ var jn = function() {
92920
92922
  function e(t) {
92921
92923
  var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
92922
92924
  RUe(this, e), this.type = t, this.value = n, this.name = null;
@@ -92936,40 +92938,40 @@ var Tn = function() {
92936
92938
  }
92937
92939
  }]), e;
92938
92940
  }();
92939
- Tn.TYPE_LPAREN = "LPAREN";
92940
- Tn.TYPE_RPAREN = "RPAREN";
92941
- Tn.TYPE_PLUS = "PLUS";
92942
- Tn.TYPE_MINUS = "MINUS";
92943
- Tn.TYPE_TIMES = "TIMES";
92944
- Tn.TYPE_DIVIDE = "DIVIDE";
92945
- Tn.TYPE_COMMAND = "COMMAND";
92946
- Tn.TYPE_SYMBOL = "SYMBOL";
92947
- Tn.TYPE_WHITESPACE = "WHITESPACE";
92948
- Tn.TYPE_ABS = "ABSOLUTEVAL";
92949
- Tn.TYPE_BANG = "BANG";
92950
- Tn.TYPE_COMMA = "COMMA";
92951
- Tn.TYPE_POWER = "POWER";
92952
- Tn.TYPE_NUMBER = "NUMBER";
92953
- Tn.patterns = /* @__PURE__ */ new Map([
92954
- [Tn.TYPE_LPAREN, /(\(|\[|{|\\left\(|\\left\[)/],
92941
+ jn.TYPE_LPAREN = "LPAREN";
92942
+ jn.TYPE_RPAREN = "RPAREN";
92943
+ jn.TYPE_PLUS = "PLUS";
92944
+ jn.TYPE_MINUS = "MINUS";
92945
+ jn.TYPE_TIMES = "TIMES";
92946
+ jn.TYPE_DIVIDE = "DIVIDE";
92947
+ jn.TYPE_COMMAND = "COMMAND";
92948
+ jn.TYPE_SYMBOL = "SYMBOL";
92949
+ jn.TYPE_WHITESPACE = "WHITESPACE";
92950
+ jn.TYPE_ABS = "ABSOLUTEVAL";
92951
+ jn.TYPE_BANG = "BANG";
92952
+ jn.TYPE_COMMA = "COMMA";
92953
+ jn.TYPE_POWER = "POWER";
92954
+ jn.TYPE_NUMBER = "NUMBER";
92955
+ jn.patterns = /* @__PURE__ */ new Map([
92956
+ [jn.TYPE_LPAREN, /(\(|\[|{|\\left\(|\\left\[)/],
92955
92957
  // Match (, [, {, \left(, \left[
92956
- [Tn.TYPE_RPAREN, /(\)|]|}|\\right\)|\\right])/],
92958
+ [jn.TYPE_RPAREN, /(\)|]|}|\\right\)|\\right])/],
92957
92959
  // Match ), ], }, \right), \right]
92958
- [Tn.TYPE_PLUS, /\+/],
92959
- [Tn.TYPE_MINUS, /-/],
92960
- [Tn.TYPE_TIMES, /\*/],
92961
- [Tn.TYPE_DIVIDE, /\//],
92962
- [Tn.TYPE_COMMAND, /\\[A-Za-z]+/],
92963
- [Tn.TYPE_SYMBOL, /[A-Za-z_][A-Za-z_0-9]*/],
92964
- [Tn.TYPE_WHITESPACE, /\s+/],
92960
+ [jn.TYPE_PLUS, /\+/],
92961
+ [jn.TYPE_MINUS, /-/],
92962
+ [jn.TYPE_TIMES, /\*/],
92963
+ [jn.TYPE_DIVIDE, /\//],
92964
+ [jn.TYPE_COMMAND, /\\[A-Za-z]+/],
92965
+ [jn.TYPE_SYMBOL, /[A-Za-z_][A-Za-z_0-9]*/],
92966
+ [jn.TYPE_WHITESPACE, /\s+/],
92965
92967
  // Whitespace
92966
- [Tn.TYPE_ABS, /\|/],
92967
- [Tn.TYPE_BANG, /!/],
92968
- [Tn.TYPE_COMMA, /,/],
92969
- [Tn.TYPE_POWER, /\^/],
92970
- [Tn.TYPE_NUMBER, /\d+(\.\d+)?/]
92968
+ [jn.TYPE_ABS, /\|/],
92969
+ [jn.TYPE_BANG, /!/],
92970
+ [jn.TYPE_COMMA, /,/],
92971
+ [jn.TYPE_POWER, /\^/],
92972
+ [jn.TYPE_NUMBER, /\d+(\.\d+)?/]
92971
92973
  ]);
92972
- Lm.default = Tn;
92974
+ Lm.default = jn;
92973
92975
  var LUe = ["TPLUS", "TMINUS", "TTIMES", "TDIVIDE", "TWS", "TABS", "TBANG", "TCOMMA", "TPOWER"], g4 = {};
92974
92976
  Object.defineProperty(g4, "__esModule", {
92975
92977
  value: !0
@@ -172633,7 +172635,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
172633
172635
  }, $We = (e) => {
172634
172636
  var t;
172635
172637
  try {
172636
- return ((t = Bn.getState(e.state)) == null ? void 0 : t.binding) ?? null;
172638
+ return ((t = Sn.getState(e.state)) == null ? void 0 : t.binding) ?? null;
172637
172639
  } catch {
172638
172640
  return null;
172639
172641
  }
@@ -180455,7 +180457,7 @@ function EXe(e) {
180455
180457
  return t.clean(), n;
180456
180458
  }
180457
180459
  const rU = 32;
180458
- function jn(e) {
180460
+ function Bn(e) {
180459
180461
  const t = new Float64Array(16);
180460
180462
  if (e)
180461
180463
  for (let n = 0; n < e.length; n++)
@@ -180464,8 +180466,8 @@ function jn(e) {
180464
180466
  }
180465
180467
  const CXe = new Uint8Array(32);
180466
180468
  CXe[0] = 9;
180467
- const oU = jn(), M8 = jn([1]);
180468
- jn([
180469
+ const oU = Bn(), M8 = Bn([1]);
180470
+ Bn([
180469
180471
  30883,
180470
180472
  4953,
180471
180473
  19914,
@@ -180483,7 +180485,7 @@ jn([
180483
180485
  27886,
180484
180486
  20995
180485
180487
  ]);
180486
- const AXe = jn([
180488
+ const AXe = Bn([
180487
180489
  61785,
180488
180490
  9906,
180489
180491
  39828,
@@ -180500,7 +180502,7 @@ const AXe = jn([
180500
180502
  22239,
180501
180503
  55772,
180502
180504
  9222
180503
- ]), iU = jn([
180505
+ ]), iU = Bn([
180504
180506
  54554,
180505
180507
  36645,
180506
180508
  11616,
@@ -180517,7 +180519,7 @@ const AXe = jn([
180517
180519
  52590,
180518
180520
  14035,
180519
180521
  8553
180520
- ]), sU = jn([
180522
+ ]), sU = Bn([
180521
180523
  26200,
180522
180524
  26214,
180523
180525
  26214,
@@ -180535,7 +180537,7 @@ const AXe = jn([
180535
180537
  26214,
180536
180538
  26214
180537
180539
  ]);
180538
- jn([
180540
+ Bn([
180539
180541
  41136,
180540
180542
  18958,
180541
180543
  6951,
@@ -180573,7 +180575,7 @@ function dne(e, t, n) {
180573
180575
  }
180574
180576
  }
180575
180577
  function pne(e, t) {
180576
- const n = jn(), r = jn();
180578
+ const n = Bn(), r = Bn();
180577
180579
  for (let o = 0; o < 16; o++)
180578
180580
  r[o] = t[o];
180579
180581
  F5(r), F5(r), F5(r);
@@ -180608,7 +180610,7 @@ function SXe(e, t) {
180608
180610
  li(e, t, t);
180609
180611
  }
180610
180612
  function TXe(e, t) {
180611
- const n = jn();
180613
+ const n = Bn();
180612
180614
  let r;
180613
180615
  for (r = 0; r < 16; r++)
180614
180616
  n[r] = t[r];
@@ -180618,7 +180620,7 @@ function TXe(e, t) {
180618
180620
  e[r] = n[r];
180619
180621
  }
180620
180622
  function aU(e, t) {
180621
- const n = jn(), r = jn(), o = jn(), i = jn(), s = jn(), a = jn(), l = jn(), u = jn(), c = jn();
180623
+ const n = Bn(), r = Bn(), o = Bn(), i = Bn(), s = Bn(), a = Bn(), l = Bn(), u = Bn(), c = Bn();
180622
180624
  db(n, e[1], e[0]), db(c, t[1], t[0]), li(n, n, c), z0(r, e[0], e[1]), z0(c, t[0], t[1]), li(r, r, c), li(o, e[3], t[3]), li(o, o, AXe), li(i, e[2], t[2]), z0(i, i, i), db(s, r, n), db(a, i, o), z0(l, i, o), z0(u, r, n), li(e[0], s, a), li(e[1], u, l), li(e[2], l, a), li(e[3], s, u);
180623
180625
  }
180624
180626
  function lU(e, t, n) {
@@ -180626,7 +180628,7 @@ function lU(e, t, n) {
180626
180628
  dne(e[r], t[r], n);
180627
180629
  }
180628
180630
  function jXe(e, t) {
180629
- const n = jn(), r = jn(), o = jn();
180631
+ const n = Bn(), r = Bn(), o = Bn();
180630
180632
  TXe(o, t[2]), li(n, t[0], o), li(r, t[1], o), pne(e, r), e[31] ^= _Xe(n) << 7;
180631
180633
  }
180632
180634
  function BXe(e, t, n) {
@@ -180637,7 +180639,7 @@ function BXe(e, t, n) {
180637
180639
  }
180638
180640
  }
180639
180641
  function NXe(e, t) {
180640
- const n = [jn(), jn(), jn(), jn()];
180642
+ const n = [Bn(), Bn(), Bn(), Bn()];
180641
180643
  Cd(n[0], iU), Cd(n[1], sU), Cd(n[2], M8), li(n[3], iU, sU), BXe(e, n, t);
180642
180644
  }
180643
180645
  function w5(e) {
@@ -180645,7 +180647,7 @@ function w5(e) {
180645
180647
  throw new Error(`ed25519: seed must be ${rU} bytes`);
180646
180648
  const t = EXe(e);
180647
180649
  t[0] &= 248, t[31] &= 127, t[31] |= 64;
180648
- const n = new Uint8Array(32), r = [jn(), jn(), jn(), jn()];
180650
+ const n = new Uint8Array(32), r = [Bn(), Bn(), Bn(), Bn()];
180649
180651
  NXe(r, t), jXe(n, r);
180650
180652
  const o = new Uint8Array(64);
180651
180653
  return o.set(e), o.set(n, 32), {
@@ -194825,7 +194827,7 @@ const lQe = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], uQe = aQe("Chevro
194825
194827
  ),
194826
194828
  t && /* @__PURE__ */ x.jsx("pre", { className: "m-0 px-3 pb-2 text-[11px] leading-relaxed font-mono color-text-secondary whitespace-pre-wrap break-words max-h-40 overflow-auto select-text", children: r })
194827
194829
  ] }) : null;
194828
- }, dQe = $U(() => import("./markdown-source-pane-BRBUsIrK.mjs")), pQe = $U(() => import("./split-view-toolbar-BbY-K-SL.mjs")), hQe = ({
194830
+ }, dQe = $U(() => import("./markdown-source-pane-DVGGHdZt.mjs")), pQe = $U(() => import("./split-view-toolbar-CAF33rNn.mjs")), hQe = ({
194829
194831
  markdown: e,
194830
194832
  onMarkdownChange: t,
194831
194833
  ipfsImageUploadFn: n,
@@ -1,4 +1,4 @@
1
- import { k as Ql, b as Zl, s as eh } from "./index-BfGoFAtY.mjs";
1
+ import { k as Ql, b as Zl, s as eh } from "./index-OMWkDiQy.mjs";
2
2
  let An = [], Xr = [];
3
3
  (() => {
4
4
  let s = "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e) => e ? parseInt(e, 36) : 1);
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as a, a as o, E as t, P as d, f as r, i, g as n, l as m, h as E, m as c, e as l, n as p, c as u, d as C, u as f, v as D } from "./index-BfGoFAtY.mjs";
1
+ import { D as a, a as o, E as t, P as d, f as r, i, g as n, l as m, h as E, m as c, e as l, n as p, c as u, d as C, u as f, v as D } from "./index-OMWkDiQy.mjs";
2
2
  export {
3
3
  a as DdocEditor,
4
4
  o as DdocExportModal,
@@ -1,9 +1,9 @@
1
1
  var Vr = Object.defineProperty;
2
2
  var Wr = (t, e, O) => e in t ? Vr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: O }) : t[e] = O;
3
3
  var gt = (t, e, O) => Wr(t, typeof e != "symbol" ? e + "" : e, O);
4
- import { j as Cr } from "./index-BfGoFAtY.mjs";
4
+ import { j as Cr } from "./index-OMWkDiQy.mjs";
5
5
  import { useRef as pe, useEffect as St } from "react";
6
- import { s as y, A as pO, T as dO, a as Gr, S as et, b as Lr, P as fO, E as j, i as QO, c as _, D as le, k as tt, F as Ar, M as Pt, W as Er, R as Ur, d as mO, N as oe, e as V, f as Mr, g as Ot, h as ce, p as $O, j as Y, t as h, l as Ir, I as rt, L as at, m as ye, n as ue, o as Qe, q as gO, r as te, u as SO, v as Br, w as Nr, x as PO, y as kO, z as Dr, B as Fr, C as Kr, G as Oe, H as ZO, J as Jr, K as kt, O as Hr, Q as ea, U as ta, V as Oa, X as ra, Y as aa, Z as ia, _ as sa, $ as na, a0 as la, a1 as oa, a2 as ca } from "./index-QOk91-co.mjs";
6
+ import { s as y, A as pO, T as dO, a as Gr, S as et, b as Lr, P as fO, E as j, i as QO, c as _, D as le, k as tt, F as Ar, M as Pt, W as Er, R as Ur, d as mO, N as oe, e as V, f as Mr, g as Ot, h as ce, p as $O, j as Y, t as h, l as Ir, I as rt, L as at, m as ye, n as ue, o as Qe, q as gO, r as te, u as SO, v as Br, w as Nr, x as PO, y as kO, z as Dr, B as Fr, C as Kr, G as Oe, H as ZO, J as Jr, K as kt, O as Hr, Q as ea, U as ta, V as Oa, X as ra, Y as aa, Z as ia, _ as sa, $ as na, a0 as la, a1 as oa, a2 as ca } from "./index-WQ6WhhB-.mjs";
7
7
  class ua {
8
8
  /**
9
9
  Create a new completion context. (Mostly useful for testing
@@ -1,7 +1,7 @@
1
- import { j as d } from "./index-BfGoFAtY.mjs";
1
+ import { j as d } from "./index-OMWkDiQy.mjs";
2
2
  import { useRef as I, useState as N, useEffect as D } from "react";
3
3
  import { DynamicDropdown as E, Tooltip as R, IconButton as O } from "@fileverse/ui";
4
- import { a3 as A, a4 as P, c as y } from "./index-QOk91-co.mjs";
4
+ import { a3 as A, a4 as P, c as y } from "./index-WQ6WhhB-.mjs";
5
5
  const p = (e, t, o = t) => {
6
6
  const { state: s } = e, l = s.changeByRange((n) => {
7
7
  const u = s.sliceDoc(n.from, n.to), r = s.sliceDoc(
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "4.3.2",
5
+ "version": "4.3.3",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -166,4 +166,4 @@
166
166
  "vite": "^5.0.0",
167
167
  "vitest": "^2.1.0"
168
168
  }
169
- }
169
+ }
@@ -1,9 +0,0 @@
1
- import { Editor } from '@tiptap/react';
2
-
3
- /**
4
- * Shared jsdom editor factory for unit tests (use-editor-commands.test.tsx,
5
- * selection-utils.test.ts, ...). Collaboration owns the doc, so content must
6
- * be set via `setContent` *after* construction — passing `content` to the
7
- * `Editor` constructor is silently ignored once Collaboration is configured.
8
- */
9
- export declare const makeEditor: (content?: string) => Editor;