@markdy/renderer-dom 0.7.25 → 0.7.26
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 +30 -5
- package/dist/index.js +592 -659
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -92,14 +92,39 @@ player.destroy(); // clean up DOM + cancel animations
|
|
|
92
92
|
|
|
93
93
|
```
|
|
94
94
|
src/
|
|
95
|
-
types.ts — ActorState, FaceSwap, easing utilities
|
|
96
|
-
figure.ts — Stick-figure DOM factory (emoji body parts)
|
|
97
|
-
actors.ts — Actor element factory (sprite, text, figure, box)
|
|
98
|
-
animations.ts — Timeline → WAAPI Animation builder
|
|
99
|
-
player.ts — Public API, rAF loop, face-swap engine
|
|
100
95
|
index.ts — Barrel exports
|
|
96
|
+
player.ts — Public API, rAF loop, face-swap engine
|
|
97
|
+
animations.ts — Timeline walker: dispatches each event to its handler
|
|
98
|
+
actions/
|
|
99
|
+
context.ts — ActionContext: the one argument every handler receives
|
|
100
|
+
registry.ts — Action name → handler table
|
|
101
|
+
transform.ts — move, enter, exit, fade, scale, rotate, shake, jump, bounce
|
|
102
|
+
figure.ts — Figure-only gestures and limb articulation
|
|
103
|
+
speech.ts — say (speech bubbles)
|
|
104
|
+
projectile.ts — throw
|
|
105
|
+
flow.ts — request / response / emit (system-diagram edges)
|
|
106
|
+
geometry/
|
|
107
|
+
rect.ts — Actor bounds and hit-testing (DOM-free, unit tested)
|
|
108
|
+
path.ts — Polyline measurement and obstacle-aware edge routing
|
|
109
|
+
camera.ts — pan / zoom / shake on the scene-content layer
|
|
110
|
+
stage.ts — t=0 staging and off-screen placement
|
|
111
|
+
theme.ts — Scene-adaptive colors for renderer-drawn chrome
|
|
112
|
+
actors.ts — Actor element factory (sprite, text, figure, box, caption)
|
|
113
|
+
figure.ts — Stick-figure DOM factory (emoji body parts)
|
|
114
|
+
types.ts — ActorState, FaceSwap, easing utilities
|
|
101
115
|
```
|
|
102
116
|
|
|
117
|
+
### Adding an action
|
|
118
|
+
|
|
119
|
+
1. Write a handler — a function taking `ActionContext` — in the relevant
|
|
120
|
+
`actions/` module (or a new one).
|
|
121
|
+
2. Register it by name in `actions/registry.ts`.
|
|
122
|
+
3. Add the name to the matching list in `@markdy/core`'s `registry.ts` so the
|
|
123
|
+
parser accepts it.
|
|
124
|
+
|
|
125
|
+
Step 3 is enforced: `tests/action-coverage.test.ts` fails the build if the
|
|
126
|
+
parser accepts an action the renderer can't draw, or vice versa.
|
|
127
|
+
|
|
103
128
|
## Documentation
|
|
104
129
|
|
|
105
130
|
- **[Syntax Reference](../../docs/SYNTAX.md)** — complete DSL language spec
|