@uniformdev/canvas-react 19.41.0 → 19.42.0

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.esm.js CHANGED
@@ -330,9 +330,10 @@ function ContextualEditingComponentWrapper({
330
330
  emptyPlaceholder,
331
331
  children
332
332
  }) {
333
- var _a, _b, _c, _d;
333
+ var _a, _b, _c, _d, _e;
334
334
  const isPlaceholder = (component == null ? void 0 : component._id) === PLACEHOLDER_ID;
335
335
  const { isContextualEditing } = useUniformCurrentComposition();
336
+ const isEditable = ((_a = component == null ? void 0 : component._contextualEditing) == null ? void 0 : _a.isEditable) ? "true" : void 0;
336
337
  return !isContextualEditing ? /* @__PURE__ */ React4.createElement(React4.Fragment, null, children) : isPlaceholder && emptyPlaceholder === null ? null : /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
337
338
  "script",
338
339
  {
@@ -345,8 +346,9 @@ function ContextualEditingComponentWrapper({
345
346
  "data-total-components": slotChildrenCount != null ? slotChildrenCount : "",
346
347
  "data-component-name": component == null ? void 0 : component.type,
347
348
  "data-is-placeholder": isPlaceholder ? "true" : void 0,
348
- "data-is-localized": ((_a = component == null ? void 0 : component.parameters) == null ? void 0 : _a[CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
349
- "data-component-title": (_d = (_c = (_b = component == null ? void 0 : component.parameters) == null ? void 0 : _b.title) == null ? void 0 : _c.value) != null ? _d : ""
349
+ "data-is-localized": ((_b = component == null ? void 0 : component.parameters) == null ? void 0 : _b[CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
350
+ "data-component-title": (_e = (_d = (_c = component == null ? void 0 : component.parameters) == null ? void 0 : _c.title) == null ? void 0 : _d.value) != null ? _e : "",
351
+ "data-is-editable": isEditable
350
352
  }
351
353
  ), isPlaceholder && emptyPlaceholder !== void 0 ? emptyPlaceholder : children, /* @__PURE__ */ React4.createElement("script", { "data-role": IN_CONTEXT_EDITOR_COMPONENT_END_ROLE }));
352
354
  }
package/dist/index.js CHANGED
@@ -362,9 +362,10 @@ function ContextualEditingComponentWrapper({
362
362
  emptyPlaceholder,
363
363
  children
364
364
  }) {
365
- var _a, _b, _c, _d;
365
+ var _a, _b, _c, _d, _e;
366
366
  const isPlaceholder = (component == null ? void 0 : component._id) === import_canvas4.PLACEHOLDER_ID;
367
367
  const { isContextualEditing } = useUniformCurrentComposition();
368
+ const isEditable = ((_a = component == null ? void 0 : component._contextualEditing) == null ? void 0 : _a.isEditable) ? "true" : void 0;
368
369
  return !isContextualEditing ? /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, children) : isPlaceholder && emptyPlaceholder === null ? null : /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement(
369
370
  "script",
370
371
  {
@@ -377,8 +378,9 @@ function ContextualEditingComponentWrapper({
377
378
  "data-total-components": slotChildrenCount != null ? slotChildrenCount : "",
378
379
  "data-component-name": component == null ? void 0 : component.type,
379
380
  "data-is-placeholder": isPlaceholder ? "true" : void 0,
380
- "data-is-localized": ((_a = component == null ? void 0 : component.parameters) == null ? void 0 : _a[import_canvas4.CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
381
- "data-component-title": (_d = (_c = (_b = component == null ? void 0 : component.parameters) == null ? void 0 : _b.title) == null ? void 0 : _c.value) != null ? _d : ""
381
+ "data-is-localized": ((_b = component == null ? void 0 : component.parameters) == null ? void 0 : _b[import_canvas4.CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
382
+ "data-component-title": (_e = (_d = (_c = component == null ? void 0 : component.parameters) == null ? void 0 : _c.title) == null ? void 0 : _d.value) != null ? _e : "",
383
+ "data-is-editable": isEditable
382
384
  }
383
385
  ), isPlaceholder && emptyPlaceholder !== void 0 ? emptyPlaceholder : children, /* @__PURE__ */ import_react4.default.createElement("script", { "data-role": import_canvas4.IN_CONTEXT_EDITOR_COMPONENT_END_ROLE }));
384
386
  }
package/dist/index.mjs CHANGED
@@ -330,9 +330,10 @@ function ContextualEditingComponentWrapper({
330
330
  emptyPlaceholder,
331
331
  children
332
332
  }) {
333
- var _a, _b, _c, _d;
333
+ var _a, _b, _c, _d, _e;
334
334
  const isPlaceholder = (component == null ? void 0 : component._id) === PLACEHOLDER_ID;
335
335
  const { isContextualEditing } = useUniformCurrentComposition();
336
+ const isEditable = ((_a = component == null ? void 0 : component._contextualEditing) == null ? void 0 : _a.isEditable) ? "true" : void 0;
336
337
  return !isContextualEditing ? /* @__PURE__ */ React4.createElement(React4.Fragment, null, children) : isPlaceholder && emptyPlaceholder === null ? null : /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
337
338
  "script",
338
339
  {
@@ -345,8 +346,9 @@ function ContextualEditingComponentWrapper({
345
346
  "data-total-components": slotChildrenCount != null ? slotChildrenCount : "",
346
347
  "data-component-name": component == null ? void 0 : component.type,
347
348
  "data-is-placeholder": isPlaceholder ? "true" : void 0,
348
- "data-is-localized": ((_a = component == null ? void 0 : component.parameters) == null ? void 0 : _a[CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
349
- "data-component-title": (_d = (_c = (_b = component == null ? void 0 : component.parameters) == null ? void 0 : _b.title) == null ? void 0 : _c.value) != null ? _d : ""
349
+ "data-is-localized": ((_b = component == null ? void 0 : component.parameters) == null ? void 0 : _b[CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
350
+ "data-component-title": (_e = (_d = (_c = component == null ? void 0 : component.parameters) == null ? void 0 : _c.title) == null ? void 0 : _d.value) != null ? _e : "",
351
+ "data-is-editable": isEditable
350
352
  }
351
353
  ), isPlaceholder && emptyPlaceholder !== void 0 ? emptyPlaceholder : children, /* @__PURE__ */ React4.createElement("script", { "data-role": IN_CONTEXT_EDITOR_COMPONENT_END_ROLE }));
352
354
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-react",
3
- "version": "19.41.0",
3
+ "version": "19.42.0",
4
4
  "description": "React SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -24,10 +24,10 @@
24
24
  "document": "api-extractor run --local"
25
25
  },
26
26
  "dependencies": {
27
- "@uniformdev/canvas": "19.41.0",
28
- "@uniformdev/context": "19.41.0",
29
- "@uniformdev/context-react": "19.41.0",
30
- "@uniformdev/richtext": "19.41.0"
27
+ "@uniformdev/canvas": "19.42.0",
28
+ "@uniformdev/context": "19.42.0",
29
+ "@uniformdev/context-react": "19.42.0",
30
+ "@uniformdev/richtext": "19.42.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": ">= 16 || 17 || 18",
@@ -44,5 +44,5 @@
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "gitHead": "cd4f9fd5bbdcba2b7f7235dbf342418a6bbaacb9"
47
+ "gitHead": "33ed87d09bfb50c8557c6bcf4eb232c76f7c99d8"
48
48
  }