melonykit 0.16.3 → 0.18.0

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 { h as e } from "./functions-CGixFbFT.js";
1
+ import { m as e } from "./functions-CSuMpnOY.js";
2
2
  import { signal as t } from "@preact/signals";
3
3
  import { useEffect as n, useMemo as r } from "preact/hooks";
4
4
  //#region src/browser/_route-to.js
@@ -8,8 +8,8 @@ function i(e, t = !1) {
8
8
  //#endregion
9
9
  //#region src/browser/_use-query.js
10
10
  var a = /* @__PURE__ */ new Map(), o = null;
11
- function s({ endpoint: i, event: a }) {
12
- let o = r(() => {
11
+ function s({ endpoint: i, event: a, refreshEvent: o }) {
12
+ let s = r(() => {
13
13
  let n = t(null), r = t(!1), a = t(null);
14
14
  async function o() {
15
15
  r.value = !0, a.value = null;
@@ -34,11 +34,17 @@ function s({ endpoint: i, event: a }) {
34
34
  };
35
35
  }, [i]);
36
36
  return n(() => {
37
- let e = l(a, (e) => {
38
- o.data.value = e;
39
- });
40
- return o.refetch(), e;
41
- }, [o, a]), o;
37
+ let e = a ? l(a, (e) => {
38
+ s.data.value = e;
39
+ }) : o ? l(o, () => {
40
+ s.refetch();
41
+ }) : () => {};
42
+ return s.refetch(), e;
43
+ }, [
44
+ s,
45
+ a,
46
+ o
47
+ ]), s;
42
48
  }
43
49
  function c() {
44
50
  return o ||= new EventSource("/api/client-events"), o;
package/dist/browser.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as e, n as t, r as n, t as r } from "./browser-CFswWLIi.js";
1
+ import { i as e, n as t, r as n, t as r } from "./browser-BQLPMs0_.js";
2
2
  export { t as getClientSetting, e as routeTo, r as setClientSetting, n as useQuery };
@@ -306,14 +306,9 @@ function k(e) {
306
306
  return n(e) && e.trim().length === 0;
307
307
  }
308
308
  //#endregion
309
- //#region src/functions/checks/_is-empty.js
310
- function A(e) {
311
- return e == null ? !0 : typeof e == "function" ? !1 : typeof e == "number" ? !Number.isFinite(e) : typeof e == "string" ? e.trim().length === 0 : Array.isArray(e) ? e.length === 0 : typeof e != "object" || Object.keys(e).length === 0 && Object.getOwnPropertySymbols(e).length === 0;
312
- }
313
- //#endregion
314
309
  //#region src/functions/checks/_is-negative-number.js
315
- function j(e) {
310
+ function A(e) {
316
311
  return C(e) && e < 0;
317
312
  }
318
313
  //#endregion
319
- export { d as _, D as a, n as b, w as c, x as d, b as f, g, _ as h, O as i, C as l, v as m, A as n, E as o, y as p, k as r, T as s, j as t, S as u, i as v, t as x, r as y };
314
+ export { i as _, E as a, t as b, C as c, b as d, y as f, d as g, g as h, D as i, S as l, _ as m, k as n, T as o, v as p, O as r, w as s, A as t, x as u, r as v, n as y };
package/dist/functions.js CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, x as y, y as b } from "./functions-CGixFbFT.js";
2
- export { b as camelCaseToTitleCase, y as convertHexToRgba, h as createCache, v as darkenHexColor, e as formatDate, a as isArray, d as isEmpty, i as isEmptyArray, c as isEmptyObject, m as isEmptyString, _ as isFunction, g as isNegativeNumber, f as isNil, l as isNumber, t as isObject, r as isPositiveNumber, n as isString, o as kebabCaseToTitleCase, s as request, u as size, p as toNumber };
1
+ import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, y } from "./functions-CSuMpnOY.js";
2
+ export { v as camelCaseToTitleCase, n as convertHexToRgba, f as createCache, e as darkenHexColor, o as formatDate, i as isArray, _ as isEmptyArray, m as isEmptyObject, d as isEmptyString, l as isFunction, g as isNegativeNumber, t as isNil, r as isNumber, c as isObject, h as isPositiveNumber, y as isString, s as kebabCaseToTitleCase, u as request, p as size, a as toNumber };