@vibe-flags/core 0.1.3 → 0.1.5
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 +4 -4
- package/dist/vibe-flags.cdn.js +85 -104
- package/dist/vibe-flags.cdn.mjs +199 -219
- package/dist/vibe-flags.js +149 -169
- package/package.json +1 -1
package/dist/vibe-flags.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { LitElement as
|
|
2
|
-
import { customElement as
|
|
3
|
-
var
|
|
4
|
-
for (var o = s > 1 ? void 0 : s ?
|
|
1
|
+
import { LitElement as g, html as a, nothing as x, css as k } from "lit";
|
|
2
|
+
import { customElement as h, property as c, state as v } from "lit/decorators.js";
|
|
3
|
+
var M = Object.getOwnPropertyDescriptor, O = (t, e, r, s) => {
|
|
4
|
+
for (var o = s > 1 ? void 0 : s ? M(e, r) : e, n = t.length - 1, i; n >= 0; n--)
|
|
5
5
|
(i = t[n]) && (o = i(o) || o);
|
|
6
6
|
return o;
|
|
7
7
|
};
|
|
8
|
-
let F = class extends
|
|
8
|
+
let F = class extends g {
|
|
9
9
|
render() {
|
|
10
10
|
return a`<slot></slot>`;
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
-
F =
|
|
14
|
-
|
|
13
|
+
F = O([
|
|
14
|
+
h("vibe-flags")
|
|
15
15
|
], F);
|
|
16
|
-
const
|
|
17
|
-
function
|
|
16
|
+
const f = "vibe-flags:";
|
|
17
|
+
function w(t) {
|
|
18
18
|
return t.type === "boolean" ? !1 : t.options[0] || "";
|
|
19
19
|
}
|
|
20
|
-
class
|
|
20
|
+
class _ extends EventTarget {
|
|
21
21
|
constructor() {
|
|
22
22
|
super(...arguments), this.configs = /* @__PURE__ */ new Map(), this.state = {}, this.listening = !1, this.onStorageEvent = (e) => {
|
|
23
|
-
if (!e.key?.startsWith(
|
|
24
|
-
const r = e.key.slice(
|
|
23
|
+
if (!e.key?.startsWith(f)) return;
|
|
24
|
+
const r = e.key.slice(f.length), s = this.configs.get(r);
|
|
25
25
|
if (s)
|
|
26
26
|
try {
|
|
27
|
-
const o = e.newValue ? JSON.parse(e.newValue) :
|
|
27
|
+
const o = e.newValue ? JSON.parse(e.newValue) : w(s);
|
|
28
28
|
this.state[r] = o, this.dispatch(r);
|
|
29
29
|
} catch {
|
|
30
30
|
}
|
|
@@ -32,8 +32,8 @@ class M extends EventTarget {
|
|
|
32
32
|
}
|
|
33
33
|
register(e) {
|
|
34
34
|
this.configs.set(e.key, e);
|
|
35
|
-
const r = this.readFromStorage(e.key);
|
|
36
|
-
this.state[e.key] =
|
|
35
|
+
const r = w(e), s = this.readFromStorage(e.key), o = s !== null && (e.type === "boolean" && typeof s == "boolean" || e.type === "select" && typeof s == "string" && e.options.includes(s));
|
|
36
|
+
this.state[e.key] = o ? s : r, this.listening || (this.listening = !0, typeof window < "u" && window.addEventListener("storage", this.onStorageEvent)), this.dispatch(e.key);
|
|
37
37
|
}
|
|
38
38
|
unregister(e) {
|
|
39
39
|
this.configs.delete(e), delete this.state[e], this.dispatch();
|
|
@@ -56,13 +56,13 @@ class M extends EventTarget {
|
|
|
56
56
|
}
|
|
57
57
|
reset() {
|
|
58
58
|
for (const [e, r] of this.configs)
|
|
59
|
-
this.state[e] =
|
|
59
|
+
this.state[e] = w(r), this.removeFromStorage(e);
|
|
60
60
|
this.dispatch();
|
|
61
61
|
}
|
|
62
62
|
readFromStorage(e) {
|
|
63
63
|
if (typeof window > "u") return null;
|
|
64
64
|
try {
|
|
65
|
-
const r = localStorage.getItem(
|
|
65
|
+
const r = localStorage.getItem(f + e);
|
|
66
66
|
return r === null ? null : JSON.parse(r);
|
|
67
67
|
} catch {
|
|
68
68
|
return null;
|
|
@@ -71,14 +71,14 @@ class M extends EventTarget {
|
|
|
71
71
|
writeToStorage(e, r) {
|
|
72
72
|
if (!(typeof window > "u"))
|
|
73
73
|
try {
|
|
74
|
-
localStorage.setItem(
|
|
74
|
+
localStorage.setItem(f + e, JSON.stringify(r));
|
|
75
75
|
} catch {
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
removeFromStorage(e) {
|
|
79
79
|
if (!(typeof window > "u"))
|
|
80
80
|
try {
|
|
81
|
-
localStorage.removeItem(
|
|
81
|
+
localStorage.removeItem(f + e);
|
|
82
82
|
} catch {
|
|
83
83
|
}
|
|
84
84
|
}
|
|
@@ -90,8 +90,8 @@ class M extends EventTarget {
|
|
|
90
90
|
this.dispatchEvent(s), typeof window < "u" && window.dispatchEvent(new CustomEvent("vibe-flags-changed", { detail: r }));
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
const l = new
|
|
94
|
-
var E = Object.defineProperty, P = Object.getOwnPropertyDescriptor,
|
|
93
|
+
const l = new _();
|
|
94
|
+
var E = Object.defineProperty, P = Object.getOwnPropertyDescriptor, u = (t, e, r, s) => {
|
|
95
95
|
for (var o = s > 1 ? void 0 : s ? P(e, r) : e, n = t.length - 1, i; n >= 0; n--)
|
|
96
96
|
(i = t[n]) && (o = (s ? i(e, r, o) : i(o)) || o);
|
|
97
97
|
return s && o && E(e, r, o), o;
|
|
@@ -100,9 +100,9 @@ if (typeof document < "u" && !document.getElementById("vibe-flag-fouc")) {
|
|
|
100
100
|
const t = document.createElement("style");
|
|
101
101
|
t.id = "vibe-flag-fouc", t.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(t);
|
|
102
102
|
}
|
|
103
|
-
let p = class extends
|
|
103
|
+
let p = class extends g {
|
|
104
104
|
constructor() {
|
|
105
|
-
super(...arguments), this.name = "", this.description = "", this.value = "", this.isMatch = !1, this.
|
|
105
|
+
super(...arguments), this.name = "", this.description = "", this.value = "", this.isMatch = !1, this.onFlagChange = () => {
|
|
106
106
|
this.evaluate();
|
|
107
107
|
};
|
|
108
108
|
}
|
|
@@ -112,6 +112,9 @@ let p = class extends u {
|
|
|
112
112
|
disconnectedCallback() {
|
|
113
113
|
super.disconnectedCallback(), window.removeEventListener("vibe-flags-changed", this.onFlagChange);
|
|
114
114
|
}
|
|
115
|
+
firstUpdated() {
|
|
116
|
+
this.style.display = "contents";
|
|
117
|
+
}
|
|
115
118
|
willUpdate(t) {
|
|
116
119
|
(t.has("name") || t.has("description")) && this.registerFlag();
|
|
117
120
|
}
|
|
@@ -124,38 +127,35 @@ let p = class extends u {
|
|
|
124
127
|
}
|
|
125
128
|
evaluate() {
|
|
126
129
|
const t = l.get(this.name);
|
|
127
|
-
t === void 0 ? this.isMatch = !1 : this.value === "" ? this.isMatch = !0 : this.isMatch = String(t) === this.value, this.
|
|
130
|
+
t === void 0 ? this.isMatch = !1 : this.value === "" ? this.isMatch = !0 : this.isMatch = String(t) === this.value, this.isMatch ? this.setAttribute("active", "") : this.removeAttribute("active");
|
|
128
131
|
}
|
|
129
132
|
render() {
|
|
130
|
-
return this.isMatch ? a`<slot></slot>` :
|
|
133
|
+
return this.isMatch ? a`<slot></slot>` : x;
|
|
131
134
|
}
|
|
132
135
|
};
|
|
133
|
-
|
|
134
|
-
|
|
136
|
+
u([
|
|
137
|
+
c({ type: String })
|
|
135
138
|
], p.prototype, "name", 2);
|
|
136
|
-
|
|
137
|
-
|
|
139
|
+
u([
|
|
140
|
+
c({ type: String })
|
|
138
141
|
], p.prototype, "description", 2);
|
|
139
|
-
|
|
140
|
-
|
|
142
|
+
u([
|
|
143
|
+
c({ type: String })
|
|
141
144
|
], p.prototype, "value", 2);
|
|
142
|
-
|
|
143
|
-
|
|
145
|
+
u([
|
|
146
|
+
v()
|
|
144
147
|
], p.prototype, "isMatch", 2);
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
], p.prototype, "ready", 2);
|
|
148
|
-
p = g([
|
|
149
|
-
b("vibe-flag-boolean")
|
|
148
|
+
p = u([
|
|
149
|
+
h("vibe-flag-boolean")
|
|
150
150
|
], p);
|
|
151
|
-
var T = Object.defineProperty, j = Object.getOwnPropertyDescriptor,
|
|
151
|
+
var T = Object.defineProperty, j = Object.getOwnPropertyDescriptor, S = (t, e, r, s) => {
|
|
152
152
|
for (var o = s > 1 ? void 0 : s ? j(e, r) : e, n = t.length - 1, i; n >= 0; n--)
|
|
153
153
|
(i = t[n]) && (o = (s ? i(e, r, o) : i(o)) || o);
|
|
154
154
|
return s && o && T(e, r, o), o;
|
|
155
155
|
};
|
|
156
|
-
let
|
|
156
|
+
let y = class extends g {
|
|
157
157
|
constructor() {
|
|
158
|
-
super(...arguments), this.name = "", this.description = "", this.
|
|
158
|
+
super(...arguments), this.name = "", this.description = "", this.onFlagChange = () => {
|
|
159
159
|
this.syncOptions();
|
|
160
160
|
};
|
|
161
161
|
}
|
|
@@ -165,6 +165,9 @@ let v = class extends u {
|
|
|
165
165
|
disconnectedCallback() {
|
|
166
166
|
super.disconnectedCallback(), window.removeEventListener("vibe-flags-changed", this.onFlagChange);
|
|
167
167
|
}
|
|
168
|
+
firstUpdated() {
|
|
169
|
+
this.style.display = "contents";
|
|
170
|
+
}
|
|
168
171
|
willUpdate(t) {
|
|
169
172
|
(t.has("name") || t.has("description")) && this.registerFlag();
|
|
170
173
|
}
|
|
@@ -185,47 +188,46 @@ let v = class extends u {
|
|
|
185
188
|
const t = l.get(this.name);
|
|
186
189
|
for (const e of this.getOptions())
|
|
187
190
|
e.active = e.value === t;
|
|
188
|
-
this.ready || (this.ready = !0, this.style.display = "contents");
|
|
189
191
|
}
|
|
190
192
|
render() {
|
|
191
193
|
return a`<slot></slot>`;
|
|
192
194
|
}
|
|
193
195
|
};
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
],
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
],
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
],
|
|
203
|
-
v = w([
|
|
204
|
-
b("vibe-flag-select")
|
|
205
|
-
], v);
|
|
196
|
+
S([
|
|
197
|
+
c({ type: String })
|
|
198
|
+
], y.prototype, "name", 2);
|
|
199
|
+
S([
|
|
200
|
+
c({ type: String })
|
|
201
|
+
], y.prototype, "description", 2);
|
|
202
|
+
y = S([
|
|
203
|
+
h("vibe-flag-select")
|
|
204
|
+
], y);
|
|
206
205
|
var I = Object.defineProperty, z = Object.getOwnPropertyDescriptor, C = (t, e, r, s) => {
|
|
207
206
|
for (var o = s > 1 ? void 0 : s ? z(e, r) : e, n = t.length - 1, i; n >= 0; n--)
|
|
208
207
|
(i = t[n]) && (o = (s ? i(e, r, o) : i(o)) || o);
|
|
209
208
|
return s && o && I(e, r, o), o;
|
|
210
209
|
};
|
|
211
|
-
let m = class extends
|
|
210
|
+
let m = class extends g {
|
|
212
211
|
constructor() {
|
|
213
212
|
super(...arguments), this.value = "", this.active = !1;
|
|
214
213
|
}
|
|
214
|
+
firstUpdated() {
|
|
215
|
+
this.style.display = "contents";
|
|
216
|
+
}
|
|
215
217
|
render() {
|
|
216
|
-
return this.active ? a`<slot></slot>` :
|
|
218
|
+
return this.active ? a`<slot></slot>` : x;
|
|
217
219
|
}
|
|
218
220
|
};
|
|
219
221
|
C([
|
|
220
|
-
|
|
222
|
+
c({ type: String })
|
|
221
223
|
], m.prototype, "value", 2);
|
|
222
224
|
C([
|
|
223
|
-
c()
|
|
225
|
+
c({ type: Boolean, reflect: !0 })
|
|
224
226
|
], m.prototype, "active", 2);
|
|
225
227
|
m = C([
|
|
226
|
-
|
|
228
|
+
h("vibe-flag-option")
|
|
227
229
|
], m);
|
|
228
|
-
const
|
|
230
|
+
const A = k`
|
|
229
231
|
:host {
|
|
230
232
|
--vf-bg: #0a0a0a;
|
|
231
233
|
--vf-bg-muted: #171717;
|
|
@@ -249,7 +251,7 @@ const D = S`
|
|
|
249
251
|
--vf-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6),
|
|
250
252
|
0 8px 10px -6px rgba(0, 0, 0, 0.6);
|
|
251
253
|
}
|
|
252
|
-
`, B =
|
|
254
|
+
`, B = k`
|
|
253
255
|
:host {
|
|
254
256
|
--vf-bg: #ffffff;
|
|
255
257
|
--vf-bg-muted: #f5f5f5;
|
|
@@ -274,13 +276,13 @@ const D = S`
|
|
|
274
276
|
0 8px 10px -6px rgba(0, 0, 0, 0.1);
|
|
275
277
|
}
|
|
276
278
|
`;
|
|
277
|
-
var
|
|
279
|
+
var D = Object.defineProperty, V = Object.getOwnPropertyDescriptor, b = (t, e, r, s) => {
|
|
278
280
|
for (var o = s > 1 ? void 0 : s ? V(e, r) : e, n = t.length - 1, i; n >= 0; n--)
|
|
279
281
|
(i = t[n]) && (o = (s ? i(e, r, o) : i(o)) || o);
|
|
280
|
-
return s && o &&
|
|
282
|
+
return s && o && D(e, r, o), o;
|
|
281
283
|
};
|
|
282
284
|
const $ = "vibeFlagsTheme";
|
|
283
|
-
let d = class extends
|
|
285
|
+
let d = class extends g {
|
|
284
286
|
constructor() {
|
|
285
287
|
super(...arguments), this.open = !1, this.flags = {}, this.configs = [], this.darkMode = !0, this.onFlagChange = () => {
|
|
286
288
|
this.syncFromStore();
|
|
@@ -301,7 +303,7 @@ let d = class extends u {
|
|
|
301
303
|
this.darkMode = !this.darkMode, localStorage.setItem($, this.darkMode ? "dark" : "light"), this.applyTheme();
|
|
302
304
|
}
|
|
303
305
|
applyTheme() {
|
|
304
|
-
const t = this.darkMode ?
|
|
306
|
+
const t = this.darkMode ? A : B, e = new CSSStyleSheet();
|
|
305
307
|
e.replaceSync(t.cssText), this.shadowRoot.adoptedStyleSheets = [
|
|
306
308
|
...d.elementStyles.map((r) => r.styleSheet),
|
|
307
309
|
e
|
|
@@ -310,12 +312,9 @@ let d = class extends u {
|
|
|
310
312
|
syncFromStore() {
|
|
311
313
|
this.configs = l.getConfig(), this.flags = l.getAll();
|
|
312
314
|
}
|
|
313
|
-
|
|
315
|
+
toggle() {
|
|
314
316
|
this.open = !this.open;
|
|
315
317
|
}
|
|
316
|
-
closeSidebar() {
|
|
317
|
-
this.open = !1;
|
|
318
|
-
}
|
|
319
318
|
onToggle(t) {
|
|
320
319
|
const e = this.flags[t];
|
|
321
320
|
l.set(t, !e);
|
|
@@ -365,7 +364,7 @@ let d = class extends u {
|
|
|
365
364
|
`;
|
|
366
365
|
}
|
|
367
366
|
renderSelectFlag(t) {
|
|
368
|
-
if (t.type !== "select") return
|
|
367
|
+
if (t.type !== "select") return x;
|
|
369
368
|
const e = this.flags[t.key];
|
|
370
369
|
return a`
|
|
371
370
|
<div class="flag-item">
|
|
@@ -394,15 +393,13 @@ let d = class extends u {
|
|
|
394
393
|
}
|
|
395
394
|
render() {
|
|
396
395
|
return a`
|
|
397
|
-
${this.open ?
|
|
398
|
-
<button class="fab" @click=${this.
|
|
396
|
+
${this.open ? x : a`
|
|
397
|
+
<button class="fab" @click=${this.toggle} aria-label="Toggle feature flags">
|
|
399
398
|
${this.renderFlagIcon()}
|
|
400
399
|
</button>
|
|
401
400
|
`}
|
|
402
401
|
|
|
403
|
-
<div class="
|
|
404
|
-
|
|
405
|
-
<div class="sidebar ${this.open ? "open" : ""}">
|
|
402
|
+
<div class="card ${this.open ? "open" : ""}">
|
|
406
403
|
<div class="header">
|
|
407
404
|
<h2>
|
|
408
405
|
${this.renderFlagIcon()}
|
|
@@ -413,7 +410,7 @@ let d = class extends u {
|
|
|
413
410
|
<button class="icon-btn" @click=${this.toggleTheme} aria-label="Toggle theme" title="${this.darkMode ? "Switch to light theme" : "Switch to dark theme"}">
|
|
414
411
|
${this.darkMode ? this.renderSunIcon() : this.renderMoonIcon()}
|
|
415
412
|
</button>
|
|
416
|
-
<button class="icon-btn" @click=${this.
|
|
413
|
+
<button class="icon-btn" @click=${this.toggle} aria-label="Close">
|
|
417
414
|
${this.renderCloseIcon()}
|
|
418
415
|
</button>
|
|
419
416
|
</div>
|
|
@@ -435,7 +432,7 @@ let d = class extends u {
|
|
|
435
432
|
}
|
|
436
433
|
};
|
|
437
434
|
d.styles = [
|
|
438
|
-
|
|
435
|
+
k`
|
|
439
436
|
* {
|
|
440
437
|
box-sizing: border-box;
|
|
441
438
|
margin: 0;
|
|
@@ -444,15 +441,13 @@ d.styles = [
|
|
|
444
441
|
|
|
445
442
|
.fab {
|
|
446
443
|
position: fixed;
|
|
447
|
-
right:
|
|
448
|
-
|
|
449
|
-
transform: translateY(-50%);
|
|
444
|
+
right: 16px;
|
|
445
|
+
bottom: 16px;
|
|
450
446
|
z-index: 99999;
|
|
451
|
-
width:
|
|
452
|
-
height:
|
|
447
|
+
width: 42px;
|
|
448
|
+
height: 42px;
|
|
453
449
|
border: 1px solid var(--vf-border);
|
|
454
|
-
border-
|
|
455
|
-
border-radius: var(--vf-radius-lg) 0 0 var(--vf-radius-lg);
|
|
450
|
+
border-radius: 12px;
|
|
456
451
|
background: var(--vf-bg);
|
|
457
452
|
color: var(--vf-text);
|
|
458
453
|
cursor: pointer;
|
|
@@ -465,94 +460,80 @@ d.styles = [
|
|
|
465
460
|
}
|
|
466
461
|
|
|
467
462
|
.fab:hover {
|
|
468
|
-
width: 46px;
|
|
469
463
|
background: var(--vf-bg-muted);
|
|
464
|
+
box-shadow: var(--vf-shadow-xl);
|
|
465
|
+
transform: translateY(-1px);
|
|
470
466
|
}
|
|
471
467
|
|
|
472
468
|
.fab svg {
|
|
473
|
-
width:
|
|
474
|
-
height:
|
|
469
|
+
width: 18px;
|
|
470
|
+
height: 18px;
|
|
475
471
|
flex-shrink: 0;
|
|
476
472
|
}
|
|
477
473
|
|
|
478
|
-
.
|
|
474
|
+
.card {
|
|
479
475
|
position: fixed;
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
background: rgba(0, 0, 0, 0.4);
|
|
483
|
-
opacity: 0;
|
|
484
|
-
transition: opacity 0.3s ease;
|
|
485
|
-
pointer-events: none;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
.backdrop.open {
|
|
489
|
-
opacity: 1;
|
|
490
|
-
pointer-events: auto;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
.sidebar {
|
|
494
|
-
position: fixed;
|
|
495
|
-
top: 0;
|
|
496
|
-
right: 0;
|
|
497
|
-
bottom: 0;
|
|
476
|
+
right: 16px;
|
|
477
|
+
bottom: 16px;
|
|
498
478
|
z-index: 100001;
|
|
499
|
-
width:
|
|
500
|
-
max-width:
|
|
479
|
+
width: 300px;
|
|
480
|
+
max-width: calc(100vw - 32px);
|
|
481
|
+
max-height: calc(100vh - 32px);
|
|
501
482
|
background: var(--vf-bg);
|
|
502
|
-
border
|
|
483
|
+
border: 1px solid var(--vf-border);
|
|
484
|
+
border-radius: 14px;
|
|
503
485
|
box-shadow: var(--vf-shadow-xl);
|
|
504
|
-
transform: translateX(100%);
|
|
505
|
-
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
506
|
-
display: flex;
|
|
507
|
-
flex-direction: column;
|
|
508
486
|
font-family: var(--vf-font);
|
|
509
487
|
color: var(--vf-text);
|
|
488
|
+
overflow: hidden;
|
|
489
|
+
display: flex;
|
|
490
|
+
flex-direction: column;
|
|
491
|
+
opacity: 0;
|
|
492
|
+
transform: translateY(8px) scale(0.96);
|
|
493
|
+
pointer-events: none;
|
|
494
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
510
495
|
}
|
|
511
496
|
|
|
512
|
-
.
|
|
513
|
-
|
|
497
|
+
.card.open {
|
|
498
|
+
opacity: 1;
|
|
499
|
+
transform: translateY(0) scale(1);
|
|
500
|
+
pointer-events: auto;
|
|
514
501
|
}
|
|
515
502
|
|
|
516
503
|
.header {
|
|
517
504
|
display: flex;
|
|
518
505
|
align-items: center;
|
|
519
506
|
justify-content: space-between;
|
|
520
|
-
padding:
|
|
507
|
+
padding: 12px 14px;
|
|
521
508
|
border-bottom: 1px solid var(--vf-border);
|
|
522
509
|
flex-shrink: 0;
|
|
523
510
|
}
|
|
524
511
|
|
|
525
|
-
.header-left {
|
|
526
|
-
display: flex;
|
|
527
|
-
align-items: center;
|
|
528
|
-
gap: 8px;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
512
|
.header h2 {
|
|
532
|
-
font-size:
|
|
513
|
+
font-size: 13px;
|
|
533
514
|
font-weight: 600;
|
|
534
|
-
letter-spacing: -0.
|
|
515
|
+
letter-spacing: -0.01em;
|
|
535
516
|
display: flex;
|
|
536
517
|
align-items: center;
|
|
537
|
-
gap:
|
|
518
|
+
gap: 7px;
|
|
538
519
|
}
|
|
539
520
|
|
|
540
521
|
.header h2 svg {
|
|
541
|
-
width:
|
|
542
|
-
height:
|
|
522
|
+
width: 15px;
|
|
523
|
+
height: 15px;
|
|
543
524
|
color: var(--vf-accent);
|
|
544
525
|
}
|
|
545
526
|
|
|
546
527
|
.header-actions {
|
|
547
528
|
display: flex;
|
|
548
529
|
align-items: center;
|
|
549
|
-
gap:
|
|
530
|
+
gap: 2px;
|
|
550
531
|
}
|
|
551
532
|
|
|
552
533
|
.badge {
|
|
553
|
-
font-size:
|
|
534
|
+
font-size: 10px;
|
|
554
535
|
font-weight: 500;
|
|
555
|
-
padding:
|
|
536
|
+
padding: 1px 6px;
|
|
556
537
|
border-radius: 9999px;
|
|
557
538
|
background: var(--vf-bg-muted);
|
|
558
539
|
color: var(--vf-text-muted);
|
|
@@ -560,8 +541,8 @@ d.styles = [
|
|
|
560
541
|
}
|
|
561
542
|
|
|
562
543
|
.icon-btn {
|
|
563
|
-
width:
|
|
564
|
-
height:
|
|
544
|
+
width: 28px;
|
|
545
|
+
height: 28px;
|
|
565
546
|
border: none;
|
|
566
547
|
border-radius: var(--vf-radius);
|
|
567
548
|
background: transparent;
|
|
@@ -579,18 +560,17 @@ d.styles = [
|
|
|
579
560
|
}
|
|
580
561
|
|
|
581
562
|
.icon-btn svg {
|
|
582
|
-
width:
|
|
583
|
-
height:
|
|
563
|
+
width: 14px;
|
|
564
|
+
height: 14px;
|
|
584
565
|
}
|
|
585
566
|
|
|
586
567
|
.flags {
|
|
587
|
-
flex: 1;
|
|
588
568
|
overflow-y: auto;
|
|
589
|
-
|
|
569
|
+
flex: 1;
|
|
590
570
|
}
|
|
591
571
|
|
|
592
572
|
.flag-item {
|
|
593
|
-
padding:
|
|
573
|
+
padding: 10px 14px;
|
|
594
574
|
transition: background 0.1s ease;
|
|
595
575
|
}
|
|
596
576
|
|
|
@@ -603,13 +583,13 @@ d.styles = [
|
|
|
603
583
|
}
|
|
604
584
|
|
|
605
585
|
.flag-label {
|
|
606
|
-
font-size:
|
|
586
|
+
font-size: 12px;
|
|
607
587
|
font-weight: 500;
|
|
608
|
-
margin-bottom:
|
|
588
|
+
margin-bottom: 1px;
|
|
609
589
|
}
|
|
610
590
|
|
|
611
591
|
.flag-key {
|
|
612
|
-
font-size:
|
|
592
|
+
font-size: 10px;
|
|
613
593
|
color: var(--vf-text-muted);
|
|
614
594
|
font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas,
|
|
615
595
|
monospace;
|
|
@@ -619,7 +599,7 @@ d.styles = [
|
|
|
619
599
|
display: flex;
|
|
620
600
|
align-items: center;
|
|
621
601
|
justify-content: space-between;
|
|
622
|
-
gap:
|
|
602
|
+
gap: 10px;
|
|
623
603
|
}
|
|
624
604
|
|
|
625
605
|
.flag-info {
|
|
@@ -630,8 +610,8 @@ d.styles = [
|
|
|
630
610
|
/* Toggle switch */
|
|
631
611
|
.toggle {
|
|
632
612
|
position: relative;
|
|
633
|
-
width:
|
|
634
|
-
height:
|
|
613
|
+
width: 36px;
|
|
614
|
+
height: 20px;
|
|
635
615
|
flex-shrink: 0;
|
|
636
616
|
}
|
|
637
617
|
|
|
@@ -645,7 +625,7 @@ d.styles = [
|
|
|
645
625
|
.toggle-track {
|
|
646
626
|
position: absolute;
|
|
647
627
|
inset: 0;
|
|
648
|
-
border-radius:
|
|
628
|
+
border-radius: 10px;
|
|
649
629
|
background: var(--vf-border);
|
|
650
630
|
cursor: pointer;
|
|
651
631
|
transition: background 0.2s ease;
|
|
@@ -659,8 +639,8 @@ d.styles = [
|
|
|
659
639
|
position: absolute;
|
|
660
640
|
top: 2px;
|
|
661
641
|
left: 2px;
|
|
662
|
-
width:
|
|
663
|
-
height:
|
|
642
|
+
width: 16px;
|
|
643
|
+
height: 16px;
|
|
664
644
|
border-radius: 50%;
|
|
665
645
|
background: white;
|
|
666
646
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
@@ -669,7 +649,7 @@ d.styles = [
|
|
|
669
649
|
}
|
|
670
650
|
|
|
671
651
|
.toggle input:checked ~ .toggle-thumb {
|
|
672
|
-
transform: translateX(
|
|
652
|
+
transform: translateX(16px);
|
|
673
653
|
}
|
|
674
654
|
|
|
675
655
|
/* Select dropdown */
|
|
@@ -681,16 +661,16 @@ d.styles = [
|
|
|
681
661
|
.select {
|
|
682
662
|
appearance: none;
|
|
683
663
|
-webkit-appearance: none;
|
|
684
|
-
font-size:
|
|
664
|
+
font-size: 12px;
|
|
685
665
|
font-family: var(--vf-font);
|
|
686
|
-
padding:
|
|
666
|
+
padding: 5px 26px 5px 8px;
|
|
687
667
|
border: 1px solid var(--vf-border);
|
|
688
668
|
border-radius: var(--vf-radius);
|
|
689
669
|
background: var(--vf-bg);
|
|
690
670
|
color: var(--vf-text);
|
|
691
671
|
cursor: pointer;
|
|
692
672
|
outline: none;
|
|
693
|
-
min-width:
|
|
673
|
+
min-width: 80px;
|
|
694
674
|
transition: border-color 0.15s ease;
|
|
695
675
|
}
|
|
696
676
|
|
|
@@ -705,7 +685,7 @@ d.styles = [
|
|
|
705
685
|
|
|
706
686
|
.select-chevron {
|
|
707
687
|
position: absolute;
|
|
708
|
-
right:
|
|
688
|
+
right: 6px;
|
|
709
689
|
top: 50%;
|
|
710
690
|
transform: translateY(-50%);
|
|
711
691
|
pointer-events: none;
|
|
@@ -713,21 +693,21 @@ d.styles = [
|
|
|
713
693
|
}
|
|
714
694
|
|
|
715
695
|
.select-chevron svg {
|
|
716
|
-
width:
|
|
717
|
-
height:
|
|
696
|
+
width: 12px;
|
|
697
|
+
height: 12px;
|
|
718
698
|
}
|
|
719
699
|
|
|
720
700
|
/* Footer */
|
|
721
701
|
.footer {
|
|
722
|
-
padding:
|
|
702
|
+
padding: 10px 14px;
|
|
723
703
|
border-top: 1px solid var(--vf-border);
|
|
724
704
|
flex-shrink: 0;
|
|
725
705
|
}
|
|
726
706
|
|
|
727
707
|
.reset-btn {
|
|
728
708
|
width: 100%;
|
|
729
|
-
padding:
|
|
730
|
-
font-size:
|
|
709
|
+
padding: 6px 12px;
|
|
710
|
+
font-size: 12px;
|
|
731
711
|
font-weight: 500;
|
|
732
712
|
font-family: var(--vf-font);
|
|
733
713
|
border: 1px solid var(--vf-border);
|
|
@@ -744,32 +724,32 @@ d.styles = [
|
|
|
744
724
|
}
|
|
745
725
|
|
|
746
726
|
.empty {
|
|
747
|
-
padding:
|
|
727
|
+
padding: 24px 14px;
|
|
748
728
|
text-align: center;
|
|
749
729
|
color: var(--vf-text-muted);
|
|
750
|
-
font-size:
|
|
730
|
+
font-size: 12px;
|
|
751
731
|
}
|
|
752
732
|
`
|
|
753
733
|
];
|
|
754
|
-
|
|
755
|
-
|
|
734
|
+
b([
|
|
735
|
+
v()
|
|
756
736
|
], d.prototype, "open", 2);
|
|
757
|
-
|
|
758
|
-
|
|
737
|
+
b([
|
|
738
|
+
v()
|
|
759
739
|
], d.prototype, "flags", 2);
|
|
760
|
-
|
|
761
|
-
|
|
740
|
+
b([
|
|
741
|
+
v()
|
|
762
742
|
], d.prototype, "configs", 2);
|
|
763
|
-
|
|
764
|
-
|
|
743
|
+
b([
|
|
744
|
+
v()
|
|
765
745
|
], d.prototype, "darkMode", 2);
|
|
766
|
-
d =
|
|
767
|
-
|
|
746
|
+
d = b([
|
|
747
|
+
h("vibe-toolbar")
|
|
768
748
|
], d);
|
|
769
749
|
export {
|
|
770
750
|
p as VibeFlagBoolean,
|
|
771
751
|
m as VibeFlagOption,
|
|
772
|
-
|
|
752
|
+
y as VibeFlagSelect,
|
|
773
753
|
F as VibeFlags,
|
|
774
754
|
d as VibeToolbar,
|
|
775
755
|
l as flagStore
|