@pinia/colada-devtools 0.1.3 → 0.1.5

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.
Files changed (26) hide show
  1. package/dist/index.js +28 -28
  2. package/dist/index.js.map +1 -1
  3. package/dist-panel/{_queryId_-DBYj1x2l.js → _queryId_-Bilvrtoo.js} +14 -14
  4. package/dist-panel/{_queryId_-DBYj1x2l.js.map → _queryId_-Bilvrtoo.js.map} +1 -1
  5. package/dist-panel/{index-B5Pabqnp.js → index-B6c9Loor.js} +3 -3
  6. package/dist-panel/{index-B5Pabqnp.js.map → index-B6c9Loor.js.map} +1 -1
  7. package/dist-panel/index-D50XbbDk.js +6492 -0
  8. package/dist-panel/index-D50XbbDk.js.map +1 -0
  9. package/dist-panel/{index-BiCss4be.js → index-DsbwSvSM.js} +2 -2
  10. package/dist-panel/{index-BiCss4be.js.map → index-DsbwSvSM.js.map} +1 -1
  11. package/dist-panel/index.js +1 -1
  12. package/dist-panel/{loader-1Im1Cd49.js → loader-BxXz3POc.js} +2 -2
  13. package/dist-panel/loader-BxXz3POc.js.map +1 -0
  14. package/dist-panel/{mouse-pointer-click-DrNfYH7O.js → mouse-pointer-click--GgfMFjw.js} +2 -2
  15. package/dist-panel/mouse-pointer-click--GgfMFjw.js.map +1 -0
  16. package/dist-panel/{mutations-CXpAyQVd.js → mutations-CNQGJZrN.js} +2 -2
  17. package/dist-panel/{mutations-CXpAyQVd.js.map → mutations-CNQGJZrN.js.map} +1 -1
  18. package/dist-panel/{queries-C2Kny_VH.js → queries-CSBvC4-S.js} +6 -6
  19. package/dist-panel/{queries-C2Kny_VH.js.map → queries-CSBvC4-S.js.map} +1 -1
  20. package/dist-panel/{settings-kYLoG5O4.js → settings-Cl-hr-ie.js} +2 -2
  21. package/dist-panel/{settings-kYLoG5O4.js.map → settings-Cl-hr-ie.js.map} +1 -1
  22. package/package.json +1 -1
  23. package/dist-panel/index-BCMgcfY0.js +0 -8157
  24. package/dist-panel/index-BCMgcfY0.js.map +0 -1
  25. package/dist-panel/loader-1Im1Cd49.js.map +0 -1
  26. package/dist-panel/mouse-pointer-click-DrNfYH7O.js.map +0 -1
package/dist/index.js CHANGED
@@ -87,7 +87,7 @@ function g2(e) {
87
87
  });
88
88
  }
89
89
  }
