melonykit 0.7.5 → 0.7.6
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
|
@@ -179,15 +179,14 @@ async function g({ url: e, body: t, method: n = "POST", headers: r = {} } = {})
|
|
|
179
179
|
body: i
|
|
180
180
|
}), o = await a.text(), s = {
|
|
181
181
|
success: a.ok,
|
|
182
|
-
status: a.status
|
|
183
|
-
error: a.error
|
|
182
|
+
status: a.status
|
|
184
183
|
};
|
|
185
184
|
if (o) try {
|
|
186
185
|
s.data = JSON.parse(o);
|
|
187
186
|
} catch (e) {
|
|
188
|
-
s.error = e, s.success = !1;
|
|
187
|
+
s.data = o, a.ok && (s.error = e, s.success = !1);
|
|
189
188
|
}
|
|
190
|
-
return s;
|
|
189
|
+
return a.ok || (s.error = s.data ?? /* @__PURE__ */ Error(`Request failed with status ${a.status}.`)), s;
|
|
191
190
|
}
|
|
192
191
|
//#endregion
|
|
193
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-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./functions-ytrrWBDV.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-
|
|
1
|
+
import { i as e, o as t } from "./functions-ytrrWBDV.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";
|