eidotter 0.27.1 → 0.29.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.
@@ -23,6 +23,36 @@ export interface RetroEffectsProps {
23
23
  * Whether the CRT is powered on. Animates on/off transitions.
24
24
  */
25
25
  powered?: boolean;
26
+ /**
27
+ * Play the CGA monitor boot sequence once on mount (~650ms): an amber
28
+ * ignition line stretches across the center, the black raster opens from
29
+ * it, and a warm phosphor glow settles. Skipped entirely under
30
+ * prefers-reduced-motion. Opt-in; intended as the portfolio-wide launch
31
+ * pattern (DMNC-1047).
32
+ */
33
+ boot?: boolean;
34
+ /**
35
+ * Gate `boot` to once per browser tab/session (via sessionStorage). The boot
36
+ * sequence plays on the first load of a tab and is suppressed on every
37
+ * subsequent mount within the same tab — both SPA route changes and MPA
38
+ * full-reload navigation. A new tab/visit replays it; a hard refresh does not.
39
+ * No-op unless `boot` is also set. Falls back to playing if storage is
40
+ * unavailable (e.g. private mode).
41
+ *
42
+ * Like `boot`, this is evaluated once on mount; changing it afterwards has no
43
+ * effect (remount the component — e.g. via `key` — to re-evaluate).
44
+ */
45
+ bootOnce?: boolean;
46
+ /**
47
+ * sessionStorage key used by `bootOnce`. Defaults to `'eidotter:retro-boot'`.
48
+ * Override to scope the once-per-session flag independently, or to force a
49
+ * replay (e.g. a fresh key in a Storybook story). Read once on mount.
50
+ *
51
+ * Instances that mount simultaneously and share a key share one flag (the
52
+ * intended single-overlay case); give each a distinct key if they must gate
53
+ * independently.
54
+ */
55
+ bootStorageKey?: string;
26
56
  /**
27
57
  * Intensity of the effects (0-1)
28
58
  */
@@ -43,6 +73,10 @@ export interface RetroEffectsProps {
43
73
  * Callback when power-off animation completes
44
74
  */
45
75
  onPowerOff?: () => void;
76
+ /**
77
+ * Callback when the boot sequence completes (or is skipped)
78
+ */
79
+ onBootComplete?: () => void;
46
80
  }
47
81
  /**
48
82
  * CRT Monitor Effects component for authentic DOS terminal aesthetics