@uniformdev/canvas-next-rsc-shared 19.211.0 → 19.211.1-alpha.2

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 CHANGED
@@ -107,23 +107,39 @@ type PageParameters = {
107
107
  /**
108
108
  * The params object from Next.js router. Used to resolve a composition.
109
109
  */
110
- params: {
110
+ params: Promise<{
111
111
  path?: string | string[];
112
- };
112
+ }> | undefined;
113
113
  /**
114
114
  * The searchParams object from Next.js router. Used for signal evaluation.
115
115
  */
116
- searchParams?: {
116
+ searchParams?: Promise<{
117
117
  [key: string]: string | undefined;
118
- };
118
+ }>;
119
+ };
120
+ type AwaitedPageParameters = {
121
+ /**
122
+ * The params object from Next.js router. Used to resolve a composition.
123
+ */
124
+ params: Awaited<PageParameters['params']>;
125
+ /**
126
+ * The searchParams object from Next.js router. Used for signal evaluation.
127
+ */
128
+ searchParams?: Awaited<PageParameters['searchParams']>;
119
129
  };
120
130
  type PlaygroundParameters = {
121
131
  /**
122
132
  * Used to retrieve the composition ID of the pattern.
123
133
  */
124
- searchParams: {
134
+ searchParams: Promise<{
125
135
  [key: string]: string | undefined;
126
- };
136
+ }>;
137
+ };
138
+ type AwaitedPlaygroundParameters = {
139
+ /**
140
+ * Used to retrieve the composition ID of the pattern.
141
+ */
142
+ searchParams: Awaited<PlaygroundParameters['searchParams']>;
127
143
  };
