@beworke/pixel 0.1.0-rc.7 → 0.1.0-rc.9
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/CHANGELOG.md +33 -0
- package/README.md +71 -56
- package/RELEASE_CANDIDATE.md +28 -62
- package/dist/Pixel-BnN86r4X.d.ts +797 -0
- package/dist/Pixel-BoUGqCbP.d.mts +797 -0
- package/dist/{StorageFactory-DeMaZ8wk.d.ts → StorageFactory-BfCArzMM.d.ts} +1 -1
- package/dist/{StorageFactory-Cq29vF32.d.mts → StorageFactory-C0prtNR7.d.mts} +1 -1
- package/dist/browser/index.cjs.js +3 -0
- package/dist/browser/index.cjs.js.map +1 -0
- package/dist/browser/index.d.mts +55 -0
- package/dist/browser/index.d.ts +55 -0
- package/dist/browser/index.esm.js +3 -0
- package/dist/browser/index.esm.js.map +1 -0
- package/dist/browser/pixel.global.js +4 -0
- package/dist/browser/pixel.global.js.map +1 -0
- package/dist/config/index.cjs.js +1 -1
- package/dist/config/index.cjs.js.map +1 -1
- package/dist/config/index.d.mts +15 -5
- package/dist/config/index.d.ts +15 -5
- package/dist/config/index.esm.js +1 -1
- package/dist/config/index.esm.js.map +1 -1
- package/dist/examples/html-script/RELEASE_CANDIDATE.md +6 -8
- package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-autocomplete.html +40 -47
- package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-disabled.html +40 -47
- package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-fields.html +40 -47
- package/dist/examples/html-script/add-payment-info/example-add-payment-info-data-track.html +40 -47
- package/dist/examples/html-script/add-payment-info/example-add-payment-info-dedupe.html +40 -47
- package/dist/examples/html-script/add-payment-info/example-add-payment-info-manual.html +40 -47
- package/dist/examples/html-script/add-payment-info/example-add-payment-info-rules-card.html +40 -47
- package/dist/examples/html-script/add-payment-info/example-add-payment-info-security.html +40 -47
- package/dist/examples/html-script/add-to-cart/example-add-to-cart-attribute.html +40 -47
- package/dist/examples/html-script/add-to-cart/example-add-to-cart-auto.html +40 -47
- package/dist/examples/html-script/add-to-cart/example-add-to-cart-click.html +40 -47
- package/dist/examples/html-script/add-to-cart/example-add-to-cart-dedupe.html +40 -47
- package/dist/examples/html-script/add-to-cart/example-add-to-cart-link.html +40 -47
- package/dist/examples/html-script/add-to-cart/example-add-to-cart-manual.html +40 -47
- package/dist/examples/html-script/add-to-cart/example-add-to-cart-order-bump.html +40 -47
- package/dist/examples/html-script/add-to-cart/example-add-to-cart-text.html +40 -47
- package/dist/examples/html-script/behavior/example-behavior-engagement.html +4 -4
- package/dist/examples/html-script/behavior/example-behavior-heartbeat.html +4 -4
- package/dist/examples/html-script/behavior/example-behavior-runtime-intelligence.html +4 -4
- package/dist/examples/html-script/behavior/example-behavior-viewport.html +4 -4
- package/dist/examples/html-script/buygoods/example-buygoods-checkout.html +156 -0
- package/dist/examples/html-script/example-checkout-commerce.html +31 -30
- package/dist/examples/html-script/example-conversion.html +41 -48
- package/dist/examples/html-script/example-global-factory-classic.html +45 -0
- package/dist/examples/html-script/example-global-factory.html +40 -0
- package/dist/examples/html-script/example-integration.html +39 -45
- package/dist/examples/html-script/example-landing-commerce.html +3 -8
- package/dist/examples/html-script/example-runtime-diagnostics.html +4 -4
- package/dist/examples/html-script/example-transport.html +59 -57
- package/dist/examples/html-script/full-funnel/checkout.html +3 -1
- package/dist/examples/html-script/full-funnel/downsell.html +3 -1
- package/dist/examples/html-script/full-funnel/landing.html +3 -1
- package/dist/examples/html-script/full-funnel/thank-you.html +3 -1
- package/dist/examples/html-script/full-funnel/upsell.html +3 -1
- package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-attribute.html +40 -47
- package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-auto.html +40 -47
- package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-click.html +40 -47
- package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-manual.html +40 -47
- package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-snapshot.html +40 -47
- package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-submit.html +40 -47
- package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-text.html +40 -47
- package/dist/examples/html-script/lead/example-lead-trigger-attribute.html +40 -47
- package/dist/examples/html-script/lead/example-lead-trigger-auto.html +40 -47
- package/dist/examples/html-script/lead/example-lead-trigger-click.html +40 -47
- package/dist/examples/html-script/release-candidate.html +31 -30
- package/dist/examples/html-script/remove-from-cart/README.md +3 -3
- package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-attribute.html +40 -47
- package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-css.html +40 -47
- package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-dedupe.html +47 -54
- package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-manual.html +40 -47
- package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-multi.html +40 -47
- package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-state.html +40 -47
- package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-text.html +40 -47
- package/dist/examples/html-script/search/example-search-attribute.html +40 -47
- package/dist/examples/html-script/search/example-search-button-sync.html +40 -47
- package/dist/examples/html-script/search/example-search-dedupe.html +40 -47
- package/dist/examples/html-script/search/example-search-input.html +40 -47
- package/dist/examples/html-script/search/example-search-manual.html +40 -47
- package/dist/examples/html-script/search/example-search-submit.html +40 -47
- package/dist/examples/html-script/search/example-search-text.html +40 -47
- package/dist/examples/html-script/url-context/example-url-context-allowed-domains.html +4 -4
- package/dist/examples/html-script/url-context/example-url-context-landing.html +4 -4
- package/dist/examples/html-script/url-context/example-url-context-upsell.html +4 -4
- package/dist/examples/html-script/url-context/example-url-context.html +4 -4
- package/dist/examples/html-script/view-content/example-view-content-attribute.html +40 -47
- package/dist/examples/html-script/view-content/example-view-content-css.html +40 -47
- package/dist/examples/html-script/view-content/example-view-content-dedupe.html +40 -47
- package/dist/examples/html-script/view-content/example-view-content-empty.html +40 -47
- package/dist/examples/html-script/view-content/example-view-content-manual.html +40 -47
- package/dist/examples/html-script/view-content/example-view-content-product-card.html +40 -47
- package/dist/examples/html-script/view-content/example-view-content-text.html +40 -47
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/{pixel-2uL4LSyC.d.ts → pixel-DNGbAN5C.d.ts} +117 -98
- package/dist/{pixel-DMwpppf_.d.mts → pixel-_BSDpx4M.d.mts} +117 -98
- package/dist/pixel-default-config-BMYaqs7i.d.ts +21 -0
- package/dist/pixel-default-config-DLRya1tl.d.mts +21 -0
- package/dist/pixel-settings-D-t9zQb4.d.ts +40 -0
- package/dist/pixel-settings-DGxl0MVm.d.mts +40 -0
- package/dist/runtime/index.cjs.js +1 -1
- package/dist/runtime/index.cjs.js.map +1 -1
- package/dist/runtime/index.d.mts +4 -4
- package/dist/runtime/index.d.ts +4 -4
- package/dist/runtime/index.esm.js +1 -1
- package/dist/runtime/index.esm.js.map +1 -1
- package/dist/services/index.cjs.js +1 -1
- package/dist/services/index.cjs.js.map +1 -1
- package/dist/services/index.d.mts +4 -4
- package/dist/services/index.d.ts +4 -4
- package/dist/services/index.esm.js +1 -1
- package/dist/services/index.esm.js.map +1 -1
- package/dist/{types-6HF3UlsL.d.mts → types-B-Nzagpk.d.mts} +2 -2
- package/dist/{types-CgrabttM.d.mts → types-D0KVsgzs.d.mts} +1 -1
- package/dist/{types-fFcQ1apy.d.ts → types-D3kJ9bfT.d.ts} +1 -1
- package/dist/{types-BqUEoZo0.d.ts → types-Dfi9C49l.d.ts} +2 -2
- package/dist/v2/global.global.js +1 -1
- package/dist/v2/global.global.js.map +1 -1
- package/dist/v2/index.cjs.js +1 -1
- package/dist/v2/index.cjs.js.map +1 -1
- package/dist/v2/index.d.mts +21 -787
- package/dist/v2/index.d.ts +21 -787
- package/dist/v2/index.esm.js +1 -1
- package/dist/v2/index.esm.js.map +1 -1
- package/docs/public/README.md +7 -4
- package/docs/public/api/exports.md +12 -8
- package/docs/public/api/pixel.md +27 -6
- package/docs/public/configuration/commerce.md +2 -2
- package/docs/public/configuration/modules.md +11 -14
- package/docs/public/configuration/overview.md +45 -26
- package/docs/public/configuration/transport.md +127 -0
- package/docs/public/events/catalog.md +3 -1
- package/docs/public/getting-started/installation.md +14 -12
- package/docs/public/getting-started/quick-start.md +95 -30
- package/docs/public/getting-started/react-nextjs.md +57 -34
- package/docs/public/getting-started/script-tag.md +55 -32
- package/docs/public/guides/funnel-checkout.md +1 -1
- package/docs/public/guides/funnel-landing.md +9 -7
- package/docs/public/limitations.md +5 -4
- package/docs/public/privacy/limitations.md +6 -6
- package/docs/public/release-candidate/validation.md +4 -4
- package/docs/public/troubleshooting.md +7 -6
- package/package.json +8 -3
- package/dist/pixel-default-config-BDPUVHse.d.ts +0 -5
- package/dist/pixel-default-config-C5uLt52W.d.mts +0 -5
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { P as PixelSettings } from '../pixel-settings-DGxl0MVm.mjs';
|
|
2
|
+
import { P as Pixel } from '../Pixel-BoUGqCbP.mjs';
|
|
3
|
+
import { P as PixelConfig } from '../pixel-_BSDpx4M.mjs';
|
|
4
|
+
import '../index-BxT2d-TK.mjs';
|
|
5
|
+
import '../url-context-Ck2LK18V.mjs';
|
|
6
|
+
import '../PixelLogger-B21lEjep.mjs';
|
|
7
|
+
import '../types-D0KVsgzs.mjs';
|
|
8
|
+
import '../types-B-Nzagpk.mjs';
|
|
9
|
+
|
|
10
|
+
type BootstrapPixelControls = {
|
|
11
|
+
/**
|
|
12
|
+
* Destrói a instância bootstrapada (se houver) e cria outra.
|
|
13
|
+
* A primeira chamada sem `force` é dona da instância na `window`.
|
|
14
|
+
*/
|
|
15
|
+
force?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Gate de consentimento. Executado antes de criar a instância.
|
|
18
|
+
* Se retornar `false`, o bootstrap aborta com `CONSENT_DENIED`.
|
|
19
|
+
*/
|
|
20
|
+
waitForConsent?: () => boolean | Promise<boolean>;
|
|
21
|
+
};
|
|
22
|
+
type PixelBrowserFactory = {
|
|
23
|
+
(settings: PixelSettings): Promise<Pixel>;
|
|
24
|
+
create(settings: PixelSettings): Promise<Pixel>;
|
|
25
|
+
bootstrap(settings: PixelSettings, controls?: BootstrapPixelControls): Promise<Pixel>;
|
|
26
|
+
getInstance(): Pixel | null;
|
|
27
|
+
getPending(): Promise<Pixel> | null;
|
|
28
|
+
destroy(): Promise<void>;
|
|
29
|
+
readonly Client: typeof Pixel;
|
|
30
|
+
readonly DEFAULT_PIXEL_CONFIG: PixelConfig;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Uma instância por `window`. Sem `force`, a primeira chamada é dona da
|
|
35
|
+
* configuração; chamadas posteriores reutilizam pending/instância.
|
|
36
|
+
*
|
|
37
|
+
* Não é `async`: o retorno é a Promise do store para chamadas concorrentes
|
|
38
|
+
* compartilharem a mesma referência.
|
|
39
|
+
*
|
|
40
|
+
* Para trocar a configuração, use `force: true` ou `destroyBootstrappedPixel()`.
|
|
41
|
+
* Chamadas concorrentes compartilham a configuração da primeira que iniciou.
|
|
42
|
+
*/
|
|
43
|
+
declare function bootstrapPixel(settings: PixelSettings, controls?: BootstrapPixelControls): Promise<Pixel>;
|
|
44
|
+
declare function getBootstrappedPixel(): Pixel | null;
|
|
45
|
+
declare function getBootstrappedPixelPending(): Promise<Pixel> | null;
|
|
46
|
+
declare function destroyBootstrappedPixel(): Promise<void>;
|
|
47
|
+
|
|
48
|
+
type PixelBootstrapErrorCode = 'NOT_BROWSER' | 'CONSENT_DENIED' | 'INIT_FAILED';
|
|
49
|
+
declare class PixelBootstrapError extends Error {
|
|
50
|
+
readonly code: PixelBootstrapErrorCode;
|
|
51
|
+
readonly cause?: unknown;
|
|
52
|
+
constructor(message: string, code: PixelBootstrapErrorCode, cause?: unknown);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { type BootstrapPixelControls, PixelBootstrapError, type PixelBootstrapErrorCode, type PixelBrowserFactory, bootstrapPixel, destroyBootstrappedPixel, getBootstrappedPixel, getBootstrappedPixelPending };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { P as PixelSettings } from '../pixel-settings-D-t9zQb4.js';
|
|
2
|
+
import { P as Pixel } from '../Pixel-BnN86r4X.js';
|
|
3
|
+
import { P as PixelConfig } from '../pixel-DNGbAN5C.js';
|
|
4
|
+
import '../index-B8u_3PGG.js';
|
|
5
|
+
import '../url-context-Ck2LK18V.js';
|
|
6
|
+
import '../PixelLogger-B21lEjep.js';
|
|
7
|
+
import '../types-D3kJ9bfT.js';
|
|
8
|
+
import '../types-Dfi9C49l.js';
|
|
9
|
+
|
|
10
|
+
type BootstrapPixelControls = {
|
|
11
|
+
/**
|
|
12
|
+
* Destrói a instância bootstrapada (se houver) e cria outra.
|
|
13
|
+
* A primeira chamada sem `force` é dona da instância na `window`.
|
|
14
|
+
*/
|
|
15
|
+
force?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Gate de consentimento. Executado antes de criar a instância.
|
|
18
|
+
* Se retornar `false`, o bootstrap aborta com `CONSENT_DENIED`.
|
|
19
|
+
*/
|
|
20
|
+
waitForConsent?: () => boolean | Promise<boolean>;
|
|
21
|
+
};
|
|
22
|
+
type PixelBrowserFactory = {
|
|
23
|
+
(settings: PixelSettings): Promise<Pixel>;
|
|
24
|
+
create(settings: PixelSettings): Promise<Pixel>;
|
|
25
|
+
bootstrap(settings: PixelSettings, controls?: BootstrapPixelControls): Promise<Pixel>;
|
|
26
|
+
getInstance(): Pixel | null;
|
|
27
|
+
getPending(): Promise<Pixel> | null;
|
|
28
|
+
destroy(): Promise<void>;
|
|
29
|
+
readonly Client: typeof Pixel;
|
|
30
|
+
readonly DEFAULT_PIXEL_CONFIG: PixelConfig;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Uma instância por `window`. Sem `force`, a primeira chamada é dona da
|
|
35
|
+
* configuração; chamadas posteriores reutilizam pending/instância.
|
|
36
|
+
*
|
|
37
|
+
* Não é `async`: o retorno é a Promise do store para chamadas concorrentes
|
|
38
|
+
* compartilharem a mesma referência.
|
|
39
|
+
*
|
|
40
|
+
* Para trocar a configuração, use `force: true` ou `destroyBootstrappedPixel()`.
|
|
41
|
+
* Chamadas concorrentes compartilham a configuração da primeira que iniciou.
|
|
42
|
+
*/
|
|
43
|
+
declare function bootstrapPixel(settings: PixelSettings, controls?: BootstrapPixelControls): Promise<Pixel>;
|
|
44
|
+
declare function getBootstrappedPixel(): Pixel | null;
|
|
45
|
+
declare function getBootstrappedPixelPending(): Promise<Pixel> | null;
|
|
46
|
+
declare function destroyBootstrappedPixel(): Promise<void>;
|
|
47
|
+
|
|
48
|
+
type PixelBootstrapErrorCode = 'NOT_BROWSER' | 'CONSENT_DENIED' | 'INIT_FAILED';
|
|
49
|
+
declare class PixelBootstrapError extends Error {
|
|
50
|
+
readonly code: PixelBootstrapErrorCode;
|
|
51
|
+
readonly cause?: unknown;
|
|
52
|
+
constructor(message: string, code: PixelBootstrapErrorCode, cause?: unknown);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { type BootstrapPixelControls, PixelBootstrapError, type PixelBootstrapErrorCode, type PixelBrowserFactory, bootstrapPixel, destroyBootstrappedPixel, getBootstrappedPixel, getBootstrappedPixelPending };
|