@uniformdev/canvas-next 19.187.0 → 19.190.1-alpha.3
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/route/index.js +2 -1
- package/dist/route/index.mjs +9 -7
- package/package.json +7 -7
package/dist/route/index.js
CHANGED
|
@@ -213,7 +213,7 @@ function createRouteFetcher(options) {
|
|
|
213
213
|
});
|
|
214
214
|
const handleModifyPath = modifyPath != null ? modifyPath : (path) => decodeURI(path);
|
|
215
215
|
return async function fetcher(context) {
|
|
216
|
-
var _a, _b;
|
|
216
|
+
var _a, _b, _c;
|
|
217
217
|
const {
|
|
218
218
|
contextualEditingCompositionId,
|
|
219
219
|
resolvedUrl,
|
|
@@ -287,6 +287,7 @@ function createRouteFetcher(options) {
|
|
|
287
287
|
const response = await routeClient.getRoute({
|
|
288
288
|
...resolvedOptions,
|
|
289
289
|
state: (_b = (_a = resolvedOptions == null ? void 0 : resolvedOptions.state) != null ? _a : defaultPreviewState) != null ? _b : import_canvas.CANVAS_PUBLISHED_STATE,
|
|
290
|
+
dataResourcesVariant: ((_c = resolvedOptions == null ? void 0 : resolvedOptions.state) != null ? _c : defaultPreviewState) === import_canvas.CANVAS_DRAFT_STATE ? "unpublished" : void 0,
|
|
290
291
|
projectMapId,
|
|
291
292
|
path: nodePath
|
|
292
293
|
});
|
package/dist/route/index.mjs
CHANGED
|
@@ -6,12 +6,13 @@ import {
|
|
|
6
6
|
} from "../chunk-TR7V6ABJ.mjs";
|
|
7
7
|
|
|
8
8
|
// src/route/withUniformGetServerSideProps.ts
|
|
9
|
-
import { CANVAS_DRAFT_STATE } from "@uniformdev/canvas";
|
|
9
|
+
import { CANVAS_DRAFT_STATE as CANVAS_DRAFT_STATE2 } from "@uniformdev/canvas";
|
|
10
10
|
import { getTargetVariableExpandedUrl } from "@uniformdev/redirect";
|
|
11
11
|
|
|
12
12
|
// src/route/createRouteFetcher.ts
|
|
13
13
|
import {
|
|
14
14
|
ApiClientError,
|
|
15
|
+
CANVAS_DRAFT_STATE,
|
|
15
16
|
CANVAS_PUBLISHED_STATE,
|
|
16
17
|
EMPTY_COMPOSITION,
|
|
17
18
|
RouteClient
|
|
@@ -90,7 +91,7 @@ function createRouteFetcher(options) {
|
|
|
90
91
|
});
|
|
91
92
|
const handleModifyPath = modifyPath != null ? modifyPath : (path) => decodeURI(path);
|
|
92
93
|
return async function fetcher(context) {
|
|
93
|
-
var _a, _b;
|
|
94
|
+
var _a, _b, _c;
|
|
94
95
|
const {
|
|
95
96
|
contextualEditingCompositionId,
|
|
96
97
|
resolvedUrl,
|
|
@@ -164,6 +165,7 @@ function createRouteFetcher(options) {
|
|
|
164
165
|
const response = await routeClient.getRoute({
|
|
165
166
|
...resolvedOptions,
|
|
166
167
|
state: (_b = (_a = resolvedOptions == null ? void 0 : resolvedOptions.state) != null ? _a : defaultPreviewState) != null ? _b : CANVAS_PUBLISHED_STATE,
|
|
168
|
+
dataResourcesVariant: ((_c = resolvedOptions == null ? void 0 : resolvedOptions.state) != null ? _c : defaultPreviewState) === CANVAS_DRAFT_STATE ? "unpublished" : void 0,
|
|
167
169
|
projectMapId,
|
|
168
170
|
path: nodePath
|
|
169
171
|
});
|
|
@@ -235,7 +237,7 @@ var withUniformGetServerSideProps = (options) => {
|
|
|
235
237
|
resolvedUrl: context.resolvedUrl,
|
|
236
238
|
// auto engage draft content when in next preview mode
|
|
237
239
|
// (can override with explicit setting of request options)'
|
|
238
|
-
defaultFetchState: context.preview ?
|
|
240
|
+
defaultFetchState: context.preview ? CANVAS_DRAFT_STATE2 : void 0
|
|
239
241
|
};
|
|
240
242
|
}
|
|
241
243
|
});
|
|
@@ -243,7 +245,7 @@ var withUniformGetServerSideProps = (options) => {
|
|
|
243
245
|
};
|
|
244
246
|
|
|
245
247
|
// src/route/withUniformGetStaticPaths.ts
|
|
246
|
-
import { CANVAS_DRAFT_STATE as
|
|
248
|
+
import { CANVAS_DRAFT_STATE as CANVAS_DRAFT_STATE3, CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE2 } from "@uniformdev/canvas";
|
|
247
249
|
import {
|
|
248
250
|
ProjectMapClient
|
|
249
251
|
} from "@uniformdev/project-map";
|
|
@@ -279,7 +281,7 @@ var withUniformGetStaticPaths = (options) => {
|
|
|
279
281
|
...options == null ? void 0 : options.requestOptions,
|
|
280
282
|
path: options == null ? void 0 : options.rootPath,
|
|
281
283
|
projectMapId,
|
|
282
|
-
state: (options == null ? void 0 : options.preview) ?
|
|
284
|
+
state: (options == null ? void 0 : options.preview) ? CANVAS_DRAFT_STATE3 : CANVAS_PUBLISHED_STATE2
|
|
283
285
|
}),
|
|
284
286
|
finalRedirectClient.getAllRedirects()
|
|
285
287
|
]);
|
|
@@ -299,7 +301,7 @@ var withUniformGetStaticPaths = (options) => {
|
|
|
299
301
|
};
|
|
300
302
|
|
|
301
303
|
// src/route/withUniformGetStaticProps.ts
|
|
302
|
-
import { CANVAS_DRAFT_STATE as
|
|
304
|
+
import { CANVAS_DRAFT_STATE as CANVAS_DRAFT_STATE4 } from "@uniformdev/canvas";
|
|
303
305
|
import { getTargetVariableExpandedUrl as getTargetVariableExpandedUrl2 } from "@uniformdev/redirect";
|
|
304
306
|
var withUniformGetStaticProps = (options) => {
|
|
305
307
|
const defaultHandleRedirect = (requestUrl, matched) => {
|
|
@@ -335,7 +337,7 @@ var withUniformGetStaticProps = (options) => {
|
|
|
335
337
|
}),
|
|
336
338
|
// auto engage draft content when in next preview mode
|
|
337
339
|
// (can override with explicit setting of request options)
|
|
338
|
-
defaultFetchState: context.preview ?
|
|
340
|
+
defaultFetchState: context.preview ? CANVAS_DRAFT_STATE4 : void 0
|
|
339
341
|
};
|
|
340
342
|
}
|
|
341
343
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-next",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.190.1-alpha.3+0f998ae81e",
|
|
4
4
|
"description": "Next.js SDK for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"document": "api-extractor run --local"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@uniformdev/canvas": "19.
|
|
71
|
-
"@uniformdev/canvas-react": "19.
|
|
72
|
-
"@uniformdev/project-map": "19.
|
|
73
|
-
"@uniformdev/redirect": "19.
|
|
74
|
-
"@uniformdev/richtext": "19.
|
|
70
|
+
"@uniformdev/canvas": "19.190.1-alpha.3+0f998ae81e",
|
|
71
|
+
"@uniformdev/canvas-react": "19.190.1-alpha.3+0f998ae81e",
|
|
72
|
+
"@uniformdev/project-map": "19.190.1-alpha.3+0f998ae81e",
|
|
73
|
+
"@uniformdev/redirect": "19.190.1-alpha.3+0f998ae81e",
|
|
74
|
+
"@uniformdev/richtext": "19.190.1-alpha.3+0f998ae81e",
|
|
75
75
|
"colorette": "2.0.20"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"publishConfig": {
|
|
92
92
|
"access": "public"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "0f998ae81e331076b7d2c7339cdfaf5e82e75bd9"
|
|
95
95
|
}
|