90
- function w(e) {
90
+ function b(e) {
91
91
  return {
92
92
  keyHash: e.keyHash,
93
93
  key: e.key,
@@ -120,12 +120,12 @@ function w(e) {
120
120
  };
121
121
  }
122
122
  const L = /* @__PURE__ */ new WeakMap();
123
- function b2(e, n, t, r) {
123
+ function w2(e, n, t, r) {
124
124
  e.addEventListener(n, t, r), V() && J(() => {
125
125
  e.removeEventListener(n, t);
126
126
  });
127
127
  }
128
- const w2 = [".isPip", ".port"], x2 = /* @__PURE__ */ R({
128
+ const b2 = [".isPip", ".port"], x2 = /* @__PURE__ */ R({
129
129
  __name: "PiniaColadaDevtools",
130
130
  emits: ["close"],
131
131
  setup(e, { emit: n }) {
@@ -134,31 +134,31 @@ const w2 = [".isPip", ".port"], x2 = /* @__PURE__ */ R({
134
134
  if (i === "remove") {
135
135
  const [c] = y;
136
136
  o(() => {
137
- s.emit("queries:delete", w(c));
137
+ s.emit("queries:delete", b(c));
138
138
  });
139
139
  } else if (i === "track" || i === "untrack" || i === "cancel" || i === "invalidate" || i === "fetch" || i === "setEntryState") {
140
140
  const [c] = y;
141
141
  if (i === "fetch") {
142
- const b = w(c);
143
- b.asyncStatus = "loading", s.emit("queries:update", b);
142
+ const w = b(c);
143
+ w.asyncStatus = "loading", s.emit("queries:update", w);
144
144
  }
145
145
  o(() => {
146
- var b;
147
- c[p].simulate = null, s.emit("queries:update", w(c)), i === "fetch" && ((b = c.options) == null ? void 0 : b.staleTime) != null && Number.isFinite(c.options.staleTime) && setTimeout(() => {
148
- s.emit("queries:update", w(c));
146
+ var w;
147
+ c[p].simulate = null, s.emit("queries:update", b(c)), i === "fetch" && ((w = c.options) == null ? void 0 : w.staleTime) != null && Number.isFinite(c.options.staleTime) && setTimeout(() => {
148
+ s.emit("queries:update", b(c));
149
149
  }, c.options.staleTime);
150
150
  }), m(() => {
151
- s.emit("queries:update", w(c));
151
+ s.emit("queries:update", b(c));
152
152
  });
153
153
  } else if (i === "create")
154
154
  o((c) => {
155
- s.emit("queries:update", w(c));
155
+ s.emit("queries:update", b(c));
156
156
  });
157
157
  else if (i === "setQueryData") {
158
158
  const [c] = y;
159
159
  o(() => {
160
- const b = r.getEntries({ key: c, exact: !0 })[0];
161
- b && s.emit("queries:update", w(b));
160
+ const w = r.getEntries({ key: c, exact: !0 })[0];
161
+ w && s.emit("queries:update", b(w));
162
162
  });
163
163
  }
164
164
  });
@@ -182,32 +182,32 @@ const w2 = [".isPip", ".port"], x2 = /* @__PURE__ */ R({
182
182
  }));
183
183
  }), s.on("queries:set:state", (i, o) => {
184
184
  const m = r.getEntries({ key: i, exact: !0 })[0];
185
- m && (r.setEntryState(m, o), s.emit("queries:update", w(m)));
185
+ m && (r.setEntryState(m, o), s.emit("queries:update", b(m)));
186
186
  }), s.on("queries:simulate:loading", (i) => {
187
187
  const o = r.getEntries({ key: i, exact: !0 })[0];
188
- o && (o.asyncStatus.value = "loading", o[p].simulate = "loading", s.emit("queries:update", w(o)));
188
+ o && (o.asyncStatus.value = "loading", o[p].simulate = "loading", s.emit("queries:update", b(o)));
189
189
  }), s.on("queries:simulate:loading:stop", (i) => {
190
190
  const o = r.getEntries({ key: i, exact: !0 })[0];
191
- o && o[p].simulate === "loading" && (o.asyncStatus.value = "idle", o[p].simulate = null, s.emit("queries:update", w(o)));
191
+ o && o[p].simulate === "loading" && (o.asyncStatus.value = "idle", o[p].simulate = null, s.emit("queries:update", b(o)));
192
192
  }), s.on("queries:simulate:error", (i) => {
193
193
  const o = r.getEntries({ key: i, exact: !0 })[0];
194
194
  o && (r.cancel(o), r.setEntryState(o, {
195
195
  ...o.state.value,
196
196
  status: "error",
197
197
  error: new Error("Simulated error")
198
- }), o[p].simulate = "error", s.emit("queries:update", w(o)));
198
+ }), o[p].simulate = "error", s.emit("queries:update", b(o)));
199
199
  }), s.on("queries:simulate:error:stop", (i) => {
200
200
  const o = r.getEntries({ key: i, exact: !0 })[0];
201
201
  o && o[p].simulate === "error" && (r.cancel(o), r.setEntryState(o, {
202
202
  ...o.state.value,
203
203
  status: o.state.value.data !== void 0 ? "success" : "pending",
204
204
  error: null
205
- }), o[p].simulate = null, s.emit("queries:update", w(o)));
205
+ }), o[p].simulate = null, s.emit("queries:update", b(o)));
206
206
  });
207
207
  const a = W(null);
208
208
  P(a, () => {
209
209
  h.value = new MessageChannel();
210
- }), b2(
210
+ }), w2(
211
211
  window,
212
212
  "unload",
213
213
  () => {
@@ -266,10 +266,10 @@ const w2 = [".isPip", ".port"], x2 = /* @__PURE__ */ R({
266
266
  }, 100);
267
267
  return;
268
268
  }
269
- v(f.value), s.emit("queries:all", r.getEntries().map(w)), s.emit(
269
+ v(f.value), s.emit("queries:all", r.getEntries().map(b)), s.emit(
270
270
  "mutations:all",
271
271
  // FIXME: add mutations
272
- r.getEntries().map(w)
272
+ r.getEntries().map(b)
273
273
  );
274
274
  }
275
275
  return (i, o) => (C(), D(u2, {
@@ -282,7 +282,7 @@ const w2 = [".isPip", ".port"], x2 = /* @__PURE__ */ R({
282
282
  onTogglePip: o[0] || (o[0] = (m) => x()),
283
283
  onReady: o[1] || (o[1] = (m) => z()),
284
284
  onClose: o[2] || (o[2] = (m) => t("close"))
285
- }, null, 40, w2)
285
+ }, null, 40, b2)
286
286
  ], 8, ["to"]));
