@uniformdev/canvas-next 20.43.1-alpha.1 → 20.43.1-alpha.12

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.
@@ -38,6 +38,15 @@ type RouteHandlerOptions<TContext, TResult, TSuccessResult> = {
38
38
  */
39
39
  handleNotFound?: HandleRouteNotFoundFunction<TContext, TResult>;
40
40
  };
41
+ /**
42
+ * Schema that comes out of route API handler in case of a composition route response.
43
+ * Should be used together as UniformAppProps<RouteCompositionResult> in Next.js app.
44
+ */
45
+ type RouteCompositionResult<TData = RootComponentInstance> = {
46
+ matchedRoute: string;
47
+ dynamicInputs: Record<string, string>;
48
+ data: TData;
49
+ };
41
50
 
42
51
  /**
43
52
  * Creates an implementation of `getServerSideProps` using the Uniform Route API.
@@ -124,4 +133,4 @@ declare const getStaticPaths: () => Promise<{
124
133
  fallback: boolean;
125
134
  }>;
126
135
 
127
- export { type HandleRouteCompositionFunction, type HandleRouteNotFoundFunction, type HandleRouteRedirectFunction, type RouteHandlerOptions, getServerSideProps, getStaticPaths, getStaticProps, prependLocale, withUniformGetServerSideProps, withUniformGetStaticPaths, withUniformGetStaticProps };
136
+ export { type HandleRouteCompositionFunction, type HandleRouteNotFoundFunction, type HandleRouteRedirectFunction, type RouteCompositionResult, type RouteHandlerOptions, getServerSideProps, getStaticPaths, getStaticProps, prependLocale, withUniformGetServerSideProps, withUniformGetStaticPaths, withUniformGetStaticProps };
@@ -38,6 +38,15 @@ type RouteHandlerOptions<TContext, TResult, TSuccessResult> = {
38
38
  */
39
39
  handleNotFound?: HandleRouteNotFoundFunction<TContext, TResult>;
40
40
  };
41
+ /**
42
+ * Schema that comes out of route API handler in case of a composition route response.
43
+ * Should be used together as UniformAppProps<RouteCompositionResult> in Next.js app.
44
+ */
45
+ type RouteCompositionResult<TData = RootComponentInstance> = {
46
+ matchedRoute: string;
47
+ dynamicInputs: Record<string, string>;
48
+ data: TData;
49
+ };
41
50
 
42
51
  /**
43
52
  * Creates an implementation of `getServerSideProps` using the Uniform Route API.
@@ -124,4 +133,4 @@ declare const getStaticPaths: () => Promise<{
124
133
  fallback: boolean;
125
134
  }>;
126
135
 
127
- export { type HandleRouteCompositionFunction, type HandleRouteNotFoundFunction, type HandleRouteRedirectFunction, type RouteHandlerOptions, getServerSideProps, getStaticPaths, getStaticProps, prependLocale, withUniformGetServerSideProps, withUniformGetStaticPaths, withUniformGetStaticProps };
136
+ export { type HandleRouteCompositionFunction, type HandleRouteNotFoundFunction, type HandleRouteRedirectFunction, type RouteCompositionResult, type RouteHandlerOptions, getServerSideProps, getStaticPaths, getStaticProps, prependLocale, withUniformGetServerSideProps, withUniformGetStaticPaths, withUniformGetStaticProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-next",
3
- "version": "20.43.1-alpha.1+f955dbea01",
3
+ "version": "20.43.1-alpha.12+4938890373",
4
4
  "description": "Next.js SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -67,12 +67,12 @@
67
67
  "document:prebuild": "api-extractor run --local"
68
68
  },
69
69
  "dependencies": {
70
- "@uniformdev/canvas": "20.43.1-alpha.1+f955dbea01",
71
- "@uniformdev/canvas-react": "20.43.1-alpha.1+f955dbea01",
72
- "@uniformdev/context": "20.43.1-alpha.1+f955dbea01",
73
- "@uniformdev/project-map": "20.43.1-alpha.1+f955dbea01",
74
- "@uniformdev/redirect": "20.43.1-alpha.1+f955dbea01",
75
- "@uniformdev/richtext": "20.43.1-alpha.1+f955dbea01",
70
+ "@uniformdev/canvas": "20.43.1-alpha.12+4938890373",
71
+ "@uniformdev/canvas-react": "20.43.1-alpha.12+4938890373",
72
+ "@uniformdev/context": "20.43.1-alpha.12+4938890373",
73
+ "@uniformdev/project-map": "20.43.1-alpha.12+4938890373",
74
+ "@uniformdev/redirect": "20.43.1-alpha.12+4938890373",
75
+ "@uniformdev/richtext": "20.43.1-alpha.12+4938890373",
76
76
  "colorette": "2.0.20"
77
77
  },
78
78
  "peerDependencies": {
@@ -92,5 +92,5 @@
92
92
  "publishConfig": {
93
93
  "access": "public"
94
94
  },
95
- "gitHead": "f955dbea01e6de5e496ee8df045889537486b544"
95
+ "gitHead": "493889037370a0ac4dd3ef07ee900cad6e2a66e1"
96
96
  }