@thisway/next
Advanced tools
Comparing version 0.7.11 to 0.7.12
138
index.js
@@ -7,6 +7,6 @@ var no = Object.defineProperty; | ||
import { isValidNumber as Yt, toPx as it, isElement as Ve, isTextInputElement as Fe, defaults as ce, pick$ as D, clamp as jt, noFinite as pe, animationFrameThrottle as he, resizeObserver as De, getElementsBounding as co, getFrameElement as po, EMPTY_SIZE as ho } from "@thisway/utils"; | ||
import { get as k, writable as _t, derived as L, readable as wt } from "svelte/store"; | ||
import { NOOP_TRANSFORM as fo, PRIMARY_COLOR_WHITE as He, PRIMARY_COLOR_BLACK as We, PRIMARY_COLOR_BLUE as uo, EMPTY_POINT as wo, POSITION_AUTO as Jt, ORIENTATIONS as fe, ALIGNMENTS as _o, NO_ELEMENT as ct, ORIENTATIONS_TO_START_END as go, ORIENTATIONS_Y as vo, popoverDefaultValues as mo, highlightDefaultValues as yo, LAYOUT_MODE_1 as Tt, LAYOUT_MODE_3 as je } from "@thisway/base"; | ||
import { get as k, writable as gt, derived as L, readable as wt } from "svelte/store"; | ||
import { NOOP_TRANSFORM as fo, PRIMARY_COLOR_WHITE as He, PRIMARY_COLOR_BLACK as We, PRIMARY_COLOR_BLUE as uo, EMPTY_POINT as wo, POSITION_AUTO as Jt, ORIENTATIONS as fe, ALIGNMENTS as _o, NO_ELEMENT as ct, ORIENTATIONS_TO_START_END as go, ORIENTATIONS_Y as vo, popoverDefaultValues as mo, highlightDefaultValues as yo, LAYOUT_MODE_1 as St, LAYOUT_MODE_3 as je } from "@thisway/base"; | ||
export * from "@thisway/base"; | ||
import { SvelteComponent as Mt, init as Lt, safe_not_equal as Rt, append_styles as Kt, space as tt, empty as Gt, insert as W, noop as gt, detach as j, component_subscribe as M, svg_element as zt, attr as P, set_style as Y, append as K, listen as Bt, element as U, action_destroyer as Ye, is_function as ze, binding_callbacks as Ke, construct_svelte_component as de, create_component as Ot, mount_component as Et, group_outros as at, transition_out as B, destroy_component as Pt, check_outros as lt, transition_in as O, run_all as bo, text as Vt, set_data as Ft, compute_slots as $o, create_slot as vt, update_slot_base as mt, get_all_dirty_from_scope as yt, get_slot_changes as bt } from "svelte/internal"; | ||
import { SvelteComponent as Mt, init as Lt, safe_not_equal as Rt, append_styles as Kt, space as tt, empty as Gt, insert as W, noop as vt, detach as j, component_subscribe as M, svg_element as zt, attr as P, set_style as Y, append as K, listen as Bt, element as U, action_destroyer as Ye, is_function as ze, binding_callbacks as Ke, construct_svelte_component as de, create_component as Ot, mount_component as Et, group_outros as at, transition_out as B, destroy_component as Pt, check_outros as lt, transition_in as O, run_all as bo, text as Vt, set_data as Ft, compute_slots as $o, create_slot as mt, update_slot_base as yt, get_all_dirty_from_scope as bt, get_slot_changes as $t } from "svelte/internal"; | ||
import "svelte/internal/disclose-version"; | ||
@@ -100,3 +100,3 @@ import { getHighlightOptions as Co, NO_ELEMENT as xo, CLICK_MASK_ACTION_NEXT as ko, CLICK_MASK_ACTION_CLOSE as To, getRenderIndex as So } from "@thisway/next"; | ||
const Mo = (o, t) => { | ||
const e = _t(o), r = _t(t), n = L(e, (l) => l.filter((c) => !c.isHidden)), s = L([e, r], Qt), i = L([n, r], Qt), a = L([e, s], ([l, c]) => c != null ? l[c] : void 0); | ||
const e = gt(o), r = gt(t), n = L(e, (l) => l.filter((c) => !c.isHidden)), s = L([e, r], Qt), i = L([n, r], Qt), a = L([e, s], ([l, c]) => c != null ? l[c] : void 0); | ||
return { | ||
@@ -111,12 +111,12 @@ steps$: e, | ||
}; | ||
function $t() { | ||
function Ct() { | ||
} | ||
function kt(o) { | ||
function Tt(o) { | ||
const [t, e, r, n] = o; | ||
return [t, e, r, n, 0, 0]; | ||
} | ||
function Ct(o, t, e) { | ||
function xt(o, t, e) { | ||
return e[0] * o + e[2] * t + e[4]; | ||
} | ||
function xt(o, t, e) { | ||
function kt(o, t, e) { | ||
return e[1] * o + e[3] * t + e[5]; | ||
@@ -134,5 +134,5 @@ } | ||
let { x: e, y: r, width: n, height: s } = o; | ||
e = Ct(e, r, t), r = xt(e, r, t); | ||
const i = kt(t); | ||
return n = Ct(n, 0, i), s = xt(0, s, i), { | ||
e = xt(e, r, t), r = kt(e, r, t); | ||
const i = Tt(t); | ||
return n = xt(n, 0, i), s = kt(0, s, i), { | ||
x: e, | ||
@@ -145,3 +145,3 @@ y: r, | ||
const It = wt(fo), ie = (o) => { | ||
const t = o.window || window, e = kt(k(o.transform$ ?? It)), r = Ct(t.document.documentElement.clientWidth, 0, e), n = xt(0, t.document.documentElement.clientHeight, e); | ||
const t = o.window || window, e = Tt(k(o.transform$ ?? It)), r = xt(t.document.documentElement.clientWidth, 0, e), n = kt(0, t.document.documentElement.clientHeight, e); | ||
return { | ||
@@ -169,5 +169,5 @@ width: r, | ||
} | ||
function St(o, t, e) { | ||
function _t(o, t, e) { | ||
if (!o) | ||
return $t; | ||
return Ct; | ||
const r = { | ||
@@ -190,4 +190,4 @@ passive: !0, | ||
const Vo = (o, t, e, r) => { | ||
const { x: n, y: s, padding: i, borderWidth: a } = o, l = kt(r); | ||
let c = Ct(i, 0, l), u = xt(0, i, l); | ||
const { x: n, y: s, padding: i, borderWidth: a } = o, l = Tt(r); | ||
let c = xt(i, 0, l), u = kt(0, i, l); | ||
t && (c += a, u += a); | ||
@@ -351,4 +351,4 @@ const p = a * 2, d = n - c + p, m = s - u, f = o.width + (c - p) * 2, w = o.height + (u - p) * 2, _ = e.width, x = e.height; | ||
}, | ||
i: gt, | ||
o: gt, | ||
i: vt, | ||
o: vt, | ||
d(s) { | ||
@@ -368,3 +368,3 @@ s && (j(t), j(e)), r && r.d(s), n && n.d(s); | ||
const I = D(_, "borderWidth"); | ||
let N, S = _t(void 0); | ||
let N, S = gt(void 0); | ||
M(o, S, (y) => e(1, n = y)); | ||
@@ -417,3 +417,3 @@ const E = L([m, I, C], ([y, H, X], Z) => { | ||
return; | ||
const X = kt(k(f.transform$ ?? It)), { x: Z, y: G, borderWidth: F, padding: nt, width: ht, height: rt } = y, g = Ct(nt, 0, X), J = xt(0, nt, X); | ||
const X = Tt(k(f.transform$ ?? It)), { x: Z, y: G, borderWidth: F, padding: nt, width: ht, height: rt } = y, g = xt(nt, 0, X), J = kt(0, nt, X); | ||
H({ | ||
@@ -603,3 +603,3 @@ left: it(Z - F - g), | ||
return; | ||
const C = d[0], R = d[1], I = ie(e), N = kt(k(e.transform$ ?? It)), S = Ct(f, 0, N) + p + w, E = xt(0, f, N) + p + w, A = x === ct ? "SCREEN" : Go(x, _, C, S, E, I), { style: h, alignment: T } = Uo( | ||
const C = d[0], R = d[1], I = ie(e), N = Tt(k(e.transform$ ?? It)), S = xt(f, 0, N) + p + w, E = kt(0, f, N) + p + w, A = x === ct ? "SCREEN" : Go(x, _, C, S, E, I), { style: h, alignment: T } = Uo( | ||
A, | ||
@@ -852,8 +852,8 @@ R === i ? a : R, | ||
if (!v || v === ct || k(d).interactive === !1 || k(w).position === "SCREEN") | ||
return $t; | ||
return Ct; | ||
const st = v.ownerDocument.defaultView; | ||
return St(st, "click", (Q) => { | ||
return _t(st, "click", (Q) => { | ||
z(Q), !(Q.target === document.body || !qe(Q.target) || !Ve(Q.target) || Fe(Q.target) || !v.contains(Q.target)) && nt(); | ||
}); | ||
}).subscribe($t); | ||
}).subscribe(Ct); | ||
ao(() => { | ||
@@ -935,3 +935,3 @@ m.set(p); | ||
e && e !== "OVER" && (vo.includes(e) ? (f = l, w = c, m[e.toLocaleLowerCase()] += (t == null ? void 0 : t.height) || 0) : (f = c, w = l, m[e.toLocaleLowerCase()] += (t == null ? void 0 : t.width) || 0)); | ||
const _ = kt(i); | ||
const _ = Tt(i); | ||
return m.left = ue(m.left, 0, _) + u, m.right = ue(m.right, 0, _) + u, m.top = we(0, m.top, _) + u, m.bottom = we(0, m.bottom, _) + u, { | ||
@@ -964,3 +964,3 @@ scrollMode: "if-needed", | ||
const $ = []; | ||
let C = $t; | ||
let C = Ct; | ||
if (o === ct || _ === "SCREEN") { | ||
@@ -972,3 +972,3 @@ C = he(() => { | ||
const { contentWindow: I } = R; | ||
I && $.push(St(window, "resize", C)); | ||
I && $.push(_t(window, "resize", C)); | ||
} | ||
@@ -990,6 +990,10 @@ } else { | ||
const { contentWindow: S } = N; | ||
S && $.push(St(S.window, "resize", C), St(S.window, "scroll", C)); | ||
S && $.push(_t(S.window, "resize", C), _t(S.window, "scroll", C)); | ||
} | ||
} | ||
$.push(St(window, "resize", C), i.subscribe(C)), C(), ae(l, () => { | ||
$.push( | ||
_t(window, "resize", C), | ||
_t(window, "scroll", C), | ||
i.subscribe(C) | ||
), C(), ae(l, () => { | ||
Ue($); | ||
@@ -1032,3 +1036,3 @@ }); | ||
e(t.getBoundingClientRect()); | ||
}) : (e(ho), $t)); | ||
}) : (e(ho), Ct)); | ||
class ir extends Io { | ||
@@ -1040,3 +1044,3 @@ constructor(e, r, n, s) { | ||
et(this, "delegate"); | ||
et(this, "updatePositionSignal$", _t(0)); | ||
et(this, "updatePositionSignal$", gt(0)); | ||
et(this, "renderState$"); | ||
@@ -1078,3 +1082,3 @@ et(this, "onPrev", () => { | ||
theme: L(u("theme", {}), Wo) | ||
}, d = _t(void 0), m = nr(d), f = r.transform$ ?? It, w = D(p.popover, "position"); | ||
}, d = gt(void 0), m = nr(d), f = r.transform$ ?? It, w = D(p.popover, "position"); | ||
let _; | ||
@@ -1090,3 +1094,3 @@ const x = L( | ||
if (!C || !R) | ||
return $t; | ||
return Ct; | ||
const E = new AbortController(); | ||
@@ -1173,4 +1177,4 @@ return rr( | ||
}, | ||
i: gt, | ||
o: gt, | ||
i: vt, | ||
o: vt, | ||
d(r) { | ||
@@ -1209,3 +1213,3 @@ r && j(t); | ||
/*$layout$*/ | ||
o[4] !== Tt && /*$showProgress$*/ | ||
o[4] !== St && /*$showProgress$*/ | ||
o[7] && Ae() | ||
@@ -1216,3 +1220,3 @@ ); | ||
o[30].default | ||
), I = vt( | ||
), I = mt( | ||
R, | ||
@@ -1226,3 +1230,3 @@ o, | ||
o[30].footer | ||
), S = vt( | ||
), S = mt( | ||
N, | ||
@@ -1236,3 +1240,3 @@ o, | ||
/*$layout$*/ | ||
o[4] === Tt && /*$showProgress$*/ | ||
o[4] === St && /*$showProgress$*/ | ||
o[7] && Ne() | ||
@@ -1269,3 +1273,3 @@ ), A = ( | ||
}), lt()), /*$layout$*/ | ||
h[4] !== Tt && /*$showProgress$*/ | ||
h[4] !== St && /*$showProgress$*/ | ||
h[7] ? C ? T[0] & /*$layout$, $showProgress$*/ | ||
@@ -1275,3 +1279,3 @@ 144 && O(C, 1) : (C = Ae(), C.c(), O(C, 1), C.m(t, l)) : C && (at(), B(C, 1, 1, () => { | ||
}), lt()), I && I.p && (!_ || T[0] & /*$$scope*/ | ||
536870912) && mt( | ||
536870912) && yt( | ||
I, | ||
@@ -1282,3 +1286,3 @@ R, | ||
h[29], | ||
_ ? bt( | ||
_ ? $t( | ||
R, | ||
@@ -1289,3 +1293,3 @@ /*$$scope*/ | ||
null | ||
) : yt( | ||
) : bt( | ||
/*$$scope*/ | ||
@@ -1296,3 +1300,3 @@ h[29] | ||
), S && S.p && (!_ || T[0] & /*$$scope*/ | ||
536870912) && mt( | ||
536870912) && yt( | ||
S, | ||
@@ -1303,3 +1307,3 @@ N, | ||
h[29], | ||
_ ? bt( | ||
_ ? $t( | ||
N, | ||
@@ -1310,3 +1314,3 @@ /*$$scope*/ | ||
dr | ||
) : yt( | ||
) : bt( | ||
/*$$scope*/ | ||
@@ -1317,3 +1321,3 @@ h[29] | ||
), /*$layout$*/ | ||
h[4] === Tt && /*$showProgress$*/ | ||
h[4] === St && /*$showProgress$*/ | ||
h[7] ? E ? T[0] & /*$layout$, $showProgress$*/ | ||
@@ -1357,3 +1361,3 @@ 144 && O(E, 1) : (E = Ne(), E.c(), O(E, 1), E.m(u, d)) : E && (at(), B(E, 1, 1, () => { | ||
}, | ||
p: gt, | ||
p: vt, | ||
d(n) { | ||
@@ -1369,3 +1373,3 @@ n && j(t), e = !1, r(); | ||
o[30].title | ||
), n = vt( | ||
), n = mt( | ||
r, | ||
@@ -1386,3 +1390,3 @@ o, | ||
n ? n.p && (!e || a[0] & /*$$scope*/ | ||
536870912) && mt( | ||
536870912) && yt( | ||
n, | ||
@@ -1393,3 +1397,3 @@ r, | ||
i[29], | ||
e ? bt( | ||
e ? $t( | ||
r, | ||
@@ -1400,3 +1404,3 @@ /*$$scope*/ | ||
wr | ||
) : yt( | ||
) : bt( | ||
/*$$scope*/ | ||
@@ -1450,3 +1454,3 @@ i[29] | ||
o[30].description | ||
), n = vt( | ||
), n = mt( | ||
r, | ||
@@ -1467,3 +1471,3 @@ o, | ||
n ? n.p && (!e || a[0] & /*$$scope*/ | ||
536870912) && mt( | ||
536870912) && yt( | ||
n, | ||
@@ -1474,3 +1478,3 @@ r, | ||
i[29], | ||
e ? bt( | ||
e ? $t( | ||
r, | ||
@@ -1481,3 +1485,3 @@ /*$$scope*/ | ||
ur | ||
) : yt( | ||
) : bt( | ||
/*$$scope*/ | ||
@@ -1608,3 +1612,3 @@ i[29] | ||
o[30].prevText | ||
), i = vt( | ||
), i = mt( | ||
s, | ||
@@ -1630,3 +1634,3 @@ o, | ||
i ? i.p && (!e || c[0] & /*$$scope*/ | ||
536870912) && mt( | ||
536870912) && yt( | ||
i, | ||
@@ -1637,3 +1641,3 @@ s, | ||
l[29], | ||
e ? bt( | ||
e ? $t( | ||
s, | ||
@@ -1644,3 +1648,3 @@ /*$$scope*/ | ||
fr | ||
) : yt( | ||
) : bt( | ||
/*$$scope*/ | ||
@@ -1673,3 +1677,3 @@ l[29] | ||
}, | ||
p: gt, | ||
p: vt, | ||
d(r) { | ||
@@ -1734,3 +1738,3 @@ r && j(t); | ||
o[30].nextText | ||
), i = vt( | ||
), i = mt( | ||
s, | ||
@@ -1756,3 +1760,3 @@ o, | ||
i ? i.p && (!e || c[0] & /*$$scope*/ | ||
536870912) && mt( | ||
536870912) && yt( | ||
i, | ||
@@ -1763,3 +1767,3 @@ s, | ||
l[29], | ||
e ? bt( | ||
e ? $t( | ||
s, | ||
@@ -1770,3 +1774,3 @@ /*$$scope*/ | ||
hr | ||
) : yt( | ||
) : bt( | ||
/*$$scope*/ | ||
@@ -1878,3 +1882,3 @@ l[29] | ||
M(o, X, (g) => e(10, d = g)); | ||
const Z = D(S, "layout", Tt); | ||
const Z = D(S, "layout", St); | ||
M(o, Z, (g) => e(4, i = g)); | ||
@@ -1955,3 +1959,3 @@ const G = Qe(C.store, R), F = L([h, G, R, Z], ([g, J, v, z]) => { | ||
constructor(t) { | ||
const { steps: e } = t, r = _t(t), n = new kr(r); | ||
const { steps: e } = t, r = gt(t), n = new kr(r); | ||
for (const s of [ | ||
@@ -1958,0 +1962,0 @@ "beforeStepChange", |
{ | ||
"name": "@thisway/next", | ||
"version": "0.7.11", | ||
"version": "0.7.12", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
110973
2412