@liquidcommerce/elements-sdk 2.6.0-beta.102 → 2.6.0-beta.103

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.
@@ -1,5 +1,4 @@
1
1
  const ELEMENTS_ENV = {
2
- DEVELOPMENT: 'development',
3
2
  STAGING: 'staging',
4
3
  PRODUCTION: 'production',
5
4
  };
@@ -81,7 +81,6 @@ function isSDKSource(source) {
81
81
  }
82
82
 
83
83
  const ELEMENTS_ENV = {
84
- DEVELOPMENT: 'development',
85
84
  STAGING: 'staging',
86
85
  PRODUCTION: 'production',
87
86
  };
@@ -1,5 +1,4 @@
1
1
  export declare const API_CLIENT_URL: {
2
- development: string;
3
2
  staging: string;
4
3
  production: string;
5
4
  };
@@ -1,5 +1,4 @@
1
1
  export declare const ELEMENTS_ENV: {
2
- readonly DEVELOPMENT: "development";
3
2
  readonly STAGING: "staging";
4
3
  readonly PRODUCTION: "production";
5
4
  };
@@ -103,7 +103,7 @@ Complete configuration interface for the full SDK.
103
103
  ```typescript
104
104
  interface ILiquidCommerceElementsConfig {
105
105
  // Optional
106
- env?: ElementsEnv; // defaults to 'production' ('development' | 'staging' | 'production')
106
+ env?: ElementsEnv; // defaults to 'production' ('staging' | 'production')
107
107
  debugMode?: DebugMode; // 'none' | 'console' | 'panel'
108
108
  customTheme?: IClientCustomThemeConfig;
109
109
  promoTicker?: IPromoTicker[];
@@ -116,7 +116,7 @@ interface ILiquidCommerceElementsConfig {
116
116
  #### Environment
117
117
 
118
118
  ```typescript
119
- type ElementsEnv = 'development' | 'staging' | 'production';
119
+ type ElementsEnv = 'staging' | 'production';
120
120
  ```
121
121
 
122
122
  Determines which API environment to use.
@@ -22,7 +22,7 @@ interface ILiquidCommerceElementsConfig {
22
22
 
23
23
  | Property | Type | Required | Description |
24
24
  |----------|------|----------|-------------|
25
- | `env` | `'development' \| 'staging' \| 'production'` | No | API environment |
25
+ | `env` | `'staging' \| 'production'` | No | API environment |
26
26
  | `promoTicker` | `IPromoTicker[]` | No | Promotional ticker configurations |
27
27
  | `customTheme` | `IClientCustomThemeConfig` | No | Theme overrides for all components |
28
28
  | `debugMode` | `'none' \| 'console' \| 'panel'` | No | Debug output mode |
@@ -30,7 +30,7 @@ interface ILiquidCommerceElementsConfig {
30
30
  | `proxy` | `IElementsProxyConfig` | No | Proxy configuration for API requests |
31
31
  | `development` | `ILiquidCommerceElementsDevelopmentConfig` | No | Development/testing options |
32
32
 
33
- > **Note:** `debugMode` (`'console'` or `'panel'`) is **ignored in production** -- it is forced off when `env` is `'production'`. It only takes effect in non-production environments (`'development'` / `'staging'`).
33
+ > **Note:** `debugMode` (`'console'` or `'panel'`) is **ignored in production** -- it is forced off when `env` is `'production'`. It only takes effect outside production (`'staging'`).
34
34
 
35
35
  ---
36
36
 
@@ -310,7 +310,7 @@ See [Actions API](./actions/) for detailed method signatures.
310
310
  ### ElementsEnv
311
311
 
312
312
  ```typescript
313
- type ElementsEnv = 'development' | 'staging' | 'production';
313
+ type ElementsEnv = 'staging' | 'production';
314
314
  ```
315
315
 
316
316
  ### DebugMode
@@ -379,7 +379,7 @@ Enable debug mode for detailed logging:
379
379
 
380
380
  ```javascript
381
381
  const client = await Elements('YOUR_API_KEY', {
382
- env: 'development',
382
+ env: 'staging',
383
383
  debugMode: 'console' // or 'panel'
384
384
  });
385
385
  ```
@@ -409,9 +409,9 @@ Your API key is used for authentication but has limited privileges:
409
409
  Use different API keys per environment:
410
410
 
411
411
  ```javascript
