@nextrap/nte-nav 1.1.23 → 1.1.24
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/CHANGELOG.md +4 -0
- package/index.js +17 -17
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var ue = Object.create, it = Object.defineProperty, _e = Object.getOwnPropertyDe
|
|
|
12
12
|
}, fe = (t, e, i) => e in t ? it(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, kt = (t, e) => it(t, "name", { value: e, configurable: !0 }), ge = (t) => [, , , ue((t == null ? void 0 : t[Mt("metadata")]) ?? null)], Lt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], F = (t) => t !== void 0 && typeof t != "function" ? W("Function expected") : t, be = (t, e, i, o, a) => ({ kind: Lt[t], name: e, metadata: o, addInitializer: (n) => i._ ? W("Already initialized") : a.push(F(n || null)) }), me = (t, e) => fe(e, Mt("metadata"), t[3]), S = (t, e, i, o) => {
|
|
13
13
|
for (var a = 0, n = t[e >> 1], h = n && n.length; a < h; a++) e & 1 ? n[a].call(i) : o = n[a].call(i, o);
|
|
14
14
|
return o;
|
|
15
|
-
},
|
|
15
|
+
}, B = (t, e, i, o, a, n) => {
|
|
16
16
|
var h, s, m, p, f, r = e & 7, g = !!(e & 8), d = !!(e & 16), _ = r > 3 ? t.length + 1 : r ? g ? 1 : 2 : 0, E = Lt[r + 5], z = r > 3 && (t[_ - 1] = []), A = t[_] || (t[_] = []), c = r && (!d && !g && (a = a.prototype), r < 5 && (r > 3 || !d) && _e(r < 4 ? a : { get [i]() {
|
|
17
17
|
return Et(this, n);
|
|
18
18
|
}, set [i](l) {
|
|
@@ -22,9 +22,9 @@ var ue = Object.create, it = Object.defineProperty, _e = Object.getOwnPropertyDe
|
|
|
22
22
|
for (var w = o.length - 1; w >= 0; w--)
|
|
23
23
|
p = be(r, i, m = {}, t[3], A), r && (p.static = g, p.private = d, f = p.access = { has: d ? (l) => we(a, l) : (l) => i in l }, r ^ 3 && (f.get = d ? (l) => (r ^ 1 ? Et : ye)(l, a, r ^ 4 ? n : c.get) : (l) => l[i]), r > 2 && (f.set = d ? (l, y) => zt(l, a, y, r ^ 4 ? n : c.set) : (l, y) => l[i] = y)), s = (0, o[w])(r ? r < 4 ? d ? n : c[E] : r > 4 ? void 0 : { get: c.get, set: c.set } : a, p), m._ = 1, r ^ 4 || s === void 0 ? F(s) && (r > 4 ? z.unshift(s) : r ? d ? n = s : c[E] = s : a = s) : typeof s != "object" || s === null ? W("Object expected") : (F(h = s.get) && (c.get = h), F(h = s.set) && (c.set = h), F(h = s.init) && z.unshift(h));
|
|
24
24
|
return r || me(t, a), c && it(a, i, c), d ? r ^ 4 ? n : c : a;
|
|
25
|
-
}, rt = (t, e, i) => e.has(t) || W("Cannot " + i), we = (t, e) => Object(e) !== e ? W('Cannot use the "in" operator on this value') : t.has(e), Et = (t, e, i) => (rt(t, e, "read from private field"), i ? i.call(t) : e.get(t)), D = (t, e, i) => e.has(t) ? W("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), zt = (t, e, i, o) => (rt(t, e, "write to private field"), o ? o.call(t, i) : e.set(t, i), i), ye = (t, e, i) => (rt(t, e, "access private method"), i), Wt,
|
|
25
|
+
}, rt = (t, e, i) => e.has(t) || W("Cannot " + i), we = (t, e) => Object(e) !== e ? W('Cannot use the "in" operator on this value') : t.has(e), Et = (t, e, i) => (rt(t, e, "read from private field"), i ? i.call(t) : e.get(t)), D = (t, e, i) => e.has(t) ? W("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), zt = (t, e, i, o) => (rt(t, e, "write to private field"), o ? o.call(t, i) : e.set(t, i), i), ye = (t, e, i) => (rt(t, e, "access private method"), i), Wt, Bt, Rt, It, At, X, Dt, u, at, nt, ot, st, lt;
|
|
26
26
|
Dt = [Q("nte-nav")];
|
|
27
|
-
class k extends (X = K, At = [N({ type: String, reflect: !0 })], It = [N({ type: String, reflect: !0 })],
|
|
27
|
+
class k extends (X = K, At = [N({ type: String, reflect: !0 })], It = [N({ type: String, reflect: !0 })], Rt = [N({ type: String, reflect: !0, attribute: "transfer-to" })], Bt = [N({ type: String, reflect: !1, attribute: "data-group-name" })], Wt = [V()], X) {
|
|
28
28
|
constructor() {
|
|
29
29
|
super(), D(this, at, S(u, 8, this, "slave")), S(u, 11, this), D(this, nt, S(u, 12, this, "99999px")), S(u, 15, this), D(this, ot, S(u, 16, this, "")), S(u, 19, this), D(this, st, S(u, 20, this, "")), S(u, 23, this), D(this, lt, S(u, 24, this, !1)), S(u, 27, this);
|
|
30
30
|
}
|
|
@@ -100,18 +100,18 @@ nt = /* @__PURE__ */ new WeakMap();
|
|
|
100
100
|
ot = /* @__PURE__ */ new WeakMap();
|
|
101
101
|
st = /* @__PURE__ */ new WeakMap();
|
|
102
102
|
lt = /* @__PURE__ */ new WeakMap();
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
k =
|
|
103
|
+
B(u, 4, "mode", At, k, at);
|
|
104
|
+
B(u, 4, "breakpoint", It, k, nt);
|
|
105
|
+
B(u, 4, "transferTo", Rt, k, ot);
|
|
106
|
+
B(u, 4, "dataGroupName", Bt, k, st);
|
|
107
|
+
B(u, 4, "_isTransferred", Wt, k, lt);
|
|
108
|
+
k = B(u, 0, "NteNav", Dt, k);
|
|
109
109
|
k.styles = [J(ve)];
|
|
110
110
|
S(u, 1, k);
|
|
111
111
|
const Se = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--bg: transparent;--spacer-bg: transparent;--container-width: var(--nt-container-width, 100%);--brand-height: 80px;--spacer-height: 80px;width:100vw;margin:0}:host(a){height:85px;width:auto}#wrapper{position:relative;left:0;top:0;right:0;width:100%}#spacer{position:relative;top:0;left:0;width:100%;transition:height .3s ease-in-out;height:var(--spacer-height);background-color:var(--spacer-bg)}#navbar{position:absolute;top:0;width:100vw;height:auto;background-color:var(--bg);z-index:1000}#main{width:100vw;display:block}";
|
|
112
|
-
var $e = Object.create, dt = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, Ft = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t),
|
|
112
|
+
var $e = Object.create, dt = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, Ft = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), R = (t) => {
|
|
113
113
|
throw TypeError(t);
|
|
114
|
-
}, ke = (t, e, i) => e in t ? dt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, Nt = (t, e) => dt(t, "name", { value: e, configurable: !0 }), Ee = (t) => [, , , $e((t == null ? void 0 : t[Ft("metadata")]) ?? null)], Yt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Y = (t) => t !== void 0 && typeof t != "function" ?
|
|
114
|
+
}, ke = (t, e, i) => e in t ? dt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, Nt = (t, e) => dt(t, "name", { value: e, configurable: !0 }), Ee = (t) => [, , , $e((t == null ? void 0 : t[Ft("metadata")]) ?? null)], Yt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Y = (t) => t !== void 0 && typeof t != "function" ? R("Function expected") : t, ze = (t, e, i, o, a) => ({ kind: Yt[t], name: e, metadata: o, addInitializer: (n) => i._ ? R("Already initialized") : a.push(Y(n || null)) }), Ne = (t, e) => ke(e, Ft("metadata"), t[3]), Z = (t, e, i, o) => {
|
|
115
115
|
for (var a = 0, n = t[e >> 1], h = n && n.length; a < h; a++) e & 1 ? n[a].call(i) : o = n[a].call(i, o);
|
|
116
116
|
return o;
|
|
117
117
|
}, Ut = (t, e, i, o, a, n) => {
|
|
@@ -122,9 +122,9 @@ var $e = Object.create, dt = Object.defineProperty, xe = Object.getOwnPropertyDe
|
|
|
122
122
|
} }, i));
|
|
123
123
|
r ? d && r < 4 && Nt(n, (r > 2 ? "set " : r > 1 ? "get " : "") + i) : Nt(a, i);
|
|
124
124
|
for (var w = o.length - 1; w >= 0; w--)
|
|
125
|
-
p = ze(r, i, m = {}, t[3], A), r && (p.static = g, p.private = d, f = p.access = { has: d ? (l) => Oe(a, l) : (l) => i in l }, r ^ 3 && (f.get = d ? (l) => (r ^ 1 ? Ot : Te)(l, a, r ^ 4 ? n : c.get) : (l) => l[i]), r > 2 && (f.set = d ? (l, y) => Ct(l, a, y, r ^ 4 ? n : c.set) : (l, y) => l[i] = y)), s = (0, o[w])(r ? r < 4 ? d ? n : c[E] : r > 4 ? void 0 : { get: c.get, set: c.set } : a, p), m._ = 1, r ^ 4 || s === void 0 ? Y(s) && (r > 4 ? z.unshift(s) : r ? d ? n = s : c[E] = s : a = s) : typeof s != "object" || s === null ?
|
|
125
|
+
p = ze(r, i, m = {}, t[3], A), r && (p.static = g, p.private = d, f = p.access = { has: d ? (l) => Oe(a, l) : (l) => i in l }, r ^ 3 && (f.get = d ? (l) => (r ^ 1 ? Ot : Te)(l, a, r ^ 4 ? n : c.get) : (l) => l[i]), r > 2 && (f.set = d ? (l, y) => Ct(l, a, y, r ^ 4 ? n : c.set) : (l, y) => l[i] = y)), s = (0, o[w])(r ? r < 4 ? d ? n : c[E] : r > 4 ? void 0 : { get: c.get, set: c.set } : a, p), m._ = 1, r ^ 4 || s === void 0 ? Y(s) && (r > 4 ? z.unshift(s) : r ? d ? n = s : c[E] = s : a = s) : typeof s != "object" || s === null ? R("Object expected") : (Y(h = s.get) && (c.get = h), Y(h = s.set) && (c.set = h), Y(h = s.init) && z.unshift(h));
|
|
126
126
|
return r || Ne(t, a), c && dt(a, i, c), d ? r ^ 4 ? n : c : a;
|
|
127
|
-
}, ct = (t, e, i) => e.has(t) ||
|
|
127
|
+
}, ct = (t, e, i) => e.has(t) || R("Cannot " + i), Oe = (t, e) => Object(e) !== e ? R('Cannot use the "in" operator on this value') : t.has(e), Ot = (t, e, i) => (ct(t, e, "read from private field"), i ? i.call(t) : e.get(t)), Ce = (t, e, i) => e.has(t) ? R("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), Ct = (t, e, i, o) => (ct(t, e, "write to private field"), o ? o.call(t, i) : e.set(t, i), i), Te = (t, e, i) => (ct(t, e, "access private method"), i), Gt, tt, qt, L, ht;
|
|
128
128
|
qt = [Q("nte-navbar")];
|
|
129
129
|
class G extends (tt = K, Gt = [N({ type: Number, attribute: "scroll-threshold", reflect: !0 })], tt) {
|
|
130
130
|
constructor() {
|
|
@@ -178,12 +178,12 @@ Z(L, 1, G);
|
|
|
178
178
|
const Pe = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--container-width: var(--nt-container-width, 100%);--background: transparent;--text-color: var(--nt-text);--height: auto;--brand-height: 80px;display:block;height:100%;width:100vw}:host(.hide-on-scroll){transition:max-height .3s ease-in-out;max-height:100px}:host(.hide-on-scroll.is-scrolled){max-height:0;overflow:hidden}#main{height:var(--height);transition:height .2s ease-in-out;overflow:visible;width:100%;display:flex;background:var(--background)}#container{width:var(--container-width);margin:0 auto;display:flex}#container #brand:has(slot[empty]){display:none}#container #brand{min-width:0;flex-shrink:1;width:auto;align-items:start;display:flex;height:100%;justify-items:center}#container #nav{display:flex;flex-grow:1;justify-content:end;align-items:center;gap:1rem}";
|
|
179
179
|
var Me = Object.create, pt = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, Ht = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), jt = (t) => {
|
|
180
180
|
throw TypeError(t);
|
|
181
|
-
}, We = (t, e, i) => e in t ? pt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i,
|
|
181
|
+
}, We = (t, e, i) => e in t ? pt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, Be = (t, e) => pt(t, "name", { value: e, configurable: !0 }), Re = (t) => [, , , Me((t == null ? void 0 : t[Ht("metadata")]) ?? null)], Ie = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Jt = (t) => t !== void 0 && typeof t != "function" ? jt("Function expected") : t, Ae = (t, e, i, o, a) => ({ kind: Ie[t], name: e, metadata: o, addInitializer: (n) => i._ ? jt("Already initialized") : a.push(Jt(n || null)) }), De = (t, e) => We(e, Ht("metadata"), t[3]), Fe = (t, e, i, o) => {
|
|
182
182
|
for (var a = 0, n = t[e >> 1], h = n && n.length; a < h; a++) n[a].call(i);
|
|
183
183
|
return o;
|
|
184
184
|
}, Ye = (t, e, i, o, a, n) => {
|
|
185
185
|
var h, s, m, p = e & 7, f = !1, r = 0, g = t[r] || (t[r] = []), d = p && (a = a.prototype, p < 5 && (p > 3 || !f) && Le(a, i));
|
|
186
|
-
|
|
186
|
+
Be(a, i);
|
|
187
187
|
for (var _ = o.length - 1; _ >= 0; _--)
|
|
188
188
|
m = Ae(p, i, s = {}, t[3], g), h = (0, o[_])(a, m), s._ = 1, Jt(h) && (a = h);
|
|
189
189
|
return De(t, a), d && pt(a, i, d), f ? p ^ 4 ? n : d : a;
|
|
@@ -223,7 +223,7 @@ const yt = class yt extends (Qt = K) {
|
|
|
223
223
|
};
|
|
224
224
|
yt.styles = [J(Pe)];
|
|
225
225
|
let q = yt;
|
|
226
|
-
vt =
|
|
226
|
+
vt = Re(Qt);
|
|
227
227
|
q = Ye(vt, 0, "NteNavbarLine", Kt, q);
|
|
228
228
|
Fe(vt, 1, q);
|
|
229
229
|
const Ue = ":host{display:block;--animation-duration: .3s;--auto-aspect-ratio: unset;aspect-ratio:var(--auto-aspect-ratio);height:auto;width:auto}.wrapper{--orig-top: 0;--orig-left: 0;--orig-width: 0;--orig-height: 0;--self-top: 0;--self-left: 0;--self-width: 100%;--self-height: 100%;display:inline-block;width:var(--self-width);height:var(--self-height);object-fit:contain;overflow:visible;position:fixed;opacity:0}.wrapper.initialized{opacity:1}.wrapper{top:var(--self-top);left:var(--self-left);transition:all var(--animation-duration) ease-in-out}.wrapper.inactive{z-index:99999;top:calc(var(--orig-top));left:calc(var(--orig-left));width:var(--orig-width);height:var(--orig-height)}.wrapper.inactive.done{z-index:inherit;visibility:hidden}.wrapper>slot{display:contents}.wrapper ::slotted(*){width:100%;height:100%;object-fit:contain;transition:all .3s ease-in-out}";
|
|
@@ -291,7 +291,7 @@ class $ extends (et = se(le(K)), ae = [N({ type: String, reflect: !0 })], re = [
|
|
|
291
291
|
async firstUpdated() {
|
|
292
292
|
this.log("Waiting for Brand element loading...", this.brandElement), await ce(this.brandElement), await he(1);
|
|
293
293
|
const e = this.brandElement.getBoundingClientRect(), i = e.width / e.height;
|
|
294
|
-
this.log("Setting Aspect ratio:", i), this.style.setProperty("--auto-aspect-ratio", i.toString()), this.log("Brand element is now loaded:", this.brandElement), this.initialized = !0, this.onScroll();
|
|
294
|
+
this.log("Brand element rect:", e), this.log("Setting Aspect ratio:", i), this.style.setProperty("--auto-aspect-ratio", i.toString()), this.log("Brand element is now loaded:", this.brandElement), this.initialized = !0, this.onScroll();
|
|
295
295
|
}
|
|
296
296
|
async connectedCallback() {
|
|
297
297
|
if (await H(), super.connectedCallback(), x(this, P) === null) {
|