@preprio/toolkit 0.6.0-alpha.3 → 0.6.0-alpha.5

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 (36) hide show
  1. package/dist/astro/{chunk-CUDYSNJD.js → chunk-CD4LXNR3.js} +1 -1
  2. package/dist/astro/graphql.js +1 -1
  3. package/dist/astro/index.cjs +1 -1
  4. package/dist/astro/index.js +1 -1
  5. package/dist/{chunk-UH2OK4XC.js → chunk-5O7RGYHX.js} +1 -1
  6. package/dist/{chunk-3YZANSVY.js → chunk-HPWTLDLR.js} +1 -1
  7. package/dist/{chunk-VY5D3IED.js → chunk-OH2PPC76.js} +1 -1
  8. package/dist/{chunk-FC53KN4H.js → chunk-ZWKHACNA.js} +1 -1
  9. package/dist/graphql/codegen.js +3 -3
  10. package/dist/graphql.js +3 -3
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.d.cts +1 -1
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +3 -3
  15. package/dist/nextjs/{chunk-5XGJJVGX.js → chunk-L4L6X3JJ.js} +1 -1
  16. package/dist/nextjs/components.cjs +24 -8
  17. package/dist/nextjs/components.d.cts +2 -20
  18. package/dist/nextjs/components.d.ts +2 -20
  19. package/dist/nextjs/components.js +28 -10
  20. package/dist/nextjs/graphql.cjs +1 -1
  21. package/dist/nextjs/graphql.js +1 -1
  22. package/dist/nextjs/index.cjs +1 -1
  23. package/dist/nextjs/index.d.cts +2 -19
  24. package/dist/nextjs/index.d.ts +2 -19
  25. package/dist/nextjs/index.js +1 -1
  26. package/dist/nuxt/{chunk-KROR7RXW.js → chunk-PJZMLKJ2.js} +1 -1
  27. package/dist/nuxt/graphql.js +1 -1
  28. package/dist/nuxt/index.cjs +1 -1
  29. package/dist/nuxt/index.js +1 -1
  30. package/dist/react/components.cjs +1 -1
  31. package/dist/react/components.js +1 -1
  32. package/dist/sveltekit/{chunk-INDMNPEM.js → chunk-SKBW7RBD.js} +1 -1
  33. package/dist/sveltekit/graphql.js +1 -1
  34. package/dist/sveltekit/index.cjs +1 -1
  35. package/dist/sveltekit/index.js +1 -1
  36. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "0.6.0-alpha.3";
2
+ var VERSION = "0.6.0-alpha.5";
3
3
 
4
4
  // src/core/features.ts
5
5
  function isEnabled(config) {
@@ -3,7 +3,7 @@ import {
3
3
  getPreprHeadersFromHeaders,
4
4
  isPersonalizedResponse,
5
5
  validatePreprToken
6
- } from "./chunk-CUDYSNJD.js";
6
+ } from "./chunk-CD4LXNR3.js";
7
7
 
8
8
  // src/core/variants/constants.ts
9
9
  var PREPR_CONTEXT_ALIAS = "_preprContext";
@@ -31,7 +31,7 @@ __export(astro_exports, {
31
31
  module.exports = __toCommonJS(astro_exports);
32
32
 
33
33
  // src/version.ts
34
- var VERSION = "0.6.0-alpha.3";
34
+ var VERSION = "0.6.0-alpha.5";
35
35
 
36
36
  // src/core/features.ts
37
37
  function isEnabled(config) {
@@ -7,7 +7,7 @@ import {
7
7
  getToolbarPropsFromHeaders,
8
8
  isPersonalizedResponse,
9
9
  resolveFeatures
10
- } from "./chunk-CUDYSNJD.js";
10
+ } from "./chunk-CD4LXNR3.js";
11
11
 
12
12
  // src/core/constants.ts
13
13
  var COOKIE_PREVIEW_MODE = "Prepr-Preview-Mode";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  VERSION,
3
3
  resolveFeatures
4
- } from "./chunk-VY5D3IED.js";
4
+ } from "./chunk-OH2PPC76.js";
5
5
 
6
6
  // src/core/server.ts
