@algorisys/tinyfly 0.69.0 → 0.70.2
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 +20 -7
- package/lib/browser/tinyfly.iife.js +21 -4
- package/lib/browser/tinyfly.js +1741 -1654
- package/lib/browser/tinyfly.umd.js +21 -4
- package/lib/embed/tinyfly-embed.iife.js +21 -4
- package/lib/embed/tinyfly-embed.js +971 -884
- package/lib/types/browser/index.d.ts +1 -1
- package/lib/types/embed/controls.d.ts +17 -1
- package/lib/types/embed/index.d.ts +1 -1
- package/lib/types/embed/mount.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,6 +39,7 @@ A lightweight, API-driven animation engine and visual editor for creating high-p
|
|
|
39
39
|
- **Markers and captions in the JSON** - Named steps (`pause`, `question` for predict-then-reveal) and captions per language, kept out of the tracks so translation never touches timing
|
|
40
40
|
- **A player that teaches** - Shows a real frame on load, steps between markers (`next` / `prev` / `stepMode`), respects `prefers-reduced-motion`, and pauses off screen
|
|
41
41
|
- **One-script embeds** - `tinyfly-embed.iife.js` with `data-tinyfly-auto` mounts every `[data-tinyfly-embed]` figure with step controls, announced captions and an accessible SVG, with no per-post JavaScript
|
|
42
|
+
- **Full screen** - `data-fullscreen="true"` adds a button that fills the screen with the figure, through the Fullscreen API or, on iPhone, an overlay; the drawing scales to the screen whatever the page's figure CSS says
|
|
42
43
|
- **Scenarios** - Several timelines on one figure, and the reader chooses which plays: a group of options, a stepped slider, or clickable parts of the SVG (`data-tinyfly-choose`). Switching undoes the previous scenario's drawing and keeps the reader at the same step
|
|
43
44
|
- **Authoring kit** - `lesson()` step builder and diagram primitives (array cells, pointer, stack, queue / channel, table, pipeline) in `@algorisys/tinyfly/teach`
|
|
44
45
|
- **Build tools** - `npx @algorisys/tinyfly validate` catches broken figures in CI; `render` writes a frame to static SVG for RSS, email and print
|
|
@@ -204,7 +205,7 @@ GSAP-shaped functions at the top level. Teaching embeds are included: add
|
|
|
204
205
|
itself.
|
|
205
206
|
|
|
206
207
|
```html
|
|
207
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
208
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.70.2/cdn/tinyfly.iife.js"></script>
|
|
208
209
|
<script>
|
|
209
210
|
tinyfly.to('.box', { x: 200, rotate: 90, duration: 1, ease: 'power2.out' })
|
|
210
211
|
|
|
@@ -226,7 +227,7 @@ itself.
|
|
|
226
227
|
| `cdn/tinyfly-player.iife.js` | Player only (~17 KB gzipped), for playing editor exports |
|
|
227
228
|
| `cdn/tinyfly-embed.iife.js` | Only teaching figures (~19 KB gzipped): player, step controls, auto-mount |
|
|
228
229
|
|
|
229
|
-
Replace `@v0.
|
|
230
|
+
Replace `@v0.70.2` with the version you want. **Pin a version in production**:
|
|
230
231
|
a tag's files never change, and each release's `cdn/README.md` lists an SRI hash
|
|
231
232
|
for `integrity=`. `@main` follows the latest release, which jsDelivr caches for up
|
|
232
233
|
to a day. Loading more than one bundle is safe: they add to the same `tinyfly`
|
|
@@ -240,7 +241,7 @@ A teaching figure needs no code at all:
|
|
|
240
241
|
<script type="application/json" data-tinyfly-timeline>{ …timeline JSON with markers… }</script>
|
|
241
242
|
<figcaption>Appending to a full slice</figcaption>
|
|
242
243
|
</figure>
|
|
243
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
244
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.70.2/cdn/tinyfly.iife.js" data-tinyfly-auto></script>
|
|
244
245
|
```
|
|
245
246
|
|
|
246
247
|
See [Teaching Animations](docs/teaching.md).
|
|
@@ -339,7 +340,7 @@ Without a build step, the player bundle puts the same functions on a `tinyfly` g
|
|
|
339
340
|
<div data-tinyfly="box" style="width: 60px; height: 60px; background: #4a9eff;"></div>
|
|
340
341
|
</div>
|
|
341
342
|
|
|
342
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
343
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.70.2/cdn/tinyfly-player.iife.js"></script>
|
|
343
344
|
<script>
|
|
344
345
|
tinyfly.play('#animation', './animation.json', { loop: -1 })
|
|
345
346
|
</script>
|
|
@@ -448,7 +449,7 @@ Or skip the code entirely with declarative embeds (see [Teaching Animations](doc
|
|
|
448
449
|
<svg viewBox="0 0 720 200">…</svg>
|
|
449
450
|
<script type="application/json" data-tinyfly-timeline>{ …timeline JSON… }</script>
|
|
450
451
|
</figure>
|
|
451
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
452
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.70.2/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
|
|
452
453
|
```
|
|
453
454
|
|
|
454
455
|
### Audio / Video Sync
|
|
@@ -691,6 +692,18 @@ npm run e2e
|
|
|
691
692
|
npm run build
|
|
692
693
|
```
|
|
693
694
|
|
|
695
|
+
### Publishing to npm
|
|
696
|
+
|
|
697
|
+
```bash
|
|
698
|
+
npm login # once
|
|
699
|
+
npm run release:npm # npm publish
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
`release:npm` runs `npm publish`. npm then runs the `prepublishOnly` script,
|
|
703
|
+
which runs the unit tests and `npm run build:libs`, so a failing test stops the
|
|
704
|
+
publish. npm will not publish the same version twice, so bump `version` in
|
|
705
|
+
`package.json` (and add a note under `release-notes/`) before you publish.
|
|
706
|
+
|
|
694
707
|
### Cross-browser checks
|
|
695
708
|
|
|
696
709
|
`npm run e2e` runs tinyfly in real Chromium, Firefox and WebKit and measures the
|
|
@@ -720,7 +733,7 @@ load.
|
|
|
720
733
|
|
|
721
734
|
### Test Coverage
|
|
722
735
|
|
|
723
|
-
`npm test` runs 2,
|
|
736
|
+
`npm test` runs 2,197 unit tests in 127 files, all passing:
|
|
724
737
|
|
|
725
738
|
| Area | Tests |
|
|
726
739
|
|---|---|
|
|
@@ -733,7 +746,7 @@ load.
|
|
|
733
746
|
| Drivers and interaction (`src/drivers`, `src/interaction`) | 136 |
|
|
734
747
|
| Player, media sync, sequencer, teaching and scenarios (`src/player`) | 103 |
|
|
735
748
|
| Docs viewer and `llms.txt` (`src/docs`) | 16 |
|
|
736
|
-
| Embeds, teaching kit, framework hooks, landing (`src/embed`, `src/teach`, `src/frameworks`, `src/landing`) |
|
|
749
|
+
| Embeds, teaching kit, framework hooks, landing (`src/embed`, `src/teach`, `src/frameworks`, `src/landing`) | 33 |
|
|
737
750
|
|
|
738
751
|
## Contributing
|
|
739
752
|
|