storyink 0.3.0 → 0.3.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.
- package/CHANGELOG.md +23 -0
- package/README.md +10 -2
- package/dist/chunks/{index-060cd52n.js → index-6h5ajcgs.js} +224 -51
- package/dist/chunks/{index-zjyrjkn6.js → index-b50m4vmv.js} +19 -4
- package/dist/cli.js +251 -54
- package/dist/core/index.js +13 -1
- package/dist/index.js +24 -2
- package/dist/node/index.js +4 -2
- package/dist/types/core/index.d.ts +1 -1
- package/dist/types/core/render/App.d.ts +12 -0
- package/dist/types/core/render/Story.d.ts +2 -1
- package/dist/types/core/spec.d.ts +10 -1
- package/dist/types/core/story/state.d.ts +32 -0
- package/dist/types/core/story/types.d.ts +2 -0
- package/dist/types/generated/meta.d.ts +1 -1
- package/dist/types/generated/viewer.d.ts +1 -1
- package/dist/types/node/index.d.ts +5 -0
- package/dist/types/node/snapshot.d.ts +2 -0
- package/docs/spec.md +34 -1
- package/package.json +3 -2
- package/schema/storyink.schema.json +158 -142
- package/skill/SKILL.md +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
- **Fix: Play did nothing under reduced motion.** With Reduce Motion on (OS or `#motion=reduced`),
|
|
6
|
+
Play now walks the story step by step ("Play steps"): each step's settled state at once (reveals,
|
|
7
|
+
landed pulses, counters, the whole caption), held for its reading time (caption read time or
|
|
8
|
+
1.5 s), then the next, ending on the final frame. No pulses, trails, glows or tweens. Pause, ←/→,
|
|
9
|
+
Shift+←/→, R (restart from step 1, no rewind) and the scrubber work on settled steps. The page
|
|
10
|
+
loads on the final frame with a static play button; `autoplay` is ignored.
|
|
11
|
+
- **`story.motion`: `"full"` (default) | `"reduced"` | `"system"`.** Full motion is the default and
|
|
12
|
+
**ignores the reader's OS reduced-motion setting**; `"system"` restores the 0.3.0 behaviour
|
|
13
|
+
(follow `prefers-reduced-motion`), `"reduced"` always steps. Auto stories:
|
|
14
|
+
`{ "steps": "auto", "motion": … }`, `render --motion …`, tool `storyink_render` `motion`.
|
|
15
|
+
Precedence: `#motion=` > the reader's toolbar choice > `story.motion` > OS (only for `"system"`).
|
|
16
|
+
- Viewer toolbar: **Motion: full / reduced** toggle (`aria-pressed`, shortcut `M`), saved in
|
|
17
|
+
`localStorage`; `#motion=` still wins. Switching mid-playback continues from the current step.
|
|
18
|
+
- Core: `steppedSchedule`, `steppedTime`, `steppedIndex`, `steppedStop`, `STEP_BEAT` and
|
|
19
|
+
`storyState(…, { stepped: true })`.
|
|
20
|
+
- Snapshot: `--motion reduced` (tool `motion`) captures stepped `at` frames; new gate `reduced=stepped`.
|
|
21
|
+
- Fix: live counter reels were placed at the node-local position (top-left of the diagram) and
|
|
22
|
+
shown before their node was revealed; they now sit on their node and follow its reveal.
|
|
23
|
+
`bun run verify:viewer` checks this in headless Chrome (full play, reduced → full, reload,
|
|
24
|
+
resize, theme toggle) along with stepped playback.
|
|
25
|
+
|
|
3
26
|
## 0.3.0
|
|
4
27
|
|
|
5
28
|
- **Animated SVG (SMIL):** the story plays inside a plain `<img>`, so in GitHub READMEs and PR
|
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ storyink render <in.json|in.mmd|-> [-o out.html] [--svg out.svg] [--theme light|
|
|
|
52
52
|
storyink mermaid <in.mmd> [-o out.json]
|
|
53
53
|
storyink validate <in> [--json]
|
|
54
54
|
storyink snapshot <out.html> [--theme light,dark] [--width N] [--sheet [themes|beats]|--no-sheet] [--at 0.5,1.2,end] [--scale 2] [-o dir] [--json]
|
|
55
|
-
[--preview out.jpg [--preview-size 1024]]
|
|
55
|
+
[--preview out.jpg [--preview-size 1024]] [--motion reduced]
|
|
56
56
|
storyink skill
|
|
57
57
|
```
|
|
58
58
|
|
|
@@ -122,7 +122,15 @@ Add a `story` to play a diagram as a sequence of beats in the HTML viewer:
|
|
|
122
122
|
|
|
123
123
|
`"story": "auto"` (or `--story auto`) derives the beats from the graph or message order. Playback
|
|
124
124
|
has a click-to-play gate, play/pause, a tape-rewind replay and a scrubber with step and chapter
|
|
125
|
-
ticks. Space, ←/→ and R control it.
|
|
125
|
+
ticks. Space, ←/→ and R control it.
|
|
126
|
+
|
|
127
|
+
Motion is **full by default, even when the reader's system asks for reduced motion**. Authors can
|
|
128
|
+
set `"story": { "motion": "reduced" }` (always step by step) or `"motion": "system"` (follow
|
|
129
|
+
`prefers-reduced-motion`); `--motion full|reduced|system` on `render` does the same, including
|
|
130
|
+
for auto stories. Readers switch with the toolbar's **Motion** toggle (`M`, remembered), and
|
|
131
|
+
`#motion=full|reduced` overrides everything. In reduced mode Play walks the story step by step:
|
|
132
|
+
each step's settled state shown at once and held for its reading time, with no travelling pulses
|
|
133
|
+
or tweens, and the page opens on the final frame.
|
|
126
134
|
|
|
127
135
|
The final frame is always the static diagram. Every frame is a pure function of time
|
|
128
136
|
(`storyState(scene, timeline, t)`), so `#t=2.5` seeks exactly and
|