7
7
  var PreprError = class extends Error {
@@ -11,7 +11,7 @@ import {
11
11
  ALL_FEATURES_ENABLED,
12
12
  VERSION,
13
13
  resolveFeatures
14
- } from "./chunk-VY5D3IED.js";
14
+ } from "./chunk-OH2PPC76.js";
15
15
 
16
16
  // src/core/stega/dom.ts
17
17
  var IGNORED_ANCESTORS = "script, style, noscript";
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "0.6.0-alpha.3";
2
+ var VERSION = "0.6.0-alpha.5";
3
3
 
4
4
  // src/core/features.ts
5
5
  function isEnabled(config) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PreprError
3
- } from "./chunk-UH2OK4XC.js";
3
+ } from "./chunk-5O7RGYHX.js";
4
4
 
5
5
  // src/core/variants/constants.ts
6
6
  var PREPR_CONTEXT_ALIAS = "_preprContext";
@@ -2,9 +2,9 @@ import {
2
2
  toDecisionQuery,
3
3
  toSchemaInfo,
4
4
  toVariantsQuery
5
- } from "../chunk-FC53KN4H.js";
6
- import "../chunk-UH2OK4XC.js";
7
- import "../chunk-VY5D3IED.js";
5
+ } from "../chunk-ZWKHACNA.js";
6
+ import "../chunk-5O7RGYHX.js";
7
+ import "../chunk-OH2PPC76.js";
8
8
 
9
9
  // src/codegen/index.ts
10
10
  function typeRef(type) {
package/dist/graphql.js CHANGED
@@ -21,12 +21,12 @@ import {
21
21
  toSchemaInfo,
22
22
  toVariantsDocument,
23
23
  toVariantsQuery
24
- } from "./chunk-FC53KN4H.js";
24
+ } from "./chunk-ZWKHACNA.js";
25
25
  import {
26
26
  PreprError,
27
27
  validatePreprToken
28
- } from "./chunk-UH2OK4XC.js";
29
- import "./chunk-VY5D3IED.js";
28
+ } from "./chunk-5O7RGYHX.js";
29
+ import "./chunk-OH2PPC76.js";
30
30
 
31
31
  // src/core/variants/probe-document.ts
