@walkeros/web-source-browser 3.1.1 → 3.2.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.
package/dist/index.d.mts CHANGED
@@ -130,13 +130,18 @@ declare namespace step {
130
130
  /**
131
131
  * Browser source createTrigger.
132
132
  *
133
- * Injects HTML into the DOM, lazily starts the flow, then dispatches
134
- * native browser events. Mirrors real-world behavior: HTML exists on
135
- * the page, walker.js loads, source scans DOM and sets up listeners.
133
+ * Injects HTML into the DOM, lazily starts the flow, then calls
134
+ * handleTrigger directly the same convergence point as production.
135
+ * For load triggers, the source's DOM scan during startFlow handles
136
+ * event capture automatically.
136
137
  *
137
138
  * @example
138
139
  * const { trigger } = await createTrigger(config);
139
- * await trigger('click', 'button')('<button data-elb="cta">Click</button>');
140
+ * await trigger('click', 'button')('<button data-elb="cta" data-elbaction="click:cta click">Click</button>');
141
+ *
142
+ * @example
143
+ * // Impression trigger — handleTrigger reads data-elbaction directly
144
+ * await trigger('impression', '[data-elb="promo"]')('<div data-elb="promo" data-elbaction="visible:promo seen">Ad</div>');
140
145
  */
141
146
  declare const createTrigger: Trigger$1.CreateFn<string, void>;
142
147
  /**
@@ -155,7 +160,7 @@ declare namespace index {
155
160
 
156
161
  declare function getElbAttributeName(prefix: string, name?: string, isProperty?: boolean): string;
157
162
  declare function getElbValues(prefix: string, element: Element, name: string, isProperty?: boolean): WalkerOS.Properties;
158
- declare function getAllEvents(scope?: Scope, prefix?: string): Walker.Events;
163
+ declare function getAllEvents(scope: Scope, prefix?: string): Walker.Events;
159
164
  declare function getEvents(target: Element, trigger: string, prefix?: string): Walker.Events;
160
165
  declare function getGlobals(prefix?: string, scope?: Scope): WalkerOS.Properties;
161
166
 
package/dist/index.d.ts CHANGED
@@ -130,13 +130,18 @@ declare namespace step {
130
130
  /**
131
131
  * Browser source createTrigger.
132
132
  *
133
- * Injects HTML into the DOM, lazily starts the flow, then dispatches
134
- * native browser events. Mirrors real-world behavior: HTML exists on
135
- * the page, walker.js loads, source scans DOM and sets up listeners.
133
+ * Injects HTML into the DOM, lazily starts the flow, then calls
134
+ * handleTrigger directly the same convergence point as production.
135
+ * For load triggers, the source's DOM scan during startFlow handles
136
+ * event capture automatically.
136
137
  *
137
138
  * @example
138
139
  * const { trigger } = await createTrigger(config);
139
- * await trigger('click', 'button')('<button data-elb="cta">Click</button>');
140
+ * await trigger('click', 'button')('<button data-elb="cta" data-elbaction="click:cta click">Click</button>');
141
+ *
142
+ * @example
143
+ * // Impression trigger — handleTrigger reads data-elbaction directly
144
+ * await trigger('impression', '[data-elb="promo"]')('<div data-elb="promo" data-elbaction="visible:promo seen">Ad</div>');
140
145
  */
141
146
  declare const createTrigger: Trigger$1.CreateFn<string, void>;
142
147
  /**
@@ -155,7 +160,7 @@ declare namespace index {
155
160
 
156
161
  declare function getElbAttributeName(prefix: string, name?: string, isProperty?: boolean): string;
157
162
  declare function getElbValues(prefix: string, element: Element, name: string, isProperty?: boolean): WalkerOS.Properties;
158
- declare function getAllEvents(scope?: Scope, prefix?: string): Walker.Events;
163
+ declare function getAllEvents(scope: Scope, prefix?: string): Walker.Events;
159
164
  declare function getEvents(target: Element, trigger: string, prefix?: string): Walker.Events;
160
165
  declare function getGlobals(prefix?: string, scope?: Scope): WalkerOS.Properties;
161
166