@uniformdev/canvas-next 20.36.1 → 20.36.2-alpha.90

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.
@@ -3,8 +3,10 @@ import { GetServerSidePropsContext, GetServerSidePropsResult, GetServerSideProps
3
3
  import { a as UniformPreviewData } from '../models-CupnCqnn.mjs';
4
4
  import * as querystring from 'querystring';
5
5
  import { ParsedUrlQuery } from 'querystring';
6
+ import * as _uniformdev_context__ from '@uniformdev/context/*';
6
7
  import * as _uniformdev_canvas from '@uniformdev/canvas';
7
8
  import { RouteGetResponseEdgehancedComposition, RouteGetResponseNotFound, RouteGetResponseRedirect, RouteClient, RouteGetParameters, RootComponentInstance } from '@uniformdev/canvas';
9
+ import { CompositionMetadata } from '@uniformdev/context';
8
10
  import { ProjectMapNodeGetRequest, ProjectMapNodeGetResponse, ProjectMapClient } from '@uniformdev/project-map';
9
11
  import { RedirectClient } from '@uniformdev/redirect';
10
12
  import { GetStaticPropsContext as GetStaticPropsContext$1, GetServerSidePropsContext as GetServerSidePropsContext$1 } from 'next/types';
@@ -46,7 +48,7 @@ declare const withUniformGetServerSideProps: <TProps extends {
46
48
  [key: string]: any;
47
49
  } = {
48
50
  data: RootComponentInstance;
49
- }>(options?: RouteHandlerOptions<GetServerSidePropsContext<ParsedUrlQuery, UniformPreviewData>, GetServerSidePropsResult<never>, GetServerSidePropsResult<TProps>>) => GetServerSideProps<TProps, ParsedUrlQuery, UniformPreviewData>;
51
+ } & NonNullable<Omit<CompositionMetadata, "compositionId">>>(options?: RouteHandlerOptions<GetServerSidePropsContext<ParsedUrlQuery, UniformPreviewData>, GetServerSidePropsResult<never>, GetServerSidePropsResult<TProps>>) => GetServerSideProps<TProps, ParsedUrlQuery, UniformPreviewData>;
50
52
 
