@uniformdev/next-app-router 20.71.2-alpha.14 → 20.71.2-alpha.18
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/cache.js +3 -12
- package/dist/cache.mjs +3 -12
- package/dist/component.js +3 -0
- package/dist/component.mjs +3 -0
- package/dist/handler.js +3 -0
- package/dist/handler.mjs +3 -0
- package/dist/index.esm.js +3 -12
- package/dist/index.js +3 -12
- package/dist/index.mjs +3 -12
- package/dist/middleware.js +3 -1
- package/dist/middleware.mjs +3 -1
- package/package.json +8 -8
package/dist/cache.js
CHANGED
|
@@ -1226,6 +1226,9 @@ function projectionToQuery(spec) {
|
|
|
1226
1226
|
appendCsv(out, `${p}fields[only]`, fields.only);
|
|
1227
1227
|
appendCsv(out, `${p}fields[except]`, fields.except);
|
|
1228
1228
|
appendCsv(out, `${p}fields[locales]`, fields.locales);
|
|
1229
|
+
if (fields.blockDepth === "preserveAll" || typeof fields.blockDepth === "number") {
|
|
1230
|
+
out[`${p}fields[blockDepth]`] = String(fields.blockDepth);
|
|
1231
|
+
}
|
|
1229
1232
|
}
|
|
1230
1233
|
if (fieldTypes) {
|
|
1231
1234
|
appendCsv(out, `${p}fieldTypes[only]`, fieldTypes.only);
|
|
@@ -1495,17 +1498,6 @@ var RouteClient = class extends ApiClient {
|
|
|
1495
1498
|
);
|
|
1496
1499
|
}
|
|
1497
1500
|
};
|
|
1498
|
-
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
|
1499
|
-
var _a, _b;
|
|
1500
|
-
const dataSourceVariant = (
|
|
1501
|
-
// support explicit 'undefined' as a way to opt out of data resources variant
|
|
1502
|
-
"dataSourceVariant" in params ? params.dataSourceVariant : (
|
|
1503
|
-
// in case of DRAFT state we still want to fetch unpublished data
|
|
1504
|
-
((_b = (_a = params == null ? void 0 : params.state) != null ? _a : defaultPreviewState) != null ? _b : CANVAS_PUBLISHED_STATE) !== CANVAS_PUBLISHED_STATE ? "unpublished" : void 0
|
|
1505
|
-
)
|
|
1506
|
-
);
|
|
1507
|
-
return dataSourceVariant;
|
|
1508
|
-
};
|
|
1509
1501
|
|
|
1510
1502
|
// src/data/client.ts
|
|
1511
1503
|
var import_functions = require("@vercel/functions");
|
|
@@ -2018,7 +2010,6 @@ var DefaultDataClient = class {
|
|
|
2018
2010
|
const originalRoute = {
|
|
2019
2011
|
path: options.pageState.routePath,
|
|
2020
2012
|
state: options.pageState.compositionState,
|
|
2021
|
-
dataSourceVariant: getDataSourceVariantFromRouteGetParams({}, options.pageState.compositionState),
|
|
2022
2013
|
withComponentIDs: true,
|
|
2023
2014
|
releaseId: options.pageState.releaseId,
|
|
2024
2015
|
locale: options.pageState.locale,
|
package/dist/cache.mjs
CHANGED
|
@@ -1213,6 +1213,9 @@ function projectionToQuery(spec) {
|
|
|
1213
1213
|
appendCsv(out, `${p}fields[only]`, fields.only);
|
|
1214
1214
|
appendCsv(out, `${p}fields[except]`, fields.except);
|
|
1215
1215
|
appendCsv(out, `${p}fields[locales]`, fields.locales);
|
|
1216
|
+
if (fields.blockDepth === "preserveAll" || typeof fields.blockDepth === "number") {
|
|
1217
|
+
out[`${p}fields[blockDepth]`] = String(fields.blockDepth);
|
|
1218
|
+
}
|
|
1216
1219
|
}
|
|
1217
1220
|
if (fieldTypes) {
|
|
1218
1221
|
appendCsv(out, `${p}fieldTypes[only]`, fieldTypes.only);
|
|
@@ -1482,17 +1485,6 @@ var RouteClient = class extends ApiClient {
|
|
|
1482
1485
|
);
|
|
1483
1486
|
}
|
|
1484
1487
|
};
|
|
1485
|
-
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
|
1486
|
-
var _a, _b;
|
|
1487
|
-
const dataSourceVariant = (
|
|
1488
|
-
// support explicit 'undefined' as a way to opt out of data resources variant
|
|
1489
|
-
"dataSourceVariant" in params ? params.dataSourceVariant : (
|
|
1490
|
-
// in case of DRAFT state we still want to fetch unpublished data
|
|
1491
|
-
((_b = (_a = params == null ? void 0 : params.state) != null ? _a : defaultPreviewState) != null ? _b : CANVAS_PUBLISHED_STATE) !== CANVAS_PUBLISHED_STATE ? "unpublished" : void 0
|
|
1492
|
-
)
|
|
1493
|
-
);
|
|
1494
|
-
return dataSourceVariant;
|
|
1495
|
-
};
|
|
1496
1488
|
|
|
1497
1489
|
// src/data/client.ts
|
|
1498
1490
|
import { getCache, waitUntil } from "@vercel/functions";
|
|
@@ -2005,7 +1997,6 @@ var DefaultDataClient = class {
|
|
|
2005
1997
|
const originalRoute = {
|
|
2006
1998
|
path: options.pageState.routePath,
|
|
2007
1999
|
state: options.pageState.compositionState,
|
|
2008
|
-
dataSourceVariant: getDataSourceVariantFromRouteGetParams({}, options.pageState.compositionState),
|
|
2009
2000
|
withComponentIDs: true,
|
|
2010
2001
|
releaseId: options.pageState.releaseId,
|
|
2011
2002
|
locale: options.pageState.locale,
|
package/dist/component.js
CHANGED
|
@@ -648,6 +648,9 @@ function projectionToQuery(spec) {
|
|
|
648
648
|
appendCsv(out, `${p}fields[only]`, fields.only);
|
|
649
649
|
appendCsv(out, `${p}fields[except]`, fields.except);
|
|
650
650
|
appendCsv(out, `${p}fields[locales]`, fields.locales);
|
|
651
|
+
if (fields.blockDepth === "preserveAll" || typeof fields.blockDepth === "number") {
|
|
652
|
+
out[`${p}fields[blockDepth]`] = String(fields.blockDepth);
|
|
653
|
+
}
|
|
651
654
|
}
|
|
652
655
|
if (fieldTypes) {
|
|
653
656
|
appendCsv(out, `${p}fieldTypes[only]`, fieldTypes.only);
|
package/dist/component.mjs
CHANGED
|
@@ -633,6 +633,9 @@ function projectionToQuery(spec) {
|
|
|
633
633
|
appendCsv(out, `${p}fields[only]`, fields.only);
|
|
634
634
|
appendCsv(out, `${p}fields[except]`, fields.except);
|
|
635
635
|
appendCsv(out, `${p}fields[locales]`, fields.locales);
|
|
636
|
+
if (fields.blockDepth === "preserveAll" || typeof fields.blockDepth === "number") {
|
|
637
|
+
out[`${p}fields[blockDepth]`] = String(fields.blockDepth);
|
|
638
|
+
}
|
|
636
639
|
}
|
|
637
640
|
if (fieldTypes) {
|
|
638
641
|
appendCsv(out, `${p}fieldTypes[only]`, fieldTypes.only);
|
package/dist/handler.js
CHANGED
|
@@ -1224,6 +1224,9 @@ function projectionToQuery(spec) {
|
|
|
1224
1224
|
appendCsv(out, `${p}fields[only]`, fields.only);
|
|
1225
1225
|
appendCsv(out, `${p}fields[except]`, fields.except);
|
|
1226
1226
|
appendCsv(out, `${p}fields[locales]`, fields.locales);
|
|
1227
|
+
if (fields.blockDepth === "preserveAll" || typeof fields.blockDepth === "number") {
|
|
1228
|
+
out[`${p}fields[blockDepth]`] = String(fields.blockDepth);
|
|
1229
|
+
}
|
|
1227
1230
|
}
|
|
1228
1231
|
if (fieldTypes) {
|
|
1229
1232
|
appendCsv(out, `${p}fieldTypes[only]`, fieldTypes.only);
|
package/dist/handler.mjs
CHANGED
|
@@ -1209,6 +1209,9 @@ function projectionToQuery(spec) {
|
|
|
1209
1209
|
appendCsv(out, `${p}fields[only]`, fields.only);
|
|
1210
1210
|
appendCsv(out, `${p}fields[except]`, fields.except);
|
|
1211
1211
|
appendCsv(out, `${p}fields[locales]`, fields.locales);
|
|
1212
|
+
if (fields.blockDepth === "preserveAll" || typeof fields.blockDepth === "number") {
|
|
1213
|
+
out[`${p}fields[blockDepth]`] = String(fields.blockDepth);
|
|
1214
|
+
}
|
|
1212
1215
|
}
|
|
1213
1216
|
if (fieldTypes) {
|
|
1214
1217
|
appendCsv(out, `${p}fieldTypes[only]`, fieldTypes.only);
|
package/dist/index.esm.js
CHANGED
|
@@ -1216,6 +1216,9 @@ function projectionToQuery(spec) {
|
|
|
1216
1216
|
appendCsv(out, `${p}fields[only]`, fields.only);
|
|
1217
1217
|
appendCsv(out, `${p}fields[except]`, fields.except);
|
|
1218
1218
|
appendCsv(out, `${p}fields[locales]`, fields.locales);
|
|
1219
|
+
if (fields.blockDepth === "preserveAll" || typeof fields.blockDepth === "number") {
|
|
1220
|
+
out[`${p}fields[blockDepth]`] = String(fields.blockDepth);
|
|
1221
|
+
}
|
|
1219
1222
|
}
|
|
1220
1223
|
if (fieldTypes) {
|
|
1221
1224
|
appendCsv(out, `${p}fieldTypes[only]`, fieldTypes.only);
|
|
@@ -2045,17 +2048,6 @@ var RouteClient = class extends ApiClient {
|
|
|
2045
2048
|
);
|
|
2046
2049
|
}
|
|
2047
2050
|
};
|
|
2048
|
-
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
|
2049
|
-
var _a, _b;
|
|
2050
|
-
const dataSourceVariant = (
|
|
2051
|
-
// support explicit 'undefined' as a way to opt out of data resources variant
|
|
2052
|
-
"dataSourceVariant" in params ? params.dataSourceVariant : (
|
|
2053
|
-
// in case of DRAFT state we still want to fetch unpublished data
|
|
2054
|
-
((_b = (_a = params == null ? void 0 : params.state) != null ? _a : defaultPreviewState) != null ? _b : CANVAS_PUBLISHED_STATE) !== CANVAS_PUBLISHED_STATE ? "unpublished" : void 0
|
|
2055
|
-
)
|
|
2056
|
-
);
|
|
2057
|
-
return dataSourceVariant;
|
|
2058
|
-
};
|
|
2059
2051
|
function mapSlotToPersonalizedVariations(slot) {
|
|
2060
2052
|
if (!slot) return [];
|
|
2061
2053
|
return slot.map((v, i) => {
|
|
@@ -3934,7 +3926,6 @@ var DefaultDataClient = class {
|
|
|
3934
3926
|
const originalRoute = {
|
|
3935
3927
|
path: options.pageState.routePath,
|
|
3936
3928
|
state: options.pageState.compositionState,
|
|
3937
|
-
dataSourceVariant: getDataSourceVariantFromRouteGetParams({}, options.pageState.compositionState),
|
|
3938
3929
|
withComponentIDs: true,
|
|
3939
3930
|
releaseId: options.pageState.releaseId,
|
|
3940
3931
|
locale: options.pageState.locale,
|
package/dist/index.js
CHANGED
|
@@ -1243,6 +1243,9 @@ function projectionToQuery(spec) {
|
|
|
1243
1243
|
appendCsv(out, `${p}fields[only]`, fields.only);
|
|
1244
1244
|
appendCsv(out, `${p}fields[except]`, fields.except);
|
|
1245
1245
|
appendCsv(out, `${p}fields[locales]`, fields.locales);
|
|
1246
|
+
if (fields.blockDepth === "preserveAll" || typeof fields.blockDepth === "number") {
|
|
1247
|
+
out[`${p}fields[blockDepth]`] = String(fields.blockDepth);
|
|
1248
|
+
}
|
|
1246
1249
|
}
|
|
1247
1250
|
if (fieldTypes) {
|
|
1248
1251
|
appendCsv(out, `${p}fieldTypes[only]`, fieldTypes.only);
|
|
@@ -2072,17 +2075,6 @@ var RouteClient = class extends ApiClient {
|
|
|
2072
2075
|
);
|
|
2073
2076
|
}
|
|
2074
2077
|
};
|
|
2075
|
-
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
|
2076
|
-
var _a, _b;
|
|
2077
|
-
const dataSourceVariant = (
|
|
2078
|
-
// support explicit 'undefined' as a way to opt out of data resources variant
|
|
2079
|
-
"dataSourceVariant" in params ? params.dataSourceVariant : (
|
|
2080
|
-
// in case of DRAFT state we still want to fetch unpublished data
|
|
2081
|
-
((_b = (_a = params == null ? void 0 : params.state) != null ? _a : defaultPreviewState) != null ? _b : CANVAS_PUBLISHED_STATE) !== CANVAS_PUBLISHED_STATE ? "unpublished" : void 0
|
|
2082
|
-
)
|
|
2083
|
-
);
|
|
2084
|
-
return dataSourceVariant;
|
|
2085
|
-
};
|
|
2086
2078
|
function mapSlotToPersonalizedVariations(slot) {
|
|
2087
2079
|
if (!slot) return [];
|
|
2088
2080
|
return slot.map((v, i) => {
|
|
@@ -3955,7 +3947,6 @@ var DefaultDataClient = class {
|
|
|
3955
3947
|
const originalRoute = {
|
|
3956
3948
|
path: options.pageState.routePath,
|
|
3957
3949
|
state: options.pageState.compositionState,
|
|
3958
|
-
dataSourceVariant: getDataSourceVariantFromRouteGetParams({}, options.pageState.compositionState),
|
|
3959
3950
|
withComponentIDs: true,
|
|
3960
3951
|
releaseId: options.pageState.releaseId,
|
|
3961
3952
|
locale: options.pageState.locale,
|
package/dist/index.mjs
CHANGED
|
@@ -1216,6 +1216,9 @@ function projectionToQuery(spec) {
|
|
|
1216
1216
|
appendCsv(out, `${p}fields[only]`, fields.only);
|
|
1217
1217
|
appendCsv(out, `${p}fields[except]`, fields.except);
|
|
1218
1218
|
appendCsv(out, `${p}fields[locales]`, fields.locales);
|
|
1219
|
+
if (fields.blockDepth === "preserveAll" || typeof fields.blockDepth === "number") {
|
|
1220
|
+
out[`${p}fields[blockDepth]`] = String(fields.blockDepth);
|
|
1221
|
+
}
|
|
1219
1222
|
}
|
|
1220
1223
|
if (fieldTypes) {
|
|
1221
1224
|
appendCsv(out, `${p}fieldTypes[only]`, fieldTypes.only);
|
|
@@ -2045,17 +2048,6 @@ var RouteClient = class extends ApiClient {
|
|
|
2045
2048
|
);
|
|
2046
2049
|
}
|
|
2047
2050
|
};
|
|
2048
|
-
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
|
2049
|
-
var _a, _b;
|
|
2050
|
-
const dataSourceVariant = (
|
|
2051
|
-
// support explicit 'undefined' as a way to opt out of data resources variant
|
|
2052
|
-
"dataSourceVariant" in params ? params.dataSourceVariant : (
|
|
2053
|
-
// in case of DRAFT state we still want to fetch unpublished data
|
|
2054
|
-
((_b = (_a = params == null ? void 0 : params.state) != null ? _a : defaultPreviewState) != null ? _b : CANVAS_PUBLISHED_STATE) !== CANVAS_PUBLISHED_STATE ? "unpublished" : void 0
|
|
2055
|
-
)
|
|
2056
|
-
);
|
|
2057
|
-
return dataSourceVariant;
|
|
2058
|
-
};
|
|
2059
2051
|
function mapSlotToPersonalizedVariations(slot) {
|
|
2060
2052
|
if (!slot) return [];
|
|
2061
2053
|
return slot.map((v, i) => {
|
|
@@ -3934,7 +3926,6 @@ var DefaultDataClient = class {
|
|
|
3934
3926
|
const originalRoute = {
|
|
3935
3927
|
path: options.pageState.routePath,
|
|
3936
3928
|
state: options.pageState.compositionState,
|
|
3937
|
-
dataSourceVariant: getDataSourceVariantFromRouteGetParams({}, options.pageState.compositionState),
|
|
3938
3929
|
withComponentIDs: true,
|
|
3939
3930
|
releaseId: options.pageState.releaseId,
|
|
3940
3931
|
locale: options.pageState.locale,
|
package/dist/middleware.js
CHANGED
|
@@ -1414,6 +1414,9 @@ function projectionToQuery(spec) {
|
|
|
1414
1414
|
appendCsv(out, `${p}fields[only]`, fields.only);
|
|
1415
1415
|
appendCsv(out, `${p}fields[except]`, fields.except);
|
|
1416
1416
|
appendCsv(out, `${p}fields[locales]`, fields.locales);
|
|
1417
|
+
if (fields.blockDepth === "preserveAll" || typeof fields.blockDepth === "number") {
|
|
1418
|
+
out[`${p}fields[blockDepth]`] = String(fields.blockDepth);
|
|
1419
|
+
}
|
|
1417
1420
|
}
|
|
1418
1421
|
if (fieldTypes) {
|
|
1419
1422
|
appendCsv(out, `${p}fieldTypes[only]`, fieldTypes.only);
|
|
@@ -3024,7 +3027,6 @@ var DefaultDataClient = class {
|
|
|
3024
3027
|
const originalRoute = {
|
|
3025
3028
|
path: options.pageState.routePath,
|
|
3026
3029
|
state: options.pageState.compositionState,
|
|
3027
|
-
dataSourceVariant: getDataSourceVariantFromRouteGetParams({}, options.pageState.compositionState),
|
|
3028
3030
|
withComponentIDs: true,
|
|
3029
3031
|
releaseId: options.pageState.releaseId,
|
|
3030
3032
|
locale: options.pageState.locale,
|
package/dist/middleware.mjs
CHANGED
|
@@ -1399,6 +1399,9 @@ function projectionToQuery(spec) {
|
|
|
1399
1399
|
appendCsv(out, `${p}fields[only]`, fields.only);
|
|
1400
1400
|
appendCsv(out, `${p}fields[except]`, fields.except);
|
|
1401
1401
|
appendCsv(out, `${p}fields[locales]`, fields.locales);
|
|
1402
|
+
if (fields.blockDepth === "preserveAll" || typeof fields.blockDepth === "number") {
|
|
1403
|
+
out[`${p}fields[blockDepth]`] = String(fields.blockDepth);
|
|
1404
|
+
}
|
|
1402
1405
|
}
|
|
1403
1406
|
if (fieldTypes) {
|
|
1404
1407
|
appendCsv(out, `${p}fieldTypes[only]`, fieldTypes.only);
|
|
@@ -3011,7 +3014,6 @@ var DefaultDataClient = class {
|
|
|
3011
3014
|
const originalRoute = {
|
|
3012
3015
|
path: options.pageState.routePath,
|
|
3013
3016
|
state: options.pageState.compositionState,
|
|
3014
|
-
dataSourceVariant: getDataSourceVariantFromRouteGetParams({}, options.pageState.compositionState),
|
|
3015
3017
|
withComponentIDs: true,
|
|
3016
3018
|
releaseId: options.pageState.releaseId,
|
|
3017
3019
|
locale: options.pageState.locale,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/next-app-router",
|
|
3
|
-
"version": "20.71.2-alpha.
|
|
3
|
+
"version": "20.71.2-alpha.18+36514ab1d4",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsup",
|
|
@@ -98,12 +98,12 @@
|
|
|
98
98
|
"vitest": "4.1.9"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
|
-
"@uniformdev/canvas-react": "20.71.2-alpha.
|
|
102
|
-
"@uniformdev/next-app-router-client": "20.71.2-alpha.
|
|
103
|
-
"@uniformdev/next-app-router-shared": "20.71.2-alpha.
|
|
104
|
-
"@uniformdev/redirect": "20.71.2-alpha.
|
|
105
|
-
"@uniformdev/richtext": "20.71.2-alpha.
|
|
106
|
-
"@uniformdev/webhooks": "20.71.2-alpha.
|
|
101
|
+
"@uniformdev/canvas-react": "20.71.2-alpha.18+36514ab1d4",
|
|
102
|
+
"@uniformdev/next-app-router-client": "20.71.2-alpha.18+36514ab1d4",
|
|
103
|
+
"@uniformdev/next-app-router-shared": "20.71.2-alpha.18+36514ab1d4",
|
|
104
|
+
"@uniformdev/redirect": "20.71.2-alpha.18+36514ab1d4",
|
|
105
|
+
"@uniformdev/richtext": "20.71.2-alpha.18+36514ab1d4",
|
|
106
|
+
"@uniformdev/webhooks": "20.71.2-alpha.18+36514ab1d4",
|
|
107
107
|
"@vercel/functions": "^3.7.2",
|
|
108
108
|
"encoding": "^0.1.13",
|
|
109
109
|
"server-only": "^0.0.1",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"publishConfig": {
|
|
121
121
|
"access": "public"
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "36514ab1d4273d0ea8c146d24f4e42744b1d9416"
|
|
124
124
|
}
|