@uniformdev/canvas-next-rsc 20.50.2-alpha.149 → 20.50.2-alpha.167

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/handler.js CHANGED
@@ -248,7 +248,7 @@ var determineFetchCacheOptions = (mode) => {
248
248
 
249
249
  // src/clients/canvasClient.ts
250
250
  var getCanvasClient = (options) => {
251
- return new import_canvas2.CanvasClient({
251
+ return new import_canvas2.CompositionDeliveryClient({
252
252
  projectId: env.getProjectId(),
253
253
  apiHost: env.getApiHost(),
254
254
  apiKey: env.getApiKey(),
@@ -444,7 +444,7 @@ var getComposition = async ({ compositionId }) => {
444
444
  }
445
445
  });
446
446
  try {
447
- const composition = await canvasClient.getCompositionById({
447
+ const composition = await canvasClient.get({
448
448
  compositionId
449
449
  });
450
450
  return composition;
@@ -510,7 +510,7 @@ var processEdgeConfigChange = async ({ source_url }) => {
510
510
  type: "no-cache"
511
511
  }
512
512
  });
513
- const route = await routeClient.getRoute({
513
+ const route = await routeClient.get({
514
514
  path: source_url
515
515
  });
516
516
  let valueToStore = void 0;
package/dist/handler.mjs CHANGED
@@ -155,7 +155,7 @@ import { parseConnectionString } from "@vercel/edge-config";
155
155
  import { Webhook } from "svix";
156
156
 
157
157
  // src/clients/canvasClient.ts
158
- import { CanvasClient } from "@uniformdev/canvas";
158
+ import { CompositionDeliveryClient } from "@uniformdev/canvas";
159
159
 
160
160
  // src/config/helpers.ts
161
161
  import serverConfig from "uniform.server.config";
@@ -215,7 +215,7 @@ var determineFetchCacheOptions = (mode) => {
215
215
 
216
216
  // src/clients/canvasClient.ts
217
217
  var getCanvasClient = (options) => {
218
- return new CanvasClient({
218
+ return new CompositionDeliveryClient({
219
219
  projectId: env.getProjectId(),
220
220
  apiHost: env.getApiHost(),
221
221
  apiKey: env.getApiKey(),
@@ -411,7 +411,7 @@ var getComposition = async ({ compositionId }) => {
411
411
  }
412
412
  });
413
413
  try {
414
- const composition = await canvasClient.getCompositionById({
414
+ const composition = await canvasClient.get({
415
415
  compositionId
416
416
  });
417
417
  return composition;
@@ -477,7 +477,7 @@ var processEdgeConfigChange = async ({ source_url }) => {
477
477
  type: "no-cache"
478
478
  }
479
479
  });
480
- const route = await routeClient.getRoute({
480
+ const route = await routeClient.get({
481
481
  path: source_url
482
482
  });
483
483
  let valueToStore = void 0;
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { CanvasClient, RouteClient, CompositionGetBySlugParameters, ResolvedRouteGetResponse, RouteGetParameters } from '@uniformdev/canvas';
1
+ import { CompositionDeliveryClient, RouteClient, CompositionGetBySlugParameters, ResolvedRouteGetResponse, RouteGetParameters } from '@uniformdev/canvas';
2
2
  import { UniformServerConfig, CompositionContext, AppDirectoryContextState, AppDirectoryServerContext, PlaygroundParameters, AwaitedPageParameters, PageParameters } from '@uniformdev/canvas-next-rsc-shared';
3
3
  export { PageParameters, PlaygroundParameters } from '@uniformdev/canvas-next-rsc-shared';
4
4
  import { ManifestClient } from '@uniformdev/context/api';
@@ -12,8 +12,8 @@ import { ClientContextComponent } from '@uniformdev/canvas-next-rsc-client';
12
12
  type GetCanvasClientOptions = {
13
13
  cache: NonNullable<UniformServerConfig['canvasCache']>;
14
14
  };
15
- declare const getCanvasClient: (options: GetCanvasClientOptions) => CanvasClient;
16
- declare const getDefaultCanvasClient: (options: Pick<CompositionContext, "searchParams">) => Promise<CanvasClient>;
15
+ declare const getCanvasClient: (options: GetCanvasClientOptions) => CompositionDeliveryClient;
16
+ declare const getDefaultCanvasClient: (options: Pick<CompositionContext, "searchParams">) => Promise<CompositionDeliveryClient>;
17
17
 
18
18
  type GetManifestClientOptions = {
19
19
  cache: NonNullable<UniformServerConfig['manifestCache']>;
@@ -248,7 +248,7 @@ type RetrieveSlugOptions = Pick<CompositionGetBySlugParameters, 'slug' | 'locale
248
248
  [key: string]: string | undefined;
249
249
  };
250
250
  } & RetrieveCommonOptions;
251
- type RetrieveRouteFetchOptions = Omit<RouteGetParameters, 'projectId' | 'path' | 'withComponentIDs' | 'withContentSourceMap' | 'state'>;
251
+ type RetrieveRouteFetchOptions = Omit<RouteGetParameters, 'projectId' | 'path' | 'withComponentIDs' | 'state'>;
252
252
  declare const retrieveCompositionBySlug: ({ slug, searchParams, skipPrefetch, locale, releaseId, versionId, }: RetrieveSlugOptions) => Promise<ResolvedRouteGetResponse>;
253
253
  declare const retrieveRoute: ({ params, searchParams: providedSearchParams, skipPrefetch }: RetrieveRouteOptions, fetchOptions?: RetrieveRouteFetchOptions) => Promise<ResolvedRouteGetResponse>;
254
254
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CanvasClient, RouteClient, CompositionGetBySlugParameters, ResolvedRouteGetResponse, RouteGetParameters } from '@uniformdev/canvas';
1
+ import { CompositionDeliveryClient, RouteClient, CompositionGetBySlugParameters, ResolvedRouteGetResponse, RouteGetParameters } from '@uniformdev/canvas';
2
2
  import { UniformServerConfig, CompositionContext, AppDirectoryContextState, AppDirectoryServerContext, PlaygroundParameters, AwaitedPageParameters, PageParameters } from '@uniformdev/canvas-next-rsc-shared';
3
3
  export { PageParameters, PlaygroundParameters } from '@uniformdev/canvas-next-rsc-shared';
4
4
  import { ManifestClient } from '@uniformdev/context/api';
@@ -12,8 +12,8 @@ import { ClientContextComponent } from '@uniformdev/canvas-next-rsc-client';
12
12
  type GetCanvasClientOptions = {
13
13
  cache: NonNullable<UniformServerConfig['canvasCache']>;
14
14
  };
15
- declare const getCanvasClient: (options: GetCanvasClientOptions) => CanvasClient;
16
- declare const getDefaultCanvasClient: (options: Pick<CompositionContext, "searchParams">) => Promise<CanvasClient>;
15
+ declare const getCanvasClient: (options: GetCanvasClientOptions) => CompositionDeliveryClient;
16
+ declare const getDefaultCanvasClient: (options: Pick<CompositionContext, "searchParams">) => Promise<CompositionDeliveryClient>;
17
17
 
18
18
  type GetManifestClientOptions = {
19
19
  cache: NonNullable<UniformServerConfig['manifestCache']>;
@@ -248,7 +248,7 @@ type RetrieveSlugOptions = Pick<CompositionGetBySlugParameters, 'slug' | 'locale
248
248
  [key: string]: string | undefined;
249
249
  };
250
250
  } & RetrieveCommonOptions;
251
- type RetrieveRouteFetchOptions = Omit<RouteGetParameters, 'projectId' | 'path' | 'withComponentIDs' | 'withContentSourceMap' | 'state'>;
251
+ type RetrieveRouteFetchOptions = Omit<RouteGetParameters, 'projectId' | 'path' | 'withComponentIDs' | 'state'>;
252
252
  declare const retrieveCompositionBySlug: ({ slug, searchParams, skipPrefetch, locale, releaseId, versionId, }: RetrieveSlugOptions) => Promise<ResolvedRouteGetResponse>;
253
253
  declare const retrieveRoute: ({ params, searchParams: providedSearchParams, skipPrefetch }: RetrieveRouteOptions, fetchOptions?: RetrieveRouteFetchOptions) => Promise<ResolvedRouteGetResponse>;
254
254
 
package/dist/index.esm.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import "server-only";
3
3
 
4
4
  // src/clients/canvasClient.ts
5
- import { CanvasClient } from "@uniformdev/canvas";
5
+ import { CompositionDeliveryClient } from "@uniformdev/canvas";
6
6
 
7
7
  // src/config/helpers.ts
8
8
  import serverConfig from "uniform.server.config";
@@ -185,7 +185,7 @@ var determineFetchCacheOptions = (mode) => {
185
185
 
186
186
  // src/clients/canvasClient.ts
187
187
  var getCanvasClient = (options) => {
188
- return new CanvasClient({
188
+ return new CompositionDeliveryClient({
189
189
  projectId: env.getProjectId(),
190
190
  apiHost: env.getApiHost(),
191
191
  apiKey: env.getApiKey(),
@@ -477,7 +477,6 @@ var retrieveCompositionBySlug = async ({
477
477
  releaseId,
478
478
  versionId
479
479
  }) => {
480
- var _a;
481
480
  if (!skipPrefetch) {
482
481
  void getManifest({
483
482
  searchParams
@@ -493,11 +492,10 @@ var retrieveCompositionBySlug = async ({
493
492
  searchParams
494
493
  });
495
494
  try {
496
- const composition = await canvasClient.getCompositionBySlug({
495
+ const composition = await canvasClient.get({
497
496
  slug,
498
497
  state,
499
498
  withComponentIDs: true,
500
- withContentSourceMap: isOnVercelPreviewEnvironment() && ((_a = getServerConfig().experimental) == null ? void 0 : _a.vercelVisualEditing),
501
499
  locale,
502
500
  releaseId,
503
501
  versionId
@@ -571,7 +569,6 @@ var retrieveRouteByPath = async ({
571
569
  fetchOptions,
572
570
  releaseId
573
571
  }) => {
574
- var _a;
575
572
  const client = await getDefaultRouteClient({
576
573
  searchParams
577
574
  });
@@ -588,13 +585,12 @@ var retrieveRouteByPath = async ({
588
585
  queryPath = `${helper.pathname}${helper.search}`;
589
586
  }
590
587
  }
591
- return await client.getRoute({
588
+ return await client.get({
592
589
  ...fetchOptions,
593
590
  path: queryPath,
594
591
  state,
595
592
  dataSourceVariant: getDataSourceVariantFromRouteGetParams(fetchOptions != null ? fetchOptions : {}, state),
596
593
  withComponentIDs: true,
597
- withContentSourceMap: isOnVercelPreviewEnvironment() && ((_a = getServerConfig().experimental) == null ? void 0 : _a.vercelVisualEditing),
598
594
  releaseId
599
595
  });
600
596
  };
@@ -1168,7 +1164,7 @@ var UniformPlayground = async ({ searchParams, ...rest }) => {
1168
1164
  for (let i = 0; i < possibleStates.length; i++) {
1169
1165
  const state = possibleStates[i];
1170
1166
  try {
1171
- composition = await canvasClient.getCompositionById({
1167
+ composition = await canvasClient.get({
1172
1168
  compositionId: id,
1173
1169
  state,
1174
1170
  withComponentIDs: true
package/dist/index.js CHANGED
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
30
  // src/index.ts
31
- var src_exports = {};
32
- __export(src_exports, {
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
33
  ContextUpdateTransfer: () => ContextUpdateTransfer,
34
34
  UniformComposition: () => UniformComposition,
35
35
  UniformContext: () => UniformContext,
@@ -54,7 +54,7 @@ __export(src_exports, {
54
54
  retrieveCompositionBySlug: () => retrieveCompositionBySlug,
55
55
  retrieveRoute: () => retrieveRoute
56
56
  });
57
- module.exports = __toCommonJS(src_exports);
57
+ module.exports = __toCommonJS(index_exports);
58
58
  var import_server_only = require("server-only");
59
59
 
60
60
  // src/clients/canvasClient.ts
@@ -238,7 +238,7 @@ var determineFetchCacheOptions = (mode) => {
238
238
 
239
239
  // src/clients/canvasClient.ts
240
240
  var getCanvasClient = (options) => {
241
- return new import_canvas2.CanvasClient({
241
+ return new import_canvas2.CompositionDeliveryClient({
242
242
  projectId: env.getProjectId(),
243
243
  apiHost: env.getApiHost(),
244
244
  apiKey: env.getApiKey(),
@@ -505,7 +505,6 @@ var retrieveCompositionBySlug = async ({
505
505
  releaseId,
506
506
  versionId
507
507
  }) => {
508
- var _a;
509
508
  if (!skipPrefetch) {
510
509
  void getManifest({
511
510
  searchParams
@@ -521,11 +520,10 @@ var retrieveCompositionBySlug = async ({
521
520
  searchParams
522
521
  });
523
522
  try {
524
- const composition = await canvasClient.getCompositionBySlug({
523
+ const composition = await canvasClient.get({
525
524
  slug,
526
525
  state,
527
526
  withComponentIDs: true,
528
- withContentSourceMap: isOnVercelPreviewEnvironment() && ((_a = getServerConfig().experimental) == null ? void 0 : _a.vercelVisualEditing),
529
527
  locale,
530
528
  releaseId,
531
529
  versionId
@@ -599,7 +597,6 @@ var retrieveRouteByPath = async ({
599
597
  fetchOptions,
600
598
  releaseId
601
599
  }) => {
602
- var _a;
603
600
  const client = await getDefaultRouteClient({
604
601
  searchParams
605
602
  });
@@ -616,13 +613,12 @@ var retrieveRouteByPath = async ({
616
613
  queryPath = `${helper.pathname}${helper.search}`;
617
614
  }
618
615
  }
619
- return await client.getRoute({
616
+ return await client.get({
620
617
  ...fetchOptions,
621
618
  path: queryPath,
622
619
  state,
623
620
  dataSourceVariant: (0, import_canvas4.getDataSourceVariantFromRouteGetParams)(fetchOptions != null ? fetchOptions : {}, state),
624
621
  withComponentIDs: true,
625
- withContentSourceMap: isOnVercelPreviewEnvironment() && ((_a = getServerConfig().experimental) == null ? void 0 : _a.vercelVisualEditing),
626
622
  releaseId
627
623
  });
628
624
  };
@@ -1188,7 +1184,7 @@ var UniformPlayground = async ({ searchParams, ...rest }) => {
1188
1184
  for (let i = 0; i < possibleStates.length; i++) {
1189
1185
  const state = possibleStates[i];
1190
1186
  try {
1191
- composition = await canvasClient.getCompositionById({
1187
+ composition = await canvasClient.get({
1192
1188
  compositionId: id,
1193
1189
  state,
1194
1190
  withComponentIDs: true
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  import "server-only";
3
3
 
4
4
  // src/clients/canvasClient.ts
5
- import { CanvasClient } from "@uniformdev/canvas";
5
+ import { CompositionDeliveryClient } from "@uniformdev/canvas";
6
6
 
7
7
  // src/config/helpers.ts
8
8
  import serverConfig from "uniform.server.config";
@@ -185,7 +185,7 @@ var determineFetchCacheOptions = (mode) => {
185
185
 
186
186
  // src/clients/canvasClient.ts
187
187
  var getCanvasClient = (options) => {
188
- return new CanvasClient({
188
+ return new CompositionDeliveryClient({
189
189
  projectId: env.getProjectId(),
190
190
  apiHost: env.getApiHost(),
191
191
  apiKey: env.getApiKey(),
@@ -477,7 +477,6 @@ var retrieveCompositionBySlug = async ({
477
477
  releaseId,
478
478
  versionId
479
479
  }) => {
480
- var _a;
481
480
  if (!skipPrefetch) {
482
481
  void getManifest({
483
482
  searchParams
@@ -493,11 +492,10 @@ var retrieveCompositionBySlug = async ({
493
492
  searchParams
494
493
  });
495
494
  try {
496
- const composition = await canvasClient.getCompositionBySlug({
495
+ const composition = await canvasClient.get({
497
496
  slug,
498
497
  state,
499
498
  withComponentIDs: true,
500
- withContentSourceMap: isOnVercelPreviewEnvironment() && ((_a = getServerConfig().experimental) == null ? void 0 : _a.vercelVisualEditing),
501
499
  locale,
502
500
  releaseId,
503
501
  versionId
@@ -571,7 +569,6 @@ var retrieveRouteByPath = async ({
571
569
  fetchOptions,
572
570
  releaseId
573
571
  }) => {
574
- var _a;
575
572
  const client = await getDefaultRouteClient({
576
573
  searchParams
577
574
  });
@@ -588,13 +585,12 @@ var retrieveRouteByPath = async ({
588
585
  queryPath = `${helper.pathname}${helper.search}`;
589
586
  }
590
587
  }
591
- return await client.getRoute({
588
+ return await client.get({
592
589
  ...fetchOptions,
593
590
  path: queryPath,
594
591
  state,
595
592
  dataSourceVariant: getDataSourceVariantFromRouteGetParams(fetchOptions != null ? fetchOptions : {}, state),
596
593
  withComponentIDs: true,
597
- withContentSourceMap: isOnVercelPreviewEnvironment() && ((_a = getServerConfig().experimental) == null ? void 0 : _a.vercelVisualEditing),
598
594
  releaseId
599
595
  });
600
596
  };
@@ -1168,7 +1164,7 @@ var UniformPlayground = async ({ searchParams, ...rest }) => {
1168
1164
  for (let i = 0; i < possibleStates.length; i++) {
1169
1165
  const state = possibleStates[i];
1170
1166
  try {
1171
- composition = await canvasClient.getCompositionById({
1167
+ composition = await canvasClient.get({
1172
1168
  compositionId: id,
1173
1169
  state,
1174
1170
  withComponentIDs: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-next-rsc",
3
- "version": "20.50.2-alpha.149+913f0b7b57",
3
+ "version": "20.50.2-alpha.167+74e60d5bb7",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "scripts": {
6
6
  "build": "tsup",
@@ -53,26 +53,26 @@
53
53
  "/dist"
54
54
  ],
55
55
  "devDependencies": {
56
- "@types/node": "24.3.1",
57
- "@types/react": "19.2.2",
58
- "next": "15.5.15",
56
+ "@types/node": "26.0.0",
57
+ "@types/react": "19.2.17",
58
+ "next": "15.5.19",
59
59
  "react": "19.2.1",
60
60
  "react-dom": "19.2.1"
61
61
  },
62
62
  "dependencies": {
63
- "@uniformdev/canvas": "20.50.2-alpha.149+913f0b7b57",
64
- "@uniformdev/canvas-next-rsc-client": "^20.50.2-alpha.149+913f0b7b57",
65
- "@uniformdev/canvas-next-rsc-shared": "^20.50.2-alpha.149+913f0b7b57",
66
- "@uniformdev/canvas-react": "20.50.2-alpha.149+913f0b7b57",
67
- "@uniformdev/context": "20.50.2-alpha.149+913f0b7b57",
68
- "@uniformdev/project-map": "20.50.2-alpha.149+913f0b7b57",
69
- "@uniformdev/redirect": "20.50.2-alpha.149+913f0b7b57",
70
- "@uniformdev/richtext": "20.50.2-alpha.149+913f0b7b57",
71
- "@uniformdev/webhooks": "20.50.2-alpha.149+913f0b7b57",
72
- "@vercel/edge-config": "^0.4.0",
63
+ "@uniformdev/canvas": "20.50.2-alpha.167+74e60d5bb7",
64
+ "@uniformdev/canvas-next-rsc-client": "^20.50.2-alpha.167+74e60d5bb7",
65
+ "@uniformdev/canvas-next-rsc-shared": "^20.50.2-alpha.167+74e60d5bb7",
66
+ "@uniformdev/canvas-react": "20.50.2-alpha.167+74e60d5bb7",
67
+ "@uniformdev/context": "20.50.2-alpha.167+74e60d5bb7",
68
+ "@uniformdev/project-map": "20.50.2-alpha.167+74e60d5bb7",
69
+ "@uniformdev/redirect": "20.50.2-alpha.167+74e60d5bb7",
70
+ "@uniformdev/richtext": "20.50.2-alpha.167+74e60d5bb7",
71
+ "@uniformdev/webhooks": "20.50.2-alpha.167+74e60d5bb7",
72
+ "@vercel/edge-config": "^1.4.3",
73
73
  "encoding": "^0.1.13",
74
74
  "server-only": "^0.0.1",
75
- "svix": "^1.5.0"
75
+ "svix": "^1.96.0"
76
76
  },
77
77
  "engines": {
78
78
  "node": "^18.18.0 || ^19.8.0 || >= 20.0.0"
@@ -85,5 +85,5 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "gitHead": "913f0b7b57295ca79575810663c56a7a5deea9e4"
88
+ "gitHead": "74e60d5bb79fe1c4d446e4d3e6edf9f08850be4f"
89
89
  }