@directus/themes 0.2.0 → 0.3.1

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.js CHANGED
@@ -1,173 +1,321 @@
1
- import { Type as e } from "@sinclair/typebox";
2
- import { defineStore as C, storeToRefs as j } from "pinia";
3
- import { reactive as H, computed as h, unref as c, defineComponent as W, toRefs as O, openBlock as B, createBlock as $, Teleport as L, createTextVNode as T, toDisplayString as D } from "vue";
4
- import { merge as R, get as M, mapKeys as _ } from "lodash-es";
5
- import { useHead as N } from "@unhead/vue";
6
- import I from "decamelize";
7
- import { flatten as P } from "flat";
8
- const r = e.String({ $id: "Color" }), d = e.String({ $id: "FamilyName" }), F = e.String({ $id: "Length" }), A = e.String({ $id: "Percentage" }), y = e.String({ $id: "BoxShadow" }), g = e.Union([e.String(), e.Literal("thin"), e.Literal("medium"), e.Literal("thick")], {
1
+ import { computed as v, unref as i, reactive as B, defineComponent as $, toRefs as D, openBlock as G, createBlock as T, Teleport as L, createTextVNode as N, toDisplayString as M } from "vue";
2
+ import { useHead as E } from "@unhead/vue";
3
+ import { get as W, merge as w, mapKeys as U } from "lodash-es";
4
+ import { defineStore as _, storeToRefs as I } from "pinia";
5
+ import P from "decamelize";
6
+ import { flatten as V } from "flat";
7
+ import { cssVar as z } from "@directus/utils/browser";
8
+ import { Type as r } from "@sinclair/typebox";
9
+ const e = r.String({ $id: "Color" }), u = r.String({ $id: "FamilyName" }), F = r.String({ $id: "FontWeight" }), k = r.String({ $id: "Length" }), O = r.String({ $id: "Percentage" }), y = r.String({ $id: "BoxShadow" }), j = r.String({ $id: "Number" }), H = r.String({ $id: "Size" }), b = r.Union([r.String(), r.Literal("thin"), r.Literal("medium"), r.Literal("thick")], {
9
10
  $id: "LineWidth"
10
- }), U = e.Object({
11
+ }), S = r.Optional(
12
+ r.Object({
13
+ columnGap: r.Optional(r.Union([r.Ref(k), r.Ref(O)])),
14
+ rowGap: r.Optional(r.Union([r.Ref(k), r.Ref(O)])),
15
+ field: r.Optional(
16
+ r.Object({
17
+ label: r.Optional(
18
+ r.Object({
19
+ foreground: r.Optional(r.Ref(e)),
20
+ fontFamily: r.Optional(r.Ref(u)),
21
+ fontWeight: r.Optional(r.Ref(F))
22
+ })
23
+ ),
24
+ input: r.Optional(
25
+ r.Object({
26
+ background: r.Optional(r.Ref(e)),
27
+ backgroundSubdued: r.Optional(r.Ref(e)),
28
+ foreground: r.Optional(r.Ref(e)),
29
+ foregroundSubdued: r.Optional(r.Ref(e)),
30
+ borderColor: r.Optional(r.Ref(e)),
31
+ borderColorHover: r.Optional(r.Ref(e)),
32
+ borderColorFocus: r.Optional(r.Ref(e)),
33
+ boxShadow: r.Optional(r.Ref(y)),
34
+ boxShadowHover: r.Optional(r.Ref(y)),
35
+ boxShadowFocus: r.Optional(r.Ref(y)),
36
+ height: r.Optional(r.Ref(H)),
37
+ padding: r.Optional(r.Union([r.Ref(k), r.Ref(O)]))
38
+ })
39
+ )
40
+ })
41
+ )
42
+ })
43
+ ), K = r.Object({
44
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////
45
+ // Base border styles
46
+ borderRadius: r.Optional(r.Union([r.Ref(k), r.Ref(O)])),
47
+ borderWidth: r.Optional(r.Ref(b)),
11
48
  //////////////////////////////////////////////////////////////////////////////////////////////////////////
12
49
  // Base color palette
13
- foreground: e.Ref(r),
14
- foregroundSubdued: e.Ref(r),
15
- foregroundAccent: e.Ref(r),
16
- background: e.Ref(r),
17
- primary: e.Ref(r),
18
- primaryBackground: e.Ref(r),
19
- primarySubdued: e.Ref(r),
20
- primaryAccent: e.Ref(r),
21
- secondary: e.Ref(r),
22
- secondaryBackground: e.Ref(r),
23
- secondarySubdued: e.Ref(r),
24
- secondaryAccent: e.Ref(r),
25
- success: e.Ref(r),
26
- successBackground: e.Ref(r),
27
- successSubdued: e.Ref(r),
28
- successAccent: e.Ref(r),
29
- warning: e.Ref(r),
30
- warningBackground: e.Ref(r),
31
- warningSubdued: e.Ref(r),
32
- warningAccent: e.Ref(r),
33
- danger: e.Ref(r),
34
- dangerBackground: e.Ref(r),
35
- dangerSubdued: e.Ref(r),
36
- dangerAccent: e.Ref(r),
50
+ foreground: r.Optional(r.Ref(e)),
51
+ foregroundSubdued: r.Optional(r.Ref(e)),
52
+ foregroundAccent: r.Optional(r.Ref(e)),
53
+ background: r.Optional(r.Ref(e)),
54
+ backgroundNormal: r.Optional(r.Ref(e)),
55
+ backgroundAccent: r.Optional(r.Ref(e)),
56
+ backgroundSubdued: r.Optional(r.Ref(e)),
57
+ borderColor: r.Optional(r.Ref(e)),
58
+ borderColorAccent: r.Optional(r.Ref(e)),
59
+ borderColorSubdued: r.Optional(r.Ref(e)),
60
+ primary: r.Optional(r.Ref(e)),
61
+ primaryBackground: r.Optional(r.Ref(e)),
62
+ primarySubdued: r.Optional(r.Ref(e)),
63
+ primaryAccent: r.Optional(r.Ref(e)),
64
+ secondary: r.Optional(r.Ref(e)),
65
+ secondaryBackground: r.Optional(r.Ref(e)),
66
+ secondarySubdued: r.Optional(r.Ref(e)),
67
+ secondaryAccent: r.Optional(r.Ref(e)),
68
+ success: r.Optional(r.Ref(e)),
69
+ successBackground: r.Optional(r.Ref(e)),
70
+ successSubdued: r.Optional(r.Ref(e)),
71
+ successAccent: r.Optional(r.Ref(e)),
72
+ warning: r.Optional(r.Ref(e)),
73
+ warningBackground: r.Optional(r.Ref(e)),
74
+ warningSubdued: r.Optional(r.Ref(e)),
75
+ warningAccent: r.Optional(r.Ref(e)),
76
+ danger: r.Optional(r.Ref(e)),
77
+ dangerBackground: r.Optional(r.Ref(e)),
78
+ dangerSubdued: r.Optional(r.Ref(e)),
79
+ dangerAccent: r.Optional(r.Ref(e)),
37
80
  //////////////////////////////////////////////////////////////////////////////////////////////////////////
38
81
  // Base fonts
39
- fontFamilyDisplay: e.Ref(d),
40
- fontFamilySansSerif: e.Ref(d),
41
- fontFamilySerif: e.Ref(d),
42
- fontFamilyMonospace: e.Ref(d),
43
- //////////////////////////////////////////////////////////////////////////////////////////////////////////
44
- // Base border styles
45
- borderRadius: e.Union([e.Ref(F), e.Ref(A)]),
46
- borderWidth: e.Ref(g),
82
+ fonts: r.Optional(
83
+ r.Object({
84
+ display: r.Optional(
85
+ r.Object({
86
+ fontFamily: r.Optional(r.Ref(u)),
87
+ fontWeight: r.Optional(r.Ref(F))
88
+ })
89
+ ),
90
+ sans: r.Optional(
91
+ r.Object({
92
+ fontFamily: r.Optional(r.Ref(u)),
93
+ fontWeight: r.Optional(r.Ref(F))
94
+ })
95
+ ),
96
+ serif: r.Optional(
97
+ r.Object({
98
+ fontFamily: r.Optional(r.Ref(u)),
99
+ fontWeight: r.Optional(r.Ref(F))
100
+ })
101
+ ),
102
+ monospace: r.Optional(
103
+ r.Object({
104
+ fontFamily: r.Optional(r.Ref(u)),
105
+ fontWeight: r.Optional(r.Ref(F))
106
+ })
107
+ )
108
+ })
109
+ ),
47
110
  //////////////////////////////////////////////////////////////////////////////////////////////////////////
48
111
  // Scopes
49
- navigation: e.Object({
50
- background: e.Ref(r),
51
- borderWidth: e.Ref(g),
52
- borderColor: e.Ref(r),
53
- project: e.Object({
54
- background: e.Ref(r),
55
- foreground: e.Ref(r),
56
- fontFamily: e.Ref(d),
57
- borderWidth: e.Ref(g),
58
- borderColor: e.Ref(r)
59
- }),
60
- modules: e.Object({
61
- background: e.Ref(r),
62
- borderWidth: e.Ref(g),
63
- borderColor: e.Ref(r),
64
- button: e.Object({
65
- foreground: e.Ref(r),
66
- foregroundHover: e.Ref(r),
67
- foregroundActive: e.Ref(r),
68
- background: e.Ref(r),
69
- backgroundHover: e.Ref(r),
70
- backgroundActive: e.Ref(r)
71
- })
72
- }),
73
- list: e.Object({
74
- icon: e.Object({
75
- foreground: e.Ref(r),
76
- foregroundHover: e.Ref(r),
77
- foregroundActive: e.Ref(r)
78
- }),
79
- foreground: e.Ref(r),
80
- foregroundHover: e.Ref(r),
81
- foregroundActive: e.Ref(r),
82
- background: e.Ref(r),
83
- backgroundHover: e.Ref(r),
84
- backgroundActive: e.Ref(r),
85
- fontFamily: e.Ref(d),
86
- divider: e.Object({
87
- borderColor: e.Ref(r),
88
- borderWidth: e.Ref(g)
89
- })
112
+ navigation: r.Optional(
113
+ r.Object({
114
+ background: r.Optional(r.Ref(e)),
115
+ backgroundAccent: r.Optional(r.Ref(e)),
116
+ borderWidth: r.Optional(r.Ref(b)),
117
+ borderColor: r.Optional(r.Ref(e)),
118
+ project: r.Optional(
119
+ r.Object({
120
+ background: r.Optional(r.Ref(e)),
121
+ foreground: r.Optional(r.Ref(e)),
122
+ fontFamily: r.Optional(r.Ref(u)),
123
+ borderWidth: r.Optional(r.Ref(b)),
124
+ borderColor: r.Optional(r.Ref(e))
125
+ })
126
+ ),
127
+ modules: r.Optional(
128
+ r.Object({
129
+ background: r.Optional(r.Ref(e)),
130
+ borderWidth: r.Optional(r.Ref(b)),
131
+ borderColor: r.Optional(r.Ref(e)),
132
+ button: r.Optional(
133
+ r.Object({
134
+ foreground: r.Optional(r.Ref(e)),
135
+ foregroundHover: r.Optional(r.Ref(e)),
136
+ foregroundActive: r.Optional(r.Ref(e)),
137
+ background: r.Optional(r.Ref(e)),
138
+ backgroundHover: r.Optional(r.Ref(e)),
139
+ backgroundActive: r.Optional(r.Ref(e))
140
+ })
141
+ )
142
+ })
143
+ ),
144
+ list: r.Optional(
145
+ r.Object({
146
+ icon: r.Optional(
147
+ r.Object({
148
+ foreground: r.Optional(r.Ref(e)),
149
+ foregroundHover: r.Optional(r.Ref(e)),
150
+ foregroundActive: r.Optional(r.Ref(e))
151
+ })
152
+ ),
153
+ foreground: r.Optional(r.Ref(e)),
154
+ foregroundHover: r.Optional(r.Ref(e)),
155
+ foregroundActive: r.Optional(r.Ref(e)),
156
+ background: r.Optional(r.Ref(e)),
157
+ backgroundHover: r.Optional(r.Ref(e)),
158
+ backgroundActive: r.Optional(r.Ref(e)),
159
+ fontFamily: r.Optional(r.Ref(u)),
160
+ divider: r.Object({
161
+ borderColor: r.Optional(r.Ref(e)),
162
+ borderWidth: r.Optional(r.Ref(b))
163
+ })
164
+ })
165
+ )
90
166
  })
91
- }),
92
- header: e.Object({
93
- background: e.Ref(r),
94
- borderWidth: e.Ref(g),
95
- borderColor: e.Ref(r),
96
- boxShadow: e.Ref(y),
97
- headline: e.Object({
98
- foreground: e.Ref(r),
99
- fontFamily: e.Ref(d)
100
- }),
101
- title: e.Object({
102
- foreground: e.Ref(r),
103
- fontFamily: e.Ref(d)
167
+ ),
168
+ header: r.Optional(
169
+ r.Object({
170
+ background: r.Optional(r.Ref(e)),
171
+ borderWidth: r.Optional(r.Ref(b)),
172
+ borderColor: r.Optional(r.Ref(e)),
173
+ boxShadow: r.Optional(r.Ref(y)),
174
+ headline: r.Optional(
175
+ r.Object({
176
+ foreground: r.Optional(r.Ref(e)),
177
+ fontFamily: r.Optional(r.Ref(u))
178
+ })
179
+ ),
180
+ title: r.Optional(
181
+ r.Object({
182
+ foreground: r.Optional(r.Ref(e)),
183
+ fontFamily: r.Optional(r.Ref(u)),
184
+ fontWeight: r.Optional(r.Ref(F))
185
+ })
186
+ )
104
187
  })
105
- }),
106
- form: e.Object({
107
- field: e.Object({
108
- label: e.Object({
109
- foreground: e.Ref(r),
110
- fontFamily: e.Ref(d)
111
- }),
112
- input: e.Object({
113
- background: e.Ref(r),
114
- foreground: e.Ref(r),
115
- foregroundSubdued: e.Ref(r),
116
- borderColor: e.Ref(r),
117
- borderColorHover: e.Ref(r),
118
- borderColorFocus: e.Ref(r),
119
- boxShadow: e.Ref(y),
120
- boxShadowHover: e.Ref(y),
121
- boxShadowFocus: e.Ref(y)
122
- })
188
+ ),
189
+ form: S,
190
+ sidebar: r.Optional(
191
+ r.Object({
192
+ background: r.Optional(r.Ref(e)),
193
+ foreground: r.Optional(r.Ref(e)),
194
+ fontFamily: r.Optional(r.Ref(u)),
195
+ borderWidth: r.Optional(r.Ref(b)),
196
+ borderColor: r.Optional(r.Ref(e)),
197
+ section: r.Optional(
198
+ r.Object({
199
+ toggle: r.Optional(
200
+ r.Object({
201
+ icon: r.Optional(
202
+ r.Object({
203
+ foreground: r.Optional(r.Ref(e)),
204
+ foregroundHover: r.Optional(r.Ref(e)),
205
+ foregroundActive: r.Optional(r.Ref(e))
206
+ })
207
+ ),
208
+ foreground: r.Optional(r.Ref(e)),
209
+ foregroundHover: r.Optional(r.Ref(e)),
210
+ foregroundActive: r.Optional(r.Ref(e)),
211
+ background: r.Optional(r.Ref(e)),
212
+ backgroundHover: r.Optional(r.Ref(e)),
213
+ backgroundActive: r.Optional(r.Ref(e)),
214
+ fontFamily: r.Optional(r.Ref(u)),
215
+ borderWidth: r.Optional(r.Ref(b)),
216
+ borderColor: r.Optional(r.Ref(e))
217
+ })
218
+ ),
219
+ form: S
220
+ })
221
+ )
123
222
  })
124
- }),
125
- sidebar: e.Object({
126
- background: e.Ref(r),
127
- foreground: e.Ref(r),
128
- fontFamily: e.Ref(d),
129
- borderWidth: e.Ref(g),
130
- borderColor: e.Ref(r),
131
- section: e.Object({
132
- toggle: e.Object({
133
- icon: e.Object({
134
- foreground: e.Ref(r),
135
- foregroundHover: e.Ref(r),
136
- foregroundActive: e.Ref(r)
137
- }),
138
- foreground: e.Ref(r),
139
- foregroundHover: e.Ref(r),
140
- foregroundActive: e.Ref(r),
141
- background: e.Ref(r),
142
- backgroundHover: e.Ref(r),
143
- backgroundActive: e.Ref(r),
144
- fontFamily: e.Ref(d),
145
- borderWidth: e.Ref(g),
146
- borderColor: e.Ref(r)
147
- })
223
+ ),
224
+ public: r.Optional(
225
+ r.Object({
226
+ background: r.Optional(r.Ref(e)),
227
+ foreground: r.Optional(r.Ref(e)),
228
+ foregroundAccent: r.Optional(r.Ref(e)),
229
+ art: r.Optional(
230
+ r.Object({
231
+ background: r.Optional(r.Ref(e)),
232
+ primary: r.Optional(r.Ref(e)),
233
+ secondary: r.Optional(r.Ref(e)),
234
+ speed: r.Optional(r.Ref(j))
235
+ })
236
+ ),
237
+ form: S
148
238
  })
149
- })
150
- }), V = e.Object({
151
- name: e.String(),
152
- appearance: e.Union([e.Literal("light"), e.Literal("dark")]),
153
- rules: U
154
- }), oe = {
239
+ ),
240
+ popover: r.Optional(
241
+ r.Object({
242
+ menu: r.Optional(
243
+ r.Object({
244
+ background: r.Optional(r.Ref(e)),
245
+ borderRadius: r.Optional(r.Optional(r.Union([r.Ref(k), r.Ref(O)]))),
246
+ boxShadow: r.Optional(r.Ref(y))
247
+ })
248
+ )
249
+ })
250
+ )
251
+ }), Q = r.Object({
252
+ name: r.String(),
253
+ appearance: r.Union([r.Literal("light"), r.Literal("dark")]),
254
+ rules: K
255
+ }), lr = {
155
256
  $defs: {
156
- Color: r,
157
- FamilyName: d,
158
- Length: F,
159
- Percentage: A,
160
- LineWidth: g,
161
- BoxShadow: y
257
+ Color: e,
258
+ FamilyName: u,
259
+ Length: k,
260
+ Percentage: O,
261
+ LineWidth: b,
262
+ BoxShadow: y,
263
+ Size: H,
264
+ Number: j
162
265
  }
163
- }, x = {
164
- name: "Dark (Directus)",
266
+ }, q = (d) => {
267
+ const s = v(() => {
268
+ const o = /* @__PURE__ */ new Map(), c = (m, a = []) => {
269
+ for (const [t, n] of Object.entries(m))
270
+ typeof n == "object" && n !== null && ("type" in n && n.type === "object" && "properties" in n && c(n.properties, [...a, t]), "$ref" in n && n.$ref === "FamilyName" && (o.has(a) ? o.set(a, { family: t, weight: o.get(a).weight }) : o.set(a, { family: t, weight: null })), "$ref" in n && n.$ref === "FontWeight" && (o.has(a) ? o.set(a, { family: o.get(a).family, weight: t }) : o.set(a, { family: null, weight: t })));
271
+ };
272
+ return c(Q.properties.rules.properties), o;
273
+ }), f = v(() => {
274
+ const o = /* @__PURE__ */ new Map();
275
+ for (const [c, { family: m, weight: a }] of s.value.entries()) {
276
+ let t = null, n = null;
277
+ if (m && (t = W(i(d).rules, [...c, m])), a && (n = W(i(d).rules, [...c, a])), t) {
278
+ const h = t.split(",");
279
+ for (const l of h) {
280
+ const g = l.trim();
281
+ if (g.startsWith("var(--")) {
282
+ h.push(z(g.slice(6, -1)));
283
+ continue;
284
+ }
285
+ if ((g.startsWith('"') && g.endsWith('"')) === !1)
286
+ continue;
287
+ const x = g.slice(1, -1);
288
+ o.has(x) ? o.get(x).add(n ?? "400") : o.set(x, /* @__PURE__ */ new Set([n ?? "400"]));
289
+ }
290
+ }
291
+ }
292
+ return o;
293
+ });
294
+ return { googleFonts: v(() => {
295
+ const o = [];
296
+ for (const [c, m] of f.value.entries())
297
+ if (["Inter", "Merriweather", "Fira Mono"].includes(c) === !1) {
298
+ const t = Array.from(m).join(";");
299
+ o.push(`${c.replace(" ", "+")}:wght@${t}`);
300
+ }
301
+ return o;
302
+ }) };
303
+ }, R = (d) => d, A = R({
304
+ name: "Directus Default",
165
305
  appearance: "dark",
166
306
  rules: {
307
+ borderRadius: "6px",
308
+ borderWidth: "2px",
167
309
  foreground: "#c9d1d9",
168
310
  foregroundAccent: "#f0f6fc",
169
311
  foregroundSubdued: "#666672",
170
312
  background: "#0d1117",
313
+ backgroundNormal: "#21262e",
314
+ backgroundAccent: "#30363d",
315
+ backgroundSubdued: "#161b22",
316
+ borderColor: "#21262e",
317
+ borderColorAccent: "#30363d",
318
+ borderColorSubdued: "#21262d",
171
319
  primary: "var(--project-color)",
172
320
  primaryBackground: "color-mix(in srgb, var(--theme--background), var(--theme--primary) 10%)",
173
321
  primarySubdued: "color-mix(in srgb, var(--theme--background), var(--theme--primary) 50%)",
@@ -188,14 +336,27 @@ const r = e.String({ $id: "Color" }), d = e.String({ $id: "FamilyName" }), F = e
188
336
  dangerBackground: "color-mix(in srgb, var(--theme--background), var(--theme--danger) 10%)",
189
337
  dangerSubdued: "color-mix(in srgb, var(--theme--background), var(--theme--danger) 50%)",
190
338
  dangerAccent: "color-mix(in srgb, var(--theme--danger), #16151a 25%)",
191
- fontFamilyDisplay: "var(--theme--font-family-sans-serif)",
192
- fontFamilySansSerif: '"Inter", system-ui',
193
- fontFamilySerif: '"Merriweather", serif',
194
- fontFamilyMonospace: '"Fira Mono", monospace',
195
- borderRadius: "6px",
196
- borderWidth: "2px",
339
+ fonts: {
340
+ display: {
341
+ fontFamily: '"Inter", system-ui',
342
+ fontWeight: "700"
343
+ },
344
+ sans: {
345
+ fontFamily: '"Inter", system-ui',
346
+ fontWeight: "500"
347
+ },
348
+ serif: {
349
+ fontFamily: '"Merriweather", serif',
350
+ fontWeight: "500"
351
+ },
352
+ monospace: {
353
+ fontFamily: '"Fira Mono", monospace',
354
+ fontWeight: "500"
355
+ }
356
+ },
197
357
  navigation: {
198
358
  background: "#21262e",
359
+ backgroundAccent: "#30363d",
199
360
  borderColor: "transparent",
200
361
  borderWidth: "0px",
201
362
  project: {
@@ -203,7 +364,7 @@ const r = e.String({ $id: "Color" }), d = e.String({ $id: "FamilyName" }), F = e
203
364
  borderWidth: "0px",
204
365
  background: "#30363d",
205
366
  foreground: "var(--theme--foreground-accent)",
206
- fontFamily: "var(--theme--font-family-sans-serif)"
367
+ fontFamily: "var(--theme--fonts--sans--font-family)"
207
368
  },
208
369
  modules: {
209
370
  background: "var(--theme--background)",
@@ -230,7 +391,7 @@ const r = e.String({ $id: "Color" }), d = e.String({ $id: "FamilyName" }), F = e
230
391
  background: "transparent",
231
392
  backgroundHover: "#30363d",
232
393
  backgroundActive: "#30363d",
233
- fontFamily: "var(--theme--font-family-sans-serif)",
394
+ fontFamily: "var(--theme--fonts--sans--font-family)",
234
395
  divider: {
235
396
  borderColor: "#30363d",
236
397
  borderWidth: "var(--theme--border-width)"
@@ -244,21 +405,26 @@ const r = e.String({ $id: "Color" }), d = e.String({ $id: "FamilyName" }), F = e
244
405
  boxShadow: "0 4px 7px -4px rgb(var(--black) / 0.2)",
245
406
  headline: {
246
407
  foreground: "var(--theme--foreground-subdued)",
247
- fontFamily: "var(--theme--font-family-sans-serif)"
408
+ fontFamily: "var(--theme--fonts--sans--font-family)"
248
409
  },
249
410
  title: {
250
411
  foreground: "var(--theme--foreground-accent)",
251
- fontFamily: "var(--theme--font-family-display)"
412
+ fontFamily: "var(--theme--fonts--display--font-family)",
413
+ fontWeight: "var(--theme--fonts--display--font-weight)"
252
414
  }
253
415
  },
254
416
  form: {
417
+ columnGap: "32px",
418
+ rowGap: "40px",
255
419
  field: {
256
420
  label: {
257
421
  foreground: "var(--theme--foreground-accent)",
258
- fontFamily: "var(--theme--font-family-sans-serif)"
422
+ fontFamily: "var(--theme--fonts--sans--font-family)",
423
+ fontWeight: "600"
259
424
  },
260
425
  input: {
261
426
  background: "var(--theme--background)",
427
+ backgroundSubdued: "var(--theme--background-subdued)",
262
428
  foreground: "var(--theme--foreground)",
263
429
  foregroundSubdued: "var(--theme--foreground-subdued)",
264
430
  borderColor: "#21262e",
@@ -266,14 +432,16 @@ const r = e.String({ $id: "Color" }), d = e.String({ $id: "FamilyName" }), F = e
266
432
  borderColorFocus: "var(--theme--primary)",
267
433
  boxShadow: "none",
268
434
  boxShadowHover: "none",
269
- boxShadowFocus: "0 0 16px -8px var(--theme--primary)"
435
+ boxShadowFocus: "0 0 16px -8px var(--theme--primary)",
436
+ height: "60px",
437
+ padding: "16px"
270
438
  }
271
439
  }
272
440
  },
273
441
  sidebar: {
274
442
  background: "#21262e",
275
443
  foreground: "var(--theme--foreground-subdued)",
276
- fontFamily: "var(--theme--font-family-sans-serif)",
444
+ fontFamily: "var(--theme--fonts--sans--font-family)",
277
445
  borderColor: "transparent",
278
446
  borderWidth: "0px",
279
447
  section: {
@@ -289,21 +457,177 @@ const r = e.String({ $id: "Color" }), d = e.String({ $id: "FamilyName" }), F = e
289
457
  background: "#30363d",
290
458
  backgroundHover: "var(--theme--sidebar--section--toggle--background)",
291
459
  backgroundActive: "var(--theme--sidebar--section--toggle--background)",
292
- fontFamily: "var(--theme--font-family-sans-serif)",
460
+ fontFamily: "var(--theme--fonts--sans--font-family)",
293
461
  borderColor: "transparent",
294
462
  borderWidth: "0px"
463
+ },
464
+ form: {
465
+ columnGap: "var(--theme--form--column-gap)",
466
+ rowGap: "var(--theme--form--row-gap)",
467
+ label: {
468
+ foreground: "var(--theme--form--field--label--foreground)",
469
+ fontFamily: "var(--theme--form--field--label--font-family)"
470
+ },
471
+ field: {
472
+ input: {
473
+ background: "var(--theme--form--field--input--background)",
474
+ foreground: "var(--theme--form--field--input--foreground)",
475
+ foregroundSubdued: "var(--theme--form--field--input--foreground-subdued)",
476
+ borderColor: "var(--theme--form--field--input--border-color)",
477
+ borderColorHover: "var(--theme--form--field--input--border-color-hover)",
478
+ borderColorFocus: "var(--theme--form--field--input--border-color-focus)",
479
+ boxShadow: "var(--theme--form--field--input--box-shadow)",
480
+ boxShadowHover: "var(--theme--form--field--input--box-shadow-hover)",
481
+ boxShadowFocus: "var(--theme--form--field--input--box-shadow-focus)",
482
+ height: "52px",
483
+ padding: "12px"
484
+ }
485
+ }
486
+ }
487
+ }
488
+ },
489
+ public: {
490
+ background: "var(--theme--background)",
491
+ foreground: "var(--theme--foreground)",
492
+ foregroundAccent: "var(--theme--foreground-accent)",
493
+ art: {
494
+ background: "#0e1c2f",
495
+ primary: "var(--theme--primary)",
496
+ secondary: "var(--theme--secondary)",
497
+ speed: "1"
498
+ },
499
+ form: {
500
+ columnGap: "var(--theme--form--column-gap)",
501
+ rowGap: "var(--theme--form--row-gap)",
502
+ field: {
503
+ label: {
504
+ foreground: "var(--theme--form--field--label--foreground)",
505
+ fontFamily: "var(--theme--form--field--label--font-family)"
506
+ },
507
+ input: {
508
+ background: "var(--theme--form--field--input--background)",
509
+ foreground: "var(--theme--form--field--input--foreground)",
510
+ foregroundSubdued: "var(--theme--form--field--input--foreground-subdued)",
511
+ borderColor: "var(--theme--form--field--input--border-color)",
512
+ borderColorHover: "var(--theme--form--field--input--border-color-hover)",
513
+ borderColorFocus: "var(--theme--form--field--input--border-color-focus)",
514
+ boxShadow: "var(--theme--form--field--input--box-shadow)",
515
+ boxShadowHover: "var(--theme--form--field--input--box-shadow-hover)",
516
+ boxShadowFocus: "var(--theme--form--field--input--box-shadow-focus)",
517
+ height: "var(--theme--form--field--input--height)",
518
+ padding: "var(--theme--form--field--input--padding)"
519
+ }
295
520
  }
296
521
  }
522
+ },
523
+ popover: {
524
+ menu: {
525
+ background: "#161b22",
526
+ borderRadius: "var(--theme--border-radius)",
527
+ boxShadow: "0px 0px 6px 0px rgb(0, 0, 0, 0.2)"
528
+ }
297
529
  }
298
530
  }
299
- }, S = {
300
- name: "Light (Directus)",
531
+ }), J = R({
532
+ name: "Directus Color Match",
301
533
  appearance: "light",
302
534
  rules: {
535
+ background: "color-mix(in srgb, #FFFFFF, var(--theme--primary) 7%)",
536
+ backgroundAccent: "color-mix(in srgb, #FFFFFF, var(--theme--primary) 20%)",
537
+ backgroundNormal: "color-mix(in srgb, #FFFFFF, var(--theme--primary) 15%)",
538
+ backgroundSubdued: "color-mix(in srgb, #FFFFFF, var(--theme--primary) 10%)",
539
+ borderColor: "color-mix(in srgb, #FFFFFF, var(--theme--primary) 20%)",
540
+ borderColorAccent: "color-mix(in srgb, #FFFFFF, var(--theme--primary) 40%)",
541
+ borderColorSubdued: "color-mix(in srgb, #FFFFFF, var(--theme--primary) 15%)",
542
+ borderRadius: "12px",
543
+ borderWidth: "1px",
544
+ foreground: "color-mix(in srgb, #000000, var(--theme--primary) 70%)",
545
+ foregroundAccent: "color-mix(in srgb, #000000, var(--theme--primary) 50%)",
546
+ foregroundSubdued: "color-mix(in srgb, #FFFFFF, var(--theme--primary) 60%)",
547
+ fonts: {
548
+ display: {
549
+ fontFamily: '"Montserrat", system-ui',
550
+ fontWeight: "400"
551
+ }
552
+ },
553
+ form: {
554
+ field: {
555
+ input: { background: "#FFFFFF", backgroundSubdued: "color-mix(in srgb, #FFFFFF, var(--theme--primary) 13%)" }
556
+ }
557
+ },
558
+ navigation: {
559
+ background: "#FFFFFF",
560
+ backgroundAccent: "var(--theme--background)",
561
+ borderWidth: "var(--theme--border-width)",
562
+ borderColor: "var(--theme--border-color-subdued)",
563
+ modules: {
564
+ background: "color-mix(in srgb, #000000, var(--theme--primary) 90%)",
565
+ button: {
566
+ backgroundActive: "#FFFFFF",
567
+ foreground: "color-mix(in srgb, #FFFFFF, var(--theme--primary) 20%)",
568
+ foregroundActive: "var(--theme--primary)"
569
+ }
570
+ },
571
+ project: { borderWidth: "1px", background: "#FFFFFF", borderColor: "var(--theme--border-color-subdued)" },
572
+ list: {
573
+ divider: { borderColor: "var(--theme--border-color-subdued)" },
574
+ icon: { foreground: "var(--theme--foreground)" },
575
+ foreground: "var(--theme--foreground)",
576
+ foregroundHover: "var(--theme--foreground)",
577
+ foregroundActive: "var(--theme--foreground)"
578
+ }
579
+ },
580
+ header: {
581
+ background: "#FFFFFF",
582
+ borderWidth: "1px",
583
+ borderColor: "var(--theme--border-color-subdued)",
584
+ boxShadow: "0 4px 7px -4px rgba(0,102,102, 0.2)"
585
+ },
586
+ sidebar: {
587
+ background: "#FFFFFF",
588
+ borderWidth: "1px",
589
+ borderColor: "var(--theme--border-color-subdued)",
590
+ section: {
591
+ toggle: {
592
+ borderColor: "var(--theme--border-color-subdued)",
593
+ borderWidth: "1px",
594
+ background: "#FFFFFF",
595
+ foreground: "var(--theme--foreground)",
596
+ foregroundHover: "var(--theme--foreground)",
597
+ foregroundActive: "var(--theme--foreground-accent)",
598
+ icon: {
599
+ foreground: "var(--theme--foreground)",
600
+ foregroundHover: "var(--theme--foreground)",
601
+ foregroundActive: "var(--theme--foreground-accent)"
602
+ }
603
+ }
604
+ }
605
+ },
606
+ public: {
607
+ art: {
608
+ background: "color-mix(in srgb, #FFFFFF, var(--theme--primary) 10%)",
609
+ primary: "color-mix(in srgb, #FFFFFF, var(--theme--primary) 60%)",
610
+ secondary: "color-mix(in srgb, #FFFFFF, var(--theme--secondary) 70%)"
611
+ },
612
+ background: "#FFFFFF"
613
+ }
614
+ }
615
+ }), C = R({
616
+ name: "Directus Default",
617
+ appearance: "light",
618
+ rules: {
619
+ borderRadius: "6px",
620
+ borderWidth: "2px",
303
621
  foreground: "#4f5464",
304
622
  foregroundAccent: "#172940",
305
623
  foregroundSubdued: "#a2b5cd",
306
624
  background: "#fff",
625
+ backgroundNormal: "#f0f4f9",
626
+ backgroundAccent: "#e4eaf1",
627
+ backgroundSubdued: "#f7fafc",
628
+ borderColor: "#e4eaf1",
629
+ borderColorAccent: "#d3dae4",
630
+ borderColorSubdued: "#f0f4f9",
307
631
  primary: "var(--project-color)",
308
632
  primaryBackground: "color-mix(in srgb, var(--theme--background), var(--theme--primary) 10%)",
309
633
  primarySubdued: "color-mix(in srgb, var(--theme--background), var(--theme--primary) 50%)",
@@ -324,25 +648,38 @@ const r = e.String({ $id: "Color" }), d = e.String({ $id: "FamilyName" }), F = e
324
648
  dangerBackground: "color-mix(in srgb, var(--theme--background), var(--theme--danger) 10%)",
325
649
  dangerSubdued: "color-mix(in srgb, var(--theme--background), var(--theme--danger) 50%)",
326
650
  dangerAccent: "color-mix(in srgb, var(--theme--danger), #2e3c43 25%)",
327
- fontFamilyDisplay: "var(--theme--font-family-sans-serif)",
328
- fontFamilySansSerif: '"Inter", system-ui',
329
- fontFamilySerif: '"Merriweather", serif',
330
- fontFamilyMonospace: '"Fira Mono", monospace',
331
- borderRadius: "6px",
332
- borderWidth: "2px",
651
+ fonts: {
652
+ display: {
653
+ fontFamily: '"Inter", system-ui',
654
+ fontWeight: "700"
655
+ },
656
+ sans: {
657
+ fontFamily: '"Inter", system-ui',
658
+ fontWeight: "500"
659
+ },
660
+ serif: {
661
+ fontFamily: '"Merriweather", serif',
662
+ fontWeight: "500"
663
+ },
664
+ monospace: {
665
+ fontFamily: '"Fira Mono", monospace',
666
+ fontWeight: "500"
667
+ }
668
+ },
333
669
  navigation: {
334
- background: "#f0f4f9",
670
+ background: "var(--theme--background-normal)",
671
+ backgroundAccent: "var(--theme--background-accent)",
335
672
  borderColor: "transparent",
336
673
  borderWidth: "0px",
337
674
  project: {
338
675
  borderColor: "transparent",
339
676
  borderWidth: "0px",
340
- background: "#e4eaf1",
677
+ background: "var(--theme--navigation--background-accent)",
341
678
  foreground: "var(--theme--foreground-accent)",
342
679
  fontFamily: "var(--theme--font-family-sans-serif)"
343
680
  },
344
681
  modules: {
345
- background: "#18222f",
682
+ background: "#0e1c2f",
346
683
  borderColor: "transparent",
347
684
  borderWidth: "0px",
348
685
  button: {
@@ -351,7 +688,7 @@ const r = e.String({ $id: "Color" }), d = e.String({ $id: "FamilyName" }), F = e
351
688
  foregroundActive: "var(--theme--foreground-accent)",
352
689
  background: "transparent",
353
690
  backgroundHover: "transparent",
354
- backgroundActive: "#f0f4f9"
691
+ backgroundActive: "var(--theme--background-normal)"
355
692
  }
356
693
  },
357
694
  list: {
@@ -364,11 +701,11 @@ const r = e.String({ $id: "Color" }), d = e.String({ $id: "FamilyName" }), F = e
364
701
  foregroundHover: "var(--theme--navigation--list--foreground)",
365
702
  foregroundActive: "var(--theme--navigation--list--foreground)",
366
703
  background: "transparent",
367
- backgroundHover: "#e4eaf1",
368
- backgroundActive: "#e4eaf1",
369
- fontFamily: "var(--theme--font-family-sans-serif)",
704
+ backgroundHover: "var(--theme--navigation--background-accent)",
705
+ backgroundActive: "var(--theme--navigation--background-accent)",
706
+ fontFamily: "var(--theme--fonts--sans--font-family)",
370
707
  divider: {
371
- borderColor: "#d3dae4",
708
+ borderColor: "var(--theme--border-color-accent)",
372
709
  borderWidth: "var(--theme--border-width)"
373
710
  }
374
711
  }
@@ -380,36 +717,43 @@ const r = e.String({ $id: "Color" }), d = e.String({ $id: "FamilyName" }), F = e
380
717
  boxShadow: "0 4px 7px -4px rgb(0 0 0 / 0.2)",
381
718
  headline: {
382
719
  foreground: "var(--theme--foreground-subdued)",
383
- fontFamily: "var(--theme--font-family-sans-serif)"
720
+ fontFamily: "var(--theme--fonts--sans--font-family)"
384
721
  },
385
722
  title: {
386
723
  foreground: "var(--theme--foreground-accent)",
387
- fontFamily: "var(--theme--font-family-display)"
724
+ fontFamily: "var(--theme--fonts--display--font-family)",
725
+ fontWeight: "var(--theme--fonts--display--font-weight)"
388
726
  }
389
727
  },
390
728
  form: {
729
+ columnGap: "32px",
730
+ rowGap: "40px",
391
731
  field: {
392
732
  label: {
393
733
  foreground: "var(--theme--foreground-accent)",
394
- fontFamily: "var(--theme--font-family-sans-serif)"
734
+ fontFamily: "var(--theme--fonts--sans--font-family)",
735
+ fontWeight: "600"
395
736
  },
396
737
  input: {
397
738
  background: "var(--theme--background)",
739
+ backgroundSubdued: "var(--theme--background-subdued)",
398
740
  foreground: "var(--theme--foreground)",
399
741
  foregroundSubdued: "var(--theme--foreground-subdued)",
400
- borderColor: "#e4eaf1",
401
- borderColorHover: "#d3dae4",
742
+ borderColor: "var(--theme--border-color)",
743
+ borderColorHover: "var(--theme--border-color-accent)",
402
744
  borderColorFocus: "var(--theme--primary)",
403
745
  boxShadow: "none",
404
746
  boxShadowHover: "none",
405
- boxShadowFocus: "0 0 16px -8px var(--theme--primary)"
747
+ boxShadowFocus: "0 0 16px -8px var(--theme--primary)",
748
+ height: "60px",
749
+ padding: "16px"
406
750
  }
407
751
  }
408
752
  },
409
753
  sidebar: {
410
- background: "#f0f4f9",
754
+ background: "var(--theme--background-normal)",
411
755
  foreground: "var(--theme--foreground-subdued)",
412
- fontFamily: "var(--theme--font-family-sans-serif)",
756
+ fontFamily: "var(--theme--fonts--sans--font-family)",
413
757
  borderColor: "transparent",
414
758
  borderWidth: "0px",
415
759
  section: {
@@ -422,92 +766,249 @@ const r = e.String({ $id: "Color" }), d = e.String({ $id: "FamilyName" }), F = e
422
766
  foreground: "var(--theme--foreground-accent)",
423
767
  foregroundHover: "var(--theme--sidebar--section--toggle--foreground)",
424
768
  foregroundActive: "var(--theme--sidebar--section--toggle--foreground)",
425
- background: "#e4eaf1",
769
+ background: "var(--theme--background-accent)",
426
770
  backgroundHover: "var(--theme--sidebar--section--toggle--background)",
427
771
  backgroundActive: "var(--theme--sidebar--section--toggle--background)",
428
- fontFamily: "var(--theme--font-family-sans-serif)",
772
+ fontFamily: "var(--theme--fonts--sans--font-family)",
429
773
  borderColor: "transparent",
430
774
  borderWidth: "0px"
775
+ },
776
+ form: {
777
+ columnGap: "var(--theme--form--column-gap)",
778
+ rowGap: "var(--theme--form--row-gap)",
779
+ label: {
780
+ foreground: "var(--theme--form--field--label--foreground)",
781
+ fontFamily: "var(--theme--form--field--label--font-family)"
782
+ },
783
+ field: {
784
+ input: {
785
+ background: "var(--theme--form--field--input--background)",
786
+ foreground: "var(--theme--form--field--input--foreground)",
787
+ foregroundSubdued: "var(--theme--form--field--input--foreground-subdued)",
788
+ borderColor: "var(--theme--form--field--input--border-color)",
789
+ borderColorHover: "var(--theme--form--field--input--border-color-hover)",
790
+ borderColorFocus: "var(--theme--form--field--input--border-color-focus)",
791
+ boxShadow: "var(--theme--form--field--input--box-shadow)",
792
+ boxShadowHover: "var(--theme--form--field--input--box-shadow-hover)",
793
+ boxShadowFocus: "var(--theme--form--field--input--box-shadow-focus)",
794
+ height: "52px",
795
+ padding: "12px"
796
+ }
797
+ }
798
+ }
799
+ }
800
+ },
801
+ public: {
802
+ background: "var(--theme--background)",
803
+ foreground: "var(--theme--foreground)",
804
+ foregroundAccent: "var(--theme--foreground-accent)",
805
+ art: {
806
+ background: "#0e1c2f",
807
+ primary: "var(--theme--primary)",
808
+ secondary: "var(--theme--secondary)",
809
+ speed: "1"
810
+ },
811
+ form: {
812
+ columnGap: "var(--theme--form--column-gap)",
813
+ rowGap: "var(--theme--form--row-gap)",
814
+ label: {
815
+ foreground: "var(--theme--form--field--label--foreground)",
816
+ fontFamily: "var(--theme--form--field--label--font-family)"
817
+ },
818
+ field: {
819
+ input: {
820
+ background: "var(--theme--form--field--input--background)",
821
+ foreground: "var(--theme--form--field--input--foreground)",
822
+ foregroundSubdued: "var(--theme--form--field--input--foreground-subdued)",
823
+ borderColor: "var(--theme--form--field--input--border-color)",
824
+ borderColorHover: "var(--theme--form--field--input--border-color-hover)",
825
+ borderColorFocus: "var(--theme--form--field--input--border-color-focus)",
826
+ boxShadow: "var(--theme--form--field--input--box-shadow)",
827
+ boxShadowHover: "var(--theme--form--field--input--box-shadow-hover)",
828
+ boxShadowFocus: "var(--theme--form--field--input--box-shadow-focus)",
829
+ height: "var(--theme--form--field--input--height)",
830
+ padding: "var(--theme--form--field--input--padding)"
831
+ }
431
832
  }
432
833
  }
834
+ },
835
+ popover: {
836
+ menu: {
837
+ background: "#fafcfd",
838
+ borderRadius: "var(--theme--border-radius)",
839
+ boxShadow: "0px 0px 6px 0px rgb(23, 41, 64, 0.2), 0px 0px 12px 2px rgb(23, 41, 64, 0.05)"
840
+ }
433
841
  }
434
842
  }
435
- }, z = [S], E = [x], K = C("🎨 Themes", () => {
436
- const t = H({
437
- light: z,
438
- dark: E
439
- });
440
- return { themes: t, registerTheme: (f) => {
441
- f.appearance === "light" ? t.light.push(f) : t.dark.push(f);
843
+ }), X = R({
844
+ name: "Directus Minimal",
845
+ appearance: "light",
846
+ rules: {
847
+ borderWidth: "1px",
848
+ backgroundPage: "color-mix(in srgb, #FFFFFF, var(--theme--primary) 7%)",
849
+ navigation: {
850
+ background: "#FFFFFF",
851
+ modules: {
852
+ background: "#FFFFFF",
853
+ button: {
854
+ backgroundActive: "#F1F5F9",
855
+ foreground: "var(--theme--foreground)",
856
+ foregroundHover: "var(--theme--primary)",
857
+ foregroundActive: "var(--theme--primary)",
858
+ backgroundHover: "#F1F5F9",
859
+ background: "#FFFFFF"
860
+ },
861
+ borderWidth: "1px",
862
+ borderColor: "var(--theme--border-color)"
863
+ },
864
+ project: {
865
+ borderWidth: "1px",
866
+ background: "#FFFFFF",
867
+ borderColor: "var(--theme--border-color)"
868
+ },
869
+ list: {
870
+ icon: {
871
+ foreground: "#0F172A"
872
+ },
873
+ divider: {
874
+ borderColor: "var(--theme--border-color)"
875
+ }
876
+ },
877
+ borderWidth: "1px",
878
+ backgroundAccent: "#F1F5F9",
879
+ borderColor: "var(--theme--border-color)"
880
+ },
881
+ header: {
882
+ background: "#FFFFFF",
883
+ borderWidth: "1px",
884
+ borderColor: "var(--theme--border-color)",
885
+ boxShadow: "0 4px 7px -4px rgba(0,102,102, 0.1)"
886
+ },
887
+ backgroundAccent: "#E2E8F0",
888
+ backgroundSubdued: "#F8FAFC",
889
+ background: "#FFFFFF",
890
+ foreground: "#1E293B",
891
+ foregroundAccent: "#0F172A",
892
+ foregroundSubdued: "#94A3B8",
893
+ borderRadius: "4px",
894
+ borderColor: "#E2E8F0",
895
+ borderColorAccent: "#CBD5E1",
896
+ borderColorSubdued: "#F1F5F9",
897
+ form: {
898
+ rowGap: "32px",
899
+ field: {
900
+ input: {
901
+ background: "#FFFFFF",
902
+ backgroundSubdued: "#F8FAFC",
903
+ boxShadowFocus: "none",
904
+ height: "52px"
905
+ }
906
+ }
907
+ },
908
+ sidebar: {
909
+ background: "#FFFFFF",
910
+ borderWidth: "1px",
911
+ borderColor: "var(--theme--border-color)",
912
+ section: {
913
+ toggle: {
914
+ borderColor: "var(--theme--border-color)",
915
+ borderWidth: "1px",
916
+ background: "#FFFFFF",
917
+ foreground: "var(--theme--foreground-subdued)",
918
+ foregroundHover: "var(--theme--foreground)",
919
+ foregroundActive: "var(--theme--foreground-accent)",
920
+ icon: {
921
+ foreground: "var(--theme--foreground)",
922
+ foregroundHover: "var(--theme--foreground)",
923
+ foregroundActive: "var(--theme--foreground-accent)"
924
+ }
925
+ },
926
+ form: {
927
+ field: {
928
+ input: {
929
+ height: "42px"
930
+ }
931
+ }
932
+ }
933
+ }
934
+ },
935
+ public: {
936
+ art: {
937
+ background: "color-mix(in srgb, #FFFFFF, var(--project-color) 10%)",
938
+ primary: "color-mix(in srgb, #FFFFFF, var(--project-color) 70%)",
939
+ secondary: "color-mix(in srgb, #FFFFFF, var(--project-color) 40%)"
940
+ },
941
+ background: "#FFFFFF"
942
+ },
943
+ backgroundNormal: "#F1F5F9",
944
+ secondary: "#64748B",
945
+ primary: "#0F172A",
946
+ primaryBackground: "#F1F5F9",
947
+ primarySubdued: "#F8FAFC",
948
+ primaryAccent: "#E2E8F0",
949
+ secondaryAccent: "#E2E8F0",
950
+ secondaryBackground: "#F1F5F9",
951
+ secondarySubdued: "#F8FAFC",
952
+ fonts: {
953
+ display: {
954
+ fontFamily: "system-ui"
955
+ }
956
+ }
957
+ }
958
+ }), Y = [A], Z = [C, X, J], rr = _("🎨 Themes", () => {
959
+ const d = B({ light: Z, dark: Y });
960
+ return { themes: d, registerTheme: (f) => {
961
+ f.appearance === "light" ? d.light.push(f) : d.dark.push(f);
442
962
  } };
443
- }), q = (t, m, f, b, v) => {
444
- const { themes: o } = j(K());
445
- return { theme: h(() => {
446
- const a = c(t) ? c(f) : c(m), n = c(t) ? x : S, u = c(t) ? c(v) : c(b), p = c(o)[t ? "dark" : "light"].find((s) => s.name === a);
447
- return p ? u ? R({}, n, p, { rules: u }) : R(n, p) : (a && a !== n.name && console.warn(`Theme "${a}" doesn't exist.`), u ? R({}, n, { rules: u }) : n);
963
+ }), er = (d, s, f, p, o) => {
964
+ const { themes: c } = I(rr());
965
+ return { theme: v(() => {
966
+ const a = i(d) ? i(f) : i(s), t = i(d) ? A : C, n = i(d) ? i(o) : i(p), h = i(c)[i(d) ? "dark" : "light"].find((l) => l.name === a);
967
+ return h ? n ? w({}, t, h, { rules: n }) : w(t, h) : (a && a !== t.name && console.warn(`Theme "${a}" doesn't exist.`), n ? w({}, t, { rules: n }) : t);
448
968
  }) };
449
- }, G = (t) => {
450
- const m = [], f = (o, i = []) => {
451
- for (const [a, n] of Object.entries(o))
452
- typeof n == "object" && n !== null && ("type" in n && n.type === "object" && "properties" in n && f(n.properties, [...i, a]), "$ref" in n && n.$ref === "FamilyName" && m.push([...i, a]));
453
- };
454
- f(V.properties.rules.properties);
455
- const b = h(() => {
456
- const o = [];
457
- for (const a of m)
458
- o.push(M(c(t).rules, a).trim());
459
- const i = /* @__PURE__ */ new Set();
460
- for (const a of o)
461
- a.split(",").forEach((u) => i.add(u));
462
- return Array.from(i);
463
- }), v = h(() => b.value.filter((o) => {
464
- if (o.startsWith('"') && o.endsWith('"') && o.includes("var(") === !1) {
465
- const i = ["Inter", "Merriweather", "Fira Mono"];
466
- return !(i.includes(o) || i.map((a) => `"${a}"`).includes(o));
467
- }
468
- return !1;
469
- }).map((o) => (o.startsWith('"') && o.endsWith('"') && (o = o.slice(1, -1)), o.replace(" ", "+"))));
470
- return { fonts: b, googleFonts: v };
471
- }, ne = /* @__PURE__ */ W({
969
+ }, or = (d) => {
970
+ const s = V(d, { delimiter: "--" }), f = (p) => `--theme--${P(p, { separator: "-" })}`;
971
+ return U(s, (p, o) => f(o));
972
+ }, gr = /* @__PURE__ */ $({
472
973
  __name: "theme-provider",
473
974
  props: {
474
975
  darkMode: { type: Boolean },
475
- themeLight: { default: S.name },
976
+ themeLight: { default: C.name },
476
977
  themeLightOverrides: { default: () => ({}) },
477
- themeDark: { default: x.name },
978
+ themeDark: { default: A.name },
478
979
  themeDarkOverrides: { default: () => ({}) }
479
980
  },
480
- setup(t) {
481
- const m = t, { darkMode: f, themeLight: b, themeDark: v, themeLightOverrides: o, themeDarkOverrides: i } = O(m), { theme: a } = q(f, b, v, o, i), n = h(() => {
482
- const s = P(c(a).rules, { delimiter: "--" }), l = (k) => `--theme--${I(k, { separator: "-" })}`;
483
- return _(s, (k, w) => l(w));
484
- }), { googleFonts: u } = G(a);
485
- N({
486
- link: h(() => {
487
- let s = "";
488
- if (u.value.length > 0) {
489
- const l = u.value.join("&family=");
490
- s += `https://fonts.googleapis.com/css2?family=${l}`, s += `
981
+ setup(d) {
982
+ const s = d, { darkMode: f, themeLight: p, themeDark: o, themeLightOverrides: c, themeDarkOverrides: m } = D(s), { theme: a } = er(f, p, o, c, m), t = v(() => or(i(a).rules)), { googleFonts: n } = q(a);
983
+ E({
984
+ link: v(() => {
985
+ let l = "";
986
+ if (n.value.length > 0) {
987
+ const g = n.value.join("&family=");
988
+ l += `https://fonts.googleapis.com/css2?family=${g}`, l += `
491
989
  `;
492
990
  }
493
- return s ? [
991
+ return l ? [
494
992
  {
495
993
  rel: "stylesheet",
496
- href: s
994
+ href: l
497
995
  }
498
996
  ] : [];
499
997
  })
500
998
  });
501
- const p = h(() => `:root {${Object.entries(c(n)).map(([l, k]) => `${l}: ${k};`).join(" ")}}`);
502
- return (s, l) => (B(), $(L, { to: "#theme" }, [
503
- T(D(p.value), 1)
999
+ const h = v(() => `:root {${Object.entries(i(t)).map(([g, x]) => `${g}: ${x};`).join(" ")}}`);
1000
+ return (l, g) => (G(), T(L, { to: "#theme" }, [
1001
+ N(M(h.value), 1)
504
1002
  ]));
505
1003
  }
506
1004
  });
507
1005
  export {
508
- oe as Definitions,
509
- ne as ThemeProvider,
510
- V as ThemeSchema,
511
- q as useTheme,
512
- K as useThemeStore
1006
+ lr as Definitions,
1007
+ gr as ThemeProvider,
1008
+ Q as ThemeSchema,
1009
+ R as defineTheme,
1010
+ or as rulesToCssVars,
1011
+ q as useFonts,
1012
+ er as useTheme,
1013
+ rr as useThemeStore
513
1014
  };