@loworbitstudio/visor-core 0.4.1 → 0.6.0

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.
@@ -0,0 +1,479 @@
1
+ @layer visor-primitives, visor-semantic, visor-adaptive, visor-bridge;
2
+
3
+ @layer visor-adaptive {
4
+ /* ── Section 1: Shared tokens (mode-independent) ── */
5
+
6
+ /* --- Primitive: Colors --- */
7
+ .neutral-theme {
8
+ min-height: 100vh;
9
+ font-size: 1rem;
10
+ background: var(--surface-page, var(--surface-background));
11
+ color: var(--text-primary);
12
+ font-family: var(--font-sans);
13
+
14
+ --color-white: #ffffff;
15
+ --color-black: #000000;
16
+ --color-primary-50: #eaf8fb;
17
+ --color-primary-100: #e0f8fd;
18
+ --color-primary-200: #d2f7ff;
19
+ --color-primary-300: #c3f4ff;
20
+ --color-primary-400: #abf0ff;
21
+ --color-primary-500: #1798ad;
22
+ --color-primary-600: #02606f;
23
+ --color-primary-700: #024b57;
24
+ --color-primary-800: #00343d;
25
+ --color-primary-900: #001f25;
26
+ --color-primary-950: #000c0f;
27
+ --color-accent-50: #eaf8fb;
28
+ --color-accent-100: #e0f8fd;
29
+ --color-accent-200: #d2f7ff;
30
+ --color-accent-300: #c3f4ff;
31
+ --color-accent-400: #abf0ff;
32
+ --color-accent-500: #1798ad;
33
+ --color-accent-600: #02606f;
34
+ --color-accent-700: #024b57;
35
+ --color-accent-800: #00343d;
36
+ --color-accent-900: #001f25;
37
+ --color-accent-950: #000c0f;
38
+ --color-neutral-50: #f5f5f6;
39
+ --color-neutral-100: #f2f2f4;
40
+ --color-neutral-200: #ededf2;
41
+ --color-neutral-300: #e7e7ee;
42
+ --color-neutral-400: #dedee7;
43
+ --color-neutral-500: #71717a;
44
+ --color-neutral-600: #54545d;
45
+ --color-neutral-700: #41414a;
46
+ --color-neutral-800: #2d2d34;
47
+ --color-neutral-900: #1a1a1f;
48
+ --color-neutral-950: #09090c;
49
+ --color-success-50: #e8fbeb;
50
+ --color-success-100: #defde3;
51
+ --color-success-500: #22c55e;
52
+ --color-success-600: #00672b;
53
+ --color-success-700: #005120;
54
+ --color-success-900: #002209;
55
+ --color-warning-50: #fff3e6;
56
+ --color-warning-100: #fff1e3;
57
+ --color-warning-500: #f59e0b;
58
+ --color-warning-600: #774a01;
59
+ --color-warning-700: #5e3900;
60
+ --color-warning-900: #281600;
61
+ --color-error-50: #fff2f0;
62
+ --color-error-100: #ffefed;
63
+ --color-error-500: #ef4444;
64
+ --color-error-600: #a30016;
65
+ --color-error-700: #81000f;
66
+ --color-error-900: #3a0003;
67
+ --color-info-50: #ecf7ff;
68
+ --color-info-100: #e8f5ff;
69
+ --color-info-500: #0ea5e9;
70
+ --color-info-600: #005c85;
71
+ --color-info-700: #004869;
72
+ --color-info-900: #001d2e;
73
+ }
74
+
75
+
76
+ /* --- Primitive: Spacing --- */
77
+ .neutral-theme {
78
+ --spacing-0: 0;
79
+ --spacing-1: 0.25rem;
80
+ --spacing-2: 0.5rem;
81
+ --spacing-3: 0.75rem;
82
+ --spacing-4: 1rem;
83
+ --spacing-5: 1.25rem;
84
+ --spacing-6: 1.5rem;
85
+ --spacing-8: 2rem;
86
+ --spacing-10: 2.5rem;
87
+ --spacing-12: 3rem;
88
+ --spacing-16: 4rem;
89
+ --spacing-20: 5rem;
90
+ --spacing-24: 6rem;
91
+ }
92
+
93
+
94
+ /* --- Primitive: Border Radius --- */
95
+ .neutral-theme {
96
+ --radius-none: 0;
97
+ --radius-sm: 0.25rem; /* 4px */
98
+ --radius-md: 0.375rem; /* 6px */
99
+ --radius-lg: 0.5rem; /* 8px */
100
+ --radius-xl: 0.75rem; /* 12px */
101
+ --radius-2xl: 0.9997499999999999rem; /* 16px */
102
+ --radius-3xl: 1.5rem; /* 24px */
103
+ --radius-full: 9999px;
104
+ }
105
+
106
+
107
+ /* --- Primitive: Typography --- */
108
+ .neutral-theme {
109
+ --font-display: system-ui;
110
+ --font-sans: system-ui;
111
+ --font-heading: var(--font-sans);
112
+ --font-body: system-ui;
113
+ --font-mono: ui-monospace;
114
+ --font-size-xs: 0.75rem; /* 12px */
115
+ --font-size-sm: 0.875rem; /* 14px */
116
+ --font-size-base: 1rem; /* 16px */
117
+ --font-size-lg: 1.125rem; /* 18px */
118
+ --font-size-xl: 1.25rem; /* 20px */
119
+ --font-size-2xl: 1.5rem; /* 24px */
120
+ --font-size-3xl: 1.875rem; /* 30px */
121
+ --font-size-4xl: 2.25rem; /* 36px */
122
+ --font-weight-normal: 400;
123
+ --font-weight-medium: 500;
124
+ --font-weight-semibold: 700;
125
+ --font-weight-bold: 700;
126
+ --line-height-none: 1;
127
+ --line-height-tight: 1.25;
128
+ --line-height-snug: 1.375;
129
+ --line-height-normal: 1.5;
130
+ --line-height-relaxed: 1.625;
131
+ --line-height-loose: 2;
132
+ --letter-spacing-normal: 0.05em;
133
+ }
134
+
135
+
136
+ /* --- Primitive: Shadows --- */
137
+ .neutral-theme {
138
+ --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
139
+ --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
140
+ --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
141
+ --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.07);
142
+ --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.08);
143
+ }
144
+
145
+
146
+ /* --- Primitive: Motion --- */
147
+ .neutral-theme {
148
+ --motion-duration-100: 100ms;
149
+ --motion-duration-150: 150ms;
150
+ --motion-duration-200: 150ms;
151
+ --motion-duration-300: 300ms;
152
+ --motion-duration-500: 300ms;
153
+ --motion-duration-800: 800ms;
154
+ --motion-easing-linear: linear;
155
+ --motion-easing-ease-in: cubic-bezier(0.4, 0, 1, 1);
156
+ --motion-easing-ease-out: cubic-bezier(0, 0, 0.2, 1);
157
+ --motion-easing-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
158
+ --motion-easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
159
+ }
160
+
161
+
162
+ /* --- Primitive: Miscellaneous --- */
163
+ .neutral-theme {
164
+ --border-width-1: 1px;
165
+ --border-width-2: 2px;
166
+ --border-width-3: 3px;
167
+ --border-width-4: 4px;
168
+ --z-base: 0;
169
+ --z-raised: 1;
170
+ --z-dropdown: 1000;
171
+ --z-sticky: 1100;
172
+ --z-modal: 1300;
173
+ --z-popover: 1400;
174
+ --z-toast: 1500;
175
+ --overlay-bg: rgba(0, 0, 0, 0.5);
176
+ --focus-ring-width: 2px;
177
+ --focus-ring-offset: 2px;
178
+ }
179
+
180
+
181
+ /* ── Section 2: Dark mode overrides ── */
182
+
183
+ /* --- Adaptive: Text (dark) — manual toggle --- */
184
+ .dark .neutral-theme {
185
+ --text-primary: #fafafa;
186
+ --text-secondary: #a1a1aa;
187
+ --text-tertiary: #808080;
188
+ --text-disabled: #54545d;
189
+ --text-inverse: #1a1a1f;
190
+ --text-inverse-secondary: #41414a;
191
+ --text-link: #67e8f9;
192
+ --text-link-hover: #c3f4ff;
193
+ --text-success: #22c55e;
194
+ --text-warning: #f59e0b;
195
+ --text-error: #ef4444;
196
+ --text-info: #0ea5e9;
197
+ }
198
+
199
+
200
+ /* --- Adaptive: Surface (dark) — manual toggle --- */
201
+ .dark .neutral-theme {
202
+ --surface-page: #09090b;
203
+ --surface-card: #18181b;
204
+ --surface-popover: #18181b;
205
+ --surface-subtle: #2d2d34;
206
+ --surface-muted: #41414a;
207
+ --surface-overlay: #09090c;
208
+ --surface-interactive-default: #2d2d34;
209
+ --surface-interactive-hover: #41414a;
210
+ --surface-interactive-active: #54545d;
211
+ --surface-interactive-disabled: #2d2d34;
212
+ --surface-selected: #00343d;
213
+ --surface-accent-subtle: #001f25;
214
+ --surface-accent-default: #1798ad;
215
+ --surface-accent-strong: #abf0ff;
216
+ --surface-success-subtle: #002209;
217
+ --surface-success-default: #22c55e;
218
+ --surface-warning-subtle: #281600;
219
+ --surface-warning-default: #f59e0b;
220
+ --surface-error-subtle: #3a0003;
221
+ --surface-error-default: #ef4444;
222
+ --surface-info-subtle: #001d2e;
223
+ --surface-info-default: #0ea5e9;
224
+ --surface-elev-0: #09090c;
225
+ --surface-elev-1: #1a1a1f;
226
+ --surface-elev-2: #2d2d34;
227
+ --surface-elev-3: #41414a;
228
+ --surface-elev-4: #54545d;
229
+ }
230
+
231
+
232
+ /* --- Adaptive: Border (dark) — manual toggle --- */
233
+ .dark .neutral-theme {
234
+ --border-default: #41414a;
235
+ --border-muted: #2d2d34;
236
+ --border-strong: #54545d;
237
+ --border-focus: #1798ad;
238
+ --border-disabled: #2d2d34;
239
+ --border-success: #22c55e;
240
+ --border-warning: #f59e0b;
241
+ --border-error: #ef4444;
242
+ --border-info: #0ea5e9;
243
+ }
244
+
245
+
246
+ /* --- Adaptive: Interactive (dark) — manual toggle --- */
247
+ .dark .neutral-theme {
248
+ --interactive-primary-bg: #1798ad;
249
+ --interactive-primary-bg-hover: #abf0ff;
250
+ --interactive-primary-bg-active: #c3f4ff;
251
+ --interactive-primary-text: #ffffff;
252
+ --interactive-secondary-bg: #2d2d34;
253
+ --interactive-secondary-bg-hover: #41414a;
254
+ --interactive-secondary-bg-active: #54545d;
255
+ --interactive-secondary-text: #f5f5f6;
256
+ --interactive-secondary-border: #54545d;
257
+ --interactive-destructive-bg: #ef4444;
258
+ --interactive-destructive-bg-hover: #a30016;
259
+ --interactive-destructive-text: #ffffff;
260
+ --interactive-ghost-bg: #2d2d34;
261
+ --interactive-ghost-bg-hover: #41414a;
262
+ }
263
+
264
+
265
+ /* --- Adaptive: Text (dark) — prefers-color-scheme --- */
266
+ @media (prefers-color-scheme: dark) {
267
+ .neutral-theme:not(.light) {
268
+ --text-primary: #fafafa;
269
+ --text-secondary: #a1a1aa;
270
+ --text-tertiary: #808080;
271
+ --text-disabled: #54545d;
272
+ --text-inverse: #1a1a1f;
273
+ --text-inverse-secondary: #41414a;
274
+ --text-link: #67e8f9;
275
+ --text-link-hover: #c3f4ff;
276
+ --text-success: #22c55e;
277
+ --text-warning: #f59e0b;
278
+ --text-error: #ef4444;
279
+ --text-info: #0ea5e9;
280
+ }
281
+ }
282
+
283
+
284
+ /* --- Adaptive: Surface (dark) — prefers-color-scheme --- */
285
+ @media (prefers-color-scheme: dark) {
286
+ .neutral-theme:not(.light) {
287
+ --surface-page: #09090b;
288
+ --surface-card: #18181b;
289
+ --surface-popover: #18181b;
290
+ --surface-subtle: #2d2d34;
291
+ --surface-muted: #41414a;
292
+ --surface-overlay: #09090c;
293
+ --surface-interactive-default: #2d2d34;
294
+ --surface-interactive-hover: #41414a;
295
+ --surface-interactive-active: #54545d;
296
+ --surface-interactive-disabled: #2d2d34;
297
+ --surface-selected: #00343d;
298
+ --surface-accent-subtle: #001f25;
299
+ --surface-accent-default: #1798ad;
300
+ --surface-accent-strong: #abf0ff;
301
+ --surface-success-subtle: #002209;
302
+ --surface-success-default: #22c55e;
303
+ --surface-warning-subtle: #281600;
304
+ --surface-warning-default: #f59e0b;
305
+ --surface-error-subtle: #3a0003;
306
+ --surface-error-default: #ef4444;
307
+ --surface-info-subtle: #001d2e;
308
+ --surface-info-default: #0ea5e9;
309
+ --surface-elev-0: #09090c;
310
+ --surface-elev-1: #1a1a1f;
311
+ --surface-elev-2: #2d2d34;
312
+ --surface-elev-3: #41414a;
313
+ --surface-elev-4: #54545d;
314
+ }
315
+ }
316
+
317
+
318
+ /* --- Adaptive: Border (dark) — prefers-color-scheme --- */
319
+ @media (prefers-color-scheme: dark) {
320
+ .neutral-theme:not(.light) {
321
+ --border-default: #41414a;
322
+ --border-muted: #2d2d34;
323
+ --border-strong: #54545d;
324
+ --border-focus: #1798ad;
325
+ --border-disabled: #2d2d34;
326
+ --border-success: #22c55e;
327
+ --border-warning: #f59e0b;
328
+ --border-error: #ef4444;
329
+ --border-info: #0ea5e9;
330
+ }
331
+ }
332
+
333
+
334
+ /* --- Adaptive: Interactive (dark) — prefers-color-scheme --- */
335
+ @media (prefers-color-scheme: dark) {
336
+ .neutral-theme:not(.light) {
337
+ --interactive-primary-bg: #1798ad;
338
+ --interactive-primary-bg-hover: #abf0ff;
339
+ --interactive-primary-bg-active: #c3f4ff;
340
+ --interactive-primary-text: #ffffff;
341
+ --interactive-secondary-bg: #2d2d34;
342
+ --interactive-secondary-bg-hover: #41414a;
343
+ --interactive-secondary-bg-active: #54545d;
344
+ --interactive-secondary-text: #f5f5f6;
345
+ --interactive-secondary-border: #54545d;
346
+ --interactive-destructive-bg: #ef4444;
347
+ --interactive-destructive-bg-hover: #a30016;
348
+ --interactive-destructive-text: #ffffff;
349
+ --interactive-ghost-bg: #2d2d34;
350
+ --interactive-ghost-bg-hover: #41414a;
351
+ }
352
+ }
353
+
354
+
355
+ /* ── Section 3: Light mode overrides ── */
356
+
357
+ /* --- Adaptive: Text (light) --- */
358
+ html:not(.dark) .neutral-theme {
359
+ --text-primary: #18181b;
360
+ --text-secondary: #52525b;
361
+ --text-tertiary: #737373;
362
+ --text-disabled: #e7e7ee;
363
+ --text-inverse: #ffffff;
364
+ --text-inverse-secondary: #ededf2;
365
+ --text-link: #0891b2;
366
+ --text-link-hover: #024b57;
367
+ --text-success: #005120;
368
+ --text-warning: #5e3900;
369
+ --text-error: #81000f;
370
+ --text-info: #004869;
371
+ }
372
+
373
+
374
+ /* --- Adaptive: Surface (light) --- */
375
+ html:not(.dark) .neutral-theme {
376
+ --surface-page: #ffffff;
377
+ --surface-card: #ffffff;
378
+ --surface-popover: #ffffff;
379
+ --surface-subtle: #f5f5f6;
380
+ --surface-muted: #f2f2f4;
381
+ --surface-overlay: #1a1a1f;
382
+ --surface-interactive-default: #ffffff;
383
+ --surface-interactive-hover: #f5f5f6;
384
+ --surface-interactive-active: #f2f2f4;
385
+ --surface-interactive-disabled: #f5f5f6;
386
+ --surface-selected: #e0f8fd;
387
+ --surface-accent-subtle: #eaf8fb;
388
+ --surface-accent-default: #1798ad;
389
+ --surface-accent-strong: #02606f;
390
+ --surface-success-subtle: #e8fbeb;
391
+ --surface-success-default: #22c55e;
392
+ --surface-warning-subtle: #fff3e6;
393
+ --surface-warning-default: #f59e0b;
394
+ --surface-error-subtle: #fff2f0;
395
+ --surface-error-default: #ef4444;
396
+ --surface-info-subtle: #ecf7ff;
397
+ --surface-info-default: #0ea5e9;
398
+ --surface-elev-0: #ffffff;
399
+ --surface-elev-1: #f5f5f6;
400
+ --surface-elev-2: #f2f2f4;
401
+ --surface-elev-3: #ededf2;
402
+ --surface-elev-4: #e7e7ee;
403
+ }
404
+
405
+
406
+ /* --- Adaptive: Border (light) --- */
407
+ html:not(.dark) .neutral-theme {
408
+ --border-default: #ededf2;
409
+ --border-muted: #f2f2f4;
410
+ --border-strong: #e7e7ee;
411
+ --border-focus: #1798ad;
412
+ --border-disabled: #f2f2f4;
413
+ --border-success: #22c55e;
414
+ --border-warning: #f59e0b;
415
+ --border-error: #ef4444;
416
+ --border-info: #0ea5e9;
417
+ }
418
+
419
+
420
+ /* --- Adaptive: Interactive (light) --- */
421
+ html:not(.dark) .neutral-theme {
422
+ --interactive-primary-bg: #1798ad;
423
+ --interactive-primary-bg-hover: #024b57;
424
+ --interactive-primary-bg-active: #00343d;
425
+ --interactive-primary-text: #ffffff;
426
+ --interactive-secondary-bg: #ffffff;
427
+ --interactive-secondary-bg-hover: #f5f5f6;
428
+ --interactive-secondary-bg-active: #f2f2f4;
429
+ --interactive-secondary-text: #1a1a1f;
430
+ --interactive-secondary-border: #e7e7ee;
431
+ --interactive-destructive-bg: #a30016;
432
+ --interactive-destructive-bg-hover: #81000f;
433
+ --interactive-destructive-text: #ffffff;
434
+ --interactive-ghost-bg: #ffffff;
435
+ --interactive-ghost-bg-hover: #f2f2f4;
436
+ }
437
+
438
+
439
+ /* --- Fumadocs bridge: dark --- */
440
+ .dark .neutral-theme {
441
+ --color-fd-background: #09090b;
442
+ --color-fd-foreground: #fafafa;
443
+ --color-fd-card: #18181b;
444
+ --color-fd-card-foreground: #fafafa;
445
+ --color-fd-border: #41414a;
446
+ --color-fd-muted: #41414a;
447
+ --color-fd-muted-foreground: #a1a1aa;
448
+ --color-fd-accent: #1798ad;
449
+ --color-fd-accent-foreground: #ffffff;
450
+ --color-fd-primary: #1798ad;
451
+ --color-fd-primary-foreground: #ffffff;
452
+ --color-fd-secondary: #41414a;
453
+ --color-fd-secondary-foreground: #fafafa;
454
+ --color-fd-popover: #18181b;
455
+ --color-fd-popover-foreground: #fafafa;
456
+ --color-fd-ring: #1798ad;
457
+ }
458
+
459
+
460
+ /* --- Fumadocs bridge: light --- */
461
+ html:not(.dark) .neutral-theme {
462
+ --color-fd-background: #ffffff;
463
+ --color-fd-foreground: #18181b;
464
+ --color-fd-card: #ffffff;
465
+ --color-fd-card-foreground: #18181b;
466
+ --color-fd-border: #ededf2;
467
+ --color-fd-muted: #f2f2f4;
468
+ --color-fd-muted-foreground: #52525b;
469
+ --color-fd-accent: #1798ad;
470
+ --color-fd-accent-foreground: #ffffff;
471
+ --color-fd-primary: #1798ad;
472
+ --color-fd-primary-foreground: #ffffff;
473
+ --color-fd-secondary: #f2f2f4;
474
+ --color-fd-secondary-foreground: #18181b;
475
+ --color-fd-popover: #ffffff;
476
+ --color-fd-popover-foreground: #18181b;
477
+ --color-fd-ring: #1798ad;
478
+ }
479
+ }