128
144
  type SlotDefinition = {
129
145
  name: string;
@@ -165,7 +181,7 @@ type AppDirectoryContext = Omit<ContextInstance, 'update'> & {
165
181
  */
166
182
  internal_update: AppDirectoryContext['update'];
167
183
  };
168
- type AppDirectoryContextState = Omit<ContextState, 'url'> & PageParameters;
184
+ type AppDirectoryContextState = Omit<ContextState, 'url'> & AwaitedPageParameters;
169
185
  type AppDirectoryServerContext = Omit<AppDirectoryContext, 'update'>;
170
186
 
171
187
  type CreateUniformContextOptions = Omit<ContextOptions, 'transitionStore'> & {
@@ -229,8 +245,8 @@ type ResolvePathResult = {
229
245
  type: 'path';
230
246
  value: string;
231
247
  };
232
- declare const resolvePath: ({ params }: Pick<PageParameters, "params">) => ResolvePathResult;
248
+ declare const resolvePath: ({ params }: Pick<AwaitedPageParameters, "params">) => ResolvePathResult;
233
249
 
234
250
  declare function getBaseUrl(): string;
235
251
 
236
- export { type AppDirectoryContext, AppDirectoryContextInstance, type AppDirectoryContextState, type AppDirectoryServerContext, type CacheMode, type ComponentProps, type CompositionContext, type CreateUniformContextOptions, type PageParameters, type PersonalizeProps, type PersonalizeWithContextComponentProps, type PlaygroundParameters, type ResolvePathResult, type SlotDefinition, type TestProps, type UniformServerConfig, createUniformContext, getBaseUrl, resolvePath, runPersonalization, runTest };
252
+ export { type AppDirectoryContext, AppDirectoryContextInstance, type AppDirectoryContextState, type AppDirectoryServerContext, type AwaitedPageParameters, type AwaitedPlaygroundParameters, type CacheMode, type ComponentProps, type CompositionContext, type CreateUniformContextOptions, type PageParameters, type PersonalizeProps, type PersonalizeWithContextComponentProps, type PlaygroundParameters, type ResolvePathResult, type SlotDefinition, type TestProps, type UniformServerConfig, createUniformContext, getBaseUrl, resolvePath, runPersonalization, runTest };
package/dist/index.d.ts CHANGED
@@ -107,23 +107,39 @@ type PageParameters = {
107
107
  /**
108
108
  * The params object from Next.js router. Used to resolve a composition.
109
109
  */
110
- params: {
110
+ params: Promise<{
111
111
  path?: string | string[];
112
- };
112
+ }> | undefined;
113
113
  /**
114
114
  * The searchParams object from Next.js router. Used for signal evaluation.
115
115
  */
116
- searchParams?: {
116
+ searchParams?: Promise<{
117
117
  [key: string]: string | undefined;
118
- };
118
+ }>;
119
+ };
120
+ type AwaitedPageParameters = {
121
+ /**
122
+ * The params object from Next.js router. Used to resolve a composition.
123
+ */
124
+ params: Awaited<PageParameters['params']>;
125
+ /**
126
+ * The searchParams object from Next.js router. Used for signal evaluation.
127
+ */
128
+ searchParams?: Awaited<PageParameters['searchParams']>;
119
129
  };
120
130
  type PlaygroundParameters = {
121
131
  /**
122
132
  * Used to retrieve the composition ID of the pattern.
123
133
  */
124
- searchParams: {
134
+ searchParams: Promise<{
125
135
  [key: string]: string | undefined;
126
- };
136
+ }>;
137
+ };
138
+ type AwaitedPlaygroundParameters = {
139
+ /**
140
+ * Used to retrieve the composition ID of the pattern.
141
+ */
142
+ searchParams: Awaited<PlaygroundParameters['searchParams']>;
127
143
  };
128
144
  type SlotDefinition = {
129
145
  name: string;
@@ -165,7 +181,7 @@ type AppDirectoryContext = Omit<ContextInstance, 'update'> & {
165
181
  */
166
182
  internal_update: AppDirectoryContext['update'];
167
183
  };
168
- type AppDirectoryContextState = Omit<ContextState, 'url'> & PageParameters;
184
+ type AppDirectoryContextState = Omit<ContextState, 'url'> & AwaitedPageParameters;
169
185
  type AppDirectoryServerContext = Omit<AppDirectoryContext, 'update'>;
170
186
 
171
187
  type CreateUniformContextOptions = Omit<ContextOptions, 'transitionStore'> & {
@@ -229,8 +245,8 @@ type ResolvePathResult = {
229
245
  type: 'path';
230
246
  value: string;
231
247
  };
232
- declare const resolvePath: ({ params }: Pick<PageParameters, "params">) => ResolvePathResult;
248
+ declare const resolvePath: ({ params }: Pick<AwaitedPageParameters, "params">) => ResolvePathResult;
233
249
 
234
250
  declare function getBaseUrl(): string;
235
251
 
236
- export { type AppDirectoryContext, AppDirectoryContextInstance, type AppDirectoryContextState, type AppDirectoryServerContext, type CacheMode, type ComponentProps, type CompositionContext, type CreateUniformContextOptions, type PageParameters, type PersonalizeProps, type PersonalizeWithContextComponentProps, type PlaygroundParameters, type ResolvePathResult, type SlotDefinition, type TestProps, type UniformServerConfig, createUniformContext, getBaseUrl, resolvePath, runPersonalization, runTest };
252
+ export { type AppDirectoryContext, AppDirectoryContextInstance, type AppDirectoryContextState, type AppDirectoryServerContext, type AwaitedPageParameters, type AwaitedPlaygroundParameters, type CacheMode, type ComponentProps, type CompositionContext, type CreateUniformContextOptions, type PageParameters, type PersonalizeProps, type PersonalizeWithContextComponentProps, type PlaygroundParameters, type ResolvePathResult, type SlotDefinition, type TestProps, type UniformServerConfig, createUniformContext, getBaseUrl, resolvePath, runPersonalization, runTest };
package/dist/index.esm.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
 
15
15
  // src/utils/path.ts
16
16
  var resolvePath = ({ params }) => {
17
- const value = processPath(params.path || "");
17
+ const value = processPath((params == null ? void 0 : params.path) || "");
18
18
  return {
19
19
  type: "path",
20
20
  value
package/dist/index.js CHANGED
@@ -41,7 +41,7 @@ var import_context = require("@uniformdev/context");
41
41
 
42
42
  // src/utils/path.ts
43
43
  var resolvePath = ({ params }) => {
44
- const value = processPath(params.path || "");
44
+ const value = processPath((params == null ? void 0 : params.path) || "");
45
45
  return {
46
46
  type: "path",
47
47
  value
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
 
15
15
  // src/utils/path.ts
16
16
  var resolvePath = ({ params }) => {
17
- const value = processPath(params.path || "");
17
+ const value = processPath((params == null ? void 0 : params.path) || "");
18
18
  return {
19
19
  type: "path",
20
20
  value
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-next-rsc-shared",
3
- "version": "19.211.0",
3
+ "version": "19.211.1-alpha.2+498f57ab58",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "scripts": {
6
6
  "build": "tsup",
@@ -27,24 +27,24 @@
27
27
  "@types/node": "22.7.8",
28
28
  "@types/react": "18.3.11",
29
29
  "eslint": "9.9.0",
30
- "next": "^14.0.0",
30
+ "next": "15.1.0",
31
31
  "react": "18.3.1",
32
32
  "react-dom": "18.3.1"
33
33
  },
34
34
  "dependencies": {
35
- "@uniformdev/canvas": "19.211.0",
36
- "@uniformdev/context": "19.211.0"
35
+ "@uniformdev/canvas": "19.211.1-alpha.2+498f57ab58",
36
+ "@uniformdev/context": "19.211.1-alpha.2+498f57ab58"
37
37
  },
38
38
  "engines": {
39
- "node": ">=16.14.0"
39
+ "node": "^18.18.0 || ^19.8.0 || >= 20.0.0"
40
40
  },
41
41
  "peerDependencies": {
42
- "next": ">=13.4.7",
43
- "react": ">=18.2",
44
- "react-dom": ">=18.2"
42
+ "next": ">=15.1.0",
43
+ "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0",
44
+ "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "c101d24290ae409fec3148e0cf055618f3f836cd"
49
+ "gitHead": "498f57ab585765304de6e7bf46d6c5408b9c03e2"
50
50
  }