287
287
  }
288
288
  });
@@ -483,7 +483,7 @@ function $2(e, n, t, r = {}) {
483
483
  }
484
484
  if (!t)
485
485
  return o;
486
- const y = E(n), c = M2(y), b = (f = r.serializer) != null ? f : W2[c], { pause: t2, resume: j } = G2(
486
+ const y = E(n), c = M2(y), w = (f = r.serializer) != null ? f : W2[c], { pause: t2, resume: j } = G2(
487
487
  o,
488
488
  () => i2(o.value),
489
489
  { flush: h, deep: s, eventFilter: O }
@@ -517,7 +517,7 @@ function $2(e, n, t, r = {}) {
517
517
  if (u == null)
518
518
  B(g, null), t.removeItem(m.value);
519
519
  else {
520
- const S = b.write(u);
520
+ const S = w.write(u);
521
521
  g !== S && (t.setItem(m.value, S), B(g, S));
522
522
  }
523
523
  } catch (g) {
@@ -527,11 +527,11 @@ function $2(e, n, t, r = {}) {
527
527
  function r2(u) {
528
528
  const g = u ? u.newValue : t.getItem(m.value);
529
529
  if (g == null)
530
- return l && y != null && t.setItem(m.value, b.write(y)), y;
530
+ return l && y != null && t.setItem(m.value, w.write(y)), y;
531
531
  if (!u && d) {
532
- const S = b.read(g);
532
+ const S = w.read(g);
533
533
  return typeof d == "function" ? d(S, y) : c === "object" && !Array.isArray(S) ? { ...y, ...S } : S;
534
- } else return typeof g != "string" ? g : b.read(g);
534
+ } else return typeof g != "string" ? g : w.read(g);
535
535
  }
536
536
  function _(u) {
537
537
  if (!(u && u.storageArea !== t)) {
@@ -542,7 +542,7 @@ function $2(e, n, t, r = {}) {
542
542
  if (!(u && u.key !== m.value)) {
543
543
  t2();
544
544
  try {
545
- (u == null ? void 0 : u.newValue) !== b.write(o.value) && (o.value = r2(u));
545
+ (u == null ? void 0 : u.newValue) !== w.write(o.value) && (o.value = r2(u));
546
546
  } catch (g) {
547
547
  z(g);
548
548
  } finally {