@aivorynet/slaide 1.0.4 → 1.2.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +38 -1
  2. package/dist/compiler/chrome.d.ts +5 -1
  3. package/dist/compiler/chrome.js +51 -5
  4. package/dist/compiler/chrome.js.map +1 -1
  5. package/dist/compiler/compile.d.ts +7 -1
  6. package/dist/compiler/compile.js +94 -6
  7. package/dist/compiler/compile.js.map +1 -1
  8. package/dist/compiler/markdown.js +24 -4
  9. package/dist/compiler/markdown.js.map +1 -1
  10. package/dist/compiler/unknown-vars.d.ts +16 -0
  11. package/dist/compiler/unknown-vars.js +134 -0
  12. package/dist/compiler/unknown-vars.js.map +1 -0
  13. package/dist/container.js +9 -0
  14. package/dist/container.js.map +1 -1
  15. package/dist/export-pptx/embed-fonts.d.ts +1 -0
  16. package/dist/export-pptx/embed-fonts.js +42 -7
  17. package/dist/export-pptx/embed-fonts.js.map +1 -1
  18. package/dist/export-pptx/pptx.js +139 -13
  19. package/dist/export-pptx/pptx.js.map +1 -1
  20. package/dist/index.d.ts +10 -2
  21. package/dist/index.js +26 -2
  22. package/dist/index.js.map +1 -1
  23. package/dist/master-io.js +1 -0
  24. package/dist/master-io.js.map +1 -1
  25. package/dist/optimize/export-optimize.d.ts +26 -0
  26. package/dist/optimize/export-optimize.js +104 -5
  27. package/dist/optimize/export-optimize.js.map +1 -1
  28. package/dist/parser/parse.js +23 -3
  29. package/dist/parser/parse.js.map +1 -1
  30. package/dist/render/anim.js +5 -5
  31. package/dist/render/anim.js.map +1 -1
  32. package/dist/render/charts.js +11 -6
  33. package/dist/render/charts.js.map +1 -1
  34. package/dist/render/css.js +1 -1
  35. package/dist/render/html.js +8 -1
  36. package/dist/render/html.js.map +1 -1
  37. package/dist/render/runtime.js +42 -20
  38. package/dist/render/runtime.js.map +1 -1
  39. package/dist/render-pdf/pdf.js +22 -3
  40. package/dist/render-pdf/pdf.js.map +1 -1
  41. package/dist/render-png/montage.js +7 -2
  42. package/dist/render-png/montage.js.map +1 -1
  43. package/dist/render-png/shoot.d.ts +6 -0
  44. package/dist/render-png/shoot.js +20 -7
  45. package/dist/render-png/shoot.js.map +1 -1
  46. package/dist/types.d.ts +22 -2
  47. package/dist/vocab.d.ts +4 -1
  48. package/dist/vocab.js +10 -4
  49. package/dist/vocab.js.map +1 -1
  50. package/package.json +1 -1
  51. package/skills/slaide/SKILL.md +1 -1
  52. package/skills/slaide/grammar.md +2 -1
  53. package/skills/slaide/reference.md +7 -3
  54. package/skills/slaide/themes.md +16 -2
  55. package/themes/blank.slaide.yaml +62 -0
@@ -7,6 +7,7 @@ A **master** is a YAML file defining the whole visual system as data, so one the
7
7
  ```yaml
8
8
  schema: slaide/1
9
9
  name: my-theme
10
+ brand: { name, palette, fonts, logo, source, locked } # optional: locked brand identity
10
11
  canvas: { aspect: "16:9", width: 1920, height: 1080 } # fixed design space, scaled to fit
11
12
  fonts: { … } # named roles, auto-imported from Google
12
13
  typeScale: { … } # named size steps
@@ -98,6 +99,17 @@ gradients:
98
99
  purple: "linear-gradient(120deg, #A855F7, #EC4899)" # .grad-purple
99
100
  ```
100
101
 
102
+ ## brand
103
+
104
+ Optional. Names/locks the brand identity a deck is themed for — the master's own `colors:`/`fonts:` blocks **are** the brand, no separate copy here. When `locked: true`, a hosted AI edit treats the block as read-only and won't drift it — only the user changes it.
105
+
106
+ ```yaml
107
+ brand:
108
+ name: "Acme"
109
+ logo: "<svg>…</svg>" # inline mark, or an asset reference
110
+ locked: true
111
+ ```
112
+
101
113
  ## tokens
102
114
 
103
115
  Raw CSS custom-property overrides (spacing, chrome metrics, chart + code styling). Exact names below — a misspelling is silently ignored.
@@ -139,7 +151,7 @@ variants:
139
151
 
140
152
  ## chrome
141
153
 
