@particle-academy/fancy-slides 0.3.0 → 0.5.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.
- package/README.md +35 -0
- package/dist/index.cjs +570 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +139 -10
- package/dist/index.d.ts +139 -10
- package/dist/index.js +563 -65
- package/dist/index.js.map +1 -1
- package/dist/registry.d.cts +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/{types-B2ecrEAz.d.cts → types-9BbelJX1.d.cts} +42 -1
- package/dist/{types-B2ecrEAz.d.ts → types-9BbelJX1.d.ts} +42 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -81,6 +81,41 @@ See `docs/human-plus.md` for the full contract.
|
|
|
81
81
|
| `shape` | SVG primitives (rect, ellipse, line, arrow) | |
|
|
82
82
|
| `embed` | iframe | for video / external |
|
|
83
83
|
|
|
84
|
+
## Build animations
|
|
85
|
+
|
|
86
|
+
Any element can carry an `animation` to reveal it as an entrance "build step",
|
|
87
|
+
the way PowerPoint/Keynote builds work:
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
element.animation = {
|
|
91
|
+
effect: "fly-in", // "fade" | "fly-in" | "zoom" | "wipe"
|
|
92
|
+
trigger: "on-click", // "on-click" (new step) | "with-prev" | "after-prev"
|
|
93
|
+
direction: "left", // for fly-in / wipe
|
|
94
|
+
duration: 500, // ms
|
|
95
|
+
delay: 0, // ms
|
|
96
|
+
order: 0, // build order, ascending; ties broken by element index
|
|
97
|
+
byParagraph: false, // text only — reveal one line/bullet per click
|
|
98
|
+
};
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
For a **text** element you can set `byParagraph: true` to reveal it one
|
|
102
|
+
paragraph at a time (PowerPoint/Google Slides "By paragraph"). The element's
|
|
103
|
+
`content` is split on `"\n"` (a trailing empty line is dropped) and expands into
|
|
104
|
+
one build per line — the first line uses the element's own `trigger`, every
|
|
105
|
+
subsequent line reveals on a fresh click. Each markdown line renders through the
|
|
106
|
+
normal path, so a `- …` bullet line builds in as its own item. Toggle it from
|
|
107
|
+
the Build tab when a text element has an effect selected.
|
|
108
|
+
|
|
109
|
+
A slide's builds group into *click steps*: the first build and every
|
|
110
|
+
`on-click` build opens a new step; `with-prev` plays alongside that step's lead
|
|
111
|
+
and `after-prev` follows it. In `SlideViewer` / `PresenterView`, → / Space /
|
|
112
|
+
click fires the next step, then advances to the next slide once all builds have
|
|
113
|
+
run; ← steps back a whole slide shown fully built. Elements with no `animation`
|
|
114
|
+
are always visible; the editor canvas always shows everything. All effects are
|
|
115
|
+
pure CSS and honor `prefers-reduced-motion: reduce`. Edit builds in the
|
|
116
|
+
inspector's **Build** tab (per element) and the **Build order** list in slide
|
|
117
|
+
settings.
|
|
118
|
+
|
|
84
119
|
## Theme
|
|
85
120
|
|
|
86
121
|
```ts
|