@uniformdev/canvas-next 19.178.2-alpha.25 → 19.179.2-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/project-map/index.d.mts +26 -73
- package/dist/project-map/index.d.ts +26 -73
- package/dist/route/index.d.mts +17 -402
- package/dist/route/index.d.ts +17 -402
- package/dist/slug/index.d.mts +22 -51
- package/dist/slug/index.d.ts +22 -51
- package/package.json +10 -10
package/dist/slug/index.d.ts
CHANGED
|
@@ -3,8 +3,7 @@ import { GetServerSidePropsContext, GetServerSideProps, GetStaticPropsContext, G
|
|
|
3
3
|
import { a as UniformPreviewData, c as UniformGetServerSideProps, b as UniformGetStaticProps } from '../models-CupnCqnn.js';
|
|
4
4
|
import * as querystring from 'querystring';
|
|
5
5
|
import { ParsedUrlQuery } from 'querystring';
|
|
6
|
-
import
|
|
7
|
-
import { CanvasClient, DataResolutionOption, CompositionGetParameters, CompositionGetResponse } from '@uniformdev/canvas';
|
|
6
|
+
import { CanvasClient, CompositionGetBySlugParameters, DataResolutionOption, CompositionGetParameters, CompositionGetResponse } from '@uniformdev/canvas';
|
|
8
7
|
import '@uniformdev/canvas-react';
|
|
9
8
|
|
|
10
9
|
declare const withUniformGetServerSideProps: <TProps extends {
|
|
@@ -13,46 +12,32 @@ declare const withUniformGetServerSideProps: <TProps extends {
|
|
|
13
12
|
[key: string]: any;
|
|
14
13
|
}>(options?: {
|
|
15
14
|
/** A string that you want to strip from the resolved context.resolvedUrl. Useful when calling from a nested folder which is not part of your slug structure */
|
|
16
|
-
prefix?: string
|
|
15
|
+
prefix?: string;
|
|
17
16
|
/** Useful when you need to modify the slug passed to the API */
|
|
18
|
-
modifySlug?: (
|
|
17
|
+
modifySlug?: (slug: string, context: GetServerSidePropsContext<ParsedUrlQuery, UniformPreviewData>) => string;
|
|
19
18
|
/** Set to true if you want to include draft compositions */
|
|
20
|
-
preview?: boolean
|
|
19
|
+
preview?: boolean;
|
|
21
20
|
/** If you need to override the default client, you can pass it here */
|
|
22
|
-
client?: CanvasClient
|
|
23
|
-
requestOptions?: Omit<Partial<
|
|
24
|
-
|
|
25
|
-
skipEnhance?: boolean | undefined;
|
|
26
|
-
skipPatternResolution?: boolean | undefined;
|
|
27
|
-
skipOverridesResolution?: boolean | undefined;
|
|
28
|
-
state?: number | undefined;
|
|
29
|
-
withComponentIDs?: boolean | undefined;
|
|
30
|
-
withTotalCount?: boolean | undefined;
|
|
31
|
-
withUIStatus?: boolean | undefined;
|
|
32
|
-
withWorkflowDefinition?: boolean | undefined;
|
|
33
|
-
withProjectMapNodes?: boolean | undefined;
|
|
34
|
-
withContentSourceMap?: boolean | undefined;
|
|
35
|
-
locale?: string | undefined;
|
|
36
|
-
releaseId?: string | undefined;
|
|
37
|
-
} & Required<Pick<_uniformdev_canvas.CompositionGetParameters, "slug">> & DataResolutionOption>, "state"> | undefined;
|
|
38
|
-
callback?: UniformGetServerSideProps<TProps> | undefined;
|
|
21
|
+
client?: CanvasClient;
|
|
22
|
+
requestOptions?: Omit<Partial<CompositionGetBySlugParameters & DataResolutionOption>, "state">;
|
|
23
|
+
callback?: UniformGetServerSideProps<TProps>;
|
|
39
24
|
/** Disables logging of response information and timings */
|
|
40
|
-
silent?: boolean
|
|
41
|
-
}
|
|
25
|
+
silent?: boolean;
|
|
26
|
+
}) => GetServerSideProps<TProps, ParsedUrlQuery, UniformPreviewData>;
|
|
42
27
|
|
|
43
28
|
declare const withUniformGetStaticPaths: (options?: {
|
|
44
|
-
projectMapId?: string
|
|
29
|
+
projectMapId?: string;
|
|
45
30
|
/** A string that you want prepended to slugs returned by Canvas. Useful when calling from a nested folder which is not part of your slug structure */
|
|
46
|
-
prefix?: string
|
|
31
|
+
prefix?: string;
|
|
47
32
|
/** Set to true if you want to include draft compositions */
|
|
48
|
-
preview?: boolean
|
|
33
|
+
preview?: boolean;
|
|
49
34
|
/** Way to override getCompositionList request params */
|
|
50
|
-
requestOptions?: Partial<CompositionGetParameters
|
|
35
|
+
requestOptions?: Partial<CompositionGetParameters>;
|
|
51
36
|
/** Way to modify list of slugs before building array of paths */
|
|
52
|
-
callback?: (
|
|
37
|
+
callback?: (compositions: CompositionGetResponse[]) => Promise<CompositionGetResponse[]>;
|
|
53
38
|
/** If you need to override the default client, you can pass it here */
|
|
54
|
-
client?: CanvasClient
|
|
55
|
-
}
|
|
39
|
+
client?: CanvasClient;
|
|
40
|
+
}) => () => Promise<{
|
|
56
41
|
paths: string[];
|
|
57
42
|
fallback: boolean;
|
|
58
43
|
}>;
|
|
@@ -65,31 +50,17 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
65
50
|
/** Name of dynamic parameter coming from getStaticPath, usually specified in page file name (e.g. [...slug].jsx will have param = 'slug' */
|
|
66
51
|
param: string;
|
|
67
52
|
/** Useful when you need to modify the slug passed to the API */
|
|
68
|
-
modifySlug?: (
|
|
53
|
+
modifySlug?: (slug: string, context: GetStaticPropsContext<ParsedUrlQuery, UniformPreviewData>) => string;
|
|
69
54
|
/** Set to true if you want to include draft compositions */
|
|
70
|
-
preview?: boolean
|
|
55
|
+
preview?: boolean;
|
|
71
56
|
/** If you need to override the default client, you can pass it here */
|
|
72
|
-
client?: CanvasClient
|
|
57
|
+
client?: CanvasClient;
|
|
73
58
|
/** Way to override getCompositionBySlug request params */
|
|
74
|
-
requestOptions?: Omit<Partial<
|
|
75
|
-
versionId?: string | undefined;
|
|
76
|
-
skipEnhance?: boolean | undefined;
|
|
77
|
-
skipPatternResolution?: boolean | undefined;
|
|
78
|
-
skipOverridesResolution?: boolean | undefined;
|
|
79
|
-
state?: number | undefined;
|
|
80
|
-
withComponentIDs?: boolean | undefined;
|
|
81
|
-
withTotalCount?: boolean | undefined;
|
|
82
|
-
withUIStatus?: boolean | undefined;
|
|
83
|
-
withWorkflowDefinition?: boolean | undefined;
|
|
84
|
-
withProjectMapNodes?: boolean | undefined;
|
|
85
|
-
withContentSourceMap?: boolean | undefined;
|
|
86
|
-
locale?: string | undefined;
|
|
87
|
-
releaseId?: string | undefined;
|
|
88
|
-
} & Required<Pick<_uniformdev_canvas.CompositionGetParameters, "slug">> & DataResolutionOption>, "state"> | undefined;
|
|
59
|
+
requestOptions?: Omit<Partial<CompositionGetBySlugParameters & DataResolutionOption>, "state">;
|
|
89
60
|
/** Custom handler to specify return value and modify composition - e.g. enhance with CMS data */
|
|
90
|
-
callback?: UniformGetStaticProps<TProps
|
|
61
|
+
callback?: UniformGetStaticProps<TProps>;
|
|
91
62
|
/** Disables logging of response information and timings */
|
|
92
|
-
silent?: boolean
|
|
63
|
+
silent?: boolean;
|
|
93
64
|
}) => GetStaticProps<TProps, ParsedUrlQuery, UniformPreviewData>;
|
|
94
65
|
|
|
95
66
|
declare const getServerSideProps: next.GetServerSideProps<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-next",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.179.2-alpha.22+79878be48f",
|
|
4
4
|
"description": "Next.js SDK for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"document": "api-extractor run --local"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@uniformdev/canvas": "19.
|
|
71
|
-
"@uniformdev/canvas-react": "19.
|
|
72
|
-
"@uniformdev/project-map": "19.
|
|
73
|
-
"@uniformdev/redirect": "19.
|
|
74
|
-
"@uniformdev/richtext": "19.
|
|
70
|
+
"@uniformdev/canvas": "19.179.2-alpha.22+79878be48f",
|
|
71
|
+
"@uniformdev/canvas-react": "19.179.2-alpha.22+79878be48f",
|
|
72
|
+
"@uniformdev/project-map": "19.179.2-alpha.22+79878be48f",
|
|
73
|
+
"@uniformdev/redirect": "19.179.2-alpha.22+79878be48f",
|
|
74
|
+
"@uniformdev/richtext": "19.179.2-alpha.22+79878be48f",
|
|
75
75
|
"colorette": "2.0.20"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"react-dom": ">=16"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@types/react": "18.
|
|
83
|
+
"@types/react": "18.3.3",
|
|
84
84
|
"next": "14.2.5",
|
|
85
|
-
"react": "18.
|
|
86
|
-
"react-dom": "18.
|
|
85
|
+
"react": "18.3.1",
|
|
86
|
+
"react-dom": "18.3.1"
|
|
87
87
|
},
|
|
88
88
|
"files": [
|
|
89
89
|
"/dist"
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"publishConfig": {
|
|
92
92
|
"access": "public"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "79878be48f2d4b1c6158026aa632e71c91473ac6"
|
|
95
95
|
}
|