142
- Header/footer bands + a corner logo on every slide (toggle per layout/slide). Band cells `left`/`center`/`right` may hold `{{placeholders}}`; `logo` is inline SVG (inherits text colour via `currentColor`); `logoPos` ∈ `top-left|top-right|bottom-left|bottom-right`.
154
+ Header/footer bands + a corner logo on every slide (toggle per layout/slide). Band cells `left`/`center`/`right` may hold `{{placeholders}}`; `logo` is inline SVG (inherits text colour via `currentColor`); `logoPos` ∈ `top-left|top-right|bottom-left|bottom-right`. `logo`: may be raw markup (`<img>`/`<svg>`/text) or a bare image URL — a URL is auto-wrapped in `<img>`. `logo` may instead be `{ dark: <mark>, light: <mark> }` — picked per slide by its resolved ground (`dark` = the mark for a dark background, `light` = for a light one), so a light-on-dark wordmark never lands unreadable on a light slide; one key alone is used everywhere.
143
155
 
144
156
  ```yaml
145
157
  chrome:
@@ -151,13 +163,15 @@ chrome:
151
163
 
152
164
  Per layout: `chrome: header|footer|both|false` and `logo: false`; per-slide frontmatter overrides both. **A header/footer corner cell and the `logo` in the *same* corner overlap silently — put them in different corners.**
153
165
 
166
+ **Cover and outro/closing slides carry no page number** — layouts named `cover`/`outro`/`closing`/`thanks`/`end` get their footer suppressed automatically unless the slide/layout sets `chrome:` explicitly. So a numbered footer never lands on the title or closing slide.
167
+
154
168
  ## ui
155
169
 
156
170
  `ui: { progress: true }` — web position bar + counter (default on; never affects PDF). Per-deck override: `progress: false` in headmatter.
157
171
 
158
172
  ## layouts
159
173
 
160
- Grid templates. `areas` = a `grid-template-areas` map (each entry = one row of space-separated slot names); `slots` = the typed regions content routes into. Optional `align: start|center|end` (vertical), `rows`, `cols`, `gap`, `padding`, `background`, `variant`. Keep `areas` rectangular; every slot in `slots` must appear in `areas`.
174
+ Grid templates. `areas` = a `grid-template-areas` map (each entry = one row of space-separated slot names); `slots` = the typed regions content routes into. Optional `align: start|center|end` (vertical), `rows`, `cols`, `gap`, `padding`, `background`, `variant`. Keep `areas` rectangular; every slot in `slots` must appear in `areas` — a slot key missing from `areas` falls back to the same default cell as any other missing slot, so `validate` warns (`overlapping-slots`) when two or more do.
161
175
 
162
176
  ```yaml
163
177
  layouts:
@@ -0,0 +1,62 @@
1
+ # yaml-language-server: $schema=https://getslaide.com/schema/v1.json
2
+ # A deliberately bare placeholder: white canvas, Open Sans, a handful of layouts.
3
+ # It is NOT a design — the online default so a fresh deck reads as neutral and the AI
4
+ # must author a real theme from scratch. Keep it minimal (few options on purpose).
5
+ schema: slaide/1
6
+ name: blank
7
+ description: A minimal white placeholder theme (Open Sans). Meant to be replaced by a real theme.
8
+
9
+ canvas: { aspect: "16:9", width: 1280, height: 720 }
10
+
11
+ fonts:
12
+ sans: { family: "Open Sans", provider: google, weights: [400, 600, 700] }
13
+ display: { family: "Open Sans", provider: google, weights: [400, 600, 700] }
14
+
15
+ typeScale:
16
+ base: "24px"
17
+ ratio: 1.2
18
+ steps: { h1: 3, h2: 2, h3: 1, h4: 0, body: 0, caption: -1 }
19
+
20
+ colors:
21
+ palette:
22
+ paper: "#FFFFFF"
23
+ ink: "#1A1A1A"
24
+ muted: "#6B7280"
25
+ accent: "#3B5B8C"
26
+ roles:
27
+ background: "{palette.paper}"
28
+ surface: "{palette.paper}"
29
+ text: "{palette.ink}"
30
+ heading: "{palette.ink}"
31
+ accent: "{palette.accent}"
32
+ link: "{palette.accent}"
33
+ muted: "{palette.muted}"
34
+
35
+ layouts:
36
+ cover:
37
+ align: center
38
+ areas: ["title", "subtitle"]
39
+ rows: "auto auto"
40
+ slots:
41
+ title: { type: title, style: { size: h1, weight: "700" } }
42
+ subtitle: { type: subtitle, style: { size: h3, color: muted } }
43
+
44
+ title-content:
45
+ areas: ["title", "body"]
46
+ rows: "auto 1fr"
47
+ slots:
48
+ title: { type: title, style: { size: h2, weight: "700" } }
49
+ body: { type: body }
50
+
51
+ section:
52
+ align: center
53
+ areas: ["title"]
54
+ rows: "1fr"
55
+ slots:
56
+ title: { type: title, style: { size: h1, weight: "700", align: center } }
57
+
58
+ blank:
59
+ areas: ["body"]
60
+ rows: "1fr"
61
+ slots:
62
+ body: { type: body }