@cascayd/experiment 0.3.1 → 0.3.3

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 (2) hide show
  1. package/dist/client.js +12 -0
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -101,3 +101,15 @@ export async function record(type, opts = {}) {
101
101
  if (!res.ok)
102
102
  throw new Error(`Record failed: ${res.status}`);
103
103
  }
104
+ // Expose functions to window for browser/Shopify theme compatibility
105
+ if (typeof window !== 'undefined') {
106
+ ;
107
+ window.initCascayd = initCascayd;
108
+ window.assignVariant = assignVariant;
109
+ window.record = record;
110
+ window.Cascayd = {
111
+ initCascayd,
112
+ assignVariant,
113
+ record,
114
+ };
115
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cascayd/experiment",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "A lightweight A/B testing SDK for React applications with server-side analytics integration",
5
5
  "keywords": [
6
6
  "ab-testing",