@keak/sdk 1.0.1 → 1.0.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.
package/README.md CHANGED
@@ -7,7 +7,7 @@ Production-ready A/B testing and experimentation SDK for React applications with
7
7
  ### 1. Install the SDK
8
8
 
9
9
  ```bash
10
- npm install keak-sdk
10
+ npm install @keak/sdk
11
11
  ```
12
12
 
13
13
  All dependencies are bundled with the SDK - no additional packages required.
@@ -38,7 +38,7 @@ If you're using Next.js 15, you'll need additional configuration to enable sourc
38
38
  The auto-setup will add `KeakProvider` to your app. If you need to configure it manually:
39
39
 
40
40
  ```tsx
41
- import { KeakProvider } from 'keak-sdk';
41
+ import { KeakProvider } from '@keak/sdk';
42
42
 
43
43
  function App() {
44
44
  return (
@@ -54,7 +54,7 @@ function App() {
54
54
  Wrap your content with `Experiment` and `Variant` components:
55
55
 
56
56
  ```tsx
57
- import { Experiment, Variant } from 'keak-sdk';
57
+ import { Experiment, Variant } from '@keak/sdk';
58
58
 
59
59
  export default function HeroHome() {
60
60
  return (
@@ -79,7 +79,7 @@ export default function HeroHome() {
79
79
  You can also use the `useExperiment` hook for programmatic access:
80
80
 
81
81
  ```tsx
82
- import { useExperiment } from 'keak-sdk';
82
+ import { useExperiment } from '@keak/sdk';
83
83
 
84
84
  function MyComponent() {
85
85
  const { variant, track, isInExperiment } = useExperiment('my-experiment');
package/dist/index.cjs.js CHANGED
@@ -16603,6 +16603,11 @@ class TelemetryService {
16603
16603
  updates.outcome = VariantOutcome.EDITED;
16604
16604
  updates.final_code = new_code;
16605
16605
  }
16606
+ else { // if the user set it back to original suggested variant
16607
+ updates.has_edits = false;
16608
+ updates.outcome = VariantOutcome.PENDING;
16609
+ updates.final_code = null;
16610
+ }
16606
16611
  updates.last_previewed_at = new Date().toISOString();
16607
16612
  updates.preview_count = variantData.preview_count + 1;
16608
16613
  await this.updateVariant(variantId, updates);