@ws-ui/store 0.0.5 → 0.0.7

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/index.es.js CHANGED
@@ -18951,7 +18951,10 @@ const $j = new Vx(), S4 = () => Ax(), ri = ZN, Yx = de(
18951
18951
  }
18952
18952
  }), Lj = de(
18953
18953
  (e) => e,
18954
- (e) => e.sharedDatasources.sources
18954
+ (e) => {
18955
+ var n;
18956
+ return ((n = e.sharedDatasources) == null ? void 0 : n.sources) || [];
18957
+ }
18955
18958
  ), P4 = (e, n, r, a) => de(
18956
18959
  jj(e),
18957
18960
  Lj,
@@ -21661,35 +21664,39 @@ const d5 = xe(
21661
21664
  }
21662
21665
  throw n;
21663
21666
  }
21664
- }, Gf = xe("explorer/openFile", async ({ file: e, inactive: n }, { getState: r, dispatch: a }) => {
21667
+ }, Gf = xe("explorer/openFile", async ({ file: e, inactive: n, flags: r = {} }, { getState: a, dispatch: i }) => {
21665
21668
  const {
21666
- root: { tabs: i },
21667
- roles: u
21668
- } = r(), c = i.find(({ path: h }) => e.path === h);
21669
- if (c) {
21670
- const h = {
21671
- ...c,
21669
+ root: { tabs: u },
21670
+ roles: c
21671
+ } = a(), f = u.find(({ path: m }) => e.path === m);
21672
+ if (f) {
21673
+ const m = {
21674
+ ...f,
21672
21675
  extra: {
21673
- ...c == null ? void 0 : c.extra,
21676
+ ...f == null ? void 0 : f.extra,
21674
21677
  editor: e.editor
21678
+ },
21679
+ flags: {
21680
+ ...f == null ? void 0 : f.flags,
21681
+ ...r
21675
21682
  }
21676
21683
  };
21677
- return a(En(h)), h;
21684
+ return i(En(m)), m;
21678
21685
  }
21679
21686
  if (e.path.startsWith("Debugger")) {
21680
- const h = r().debugger.sessions.find(
21681
- (m) => `Debugger/${m.threadId}` === e.path
21687
+ const m = a().debugger.sessions.find(
21688
+ (b) => `Debugger/${b.threadId}` === e.path
21682
21689
  );
21683
- if (h) {
21690
+ if (m) {
21684
21691
  const {
21685
- source: { content: m },
21686
- source: b
21687
- } = h.currentStackFrame, E = {
21692
+ source: { content: b },
21693
+ source: E
21694
+ } = m.currentStackFrame, O = {
21688
21695
  name: e.name,
21689
21696
  type: ce.DEBUGGER,
21690
21697
  date: (/* @__PURE__ */ new Date()).toISOString(),
21691
21698
  path: e.path,
21692
- content: m,
21699
+ content: b,
21693
21700
  view: {
21694
21701
  panel: {
21695
21702
  isOpen: !1,
@@ -21697,28 +21704,28 @@ const d5 = xe(
21697
21704
  current: ""
21698
21705
  }
21699
21706
  },
21700
- initialContent: m,
21707
+ initialContent: b,
21701
21708
  flags: {},
21702
21709
  extra: {
21703
- source: b,
21710
+ source: E,
21704
21711
  editor: e.editor
21705
21712
  }
21706
21713
  };
21707
- return a(En(E)), E;
21714
+ return i(En(O)), O;
21708
21715
  }
21709
21716
  }
21710
- const f = await ep(e);
21711
- return e.path === Br && !u.flags.touched ? a(
21717
+ const p = await ep(e);
21718
+ return e.path === Br && !c.flags.touched ? i(
21712
21719
  vT({
21713
- content: f.content,
21714
- date: f.date
21720
+ content: p.content,
21721
+ date: p.date
21715
21722
  })
21716
- ) : e.path === ks && a(
21723
+ ) : e.path === ks && i(
21717
21724
  Q_({
21718
21725
  path: "project",
21719
- value: f.content
21726
+ value: p.content
21720
21727
  })
21721
- ), a((n ? K3 : En)(f)), f;
21728
+ ), i((n ? K3 : En)(p)), p;
21722
21729
  }), _T = xe("explorer/openFileAtLine", async ({ file: e }, { getState: n, dispatch: r }) => {
21723
21730
  const { tabs: a } = n().root, i = a.find(({ path: c }) => e.path === c);
21724
21731
  if (i) {
@@ -23747,6 +23754,9 @@ const I3 = {
23747
23754
  a.extra = {
23748
23755
  ...a.extra,
23749
23756
  ...r.extra
23757
+ }, a.flags = {
23758
+ ...a.flags || {},
23759
+ ...r.flags || {}
23750
23760
  };
23751
23761
  },
23752
23762
  setContent(e, n) {