Add bundled fonts, token CSS, and local font-face loading

This commit is contained in:
2026-09-20 10:37:50 -04:00
parent edca25affa
commit 9ddc0dba20
19 changed files with 520 additions and 186 deletions
@@ -0,0 +1,76 @@
/* ============================================================
NestQuest — Parent admin card tokens
Surface: phone, 390x844 reference. Plain CubeCraft styling,
no tabletop treatment, plain domain words in the UI.
Scope on the card host: nestquest-admin-card.
Derived from the approved mockups (admin screens 1d-1i).
Two densities were built; COMPACT is the default. Flip
--nq-a-density-* to the roomy values for the alternative.
============================================================ */
:host {
/* ── Brand + neutrals (CubeCraft tokens, verbatim) ─────── */
--nq-brand-blue: #3B3AB8;
--nq-brand-purple: #A035CC;
--nq-brand-gradient: linear-gradient(135deg, var(--nq-brand-blue), var(--nq-brand-purple));
--nq-brand-gradient-h: linear-gradient(90deg, var(--nq-brand-blue), var(--nq-brand-purple));
--nq-a-page: #F4F4F6;
--nq-a-surface: #FFFFFF;
--nq-a-surface-subtle: #FAFAFA;
--nq-a-selected: #EBEBF8; /* row being edited */
--nq-a-border: #E4E4EA;
--nq-a-divider: #EDEDF1;
--nq-a-ink: #18181D;
--nq-a-ink-secondary: #52525E;
--nq-a-ink-tertiary: #70707E; /* inactive rows, unselected nav icons */
--nq-a-success: #15803D;
--nq-a-danger: #DC2626;
--nq-a-danger-strong: #B91C1C;
--nq-a-danger-bg: #FEE2E2;
--nq-a-warning-ink: #92400E;
--nq-a-warning-ink-2: #78350F;
--nq-a-warning-bg: #FEF3C7;
--nq-a-warning-border: rgba(217,119,6,.35);
--nq-a-info-bg: #DBEAFE;
--nq-a-info-ink: #1E3A8A;
--nq-a-info-icon: #1D4ED8;
--nq-a-reversal: #7D28A0; /* un-complete events in history */
/* ── Type ─────────────────────────────────────────────── */
--nq-a-font: Nunito, system-ui, sans-serif;
--nq-a-size-screen: 24px; /* 800, screen title */
--nq-a-size-hero: 32px; /* 800, roomy "8 of 12 done" */
--nq-a-size-card-title: 19px; /* 800, roomy child card */
--nq-a-size-stat: 22px; /* 800, compact stat number */
--nq-a-size-row: 13.5px;/* 700, list row title */
--nq-a-size-meta: 11px; /* 600, row meta */
--nq-a-size-label: 10px; /* 700, uppercase field label */
--nq-a-track-label: .10em;
/* ── Density: COMPACT (default) ───────────────────────── */
--nq-a-density-page-pad: 14px 16px 92px; /* bottom clears the 70px tab bar */
--nq-a-density-gap: 10px;
--nq-a-density-card-pad: 13px;
--nq-a-density-row-pad: 11px 13px;
--nq-a-density-radius: 8px;
--nq-a-density-shadow: none;
/* Density: ROOMY — page-pad 18px 20px 92px; gap 16px;
card-pad 18px; radius 12px; shadow 0 4px 12px rgba(0,0,0,.06) */
/* ── Metrics ──────────────────────────────────────────── */
--nq-a-tabbar-height: 70px; /* + 12px safe-area padding */
--nq-a-tap-min: 44px; /* every row/control clears this */
--nq-a-radius-pill: 9999px;
--nq-a-radius-sheet: 20px 20px 0 0;
--nq-a-sheet-shadow: 0 -8px 28px rgba(9,9,11,.18);
--nq-a-progress-height: 6px; /* 8px roomy, 10px hero */
/* ── Motion ───────────────────────────────────────────── */
--nq-ease-out: cubic-bezier(0, 0, .2, 1);
--nq-dur-micro: 120ms;
--nq-dur-base: 200ms;
--nq-dur-modal: 350ms;
}
+193 -183
View File
@@ -1,15 +1,15 @@
const U = globalThis, k = U.ShadowRoot && (U.ShadyCSS === void 0 || U.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Y = /* @__PURE__ */ Symbol(), I = /* @__PURE__ */ new WeakMap();
let nt = class {
const k = globalThis, M = k.ShadowRoot && (k.ShadyCSS === void 0 || k.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, tt = /* @__PURE__ */ Symbol(), j = /* @__PURE__ */ new WeakMap();
let ot = class {
constructor(t, e, s) {
if (this._$cssResult$ = !0, s !== Y) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
if (this._$cssResult$ = !0, s !== tt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
this.cssText = t, this.t = e;
}
get styleSheet() {
let t = this.o;
const e = this.t;
if (k && t === void 0) {
if (M && t === void 0) {
const s = e !== void 0 && e.length === 1;
s && (t = I.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && I.set(e, t));
s && (t = j.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && j.set(e, t));
}
return t;
}
@@ -17,48 +17,48 @@ let nt = class {
return this.cssText;
}
};
const ot = (r) => new nt(typeof r == "string" ? r : r + "", void 0, Y), ht = (r, t) => {
if (k) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
const U = (i) => new ot(typeof i == "string" ? i : i + "", void 0, tt), ht = (i, t) => {
if (M) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
else for (const e of t) {
const s = document.createElement("style"), i = U.litNonce;
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
const s = document.createElement("style"), n = k.litNonce;
n !== void 0 && s.setAttribute("nonce", n), s.textContent = e.cssText, i.appendChild(s);
}
}, q = k ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
}, I = M ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
let e = "";
for (const s of t.cssRules) e += s.cssText;
return ot(e);
})(r) : r;
const { is: at, defineProperty: lt, getOwnPropertyDescriptor: ct, getOwnPropertyNames: dt, getOwnPropertySymbols: pt, getPrototypeOf: ut } = Object, H = globalThis, Q = H.trustedTypes, $t = Q ? Q.emptyScript : "", _t = H.reactiveElementPolyfillSupport, b = (r, t) => r, R = { toAttribute(r, t) {
return U(e);
})(i) : i;
const { is: dt, defineProperty: pt, getOwnPropertyDescriptor: lt, getOwnPropertyNames: ct, getOwnPropertySymbols: ut, getPrototypeOf: $t } = Object, z = globalThis, Q = z.trustedTypes, ft = Q ? Q.emptyScript : "", gt = z.reactiveElementPolyfillSupport, E = (i, t) => i, T = { toAttribute(i, t) {
switch (t) {
case Boolean:
r = r ? $t : null;
i = i ? ft : null;
break;
case Object:
case Array:
r = r == null ? r : JSON.stringify(r);
i = i == null ? i : JSON.stringify(i);
}
return r;
}, fromAttribute(r, t) {
let e = r;
return i;
}, fromAttribute(i, t) {
let e = i;
switch (t) {
case Boolean:
e = r !== null;
e = i !== null;
break;
case Number:
e = r === null ? null : Number(r);
e = i === null ? null : Number(i);
break;
case Object:
case Array:
try {
e = JSON.parse(r);
e = JSON.parse(i);
} catch {
e = null;
}
}
return e;
} }, tt = (r, t) => !at(r, t), W = { attribute: !0, type: String, converter: R, reflect: !1, useDefault: !1, hasChanged: tt };
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), H.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
let y = class extends HTMLElement {
} }, et = (i, t) => !dt(i, t), W = { attribute: !0, type: String, converter: T, reflect: !1, useDefault: !1, hasChanged: et };
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), z.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
let b = class extends HTMLElement {
static addInitializer(t) {
this._$Ei(), (this.l ??= []).push(t);
}
@@ -67,44 +67,44 @@ let y = class extends HTMLElement {
}
static createProperty(t, e = W) {
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
const s = /* @__PURE__ */ Symbol(), i = this.getPropertyDescriptor(t, s, e);
i !== void 0 && lt(this.prototype, t, i);
const s = /* @__PURE__ */ Symbol(), n = this.getPropertyDescriptor(t, s, e);
n !== void 0 && pt(this.prototype, t, n);
}
}
static getPropertyDescriptor(t, e, s) {
const { get: i, set: n } = ct(this.prototype, t) ?? { get() {
const { get: n, set: r } = lt(this.prototype, t) ?? { get() {
return this[e];
}, set(o) {
this[e] = o;
}, set(a) {
this[e] = a;
} };
return { get: i, set(o) {
const l = i?.call(this);
n?.call(this, o), this.requestUpdate(t, l, s);
return { get: n, set(a) {
const d = n?.call(this);
r?.call(this, a), this.requestUpdate(t, d, s);
}, configurable: !0, enumerable: !0 };
}
static getPropertyOptions(t) {
return this.elementProperties.get(t) ?? W;
}
static _$Ei() {
if (this.hasOwnProperty(b("elementProperties"))) return;
const t = ut(this);
if (this.hasOwnProperty(E("elementProperties"))) return;
const t = $t(this);
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
}
static finalize() {
if (this.hasOwnProperty(b("finalized"))) return;
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(b("properties"))) {
const e = this.properties, s = [...dt(e), ...pt(e)];
for (const i of s) this.createProperty(i, e[i]);
if (this.hasOwnProperty(E("finalized"))) return;
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(E("properties"))) {
const e = this.properties, s = [...ct(e), ...ut(e)];
for (const n of s) this.createProperty(n, e[n]);
}
const t = this[Symbol.metadata];
if (t !== null) {
const e = litPropertyMetadata.get(t);
if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
if (e !== void 0) for (const [s, n] of e) this.elementProperties.set(s, n);
}
this._$Eh = /* @__PURE__ */ new Map();
for (const [e, s] of this.elementProperties) {
const i = this._$Eu(e, s);
i !== void 0 && this._$Eh.set(i, e);
const n = this._$Eu(e, s);
n !== void 0 && this._$Eh.set(n, e);
}
this.elementStyles = this.finalizeStyles(this.styles);
}
@@ -112,8 +112,8 @@ let y = class extends HTMLElement {
const e = [];
if (Array.isArray(t)) {
const s = new Set(t.flat(1 / 0).reverse());
for (const i of s) e.unshift(q(i));
} else t !== void 0 && e.push(q(t));
for (const n of s) e.unshift(I(n));
} else t !== void 0 && e.push(I(t));
return e;
}
static _$Eu(t, e) {
@@ -153,31 +153,31 @@ let y = class extends HTMLElement {
this._$AK(t, s);
}
_$ET(t, e) {
const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
if (i !== void 0 && s.reflect === !0) {
const n = (s.converter?.toAttribute !== void 0 ? s.converter : R).toAttribute(e, s.type);
this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
const s = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, s);
if (n !== void 0 && s.reflect === !0) {
const r = (s.converter?.toAttribute !== void 0 ? s.converter : T).toAttribute(e, s.type);
this._$Em = t, r == null ? this.removeAttribute(n) : this.setAttribute(n, r), this._$Em = null;
}
}
_$AK(t, e) {
const s = this.constructor, i = s._$Eh.get(t);
if (i !== void 0 && this._$Em !== i) {
const n = s.getPropertyOptions(i), o = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : R;
this._$Em = i;
const l = o.fromAttribute(e, n.type);
this[i] = l ?? this._$Ej?.get(i) ?? l, this._$Em = null;
const s = this.constructor, n = s._$Eh.get(t);
if (n !== void 0 && this._$Em !== n) {
const r = s.getPropertyOptions(n), a = typeof r.converter == "function" ? { fromAttribute: r.converter } : r.converter?.fromAttribute !== void 0 ? r.converter : T;
this._$Em = n;
const d = a.fromAttribute(e, r.type);
this[n] = d ?? this._$Ej?.get(n) ?? d, this._$Em = null;
}
}
requestUpdate(t, e, s, i = !1, n) {
requestUpdate(t, e, s, n = !1, r) {
if (t !== void 0) {
const o = this.constructor;
if (i === !1 && (n = this[t]), s ??= o.getPropertyOptions(t), !((s.hasChanged ?? tt)(n, e) || s.useDefault && s.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(o._$Eu(t, s)))) return;
const a = this.constructor;
if (n === !1 && (r = this[t]), s ??= a.getPropertyOptions(t), !((s.hasChanged ?? et)(r, e) || s.useDefault && s.reflect && r === this._$Ej?.get(t) && !this.hasAttribute(a._$Eu(t, s)))) return;
this.C(t, e, s);
}
this.isUpdatePending === !1 && (this._$ES = this._$EP());
}
C(t, e, { useDefault: s, reflect: i, wrapped: n }, o) {
s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), n !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
C(t, e, { useDefault: s, reflect: n, wrapped: r }, a) {
s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, a ?? e ?? this[t]), r !== !0 || a !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), n === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
}
async _$EP() {
this.isUpdatePending = !0;
@@ -196,13 +196,13 @@ let y = class extends HTMLElement {
if (!this.isUpdatePending) return;
if (!this.hasUpdated) {
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
for (const [i, n] of this._$Ep) this[i] = n;
for (const [n, r] of this._$Ep) this[n] = r;
this._$Ep = void 0;
}
const s = this.constructor.elementProperties;
if (s.size > 0) for (const [i, n] of s) {
const { wrapped: o } = n, l = this[i];
o !== !0 || this._$AL.has(i) || l === void 0 || this.C(i, void 0, n, l);
if (s.size > 0) for (const [n, r] of s) {
const { wrapped: a } = r, d = this[n];
a !== !0 || this._$AL.has(n) || d === void 0 || this.C(n, void 0, r, d);
}
}
let t = !1;
@@ -239,70 +239,70 @@ let y = class extends HTMLElement {
firstUpdated(t) {
}
};
y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[b("elementProperties")] = /* @__PURE__ */ new Map(), y[b("finalized")] = /* @__PURE__ */ new Map(), _t?.({ ReactiveElement: y }), (H.reactiveElementVersions ??= []).push("2.1.2");
const L = globalThis, V = (r) => r, O = L.trustedTypes, K = O ? O.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, et = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, st = "?" + _, ft = `<${st}>`, g = document, w = () => g.createComment(""), C = (r) => r === null || typeof r != "object" && typeof r != "function", z = Array.isArray, At = (r) => z(r) || typeof r?.[Symbol.iterator] == "function", T = `[
\f\r]`, S = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Z = /-->/g, J = />/g, f = RegExp(`>|${T}(?:([^\\s"'>=/]+)(${T}*=${T}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), F = /'/g, G = /"/g, it = /^(?:script|style|textarea|title)$/i, mt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), j = mt(1), v = /* @__PURE__ */ Symbol.for("lit-noChange"), d = /* @__PURE__ */ Symbol.for("lit-nothing"), X = /* @__PURE__ */ new WeakMap(), A = g.createTreeWalker(g, 129);
function rt(r, t) {
if (!z(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[E("elementProperties")] = /* @__PURE__ */ new Map(), b[E("finalized")] = /* @__PURE__ */ new Map(), gt?.({ ReactiveElement: b }), (z.reactiveElementVersions ??= []).push("2.1.2");
const R = globalThis, V = (i) => i, N = R.trustedTypes, K = N ? N.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, st = "$lit$", f = `lit$${Math.random().toFixed(9).slice(2)}$`, nt = "?" + f, _t = `<${nt}>`, y = document, x = () => y.createComment(""), w = (i) => i === null || typeof i != "object" && typeof i != "function", D = Array.isArray, mt = (i) => D(i) || typeof i?.[Symbol.iterator] == "function", H = `[
\f\r]`, v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Z = /-->/g, J = />/g, g = RegExp(`>|${H}(?:([^\\s"'>=/]+)(${H}*=${H}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), G = /'/g, X = /"/g, it = /^(?:script|style|textarea|title)$/i, yt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), B = yt(1), A = /* @__PURE__ */ Symbol.for("lit-noChange"), l = /* @__PURE__ */ Symbol.for("lit-nothing"), Y = /* @__PURE__ */ new WeakMap(), _ = y.createTreeWalker(y, 129);
function rt(i, t) {
if (!D(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
return K !== void 0 ? K.createHTML(t) : t;
}
const gt = (r, t) => {
const e = r.length - 1, s = [];
let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = S;
for (let l = 0; l < e; l++) {
const h = r[l];
let c, p, a = -1, u = 0;
for (; u < h.length && (o.lastIndex = u, p = o.exec(h), p !== null); ) u = o.lastIndex, o === S ? p[1] === "!--" ? o = Z : p[1] !== void 0 ? o = J : p[2] !== void 0 ? (it.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = f) : p[3] !== void 0 && (o = f) : o === f ? p[0] === ">" ? (o = i ?? S, a = -1) : p[1] === void 0 ? a = -2 : (a = o.lastIndex - p[2].length, c = p[1], o = p[3] === void 0 ? f : p[3] === '"' ? G : F) : o === G || o === F ? o = f : o === Z || o === J ? o = S : (o = f, i = void 0);
const $ = o === f && r[l + 1].startsWith("/>") ? " " : "";
n += o === S ? h + ft : a >= 0 ? (s.push(c), h.slice(0, a) + et + h.slice(a) + _ + $) : h + _ + (a === -2 ? l : $);
const bt = (i, t) => {
const e = i.length - 1, s = [];
let n, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = v;
for (let d = 0; d < e; d++) {
const o = i[d];
let p, c, h = -1, u = 0;
for (; u < o.length && (a.lastIndex = u, c = a.exec(o), c !== null); ) u = a.lastIndex, a === v ? c[1] === "!--" ? a = Z : c[1] !== void 0 ? a = J : c[2] !== void 0 ? (it.test(c[2]) && (n = RegExp("</" + c[2], "g")), a = g) : c[3] !== void 0 && (a = g) : a === g ? c[0] === ">" ? (a = n ?? v, h = -1) : c[1] === void 0 ? h = -2 : (h = a.lastIndex - c[2].length, p = c[1], a = c[3] === void 0 ? g : c[3] === '"' ? X : G) : a === X || a === G ? a = g : a === Z || a === J ? a = v : (a = g, n = void 0);
const $ = a === g && i[d + 1].startsWith("/>") ? " " : "";
r += a === v ? o + _t : h >= 0 ? (s.push(p), o.slice(0, h) + st + o.slice(h) + f + $) : o + f + (h === -2 ? d : $);
}
return [rt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
return [rt(i, r + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
};
class P {
class S {
constructor({ strings: t, _$litType$: e }, s) {
let i;
let n;
this.parts = [];
let n = 0, o = 0;
const l = t.length - 1, h = this.parts, [c, p] = gt(t, e);
if (this.el = P.createElement(c, s), A.currentNode = this.el.content, e === 2 || e === 3) {
const a = this.el.content.firstChild;
a.replaceWith(...a.childNodes);
let r = 0, a = 0;
const d = t.length - 1, o = this.parts, [p, c] = bt(t, e);
if (this.el = S.createElement(p, s), _.currentNode = this.el.content, e === 2 || e === 3) {
const h = this.el.content.firstChild;
h.replaceWith(...h.childNodes);
}
for (; (i = A.nextNode()) !== null && h.length < l; ) {
if (i.nodeType === 1) {
if (i.hasAttributes()) for (const a of i.getAttributeNames()) if (a.endsWith(et)) {
const u = p[o++], $ = i.getAttribute(a).split(_), N = /([.?@])?(.*)/.exec(u);
h.push({ type: 1, index: n, name: N[2], strings: $, ctor: N[1] === "." ? vt : N[1] === "?" ? Et : N[1] === "@" ? St : M }), i.removeAttribute(a);
} else a.startsWith(_) && (h.push({ type: 6, index: n }), i.removeAttribute(a));
if (it.test(i.tagName)) {
const a = i.textContent.split(_), u = a.length - 1;
for (; (n = _.nextNode()) !== null && o.length < d; ) {
if (n.nodeType === 1) {
if (n.hasAttributes()) for (const h of n.getAttributeNames()) if (h.endsWith(st)) {
const u = c[a++], $ = n.getAttribute(h).split(f), P = /([.?@])?(.*)/.exec(u);
o.push({ type: 1, index: r, name: P[2], strings: $, ctor: P[1] === "." ? qt : P[1] === "?" ? vt : P[1] === "@" ? Et : O }), n.removeAttribute(h);
} else h.startsWith(f) && (o.push({ type: 6, index: r }), n.removeAttribute(h));
if (it.test(n.tagName)) {
const h = n.textContent.split(f), u = h.length - 1;
if (u > 0) {
i.textContent = O ? O.emptyScript : "";
for (let $ = 0; $ < u; $++) i.append(a[$], w()), A.nextNode(), h.push({ type: 2, index: ++n });
i.append(a[u], w());
n.textContent = N ? N.emptyScript : "";
for (let $ = 0; $ < u; $++) n.append(h[$], x()), _.nextNode(), o.push({ type: 2, index: ++r });
n.append(h[u], x());
}
}
} else if (i.nodeType === 8) if (i.data === st) h.push({ type: 2, index: n });
} else if (n.nodeType === 8) if (n.data === nt) o.push({ type: 2, index: r });
else {
let a = -1;
for (; (a = i.data.indexOf(_, a + 1)) !== -1; ) h.push({ type: 7, index: n }), a += _.length - 1;
let h = -1;
for (; (h = n.data.indexOf(f, h + 1)) !== -1; ) o.push({ type: 7, index: r }), h += f.length - 1;
}
n++;
r++;
}
}
static createElement(t, e) {
const s = g.createElement("template");
const s = y.createElement("template");
return s.innerHTML = t, s;
}
}
function E(r, t, e = r, s) {
if (t === v) return t;
let i = s !== void 0 ? e._$Co?.[s] : e._$Cl;
const n = C(t) ? void 0 : t._$litDirective$;
return i?.constructor !== n && (i?._$AO?.(!1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = i : e._$Cl = i), i !== void 0 && (t = E(r, i._$AS(r, t.values), i, s)), t;
function q(i, t, e = i, s) {
if (t === A) return t;
let n = s !== void 0 ? e._$Co?.[s] : e._$Cl;
const r = w(t) ? void 0 : t._$litDirective$;
return n?.constructor !== r && (n?._$AO?.(!1), r === void 0 ? n = void 0 : (n = new r(i), n._$AT(i, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = n : e._$Cl = n), n !== void 0 && (t = q(i, n._$AS(i, t.values), n, s)), t;
}
class yt {
class At {
constructor(t, e) {
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
}
@@ -313,29 +313,29 @@ class yt {
return this._$AM._$AU;
}
u(t) {
const { el: { content: e }, parts: s } = this._$AD, i = (t?.creationScope ?? g).importNode(e, !0);
A.currentNode = i;
let n = A.nextNode(), o = 0, l = 0, h = s[0];
for (; h !== void 0; ) {
if (o === h.index) {
let c;
h.type === 2 ? c = new x(n, n.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (c = new bt(n, this, t)), this._$AV.push(c), h = s[++l];
const { el: { content: e }, parts: s } = this._$AD, n = (t?.creationScope ?? y).importNode(e, !0);
_.currentNode = n;
let r = _.nextNode(), a = 0, d = 0, o = s[0];
for (; o !== void 0; ) {
if (a === o.index) {
let p;
o.type === 2 ? p = new C(r, r.nextSibling, this, t) : o.type === 1 ? p = new o.ctor(r, o.name, o.strings, this, t) : o.type === 6 && (p = new xt(r, this, t)), this._$AV.push(p), o = s[++d];
}
o !== h?.index && (n = A.nextNode(), o++);
a !== o?.index && (r = _.nextNode(), a++);
}
return A.currentNode = g, i;
return _.currentNode = y, n;
}
p(t) {
let e = 0;
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
}
}
class x {
class C {
get _$AU() {
return this._$AM?._$AU ?? this._$Cv;
}
constructor(t, e, s, i) {
this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = i?.isConnected ?? !0;
constructor(t, e, s, n) {
this.type = 2, this._$AH = l, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = n, this._$Cv = n?.isConnected ?? !0;
}
get parentNode() {
let t = this._$AA.parentNode;
@@ -349,7 +349,7 @@ class x {
return this._$AB;
}
_$AI(t, e = this) {
t = E(this, t, e), C(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== v && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : At(t) ? this.k(t) : this._(t);
t = q(this, t, e), w(t) ? t === l || t == null || t === "" ? (this._$AH !== l && this._$AR(), this._$AH = l) : t !== this._$AH && t !== A && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : mt(t) ? this.k(t) : this._(t);
}
O(t) {
return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -358,26 +358,26 @@ class x {
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
}
_(t) {
this._$AH !== d && C(this._$AH) ? this._$AA.nextSibling.data = t : this.T(g.createTextNode(t)), this._$AH = t;
this._$AH !== l && w(this._$AH) ? this._$AA.nextSibling.data = t : this.T(y.createTextNode(t)), this._$AH = t;
}
$(t) {
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = P.createElement(rt(s.h, s.h[0]), this.options)), s);
if (this._$AH?._$AD === i) this._$AH.p(e);
const { values: e, _$litType$: s } = t, n = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = S.createElement(rt(s.h, s.h[0]), this.options)), s);
if (this._$AH?._$AD === n) this._$AH.p(e);
else {
const n = new yt(i, this), o = n.u(this.options);
n.p(e), this.T(o), this._$AH = n;
const r = new At(n, this), a = r.u(this.options);
r.p(e), this.T(a), this._$AH = r;
}
}
_$AC(t) {
let e = X.get(t.strings);
return e === void 0 && X.set(t.strings, e = new P(t)), e;
let e = Y.get(t.strings);
return e === void 0 && Y.set(t.strings, e = new S(t)), e;
}
k(t) {
z(this._$AH) || (this._$AH = [], this._$AR());
D(this._$AH) || (this._$AH = [], this._$AR());
const e = this._$AH;
let s, i = 0;
for (const n of t) i === e.length ? e.push(s = new x(this.O(w()), this.O(w()), this, this.options)) : s = e[i], s._$AI(n), i++;
i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
let s, n = 0;
for (const r of t) n === e.length ? e.push(s = new C(this.O(x()), this.O(x()), this, this.options)) : s = e[n], s._$AI(r), n++;
n < e.length && (this._$AR(s && s._$AB.nextSibling, n), e.length = n);
}
_$AR(t = this._$AA.nextSibling, e) {
for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
@@ -389,61 +389,61 @@ class x {
this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
}
}
class M {
class O {
get tagName() {
return this.element.tagName;
}
get _$AU() {
return this._$AM._$AU;
}
constructor(t, e, s, i, n) {
this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = d;
constructor(t, e, s, n, r) {
this.type = 1, this._$AH = l, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = l;
}
_$AI(t, e = this, s, i) {
const n = this.strings;
let o = !1;
if (n === void 0) t = E(this, t, e, 0), o = !C(t) || t !== this._$AH && t !== v, o && (this._$AH = t);
_$AI(t, e = this, s, n) {
const r = this.strings;
let a = !1;
if (r === void 0) t = q(this, t, e, 0), a = !w(t) || t !== this._$AH && t !== A, a && (this._$AH = t);
else {
const l = t;
let h, c;
for (t = n[0], h = 0; h < n.length - 1; h++) c = E(this, l[s + h], e, h), c === v && (c = this._$AH[h]), o ||= !C(c) || c !== this._$AH[h], c === d ? t = d : t !== d && (t += (c ?? "") + n[h + 1]), this._$AH[h] = c;
const d = t;
let o, p;
for (t = r[0], o = 0; o < r.length - 1; o++) p = q(this, d[s + o], e, o), p === A && (p = this._$AH[o]), a ||= !w(p) || p !== this._$AH[o], p === l ? t = l : t !== l && (t += (p ?? "") + r[o + 1]), this._$AH[o] = p;
}
o && !i && this.j(t);
a && !n && this.j(t);
}
j(t) {
t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
t === l ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
}
}
class vt extends M {
class qt extends O {
constructor() {
super(...arguments), this.type = 3;
}
j(t) {
this.element[this.name] = t === d ? void 0 : t;
this.element[this.name] = t === l ? void 0 : t;
}
}
class Et extends M {
class vt extends O {
constructor() {
super(...arguments), this.type = 4;
}
j(t) {
this.element.toggleAttribute(this.name, !!t && t !== d);
this.element.toggleAttribute(this.name, !!t && t !== l);
}
}
class St extends M {
constructor(t, e, s, i, n) {
super(t, e, s, i, n), this.type = 5;
class Et extends O {
constructor(t, e, s, n, r) {
super(t, e, s, n, r), this.type = 5;
}
_$AI(t, e = this) {
if ((t = E(this, t, e, 0) ?? d) === v) return;
const s = this._$AH, i = t === d && s !== d || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== d && (s === d || i);
i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
if ((t = q(this, t, e, 0) ?? l) === A) return;
const s = this._$AH, n = t === l && s !== l || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, r = t !== l && (s === l || n);
n && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
}
handleEvent(t) {
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
}
}
class bt {
class xt {
constructor(t, e, s) {
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
}
@@ -451,22 +451,22 @@ class bt {
return this._$AM._$AU;
}
_$AI(t) {
E(this, t);
q(this, t);
}
}
const wt = L.litHtmlPolyfillSupport;
wt?.(P, x), (L.litHtmlVersions ??= []).push("3.3.3");
const Ct = (r, t, e) => {
const wt = R.litHtmlPolyfillSupport;
wt?.(S, C), (R.litHtmlVersions ??= []).push("3.3.3");
const St = (i, t, e) => {
const s = e?.renderBefore ?? t;
let i = s._$litPart$;
if (i === void 0) {
const n = e?.renderBefore ?? null;
s._$litPart$ = i = new x(t.insertBefore(w(), n), n, void 0, e ?? {});
let n = s._$litPart$;
if (n === void 0) {
const r = e?.renderBefore ?? null;
s._$litPart$ = n = new C(t.insertBefore(x(), r), r, void 0, e ?? {});
}
return i._$AI(r), i;
return n._$AI(i), n;
};
const D = globalThis;
class m extends y {
const F = globalThis;
class m extends b {
constructor() {
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
}
@@ -476,7 +476,7 @@ class m extends y {
}
update(t) {
const e = this.render();
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ct(e, this.renderRoot, this.renderOptions);
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = St(e, this.renderRoot, this.renderOptions);
}
connectedCallback() {
super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -485,21 +485,23 @@ class m extends y {
super.disconnectedCallback(), this._$Do?.setConnected(!1);
}
render() {
return v;
return A;
}
}
m._$litElement$ = !0, m.finalized = !0, D.litElementHydrateSupport?.({ LitElement: m });
const Pt = D.litElementPolyfillSupport;
Pt?.({ LitElement: m });
(D.litElementVersions ??= []).push("4.2.2");
function B(r) {
window.customCards = window.customCards ?? [], window.customCards.push(r);
m._$litElement$ = !0, m.finalized = !0, F.litElementHydrateSupport?.({ LitElement: m });
const Ct = F.litElementPolyfillSupport;
Ct?.({ LitElement: m });
(F.litElementVersions ??= []).push("4.2.2");
const at = ':host{--nq-p-parchment-top: #f0e4c7;--nq-p-parchment-bottom: #ddcca3;--nq-p-parchment: radial-gradient(ellipse at 25% 10%, rgba(255,255,255,.5), transparent 55%), radial-gradient(ellipse at 85% 90%, rgba(120,86,44,.28), transparent 60%), repeating-linear-gradient(93deg, rgba(150,115,70,.05) 0 2px, transparent 2px 6px), repeating-linear-gradient(2deg, rgba(150,115,70,.04) 0 3px, transparent 3px 7px), linear-gradient(var(--nq-p-parchment-top), var(--nq-p-parchment-bottom));--nq-p-vignette: inset 0 0 200px rgba(80,52,20,.35);--nq-p-card-open: linear-gradient(#fdf7e6, #f2e7c9);--nq-p-card-done: linear-gradient(#f0e8d3, #e6dcc2);--nq-p-card-panel: linear-gradient(#fcf6e6, #f1e6ca);--nq-p-card-border: rgba(120,88,48,.38);--nq-p-panel-border: rgba(92,62,26,.4);--nq-p-card-shadow: 0 3px 0 rgba(120,88,48,.2), inset 0 1px 0 rgba(255,255,255,.7);--nq-p-panel-shadow: 0 6px 0 rgba(92,62,26,.18), inset 0 2px 0 rgba(255,255,255,.7);--nq-p-frame-outer: 2px solid rgba(92,62,26,.45);--nq-p-frame-inner: 1px solid rgba(92,62,26,.28);--nq-p-rule: 2px solid rgba(92,62,26,.35);--nq-p-ink: #2b1f14;--nq-p-ink-secondary: #5c452a;--nq-p-ink-muted: #6f6455;--nq-p-ink-away: #4d4433;--nq-p-ink-late: #8f1526;--nq-brand-blue: #3B3AB8;--nq-brand-purple: #A035CC;--nq-brand-gradient: linear-gradient(135deg, var(--nq-brand-blue), var(--nq-brand-purple));--nq-p-icon-tile: var(--nq-brand-gradient);--nq-p-icon-tile-done: rgba(92,62,26,.16);--nq-p-crest: var(--nq-brand-gradient);--nq-p-crest-away: linear-gradient(135deg, #6b6b7a, #7a7286);--nq-p-seal: radial-gradient(circle at 35% 30%, #a8283a, #6d1322);--nq-p-seal-shadow: 0 4px 10px rgba(60,10,20,.4), inset 0 0 0 4px rgba(255,255,255,.14);--nq-p-seal-size: 78px;--nq-p-dock-bg: rgba(43,31,20,.9);--nq-p-dock-ink: #f7efdb;--nq-p-dock-ink-secondary: #d8c9a6;--nq-p-dock-divider: rgba(233,220,189,.3);--nq-p-dock-height: 84px;--nq-p-font-display: "Cinzel Decorative", Cinzel, serif;--nq-p-font-heading: Cinzel, serif;--nq-p-font-body: Nunito, system-ui, sans-serif;--nq-p-size-hero: 86px;--nq-p-size-wordmark: 66px;--nq-p-size-title: 56px;--nq-p-size-name: 48px;--nq-p-size-section: 32px;--nq-p-size-quest: 30px;--nq-p-size-body: 22px;--nq-p-size-label: 21px;--nq-p-track-label: .14em;--nq-p-track-kicker: .3em;--nq-p-quest-min-height: 116px;--nq-p-quest-gap: 24px;--nq-p-button-height: 72px;--nq-p-button-min-width: 150px;--nq-p-confirm-button: 108px;--nq-p-radius-card: 12px;--nq-p-radius-panel: 20px;--nq-p-radius-pill: 9999px;--nq-p-page-inset: 62px;--nq-p-frame-inset: 26px;--nq-ease-out: cubic-bezier(0, 0, .2, 1);--nq-dur-micro: .12s;--nq-dur-base: .2s;--nq-dur-modal: .35s}';
function L(i) {
window.customCards = window.customCards ?? [], window.customCards.push(i);
}
class xt extends m {
class Pt extends m {
static properties = {
hass: { attribute: !1 },
_config: { state: !0 }
};
static styles = [U(at)];
hass;
_config;
setConfig(t) {
@@ -511,20 +513,21 @@ class xt extends m {
return 6;
}
render() {
return j`<div>NestQuest Party Board</div>`;
return B`<div>NestQuest Party Board</div>`;
}
}
customElements.define("nestquest-party-board-card", xt);
B({
customElements.define("nestquest-party-board-card", Pt);
L({
type: "nestquest-party-board-card",
name: "NestQuest Party Board",
description: "Kids' attract screen for present and away adventurers."
});
class Nt extends m {
class kt extends m {
static properties = {
hass: { attribute: !1 },
_config: { state: !0 }
};
static styles = [U(at)];
hass;
_config;
setConfig(t) {
@@ -536,20 +539,22 @@ class Nt extends m {
return 8;
}
render() {
return j`<div>NestQuest Quest Log</div>`;
return B`<div>NestQuest Quest Log</div>`;
}
}
customElements.define("nestquest-quest-log-card", Nt);
B({
customElements.define("nestquest-quest-log-card", kt);
L({
type: "nestquest-quest-log-card",
name: "NestQuest Quest Log",
description: "One child's daily quests, grouped by window."
});
const Nt = ":host{--nq-brand-blue: #3B3AB8;--nq-brand-purple: #A035CC;--nq-brand-gradient: linear-gradient(135deg, var(--nq-brand-blue), var(--nq-brand-purple));--nq-brand-gradient-h: linear-gradient(90deg, var(--nq-brand-blue), var(--nq-brand-purple));--nq-a-page: #F4F4F6;--nq-a-surface: #FFFFFF;--nq-a-surface-subtle: #FAFAFA;--nq-a-selected: #EBEBF8;--nq-a-border: #E4E4EA;--nq-a-divider: #EDEDF1;--nq-a-ink: #18181D;--nq-a-ink-secondary: #52525E;--nq-a-ink-tertiary: #70707E;--nq-a-success: #15803D;--nq-a-danger: #DC2626;--nq-a-danger-strong: #B91C1C;--nq-a-danger-bg: #FEE2E2;--nq-a-warning-ink: #92400E;--nq-a-warning-ink-2: #78350F;--nq-a-warning-bg: #FEF3C7;--nq-a-warning-border: rgba(217,119,6,.35);--nq-a-info-bg: #DBEAFE;--nq-a-info-ink: #1E3A8A;--nq-a-info-icon: #1D4ED8;--nq-a-reversal: #7D28A0;--nq-a-font: Nunito, system-ui, sans-serif;--nq-a-size-screen: 24px;--nq-a-size-hero: 32px;--nq-a-size-card-title: 19px;--nq-a-size-stat: 22px;--nq-a-size-row: 13.5px;--nq-a-size-meta: 11px;--nq-a-size-label: 10px;--nq-a-track-label: .1em;--nq-a-density-page-pad: 14px 16px 92px;--nq-a-density-gap: 10px;--nq-a-density-card-pad: 13px;--nq-a-density-row-pad: 11px 13px;--nq-a-density-radius: 8px;--nq-a-density-shadow: none;--nq-a-tabbar-height: 70px;--nq-a-tap-min: 44px;--nq-a-radius-pill: 9999px;--nq-a-radius-sheet: 20px 20px 0 0;--nq-a-sheet-shadow: 0 -8px 28px rgba(9,9,11,.18);--nq-a-progress-height: 6px;--nq-ease-out: cubic-bezier(0, 0, .2, 1);--nq-dur-micro: .12s;--nq-dur-base: .2s;--nq-dur-modal: .35s}";
class Ut extends m {
static properties = {
hass: { attribute: !1 },
_config: { state: !0 }
};
static styles = [U(Nt)];
hass;
_config;
setConfig(t) {
@@ -561,12 +566,17 @@ class Ut extends m {
return 8;
}
render() {
return j`<div>NestQuest Admin</div>`;
return B`<div>NestQuest Admin</div>`;
}
}
customElements.define("nestquest-admin-card", Ut);
B({
L({
type: "nestquest-admin-card",
name: "NestQuest Admin",
description: "Parent phone view for today, tasks, schedule, and history."
});
const zt = "/nestquest-static/nestquest-fonts.css";
if (!document.querySelector('link[data-nq-fonts=""]')) {
const i = document.createElement("link");
i.rel = "stylesheet", i.href = zt, i.dataset.nqFonts = "", document.head.appendChild(i);
}
@@ -0,0 +1,71 @@
@font-face {
font-family: "Nunito";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("./fonts/nunito-latin-400-normal.woff2") format("woff2");
}
@font-face {
font-family: "Nunito";
font-style: normal;
font-weight: 600;
font-display: swap;
src: url("./fonts/nunito-latin-600-normal.woff2") format("woff2");
}
@font-face {
font-family: "Nunito";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("./fonts/nunito-latin-700-normal.woff2") format("woff2");
}
@font-face {
font-family: "Nunito";
font-style: normal;
font-weight: 800;
font-display: swap;
src: url("./fonts/nunito-latin-800-normal.woff2") format("woff2");
}
@font-face {
font-family: "Cinzel";
font-style: normal;
font-weight: 600;
font-display: swap;
src: url("./fonts/cinzel-latin-600-normal.woff2") format("woff2");
}
@font-face {
font-family: "Cinzel";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("./fonts/cinzel-latin-700-normal.woff2") format("woff2");
}
@font-face {
font-family: "Cinzel";
font-style: normal;
font-weight: 900;
font-display: swap;
src: url("./fonts/cinzel-latin-900-normal.woff2") format("woff2");
}
@font-face {
font-family: "Cinzel Decorative";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("./fonts/cinzel-decorative-latin-700-normal.woff2") format("woff2");
}
@font-face {
font-family: "Cinzel Decorative";
font-style: normal;
font-weight: 900;
font-display: swap;
src: url("./fonts/cinzel-decorative-latin-900-normal.woff2") format("woff2");
}
@@ -0,0 +1,94 @@
/* ============================================================
NestQuest — Kids' panel card tokens
Surface: DAKboard DAKOS wall panel, 1920x1080 landscape,
viewed from ~3 ft, no login, read/complete only.
Scope these on the card host: nestquest-quest-log-card,
nestquest-party-board-card.
Derived from the approved mockups (panel screens 1a, 1b, 1c, 1j).
============================================================ */
:host {
/* ── Parchment ground ─────────────────────────────────── */
--nq-p-parchment-top: #f0e4c7;
--nq-p-parchment-bottom: #ddcca3;
--nq-p-parchment: radial-gradient(ellipse at 25% 10%, rgba(255,255,255,.5), transparent 55%),
radial-gradient(ellipse at 85% 90%, rgba(120,86,44,.28), transparent 60%),
repeating-linear-gradient(93deg, rgba(150,115,70,.05) 0 2px, transparent 2px 6px),
repeating-linear-gradient(2deg, rgba(150,115,70,.04) 0 3px, transparent 3px 7px),
linear-gradient(var(--nq-p-parchment-top), var(--nq-p-parchment-bottom));
--nq-p-vignette: inset 0 0 200px rgba(80,52,20,.35);
/* Card surfaces sitting on parchment */
--nq-p-card-open: linear-gradient(#fdf7e6, #f2e7c9); /* incomplete quest */
--nq-p-card-done: linear-gradient(#f0e8d3, #e6dcc2); /* sealed quest */
--nq-p-card-panel: linear-gradient(#fcf6e6, #f1e6ca); /* adventurer plate, stat block */
--nq-p-card-border: rgba(120,88,48,.38);
--nq-p-panel-border: rgba(92,62,26,.40);
--nq-p-card-shadow: 0 3px 0 rgba(120,88,48,.20), inset 0 1px 0 rgba(255,255,255,.70);
--nq-p-panel-shadow: 0 6px 0 rgba(92,62,26,.18), inset 0 2px 0 rgba(255,255,255,.70);
--nq-p-frame-outer: 2px solid rgba(92,62,26,.45);
--nq-p-frame-inner: 1px solid rgba(92,62,26,.28);
--nq-p-rule: 2px solid rgba(92,62,26,.35);
/* ── Ink (all values >= 4.5:1 on parchment) ───────────── */
--nq-p-ink: #2b1f14; /* titles, quest names */
--nq-p-ink-secondary: #5c452a; /* meta, window labels, counts */
--nq-p-ink-muted: #6f6455; /* sealed quest titles only */
--nq-p-ink-away: #4d4433; /* away adventurer name */
--nq-p-ink-late: #8f1526; /* overdue line */
/* ── Brand (CubeCraft, toned down: accents only) ──────── */
--nq-brand-blue: #3B3AB8;
--nq-brand-purple: #A035CC;
--nq-brand-gradient: linear-gradient(135deg, var(--nq-brand-blue), var(--nq-brand-purple));
--nq-p-icon-tile: var(--nq-brand-gradient); /* open quest icon tile */
--nq-p-icon-tile-done: rgba(92,62,26,.16);
--nq-p-crest: var(--nq-brand-gradient);
--nq-p-crest-away: linear-gradient(135deg, #6b6b7a, #7a7286);
/* ── Wax seal (completed marker) ──────────────────────── */
--nq-p-seal: radial-gradient(circle at 35% 30%, #a8283a, #6d1322);
--nq-p-seal-shadow: 0 4px 10px rgba(60,10,20,.40), inset 0 0 0 4px rgba(255,255,255,.14);
--nq-p-seal-size: 78px; /* 168px on the quest-complete screen */
/* ── Dock (bottom strip, non-interactive) ─────────────── */
--nq-p-dock-bg: rgba(43,31,20,.90);
--nq-p-dock-ink: #f7efdb;
--nq-p-dock-ink-secondary: #d8c9a6;
--nq-p-dock-divider: rgba(233,220,189,.30);
--nq-p-dock-height: 84px;
/* ── Type ─────────────────────────────────────────────── */
--nq-p-font-display: 'Cinzel Decorative', Cinzel, serif; /* NestQuest, names, Quest complete */
--nq-p-font-heading: Cinzel, serif; /* section heads, quest titles, numerals */
--nq-p-font-body: Nunito, system-ui, sans-serif; /* meta lines, dock */
--nq-p-size-hero: 86px; /* 900 weight, "Quest complete" */
--nq-p-size-wordmark: 66px; /* 900 weight */
--nq-p-size-title: 56px; /* 700, "Declan's Quest Log" */
--nq-p-size-name: 48px; /* 700, adventurer name */
--nq-p-size-section: 32px; /* 700, Morning / Afternoon / Evening */
--nq-p-size-quest: 30px; /* 700, quest title */
--nq-p-size-body: 22px; /* 600 Nunito, meta — PANEL MINIMUM */
--nq-p-size-label: 21px; /* 600 Cinzel, uppercase, tracked */
--nq-p-track-label: .14em;
--nq-p-track-kicker: .30em;
/* ── Metrics: touch ───────────────────────────────────── */
--nq-p-quest-min-height: 116px; /* whole card is the tap target */
--nq-p-quest-gap: 24px; /* separation between tap targets */
--nq-p-button-height: 72px; /* "Complete" button on a quest card */
--nq-p-button-min-width: 150px;
--nq-p-confirm-button: 108px; /* confirm dialog buttons */
--nq-p-radius-card: 12px;
--nq-p-radius-panel: 20px;
--nq-p-radius-pill: 9999px;
--nq-p-page-inset: 62px;
--nq-p-frame-inset: 26px;
/* ── Motion (CubeCraft easing) ────────────────────────── */
--nq-ease-out: cubic-bezier(0, 0, .2, 1);
--nq-dur-micro: 120ms;
--nq-dur-base: 200ms;
--nq-dur-modal: 350ms;
}
+4 -1
View File
@@ -1,4 +1,5 @@
import { LitElement, html } from "lit";
import { LitElement, html, unsafeCSS } from "lit";
import adminTokens from "../../../custom_components/nestquest/www/nestquest-admin-tokens.css?inline";
import { registerCustomCard, type CardConfig, type HassLike } from "../types";
@@ -8,6 +9,8 @@ export class NestQuestAdminCard extends LitElement {
_config: { state: true },
};
static styles = [unsafeCSS(adminTokens)];
hass?: HassLike;
_config?: CardConfig;
+4 -1
View File
@@ -1,4 +1,5 @@
import { LitElement, html } from "lit";
import { LitElement, html, unsafeCSS } from "lit";
import panelTokens from "../../../custom_components/nestquest/www/nestquest-panel-tokens.css?inline";
import { registerCustomCard, type CardConfig, type HassLike } from "../types";
@@ -8,6 +9,8 @@ export class NestQuestPartyBoardCard extends LitElement {
_config: { state: true },
};
static styles = [unsafeCSS(panelTokens)];
hass?: HassLike;
_config?: CardConfig;
+4 -1
View File
@@ -1,4 +1,5 @@
import { LitElement, html } from "lit";
import { LitElement, html, unsafeCSS } from "lit";
import panelTokens from "../../../custom_components/nestquest/www/nestquest-panel-tokens.css?inline";
import { registerCustomCard, type CardConfig, type HassLike } from "../types";
@@ -8,6 +9,8 @@ export class NestQuestQuestLogCard extends LitElement {
_config: { state: true },
};
static styles = [unsafeCSS(panelTokens)];
hass?: HassLike;
_config?: CardConfig;
+9
View File
@@ -1,3 +1,12 @@
import "./cards/party-board";
import "./cards/quest-log";
import "./cards/admin";
const FONTS_HREF = "/nestquest-static/nestquest-fonts.css";
if (!document.querySelector('link[data-nq-fonts=""]')) {
const link = document.createElement("link");
link.rel = "stylesheet";
link.href = FONTS_HREF;
link.dataset.nqFonts = "";
document.head.appendChild(link);
}
+1
View File
@@ -0,0 +1 @@
/// <reference types="vite/client" />
+64
View File
@@ -91,3 +91,67 @@ def test_readme_documents_npm_build() -> None:
readme = (REPO_ROOT / "README.md").read_text(encoding="utf-8")
assert "npm run build" in readme
assert "nestquest-cards.js" in readme
WOFF2_FILES = (
"nunito-latin-400-normal.woff2",
"nunito-latin-600-normal.woff2",
"nunito-latin-700-normal.woff2",
"nunito-latin-800-normal.woff2",
"cinzel-latin-600-normal.woff2",
"cinzel-latin-700-normal.woff2",
"cinzel-latin-900-normal.woff2",
"cinzel-decorative-latin-700-normal.woff2",
"cinzel-decorative-latin-900-normal.woff2",
)
CDN_MARKERS = (
"fonts.googleapis.com",
"fonts.gstatic.com",
"cdn.jsdelivr.net",
"unpkg.com",
"cdnjs.cloudflare.com",
)
def test_www_contains_required_woff2_fonts() -> None:
fonts_dir = WWW_DIR / "fonts"
for name in WOFF2_FILES:
path = fonts_dir / name
assert path.is_file(), name
assert path.read_bytes()[:4] == b"wOF2"
def test_font_css_declares_swap_and_local_urls() -> None:
css = (WWW_DIR / "nestquest-fonts.css").read_text(encoding="utf-8")
assert css.count("font-display: swap") == 9
assert css.count("@font-face") == 9
assert 'font-family: "Nunito"' in css
assert 'font-family: "Cinzel"' in css
assert 'font-family: "Cinzel Decorative"' in css
for name in WOFF2_FILES:
assert f"./fonts/{name}" in css
assert "http://" not in css
assert "https://" not in css
def test_token_css_copied_verbatim_from_design() -> None:
design = REPO_ROOT / "design" / "tokens"
for name in ("nestquest-panel-tokens.css", "nestquest-admin-tokens.css"):
expected = (design / name).read_bytes()
actual = (WWW_DIR / name).read_bytes()
assert actual == expected
def test_frontend_and_www_have_no_cdn_font_references() -> None:
roots = (FRONTEND_DIR, WWW_DIR)
for root in roots:
for path in root.rglob("*"):
if not path.is_file():
continue
if "node_modules" in path.parts:
continue
if path.suffix.lower() in {".woff2", ".png", ".jpg"}:
continue
text = path.read_text(encoding="utf-8", errors="ignore")
for marker in CDN_MARKERS:
assert marker not in text, f"{path}: {marker}"