easter-egg-quest 1.0.14 → 1.0.16

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.
@@ -27,11 +27,32 @@ export declare class HiddenEntry {
27
27
  private _hintVisibleStart;
28
28
  private _hintCheckInterval;
29
29
  private _hintVisibilityHandler;
30
+ private _domObserver;
31
+ private _intersectionObserver;
32
+ private _mutationDebounce;
33
+ private _navigationHandler;
30
34
  constructor(config: ResolvedConfig, script: NarrativeScript, onFound: () => void);
31
35
  start(): void;
32
36
  cleanup(): void;
33
37
  private _possessElement;
34
38
  private _injectIntoExisting;
39
+ /**
40
+ * Watch for the injected trigger element being removed from the DOM
41
+ * (SPA re-render, route change, virtual scroll) or scrolled out of view.
42
+ *
43
+ * Uses IntersectionObserver (zero layout cost) for visibility,
44
+ * a MutationObserver on a stable ancestor (survives Angular/React re-renders),
45
+ * and navigation event listeners for SPA route changes.
46
+ */
47
+ private _startWatchdog;
48
+ /**
49
+ * Walk up the DOM to find a stable ancestor that won't be replaced
50
+ * by SPA framework routing (Angular <router-outlet>, React root, etc.).
51
+ */
52
+ private _findStableAncestor;
53
+ private _stopWatchdog;
54
+ /** Remove old trigger (if still in DOM) and re-inject into a new element. */
55
+ private _reinject;
35
56
  /**
36
57
  * Try to insert the trigger span between words inside a text node.
37
58
  * Picks a random word boundary in the element's first direct text node.
@@ -17,6 +17,7 @@ export declare class PageBreather {
17
17
  private _startTime;
18
18
  private _isUserMoving;
19
19
  private _inSync;
20
+ private _accuracy;
20
21
  /** Full breath cycle duration in ms (move half + pause half). */
21
22
  private readonly CYCLE_MS;
22
23
  start(): void;
@@ -80,6 +80,8 @@ export declare class ThreeRenderer {
80
80
  addTrail(x: number, y: number, velocity: number): void;
81
81
  /** Spawn gentle ambient particles to show stage progress. */
82
82
  showProgressParticles(progress: number): void;
83
+ /** Mark all ambient particles for rapid fade-out (rhythm lost). */
84
+ fadeOutAmbientParticles(): void;
83
85
  /** Start the finale composition. */
84
86
  startFinale(): void;
85
87
  /** Re-draw the festive (3rd) egg texture with a specific seed for uniqueness. */
@@ -90,7 +92,7 @@ export declare class ThreeRenderer {
90
92
  private _setupLights;
91
93
  private _setupEnvironment;
92
94
  private _createEggs;
93
- /** Create a tiny egg-shaped geometry (same squash as main eggs, lower poly). */
95
+ /** Create a tiny egg-shaped geometry rounder, less elongated. */
94
96
  private _createMiniEggGeo;
95
97
  /** Create a minimalist randomly-decorated mini egg material. */
96
98
  /** Create a decorated mini egg material — pastel base with visible patterns. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easter-egg-quest",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "A hidden Easter-themed narrative mini-game overlay for any website",
5
5
  "main": "dist/easter-egg-quest.umd.js",
6
6
  "module": "dist/easter-egg-quest.es.js",