@beworke/pixel 0.1.0-rc.6 → 0.1.0-rc.8

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.
Files changed (166) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +71 -56
  3. package/RELEASE_CANDIDATE.md +47 -75
  4. package/dist/Pixel-CCgGk43j.d.ts +797 -0
  5. package/dist/Pixel-CqbgC_72.d.mts +797 -0
  6. package/dist/{StorageFactory-tjfzk57c.d.ts → StorageFactory-BRBsnnH7.d.ts} +2 -2
  7. package/dist/{StorageFactory-CPghDPBj.d.mts → StorageFactory-Dp19Wecr.d.mts} +2 -2
  8. package/dist/browser/index.cjs.js +3 -0
  9. package/dist/browser/index.cjs.js.map +1 -0
  10. package/dist/browser/index.d.mts +55 -0
  11. package/dist/browser/index.d.ts +55 -0
  12. package/dist/browser/index.esm.js +3 -0
  13. package/dist/browser/index.esm.js.map +1 -0
  14. package/dist/browser/pixel.global.js +4 -0
  15. package/dist/browser/pixel.global.js.map +1 -0
  16. package/dist/config/index.cjs.js +1 -1
  17. package/dist/config/index.cjs.js.map +1 -1
  18. package/dist/config/index.d.mts +16 -6
  19. package/dist/config/index.d.ts +16 -6
  20. package/dist/config/index.esm.js +1 -1
  21. package/dist/config/index.esm.js.map +1 -1
  22. package/dist/events/index.cjs.js.map +1 -1
  23. package/dist/events/index.d.mts +2 -2
  24. package/dist/events/index.d.ts +2 -2
  25. package/dist/events/index.esm.js.map +1 -1
  26. package/dist/examples/html-script/README.md +20 -76
  27. package/dist/examples/html-script/RELEASE_CANDIDATE.md +20 -21
  28. package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-autocomplete.html +41 -48
  29. package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-disabled.html +41 -48
  30. package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-fields.html +41 -48
  31. package/dist/examples/html-script/add-payment-info/example-add-payment-info-data-track.html +41 -48
  32. package/dist/examples/html-script/add-payment-info/example-add-payment-info-dedupe.html +41 -48
  33. package/dist/examples/html-script/add-payment-info/example-add-payment-info-manual.html +41 -48
  34. package/dist/examples/html-script/add-payment-info/example-add-payment-info-rules-card.html +41 -48
  35. package/dist/examples/html-script/add-payment-info/example-add-payment-info-security.html +41 -48
  36. package/dist/examples/html-script/add-to-cart/README.md +6 -3
  37. package/dist/examples/html-script/add-to-cart/example-add-to-cart-attribute.html +43 -49
  38. package/dist/examples/html-script/add-to-cart/example-add-to-cart-auto.html +43 -49
  39. package/dist/examples/html-script/add-to-cart/example-add-to-cart-click.html +43 -49
  40. package/dist/examples/html-script/add-to-cart/example-add-to-cart-dedupe.html +43 -49
  41. package/dist/examples/html-script/add-to-cart/example-add-to-cart-link.html +590 -0
  42. package/dist/examples/html-script/add-to-cart/example-add-to-cart-manual.html +43 -49
  43. package/dist/examples/html-script/add-to-cart/example-add-to-cart-order-bump.html +43 -49
  44. package/dist/examples/html-script/add-to-cart/example-add-to-cart-text.html +43 -49
  45. package/dist/examples/html-script/behavior/example-behavior-engagement.html +5 -5
  46. package/dist/examples/html-script/behavior/example-behavior-heartbeat.html +5 -5
  47. package/dist/examples/html-script/behavior/example-behavior-runtime-intelligence.html +5 -5
  48. package/dist/examples/html-script/behavior/example-behavior-viewport.html +5 -5
  49. package/dist/examples/html-script/behavior/example-behavior.html +1 -1
  50. package/dist/examples/html-script/buygoods/example-buygoods-checkout.html +83 -0
  51. package/dist/examples/html-script/example-basic.html +1 -1
  52. package/dist/examples/html-script/example-checkout-commerce.html +32 -31
  53. package/dist/examples/html-script/example-conversion.html +42 -49
  54. package/dist/examples/html-script/example-global-factory-classic.html +45 -0
  55. package/dist/examples/html-script/example-global-factory.html +40 -0
  56. package/dist/examples/html-script/example-integration.html +40 -46
  57. package/dist/examples/html-script/example-landing-commerce.html +45 -9
  58. package/dist/examples/html-script/example-runtime-diagnostics.html +5 -5
  59. package/dist/examples/html-script/example-transport.html +65 -58
  60. package/dist/examples/html-script/full-funnel/README.md +1 -1
  61. package/dist/examples/html-script/full-funnel/checkout.html +4 -2
  62. package/dist/examples/html-script/full-funnel/downsell.html +4 -2
  63. package/dist/examples/html-script/full-funnel/landing.html +57 -3
  64. package/dist/examples/html-script/full-funnel/thank-you.html +4 -2
  65. package/dist/examples/html-script/full-funnel/upsell.html +4 -2
  66. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-attribute.html +41 -48
  67. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-auto.html +41 -48
  68. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-click.html +41 -48
  69. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-manual.html +41 -48
  70. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-snapshot.html +41 -48
  71. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-submit.html +41 -48
  72. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-text.html +41 -48
  73. package/dist/examples/html-script/lead/example-lead-trigger-attribute.html +41 -48
  74. package/dist/examples/html-script/lead/example-lead-trigger-auto.html +41 -48
  75. package/dist/examples/html-script/lead/example-lead-trigger-click.html +41 -48
  76. package/dist/examples/html-script/release-candidate.html +32 -31
  77. package/dist/examples/html-script/remove-from-cart/README.md +3 -3
  78. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-attribute.html +41 -48
  79. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-css.html +41 -48
  80. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-dedupe.html +48 -55
  81. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-manual.html +41 -48
  82. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-multi.html +41 -48
  83. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-state.html +41 -48
  84. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-text.html +41 -48
  85. package/dist/examples/html-script/search/example-search-attribute.html +41 -48
  86. package/dist/examples/html-script/search/example-search-button-sync.html +41 -48
  87. package/dist/examples/html-script/search/example-search-dedupe.html +41 -48
  88. package/dist/examples/html-script/search/example-search-input.html +41 -48
  89. package/dist/examples/html-script/search/example-search-manual.html +41 -48
  90. package/dist/examples/html-script/search/example-search-submit.html +41 -48
  91. package/dist/examples/html-script/search/example-search-text.html +41 -48
  92. package/dist/examples/html-script/url-context/example-url-context-allowed-domains.html +38 -9
  93. package/dist/examples/html-script/url-context/example-url-context-landing.html +53 -13
  94. package/dist/examples/html-script/url-context/example-url-context-upsell.html +48 -10
  95. package/dist/examples/html-script/url-context/example-url-context.html +55 -21
  96. package/dist/examples/html-script/view-content/example-view-content-attribute.html +41 -48
  97. package/dist/examples/html-script/view-content/example-view-content-css.html +41 -48
  98. package/dist/examples/html-script/view-content/example-view-content-dedupe.html +41 -48
  99. package/dist/examples/html-script/view-content/example-view-content-empty.html +41 -48
  100. package/dist/examples/html-script/view-content/example-view-content-manual.html +41 -48
  101. package/dist/examples/html-script/view-content/example-view-content-product-card.html +41 -48
  102. package/dist/examples/html-script/view-content/example-view-content-text.html +41 -48
  103. package/dist/examples/release-candidate/README.md +2 -1
  104. package/dist/examples/v2/README.md +15 -15
  105. package/dist/{index-CQAyT5Od.d.ts → index-B8u_3PGG.d.ts} +21 -2
  106. package/dist/{index-JlKPz4pp.d.mts → index-BxT2d-TK.d.mts} +21 -2
  107. package/dist/index.cjs.js +1 -1
  108. package/dist/index.cjs.js.map +1 -1
  109. package/dist/index.d.mts +21 -782
  110. package/dist/index.d.ts +21 -782
  111. package/dist/index.esm.js +1 -1
  112. package/dist/index.esm.js.map +1 -1
  113. package/dist/{pixel-CKc4OQUx.d.mts → pixel-C93c-0M2.d.mts} +234 -101
  114. package/dist/{pixel-BxZZx8l5.d.ts → pixel-DVy4rzj8.d.ts} +234 -101
  115. package/dist/pixel-default-config-BkAjriVH.d.mts +21 -0
  116. package/dist/pixel-default-config-Co69vDP3.d.ts +21 -0
  117. package/dist/pixel-settings-BhfJqA92.d.mts +40 -0
  118. package/dist/pixel-settings-C0qPFTii.d.ts +40 -0
  119. package/dist/runtime/index.cjs.js +1 -1
  120. package/dist/runtime/index.cjs.js.map +1 -1
  121. package/dist/runtime/index.d.mts +6 -6
  122. package/dist/runtime/index.d.ts +6 -6
  123. package/dist/runtime/index.esm.js +1 -1
  124. package/dist/runtime/index.esm.js.map +1 -1
  125. package/dist/services/index.cjs.js +1 -1
  126. package/dist/services/index.cjs.js.map +1 -1
  127. package/dist/services/index.d.mts +7 -7
  128. package/dist/services/index.d.ts +7 -7
  129. package/dist/services/index.esm.js +1 -1
  130. package/dist/services/index.esm.js.map +1 -1
  131. package/dist/{types-C75pQP31.d.ts → types-B2aUNHb3.d.ts} +2 -2
  132. package/dist/{types-BP8dz1gP.d.mts → types-C0J9KUQg.d.mts} +2 -2
  133. package/dist/{types-DMhzHSVC.d.mts → types-C2dsBog1.d.mts} +2 -2
  134. package/dist/{types-D_SsCur9.d.ts → types-DcaBYgVI.d.ts} +2 -2
  135. package/dist/{url-context-BjAsQoVl.d.mts → url-context-Ck2LK18V.d.mts} +4 -2
  136. package/dist/{url-context-BjAsQoVl.d.ts → url-context-Ck2LK18V.d.ts} +4 -2
  137. package/dist/v2/global.global.js +1 -1
  138. package/dist/v2/global.global.js.map +1 -1
  139. package/dist/v2/index.cjs.js +1 -1
  140. package/dist/v2/index.cjs.js.map +1 -1
  141. package/dist/v2/index.d.mts +26 -8
  142. package/dist/v2/index.d.ts +26 -8
  143. package/dist/v2/index.esm.js +1 -1
  144. package/dist/v2/index.esm.js.map +1 -1
  145. package/docs/public/README.md +20 -15
  146. package/docs/public/api/exports.md +12 -8
  147. package/docs/public/api/pixel.md +28 -7
  148. package/docs/public/configuration/commerce.md +3 -3
  149. package/docs/public/configuration/modules.md +11 -14
  150. package/docs/public/configuration/overview.md +41 -25
  151. package/docs/public/configuration/transport.md +127 -0
  152. package/docs/public/events/catalog.md +3 -1
  153. package/docs/public/getting-started/installation.md +20 -15
  154. package/docs/public/getting-started/quick-start.md +95 -30
  155. package/docs/public/getting-started/react-nextjs.md +57 -34
  156. package/docs/public/getting-started/script-tag.md +55 -32
  157. package/docs/public/guides/funnel-checkout.md +2 -2
  158. package/docs/public/guides/funnel-full.md +3 -3
  159. package/docs/public/guides/funnel-landing.md +10 -8
  160. package/docs/public/limitations.md +6 -5
  161. package/docs/public/privacy/limitations.md +6 -6
  162. package/docs/public/release-candidate/validation.md +24 -19
  163. package/docs/public/troubleshooting.md +7 -6
  164. package/package.json +15 -14
  165. package/dist/pixel-default-config-CJl-eypl.d.mts +0 -5
  166. package/dist/pixel-default-config-aAOujzwp.d.ts +0 -5
