@jokerized/decksmith 0.7.0 → 0.9.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 (48) hide show
  1. package/README.md +144 -8
  2. package/dist/cli.js +4582 -712
  3. package/dist/deck-runtime.js +70 -2
  4. package/dist/index.js +4608 -708
  5. package/dist/mcp.js +4254 -759
  6. package/dist/types/build/files.d.ts +13 -1
  7. package/dist/types/deck/motion.d.ts +64 -0
  8. package/dist/types/deck/playback.d.ts +206 -0
  9. package/dist/types/deck/repack.d.ts +10 -0
  10. package/dist/types/deck/runtime.d.ts +96 -1
  11. package/dist/types/deck/subtitles.d.ts +29 -1
  12. package/dist/types/emit/archetypes/annotated-figure.d.ts +1 -1
  13. package/dist/types/emit/archetypes/bar-compare.d.ts +0 -28
  14. package/dist/types/emit/archetypes/callout.d.ts +0 -5
  15. package/dist/types/emit/archetypes/claim-figure.d.ts +15 -0
  16. package/dist/types/emit/archetypes/equation-morph.d.ts +40 -0
  17. package/dist/types/emit/archetypes/equation-walk.d.ts +60 -1
  18. package/dist/types/emit/archetypes/grid.d.ts +0 -14
  19. package/dist/types/emit/archetypes/line-chart.d.ts +0 -8
  20. package/dist/types/emit/archetypes/pipeline.d.ts +15 -1
  21. package/dist/types/emit/archetypes/stack.d.ts +1 -1
  22. package/dist/types/emit/composition.d.ts +47 -2
  23. package/dist/types/emit/faces.d.ts +22 -0
  24. package/dist/types/emit/fit.d.ts +127 -0
  25. package/dist/types/emit/kit.d.ts +104 -2
  26. package/dist/types/emit/look.d.ts +138 -0
  27. package/dist/types/emit/motion.d.ts +244 -0
  28. package/dist/types/emit/svg.d.ts +54 -16
  29. package/dist/types/emit/tex.d.ts +39 -0
  30. package/dist/types/emit/theme.d.ts +1 -1
  31. package/dist/types/emit/themes/index.d.ts +19 -1
  32. package/dist/types/emit/themes/packs.d.ts +15 -0
  33. package/dist/types/emit/themes/pick.d.ts +104 -0
  34. package/dist/types/emit/type.d.ts +111 -0
  35. package/dist/types/index.d.ts +39 -2
  36. package/dist/types/plan/direct.d.ts +66 -0
  37. package/dist/types/plan/prompt.d.ts +0 -12
  38. package/dist/types/prefs.d.ts +15 -1
  39. package/dist/types/render/capture.d.ts +24 -0
  40. package/dist/types/render/timing.d.ts +16 -0
  41. package/dist/types/source/fonts.d.ts +11 -1
  42. package/dist/types/types.d.ts +38 -0
  43. package/dist/types/verify/budget.d.ts +8 -1
  44. package/dist/types/verify/fidelity.d.ts +53 -0
  45. package/dist/types/verify/fill.d.ts +205 -0
  46. package/dist/types/verify/index.d.ts +17 -0
  47. package/dist/types/verify/motion.d.ts +33 -0
  48. package/package.json +4 -1
@@ -171,6 +171,23 @@ export declare function scanRepeatedObject(storyboard: Storyboard): Finding[];
171
171
  * citing it in evidence is a different defect, and not this scan's to report.
172
172
  */
173
173
  export declare function scanUnusedFigures(storyboard: Storyboard, source: Source): Finding[];
174
+ /**
175
+ * Every equation a walk or a morph will draw, parsed now by the KaTeX the deck
176
+ * vendors, with what `build` will do about each one said in words.
177
+ *
178
+ * Run at `plan` because that is when the storyboard is in front of the author
179
+ * and the cheapest moment to change a beat. Before this, a bad formula was first
180
+ * parsed by a browser at `verify`, after a deck had been built and narrated
181
+ * around it: 26 of 92 HypePaper build failures in the week to 2026-10-07.
182
+ *
183
+ * It calls the SAME preparation the emitters call (`prepareWalk`,
184
+ * `prepareMorph`), so what it reports is what `build` will do, not a second
185
+ * opinion that can drift from it. A WARNING throughout: a repaired formula, a
186
+ * formula shown as plain source and a dropped term are all drawn without
187
+ * throwing — and a beat that will be left out is reported again, by name, when
188
+ * `build` leaves it out.
189
+ */
190
+ export declare function scanMath(storyboard: Storyboard, source: Source): Finding[];
174
191
  /**
175
192
  * Warn when the plan came back with fewer beats than were asked for.
176
193
  *
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Motion variety, measured off a built composition — the M4 exit metrics.
3
+ *
4
+ * Read from the emitted `index.html` rather than from the in-memory plan, so the
5
+ * number is about what ships: a plan that said "push" and an emitter that wrote
6
+ * a dissolve would read as a dissolve here. The three numbers are the ones the
7
+ * redesign plan set against v0.8.0's audit of 124 HypePaper scenes:
8
+ *
9
+ * | metric | v0.8.0 | v2 target |
10
+ * |--------------------------------|--------|-----------|
11
+ * | modal entrance (share) | 92% | ≤ 40% |
12
+ * | seam kinds (deck of 10+ beats) | 1 | ≥ 3 |
13
+ * | top-2 ease share of tweens | 85% | ≤ 60% |
14
+ *
15
+ * MODAL is deliberately generous to the old look: a scene "opens modal" when its
16
+ * headline enters as a bare opacity + y fade-up, whatever the ease. v2's `rise`
17
+ * verb therefore counts as modal, which is why `planMotion` caps it.
18
+ */
19
+ export interface MotionStats {
20
+ scenes: number;
21
+ /** Scenes whose headline (`#sN-h`, or the title's `#sN-t`) enters as opacity + y only. */
22
+ modalScenes: number;
23
+ /** Scenes with at least one emphasis (glow, underline, or a sine-eased pulse) after the build. */
24
+ emphasisScenes: number;
25
+ /** Seam kind per handoff, in scene order. */
26
+ seams: string[];
27
+ /** Tween count per ease name; a tween naming none is `"default"`. */
28
+ eases: Record<string, number>;
29
+ tweens: number;
30
+ }
31
+ export declare function motionStats(composition: string): MotionStats;
32
+ /** The share of tweens carried by the two most common eases. */
33
+ export declare function topTwoEaseShare(stats: MotionStats): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jokerized/decksmith",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Turn a source document into an animated explanation deck.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -58,7 +58,10 @@
58
58
  "demo": "node demo/build.mjs && node dist/cli.js build demo/storyboard.json --source demo/source.json -o demo/deck && python3 -m http.server 8080 --directory demo/deck --bind 127.0.0.1"
59
59
  },
60
60
  "dependencies": {
61
+ "@fontsource-variable/ibm-plex-sans": "5.3.0",
61
62
  "@fontsource-variable/inter": "5.3.0",
63
+ "@fontsource-variable/source-serif-4": "5.3.0",
64
+ "@fontsource-variable/space-grotesk": "5.3.0",
62
65
  "@modelcontextprotocol/sdk": "^1.30.0",
63
66
  "@puppeteer/browsers": "^3.0.6",
64
67
  "commander": "^14.0.1",