51
53
  declare const withUniformGetStaticPaths: (options?: {
52
54
  projectMapId?: string;
@@ -78,7 +80,7 @@ declare const withUniformGetStaticProps: <TProps extends {
78
80
  [key: string]: any;
79
81
  } = {
80
82
  data: RootComponentInstance;
81
- }>(options?: RouteHandlerOptions<GetStaticPropsContext<ParsedUrlQuery, UniformPreviewData>, GetStaticPropsResult<never>, GetStaticPropsResult<TProps>> & {
83
+ } & NonNullable<Omit<CompositionMetadata, "compositionId">>>(options?: RouteHandlerOptions<GetStaticPropsContext<ParsedUrlQuery, UniformPreviewData>, GetStaticPropsResult<never>, GetStaticPropsResult<TProps>> & {
82
84
  /** Name of dynamic parameter coming from getStaticPath, usually specified in page file name (e.g. [...slug].jsx will have param = 'slug' */
83
85
  param?: string;
84
86
  }) => GetStaticProps<TProps, ParsedUrlQuery, UniformPreviewData>;
@@ -101,7 +103,7 @@ declare const prependLocale: (path: string, { locale, defaultLocale, locales }:
101
103
  */
102
104
  declare const getServerSideProps: next.GetServerSideProps<{
103
105
  data: _uniformdev_canvas.RootComponentInstance;
104
- }, querystring.ParsedUrlQuery, UniformPreviewData>;
106
+ } & Omit<_uniformdev_context__.CompositionMetadata, "compositionId">, querystring.ParsedUrlQuery, UniformPreviewData>;
105
107
  /**
106
108
  * Default implementation of getStaticProps with routes
107
109
  * To configure custom behavior, use:
@@ -109,7 +111,7 @@ declare const getServerSideProps: next.GetServerSideProps<{
109
111
  */
110
112
  declare const getStaticProps: next.GetStaticProps<{
111
113
  data: _uniformdev_canvas.RootComponentInstance;
112
- }, querystring.ParsedUrlQuery, UniformPreviewData>;
114
+ } & Omit<_uniformdev_context__.CompositionMetadata, "compositionId">, querystring.ParsedUrlQuery, UniformPreviewData>;
113
115
  /**
114
116
  * Default implementation of getStaticPaths with routes
115
117
  * To configure custom behavior, use:
@@ -3,8 +3,10 @@ import { GetServerSidePropsContext, GetServerSidePropsResult, GetServerSideProps
3
3
  import { a as UniformPreviewData } from '../models-CupnCqnn.js';
4
4
  import * as querystring from 'querystring';
5
5
  import { ParsedUrlQuery } from 'querystring';
6
+ import * as _uniformdev_context__ from '@uniformdev/context/*';
6
7
  import * as _uniformdev_canvas from '@uniformdev/canvas';
7
8
  import { RouteGetResponseEdgehancedComposition, RouteGetResponseNotFound, RouteGetResponseRedirect, RouteClient, RouteGetParameters, RootComponentInstance } from '@uniformdev/canvas';
9
+ import { CompositionMetadata } from '@uniformdev/context';
8
10
  import { ProjectMapNodeGetRequest, ProjectMapNodeGetResponse, ProjectMapClient } from '@uniformdev/project-map';
9
11
  import { RedirectClient } from '@uniformdev/redirect';
10
12
  import { GetStaticPropsContext as GetStaticPropsContext$1, GetServerSidePropsContext as GetServerSidePropsContext$1 } from 'next/types';
@@ -46,7 +48,7 @@ declare const withUniformGetServerSideProps: <TProps extends {
46
48
  [key: string]: any;
47
49
  } = {
48
50
  data: RootComponentInstance;
49
- }>(options?: RouteHandlerOptions<GetServerSidePropsContext<ParsedUrlQuery, UniformPreviewData>, GetServerSidePropsResult<never>, GetServerSidePropsResult<TProps>>) => GetServerSideProps<TProps, ParsedUrlQuery, UniformPreviewData>;
51
+ } & NonNullable<Omit<CompositionMetadata, "compositionId">>>(options?: RouteHandlerOptions<GetServerSidePropsContext<ParsedUrlQuery, UniformPreviewData>, GetServerSidePropsResult<never>, GetServerSidePropsResult<TProps>>) => GetServerSideProps<TProps, ParsedUrlQuery, UniformPreviewData>;
50
52
 
51
53
  declare const withUniformGetStaticPaths: (options?: {
52
54
  projectMapId?: string;
@@ -78,7 +80,7 @@ declare const withUniformGetStaticProps: <TProps extends {
78
80
  [key: string]: any;
79
81
  } = {
80
82
  data: RootComponentInstance;
81
- }>(options?: RouteHandlerOptions<GetStaticPropsContext<ParsedUrlQuery, UniformPreviewData>, GetStaticPropsResult<never>, GetStaticPropsResult<TProps>> & {
83
+ } & NonNullable<Omit<CompositionMetadata, "compositionId">>>(options?: RouteHandlerOptions<GetStaticPropsContext<ParsedUrlQuery, UniformPreviewData>, GetStaticPropsResult<never>, GetStaticPropsResult<TProps>> & {
82
84
  /** Name of dynamic parameter coming from getStaticPath, usually specified in page file name (e.g. [...slug].jsx will have param = 'slug' */
83
85
  param?: string;
84
86
  }) => GetStaticProps<TProps, ParsedUrlQuery, UniformPreviewData>;
@@ -101,7 +103,7 @@ declare const prependLocale: (path: string, { locale, defaultLocale, locales }:
101
103
  */
102
104
  declare const getServerSideProps: next.GetServerSideProps<{
103
105
  data: _uniformdev_canvas.RootComponentInstance;
104
- }, querystring.ParsedUrlQuery, UniformPreviewData>;
106
+ } & Omit<_uniformdev_context__.CompositionMetadata, "compositionId">, querystring.ParsedUrlQuery, UniformPreviewData>;
105
107
  /**
106
108
  * Default implementation of getStaticProps with routes
107
109
  * To configure custom behavior, use:
@@ -109,7 +111,7 @@ declare const getServerSideProps: next.GetServerSideProps<{
109
111
  */
