@uniformdev/next-app-router-shared 20.49.3-alpha.9 → 20.49.4-alpha.102
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/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.esm.js +4 -2
- package/dist/index.js +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -64,6 +64,11 @@ type PageState = {
|
|
|
64
64
|
* The locale that was resolved for the current request.
|
|
65
65
|
*/
|
|
66
66
|
locale: string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Whether this page state was generated during a prefetch request.
|
|
69
|
+
* When true, test evaluations are deferred to the client side.
|
|
70
|
+
*/
|
|
71
|
+
isPrefetch: true | undefined;
|
|
67
72
|
};
|
|
68
73
|
declare const resolveComponentFromPageState: ({ pageState, componentId: providedComponentId, }: {
|
|
69
74
|
pageState: PageState;
|
|
@@ -156,7 +161,7 @@ type PersonalizeProps = ComponentProps<{
|
|
|
156
161
|
indexes: number[];
|
|
157
162
|
};
|
|
158
163
|
type TestProps = ComponentProps & {
|
|
159
|
-
index: number;
|
|
164
|
+
index: number | undefined;
|
|
160
165
|
test: ExtractTestResult;
|
|
161
166
|
};
|
|
162
167
|
|
package/dist/index.d.ts
CHANGED
|
@@ -64,6 +64,11 @@ type PageState = {
|
|
|
64
64
|
* The locale that was resolved for the current request.
|
|
65
65
|
*/
|
|
66
66
|
locale: string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Whether this page state was generated during a prefetch request.
|
|
69
|
+
* When true, test evaluations are deferred to the client side.
|
|
70
|
+
*/
|
|
71
|
+
isPrefetch: true | undefined;
|
|
67
72
|
};
|
|
68
73
|
declare const resolveComponentFromPageState: ({ pageState, componentId: providedComponentId, }: {
|
|
69
74
|
pageState: PageState;
|
|
@@ -156,7 +161,7 @@ type PersonalizeProps = ComponentProps<{
|
|
|
156
161
|
indexes: number[];
|
|
157
162
|
};
|
|
158
163
|
type TestProps = ComponentProps & {
|
|
159
|
-
index: number;
|
|
164
|
+
index: number | undefined;
|
|
160
165
|
test: ExtractTestResult;
|
|
161
166
|
};
|
|
162
167
|
|
package/dist/index.esm.js
CHANGED
|
@@ -219,7 +219,8 @@ var serializeEvaluationResult = ({
|
|
|
219
219
|
dc: typeof payload.defaultConsent !== "undefined" ? payload.defaultConsent ? 1 : 0 : void 0,
|
|
220
220
|
pm: payload.previewMode === "editor" ? "e" : payload.previewMode === "preview" ? "p" : void 0,
|
|
221
221
|
rl: void 0,
|
|
222
|
-
l: payload.locale
|
|
222
|
+
l: payload.locale,
|
|
223
|
+
pf: payload.isPrefetch ? 1 : void 0
|
|
223
224
|
};
|
|
224
225
|
const componentKeys = Object.keys(payload.components);
|
|
225
226
|
const sortedKeys = componentKeys.sort();
|
|
@@ -270,7 +271,8 @@ var deserializeEvaluationResult = ({
|
|
|
270
271
|
defaultConsent: typeof parsed.dc !== "undefined" ? parsed.dc === 1 : void 0,
|
|
271
272
|
previewMode: parsed.pm === "e" ? "editor" : parsed.pm === "p" ? "preview" : void 0,
|
|
272
273
|
rules: parsed.rl ? Object.fromEntries(Object.entries(parsed.rl).map(([key, value]) => [key, value === 1])) : void 0,
|
|
273
|
-
locale: (_c = parsed.l) != null ? _c : void 0
|
|
274
|
+
locale: (_c = parsed.l) != null ? _c : void 0,
|
|
275
|
+
isPrefetch: parsed.pf === 1 ? true : void 0
|
|
274
276
|
};
|
|
275
277
|
Object.keys(parsed.c).forEach((id) => {
|
|
276
278
|
const component = parsed.c[id];
|
package/dist/index.js
CHANGED
|
@@ -254,7 +254,8 @@ var serializeEvaluationResult = ({
|
|
|
254
254
|
dc: typeof payload.defaultConsent !== "undefined" ? payload.defaultConsent ? 1 : 0 : void 0,
|
|
255
255
|
pm: payload.previewMode === "editor" ? "e" : payload.previewMode === "preview" ? "p" : void 0,
|
|
256
256
|
rl: void 0,
|
|
257
|
-
l: payload.locale
|
|
257
|
+
l: payload.locale,
|
|
258
|
+
pf: payload.isPrefetch ? 1 : void 0
|
|
258
259
|
};
|
|
259
260
|
const componentKeys = Object.keys(payload.components);
|
|
260
261
|
const sortedKeys = componentKeys.sort();
|
|
@@ -305,7 +306,8 @@ var deserializeEvaluationResult = ({
|
|
|
305
306
|
defaultConsent: typeof parsed.dc !== "undefined" ? parsed.dc === 1 : void 0,
|
|
306
307
|
previewMode: parsed.pm === "e" ? "editor" : parsed.pm === "p" ? "preview" : void 0,
|
|
307
308
|
rules: parsed.rl ? Object.fromEntries(Object.entries(parsed.rl).map(([key, value]) => [key, value === 1])) : void 0,
|
|
308
|
-
locale: (_c = parsed.l) != null ? _c : void 0
|
|
309
|
+
locale: (_c = parsed.l) != null ? _c : void 0,
|
|
310
|
+
isPrefetch: parsed.pf === 1 ? true : void 0
|
|
309
311
|
};
|
|
310
312
|
Object.keys(parsed.c).forEach((id) => {
|
|
311
313
|
const component = parsed.c[id];
|
package/dist/index.mjs
CHANGED
|
@@ -219,7 +219,8 @@ var serializeEvaluationResult = ({
|
|
|
219
219
|
dc: typeof payload.defaultConsent !== "undefined" ? payload.defaultConsent ? 1 : 0 : void 0,
|
|
220
220
|
pm: payload.previewMode === "editor" ? "e" : payload.previewMode === "preview" ? "p" : void 0,
|
|
221
221
|
rl: void 0,
|
|
222
|
-
l: payload.locale
|
|
222
|
+
l: payload.locale,
|
|
223
|
+
pf: payload.isPrefetch ? 1 : void 0
|
|
223
224
|
};
|
|
224
225
|
const componentKeys = Object.keys(payload.components);
|
|
225
226
|
const sortedKeys = componentKeys.sort();
|
|
@@ -270,7 +271,8 @@ var deserializeEvaluationResult = ({
|
|
|
270
271
|
defaultConsent: typeof parsed.dc !== "undefined" ? parsed.dc === 1 : void 0,
|
|
271
272
|
previewMode: parsed.pm === "e" ? "editor" : parsed.pm === "p" ? "preview" : void 0,
|
|
272
273
|
rules: parsed.rl ? Object.fromEntries(Object.entries(parsed.rl).map(([key, value]) => [key, value === 1])) : void 0,
|
|
273
|
-
locale: (_c = parsed.l) != null ? _c : void 0
|
|
274
|
+
locale: (_c = parsed.l) != null ? _c : void 0,
|
|
275
|
+
isPrefetch: parsed.pf === 1 ? true : void 0
|
|
274
276
|
};
|
|
275
277
|
Object.keys(parsed.c).forEach((id) => {
|
|
276
278
|
const component = parsed.c[id];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/next-app-router-shared",
|
|
3
|
-
"version": "20.49.
|
|
3
|
+
"version": "20.49.4-alpha.102+140d1a56b4",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsup",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"vitest": "3.2.4"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@uniformdev/canvas": "20.49.
|
|
40
|
-
"@uniformdev/context": "20.49.
|
|
39
|
+
"@uniformdev/canvas": "20.49.4-alpha.102+140d1a56b4",
|
|
40
|
+
"@uniformdev/context": "20.49.4-alpha.102+140d1a56b4",
|
|
41
41
|
"uuid": "9.0.1"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "140d1a56b4b45021216a166bcaf7ebe629681b0b"
|
|
55
55
|
}
|