@@ -1,4 +1,4 @@
1
- import { U as UrlContextConfig } from './url-context-BjAsQoVl.mjs';
1
+ import { U as UrlContextConfig } from './url-context-Ck2LK18V.mjs';
2
2
 
3
3
  type MetaBrowserDestinationConfig = {
4
4
  enabled: boolean;
@@ -77,15 +77,104 @@ type AttributionConfig = {
77
77
  readonly customClickIdParams?: string[];
78
78
  };
79
79
 
80
- type TransportConfig = {
81
- apiEndpoint: string;
82
- apiKey?: string;
83
- timeoutMs?: number;
84
- batch?: {
85
- enabled: boolean;
86
- flushIntervalMs: number;
87
- maxBatchSize: number;
80
+ type TransportTestSenderConfig = {
81
+ mode: 'test';
82
+ capture?: boolean;
83
+ response?: 'success' | 'failure';
84
+ delayMs?: number;
85
+ };
86
+ type TransportInternalSenderConfig = {
87
+ mode: 'internal';
88
+ baseUrl?: string;
89
+ };
90
+ type TransportExternalSenderConfig = {
91
+ mode: 'external';
92
+ endpoints: {
93
+ event: string;
94
+ batch?: string;
88
95
  };
96
+ /**
97
+ * Public browser-visible headers only. Backend secrets must be proxied by a
98
+ * trusted server and must never be embedded in browser configuration.
99
+ */
100
+ headers?: Readonly<Record<string, string>>;
101
+ batchFallback?: 'single' | 'error';
102
+ };
103
+ type TransportSenderConfig = TransportTestSenderConfig | TransportInternalSenderConfig | TransportExternalSenderConfig;
104
+ type TransportPersistenceConfig = {
105
+ enabled: boolean;
106
+ };
107
+ type TransportReplayConfig = {
108
+ enabled: boolean;
109
+ };
110
+ type TransportOrderingConfig = {
111
+ enabled: boolean;
112
+ };
113
+ type TransportCoordinationConfig = {
114
+ enabled: boolean;
115
+ };
116
+ type TransportCircuitBreakerConfig = {
117
+ enabled: boolean;
118
+ failureThreshold: number;
119
+ resetTimeoutMs: number;
120
+ halfOpenMaxAttempts: number;
121
+ };
122
+ type TransportBackpressurePolicy = 'drop_oldest' | 'drop_newest' | 'reject_new' | 'sample' | 'none';
123
+ type TransportBackpressureConfig = {
124
+ enabled: boolean;
125
+ maxQueueSize: number;
126
+ policy: TransportBackpressurePolicy;
127
+ sampleRate?: number;
128
+ };
129
+ type TransportDeadLetterConfig = {
130
+ enabled: boolean;
131
+ maxEntries: number;
132
+ };
133
+ type TransportCompressionConfig = {
134
+ enabled: boolean;
135
+ strategy: 'identity';
136
+ };
137
+ type TransportRetryConfig = {
138
+ enabled: boolean;
139
+ maxAttempts: number;
140
+ baseDelayMs: number;
141
+ maxDelayMs: number;
142
+ multiplier: number;
143
+ };
144
+ type TransportBatchConfig = {
145
+ enabled: boolean;
146
+ batchSize: number;
147
+ maxWaitMs: number;
148
+ };
149
+ type TransportTimeoutConfig = {
150
+ enabled: boolean;
151
+ timeoutMs: number;
152
+ };
153
+ type TransportOfflineConfig = {
154
+ enabled: boolean;
155
+ };
156
+ type TransportFlushConfig = {
157
+ enabled: boolean;
158
+ flushIntervalMs: number;
159
+ flushOnDestroy: boolean;
160
+ prepareUnloadHooks: boolean;
161
+ };
162
+ type TransportConfig = {
163
+ enabled: boolean;
164
+ sender: TransportSenderConfig;
165
+ persistence: TransportPersistenceConfig;
166
+ replay: TransportReplayConfig;
167
+ ordering: TransportOrderingConfig;
168
+ coordination: TransportCoordinationConfig;
169
+ circuitBreaker: TransportCircuitBreakerConfig;
170
+ backpressure: TransportBackpressureConfig;
171
+ deadLetter: TransportDeadLetterConfig;
172
+ compression: TransportCompressionConfig;
173
+ retry: TransportRetryConfig;
174
+ batch: TransportBatchConfig;
175
+ timeout: TransportTimeoutConfig;
176
+ offline: TransportOfflineConfig;
177
+ flush: TransportFlushConfig;
89
178
  };
90
179
 
91
180
  type VisitorStoragePersistence = 'memory' | 'cookie' | 'localStorage' | 'cookie_localStorage';
@@ -186,12 +275,16 @@ type SelectorFormConfig = string[] | {
186
275
  };
187
276
 
188
277
  /**
189
- * Contrato de fontes independentes para auto detectors (Etapa 14).
278
+ * Contrato de fontes independentes para auto detectors (Etapa 14+).
190
279
  * Um evento automático pode ter várias sources; cada uma vira um detector.
280
+ *
281
+ * A source `url` observa a URL da página (`window.location`) / rotas.
282
+ * A source `link` observa o destino de um `<a href>` clicado.
191
283
  */
192
284
 
193
- type AutoSourceType = 'selector' | 'form' | 'payment' | 'lifecycle' | 'url';
285
+ type AutoSourceType = 'selector' | 'form' | 'payment' | 'lifecycle' | 'url' | 'link';
194
286
  type AutoSourceBase = {
287
+ /** Nome estável da source (obrigatório). */
195
288
  name: string;
196
289
  type: AutoSourceType;
197
290
  enabled?: boolean;
@@ -199,11 +292,17 @@ type AutoSourceBase = {
199
292
  debounceMs?: number;
200
293
  cooldownMs?: number;
201
294
  };
295
+ type SelectorAutoTrigger = 'click' | 'submit' | 'hover' | 'visible';
202
296
  type SelectorAutoSource = AutoSourceBase & {
203
297
  type: 'selector';
204
298
  selector: SelectorConfig;
205
299
  selectorType?: SelectorType;
206
- trigger?: 'click' | 'submit';
300
+ trigger?: SelectorAutoTrigger;
301
+ /**
302
+ * Só para `trigger: 'visible'`. Fração visível 0–1.
303
+ * Default `0` (qualquer parte na viewport).
304
+ */
305
+ visibleThreshold?: number;
207
306
  };
208
307
  type FormAutoSource = AutoSourceBase & {
209
308
  type: 'form';
@@ -223,11 +322,128 @@ type LifecycleAutoSource = AutoSourceBase & {
223
322
  type: 'lifecycle';
224
323
  trigger: 'init' | 'ready';
225
324
  };
325
+ /**
326
+ * Observa a URL da página atual (location / history).
327
+ * Não confundir com `LinkAutoSource` (destino de um clique em âncora).
328
+ */
226
329
  type UrlAutoSource = AutoSourceBase & {
227
330
  type: 'url';
228
331
  patterns: string[];
229
332
  };
230
- type AutoTrackSource = SelectorAutoSource | FormAutoSource | PaymentAutoSource | LifecycleAutoSource | UrlAutoSource;
333
+ /** Protocols HTTP suportados pelo matcher de links. */
334
+ type LinkMatchProtocol = 'http:' | 'https:';
335
+ /**
336
+ * Condição de query string para match de destino.
337
+ * Sem regex arbitrária / callbacks.
338
+ */
339
+ type LinkQueryCondition = {
340
+ key: string;
341
+ operator: 'exists' | 'absent';
342
+ } | {
343
+ key: string;
344
+ operator: 'equals' | 'starts_with';
345
+ value: string;
346
+ caseSensitive?: boolean;
347
+ } | {
348
+ key: string;
349
+ operator: 'one_of';
350
+ value: string[];
351
+ caseSensitive?: boolean;
352
+ };
353
+ type LinkQueryMatch = {
354
+ /** Default: `all`. */
355
+ mode?: 'all' | 'any';
356
+ conditions: LinkQueryCondition[];
357
+ };
358
+ /**
359
+ * Regras para reconhecer o destino do link (AND entre grupos configurados).
360
+ * Arrays dentro de um grupo usam OR.
361
+ */
362
+ type LinkTargetMatch = {
363
+ protocols?: LinkMatchProtocol[];
364
+ /** Origins absolutas normalizadas (sem `/` final), ex.: `https://checkout.example.com`. */
365
+ origins?: string[];
366
+ /** Hostnames em lowercase, ex.: `checkout.example.com`. */
367
+ hostnames?: string[];
368
+ path?: {
369
+ exact?: string[];
370
+ prefixes?: string[];
371
+ /**
372
+ * Prefixo de **segmento** do path (não do pathname inteiro).
373
+ * Ex.: `pri` casa `/pri6670988`, `/pri_123` e `/examples/security/pri6670988.html`,
374
+ * mas não `/privacy` (próximo char precisa ser dígito ou `_`+dígito).
375
+ */
376
+ segmentPrefixes?: string[];
377
+ /**
378
+ * Template simples: `/pay/:offerId`.
379
+ * `:param` captura um segmento; literais devem casar exatamente.
380
+ */
381
+ template?: string;
382
+ };
383
+ query?: LinkQueryMatch;
384
+ };
385
+ /**
386
+ * Origem de um valor resolvido a partir do link / elemento.
387
+ */
388
+ type LinkValueResolver = {
389
+ source: 'query';
390
+ key: string;
391
+ } | {
392
+ source: 'pathParam';
393
+ key: string;
394
+ } | {
395
+ source: 'pathSegment';
396
+ /**
397
+ * Índice do segmento (0 = primeiro).
398
+ * Índice negativo conta do fim (`-1` = último segmento).
399
+ */
400
+ index: number;
401
+ } | {
402
+ source: 'attribute';
403
+ name: string;
404
+ } | {
405
+ source: 'dataset';
406
+ /** Chave camelCase do `dataset` (`data-product-id` → `productId`). */
407
+ key: string;
408
+ } | {
409
+ source: 'static';
410
+ value: string | number | boolean | null;
411
+ } | {
412
+ source: 'href' | 'origin' | 'hostname' | 'pathname' | 'text';
413
+ };
414
+ type LinkValueTransform = 'trim' | 'lowercase' | 'uppercase' | 'number';
415
+ type LinkValueBinding = {
416
+ from: LinkValueResolver | LinkValueResolver[];
417
+ required?: boolean;
418
+ transform?: LinkValueTransform;
419
+ };
420
+ /**
421
+ * Source automática baseada no destino de um link clicado.
422
+ *
423
+ * `match` decide se o destino corresponde.
424
+ * `bindings` resolve valores genéricos (incluindo chaves semânticas
425
+ * como `productId` reconhecidas pelo mapper do evento).
426
+ */
427
+ type LinkAutoSource = AutoSourceBase & {
428
+ type: 'link';
429
+ /** Somente click nesta etapa. Default: `click`. */
430
+ trigger?: 'click';
431
+ /**
432
+ * Restrição opcional sobre o elemento.
433
+ * Sem selector, usa o `<a href>` ancestral mais próximo do clique.
434
+ */
435
+ selector?: SelectorConfig;
436
+ selectorType?: SelectorType;
437
+ /** Regras de reconhecimento do destino. */
438
+ match: LinkTargetMatch;
439
+ /**
440
+ * Valores extraídos do link / elemento / configuração.
441
+ * Chaves são genéricas; o mapper do evento reconhece semântica
442
+ * opcional (`productId`, `query`, etc.).
443
+ */
444
+ bindings?: Record<string, LinkValueBinding>;
445
+ };
446
+ type AutoTrackSource = SelectorAutoSource | FormAutoSource | PaymentAutoSource | LifecycleAutoSource | UrlAutoSource | LinkAutoSource;
231
447
 
232
448
  /**
233
449
  * Contratos globais de commerce (root `PixelConfig.commerce`).
@@ -296,7 +512,10 @@ type CommerceConfig = {
296
512
  enrichment?: CommerceEnrichmentConfig;
297
513
  };
298
514
  declare const DEFAULT_COMMERCE_ENRICHMENT: Required<CommerceEnrichmentConfig>;
299
- /** Default seguro: commerce off, sem produtos, sem itens. */
515
+ /**
516
+ * Commerce on by default so catalog/cart enrichment runs when products exist.
517
+ * Empty catalog / empty cart is a no-op.
518
+ */
300
519
  declare const DEFAULT_COMMERCE_CONFIG: CommerceConfig;
301
520
  /** Normaliza calculateValueFrom (inclui aliases legado em runtime). */
302
521
  declare function normalizeCalculateValueFrom(value: CommerceCalculateValueFrom | string | undefined): 'cart' | 'event' | 'manual' | 'catalog';
@@ -623,96 +842,10 @@ type PrivacyModuleConfig = {
623
842
  anonymization: AnonymizationConfig;
624
843
  };
625
844
 
626
- type TransportRetryConfig = {
627
- enabled: boolean;
628
- maxAttempts: number;
629
- baseDelayMs: number;
630
- maxDelayMs: number;
631
- multiplier: number;
632
- };
633
- type TransportBatchConfig = {
634
- enabled: boolean;
635
- batchSize: number;
636
- flushIntervalMs: number;
637
- maxWaitMs: number;
638
- };
639
- type TransportTimeoutConfig = {
640
- enabled: boolean;
641
- timeoutMs: number;
642
- };
643
- type TransportOfflineConfig = {
644
- enabled: boolean;
645
- };
646
- type TransportFlushConfig = {
647
- enabled: boolean;
648
- flushIntervalMs: number;
649
- flushOnDestroy: boolean;
650
- prepareUnloadHooks: boolean;
651
- };
652
- type TransportSenderMode = 'mock' | 'http';
653
- type TransportSenderConfig = {
654
- mode: TransportSenderMode;
655
- };
656
- type TransportPersistenceConfig = {
657
- enabled: boolean;
658
- };
659
- type TransportReplayConfig = {
660
- enabled: boolean;
661
- };
662
- type TransportOrderingConfig = {
663
- enabled: boolean;
664
- };
665
- type TransportCoordinationConfig = {
666
- enabled: boolean;
667
- };
668
- type TransportCircuitBreakerConfig = {
669
- enabled: boolean;
670
- failureThreshold: number;
671
- resetTimeoutMs: number;
672
- halfOpenMaxAttempts: number;
673
- };
674
- type TransportBackpressurePolicy = 'drop_oldest' | 'drop_newest' | 'reject_new' | 'sample' | 'none';
675
- type TransportBackpressureConfig = {
676
- enabled: boolean;
677
- maxQueueSize: number;
678
- policy: TransportBackpressurePolicy;
679
- sampleRate?: number;
680
- };
681
- type TransportDeadLetterConfig = {
682
- enabled: boolean;
683
- maxEntries: number;
684
- };
685
- type TransportCompressionConfig = {
686
- enabled: boolean;
687
- strategy: 'identity';
688
- };
689
- type TransportModuleConfig = {
690
- enabled: boolean;
691
- /** @deprecated Use sender.mode instead */
692
- mockSender: {
693
- enabled: boolean;
694
- };
695
- sender: TransportSenderConfig;
696
- persistence: TransportPersistenceConfig;
697
- replay: TransportReplayConfig;
698
- ordering: TransportOrderingConfig;
699
- coordination: TransportCoordinationConfig;
700
- circuitBreaker: TransportCircuitBreakerConfig;
701
- backpressure: TransportBackpressureConfig;
702
- deadLetter: TransportDeadLetterConfig;
703
- compression: TransportCompressionConfig;
704
- retry: TransportRetryConfig;
705
- batch: TransportBatchConfig;
706
- timeout: TransportTimeoutConfig;
707
- offline: TransportOfflineConfig;
708
- flush: TransportFlushConfig;
709
- };
710
-
711
845
  type ModulesConfig = {
712
846
  core: CoreModuleConfig;
713
847
  behavior: BehaviorModuleConfig;
714
848
  conversion: ConversionModuleConfig;
715
- transport: TransportModuleConfig;
716
849
  integrations: IntegrationsModuleConfig;
717
850
  privacy: PrivacyModuleConfig;
718
851
  };
@@ -728,4 +861,4 @@ type PixelConfig = {
728
861
  modules: ModulesConfig;
729
862
  };
730
863
 
731
- export { DEFAULT_COMMERCE_CONFIG as $, type AttributionStoragePersistence as A, type BehaviorModuleConfig as B, type ConversionModuleConfig as C, type SelectorFormTrigger as D, type EngagementThresholds as E, type FingerprintMode as F, type CommerceCalculateValueFrom as G, type CommerceCartConfig as H, type IntegrationsModuleConfig as I, type CommerceCartItem as J, type CommerceCartMode as K, type LifecycleAutoSource as L, type CommerceConfig as M, type CommerceEnrichmentConfig as N, type CommerceEnrichmentSource as O, type PixelConfig as P, type QueueStoragePersistence as Q, type CommerceEventEnrichmentConfig as R, type SessionStoragePersistence as S, type TransportModuleConfig as T, type CommerceMappingsConfig as U, type VisitorStoragePersistence as V, type CommerceProduct as W, type ProductCatalogConfig as X, type ProductType as Y, type UrlAutoSource as Z, DEFAULT_SELECTOR_TYPE as _, type AttributionConfig as a, DEFAULT_COMMERCE_ENRICHMENT as a0, getPrimarySelectorValue as a1, normalizeCalculateValueFrom as a2, resolveSelectorTypeFallback as a3, type AddPaymentInfoAutoDetectorConfig as a4, type AddToCartAutoDetectorConfig as a5, type AnonymizationConfig as a6, type AutoConversionConfig as a7, type AutoDetectorConfig as a8, type ClickBehaviorConfig as a9, type RemoveFromCartAutoDetectorConfig as aA, type ScrollBehaviorConfig as aB, type SearchAutoDetectorConfig as aC, type SessionConfig as aD, type TransportBatchConfig as aE, type TransportFlushConfig as aF, type TransportOfflineConfig as aG, type TransportRetryConfig as aH, type TransportTimeoutConfig as aI, type ViewContentAutoDetectorConfig as aJ, type ViewportBehaviorConfig as aK, type ViewportTargetConfig as aL, type VisibilityBehaviorConfig as aM, type VisitorConfig as aN, type ConsentConfig as aa, type ConversionAutoDetectorsConfig as ab, type ConversionRulesConfig as ac, type CoordinationConfig as ad, type DedupeConfig as ae, type EngagementBehaviorConfig as af, type ExitIntentBehaviorConfig as ag, type FingerprintConfig as ah, type GoogleBrowserDestinationConfig as ai, type GoogleIntegrationConfig as aj, type HeartbeatModuleConfig as ak, type IdleBehaviorConfig as al, type InitiateCheckoutAutoDetectorConfig as am, type IntegrationTestDestinationConfig as an, type LeadAutoDetectorConfig as ao, type ManualConversionConfig as ap, type ManualEventConfig as aq, type MetaBrowserDestinationConfig as ar, type MetaIntegrationConfig as as, type ModulesConfig as at, type TikTokBrowserDestinationConfig as au, type OrderingConfig as av, type PageViewConfig as aw, type PiiConfig as ax, type PrivacyConsentConfig as ay, type PurchaseAutoDetectorConfig as az, type CoreModuleConfig as b, type PrivacyModuleConfig as c, type AppConfig as d, type PixelEnvironment as e, type PixelSource as f, type PixelTarget as g, type IdentityConfig as h, type TransportConfig as i, type StorageConfig as j, type StorageKeysConfig as k, type AutoSourceBase as l, type AutoSourceType as m, type AutoTrackSource as n, type EngagementWeights as o, type EngagementPenalties as p, type FormAutoSource as q, type PaymentAutoSource as r, type PaymentMethod as s, type SelectorAutoSource as t, type SelectorConfig as u, type SelectorDescriptor as v, type SelectorInput as w, type SelectorType as x, type SelectorFormConfig as y, type SelectorFormMode as z };
864
+ export { type LinkValueBinding as $, type AttributionStoragePersistence as A, type BehaviorModuleConfig as B, type CommerceConfig as C, type TransportTestSenderConfig as D, type TransportTimeoutConfig as E, type StorageKeysConfig as F, type AutoSourceBase as G, type AutoSourceType as H, type IdentityConfig as I, type AutoTrackSource as J, type EngagementThresholds as K, type EngagementWeights as L, type ModulesConfig as M, type EngagementPenalties as N, type FingerprintMode as O, type PixelConfig as P, type QueueStoragePersistence as Q, type FormAutoSource as R, type SessionStoragePersistence as S, type TransportConfig as T, type LifecycleAutoSource as U, type VisitorStoragePersistence as V, type LinkAutoSource as W, type LinkMatchProtocol as X, type LinkQueryCondition as Y, type LinkQueryMatch as Z, type LinkTargetMatch as _, type AppConfig as a, type ScrollBehaviorConfig as a$, type LinkValueResolver as a0, type LinkValueTransform as a1, type PaymentAutoSource as a2, type PaymentMethod as a3, type SelectorAutoSource as a4, type SelectorAutoTrigger as a5, type SelectorConfig as a6, type SelectorDescriptor as a7, type SelectorInput as a8, type SelectorType as a9, type ClickBehaviorConfig as aA, type ConsentConfig as aB, type ConversionAutoDetectorsConfig as aC, type ConversionRulesConfig as aD, type CoordinationConfig as aE, type DedupeConfig as aF, type EngagementBehaviorConfig as aG, type ExitIntentBehaviorConfig as aH, type FingerprintConfig as aI, type GoogleBrowserDestinationConfig as aJ, type GoogleIntegrationConfig as aK, type HeartbeatModuleConfig as aL, type IdleBehaviorConfig as aM, type InitiateCheckoutAutoDetectorConfig as aN, type IntegrationTestDestinationConfig as aO, type LeadAutoDetectorConfig as aP, type ManualConversionConfig as aQ, type ManualEventConfig as aR, type MetaBrowserDestinationConfig as aS, type MetaIntegrationConfig as aT, type TikTokBrowserDestinationConfig as aU, type OrderingConfig as aV, type PageViewConfig as aW, type PiiConfig as aX, type PrivacyConsentConfig as aY, type PurchaseAutoDetectorConfig as aZ, type RemoveFromCartAutoDetectorConfig as a_, type SelectorFormConfig as aa, type SelectorFormMode as ab, type SelectorFormTrigger as ac, type CommerceCalculateValueFrom as ad, type CommerceCartConfig as ae, type CommerceCartItem as af, type CommerceCartMode as ag, type CommerceEnrichmentConfig as ah, type CommerceEnrichmentSource as ai, type CommerceEventEnrichmentConfig as aj, type CommerceMappingsConfig as ak, type CommerceProduct as al, type ProductCatalogConfig as am, type ProductType as an, type UrlAutoSource as ao, DEFAULT_SELECTOR_TYPE as ap, DEFAULT_COMMERCE_CONFIG as aq, DEFAULT_COMMERCE_ENRICHMENT as ar, getPrimarySelectorValue as as, normalizeCalculateValueFrom as at, resolveSelectorTypeFallback as au, type AddPaymentInfoAutoDetectorConfig as av, type AddToCartAutoDetectorConfig as aw, type AnonymizationConfig as ax, type AutoConversionConfig as ay, type AutoDetectorConfig as az, type TransportSenderConfig as b, type SearchAutoDetectorConfig as b0, type SessionConfig as b1, type ViewContentAutoDetectorConfig as b2, type ViewportBehaviorConfig as b3, type ViewportTargetConfig as b4, type VisibilityBehaviorConfig as b5, type VisitorConfig as b6, type StorageConfig as c, type AttributionConfig as d, type ConversionModuleConfig as e, type CoreModuleConfig as f, type IntegrationsModuleConfig as g, type PrivacyModuleConfig as h, type PixelEnvironment as i, type PixelSource as j, type PixelTarget as k, type TransportBackpressureConfig as l, type TransportBackpressurePolicy as m, type TransportBatchConfig as n, type TransportCircuitBreakerConfig as o, type TransportCompressionConfig as p, type TransportCoordinationConfig as q, type TransportDeadLetterConfig as r, type TransportExternalSenderConfig as s, type TransportFlushConfig as t, type TransportInternalSenderConfig as u, type TransportOfflineConfig as v, type TransportOrderingConfig as w, type TransportPersistenceConfig as x, type TransportReplayConfig as y, type TransportRetryConfig as z };