@fileverse-dev/ddoc 3.0.45-patch-10 → 3.0.45-patch-12

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,4 +1,4 @@
1
- import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-SHe098tR.mjs";
1
+ import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-Dyk216n8.mjs";
2
2
  class S extends p {
3
3
  constructor({ callbackSelector: r, cause: a, data: n, extraData: i, sender: f, urls: t }) {
4
4
  var o;
@@ -94001,7 +94001,7 @@ async function EC(e, t) {
94001
94001
  });
94002
94002
  return ie === "0x" ? { data: void 0 } : { data: ie };
94003
94003
  } catch (B) {
94004
- const I = SJt(B), { offchainLookup: U, offchainLookupSignature: $ } = await import("./ccip-CV8ifNAW.mjs");
94004
+ const I = SJt(B), { offchainLookup: U, offchainLookupSignature: $ } = await import("./ccip-B_7Bxu3A.mjs");
94005
94005
  if (e.ccipRead !== !1 && (I == null ? void 0 : I.slice(0, 10)) === $ && x)
94006
94006
  return { data: await U(e, { data: I, to: x }) };
94007
94007
  throw _ && (I == null ? void 0 : I.slice(0, 10)) === "0x101bb98d" ? new lXt({ factory: f }) : y3e(B, {
@@ -251848,21 +251848,31 @@ const gk = (e = 32, t) => {
251848
251848
  o(p), a(h);
251849
251849
  }, [t, e]), Ie(() => {
251850
251850
  if (!e) return;
251851
- const { order: h, tabs: p, activeTab: g } = Bf(e), m = () => {
251852
- console.log("handing tab list");
251853
- const y = [];
251854
- h.toArray().forEach((b) => {
251855
- const v = p.get(b);
251856
- v && y.push({
251857
- id: b,
251858
- name: v.get("name"),
251859
- showOutline: v.get("showOutline"),
251860
- emoji: v.get("emoji")
251851
+ const { root: h, tabs: p, order: g } = Bf(e);
251852
+ let m = g;
251853
+ const y = () => {
251854
+ var F;
251855
+ const x = m;
251856
+ if (!x) return;
251857
+ const k = [];
251858
+ x.toArray().forEach((C) => {
251859
+ const D = p.get(C);
251860
+ D && k.push({
251861
+ id: C,
251862
+ name: D.get("name"),
251863
+ showOutline: D.get("showOutline"),
251864
+ emoji: D.get("emoji")
251861
251865
  });
251862
- }), a(y), o((g == null ? void 0 : g.toString()) || "");
251866
+ }), a(k), o(((F = h.get("activeTabId")) == null ? void 0 : F.toString()) || "");
251867
+ }, b = () => {
251868
+ m && m.unobserve(y), m = h.get("order"), m.observe(y);
251863
251869
  };
251864
- return console.log("order observed listener initialised"), h.observe(m), () => {
251865
- h.unobserve(m);
251870
+ y(), b();
251871
+ const v = () => {
251872
+ h.get("order") !== m && (b(), y());
251873
+ };
251874
+ return h.observe(v), () => {
251875
+ m == null || m.unobserve(y), h.unobserve(v);
251866
251876
  };
251867
251877
  }, [e]);
251868
251878
  const l = Be(() => {
@@ -251872,7 +251882,7 @@ const gk = (e = 32, t) => {
251872
251882
  if (!(g instanceof Li))
251873
251883
  throw new Error("Invalid ddocTabs.tabs");
251874
251884
  const y = mo(gk(), !0), b = {
251875
- name: `Tab ${i.length + 1}`,
251885
+ name: `Tab ${p.length + 1}`,
251876
251886
  showOutline: !0,
251877
251887
  emoji: null,
251878
251888
  id: y
@@ -251881,7 +251891,7 @@ const gk = (e = 32, t) => {
251881
251891
  const v = new Li();
251882
251892
  v.set("name", b.name), v.set("showOutline", b.showOutline), v.set("emoji", b.emoji), g.set(b.id, v), e.getXmlFragment(b.id), !n && m instanceof tl && (m.delete(0, m.length), m.insert(0, y)), p.push([b.id]);
251883
251893
  }), y;
251884
- }, [n, e, i]), u = Be(
251894
+ }, [n, e]), u = Be(
251885
251895
  (h) => {
251886
251896
  const { order: p, tabs: g, activeTab: m } = Bf(e);
251887
251897
  if (p.length <= 1)
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as d, E as r, P as s, R as a, h as t, u as i } from "./index-SHe098tR.mjs";
1
+ import { D as d, E as r, P as s, R as a, h as t, u as i } from "./index-Dyk216n8.mjs";
2
2
  export {
3
3
  d as DdocEditor,
4
4
  r as Editor,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "3.0.45-patch-10",
5
+ "version": "3.0.45-patch-12",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {