melonykit 1.21.0 → 1.22.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.
package/dist/browser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as getClientSetting, a as routeTo, t as setClientSetting, r as useGraphqlQuery, i as useQuery } from "./browser-
|
|
1
|
+
export { n as getClientSetting, a as routeTo, t as setClientSetting, r as useGraphqlQuery, i as useQuery } from "./browser-bawCTM88.js";
|
|
@@ -284,8 +284,14 @@ function j(e) {
|
|
|
284
284
|
let t = [...e].sort((e, t) => e - t), n = Math.floor(t.length / 2);
|
|
285
285
|
return t.length % 2 == 0 ? (t[n - 1] + t[n]) / 2 : t[n];
|
|
286
286
|
}
|
|
287
|
+
// src/functions/_parse-boolean.js
|
|
288
|
+
function M(e) {
|
|
289
|
+
if (!t(e)) return e;
|
|
290
|
+
let n = e.trim().toLowerCase();
|
|
291
|
+
return n === "true" || n !== "false" && e;
|
|
292
|
+
}
|
|
287
293
|
// src/functions/_request.js
|
|
288
|
-
async function
|
|
294
|
+
async function N({ url: e, body: t, method: n = "POST", headers: r = {} } = {}) {
|
|
289
295
|
let i = n !== "GET" && t !== void 0 ? JSON.stringify(t) : void 0, a = await fetch(e, {
|
|
290
296
|
method: n,
|
|
291
297
|
headers: {
|
|
@@ -305,8 +311,8 @@ async function M({ url: e, body: t, method: n = "POST", headers: r = {} } = {})
|
|
|
305
311
|
return a.ok || (s.error = s.data ?? /* @__PURE__ */ Error(`Request failed with status ${a.status}.`)), s;
|
|
306
312
|
}
|
|
307
313
|
// src/functions/_request-graphql.js
|
|
308
|
-
async function
|
|
309
|
-
let n = await
|
|
314
|
+
async function P({ query: e, variables: t } = {}) {
|
|
315
|
+
let n = await N({
|
|
310
316
|
url: "/api/graphql",
|
|
311
317
|
method: "POST",
|
|
312
318
|
body: {
|
|
@@ -322,26 +328,26 @@ async function N({ query: e, variables: t } = {}) {
|
|
|
322
328
|
};
|
|
323
329
|
}
|
|
324
330
|
// src/functions/_risk-reward.js
|
|
325
|
-
function
|
|
331
|
+
function F(e = {}) {
|
|
326
332
|
let { entry: t, exit: n, riskRatio: r = 20 } = e ?? {};
|
|
327
333
|
if (!c(t) || t <= 0 || !c(n) || n <= 0 || !c(r) || r <= 0) return null;
|
|
328
334
|
let i = (n - t) / t / (r / 100);
|
|
329
335
|
return Math.round(i * 10) / 10;
|
|
330
336
|
}
|
|
331
337
|
// src/functions/_size.js
|
|
332
|
-
function
|
|
338
|
+
function I(e) {
|
|
333
339
|
return e == null ? 0 : Array.isArray(e) || typeof e == "string" ? e.length : typeof e == "object" || typeof e == "function" ? Object.keys(e).length : 0;
|
|
334
340
|
}
|
|
335
341
|
// src/functions/_slugify.js
|
|
336
|
-
function
|
|
342
|
+
function L(e) {
|
|
337
343
|
return typeof e == "string" ? e.trim().toLowerCase().replace(/ä/g, "ae").replace(/ö/g, "oe").replace(/ü/g, "ue").replace(/ß/g, "ss").replace(/æ/g, "ae").replace(/œ/g, "oe").replace(/ø/g, "o").normalize("NFD").replace(/\p{Diacritic}/gu, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") : "";
|
|
338
344
|
}
|
|
339
345
|
// src/functions/_to-number.js
|
|
340
|
-
function
|
|
346
|
+
function R(e, t = null) {
|
|
341
347
|
let n = typeof e == "number" ? e : typeof e == "string" && e.trim() !== "" ? Number(e) : NaN;
|
|
342
348
|
if (!Number.isFinite(n)) return null;
|
|
343
349
|
if (t == null) return n;
|
|
344
350
|
let r = 10 ** t;
|
|
345
351
|
return Math.round(n * r) / r;
|
|
346
352
|
}
|
|
347
|
-
export {
|
|
353
|
+
export { o as C, t as D, n as E, e as O, s as S, i as T, S as _, P as a, l as b, j as c, O as d, D as f, C as g, w as h, F as i, A as l, T as m, L as n, N as o, E as p, I as r, M as s, R as t, k as u, _ as v, a as w, c as x, u as y };
|
package/dist/functions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { O as average, E as camelCaseToTitleCase, T as convertHexToRgba, b as createCache, y as darkenHexColor, v as formatDate, w as isArray, _ as isBoolean, C as isEmptyArray, m as isEmptyObject, p as isEmptyString, f as isFloat, S as isFunction, d as isInteger, g as isNil, x as isNumber, h as isObject, D as isString, u as kebabCaseToCamelCase, l as kebabCaseToTitleCase, c as median, s as parseBoolean, o as request, a as requestGraphql, i as riskReward, r as size, n as slugify, t as toNumber } from "./functions-DErEdMjE.js";
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useSignal as e } from "@preact/signals";
|
|
2
2
|
import { Fragment as t, jsx as n, jsxs as r } from "preact/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { D as i, n as a, p as o, y as s } from "./functions-DErEdMjE.js";
|
|
4
4
|
import { useEffect as c, useId as l, useRef as u } from "preact/hooks";
|
|
5
|
-
import { n as d, t as f } from "./browser-
|
|
5
|
+
import { n as d, t as f } from "./browser-bawCTM88.js";
|
|
6
6
|
// node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
7
7
|
function p(e) {
|
|
8
8
|
if (e.sheet) return e.sheet;
|
|
@@ -2016,21 +2016,18 @@ var Tr = xt`
|
|
|
2016
2016
|
height: 2.3rem;
|
|
2017
2017
|
padding: 0 .8rem;
|
|
2018
2018
|
overflow: hidden;
|
|
2019
|
-
border: solid
|
|
2019
|
+
border-bottom: solid 2px transparent;
|
|
2020
2020
|
font-weight: 600;
|
|
2021
2021
|
letter-spacing: 1px;
|
|
2022
2022
|
white-space: nowrap;
|
|
2023
|
-
border-radius:
|
|
2024
|
-
will-change: transform
|
|
2025
|
-
transition: transform .15s ease
|
|
2023
|
+
border-radius: 8px;
|
|
2024
|
+
will-change: transform;
|
|
2025
|
+
transition: transform .15s ease;
|
|
2026
|
+
color: ${A.colors.deepOcean};
|
|
2026
2027
|
font-family: ${A.textFontFamily}, sans-serif;
|
|
2027
2028
|
|
|
2028
|
-
&[is-clickable]:active {
|
|
2029
|
-
transform: translateY(1px);
|
|
2030
|
-
}
|
|
2031
|
-
|
|
2029
|
+
&[is-clickable]:active { transform: translateY(1px); }
|
|
2032
2030
|
&[has-icon] { padding-left: 2rem; }
|
|
2033
|
-
|
|
2034
2031
|
&[is-icon-only] {
|
|
2035
2032
|
width: 2.3rem;
|
|
2036
2033
|
padding: 0;
|
|
@@ -2038,7 +2035,6 @@ var Tr = xt`
|
|
|
2038
2035
|
`,
|
|
2039
2036
|
icon: k`
|
|
2040
2037
|
${A.extends.verticalCenter}
|
|
2041
|
-
|
|
2042
2038
|
display: grid;
|
|
2043
2039
|
width: 1rem;
|
|
2044
2040
|
height: 1rem;
|
|
@@ -2046,18 +2042,14 @@ var Tr = xt`
|
|
|
2046
2042
|
left: .6rem;
|
|
2047
2043
|
`,
|
|
2048
2044
|
primary: k`
|
|
2049
|
-
color: ${A.colors.deepOcean};
|
|
2050
2045
|
border-color: #2baac2;
|
|
2051
2046
|
background-color: ${A.colors.lightBreeze};
|
|
2052
|
-
box-shadow: 0 2px 5px rgb(43 170 194 / 18%);
|
|
2053
2047
|
`,
|
|
2054
2048
|
secondary: k`
|
|
2055
|
-
color: ${A.colors.
|
|
2056
|
-
border-color: ${s(A.colors.tangerineSnack, .2)};
|
|
2049
|
+
border-color: ${s(A.colors.tangerineSnack, .3)};
|
|
2057
2050
|
background-color: ${A.colors.tangerineSnack};
|
|
2058
2051
|
`,
|
|
2059
2052
|
neutral: k`
|
|
2060
|
-
color: ${A.colors.deepOcean};
|
|
2061
2053
|
border-color: ${A.systemColors.border};
|
|
2062
2054
|
background-color: ${A.colors.softPottery};
|
|
2063
2055
|
`,
|
|
@@ -2321,7 +2313,7 @@ function Fr(e, t) {
|
|
|
2321
2313
|
return d(Ir(e), t);
|
|
2322
2314
|
}
|
|
2323
2315
|
function Ir(e) {
|
|
2324
|
-
let t =
|
|
2316
|
+
let t = a(e);
|
|
2325
2317
|
return t ? `accordions:${t}:is-open` : "";
|
|
2326
2318
|
}
|
|
2327
2319
|
var Lr = {
|
|
@@ -3303,10 +3295,10 @@ var mi = {
|
|
|
3303
3295
|
`
|
|
3304
3296
|
};
|
|
3305
3297
|
// src/components/_tag.jsx
|
|
3306
|
-
function hi({ as: e = "div", className: i, variant:
|
|
3298
|
+
function hi({ as: e = "div", className: i, variant: a = "normal", iconName: s = "", label: c }) {
|
|
3307
3299
|
return /* @__PURE__ */ n(t, { children: /* @__PURE__ */ r(e, {
|
|
3308
|
-
className: yt(gi.base, gi[
|
|
3309
|
-
"has-icon": !
|
|
3300
|
+
className: yt(gi.base, gi[a] ?? gi.normal, i),
|
|
3301
|
+
"has-icon": !o(s),
|
|
3310
3302
|
children: [s && /* @__PURE__ */ n(t, { children: /* @__PURE__ */ n(Tt, {
|
|
3311
3303
|
className: k`
|
|
3312
3304
|
${A.extends.verticalCenter}
|
|
@@ -3363,7 +3355,7 @@ function _i({ title: i, actionBar: a, initialOpen: o = !0, children: s }) {
|
|
|
3363
3355
|
}) });
|
|
3364
3356
|
}
|
|
3365
3357
|
function vi(e) {
|
|
3366
|
-
let t =
|
|
3358
|
+
let t = a(e);
|
|
3367
3359
|
return t ? `tag-boxes:${t}:is-open` : "";
|
|
3368
3360
|
}
|
|
3369
3361
|
var yi = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Vadim Hermann",
|
|
3
3
|
"name": "melonykit",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.22.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Preact based ui and utility functions toolkit",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"@codemirror/view": "6.44.2",
|
|
39
39
|
"@emotion/css": "11.13.5",
|
|
40
40
|
"dompurify": "3.5.0",
|
|
41
|
-
"glob": "
|
|
41
|
+
"glob": "15.0.0",
|
|
42
42
|
"graphql": "17.0.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@pivanov/vite-plugin-svg-sprite": "3.1.8",
|
|
46
|
-
"@playwright/test": "1.65.
|
|
46
|
+
"@playwright/test": "1.65.2",
|
|
47
47
|
"@preact/preset-vite": "2.10.6",
|
|
48
48
|
"@preact/signals": "2.11.4",
|
|
49
49
|
"@types/node": "26.6.11",
|