@eventop/sdk 1.2.10 → 1.2.11

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
@@ -304,6 +304,33 @@ that lives on a different page.
304
304
  Features that share the page where tours are typically started don't need `route`.
305
305
  Only add it to features on other pages.
306
306
 
307
+ ### How the registry stays aware of every page
308
+
309
+ When you navigate away from a page, its `EventopTarget` components unmount. Rather
310
+ than removing them from the registry entirely, the SDK downgrades them to **ghost
311
+ entries** — the metadata (`id`, `name`, `description`, `route`) is kept, only the
312
+ live DOM selector is nulled out.
313
+
314
+ ```
315
+ EventopTarget mounts → full entry { id, name, description, route, selector }
316
+ EventopTarget unmounts → ghost entry { id, name, description, route, selector: null }
317
+ EventopTarget remounts → full entry (selector restored)
318
+ ```
319
+
320
+ This means the AI system prompt always contains every feature the app has ever
321
+ rendered, regardless of which page you're currently on. The AI can plan cross-page
322
+ tours from any starting point without you doing anything extra.
323
+
324
+ The selector is resolved lazily — after navigation completes and the target page's
325
+ components remount, the ghost upgrades back to a full entry and the tour picks up
326
+ the correct selector just before showing the step.
327
+
328
+ > **Note on `id` stability** — ghost entries accumulate for the lifetime of the
329
+ > session, so `id` should identify a **UI capability**, not a data record.
330
+ > Wrapping dynamic list items with unique ids (e.g. `` `project-${p.id}` ``)
331
+ > will create an unbounded number of ghosts. Use a single `EventopTarget` for
332
+ > the repeating pattern instead.
333
+
307
334
  ---
308
335
 
309
336
  ## Multi-step flows
package/dist/index.cjs CHANGED
@@ -78,7 +78,13 @@ function createFeatureRegistry() {
78
78
  notify();
79
79
  }
80
80
  function unregisterFeature(id) {
81
- features.delete(id);
81
+ features.set(id, {
82
+ ...existing,
83
+ selector: null,
84
+ advanceOn: null,
85
+ waitFor: null,
86
+ _ghost: true
87
+ });
82
88
  flowSteps.delete(id);
83
89
  notify();
84
90
  }
package/dist/index.js CHANGED
@@ -76,7 +76,13 @@ function createFeatureRegistry() {
76
76
  notify();
77
77
  }
78
78
  function unregisterFeature(id) {
79
- features.delete(id);
79
+ features.set(id, {
80
+ ...existing,
81
+ selector: null,
82
+ advanceOn: null,
83
+ waitFor: null,
84
+ _ghost: true
85
+ });
80
86
  flowSteps.delete(id);
81
87
  notify();
82
88
  }
@@ -78,7 +78,13 @@ function createFeatureRegistry() {
78
78
  notify();
79
79
  }
80
80
  function unregisterFeature(id) {
81
- features.delete(id);
81
+ features.set(id, {
82
+ ...existing,
83
+ selector: null,
84
+ advanceOn: null,
85
+ waitFor: null,
86
+ _ghost: true
87
+ });
82
88
  flowSteps.delete(id);
83
89
  notify();
84
90
  }
@@ -76,7 +76,13 @@ function createFeatureRegistry() {
76
76
  notify();
77
77
  }
78
78
  function unregisterFeature(id) {
79
- features.delete(id);
79
+ features.set(id, {
80
+ ...existing,
81
+ selector: null,
82
+ advanceOn: null,
83
+ waitFor: null,
84
+ _ghost: true
85
+ });
80
86
  flowSteps.delete(id);
81
87
  notify();
82
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventop/sdk",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "AI-powered guided tours for any web app. Drop-in, themeable, provider-agnostic.",
5
5
  "keywords": [
6
6
  "onboarding",