@nextrap/nte-nav 1.1.25 → 1.1.26

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/index.js +64 -64
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.1.26 (2025-09-11)
2
+
3
+ This was a version bump only for nte-nav to align it with other projects, there were no code changes.
4
+
1
5
  ## 1.1.25 (2025-09-11)
2
6
 
3
7
  This was a version bump only for nte-nav to align it with other projects, there were no code changes.
package/index.js CHANGED
@@ -1,32 +1,32 @@
1
1
  import { waitForDomContentLoaded as H, isBiggerThanBreakpoint as St, Debouncer as se, SlotTool as Mt } from "@nextrap/nt-framework";
2
2
  import "@nextrap/nte-offcanvas";
3
3
  import { html as G, unsafeCSS as J, LitElement as K } from "lit";
4
- import { customElement as Q, property as N, state as V } from "lit/decorators.js";
4
+ import { customElement as Q, property as C, state as V } from "lit/decorators.js";
5
5
  import { createRef as $t, ref as xt } from "lit/directives/ref.js";
6
- import { EventBindingsMixin as le, LoggingMixin as de, Listen as ce, waitForLoad as he, sleep as kt } from "@trunkjs/browser-utils";
7
- import { styleMap as pe } from "lit/directives/style-map.js";
6
+ import { EventBindingsMixin as le, LoggingMixin as de, Listen as ce, waitForLoad as he, sleep as kt, create_element as pe } from "@trunkjs/browser-utils";
7
+ import { styleMap as ve } from "lit/directives/style-map.js";
8
8
  import "@nextrap/nte-burger";