32
32
  function probeSelectionSet(set, fragments) {
package/dist/index.cjs CHANGED
@@ -45,7 +45,7 @@ __export(src_exports, {
45
45
  module.exports = __toCommonJS(src_exports);
46
46
 
47
47
  // src/version.ts
48
- var VERSION = "0.6.0-alpha.3";
48
+ var VERSION = "0.6.0-alpha.5";
49
49
 
50
50
  // src/core/features.ts
51
51
  function isEnabled(config) {
package/dist/index.d.cts CHANGED
@@ -7,7 +7,7 @@ export { P as PreprPixelConfig, l as loadTrackingPixel, s as setTrackingParam, t
7
7
  * Package version; must match package.json. Lives in its own leaf module so
8
8
  * core can import it without cycling through the barrel.
9
9
  */
10
- declare const VERSION = "0.6.0-alpha.3";
10
+ declare const VERSION = "0.6.0-alpha.5";
11
11
 
12
12
  /**
13
13
  * Resolve a `PreprFeatures` bag to plain booleans, defaulting every omitted key
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export { P as PreprPixelConfig, l as loadTrackingPixel, s as setTrackingParam, t
7
7
  * Package version; must match package.json. Lives in its own leaf module so
8
8
  * core can import it without cycling through the barrel.
9
9
  */
10
- declare const VERSION = "0.6.0-alpha.3";
10
+ declare const VERSION = "0.6.0-alpha.5";
11
11
 
12
12
  /**
13
13
  * Resolve a `PreprFeatures` bag to plain booleans, defaulting every omitted key
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  loadTrackingPixel,
16
16
  setTrackingParam,
17
17
  trackEvent
18
- } from "./chunk-3YZANSVY.js";
18
+ } from "./chunk-HPWTLDLR.js";
19
19
  import {
20
20
  isPersonalizedResponse
21
21
  } from "./chunk-3NCEVJJ3.js";
@@ -32,11 +32,11 @@ import {
32
32
  getPreprUUIDFromHeaders,
33
33
  getToolbarPropsFromHeaders,
34
34
  validatePreprToken
35
- } from "./chunk-UH2OK4XC.js";
35
+ } from "./chunk-5O7RGYHX.js";
36
36
  import {
37
37
  VERSION,
38
38
  resolveFeatures
39
- } from "./chunk-VY5D3IED.js";
39
+ } from "./chunk-OH2PPC76.js";
40
40
 
41
41
  // src/core/middleware.ts
42
42
  var UTM_PARAMS = [
@@ -2,7 +2,7 @@
2
2
  import { NextResponse } from "next/server";
3
3
 
4
4
  // src/version.ts
5
- var VERSION = "0.6.0-alpha.3";
5
+ var VERSION = "0.6.0-alpha.5";
6
6
 
7
7
  // src/core/constants.ts
8
8
  var COOKIE_PREVIEW_MODE = "Prepr-Preview-Mode";
@@ -2513,7 +2513,7 @@ function applyPreprDecisions(view) {
2513
2513
  var import_react = require("react");
2514
2514
 
2515
2515
  // src/version.ts
2516
- var VERSION = "0.6.0-alpha.3";
2516
+ var VERSION = "0.6.0-alpha.5";
2517
2517
 
2518
2518
  // src/core/pixel.ts
2519
2519
  var PIXEL_SCRIPT_URL = "https://cdn.tracking.prepr.io/js/prepr.min.js";
@@ -2594,27 +2594,43 @@ function PreprAbSwitch() {
2594
2594
  });
2595
2595
  return null;
2596
2596
  }
2597
+ var viewCount = 0;
2597
2598
  function PreprPersonalizationSwitch({
2598
2599
  refresh = true,
2599
2600
  freshFor
2600
2601
  }) {
2601
- const pathname = (0, import_navigation.usePathname)();
2602
- const scheduler = (0, import_react2.useRef)(null);
2602
+ const [scheduler, setScheduler] = (0, import_react2.useState)(
2603
+ null
2604
+ );
2605
+ const viewUrl = (0, import_react2.useRef)(null);
2603
2606
  (0, import_react2.useLayoutEffect)(() => {
2604
- applyPreprDecisions();
2607
+ const url = location.pathname + location.search;
2608
+ if (viewUrl.current === url) return;
2609
+ viewUrl.current = url;
2610
+ applyPreprDecisions(`${url}#${++viewCount}`);
2605
2611
  });
2606
2612
  (0, import_react2.useEffect)(() => {
2607
2613
  if (!refresh) return;
2608
2614
  const started = createPreprRefreshScheduler({ freshFor });
2609
- scheduler.current = started;
2615
+ setScheduler(started);
2610
2616
  return () => {
2611
2617
  started.stop();
2612
- scheduler.current = null;
2618
+ setScheduler(null);
2613
2619
  };
2614
2620
  }, [refresh, freshFor]);
2621
+ return scheduler ? (0, import_react2.createElement)(
2622
+ import_react2.Suspense,
2623
+ { fallback: null },
2624
+ (0, import_react2.createElement)(ViewCounter, { scheduler })
2625
+ ) : null;
2626
+ }
2627
+ function ViewCounter({
2628
+ scheduler
2629
+ }) {
2630
+ const pathname = (0, import_navigation.usePathname)();
2615
2631
  (0, import_react2.useEffect)(() => {
2616
- scheduler.current?.view();
2617
- }, [pathname, refresh, freshFor]);
2632
+ scheduler.view();
2633
+ }, [pathname, scheduler]);
2618
2634
  return null;
2619
2635
  }
2620
2636
  var VARIANT_KEY_ATTRIBUTE = "data-prepr-variant-key";
@@ -1,4 +1,4 @@
1
- import { ReactNode, ReactElement } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
  import { k as PreprToolbarComponentProps } from '../types-BYH9XqmN.cjs';
3
3
  import { P as PreprPixelConfig } from '../pixel-DwW7cXJm.cjs';
4
4
 
@@ -40,25 +40,7 @@ interface PreprPersonalizationSwitchProps {
40
40
  /** Same as `createPreprProxy`'s `freshFor`. Default 10 000 ms. */
41
41
  freshFor?: number;
42
42
  }
43
- /**
44
- * Shows the segment variants decided in the proxy for the groups above the
45
- * fold, before the page paints, and keeps those decisions fresh while the
46
- * visitor browses: a short while after each page view, when the visitor
47
- * points at a link to a personalized page, and when the tab comes back.
48
- * Because the next page's decision is already in place when it opens, a
49
- * visitor who joins a segment mid-visit sees it on their next page view,
50
- * without anything on screen changing.
51
- *
52
- * Mount it once in the root layout. The background refreshes are answered by
53
- * `createPreprProxy`; with a proxy that calls `resolveDecisions` itself, the
54
- * first refresh gets a page back and refreshing stops for the browser
55
- * session. The decisions themselves come from `createPreprProxy` or
56
- * `resolveDecisions` in `proxy.ts`.
57
- *
58
- * @example
59
- * <PreprPersonalizationSwitch />
60
- */
61
- declare function PreprPersonalizationSwitch({ refresh, freshFor, }: PreprPersonalizationSwitchProps): null;
43
+ declare function PreprPersonalizationSwitch({ refresh, freshFor, }: PreprPersonalizationSwitchProps): ReactElement | null;
62
44
  /**
63
45
  * Wraps one rendered variant and, once hydrated, puts the variant keys on the
64
46
  * elements inside, where Prepr's tracking pixel counts impressions and the
@@ -1,4 +1,4 @@
1
- import { ReactNode, ReactElement } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
  import { k as PreprToolbarComponentProps } from '../types-BYH9XqmN.js';
3
3
  import { P as PreprPixelConfig } from '../pixel-DwW7cXJm.js';
4
4
 
@@ -40,25 +40,7 @@ interface PreprPersonalizationSwitchProps {
40
40
  /** Same as `createPreprProxy`'s `freshFor`. Default 10 000 ms. */
41
41
  freshFor?: number;
42
42
  }
43
- /**
44
- * Shows the segment variants decided in the proxy for the groups above the
45
- * fold, before the page paints, and keeps those decisions fresh while the
46
- * visitor browses: a short while after each page view, when the visitor
47
- * points at a link to a personalized page, and when the tab comes back.
48
- * Because the next page's decision is already in place when it opens, a
49
- * visitor who joins a segment mid-visit sees it on their next page view,
50
- * without anything on screen changing.
51
- *
52
- * Mount it once in the root layout. The background refreshes are answered by
53
- * `createPreprProxy`; with a proxy that calls `resolveDecisions` itself, the
54
- * first refresh gets a page back and refreshing stops for the browser
55
- * session. The decisions themselves come from `createPreprProxy` or
56
- * `resolveDecisions` in `proxy.ts`.
57
- *
58
- * @example
59
- * <PreprPersonalizationSwitch />
60
- */
61
- declare function PreprPersonalizationSwitch({ refresh, freshFor, }: PreprPersonalizationSwitchProps): null;
43
+ declare function PreprPersonalizationSwitch({ refresh, freshFor, }: PreprPersonalizationSwitchProps): ReactElement | null;
62
44
  /**
63
45
  * Wraps one rendered variant and, once hydrated, puts the variant keys on the
64
46
  * elements inside, where Prepr's tracking pixel counts impressions and the
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  createPreprPreview,
4
4
  loadTrackingPixel
5
- } from "../chunk-3YZANSVY.js";
5
+ } from "../chunk-HPWTLDLR.js";
6
6
  import "../chunk-S5RWVMDJ.js";
7
- import "../chunk-VY5D3IED.js";
7
+ import "../chunk-OH2PPC76.js";
8
8
 
9
9
  // src/nextjs/components.ts
10
10
  import { usePathname, useRouter } from "next/navigation";
@@ -12,7 +12,9 @@ import {
12
12
  createElement,
13
13
  useEffect as useEffect2,
14
14
  useLayoutEffect,
15
- useRef
15
+ useRef,
16
+ useState,
17
+ Suspense
16
18
  } from "react";
17
19
 
18
20
  // src/react/hydration.ts
@@ -268,27 +270,43 @@ function PreprAbSwitch() {
268
270
  });
269
271
  return null;
270
272
  }
273
+ var viewCount = 0;
271
274
  function PreprPersonalizationSwitch({
272
275
  refresh = true,
273
276
  freshFor
274
277
  }) {
275
- const pathname = usePathname();
276
- const scheduler = useRef(null);
278
+ const [scheduler, setScheduler] = useState(
279
+ null
280
+ );
281
+ const viewUrl = useRef(null);
277
282
  useLayoutEffect(() => {
278
- applyPreprDecisions();
283
+ const url = location.pathname + location.search;
284
+ if (viewUrl.current === url) return;
285
+ viewUrl.current = url;
286
+ applyPreprDecisions(`${url}#${++viewCount}`);
279
287
  });
280
288
  useEffect2(() => {
281
289
  if (!refresh) return;
282
290
  const started = createPreprRefreshScheduler({ freshFor });
283
- scheduler.current = started;
291
+ setScheduler(started);
284
292
  return () => {
285
293
  started.stop();
286
- scheduler.current = null;
294
+ setScheduler(null);
287
295
  };
288
296
  }, [refresh, freshFor]);
297
+ return scheduler ? createElement(
298
+ Suspense,
299
+ { fallback: null },
300
+ createElement(ViewCounter, { scheduler })
301
+ ) : null;
302
+ }
303
+ function ViewCounter({
304
+ scheduler
305
+ }) {
306
+ const pathname = usePathname();
289
307
  useEffect2(() => {
290
- scheduler.current?.view();
291
- }, [pathname, refresh, freshFor]);
308
+ scheduler.view();
309
+ }, [pathname, scheduler]);
292
310
  return null;
293
311
  }
294
312
  var VARIANT_KEY_ATTRIBUTE = "data-prepr-variant-key";
@@ -38,7 +38,7 @@ __export(graphql_exports, {
38
38
  module.exports = __toCommonJS(graphql_exports);
39
39
 
40
40
  // src/version.ts
41
- var VERSION = "0.6.0-alpha.3";
41
+ var VERSION = "0.6.0-alpha.5";
42
42
 
43
43
  // src/core/features.ts
44
44
  function isEnabled(config) {
@@ -7,7 +7,7 @@ import {
7
7
  preprDraftRedirect,
8
8
  resolvePreprBucket,
9
9
  validatePreprToken
10
- } from "./chunk-5XGJJVGX.js";
10
+ } from "./chunk-L4L6X3JJ.js";
11
11
 
12
12
  // src/core/variants/constants.ts
13
13
  var PREPR_CONTEXT_ALIAS = "_preprContext";
@@ -44,7 +44,7 @@ module.exports = __toCommonJS(nextjs_exports);
44
44
  var import_server = require("next/server");
45
45
 
46
46
  // src/version.ts
47
- var VERSION = "0.6.0-alpha.3";
47
+ var VERSION = "0.6.0-alpha.5";
48
48
 
49
49
  // src/core/constants.ts
50
50
  var COOKIE_PREVIEW_MODE = "Prepr-Preview-Mode";
@@ -1,6 +1,7 @@
1
1
  import { NextRequest, NextResponse } from 'next/server';
2
2
  import { a as PreprFeatures, P as PreprHeaders, c as PreprToolbarProps, d as PreprToolbarComponentProps } from './server-BL-sqZvu.cjs';
3
3
  export { b as PreprError, e as extractAccessToken, i as isPersonalizedResponse, v as validatePreprToken } from './server-BL-sqZvu.cjs';
4
+ import { ReactElement } from 'react';
4
5
 
5
6
  interface PreprMiddlewareOptions {
6
7
  /** Enable preview-mode headers (segment/AB overrides, preview bar). */
@@ -163,24 +164,6 @@ interface PreprPersonalizationSwitchProps {
163
164
  /** Same as `createPreprProxy`'s `freshFor`. Default 10 000 ms. */
164
165
  freshFor?: number;
165
166
  }
166
- /**
167
- * Shows the segment variants decided in the proxy for the groups above the
168
- * fold, before the page paints, and keeps those decisions fresh while the
169
- * visitor browses: a short while after each page view, when the visitor
170
- * points at a link to a personalized page, and when the tab comes back.
171
- * Because the next page's decision is already in place when it opens, a
172
- * visitor who joins a segment mid-visit sees it on their next page view,
173
- * without anything on screen changing.
174
- *
175
- * Mount it once in the root layout. The background refreshes are answered by
176
- * `createPreprProxy`; with a proxy that calls `resolveDecisions` itself, the
177
- * first refresh gets a page back and refreshing stops for the browser
178
- * session. The decisions themselves come from `createPreprProxy` or
179
- * `resolveDecisions` in `proxy.ts`.
180
- *
181
- * @example
182
- * <PreprPersonalizationSwitch />
183
- */
184
- declare function PreprPersonalizationSwitch({ refresh, freshFor, }: PreprPersonalizationSwitchProps): null;
167
+ declare function PreprPersonalizationSwitch({ refresh, freshFor, }: PreprPersonalizationSwitchProps): ReactElement | null;
185
168
 
186
169
  export { PREPR_BUCKET_COOKIE, type PreprBucket, type PreprDraftOptions, type PreprMiddlewareOptions, PreprPersonalizationSwitch, type PreprPersonalizationSwitchProps, PreprToolbar, PreprTrackingPixel, type PreprTrackingPixelProps, type ResolvePreprBucketOptions, createPreprDraftRoute, createPreprMiddleware, getActiveSegment, getActiveVariant, getPreprHeaders, getPreprUUID, getToolbarProps, preprDraftRedirect, resolvePreprBucket };
@@ -1,6 +1,7 @@
1
1
  import { NextRequest, NextResponse } from 'next/server';
2
2
  import { a as PreprFeatures, P as PreprHeaders, c as PreprToolbarProps, d as PreprToolbarComponentProps } from './server-BL-sqZvu.js';
3
3
  export { b as PreprError, e as extractAccessToken, i as isPersonalizedResponse, v as validatePreprToken } from './server-BL-sqZvu.js';
4
+ import { ReactElement } from 'react';
4
5
 
5
6
  interface PreprMiddlewareOptions {
6
7
  /** Enable preview-mode headers (segment/AB overrides, preview bar). */
@@ -163,24 +164,6 @@ interface PreprPersonalizationSwitchProps {
163
164
  /** Same as `createPreprProxy`'s `freshFor`. Default 10 000 ms. */
164
165
  freshFor?: number;
165
166
  }
166
- /**
167
- * Shows the segment variants decided in the proxy for the groups above the
168
- * fold, before the page paints, and keeps those decisions fresh while the
169
- * visitor browses: a short while after each page view, when the visitor
170
- * points at a link to a personalized page, and when the tab comes back.
171
- * Because the next page's decision is already in place when it opens, a
172
- * visitor who joins a segment mid-visit sees it on their next page view,
173
- * without anything on screen changing.
174
- *
175
- * Mount it once in the root layout. The background refreshes are answered by
176
- * `createPreprProxy`; with a proxy that calls `resolveDecisions` itself, the
177
- * first refresh gets a page back and refreshing stops for the browser
178
- * session. The decisions themselves come from `createPreprProxy` or
179
- * `resolveDecisions` in `proxy.ts`.
180
- *
181
- * @example
182
- * <PreprPersonalizationSwitch />
183
- */
184
- declare function PreprPersonalizationSwitch({ refresh, freshFor, }: PreprPersonalizationSwitchProps): null;
167
+ declare function PreprPersonalizationSwitch({ refresh, freshFor, }: PreprPersonalizationSwitchProps): ReactElement | null;
185
168
 
186
169
  export { PREPR_BUCKET_COOKIE, type PreprBucket, type PreprDraftOptions, type PreprMiddlewareOptions, PreprPersonalizationSwitch, type PreprPersonalizationSwitchProps, PreprToolbar, PreprTrackingPixel, type PreprTrackingPixelProps, type ResolvePreprBucketOptions, createPreprDraftRoute, createPreprMiddleware, getActiveSegment, getActiveVariant, getPreprHeaders, getPreprUUID, getToolbarProps, preprDraftRedirect, resolvePreprBucket };
@@ -13,7 +13,7 @@ import {
13
13
  preprDraftRedirect,
14
14
  resolvePreprBucket,
15
15
  validatePreprToken
16
- } from "./chunk-5XGJJVGX.js";
16
+ } from "./chunk-L4L6X3JJ.js";
17
17
 
18
18
  // src/nextjs/index.ts
19
19
  import {
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "0.6.0-alpha.3";
2
+ var VERSION = "0.6.0-alpha.5";
3
3
 
4
4
  // src/core/constants.ts
5
5
  var COOKIE_PREVIEW_MODE = "Prepr-Preview-Mode";
@@ -4,7 +4,7 @@ import {
4
4
  getPreprHeadersFromHeaders,
5
5
  isPersonalizedResponse,
6
6
  validatePreprToken
7
- } from "./chunk-KROR7RXW.js";
7
+ } from "./chunk-PJZMLKJ2.js";
8
8
 
9
9
  // src/core/variants/constants.ts
10
10
  var PREPR_CONTEXT_ALIAS = "_preprContext";
@@ -36,7 +36,7 @@ __export(nuxt_exports, {
36
36
  module.exports = __toCommonJS(nuxt_exports);
37
37
 
38
38
  // src/version.ts
39
- var VERSION = "0.6.0-alpha.3";
39
+ var VERSION = "0.6.0-alpha.5";
40
40
 
41
41
  // src/core/constants.ts
42
42
  var COOKIE_PREVIEW_MODE = "Prepr-Preview-Mode";
@@ -11,7 +11,7 @@ import {
11
11
  handlePreprRequest,
12
12
  isPersonalizedResponse,
13
13
  validatePreprToken
14
- } from "./chunk-KROR7RXW.js";
14
+ } from "./chunk-PJZMLKJ2.js";
15
15
 
16
16
  // src/nuxt/server.ts
17
17
  function getPreprUUID(headers) {
@@ -2313,7 +2313,7 @@ function isReactHydrated(text) {
2313
2313
  }
2314
2314
 
2315
2315
  // src/version.ts
2316
- var VERSION = "0.6.0-alpha.3";
2316
+ var VERSION = "0.6.0-alpha.5";
2317
2317
 
2318
2318
  // src/core/pixel.ts
2319
2319
  var PIXEL_SCRIPT_URL = "https://cdn.tracking.prepr.io/js/prepr.min.js";
@@ -2289,7 +2289,7 @@ function isReactHydrated(text) {
2289
2289
  }
2290
2290
 
2291
2291
  // src/version.ts
2292
- var VERSION = "0.6.0-alpha.3";
2292
+ var VERSION = "0.6.0-alpha.5";
2293
2293
 
2294
2294
  // src/core/pixel.ts
2295
2295
  var PIXEL_SCRIPT_URL = "https://cdn.tracking.prepr.io/js/prepr.min.js";
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "0.6.0-alpha.3";
2
+ var VERSION = "0.6.0-alpha.5";
3
3
 
4
4
  // src/core/constants.ts
5
5
  var COOKIE_PREVIEW_MODE = "Prepr-Preview-Mode";
@@ -4,7 +4,7 @@ import {
4
4
  getPreprHeadersFromLocals,
5
5
  isPersonalizedResponse,
6
6
  validatePreprToken
7
- } from "./chunk-INDMNPEM.js";
7
+ } from "./chunk-SKBW7RBD.js";
8
8
 
9
9
  // src/core/variants/constants.ts
10
10
  var PREPR_CONTEXT_ALIAS = "_preprContext";
@@ -36,7 +36,7 @@ __export(sveltekit_exports, {
36
36
  module.exports = __toCommonJS(sveltekit_exports);
37
37
 
38
38
  // src/version.ts
39
- var VERSION = "0.6.0-alpha.3";
39
+ var VERSION = "0.6.0-alpha.5";
40
40
 
41
41
  // src/core/constants.ts
42
42
  var COOKIE_PREVIEW_MODE = "Prepr-Preview-Mode";
@@ -11,7 +11,7 @@ import {
11
11
  isPersonalizedResponse,
12
12
  preprHandle,
13
13
  validatePreprToken
14
- } from "./chunk-INDMNPEM.js";
14
+ } from "./chunk-SKBW7RBD.js";
15
15
 
16
16
  // src/sveltekit/server.ts
17
17
  function getPreprUUID(headers) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@preprio/toolkit",
3
- "version": "0.6.0-alpha.3",
3
+ "version": "0.6.0-alpha.5",
4
4
  "description": "Prepr personalization, A/B testing and preview toolkit for React, Next.js, Nuxt, Astro, SvelteKit and Express",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Prepr B.V. (https://prepr.io)",