@markgrafhq/markgraf-react 0.1.11 → 0.1.13

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 CHANGED
@@ -23,7 +23,7 @@ Headless component — renders a `<canvas>` (default) or `<svg>` with the scene
23
23
  import { MarkgrafPlayer } from "@markgrafhq/markgraf-react";
24
24
 
25
25
  const src = `seed 1
26
- frame v1 {
26
+ keyframe v1 {
27
27
  +node client "Client"
28
28
  +node api "API"
29
29
  +edge client api
@@ -51,6 +51,8 @@ export interface UseMarkgrafOptions<R extends "canvas" | "svg" = "canvas"> {
51
51
  theme?: "light" | "dark" | "blueprint";
52
52
  /** When `true`, skip the background fill so the page bg shows through. */
53
53
  transparent?: boolean;
54
+ /** When `true`, the player holds on its current frame; `false` resumes. */
55
+ paused?: boolean;
54
56
  }
55
57
 
56
58
  /**
@@ -88,14 +90,8 @@ export interface MarkgrafPlayerProps {
88
90
  transparent?: boolean;
89
91
  width?: number;
90
92
  height?: number;
91
- /**
92
- * Map of keyframe names to callbacks. Each callback fires once when the
93
- * player enters that keyframe (not on every animation frame). Callbacks
94
- * registered when the player is already in the matching frame fire
95
- * immediately. Use `useMarkgraf` if you need more control (e.g. pausing
96
- * from the callback).
97
- */
98
- onFrameEnter?: Record<string, () => void>;
93
+ /** When `true`, the player holds on its current frame; `false` resumes. */
94
+ paused?: boolean;
99
95
  }
100
96
 
101
97
  /**