@coframe/sdk 1.1.11 → 1.1.12

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/README.md CHANGED
@@ -49,9 +49,10 @@ installations:
49
49
  - `coframe_variant_id` previews one or more comma-separated variant IDs.
50
50
  - `coframe_should_send_events=true` allows events during preview for testing.
51
51
 
52
- When `enableDebug: true` is set for the project, open the Launcher with
53
- `cf_debug=true` and use **Keep across navigation** in the Preview Session
54
- tool to keep the selected variants active for the current tab.
52
+ Debug tools are allowed by default. Open the Launcher with `cf_debug=true` and
53
+ use **Keep across navigation** in the Preview Session tool to keep the selected
54
+ variants active for the current tab. Set `enableDebug: false` to prevent URL or
55
+ saved session state from loading the Launcher.
55
56
 
56
57
  For SSR, pass the complete request URL, including its query string, as
57
58
  `currentUrl`. This is required for query-sensitive targeting and allows
@@ -3475,7 +3475,7 @@ function mountLauncher(nonce) {
3475
3475
  launcher.mount({ nonce, onExitDebugSession: exitDebugSession });
3476
3476
  return true;
3477
3477
  }
3478
- function loadLauncherIfEnabled(enabled, nonce) {
3478
+ function loadLauncherIfEnabled(enabled = true, nonce) {
3479
3479
  if (typeof window === 'undefined')
3480
3480
  return;
3481
3481
  let sessionEnabled = false;
@@ -3592,7 +3592,7 @@ async function init(options) {
3592
3592
  const configResult = await resolveConfig(Coframe, revealPage);
3593
3593
  if (!configResult)
3594
3594
  return;
3595
- loadLauncherIfEnabled(configResult.config.enableDebug === true, configResult.config.nonce);
3595
+ loadLauncherIfEnabled(configResult.config.enableDebug, configResult.config.nonce);
3596
3596
  const projectResult = await resolveProject(Coframe, configResult.previewVariantId, configResult.isSessionVariant, configResult.config);
3597
3597
  if (!projectResult)
3598
3598
  return;
@@ -3473,7 +3473,7 @@ function mountLauncher(nonce) {
3473
3473
  launcher.mount({ nonce, onExitDebugSession: exitDebugSession });
3474
3474
  return true;
3475
3475
  }
3476
- function loadLauncherIfEnabled(enabled, nonce) {
3476
+ function loadLauncherIfEnabled(enabled = true, nonce) {
3477
3477
  if (typeof window === 'undefined')
3478
3478
  return;
3479
3479
  let sessionEnabled = false;
@@ -3590,7 +3590,7 @@ async function init(options) {
3590
3590
  const configResult = await resolveConfig(Coframe, revealPage);
3591
3591
  if (!configResult)
3592
3592
  return;
3593
- loadLauncherIfEnabled(configResult.config.enableDebug === true, configResult.config.nonce);
3593
+ loadLauncherIfEnabled(configResult.config.enableDebug, configResult.config.nonce);
3594
3594
  const projectResult = await resolveProject(Coframe, configResult.previewVariantId, configResult.isSessionVariant, configResult.config);
3595
3595
  if (!projectResult)
3596
3596
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coframe/sdk",
3
- "version": "1.1.11",
3
+ "version": "1.1.12",
4
4
  "description": "Coframe optimizes your website using generative AI to deliver maximum impact to your audience and allow your site to improve itself as you sleep. Learn more at coframe.com.",
5
5
  "main": "dist/pkg/cf.cjs.js",
6
6
  "module": "dist/pkg/cf.esm.mjs",