@uniformdev/canvas-next 20.35.1-alpha.228 → 20.35.1-alpha.238

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.
@@ -216,6 +216,7 @@ function createRouteFetcher(options) {
216
216
  var _a, _b;
217
217
  const {
218
218
  contextualEditingCompositionId,
219
+ contextualEditingPath,
219
220
  resolvedUrl,
220
221
  defaultFetchState: defaultPreviewState
221
222
  } = parseContext(context);
@@ -262,7 +263,7 @@ function createRouteFetcher(options) {
262
263
  ),
263
264
  duration
264
265
  );
265
- if (contextualEditingCompositionId) {
266
+ if (contextualEditingCompositionId && contextualEditingPath === nodePath) {
266
267
  const previewEmptyComposition = await invokeCompositionResult(
267
268
  {
268
269
  type: "composition",
@@ -359,9 +360,10 @@ var withUniformGetServerSideProps = (options) => {
359
360
  defaultHandleNotFound,
360
361
  defaultHandleRedirect,
361
362
  parseContext(context) {
362
- var _a, _b;
363
+ var _a, _b, _c, _d;
363
364
  return {
364
365
  contextualEditingCompositionId: ((_a = context.previewData) == null ? void 0 : _a.isUniformContextualEditing) ? (_b = context.previewData) == null ? void 0 : _b.compositionId : void 0,
366
+ contextualEditingPath: ((_c = context.previewData) == null ? void 0 : _c.isUniformContextualEditing) ? (_d = context.previewData) == null ? void 0 : _d.compositionPath : void 0,
365
367
  resolvedUrl: context.resolvedUrl,
366
368
  // auto engage draft content when in next preview mode
367
369
  // (can override with explicit setting of request options)'
@@ -468,12 +470,13 @@ var withUniformGetStaticProps = (options) => {
468
470
  defaultHandleNotFound,
469
471
  defaultHandleRedirect,
470
472
  parseContext(context) {
471
- var _a, _b, _c;
473
+ var _a, _b, _c, _d, _e;
472
474
  return {
473
475
  contextualEditingCompositionId: ((_a = context.previewData) == null ? void 0 : _a.isUniformContextualEditing) ? (_b = context.previewData) == null ? void 0 : _b.compositionId : void 0,
476
+ contextualEditingPath: ((_c = context.previewData) == null ? void 0 : _c.isUniformContextualEditing) ? (_d = context.previewData) == null ? void 0 : _d.compositionPath : void 0,
474
477
  resolvedUrl: resolveSlugFromParams({
475
478
  params: context.params,
476
- param: (_c = options == null ? void 0 : options.param) != null ? _c : "route"
479
+ param: (_e = options == null ? void 0 : options.param) != null ? _e : "route"
477
480
  }),
478
481
  // auto engage draft content when in next preview mode
479
482
  // (can override with explicit setting of request options)
@@ -94,6 +94,7 @@ function createRouteFetcher(options) {
94
94
  var _a, _b;
95
95
  const {
96
96
  contextualEditingCompositionId,
97
+ contextualEditingPath,
97
98
  resolvedUrl,
98
99
  defaultFetchState: defaultPreviewState
99
100
  } = parseContext(context);
@@ -140,7 +141,7 @@ function createRouteFetcher(options) {
140
141
  ),
141
142
  duration
142
143
  );
143
- if (contextualEditingCompositionId) {
144
+ if (contextualEditingCompositionId && contextualEditingPath === nodePath) {
144
145
  const previewEmptyComposition = await invokeCompositionResult(
145
146
  {
146
147
  type: "composition",
@@ -237,9 +238,10 @@ var withUniformGetServerSideProps = (options) => {
237
238
  defaultHandleNotFound,
238
239
  defaultHandleRedirect,
239
240
  parseContext(context) {
240
- var _a, _b;
241
+ var _a, _b, _c, _d;
241
242
  return {
242
243
  contextualEditingCompositionId: ((_a = context.previewData) == null ? void 0 : _a.isUniformContextualEditing) ? (_b = context.previewData) == null ? void 0 : _b.compositionId : void 0,
244
+ contextualEditingPath: ((_c = context.previewData) == null ? void 0 : _c.isUniformContextualEditing) ? (_d = context.previewData) == null ? void 0 : _d.compositionPath : void 0,
243
245
  resolvedUrl: context.resolvedUrl,
244
246
  // auto engage draft content when in next preview mode
245
247
  // (can override with explicit setting of request options)'
@@ -336,12 +338,13 @@ var withUniformGetStaticProps = (options) => {
336
338
  defaultHandleNotFound,
337
339
  defaultHandleRedirect,
338
340
  parseContext(context) {
339
- var _a, _b, _c;
341
+ var _a, _b, _c, _d, _e;
340
342
  return {
341
343
  contextualEditingCompositionId: ((_a = context.previewData) == null ? void 0 : _a.isUniformContextualEditing) ? (_b = context.previewData) == null ? void 0 : _b.compositionId : void 0,
344
+ contextualEditingPath: ((_c = context.previewData) == null ? void 0 : _c.isUniformContextualEditing) ? (_d = context.previewData) == null ? void 0 : _d.compositionPath : void 0,
342
345
  resolvedUrl: resolveSlugFromParams({
343
346
  params: context.params,
344
- param: (_c = options == null ? void 0 : options.param) != null ? _c : "route"
347
+ param: (_e = options == null ? void 0 : options.param) != null ? _e : "route"
345
348
  }),
346
349
  // auto engage draft content when in next preview mode
347
350
  // (can override with explicit setting of request options)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-next",
3
- "version": "20.35.1-alpha.228+26f6f414c9",
3
+ "version": "20.35.1-alpha.238+9863606d41",
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.35.1-alpha.228+26f6f414c9",
71
- "@uniformdev/canvas-react": "20.35.1-alpha.228+26f6f414c9",
72
- "@uniformdev/context": "20.35.1-alpha.228+26f6f414c9",
73
- "@uniformdev/project-map": "20.35.1-alpha.228+26f6f414c9",
74
- "@uniformdev/redirect": "20.35.1-alpha.228+26f6f414c9",
75
- "@uniformdev/richtext": "20.35.1-alpha.228+26f6f414c9",
70
+ "@uniformdev/canvas": "20.35.1-alpha.238+9863606d41",
71
+ "@uniformdev/canvas-react": "20.35.1-alpha.238+9863606d41",
72
+ "@uniformdev/context": "20.35.1-alpha.238+9863606d41",
73
+ "@uniformdev/project-map": "20.35.1-alpha.238+9863606d41",
74
+ "@uniformdev/redirect": "20.35.1-alpha.238+9863606d41",
75
+ "@uniformdev/richtext": "20.35.1-alpha.238+9863606d41",
76
76
  "colorette": "2.0.20"
77
77
  },
78
78
  "peerDependencies": {
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "devDependencies": {
84
84
  "@types/react": "19.2.2",
85
- "next": "16.0.7",
85
+ "next": "16.0.10",
86
86
  "react": "19.2.1",
87
87
  "react-dom": "19.2.1"
88
88
  },
@@ -92,5 +92,5 @@
92
92
  "publishConfig": {
93
93
  "access": "public"
94
94
  },
95
- "gitHead": "26f6f414c9725e8e36785bcf51e62e8b15331f2e"
95
+ "gitHead": "9863606d41f4248fa790dbf7da6db6a755bda19a"
96
96
  }