412
- // Development
413
- const client = await Elements('dev_key_abc123', {
414
- env: 'development'
412
+ // Staging
413
+ const client = await Elements('staging_key_abc123', {
414
+ env: 'staging'
415
415
  });
416
416
 
417
417
  // Production
@@ -46,7 +46,7 @@ The path segment selects which bundle is served:
46
46
  |-----------|----------|-------------|
47
47
  | `data-liquid-commerce-elements` | Yes | Identifies this as the Elements SDK script |
48
48
  | `data-token` | Yes | Your LiquidCommerce API key |
49
- | `data-env` | No | Environment: `development`, `staging`, or `production`. Defaults to `production` if omitted. |
49
+ | `data-env` | No | Environment: `staging` or `production`. Defaults to `production` if omitted. |
50
50
  | `defer` | Recommended | Allows non-blocking script loading |
51
51
 
52
52
  ### Where to Place the Script
@@ -264,7 +264,7 @@ The SDK accepts a configuration object during initialization:
264
264
 
265
265
  ```javascript
266
266
  const client = await Elements('YOUR_API_KEY', {
267
- env: 'production', // Optional (defaults to 'production'): 'development' | 'staging' | 'production'
267
+ env: 'production', // Optional (defaults to 'production'): 'staging' | 'production'
268
268
  debugMode: 'console', // Optional: 'none' | 'console' | 'panel'
269
269
  customTheme: { /* ... */ }, // Optional: Theme customization
270
270
  promoTicker: [ /* ... */ ], // Optional: Promo ticker configuration
@@ -274,7 +274,7 @@ const client = await Elements('YOUR_API_KEY', {
274
274
  });
275
275
  ```
276
276
 
277
- > **Note:** `debugMode` is ignored when `env` is `'production'`. Debug logging and the debug panel are only activated in non-production environments (`development` or `staging`).
277
+ > **Note:** `debugMode` is ignored when `env` is `'production'`. Debug logging and the debug panel are only activated outside production (`staging`).
278
278
 
279
279
  See [Configuration Reference](../api/configuration.md) for complete configuration options.
280
280
 
@@ -269,20 +269,20 @@ Prevents ad blockers and protects API keys.
269
269
  ```javascript
270
270
  const apiKey = process.env.NODE_ENV === 'production'
271
271
  ? 'prod_key_xyz'
272
- : 'dev_key_abc';
272
+ : 'staging_key_abc';
273
273
 
274
274
  const client = await Elements(apiKey, {
275
- env: process.env.NODE_ENV === 'production' ? 'production' : 'development'
275
+ env: process.env.NODE_ENV === 'production' ? 'production' : 'staging'
276
276
  });
277
277
  ```
278
278
 
279
279
  ## Testing
280
280
 
281
- ### Use Development Mode
281
+ ### Use Staging With Debug Options
282
282
 
283
283
  ```javascript
284
284
  const client = await Elements('YOUR_API_KEY', {
285
- env: 'development',
285
+ env: 'staging',
286
286
  debugMode: 'console', // or 'panel'
287
287
  development: {
288
288
  openShadowDom: true // Makes debugging easier
@@ -12,13 +12,12 @@ It coexists with a host site's own GTM — see [Coexisting With Your Own GTM](#c
12
12
 
13
13
  ## Supported Environments
14
14
 
15
- GTM initialization and every event push are enabled in production and staging. When the SDK is running in development or Builder mode, no container is loaded and no events are sent.
15
+ GTM initialization and every event push are enabled in production and staging. When the SDK is running in Builder mode, no container is loaded and no events are sent.
16
16
 
17
17
  Events are suppressed when any of the following is true:
18
18
 
19
19
  - `window` is undefined (server-side rendering).
20
20
  - The SDK is running in Builder mode.
21
- - The environment is `development`.
22
21
 
23
22
  The environment defaults to `production` when none is provided, so a standard production embed is analytics-enabled out of the box; a staging embed is also analytics-enabled when server GTM config is enabled for the partner.
24
23
 
@@ -13,7 +13,7 @@ Telemetry is enabled **only** when both conditions are true:
13
13
 
14
14
  In every other case it is **disabled** and no events are queued or sent:
15
15
 
16
- - Non-production environments (e.g. staging/development).
16
+ - Non-production environments (i.e. staging).
17
17
  - A custom API URL / proxy is configured via `development.customApiUrl`.
18
18
  - Internal telemetry errors are only logged to the console in non-production or when debugging is enabled — never sent.
19
19
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "LiquidCommerce Elements SDK",
4
4
  "license": "UNLICENSED",
5
5
  "author": "LiquidCommerce Team",
6
- "version": "2.6.0-beta.102",
6
+ "version": "2.6.0-beta.103",
7
7
  "homepage": "https://docs.liquidcommerce.co/elements-sdk",
8
8
  "repository": {
9
9
  "type": "git",