@deckio/deck-engine 0.1.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.
- package/components/BottomBar.jsx +9 -0
- package/components/BottomBar.module.css +17 -0
- package/components/Navigation.jsx +195 -0
- package/components/Navigation.module.css +210 -0
- package/components/Slide.jsx +43 -0
- package/components/exportDeckPdf.js +142 -0
- package/components/exportDeckPptx.js +127 -0
- package/context/SlideContext.jsx +190 -0
- package/index.js +5 -0
- package/instructions/AGENTS.md +26 -0
- package/instructions/deck-config.instructions.md +34 -0
- package/instructions/deck-project.instructions.md +34 -0
- package/instructions/slide-css.instructions.md +96 -0
- package/instructions/slide-jsx.instructions.md +34 -0
- package/package.json +59 -0
- package/scripts/capture-screen.mjs +127 -0
- package/scripts/export-pdf.mjs +287 -0
- package/scripts/generate-image.mjs +110 -0
- package/scripts/init-project.mjs +214 -0
- package/skills/deck-add-slide/SKILL.md +236 -0
- package/skills/deck-delete-slide/SKILL.md +51 -0
- package/skills/deck-generate-image/SKILL.md +85 -0
- package/skills/deck-inspect/SKILL.md +60 -0
- package/skills/deck-sketch/SKILL.md +91 -0
- package/skills/deck-validate-project/SKILL.md +81 -0
- package/slides/GenericThankYouSlide.jsx +31 -0
- package/styles/global.css +392 -0
- package/themes/dark.css +151 -0
- package/themes/light.css +152 -0
- package/themes/shadcn.css +212 -0
- package/themes/theme-loader.js +47 -0
- package/vite.js +67 -0
package/themes/dark.css
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* DECKIO — Dark Theme
|
|
3
|
+
*
|
|
4
|
+
* The original dark palette — deep midnight blues with electric accents.
|
|
5
|
+
* Optimized for ambient lighting and screen presentations.
|
|
6
|
+
*
|
|
7
|
+
* CSS custom properties → Tailwind utility bridge via @theme inline.
|
|
8
|
+
*/
|
|
9
|
+
@import "tailwindcss";
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
color-scheme: dark;
|
|
13
|
+
|
|
14
|
+
/* ── 1. Core Semantic Colors ─────────────────────────────────────────── */
|
|
15
|
+
--background: #080b10;
|
|
16
|
+
--foreground: #e6edf3;
|
|
17
|
+
--card: #0d1117;
|
|
18
|
+
--card-foreground: #e6edf3;
|
|
19
|
+
--primary: #58a6ff;
|
|
20
|
+
--primary-foreground: #ffffff;
|
|
21
|
+
--secondary: #161b22;
|
|
22
|
+
--secondary-foreground: #e6edf3;
|
|
23
|
+
--muted: #21262d;
|
|
24
|
+
--muted-foreground: #8b949e;
|
|
25
|
+
--accent: #58a6ff;
|
|
26
|
+
--accent-foreground: #ffffff;
|
|
27
|
+
--destructive: #f85149;
|
|
28
|
+
--destructive-foreground: #ffffff;
|
|
29
|
+
--border: #30363d;
|
|
30
|
+
--input: #30363d;
|
|
31
|
+
--ring: rgba(88, 166, 255, 0.4);
|
|
32
|
+
--radius: 10px;
|
|
33
|
+
|
|
34
|
+
/* ── 2. Decorative Palette ───────────────────────────────────────────── */
|
|
35
|
+
--blue-glow: #1f6feb;
|
|
36
|
+
--purple: #bc8cff;
|
|
37
|
+
--purple-deep: #6e40c9;
|
|
38
|
+
--pink: #f778ba;
|
|
39
|
+
--cyan: #56d4dd;
|
|
40
|
+
--green: #3fb950;
|
|
41
|
+
|
|
42
|
+
/* ── 3. Derived Overlays & Glows ─────────────────────────────────────── */
|
|
43
|
+
--surface-overlay: rgba(22, 27, 34, 0.8);
|
|
44
|
+
--surface-overlay-heavy: rgba(22, 27, 34, 0.95);
|
|
45
|
+
--background-overlay: rgba(13, 17, 23, 0.85);
|
|
46
|
+
--border-subtle: rgba(48, 54, 61, 0.6);
|
|
47
|
+
--glow-primary: rgba(31, 111, 235, 0.2);
|
|
48
|
+
--glow-primary-strong: rgba(31, 111, 235, 0.22);
|
|
49
|
+
--glow-primary-shadow: rgba(31, 111, 235, 0.18);
|
|
50
|
+
--glow-ring: rgba(121, 192, 255, 0.18);
|
|
51
|
+
--glow-accent: rgba(88, 166, 255, 0.10);
|
|
52
|
+
--glow-purple: rgba(188, 140, 255, 0.10);
|
|
53
|
+
--glow-cyan: rgba(86, 212, 221, 0.08);
|
|
54
|
+
--dot-color: rgba(139, 148, 158, 0.25);
|
|
55
|
+
--destructive-subtle: rgba(248, 81, 73, 0.04);
|
|
56
|
+
--shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.4);
|
|
57
|
+
|
|
58
|
+
/* ── 4. Presentation Layout ──────────────────────────────────────────── */
|
|
59
|
+
--slide-bg: var(--background);
|
|
60
|
+
--content-max-width: 1280px;
|
|
61
|
+
--content-gutter: 72px;
|
|
62
|
+
|
|
63
|
+
/* ── 5. Typography Scale ─────────────────────────────────────────────── */
|
|
64
|
+
--font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
65
|
+
--font-size-2xs: 10px;
|
|
66
|
+
--font-size-xs: 11px;
|
|
67
|
+
--font-size-sm: 12px;
|
|
68
|
+
--font-size-md: 13px;
|
|
69
|
+
--font-size-base: 16px;
|
|
70
|
+
--font-size-lg: 20px;
|
|
71
|
+
--font-size-xl: 24px;
|
|
72
|
+
--font-size-2xl: 32px;
|
|
73
|
+
--font-size-display: clamp(40px, 6vw, 64px);
|
|
74
|
+
|
|
75
|
+
--font-weight-light: 300;
|
|
76
|
+
--font-weight-regular: 400;
|
|
77
|
+
--font-weight-medium: 500;
|
|
78
|
+
--font-weight-semibold: 600;
|
|
79
|
+
--font-weight-bold: 700;
|
|
80
|
+
--font-weight-extrabold: 800;
|
|
81
|
+
|
|
82
|
+
--letter-spacing-tight: -2px;
|
|
83
|
+
--letter-spacing-normal: 0;
|
|
84
|
+
--letter-spacing-wide: 0.5px;
|
|
85
|
+
--letter-spacing-wider: 2.5px;
|
|
86
|
+
--letter-spacing-widest: 3px;
|
|
87
|
+
|
|
88
|
+
--line-height-tight: 1.2;
|
|
89
|
+
--line-height-normal: 1.5;
|
|
90
|
+
--line-height-relaxed: 1.75;
|
|
91
|
+
|
|
92
|
+
/* ── 6. Spacing Scale (4 px base) ────────────────────────────────────── */
|
|
93
|
+
--space-0: 0px;
|
|
94
|
+
--space-0-5: 2px;
|
|
95
|
+
--space-1: 4px;
|
|
96
|
+
--space-1-5: 6px;
|
|
97
|
+
--space-2: 8px;
|
|
98
|
+
--space-3: 12px;
|
|
99
|
+
--space-4: 16px;
|
|
100
|
+
--space-5: 20px;
|
|
101
|
+
--space-6: 24px;
|
|
102
|
+
--space-8: 32px;
|
|
103
|
+
--space-10: 40px;
|
|
104
|
+
--space-11: 44px;
|
|
105
|
+
--space-12: 48px;
|
|
106
|
+
--space-14: 56px;
|
|
107
|
+
|
|
108
|
+
/* ── 7. Border Radius Scale ──────────────────────────────────────────── */
|
|
109
|
+
--radius-sm: 4px;
|
|
110
|
+
--radius-md: 6px;
|
|
111
|
+
--radius-lg: 10px;
|
|
112
|
+
--radius-xl: 20px;
|
|
113
|
+
--radius-full: 50%;
|
|
114
|
+
|
|
115
|
+
/* ── 8. Z-Index Scale ────────────────────────────────────────────────── */
|
|
116
|
+
--z-content: 2;
|
|
117
|
+
--z-bar: 100;
|
|
118
|
+
--z-nav: 200;
|
|
119
|
+
--z-progress: 300;
|
|
120
|
+
--z-overlay: 9999;
|
|
121
|
+
|
|
122
|
+
/* ── 9. Transitions ──────────────────────────────────────────────────── */
|
|
123
|
+
--transition-fast: 0.15s ease;
|
|
124
|
+
--transition-base: 0.25s ease;
|
|
125
|
+
--transition-slow: 0.4s ease;
|
|
126
|
+
--ease-slide: cubic-bezier(0.4, 0, 0.2, 1);
|
|
127
|
+
--duration-slide: 0.6s;
|
|
128
|
+
--duration-progress: 0.5s;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* ── Tailwind ↔ CSS variable bridge ── */
|
|
132
|
+
@theme inline {
|
|
133
|
+
--color-background: var(--background);
|
|
134
|
+
--color-foreground: var(--foreground);
|
|
135
|
+
--color-card: var(--card);
|
|
136
|
+
--color-card-foreground: var(--card-foreground);
|
|
137
|
+
--color-primary: var(--primary);
|
|
138
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
139
|
+
--color-secondary: var(--secondary);
|
|
140
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
141
|
+
--color-accent: var(--accent);
|
|
142
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
143
|
+
--color-destructive: var(--destructive);
|
|
144
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
145
|
+
--color-muted: var(--muted);
|
|
146
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
147
|
+
--color-border: var(--border);
|
|
148
|
+
--color-input: var(--input);
|
|
149
|
+
--color-ring: var(--ring);
|
|
150
|
+
--radius: var(--radius);
|
|
151
|
+
}
|
package/themes/light.css
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* DECKIO — Light Theme
|
|
3
|
+
*
|
|
4
|
+
* Clean, professional light palette for well-lit rooms and projected screens.
|
|
5
|
+
* High contrast ratios ensure readability at distance.
|
|
6
|
+
* Crisp white surfaces with a refined blue accent.
|
|
7
|
+
*
|
|
8
|
+
* CSS custom properties → Tailwind utility bridge via @theme inline.
|
|
9
|
+
*/
|
|
10
|
+
@import "tailwindcss";
|
|
11
|
+
|
|
12
|
+
:root {
|
|
13
|
+
color-scheme: light;
|
|
14
|
+
|
|
15
|
+
/* ── 1. Core Semantic Colors ─────────────────────────────────────────── */
|
|
16
|
+
--background: #ffffff;
|
|
17
|
+
--foreground: #1a1a2e;
|
|
18
|
+
--card: #f8f9fb;
|
|
19
|
+
--card-foreground: #1a1a2e;
|
|
20
|
+
--primary: #0969da;
|
|
21
|
+
--primary-foreground: #ffffff;
|
|
22
|
+
--secondary: #f1f3f5;
|
|
23
|
+
--secondary-foreground: #1f2328;
|
|
24
|
+
--muted: #e9ecef;
|
|
25
|
+
--muted-foreground: #636c76;
|
|
26
|
+
--accent: #0969da;
|
|
27
|
+
--accent-foreground: #ffffff;
|
|
28
|
+
--destructive: #cf222e;
|
|
29
|
+
--destructive-foreground: #ffffff;
|
|
30
|
+
--border: #d1d9e0;
|
|
31
|
+
--input: #d1d9e0;
|
|
32
|
+
--ring: rgba(9, 105, 218, 0.4);
|
|
33
|
+
--radius: 10px;
|
|
34
|
+
|
|
35
|
+
/* ── 2. Decorative Palette ───────────────────────────────────────────── */
|
|
36
|
+
--blue-glow: #0969da;
|
|
37
|
+
--purple: #8250df;
|
|
38
|
+
--purple-deep: #6639ba;
|
|
39
|
+
--pink: #bf3989;
|
|
40
|
+
--cyan: #0891b2;
|
|
41
|
+
--green: #1a7f37;
|
|
42
|
+
|
|
43
|
+
/* ── 3. Derived Overlays & Glows ─────────────────────────────────────── */
|
|
44
|
+
--surface-overlay: rgba(255, 255, 255, 0.85);
|
|
45
|
+
--surface-overlay-heavy: rgba(255, 255, 255, 0.95);
|
|
46
|
+
--background-overlay: rgba(248, 249, 251, 0.90);
|
|
47
|
+
--border-subtle: rgba(209, 217, 224, 0.6);
|
|
48
|
+
--glow-primary: rgba(9, 105, 218, 0.08);
|
|
49
|
+
--glow-primary-strong: rgba(9, 105, 218, 0.12);
|
|
50
|
+
--glow-primary-shadow: rgba(9, 105, 218, 0.10);
|
|
51
|
+
--glow-ring: rgba(9, 105, 218, 0.12);
|
|
52
|
+
--glow-accent: rgba(9, 105, 218, 0.06);
|
|
53
|
+
--glow-purple: rgba(130, 80, 223, 0.06);
|
|
54
|
+
--glow-cyan: rgba(8, 145, 178, 0.05);
|
|
55
|
+
--dot-color: rgba(99, 108, 118, 0.15);
|
|
56
|
+
--destructive-subtle: rgba(207, 34, 46, 0.04);
|
|
57
|
+
--shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.12);
|
|
58
|
+
|
|
59
|
+
/* ── 4. Presentation Layout ──────────────────────────────────────────── */
|
|
60
|
+
--slide-bg: var(--background);
|
|
61
|
+
--content-max-width: 1280px;
|
|
62
|
+
--content-gutter: 72px;
|
|
63
|
+
|
|
64
|
+
/* ── 5. Typography Scale ─────────────────────────────────────────────── */
|
|
65
|
+
--font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
66
|
+
--font-size-2xs: 10px;
|
|
67
|
+
--font-size-xs: 11px;
|
|
68
|
+
--font-size-sm: 12px;
|
|
69
|
+
--font-size-md: 13px;
|
|
70
|
+
--font-size-base: 16px;
|
|
71
|
+
--font-size-lg: 20px;
|
|
72
|
+
--font-size-xl: 24px;
|
|
73
|
+
--font-size-2xl: 32px;
|
|
74
|
+
--font-size-display: clamp(40px, 6vw, 64px);
|
|
75
|
+
|
|
76
|
+
--font-weight-light: 300;
|
|
77
|
+
--font-weight-regular: 400;
|
|
78
|
+
--font-weight-medium: 500;
|
|
79
|
+
--font-weight-semibold: 600;
|
|
80
|
+
--font-weight-bold: 700;
|
|
81
|
+
--font-weight-extrabold: 800;
|
|
82
|
+
|
|
83
|
+
--letter-spacing-tight: -2px;
|
|
84
|
+
--letter-spacing-normal: 0;
|
|
85
|
+
--letter-spacing-wide: 0.5px;
|
|
86
|
+
--letter-spacing-wider: 2.5px;
|
|
87
|
+
--letter-spacing-widest: 3px;
|
|
88
|
+
|
|
89
|
+
--line-height-tight: 1.2;
|
|
90
|
+
--line-height-normal: 1.5;
|
|
91
|
+
--line-height-relaxed: 1.75;
|
|
92
|
+
|
|
93
|
+
/* ── 6. Spacing Scale (4 px base) ────────────────────────────────────── */
|
|
94
|
+
--space-0: 0px;
|
|
95
|
+
--space-0-5: 2px;
|
|
96
|
+
--space-1: 4px;
|
|
97
|
+
--space-1-5: 6px;
|
|
98
|
+
--space-2: 8px;
|
|
99
|
+
--space-3: 12px;
|
|
100
|
+
--space-4: 16px;
|
|
101
|
+
--space-5: 20px;
|
|
102
|
+
--space-6: 24px;
|
|
103
|
+
--space-8: 32px;
|
|
104
|
+
--space-10: 40px;
|
|
105
|
+
--space-11: 44px;
|
|
106
|
+
--space-12: 48px;
|
|
107
|
+
--space-14: 56px;
|
|
108
|
+
|
|
109
|
+
/* ── 7. Border Radius Scale ──────────────────────────────────────────── */
|
|
110
|
+
--radius-sm: 4px;
|
|
111
|
+
--radius-md: 6px;
|
|
112
|
+
--radius-lg: 10px;
|
|
113
|
+
--radius-xl: 20px;
|
|
114
|
+
--radius-full: 50%;
|
|
115
|
+
|
|
116
|
+
/* ── 8. Z-Index Scale ────────────────────────────────────────────────── */
|
|
117
|
+
--z-content: 2;
|
|
118
|
+
--z-bar: 100;
|
|
119
|
+
--z-nav: 200;
|
|
120
|
+
--z-progress: 300;
|
|
121
|
+
--z-overlay: 9999;
|
|
122
|
+
|
|
123
|
+
/* ── 9. Transitions ──────────────────────────────────────────────────── */
|
|
124
|
+
--transition-fast: 0.15s ease;
|
|
125
|
+
--transition-base: 0.25s ease;
|
|
126
|
+
--transition-slow: 0.4s ease;
|
|
127
|
+
--ease-slide: cubic-bezier(0.4, 0, 0.2, 1);
|
|
128
|
+
--duration-slide: 0.6s;
|
|
129
|
+
--duration-progress: 0.5s;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* ── Tailwind ↔ CSS variable bridge ── */
|
|
133
|
+
@theme inline {
|
|
134
|
+
--color-background: var(--background);
|
|
135
|
+
--color-foreground: var(--foreground);
|
|
136
|
+
--color-card: var(--card);
|
|
137
|
+
--color-card-foreground: var(--card-foreground);
|
|
138
|
+
--color-primary: var(--primary);
|
|
139
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
140
|
+
--color-secondary: var(--secondary);
|
|
141
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
142
|
+
--color-accent: var(--accent);
|
|
143
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
144
|
+
--color-destructive: var(--destructive);
|
|
145
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
146
|
+
--color-muted: var(--muted);
|
|
147
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
148
|
+
--color-border: var(--border);
|
|
149
|
+
--color-input: var(--input);
|
|
150
|
+
--color-ring: var(--ring);
|
|
151
|
+
--radius: var(--radius);
|
|
152
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* DECKIO — shadcn/ui Theme
|
|
3
|
+
*
|
|
4
|
+
* Clean, system-grade aesthetic using the official shadcn/ui light palette.
|
|
5
|
+
* oklch color space for perceptual uniformity.
|
|
6
|
+
* Neutral base, subtle borders, rounded corners, muted surfaces.
|
|
7
|
+
*
|
|
8
|
+
* CSS custom properties → Tailwind utility bridge via @theme inline.
|
|
9
|
+
*/
|
|
10
|
+
@import "tailwindcss";
|
|
11
|
+
|
|
12
|
+
:root {
|
|
13
|
+
color-scheme: light;
|
|
14
|
+
|
|
15
|
+
/* ── 1. Core Semantic Colors (shadcn/ui light — oklch) ───────────────── */
|
|
16
|
+
--background: oklch(1 0 0);
|
|
17
|
+
--foreground: oklch(0.145 0 0);
|
|
18
|
+
--card: oklch(1 0 0);
|
|
19
|
+
--card-foreground: oklch(0.145 0 0);
|
|
20
|
+
--primary: oklch(0.205 0 0);
|
|
21
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
22
|
+
--secondary: oklch(0.97 0 0);
|
|
23
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
24
|
+
--muted: oklch(0.97 0 0);
|
|
25
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
26
|
+
--accent: oklch(0.97 0 0);
|
|
27
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
28
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
29
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
30
|
+
--border: oklch(0.922 0 0);
|
|
31
|
+
--input: oklch(0.922 0 0);
|
|
32
|
+
--ring: oklch(0.708 0 0);
|
|
33
|
+
--radius: 0.625rem;
|
|
34
|
+
|
|
35
|
+
/* ── 2. Decorative Palette (oklch) ───────────────────────────────────── */
|
|
36
|
+
--blue-glow: oklch(0.623 0.214 259.815);
|
|
37
|
+
--purple: oklch(0.627 0.265 303.9);
|
|
38
|
+
--purple-deep: oklch(0.536 0.245 301.924);
|
|
39
|
+
--pink: oklch(0.656 0.241 354.308);
|
|
40
|
+
--cyan: oklch(0.715 0.143 215.221);
|
|
41
|
+
--green: oklch(0.723 0.219 149.579);
|
|
42
|
+
|
|
43
|
+
/* ── 3. Derived Overlays & Glows ─────────────────────────────────────── */
|
|
44
|
+
--surface-overlay: oklch(1 0 0 / 90%);
|
|
45
|
+
--surface-overlay-heavy: oklch(1 0 0 / 97%);
|
|
46
|
+
--background-overlay: oklch(0.985 0 0 / 90%);
|
|
47
|
+
--border-subtle: oklch(0.922 0 0 / 60%);
|
|
48
|
+
--glow-primary: oklch(0.205 0 0 / 5%);
|
|
49
|
+
--glow-primary-strong: oklch(0.205 0 0 / 8%);
|
|
50
|
+
--glow-primary-shadow: oklch(0.205 0 0 / 6%);
|
|
51
|
+
--glow-ring: oklch(0.708 0 0 / 15%);
|
|
52
|
+
--glow-accent: oklch(0.556 0 0 / 5%);
|
|
53
|
+
--glow-purple: oklch(0.627 0.265 303.9 / 5%);
|
|
54
|
+
--glow-cyan: oklch(0.715 0.143 215.221 / 5%);
|
|
55
|
+
--dot-color: oklch(0.556 0 0 / 15%);
|
|
56
|
+
--destructive-subtle: oklch(0.577 0.245 27.325 / 4%);
|
|
57
|
+
--shadow-elevated: 0 8px 24px oklch(0 0 0 / 8%);
|
|
58
|
+
|
|
59
|
+
/* ── 4. Presentation Layout ──────────────────────────────────────────── */
|
|
60
|
+
--slide-bg: var(--background);
|
|
61
|
+
--content-max-width: 1280px;
|
|
62
|
+
--content-gutter: 72px;
|
|
63
|
+
|
|
64
|
+
/* ── 5. Typography Scale ─────────────────────────────────────────────── */
|
|
65
|
+
--font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
66
|
+
--font-size-2xs: 10px;
|
|
67
|
+
--font-size-xs: 11px;
|
|
68
|
+
--font-size-sm: 12px;
|
|
69
|
+
--font-size-md: 13px;
|
|
70
|
+
--font-size-base: 16px;
|
|
71
|
+
--font-size-lg: 20px;
|
|
72
|
+
--font-size-xl: 24px;
|
|
73
|
+
--font-size-2xl: 32px;
|
|
74
|
+
--font-size-display: clamp(40px, 6vw, 64px);
|
|
75
|
+
|
|
76
|
+
--font-weight-light: 300;
|
|
77
|
+
--font-weight-regular: 400;
|
|
78
|
+
--font-weight-medium: 500;
|
|
79
|
+
--font-weight-semibold: 600;
|
|
80
|
+
--font-weight-bold: 700;
|
|
81
|
+
--font-weight-extrabold: 800;
|
|
82
|
+
|
|
83
|
+
--letter-spacing-tight: -2px;
|
|
84
|
+
--letter-spacing-normal: 0;
|
|
85
|
+
--letter-spacing-wide: 0.5px;
|
|
86
|
+
--letter-spacing-wider: 2.5px;
|
|
87
|
+
--letter-spacing-widest: 3px;
|
|
88
|
+
|
|
89
|
+
--line-height-tight: 1.2;
|
|
90
|
+
--line-height-normal: 1.5;
|
|
91
|
+
--line-height-relaxed: 1.75;
|
|
92
|
+
|
|
93
|
+
/* ── 6. Spacing Scale (4 px base) ────────────────────────────────────── */
|
|
94
|
+
--space-0: 0px;
|
|
95
|
+
--space-0-5: 2px;
|
|
96
|
+
--space-1: 4px;
|
|
97
|
+
--space-1-5: 6px;
|
|
98
|
+
--space-2: 8px;
|
|
99
|
+
--space-3: 12px;
|
|
100
|
+
--space-4: 16px;
|
|
101
|
+
--space-5: 20px;
|
|
102
|
+
--space-6: 24px;
|
|
103
|
+
--space-8: 32px;
|
|
104
|
+
--space-10: 40px;
|
|
105
|
+
--space-11: 44px;
|
|
106
|
+
--space-12: 48px;
|
|
107
|
+
--space-14: 56px;
|
|
108
|
+
|
|
109
|
+
/* ── 7. Border Radius Scale ──────────────────────────────────────────── */
|
|
110
|
+
--radius-sm: 4px;
|
|
111
|
+
--radius-md: 6px;
|
|
112
|
+
--radius-lg: 10px;
|
|
113
|
+
--radius-xl: 20px;
|
|
114
|
+
--radius-full: 50%;
|
|
115
|
+
|
|
116
|
+
/* ── 8. Z-Index Scale ────────────────────────────────────────────────── */
|
|
117
|
+
--z-content: 2;
|
|
118
|
+
--z-bar: 100;
|
|
119
|
+
--z-nav: 200;
|
|
120
|
+
--z-progress: 300;
|
|
121
|
+
--z-overlay: 9999;
|
|
122
|
+
|
|
123
|
+
/* ── 9. Transitions ──────────────────────────────────────────────────── */
|
|
124
|
+
--transition-fast: 0.15s ease;
|
|
125
|
+
--transition-base: 0.25s ease;
|
|
126
|
+
--transition-slow: 0.4s ease;
|
|
127
|
+
--ease-slide: cubic-bezier(0.4, 0, 0.2, 1);
|
|
128
|
+
--duration-slide: 0.6s;
|
|
129
|
+
--duration-progress: 0.5s;
|
|
130
|
+
|
|
131
|
+
/* ── shadcn-specific tokens ──────────────────────────────────────────── */
|
|
132
|
+
--popover: oklch(1 0 0);
|
|
133
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
134
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
135
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
136
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
137
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
138
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.dark {
|
|
142
|
+
color-scheme: dark;
|
|
143
|
+
|
|
144
|
+
/* ── 1. Core Semantic Colors (shadcn/ui dark — oklch) ────────────────── */
|
|
145
|
+
--background: oklch(0.145 0 0);
|
|
146
|
+
--foreground: oklch(0.985 0 0);
|
|
147
|
+
--card: oklch(0.145 0 0);
|
|
148
|
+
--card-foreground: oklch(0.985 0 0);
|
|
149
|
+
--primary: oklch(0.985 0 0);
|
|
150
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
151
|
+
--secondary: oklch(0.269 0 0);
|
|
152
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
153
|
+
--muted: oklch(0.269 0 0);
|
|
154
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
155
|
+
--accent: oklch(0.269 0 0);
|
|
156
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
157
|
+
--destructive: oklch(0.396 0.141 25.723);
|
|
158
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
159
|
+
--border: oklch(0.269 0 0);
|
|
160
|
+
--input: oklch(0.269 0 0);
|
|
161
|
+
--ring: oklch(0.439 0 0);
|
|
162
|
+
--radius: 0.625rem;
|
|
163
|
+
|
|
164
|
+
/* ── 3. Derived Overlays & Glows (dark) ─────────────────────────────── */
|
|
165
|
+
--surface-overlay: oklch(0.145 0 0 / 90%);
|
|
166
|
+
--surface-overlay-heavy: oklch(0.145 0 0 / 97%);
|
|
167
|
+
--background-overlay: oklch(0.18 0 0 / 90%);
|
|
168
|
+
--border-subtle: oklch(0.269 0 0 / 60%);
|
|
169
|
+
--glow-primary: oklch(0.985 0 0 / 5%);
|
|
170
|
+
--glow-primary-strong: oklch(0.985 0 0 / 8%);
|
|
171
|
+
--glow-primary-shadow: oklch(0.985 0 0 / 6%);
|
|
172
|
+
--glow-ring: oklch(0.439 0 0 / 15%);
|
|
173
|
+
--glow-accent: oklch(0.708 0 0 / 5%);
|
|
174
|
+
--glow-purple: oklch(0.627 0.265 303.9 / 5%);
|
|
175
|
+
--glow-cyan: oklch(0.715 0.143 215.221 / 5%);
|
|
176
|
+
--dot-color: oklch(0.708 0 0 / 15%);
|
|
177
|
+
--destructive-subtle: oklch(0.396 0.141 25.723 / 4%);
|
|
178
|
+
--shadow-elevated: 0 8px 24px oklch(0 0 0 / 30%);
|
|
179
|
+
|
|
180
|
+
/* ── shadcn-specific tokens (dark) ──────────────────────────────────── */
|
|
181
|
+
--popover: oklch(0.145 0 0);
|
|
182
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
183
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
184
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
185
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
186
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
187
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* ── Tailwind ↔ CSS variable bridge ── */
|
|
191
|
+
@theme inline {
|
|
192
|
+
--color-background: var(--background);
|
|
193
|
+
--color-foreground: var(--foreground);
|
|
194
|
+
--color-card: var(--card);
|
|
195
|
+
--color-card-foreground: var(--card-foreground);
|
|
196
|
+
--color-primary: var(--primary);
|
|
197
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
198
|
+
--color-secondary: var(--secondary);
|
|
199
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
200
|
+
--color-accent: var(--accent);
|
|
201
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
202
|
+
--color-destructive: var(--destructive);
|
|
203
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
204
|
+
--color-muted: var(--muted);
|
|
205
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
206
|
+
--color-border: var(--border);
|
|
207
|
+
--color-input: var(--input);
|
|
208
|
+
--color-ring: var(--ring);
|
|
209
|
+
--color-popover: var(--popover);
|
|
210
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
211
|
+
--radius: var(--radius);
|
|
212
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme loader for deck-engine.
|
|
3
|
+
*
|
|
4
|
+
* Resolves theme names to CSS file paths and provides discovery.
|
|
5
|
+
* Themes are plain CSS files in this directory that set CSS custom
|
|
6
|
+
* properties consumed by the engine and mapped to Tailwind utilities
|
|
7
|
+
* via @theme inline blocks.
|
|
8
|
+
*/
|
|
9
|
+
import { readdirSync } from 'fs'
|
|
10
|
+
import { dirname, join, resolve } from 'path'
|
|
11
|
+
import { fileURLToPath } from 'url'
|
|
12
|
+
|
|
13
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
14
|
+
|
|
15
|
+
const BUILTIN_THEMES = ['dark', 'light', 'shadcn']
|
|
16
|
+
const DEFAULT_THEME = 'dark'
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Returns the absolute path to a theme CSS file.
|
|
20
|
+
* Accepts a bare name ("dark") or a path to a custom CSS file.
|
|
21
|
+
*/
|
|
22
|
+
export function resolveTheme(theme) {
|
|
23
|
+
if (!theme) return resolve(__dirname, `${DEFAULT_THEME}.css`)
|
|
24
|
+
|
|
25
|
+
// Absolute or relative path — treat as custom theme
|
|
26
|
+
if (theme.endsWith('.css')) return resolve(theme)
|
|
27
|
+
|
|
28
|
+
// Built-in theme name
|
|
29
|
+
const file = resolve(__dirname, `${theme}.css`)
|
|
30
|
+
return file
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Lists all built-in theme names (filenames without extension).
|
|
35
|
+
* Future community themes just need to be dropped into this directory.
|
|
36
|
+
*/
|
|
37
|
+
export function getAvailableThemes() {
|
|
38
|
+
try {
|
|
39
|
+
return readdirSync(__dirname)
|
|
40
|
+
.filter((f) => f.endsWith('.css'))
|
|
41
|
+
.map((f) => f.replace(/\.css$/, ''))
|
|
42
|
+
} catch {
|
|
43
|
+
return [...BUILTIN_THEMES]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { DEFAULT_THEME, BUILTIN_THEMES }
|
package/vite.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vite plugin for deck-engine projects.
|
|
3
|
+
*
|
|
4
|
+
* The main entry (@deckio/deck-engine) is pre-bundled by Vite
|
|
5
|
+
* into a single module so SlideContext, SlideProvider, useSlides, Slide,
|
|
6
|
+
* Navigation, and BottomBar all share one React context instance.
|
|
7
|
+
*
|
|
8
|
+
* Sub-path exports (e.g. slides/GenericThankYouSlide) are served as raw
|
|
9
|
+
* source and import from the package name (not relative paths) so they
|
|
10
|
+
* also resolve to the pre-bundled context singleton.
|
|
11
|
+
*
|
|
12
|
+
* The plugin also integrates Tailwind CSS v4 via @tailwindcss/vite
|
|
13
|
+
* and injects the selected theme CSS from deck.config.js.
|
|
14
|
+
*/
|
|
15
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
16
|
+
import { resolveTheme, getAvailableThemes, DEFAULT_THEME, BUILTIN_THEMES } from './themes/theme-loader.js'
|
|
17
|
+
|
|
18
|
+
// Re-export theme utilities for Node.js consumers
|
|
19
|
+
export { resolveTheme, getAvailableThemes, DEFAULT_THEME, BUILTIN_THEMES }
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @param {object} [options]
|
|
23
|
+
* @param {string} [options.theme] - Theme name or path. Defaults to "dark".
|
|
24
|
+
*/
|
|
25
|
+
export function deckPlugin(options = {}) {
|
|
26
|
+
const themePath = resolveTheme(options.theme)
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
name: 'deck-engine',
|
|
30
|
+
enforce: 'pre',
|
|
31
|
+
config() {
|
|
32
|
+
return {
|
|
33
|
+
resolve: {
|
|
34
|
+
dedupe: ['react', 'react-dom'],
|
|
35
|
+
},
|
|
36
|
+
// Tailwind CSS v4 is added via the companion tailwindPlugin()
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Returns an array of Vite plugins for a deck-engine project:
|
|
44
|
+
* - deckPlugin (react dedup + theme injection)
|
|
45
|
+
* - @tailwindcss/vite plugins (Tailwind CSS v4 processing)
|
|
46
|
+
*
|
|
47
|
+
* Use this in vite.config.js when you want the full setup in one call.
|
|
48
|
+
*
|
|
49
|
+
* @param {object} [options]
|
|
50
|
+
* @param {string} [options.theme] - Theme name or path.
|
|
51
|
+
*/
|
|
52
|
+
export function deckPlugins(options = {}) {
|
|
53
|
+
return [
|
|
54
|
+
deckPlugin(options),
|
|
55
|
+
...tailwindcss(),
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Returns the @tailwindcss/vite plugin for projects that want
|
|
61
|
+
* to compose their own plugin array.
|
|
62
|
+
*/
|
|
63
|
+
export function tailwindPlugin() {
|
|
64
|
+
return tailwindcss()
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export default deckPlugin
|