@preprio/toolkit 0.2.0-beta.3 → 0.2.0-beta.4
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/dist/astro/index.cjs +1 -1
- package/dist/astro/index.d.cts +12 -2
- package/dist/astro/index.d.ts +12 -2
- package/dist/astro/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/nextjs/components.d.cts +1 -1
- package/dist/nextjs/components.d.ts +1 -1
- package/dist/nextjs/index.cjs +1 -1
- package/dist/nextjs/index.d.cts +12 -2
- package/dist/nextjs/index.d.ts +12 -2
- package/dist/nextjs/index.js +1 -1
- package/dist/nuxt/index.cjs +1 -1
- package/dist/nuxt/index.d.cts +12 -2
- package/dist/nuxt/index.d.ts +12 -2
- package/dist/nuxt/index.js +1 -1
- package/dist/{pixel-763p7m6A.d.cts → pixel-Dd72wuJp.d.cts} +12 -2
- package/dist/{pixel-763p7m6A.d.ts → pixel-Dd72wuJp.d.ts} +12 -2
- package/dist/react/components.d.cts +12 -2
- package/dist/react/components.d.ts +12 -2
- package/dist/sveltekit/index.cjs +1 -1
- package/dist/sveltekit/index.d.cts +12 -2
- package/dist/sveltekit/index.d.ts +12 -2
- package/dist/sveltekit/index.js +1 -1
- package/package.json +12 -12
- package/src/nuxt/PreprToolbar.vue +2 -2
package/dist/astro/index.cjs
CHANGED
package/dist/astro/index.d.cts
CHANGED
|
@@ -27,8 +27,18 @@ interface PreprFeatures {
|
|
|
27
27
|
editMode?: PreprFeatureConfig;
|
|
28
28
|
}
|
|
29
29
|
interface PreprToolbarProps {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Server-resolved active segment. Optional: omit it with `segments`
|
|
32
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
33
|
+
* the persisted cookie is used.
|
|
34
|
+
*/
|
|
35
|
+
readonly activeSegment?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Server-resolved active A/B variant. Optional: omit it with `abTesting`
|
|
38
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
39
|
+
* the persisted cookie is used.
|
|
40
|
+
*/
|
|
41
|
+
readonly activeVariant?: string | null;
|
|
32
42
|
/** Available segments to personalize on. */
|
|
33
43
|
readonly segments?: readonly PreprSegment[];
|
|
34
44
|
/** @deprecated Alias for `segments`. */
|
package/dist/astro/index.d.ts
CHANGED
|
@@ -27,8 +27,18 @@ interface PreprFeatures {
|
|
|
27
27
|
editMode?: PreprFeatureConfig;
|
|
28
28
|
}
|
|
29
29
|
interface PreprToolbarProps {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Server-resolved active segment. Optional: omit it with `segments`
|
|
32
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
33
|
+
* the persisted cookie is used.
|
|
34
|
+
*/
|
|
35
|
+
readonly activeSegment?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Server-resolved active A/B variant. Optional: omit it with `abTesting`
|
|
38
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
39
|
+
* the persisted cookie is used.
|
|
40
|
+
*/
|
|
41
|
+
readonly activeVariant?: string | null;
|
|
32
42
|
/** Available segments to personalize on. */
|
|
33
43
|
readonly segments?: readonly PreprSegment[];
|
|
34
44
|
/** @deprecated Alias for `segments`. */
|
package/dist/astro/index.js
CHANGED
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { P as PreprFeatures, R as ResolvedPreprFeatures, L as Locale, a as PreprSegment, b as PreprVariant, c as PreprToolbarProps, d as PreprPreviewOptions, e as PreprErrorCode, f as PreprHeaders } from './pixel-
|
|
2
|
-
export { g as PreprEnvironment, h as PreprEventType, i as PreprFeatureConfig, j as PreprHeaderName, k as PreprPixelConfig, l as PreprToolbarComponentProps, m as PreprToolbarOptions, n as loadTrackingPixel, s as setTrackingParam, t as trackEvent } from './pixel-
|
|
1
|
+
import { P as PreprFeatures, R as ResolvedPreprFeatures, L as Locale, a as PreprSegment, b as PreprVariant, c as PreprToolbarProps, d as PreprPreviewOptions, e as PreprErrorCode, f as PreprHeaders } from './pixel-Dd72wuJp.cjs';
|
|
2
|
+
export { g as PreprEnvironment, h as PreprEventType, i as PreprFeatureConfig, j as PreprHeaderName, k as PreprPixelConfig, l as PreprToolbarComponentProps, m as PreprToolbarOptions, n as loadTrackingPixel, s as setTrackingParam, t as trackEvent } from './pixel-Dd72wuJp.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Package version; must match package.json. Lives in its own leaf module so
|
|
6
6
|
* core can import it without cycling through the barrel.
|
|
7
7
|
*/
|
|
8
|
-
declare const VERSION = "0.2.0-beta.
|
|
8
|
+
declare const VERSION = "0.2.0-beta.4";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Resolve a `PreprFeatures` bag to plain booleans, defaulting every omitted key
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { P as PreprFeatures, R as ResolvedPreprFeatures, L as Locale, a as PreprSegment, b as PreprVariant, c as PreprToolbarProps, d as PreprPreviewOptions, e as PreprErrorCode, f as PreprHeaders } from './pixel-
|
|
2
|
-
export { g as PreprEnvironment, h as PreprEventType, i as PreprFeatureConfig, j as PreprHeaderName, k as PreprPixelConfig, l as PreprToolbarComponentProps, m as PreprToolbarOptions, n as loadTrackingPixel, s as setTrackingParam, t as trackEvent } from './pixel-
|
|
1
|
+
import { P as PreprFeatures, R as ResolvedPreprFeatures, L as Locale, a as PreprSegment, b as PreprVariant, c as PreprToolbarProps, d as PreprPreviewOptions, e as PreprErrorCode, f as PreprHeaders } from './pixel-Dd72wuJp.js';
|
|
2
|
+
export { g as PreprEnvironment, h as PreprEventType, i as PreprFeatureConfig, j as PreprHeaderName, k as PreprPixelConfig, l as PreprToolbarComponentProps, m as PreprToolbarOptions, n as loadTrackingPixel, s as setTrackingParam, t as trackEvent } from './pixel-Dd72wuJp.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Package version; must match package.json. Lives in its own leaf module so
|
|
6
6
|
* core can import it without cycling through the barrel.
|
|
7
7
|
*/
|
|
8
|
-
declare const VERSION = "0.2.0-beta.
|
|
8
|
+
declare const VERSION = "0.2.0-beta.4";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Resolve a `PreprFeatures` bag to plain booleans, defaulting every omitted key
|
package/dist/index.js
CHANGED
package/dist/nextjs/index.cjs
CHANGED
|
@@ -38,7 +38,7 @@ module.exports = __toCommonJS(nextjs_exports);
|
|
|
38
38
|
var import_server = require("next/server");
|
|
39
39
|
|
|
40
40
|
// src/version.ts
|
|
41
|
-
var VERSION = "0.2.0-beta.
|
|
41
|
+
var VERSION = "0.2.0-beta.4";
|
|
42
42
|
|
|
43
43
|
// src/core/constants.ts
|
|
44
44
|
var COOKIE_PREVIEW_MODE = "Prepr-Preview-Mode";
|
package/dist/nextjs/index.d.cts
CHANGED
|
@@ -30,8 +30,18 @@ interface PreprFeatures {
|
|
|
30
30
|
editMode?: PreprFeatureConfig;
|
|
31
31
|
}
|
|
32
32
|
interface PreprToolbarProps {
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Server-resolved active segment. Optional: omit it with `segments`
|
|
35
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
36
|
+
* the persisted cookie is used.
|
|
37
|
+
*/
|
|
38
|
+
readonly activeSegment?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Server-resolved active A/B variant. Optional: omit it with `abTesting`
|
|
41
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
42
|
+
* the persisted cookie is used.
|
|
43
|
+
*/
|
|
44
|
+
readonly activeVariant?: string | null;
|
|
35
45
|
/** Available segments to personalize on. */
|
|
36
46
|
readonly segments?: readonly PreprSegment[];
|
|
37
47
|
/** @deprecated Alias for `segments`. */
|
package/dist/nextjs/index.d.ts
CHANGED
|
@@ -30,8 +30,18 @@ interface PreprFeatures {
|
|
|
30
30
|
editMode?: PreprFeatureConfig;
|
|
31
31
|
}
|
|
32
32
|
interface PreprToolbarProps {
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Server-resolved active segment. Optional: omit it with `segments`
|
|
35
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
36
|
+
* the persisted cookie is used.
|
|
37
|
+
*/
|
|
38
|
+
readonly activeSegment?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Server-resolved active A/B variant. Optional: omit it with `abTesting`
|
|
41
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
42
|
+
* the persisted cookie is used.
|
|
43
|
+
*/
|
|
44
|
+
readonly activeVariant?: string | null;
|
|
35
45
|
/** Available segments to personalize on. */
|
|
36
46
|
readonly segments?: readonly PreprSegment[];
|
|
37
47
|
/** @deprecated Alias for `segments`. */
|
package/dist/nextjs/index.js
CHANGED
package/dist/nuxt/index.cjs
CHANGED
package/dist/nuxt/index.d.cts
CHANGED
|
@@ -27,8 +27,18 @@ interface PreprFeatures {
|
|
|
27
27
|
editMode?: PreprFeatureConfig;
|
|
28
28
|
}
|
|
29
29
|
interface PreprToolbarProps {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Server-resolved active segment. Optional: omit it with `segments`
|
|
32
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
33
|
+
* the persisted cookie is used.
|
|
34
|
+
*/
|
|
35
|
+
readonly activeSegment?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Server-resolved active A/B variant. Optional: omit it with `abTesting`
|
|
38
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
39
|
+
* the persisted cookie is used.
|
|
40
|
+
*/
|
|
41
|
+
readonly activeVariant?: string | null;
|
|
32
42
|
/** Available segments to personalize on. */
|
|
33
43
|
readonly segments?: readonly PreprSegment[];
|
|
34
44
|
/** @deprecated Alias for `segments`. */
|
package/dist/nuxt/index.d.ts
CHANGED
|
@@ -27,8 +27,18 @@ interface PreprFeatures {
|
|
|
27
27
|
editMode?: PreprFeatureConfig;
|
|
28
28
|
}
|
|
29
29
|
interface PreprToolbarProps {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Server-resolved active segment. Optional: omit it with `segments`
|
|
32
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
33
|
+
* the persisted cookie is used.
|
|
34
|
+
*/
|
|
35
|
+
readonly activeSegment?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Server-resolved active A/B variant. Optional: omit it with `abTesting`
|
|
38
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
39
|
+
* the persisted cookie is used.
|
|
40
|
+
*/
|
|
41
|
+
readonly activeVariant?: string | null;
|
|
32
42
|
/** Available segments to personalize on. */
|
|
33
43
|
readonly segments?: readonly PreprSegment[];
|
|
34
44
|
/** @deprecated Alias for `segments`. */
|
package/dist/nuxt/index.js
CHANGED
|
@@ -70,8 +70,18 @@ interface PreprPreviewOptions extends PreprToolbarOptions {
|
|
|
70
70
|
allowedEditorOrigins?: string[];
|
|
71
71
|
}
|
|
72
72
|
interface PreprToolbarProps {
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Server-resolved active segment. Optional: omit it with `segments`
|
|
75
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
76
|
+
* the persisted cookie is used.
|
|
77
|
+
*/
|
|
78
|
+
readonly activeSegment?: string | null;
|
|
79
|
+
/**
|
|
80
|
+
* Server-resolved active A/B variant. Optional: omit it with `abTesting`
|
|
81
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
82
|
+
* the persisted cookie is used.
|
|
83
|
+
*/
|
|
84
|
+
readonly activeVariant?: string | null;
|
|
75
85
|
/** Available segments to personalize on. */
|
|
76
86
|
readonly segments?: readonly PreprSegment[];
|
|
77
87
|
/** @deprecated Alias for `segments`. */
|
|
@@ -70,8 +70,18 @@ interface PreprPreviewOptions extends PreprToolbarOptions {
|
|
|
70
70
|
allowedEditorOrigins?: string[];
|
|
71
71
|
}
|
|
72
72
|
interface PreprToolbarProps {
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Server-resolved active segment. Optional: omit it with `segments`
|
|
75
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
76
|
+
* the persisted cookie is used.
|
|
77
|
+
*/
|
|
78
|
+
readonly activeSegment?: string | null;
|
|
79
|
+
/**
|
|
80
|
+
* Server-resolved active A/B variant. Optional: omit it with `abTesting`
|
|
81
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
82
|
+
* the persisted cookie is used.
|
|
83
|
+
*/
|
|
84
|
+
readonly activeVariant?: string | null;
|
|
75
85
|
/** Available segments to personalize on. */
|
|
76
86
|
readonly segments?: readonly PreprSegment[];
|
|
77
87
|
/** @deprecated Alias for `segments`. */
|
|
@@ -64,8 +64,18 @@ interface PreprPreviewOptions extends PreprToolbarOptions {
|
|
|
64
64
|
allowedEditorOrigins?: string[];
|
|
65
65
|
}
|
|
66
66
|
interface PreprToolbarProps {
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Server-resolved active segment. Optional: omit it with `segments`
|
|
69
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
70
|
+
* the persisted cookie is used.
|
|
71
|
+
*/
|
|
72
|
+
readonly activeSegment?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* Server-resolved active A/B variant. Optional: omit it with `abTesting`
|
|
75
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
76
|
+
* the persisted cookie is used.
|
|
77
|
+
*/
|
|
78
|
+
readonly activeVariant?: string | null;
|
|
69
79
|
/** Available segments to personalize on. */
|
|
70
80
|
readonly segments?: readonly PreprSegment[];
|
|
71
81
|
/** @deprecated Alias for `segments`. */
|
|
@@ -64,8 +64,18 @@ interface PreprPreviewOptions extends PreprToolbarOptions {
|
|
|
64
64
|
allowedEditorOrigins?: string[];
|
|
65
65
|
}
|
|
66
66
|
interface PreprToolbarProps {
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Server-resolved active segment. Optional: omit it with `segments`
|
|
69
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
70
|
+
* the persisted cookie is used.
|
|
71
|
+
*/
|
|
72
|
+
readonly activeSegment?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* Server-resolved active A/B variant. Optional: omit it with `abTesting`
|
|
75
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
76
|
+
* the persisted cookie is used.
|
|
77
|
+
*/
|
|
78
|
+
readonly activeVariant?: string | null;
|
|
69
79
|
/** Available segments to personalize on. */
|
|
70
80
|
readonly segments?: readonly PreprSegment[];
|
|
71
81
|
/** @deprecated Alias for `segments`. */
|
package/dist/sveltekit/index.cjs
CHANGED
|
@@ -27,8 +27,18 @@ interface PreprFeatures {
|
|
|
27
27
|
editMode?: PreprFeatureConfig;
|
|
28
28
|
}
|
|
29
29
|
interface PreprToolbarProps {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Server-resolved active segment. Optional: omit it with `segments`
|
|
32
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
33
|
+
* the persisted cookie is used.
|
|
34
|
+
*/
|
|
35
|
+
readonly activeSegment?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Server-resolved active A/B variant. Optional: omit it with `abTesting`
|
|
38
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
39
|
+
* the persisted cookie is used.
|
|
40
|
+
*/
|
|
41
|
+
readonly activeVariant?: string | null;
|
|
32
42
|
/** Available segments to personalize on. */
|
|
33
43
|
readonly segments?: readonly PreprSegment[];
|
|
34
44
|
/** @deprecated Alias for `segments`. */
|
|
@@ -27,8 +27,18 @@ interface PreprFeatures {
|
|
|
27
27
|
editMode?: PreprFeatureConfig;
|
|
28
28
|
}
|
|
29
29
|
interface PreprToolbarProps {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Server-resolved active segment. Optional: omit it with `segments`
|
|
32
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
33
|
+
* the persisted cookie is used.
|
|
34
|
+
*/
|
|
35
|
+
readonly activeSegment?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Server-resolved active A/B variant. Optional: omit it with `abTesting`
|
|
38
|
+
* disabled, where there is nothing to resolve. When enabled and omitted,
|
|
39
|
+
* the persisted cookie is used.
|
|
40
|
+
*/
|
|
41
|
+
readonly activeVariant?: string | null;
|
|
32
42
|
/** Available segments to personalize on. */
|
|
33
43
|
readonly segments?: readonly PreprSegment[];
|
|
34
44
|
/** @deprecated Alias for `segments`. */
|
package/dist/sveltekit/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@preprio/toolkit",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.4",
|
|
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)",
|
|
@@ -94,16 +94,6 @@
|
|
|
94
94
|
"src/sveltekit/*.svelte",
|
|
95
95
|
"src/nuxt/*.vue"
|
|
96
96
|
],
|
|
97
|
-
"scripts": {
|
|
98
|
-
"gen:css": "node scripts/compile-css.mjs",
|
|
99
|
-
"prebuild": "rm -rf dist && pnpm gen:css && node scripts/check-version.mjs",
|
|
100
|
-
"pretest": "pnpm gen:css",
|
|
101
|
-
"pretypecheck": "pnpm gen:css",
|
|
102
|
-
"build": "tsup",
|
|
103
|
-
"postbuild": "node scripts/check-exports.mjs",
|
|
104
|
-
"test": "vitest run",
|
|
105
|
-
"typecheck": "tsc --noEmit"
|
|
106
|
-
},
|
|
107
97
|
"dependencies": {
|
|
108
98
|
"@vercel/stega": "^1.1.0",
|
|
109
99
|
"preact": "^10.29.7"
|
|
@@ -145,5 +135,15 @@
|
|
|
145
135
|
"tsup": "^8.5.1",
|
|
146
136
|
"typescript": "^5.9.3",
|
|
147
137
|
"vitest": "^4.1.10"
|
|
138
|
+
},
|
|
139
|
+
"scripts": {
|
|
140
|
+
"gen:css": "node scripts/compile-css.mjs",
|
|
141
|
+
"prebuild": "rm -rf dist && pnpm gen:css && node scripts/check-version.mjs",
|
|
142
|
+
"pretest": "pnpm gen:css",
|
|
143
|
+
"pretypecheck": "pnpm gen:css",
|
|
144
|
+
"build": "tsup",
|
|
145
|
+
"postbuild": "node scripts/check-exports.mjs",
|
|
146
|
+
"test": "vitest run",
|
|
147
|
+
"typecheck": "tsc --noEmit"
|
|
148
148
|
}
|
|
149
|
-
}
|
|
149
|
+
}
|
|
@@ -11,8 +11,8 @@ import { createPreprPreview } from '@preprio/toolkit';
|
|
|
11
11
|
import type { PreprToolbarComponentProps } from '@preprio/toolkit';
|
|
12
12
|
|
|
13
13
|
const props = defineProps<{
|
|
14
|
-
activeSegment
|
|
15
|
-
activeVariant
|
|
14
|
+
activeSegment?: PreprToolbarComponentProps['activeSegment'];
|
|
15
|
+
activeVariant?: PreprToolbarComponentProps['activeVariant'];
|
|
16
16
|
segments?: PreprToolbarComponentProps['segments'];
|
|
17
17
|
data?: PreprToolbarComponentProps['data'];
|
|
18
18
|
options?: PreprToolbarComponentProps['options'];
|