@veroxm/react-sdk 0.2.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0
4
+
5
+ - `ExperienceDecision.reason` includes `'holdout'`, and `<Experience>` shows its fallback for it.
6
+
3
7
  ## 0.2.0
4
8
 
5
9
  - `VeroxmAuthProvider`, `useAuth()` and `<SignedIn>` for signed-in end users, with `@veroxm/sdk`'s `app.auth`.
@@ -45,7 +45,8 @@ export interface ExperienceDecision<TContent = Record<string, unknown>, TConfig
45
45
  label: string;
46
46
  isControl: boolean;
47
47
  } | null;
48
- reason: 'targeted' | 'split' | 'journey' | 'none';
48
+ /** Show your default for "none" and "holdout" (the visitor is in the impact holdout). */
49
+ reason: 'targeted' | 'split' | 'journey' | 'holdout' | 'none';
49
50
  content: TContent | null;
50
51
  config: TConfig | null;
51
52
  waitingForConsent?: boolean;
package/dist/tracking.js CHANGED
@@ -99,7 +99,7 @@ export function Experience({ placement, fallback, loading, timeoutMs, children,
99
99
  if (state.loading && !state.decision)
100
100
  return _jsx(_Fragment, { children: loading !== undefined ? loading : fallback });
101
101
  const d = state.decision;
102
- if (!d || d.reason === 'none' || (d.content == null && d.config == null))
102
+ if (!d || d.reason === 'none' || d.reason === 'holdout' || (d.content == null && d.config == null))
103
103
  return _jsx(_Fragment, { children: fallback });
104
104
  return _jsx(_Fragment, { children: children(d) });
105
105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veroxm/react-sdk",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "React and Next.js SDK for VeroXM: content hooks, visual slots with A/B tests, the on-page editor, llms.txt and structured data.",
5
5
  "keywords": [
6
6
  "veroxm",