@preprio/toolkit 0.6.0-alpha.7 → 0.6.0-alpha.9

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 (39) hide show
  1. package/README.md +5 -5
  2. package/dist/astro/{chunk-3EXK2LHI.js → chunk-UN4JADNU.js} +1 -1
  3. package/dist/astro/graphql.js +1 -1
  4. package/dist/astro/index.cjs +1 -1
  5. package/dist/astro/index.js +1 -1
  6. package/dist/{chunk-VQIPTUN4.js → chunk-5QIWVDP2.js} +1 -1
  7. package/dist/{chunk-U7TRFVK7.js → chunk-J66UOCK6.js} +1 -1
  8. package/dist/{chunk-3QGWCYTL.js → chunk-WQBKQG4R.js} +1 -1
  9. package/dist/{chunk-PFJO4TYL.js → chunk-XL4Y7FGW.js} +1 -1
  10. package/dist/graphql/codegen.js +3 -3
  11. package/dist/graphql.js +3 -3
  12. package/dist/index.cjs +1 -1
  13. package/dist/index.d.cts +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.js +3 -3
  16. package/dist/nextjs/{chunk-CZK7SMBD.js → chunk-CMV6ZP6E.js} +1 -1
  17. package/dist/nextjs/components.cjs +128 -67
  18. package/dist/nextjs/components.d.cts +14 -13
  19. package/dist/nextjs/components.d.ts +14 -13
  20. package/dist/nextjs/components.js +129 -68
  21. package/dist/nextjs/graphql.cjs +99 -27
  22. package/dist/nextjs/graphql.d.cts +5 -5
  23. package/dist/nextjs/graphql.d.ts +5 -5
  24. package/dist/nextjs/graphql.js +99 -27
  25. package/dist/nextjs/index.cjs +1 -1
  26. package/dist/nextjs/index.d.cts +9 -7
  27. package/dist/nextjs/index.d.ts +9 -7
  28. package/dist/nextjs/index.js +1 -1
  29. package/dist/nuxt/{chunk-JL33ENCM.js → chunk-XWOABVMW.js} +1 -1
  30. package/dist/nuxt/graphql.js +1 -1
  31. package/dist/nuxt/index.cjs +1 -1
  32. package/dist/nuxt/index.js +1 -1
  33. package/dist/react/components.cjs +1 -1
  34. package/dist/react/components.js +1 -1
  35. package/dist/sveltekit/{chunk-S7S276V7.js → chunk-3S5RA6G5.js} +1 -1
  36. package/dist/sveltekit/graphql.js +1 -1
  37. package/dist/sveltekit/index.cjs +1 -1
  38. package/dist/sveltekit/index.js +1 -1
  39. package/package.json +1 -1
@@ -175,15 +175,17 @@ declare function PreprTrackingPixel({ id, config, }: PreprTrackingPixelProps): n
175
175
  */
176
176
  declare function PreprToolbar({ options, ...props }: PreprToolbarComponentProps): null;
177
177
  /**
178
- * Decides every client-side navigation to another page: when the visitor
179
- * presses a same-site link, it asks `createPreprProxy` which variants they
180
- * get on that page, and holds the click until the answer is in. The new page
181
- * then paints with those variants, never with the default variant first.
182
- * Pressing starts the request, so the wait mostly overlaps the click itself.
178
+ * Gets each client-side navigation's decision in before the click: when the
179
+ * visitor hovers over a same-site link (or presses it, on touch devices), it
180
+ * asks `createPreprProxy` which variants they get on that page. Clicks are
181
+ * never held: the new page paints with those variants when the answer is in,
182
+ * and keeps its personalized sections hidden until then otherwise. Pages
183
+ * without personalization answer with no groups and are not asked again for
184
+ * an hour.
183
185
  *
184
186
  * Mount it once in the root layout, so links on pages without a
185
- * `PreprStack` are covered too. Clicks with a modifier key, links to other
186
- * sites and links that open a new tab or download are left alone.
187
+ * `PreprStack` are covered too. Links to other sites and links that open a
188
+ * new tab or download are left alone.
187
189
  *
188
190
  * @example
189
191
  * <PreprPersonalizationSwitch />
@@ -15,7 +15,7 @@ import {
15
15
  preprItemTag,
16
16
  preprModelTag,
17
17
  validatePreprToken
18
- } from "./chunk-CZK7SMBD.js";
18
+ } from "./chunk-CMV6ZP6E.js";
19
19
 
20
20
  // src/nextjs/webhook.ts
21
21
  import { revalidateTag } from "next/cache";
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "0.6.0-alpha.7";
2
+ var VERSION = "0.6.0-alpha.9";
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-JL33ENCM.js";
7
+ } from "./chunk-XWOABVMW.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.7";
39
+ var VERSION = "0.6.0-alpha.9";
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-JL33ENCM.js";
14
+ } from "./chunk-XWOABVMW.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.7";
2316
+ var VERSION = "0.6.0-alpha.9";
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.7";
2292
+ var VERSION = "0.6.0-alpha.9";
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.7";
2
+ var VERSION = "0.6.0-alpha.9";
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-S7S276V7.js";
7
+ } from "./chunk-3S5RA6G5.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.7";
39
+ var VERSION = "0.6.0-alpha.9";
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-S7S276V7.js";
14
+ } from "./chunk-3S5RA6G5.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.7",
3
+ "version": "0.6.0-alpha.9",
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)",