storyink 0.3.6 → 0.4.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/CHANGELOG.md +26 -0
- package/README.md +28 -2
- package/dist/chunks/index-e919a5xm.js +10375 -0
- package/dist/chunks/{index-drzd6nt1.js → index-p76hjvyg.js} +1 -1
- package/dist/cli.js +3266 -215
- package/dist/core/index.js +7 -1
- package/dist/index.js +8 -2
- package/dist/node/index.js +2 -2
- package/dist/types/core/anchor.d.ts +20 -0
- package/dist/types/core/layout/panels.d.ts +19 -0
- package/dist/types/core/layout/tokenize.d.ts +6 -0
- package/dist/types/core/render/Diagram.d.ts +14 -2
- package/dist/types/core/render/Story.d.ts +2 -0
- package/dist/types/core/render/css.d.ts +4 -2
- package/dist/types/core/render/icons.d.ts +8 -0
- package/dist/types/core/render/index.d.ts +2 -0
- package/dist/types/core/render/smil.d.ts +1 -1
- package/dist/types/core/scene.d.ts +69 -2
- package/dist/types/core/spec.d.ts +115 -3
- package/dist/types/core/story/compile.d.ts +6 -1
- package/dist/types/core/story/content-state.d.ts +28 -0
- package/dist/types/core/story/content.d.ts +150 -0
- package/dist/types/core/story/types.d.ts +142 -1
- package/dist/types/generated/meta.d.ts +1 -1
- package/dist/types/generated/viewer.d.ts +1 -1
- package/dist/types/theme/tokens.d.ts +50 -4
- package/docs/spec.md +116 -4
- package/examples/agent-session.architecture.json +33 -0
- package/examples/code-mode.architecture.json +89 -0
- package/examples/failover.dataflow.json +38 -0
- package/examples/retry-helper.architecture.json +56 -0
- package/package.json +1 -1
- package/schema/storyink.schema.json +482 -54
- package/skill/SKILL.md +44 -3
- package/dist/chunks/index-3d2xhymt.js +0 -7323
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
- **Rich nodes** (architecture, dataflow, workflow): `panel` (window with rows: `tag`, `icon`,
|
|
6
|
+
`text`, `detail`, `status`, `indent`, `muted`), `code` (syntax-coloured program, `lang`
|
|
7
|
+
ts|js|json|text) and `chip` (icon + label, `stack` 1..3); `size: { cols, lines }` reserves body
|
|
8
|
+
space; `icon` set (wrench plug file terminal search globe bolt user spark); `muted` nodes; bare
|
|
9
|
+
groups (`bare: true`, heading only).
|
|
10
|
+
- **Anchors**: edges and story targets may name a panel row (`node#row`) or a code line
|
|
11
|
+
(`node#3`); wires attach at that row/line.
|
|
12
|
+
- **Content steps**: `type` (char typing with caret for code, `cps` / `duration`; word typing for
|
|
13
|
+
rows), `set` / `clear` (crossfade), `line` (active-line bar), `status` (spinner + shimmer, check,
|
|
14
|
+
cross), `dim` / `undim` (levels, independent of `hide` / `show`), `wire` / `unwire`, `glow` /
|
|
15
|
+
`unglow`, `focus`. Pulses gain `reverse` and `delay`. Story options `spotlight` and
|
|
16
|
+
`rewind: "glitch"` (HTML only). Typing speed is not scaled by `pace`. Warnings when the end state
|
|
17
|
+
still shows a spinner or a glow.
|
|
18
|
+
- **Animated SVG** covers the new content (typing clips, caret, crossfades, line bar, status,
|
|
19
|
+
shimmer, levels, wire/unwire, glows, spotlight) with the final frame still the static diagram.
|
|
20
|
+
Checked in headless Chrome (frame parity, `<img>` playback, loop return); Firefox plays it;
|
|
21
|
+
Safari untested.
|
|
22
|
+
- Four examples: `code-mode.architecture`, `retry-helper.architecture`,
|
|
23
|
+
`agent-session.architecture`, `failover.dataflow`; animated SVGs in `docs/gallery/`.
|
|
24
|
+
- Fix: with reading holds (pace > 0), a step with an absolute `at` inside a beat stayed at its
|
|
25
|
+
authored time while its beat was pushed later, so it ran out of order and → / ← could stop with
|
|
26
|
+
pulses mid-wire. It now keeps its authored offset from the previous step.
|
|
27
|
+
- Docs: `story` is no longer described as reserved; `#t=` documented as a seek.
|
|
28
|
+
|
|
3
29
|
## 0.3.6
|
|
4
30
|
|
|
5
31
|
- **Default `story.pace` is 0.6** (was 1): shorter reading holds after each beat. `pace: 1` gives
|
package/README.md
CHANGED
|
@@ -148,7 +148,26 @@ and a drag pauses following until the next step that is out of view. Toggle it w
|
|
|
148
148
|
(`F`, remembered), `#camera=fit`, or `"story": { "camera": "fit" }` / `--camera fit`.
|
|
149
149
|
`storyink snapshot --camera follow --at …` captures the followed view.
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
### Rich nodes and content steps (0.4.0)
|
|
152
|
+
|
|
153
|
+
For agent sessions, generated code and tool servers, graph diagrams take `panel` (a window of
|
|
154
|
+
rows), `code` (a syntax-coloured program) and `chip` nodes, with wires anchored to a row
|
|
155
|
+
(`session#exec`) or a code line (`code#1`). Stories can then `type` code and rows, swap content
|
|
156
|
+
(`set` / `clear`), move an active-line bar (`line`), show row `status` (spinner and shimmer,
|
|
157
|
+
check, cross), `dim` / `hide` / `show`, draw or retract wires (`wire` / `unwire`), keep nodes lit
|
|
158
|
+
(`glow`), follow the action with a `spotlight`, send reverse and staggered pulses, and reset with
|
|
159
|
+
a `glitch` rewind (HTML only). Examples:
|
|
160
|
+
[code-mode](examples/code-mode.architecture.json),
|
|
161
|
+
[retry-helper](examples/retry-helper.architecture.json),
|
|
162
|
+
[agent-session](examples/agent-session.architecture.json),
|
|
163
|
+
[failover](examples/failover.dataflow.json). Details: [docs/spec.md](docs/spec.md#rich-nodes-panel-code-chip).
|
|
164
|
+
|
|
165
|
+
<picture>
|
|
166
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/gallery/code-mode.architecture.animated.dark.svg">
|
|
167
|
+
<img alt="Code mode: a session runs a program that calls MCP servers (animated)" src="docs/gallery/code-mode.architecture.animated.light.svg">
|
|
168
|
+
</picture>
|
|
169
|
+
|
|
170
|
+
The final frame is the static diagram (with content steps: the story's end state). Every frame is a pure function of time
|
|
152
171
|
(`storyState(scene, timeline, t)`), so `#t=2.5` seeks exactly and
|
|
153
172
|
`storyink snapshot --at 1,2.5,end --sheet beats` renders stills and a beat contact sheet. The
|
|
154
173
|
receipt gates check that the end frame and the reduced-motion page match the static diagram. See
|
|
@@ -184,12 +203,19 @@ storyink render examples/checkout.architecture.json --animated-svg docs/checkout
|
|
|
184
203
|
- Library: `renderAnimatedSvg(spec, { theme, once, font })` from `storyink/core`; plugin:
|
|
185
204
|
`storyink_render` with `animatedSvg: true | "both"`, `once`, `font`.
|
|
186
205
|
- GitHub's image proxy caches by URL: when a diagram changes, give it a new file name (or URL).
|
|
206
|
+
- Rich content (typing, status glyphs, line bars, spotlight) animates too. Frame parity is checked
|
|
207
|
+
in headless Chrome; Firefox plays it in `<img>`; Safari is untested. The glitch rewind and the
|
|
208
|
+
follow camera are HTML-only.
|
|
187
209
|
|
|
188
210
|
## Gallery
|
|
189
211
|
|
|
190
212
|
`bun run gallery` renders every example and Mermaid sample and writes one light and one dark PNG per
|
|
191
213
|
example to `docs/gallery/`. `bun run gallery:animated` writes the animated SVGs of the story
|
|
192
|
-
examples (`*.animated.light.svg` / `*.animated.dark.svg
|
|
214
|
+
examples (`*.animated.light.svg` / `*.animated.dark.svg`; `--only name,…` writes just those);
|
|
215
|
+
animated: [code-mode](docs/gallery/code-mode.architecture.animated.light.svg),
|
|
216
|
+
[failover](docs/gallery/failover.dataflow.animated.light.svg),
|
|
217
|
+
[retry-helper](docs/gallery/retry-helper.architecture.animated.light.svg),
|
|
218
|
+
[agent-session](docs/gallery/agent-session.architecture.animated.light.svg). `bun run verify:smil` checks them in
|
|
193
219
|
headless Chrome (frame parity with the viewer's frames, `<img>` playback, embedded font).
|
|
194
220
|
|
|
195
221
|
| | |
|