melonykit 0.7.3 → 0.7.4

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/browser.js CHANGED
@@ -1,4 +1,4 @@
1
- import { r as e } from "./functions-C8th2V6m.js";
1
+ import { r as e } from "./functions-Wd2w_1JD.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
@@ -177,13 +177,16 @@ async function g({ url: e, body: t, method: n = "POST", headers: r = {} } = {})
177
177
  ...r
178
178
  },
179
179
  body: i
180
- }), o = { status: a.status };
181
- try {
182
- o.data = await a.json(), o.success = !0;
180
+ }), o = await a.text(), s = {
181
+ status: a.status,
182
+ success: a.ok
183
+ };
184
+ if (o) try {
185
+ s.data = JSON.parse(o);
183
186
  } catch (e) {
184
- o.error = e, o.success = !1;
187
+ s.error = e, s.success = !1;
185
188
  }
186
- return o;
189
+ return s;
187
190
  }
188
191
  //#endregion
189
192
  //#region src/functions/_size.js
package/dist/functions.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./functions-C8th2V6m.js";
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./functions-Wd2w_1JD.js";
2
2
  export { a as convertHexToRgba, r as darkenHexColor, e as formatDate, t as isEmpty, i as request, n as size, o as toNumber };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as e, o as t } from "./functions-C8th2V6m.js";
1
+ import { i as e, o as t } from "./functions-Wd2w_1JD.js";
2
2
  import { useSignal as n } from "@preact/signals";
3
3
  import { useEffect as r, useId as i } from "preact/hooks";
4
4
  import { Fragment as a, jsx as o, jsxs as s } from "preact/jsx-runtime";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Vadim Hermann",
3
3
  "name": "melonykit",
4
- "version": "0.7.3",
4
+ "version": "0.7.4",
5
5
  "type": "module",
6
6
  "description": "Preact based ui and utility functions toolkit",
7
7
  "main": "./dist/index.js",