@walkeros/web-source-browser 4.0.0-next-1773967844643 → 4.0.0-next-1777463920154

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/dist/dev.d.mts CHANGED
@@ -56,6 +56,16 @@ declare namespace index$1 {
56
56
  export { index$1_DataAttributePrefix as DataAttributePrefix, index$1_JavaScriptVarName as JavaScriptVarName, index$1_ScopeSelector as ScopeSelector, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, type index$1_TaggerConfig as TaggerConfig, index$1_TaggerSchema as TaggerSchema, index$1_settings as settings, index$1_tagger as tagger };
57
57
  }
58
58
 
59
+ declare module '@walkeros/core' {
60
+ interface SourceMap {
61
+ browser: {
62
+ type: 'browser';
63
+ platform: 'web';
64
+ url?: string;
65
+ referrer?: string;
66
+ };
67
+ }
68
+ }
59
69
  interface Env extends Source.BaseEnv {
60
70
  elb: Elb.Fn;
61
71
  window?: Window & typeof globalThis;
@@ -97,13 +107,18 @@ declare namespace step {
97
107
  /**
98
108
  * Browser source createTrigger.
99
109
  *
100
- * Injects HTML into the DOM, lazily starts the flow, then dispatches
101
- * native browser events. Mirrors real-world behavior: HTML exists on
102
- * the page, walker.js loads, source scans DOM and sets up listeners.
110
+ * Injects HTML into the DOM, lazily starts the flow, then calls
111
+ * handleTrigger directly the same convergence point as production.
112
+ * For load triggers, the source's DOM scan during startFlow handles
113
+ * event capture automatically.
103
114
  *
104
115
  * @example
105
116
  * const { trigger } = await createTrigger(config);
106
- * await trigger('click', 'button')('<button data-elb="cta">Click</button>');
117
+ * await trigger('click', 'button')('<button data-elb="cta" data-elbaction="click:cta click">Click</button>');
118
+ *
119
+ * @example
120
+ * // Impression trigger — handleTrigger reads data-elbaction directly
121
+ * await trigger('impression', '[data-elb="promo"]')('<div data-elb="promo" data-elbaction="visible:promo seen">Ad</div>');
107
122
  */
108
123
  declare const createTrigger: Trigger.CreateFn<string, void>;
109
124
  /**
package/dist/dev.d.ts CHANGED
@@ -56,6 +56,16 @@ declare namespace index$1 {
56
56
  export { index$1_DataAttributePrefix as DataAttributePrefix, index$1_JavaScriptVarName as JavaScriptVarName, index$1_ScopeSelector as ScopeSelector, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, type index$1_TaggerConfig as TaggerConfig, index$1_TaggerSchema as TaggerSchema, index$1_settings as settings, index$1_tagger as tagger };
57
57
  }
58
58
 
59
+ declare module '@walkeros/core' {
60
+ interface SourceMap {
61
+ browser: {
62
+ type: 'browser';
63
+ platform: 'web';
64
+ url?: string;
65
+ referrer?: string;
66
+ };
67
+ }
68
+ }
59
69
  interface Env extends Source.BaseEnv {
60
70
  elb: Elb.Fn;
61
71
  window?: Window & typeof globalThis;
@@ -97,13 +107,18 @@ declare namespace step {
97
107
  /**
98
108
  * Browser source createTrigger.
99
109
  *
100
- * Injects HTML into the DOM, lazily starts the flow, then dispatches
101
- * native browser events. Mirrors real-world behavior: HTML exists on
102
- * the page, walker.js loads, source scans DOM and sets up listeners.
110
+ * Injects HTML into the DOM, lazily starts the flow, then calls
111
+ * handleTrigger directly the same convergence point as production.
112
+ * For load triggers, the source's DOM scan during startFlow handles
113
+ * event capture automatically.
103
114
  *
104
115
  * @example
105
116
  * const { trigger } = await createTrigger(config);
106
- * await trigger('click', 'button')('<button data-elb="cta">Click</button>');
117
+ * await trigger('click', 'button')('<button data-elb="cta" data-elbaction="click:cta click">Click</button>');
118
+ *
119
+ * @example
120
+ * // Impression trigger — handleTrigger reads data-elbaction directly
121
+ * await trigger('impression', '[data-elb="promo"]')('<div data-elb="promo" data-elbaction="visible:promo seen">Ad</div>');
107
122
  */
108
123
  declare const createTrigger: Trigger.CreateFn<string, void>;
109
124
  /**