110
112
  declare const getStaticProps: next.GetStaticProps<{
111
113
  data: _uniformdev_canvas.RootComponentInstance;
112
- }, querystring.ParsedUrlQuery, UniformPreviewData>;
114
+ } & Omit<_uniformdev_context__.CompositionMetadata, "compositionId">, querystring.ParsedUrlQuery, UniformPreviewData>;
113
115
  /**
114
116
  * Default implementation of getStaticPaths with routes
115
117
  * To configure custom behavior, use:
@@ -346,7 +346,9 @@ var withUniformGetServerSideProps = (options) => {
346
346
  const defaultHandleComposition = async (matched) => {
347
347
  return {
348
348
  props: {
349
- data: matched.compositionApiResponse.composition
349
+ data: matched.compositionApiResponse.composition,
350
+ matchedRoute: matched.matchedRoute,
351
+ dynamicInputs: matched.dynamicInputs
350
352
  }
351
353
  };
352
354
  };
@@ -453,7 +455,9 @@ var withUniformGetStaticProps = (options) => {
453
455
  const defaultHandleComposition = async (matched) => {
454
456
  return {
455
457
  props: {
456
- data: matched.compositionApiResponse.composition
458
+ data: matched.compositionApiResponse.composition,
459
+ matchedRoute: matched.matchedRoute,
460
+ dynamicInputs: matched.dynamicInputs
457
461
  }
458
462
  };
459
463
  };
@@ -224,7 +224,9 @@ var withUniformGetServerSideProps = (options) => {
224
224
  const defaultHandleComposition = async (matched) => {
225
225
  return {
226
226
  props: {
227
- data: matched.compositionApiResponse.composition
227
+ data: matched.compositionApiResponse.composition,
228
+ matchedRoute: matched.matchedRoute,
229
+ dynamicInputs: matched.dynamicInputs
228
230
  }
229
231
  };
230
232
  };
@@ -321,7 +323,9 @@ var withUniformGetStaticProps = (options) => {
321
323
  const defaultHandleComposition = async (matched) => {
322
324
  return {
323
325
  props: {
324
- data: matched.compositionApiResponse.composition
326
+ data: matched.compositionApiResponse.composition,
327
+ matchedRoute: matched.matchedRoute,
328
+ dynamicInputs: matched.dynamicInputs
325
329
  }
326
330
  };
327
331
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-next",
3
- "version": "20.36.1",
3
+ "version": "20.36.2-alpha.90+94c3a288ac",
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,12 @@
67
67
  "document:prebuild": "api-extractor run --local"
68
68
  },
69
69
  "dependencies": {
70
- "@uniformdev/canvas": "20.36.1",
71
- "@uniformdev/canvas-react": "20.36.1",
72
- "@uniformdev/project-map": "20.36.1",
73
- "@uniformdev/redirect": "20.36.1",
74
- "@uniformdev/richtext": "20.36.1",
70
+ "@uniformdev/canvas": "20.36.2-alpha.90+94c3a288ac",
71
+ "@uniformdev/canvas-react": "20.36.2-alpha.90+94c3a288ac",
72
+ "@uniformdev/context": "20.36.2-alpha.90+94c3a288ac",
73
+ "@uniformdev/project-map": "20.36.2-alpha.90+94c3a288ac",
74
+ "@uniformdev/redirect": "20.36.2-alpha.90+94c3a288ac",
75
+ "@uniformdev/richtext": "20.36.2-alpha.90+94c3a288ac",
75
76
  "colorette": "2.0.20"
76
77
  },
77
78
  "peerDependencies": {
@@ -91,5 +92,5 @@
91
92
  "publishConfig": {
92
93
  "access": "public"
93
94
  },
94
- "gitHead": "cced31b4edaff96f2eec23f2336ee0873663066a"
95
+ "gitHead": "94c3a288acbde88c1229222ae50bd289b7c5749e"
95
96
  }