@aivorynet/slaide 1.0.2 → 1.0.4
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/CHANGELOG.md +27 -1
- package/README.md +29 -8
- package/dist/assets.d.ts +1 -0
- package/dist/assets.js +3 -0
- package/dist/assets.js.map +1 -1
- package/dist/cli.js +70 -5
- package/dist/cli.js.map +1 -1
- package/dist/compiler/compile.d.ts +1 -0
- package/dist/compiler/compile.js +3 -1
- package/dist/compiler/compile.js.map +1 -1
- package/dist/compiler/markdown.d.ts +1 -0
- package/dist/compiler/markdown.js +2 -1
- package/dist/compiler/markdown.js.map +1 -1
- package/dist/desktop/bootstrap.d.ts +31 -0
- package/dist/desktop/bootstrap.js +217 -0
- package/dist/desktop/bootstrap.js.map +1 -0
- package/dist/desktop/paths.d.ts +28 -0
- package/dist/desktop/paths.js +62 -0
- package/dist/desktop/paths.js.map +1 -0
- package/dist/desktop/verify.d.ts +21 -0
- package/dist/desktop/verify.js +78 -0
- package/dist/desktop/verify.js.map +1 -0
- package/dist/engine-entry.js +6 -0
- package/dist/engine-entry.js.map +1 -1
- package/dist/index.js +4 -7
- package/dist/index.js.map +1 -1
- package/dist/master-io.js +12 -0
- package/dist/master-io.js.map +1 -1
- package/dist/parser/parse.d.ts +1 -0
- package/dist/parser/parse.js +3 -2
- package/dist/parser/parse.js.map +1 -1
- package/dist/render/css.js +7 -4
- package/dist/render/css.js.map +1 -1
- package/dist/render/runtime.js +40 -13
- package/dist/render/runtime.js.map +1 -1
- package/dist/update.d.ts +5 -0
- package/dist/update.js +112 -0
- package/dist/update.js.map +1 -0
- package/dist/vocab.d.ts +36 -0
- package/dist/vocab.js +77 -0
- package/dist/vocab.js.map +1 -0
- package/package.json +1 -1
- package/skills/slaide/SKILL.md +1 -1
- package/skills/slaide/grammar.md +183 -0
- package/skills/slaide/reference.md +58 -2
- package/skills/slaide/themes.md +22 -8
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# slaide grammar (v1)
|
|
2
|
+
|
|
3
|
+
A formal grammar for the `.slaide` document layer. Notation: EBNF — `=` defines, `|` alternation, `{ }` zero-or-more, `[ ]` optional, `( )` grouping, `"x"` literal, `…` charset prose. The Markdown *inside* slot content is CommonMark and is not re-specified here; this grammar defines slaide' structural envelope, sigils, and the inline/attribute extensions, plus the master value forms.
|
|
4
|
+
|
|
5
|
+
This file is the **precise structural reference**. For what each construct *does* — usage, examples, the full transition/entrance catalogs, chart/image/media options, and the `validate` diagnostic codes — see [spec.md](spec.md); for master semantics (colours, type scale, layouts, slot styles) see [themes.md](themes.md). The token sets are generated from the engine (`src/vocab.ts`) and kept in sync by `test/docs-sync.test.ts`.
|
|
6
|
+
|
|
7
|
+
## 1. Document
|
|
8
|
+
|
|
9
|
+
```ebnf
|
|
10
|
+
deck = [ headmatter ] , slide , { separator , slide } , [ NL ] ;
|
|
11
|
+
headmatter = fence , config-block , fence ;
|
|
12
|
+
slide = [ frontmatter ] , body ;
|
|
13
|
+
frontmatter = config-block , fence ; (* see §2 detection rule *)
|
|
14
|
+
separator = NL , fence ; (* a line that is exactly "---" *)
|
|
15
|
+
fence = "---" , EOL ;
|
|
16
|
+
NL = newline ;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
A deck is an optional headmatter block, then one or more slides separated by a bare `---` line. `headmatter` is the first fenced config block. Each slide is an optional fenced frontmatter block followed by a body.
|
|
20
|
+
|
|
21
|
+
## 2. Frontmatter-vs-body detection (the load-bearing rule)
|
|
22
|
+
|
|
23
|
+
A block immediately after a separator (or the leading fence) is **frontmatter** iff **both**:
|
|
24
|
+
1. every non-blank, non-`#comment` line matches `config-line` (a `key:`/`~key:`/list-continuation), **and**
|
|
25
|
+
2. it is terminated by a `fence` before the body begins.
|
|
26
|
+
|
|
27
|
+
Otherwise the block is `body`. Consequences the parser guarantees:
|
|
28
|
+
- The **first** config-like fenced block in the file is `headmatter`.
|
|
29
|
+
- A body whose first line merely *contains* a colon (e.g. `We offer: Tooling`) is **not** frontmatter (it is not `key:`-only and has no trailing fence).
|
|
30
|
+
- A config-shaped block whose keys are **none of** the known slide keys (`layout`, `background`, `transition`, `variant`, `chrome`, `footer`, `logo`, `morph`, …) is still read as frontmatter, **but** the compiler emits an `ambiguous-frontmatter` warning — so a spec-sheet body (`Name: …` / `Founded: …`) eaten as config is no longer silent.
|
|
31
|
+
- To force a body that would otherwise look config-like, escape its first line with a leading backslash (`\Name: Acme`) or precede the slide with an empty frontmatter (`---` `---`).
|
|
32
|
+
- Malformed YAML in a config block emits a `bad-config` warning (with the parser message) instead of silently rendering with defaults.
|
|
33
|
+
|
|
34
|
+
```ebnf
|
|
35
|
+
config-block = { config-line | comment | blank } ;
|
|
36
|
+
config-line = [ "~" ] , key , ":" , [ value ] , EOL ;
|
|
37
|
+
key = ident ;
|
|
38
|
+
comment = "#" , … , EOL ;
|
|
39
|
+
ident = letter , { letter | digit | "-" | "_" } ;
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`value` and nested structures follow YAML. A leading `~` on a key marks a **cascading** default (applies to this slide and all following until overridden); a bare key is **scoped** to its slide.
|
|
43
|
+
|
|
44
|
+
## 3. Fences vs code
|
|
45
|
+
|
|
46
|
+
`---` is a separator **only outside** a fenced code region. Inside ```` ``` ```` / `~~~` fences it is literal text.
|
|
47
|
+
|
|
48
|
+
```ebnf
|
|
49
|
+
code-fence = ("```" | "~~~") , [ info-string ] , EOL , { any-line } , ("```" | "~~~") , EOL ;
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
A code fence whose `info-string` is a renderable type is rendered, not listed as code: `svg` (inline vector), `embed` (its body is a URL → sandboxed `<iframe>`), `widget` (its body is HTML/JS → `sandbox="allow-scripts"` srcdoc iframe, theme tokens injected), `mermaid` (diagram DSL → inline SVG), `echart` (ECharts `option` as JSON/YAML → inline SVG). Other info-strings render as code. CommonMark GFM pipe tables are supported as ordinary body content.
|
|
53
|
+
|
|
54
|
+
Media uses the image syntax with a media extension: `` / `` → `<video>`/`<audio>` (see §6).
|
|
55
|
+
|
|
56
|
+
## 4. Body
|
|
57
|
+
|
|
58
|
+
```ebnf
|
|
59
|
+
body = { region-marker | note | content-line } ;
|
|
60
|
+
region-marker = "::" , WS , slot-name , WS , "::" , EOL ;
|
|
61
|
+
slot-name = ident ; (* valid names are per-layout *)
|
|
62
|
+
note = "???" , [ WS ] , inline-text , EOL , { non-blank-line } ;
|
|
63
|
+
content-line = markdown-line ; (* CommonMark, with §5–§7 extensions *)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
- `region-marker` routes following content into the named slot until the next marker or separator. Content before any marker → the layout's main slot.
|
|
67
|
+
- `note` (a `???` line and its continuation until a blank line) is a speaker note: shown in the presenter overlay, omitted from audience view and PDF.
|
|
68
|
+
|
|
69
|
+
### 4.1 Build sigil
|
|
70
|
+
|
|
71
|
+
```ebnf
|
|
72
|
+
build = content , WS , ">>>" , EOL ;
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
A list item or block ending with `>>>` becomes an incremental build step. Steps auto-number in document order (a shared per-slide counter); identical effective step → simultaneous. In PDF all builds are settled (shown).
|
|
76
|
+
|
|
77
|
+
### 4.2 Escaping sigils
|
|
78
|
+
|
|
79
|
+
A leading backslash turns a slaide sigil into literal content (the backslash is removed):
|
|
80
|
+
|
|
81
|
+
| Write | Renders as | Instead of |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| `\:: word ::` | literal `:: word ::` | a region marker |
|
|
84
|
+
| `\??? text` | literal `??? text` body | a speaker note |
|
|
85
|
+
| `… \>>>` | literal trailing `>>>` | a build step |
|
|
86
|
+
| `\[text]{.cls}` | literal `[text]{.cls}` | a styled span (and skips class validation) |
|
|
87
|
+
| `\Name: Acme` (first body line) | body line | frontmatter (see §2) |
|
|
88
|
+
|
|
89
|
+
## 5. Inline styled spans
|
|
90
|
+
|
|
91
|
+
```ebnf
|
|
92
|
+
span = "[" , inline-text , "]" , "{" , class , { class } , "}" ;
|
|
93
|
+
class = "." , class-name ;
|
|
94
|
+
class-name = ident ; (* resolved against the master *)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Classes chain (`[40-80%]{.grad-purple .huge}`). Resolution (see themes.md → *Marks / utility classes*):
|
|
98
|
+
- `.grad` → brand gradient text; `.grad-<name>` → named gradient text.
|
|
99
|
+
- `.<color>` → text color, where `<color>` is a `palette` key, `roles` name, or a literal CSS colour.
|
|
100
|
+
- `.xs .sm .md .lg .xl .xxl .huge` → font-size (type-scale steps `small`…`stat`).
|
|
101
|
+
- `.bold`, `.muted`, and image utilities `.round`, `.cover`, `.shadow`.
|
|
102
|
+
|
|
103
|
+
A class that is **none** of the above (e.g. a typo like `.xxlarge` or `.grad-teel`) emits an `unknown-class` / `unknown-gradient` warning rather than silently degrading to inert/invisible CSS. Run `slaide slots <deck>` to print the legal slot, colour, gradient and size names for a deck's master; `slaide validate <deck> [--strict]` surfaces all diagnostics (`--strict` makes warnings fail).
|
|
104
|
+
|
|
105
|
+
## 6. Image & attribute brace
|
|
106
|
+
|
|
107
|
+
```ebnf
|
|
108
|
+
image = "" , [ attr-brace ] ;
|
|
109
|
+
attr-brace = "{" , WS , { attr , WS } , "}" ;
|
|
110
|
+
attr = id-attr | class | kv-attr | anchor-attr ;
|
|
111
|
+
id-attr = "#" , ident ;
|
|
112
|
+
kv-attr = key , "=" , value-token ; (* e.g. width=170px — unquoted, units ok *)
|
|
113
|
+
anchor-attr = "anchor" , ":" , WS , '"' , pct , WS , pct , WS , pct , WS , pct , '"' ;
|
|
114
|
+
value-token = { non-space-non-brace } ;
|
|
115
|
+
pct = number , "%" ;
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
One brace may mix `#id`, `.class`, `key=value`, and `anchor:"…"` in any order. `#id` enables shared-element **morph** to a same-id element on the next slide (`transition: morph`).
|
|
119
|
+
|
|
120
|
+
## 7. Placeholders
|
|
121
|
+
|
|
122
|
+
```ebnf
|
|
123
|
+
placeholder = "{{" , WS , ph-name , WS , "}}" ;
|
|
124
|
+
ph-name = ident ;
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Substituted at compile time inside chrome bands and master text. Names: `page`, `total`, `pagePadded`, `totalPadded`, `date`, `title`, `author`, `slideTitle`, `footer`, plus any scalar headmatter/frontmatter key. Unknown names resolve to empty (with a warning).
|
|
128
|
+
|
|
129
|
+
## 8. Master (`*.slaide.yaml`) value forms
|
|
130
|
+
|
|
131
|
+
The master is YAML; this section pins the slaide-specific value vocabulary (see themes.md for full semantics).
|
|
132
|
+
|
|
133
|
+
```ebnf
|
|
134
|
+
master = mapping of:
|
|
135
|
+
"schema" , "name" , [ "description" ] ,
|
|
136
|
+
[ "canvas" ] , [ "fonts" ] , [ "typeScale" ] , [ "colors" ] ,
|
|
137
|
+
[ "gradients" ] , [ "tokens" ] , [ "backgrounds" ] ,
|
|
138
|
+
[ "variants" ] , [ "transitions" ] , [ "chrome" ] , [ "ui" ] , [ "layouts" ] ;
|
|
139
|
+
ui = { [ "progress": boolean ] } ; (* web position indicator; default true *)
|
|
140
|
+
|
|
141
|
+
typeScale = { "base": dim , "ratio": number , "steps": { step-name : (integer | dim) } } ;
|
|
142
|
+
dim = number , ("px"|"em"|"rem"|"%"|"vw"|"vh") ;
|
|
143
|
+
color-ref = "{palette." , ident , "}" | "{" , ident , "}" | css-color ;
|
|
144
|
+
gradient-ref = "{gradients." , ident , "}" | gradient-name ;
|
|
145
|
+
|
|
146
|
+
layout = { "areas": [ area-row , { area-row } ] ,
|
|
147
|
+
[ "rows" ] , [ "cols" ] , [ "gap" ] , [ "padding" ] ,
|
|
148
|
+
[ "align": ("start"|"center"|"end") ] ,
|
|
149
|
+
[ "background": bg-name ] ,
|
|
150
|
+
[ "chrome": ("both"|"header"|"footer"|"false") ] ,
|
|
151
|
+
[ "logo": false ] ,
|
|
152
|
+
"slots": { slot-name : slot } } ;
|
|
153
|
+
area-row = string ; (* space-separated slot names; rectangular *)
|
|
154
|
+
slot = { "type": slot-type , [ "style": style-map ] } ;
|
|
155
|
+
slot-type = "title"|"subtitle"|"body"|"image"|"media"|"quote"|"caption"| ident ;
|
|
156
|
+
style-map = { style-key : style-val } ;
|
|
157
|
+
style-key = "font"|"size"|"color"|"fill"|"align"|"valign"|"justify"
|
|
158
|
+
| "weight"|"leading"|"transform"|"italic"|"maxw"|"box" ;
|
|
159
|
+
|
|
160
|
+
chrome = { [ "header": band ] , [ "footer": band ] ,
|
|
161
|
+
[ "logo": svg-string ] , [ "logoPos": corner ] } ;
|
|
162
|
+
band = { [ "left": tmpl ] , [ "center": tmpl ] , [ "right": tmpl ] } ;
|
|
163
|
+
tmpl = string ; (* Markdown-inline + placeholders *)
|
|
164
|
+
corner = "top-left"|"top-right"|"bottom-left"|"bottom-right" ;
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## 9. Reserved tokens (summary)
|
|
168
|
+
|
|
169
|
+
| Token | Context | Meaning |
|
|
170
|
+
|---|---|---|
|
|
171
|
+
| `---` | line | slide separator / config fence (outside code fences) |
|
|
172
|
+
| `:: name ::` | line | region/slot marker |
|
|
173
|
+
| `>>>` | end of line/item | build step |
|
|
174
|
+
| `???` | line start | speaker note |
|
|
175
|
+
| `~key:` | frontmatter | cascading default |
|
|
176
|
+
| `[t]{.c}` | inline | styled span |
|
|
177
|
+
| `{#id .c k=v anchor:"…"}` | after image | attributes |
|
|
178
|
+
| `{{name}}` | chrome/master text | placeholder |
|
|
179
|
+
| `` | inline | video / audio |
|
|
180
|
+
| ```` ```svg ```` | fence | inline vector embed |
|
|
181
|
+
| ```` ```embed ```` / ```` ```widget ```` | fence | sandboxed iframe (URL / inline JS) |
|
|
182
|
+
| ```` ```mermaid ```` / ```` ```echart ```` | fence | chart → inline SVG (diagram / data viz) |
|
|
183
|
+
| `\` (leading) | before a sigil | escape to literal (`\::`, `\???`, `\>>>`, `\[t]{.c}`) |
|
|
@@ -40,22 +40,37 @@ My Talk
|
|
|
40
40
|
| Key | Values | Meaning |
|
|
41
41
|
|---|---|---|
|
|
42
42
|
| `layout` | a master layout name | Which grid to use. |
|
|
43
|
-
| `transition` |
|
|
43
|
+
| `transition` | a transition name (§3.1) | Transition **into** this slide. |
|
|
44
|
+
| `transition-ms` | milliseconds | Duration override for this slide's transition. |
|
|
45
|
+
| `transition-ease` | a CSS easing | Easing override (`ease`, `cubic-bezier(…)`). |
|
|
44
46
|
| `background` | a master background name | Override the layout's background. |
|
|
45
47
|
| `variant` | a master variant name | Scoped token overrides (e.g. a light section). |
|
|
46
48
|
| `morph` | an id | Participate in a shared-element morph. |
|
|
47
49
|
| `footer` | inline Markdown | Per-slide footer; also `{{footer}}`. |
|
|
48
50
|
| `chrome` | `both`,`header`,`footer`,`none`,`false` | Header/footer visibility this slide. |
|
|
49
51
|
| `logo` | `false` | Hide the corner logo this slide. |
|
|
52
|
+
| `notes` | inline Markdown | Speaker note for this slide (frontmatter form of a `???` line). |
|
|
50
53
|
| *any other scalar* | — | Available as a `{{placeholder}}`. |
|
|
51
54
|
|
|
52
55
|
**Cascade vs scope:** a bare key (`transition: zoom`) is this-slide-only; a `~`-prefixed key cascades to this slide and every later one until overridden (also valid in headmatter).
|
|
53
56
|
|
|
57
|
+
### 3.1 Transition names
|
|
58
|
+
|
|
59
|
+
`transition:` takes one of these built-ins; per-slide `transition-ms` / `transition-ease` override timing, and the master's `transitions: { default, duration }` sets the deck-wide default.
|
|
60
|
+
|
|
61
|
+
| Group | Names |
|
|
62
|
+
|---|---|
|
|
63
|
+
| Fades | `none`, `fade`, `dissolve`, `fade-through-black` (alias `fade-black`) |
|
|
64
|
+
| Slides | `slide-left` (alias `slide`), `slide-right`, `slide-up`, `slide-down` |
|
|
65
|
+
| Push/cover | `push`, `cover`, `reveal` |
|
|
66
|
+
| Scale/3-D | `zoom`, `zoom-out`, `flip` |
|
|
67
|
+
| Shared-element | `morph` — pairs a `{#id}` image (or a `morph:` id) with the same id on the next slide |
|
|
68
|
+
|
|
54
69
|
## 4. Slide body
|
|
55
70
|
|
|
56
71
|
- **Regions:** `:: name ::` on its own line routes following Markdown into slot `name`. Text before any marker → the main slot (`body`, else the first slot).
|
|
57
72
|
- **Markdown:** standard CommonMark — headings, lists, **bold**, *italic*, `code`, fences, > quotes, links, tables, images. (A single newline is a space; blank line = new paragraph.)
|
|
58
|
-
- **Builds `>>>`:** end an item/block with `>>>` to reveal it; steps auto-number in order, same step = simultaneous. PDF shows all.
|
|
73
|
+
- **Builds `>>>`:** end an item/block with `>>>` to reveal it; steps auto-number in order, same step = simultaneous. PDF shows all. Add an entrance and timing after the sigil (§4.7).
|
|
59
74
|
- **Notes `??? …`:** a `???` line (until a blank line) is a speaker note — presenter overlay only, hidden from audience and PDF.
|
|
60
75
|
|
|
61
76
|
### 4.1 Inline styled spans — `[text]{.class …}`
|
|
@@ -114,6 +129,17 @@ Both render to **theme-coloured inline SVG** (web/PDF/PNG/PPTX); `slaide build`
|
|
|
114
129
|
|
|
115
130
|
GFM pipe tables, styled by the master; use `[cell]{.class}` spans for emphasis.
|
|
116
131
|
|
|
132
|
+
### 4.7 Build entrances — `>>> <entrance> [opts]`
|
|
133
|
+
|
|
134
|
+
A bare `>>>` reveals with the default entrance (`fade-up`). Name an entrance right after the sigil, optionally with `delay=`, `dur=` and `ease=` (bare numbers are milliseconds): `- Big reveal >>> zoom-in delay=200 dur=600`. An unknown name warns (`unknown-entrance`) and falls back to the default. A master `animations:` block can define custom entrances too.
|
|
135
|
+
|
|
136
|
+
| Group | Names |
|
|
137
|
+
|---|---|
|
|
138
|
+
| Fades | `fade`, `fade-up`, `fade-down`, `fade-left`, `fade-right`, `blur-in` |
|
|
139
|
+
| Slides | `slide-in-left`, `slide-in-right`, `slide-in-up`, `slide-in-down`, `rise` |
|
|
140
|
+
| Scale | `zoom-in`, `zoom-out`, `pop` |
|
|
141
|
+
| Instant | `none` |
|
|
142
|
+
|
|
117
143
|
## 5. Layers
|
|
118
144
|
|
|
119
145
|
Each slide composites **background → content → chrome** by paint order. Backgrounds come from the master (per layout or per slide); content flows through the layout's named slots; chrome sits on top.
|
|
@@ -175,3 +201,33 @@ footer: A first deck
|
|
|
175
201
|
```
|
|
176
202
|
|
|
177
203
|
See [themes.md](themes.md) to author a master.
|
|
204
|
+
|
|
205
|
+
## 10. Diagnostics — what `validate` reports
|
|
206
|
+
|
|
207
|
+
`slaide validate <deck>` prints line-numbered diagnostics; `--strict` makes every warning fail. **Errors** fail regardless of `--strict`; everything else is a **warning** (a real render defect even when the deck "looks valid"). Every code:
|
|
208
|
+
|
|
209
|
+
| Code | Severity | Meaning |
|
|
210
|
+
|---|---|---|
|
|
211
|
+
| `parse-error` | error | The source could not be parsed at all. |
|
|
212
|
+
| `empty-deck` | error | No slides were found. |
|
|
213
|
+
| `no-master` | error | The deck's `master:` could not be resolved. |
|
|
214
|
+
| `unknown-layout` | error | A slide's `layout:` names no layout in the master. |
|
|
215
|
+
| `no-headmatter` | warning | No leading `---` deck headmatter block (e.g. `master:`). |
|
|
216
|
+
| `bad-config` | warning | A headmatter/frontmatter block is not valid YAML (rendered with defaults). |
|
|
217
|
+
| `ambiguous-frontmatter` | warning | A config-shaped **body** was eaten as frontmatter — escape the first line with `\` or add an explicit `---`. |
|
|
218
|
+
| `unknown-transition` | warning | A `transition:` names no built-in transition (§3.1). |
|
|
219
|
+
| `unknown-background` | warning | A `background:` names no master background. |
|
|
220
|
+
| `unknown-variant` | warning | A `variant:` names no master variant. |
|
|
221
|
+
| `unknown-slot` | warning | Content routed to a slot the chosen layout doesn't define (dropped silently). |
|
|
222
|
+
| `unknown-class` | warning | An inline `[x]{.cls}` is not a size / `.bold` / `.muted` / `.grad` / master colour / CSS colour. |
|
|
223
|
+
| `unknown-gradient` | warning | A `.grad-<name>` or slot `fill:` names no master gradient (text gets no fill — often invisible). |
|
|
224
|
+
| `unknown-color` | warning | A slot `color:`/`box:` names no master role/palette or CSS colour (falls back to a literal, often invisible). |
|
|
225
|
+
| `unknown-entrance` | warning | A `>>> <name>` build entrance isn't a known effect (§4.7). |
|
|
226
|
+
| `stray-build` | warning | A `>>>` on a non-list line (headings, bold labels, paragraphs). |
|
|
227
|
+
| `low-contrast` | warning | Resolved text ≈ its background (dark-on-dark / light-on-light) — bind a `variant:` or set an explicit `color:`. |
|
|
228
|
+
| `bad-chart` | warning | An ````echart` option didn't parse — rendered as a plain code block instead. |
|
|
229
|
+
| `bad-animation` | warning | A master `animations:` entry is missing its required keyframes/`hidden` state. |
|
|
230
|
+
| `unknown-token` | warning | A master token reference names nothing. |
|
|
231
|
+
| `token-cycle` | warning | A master token references itself in a cycle. |
|
|
232
|
+
| `non-embeddable-font` | warning | A font won't embed in `.pptx` — PowerPoint will substitute it. |
|
|
233
|
+
| `unknown-placeholder` | warning | A `{{name}}` resolves to nothing (renders empty). |
|
package/skills/slaide/themes.md
CHANGED
|
@@ -47,12 +47,14 @@ colors:
|
|
|
47
47
|
accent: "{palette.brand}"
|
|
48
48
|
layouts:
|
|
49
49
|
cover:
|
|
50
|
-
|
|
51
|
-
areas: ["title", "subtitle"]
|
|
50
|
+
areas: ["title visual", "subtitle visual"]
|
|
52
51
|
rows: "auto auto"
|
|
52
|
+
cols: "1.1fr 0.9fr"
|
|
53
|
+
gap: "0.5em 3em"
|
|
53
54
|
slots:
|
|
54
55
|
title: { type: title, style: { font: display, size: h1, weight: "900" } }
|
|
55
56
|
subtitle: { type: subtitle, style: { size: h3, color: accent } }
|
|
57
|
+
visual: { type: image, style: { valign: center } }
|
|
56
58
|
title-content:
|
|
57
59
|
areas: ["title", "body"]
|
|
58
60
|
rows: "auto 1fr"
|
|
@@ -69,7 +71,7 @@ layouts:
|
|
|
69
71
|
|
|
70
72
|
## fonts / typeScale
|
|
71
73
|
|
|
72
|
-
**Use real Google Fonts only** (`provider: google`) — pick families that actually exist on Google Fonts
|
|
74
|
+
**Use real Google Fonts only** (`provider: google`) — pick families that actually exist on Google Fonts. A `display` + `sans` is plenty; add `mono` only if the deck shows code. A `provider: system`/`local` font that isn't a common system font (Arial, Calibri, Georgia…) **warns** (`non-embeddable-font`): it won't embed in `.pptx`.
|
|
73
75
|
|
|
74
76
|
```yaml
|
|
75
77
|
fonts:
|
|
@@ -195,6 +197,7 @@ layouts:
|
|
|
195
197
|
| `box` | surface panel (bg + padding + radius) | `true`, a colour role/palette name (preferred), a **named master gradient** (`box: brand` → padded, rounded, gradient hero/closing panel), or a raw hex / CSS colour / gradient |
|
|
196
198
|
| `bg` | background of the slot region | any CSS colour / gradient (literal) |
|
|
197
199
|
| `anchor` | absolutely position the slot | `"x% y% w% h%"` of the canvas |
|
|
200
|
+
| `pad` / `opacity` / `radius` / `border` / `rotate` | fine control — padding / opacity / border-radius / border / rotation (also emitted by the importer) | CSS values (`rotate` accepts a bare deg or a full `transform`) |
|
|
198
201
|
|
|
199
202
|
`color:`/`box:`/`fill:` are validated against the master — an unresolved name warns, so `validate` can't call an invisible-text slide valid. Run `slaide slots` for legal names.
|
|
200
203
|
|
|
@@ -208,8 +211,19 @@ Inline `[text]{.class}` resolves against this master: **colour** = any `palette`
|
|
|
208
211
|
|
|
209
212
|
## Tips for AI authors
|
|
210
213
|
|
|
211
|
-
-
|
|
212
|
-
- **Cards (`box:`)
|
|
213
|
-
- **
|
|
214
|
-
- **
|
|
215
|
-
- **
|
|
214
|
+
- Use **roles** and **scale steps**, not raw hex/px — reskin = palette swap.
|
|
215
|
+
- **Cards (`box:`):** bg + padding + radius only (no gradient/shadow/border). Without `valign` a card stretches full-height and pins text top (hollow). Fix: `valign: center` to shrink-wrap, or put cards in an `auto` row with `1fr` spacers. Tint card surface off-white vs the page.
|
|
216
|
+
- **Cover = dramatic hero.** Visual slot FILLS — bold brand SVG, product mock, or illustrated motif at ≥ half the slide, not a small icon. Think Apple keynote: few bold shapes at large scale. Centred text on a gradient is a section divider, not a cover. Never `.grad` text on a gradient bg (vanishes). **Closing** = bold CTA or contact slide (name/role/email/URL for pitch/agency decks). Both must feel intentional.
|
|
217
|
+
- **Brand ground dominates.** Most slides use the brand's background role (warm cream, tinted neutral — not generic white). Dark/gradient = accent moments only (cover, one stat, closing).
|
|
218
|
+
- **No text-only slides — no exceptions.** Every content slide needs a visual: ` ```echart ` for data, inline ` ```svg ` for diagrams/mockups (preferred — precise, brand-styled), `box:` cards, or a stat callout. A comparison/pro-con slide is NOT exempt: use cards, a table, or SVG icons. Mix visual types across the deck — all-SVG or all-cards = monotone.
|
|
219
|
+
- **Vary composition.** Never repeat the same layout archetype — two text+visual slides need structurally different layouts (not image-left twice). Mix archetypes, alternate dark/light grounds. One slide should break the pattern — oversized `.grad` stat, serif quote owning the canvas, or full-bleed visual.
|
|
220
|
+
- **One idea per slide.** Each slide delivers one clear message (4 bullets max). The visual and text reinforce the SAME idea — if the visual still communicates without the text, that's right.
|
|
221
|
+
- **Size contrast.** Pair `hero`/`stat` scale with body text. At least one slide MUST feature a single big number or statement using `.huge` or `.stat` — the audience remembers ONE number from every deck. No decorative accent lines under titles (AI tell).
|
|
222
|
+
- **Use every font role** defined in the master (serif, display, mono).
|
|
223
|
+
- **Whitespace.** `--slide-padding` ≥ 96px, `gap` ≥ 2em. `auto` rows for content, `1fr` spacers to centre. Cards need `pad`.
|
|
224
|
+
- **Avoid `<a>` links in slides.** They aren't clickable during presentations and their `link` role color can override slot `color:`. Write URLs as plain text; style with `[text]{.class}` spans.
|
|
225
|
+
- **Muted text must read at projection scale.** Keep well above 2.5:1 contrast. Never use light-ground `muted` inside a dark `box:`/`bg:` card — set explicit light `color:` instead.
|
|
226
|
+
- **Inline SVG:** explicit `width`/`height` required (collapses without them). Images fill their container (the layout controls sizing via grid areas + padding).
|
|
227
|
+
- **Academic / teaching decks** (symposia, lectures, workshops): clarity over flash. Favour ` ```svg ` / ` ```mermaid ` diagrams for processes and systems, ` ```echart ` for data/results. Use `>>>` heavily for progressive build. Larger body text (≥ h3). Section dividers between topics. End with summary/takeaways/questions, not a sales CTA. High-contrast, clean backgrounds.
|
|
228
|
+
- **Financial / board reports**: data credibility first. Heavy ` ```echart ` (bar, line, waterfall, pie). Stats use `.huge` with exact numbers. Comparison tables via `box:` card grids (Plan vs Actual). Conservative palette — dark text on light ground, accent on KPI highlights only. Section dividers per business unit or period. Cover = clean title + period, not a hero. End with outlook/risks.
|
|
229
|
+
- **A deck about slaide?** Brand from `slaide-hugo` repo: azure `#243B6B→#3E6FB0→#6FA8DC`, cream `#FBF7F0`, ink `#15120E`; IBM Plex Sans + JetBrains Mono + Fraunces.
|