@ztffn/presentation-generator-plugin 1.0.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,130 @@
1
+ # Node Schema Reference
2
+
3
+ Authoritative reference for the `SlideNodeData` interface.
4
+ Derived from `src/types/presentation.ts`. All fields, types, and defaults documented here.
5
+
6
+ ## Node Wrapper
7
+
8
+ Every node in the graph has this structure:
9
+
10
+ ```json
11
+ {
12
+ "id": "unique-slug",
13
+ "type": "huma",
14
+ "position": { "x": 0, "y": 0 },
15
+ "data": { /* SlideNodeData fields below */ },
16
+ "style": { "width": 180, "height": 70 },
17
+ "measured": { "width": 180, "height": 70 }
18
+ }
19
+ ```
20
+
21
+ - `id`: Kebab-case slug (e.g. `"cover"`, `"problem-detail"`, `"feat-3d"`)
22
+ - `type`: Always `"huma"` — the custom node type with directional handles
23
+ - `position`: `{ x, y }` in graph canvas coordinates (see `positioning.md`)
24
+ - `style.width`: Always `180`. `style.height`: Always `70`.
25
+ - `measured`: Must mirror `style` — `{ width: 180, height: 70 }`
26
+ - Optional: `style.backgroundColor` — hex string for node background in the graph editor (also applied as slide background)
27
+
28
+ ## SlideNodeData Fields
29
+
30
+ ### Content Fields
31
+
32
+ | Field | Type | Default | Description |
33
+ |---|---|---|---|
34
+ | `label` | `string?` | — | Slide title displayed in graph editor and as slide heading |
35
+ | `topic` | `string?` | — | Section badge on the slide (e.g. `"01 / Problem"`, `"Solution"`) |
36
+ | `content` | `string?` | — | Markdown body. Supports headings, bullets, bold, code, tables, `[chart:name]` embeds, `![](url)` images/videos, `[text](#nodeId)` navigation links |
37
+ | `notes` | `string?` | — | Speaker notes, shown only in the presenter panel |
38
+
39
+ ### Slide Type
40
+
41
+ | Field | Type | Default | Description |
42
+ |---|---|---|---|
43
+ | `type` | `"content" \| "r3f" \| "chart" \| "custom"` | `"content"` | Slide renderer. `"content"` for standard text, `"r3f"` for 3D scene, `"chart"` for full-viewport chart |
44
+
45
+ ### Layout & Display
46
+
47
+ | Field | Type | Default | Description |
48
+ |---|---|---|---|
49
+ | `centered` | `boolean?` | `true` | Center content vertically and horizontally |
50
+ | `layout` | `"single" \| "two-column"` | `"single"` | Content layout. `"two-column"` splits on `---` delimiter in content |
51
+ | `lightText` | `boolean?` | `false` | Force white text for dark backgrounds |
52
+ | `brandFont` | `boolean?` | `false` | Use HumaDisplay display font for the title |
53
+ | `showBranding` | `boolean?` | `true` | Show branding overlay |
54
+ | `brandingText` | `string?` | — | Bottom-left branding label (e.g. `"huma.energy"`) |
55
+
56
+ ### Background Media
57
+
58
+ | Field | Type | Default | Description |
59
+ |---|---|---|---|
60
+ | `backgroundImage` | `string?` | — | URL to background image |
61
+ | `backgroundImageFit` | `"cover" \| "contain"` | `"cover"` | How image fills the slide |
62
+ | `backgroundImageOverlay` | `boolean?` | `false` | Dark scrim over background image for text readability |
63
+ | `backgroundVideo` | `string?` | — | URL to background video |
64
+ | `backgroundVideoFit` | `"cover" \| "contain"` | `"cover"` | How video fills the slide |
65
+ | `backgroundVideoLoop` | `boolean?` | `true` | Loop background video |
66
+
67
+ ### Inline Video
68
+
69
+ | Field | Type | Default | Description |
70
+ |---|---|---|---|
71
+ | `inlineVideoControls` | `boolean?` | `true` | Show controls on inline videos in `content` |
72
+ | `inlineVideoAutoplay` | `boolean?` | `true` | Autoplay inline videos |
73
+ | `inlineVideoLoop` | `boolean?` | `true` | Loop inline videos |
74
+
75
+ ### R3F Scene (when `type: "r3f"`)
76
+
77
+ | Field | Type | Default | Description |
78
+ |---|---|---|---|
79
+ | `scene.component` | `string` | — | Registry key (e.g. `"rotating-cube"`, `"particle-field"`) |
80
+ | `scene.props` | `Record<string, unknown>?` | — | Props passed to the scene component |
81
+ | `scene.controls` | `boolean?` | — | Enable OrbitControls for user interaction |
82
+ | `scene.background` | `string?` | — | Scene background hex color |
83
+
84
+ ### Charts
85
+
86
+ **Full-viewport chart** (when `type: "chart"`):
87
+
88
+ | Field | Type | Default | Description |
89
+ |---|---|---|---|
90
+ | `chart.chartType` | `"bar" \| "line" \| "area" \| "pie" \| "radar"` | — | Chart renderer |
91
+ | `chart.data` | `Array<Record<string, unknown>>` | — | Data array |
92
+ | `chart.config.xKey` | `string?` | — | X-axis data key |
93
+ | `chart.config.yKeys` | `string[]?` | — | Y-axis data keys |
94
+ | `chart.config.colors` | `string[]?` | — | Series colors |
95
+ | `chart.config.showGrid` | `boolean?` | — | Show grid lines |
96
+ | `chart.config.showLegend` | `boolean?` | — | Show legend |
97
+
98
+ **Inline charts** (referenced via `[chart:name]` in content):
99
+
100
+ | Field | Type | Default | Description |
101
+ |---|---|---|---|
102
+ | `charts` | `Record<string, ChartConfig>` | — | Named chart configurations. Key is referenced in content as `[chart:keyname]` |
103
+
104
+ Each `ChartConfig` has the same shape as `chart` above.
105
+
106
+ ## Available R3F Scene Components
107
+
108
+ | Registry Key | Description |
109
+ |---|---|
110
+ | `rotating-cube` | Interactive rotating cube with OrbitControls |
111
+ | `particle-field` | Animated particle cloud background |
112
+
113
+ ## Content Markdown Features
114
+
115
+ The `content` field supports:
116
+
117
+ - `## Heading` — headings (ATX style only, no setext)
118
+ - `- bullet` or `* bullet` — unordered lists
119
+ - `1. item` — ordered lists
120
+ - `` ```language ``` `` — syntax-highlighted code blocks
121
+ - `> blockquote` — styled blockquotes
122
+ - `**bold**` and `*italic*` — inline formatting
123
+ - `| col | col |` — GFM tables
124
+ - `![alt](url)` — images; `.mp4/.webm/.mov` URLs render as inline video
125
+ - `[text](url)` — external links (open in new tab)
126
+ - `[text](#nodeId)` — navigation links to other slides
127
+ - `[chart:name]` — inline chart embed (must be on its own line)
128
+ - `---` — column delimiter when `layout: "two-column"`
129
+ - Single newline = visible line break (not collapsed)
130
+ - Multiple blank lines = visible vertical spacing
@@ -0,0 +1,84 @@
1
+ # Node Positioning
2
+
3
+ How to place nodes on the graph canvas for a clean, readable layout in the editor.
4
+ Position affects visual arrangement only — navigation is determined by edges.
5
+
6
+ ## Grid System
7
+
8
+ | Parameter | Value |
9
+ |---|---|
10
+ | Horizontal spacing | 240px |
11
+ | Vertical spacing | 150px |
12
+ | Node width | 180px (in `style` and `measured`) |
13
+ | Node height | 70px (in `style` and `measured`) |
14
+
15
+ ## Spine Row
16
+
17
+ All spine nodes sit at `y: 0`, starting at `x: 0`, incrementing by 240 per node.
18
+
19
+ ```
20
+ x: 0 240 480 720 960 1200
21
+ y: 0 [Cover] [Problem] [Solution] [Value] [Features] [CTA]
22
+ ```
23
+
24
+ ## Drill-Down Rows
25
+
26
+ Drill-down children are placed directly below their parent:
27
+
28
+ - First level: `y: 150`
29
+ - Second level: `y: 300`
30
+
31
+ The first child inherits the parent's `x` position. Additional siblings at the same depth increment `x` by 240.
32
+
33
+ ```
34
+ x: 240 480
35
+ y:0 [Problem] [Solution]
36
+ ↓ ↓
37
+ y:150 [Detail] [How It Works]
38
+
39
+ y:300 [Root Cause]
40
+ ```
41
+
42
+ ### Multiple Siblings in a Branch
43
+
44
+ When a spine node has multiple drill-down children at the same depth:
45
+
46
+ ```
47
+ x: 720 960
48
+ y:0 [Value]
49
+
50
+ y:150 [Case A] [Case B]
51
+ ```
52
+
53
+ - First child: same `x` as parent (720)
54
+ - Second child: parent `x` + 240 (960)
55
+ - Third child: parent `x` + 480 (1200)
56
+
57
+ ## Position Template
58
+
59
+ ```json
60
+ {
61
+ "position": { "x": 0, "y": 0 }
62
+ }
63
+ ```
64
+
65
+ Quick reference for a 5-node spine with one drill-down each:
66
+
67
+ | Node | x | y | Role |
68
+ |---|---|---|---|
69
+ | cover | 0 | 0 | Spine 1 |
70
+ | problem | 240 | 0 | Spine 2 |
71
+ | problem-detail | 240 | 150 | Drill-down under problem |
72
+ | solution | 480 | 0 | Spine 3 |
73
+ | solution-how | 480 | 150 | Drill-down under solution |
74
+ | value | 720 | 0 | Spine 4 |
75
+ | value-case | 720 | 150 | Drill-down under value |
76
+ | cta | 960 | 0 | Spine 5 |
77
+
78
+ ## Rules
79
+
80
+ 1. Position reflects visual layout in the editor — it has no effect on navigation
81
+ 2. Navigation is determined solely by edges and their handle assignments
82
+ 3. Spine nodes must be at `y: 0` for visual clarity
83
+ 4. Drill-downs must be below their parent for the folder-tree metaphor to hold
84
+ 5. No two nodes should overlap (maintain at least 240px horizontal, 150px vertical separation)