@uniformdev/canvas-next 20.49.2 → 20.49.3-alpha.47
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/{chunk-JQWYBVLI.mjs → chunk-4YXXKXP3.mjs} +16 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +19 -5
- package/dist/index.js +21 -8
- package/dist/index.mjs +19 -5
- package/dist/{models-CupnCqnn.d.mts → models-BGg_qtcM.d.mts} +4 -3
- package/dist/{models-CupnCqnn.d.ts → models-BGg_qtcM.d.ts} +4 -3
- package/dist/project-map/index.d.mts +5 -5
- package/dist/project-map/index.d.ts +5 -5
- package/dist/project-map/index.js +33 -6
- package/dist/project-map/index.mjs +21 -8
- package/dist/route/index.d.mts +8 -8
- package/dist/route/index.d.ts +8 -8
- package/dist/route/index.js +34 -7
- package/dist/route/index.mjs +22 -9
- package/dist/slug/index.d.mts +5 -5
- package/dist/slug/index.d.ts +5 -5
- package/dist/slug/index.js +33 -6
- package/dist/slug/index.mjs +21 -8
- package/package.json +12 -13
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// src/helpers/resolvePreviewReleaseId.ts
|
|
2
|
+
function resolvePreviewReleaseId({
|
|
3
|
+
explicitReleaseId,
|
|
4
|
+
isPreview,
|
|
5
|
+
previewReleaseId
|
|
6
|
+
}) {
|
|
7
|
+
if (typeof explicitReleaseId !== "undefined") {
|
|
8
|
+
return explicitReleaseId;
|
|
9
|
+
}
|
|
10
|
+
if (!isPreview) {
|
|
11
|
+
return void 0;
|
|
12
|
+
}
|
|
13
|
+
return previewReleaseId;
|
|
14
|
+
}
|
|
15
|
+
|
|
1
16
|
// src/logging/logCompositionResponse.ts
|
|
2
17
|
import { white as white2 } from "colorette";
|
|
3
18
|
|
|
@@ -104,5 +119,6 @@ function resolveDiagnosticsDuration(data) {
|
|
|
104
119
|
}
|
|
105
120
|
|
|
106
121
|
export {
|
|
122
|
+
resolvePreviewReleaseId,
|
|
107
123
|
logCompositionResponse
|
|
108
124
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RichTextRendererComponent,
|
|
1
|
+
import { RichTextRendererComponent, UniformRichText as UniformRichText$1, UniformRichTextNode as UniformRichTextNode$1, RenderRichTextComponentResolver } from '@uniformdev/canvas-react';
|
|
2
2
|
import { ParsedUrlQuery } from 'querystring';
|
|
3
|
-
export { U as UniformCompositionNextPage,
|
|
3
|
+
export { U as UniformCompositionNextPage, a as UniformGetServerSideProps, b as UniformGetStaticProps, c as UniformPreviewData } from './models-BGg_qtcM.mjs';
|
|
4
4
|
import { NextApiHandler, NextApiRequest } from 'next';
|
|
5
5
|
import { RootComponentInstance } from '@uniformdev/canvas';
|
|
6
6
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RichTextRendererComponent,
|
|
1
|
+
import { RichTextRendererComponent, UniformRichText as UniformRichText$1, UniformRichTextNode as UniformRichTextNode$1, RenderRichTextComponentResolver } from '@uniformdev/canvas-react';
|
|
2
2
|
import { ParsedUrlQuery } from 'querystring';
|
|
3
|
-
export { U as UniformCompositionNextPage,
|
|
3
|
+
export { U as UniformCompositionNextPage, a as UniformGetServerSideProps, b as UniformGetStaticProps, c as UniformPreviewData } from './models-BGg_qtcM.js';
|
|
4
4
|
import { NextApiHandler, NextApiRequest } from 'next';
|
|
5
5
|
import { RootComponentInstance } from '@uniformdev/canvas';
|
|
6
6
|
|
package/dist/index.esm.js
CHANGED
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// src/components/UniformRichText.tsx
|
|
6
6
|
import {
|
|
7
|
+
linkParamValueToAnchorProps,
|
|
7
8
|
UniformRichText as ReactUniformRichText,
|
|
8
9
|
UniformRichTextNode as ReactUniformRichTextNode
|
|
9
10
|
} from "@uniformdev/canvas-react";
|
|
10
|
-
import { linkParamValueToHref } from "@uniformdev/richtext";
|
|
11
11
|
import NextLink from "next/link.js";
|
|
12
12
|
import React, { useCallback } from "react";
|
|
13
13
|
var NextLinkRichTextNode = ({ children, node }) => {
|
|
14
14
|
const { link } = node;
|
|
15
|
-
const href =
|
|
15
|
+
const { href, ...rest } = linkParamValueToAnchorProps(link);
|
|
16
16
|
if (href) {
|
|
17
|
-
return /* @__PURE__ */ React.createElement(NextLink, { href }, children);
|
|
17
|
+
return /* @__PURE__ */ React.createElement(NextLink, { href, ...rest }, children);
|
|
18
18
|
} else {
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
@@ -98,6 +98,7 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
98
98
|
const slug = getQueryParam(req, compositionQueryParam.slug);
|
|
99
99
|
const path = getQueryParam(req, compositionQueryParam.path);
|
|
100
100
|
const locale = getQueryParam(req, compositionQueryParam.locale);
|
|
101
|
+
const releaseId = getQueryParam(req, "releaseId") || void 0;
|
|
101
102
|
if (typeof pathToRedirectTo === "undefined") {
|
|
102
103
|
pathToRedirectTo = resolveFullPath({ id, slug, path, locale });
|
|
103
104
|
}
|
|
@@ -125,6 +126,7 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
125
126
|
compositionSlug: slug,
|
|
126
127
|
compositionPath: path,
|
|
127
128
|
locale,
|
|
129
|
+
releaseId,
|
|
128
130
|
isPlayground,
|
|
129
131
|
patternType: !isPlayground ? void 0 : getQueryParam(req, "patternType")
|
|
130
132
|
},
|
|
@@ -143,6 +145,9 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
143
145
|
);
|
|
144
146
|
const redirectionUrl = new URL(pathToRedirectTo, BASE_URL_EXAMPLE);
|
|
145
147
|
assignRequestQueryToSearchParams(redirectionUrl.searchParams, req.query);
|
|
148
|
+
if (releaseId) {
|
|
149
|
+
redirectionUrl.searchParams.set("releaseId", releaseId);
|
|
150
|
+
}
|
|
146
151
|
if (!isUniformContextualEditing) {
|
|
147
152
|
contextualEditingQueryParams.forEach((param) => {
|
|
148
153
|
redirectionUrl.searchParams.delete(param);
|
|
@@ -155,8 +160,17 @@ var resolveFullPathDefault = ({ slug, path }) => {
|
|
|
155
160
|
return path || slug;
|
|
156
161
|
};
|
|
157
162
|
function validateLocalRedirectUrl(pathToRedirectTo) {
|
|
158
|
-
if (pathToRedirectTo
|
|
159
|
-
|
|
163
|
+
if (!pathToRedirectTo) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
let resolved;
|
|
167
|
+
try {
|
|
168
|
+
resolved = new URL(pathToRedirectTo, BASE_URL_EXAMPLE);
|
|
169
|
+
} catch (e) {
|
|
170
|
+
throw new Error("Invalid redirect path. Disallowing open redirect.");
|
|
171
|
+
}
|
|
172
|
+
if (resolved.origin !== BASE_URL_EXAMPLE) {
|
|
173
|
+
throw new Error("Tried to redirect off-origin. Disallowing open redirect.");
|
|
160
174
|
}
|
|
161
175
|
}
|
|
162
176
|
var assignRequestQueryToSearchParams = (searchParams, query) => {
|
package/dist/index.js
CHANGED
|
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
NextLinkRichTextNode: () => NextLinkRichTextNode,
|
|
34
34
|
UniformRichText: () => UniformRichText,
|
|
35
35
|
UniformRichTextNode: () => UniformRichTextNode,
|
|
@@ -39,18 +39,17 @@ __export(src_exports, {
|
|
|
39
39
|
resolveSlugFromParams: () => resolveSlugFromParams,
|
|
40
40
|
useResolveNextRichTextRenderer: () => useResolveNextRichTextRenderer
|
|
41
41
|
});
|
|
42
|
-
module.exports = __toCommonJS(
|
|
42
|
+
module.exports = __toCommonJS(index_exports);
|
|
43
43
|
|
|
44
44
|
// src/components/UniformRichText.tsx
|
|
45
45
|
var import_canvas_react = require("@uniformdev/canvas-react");
|
|
46
|
-
var import_richtext = require("@uniformdev/richtext");
|
|
47
46
|
var import_link = __toESM(require("next/link.js"));
|
|
48
47
|
var import_react = __toESM(require("react"));
|
|
49
48
|
var NextLinkRichTextNode = ({ children, node }) => {
|
|
50
49
|
const { link } = node;
|
|
51
|
-
const href = (0,
|
|
50
|
+
const { href, ...rest } = (0, import_canvas_react.linkParamValueToAnchorProps)(link);
|
|
52
51
|
if (href) {
|
|
53
|
-
return /* @__PURE__ */ import_react.default.createElement(import_link.default, { href }, children);
|
|
52
|
+
return /* @__PURE__ */ import_react.default.createElement(import_link.default, { href, ...rest }, children);
|
|
54
53
|
} else {
|
|
55
54
|
return null;
|
|
56
55
|
}
|
|
@@ -140,6 +139,7 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
140
139
|
const slug = getQueryParam(req, compositionQueryParam.slug);
|
|
141
140
|
const path = getQueryParam(req, compositionQueryParam.path);
|
|
142
141
|
const locale = getQueryParam(req, compositionQueryParam.locale);
|
|
142
|
+
const releaseId = getQueryParam(req, "releaseId") || void 0;
|
|
143
143
|
if (typeof pathToRedirectTo === "undefined") {
|
|
144
144
|
pathToRedirectTo = resolveFullPath({ id, slug, path, locale });
|
|
145
145
|
}
|
|
@@ -167,6 +167,7 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
167
167
|
compositionSlug: slug,
|
|
168
168
|
compositionPath: path,
|
|
169
169
|
locale,
|
|
170
|
+
releaseId,
|
|
170
171
|
isPlayground,
|
|
171
172
|
patternType: !isPlayground ? void 0 : getQueryParam(req, "patternType")
|
|
172
173
|
},
|
|
@@ -185,6 +186,9 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
185
186
|
);
|
|
186
187
|
const redirectionUrl = new URL(pathToRedirectTo, BASE_URL_EXAMPLE);
|
|
187
188
|
assignRequestQueryToSearchParams(redirectionUrl.searchParams, req.query);
|
|
189
|
+
if (releaseId) {
|
|
190
|
+
redirectionUrl.searchParams.set("releaseId", releaseId);
|
|
191
|
+
}
|
|
188
192
|
if (!isUniformContextualEditing) {
|
|
189
193
|
contextualEditingQueryParams.forEach((param) => {
|
|
190
194
|
redirectionUrl.searchParams.delete(param);
|
|
@@ -197,8 +201,17 @@ var resolveFullPathDefault = ({ slug, path }) => {
|
|
|
197
201
|
return path || slug;
|
|
198
202
|
};
|
|
199
203
|
function validateLocalRedirectUrl(pathToRedirectTo) {
|
|
200
|
-
if (pathToRedirectTo
|
|
201
|
-
|
|
204
|
+
if (!pathToRedirectTo) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
let resolved;
|
|
208
|
+
try {
|
|
209
|
+
resolved = new URL(pathToRedirectTo, BASE_URL_EXAMPLE);
|
|
210
|
+
} catch (e) {
|
|
211
|
+
throw new Error("Invalid redirect path. Disallowing open redirect.");
|
|
212
|
+
}
|
|
213
|
+
if (resolved.origin !== BASE_URL_EXAMPLE) {
|
|
214
|
+
throw new Error("Tried to redirect off-origin. Disallowing open redirect.");
|
|
202
215
|
}
|
|
203
216
|
}
|
|
204
217
|
var assignRequestQueryToSearchParams = (searchParams, query) => {
|
package/dist/index.mjs
CHANGED
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// src/components/UniformRichText.tsx
|
|
6
6
|
import {
|
|
7
|
+
linkParamValueToAnchorProps,
|
|
7
8
|
UniformRichText as ReactUniformRichText,
|
|
8
9
|
UniformRichTextNode as ReactUniformRichTextNode
|
|
9
10
|
} from "@uniformdev/canvas-react";
|
|
10
|
-
import { linkParamValueToHref } from "@uniformdev/richtext";
|
|
11
11
|
import NextLink from "next/link.js";
|
|
12
12
|
import React, { useCallback } from "react";
|
|
13
13
|
var NextLinkRichTextNode = ({ children, node }) => {
|
|
14
14
|
const { link } = node;
|
|
15
|
-
const href =
|
|
15
|
+
const { href, ...rest } = linkParamValueToAnchorProps(link);
|
|
16
16
|
if (href) {
|
|
17
|
-
return /* @__PURE__ */ React.createElement(NextLink, { href }, children);
|
|
17
|
+
return /* @__PURE__ */ React.createElement(NextLink, { href, ...rest }, children);
|
|
18
18
|
} else {
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
@@ -98,6 +98,7 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
98
98
|
const slug = getQueryParam(req, compositionQueryParam.slug);
|
|
99
99
|
const path = getQueryParam(req, compositionQueryParam.path);
|
|
100
100
|
const locale = getQueryParam(req, compositionQueryParam.locale);
|
|
101
|
+
const releaseId = getQueryParam(req, "releaseId") || void 0;
|
|
101
102
|
if (typeof pathToRedirectTo === "undefined") {
|
|
102
103
|
pathToRedirectTo = resolveFullPath({ id, slug, path, locale });
|
|
103
104
|
}
|
|
@@ -125,6 +126,7 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
125
126
|
compositionSlug: slug,
|
|
126
127
|
compositionPath: path,
|
|
127
128
|
locale,
|
|
129
|
+
releaseId,
|
|
128
130
|
isPlayground,
|
|
129
131
|
patternType: !isPlayground ? void 0 : getQueryParam(req, "patternType")
|
|
130
132
|
},
|
|
@@ -143,6 +145,9 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
143
145
|
);
|
|
144
146
|
const redirectionUrl = new URL(pathToRedirectTo, BASE_URL_EXAMPLE);
|
|
145
147
|
assignRequestQueryToSearchParams(redirectionUrl.searchParams, req.query);
|
|
148
|
+
if (releaseId) {
|
|
149
|
+
redirectionUrl.searchParams.set("releaseId", releaseId);
|
|
150
|
+
}
|
|
146
151
|
if (!isUniformContextualEditing) {
|
|
147
152
|
contextualEditingQueryParams.forEach((param) => {
|
|
148
153
|
redirectionUrl.searchParams.delete(param);
|
|
@@ -155,8 +160,17 @@ var resolveFullPathDefault = ({ slug, path }) => {
|
|
|
155
160
|
return path || slug;
|
|
156
161
|
};
|
|
157
162
|
function validateLocalRedirectUrl(pathToRedirectTo) {
|
|
158
|
-
if (pathToRedirectTo
|
|
159
|
-
|
|
163
|
+
if (!pathToRedirectTo) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
let resolved;
|
|
167
|
+
try {
|
|
168
|
+
resolved = new URL(pathToRedirectTo, BASE_URL_EXAMPLE);
|
|
169
|
+
} catch (e) {
|
|
170
|
+
throw new Error("Invalid redirect path. Disallowing open redirect.");
|
|
171
|
+
}
|
|
172
|
+
if (resolved.origin !== BASE_URL_EXAMPLE) {
|
|
173
|
+
throw new Error("Tried to redirect off-origin. Disallowing open redirect.");
|
|
160
174
|
}
|
|
161
175
|
}
|
|
162
176
|
var assignRequestQueryToSearchParams = (searchParams, query) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RootComponentInstance, CompositionGetParameters } from '@uniformdev/canvas';
|
|
2
2
|
import { UniformCompositionProps } from '@uniformdev/canvas-react';
|
|
3
|
-
import { NextPage, PreviewData,
|
|
3
|
+
import { NextPage, PreviewData, GetServerSidePropsContext, GetServerSidePropsResult, GetStaticPropsContext, GetStaticPropsResult } from 'next';
|
|
4
4
|
import { ParsedUrlQuery } from 'querystring';
|
|
5
5
|
|
|
6
6
|
type UniformCompositionNextPage<TProps = unknown> = NextPage<TProps & UniformCompositionProps>;
|
|
@@ -10,6 +10,7 @@ type UniformPreviewData = PreviewData & {
|
|
|
10
10
|
compositionSlug?: string;
|
|
11
11
|
compositionPath?: string;
|
|
12
12
|
locale?: string;
|
|
13
|
+
releaseId?: string;
|
|
13
14
|
isPlayground?: boolean;
|
|
14
15
|
/**
|
|
15
16
|
* The type of pattern being previewed in Canvas editor. This value is only set when `isPlayground` is `true`.
|
|
@@ -28,4 +29,4 @@ type UniformGetServerSideProps<P extends {
|
|
|
28
29
|
[key: string]: any;
|
|
29
30
|
}, Q extends ParsedUrlQuery = ParsedUrlQuery, D extends PreviewData = PreviewData> = (context: GetServerSidePropsContext<Q, D>, composition: RootComponentInstance | undefined) => Promise<GetServerSidePropsResult<P>> | GetServerSidePropsResult<P>;
|
|
30
31
|
|
|
31
|
-
export type { UniformCompositionNextPage as U,
|
|
32
|
+
export type { UniformCompositionNextPage as U, UniformGetServerSideProps as a, UniformGetStaticProps as b, UniformPreviewData as c };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RootComponentInstance, CompositionGetParameters } from '@uniformdev/canvas';
|
|
2
2
|
import { UniformCompositionProps } from '@uniformdev/canvas-react';
|
|
3
|
-
import { NextPage, PreviewData,
|
|
3
|
+
import { NextPage, PreviewData, GetServerSidePropsContext, GetServerSidePropsResult, GetStaticPropsContext, GetStaticPropsResult } from 'next';
|
|
4
4
|
import { ParsedUrlQuery } from 'querystring';
|
|
5
5
|
|
|
6
6
|
type UniformCompositionNextPage<TProps = unknown> = NextPage<TProps & UniformCompositionProps>;
|
|
@@ -10,6 +10,7 @@ type UniformPreviewData = PreviewData & {
|
|
|
10
10
|
compositionSlug?: string;
|
|
11
11
|
compositionPath?: string;
|
|
12
12
|
locale?: string;
|
|
13
|
+
releaseId?: string;
|
|
13
14
|
isPlayground?: boolean;
|
|
14
15
|
/**
|
|
15
16
|
* The type of pattern being previewed in Canvas editor. This value is only set when `isPlayground` is `true`.
|
|
@@ -28,4 +29,4 @@ type UniformGetServerSideProps<P extends {
|
|
|
28
29
|
[key: string]: any;
|
|
29
30
|
}, Q extends ParsedUrlQuery = ParsedUrlQuery, D extends PreviewData = PreviewData> = (context: GetServerSidePropsContext<Q, D>, composition: RootComponentInstance | undefined) => Promise<GetServerSidePropsResult<P>> | GetServerSidePropsResult<P>;
|
|
30
31
|
|
|
31
|
-
export type { UniformCompositionNextPage as U,
|
|
32
|
+
export type { UniformCompositionNextPage as U, UniformGetServerSideProps as a, UniformGetStaticProps as b, UniformPreviewData as c };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, PreviewData, GetServerSideProps, GetStaticPropsContext, GetStaticProps } from 'next';
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import { ParsedUrlQuery } from 'querystring';
|
|
3
|
+
import { a as UniformGetServerSideProps, c as UniformPreviewData, b as UniformGetStaticProps } from '../models-BGg_qtcM.mjs';
|
|
4
|
+
import * as node_querystring from 'node:querystring';
|
|
6
5
|
import { CanvasClient, CompositionGetByNodePathParameters, DataResolutionOption } from '@uniformdev/canvas';
|
|
6
|
+
import { ParsedUrlQuery } from 'querystring';
|
|
7
7
|
import { ProjectMapNodeGetRequest, ProjectMapNodeGetResponse, ProjectMapClient } from '@uniformdev/project-map';
|
|
8
8
|
import '@uniformdev/canvas-react';
|
|
9
9
|
|
|
@@ -72,11 +72,11 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
72
72
|
|
|
73
73
|
declare const getServerSideProps: next.GetServerSideProps<{
|
|
74
74
|
[key: string]: any;
|
|
75
|
-
},
|
|
75
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
76
76
|
/** Ready to go getStaticProps for dynamic route with 'path' param for [[...path]].jsx */
|
|
77
77
|
declare const getStaticProps: next.GetStaticProps<{
|
|
78
78
|
[key: string]: any;
|
|
79
|
-
},
|
|
79
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
80
80
|
declare const getStaticPaths: () => Promise<{
|
|
81
81
|
paths: string[] | undefined;
|
|
82
82
|
fallback: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, PreviewData, GetServerSideProps, GetStaticPropsContext, GetStaticProps } from 'next';
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import { ParsedUrlQuery } from 'querystring';
|
|
3
|
+
import { a as UniformGetServerSideProps, c as UniformPreviewData, b as UniformGetStaticProps } from '../models-BGg_qtcM.js';
|
|
4
|
+
import * as node_querystring from 'node:querystring';
|
|
6
5
|
import { CanvasClient, CompositionGetByNodePathParameters, DataResolutionOption } from '@uniformdev/canvas';
|
|
6
|
+
import { ParsedUrlQuery } from 'querystring';
|
|
7
7
|
import { ProjectMapNodeGetRequest, ProjectMapNodeGetResponse, ProjectMapClient } from '@uniformdev/project-map';
|
|
8
8
|
import '@uniformdev/canvas-react';
|
|
9
9
|
|
|
@@ -72,11 +72,11 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
72
72
|
|
|
73
73
|
declare const getServerSideProps: next.GetServerSideProps<{
|
|
74
74
|
[key: string]: any;
|
|
75
|
-
},
|
|
75
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
76
76
|
/** Ready to go getStaticProps for dynamic route with 'path' param for [[...path]].jsx */
|
|
77
77
|
declare const getStaticProps: next.GetStaticProps<{
|
|
78
78
|
[key: string]: any;
|
|
79
|
-
},
|
|
79
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
80
80
|
declare const getStaticPaths: () => Promise<{
|
|
81
81
|
paths: string[] | undefined;
|
|
82
82
|
fallback: boolean;
|
|
@@ -32,6 +32,21 @@ module.exports = __toCommonJS(project_map_exports);
|
|
|
32
32
|
// src/project-map/withUniformGetServerSideProps.ts
|
|
33
33
|
var import_canvas = require("@uniformdev/canvas");
|
|
34
34
|
|
|
35
|
+
// src/helpers/resolvePreviewReleaseId.ts
|
|
36
|
+
function resolvePreviewReleaseId({
|
|
37
|
+
explicitReleaseId,
|
|
38
|
+
isPreview,
|
|
39
|
+
previewReleaseId
|
|
40
|
+
}) {
|
|
41
|
+
if (typeof explicitReleaseId !== "undefined") {
|
|
42
|
+
return explicitReleaseId;
|
|
43
|
+
}
|
|
44
|
+
if (!isPreview) {
|
|
45
|
+
return void 0;
|
|
46
|
+
}
|
|
47
|
+
return previewReleaseId;
|
|
48
|
+
}
|
|
49
|
+
|
|
35
50
|
// src/logging/logCompositionIssues.ts
|
|
36
51
|
var import_colorette = require("colorette");
|
|
37
52
|
function logCompositionIssues(prefix, issues, colour = "red") {
|
|
@@ -144,16 +159,21 @@ var withUniformGetServerSideProps = (options) => {
|
|
|
144
159
|
edgeApiHost: process.env.UNIFORM_CLI_BASE_EDGE_URL
|
|
145
160
|
});
|
|
146
161
|
return async function wrappedGetServerSideProps(context) {
|
|
147
|
-
var _a, _b;
|
|
162
|
+
var _a, _b, _c;
|
|
148
163
|
const projectMapId = (_a = options == null ? void 0 : options.projectMapId) != null ? _a : process.env.UNIFORM_PROJECT_MAP_ID;
|
|
149
164
|
const { preview, previewData } = context;
|
|
165
|
+
const releaseId = resolvePreviewReleaseId({
|
|
166
|
+
explicitReleaseId: (_b = options == null ? void 0 : options.requestOptions) == null ? void 0 : _b.releaseId,
|
|
167
|
+
isPreview: preview || (options == null ? void 0 : options.preview),
|
|
168
|
+
previewReleaseId: previewData == null ? void 0 : previewData.releaseId
|
|
169
|
+
});
|
|
150
170
|
let composition = void 0;
|
|
151
171
|
let nodePath = (options == null ? void 0 : options.prefix) ? context.resolvedUrl.replace(new RegExp(`^${options.prefix}`), "") : context.resolvedUrl;
|
|
152
172
|
if (options == null ? void 0 : options.modifyPath) {
|
|
153
173
|
nodePath = options.modifyPath(nodePath, context);
|
|
154
174
|
}
|
|
155
175
|
if (previewData == null ? void 0 : previewData.isUniformContextualEditing) {
|
|
156
|
-
composition = { ...import_canvas.EMPTY_COMPOSITION, _id: (
|
|
176
|
+
composition = { ...import_canvas.EMPTY_COMPOSITION, _id: (_c = previewData.compositionId) != null ? _c : import_canvas.EMPTY_COMPOSITION._id };
|
|
157
177
|
} else {
|
|
158
178
|
try {
|
|
159
179
|
const time = Date.now();
|
|
@@ -161,7 +181,8 @@ var withUniformGetServerSideProps = (options) => {
|
|
|
161
181
|
...options == null ? void 0 : options.requestOptions,
|
|
162
182
|
projectMapId,
|
|
163
183
|
projectMapNodePath: nodePath,
|
|
164
|
-
state: preview || (options == null ? void 0 : options.preview) ? import_canvas.CANVAS_DRAFT_STATE : import_canvas.CANVAS_PUBLISHED_STATE
|
|
184
|
+
state: preview || (options == null ? void 0 : options.preview) ? import_canvas.CANVAS_DRAFT_STATE : import_canvas.CANVAS_PUBLISHED_STATE,
|
|
185
|
+
releaseId
|
|
165
186
|
});
|
|
166
187
|
const duration = Date.now() - time;
|
|
167
188
|
composition = response.composition;
|
|
@@ -237,7 +258,7 @@ var withUniformGetStaticProps = (options) => {
|
|
|
237
258
|
edgeApiHost: process.env.UNIFORM_CLI_BASE_EDGE_URL
|
|
238
259
|
});
|
|
239
260
|
return async function wrappedGetStaticProps(context) {
|
|
240
|
-
var _a2, _b;
|
|
261
|
+
var _a2, _b, _c;
|
|
241
262
|
const projectMapId = (_a2 = options == null ? void 0 : options.projectMapId) != null ? _a2 : process.env.UNIFORM_PROJECT_MAP_ID;
|
|
242
263
|
let pathString = resolveSlugFromParams({
|
|
243
264
|
param: options == null ? void 0 : options.param,
|
|
@@ -247,9 +268,14 @@ var withUniformGetStaticProps = (options) => {
|
|
|
247
268
|
pathString = options.modifyPath(pathString, context);
|
|
248
269
|
}
|
|
249
270
|
const { preview, previewData } = context;
|
|
271
|
+
const releaseId = resolvePreviewReleaseId({
|
|
272
|
+
explicitReleaseId: (_b = options == null ? void 0 : options.requestOptions) == null ? void 0 : _b.releaseId,
|
|
273
|
+
isPreview: preview || (options == null ? void 0 : options.preview),
|
|
274
|
+
previewReleaseId: previewData == null ? void 0 : previewData.releaseId
|
|
275
|
+
});
|
|
250
276
|
let composition = void 0;
|
|
251
277
|
if (previewData == null ? void 0 : previewData.isUniformContextualEditing) {
|
|
252
|
-
composition = { ...import_canvas3.EMPTY_COMPOSITION, _id: (
|
|
278
|
+
composition = { ...import_canvas3.EMPTY_COMPOSITION, _id: (_c = previewData.compositionId) != null ? _c : import_canvas3.EMPTY_COMPOSITION._id };
|
|
253
279
|
} else {
|
|
254
280
|
try {
|
|
255
281
|
const time = Date.now();
|
|
@@ -257,7 +283,8 @@ var withUniformGetStaticProps = (options) => {
|
|
|
257
283
|
...options == null ? void 0 : options.requestOptions,
|
|
258
284
|
projectMapId,
|
|
259
285
|
projectMapNodePath: pathString,
|
|
260
|
-
state: preview || (options == null ? void 0 : options.preview) ? import_canvas3.CANVAS_DRAFT_STATE : import_canvas3.CANVAS_PUBLISHED_STATE
|
|
286
|
+
state: preview || (options == null ? void 0 : options.preview) ? import_canvas3.CANVAS_DRAFT_STATE : import_canvas3.CANVAS_PUBLISHED_STATE,
|
|
287
|
+
releaseId
|
|
261
288
|
});
|
|
262
289
|
const duration = Date.now() - time;
|
|
263
290
|
composition = response.composition;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
logCompositionResponse
|
|
3
|
-
|
|
2
|
+
logCompositionResponse,
|
|
3
|
+
resolvePreviewReleaseId
|
|
4
|
+
} from "../chunk-4YXXKXP3.mjs";
|
|
4
5
|
import {
|
|
5
6
|
resolveSlugFromParams
|
|
6
7
|
} from "../chunk-TR7V6ABJ.mjs";
|
|
@@ -20,16 +21,21 @@ var withUniformGetServerSideProps = (options) => {
|
|
|
20
21
|
edgeApiHost: process.env.UNIFORM_CLI_BASE_EDGE_URL
|
|
21
22
|
});
|
|
22
23
|
return async function wrappedGetServerSideProps(context) {
|
|
23
|
-
var _a, _b;
|
|
24
|
+
var _a, _b, _c;
|
|
24
25
|
const projectMapId = (_a = options == null ? void 0 : options.projectMapId) != null ? _a : process.env.UNIFORM_PROJECT_MAP_ID;
|
|
25
26
|
const { preview, previewData } = context;
|
|
27
|
+
const releaseId = resolvePreviewReleaseId({
|
|
28
|
+
explicitReleaseId: (_b = options == null ? void 0 : options.requestOptions) == null ? void 0 : _b.releaseId,
|
|
29
|
+
isPreview: preview || (options == null ? void 0 : options.preview),
|
|
30
|
+
previewReleaseId: previewData == null ? void 0 : previewData.releaseId
|
|
31
|
+
});
|
|
26
32
|
let composition = void 0;
|
|
27
33
|
let nodePath = (options == null ? void 0 : options.prefix) ? context.resolvedUrl.replace(new RegExp(`^${options.prefix}`), "") : context.resolvedUrl;
|
|
28
34
|
if (options == null ? void 0 : options.modifyPath) {
|
|
29
35
|
nodePath = options.modifyPath(nodePath, context);
|
|
30
36
|
}
|
|
31
37
|
if (previewData == null ? void 0 : previewData.isUniformContextualEditing) {
|
|
32
|
-
composition = { ...EMPTY_COMPOSITION, _id: (
|
|
38
|
+
composition = { ...EMPTY_COMPOSITION, _id: (_c = previewData.compositionId) != null ? _c : EMPTY_COMPOSITION._id };
|
|
33
39
|
} else {
|
|
34
40
|
try {
|
|
35
41
|
const time = Date.now();
|
|
@@ -37,7 +43,8 @@ var withUniformGetServerSideProps = (options) => {
|
|
|
37
43
|
...options == null ? void 0 : options.requestOptions,
|
|
38
44
|
projectMapId,
|
|
39
45
|
projectMapNodePath: nodePath,
|
|
40
|
-
state: preview || (options == null ? void 0 : options.preview) ? CANVAS_DRAFT_STATE : CANVAS_PUBLISHED_STATE
|
|
46
|
+
state: preview || (options == null ? void 0 : options.preview) ? CANVAS_DRAFT_STATE : CANVAS_PUBLISHED_STATE,
|
|
47
|
+
releaseId
|
|
41
48
|
});
|
|
42
49
|
const duration = Date.now() - time;
|
|
43
50
|
composition = response.composition;
|
|
@@ -108,7 +115,7 @@ var withUniformGetStaticProps = (options) => {
|
|
|
108
115
|
edgeApiHost: process.env.UNIFORM_CLI_BASE_EDGE_URL
|
|
109
116
|
});
|
|
110
117
|
return async function wrappedGetStaticProps(context) {
|
|
111
|
-
var _a2, _b;
|
|
118
|
+
var _a2, _b, _c;
|
|
112
119
|
const projectMapId = (_a2 = options == null ? void 0 : options.projectMapId) != null ? _a2 : process.env.UNIFORM_PROJECT_MAP_ID;
|
|
113
120
|
let pathString = resolveSlugFromParams({
|
|
114
121
|
param: options == null ? void 0 : options.param,
|
|
@@ -118,9 +125,14 @@ var withUniformGetStaticProps = (options) => {
|
|
|
118
125
|
pathString = options.modifyPath(pathString, context);
|
|
119
126
|
}
|
|
120
127
|
const { preview, previewData } = context;
|
|
128
|
+
const releaseId = resolvePreviewReleaseId({
|
|
129
|
+
explicitReleaseId: (_b = options == null ? void 0 : options.requestOptions) == null ? void 0 : _b.releaseId,
|
|
130
|
+
isPreview: preview || (options == null ? void 0 : options.preview),
|
|
131
|
+
previewReleaseId: previewData == null ? void 0 : previewData.releaseId
|
|
132
|
+
});
|
|
121
133
|
let composition = void 0;
|
|
122
134
|
if (previewData == null ? void 0 : previewData.isUniformContextualEditing) {
|
|
123
|
-
composition = { ...EMPTY_COMPOSITION2, _id: (
|
|
135
|
+
composition = { ...EMPTY_COMPOSITION2, _id: (_c = previewData.compositionId) != null ? _c : EMPTY_COMPOSITION2._id };
|
|
124
136
|
} else {
|
|
125
137
|
try {
|
|
126
138
|
const time = Date.now();
|
|
@@ -128,7 +140,8 @@ var withUniformGetStaticProps = (options) => {
|
|
|
128
140
|
...options == null ? void 0 : options.requestOptions,
|
|
129
141
|
projectMapId,
|
|
130
142
|
projectMapNodePath: pathString,
|
|
131
|
-
state: preview || (options == null ? void 0 : options.preview) ? CANVAS_DRAFT_STATE3 : CANVAS_PUBLISHED_STATE3
|
|
143
|
+
state: preview || (options == null ? void 0 : options.preview) ? CANVAS_DRAFT_STATE3 : CANVAS_PUBLISHED_STATE3,
|
|
144
|
+
releaseId
|
|
132
145
|
});
|
|
133
146
|
const duration = Date.now() - time;
|
|
134
147
|
composition = response.composition;
|
package/dist/route/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, GetServerSidePropsResult, GetServerSideProps, GetStaticPropsContext, GetStaticPropsResult, GetStaticProps } from 'next';
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import * as _uniformdev_context__ from '@uniformdev/context/*';
|
|
7
|
-
import * as _uniformdev_canvas from '@uniformdev/canvas';
|
|
8
|
-
import { RouteGetResponseEdgehancedComposition, RouteGetResponseNotFound, RouteGetResponseRedirect, RouteClient, RouteGetParameters, RootComponentInstance } from '@uniformdev/canvas';
|
|
3
|
+
import { c as UniformPreviewData } from '../models-BGg_qtcM.mjs';
|
|
4
|
+
import * as node_querystring from 'node:querystring';
|
|
5
|
+
import * as _uniformdev_context from '@uniformdev/context';
|
|
9
6
|
import { CompositionMetadata } from '@uniformdev/context';
|
|
7
|
+
import * as _uniformdev_canvas from '@uniformdev/canvas';
|
|
8
|
+
import { RouteGetResponseEdgehancedComposition, RouteGetResponseNotFound, RouteGetResponseRedirect, RootComponentInstance, RouteClient, RouteGetParameters } from '@uniformdev/canvas';
|
|
9
|
+
import { ParsedUrlQuery } from 'querystring';
|
|
10
10
|
import { ProjectMapNodeGetRequest, ProjectMapNodeGetResponse, ProjectMapClient } from '@uniformdev/project-map';
|
|
11
11
|
import { RedirectClient } from '@uniformdev/redirect';
|
|
12
12
|
import { GetStaticPropsContext as GetStaticPropsContext$1, GetServerSidePropsContext as GetServerSidePropsContext$1 } from 'next/types';
|
|
@@ -112,7 +112,7 @@ declare const prependLocale: (path: string, { locale, defaultLocale, locales }:
|
|
|
112
112
|
*/
|
|
113
113
|
declare const getServerSideProps: next.GetServerSideProps<{
|
|
114
114
|
data: _uniformdev_canvas.RootComponentInstance;
|
|
115
|
-
} & Omit<
|
|
115
|
+
} & Omit<_uniformdev_context.CompositionMetadata, "compositionId">, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
116
116
|
/**
|
|
117
117
|
* Default implementation of getStaticProps with routes
|
|
118
118
|
* To configure custom behavior, use:
|
|
@@ -120,7 +120,7 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
120
120
|
*/
|
|
121
121
|
declare const getStaticProps: next.GetStaticProps<{
|
|
122
122
|
data: _uniformdev_canvas.RootComponentInstance;
|
|
123
|
-
} & Omit<
|
|
123
|
+
} & Omit<_uniformdev_context.CompositionMetadata, "compositionId">, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
124
124
|
/**
|
|
125
125
|
* Default implementation of getStaticPaths with routes
|
|
126
126
|
* To configure custom behavior, use:
|
package/dist/route/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, GetServerSidePropsResult, GetServerSideProps, GetStaticPropsContext, GetStaticPropsResult, GetStaticProps } from 'next';
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import * as _uniformdev_context__ from '@uniformdev/context/*';
|
|
7
|
-
import * as _uniformdev_canvas from '@uniformdev/canvas';
|
|
8
|
-
import { RouteGetResponseEdgehancedComposition, RouteGetResponseNotFound, RouteGetResponseRedirect, RouteClient, RouteGetParameters, RootComponentInstance } from '@uniformdev/canvas';
|
|
3
|
+
import { c as UniformPreviewData } from '../models-BGg_qtcM.js';
|
|
4
|
+
import * as node_querystring from 'node:querystring';
|
|
5
|
+
import * as _uniformdev_context from '@uniformdev/context';
|
|
9
6
|
import { CompositionMetadata } from '@uniformdev/context';
|
|
7
|
+
import * as _uniformdev_canvas from '@uniformdev/canvas';
|
|
8
|
+
import { RouteGetResponseEdgehancedComposition, RouteGetResponseNotFound, RouteGetResponseRedirect, RootComponentInstance, RouteClient, RouteGetParameters } from '@uniformdev/canvas';
|
|
9
|
+
import { ParsedUrlQuery } from 'querystring';
|
|
10
10
|
import { ProjectMapNodeGetRequest, ProjectMapNodeGetResponse, ProjectMapClient } from '@uniformdev/project-map';
|
|
11
11
|
import { RedirectClient } from '@uniformdev/redirect';
|
|
12
12
|
import { GetStaticPropsContext as GetStaticPropsContext$1, GetServerSidePropsContext as GetServerSidePropsContext$1 } from 'next/types';
|
|
@@ -112,7 +112,7 @@ declare const prependLocale: (path: string, { locale, defaultLocale, locales }:
|
|
|
112
112
|
*/
|
|
113
113
|
declare const getServerSideProps: next.GetServerSideProps<{
|
|
114
114
|
data: _uniformdev_canvas.RootComponentInstance;
|
|
115
|
-
} & Omit<
|
|
115
|
+
} & Omit<_uniformdev_context.CompositionMetadata, "compositionId">, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
116
116
|
/**
|
|
117
117
|
* Default implementation of getStaticProps with routes
|
|
118
118
|
* To configure custom behavior, use:
|
|
@@ -120,7 +120,7 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
120
120
|
*/
|
|
121
121
|
declare const getStaticProps: next.GetStaticProps<{
|
|
122
122
|
data: _uniformdev_canvas.RootComponentInstance;
|
|
123
|
-
} & Omit<
|
|
123
|
+
} & Omit<_uniformdev_context.CompositionMetadata, "compositionId">, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
124
124
|
/**
|
|
125
125
|
* Default implementation of getStaticPaths with routes
|
|
126
126
|
* To configure custom behavior, use:
|
package/dist/route/index.js
CHANGED
|
@@ -38,6 +38,21 @@ var import_redirect = require("@uniformdev/redirect");
|
|
|
38
38
|
var import_canvas = require("@uniformdev/canvas");
|
|
39
39
|
var import_colorette6 = require("colorette");
|
|
40
40
|
|
|
41
|
+
// src/helpers/resolvePreviewReleaseId.ts
|
|
42
|
+
function resolvePreviewReleaseId({
|
|
43
|
+
explicitReleaseId,
|
|
44
|
+
isPreview,
|
|
45
|
+
previewReleaseId
|
|
46
|
+
}) {
|
|
47
|
+
if (typeof explicitReleaseId !== "undefined") {
|
|
48
|
+
return explicitReleaseId;
|
|
49
|
+
}
|
|
50
|
+
if (!isPreview) {
|
|
51
|
+
return void 0;
|
|
52
|
+
}
|
|
53
|
+
return previewReleaseId;
|
|
54
|
+
}
|
|
55
|
+
|
|
41
56
|
// src/logging/logCompositionIssues.ts
|
|
42
57
|
var import_colorette = require("colorette");
|
|
43
58
|
function logCompositionIssues(prefix, issues, colour = "red") {
|
|
@@ -211,14 +226,16 @@ function createRouteFetcher(options) {
|
|
|
211
226
|
projectId: process.env.UNIFORM_PROJECT_ID,
|
|
212
227
|
edgeApiHost: process.env.UNIFORM_CLI_BASE_EDGE_URL
|
|
213
228
|
});
|
|
214
|
-
const handleModifyPath = modifyPath != null ? modifyPath : (path) => decodeURI(path);
|
|
229
|
+
const handleModifyPath = modifyPath != null ? modifyPath : ((path) => decodeURI(path));
|
|
215
230
|
return async function fetcher(context) {
|
|
216
231
|
var _a, _b;
|
|
217
232
|
const {
|
|
218
233
|
contextualEditingCompositionId,
|
|
219
234
|
contextualEditingPath,
|
|
220
235
|
resolvedUrl,
|
|
221
|
-
defaultFetchState: defaultPreviewState
|
|
236
|
+
defaultFetchState: defaultPreviewState,
|
|
237
|
+
isPreview,
|
|
238
|
+
previewReleaseId
|
|
222
239
|
} = parseContext(context);
|
|
223
240
|
let nodePath = prefix ? resolvedUrl.replace(new RegExp(`^${prefix}`), "") : resolvedUrl;
|
|
224
241
|
nodePath = handleModifyPath(nodePath, context);
|
|
@@ -286,6 +303,11 @@ function createRouteFetcher(options) {
|
|
|
286
303
|
console.log("Fetch route", nodePath);
|
|
287
304
|
}
|
|
288
305
|
const resolvedOptions = typeof requestOptions === "function" ? requestOptions(context) : requestOptions;
|
|
306
|
+
const releaseId = resolvePreviewReleaseId({
|
|
307
|
+
explicitReleaseId: resolvedOptions == null ? void 0 : resolvedOptions.releaseId,
|
|
308
|
+
isPreview,
|
|
309
|
+
previewReleaseId
|
|
310
|
+
});
|
|
289
311
|
const time = Date.now();
|
|
290
312
|
const response = await routeClient.getRoute({
|
|
291
313
|
...resolvedOptions,
|
|
@@ -295,7 +317,8 @@ function createRouteFetcher(options) {
|
|
|
295
317
|
defaultPreviewState
|
|
296
318
|
),
|
|
297
319
|
projectMapId,
|
|
298
|
-
path: nodePath
|
|
320
|
+
path: nodePath,
|
|
321
|
+
releaseId
|
|
299
322
|
});
|
|
300
323
|
const duration = Date.now() - time;
|
|
301
324
|
if (!silent) {
|
|
@@ -361,14 +384,16 @@ var withUniformGetServerSideProps = (options) => {
|
|
|
361
384
|
defaultHandleNotFound,
|
|
362
385
|
defaultHandleRedirect,
|
|
363
386
|
parseContext(context) {
|
|
364
|
-
var _a, _b, _c, _d;
|
|
387
|
+
var _a, _b, _c, _d, _e;
|
|
365
388
|
return {
|
|
366
389
|
contextualEditingCompositionId: ((_a = context.previewData) == null ? void 0 : _a.isUniformContextualEditing) ? (_b = context.previewData) == null ? void 0 : _b.compositionId : void 0,
|
|
367
390
|
contextualEditingPath: ((_c = context.previewData) == null ? void 0 : _c.isUniformContextualEditing) ? (_d = context.previewData) == null ? void 0 : _d.compositionPath : void 0,
|
|
368
391
|
resolvedUrl: context.resolvedUrl,
|
|
369
392
|
// auto engage draft content when in next preview mode
|
|
370
393
|
// (can override with explicit setting of request options)'
|
|
371
|
-
defaultFetchState: context.preview ? import_canvas2.CANVAS_DRAFT_STATE : void 0
|
|
394
|
+
defaultFetchState: context.preview ? import_canvas2.CANVAS_DRAFT_STATE : void 0,
|
|
395
|
+
isPreview: context.preview,
|
|
396
|
+
previewReleaseId: (_e = context.previewData) == null ? void 0 : _e.releaseId
|
|
372
397
|
};
|
|
373
398
|
}
|
|
374
399
|
});
|
|
@@ -471,7 +496,7 @@ var withUniformGetStaticProps = (options) => {
|
|
|
471
496
|
defaultHandleNotFound,
|
|
472
497
|
defaultHandleRedirect,
|
|
473
498
|
parseContext(context) {
|
|
474
|
-
var _a, _b, _c, _d, _e;
|
|
499
|
+
var _a, _b, _c, _d, _e, _f;
|
|
475
500
|
return {
|
|
476
501
|
contextualEditingCompositionId: ((_a = context.previewData) == null ? void 0 : _a.isUniformContextualEditing) ? (_b = context.previewData) == null ? void 0 : _b.compositionId : void 0,
|
|
477
502
|
contextualEditingPath: ((_c = context.previewData) == null ? void 0 : _c.isUniformContextualEditing) ? (_d = context.previewData) == null ? void 0 : _d.compositionPath : void 0,
|
|
@@ -481,7 +506,9 @@ var withUniformGetStaticProps = (options) => {
|
|
|
481
506
|
}),
|
|
482
507
|
// auto engage draft content when in next preview mode
|
|
483
508
|
// (can override with explicit setting of request options)
|
|
484
|
-
defaultFetchState: context.preview ? import_canvas4.CANVAS_DRAFT_STATE : void 0
|
|
509
|
+
defaultFetchState: context.preview ? import_canvas4.CANVAS_DRAFT_STATE : void 0,
|
|
510
|
+
isPreview: context.preview,
|
|
511
|
+
previewReleaseId: (_f = context.previewData) == null ? void 0 : _f.releaseId
|
|
485
512
|
};
|
|
486
513
|
}
|
|
487
514
|
});
|
package/dist/route/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
logCompositionResponse
|
|
3
|
-
|
|
2
|
+
logCompositionResponse,
|
|
3
|
+
resolvePreviewReleaseId
|
|
4
|
+
} from "../chunk-4YXXKXP3.mjs";
|
|
4
5
|
import {
|
|
5
6
|
resolveSlugFromParams
|
|
6
7
|
} from "../chunk-TR7V6ABJ.mjs";
|
|
@@ -89,14 +90,16 @@ function createRouteFetcher(options) {
|
|
|
89
90
|
projectId: process.env.UNIFORM_PROJECT_ID,
|
|
90
91
|
edgeApiHost: process.env.UNIFORM_CLI_BASE_EDGE_URL
|
|
91
92
|
});
|
|
92
|
-
const handleModifyPath = modifyPath != null ? modifyPath : (path) => decodeURI(path);
|
|
93
|
+
const handleModifyPath = modifyPath != null ? modifyPath : ((path) => decodeURI(path));
|
|
93
94
|
return async function fetcher(context) {
|
|
94
95
|
var _a, _b;
|
|
95
96
|
const {
|
|
96
97
|
contextualEditingCompositionId,
|
|
97
98
|
contextualEditingPath,
|
|
98
99
|
resolvedUrl,
|
|
99
|
-
defaultFetchState: defaultPreviewState
|
|
100
|
+
defaultFetchState: defaultPreviewState,
|
|
101
|
+
isPreview,
|
|
102
|
+
previewReleaseId
|
|
100
103
|
} = parseContext(context);
|
|
101
104
|
let nodePath = prefix ? resolvedUrl.replace(new RegExp(`^${prefix}`), "") : resolvedUrl;
|
|
102
105
|
nodePath = handleModifyPath(nodePath, context);
|
|
@@ -164,6 +167,11 @@ function createRouteFetcher(options) {
|
|
|
164
167
|
console.log("Fetch route", nodePath);
|
|
165
168
|
}
|
|
166
169
|
const resolvedOptions = typeof requestOptions === "function" ? requestOptions(context) : requestOptions;
|
|
170
|
+
const releaseId = resolvePreviewReleaseId({
|
|
171
|
+
explicitReleaseId: resolvedOptions == null ? void 0 : resolvedOptions.releaseId,
|
|
172
|
+
isPreview,
|
|
173
|
+
previewReleaseId
|
|
174
|
+
});
|
|
167
175
|
const time = Date.now();
|
|
168
176
|
const response = await routeClient.getRoute({
|
|
169
177
|
...resolvedOptions,
|
|
@@ -173,7 +181,8 @@ function createRouteFetcher(options) {
|
|
|
173
181
|
defaultPreviewState
|
|
174
182
|
),
|
|
175
183
|
projectMapId,
|
|
176
|
-
path: nodePath
|
|
184
|
+
path: nodePath,
|
|
185
|
+
releaseId
|
|
177
186
|
});
|
|
178
187
|
const duration = Date.now() - time;
|
|
179
188
|
if (!silent) {
|
|
@@ -239,14 +248,16 @@ var withUniformGetServerSideProps = (options) => {
|
|
|
239
248
|
defaultHandleNotFound,
|
|
240
249
|
defaultHandleRedirect,
|
|
241
250
|
parseContext(context) {
|
|
242
|
-
var _a, _b, _c, _d;
|
|
251
|
+
var _a, _b, _c, _d, _e;
|
|
243
252
|
return {
|
|
244
253
|
contextualEditingCompositionId: ((_a = context.previewData) == null ? void 0 : _a.isUniformContextualEditing) ? (_b = context.previewData) == null ? void 0 : _b.compositionId : void 0,
|
|
245
254
|
contextualEditingPath: ((_c = context.previewData) == null ? void 0 : _c.isUniformContextualEditing) ? (_d = context.previewData) == null ? void 0 : _d.compositionPath : void 0,
|
|
246
255
|
resolvedUrl: context.resolvedUrl,
|
|
247
256
|
// auto engage draft content when in next preview mode
|
|
248
257
|
// (can override with explicit setting of request options)'
|
|
249
|
-
defaultFetchState: context.preview ? CANVAS_DRAFT_STATE : void 0
|
|
258
|
+
defaultFetchState: context.preview ? CANVAS_DRAFT_STATE : void 0,
|
|
259
|
+
isPreview: context.preview,
|
|
260
|
+
previewReleaseId: (_e = context.previewData) == null ? void 0 : _e.releaseId
|
|
250
261
|
};
|
|
251
262
|
}
|
|
252
263
|
});
|
|
@@ -339,7 +350,7 @@ var withUniformGetStaticProps = (options) => {
|
|
|
339
350
|
defaultHandleNotFound,
|
|
340
351
|
defaultHandleRedirect,
|
|
341
352
|
parseContext(context) {
|
|
342
|
-
var _a, _b, _c, _d, _e;
|
|
353
|
+
var _a, _b, _c, _d, _e, _f;
|
|
343
354
|
return {
|
|
344
355
|
contextualEditingCompositionId: ((_a = context.previewData) == null ? void 0 : _a.isUniformContextualEditing) ? (_b = context.previewData) == null ? void 0 : _b.compositionId : void 0,
|
|
345
356
|
contextualEditingPath: ((_c = context.previewData) == null ? void 0 : _c.isUniformContextualEditing) ? (_d = context.previewData) == null ? void 0 : _d.compositionPath : void 0,
|
|
@@ -349,7 +360,9 @@ var withUniformGetStaticProps = (options) => {
|
|
|
349
360
|
}),
|
|
350
361
|
// auto engage draft content when in next preview mode
|
|
351
362
|
// (can override with explicit setting of request options)
|
|
352
|
-
defaultFetchState: context.preview ? CANVAS_DRAFT_STATE3 : void 0
|
|
363
|
+
defaultFetchState: context.preview ? CANVAS_DRAFT_STATE3 : void 0,
|
|
364
|
+
isPreview: context.preview,
|
|
365
|
+
previewReleaseId: (_f = context.previewData) == null ? void 0 : _f.releaseId
|
|
353
366
|
};
|
|
354
367
|
}
|
|
355
368
|
});
|
package/dist/slug/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, GetServerSideProps, GetStaticPropsContext, GetStaticProps } from 'next';
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import { ParsedUrlQuery } from 'querystring';
|
|
3
|
+
import { c as UniformPreviewData, a as UniformGetServerSideProps, b as UniformGetStaticProps } from '../models-BGg_qtcM.mjs';
|
|
4
|
+
import * as node_querystring from 'node:querystring';
|
|
6
5
|
import { CanvasClient, CompositionGetBySlugParameters, DataResolutionOption, CompositionGetParameters, CompositionGetResponse } from '@uniformdev/canvas';
|
|
6
|
+
import { ParsedUrlQuery } from 'querystring';
|
|
7
7
|
import '@uniformdev/canvas-react';
|
|
8
8
|
|
|
9
9
|
declare const withUniformGetServerSideProps: <TProps extends {
|
|
@@ -65,11 +65,11 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
65
65
|
|
|
66
66
|
declare const getServerSideProps: next.GetServerSideProps<{
|
|
67
67
|
[key: string]: any;
|
|
68
|
-
},
|
|
68
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
69
69
|
/** Ready to go getStaticProps for dynamic route with 'slug' param for [[...slug]].jsx */
|
|
70
70
|
declare const getStaticProps: next.GetStaticProps<{
|
|
71
71
|
[key: string]: any;
|
|
72
|
-
},
|
|
72
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
73
73
|
declare const getStaticPaths: () => Promise<{
|
|
74
74
|
paths: string[];
|
|
75
75
|
fallback: boolean;
|
package/dist/slug/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, GetServerSideProps, GetStaticPropsContext, GetStaticProps } from 'next';
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import { ParsedUrlQuery } from 'querystring';
|
|
3
|
+
import { c as UniformPreviewData, a as UniformGetServerSideProps, b as UniformGetStaticProps } from '../models-BGg_qtcM.js';
|
|
4
|
+
import * as node_querystring from 'node:querystring';
|
|
6
5
|
import { CanvasClient, CompositionGetBySlugParameters, DataResolutionOption, CompositionGetParameters, CompositionGetResponse } from '@uniformdev/canvas';
|
|
6
|
+
import { ParsedUrlQuery } from 'querystring';
|
|
7
7
|
import '@uniformdev/canvas-react';
|
|
8
8
|
|
|
9
9
|
declare const withUniformGetServerSideProps: <TProps extends {
|
|
@@ -65,11 +65,11 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
65
65
|
|
|
66
66
|
declare const getServerSideProps: next.GetServerSideProps<{
|
|
67
67
|
[key: string]: any;
|
|
68
|
-
},
|
|
68
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
69
69
|
/** Ready to go getStaticProps for dynamic route with 'slug' param for [[...slug]].jsx */
|
|
70
70
|
declare const getStaticProps: next.GetStaticProps<{
|
|
71
71
|
[key: string]: any;
|
|
72
|
-
},
|
|
72
|
+
}, node_querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
73
73
|
declare const getStaticPaths: () => Promise<{
|
|
74
74
|
paths: string[];
|
|
75
75
|
fallback: boolean;
|
package/dist/slug/index.js
CHANGED
|
@@ -32,6 +32,21 @@ module.exports = __toCommonJS(slug_exports);
|
|
|
32
32
|
// src/slug/withUniformGetServerSideProps.ts
|
|
33
33
|
var import_canvas = require("@uniformdev/canvas");
|
|
34
34
|
|
|
35
|
+
// src/helpers/resolvePreviewReleaseId.ts
|
|
36
|
+
function resolvePreviewReleaseId({
|
|
37
|
+
explicitReleaseId,
|
|
38
|
+
isPreview,
|
|
39
|
+
previewReleaseId
|
|
40
|
+
}) {
|
|
41
|
+
if (typeof explicitReleaseId !== "undefined") {
|
|
42
|
+
return explicitReleaseId;
|
|
43
|
+
}
|
|
44
|
+
if (!isPreview) {
|
|
45
|
+
return void 0;
|
|
46
|
+
}
|
|
47
|
+
return previewReleaseId;
|
|
48
|
+
}
|
|
49
|
+
|
|
35
50
|
// src/logging/logCompositionIssues.ts
|
|
36
51
|
var import_colorette = require("colorette");
|
|
37
52
|
function logCompositionIssues(prefix, issues, colour = "red") {
|
|
@@ -144,15 +159,20 @@ var withUniformGetServerSideProps = (options) => {
|
|
|
144
159
|
edgeApiHost: process.env.UNIFORM_CLI_BASE_EDGE_URL
|
|
145
160
|
});
|
|
146
161
|
return async function wrappedGetServerSideProps(context) {
|
|
147
|
-
var _a;
|
|
162
|
+
var _a, _b;
|
|
148
163
|
const { preview, previewData } = context;
|
|
164
|
+
const releaseId = resolvePreviewReleaseId({
|
|
165
|
+
explicitReleaseId: (_a = options == null ? void 0 : options.requestOptions) == null ? void 0 : _a.releaseId,
|
|
166
|
+
isPreview: preview || (options == null ? void 0 : options.preview),
|
|
167
|
+
previewReleaseId: previewData == null ? void 0 : previewData.releaseId
|
|
168
|
+
});
|
|
149
169
|
let composition = void 0;
|
|
150
170
|
let slug = (options == null ? void 0 : options.prefix) ? context.resolvedUrl.replace(new RegExp(`^${options.prefix}`), "") : context.resolvedUrl;
|
|
151
171
|
if (options == null ? void 0 : options.modifySlug) {
|
|
152
172
|
slug = options.modifySlug(slug, context);
|
|
153
173
|
}
|
|
154
174
|
if (previewData == null ? void 0 : previewData.isUniformContextualEditing) {
|
|
155
|
-
composition = { ...import_canvas.EMPTY_COMPOSITION, _id: (
|
|
175
|
+
composition = { ...import_canvas.EMPTY_COMPOSITION, _id: (_b = previewData.compositionId) != null ? _b : import_canvas.EMPTY_COMPOSITION._id };
|
|
156
176
|
} else {
|
|
157
177
|
try {
|
|
158
178
|
const time = Date.now();
|
|
@@ -160,7 +180,8 @@ var withUniformGetServerSideProps = (options) => {
|
|
|
160
180
|
...options == null ? void 0 : options.requestOptions,
|
|
161
181
|
slug,
|
|
162
182
|
state: preview || (options == null ? void 0 : options.preview) ? import_canvas.CANVAS_DRAFT_STATE : import_canvas.CANVAS_PUBLISHED_STATE,
|
|
163
|
-
diagnostics: true
|
|
183
|
+
diagnostics: true,
|
|
184
|
+
releaseId
|
|
164
185
|
});
|
|
165
186
|
const duration = Date.now() - time;
|
|
166
187
|
composition = response.composition;
|
|
@@ -233,7 +254,7 @@ var withUniformGetStaticProps = (options) => {
|
|
|
233
254
|
edgeApiHost: process.env.UNIFORM_CLI_BASE_EDGE_URL
|
|
234
255
|
});
|
|
235
256
|
return async function wrappedGetStaticProps(context) {
|
|
236
|
-
var _a2;
|
|
257
|
+
var _a2, _b;
|
|
237
258
|
let slugString = resolveSlugFromParams({
|
|
238
259
|
param: options == null ? void 0 : options.param,
|
|
239
260
|
params: context == null ? void 0 : context.params
|
|
@@ -242,16 +263,22 @@ var withUniformGetStaticProps = (options) => {
|
|
|
242
263
|
slugString = options.modifySlug(slugString, context);
|
|
243
264
|
}
|
|
244
265
|
const { preview, previewData } = context;
|
|
266
|
+
const releaseId = resolvePreviewReleaseId({
|
|
267
|
+
explicitReleaseId: (_a2 = options == null ? void 0 : options.requestOptions) == null ? void 0 : _a2.releaseId,
|
|
268
|
+
isPreview: preview || (options == null ? void 0 : options.preview),
|
|
269
|
+
previewReleaseId: previewData == null ? void 0 : previewData.releaseId
|
|
270
|
+
});
|
|
245
271
|
let composition = void 0;
|
|
246
272
|
if (previewData == null ? void 0 : previewData.isUniformContextualEditing) {
|
|
247
|
-
composition = { ...import_canvas3.EMPTY_COMPOSITION, _id: (
|
|
273
|
+
composition = { ...import_canvas3.EMPTY_COMPOSITION, _id: (_b = previewData.compositionId) != null ? _b : import_canvas3.EMPTY_COMPOSITION._id };
|
|
248
274
|
} else {
|
|
249
275
|
try {
|
|
250
276
|
const time = Date.now();
|
|
251
277
|
const response = await canvasClient.getCompositionBySlug({
|
|
252
278
|
slug: slugString,
|
|
253
279
|
state: preview || (options == null ? void 0 : options.preview) ? import_canvas3.CANVAS_DRAFT_STATE : import_canvas3.CANVAS_PUBLISHED_STATE,
|
|
254
|
-
...options == null ? void 0 : options.requestOptions
|
|
280
|
+
...options == null ? void 0 : options.requestOptions,
|
|
281
|
+
releaseId
|
|
255
282
|
});
|
|
256
283
|
const duration = Date.now() - time;
|
|
257
284
|
composition = response.composition;
|
package/dist/slug/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
logCompositionResponse
|
|
3
|
-
|
|
2
|
+
logCompositionResponse,
|
|
3
|
+
resolvePreviewReleaseId
|
|
4
|
+
} from "../chunk-4YXXKXP3.mjs";
|
|
4
5
|
import {
|
|
5
6
|
resolveSlugFromParams
|
|
6
7
|
} from "../chunk-TR7V6ABJ.mjs";
|
|
@@ -20,15 +21,20 @@ var withUniformGetServerSideProps = (options) => {
|
|
|
20
21
|
edgeApiHost: process.env.UNIFORM_CLI_BASE_EDGE_URL
|
|
21
22
|
});
|
|
22
23
|
return async function wrappedGetServerSideProps(context) {
|
|
23
|
-
var _a;
|
|
24
|
+
var _a, _b;
|
|
24
25
|
const { preview, previewData } = context;
|
|
26
|
+
const releaseId = resolvePreviewReleaseId({
|
|
27
|
+
explicitReleaseId: (_a = options == null ? void 0 : options.requestOptions) == null ? void 0 : _a.releaseId,
|
|
28
|
+
isPreview: preview || (options == null ? void 0 : options.preview),
|
|
29
|
+
previewReleaseId: previewData == null ? void 0 : previewData.releaseId
|
|
30
|
+
});
|
|
25
31
|
let composition = void 0;
|
|
26
32
|
let slug = (options == null ? void 0 : options.prefix) ? context.resolvedUrl.replace(new RegExp(`^${options.prefix}`), "") : context.resolvedUrl;
|
|
27
33
|
if (options == null ? void 0 : options.modifySlug) {
|
|
28
34
|
slug = options.modifySlug(slug, context);
|
|
29
35
|
}
|
|
30
36
|
if (previewData == null ? void 0 : previewData.isUniformContextualEditing) {
|
|
31
|
-
composition = { ...EMPTY_COMPOSITION, _id: (
|
|
37
|
+
composition = { ...EMPTY_COMPOSITION, _id: (_b = previewData.compositionId) != null ? _b : EMPTY_COMPOSITION._id };
|
|
32
38
|
} else {
|
|
33
39
|
try {
|
|
34
40
|
const time = Date.now();
|
|
@@ -36,7 +42,8 @@ var withUniformGetServerSideProps = (options) => {
|
|
|
36
42
|
...options == null ? void 0 : options.requestOptions,
|
|
37
43
|
slug,
|
|
38
44
|
state: preview || (options == null ? void 0 : options.preview) ? CANVAS_DRAFT_STATE : CANVAS_PUBLISHED_STATE,
|
|
39
|
-
diagnostics: true
|
|
45
|
+
diagnostics: true,
|
|
46
|
+
releaseId
|
|
40
47
|
});
|
|
41
48
|
const duration = Date.now() - time;
|
|
42
49
|
composition = response.composition;
|
|
@@ -106,7 +113,7 @@ var withUniformGetStaticProps = (options) => {
|
|
|
106
113
|
edgeApiHost: process.env.UNIFORM_CLI_BASE_EDGE_URL
|
|
107
114
|
});
|
|
108
115
|
return async function wrappedGetStaticProps(context) {
|
|
109
|
-
var _a2;
|
|
116
|
+
var _a2, _b;
|
|
110
117
|
let slugString = resolveSlugFromParams({
|
|
111
118
|
param: options == null ? void 0 : options.param,
|
|
112
119
|
params: context == null ? void 0 : context.params
|
|
@@ -115,16 +122,22 @@ var withUniformGetStaticProps = (options) => {
|
|
|
115
122
|
slugString = options.modifySlug(slugString, context);
|
|
116
123
|
}
|
|
117
124
|
const { preview, previewData } = context;
|
|
125
|
+
const releaseId = resolvePreviewReleaseId({
|
|
126
|
+
explicitReleaseId: (_a2 = options == null ? void 0 : options.requestOptions) == null ? void 0 : _a2.releaseId,
|
|
127
|
+
isPreview: preview || (options == null ? void 0 : options.preview),
|
|
128
|
+
previewReleaseId: previewData == null ? void 0 : previewData.releaseId
|
|
129
|
+
});
|
|
118
130
|
let composition = void 0;
|
|
119
131
|
if (previewData == null ? void 0 : previewData.isUniformContextualEditing) {
|
|
120
|
-
composition = { ...EMPTY_COMPOSITION2, _id: (
|
|
132
|
+
composition = { ...EMPTY_COMPOSITION2, _id: (_b = previewData.compositionId) != null ? _b : EMPTY_COMPOSITION2._id };
|
|
121
133
|
} else {
|
|
122
134
|
try {
|
|
123
135
|
const time = Date.now();
|
|
124
136
|
const response = await canvasClient.getCompositionBySlug({
|
|
125
137
|
slug: slugString,
|
|
126
138
|
state: preview || (options == null ? void 0 : options.preview) ? CANVAS_DRAFT_STATE3 : CANVAS_PUBLISHED_STATE3,
|
|
127
|
-
...options == null ? void 0 : options.requestOptions
|
|
139
|
+
...options == null ? void 0 : options.requestOptions,
|
|
140
|
+
releaseId
|
|
128
141
|
});
|
|
129
142
|
const duration = Date.now() - time;
|
|
130
143
|
composition = response.composition;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-next",
|
|
3
|
-
"version": "20.49.
|
|
3
|
+
"version": "20.49.3-alpha.47+9aed70a64d",
|
|
4
4
|
"description": "Next.js SDK for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -61,18 +61,17 @@
|
|
|
61
61
|
"build": "tsup",
|
|
62
62
|
"dev": "tsup --watch",
|
|
63
63
|
"clean": "rimraf dist",
|
|
64
|
-
"test": "
|
|
65
|
-
"lint": "eslint \"src/**/*.{js,ts,tsx}\"",
|
|
64
|
+
"test": "vitest run",
|
|
66
65
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
|
|
67
|
-
"
|
|
66
|
+
"apidocs-extract": "api-extractor run --local"
|
|
68
67
|
},
|
|
69
68
|
"dependencies": {
|
|
70
|
-
"@uniformdev/canvas": "20.49.
|
|
71
|
-
"@uniformdev/canvas-react": "20.49.
|
|
72
|
-
"@uniformdev/context": "20.49.
|
|
73
|
-
"@uniformdev/project-map": "20.49.
|
|
74
|
-
"@uniformdev/redirect": "20.49.
|
|
75
|
-
"@uniformdev/richtext": "20.49.
|
|
69
|
+
"@uniformdev/canvas": "20.49.3-alpha.47+9aed70a64d",
|
|
70
|
+
"@uniformdev/canvas-react": "20.49.3-alpha.47+9aed70a64d",
|
|
71
|
+
"@uniformdev/context": "20.49.3-alpha.47+9aed70a64d",
|
|
72
|
+
"@uniformdev/project-map": "20.49.3-alpha.47+9aed70a64d",
|
|
73
|
+
"@uniformdev/redirect": "20.49.3-alpha.47+9aed70a64d",
|
|
74
|
+
"@uniformdev/richtext": "20.49.3-alpha.47+9aed70a64d",
|
|
76
75
|
"colorette": "2.0.20"
|
|
77
76
|
},
|
|
78
77
|
"peerDependencies": {
|
|
@@ -81,8 +80,8 @@
|
|
|
81
80
|
"react-dom": ">=16"
|
|
82
81
|
},
|
|
83
82
|
"devDependencies": {
|
|
84
|
-
"@types/react": "19.2.
|
|
85
|
-
"next": "16.
|
|
83
|
+
"@types/react": "19.2.17",
|
|
84
|
+
"next": "16.2.9",
|
|
86
85
|
"react": "19.2.1",
|
|
87
86
|
"react-dom": "19.2.1"
|
|
88
87
|
},
|
|
@@ -92,5 +91,5 @@
|
|
|
92
91
|
"publishConfig": {
|
|
93
92
|
"access": "public"
|
|
94
93
|
},
|
|
95
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "9aed70a64de0ca177d27ea99dc25f1ad053f87ad"
|
|
96
95
|
}
|