@preprio/toolkit 0.2.0-beta.3 → 0.2.0-beta.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.
- 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/{chunk-6OOGNVJ4.js → chunk-BYJ2JBGX.js} +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/nextjs/components.cjs +2 -2
- package/dist/nextjs/components.d.cts +1 -1
- package/dist/nextjs/components.d.ts +1 -1
- package/dist/nextjs/components.js +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.cjs +2 -2
- package/dist/react/components.d.cts +12 -2
- package/dist/react/components.d.ts +12 -2
- package/dist/react/components.js +2 -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
|
@@ -1394,8 +1394,8 @@ function Panel({
|
|
|
1394
1394
|
"aria-label": t3("common.toolbar"),
|
|
1395
1395
|
children: [
|
|
1396
1396
|
/* @__PURE__ */ u2(Header, { t: t3, onClose: handlers.onClose }),
|
|
1397
|
-
/* @__PURE__ */ u2("div", { class: "prepr-section", "data-prepr": "section-adaptive", children: [
|
|
1398
|
-
/* @__PURE__ */ u2("span", { class: "prepr-section-label", "data-prepr": "adaptive-label", children:
|
|
1397
|
+
showAdaptive && /* @__PURE__ */ u2("div", { class: "prepr-section", "data-prepr": "section-adaptive", children: [
|
|
1398
|
+
/* @__PURE__ */ u2("span", { class: "prepr-section-label", "data-prepr": "adaptive-label", children: t3("adaptiveContent.adaptiveContent") }),
|
|
1399
1399
|
/* @__PURE__ */ u2("div", { class: "prepr-row", children: [
|
|
1400
1400
|
/* @__PURE__ */ u2("h2", { class: "prepr-row-title", "data-prepr": "preview-label", children: t3("adaptiveContent.enablePreview") }),
|
|
1401
1401
|
/* @__PURE__ */ u2(PreviewSelector, { state, t: t3, handlers })
|
package/dist/index.cjs
CHANGED
|
@@ -44,7 +44,7 @@ __export(src_exports, {
|
|
|
44
44
|
module.exports = __toCommonJS(src_exports);
|
|
45
45
|
|
|
46
46
|
// src/version.ts
|
|
47
|
-
var VERSION = "0.2.0-beta.
|
|
47
|
+
var VERSION = "0.2.0-beta.5";
|
|
48
48
|
|
|
49
49
|
// src/core/features.ts
|
|
50
50
|
function isEnabled(config) {
|
|
@@ -1736,8 +1736,8 @@ function Panel({
|
|
|
1736
1736
|
"aria-label": t3("common.toolbar"),
|
|
1737
1737
|
children: [
|
|
1738
1738
|
/* @__PURE__ */ u2(Header, { t: t3, onClose: handlers.onClose }),
|
|
1739
|
-
/* @__PURE__ */ u2("div", { class: "prepr-section", "data-prepr": "section-adaptive", children: [
|
|
1740
|
-
/* @__PURE__ */ u2("span", { class: "prepr-section-label", "data-prepr": "adaptive-label", children:
|
|
1739
|
+
showAdaptive && /* @__PURE__ */ u2("div", { class: "prepr-section", "data-prepr": "section-adaptive", children: [
|
|
1740
|
+
/* @__PURE__ */ u2("span", { class: "prepr-section-label", "data-prepr": "adaptive-label", children: t3("adaptiveContent.adaptiveContent") }),
|
|
1741
1741
|
/* @__PURE__ */ u2("div", { class: "prepr-row", children: [
|
|
1742
1742
|
/* @__PURE__ */ u2("h2", { class: "prepr-row-title", "data-prepr": "preview-label", children: t3("adaptiveContent.enablePreview") }),
|
|
1743
1743
|
/* @__PURE__ */ u2(PreviewSelector, { state, t: t3, handlers })
|
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.5";
|
|
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.5";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Resolve a `PreprFeatures` bag to plain booleans, defaulting every omitted key
|
package/dist/index.js
CHANGED
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
setTrackingParam,
|
|
18
18
|
stegaClean,
|
|
19
19
|
trackEvent
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BYJ2JBGX.js";
|
|
21
21
|
|
|
22
22
|
// src/version.ts
|
|
23
|
-
var VERSION = "0.2.0-beta.
|
|
23
|
+
var VERSION = "0.2.0-beta.5";
|
|
24
24
|
|
|
25
25
|
// src/core/server.ts
|
|
26
26
|
var PreprError = class extends Error {
|
|
@@ -1712,8 +1712,8 @@ function Panel({
|
|
|
1712
1712
|
"aria-label": t3("common.toolbar"),
|
|
1713
1713
|
children: [
|
|
1714
1714
|
/* @__PURE__ */ u2(Header, { t: t3, onClose: handlers.onClose }),
|
|
1715
|
-
/* @__PURE__ */ u2("div", { class: "prepr-section", "data-prepr": "section-adaptive", children: [
|
|
1716
|
-
/* @__PURE__ */ u2("span", { class: "prepr-section-label", "data-prepr": "adaptive-label", children:
|
|
1715
|
+
showAdaptive && /* @__PURE__ */ u2("div", { class: "prepr-section", "data-prepr": "section-adaptive", children: [
|
|
1716
|
+
/* @__PURE__ */ u2("span", { class: "prepr-section-label", "data-prepr": "adaptive-label", children: t3("adaptiveContent.adaptiveContent") }),
|
|
1717
1717
|
/* @__PURE__ */ u2("div", { class: "prepr-row", children: [
|
|
1718
1718
|
/* @__PURE__ */ u2("h2", { class: "prepr-row-title", "data-prepr": "preview-label", children: t3("adaptiveContent.enablePreview") }),
|
|
1719
1719
|
/* @__PURE__ */ u2(PreviewSelector, { state, t: t3, handlers })
|
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.5";
|
|
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`. */
|
|
@@ -1711,8 +1711,8 @@ function Panel({
|
|
|
1711
1711
|
"aria-label": t3("common.toolbar"),
|
|
1712
1712
|
children: [
|
|
1713
1713
|
/* @__PURE__ */ u2(Header, { t: t3, onClose: handlers.onClose }),
|
|
1714
|
-
/* @__PURE__ */ u2("div", { class: "prepr-section", "data-prepr": "section-adaptive", children: [
|
|
1715
|
-
/* @__PURE__ */ u2("span", { class: "prepr-section-label", "data-prepr": "adaptive-label", children:
|
|
1714
|
+
showAdaptive && /* @__PURE__ */ u2("div", { class: "prepr-section", "data-prepr": "section-adaptive", children: [
|
|
1715
|
+
/* @__PURE__ */ u2("span", { class: "prepr-section-label", "data-prepr": "adaptive-label", children: t3("adaptiveContent.adaptiveContent") }),
|
|
1716
1716
|
/* @__PURE__ */ u2("div", { class: "prepr-row", children: [
|
|
1717
1717
|
/* @__PURE__ */ u2("h2", { class: "prepr-row-title", "data-prepr": "preview-label", children: t3("adaptiveContent.enablePreview") }),
|
|
1718
1718
|
/* @__PURE__ */ u2(PreviewSelector, { state, t: t3, handlers })
|
|
@@ -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/react/components.js
CHANGED
|
@@ -1687,8 +1687,8 @@ function Panel({
|
|
|
1687
1687
|
"aria-label": t3("common.toolbar"),
|
|
1688
1688
|
children: [
|
|
1689
1689
|
/* @__PURE__ */ u2(Header, { t: t3, onClose: handlers.onClose }),
|
|
1690
|
-
/* @__PURE__ */ u2("div", { class: "prepr-section", "data-prepr": "section-adaptive", children: [
|
|
1691
|
-
/* @__PURE__ */ u2("span", { class: "prepr-section-label", "data-prepr": "adaptive-label", children:
|
|
1690
|
+
showAdaptive && /* @__PURE__ */ u2("div", { class: "prepr-section", "data-prepr": "section-adaptive", children: [
|
|
1691
|
+
/* @__PURE__ */ u2("span", { class: "prepr-section-label", "data-prepr": "adaptive-label", children: t3("adaptiveContent.adaptiveContent") }),
|
|
1692
1692
|
/* @__PURE__ */ u2("div", { class: "prepr-row", children: [
|
|
1693
1693
|
/* @__PURE__ */ u2("h2", { class: "prepr-row-title", "data-prepr": "preview-label", children: t3("adaptiveContent.enablePreview") }),
|
|
1694
1694
|
/* @__PURE__ */ u2(PreviewSelector, { state, t: t3, handlers })
|
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.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)",
|
|
@@ -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'];
|