@tycoworks/tycoslide 0.15.1 → 0.16.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.
Files changed (63) hide show
  1. package/README.md +9 -5
  2. package/dist/agents/catalog.d.ts +32 -0
  3. package/dist/agents/catalog.js +37 -0
  4. package/dist/agents/commands.d.ts +9 -0
  5. package/dist/agents/commands.js +57 -0
  6. package/dist/agents/extract.d.ts +22 -0
  7. package/dist/agents/extract.js +54 -0
  8. package/dist/{files.d.ts → agents/files.d.ts} +14 -3
  9. package/dist/{files.js → agents/files.js} +20 -5
  10. package/dist/agents/inventory.d.ts +83 -0
  11. package/dist/agents/inventory.js +568 -0
  12. package/dist/agents/manifest.d.ts +3 -0
  13. package/dist/{manifest.js → agents/manifest.js} +3 -14
  14. package/dist/agents/media.d.ts +38 -0
  15. package/dist/agents/media.js +83 -0
  16. package/dist/agents/pptx.d.ts +48 -0
  17. package/dist/agents/pptx.js +123 -0
  18. package/dist/agents/skill.d.ts +43 -0
  19. package/dist/agents/skill.js +134 -0
  20. package/dist/cli.js +8 -44
  21. package/dist/engine/dom.d.ts +3 -0
  22. package/dist/engine/dom.js +4 -0
  23. package/dist/engine/fillers/image.d.ts +6 -5
  24. package/dist/engine/fillers/image.js +24 -7
  25. package/dist/engine/generate.d.ts +2 -2
  26. package/dist/engine/generate.js +2 -2
  27. package/dist/engine/index.d.ts +3 -0
  28. package/dist/engine/index.js +2 -0
  29. package/dist/engine/notes.js +20 -62
  30. package/dist/engine/ooxml.d.ts +36 -0
  31. package/dist/engine/ooxml.js +56 -0
  32. package/dist/engine/types.d.ts +4 -0
  33. package/dist/index.d.ts +4 -11
  34. package/dist/index.js +2 -15
  35. package/dist/markdown/blocks/code.js +1 -2
  36. package/dist/markdown/blocks/image.d.ts +23 -0
  37. package/dist/markdown/blocks/image.js +65 -3
  38. package/dist/markdown/blocks/mermaid.d.ts +1 -1
  39. package/dist/markdown/blocks/mermaid.js +6 -4
  40. package/dist/markdown/blocks/table.js +7 -6
  41. package/dist/markdown/blocks/text.js +9 -8
  42. package/dist/markdown/deckCompiler.d.ts +2 -13
  43. package/dist/markdown/deckCompiler.js +7 -78
  44. package/dist/markdown/index.d.ts +4 -2
  45. package/dist/markdown/index.js +3 -1
  46. package/dist/markdown/inline.d.ts +2 -0
  47. package/dist/markdown/inline.js +4 -3
  48. package/dist/markdown/schema/themeConfigSchema.d.ts +2 -11
  49. package/dist/markdown/schema/themeConfigSchema.js +6 -16
  50. package/dist/markdown/slideParser.d.ts +2 -0
  51. package/dist/markdown/slideParser.js +6 -3
  52. package/dist/markdown/types.d.ts +4 -29
  53. package/dist/markdown/types.js +0 -11
  54. package/{theme-package/syntax.md → docs/markdown.md} +60 -28
  55. package/docs/theme.md +144 -0
  56. package/package.json +5 -4
  57. package/theme-package/SKILL.template.md +161 -0
  58. package/dist/engine/rels.d.ts +0 -18
  59. package/dist/engine/rels.js +0 -55
  60. package/dist/manifest.d.ts +0 -5
  61. package/dist/skillZip.d.ts +0 -49
  62. package/dist/skillZip.js +0 -177
  63. package/theme-package/SKILL.md +0 -226