9
- const ve = ":host{--container-width: var(--nt-container-width);--text-color: var(--nt-text);--hover-color: var(--nt-primary);--hover-text-color: var(--nt-text-on-primary);--transition: .2s ease-in-out;--submenu-bg: var(--nt-light);--submenu-text-color: var(--nt-text);--justify-content: center;--sidemenu-bg: var(--nt-primary-subtle);--justify-sidebar-burger: flex-end;--height: auto;--default-alpha: .7;height:var(--height);display:block}nav{height:100%}#main{height:100%}#burger-wrapper{padding:15px}#text{padding-right:10px}#burger-default{cursor:pointer}#burger-default slot::slotted(span){color:rgb(from var(--text-color) r g b/var(--default-alpha));transition:color var(--transition)}#burger-default nte-burger{--color: rgb(from var(--text-color) r g b / var(--default-alpha))}#burger-default:hover slot::slotted(span){color:rgb(from var(--text-color) r g b/1)}#burger-default:hover nte-burger{--color: rgb(from var(--text-color) r g b / 1)}";
10
- var ue = Object.create, it = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, Wt = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), W = (t) => {
9
+ const ue = ":host{--container-width: var(--nt-container-width);--text-color: var(--nt-text);--hover-color: var(--nt-primary);--hover-text-color: var(--nt-text-on-primary);--transition: .2s ease-in-out;--submenu-bg: var(--nt-light);--submenu-text-color: var(--nt-text);--justify-content: center;--sidemenu-bg: var(--nt-primary-subtle);--justify-sidebar-burger: flex-end;--height: auto;--default-alpha: .7;height:var(--height);display:block}nav{height:100%}#main{height:100%}#burger-wrapper{padding:15px}#text{padding-right:10px}#burger-default{cursor:pointer}#burger-default slot::slotted(span){color:rgb(from var(--text-color) r g b/var(--default-alpha));transition:color var(--transition)}#burger-default nte-burger{--color: rgb(from var(--text-color) r g b / var(--default-alpha))}#burger-default:hover slot::slotted(span){color:rgb(from var(--text-color) r g b/1)}#burger-default:hover nte-burger{--color: rgb(from var(--text-color) r g b / 1)}";
10
+ var fe = Object.create, it = Object.defineProperty, _e = Object.getOwnPropertyDescriptor, Wt = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), W = (t) => {
11
11
  throw TypeError(t);
12
- }, _e = (t, e, i) => e in t ? it(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, Et = (t, e) => it(t, "name", { value: e, configurable: !0 }), ge = (t) => [, , , ue((t == null ? void 0 : t[Wt("metadata")]) ?? null)], Lt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], D = (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(D(n || null)) }), we = (t, e) => _e(e, Wt("metadata"), t[3]), x = (t, e, i, o) => {
12
+ }, ge = (t, e, i) => e in t ? it(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, Et = (t, e) => it(t, "name", { value: e, configurable: !0 }), be = (t) => [, , , fe((t == null ? void 0 : t[Wt("metadata")]) ?? null)], Lt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], D = (t) => t !== void 0 && typeof t != "function" ? W("Function expected") : t, we = (t, e, i, o, a) => ({ kind: Lt[t], name: e, metadata: o, addInitializer: (n) => i._ ? W("Already initialized") : a.push(D(n || null)) }), me = (t, e) => ge(e, Wt("metadata"), t[3]), $ = (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
  }, L = (t, e, i, o, a, n) => {
16
- var h, s, y, p, g, r = e & 7, b = !!(e & 8), d = !!(e & 16), f = r > 3 ? t.length + 1 : r ? b ? 1 : 2 : 0, z = Lt[r + 5], O = r > 3 && (t[f - 1] = []), R = t[f] || (t[f] = []), c = r && (!d && !b && (a = a.prototype), r < 5 && (r > 3 || !d) && fe(r < 4 ? a : { get [i]() {
16
+ var h, s, m, p, _, r = e & 7, b = !!(e & 8), d = !!(e & 16), f = r > 3 ? t.length + 1 : r ? b ? 1 : 2 : 0, z = Lt[r + 5], O = r > 3 && (t[f - 1] = []), R = t[f] || (t[f] = []), c = r && (!d && !b && (a = a.prototype), r < 5 && (r > 3 || !d) && _e(r < 4 ? a : { get [i]() {
17
17
  return zt(this, n);
18
18
  }, set [i](l) {
19
19
  return Ot(this, n, l);
20
20
  } }, i));
21
21
  r ? d && r < 4 && Et(n, (r > 2 ? "set " : r > 1 ? "get " : "") + i) : Et(a, i);
22
- for (var S = o.length - 1; S >= 0; S--)
23
- p = be(r, i, y = {}, t[3], R), r && (p.static = b, p.private = d, g = p.access = { has: d ? (l) => me(a, l) : (l) => i in l }, r ^ 3 && (g.get = d ? (l) => (r ^ 1 ? zt : ye)(l, a, r ^ 4 ? n : c.get) : (l) => l[i]), r > 2 && (g.set = d ? (l, $) => Ot(l, a, $, r ^ 4 ? n : c.set) : (l, $) => l[i] = $)), s = (0, o[S])(r ? r < 4 ? d ? n : c[z] : r > 4 ? void 0 : { get: c.get, set: c.set } : a, p), y._ = 1, r ^ 4 || s === void 0 ? D(s) && (r > 4 ? O.unshift(s) : r ? d ? n = s : c[z] = s : a = s) : typeof s != "object" || s === null ? W("Object expected") : (D(h = s.get) && (c.get = h), D(h = s.set) && (c.set = h), D(h = s.init) && O.unshift(h));
24
- return r || we(t, a), c && it(a, i, c), d ? r ^ 4 ? n : c : a;
25
- }, rt = (t, e, i) => e.has(t) || W("Cannot " + i), me = (t, e) => Object(e) !== e ? W('Cannot use the "in" operator on this value') : t.has(e), zt = (t, e, i) => (rt(t, e, "read from private field"), i ? i.call(t) : e.get(t)), A = (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), Ot = (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), It, Bt, Rt, At, Dt, X, Ft, u, at, nt, ot, st, lt;
22
+ for (var y = o.length - 1; y >= 0; y--)
23
+ p = we(r, i, m = {}, t[3], R), r && (p.static = b, p.private = d, _ = p.access = { has: d ? (l) => ye(a, l) : (l) => i in l }, r ^ 3 && (_.get = d ? (l) => (r ^ 1 ? zt : Se)(l, a, r ^ 4 ? n : c.get) : (l) => l[i]), r > 2 && (_.set = d ? (l, S) => Ot(l, a, S, r ^ 4 ? n : c.set) : (l, S) => l[i] = S)), s = (0, o[y])(r ? r < 4 ? d ? n : c[z] : r > 4 ? void 0 : { get: c.get, set: c.set } : a, p), m._ = 1, r ^ 4 || s === void 0 ? D(s) && (r > 4 ? O.unshift(s) : r ? d ? n = s : c[z] = s : a = s) : typeof s != "object" || s === null ? W("Object expected") : (D(h = s.get) && (c.get = h), D(h = s.set) && (c.set = h), D(h = s.init) && O.unshift(h));
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), ye = (t, e) => Object(e) !== e ? W('Cannot use the "in" operator on this value') : t.has(e), zt = (t, e, i) => (rt(t, e, "read from private field"), i ? i.call(t) : e.get(t)), A = (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), Ot = (t, e, i, o) => (rt(t, e, "write to private field"), o ? o.call(t, i) : e.set(t, i), i), Se = (t, e, i) => (rt(t, e, "access private method"), i), It, Bt, Rt, At, Dt, X, Ft, u, at, nt, ot, st, lt;
26
26
  Ft = [Q("nte-nav")];
27
- class E extends (X = K, Dt = [N({ type: String, reflect: !0 })], At = [N({ type: String, reflect: !0 })], Rt = [N({ type: String, reflect: !0, attribute: "transfer-to" })], Bt = [N({ type: String, reflect: !1, attribute: "data-group-name" })], It = [V()], X) {
27
+ class E extends (X = K, Dt = [C({ type: String, reflect: !0 })], At = [C({ type: String, reflect: !0 })], Rt = [C({ type: String, reflect: !0, attribute: "transfer-to" })], Bt = [C({ type: String, reflect: !1, attribute: "data-group-name" })], It = [V()], X) {
28
28
  constructor() {
29
- super(), A(this, at, x(u, 8, this, "slave")), x(u, 11, this), A(this, nt, x(u, 12, this, "99999px")), x(u, 15, this), A(this, ot, x(u, 16, this, "")), x(u, 19, this), A(this, st, x(u, 20, this, "")), x(u, 23, this), A(this, lt, x(u, 24, this, !1)), x(u, 27, this);
29
+ super(), A(this, at, $(u, 8, this, "slave")), $(u, 11, this), A(this, nt, $(u, 12, this, "99999px")), $(u, 15, this), A(this, ot, $(u, 16, this, "")), $(u, 19, this), A(this, st, $(u, 20, this, "")), $(u, 23, this), A(this, lt, $(u, 24, this, !1)), $(u, 27, this);
30
30
  }
31
31
  getOffcanvas() {
32
32
  return this.transferTo ? document.querySelector(this.transferTo) : null;
@@ -94,7 +94,7 @@ class E extends (X = K, Dt = [N({ type: String, reflect: !0 })], At = [N({ type:
94
94
  })));
95
95
  }
96
96
  }
97
- u = ge(X);
97
+ u = be(X);
98
98
  at = /* @__PURE__ */ new WeakMap();
99
99
  nt = /* @__PURE__ */ new WeakMap();
100
100
  ot = /* @__PURE__ */ new WeakMap();
@@ -106,29 +106,29 @@ L(u, 4, "transferTo", Rt, E, ot);
106
106
  L(u, 4, "dataGroupName", Bt, E, st);
107
107
  L(u, 4, "_isTransferred", It, E, lt);
108
108
  E = L(u, 0, "NteNav", Ft, E);
109
- E.styles = [J(ve)];
110
- x(u, 1, E);
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, Yt = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), I = (t) => {
109
+ E.styles = [J(ue)];
110
+ $(u, 1, E);
111
+ const $e = "*,*: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 xe = Object.create, dt = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, Yt = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), I = (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[Yt("metadata")]) ?? null)], Gt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], F = (t) => t !== void 0 && typeof t != "function" ? I("Function expected") : t, ze = (t, e, i, o, a) => ({ kind: Gt[t], name: e, metadata: o, addInitializer: (n) => i._ ? I("Already initialized") : a.push(F(n || null)) }), Oe = (t, e) => ke(e, Yt("metadata"), t[3]), Z = (t, e, i, o) => {
114
+ }, Ee = (t, e, i) => e in t ? dt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, Ct = (t, e) => dt(t, "name", { value: e, configurable: !0 }), ze = (t) => [, , , xe((t == null ? void 0 : t[Yt("metadata")]) ?? null)], Gt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], F = (t) => t !== void 0 && typeof t != "function" ? I("Function expected") : t, Oe = (t, e, i, o, a) => ({ kind: Gt[t], name: e, metadata: o, addInitializer: (n) => i._ ? I("Already initialized") : a.push(F(n || null)) }), Ce = (t, e) => Ee(e, Yt("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) => {
118
- var h, s, y, p, g, r = e & 7, b = !!(e & 8), d = !!(e & 16), f = r > 3 ? t.length + 1 : r ? b ? 1 : 2 : 0, z = Gt[r + 5], O = r > 3 && (t[f - 1] = []), R = t[f] || (t[f] = []), c = r && (!d && !b && (a = a.prototype), r < 5 && (r > 3 || !d) && xe(r < 4 ? a : { get [i]() {
119
- return Ct(this, n);
118
+ var h, s, m, p, _, r = e & 7, b = !!(e & 8), d = !!(e & 16), f = r > 3 ? t.length + 1 : r ? b ? 1 : 2 : 0, z = Gt[r + 5], O = r > 3 && (t[f - 1] = []), R = t[f] || (t[f] = []), c = r && (!d && !b && (a = a.prototype), r < 5 && (r > 3 || !d) && ke(r < 4 ? a : { get [i]() {
119
+ return Nt(this, n);
120
120
  }, set [i](l) {
121
121
  return Tt(this, n, l);
122
122
  } }, i));
123
- r ? d && r < 4 && Nt(n, (r > 2 ? "set " : r > 1 ? "get " : "") + i) : Nt(a, i);
124
- for (var S = o.length - 1; S >= 0; S--)
125
- p = ze(r, i, y = {}, t[3], R), r && (p.static = b, p.private = d, g = p.access = { has: d ? (l) => Ne(a, l) : (l) => i in l }, r ^ 3 && (g.get = d ? (l) => (r ^ 1 ? Ct : Te)(l, a, r ^ 4 ? n : c.get) : (l) => l[i]), r > 2 && (g.set = d ? (l, $) => Tt(l, a, $, r ^ 4 ? n : c.set) : (l, $) => l[i] = $)), s = (0, o[S])(r ? r < 4 ? d ? n : c[z] : r > 4 ? void 0 : { get: c.get, set: c.set } : a, p), y._ = 1, r ^ 4 || s === void 0 ? F(s) && (r > 4 ? O.unshift(s) : r ? d ? n = s : c[z] = s : a = s) : typeof s != "object" || s === null ? I("Object expected") : (F(h = s.get) && (c.get = h), F(h = s.set) && (c.set = h), F(h = s.init) && O.unshift(h));
126
- return r || Oe(t, a), c && dt(a, i, c), d ? r ^ 4 ? n : c : a;
127
- }, ct = (t, e, i) => e.has(t) || I("Cannot " + i), Ne = (t, e) => Object(e) !== e ? I('Cannot use the "in" operator on this value') : t.has(e), Ct = (t, e, i) => (ct(t, e, "read from private field"), i ? i.call(t) : e.get(t)), Ce = (t, e, i) => e.has(t) ? I("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), Tt = (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), qt, tt, Ht, M, ht;
123
+ r ? d && r < 4 && Ct(n, (r > 2 ? "set " : r > 1 ? "get " : "") + i) : Ct(a, i);
124
+ for (var y = o.length - 1; y >= 0; y--)
125
+ p = Oe(r, i, m = {}, t[3], R), r && (p.static = b, p.private = d, _ = p.access = { has: d ? (l) => Ne(a, l) : (l) => i in l }, r ^ 3 && (_.get = d ? (l) => (r ^ 1 ? Nt : Pe)(l, a, r ^ 4 ? n : c.get) : (l) => l[i]), r > 2 && (_.set = d ? (l, S) => Tt(l, a, S, r ^ 4 ? n : c.set) : (l, S) => l[i] = S)), s = (0, o[y])(r ? r < 4 ? d ? n : c[z] : r > 4 ? void 0 : { get: c.get, set: c.set } : a, p), m._ = 1, r ^ 4 || s === void 0 ? F(s) && (r > 4 ? O.unshift(s) : r ? d ? n = s : c[z] = s : a = s) : typeof s != "object" || s === null ? I("Object expected") : (F(h = s.get) && (c.get = h), F(h = s.set) && (c.set = h), F(h = s.init) && O.unshift(h));
126
+ return r || Ce(t, a), c && dt(a, i, c), d ? r ^ 4 ? n : c : a;
127
+ }, ct = (t, e, i) => e.has(t) || I("Cannot " + i), Ne = (t, e) => Object(e) !== e ? I('Cannot use the "in" operator on this value') : t.has(e), Nt = (t, e, i) => (ct(t, e, "read from private field"), i ? i.call(t) : e.get(t)), Te = (t, e, i) => e.has(t) ? I("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), Tt = (t, e, i, o) => (ct(t, e, "write to private field"), o ? o.call(t, i) : e.set(t, i), i), Pe = (t, e, i) => (ct(t, e, "access private method"), i), qt, tt, Ht, M, ht;
128
128
  Ht = [Q("nte-navbar")];
129
- class U extends (tt = K, qt = [N({ type: Number, attribute: "scroll-threshold", reflect: !0 })], tt) {
129
+ class U extends (tt = K, qt = [C({ type: Number, attribute: "scroll-threshold", reflect: !0 })], tt) {
130
130
  constructor() {
131
- super(), this.navbarRef = $t(), this.spacerRef = $t(), Ce(this, ht, Z(M, 8, this, 0)), Z(M, 11, this), this._lastScrollY = window.scrollY, this._scrollUpPixels = 0, this._debouncer = void 0, this._debouncer = new se(100, 300), document.addEventListener(
131
+ super(), this.navbarRef = $t(), this.spacerRef = $t(), Te(this, ht, Z(M, 8, this, 0)), Z(M, 11, this), this._lastScrollY = window.scrollY, this._scrollUpPixels = 0, this._debouncer = void 0, this._debouncer = new se(100, 300), document.addEventListener(
132
132
  "scroll",
133
133
  async () => {
134
134
  this.updateScrollState();
@@ -169,24 +169,24 @@ class U extends (tt = K, qt = [N({ type: Number, attribute: "scroll-threshold",
169
169
  `;
170
170
  }
171
171
  }
172
- M = Ee(tt);
172
+ M = ze(tt);
173
173
  ht = /* @__PURE__ */ new WeakMap();
174
174
  Ut(M, 4, "scrollThreshold", qt, U, ht);
175
175
  U = Ut(M, 0, "NteNavbar", Ht, U);
176
- U.styles = [J(Se)];
176
+ U.styles = [J($e)];
177
177
  Z(M, 1, U);
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
- var Me = Object.create, pt = Object.defineProperty, We = Object.getOwnPropertyDescriptor, jt = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), Jt = (t) => {
178
+ const Me = "*,*: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
+ var We = Object.create, pt = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, jt = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), Jt = (t) => {
180
180
  throw TypeError(t);
181
- }, Le = (t, e, i) => e in t ? pt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, Ie = (t, e) => pt(t, "name", { value: e, configurable: !0 }), Be = (t) => [, , , Me((t == null ? void 0 : t[jt("metadata")]) ?? null)], Re = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Kt = (t) => t !== void 0 && typeof t != "function" ? Jt("Function expected") : t, Ae = (t, e, i, o, a) => ({ kind: Re[t], name: e, metadata: o, addInitializer: (n) => i._ ? Jt("Already initialized") : a.push(Kt(n || null)) }), De = (t, e) => Le(e, jt("metadata"), t[3]), Fe = (t, e, i, o) => {
181
+ }, Ie = (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) => [, , , We((t == null ? void 0 : t[jt("metadata")]) ?? null)], Ae = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Kt = (t) => t !== void 0 && typeof t != "function" ? Jt("Function expected") : t, De = (t, e, i, o, a) => ({ kind: Ae[t], name: e, metadata: o, addInitializer: (n) => i._ ? Jt("Already initialized") : a.push(Kt(n || null)) }), Fe = (t, e) => Ie(e, jt("metadata"), t[3]), Ye = (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
- }, Ye = (t, e, i, o, a, n) => {
185
- var h, s, y, p = e & 7, g = !1, r = 0, b = t[r] || (t[r] = []), d = p && (a = a.prototype, p < 5 && (p > 3 || !g) && We(a, i));
186
- Ie(a, i);
184
+ }, Ge = (t, e, i, o, a, n) => {
185
+ var h, s, m, p = e & 7, _ = !1, r = 0, b = t[r] || (t[r] = []), d = p && (a = a.prototype, p < 5 && (p > 3 || !_) && Le(a, i));
186
+ Be(a, i);
187
187
  for (var f = o.length - 1; f >= 0; f--)
188
- y = Ae(p, i, s = {}, t[3], b), h = (0, o[f])(a, y), s._ = 1, Kt(h) && (a = h);
189
- return De(t, a), d && pt(a, i, d), g ? p ^ 4 ? n : d : a;
188
+ m = De(p, i, s = {}, t[3], b), h = (0, o[f])(a, m), s._ = 1, Kt(h) && (a = h);
189
+ return Fe(t, a), d && pt(a, i, d), _ ? p ^ 4 ? n : d : a;
190
190
  }, Qt, vt, Vt;
191
191
  Qt = [Q("nte-navbar-line")];
192
192
  const yt = class yt extends (Vt = K) {
@@ -221,32 +221,32 @@ const yt = class yt extends (Vt = K) {
221
221
  `;
222
222
  }
223
223
  };
224
- yt.styles = [J(Pe)];
224
+ yt.styles = [J(Me)];
225
225
  let q = yt;
226
- vt = Be(Vt);
227
- q = Ye(vt, 0, "NteNavbarLine", Qt, q);
228
- Fe(vt, 1, q);
229
- const Ge = ":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}";
230
- var Ue = Object.create, ut = Object.defineProperty, qe = Object.getOwnPropertyDescriptor, Xt = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), B = (t) => {
226
+ vt = Re(Vt);
227
+ q = Ge(vt, 0, "NteNavbarLine", Qt, q);
228
+ Ye(vt, 1, q);
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}";
230
+ var qe = Object.create, ut = Object.defineProperty, He = Object.getOwnPropertyDescriptor, Xt = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), B = (t) => {
231
231
  throw TypeError(t);
232
- }, He = (t, e, i) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, Pt = (t, e) => ut(t, "name", { value: e, configurable: !0 }), je = (t) => [, , , Ue((t == null ? void 0 : t[Xt("metadata")]) ?? null)], Zt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Y = (t) => t !== void 0 && typeof t != "function" ? B("Function expected") : t, Je = (t, e, i, o, a) => ({ kind: Zt[t], name: e, metadata: o, addInitializer: (n) => i._ ? B("Already initialized") : a.push(Y(n || null)) }), Ke = (t, e) => He(e, Xt("metadata"), t[3]), w = (t, e, i, o) => {
232
+ }, je = (t, e, i) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, Pt = (t, e) => ut(t, "name", { value: e, configurable: !0 }), Je = (t) => [, , , qe((t == null ? void 0 : t[Xt("metadata")]) ?? null)], Zt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Y = (t) => t !== void 0 && typeof t != "function" ? B("Function expected") : t, Ke = (t, e, i, o, a) => ({ kind: Zt[t], name: e, metadata: o, addInitializer: (n) => i._ ? B("Already initialized") : a.push(Y(n || null)) }), Qe = (t, e) => je(e, Xt("metadata"), t[3]), w = (t, e, i, o) => {
233
233
  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);
234
234
  return o;
235
235
  }, P = (t, e, i, o, a, n) => {
236
- var h, s, y, p, g, r = e & 7, b = !!(e & 8), d = !!(e & 16), f = r > 3 ? t.length + 1 : r ? b ? 1 : 2 : 0, z = Zt[r + 5], O = r > 3 && (t[f - 1] = []), R = t[f] || (t[f] = []), c = r && (!d && !b && (a = a.prototype), r < 5 && (r > 3 || !d) && qe(r < 4 ? a : { get [i]() {
237
- return _(this, n);
236
+ var h, s, m, p, _, r = e & 7, b = !!(e & 8), d = !!(e & 16), f = r > 3 ? t.length + 1 : r ? b ? 1 : 2 : 0, z = Zt[r + 5], O = r > 3 && (t[f - 1] = []), R = t[f] || (t[f] = []), c = r && (!d && !b && (a = a.prototype), r < 5 && (r > 3 || !d) && He(r < 4 ? a : { get [i]() {
237
+ return g(this, n);
238
238
  }, set [i](l) {
239
239
  return j(this, n, l);
240
240
  } }, i));
241
241
  r ? d && r < 4 && Pt(n, (r > 2 ? "set " : r > 1 ? "get " : "") + i) : Pt(a, i);
242
- for (var S = o.length - 1; S >= 0; S--)
243
- p = Je(r, i, y = {}, t[3], R), r && (p.static = b, p.private = d, g = p.access = { has: d ? (l) => Qe(a, l) : (l) => i in l }, r ^ 3 && (g.get = d ? (l) => (r ^ 1 ? _ : Ve)(l, a, r ^ 4 ? n : c.get) : (l) => l[i]), r > 2 && (g.set = d ? (l, $) => j(l, a, $, r ^ 4 ? n : c.set) : (l, $) => l[i] = $)), s = (0, o[S])(r ? r < 4 ? d ? n : c[z] : r > 4 ? void 0 : { get: c.get, set: c.set } : a, p), y._ = 1, r ^ 4 || s === void 0 ? Y(s) && (r > 4 ? O.unshift(s) : r ? d ? n = s : c[z] = s : a = s) : typeof s != "object" || s === null ? B("Object expected") : (Y(h = s.get) && (c.get = h), Y(h = s.set) && (c.set = h), Y(h = s.init) && O.unshift(h));
244
- return r || Ke(t, a), c && ut(a, i, c), d ? r ^ 4 ? n : c : a;
245
- }, ft = (t, e, i) => e.has(t) || B("Cannot " + i), Qe = (t, e) => Object(e) !== e ? B('Cannot use the "in" operator on this value') : t.has(e), _ = (t, e, i) => (ft(t, e, "read from private field"), i ? i.call(t) : e.get(t)), C = (t, e, i) => e.has(t) ? B("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), j = (t, e, i, o) => (ft(t, e, "write to private field"), o ? o.call(t, i) : e.set(t, i), i), Ve = (t, e, i) => (ft(t, e, "access private method"), i), te, ee, ie, re, ae, ne, et, oe, v, _t, gt, bt, wt, mt, m, T;
242
+ for (var y = o.length - 1; y >= 0; y--)
243
+ p = Ke(r, i, m = {}, t[3], R), r && (p.static = b, p.private = d, _ = p.access = { has: d ? (l) => Ve(a, l) : (l) => i in l }, r ^ 3 && (_.get = d ? (l) => (r ^ 1 ? g : Xe)(l, a, r ^ 4 ? n : c.get) : (l) => l[i]), r > 2 && (_.set = d ? (l, S) => j(l, a, S, r ^ 4 ? n : c.set) : (l, S) => l[i] = S)), s = (0, o[y])(r ? r < 4 ? d ? n : c[z] : r > 4 ? void 0 : { get: c.get, set: c.set } : a, p), m._ = 1, r ^ 4 || s === void 0 ? Y(s) && (r > 4 ? O.unshift(s) : r ? d ? n = s : c[z] = s : a = s) : typeof s != "object" || s === null ? B("Object expected") : (Y(h = s.get) && (c.get = h), Y(h = s.set) && (c.set = h), Y(h = s.init) && O.unshift(h));
244
+ return r || Qe(t, a), c && ut(a, i, c), d ? r ^ 4 ? n : c : a;
245
+ }, ft = (t, e, i) => e.has(t) || B("Cannot " + i), Ve = (t, e) => Object(e) !== e ? B('Cannot use the "in" operator on this value') : t.has(e), g = (t, e, i) => (ft(t, e, "read from private field"), i ? i.call(t) : e.get(t)), N = (t, e, i) => e.has(t) ? B("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), j = (t, e, i, o) => (ft(t, e, "write to private field"), o ? o.call(t, i) : e.set(t, i), i), Xe = (t, e, i) => (ft(t, e, "access private method"), i), te, ee, ie, re, ae, ne, et, oe, v, _t, gt, bt, wt, mt, x, T;
246
246
  oe = [Q("nte-nav-brand-relocator")];
247
- class k extends (et = le(de(K)), ne = [N({ type: String, reflect: !0 })], ae = [N({ type: Boolean, reflect: !0 })], re = [N({ type: String, reflect: !0 })], ie = [V()], ee = [V()], te = [ce("scroll", { target: "window", options: { passive: !0 } })], et) {
247
+ class k extends (et = le(de(K)), ne = [C({ type: String, reflect: !0 })], ae = [C({ type: Boolean, reflect: !0 })], re = [C({ type: String, reflect: !0 })], ie = [V()], ee = [V()], te = [ce("scroll", { target: "window", options: { passive: !0 } })], et) {
248
248
  constructor() {
249
- super(...arguments), w(v, 5, this), C(this, _t, w(v, 8, this, ".brand-image")), w(v, 11, this), C(this, gt, w(v, 12, this, null)), w(v, 15, this), C(this, bt, w(v, 16, this, "auto")), w(v, 19, this), C(this, wt, w(v, 20, this, !1)), w(v, 23, this), C(this, mt, w(v, 24, this, !1)), w(v, 27, this), C(this, m, null), C(this, T, null);
249
+ super(...arguments), w(v, 5, this), N(this, _t, w(v, 8, this, ".brand-image")), w(v, 11, this), N(this, gt, w(v, 12, this, null)), w(v, 15, this), N(this, bt, w(v, 16, this, "auto")), w(v, 19, this), N(this, wt, w(v, 20, this, !1)), w(v, 23, this), N(this, mt, w(v, 24, this, !1)), w(v, 27, this), N(this, x, null), N(this, T, null);
250
250
  }
251
251
  onScroll() {
252
252
  if (this.mode !== "auto") {
@@ -260,7 +260,7 @@ class k extends (et = le(de(K)), ne = [N({ type: String, reflect: !0 })], ae = [
260
260
  this.log("Animation ended - finalizing state"), this.active || (this.brandElement.style.visibility = "visible", this.done = !0);
261
261
  }
262
262
  get brandElement() {
263
- return _(this, T) || (j(this, T, document.querySelector(this.brandSelector)), _(this, T) || this.warn(`Brand element not found using selector: ${this.brandSelector}`)), _(this, T);
263
+ return g(this, T) || (j(this, T, document.querySelector(this.brandSelector)), g(this, T) || this.warn(`Brand element not found using selector: ${this.brandSelector}`)), g(this, T);
264
264
  }
265
265
  render() {
266
266
  var a;
@@ -279,7 +279,7 @@ class k extends (et = le(de(K)), ne = [N({ type: String, reflect: !0 })], ae = [
279
279
  };
280
280
  return G`<div
281
281
  class="wrapper ${this.active ? "" : "inactive"} ${this.done ? "done" : ""} ${this.initialized ? "initialized" : ""}"
282
- style=${pe(o)}
282
+ style=${ve(o)}
283
283
  @transitionend=${() => this.onanimationEnd()}
284
284
  >
285
285
  <slot></slot>
@@ -287,7 +287,7 @@ class k extends (et = le(de(K)), ne = [N({ type: String, reflect: !0 })], ae = [
287
287
  }
288
288
  update(e) {
289
289
  var i;
290
- e.has("active") && this.active === !0 && ((i = _(this, T)) == null || i.style.setProperty("visibility", "hidden"), this.done = !1), super.update(e);
290
+ e.has("active") && this.active === !0 && ((i = g(this, T)) == null || i.style.setProperty("visibility", "hidden"), this.done = !1), super.update(e);
291
291
  }
292
292
  async firstUpdated() {
293
293
  var i, o, a;
@@ -295,30 +295,30 @@ class k extends (et = le(de(K)), ne = [N({ type: String, reflect: !0 })], ae = [
295
295
  this.warn(`Brand element not found using selector: ${this.brandSelector}`);
296
296
  return;
297
297
  }
298
- for (this.log("Waiting for Ghost element loading...", _(this, m)), await he(_(this, m)), await kt(10); !((i = _(this, m)) != null && i.naturalWidth); )
299
- this.log("Waiting for Ghost element to have naturalWidth...", _(this, m)), await kt(100);
300
- const e = ((o = _(this, m)) == null ? void 0 : o.naturalWidth) / ((a = _(this, m)) == null ? void 0 : a.naturalHeight);
298
+ for (this.log("Waiting for Ghost element loading...", g(this, x)), await he(g(this, x)), await kt(10); !((i = g(this, x)) != null && i.naturalWidth); )
299
+ this.log("Waiting for Ghost element to have naturalWidth...", g(this, x)), await kt(100);
300
+ const e = ((o = g(this, x)) == null ? void 0 : o.naturalWidth) / ((a = g(this, x)) == null ? void 0 : a.naturalHeight);
301
301
  this.log("Setting Aspect ratio:", e), this.style.setProperty("--auto-aspect-ratio", e.toString()), this.log("Brand element is now loaded:", this.brandElement), this.initialized = !0, this.onScroll();
302
302
  }
303
303
  async connectedCallback() {
304
- if (await H(), _(this, m) === null) {
304
+ if (await H(), g(this, x) === null) {
305
305
  const e = this.brandElement;
306
306
  if (this.log("first connectedCallback() on Brand element:", e), !e) {
307
307
  this.warn(`Brand element not found using selector: ${this.brandSelector}`);
308
308
  return;
309
309
  }
310
- _(this, m) || (j(this, m, e.cloneNode(!0)), this.appendChild(_(this, m)), this.onScroll());
310
+ this.hasChildNodes() || (j(this, x, pe("img", { src: e.getAttribute("src") })), this.appendChild(g(this, x)), this.onScroll());
311
311
  }
312
312
  super.connectedCallback();
313
313
  }
314
314
  }
315
- v = je(et);
315
+ v = Je(et);
316
316
  _t = /* @__PURE__ */ new WeakMap();
317
317
  gt = /* @__PURE__ */ new WeakMap();
318
318
  bt = /* @__PURE__ */ new WeakMap();
319
319
  wt = /* @__PURE__ */ new WeakMap();
320
320
  mt = /* @__PURE__ */ new WeakMap();
321
- m = /* @__PURE__ */ new WeakMap();
321
+ x = /* @__PURE__ */ new WeakMap();
322
322
  T = /* @__PURE__ */ new WeakMap();
323
323
  P(v, 4, "brandSelector", ne, k, _t);
324
324
  P(v, 4, "active", ae, k, gt);
@@ -327,7 +327,7 @@ P(v, 4, "done", ie, k, wt);
327
327
  P(v, 4, "initialized", ee, k, mt);
328
328
  P(v, 1, "onScroll", te, k);
329
329
  k = P(v, 0, "NteNavBrandRelocator", oe, k);
330
- k.styles = [J(Ge)];
330
+ k.styles = [J(Ue)];
331
331
  w(v, 1, k);
332
332
  console.log("Loading nte-nav...");
333
333
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextrap/nte-nav",
3
- "version": "1.1.25",
3
+ "version": "1.1.26",
4
4
  "main": "./index.js",
5
5
  "dependencies": {
6
6
  "@nextrap/nt-framework": "^1.1.1",