@glissade/react 0.2.0 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +24 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # @glissade/react
2
+
3
+ Thin React adapters over the signal graph via `useSyncExternalStore` — components re-render only when a value actually changes. Includes the v2 machine hooks, typed structurally so this package never depends on `@glissade/interact`.
4
+
5
+ ```sh
6
+ npm i @glissade/react
7
+ ```
8
+
9
+ ```ts
10
+ import { useSignalValue, usePlayhead, useMachineState, useInput } from '@glissade/react';
11
+
12
+ const t = usePlayhead(player);
13
+ const state = useMachineState(machine); // 'idle' | 'hover' | ...
14
+ const [hovered, setHovered] = useInput(machine, 'hovered');
15
+ ```
16
+
17
+ ## Part of glissade
18
+
19
+ *(glide & slide)* — programmatic motion graphics for TypeScript: realtime-first in any web page, deterministic headless video export from the same code, a visual studio over the same document. No generator functions.
20
+
21
+ - [Repository & full README](https://github.com/tyevco/glissade)
22
+ - [Getting started](https://github.com/tyevco/glissade/blob/main/docs/getting-started.md) · [Concepts](https://github.com/tyevco/glissade/blob/main/docs/concepts.md) · [Interactivity](https://github.com/tyevco/glissade/blob/main/docs/interactivity.md)
23
+
24
+ Apache-2.0.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissade/react",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "glissade React bindings: signals via useSyncExternalStore, player hooks.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -15,8 +15,8 @@
15
15
  "dist"
16
16
  ],
17
17
  "dependencies": {
18
- "@glissade/core": "0.2.0",
19
- "@glissade/player": "0.2.0"
18
+ "@glissade/core": "0.3.0",
19
+ "@glissade/player": "0.3.0"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "react": ">=18"