@@ -1,226 +0,0 @@
1
- ---
2
- name: slides
3
- description: >
4
- Build branded slides, presentations, pitch decks, or sales collateral as a .pptx.
5
- Trigger on "deck," "slides," "presentation," "pitch," ".pptx," or "build me a deck."
6
- ---
7
-
8
- # slides
9
-
10
- ## Setup
11
-
12
- Before first use, install dependencies from the theme root:
13
-
14
- ```bash
15
- npm install
16
- ```
17
-
18
- This installs the tycoslide engine and its dependencies. You only need to do this once.
19
-
20
-
21
- ## Overview
22
-
23
- This skill builds on-brand decks from a markdown deck file. The theme provides slide layouts that control design. Your job: pick the right layouts, fill them with content, and build. You never restyle the layout; the engine clones the real slides, so brand, layout, fonts, and chrome come for free.
24
-
25
- ## Quick Reference
26
-
27
- | Task | Guide |
28
- |------|-------|
29
- | Discover layouts | Read `manifest.json` |
30
- | Find a logo, illustration or icon | Search `assets.json` |
31
- | Write a deck (structure, slots, assets) | See [Creating Slides](#creating-slides) below |
32
- | Fix build errors | See [QA](#qa-required) below |
33
-
34
- ---
35
-
36
- ## Layout Discovery
37
-
38
- Before writing anything, read `manifest.json`. It lists the theme's **layouts** -- for each: `name`, `description`, `parameters` (frontmatter inputs) and `slots` (body regions). A layout is identified by its `name`; every parameter and slot by its `key`. Parameters carry a `type`, slots carry `accepts`, and either may be `required`.
39
-
40
- Pictures live in `assets.json`: every logo, illustration and icon the theme offers, keyed by category and name. **Search it, do not read it whole** -- an icon set alone can run to thousands of entries. Grep for it and use the `$category.name` you find -- but **search for what the icon depicts, not what you mean by it**: a catalog is indexed by picture, so "freshness" finds nothing while `grep -i "clock" assets.json` and `grep -i "bolt"` find the icon you wanted.
41
-
42
- A layout's inputs split two ways (see [syntax.md](syntax.md) for details):
43
- - **parameters** -- one value on a frontmatter line. Fill by putting a value under the parameter's key in the slide frontmatter.
44
- - **slots** -- a multi-line region in the body. Accept types: `text`, `table`, `image`. Fill as a `::key::` region, using the slot's `key` from the manifest; a fenced code block routes to a `text` slot, a fenced mermaid block to an `image` slot.
45
-
46
- A slot may accept more than one content type -- the manifest lists each slot's `accepts`, and the shape of the content you write selects which one.
47
-
48
- Parameters and slots you leave unfilled are dropped from the slide, so a layout with numbered slots (several sections, stats, columns) renders only the ones you fill -- fill as many as you have.
49
-
50
- Study each layout's `slots` before writing any slides.
51
-
52
- ---
53
-
54
- ## Creating Slides
55
-
56
- > **Every layout, parameter, and slot name in the examples below is a placeholder.** Your theme's real names live in `manifest.json` — read it first, and never assume a name shown in an example exists in your theme.
57
-
58
- Write a deck file in markdown. The file starts with a global frontmatter block declaring the theme, followed by slides separated by `---`.
59
-
60
- ```markdown
61
- ---
62
- theme: ./theme.json
63
- ---
64
-
65
- ---
66
- layout: Title # ← a layout from your manifest.json
67
- title: Q2 Business Review # ← a parameter that layout declares
68
- subtitle: Engineering Division
69
- ---
70
-
71
- ---
72
- layout: Quote dark
73
- quote: Great products are built by great teams.
74
- attributionName: Jane Smith
75
- attributionTitle: CEO, Acme Corp
76
- ---
77
-
78
- ::logo::
79
-
80
- ![]($logos.acme) # ← an image slot: a catalog asset, or a file path relative to the deck
81
- ```
82
-
83
- A text shape that holds several lines (e.g. an attribution with a name over a title) surfaces as one key per line -- fill each as its own scalar (`attributionName`, `attributionTitle` above), never as a YAML list.
84
-
85
- ### File structure
86
-
87
- A deck file has three parts:
88
-
89
- 1. **Global frontmatter** (required) -- the first `---`-delimited block. Must contain `theme:` pointing to the theme config file. The output `.pptx` is written next to the deck, named after it (`deck.md` → `deck.pptx`).
90
- 2. **Slides** -- each begins with a `---` separator. A slide's frontmatter sits between `---` delimiters. Body content follows the closing `---`.
91
- 3. **Slide separators** -- a `---` on its own line separates slides.
92
-
93
- ### Slide frontmatter
94
-
95
- Every slide must have a `layout:` key. All other frontmatter keys map 1:1 to the layout's **parameters**. A value containing a colon-then-space must be quoted -- `title: "The change: compute on the difference"` -- or YAML reads it as a second key and the build fails.
96
-
97
- ```yaml
98
- ---
99
- layout: Body
100
- title: Key Achievements
101
- subtitle: This Quarter
102
- ---
103
- ```
104
-
105
- - `layout` is required and consumed by the compiler (not forwarded as content).
106
- - All other frontmatter keys fill parameters: `title` fills the `title` parameter, `subtitle` fills the `subtitle` parameter, etc. A multi-line text shape surfaces as several keys (e.g. `name` + `jobTitle`); fill each as its own scalar line.
107
- - Slots (accepting `text`, `table`, `image`) are filled by body regions, not frontmatter -- see below.
108
- - A slide may also carry a `notes:` block in frontmatter -- plain-text speaker notes for the slide's notes page (see [syntax.md](syntax.md#speaker-notes)). It is slide-level metadata, not a parameter or slot.
109
-
110
- ### Body content, slots, and formatting
111
-
112
- See [syntax.md](syntax.md) for the full syntax reference: body content (paragraphs, bullets, nesting), inline formatting (bold, italic, strikethrough, underline, hyperlinks), named slots (`::key::` markers), and the parameter/slot split (slots accept: text, table, image).
113
-
114
- ### Build
115
-
116
- Build the deck (replace `<deck.md>` with your deck file):
117
-
118
- ```bash
119
- npx tycoslide build <deck.md>
120
- ```
121
-
122
- The `.pptx` is written next to your deck file (same directory as `<deck.md>`).
123
-
124
- ---
125
-
126
- ## Layout Selection
127
-
128
- **Don't create boring decks.** Repeating the same layout on every slide makes a forgettable presentation. Use variety and match content shape to the layout's slots.
129
-
130
- ### Before Starting
131
-
132
- 1. **Read the manifest thoroughly.** Each layout declares its `slots` (and the `accepts` types each one takes) -- the shape of what it can hold. Respect them.
133
- 2. **Match content shape to the layout's slots.** A comparison fits a layout with two or three text columns; quantified proof fits one with stat slots; a customer voice fits a quote slot. The slots tell you what fits -- don't force content into the wrong shape.
134
- 3. **Assign each idea to its best-fit layout** from the manifest. Some layouts come in more than one variant (e.g. a dark and a light version, shown in the name) — consider which suits the deck.
135
-
136
- ### For Each Slide
137
-
138
- **Every slide communicates one idea.** Put the takeaway in the headline, then support it.
139
-
140
- Keep each slot's content to what its region comfortably holds. When content overflows, split it across slides.
141
-
142
- ### Avoid (Common Mistakes)
143
-
144
- - **Don't repeat the same layout** -- vary layouts for visual rhythm
145
- - **Don't overstuff a slot** -- keep content to what its region comfortably holds; split across slides when there's too much
146
- - **Don't restyle the layout** -- the theme owns all design; you only fill slots
147
- - **Don't use an image that's wrong for the slot** -- a small slot wants a simple icon, not a dense illustration. If you get a `shrunk to X%` warning, look at the rendered slide: if the image is now too small to make out, use a simpler one. A `leaves X% of the frame empty` warning is the opposite: the image is a different shape from the slot. Neither fails the build -- judge both from the rendered slide.
148
- - **Don't invent layout or asset names** -- only use layouts from `manifest.json` and assets from `assets.json`
149
- - **Don't leave required parameters or slots empty** -- and don't leave a placeholder logo or dummy text in an image slot you care about
150
-
151
- ---
152
-
153
- ## QA (Required)
154
-
155
- **Assume the first build will fail. Your job is to fix it.**
156
-
157
- Your first draft almost never comes out clean. Approach QA as a debugging session, not a confirmation step. If you haven't run at least one build-fix cycle, you're not done.
158
-
159
- Build the deck again ([Build](#build)) and read the output carefully. Common errors and fixes:
160
-
161
- | Error | Fix |
162
- |-------|-----|
163
- | `unknown layout "xyz"` | Check layout names in `manifest.json` |
164
- | A parameter or slot didn't fill | Use the key names the layout declares -- parameters in frontmatter, slots as body regions |
165
- | An image didn't swap / placeholder remains | Write a `::key::` region using the image slot's key, containing `![]($category.name)` from `assets.json` or `![](path)` relative to the deck |
166
- | YAML parse error | Fix the YAML syntax in the slide's frontmatter |
167
- | `Skipped setting relation target` | The asset image couldn't be placed; check the path and file |
168
- | `forbidden style directive` | Remove `style`, `classDef`, `linkStyle`, or `%%{init}` from your mermaid block -- use `class` for grouping instead |
169
- | `no "mermaid" block` | The theme has no mermaid color config -- add a `mermaid` section to theme.json |
170
-
171
- ### Verification Loop
172
-
173
- 1. Write the deck file &rarr; Build
174
- 2. **Fix the error** -- the build stops at the first one, so expect several rounds
175
- 3. Rebuild
176
- 4. **If content overflows**: reduce content or split into two slides
177
- 5. Repeat until the build exits cleanly
178
-
179
- **Do not declare success until you've completed at least one build-fix cycle.**
180
-
181
- ### Visual Check
182
-
183
- After a clean build, render the `.pptx` to PNGs and inspect them:
184
-
185
- ```bash
186
- soffice --headless --convert-to pdf --outdir . <deck>.pptx
187
- pdftoppm -png -r 96 <deck>.pdf <name>
188
- ```
189
-
190
- Read each slide image and check for:
191
-
192
- - **Word wrapping** -- text that breaks mid-word or overflows its container
193
- - **Cramped text** -- content too dense for the slide area
194
- - **Leftover placeholders** -- dummy text ("Lorem ipsum", "Firstname Lastname") or a placeholder logo that should have been swapped
195
- - **Cut-off content** -- text or images clipped at slide edges
196
-
197
- If you spot issues, reduce content, switch layouts, or split into multiple slides. Rebuild and re-check.
198
-
199
- ### Content Review (Use Subagents)
200
-
201
- **Use subagents for review** -- even for short decks. You've been staring at the content and will see what you expect, not what's there. Subagents have fresh eyes.
202
-
203
- After a successful build, spawn a subagent:
204
-
205
- ```
206
- Review this deck. Assume there are issues -- find them.
207
-
208
- Check for:
209
- - Slides where content overflows its slot (more bullets/stats/rows than the region holds)
210
- - Same layout repeated multiple times with no variety
211
- - Content that doesn't match the layout's slots (check `accepts` in manifest.json)
212
- - Leftover placeholder logos or dummy text in the rendered images
213
-
214
- For each issue, suggest a specific fix.
215
-
216
- Read: /path/to/deck.md and the rendered PNGs in the working directory
217
- Also read: manifest.json (for layout documentation); search assets.json for pictures
218
- ```
219
-
220
- If the subagent finds issues, fix them and rebuild.
221
-
222
- ---
223
-
224
- ## Full Example
225
-
226
- See [syntax.md](syntax.md#full-example) for a complete multi-slide deck example.