@atom63/slides 0.2.0 → 0.4.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.
@@ -212,6 +212,11 @@
212
212
  height: 100%;
213
213
  }
214
214
 
215
+ /* DeckSurface edit-mode wrapper — pass-through so it doesn't affect layout. */
216
+ .a63-surface-edit {
217
+ display: contents;
218
+ }
219
+
215
220
  /* Floating Edit button — top-right corner of present view. */
216
221
  .a63-surface__edit {
217
222
  position: absolute;
@@ -263,3 +268,257 @@
263
268
  .a63-editor__present:hover {
264
269
  background: rgba(127, 127, 127, 0.12);
265
270
  }
271
+
272
+ /* ─── SlotForm — registry-driven prop editor ─────────────────────────────── */
273
+ .a63-form {
274
+ display: flex;
275
+ flex-direction: column;
276
+ gap: 0.75rem;
277
+ padding: 0.75rem;
278
+ }
279
+
280
+ .a63-form__field {
281
+ display: flex;
282
+ flex-direction: column;
283
+ gap: 0.25rem;
284
+ }
285
+
286
+ .a63-form__label-row {
287
+ display: flex;
288
+ align-items: baseline;
289
+ gap: 0.2rem;
290
+ }
291
+
292
+ .a63-form__label {
293
+ font-size: 0.75rem;
294
+ font-weight: 600;
295
+ color: #1a1a1a;
296
+ letter-spacing: 0.01em;
297
+ }
298
+
299
+ .a63-form__required {
300
+ color: #b91c1c;
301
+ }
302
+
303
+ .a63-form__input,
304
+ .a63-form__textarea {
305
+ width: 100%;
306
+ padding: 0.35rem 0.5rem;
307
+ border: 1px solid rgba(127, 127, 127, 0.35);
308
+ border-radius: 0.375rem;
309
+ background: #fff;
310
+ color: #1a1a1a;
311
+ font-size: 0.8rem;
312
+ font-family: inherit;
313
+ line-height: 1.4;
314
+ outline: none;
315
+ transition: border-color 0.12s ease;
316
+ }
317
+
318
+ .a63-form__input:focus,
319
+ .a63-form__textarea:focus {
320
+ border-color: rgba(59, 130, 246, 0.7);
321
+ }
322
+
323
+ .a63-form__textarea {
324
+ resize: vertical;
325
+ min-height: 4.5rem;
326
+ }
327
+
328
+ .a63-form__slots-note {
329
+ margin-top: 0.25rem;
330
+ padding: 0.4rem 0.55rem;
331
+ border-radius: 0.375rem;
332
+ background: rgba(127, 127, 127, 0.08);
333
+ font-size: 0.72rem;
334
+ color: #555;
335
+ line-height: 1.4;
336
+ }
337
+
338
+ .a63-form__unknown {
339
+ padding: 0.75rem;
340
+ font-size: 0.8rem;
341
+ color: #b91c1c;
342
+ }
343
+
344
+ /* TemplatePicker — loss warning + dismiss button */
345
+ .a63-form__picker-warning {
346
+ display: flex;
347
+ align-items: flex-start;
348
+ gap: 0.5rem;
349
+ margin-top: 0.35rem;
350
+ padding: 0.4rem 0.55rem;
351
+ border-radius: 0.375rem;
352
+ background: rgba(180, 83, 9, 0.1);
353
+ border: 1px solid rgba(180, 83, 9, 0.3);
354
+ font-size: 0.72rem;
355
+ color: #92400e;
356
+ line-height: 1.4;
357
+ }
358
+
359
+ .a63-form__picker-warning span {
360
+ flex: 1;
361
+ min-width: 0;
362
+ }
363
+
364
+ .a63-form__picker-dismiss {
365
+ flex: none;
366
+ background: transparent;
367
+ border: none;
368
+ padding: 0 0.25rem;
369
+ color: inherit;
370
+ font-size: 0.9rem;
371
+ line-height: 1;
372
+ cursor: pointer;
373
+ opacity: 0.7;
374
+ }
375
+
376
+ .a63-form__picker-dismiss:hover {
377
+ opacity: 1;
378
+ }
379
+
380
+ /* ─── Source | Form sub-toggle ───────────────────────────────────────────── */
381
+ .a63-editor__subtoggle {
382
+ display: inline-flex;
383
+ align-items: center;
384
+ border: 1px solid rgba(127, 127, 127, 0.4);
385
+ border-radius: 999px;
386
+ overflow: hidden;
387
+ }
388
+
389
+ .a63-editor__subtoggle-btn {
390
+ display: inline-flex;
391
+ align-items: center;
392
+ padding: 0.2rem 0.55rem;
393
+ border: none;
394
+ background: transparent;
395
+ color: inherit;
396
+ font-size: 0.72rem;
397
+ font-weight: 600;
398
+ cursor: pointer;
399
+ transition: background 0.1s ease;
400
+ }
401
+
402
+ .a63-editor__subtoggle-btn + .a63-editor__subtoggle-btn {
403
+ border-left: 1px solid rgba(127, 127, 127, 0.4);
404
+ }
405
+
406
+ .a63-editor__subtoggle-btn[aria-pressed='true'] {
407
+ background: rgba(59, 130, 246, 0.15);
408
+ color: #1d4ed8;
409
+ }
410
+
411
+ .a63-editor__subtoggle-btn:hover:not([aria-pressed='true']) {
412
+ background: rgba(127, 127, 127, 0.1);
413
+ }
414
+
415
+ /* ─── Form panel (right pane in Form mode) ───────────────────────────────── */
416
+ .a63-editor__form-panel {
417
+ flex: 1;
418
+ min-height: 0;
419
+ overflow-y: auto;
420
+ display: flex;
421
+ flex-direction: column;
422
+ }
423
+
424
+ /* Slide stepper — prev/next nav inside the form panel */
425
+ .a63-editor__slide-stepper {
426
+ display: flex;
427
+ align-items: center;
428
+ gap: 0.4rem;
429
+ padding: 0.4rem 0.75rem;
430
+ border-bottom: 1px solid rgba(127, 127, 127, 0.18);
431
+ flex: none;
432
+ }
433
+
434
+ .a63-editor__stepper-label {
435
+ flex: 1;
436
+ text-align: center;
437
+ font-size: 0.72rem;
438
+ font-weight: 600;
439
+ opacity: 0.7;
440
+ }
441
+
442
+ .a63-editor__stepper-btn {
443
+ display: inline-flex;
444
+ align-items: center;
445
+ justify-content: center;
446
+ width: 1.5rem;
447
+ height: 1.5rem;
448
+ border: 1px solid rgba(127, 127, 127, 0.4);
449
+ border-radius: 50%;
450
+ background: transparent;
451
+ color: inherit;
452
+ font-size: 1rem;
453
+ line-height: 1;
454
+ cursor: pointer;
455
+ }
456
+
457
+ .a63-editor__stepper-btn:disabled {
458
+ opacity: 0.3;
459
+ cursor: default;
460
+ }
461
+
462
+ .a63-editor__stepper-btn:not(:disabled):hover {
463
+ background: rgba(127, 127, 127, 0.1);
464
+ }
465
+
466
+ .a63-editor__form-fields {
467
+ flex: 1;
468
+ min-height: 0;
469
+ overflow-y: auto;
470
+ }
471
+
472
+ .a63-editor__form-opaque {
473
+ padding: 1rem 0.75rem;
474
+ display: flex;
475
+ flex-direction: column;
476
+ gap: 0.75rem;
477
+ }
478
+
479
+ .a63-editor__form-opaque p {
480
+ font-size: 0.82rem;
481
+ color: #555;
482
+ }
483
+
484
+ .a63-editor__form-empty {
485
+ padding: 1rem 0.75rem;
486
+ font-size: 0.82rem;
487
+ color: #555;
488
+ }
489
+
490
+ /* ─── ThemePicker — deck token theme select ──────────────────────────────── */
491
+ /* Controls `theme:` frontmatter (deck visual theme). Distinct from the
492
+ Light/Dark preview-canvas toggle which only affects the editor background. */
493
+ .a63-editor__theme-picker-label {
494
+ display: inline-flex;
495
+ align-items: center;
496
+ gap: 0.3rem;
497
+ }
498
+
499
+ .a63-editor__theme-picker-text {
500
+ font-size: 0.72rem;
501
+ font-weight: 600;
502
+ }
503
+
504
+ .a63-editor__theme-select {
505
+ padding: 0.2rem 0.4rem;
506
+ border: 1px solid rgba(127, 127, 127, 0.4);
507
+ border-radius: 999px;
508
+ background: transparent;
509
+ color: inherit;
510
+ font-size: 0.72rem;
511
+ font-weight: 600;
512
+ font-family: inherit;
513
+ cursor: pointer;
514
+ outline: none;
515
+ }
516
+
517
+ .a63-editor__theme-select:hover {
518
+ background: rgba(127, 127, 127, 0.12);
519
+ }
520
+
521
+ .a63-editor__theme-select:focus-visible {
522
+ outline: 2px solid rgba(59, 130, 246, 0.7);
523
+ outline-offset: 1px;
524
+ }
@@ -0,0 +1,245 @@
1
+ /* GENERATED by scripts/gen-theme-bundle.mjs — do not edit by hand. Source: src/styles/themes/<name>.css */
2
+ @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');
3
+ @import url('https://fonts.googleapis.com/css2?family=Cormorant:wght@500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&display=swap');
4
+ @import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&display=swap');
5
+
6
+ /* GENERATED by scripts/gen-theme-bundle.mjs — do not edit by hand. Source: src/styles/themes/dark.css */
7
+ /* =============================================================================
8
+ @atom63/slides — DARK THEME
9
+
10
+ A dark palette for the slide player. Import it AFTER the default tokens to
11
+ flip the whole deck (slides + chrome) to dark — every --theme-slide-* and
12
+ chrome token derives from this base palette via color-mix, so overriding the
13
+ palette is enough:
14
+
15
+ import "@atom63/slides/theme-defaults"; // light defaults + base rules
16
+ import "@atom63/slides/themes/dark"; // override → dark
17
+ import "@atom63/slides/styles";
18
+
19
+ Want a runtime light/dark toggle instead of a hard import? Re-scope the rule
20
+ below from `:root` to e.g. `[data-slides-theme="dark"]` in your own CSS.
21
+ Want a custom theme? Override any of these tokens in your own stylesheet.
22
+ ============================================================================= */
23
+ [data-slides-theme="dark"] {
24
+ /* ── Base palette (dark) ─────────────────────────────────────────────── */
25
+ --background: rgba(20, 20, 22, 1);
26
+ --foreground: rgba(237, 237, 240, 1);
27
+ --card: rgba(28, 28, 31, 1);
28
+ --popover: rgba(28, 28, 31, 1);
29
+ --popover-foreground: rgba(237, 237, 240, 1);
30
+ --light: rgba(252, 252, 252, 1);
31
+ --dark: rgba(12, 12, 14, 1);
32
+ --muted: rgba(40, 40, 44, 1);
33
+ --muted-foreground: rgba(160, 160, 166, 1);
34
+ --secondary: rgba(40, 40, 44, 1);
35
+ --secondary-foreground: rgba(210, 210, 215, 1);
36
+ --border: rgba(74, 74, 80, 1);
37
+ --input: rgba(62, 62, 68, 1);
38
+ --ring: rgba(90, 90, 98, 1);
39
+ --accent: color-mix(in srgb, rgba(48, 48, 53, 1), transparent 20%);
40
+ --accent-foreground: rgba(237, 237, 240, 1);
41
+ --primary: rgba(80, 150, 255, 1);
42
+ --primary-foreground: rgba(8, 14, 24, 1);
43
+ --destructive: rgba(240, 96, 92, 1);
44
+
45
+ /* ── Slide surfaces that read better tuned explicitly on dark ────────── */
46
+ --theme-slide-stage-bg: rgba(12, 12, 14, 1);
47
+ --theme-slide-stage-slide-ring: rgba(255, 255, 255, 0.06);
48
+ --theme-slide-surface: rgba(34, 34, 38, 1);
49
+ --theme-slide-code-bg: rgba(34, 34, 38, 1);
50
+ --theme-switch-track-shadow: inset 0 1px rgb(0 0 0 / 0.2);
51
+ }
52
+ /* GENERATED by scripts/gen-theme-bundle.mjs — do not edit by hand. Source: src/styles/themes/terminal.css */
53
+ /* =============================================================================
54
+ @atom63/slides — TERMINAL THEME
55
+
56
+ A dark, monospace "terminal" palette for the slide player — GitHub-dark greys
57
+ with a phosphor-green signal color and JetBrains Mono everywhere. Import it
58
+ AFTER the default tokens to flip the whole deck (slides + chrome) to this look;
59
+ every --theme-slide-* and chrome token derives from this base palette, so
60
+ overriding the palette + font tokens is enough:
61
+
62
+ import "@atom63/slides/theme-defaults"; // light defaults + base rules
63
+ import "@atom63/slides/themes/terminal"; // override → terminal
64
+ import "@atom63/slides/styles";
65
+
66
+ A theme is ONLY a :root override of the documented tokens — no per-theme
67
+ component code. Override any of these tokens in your own stylesheet to tweak.
68
+
69
+ Palette adapted from zarazhangrui/frontend-slides (MIT).
70
+ ============================================================================= */
71
+ [data-slides-theme="terminal"] {
72
+ /* ── Base palette (terminal) ─────────────────────────────────────────── */
73
+ --background: #0d1117;
74
+ --foreground: #c9d1d9;
75
+ --card: #161b22;
76
+ --popover: #161b22;
77
+ --popover-foreground: #c9d1d9;
78
+ --muted: #161b22;
79
+ --muted-foreground: #8b949e;
80
+ --secondary: #161b22;
81
+ --secondary-foreground: #c9d1d9;
82
+ --border: #30363d;
83
+ --input: #30363d;
84
+ --ring: #39d353;
85
+ --accent: #1f2630;
86
+ --accent-foreground: #c9d1d9;
87
+ --primary: #39d353;
88
+ --primary-foreground: #0d1117;
89
+ --destructive: #f85149;
90
+
91
+ /* ── Fonts — mono everything, that's the terminal vibe ───────────────── */
92
+ --font-sans: "JetBrains Mono", ui-monospace, monospace;
93
+ --font-serif: "JetBrains Mono", ui-monospace, monospace;
94
+ --font-mono: "JetBrains Mono", ui-monospace, monospace;
95
+
96
+ /* ── Slide surfaces tuned for the terminal look ──────────────────────── */
97
+ --theme-slide-stage-bg: #010409;
98
+ --theme-slide-surface: #161b22;
99
+ --theme-slide-code-bg: #161b22;
100
+ --theme-slide-accent: #39d353;
101
+ }
102
+ /* GENERATED by scripts/gen-theme-bundle.mjs — do not edit by hand. Source: src/styles/themes/editorial.css */
103
+ /* =============================================================================
104
+ @atom63/slides — EDITORIAL THEME
105
+
106
+ A light, serif "paper & ink" palette for the slide player — warm off-white
107
+ stock, near-black ink, a deep editorial red signal, and Cormorant serif
108
+ headlines. Import it AFTER the default tokens to flip the whole deck (slides +
109
+ chrome) to this look; every --theme-slide-* and chrome token derives from this
110
+ base palette, so overriding the palette + font tokens is enough:
111
+
112
+ import "@atom63/slides/theme-defaults"; // light defaults + base rules
113
+ import "@atom63/slides/themes/editorial"; // override → editorial
114
+ import "@atom63/slides/styles";
115
+
116
+ A theme is ONLY a :root override of the documented tokens — no per-theme
117
+ component code. Override any of these tokens in your own stylesheet to tweak.
118
+
119
+ Palette adapted from zarazhangrui/frontend-slides (MIT).
120
+ ============================================================================= */
121
+ [data-slides-theme="editorial"] {
122
+ /* ── Base palette (editorial) ────────────────────────────────────────── */
123
+ --background: #faf9f7;
124
+ --foreground: #1a1a1a;
125
+ --card: #ffffff;
126
+ --popover: #ffffff;
127
+ --popover-foreground: #1a1a1a;
128
+ --muted: #efece6;
129
+ --muted-foreground: #6b6258;
130
+ --secondary: #efece6;
131
+ --secondary-foreground: #4a4038;
132
+ --border: #e2dcd2;
133
+ --input: #d9d2c6;
134
+ --ring: #c41e3a;
135
+ --accent: #efe7dc;
136
+ --accent-foreground: #1a1a1a;
137
+ --primary: #c41e3a;
138
+ --primary-foreground: #fff7f5;
139
+ --destructive: #c41e3a;
140
+
141
+ /* ── Fonts — serif headlines & body; mono stays default ──────────────── */
142
+ --font-sans: "Cormorant", Georgia, serif;
143
+ --font-serif: "Cormorant", Georgia, serif;
144
+
145
+ /* ── Slide surfaces tuned for the paper & ink look ───────────────────── */
146
+ --theme-slide-stage-bg: #ece8e1;
147
+ --theme-slide-surface: #ffffff;
148
+ --theme-slide-quote-color: #2a2a2a;
149
+ }
150
+ /* GENERATED by scripts/gen-theme-bundle.mjs — do not edit by hand. Source: src/styles/themes/neon.css */
151
+ /* =============================================================================
152
+ @atom63/slides — NEON THEME
153
+
154
+ A dark "cyber" palette for the slide player — deep navy with a cyan signal and
155
+ magenta destructive. Palette-led (no special webfont, to keep it light).
156
+ Import it AFTER the default tokens to flip the whole deck (slides + chrome) to
157
+ this look; every --theme-slide-* and chrome token derives from this base
158
+ palette, so overriding the palette is enough:
159
+
160
+ import "@atom63/slides/theme-defaults"; // light defaults + base rules
161
+ import "@atom63/slides/themes/neon"; // override → neon
162
+ import "@atom63/slides/styles";
163
+
164
+ A theme is ONLY a :root override of the documented tokens — no per-theme
165
+ component code. Override any of these tokens in your own stylesheet to tweak.
166
+
167
+ Palette adapted from zarazhangrui/frontend-slides (MIT).
168
+ ============================================================================= */
169
+ [data-slides-theme="neon"] {
170
+ /* ── Base palette (neon) ─────────────────────────────────────────────── */
171
+ --background: #0a0f1c;
172
+ --foreground: #e6f0ff;
173
+ --card: #111829;
174
+ --popover: #111829;
175
+ --popover-foreground: #e6f0ff;
176
+ --muted: #141b2e;
177
+ --muted-foreground: #8da2c0;
178
+ --secondary: #141b2e;
179
+ --secondary-foreground: #cfe0ff;
180
+ --border: #243049;
181
+ --input: #243049;
182
+ --ring: #00ffcc;
183
+ --accent: #16203a;
184
+ --accent-foreground: #e6f0ff;
185
+ --primary: #00ffcc;
186
+ --primary-foreground: #04121a;
187
+ --destructive: #ff00aa;
188
+
189
+ /* ── Fonts — defaults (this is a palette-only theme) ─────────────────── */
190
+
191
+ /* ── Slide surfaces tuned for the cyber look ─────────────────────────── */
192
+ --theme-slide-stage-bg: #05080f;
193
+ --theme-slide-surface: #111829;
194
+ --theme-slide-code-bg: #111829;
195
+ --theme-slide-accent: #00ffcc;
196
+ --theme-slide-quote-color: #b9e8ff;
197
+ }
198
+ /* GENERATED by scripts/gen-theme-bundle.mjs — do not edit by hand. Source: src/styles/themes/bold.css */
199
+ /* =============================================================================
200
+ @atom63/slides — BOLD THEME
201
+
202
+ A dark, high-impact palette for the slide player — charcoal greys with a
203
+ bright orange signal and a strong Archivo sans for headlines. Import it AFTER
204
+ the default tokens to flip the whole deck (slides + chrome) to this look;
205
+ every --theme-slide-* and chrome token derives from this base palette, so
206
+ overriding the palette + font tokens is enough:
207
+
208
+ import "@atom63/slides/theme-defaults"; // light defaults + base rules
209
+ import "@atom63/slides/themes/bold"; // override → bold
210
+ import "@atom63/slides/styles";
211
+
212
+ A theme is ONLY a :root override of the documented tokens — no per-theme
213
+ component code. Override any of these tokens in your own stylesheet to tweak.
214
+
215
+ Palette adapted from zarazhangrui/frontend-slides (MIT).
216
+ ============================================================================= */
217
+ [data-slides-theme="bold"] {
218
+ /* ── Base palette (bold) ─────────────────────────────────────────────── */
219
+ --background: #1a1a1a;
220
+ --foreground: #ffffff;
221
+ --card: #242424;
222
+ --popover: #242424;
223
+ --popover-foreground: #ffffff;
224
+ --muted: #2a2a2a;
225
+ --muted-foreground: #a0a0a0;
226
+ --secondary: #2a2a2a;
227
+ --secondary-foreground: #e0e0e0;
228
+ --border: #3a3a3a;
229
+ --input: #3a3a3a;
230
+ --ring: #ff5722;
231
+ --accent: #2e2e2e;
232
+ --accent-foreground: #ffffff;
233
+ --primary: #ff5722;
234
+ --primary-foreground: #1a1a1a;
235
+ --destructive: #ff5722;
236
+
237
+ /* ── Fonts — strong sans headlines; serif & mono stay default ────────── */
238
+ --font-sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
239
+
240
+ /* ── Slide surfaces tuned for the high-impact look ───────────────────── */
241
+ --theme-slide-stage-bg: #0e0e0e;
242
+ --theme-slide-surface: #242424;
243
+ --theme-slide-code-bg: #242424;
244
+ --theme-slide-accent: #ff5722;
245
+ }