@uniformdev/canvas-next 19.56.0 → 19.56.1-alpha.22
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.esm.js +11 -8
- package/dist/index.js +13 -10
- package/dist/index.mjs +11 -8
- package/dist/project-map/index.d.mts +4 -4
- package/dist/project-map/index.d.ts +4 -4
- package/dist/route/index.d.mts +4 -4
- package/dist/route/index.d.ts +4 -4
- package/dist/route/index.js +5 -5
- package/dist/route/index.mjs +5 -5
- package/dist/slug/index.d.mts +4 -4
- package/dist/slug/index.d.ts +4 -4
- package/package.json +10 -10
package/dist/index.esm.js
CHANGED
|
@@ -53,7 +53,8 @@ import {
|
|
|
53
53
|
IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM,
|
|
54
54
|
IN_CONTEXT_EDITOR_QUERY_STRING_PARAM
|
|
55
55
|
} from "@uniformdev/canvas";
|
|
56
|
-
|
|
56
|
+
import { isAllowedReferrer } from "@uniformdev/canvas";
|
|
57
|
+
var BASE_URL_EXAMPLE = "https://example.com";
|
|
57
58
|
var getQueryParam = (req, paramName) => {
|
|
58
59
|
const value = req.query[paramName];
|
|
59
60
|
if (typeof value === "undefined") {
|
|
@@ -102,7 +103,7 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
102
103
|
if (isUsingPreviewSecret && req.query.secret !== previewSecret) {
|
|
103
104
|
return res.status(401).json({ message: "Invalid token" });
|
|
104
105
|
}
|
|
105
|
-
const isUniformContextualEditing = req.query[IN_CONTEXT_EDITOR_QUERY_STRING_PARAM] === "true";
|
|
106
|
+
const isUniformContextualEditing = req.query[IN_CONTEXT_EDITOR_QUERY_STRING_PARAM] === "true" && isAllowedReferrer(req.headers.referer);
|
|
106
107
|
res.setPreviewData(
|
|
107
108
|
{
|
|
108
109
|
isUniformContextualEditing,
|
|
@@ -126,12 +127,14 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
126
127
|
cookies == null ? void 0 : cookies.map((cookie) => cookie.replace("SameSite=Lax", "SameSite=None;Secure"))
|
|
127
128
|
);
|
|
128
129
|
const redirectionUrl = new URL(pathToRedirectTo, BASE_URL_EXAMPLE);
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
if (isUniformContextualEditing) {
|
|
131
|
+
queryParamsToPreserve.forEach((param) => {
|
|
132
|
+
const paramValue = req.query[param];
|
|
133
|
+
if (typeof paramValue === "string") {
|
|
134
|
+
redirectionUrl.searchParams.append(param, paramValue);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
135
138
|
const fullPathToRedirectTo = redirectionUrl.href.replace(BASE_URL_EXAMPLE, "");
|
|
136
139
|
res.redirect(fullPathToRedirectTo);
|
|
137
140
|
};
|
package/dist/index.js
CHANGED
|
@@ -96,7 +96,8 @@ var resolveSlugFromParams = ({
|
|
|
96
96
|
|
|
97
97
|
// src/preview/previewHandlerGet.ts
|
|
98
98
|
var import_canvas = require("@uniformdev/canvas");
|
|
99
|
-
var
|
|
99
|
+
var import_canvas2 = require("@uniformdev/canvas");
|
|
100
|
+
var BASE_URL_EXAMPLE = "https://example.com";
|
|
100
101
|
var getQueryParam = (req, paramName) => {
|
|
101
102
|
const value = req.query[paramName];
|
|
102
103
|
if (typeof value === "undefined") {
|
|
@@ -145,7 +146,7 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
145
146
|
if (isUsingPreviewSecret && req.query.secret !== previewSecret) {
|
|
146
147
|
return res.status(401).json({ message: "Invalid token" });
|
|
147
148
|
}
|
|
148
|
-
const isUniformContextualEditing = req.query[import_canvas.IN_CONTEXT_EDITOR_QUERY_STRING_PARAM] === "true";
|
|
149
|
+
const isUniformContextualEditing = req.query[import_canvas.IN_CONTEXT_EDITOR_QUERY_STRING_PARAM] === "true" && (0, import_canvas2.isAllowedReferrer)(req.headers.referer);
|
|
149
150
|
res.setPreviewData(
|
|
150
151
|
{
|
|
151
152
|
isUniformContextualEditing,
|
|
@@ -169,12 +170,14 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
169
170
|
cookies == null ? void 0 : cookies.map((cookie) => cookie.replace("SameSite=Lax", "SameSite=None;Secure"))
|
|
170
171
|
);
|
|
171
172
|
const redirectionUrl = new URL(pathToRedirectTo, BASE_URL_EXAMPLE);
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
if (isUniformContextualEditing) {
|
|
174
|
+
queryParamsToPreserve.forEach((param) => {
|
|
175
|
+
const paramValue = req.query[param];
|
|
176
|
+
if (typeof paramValue === "string") {
|
|
177
|
+
redirectionUrl.searchParams.append(param, paramValue);
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
178
181
|
const fullPathToRedirectTo = redirectionUrl.href.replace(BASE_URL_EXAMPLE, "");
|
|
179
182
|
res.redirect(fullPathToRedirectTo);
|
|
180
183
|
};
|
|
@@ -188,7 +191,7 @@ function validateLocalRedirectUrl(pathToRedirectTo) {
|
|
|
188
191
|
}
|
|
189
192
|
|
|
190
193
|
// src/preview/previewHandlerPost.ts
|
|
191
|
-
var
|
|
194
|
+
var import_canvas3 = require("@uniformdev/canvas");
|
|
192
195
|
var createPreviewHandlerPost = ({ secret, enhance } = {}) => async (req, res) => {
|
|
193
196
|
const { composition, hash } = req.body;
|
|
194
197
|
if (!composition) {
|
|
@@ -198,7 +201,7 @@ var createPreviewHandlerPost = ({ secret, enhance } = {}) => async (req, res) =>
|
|
|
198
201
|
const hasProvidedHash = Boolean(hash);
|
|
199
202
|
const hasConfiguredHash = Boolean(previewSecret);
|
|
200
203
|
if (hasProvidedHash && hasConfiguredHash) {
|
|
201
|
-
const calculatedHash = (0,
|
|
204
|
+
const calculatedHash = (0, import_canvas3.generateHash)({
|
|
202
205
|
composition,
|
|
203
206
|
secret: previewSecret
|
|
204
207
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -53,7 +53,8 @@ import {
|
|
|
53
53
|
IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM,
|
|
54
54
|
IN_CONTEXT_EDITOR_QUERY_STRING_PARAM
|
|
55
55
|
} from "@uniformdev/canvas";
|
|
56
|
-
|
|
56
|
+
import { isAllowedReferrer } from "@uniformdev/canvas";
|
|
57
|
+
var BASE_URL_EXAMPLE = "https://example.com";
|
|
57
58
|
var getQueryParam = (req, paramName) => {
|
|
58
59
|
const value = req.query[paramName];
|
|
59
60
|
if (typeof value === "undefined") {
|
|
@@ -102,7 +103,7 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
102
103
|
if (isUsingPreviewSecret && req.query.secret !== previewSecret) {
|
|
103
104
|
return res.status(401).json({ message: "Invalid token" });
|
|
104
105
|
}
|
|
105
|
-
const isUniformContextualEditing = req.query[IN_CONTEXT_EDITOR_QUERY_STRING_PARAM] === "true";
|
|
106
|
+
const isUniformContextualEditing = req.query[IN_CONTEXT_EDITOR_QUERY_STRING_PARAM] === "true" && isAllowedReferrer(req.headers.referer);
|
|
106
107
|
res.setPreviewData(
|
|
107
108
|
{
|
|
108
109
|
isUniformContextualEditing,
|
|
@@ -126,12 +127,14 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
126
127
|
cookies == null ? void 0 : cookies.map((cookie) => cookie.replace("SameSite=Lax", "SameSite=None;Secure"))
|
|
127
128
|
);
|
|
128
129
|
const redirectionUrl = new URL(pathToRedirectTo, BASE_URL_EXAMPLE);
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
if (isUniformContextualEditing) {
|
|
131
|
+
queryParamsToPreserve.forEach((param) => {
|
|
132
|
+
const paramValue = req.query[param];
|
|
133
|
+
if (typeof paramValue === "string") {
|
|
134
|
+
redirectionUrl.searchParams.append(param, paramValue);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
135
138
|
const fullPathToRedirectTo = redirectionUrl.href.replace(BASE_URL_EXAMPLE, "");
|
|
136
139
|
res.redirect(fullPathToRedirectTo);
|
|
137
140
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, PreviewData, GetServerSideProps, GetStaticPropsContext, GetStaticProps } from 'next';
|
|
3
3
|
import { c as UniformGetServerSideProps, a as UniformPreviewData, b as UniformGetStaticProps } from '../models-f9fd03c4.js';
|
|
4
|
-
import * as
|
|
5
|
-
import { ParsedUrlQuery } from 'querystring';
|
|
4
|
+
import * as node_querystring from 'node:querystring';
|
|
6
5
|
import * as _uniformdev_canvas from '@uniformdev/canvas';
|
|
7
6
|
import { CanvasClient, DataResolutionOption } from '@uniformdev/canvas';
|
|
7
|
+
import { ParsedUrlQuery } from 'querystring';
|
|
8
8
|
export { w as withUniformGetStaticPaths } from '../withUniformGetStaticPaths-77db0164.js';
|
|
9
9
|
import '@uniformdev/canvas-react';
|
|
10
10
|
import '@uniformdev/project-map';
|
|
@@ -75,11 +75,11 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
75
75
|
|
|
76
76
|
declare const getServerSideProps: next.GetServerSideProps<{
|
|
77
77
|
[key: string]: any;
|
|
78
|
-
},
|
|
78
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
79
79
|
/** Ready to go getStaticProps for dynamic route with 'path' param for [[...path]].jsx */
|
|
80
80
|
declare const getStaticProps: next.GetStaticProps<{
|
|
81
81
|
[key: string]: any;
|
|
82
|
-
},
|
|
82
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
83
83
|
declare const getStaticPaths: () => Promise<{
|
|
84
84
|
paths: string[] | undefined;
|
|
85
85
|
fallback: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, PreviewData, GetServerSideProps, GetStaticPropsContext, GetStaticProps } from 'next';
|
|
3
3
|
import { c as UniformGetServerSideProps, a as UniformPreviewData, b as UniformGetStaticProps } from '../models-f9fd03c4.js';
|
|
4
|
-
import * as
|
|
5
|
-
import { ParsedUrlQuery } from 'querystring';
|
|
4
|
+
import * as node_querystring from 'node:querystring';
|
|
6
5
|
import * as _uniformdev_canvas from '@uniformdev/canvas';
|
|
7
6
|
import { CanvasClient, DataResolutionOption } from '@uniformdev/canvas';
|
|
7
|
+
import { ParsedUrlQuery } from 'querystring';
|
|
8
8
|
export { w as withUniformGetStaticPaths } from '../withUniformGetStaticPaths-77db0164.js';
|
|
9
9
|
import '@uniformdev/canvas-react';
|
|
10
10
|
import '@uniformdev/project-map';
|
|
@@ -75,11 +75,11 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
75
75
|
|
|
76
76
|
declare const getServerSideProps: next.GetServerSideProps<{
|
|
77
77
|
[key: string]: any;
|
|
78
|
-
},
|
|
78
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
79
79
|
/** Ready to go getStaticProps for dynamic route with 'path' param for [[...path]].jsx */
|
|
80
80
|
declare const getStaticProps: next.GetStaticProps<{
|
|
81
81
|
[key: string]: any;
|
|
82
|
-
},
|
|
82
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
83
83
|
declare const getStaticPaths: () => Promise<{
|
|
84
84
|
paths: string[] | undefined;
|
|
85
85
|
fallback: boolean;
|
package/dist/route/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, GetServerSidePropsResult, GetServerSideProps, GetStaticPropsContext, GetStaticPropsResult, GetStaticProps } from 'next';
|
|
3
3
|
import { a as UniformPreviewData } from '../models-f9fd03c4.js';
|
|
4
|
-
import * as
|
|
5
|
-
import { ParsedUrlQuery } from 'querystring';
|
|
4
|
+
import * as node_querystring from 'node:querystring';
|
|
6
5
|
export { w as withUniformGetStaticPaths } from '../withUniformGetStaticPaths-77db0164.js';
|
|
7
6
|
import { RouteGetResponseEdgehancedComposition, RouteGetResponseNotFound, RouteGetResponseRedirect, RouteClient, RouteGetParameters, RootComponentInstance } from '@uniformdev/canvas';
|
|
7
|
+
import { ParsedUrlQuery } from 'querystring';
|
|
8
8
|
import '@uniformdev/canvas-react';
|
|
9
9
|
import '@uniformdev/project-map';
|
|
10
10
|
|
|
@@ -182,7 +182,7 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
182
182
|
variants?: boolean | undefined;
|
|
183
183
|
} | undefined;
|
|
184
184
|
};
|
|
185
|
-
},
|
|
185
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
188
|
* Default implementation of getStaticProps with routes
|
|
@@ -306,7 +306,7 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
306
306
|
variants?: boolean | undefined;
|
|
307
307
|
} | undefined;
|
|
308
308
|
};
|
|
309
|
-
},
|
|
309
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
310
310
|
/**
|
|
311
311
|
* Default implementation of getStaticPaths with routes
|
|
312
312
|
* To configure custom behavior, use:
|
package/dist/route/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, GetServerSidePropsResult, GetServerSideProps, GetStaticPropsContext, GetStaticPropsResult, GetStaticProps } from 'next';
|
|
3
3
|
import { a as UniformPreviewData } from '../models-f9fd03c4.js';
|
|
4
|
-
import * as
|
|
5
|
-
import { ParsedUrlQuery } from 'querystring';
|
|
4
|
+
import * as node_querystring from 'node:querystring';
|
|
6
5
|
export { w as withUniformGetStaticPaths } from '../withUniformGetStaticPaths-77db0164.js';
|
|
7
6
|
import { RouteGetResponseEdgehancedComposition, RouteGetResponseNotFound, RouteGetResponseRedirect, RouteClient, RouteGetParameters, RootComponentInstance } from '@uniformdev/canvas';
|
|
7
|
+
import { ParsedUrlQuery } from 'querystring';
|
|
8
8
|
import '@uniformdev/canvas-react';
|
|
9
9
|
import '@uniformdev/project-map';
|
|
10
10
|
|
|
@@ -182,7 +182,7 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
182
182
|
variants?: boolean | undefined;
|
|
183
183
|
} | undefined;
|
|
184
184
|
};
|
|
185
|
-
},
|
|
185
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
188
|
* Default implementation of getStaticProps with routes
|
|
@@ -306,7 +306,7 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
306
306
|
variants?: boolean | undefined;
|
|
307
307
|
} | undefined;
|
|
308
308
|
};
|
|
309
|
-
},
|
|
309
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
310
310
|
/**
|
|
311
311
|
* Default implementation of getStaticPaths with routes
|
|
312
312
|
* To configure custom behavior, use:
|
package/dist/route/index.js
CHANGED
|
@@ -502,9 +502,9 @@ var withUniformGetServerSideProps2 = (options) => {
|
|
|
502
502
|
defaultHandleNotFound,
|
|
503
503
|
defaultHandleRedirect,
|
|
504
504
|
parseContext(context) {
|
|
505
|
-
var _a;
|
|
505
|
+
var _a, _b;
|
|
506
506
|
return {
|
|
507
|
-
contextualEditingCompositionId: (_a = context.previewData) == null ? void 0 : _a.compositionId,
|
|
507
|
+
contextualEditingCompositionId: ((_a = context.previewData) == null ? void 0 : _a.isUniformContextualEditing) ? (_b = context.previewData) == null ? void 0 : _b.compositionId : void 0,
|
|
508
508
|
resolvedUrl: context.resolvedUrl,
|
|
509
509
|
// auto engage draft content when in next preview mode
|
|
510
510
|
// (can override with explicit setting of request options)'
|
|
@@ -543,12 +543,12 @@ var withUniformGetStaticProps2 = (options) => {
|
|
|
543
543
|
defaultHandleNotFound,
|
|
544
544
|
defaultHandleRedirect,
|
|
545
545
|
parseContext(context) {
|
|
546
|
-
var _a, _b;
|
|
546
|
+
var _a, _b, _c;
|
|
547
547
|
return {
|
|
548
|
-
contextualEditingCompositionId: (_a = context.previewData) == null ? void 0 : _a.compositionId,
|
|
548
|
+
contextualEditingCompositionId: ((_a = context.previewData) == null ? void 0 : _a.isUniformContextualEditing) ? (_b = context.previewData) == null ? void 0 : _b.compositionId : void 0,
|
|
549
549
|
resolvedUrl: resolveSlugFromParams({
|
|
550
550
|
params: context.params,
|
|
551
|
-
param: (
|
|
551
|
+
param: (_c = options == null ? void 0 : options.param) != null ? _c : "route"
|
|
552
552
|
}),
|
|
553
553
|
// auto engage draft content when in next preview mode
|
|
554
554
|
// (can override with explicit setting of request options)
|
package/dist/route/index.mjs
CHANGED
|
@@ -229,9 +229,9 @@ var withUniformGetServerSideProps = (options) => {
|
|
|
229
229
|
defaultHandleNotFound,
|
|
230
230
|
defaultHandleRedirect,
|
|
231
231
|
parseContext(context) {
|
|
232
|
-
var _a;
|
|
232
|
+
var _a, _b;
|
|
233
233
|
return {
|
|
234
|
-
contextualEditingCompositionId: (_a = context.previewData) == null ? void 0 : _a.compositionId,
|
|
234
|
+
contextualEditingCompositionId: ((_a = context.previewData) == null ? void 0 : _a.isUniformContextualEditing) ? (_b = context.previewData) == null ? void 0 : _b.compositionId : void 0,
|
|
235
235
|
resolvedUrl: context.resolvedUrl,
|
|
236
236
|
// auto engage draft content when in next preview mode
|
|
237
237
|
// (can override with explicit setting of request options)'
|
|
@@ -270,12 +270,12 @@ var withUniformGetStaticProps = (options) => {
|
|
|
270
270
|
defaultHandleNotFound,
|
|
271
271
|
defaultHandleRedirect,
|
|
272
272
|
parseContext(context) {
|
|
273
|
-
var _a, _b;
|
|
273
|
+
var _a, _b, _c;
|
|
274
274
|
return {
|
|
275
|
-
contextualEditingCompositionId: (_a = context.previewData) == null ? void 0 : _a.compositionId,
|
|
275
|
+
contextualEditingCompositionId: ((_a = context.previewData) == null ? void 0 : _a.isUniformContextualEditing) ? (_b = context.previewData) == null ? void 0 : _b.compositionId : void 0,
|
|
276
276
|
resolvedUrl: resolveSlugFromParams({
|
|
277
277
|
params: context.params,
|
|
278
|
-
param: (
|
|
278
|
+
param: (_c = options == null ? void 0 : options.param) != null ? _c : "route"
|
|
279
279
|
}),
|
|
280
280
|
// auto engage draft content when in next preview mode
|
|
281
281
|
// (can override with explicit setting of request options)
|
package/dist/slug/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, GetServerSideProps, GetStaticPropsContext, GetStaticProps } from 'next';
|
|
3
3
|
import { a as UniformPreviewData, c as UniformGetServerSideProps, b as UniformGetStaticProps } from '../models-f9fd03c4.js';
|
|
4
|
-
import * as
|
|
5
|
-
import { ParsedUrlQuery } from 'querystring';
|
|
4
|
+
import * as node_querystring from 'node:querystring';
|
|
6
5
|
import * as _uniformdev_canvas from '@uniformdev/canvas';
|
|
7
6
|
import { CanvasClient, DataResolutionOption, CompositionGetParameters, CompositionGetResponse } from '@uniformdev/canvas';
|
|
7
|
+
import { ParsedUrlQuery } from 'querystring';
|
|
8
8
|
import '@uniformdev/canvas-react';
|
|
9
9
|
|
|
10
10
|
declare const withUniformGetServerSideProps: <TProps extends {
|
|
@@ -86,11 +86,11 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
86
86
|
|
|
87
87
|
declare const getServerSideProps: next.GetServerSideProps<{
|
|
88
88
|
[key: string]: any;
|
|
89
|
-
},
|
|
89
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
90
90
|
/** Ready to go getStaticProps for dynamic route with 'slug' param for [[...slug]].jsx */
|
|
91
91
|
declare const getStaticProps: next.GetStaticProps<{
|
|
92
92
|
[key: string]: any;
|
|
93
|
-
},
|
|
93
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
94
94
|
declare const getStaticPaths: () => Promise<{
|
|
95
95
|
paths: string[];
|
|
96
96
|
fallback: boolean;
|
package/dist/slug/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, GetServerSideProps, GetStaticPropsContext, GetStaticProps } from 'next';
|
|
3
3
|
import { a as UniformPreviewData, c as UniformGetServerSideProps, b as UniformGetStaticProps } from '../models-f9fd03c4.js';
|
|
4
|
-
import * as
|
|
5
|
-
import { ParsedUrlQuery } from 'querystring';
|
|
4
|
+
import * as node_querystring from 'node:querystring';
|
|
6
5
|
import * as _uniformdev_canvas from '@uniformdev/canvas';
|
|
7
6
|
import { CanvasClient, DataResolutionOption, CompositionGetParameters, CompositionGetResponse } from '@uniformdev/canvas';
|
|
7
|
+
import { ParsedUrlQuery } from 'querystring';
|
|
8
8
|
import '@uniformdev/canvas-react';
|
|
9
9
|
|
|
10
10
|
declare const withUniformGetServerSideProps: <TProps extends {
|
|
@@ -86,11 +86,11 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
86
86
|
|
|
87
87
|
declare const getServerSideProps: next.GetServerSideProps<{
|
|
88
88
|
[key: string]: any;
|
|
89
|
-
},
|
|
89
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
90
90
|
/** Ready to go getStaticProps for dynamic route with 'slug' param for [[...slug]].jsx */
|
|
91
91
|
declare const getStaticProps: next.GetStaticProps<{
|
|
92
92
|
[key: string]: any;
|
|
93
|
-
},
|
|
93
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
94
94
|
declare const getStaticPaths: () => Promise<{
|
|
95
95
|
paths: string[];
|
|
96
96
|
fallback: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-next",
|
|
3
|
-
"version": "19.56.
|
|
3
|
+
"version": "19.56.1-alpha.22+a6fd2a3df",
|
|
4
4
|
"description": "Next.js SDK for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"./slug": {
|
|
18
18
|
"import": {
|
|
19
|
-
"types": "./dist/index.d.mts",
|
|
19
|
+
"types": "./dist/slug/index.d.mts",
|
|
20
20
|
"node": "./dist/slug/index.mjs",
|
|
21
21
|
"default": "./dist/slug/index.esm.js"
|
|
22
22
|
},
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"./project-map": {
|
|
26
26
|
"import": {
|
|
27
|
-
"types": "./dist/index.d.mts",
|
|
27
|
+
"types": "./dist/project-map/index.d.mts",
|
|
28
28
|
"node": "./dist/project-map/index.mjs",
|
|
29
29
|
"default": "./dist/project-map/index.esm.js"
|
|
30
30
|
},
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"./route": {
|
|
34
34
|
"import": {
|
|
35
|
-
"types": "./dist/index.d.mts",
|
|
35
|
+
"types": "./dist/route/index.d.mts",
|
|
36
36
|
"node": "./dist/route/index.mjs",
|
|
37
37
|
"default": "./dist/route/index.esm.js"
|
|
38
38
|
},
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"document": "api-extractor run --local"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@uniformdev/canvas": "19.56.
|
|
71
|
-
"@uniformdev/canvas-react": "19.56.
|
|
72
|
-
"@uniformdev/project-map": "19.56.
|
|
73
|
-
"@uniformdev/redirect": "19.56.
|
|
74
|
-
"@uniformdev/richtext": "19.56.
|
|
70
|
+
"@uniformdev/canvas": "19.56.1-alpha.22+a6fd2a3df",
|
|
71
|
+
"@uniformdev/canvas-react": "19.56.1-alpha.22+a6fd2a3df",
|
|
72
|
+
"@uniformdev/project-map": "19.56.1-alpha.22+a6fd2a3df",
|
|
73
|
+
"@uniformdev/redirect": "19.56.1-alpha.22+a6fd2a3df",
|
|
74
|
+
"@uniformdev/richtext": "19.56.1-alpha.22+a6fd2a3df",
|
|
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": "a6fd2a3dfdfa76a6610f664a81f3d531f98388f0"
|
|
95
95
|
}
|