@vibe-flags/core 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -6
- package/dist/vibe-flags.cdn.js +84 -103
- package/dist/vibe-flags.cdn.mjs +194 -227
- package/dist/vibe-flags.js +132 -165
- package/package.json +1 -1
package/dist/vibe-flags.cdn.mjs
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
7
|
-
let
|
|
6
|
+
const I = globalThis, Y = I.ShadowRoot && (I.ShadyCSS === void 0 || I.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Z = Symbol(), re = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let ve = class {
|
|
8
8
|
constructor(e, t, s) {
|
|
9
|
-
if (this._$cssResult$ = !0, s !==
|
|
9
|
+
if (this._$cssResult$ = !0, s !== Z) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = e, this.t = t;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
13
|
let e = this.o;
|
|
14
14
|
const t = this.t;
|
|
15
|
-
if (
|
|
15
|
+
if (Y && e === void 0) {
|
|
16
16
|
const s = t !== void 0 && t.length === 1;
|
|
17
17
|
s && (e = re.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && re.set(t, e));
|
|
18
18
|
}
|
|
@@ -22,33 +22,33 @@ let be = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
25
|
+
const xe = (i) => new ve(typeof i == "string" ? i : i + "", void 0, Z), X = (i, ...e) => {
|
|
26
26
|
const t = i.length === 1 ? i[0] : e.reduce((s, r, o) => s + ((n) => {
|
|
27
27
|
if (n._$cssResult$ === !0) return n.cssText;
|
|
28
28
|
if (typeof n == "number") return n;
|
|
29
29
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
30
|
})(r) + i[o + 1], i[0]);
|
|
31
|
-
return new
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
31
|
+
return new ve(t, i, Z);
|
|
32
|
+
}, _e = (i, e) => {
|
|
33
|
+
if (Y) i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
34
34
|
else for (const t of e) {
|
|
35
|
-
const s = document.createElement("style"), r =
|
|
35
|
+
const s = document.createElement("style"), r = I.litNonce;
|
|
36
36
|
r !== void 0 && s.setAttribute("nonce", r), s.textContent = t.cssText, i.appendChild(s);
|
|
37
37
|
}
|
|
38
|
-
}, oe =
|
|
38
|
+
}, oe = Y ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
|
|
39
39
|
let t = "";
|
|
40
40
|
for (const s of e.cssRules) t += s.cssText;
|
|
41
|
-
return
|
|
41
|
+
return xe(t);
|
|
42
42
|
})(i) : i;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: we, defineProperty: Ae, getOwnPropertyDescriptor: Se, getOwnPropertyNames: Ee, getOwnPropertySymbols: Ce, getPrototypeOf: ke } = Object, V = globalThis, ne = V.trustedTypes, Pe = ne ? ne.emptyScript : "", Oe = V.reactiveElementPolyfillSupport, O = (i, e) => i, z = { toAttribute(i, e) {
|
|
49
49
|
switch (e) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
i = i ?
|
|
51
|
+
i = i ? Pe : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,8 +73,8 @@ const { is: Ae, defineProperty: Se, getOwnPropertyDescriptor: Ee, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return t;
|
|
76
|
-
} }, G = (i, e) => !
|
|
77
|
-
Symbol.metadata ??= Symbol("metadata"),
|
|
76
|
+
} }, G = (i, e) => !we(i, e), ae = { attribute: !0, type: String, converter: z, reflect: !1, useDefault: !1, hasChanged: G };
|
|
77
|
+
Symbol.metadata ??= Symbol("metadata"), V.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
78
78
|
let A = class extends HTMLElement {
|
|
79
79
|
static addInitializer(e) {
|
|
80
80
|
this._$Ei(), (this.l ??= []).push(e);
|
|
@@ -85,11 +85,11 @@ let A = class extends HTMLElement {
|
|
|
85
85
|
static createProperty(e, t = ae) {
|
|
86
86
|
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
87
87
|
const s = Symbol(), r = this.getPropertyDescriptor(e, s, t);
|
|
88
|
-
r !== void 0 &&
|
|
88
|
+
r !== void 0 && Ae(this.prototype, e, r);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(e, t, s) {
|
|
92
|
-
const { get: r, set: o } =
|
|
92
|
+
const { get: r, set: o } = Se(this.prototype, e) ?? { get() {
|
|
93
93
|
return this[t];
|
|
94
94
|
}, set(n) {
|
|
95
95
|
this[t] = n;
|
|
@@ -104,13 +104,13 @@ let A = class extends HTMLElement {
|
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
106
|
if (this.hasOwnProperty(O("elementProperties"))) return;
|
|
107
|
-
const e =
|
|
107
|
+
const e = ke(this);
|
|
108
108
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
109
109
|
}
|
|
110
110
|
static finalize() {
|
|
111
111
|
if (this.hasOwnProperty(O("finalized"))) return;
|
|
112
112
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(O("properties"))) {
|
|
113
|
-
const t = this.properties, s = [...
|
|
113
|
+
const t = this.properties, s = [...Ee(t), ...Ce(t)];
|
|
114
114
|
for (const r of s) this.createProperty(r, t[r]);
|
|
115
115
|
}
|
|
116
116
|
const e = this[Symbol.metadata];
|
|
@@ -156,7 +156,7 @@ let A = class extends HTMLElement {
|
|
|
156
156
|
}
|
|
157
157
|
createRenderRoot() {
|
|
158
158
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
159
|
-
return
|
|
159
|
+
return _e(e, this.constructor.elementStyles), e;
|
|
160
160
|
}
|
|
161
161
|
connectedCallback() {
|
|
162
162
|
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
|
|
@@ -256,59 +256,59 @@ let A = class extends HTMLElement {
|
|
|
256
256
|
firstUpdated(e) {
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
|
-
A.elementStyles = [], A.shadowRootOptions = { mode: "open" }, A[O("elementProperties")] = /* @__PURE__ */ new Map(), A[O("finalized")] = /* @__PURE__ */ new Map(),
|
|
259
|
+
A.elementStyles = [], A.shadowRootOptions = { mode: "open" }, A[O("elementProperties")] = /* @__PURE__ */ new Map(), A[O("finalized")] = /* @__PURE__ */ new Map(), Oe?.({ ReactiveElement: A }), (V.reactiveElementVersions ??= []).push("2.1.2");
|
|
260
260
|
/**
|
|
261
261
|
* @license
|
|
262
262
|
* Copyright 2017 Google LLC
|
|
263
263
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
264
264
|
*/
|
|
265
|
-
const Q = globalThis, le = (i) => i,
|
|
265
|
+
const Q = globalThis, le = (i) => i, D = Q.trustedTypes, he = D ? D.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, be = "$lit$", b = `lit$${Math.random().toFixed(9).slice(2)}$`, ye = "?" + b, Me = `<${ye}>`, w = document, M = () => w.createComment(""), T = (i) => i === null || typeof i != "object" && typeof i != "function", ee = Array.isArray, Te = (i) => ee(i) || typeof i?.[Symbol.iterator] == "function", K = `[
|
|
266
266
|
\f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ce = /-->/g, de = />/g, x = RegExp(`>|${K}(?:([^\\s"'>=/]+)(${K}*=${K}*(?:[^
|
|
267
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), pe = /'/g, fe = /"/g,
|
|
268
|
-
function
|
|
267
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), pe = /'/g, fe = /"/g, $e = /^(?:script|style|textarea|title)$/i, Ue = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), f = Ue(1), S = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), ue = /* @__PURE__ */ new WeakMap(), _ = w.createTreeWalker(w, 129);
|
|
268
|
+
function me(i, e) {
|
|
269
269
|
if (!ee(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
270
270
|
return he !== void 0 ? he.createHTML(e) : e;
|
|
271
271
|
}
|
|
272
|
-
const
|
|
272
|
+
const Fe = (i, e) => {
|
|
273
273
|
const t = i.length - 1, s = [];
|
|
274
274
|
let r, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = k;
|
|
275
275
|
for (let l = 0; l < t; l++) {
|
|
276
276
|
const a = i[l];
|
|
277
277
|
let d, p, h = -1, g = 0;
|
|
278
|
-
for (; g < a.length && (n.lastIndex = g, p = n.exec(a), p !== null); ) g = n.lastIndex, n === k ? p[1] === "!--" ? n = ce : p[1] !== void 0 ? n = de : p[2] !== void 0 ? (
|
|
279
|
-
const
|
|
280
|
-
o += n === k ? a +
|
|
278
|
+
for (; g < a.length && (n.lastIndex = g, p = n.exec(a), p !== null); ) g = n.lastIndex, n === k ? p[1] === "!--" ? n = ce : p[1] !== void 0 ? n = de : p[2] !== void 0 ? ($e.test(p[2]) && (r = RegExp("</" + p[2], "g")), n = x) : p[3] !== void 0 && (n = x) : n === x ? p[0] === ">" ? (n = r ?? k, h = -1) : p[1] === void 0 ? h = -2 : (h = n.lastIndex - p[2].length, d = p[1], n = p[3] === void 0 ? x : p[3] === '"' ? fe : pe) : n === fe || n === pe ? n = x : n === ce || n === de ? n = k : (n = x, r = void 0);
|
|
279
|
+
const v = n === x && i[l + 1].startsWith("/>") ? " " : "";
|
|
280
|
+
o += n === k ? a + Me : h >= 0 ? (s.push(d), a.slice(0, h) + be + a.slice(h) + b + v) : a + b + (h === -2 ? l : v);
|
|
281
281
|
}
|
|
282
|
-
return [
|
|
282
|
+
return [me(i, o + (i[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), s];
|
|
283
283
|
};
|
|
284
284
|
class U {
|
|
285
285
|
constructor({ strings: e, _$litType$: t }, s) {
|
|
286
286
|
let r;
|
|
287
287
|
this.parts = [];
|
|
288
288
|
let o = 0, n = 0;
|
|
289
|
-
const l = e.length - 1, a = this.parts, [d, p] =
|
|
289
|
+
const l = e.length - 1, a = this.parts, [d, p] = Fe(e, t);
|
|
290
290
|
if (this.el = U.createElement(d, s), _.currentNode = this.el.content, t === 2 || t === 3) {
|
|
291
291
|
const h = this.el.content.firstChild;
|
|
292
292
|
h.replaceWith(...h.childNodes);
|
|
293
293
|
}
|
|
294
294
|
for (; (r = _.nextNode()) !== null && a.length < l; ) {
|
|
295
295
|
if (r.nodeType === 1) {
|
|
296
|
-
if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(
|
|
297
|
-
const g = p[n++],
|
|
298
|
-
a.push({ type: 1, index: o, name:
|
|
299
|
-
} else h.startsWith(
|
|
300
|
-
if (
|
|
301
|
-
const h = r.textContent.split(
|
|
296
|
+
if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(be)) {
|
|
297
|
+
const g = p[n++], v = r.getAttribute(h).split(b), j = /([.?@])?(.*)/.exec(g);
|
|
298
|
+
a.push({ type: 1, index: o, name: j[2], strings: v, ctor: j[1] === "." ? He : j[1] === "?" ? Re : j[1] === "@" ? je : q }), r.removeAttribute(h);
|
|
299
|
+
} else h.startsWith(b) && (a.push({ type: 6, index: o }), r.removeAttribute(h));
|
|
300
|
+
if ($e.test(r.tagName)) {
|
|
301
|
+
const h = r.textContent.split(b), g = h.length - 1;
|
|
302
302
|
if (g > 0) {
|
|
303
|
-
r.textContent =
|
|
304
|
-
for (let
|
|
303
|
+
r.textContent = D ? D.emptyScript : "";
|
|
304
|
+
for (let v = 0; v < g; v++) r.append(h[v], M()), _.nextNode(), a.push({ type: 2, index: ++o });
|
|
305
305
|
r.append(h[g], M());
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
} else if (r.nodeType === 8) if (r.data === ye) a.push({ type: 2, index: o });
|
|
309
309
|
else {
|
|
310
310
|
let h = -1;
|
|
311
|
-
for (; (h = r.data.indexOf(
|
|
311
|
+
for (; (h = r.data.indexOf(b, h + 1)) !== -1; ) a.push({ type: 7, index: o }), h += b.length - 1;
|
|
312
312
|
}
|
|
313
313
|
o++;
|
|
314
314
|
}
|
|
@@ -324,7 +324,7 @@ function E(i, e, t = i, s) {
|
|
|
324
324
|
const o = T(e) ? void 0 : e._$litDirective$;
|
|
325
325
|
return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(i), r._$AT(i, t, s)), s !== void 0 ? (t._$Co ??= [])[s] = r : t._$Cl = r), r !== void 0 && (e = E(i, r._$AS(i, e.values), r, s)), e;
|
|
326
326
|
}
|
|
327
|
-
class
|
|
327
|
+
class Ne {
|
|
328
328
|
constructor(e, t) {
|
|
329
329
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
330
330
|
}
|
|
@@ -341,7 +341,7 @@ class He {
|
|
|
341
341
|
for (; a !== void 0; ) {
|
|
342
342
|
if (n === a.index) {
|
|
343
343
|
let d;
|
|
344
|
-
a.type === 2 ? d = new F(o, o.nextSibling, this, e) : a.type === 1 ? d = new a.ctor(o, a.name, a.strings, this, e) : a.type === 6 && (d = new
|
|
344
|
+
a.type === 2 ? d = new F(o, o.nextSibling, this, e) : a.type === 1 ? d = new a.ctor(o, a.name, a.strings, this, e) : a.type === 6 && (d = new Ie(o, this, e)), this._$AV.push(d), a = s[++l];
|
|
345
345
|
}
|
|
346
346
|
n !== a?.index && (o = _.nextNode(), n++);
|
|
347
347
|
}
|
|
@@ -371,7 +371,7 @@ class F {
|
|
|
371
371
|
return this._$AB;
|
|
372
372
|
}
|
|
373
373
|
_$AI(e, t = this) {
|
|
374
|
-
e = E(this, e, t), T(e) ? e === c || e == null || e === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : e !== this._$AH && e !== S && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) :
|
|
374
|
+
e = E(this, e, t), T(e) ? e === c || e == null || e === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : e !== this._$AH && e !== S && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Te(e) ? this.k(e) : this._(e);
|
|
375
375
|
}
|
|
376
376
|
O(e) {
|
|
377
377
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -383,10 +383,10 @@ class F {
|
|
|
383
383
|
this._$AH !== c && T(this._$AH) ? this._$AA.nextSibling.data = e : this.T(w.createTextNode(e)), this._$AH = e;
|
|
384
384
|
}
|
|
385
385
|
$(e) {
|
|
386
|
-
const { values: t, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = U.createElement(
|
|
386
|
+
const { values: t, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = U.createElement(me(s.h, s.h[0]), this.options)), s);
|
|
387
387
|
if (this._$AH?._$AD === r) this._$AH.p(t);
|
|
388
388
|
else {
|
|
389
|
-
const o = new
|
|
389
|
+
const o = new Ne(r, this), n = o.u(this.options);
|
|
390
390
|
o.p(t), this.T(n), this._$AH = o;
|
|
391
391
|
}
|
|
392
392
|
}
|
|
@@ -411,7 +411,7 @@ class F {
|
|
|
411
411
|
this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
class
|
|
414
|
+
class q {
|
|
415
415
|
get tagName() {
|
|
416
416
|
return this.element.tagName;
|
|
417
417
|
}
|
|
@@ -436,7 +436,7 @@ class W {
|
|
|
436
436
|
e === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
class
|
|
439
|
+
class He extends q {
|
|
440
440
|
constructor() {
|
|
441
441
|
super(...arguments), this.type = 3;
|
|
442
442
|
}
|
|
@@ -444,7 +444,7 @@ class Re extends W {
|
|
|
444
444
|
this.element[this.name] = e === c ? void 0 : e;
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
class
|
|
447
|
+
class Re extends q {
|
|
448
448
|
constructor() {
|
|
449
449
|
super(...arguments), this.type = 4;
|
|
450
450
|
}
|
|
@@ -452,7 +452,7 @@ class je extends W {
|
|
|
452
452
|
this.element.toggleAttribute(this.name, !!e && e !== c);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
class
|
|
455
|
+
class je extends q {
|
|
456
456
|
constructor(e, t, s, r, o) {
|
|
457
457
|
super(e, t, s, r, o), this.type = 5;
|
|
458
458
|
}
|
|
@@ -465,7 +465,7 @@ class Ie extends W {
|
|
|
465
465
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
class
|
|
468
|
+
class Ie {
|
|
469
469
|
constructor(e, t, s) {
|
|
470
470
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = s;
|
|
471
471
|
}
|
|
@@ -478,7 +478,7 @@ class De {
|
|
|
478
478
|
}
|
|
479
479
|
const ze = Q.litHtmlPolyfillSupport;
|
|
480
480
|
ze?.(U, F), (Q.litHtmlVersions ??= []).push("3.3.2");
|
|
481
|
-
const
|
|
481
|
+
const De = (i, e, t) => {
|
|
482
482
|
const s = t?.renderBefore ?? e;
|
|
483
483
|
let r = s._$litPart$;
|
|
484
484
|
if (r === void 0) {
|
|
@@ -493,7 +493,7 @@ const Be = (i, e, t) => {
|
|
|
493
493
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
494
494
|
*/
|
|
495
495
|
const te = globalThis;
|
|
496
|
-
class
|
|
496
|
+
class y extends A {
|
|
497
497
|
constructor() {
|
|
498
498
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
499
499
|
}
|
|
@@ -503,7 +503,7 @@ class v extends A {
|
|
|
503
503
|
}
|
|
504
504
|
update(e) {
|
|
505
505
|
const t = this.render();
|
|
506
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do =
|
|
506
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = De(t, this.renderRoot, this.renderOptions);
|
|
507
507
|
}
|
|
508
508
|
connectedCallback() {
|
|
509
509
|
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
@@ -515,16 +515,16 @@ class v extends A {
|
|
|
515
515
|
return S;
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
|
|
519
|
-
const
|
|
520
|
-
|
|
518
|
+
y._$litElement$ = !0, y.finalized = !0, te.litElementHydrateSupport?.({ LitElement: y });
|
|
519
|
+
const Be = te.litElementPolyfillSupport;
|
|
520
|
+
Be?.({ LitElement: y });
|
|
521
521
|
(te.litElementVersions ??= []).push("4.2.2");
|
|
522
522
|
/**
|
|
523
523
|
* @license
|
|
524
524
|
* Copyright 2017 Google LLC
|
|
525
525
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
526
526
|
*/
|
|
527
|
-
const
|
|
527
|
+
const W = (i) => (e, t) => {
|
|
528
528
|
t !== void 0 ? t.addInitializer(() => {
|
|
529
529
|
customElements.define(i, e);
|
|
530
530
|
}) : customElements.define(i, e);
|
|
@@ -534,7 +534,7 @@ const N = (i) => (e, t) => {
|
|
|
534
534
|
* Copyright 2017 Google LLC
|
|
535
535
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
536
536
|
*/
|
|
537
|
-
const
|
|
537
|
+
const Le = { attribute: !0, type: String, converter: z, reflect: !1, hasChanged: G }, Ve = (i = Le, e, t) => {
|
|
538
538
|
const { kind: s, metadata: r } = t;
|
|
539
539
|
let o = globalThis.litPropertyMetadata.get(r);
|
|
540
540
|
if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), s === "setter" && ((i = Object.create(i)).wrapped = !0), o.set(t.name, i), s === "accessor") {
|
|
@@ -556,7 +556,7 @@ const Ve = { attribute: !0, type: String, converter: z, reflect: !1, hasChanged:
|
|
|
556
556
|
throw Error("Unsupported decorator location: " + s);
|
|
557
557
|
};
|
|
558
558
|
function m(i) {
|
|
559
|
-
return (e, t) => typeof t == "object" ?
|
|
559
|
+
return (e, t) => typeof t == "object" ? Ve(i, e, t) : ((s, r, o) => {
|
|
560
560
|
const n = r.hasOwnProperty(o);
|
|
561
561
|
return r.constructor.createProperty(o, s), n ? Object.getOwnPropertyDescriptor(r, o) : void 0;
|
|
562
562
|
})(i, e, t);
|
|
@@ -566,27 +566,14 @@ function m(i) {
|
|
|
566
566
|
* Copyright 2017 Google LLC
|
|
567
567
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
568
568
|
*/
|
|
569
|
-
function
|
|
569
|
+
function N(i) {
|
|
570
570
|
return m({ ...i, state: !0, attribute: !1 });
|
|
571
571
|
}
|
|
572
|
-
var We = Object.getOwnPropertyDescriptor, Ke = (i, e, t, s) => {
|
|
573
|
-
for (var r = s > 1 ? void 0 : s ? We(e, t) : e, o = i.length - 1, n; o >= 0; o--)
|
|
574
|
-
(n = i[o]) && (r = n(r) || r);
|
|
575
|
-
return r;
|
|
576
|
-
};
|
|
577
|
-
let ge = class extends v {
|
|
578
|
-
render() {
|
|
579
|
-
return f`<slot></slot>`;
|
|
580
|
-
}
|
|
581
|
-
};
|
|
582
|
-
ge = Ke([
|
|
583
|
-
N("vibe-flags")
|
|
584
|
-
], ge);
|
|
585
572
|
const P = "vibe-flags:";
|
|
586
573
|
function J(i) {
|
|
587
574
|
return i.type === "boolean" ? !1 : i.options[0] || "";
|
|
588
575
|
}
|
|
589
|
-
class
|
|
576
|
+
class qe extends EventTarget {
|
|
590
577
|
constructor() {
|
|
591
578
|
super(...arguments), this.configs = /* @__PURE__ */ new Map(), this.state = {}, this.listening = !1, this.onStorageEvent = (e) => {
|
|
592
579
|
if (!e.key?.startsWith(P)) return;
|
|
@@ -601,8 +588,8 @@ class Je extends EventTarget {
|
|
|
601
588
|
}
|
|
602
589
|
register(e) {
|
|
603
590
|
this.configs.set(e.key, e);
|
|
604
|
-
const t = this.readFromStorage(e.key);
|
|
605
|
-
this.state[e.key] =
|
|
591
|
+
const t = J(e), s = this.readFromStorage(e.key), r = s !== null && (e.type === "boolean" && typeof s == "boolean" || e.type === "select" && typeof s == "string" && e.options.includes(s));
|
|
592
|
+
this.state[e.key] = r ? s : t, this.listening || (this.listening = !0, typeof window < "u" && window.addEventListener("storage", this.onStorageEvent)), this.dispatch(e.key);
|
|
606
593
|
}
|
|
607
594
|
unregister(e) {
|
|
608
595
|
this.configs.delete(e), delete this.state[e], this.dispatch();
|
|
@@ -659,17 +646,17 @@ class Je extends EventTarget {
|
|
|
659
646
|
this.dispatchEvent(s), typeof window < "u" && window.dispatchEvent(new CustomEvent("vibe-flags-changed", { detail: t }));
|
|
660
647
|
}
|
|
661
648
|
}
|
|
662
|
-
const u = new
|
|
663
|
-
var
|
|
664
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
649
|
+
const u = new qe();
|
|
650
|
+
var We = Object.defineProperty, Ke = Object.getOwnPropertyDescriptor, H = (i, e, t, s) => {
|
|
651
|
+
for (var r = s > 1 ? void 0 : s ? Ke(e, t) : e, o = i.length - 1, n; o >= 0; o--)
|
|
665
652
|
(n = i[o]) && (r = (s ? n(e, t, r) : n(r)) || r);
|
|
666
|
-
return s && r &&
|
|
653
|
+
return s && r && We(e, t, r), r;
|
|
667
654
|
};
|
|
668
655
|
if (typeof document < "u" && !document.getElementById("vibe-flag-fouc")) {
|
|
669
656
|
const i = document.createElement("style");
|
|
670
657
|
i.id = "vibe-flag-fouc", i.textContent = "vibe-flag-boolean:not(:defined),vibe-flag-boolean:defined,vibe-flag-select:not(:defined),vibe-flag-select:defined,vibe-flag-option:not(:defined),vibe-flag-option:defined{display:none}", document.head.appendChild(i);
|
|
671
658
|
}
|
|
672
|
-
let C = class extends
|
|
659
|
+
let C = class extends y {
|
|
673
660
|
constructor() {
|
|
674
661
|
super(...arguments), this.name = "", this.description = "", this.value = "", this.isMatch = !1, this.onFlagChange = () => {
|
|
675
662
|
this.evaluate();
|
|
@@ -702,27 +689,27 @@ let C = class extends v {
|
|
|
702
689
|
return this.isMatch ? f`<slot></slot>` : c;
|
|
703
690
|
}
|
|
704
691
|
};
|
|
705
|
-
|
|
692
|
+
H([
|
|
706
693
|
m({ type: String })
|
|
707
694
|
], C.prototype, "name", 2);
|
|
708
|
-
|
|
695
|
+
H([
|
|
709
696
|
m({ type: String })
|
|
710
697
|
], C.prototype, "description", 2);
|
|
711
|
-
|
|
698
|
+
H([
|
|
712
699
|
m({ type: String })
|
|
713
700
|
], C.prototype, "value", 2);
|
|
714
|
-
|
|
715
|
-
|
|
701
|
+
H([
|
|
702
|
+
N()
|
|
716
703
|
], C.prototype, "isMatch", 2);
|
|
717
|
-
C =
|
|
718
|
-
|
|
704
|
+
C = H([
|
|
705
|
+
W("vibe-flag-boolean")
|
|
719
706
|
], C);
|
|
720
|
-
var
|
|
721
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
707
|
+
var Je = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, se = (i, e, t, s) => {
|
|
708
|
+
for (var r = s > 1 ? void 0 : s ? Ye(e, t) : e, o = i.length - 1, n; o >= 0; o--)
|
|
722
709
|
(n = i[o]) && (r = (s ? n(e, t, r) : n(r)) || r);
|
|
723
|
-
return s && r &&
|
|
710
|
+
return s && r && Je(e, t, r), r;
|
|
724
711
|
};
|
|
725
|
-
let
|
|
712
|
+
let B = class extends y {
|
|
726
713
|
constructor() {
|
|
727
714
|
super(...arguments), this.name = "", this.description = "", this.onFlagChange = () => {
|
|
728
715
|
this.syncOptions();
|
|
@@ -764,36 +751,39 @@ let L = class extends v {
|
|
|
764
751
|
};
|
|
765
752
|
se([
|
|
766
753
|
m({ type: String })
|
|
767
|
-
],
|
|
754
|
+
], B.prototype, "name", 2);
|
|
768
755
|
se([
|
|
769
756
|
m({ type: String })
|
|
770
|
-
],
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
],
|
|
774
|
-
var
|
|
775
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
757
|
+
], B.prototype, "description", 2);
|
|
758
|
+
B = se([
|
|
759
|
+
W("vibe-flag-select")
|
|
760
|
+
], B);
|
|
761
|
+
var Ze = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, ie = (i, e, t, s) => {
|
|
762
|
+
for (var r = s > 1 ? void 0 : s ? Xe(e, t) : e, o = i.length - 1, n; o >= 0; o--)
|
|
776
763
|
(n = i[o]) && (r = (s ? n(e, t, r) : n(r)) || r);
|
|
777
|
-
return s && r &&
|
|
764
|
+
return s && r && Ze(e, t, r), r;
|
|
778
765
|
};
|
|
779
|
-
let
|
|
766
|
+
let L = class extends y {
|
|
780
767
|
constructor() {
|
|
781
768
|
super(...arguments), this.value = "", this.active = !1;
|
|
782
769
|
}
|
|
770
|
+
firstUpdated() {
|
|
771
|
+
this.style.display = "contents";
|
|
772
|
+
}
|
|
783
773
|
render() {
|
|
784
774
|
return this.active ? f`<slot></slot>` : c;
|
|
785
775
|
}
|
|
786
776
|
};
|
|
787
777
|
ie([
|
|
788
778
|
m({ type: String })
|
|
789
|
-
],
|
|
779
|
+
], L.prototype, "value", 2);
|
|
790
780
|
ie([
|
|
791
781
|
m({ type: Boolean, reflect: !0 })
|
|
792
|
-
],
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
],
|
|
796
|
-
const
|
|
782
|
+
], L.prototype, "active", 2);
|
|
783
|
+
L = ie([
|
|
784
|
+
W("vibe-flag-option")
|
|
785
|
+
], L);
|
|
786
|
+
const Ge = X`
|
|
797
787
|
:host {
|
|
798
788
|
--vf-bg: #0a0a0a;
|
|
799
789
|
--vf-bg-muted: #171717;
|
|
@@ -817,7 +807,7 @@ const tt = Z`
|
|
|
817
807
|
--vf-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6),
|
|
818
808
|
0 8px 10px -6px rgba(0, 0, 0, 0.6);
|
|
819
809
|
}
|
|
820
|
-
`,
|
|
810
|
+
`, Qe = X`
|
|
821
811
|
:host {
|
|
822
812
|
--vf-bg: #ffffff;
|
|
823
813
|
--vf-bg-muted: #f5f5f5;
|
|
@@ -842,13 +832,13 @@ const tt = Z`
|
|
|
842
832
|
0 8px 10px -6px rgba(0, 0, 0, 0.1);
|
|
843
833
|
}
|
|
844
834
|
`;
|
|
845
|
-
var
|
|
846
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
835
|
+
var et = Object.defineProperty, tt = Object.getOwnPropertyDescriptor, R = (i, e, t, s) => {
|
|
836
|
+
for (var r = s > 1 ? void 0 : s ? tt(e, t) : e, o = i.length - 1, n; o >= 0; o--)
|
|
847
837
|
(n = i[o]) && (r = (s ? n(e, t, r) : n(r)) || r);
|
|
848
|
-
return s && r &&
|
|
838
|
+
return s && r && et(e, t, r), r;
|
|
849
839
|
};
|
|
850
|
-
const
|
|
851
|
-
let
|
|
840
|
+
const ge = "vibeFlagsTheme";
|
|
841
|
+
let $ = class extends y {
|
|
852
842
|
constructor() {
|
|
853
843
|
super(...arguments), this.open = !1, this.flags = {}, this.configs = [], this.darkMode = !0, this.onFlagChange = () => {
|
|
854
844
|
this.syncFromStore();
|
|
@@ -862,28 +852,25 @@ let y = class extends v {
|
|
|
862
852
|
}
|
|
863
853
|
loadTheme() {
|
|
864
854
|
if (typeof window > "u") return;
|
|
865
|
-
const i = localStorage.getItem(
|
|
855
|
+
const i = localStorage.getItem(ge);
|
|
866
856
|
this.darkMode = i ? i === "dark" : !0, this.applyTheme();
|
|
867
857
|
}
|
|
868
858
|
toggleTheme() {
|
|
869
|
-
this.darkMode = !this.darkMode, localStorage.setItem(
|
|
859
|
+
this.darkMode = !this.darkMode, localStorage.setItem(ge, this.darkMode ? "dark" : "light"), this.applyTheme();
|
|
870
860
|
}
|
|
871
861
|
applyTheme() {
|
|
872
|
-
const i = this.darkMode ?
|
|
862
|
+
const i = this.darkMode ? Ge : Qe, e = new CSSStyleSheet();
|
|
873
863
|
e.replaceSync(i.cssText), this.shadowRoot.adoptedStyleSheets = [
|
|
874
|
-
|
|
864
|
+
...$.elementStyles.map((t) => t.styleSheet),
|
|
875
865
|
e
|
|
876
866
|
];
|
|
877
867
|
}
|
|
878
868
|
syncFromStore() {
|
|
879
869
|
this.configs = u.getConfig(), this.flags = u.getAll();
|
|
880
870
|
}
|
|
881
|
-
|
|
871
|
+
toggle() {
|
|
882
872
|
this.open = !this.open;
|
|
883
873
|
}
|
|
884
|
-
closeSidebar() {
|
|
885
|
-
this.open = !1;
|
|
886
|
-
}
|
|
887
874
|
onToggle(i) {
|
|
888
875
|
const e = this.flags[i];
|
|
889
876
|
u.set(i, !e);
|
|
@@ -963,14 +950,12 @@ let y = class extends v {
|
|
|
963
950
|
render() {
|
|
964
951
|
return f`
|
|
965
952
|
${this.open ? c : f`
|
|
966
|
-
<button class="fab" @click=${this.
|
|
953
|
+
<button class="fab" @click=${this.toggle} aria-label="Toggle feature flags">
|
|
967
954
|
${this.renderFlagIcon()}
|
|
968
955
|
</button>
|
|
969
956
|
`}
|
|
970
957
|
|
|
971
|
-
<div class="
|
|
972
|
-
|
|
973
|
-
<div class="sidebar ${this.open ? "open" : ""}">
|
|
958
|
+
<div class="card ${this.open ? "open" : ""}">
|
|
974
959
|
<div class="header">
|
|
975
960
|
<h2>
|
|
976
961
|
${this.renderFlagIcon()}
|
|
@@ -981,7 +966,7 @@ let y = class extends v {
|
|
|
981
966
|
<button class="icon-btn" @click=${this.toggleTheme} aria-label="Toggle theme" title="${this.darkMode ? "Switch to light theme" : "Switch to dark theme"}">
|
|
982
967
|
${this.darkMode ? this.renderSunIcon() : this.renderMoonIcon()}
|
|
983
968
|
</button>
|
|
984
|
-
<button class="icon-btn" @click=${this.
|
|
969
|
+
<button class="icon-btn" @click=${this.toggle} aria-label="Close">
|
|
985
970
|
${this.renderCloseIcon()}
|
|
986
971
|
</button>
|
|
987
972
|
</div>
|
|
@@ -1002,8 +987,8 @@ let y = class extends v {
|
|
|
1002
987
|
`;
|
|
1003
988
|
}
|
|
1004
989
|
};
|
|
1005
|
-
|
|
1006
|
-
|
|
990
|
+
$.styles = [
|
|
991
|
+
X`
|
|
1007
992
|
* {
|
|
1008
993
|
box-sizing: border-box;
|
|
1009
994
|
margin: 0;
|
|
@@ -1012,15 +997,13 @@ y.styles = [
|
|
|
1012
997
|
|
|
1013
998
|
.fab {
|
|
1014
999
|
position: fixed;
|
|
1015
|
-
right:
|
|
1016
|
-
|
|
1017
|
-
transform: translateY(-50%);
|
|
1000
|
+
right: 16px;
|
|
1001
|
+
bottom: 16px;
|
|
1018
1002
|
z-index: 99999;
|
|
1019
|
-
width:
|
|
1020
|
-
height:
|
|
1003
|
+
width: 42px;
|
|
1004
|
+
height: 42px;
|
|
1021
1005
|
border: 1px solid var(--vf-border);
|
|
1022
|
-
border-
|
|
1023
|
-
border-radius: var(--vf-radius-lg) 0 0 var(--vf-radius-lg);
|
|
1006
|
+
border-radius: 12px;
|
|
1024
1007
|
background: var(--vf-bg);
|
|
1025
1008
|
color: var(--vf-text);
|
|
1026
1009
|
cursor: pointer;
|
|
@@ -1033,94 +1016,80 @@ y.styles = [
|
|
|
1033
1016
|
}
|
|
1034
1017
|
|
|
1035
1018
|
.fab:hover {
|
|
1036
|
-
width: 46px;
|
|
1037
1019
|
background: var(--vf-bg-muted);
|
|
1020
|
+
box-shadow: var(--vf-shadow-xl);
|
|
1021
|
+
transform: translateY(-1px);
|
|
1038
1022
|
}
|
|
1039
1023
|
|
|
1040
1024
|
.fab svg {
|
|
1041
|
-
width:
|
|
1042
|
-
height:
|
|
1025
|
+
width: 18px;
|
|
1026
|
+
height: 18px;
|
|
1043
1027
|
flex-shrink: 0;
|
|
1044
1028
|
}
|
|
1045
1029
|
|
|
1046
|
-
.
|
|
1047
|
-
position: fixed;
|
|
1048
|
-
inset: 0;
|
|
1049
|
-
z-index: 100000;
|
|
1050
|
-
background: rgba(0, 0, 0, 0.4);
|
|
1051
|
-
opacity: 0;
|
|
1052
|
-
transition: opacity 0.3s ease;
|
|
1053
|
-
pointer-events: none;
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
.backdrop.open {
|
|
1057
|
-
opacity: 1;
|
|
1058
|
-
pointer-events: auto;
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
.sidebar {
|
|
1030
|
+
.card {
|
|
1062
1031
|
position: fixed;
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
bottom: 0;
|
|
1032
|
+
right: 16px;
|
|
1033
|
+
bottom: 16px;
|
|
1066
1034
|
z-index: 100001;
|
|
1067
|
-
width:
|
|
1068
|
-
max-width:
|
|
1035
|
+
width: 300px;
|
|
1036
|
+
max-width: calc(100vw - 32px);
|
|
1037
|
+
max-height: calc(100vh - 32px);
|
|
1069
1038
|
background: var(--vf-bg);
|
|
1070
|
-
border
|
|
1039
|
+
border: 1px solid var(--vf-border);
|
|
1040
|
+
border-radius: 14px;
|
|
1071
1041
|
box-shadow: var(--vf-shadow-xl);
|
|
1072
|
-
transform: translateX(100%);
|
|
1073
|
-
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1074
|
-
display: flex;
|
|
1075
|
-
flex-direction: column;
|
|
1076
1042
|
font-family: var(--vf-font);
|
|
1077
1043
|
color: var(--vf-text);
|
|
1044
|
+
overflow: hidden;
|
|
1045
|
+
display: flex;
|
|
1046
|
+
flex-direction: column;
|
|
1047
|
+
opacity: 0;
|
|
1048
|
+
transform: translateY(8px) scale(0.96);
|
|
1049
|
+
pointer-events: none;
|
|
1050
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1078
1051
|
}
|
|
1079
1052
|
|
|
1080
|
-
.
|
|
1081
|
-
|
|
1053
|
+
.card.open {
|
|
1054
|
+
opacity: 1;
|
|
1055
|
+
transform: translateY(0) scale(1);
|
|
1056
|
+
pointer-events: auto;
|
|
1082
1057
|
}
|
|
1083
1058
|
|
|
1084
1059
|
.header {
|
|
1085
1060
|
display: flex;
|
|
1086
1061
|
align-items: center;
|
|
1087
1062
|
justify-content: space-between;
|
|
1088
|
-
padding:
|
|
1063
|
+
padding: 12px 14px;
|
|
1089
1064
|
border-bottom: 1px solid var(--vf-border);
|
|
1090
1065
|
flex-shrink: 0;
|
|
1091
1066
|
}
|
|
1092
1067
|
|
|
1093
|
-
.header-left {
|
|
1094
|
-
display: flex;
|
|
1095
|
-
align-items: center;
|
|
1096
|
-
gap: 8px;
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
1068
|
.header h2 {
|
|
1100
|
-
font-size:
|
|
1069
|
+
font-size: 13px;
|
|
1101
1070
|
font-weight: 600;
|
|
1102
|
-
letter-spacing: -0.
|
|
1071
|
+
letter-spacing: -0.01em;
|
|
1103
1072
|
display: flex;
|
|
1104
1073
|
align-items: center;
|
|
1105
|
-
gap:
|
|
1074
|
+
gap: 7px;
|
|
1106
1075
|
}
|
|
1107
1076
|
|
|
1108
1077
|
.header h2 svg {
|
|
1109
|
-
width:
|
|
1110
|
-
height:
|
|
1078
|
+
width: 15px;
|
|
1079
|
+
height: 15px;
|
|
1111
1080
|
color: var(--vf-accent);
|
|
1112
1081
|
}
|
|
1113
1082
|
|
|
1114
1083
|
.header-actions {
|
|
1115
1084
|
display: flex;
|
|
1116
1085
|
align-items: center;
|
|
1117
|
-
gap:
|
|
1086
|
+
gap: 2px;
|
|
1118
1087
|
}
|
|
1119
1088
|
|
|
1120
1089
|
.badge {
|
|
1121
|
-
font-size:
|
|
1090
|
+
font-size: 10px;
|
|
1122
1091
|
font-weight: 500;
|
|
1123
|
-
padding:
|
|
1092
|
+
padding: 1px 6px;
|
|
1124
1093
|
border-radius: 9999px;
|
|
1125
1094
|
background: var(--vf-bg-muted);
|
|
1126
1095
|
color: var(--vf-text-muted);
|
|
@@ -1128,8 +1097,8 @@ y.styles = [
|
|
|
1128
1097
|
}
|
|
1129
1098
|
|
|
1130
1099
|
.icon-btn {
|
|
1131
|
-
width:
|
|
1132
|
-
height:
|
|
1100
|
+
width: 28px;
|
|
1101
|
+
height: 28px;
|
|
1133
1102
|
border: none;
|
|
1134
1103
|
border-radius: var(--vf-radius);
|
|
1135
1104
|
background: transparent;
|
|
@@ -1147,18 +1116,17 @@ y.styles = [
|
|
|
1147
1116
|
}
|
|
1148
1117
|
|
|
1149
1118
|
.icon-btn svg {
|
|
1150
|
-
width:
|
|
1151
|
-
height:
|
|
1119
|
+
width: 14px;
|
|
1120
|
+
height: 14px;
|
|
1152
1121
|
}
|
|
1153
1122
|
|
|
1154
1123
|
.flags {
|
|
1155
|
-
flex: 1;
|
|
1156
1124
|
overflow-y: auto;
|
|
1157
|
-
|
|
1125
|
+
flex: 1;
|
|
1158
1126
|
}
|
|
1159
1127
|
|
|
1160
1128
|
.flag-item {
|
|
1161
|
-
padding:
|
|
1129
|
+
padding: 10px 14px;
|
|
1162
1130
|
transition: background 0.1s ease;
|
|
1163
1131
|
}
|
|
1164
1132
|
|
|
@@ -1171,13 +1139,13 @@ y.styles = [
|
|
|
1171
1139
|
}
|
|
1172
1140
|
|
|
1173
1141
|
.flag-label {
|
|
1174
|
-
font-size:
|
|
1142
|
+
font-size: 12px;
|
|
1175
1143
|
font-weight: 500;
|
|
1176
|
-
margin-bottom:
|
|
1144
|
+
margin-bottom: 1px;
|
|
1177
1145
|
}
|
|
1178
1146
|
|
|
1179
1147
|
.flag-key {
|
|
1180
|
-
font-size:
|
|
1148
|
+
font-size: 10px;
|
|
1181
1149
|
color: var(--vf-text-muted);
|
|
1182
1150
|
font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas,
|
|
1183
1151
|
monospace;
|
|
@@ -1187,7 +1155,7 @@ y.styles = [
|
|
|
1187
1155
|
display: flex;
|
|
1188
1156
|
align-items: center;
|
|
1189
1157
|
justify-content: space-between;
|
|
1190
|
-
gap:
|
|
1158
|
+
gap: 10px;
|
|
1191
1159
|
}
|
|
1192
1160
|
|
|
1193
1161
|
.flag-info {
|
|
@@ -1198,8 +1166,8 @@ y.styles = [
|
|
|
1198
1166
|
/* Toggle switch */
|
|
1199
1167
|
.toggle {
|
|
1200
1168
|
position: relative;
|
|
1201
|
-
width:
|
|
1202
|
-
height:
|
|
1169
|
+
width: 36px;
|
|
1170
|
+
height: 20px;
|
|
1203
1171
|
flex-shrink: 0;
|
|
1204
1172
|
}
|
|
1205
1173
|
|
|
@@ -1213,7 +1181,7 @@ y.styles = [
|
|
|
1213
1181
|
.toggle-track {
|
|
1214
1182
|
position: absolute;
|
|
1215
1183
|
inset: 0;
|
|
1216
|
-
border-radius:
|
|
1184
|
+
border-radius: 10px;
|
|
1217
1185
|
background: var(--vf-border);
|
|
1218
1186
|
cursor: pointer;
|
|
1219
1187
|
transition: background 0.2s ease;
|
|
@@ -1227,8 +1195,8 @@ y.styles = [
|
|
|
1227
1195
|
position: absolute;
|
|
1228
1196
|
top: 2px;
|
|
1229
1197
|
left: 2px;
|
|
1230
|
-
width:
|
|
1231
|
-
height:
|
|
1198
|
+
width: 16px;
|
|
1199
|
+
height: 16px;
|
|
1232
1200
|
border-radius: 50%;
|
|
1233
1201
|
background: white;
|
|
1234
1202
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
@@ -1237,7 +1205,7 @@ y.styles = [
|
|
|
1237
1205
|
}
|
|
1238
1206
|
|
|
1239
1207
|
.toggle input:checked ~ .toggle-thumb {
|
|
1240
|
-
transform: translateX(
|
|
1208
|
+
transform: translateX(16px);
|
|
1241
1209
|
}
|
|
1242
1210
|
|
|
1243
1211
|
/* Select dropdown */
|
|
@@ -1249,16 +1217,16 @@ y.styles = [
|
|
|
1249
1217
|
.select {
|
|
1250
1218
|
appearance: none;
|
|
1251
1219
|
-webkit-appearance: none;
|
|
1252
|
-
font-size:
|
|
1220
|
+
font-size: 12px;
|
|
1253
1221
|
font-family: var(--vf-font);
|
|
1254
|
-
padding:
|
|
1222
|
+
padding: 5px 26px 5px 8px;
|
|
1255
1223
|
border: 1px solid var(--vf-border);
|
|
1256
1224
|
border-radius: var(--vf-radius);
|
|
1257
1225
|
background: var(--vf-bg);
|
|
1258
1226
|
color: var(--vf-text);
|
|
1259
1227
|
cursor: pointer;
|
|
1260
1228
|
outline: none;
|
|
1261
|
-
min-width:
|
|
1229
|
+
min-width: 80px;
|
|
1262
1230
|
transition: border-color 0.15s ease;
|
|
1263
1231
|
}
|
|
1264
1232
|
|
|
@@ -1273,7 +1241,7 @@ y.styles = [
|
|
|
1273
1241
|
|
|
1274
1242
|
.select-chevron {
|
|
1275
1243
|
position: absolute;
|
|
1276
|
-
right:
|
|
1244
|
+
right: 6px;
|
|
1277
1245
|
top: 50%;
|
|
1278
1246
|
transform: translateY(-50%);
|
|
1279
1247
|
pointer-events: none;
|
|
@@ -1281,21 +1249,21 @@ y.styles = [
|
|
|
1281
1249
|
}
|
|
1282
1250
|
|
|
1283
1251
|
.select-chevron svg {
|
|
1284
|
-
width:
|
|
1285
|
-
height:
|
|
1252
|
+
width: 12px;
|
|
1253
|
+
height: 12px;
|
|
1286
1254
|
}
|
|
1287
1255
|
|
|
1288
1256
|
/* Footer */
|
|
1289
1257
|
.footer {
|
|
1290
|
-
padding:
|
|
1258
|
+
padding: 10px 14px;
|
|
1291
1259
|
border-top: 1px solid var(--vf-border);
|
|
1292
1260
|
flex-shrink: 0;
|
|
1293
1261
|
}
|
|
1294
1262
|
|
|
1295
1263
|
.reset-btn {
|
|
1296
1264
|
width: 100%;
|
|
1297
|
-
padding:
|
|
1298
|
-
font-size:
|
|
1265
|
+
padding: 6px 12px;
|
|
1266
|
+
font-size: 12px;
|
|
1299
1267
|
font-weight: 500;
|
|
1300
1268
|
font-family: var(--vf-font);
|
|
1301
1269
|
border: 1px solid var(--vf-border);
|
|
@@ -1312,33 +1280,32 @@ y.styles = [
|
|
|
1312
1280
|
}
|
|
1313
1281
|
|
|
1314
1282
|
.empty {
|
|
1315
|
-
padding:
|
|
1283
|
+
padding: 24px 14px;
|
|
1316
1284
|
text-align: center;
|
|
1317
1285
|
color: var(--vf-text-muted);
|
|
1318
|
-
font-size:
|
|
1286
|
+
font-size: 12px;
|
|
1319
1287
|
}
|
|
1320
1288
|
`
|
|
1321
1289
|
];
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
],
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
],
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
],
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
],
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
],
|
|
1290
|
+
R([
|
|
1291
|
+
N()
|
|
1292
|
+
], $.prototype, "open", 2);
|
|
1293
|
+
R([
|
|
1294
|
+
N()
|
|
1295
|
+
], $.prototype, "flags", 2);
|
|
1296
|
+
R([
|
|
1297
|
+
N()
|
|
1298
|
+
], $.prototype, "configs", 2);
|
|
1299
|
+
R([
|
|
1300
|
+
N()
|
|
1301
|
+
], $.prototype, "darkMode", 2);
|
|
1302
|
+
$ = R([
|
|
1303
|
+
W("vibe-toolbar")
|
|
1304
|
+
], $);
|
|
1337
1305
|
export {
|
|
1338
1306
|
C as VibeFlagBoolean,
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
y as VibeToolbar,
|
|
1307
|
+
L as VibeFlagOption,
|
|
1308
|
+
B as VibeFlagSelect,
|
|
1309
|
+
$ as VibeToolbar,
|
|
1343
1310
|
u as flagStore
|
|
1344
1311
|
};
|