@deckio/deck-engine 0.2.0 → 0.2.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/instructions/deck-config.instructions.md +13 -5
- package/instructions/deck-project.instructions.md +17 -1
- package/instructions/slide-css.instructions.md +45 -71
- package/instructions/slide-jsx.instructions.md +38 -11
- package/package.json +2 -1
- package/skills/deck-add-slide/SKILL.md +72 -190
- package/skills/deck-generate-image/SKILL.md +28 -11
- package/skills/deck-inspect/SKILL.md +35 -12
- package/skills/deck-sketch/SKILL.md +22 -15
- package/skills/deck-validate-project/SKILL.md +88 -48
- package/themes/descriptors/dark.md +169 -0
- package/themes/descriptors/light.md +172 -0
- package/themes/descriptors/shadcn.md +194 -0
|
@@ -5,6 +5,13 @@ applyTo: "**/deck.config.js"
|
|
|
5
5
|
|
|
6
6
|
# deck.config.js Conventions
|
|
7
7
|
|
|
8
|
+
## First rule
|
|
9
|
+
|
|
10
|
+
`deck.config.js` is the source of truth for both:
|
|
11
|
+
|
|
12
|
+
- slide registration (`slides` array)
|
|
13
|
+
- design-system branching (`designSystem`)
|
|
14
|
+
|
|
8
15
|
## Structure
|
|
9
16
|
|
|
10
17
|
```js
|
|
@@ -12,17 +19,16 @@ import CoverSlide from './src/slides/CoverSlide.jsx'
|
|
|
12
19
|
import MySlide from './src/slides/MySlide.jsx'
|
|
13
20
|
|
|
14
21
|
export default {
|
|
15
|
-
id: 'my-project',
|
|
22
|
+
id: 'my-project',
|
|
16
23
|
title: 'Project Title',
|
|
17
24
|
subtitle: 'Tagline',
|
|
18
25
|
description: 'Metadata',
|
|
19
|
-
icon: '🚀',
|
|
20
|
-
accent: '#7c3aed',
|
|
21
|
-
order: 1,
|
|
26
|
+
icon: '🚀',
|
|
27
|
+
accent: '#7c3aed',
|
|
28
|
+
order: 1,
|
|
22
29
|
slides: [
|
|
23
30
|
CoverSlide,
|
|
24
31
|
MySlide,
|
|
25
|
-
// ThankYouSlide is typically last
|
|
26
32
|
],
|
|
27
33
|
}
|
|
28
34
|
```
|
|
@@ -32,3 +38,5 @@ export default {
|
|
|
32
38
|
1. Add an import at the top: `import NewSlide from './src/slides/NewSlide.jsx'`
|
|
33
39
|
2. Insert the component in the `slides` array at the desired position
|
|
34
40
|
3. Indices are assigned by array position — do not manage them manually
|
|
41
|
+
4. Registration is the same for both design systems
|
|
42
|
+
5. Do **not** change existing `theme`, `designSystem`, or `aurora` fields when you are only registering a slide
|
|
@@ -14,6 +14,21 @@ You are a **slide builder** for a presentation deck built with `@deckio/deck-eng
|
|
|
14
14
|
- Manage data files in `src/data/`
|
|
15
15
|
- Register / reorder slides in `deck.config.js`
|
|
16
16
|
|
|
17
|
+
## First step before editing slides
|
|
18
|
+
|
|
19
|
+
Read `deck.config.js` and check:
|
|
20
|
+
|
|
21
|
+
- `theme`
|
|
22
|
+
- `designSystem`
|
|
23
|
+
|
|
24
|
+
Then read the active theme descriptor:
|
|
25
|
+
|
|
26
|
+
- Built-in themes → `node_modules/@deckio/deck-engine/themes/descriptors/<theme>.md`
|
|
27
|
+
- Custom themes → `src/themes/<theme>/descriptor.md` or `src/themes/<theme>.descriptor.md`
|
|
28
|
+
- If a custom descriptor is missing, fall back to the built-in descriptor implied by `designSystem`
|
|
29
|
+
|
|
30
|
+
Use the descriptor as the source of truth for slide structure, CSS patterns, decorative language, component ecosystem, and anti-patterns.
|
|
31
|
+
|
|
17
32
|
## Out of scope — do NOT modify
|
|
18
33
|
|
|
19
34
|
- `App.jsx`, `main.jsx` — these are generic, engine-driven, identical across projects
|
|
@@ -22,10 +37,11 @@ You are a **slide builder** for a presentation deck built with `@deckio/deck-eng
|
|
|
22
37
|
|
|
23
38
|
## Project architecture
|
|
24
39
|
|
|
25
|
-
- `deck.config.js` — single source of truth: metadata + slide array
|
|
40
|
+
- `deck.config.js` — single source of truth: metadata + slide array + theme + design-system choice
|
|
26
41
|
- `src/slides/` — one `PascalCase.jsx` + matching `.module.css` per slide
|
|
27
42
|
- `src/data/` — ESM exports for logos, speakers, opportunity data, governance
|
|
28
43
|
- The engine (`@deckio/deck-engine`) provides: `Slide`, `BottomBar`, `Navigation`, `SlideProvider`, `useSlides`, `GenericThankYouSlide`
|
|
44
|
+
- The active theme descriptor provides the AI-facing slide-authoring rules
|
|
29
45
|
|
|
30
46
|
## Data conventions
|
|
31
47
|
|
|
@@ -1,96 +1,70 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Use when creating or editing slide CSS modules in a deck project. Enforces required properties,
|
|
2
|
+
description: "Use when creating or editing slide CSS modules in a deck project. Enforces required properties, layout rules, and theme-appropriate variables."
|
|
3
3
|
applyTo: "**/slides/**/*.module.css"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Slide CSS Module Conventions
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Step 0 — Read `deck.config.js` and the active descriptor
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
.mySlide {
|
|
12
|
-
background: var(--bg-deep);
|
|
13
|
-
padding: 0 0 44px 0; /* reserve BottomBar height */
|
|
14
|
-
}
|
|
15
|
-
```
|
|
10
|
+
Before writing any slide CSS:
|
|
16
11
|
|
|
17
|
-
|
|
12
|
+
1. Read `theme` and `designSystem` from `deck.config.js`
|
|
13
|
+
2. Resolve the active theme descriptor
|
|
14
|
+
3. Use that descriptor as the source of truth for CSS skeleton, token names, decorative rules, and anti-patterns
|
|
15
|
+
|
|
16
|
+
### Descriptor resolution
|
|
17
|
+
|
|
18
|
+
- Built-in themes: read `dark.md`, `light.md`, or `shadcn.md` from `node_modules/@deckio/deck-engine/themes/descriptors/`
|
|
19
|
+
- Custom themes: read `src/themes/<theme>/descriptor.md` or `src/themes/<theme>.descriptor.md`
|
|
20
|
+
- If the custom descriptor is missing, fall back to the built-in descriptor implied by `designSystem`
|
|
21
|
+
|
|
22
|
+
## What to read in the descriptor
|
|
23
|
+
|
|
24
|
+
Before generating CSS, read:
|
|
25
|
+
|
|
26
|
+
- **Exact CSS skeleton**
|
|
27
|
+
- **Token table**
|
|
28
|
+
- **Decorative elements available**
|
|
29
|
+
- **Anti-patterns**
|
|
30
|
+
|
|
31
|
+
If the descriptor gives an exact skeleton, start there and adapt only as needed for content.
|
|
32
|
+
|
|
33
|
+
## Engine `.slide` class (all themes)
|
|
34
|
+
|
|
35
|
+
The engine's `.slide` class already sets `flex-direction: column`, `justify-content: center`, and `overflow: hidden`. The engine also sets `flex-grow: 0` on all direct slide children, so content stays at its natural height and is vertically centered by default. No scrolling is allowed.
|
|
18
36
|
|
|
19
37
|
For dense slides that need top-alignment, override with `justify-content: flex-start`.
|
|
20
38
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```css
|
|
24
|
-
.orb1 {
|
|
25
|
-
width: 420px; height: 420px;
|
|
26
|
-
top: -100px; right: -60px;
|
|
27
|
-
background: radial-gradient(circle at 40% 40%, var(--accent), var(--blue-glow) 50%, transparent 70%);
|
|
28
|
-
}
|
|
29
|
-
.orb2 {
|
|
30
|
-
width: 320px; height: 320px;
|
|
31
|
-
bottom: -40px; right: 100px;
|
|
32
|
-
background: radial-gradient(circle at 50% 50%, var(--purple-deep), rgba(110,64,201,0.25) 60%, transparent 75%);
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Body wrapper
|
|
37
|
-
|
|
38
|
-
```css
|
|
39
|
-
.body {
|
|
40
|
-
position: relative;
|
|
41
|
-
z-index: 10;
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-direction: column;
|
|
44
|
-
gap: 24px;
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
> **Do NOT add `flex: 1` or `flex-grow: 1`** to the body wrapper or any direct slide child — it stretches the wrapper to fill the slide and defeats the engine's built-in vertical centering. The engine sets `flex-grow: 0` on all direct slide children to ensure content builds from the center outward. Inner elements within the body wrapper should also avoid `flex: 1` unless they genuinely need to fill remaining space within the body.
|
|
49
|
-
|
|
50
|
-
## Theme variables (always use these, never hard-code colors)
|
|
51
|
-
|
|
52
|
-
| Variable | Value |
|
|
53
|
-
|----------|-------|
|
|
54
|
-
| `--bg-deep` | `#080b10` |
|
|
55
|
-
| `--surface` | `#161b22` |
|
|
56
|
-
| `--border` | `#30363d` |
|
|
57
|
-
| `--text` | `#e6edf3` |
|
|
58
|
-
| `--text-muted` | `#8b949e` |
|
|
59
|
-
| `--accent` | project-specific |
|
|
60
|
-
| `--blue-glow` | `#1f6feb` |
|
|
61
|
-
| `--purple` | `#bc8cff` |
|
|
62
|
-
| `--purple-deep` | `#6e40c9` |
|
|
63
|
-
| `--pink` | `#f778ba` |
|
|
64
|
-
| `--cyan` | `#56d4dd` |
|
|
65
|
-
| `--green` | `#3fb950` |
|
|
66
|
-
| `--orange` | `#d29922` |
|
|
39
|
+
> **Do NOT add `flex: 1` or `flex-grow: 1`** to the body wrapper or any direct slide child.
|
|
67
40
|
|
|
68
41
|
## Global classes (no import needed)
|
|
69
42
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
## Card pattern
|
|
43
|
+
Some global classes are shared across all themes and some are descriptor-specific. Always defer to the active descriptor for which of these are actually allowed:
|
|
73
44
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
```
|
|
45
|
+
| Class | Purpose |
|
|
46
|
+
|-------|---------|
|
|
47
|
+
| `content-frame` | Width constraint to `1280px`, centered |
|
|
48
|
+
| `content-gutter` | `72px` left/right padding |
|
|
49
|
+
| `accent-bar` | Default DECKIO descriptor only |
|
|
50
|
+
| `orb` | Default DECKIO descriptor only |
|
|
51
|
+
| `grid-dots` | Default DECKIO descriptor only |
|
|
82
52
|
|
|
83
53
|
## Typography
|
|
84
54
|
|
|
55
|
+
Use the descriptor's scale first. If the descriptor does not specify a detail, default to:
|
|
56
|
+
|
|
85
57
|
| Element | Size | Weight | Spacing |
|
|
86
58
|
|---------|------|--------|---------|
|
|
87
|
-
| h1 | `clamp(42px, 5vw, 72px)` | 900 | `-2px` |
|
|
59
|
+
| h1 | `clamp(42px, 5vw, 72px)` | 800–900 | `-2px` |
|
|
88
60
|
| h2 | `clamp(28px, 3.2vw, 36px)` | 700 | `-0.8px` |
|
|
89
|
-
| h3 | `16px–20px` | 700 | `-0.3px` |
|
|
90
|
-
| Subtitle | `
|
|
61
|
+
| h3 | `16px–20px` | 600–700 | `-0.3px` |
|
|
62
|
+
| Subtitle | `16px–19px` | 300–400 | — |
|
|
91
63
|
| Body | `13px–14px` | 400 | — |
|
|
92
|
-
|
|
|
64
|
+
| Label | `10px–13px` | 500–700 | `1.5px` to `3px` |
|
|
65
|
+
|
|
66
|
+
Text colors should usually come from `var(--foreground)` and `var(--muted-foreground)` unless the descriptor says otherwise.
|
|
93
67
|
|
|
94
68
|
## Content density limits
|
|
95
69
|
|
|
96
|
-
Slides must never overflow the viewport. The engine shows a
|
|
70
|
+
Slides must never overflow the viewport. The engine shows a red dashed border warning in dev mode when content exceeds the slide bounds. When content doesn't fit, split across multiple slides rather than cramming.
|
|
@@ -5,30 +5,57 @@ applyTo: "**/slides/**/*.jsx"
|
|
|
5
5
|
|
|
6
6
|
# Slide JSX Conventions
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Step 0 — Read `deck.config.js` and the active descriptor
|
|
9
|
+
|
|
10
|
+
Before writing any slide JSX:
|
|
11
|
+
|
|
12
|
+
1. Read `theme` and `designSystem` from `deck.config.js`
|
|
13
|
+
2. Resolve the active theme descriptor
|
|
14
|
+
3. Use that descriptor as the source of truth for slide structure, imports, allowed components, and anti-patterns
|
|
15
|
+
|
|
16
|
+
### Descriptor resolution
|
|
17
|
+
|
|
18
|
+
- Built-in themes: read `dark.md`, `light.md`, or `shadcn.md` from `node_modules/@deckio/deck-engine/themes/descriptors/`
|
|
19
|
+
- Custom themes: read `src/themes/<theme>/descriptor.md` or `src/themes/<theme>.descriptor.md`
|
|
20
|
+
- If the custom descriptor is missing, fall back to the built-in descriptor implied by `designSystem`
|
|
21
|
+
|
|
22
|
+
## Common imports
|
|
9
23
|
|
|
10
24
|
```jsx
|
|
11
25
|
import { BottomBar, Slide } from '@deckio/deck-engine'
|
|
12
26
|
import styles from './MySlide.module.css'
|
|
13
27
|
```
|
|
14
28
|
|
|
15
|
-
##
|
|
29
|
+
## What to read in the descriptor
|
|
16
30
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
31
|
+
Before generating JSX, read:
|
|
32
|
+
|
|
33
|
+
- **Exact JSX skeleton**
|
|
34
|
+
- **Decorative elements available**
|
|
35
|
+
- **Available components**
|
|
36
|
+
- **Anti-patterns**
|
|
37
|
+
|
|
38
|
+
If the descriptor gives an exact skeleton, start there and fill in real content. Do not mix descriptor families.
|
|
21
39
|
|
|
22
40
|
## Props
|
|
23
41
|
|
|
24
|
-
Every slide receives `{ index, project
|
|
42
|
+
Every slide receives `{ index, project }`. Pass `index` to `<Slide>`.
|
|
43
|
+
|
|
44
|
+
## Registration
|
|
25
45
|
|
|
26
|
-
|
|
46
|
+
After creating the slide component, register it in `deck.config.js`:
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
import MySlide from './src/slides/MySlide.jsx'
|
|
50
|
+
```
|
|
27
51
|
|
|
28
|
-
|
|
52
|
+
Then add `MySlide` to the `slides` array.
|
|
29
53
|
|
|
30
|
-
##
|
|
54
|
+
## Hard rules
|
|
31
55
|
|
|
32
|
-
- Never omit `
|
|
56
|
+
- Never omit `content-frame content-gutter`
|
|
57
|
+
- Never omit `BottomBar`
|
|
33
58
|
- Never use string paths for images — always `import logo from '../data/...'`
|
|
34
59
|
- Never hardcode slide indices — use `useSlides().goTo()` for navigation
|
|
60
|
+
- Never violate the active descriptor's anti-patterns
|
|
61
|
+
- If `designSystem` and the descriptor disagree, follow `designSystem` for structure and report the mismatch
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deckio/deck-engine",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"./components/*": "./components/*.jsx",
|
|
20
20
|
"./styles/*": "./styles/*",
|
|
21
21
|
"./themes/*": "./themes/*",
|
|
22
|
+
"./themes/descriptors/*": "./themes/descriptors/*",
|
|
22
23
|
"./themes/theme-loader": "./themes/theme-loader.js",
|
|
23
24
|
"./vite": "./vite.js",
|
|
24
25
|
"./vite.js": "./vite.js"
|
|
@@ -5,194 +5,89 @@ description: Guide for adding a new slide to a deck project. Use this when asked
|
|
|
5
5
|
|
|
6
6
|
# Adding a Slide to a Deck Project
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Step 0 — Read `deck.config.js`
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Before writing any JSX or CSS:
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
1. Open `deck.config.js`.
|
|
13
|
+
2. Read both `theme` and `designSystem`.
|
|
14
|
+
3. Resolve the active theme descriptor.
|
|
15
|
+
4. Follow that descriptor exactly for slide structure, CSS, tokens, decorative elements, allowed components, and anti-patterns.
|
|
16
|
+
5. Do **not** mix patterns from multiple descriptors.
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<Slide index={index} className={styles.myNewSlide}>
|
|
19
|
-
{/* 1. Decorative elements — always first */}
|
|
20
|
-
<div className="accent-bar" />
|
|
21
|
-
<div className={`orb ${styles.orb1}`} />
|
|
22
|
-
<div className={`orb ${styles.orb2}`} />
|
|
18
|
+
## Step 1 — Resolve the active theme descriptor
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
<div className={`${styles.body} content-frame content-gutter`}>
|
|
26
|
-
{/* Slide content */}
|
|
27
|
-
</div>
|
|
20
|
+
### Built-in themes
|
|
28
21
|
|
|
29
|
-
|
|
30
|
-
<BottomBar text="Project Footer Text" />
|
|
31
|
-
</Slide>
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
```
|
|
22
|
+
Read the matching built-in descriptor from the engine package:
|
|
35
23
|
|
|
36
|
-
|
|
24
|
+
| Theme | Monorepo path | Generated deck path |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `dark` | `packages/deck-engine/themes/descriptors/dark.md` | `node_modules/@deckio/deck-engine/themes/descriptors/dark.md` |
|
|
27
|
+
| `light` | `packages/deck-engine/themes/descriptors/light.md` | `node_modules/@deckio/deck-engine/themes/descriptors/light.md` |
|
|
28
|
+
| `shadcn` | `packages/deck-engine/themes/descriptors/shadcn.md` | `node_modules/@deckio/deck-engine/themes/descriptors/shadcn.md` |
|
|
37
29
|
|
|
38
|
-
|
|
39
|
-
2. **Orbs** — 2–4 `<div className={\`orb ${styles.orbN}\`} />` for ambient background glow.
|
|
40
|
-
3. **Content wrapper** — `<div className="content-frame content-gutter">` constrains width to `1280px` and adds `72px` horizontal padding. **All visible content goes inside this wrapper.**
|
|
41
|
-
4. **`<BottomBar text="..." />`** — Sticky footer, always the last child. The `text` must match the project's convention (check existing slides).
|
|
30
|
+
### Custom or on-demand themes
|
|
42
31
|
|
|
43
|
-
|
|
32
|
+
If `theme` is not one of the built-ins, look for a custom descriptor in this order:
|
|
44
33
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
1. `src/themes/<theme>/descriptor.md`
|
|
35
|
+
2. `src/themes/<theme>.descriptor.md`
|
|
36
|
+
3. If `theme` is a CSS path such as `./src/themes/client-a.css`, look for:
|
|
37
|
+
- `./src/themes/client-a/descriptor.md`
|
|
38
|
+
- `./src/themes/client-a.descriptor.md`
|
|
50
39
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## B. CSS Module Rules
|
|
54
|
-
|
|
55
|
-
Create a companion `.module.css` file matching the JSX filename (e.g., `MyNewSlide.module.css`).
|
|
56
|
-
|
|
57
|
-
### Required root class properties
|
|
58
|
-
|
|
59
|
-
```css
|
|
60
|
-
.myNewSlide {
|
|
61
|
-
background: var(--bg-deep);
|
|
62
|
-
padding: 0 0 44px 0;
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
- `background: var(--bg-deep)` — dark background on every slide
|
|
67
|
-
- `padding: 0 0 44px 0` — reserves space for the 44px BottomBar
|
|
68
|
-
|
|
69
|
-
The engine's `.slide` class provides `flex-direction: column`, `justify-content: center`, `align-items: stretch`, and `overflow: hidden` by default. It also sets `flex-grow: 0` on all direct slide children, so **content stays at its natural height and is vertically centered by default** — building from the center outward. No scrolling is allowed.
|
|
70
|
-
|
|
71
|
-
For dense slides that need top-alignment, override with `justify-content: flex-start`.
|
|
72
|
-
|
|
73
|
-
### Orb positioning (standard recipe)
|
|
74
|
-
|
|
75
|
-
```css
|
|
76
|
-
.orb1 {
|
|
77
|
-
width: 420px; height: 420px;
|
|
78
|
-
top: -100px; right: -60px;
|
|
79
|
-
background: radial-gradient(circle at 40% 40%, var(--accent), var(--blue-glow) 50%, transparent 70%);
|
|
80
|
-
}
|
|
81
|
-
.orb2 {
|
|
82
|
-
width: 320px; height: 320px;
|
|
83
|
-
bottom: -40px; right: 100px;
|
|
84
|
-
background: radial-gradient(circle at 50% 50%, var(--purple-deep), rgba(110,64,201,0.25) 60%, transparent 75%);
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Body wrapper
|
|
89
|
-
|
|
90
|
-
```css
|
|
91
|
-
.body {
|
|
92
|
-
position: relative;
|
|
93
|
-
z-index: 10;
|
|
94
|
-
display: flex;
|
|
95
|
-
flex-direction: column;
|
|
96
|
-
gap: 24px;
|
|
97
|
-
}
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
> **Do NOT add `flex: 1` or `flex-grow: 1`** to the body wrapper or any direct slide child — it stretches the wrapper to fill the slide and defeats the engine's built-in vertical centering. Inner elements within the body should also avoid `flex: 1` unless they genuinely need to fill remaining space within the body.
|
|
40
|
+
If no custom descriptor exists, fall back to the built-in descriptor that matches `designSystem`:
|
|
101
41
|
|
|
102
|
-
|
|
42
|
+
- `designSystem === 'shadcn'` → use the `shadcn` descriptor
|
|
43
|
+
- any other value or no `designSystem` → use the `dark` descriptor as the default DECKIO fallback
|
|
103
44
|
|
|
104
|
-
|
|
105
|
-
--bg-deep: #080b10 --surface: #161b22 --border: #30363d
|
|
106
|
-
--text: #e6edf3 --text-muted: #8b949e --accent: #58a6ff
|
|
107
|
-
--blue-glow: #1f6feb --purple: #bc8cff --purple-deep: #6e40c9
|
|
108
|
-
--pink: #f778ba --cyan: #56d4dd --green: #3fb950
|
|
109
|
-
--orange: #d29922
|
|
110
|
-
```
|
|
45
|
+
## Step 2 — Cross-check `designSystem`
|
|
111
46
|
|
|
112
|
-
|
|
47
|
+
`designSystem` remains the safety check for structure:
|
|
113
48
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
| `accent-bar` | Left gradient accent bar |
|
|
117
|
-
| `orb` | Base decorative orb (absolute, rounded, blur, opacity) |
|
|
118
|
-
| `grid-dots` | Dot grid pattern (200×200px) |
|
|
119
|
-
| `content-frame` | Width constraint to `1280px`, centered |
|
|
120
|
-
| `content-gutter` | `72px` left/right padding |
|
|
49
|
+
- `designSystem === 'shadcn'` → the slide must obey shadcn structure and anti-patterns
|
|
50
|
+
- any other value or missing field → the slide must obey the default DECKIO structure and anti-patterns
|
|
121
51
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
## C. Typography Conventions
|
|
52
|
+
If the descriptor and `designSystem` disagree, follow `designSystem` for structure and call out the mismatch in your response so the project owner can fix the configuration.
|
|
125
53
|
|
|
126
|
-
|
|
127
|
-
|---|---|---|---|---|
|
|
128
|
-
| `h1` | `clamp(42px, 5vw, 72px)` | 900 | `-2px` | Cover slides only |
|
|
129
|
-
| `h2` | `clamp(28px, 3.2vw, 36px)` | 700 | `-0.8px` | Main slide heading |
|
|
130
|
-
| `h3` | `16px–20px` | 700 | `-0.3px` | Card titles |
|
|
131
|
-
| Subtitle | `17px` | 300–400 | — | `color: var(--text-muted)`, below heading |
|
|
132
|
-
| Body text | `13px–14px` | 400 | — | `color: var(--text-muted)` |
|
|
133
|
-
| Badge/label | `10px–11px` | 600–700 | `1.5px` | Uppercase, rounded bg |
|
|
54
|
+
## Step 3 — Create the slide from the descriptor
|
|
134
55
|
|
|
135
|
-
|
|
56
|
+
The descriptor is the source of truth. Read these sections before generating code:
|
|
136
57
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
.
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
### Standard card
|
|
145
|
-
```css
|
|
146
|
-
.card {
|
|
147
|
-
background: var(--surface);
|
|
148
|
-
border: 1px solid var(--border);
|
|
149
|
-
border-radius: 16px;
|
|
150
|
-
padding: 24px;
|
|
151
|
-
overflow: hidden;
|
|
152
|
-
transition: transform 0.3s ease, border-color 0.3s ease;
|
|
153
|
-
}
|
|
154
|
-
.card::before {
|
|
155
|
-
content: '';
|
|
156
|
-
position: absolute;
|
|
157
|
-
top: 0; left: 0; right: 0; height: 3px;
|
|
158
|
-
background: linear-gradient(90deg, var(--purple), var(--accent));
|
|
159
|
-
opacity: 0.6;
|
|
160
|
-
}
|
|
161
|
-
```
|
|
58
|
+
1. **Exact JSX skeleton**
|
|
59
|
+
2. **Exact CSS skeleton**
|
|
60
|
+
3. **Token table**
|
|
61
|
+
4. **Decorative elements available**
|
|
62
|
+
5. **Available components**
|
|
63
|
+
6. **Anti-patterns**
|
|
64
|
+
7. **Example slide direction**
|
|
162
65
|
|
|
163
|
-
|
|
66
|
+
Do not paraphrase the structure if the descriptor gives an exact skeleton. Start from it, then fill in real content.
|
|
164
67
|
|
|
165
|
-
##
|
|
68
|
+
## Step 4 — Registration in `deck.config.js`
|
|
166
69
|
|
|
167
|
-
After creating the slide files
|
|
70
|
+
After creating the slide files:
|
|
168
71
|
|
|
169
|
-
1.
|
|
170
|
-
2.
|
|
72
|
+
1. Add an import at the top: `import MyNewSlide from './src/slides/MyNewSlide.jsx'`
|
|
73
|
+
2. Add the component to the `slides` array at the desired position.
|
|
74
|
+
3. Do **not** change `theme`, `designSystem`, or `aurora` while registering the slide.
|
|
171
75
|
|
|
172
|
-
The generic `App.jsx` renders slides from this array
|
|
76
|
+
The generic `App.jsx` renders slides from this array and passes `index` automatically. You do **not** manage slide indices manually.
|
|
173
77
|
|
|
174
|
-
|
|
78
|
+
## Step 5 — Common limits and guardrails
|
|
175
79
|
|
|
176
|
-
|
|
177
|
-
import MyNewSlide from './src/slides/MyNewSlide.jsx'
|
|
178
|
-
// ... other imports
|
|
179
|
-
|
|
180
|
-
export default {
|
|
181
|
-
// ... metadata
|
|
182
|
-
slides: [
|
|
183
|
-
CoverSlide,
|
|
184
|
-
// ... existing slides
|
|
185
|
-
MyNewSlide, // ← insert here
|
|
186
|
-
ThankYouSlide, // stays last
|
|
187
|
-
],
|
|
188
|
-
}
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
---
|
|
80
|
+
These apply regardless of theme:
|
|
192
81
|
|
|
193
|
-
|
|
82
|
+
- Always include `content-frame content-gutter`
|
|
83
|
+
- Always include `BottomBar` as the last child inside `<Slide>`
|
|
84
|
+
- Always use ESM imports for images and logos
|
|
85
|
+
- Never use string paths for images
|
|
86
|
+
- Never use `flex: 1` on the body wrapper
|
|
87
|
+
- Never add `flex-direction: column` on the slide root
|
|
88
|
+
- Never overload a slide until it overflows the viewport
|
|
194
89
|
|
|
195
|
-
|
|
90
|
+
### Content density limits
|
|
196
91
|
|
|
197
92
|
| Layout | Max items | Notes |
|
|
198
93
|
|--------|-----------|-------|
|
|
@@ -200,37 +95,24 @@ Slides must never overflow the viewport. The engine shows a **red dashed border
|
|
|
200
95
|
| Cards (2-col grid) | 4 (2 rows) | Preferred for detailed cards |
|
|
201
96
|
| Timeline / event list | 3–4 items | Use compact card height for 4 |
|
|
202
97
|
| Bullet points | 6–8 | Depends on line length |
|
|
203
|
-
| Full-width content blocks | 2–3 |
|
|
98
|
+
| Full-width content blocks | 2–3 | Split across slides if it gets tight |
|
|
204
99
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
## G. Anti-Patterns to Avoid
|
|
210
|
-
|
|
211
|
-
1. **Missing `accent-bar`** — include on every slide.
|
|
212
|
-
2. **Missing `content-frame content-gutter`** — content will be full-width without standard margins.
|
|
213
|
-
3. **Missing `BottomBar`** — every slide needs it as the last child.
|
|
214
|
-
4. **String paths for images** — always use `import logo from '../data/...'` (Vite resolves to URL).
|
|
215
|
-
5. **Missing `padding: 0 0 44px 0`** on the slide root CSS class — content will overlap the BottomBar.
|
|
216
|
-
6. **Inconsistent `BottomBar text`** — check existing slides and match their footer text.
|
|
217
|
-
7. **Using `flex: 1` on body wrapper** — defeats vertical centering; the body should size to its content.
|
|
218
|
-
8. **Adding `flex-direction: column` on slide root** — already provided by the engine's `.slide` class.
|
|
219
|
-
9. **Overloading a slide** — if the dev server shows a red dashed border, the slide has too much content. Split into multiple slides.
|
|
220
|
-
|
|
221
|
-
---
|
|
100
|
+
## Step 6 — Verify
|
|
222
101
|
|
|
223
|
-
|
|
102
|
+
After writing the slide:
|
|
224
103
|
|
|
225
|
-
1.
|
|
226
|
-
2.
|
|
227
|
-
3.
|
|
228
|
-
4. **Verify** — the dev server hot-reloads automatically. Navigate to the new slide and check layout.
|
|
104
|
+
1. Re-read the descriptor and confirm the slide still matches it.
|
|
105
|
+
2. Run the project validation flow.
|
|
106
|
+
3. Visually inspect the slide in the deck.
|
|
229
107
|
|
|
230
|
-
|
|
108
|
+
## Quick checklist
|
|
231
109
|
|
|
232
|
-
- [ ]
|
|
233
|
-
- [ ]
|
|
234
|
-
- [ ]
|
|
235
|
-
- [ ]
|
|
236
|
-
- [ ]
|
|
110
|
+
- [ ] Read `theme` and `designSystem` from `deck.config.js`
|
|
111
|
+
- [ ] Read the active theme descriptor before writing code
|
|
112
|
+
- [ ] Used the descriptor's exact JSX skeleton or direct variant of it
|
|
113
|
+
- [ ] Used the descriptor's exact CSS skeleton or direct variant of it
|
|
114
|
+
- [ ] Stayed inside the descriptor's token set and component ecosystem
|
|
115
|
+
- [ ] Avoided the descriptor's anti-patterns
|
|
116
|
+
- [ ] Added the import to `deck.config.js`
|
|
117
|
+
- [ ] Added the slide to the `slides` array
|
|
118
|
+
- [ ] Left `theme`, `designSystem`, and `aurora` unchanged
|