@uniformdev/canvas-next 19.79.1-alpha.11 → 19.79.1-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +19 -8
- package/dist/index.js +19 -8
- package/dist/index.mjs +19 -8
- package/dist/{models-f9fd03c4.d.ts → models--s4UGr5M.d.mts} +1 -1
- package/dist/models--s4UGr5M.d.ts +26 -0
- package/dist/project-map/index.d.mts +41 -4
- package/dist/project-map/index.d.ts +41 -4
- package/dist/project-map/index.mjs +156 -9
- package/dist/route/index.d.mts +113 -14
- package/dist/route/index.d.ts +113 -14
- package/dist/route/index.js +104 -178
- package/dist/route/index.mjs +82 -17
- package/dist/slug/index.d.mts +3 -1
- package/dist/slug/index.d.ts +3 -1
- package/package.json +8 -8
- package/dist/chunk-ZLQ2WCJC.mjs +0 -166
- package/dist/withUniformGetStaticPaths-77db0164.d.ts +0 -39
package/dist/route/index.d.mts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, GetServerSidePropsResult, GetServerSideProps, GetStaticPropsContext, GetStaticPropsResult, GetStaticProps } from 'next';
|
|
3
|
-
import { a as UniformPreviewData } from '../models
|
|
3
|
+
import { a as UniformPreviewData } from '../models--s4UGr5M.mjs';
|
|
4
4
|
import * as querystring from 'querystring';
|
|
5
5
|
import { ParsedUrlQuery } from 'querystring';
|
|
6
|
-
export { w as withUniformGetStaticPaths } from '../withUniformGetStaticPaths-77db0164.js';
|
|
7
6
|
import { RouteGetResponseEdgehancedComposition, RouteGetResponseNotFound, RouteGetResponseRedirect, RouteClient, RouteGetParameters, RootComponentInstance } from '@uniformdev/canvas';
|
|
7
|
+
import { ProjectMapNodeGetResponse, ProjectMapClient } from '@uniformdev/project-map';
|
|
8
|
+
import { RedirectClient } from '@uniformdev/redirect';
|
|
9
|
+
import { GetStaticPropsContext as GetStaticPropsContext$1, GetServerSidePropsContext as GetServerSidePropsContext$1 } from 'next/types';
|
|
8
10
|
import '@uniformdev/canvas-react';
|
|
9
|
-
import '@uniformdev/project-map';
|
|
10
11
|
|
|
11
12
|
type HandleRouteCompositionFunction<TContext, TResult> = (composition: RouteGetResponseEdgehancedComposition, context: TContext, defaultHandler: (composition: RouteGetResponseEdgehancedComposition) => Promise<TResult | null> | TResult | null, duration: number) => Promise<TResult | null> | TResult | null;
|
|
12
13
|
type HandleRouteNotFoundFunction<TContext, TResult> = (result: RouteGetResponseNotFound, context: TContext, defaultHandler: (result: RouteGetResponseNotFound) => TResult, duration: number) => TResult;
|
|
@@ -46,6 +47,44 @@ declare const withUniformGetServerSideProps: <TProps extends {
|
|
|
46
47
|
data: RootComponentInstance;
|
|
47
48
|
}>(options?: RouteHandlerOptions<GetServerSidePropsContext<ParsedUrlQuery, UniformPreviewData>, GetServerSidePropsResult<never>, GetServerSidePropsResult<TProps>> | undefined) => GetServerSideProps<TProps, ParsedUrlQuery, UniformPreviewData>;
|
|
48
49
|
|
|
50
|
+
declare const withUniformGetStaticPaths: (options?: {
|
|
51
|
+
projectMapId?: string | undefined;
|
|
52
|
+
/** Starting path to fetch nodes from */
|
|
53
|
+
rootPath?: string | undefined;
|
|
54
|
+
/** A string that you want prepended to paths returned by your project map. Useful when calling from a nested folder which is not part of your project map structure */
|
|
55
|
+
prefix?: string | undefined;
|
|
56
|
+
/** Set to true if you want to include draft compositions */
|
|
57
|
+
preview?: boolean | undefined;
|
|
58
|
+
/** Way to override getNodes request params */
|
|
59
|
+
requestOptions?: Partial<{
|
|
60
|
+
projectMapId?: string | undefined;
|
|
61
|
+
projectId: string;
|
|
62
|
+
id?: string | undefined;
|
|
63
|
+
path?: string | undefined;
|
|
64
|
+
compositionId?: string | undefined;
|
|
65
|
+
limit?: number | undefined;
|
|
66
|
+
offset?: number | undefined;
|
|
67
|
+
depth?: number | undefined;
|
|
68
|
+
state?: number | undefined;
|
|
69
|
+
tree?: boolean | undefined;
|
|
70
|
+
search?: string | undefined;
|
|
71
|
+
includeAncestors?: boolean | undefined;
|
|
72
|
+
expanded?: boolean | undefined;
|
|
73
|
+
withCompositionData?: boolean | undefined;
|
|
74
|
+
withCompositionUIStatus?: boolean | undefined;
|
|
75
|
+
withRedirectData?: boolean | undefined;
|
|
76
|
+
}> | undefined;
|
|
77
|
+
/** Way to modify list of nodes before building array of paths */
|
|
78
|
+
callback?: ((nodes: ProjectMapNodeGetResponse['nodes']) => Promise<ProjectMapNodeGetResponse['nodes']>) | undefined;
|
|
79
|
+
/** If you need to override the default client, you can pass it here */
|
|
80
|
+
client?: ProjectMapClient | undefined;
|
|
81
|
+
/** If you need to override the default redirect client, you can pass it here */
|
|
82
|
+
redirectClient?: RedirectClient | undefined;
|
|
83
|
+
} | undefined) => () => Promise<{
|
|
84
|
+
paths: string[];
|
|
85
|
+
fallback: boolean;
|
|
86
|
+
}>;
|
|
87
|
+
|
|
49
88
|
/**
|
|
50
89
|
* Creates an implementation of `getStaticProps` using the Uniform Route API.
|
|
51
90
|
* Static and dynamic routing as well as redirection is automatically supported.
|
|
@@ -60,6 +99,17 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
60
99
|
param?: string | undefined;
|
|
61
100
|
}) | undefined) => GetStaticProps<TProps, ParsedUrlQuery, UniformPreviewData>;
|
|
62
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Prepends correct locale to the path before sending it to Uniform Route API.
|
|
104
|
+
*
|
|
105
|
+
* Recommended default callback for `options.modifyPath` in `withUniformGetStaticProps` and `withUniformGetServerSideProps`.
|
|
106
|
+
* Should be used together with Next.js Internationalization Routing.
|
|
107
|
+
*
|
|
108
|
+
* @see https://nextjs.org/docs/pages/building-your-application/routing/internationalization
|
|
109
|
+
* @see https://docs.uniform.app/docs/guides/composition/localization#enable-localization-on-your-frontend-application
|
|
110
|
+
*/
|
|
111
|
+
declare const prependLocale: (path: string, { locale, defaultLocale, locales }: GetStaticPropsContext$1 | GetServerSidePropsContext$1) => string;
|
|
112
|
+
|
|
63
113
|
/**
|
|
64
114
|
* Default implementation of getServerSideProps with routes
|
|
65
115
|
* To configure custom behavior, use:
|
|
@@ -70,12 +120,15 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
70
120
|
type: string;
|
|
71
121
|
parameters?: {
|
|
72
122
|
[key: string]: {
|
|
73
|
-
value
|
|
123
|
+
value?: unknown;
|
|
74
124
|
type: string;
|
|
75
125
|
connectedData?: {
|
|
76
126
|
pointer: string;
|
|
77
127
|
syntax: "jptr";
|
|
78
128
|
} | undefined;
|
|
129
|
+
locales?: {
|
|
130
|
+
[key: string]: unknown;
|
|
131
|
+
} | undefined;
|
|
79
132
|
};
|
|
80
133
|
} | undefined;
|
|
81
134
|
variant?: string | undefined;
|
|
@@ -89,12 +142,15 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
89
142
|
type: string;
|
|
90
143
|
parameters?: {
|
|
91
144
|
[key: string]: {
|
|
92
|
-
value
|
|
145
|
+
value?: unknown;
|
|
93
146
|
type: string;
|
|
94
147
|
connectedData?: {
|
|
95
148
|
pointer: string;
|
|
96
149
|
syntax: "jptr";
|
|
97
150
|
} | undefined;
|
|
151
|
+
locales?: {
|
|
152
|
+
[key: string]: unknown;
|
|
153
|
+
} | undefined;
|
|
98
154
|
};
|
|
99
155
|
} | undefined;
|
|
100
156
|
variant?: string | undefined;
|
|
@@ -128,12 +184,15 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
128
184
|
[key: string]: {
|
|
129
185
|
parameters?: {
|
|
130
186
|
[key: string]: {
|
|
131
|
-
value
|
|
187
|
+
value?: unknown;
|
|
132
188
|
type: string;
|
|
133
189
|
connectedData?: {
|
|
134
190
|
pointer: string;
|
|
135
191
|
syntax: "jptr";
|
|
136
192
|
} | undefined;
|
|
193
|
+
locales?: {
|
|
194
|
+
[key: string]: unknown;
|
|
195
|
+
} | undefined;
|
|
137
196
|
};
|
|
138
197
|
} | undefined;
|
|
139
198
|
variant?: string | undefined;
|
|
@@ -145,11 +204,23 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
145
204
|
} | undefined;
|
|
146
205
|
variants?: boolean | undefined;
|
|
147
206
|
} | undefined;
|
|
207
|
+
_locales?: string[] | undefined;
|
|
148
208
|
}[];
|
|
149
209
|
} | undefined;
|
|
150
210
|
_id: string;
|
|
151
211
|
_slug?: string | null | undefined;
|
|
152
212
|
_name: string;
|
|
213
|
+
_pattern?: string | undefined;
|
|
214
|
+
_patternDataResources?: {
|
|
215
|
+
[key: string]: {
|
|
216
|
+
type: string;
|
|
217
|
+
isPatternParameter?: boolean | undefined;
|
|
218
|
+
ignorePatternParameterDefault?: boolean | undefined;
|
|
219
|
+
variables?: {
|
|
220
|
+
[key: string]: string;
|
|
221
|
+
} | undefined;
|
|
222
|
+
};
|
|
223
|
+
} | undefined;
|
|
153
224
|
_dataResources?: {
|
|
154
225
|
[key: string]: {
|
|
155
226
|
type: string;
|
|
@@ -164,12 +235,15 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
164
235
|
[key: string]: {
|
|
165
236
|
parameters?: {
|
|
166
237
|
[key: string]: {
|
|
167
|
-
value
|
|
238
|
+
value?: unknown;
|
|
168
239
|
type: string;
|
|
169
240
|
connectedData?: {
|
|
170
241
|
pointer: string;
|
|
171
242
|
syntax: "jptr";
|
|
172
243
|
} | undefined;
|
|
244
|
+
locales?: {
|
|
245
|
+
[key: string]: unknown;
|
|
246
|
+
} | undefined;
|
|
173
247
|
};
|
|
174
248
|
} | undefined;
|
|
175
249
|
variant?: string | undefined;
|
|
@@ -181,9 +255,9 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
181
255
|
} | undefined;
|
|
182
256
|
variants?: boolean | undefined;
|
|
183
257
|
} | undefined;
|
|
258
|
+
_locales?: string[] | undefined;
|
|
184
259
|
};
|
|
185
260
|
}, querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
186
|
-
|
|
187
261
|
/**
|
|
188
262
|
* Default implementation of getStaticProps with routes
|
|
189
263
|
* To configure custom behavior, use:
|
|
@@ -194,12 +268,15 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
194
268
|
type: string;
|
|
195
269
|
parameters?: {
|
|
196
270
|
[key: string]: {
|
|
197
|
-
value
|
|
271
|
+
value?: unknown;
|
|
198
272
|
type: string;
|
|
199
273
|
connectedData?: {
|
|
200
274
|
pointer: string;
|
|
201
275
|
syntax: "jptr";
|
|
202
276
|
} | undefined;
|
|
277
|
+
locales?: {
|
|
278
|
+
[key: string]: unknown;
|
|
279
|
+
} | undefined;
|
|
203
280
|
};
|
|
204
281
|
} | undefined;
|
|
205
282
|
variant?: string | undefined;
|
|
@@ -213,12 +290,15 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
213
290
|
type: string;
|
|
214
291
|
parameters?: {
|
|
215
292
|
[key: string]: {
|
|
216
|
-
value
|
|
293
|
+
value?: unknown;
|
|
217
294
|
type: string;
|
|
218
295
|
connectedData?: {
|
|
219
296
|
pointer: string;
|
|
220
297
|
syntax: "jptr";
|
|
221
298
|
} | undefined;
|
|
299
|
+
locales?: {
|
|
300
|
+
[key: string]: unknown;
|
|
301
|
+
} | undefined;
|
|
222
302
|
};
|
|
223
303
|
} | undefined;
|
|
224
304
|
variant?: string | undefined;
|
|
@@ -252,12 +332,15 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
252
332
|
[key: string]: {
|
|
253
333
|
parameters?: {
|
|
254
334
|
[key: string]: {
|
|
255
|
-
value
|
|
335
|
+
value?: unknown;
|
|
256
336
|
type: string;
|
|
257
337
|
connectedData?: {
|
|
258
338
|
pointer: string;
|
|
259
339
|
syntax: "jptr";
|
|
260
340
|
} | undefined;
|
|
341
|
+
locales?: {
|
|
342
|
+
[key: string]: unknown;
|
|
343
|
+
} | undefined;
|
|
261
344
|
};
|
|
262
345
|
} | undefined;
|
|
263
346
|
variant?: string | undefined;
|
|
@@ -269,11 +352,23 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
269
352
|
} | undefined;
|
|
270
353
|
variants?: boolean | undefined;
|
|
271
354
|
} | undefined;
|
|
355
|
+
_locales?: string[] | undefined;
|
|
272
356
|
}[];
|
|
273
357
|
} | undefined;
|
|
274
358
|
_id: string;
|
|
275
359
|
_slug?: string | null | undefined;
|
|
276
360
|
_name: string;
|
|
361
|
+
_pattern?: string | undefined;
|
|
362
|
+
_patternDataResources?: {
|
|
363
|
+
[key: string]: {
|
|
364
|
+
type: string;
|
|
365
|
+
isPatternParameter?: boolean | undefined;
|
|
366
|
+
ignorePatternParameterDefault?: boolean | undefined;
|
|
367
|
+
variables?: {
|
|
368
|
+
[key: string]: string;
|
|
369
|
+
} | undefined;
|
|
370
|
+
};
|
|
371
|
+
} | undefined;
|
|
277
372
|
_dataResources?: {
|
|
278
373
|
[key: string]: {
|
|
279
374
|
type: string;
|
|
@@ -288,12 +383,15 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
288
383
|
[key: string]: {
|
|
289
384
|
parameters?: {
|
|
290
385
|
[key: string]: {
|
|
291
|
-
value
|
|
386
|
+
value?: unknown;
|
|
292
387
|
type: string;
|
|
293
388
|
connectedData?: {
|
|
294
389
|
pointer: string;
|
|
295
390
|
syntax: "jptr";
|
|
296
391
|
} | undefined;
|
|
392
|
+
locales?: {
|
|
393
|
+
[key: string]: unknown;
|
|
394
|
+
} | undefined;
|
|
297
395
|
};
|
|
298
396
|
} | undefined;
|
|
299
397
|
variant?: string | undefined;
|
|
@@ -305,6 +403,7 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
305
403
|
} | undefined;
|
|
306
404
|
variants?: boolean | undefined;
|
|
307
405
|
} | undefined;
|
|
406
|
+
_locales?: string[] | undefined;
|
|
308
407
|
};
|
|
309
408
|
}, querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
310
409
|
/**
|
|
@@ -315,8 +414,8 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
315
414
|
* NOTE: fallback must be supported. You cannot generate static paths for dynamic routes which contain query parameters.
|
|
316
415
|
*/
|
|
317
416
|
declare const getStaticPaths: () => Promise<{
|
|
318
|
-
paths: string[]
|
|
417
|
+
paths: string[];
|
|
319
418
|
fallback: boolean;
|
|
320
419
|
}>;
|
|
321
420
|
|
|
322
|
-
export { HandleRouteCompositionFunction, HandleRouteNotFoundFunction, HandleRouteRedirectFunction, RouteHandlerOptions, getServerSideProps, getStaticPaths, getStaticProps, withUniformGetServerSideProps, withUniformGetStaticProps };
|
|
421
|
+
export { type HandleRouteCompositionFunction, type HandleRouteNotFoundFunction, type HandleRouteRedirectFunction, type RouteHandlerOptions, getServerSideProps, getStaticPaths, getStaticProps, prependLocale, withUniformGetServerSideProps, withUniformGetStaticPaths, withUniformGetStaticProps };
|
package/dist/route/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, GetServerSidePropsResult, GetServerSideProps, GetStaticPropsContext, GetStaticPropsResult, GetStaticProps } from 'next';
|
|
3
|
-
import { a as UniformPreviewData } from '../models
|
|
3
|
+
import { a as UniformPreviewData } from '../models--s4UGr5M.js';
|
|
4
4
|
import * as querystring from 'querystring';
|
|
5
5
|
import { ParsedUrlQuery } from 'querystring';
|
|
6
|
-
export { w as withUniformGetStaticPaths } from '../withUniformGetStaticPaths-77db0164.js';
|
|
7
6
|
import { RouteGetResponseEdgehancedComposition, RouteGetResponseNotFound, RouteGetResponseRedirect, RouteClient, RouteGetParameters, RootComponentInstance } from '@uniformdev/canvas';
|
|
7
|
+
import { ProjectMapNodeGetResponse, ProjectMapClient } from '@uniformdev/project-map';
|
|
8
|
+
import { RedirectClient } from '@uniformdev/redirect';
|
|
9
|
+
import { GetStaticPropsContext as GetStaticPropsContext$1, GetServerSidePropsContext as GetServerSidePropsContext$1 } from 'next/types';
|
|
8
10
|
import '@uniformdev/canvas-react';
|
|
9
|
-
import '@uniformdev/project-map';
|
|
10
11
|
|
|
11
12
|
type HandleRouteCompositionFunction<TContext, TResult> = (composition: RouteGetResponseEdgehancedComposition, context: TContext, defaultHandler: (composition: RouteGetResponseEdgehancedComposition) => Promise<TResult | null> | TResult | null, duration: number) => Promise<TResult | null> | TResult | null;
|
|
12
13
|
type HandleRouteNotFoundFunction<TContext, TResult> = (result: RouteGetResponseNotFound, context: TContext, defaultHandler: (result: RouteGetResponseNotFound) => TResult, duration: number) => TResult;
|
|
@@ -46,6 +47,44 @@ declare const withUniformGetServerSideProps: <TProps extends {
|
|
|
46
47
|
data: RootComponentInstance;
|
|
47
48
|
}>(options?: RouteHandlerOptions<GetServerSidePropsContext<ParsedUrlQuery, UniformPreviewData>, GetServerSidePropsResult<never>, GetServerSidePropsResult<TProps>> | undefined) => GetServerSideProps<TProps, ParsedUrlQuery, UniformPreviewData>;
|
|
48
49
|
|
|
50
|
+
declare const withUniformGetStaticPaths: (options?: {
|
|
51
|
+
projectMapId?: string | undefined;
|
|
52
|
+
/** Starting path to fetch nodes from */
|
|
53
|
+
rootPath?: string | undefined;
|
|
54
|
+
/** A string that you want prepended to paths returned by your project map. Useful when calling from a nested folder which is not part of your project map structure */
|
|
55
|
+
prefix?: string | undefined;
|
|
56
|
+
/** Set to true if you want to include draft compositions */
|
|
57
|
+
preview?: boolean | undefined;
|
|
58
|
+
/** Way to override getNodes request params */
|
|
59
|
+
requestOptions?: Partial<{
|
|
60
|
+
projectMapId?: string | undefined;
|
|
61
|
+
projectId: string;
|
|
62
|
+
id?: string | undefined;
|
|
63
|
+
path?: string | undefined;
|
|
64
|
+
compositionId?: string | undefined;
|
|
65
|
+
limit?: number | undefined;
|
|
66
|
+
offset?: number | undefined;
|
|
67
|
+
depth?: number | undefined;
|
|
68
|
+
state?: number | undefined;
|
|
69
|
+
tree?: boolean | undefined;
|
|
70
|
+
search?: string | undefined;
|
|
71
|
+
includeAncestors?: boolean | undefined;
|
|
72
|
+
expanded?: boolean | undefined;
|
|
73
|
+
withCompositionData?: boolean | undefined;
|
|
74
|
+
withCompositionUIStatus?: boolean | undefined;
|
|
75
|
+
withRedirectData?: boolean | undefined;
|
|
76
|
+
}> | undefined;
|
|
77
|
+
/** Way to modify list of nodes before building array of paths */
|
|
78
|
+
callback?: ((nodes: ProjectMapNodeGetResponse['nodes']) => Promise<ProjectMapNodeGetResponse['nodes']>) | undefined;
|
|
79
|
+
/** If you need to override the default client, you can pass it here */
|
|
80
|
+
client?: ProjectMapClient | undefined;
|
|
81
|
+
/** If you need to override the default redirect client, you can pass it here */
|
|
82
|
+
redirectClient?: RedirectClient | undefined;
|
|
83
|
+
} | undefined) => () => Promise<{
|
|
84
|
+
paths: string[];
|
|
85
|
+
fallback: boolean;
|
|
86
|
+
}>;
|
|
87
|
+
|
|
49
88
|
/**
|
|
50
89
|
* Creates an implementation of `getStaticProps` using the Uniform Route API.
|
|
51
90
|
* Static and dynamic routing as well as redirection is automatically supported.
|
|
@@ -60,6 +99,17 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
60
99
|
param?: string | undefined;
|
|
61
100
|
}) | undefined) => GetStaticProps<TProps, ParsedUrlQuery, UniformPreviewData>;
|
|
62
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Prepends correct locale to the path before sending it to Uniform Route API.
|
|
104
|
+
*
|
|
105
|
+
* Recommended default callback for `options.modifyPath` in `withUniformGetStaticProps` and `withUniformGetServerSideProps`.
|
|
106
|
+
* Should be used together with Next.js Internationalization Routing.
|
|
107
|
+
*
|
|
108
|
+
* @see https://nextjs.org/docs/pages/building-your-application/routing/internationalization
|
|
109
|
+
* @see https://docs.uniform.app/docs/guides/composition/localization#enable-localization-on-your-frontend-application
|
|
110
|
+
*/
|
|
111
|
+
declare const prependLocale: (path: string, { locale, defaultLocale, locales }: GetStaticPropsContext$1 | GetServerSidePropsContext$1) => string;
|
|
112
|
+
|
|
63
113
|
/**
|
|
64
114
|
* Default implementation of getServerSideProps with routes
|
|
65
115
|
* To configure custom behavior, use:
|
|
@@ -70,12 +120,15 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
70
120
|
type: string;
|
|
71
121
|
parameters?: {
|
|
72
122
|
[key: string]: {
|
|
73
|
-
value
|
|
123
|
+
value?: unknown;
|
|
74
124
|
type: string;
|
|
75
125
|
connectedData?: {
|
|
76
126
|
pointer: string;
|
|
77
127
|
syntax: "jptr";
|
|
78
128
|
} | undefined;
|
|
129
|
+
locales?: {
|
|
130
|
+
[key: string]: unknown;
|
|
131
|
+
} | undefined;
|
|
79
132
|
};
|
|
80
133
|
} | undefined;
|
|
81
134
|
variant?: string | undefined;
|
|
@@ -89,12 +142,15 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
89
142
|
type: string;
|
|
90
143
|
parameters?: {
|
|
91
144
|
[key: string]: {
|
|
92
|
-
value
|
|
145
|
+
value?: unknown;
|
|
93
146
|
type: string;
|
|
94
147
|
connectedData?: {
|
|
95
148
|
pointer: string;
|
|
96
149
|
syntax: "jptr";
|
|
97
150
|
} | undefined;
|
|
151
|
+
locales?: {
|
|
152
|
+
[key: string]: unknown;
|
|
153
|
+
} | undefined;
|
|
98
154
|
};
|
|
99
155
|
} | undefined;
|
|
100
156
|
variant?: string | undefined;
|
|
@@ -128,12 +184,15 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
128
184
|
[key: string]: {
|
|
129
185
|
parameters?: {
|
|
130
186
|
[key: string]: {
|
|
131
|
-
value
|
|
187
|
+
value?: unknown;
|
|
132
188
|
type: string;
|
|
133
189
|
connectedData?: {
|
|
134
190
|
pointer: string;
|
|
135
191
|
syntax: "jptr";
|
|
136
192
|
} | undefined;
|
|
193
|
+
locales?: {
|
|
194
|
+
[key: string]: unknown;
|
|
195
|
+
} | undefined;
|
|
137
196
|
};
|
|
138
197
|
} | undefined;
|
|
139
198
|
variant?: string | undefined;
|
|
@@ -145,11 +204,23 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
145
204
|
} | undefined;
|
|
146
205
|
variants?: boolean | undefined;
|
|
147
206
|
} | undefined;
|
|
207
|
+
_locales?: string[] | undefined;
|
|
148
208
|
}[];
|
|
149
209
|
} | undefined;
|
|
150
210
|
_id: string;
|
|
151
211
|
_slug?: string | null | undefined;
|
|
152
212
|
_name: string;
|
|
213
|
+
_pattern?: string | undefined;
|
|
214
|
+
_patternDataResources?: {
|
|
215
|
+
[key: string]: {
|
|
216
|
+
type: string;
|
|
217
|
+
isPatternParameter?: boolean | undefined;
|
|
218
|
+
ignorePatternParameterDefault?: boolean | undefined;
|
|
219
|
+
variables?: {
|
|
220
|
+
[key: string]: string;
|
|
221
|
+
} | undefined;
|
|
222
|
+
};
|
|
223
|
+
} | undefined;
|
|
153
224
|
_dataResources?: {
|
|
154
225
|
[key: string]: {
|
|
155
226
|
type: string;
|
|
@@ -164,12 +235,15 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
164
235
|
[key: string]: {
|
|
165
236
|
parameters?: {
|
|
166
237
|
[key: string]: {
|
|
167
|
-
value
|
|
238
|
+
value?: unknown;
|
|
168
239
|
type: string;
|
|
169
240
|
connectedData?: {
|
|
170
241
|
pointer: string;
|
|
171
242
|
syntax: "jptr";
|
|
172
243
|
} | undefined;
|
|
244
|
+
locales?: {
|
|
245
|
+
[key: string]: unknown;
|
|
246
|
+
} | undefined;
|
|
173
247
|
};
|
|
174
248
|
} | undefined;
|
|
175
249
|
variant?: string | undefined;
|
|
@@ -181,9 +255,9 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
181
255
|
} | undefined;
|
|
182
256
|
variants?: boolean | undefined;
|
|
183
257
|
} | undefined;
|
|
258
|
+
_locales?: string[] | undefined;
|
|
184
259
|
};
|
|
185
260
|
}, querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
186
|
-
|
|
187
261
|
/**
|
|
188
262
|
* Default implementation of getStaticProps with routes
|
|
189
263
|
* To configure custom behavior, use:
|
|
@@ -194,12 +268,15 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
194
268
|
type: string;
|
|
195
269
|
parameters?: {
|
|
196
270
|
[key: string]: {
|
|
197
|
-
value
|
|
271
|
+
value?: unknown;
|
|
198
272
|
type: string;
|
|
199
273
|
connectedData?: {
|
|
200
274
|
pointer: string;
|
|
201
275
|
syntax: "jptr";
|
|
202
276
|
} | undefined;
|
|
277
|
+
locales?: {
|
|
278
|
+
[key: string]: unknown;
|
|
279
|
+
} | undefined;
|
|
203
280
|
};
|
|
204
281
|
} | undefined;
|
|
205
282
|
variant?: string | undefined;
|
|
@@ -213,12 +290,15 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
213
290
|
type: string;
|
|
214
291
|
parameters?: {
|
|
215
292
|
[key: string]: {
|
|
216
|
-
value
|
|
293
|
+
value?: unknown;
|
|
217
294
|
type: string;
|
|
218
295
|
connectedData?: {
|
|
219
296
|
pointer: string;
|
|
220
297
|
syntax: "jptr";
|
|
221
298
|
} | undefined;
|
|
299
|
+
locales?: {
|
|
300
|
+
[key: string]: unknown;
|
|
301
|
+
} | undefined;
|
|
222
302
|
};
|
|
223
303
|
} | undefined;
|
|
224
304
|
variant?: string | undefined;
|
|
@@ -252,12 +332,15 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
252
332
|
[key: string]: {
|
|
253
333
|
parameters?: {
|
|
254
334
|
[key: string]: {
|
|
255
|
-
value
|
|
335
|
+
value?: unknown;
|
|
256
336
|
type: string;
|
|
257
337
|
connectedData?: {
|
|
258
338
|
pointer: string;
|
|
259
339
|
syntax: "jptr";
|
|
260
340
|
} | undefined;
|
|
341
|
+
locales?: {
|
|
342
|
+
[key: string]: unknown;
|
|
343
|
+
} | undefined;
|
|
261
344
|
};
|
|
262
345
|
} | undefined;
|
|
263
346
|
variant?: string | undefined;
|
|
@@ -269,11 +352,23 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
269
352
|
} | undefined;
|
|
270
353
|
variants?: boolean | undefined;
|
|
271
354
|
} | undefined;
|
|
355
|
+
_locales?: string[] | undefined;
|
|
272
356
|
}[];
|
|
273
357
|
} | undefined;
|
|
274
358
|
_id: string;
|
|
275
359
|
_slug?: string | null | undefined;
|
|
276
360
|
_name: string;
|
|
361
|
+
_pattern?: string | undefined;
|
|
362
|
+
_patternDataResources?: {
|
|
363
|
+
[key: string]: {
|
|
364
|
+
type: string;
|
|
365
|
+
isPatternParameter?: boolean | undefined;
|
|
366
|
+
ignorePatternParameterDefault?: boolean | undefined;
|
|
367
|
+
variables?: {
|
|
368
|
+
[key: string]: string;
|
|
369
|
+
} | undefined;
|
|
370
|
+
};
|
|
371
|
+
} | undefined;
|
|
277
372
|
_dataResources?: {
|
|
278
373
|
[key: string]: {
|
|
279
374
|
type: string;
|
|
@@ -288,12 +383,15 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
288
383
|
[key: string]: {
|
|
289
384
|
parameters?: {
|
|
290
385
|
[key: string]: {
|
|
291
|
-
value
|
|
386
|
+
value?: unknown;
|
|
292
387
|
type: string;
|
|
293
388
|
connectedData?: {
|
|
294
389
|
pointer: string;
|
|
295
390
|
syntax: "jptr";
|
|
296
391
|
} | undefined;
|
|
392
|
+
locales?: {
|
|
393
|
+
[key: string]: unknown;
|
|
394
|
+
} | undefined;
|
|
297
395
|
};
|
|
298
396
|
} | undefined;
|
|
299
397
|
variant?: string | undefined;
|
|
@@ -305,6 +403,7 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
305
403
|
} | undefined;
|
|
306
404
|
variants?: boolean | undefined;
|
|
307
405
|
} | undefined;
|
|
406
|
+
_locales?: string[] | undefined;
|
|
308
407
|
};
|
|
309
408
|
}, querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
310
409
|
/**
|
|
@@ -315,8 +414,8 @@ declare const getStaticProps: next.GetStaticProps<{
|
|
|
315
414
|
* NOTE: fallback must be supported. You cannot generate static paths for dynamic routes which contain query parameters.
|
|
316
415
|
*/
|
|
317
416
|
declare const getStaticPaths: () => Promise<{
|
|
318
|
-
paths: string[]
|
|
417
|
+
paths: string[];
|
|
319
418
|
fallback: boolean;
|
|
320
419
|
}>;
|
|
321
420
|
|
|
322
|
-
export { HandleRouteCompositionFunction, HandleRouteNotFoundFunction, HandleRouteRedirectFunction, RouteHandlerOptions, getServerSideProps, getStaticPaths, getStaticProps, withUniformGetServerSideProps, withUniformGetStaticProps };
|
|
421
|
+
export { type HandleRouteCompositionFunction, type HandleRouteNotFoundFunction, type HandleRouteRedirectFunction, type RouteHandlerOptions, getServerSideProps, getStaticPaths, getStaticProps, prependLocale, withUniformGetServerSideProps, withUniformGetStaticPaths, withUniformGetStaticProps };
|