@uniformdev/canvas-vue 19.0.0 → 19.1.1-alpha.1

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.ts CHANGED
@@ -346,7 +346,7 @@ type UseUniformContextualEditingProps = {
346
346
  * WARNING: This enhancer will run on the client side. Make sure you're not exposing any secrets.
347
347
  * You can use `createUniformApiEnhancer` to create an enhancer based on an API route.
348
348
  */
349
- enhance?: (compositionUpdateMessage: UpdateCompositionMessage) => RootComponentInstance | Promise<RootComponentInstance>;
349
+ enhance?: (compositionUpdateMessage: Pick<UpdateCompositionMessage, 'composition' | 'hash'>) => RootComponentInstance | Promise<RootComponentInstance>;
350
350
  };
351
351
  /**
352
352
  * Adds contextual editing capability to a Uniform app.
@@ -734,7 +734,7 @@ declare const UniformComposition: vue_demi.DefineComponent<{
734
734
  default: string;
735
735
  };
736
736
  contextualEditingEnhancer: {
737
- type: PropType<((compositionUpdateMessage: _uniformdev_canvas.UpdateCompositionMessage) => {
737
+ type: PropType<((compositionUpdateMessage: Pick<_uniformdev_canvas.UpdateCompositionMessage, "composition" | "hash">) => {
738
738
  type: string;
739
739
  parameters?: {
740
740
  [key: string]: {
@@ -1210,7 +1210,7 @@ declare const UniformComposition: vue_demi.DefineComponent<{
1210
1210
  default: string;
1211
1211
  };
1212
1212
  contextualEditingEnhancer: {
1213
- type: PropType<((compositionUpdateMessage: _uniformdev_canvas.UpdateCompositionMessage) => {
1213
+ type: PropType<((compositionUpdateMessage: Pick<_uniformdev_canvas.UpdateCompositionMessage, "composition" | "hash">) => {
1214
1214
  type: string;
1215
1215
  parameters?: {
1216
1216
  [key: string]: {
package/dist/index.esm.js CHANGED
@@ -296,24 +296,24 @@ var ContextualEditingComponentWrapper = defineComponent3({
296
296
  const { isContextualEditing } = useUniformCurrentComposition();
297
297
  const isPlaceholder = ((_a = props.component) == null ? void 0 : _a._id) === PLACEHOLDER_ID;
298
298
  return () => {
299
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
300
- return !(isContextualEditing == null ? void 0 : isContextualEditing.value) ? (_b = (_a2 = context.slots).default) == null ? void 0 : _b.call(_a2) : [
299
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
300
+ return !(isContextualEditing == null ? void 0 : isContextualEditing.value) ? (_b = (_a2 = context.slots).default) == null ? void 0 : _b.call(_a2) : isPlaceholder && ((_d = (_c = context.slots).emptyPlaceholder) == null ? void 0 : _d.call(_c).length) === 0 ? [] : [
301
301
  h3("script", {
302
302
  "data-role": IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
303
- "data-parent-id": (_c = props.parentComponent) == null ? void 0 : _c._id,
304
- "data-parent-type": (_d = props.parentComponent) == null ? void 0 : _d.type,
305
- "data-component-id": (_e = props.component) == null ? void 0 : _e._id,
303
+ "data-parent-id": (_e = props.parentComponent) == null ? void 0 : _e._id,
304
+ "data-parent-type": (_f = props.parentComponent) == null ? void 0 : _f.type,
305
+ "data-component-id": (_g = props.component) == null ? void 0 : _g._id,
306
306
  "data-slot-name": props.slotName,
307
307
  "data-component-index": props.indexInSlot,
308
308
  "data-total-components": props.slotChildrenCount,
309
- "data-component-name": (_f = props.component) == null ? void 0 : _f.type,
309
+ "data-component-name": (_h = props.component) == null ? void 0 : _h.type,
310
310
  "data-is-placeholder": isPlaceholder ? "true" : void 0,
311
- "data-is-localized": ((_h = (_g = props.component) == null ? void 0 : _g.parameters) == null ? void 0 : _h[CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
311
+ "data-is-localized": ((_j = (_i = props.component) == null ? void 0 : _i.parameters) == null ? void 0 : _j[CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
312
312
  // TODO: use a proper way to get the component's title, don't assume that it's always "title"
313
313
  // https://linear.app/uniform/issue/UNI-937/show-the-right-component-title-in-the-highlighter
314
- "data-component-title": (_k = (_j = (_i = props.component) == null ? void 0 : _i.parameters) == null ? void 0 : _j.title) == null ? void 0 : _k.value
314
+ "data-component-title": (_m = (_l = (_k = props.component) == null ? void 0 : _k.parameters) == null ? void 0 : _l.title) == null ? void 0 : _m.value
315
315
  }),
316
- isPlaceholder && context.slots.emptyPlaceholder !== void 0 ? context.slots.emptyPlaceholder() : (_m = (_l = context.slots).default) == null ? void 0 : _m.call(_l),
316
+ isPlaceholder && context.slots.emptyPlaceholder !== void 0 ? context.slots.emptyPlaceholder() : (_o = (_n = context.slots).default) == null ? void 0 : _o.call(_n),
317
317
  h3("script", { "data-role": IN_CONTEXT_EDITOR_COMPONENT_END_ROLE })
318
318
  ];
319
319
  };
package/dist/index.js CHANGED
@@ -304,24 +304,24 @@ var ContextualEditingComponentWrapper = (0, import_vue_demi4.defineComponent)({
304
304
  const { isContextualEditing } = useUniformCurrentComposition();
305
305
  const isPlaceholder = ((_a = props.component) == null ? void 0 : _a._id) === import_canvas4.PLACEHOLDER_ID;
306
306
  return () => {
307
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
308
- return !(isContextualEditing == null ? void 0 : isContextualEditing.value) ? (_b = (_a2 = context.slots).default) == null ? void 0 : _b.call(_a2) : [
307
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
308
+ return !(isContextualEditing == null ? void 0 : isContextualEditing.value) ? (_b = (_a2 = context.slots).default) == null ? void 0 : _b.call(_a2) : isPlaceholder && ((_d = (_c = context.slots).emptyPlaceholder) == null ? void 0 : _d.call(_c).length) === 0 ? [] : [
309
309
  (0, import_vue_demi4.h)("script", {
310
310
  "data-role": import_canvas4.IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
311
- "data-parent-id": (_c = props.parentComponent) == null ? void 0 : _c._id,
312
- "data-parent-type": (_d = props.parentComponent) == null ? void 0 : _d.type,
313
- "data-component-id": (_e = props.component) == null ? void 0 : _e._id,
311
+ "data-parent-id": (_e = props.parentComponent) == null ? void 0 : _e._id,
312
+ "data-parent-type": (_f = props.parentComponent) == null ? void 0 : _f.type,
313
+ "data-component-id": (_g = props.component) == null ? void 0 : _g._id,
314
314
  "data-slot-name": props.slotName,
315
315
  "data-component-index": props.indexInSlot,
316
316
  "data-total-components": props.slotChildrenCount,
317
- "data-component-name": (_f = props.component) == null ? void 0 : _f.type,
317
+ "data-component-name": (_h = props.component) == null ? void 0 : _h.type,
318
318
  "data-is-placeholder": isPlaceholder ? "true" : void 0,
319
- "data-is-localized": ((_h = (_g = props.component) == null ? void 0 : _g.parameters) == null ? void 0 : _h[import_canvas4.CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
319
+ "data-is-localized": ((_j = (_i = props.component) == null ? void 0 : _i.parameters) == null ? void 0 : _j[import_canvas4.CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
320
320
  // TODO: use a proper way to get the component's title, don't assume that it's always "title"
321
321
  // https://linear.app/uniform/issue/UNI-937/show-the-right-component-title-in-the-highlighter
322
- "data-component-title": (_k = (_j = (_i = props.component) == null ? void 0 : _i.parameters) == null ? void 0 : _j.title) == null ? void 0 : _k.value
322
+ "data-component-title": (_m = (_l = (_k = props.component) == null ? void 0 : _k.parameters) == null ? void 0 : _l.title) == null ? void 0 : _m.value
323
323
  }),
324
- isPlaceholder && context.slots.emptyPlaceholder !== void 0 ? context.slots.emptyPlaceholder() : (_m = (_l = context.slots).default) == null ? void 0 : _m.call(_l),
324
+ isPlaceholder && context.slots.emptyPlaceholder !== void 0 ? context.slots.emptyPlaceholder() : (_o = (_n = context.slots).default) == null ? void 0 : _o.call(_n),
325
325
  (0, import_vue_demi4.h)("script", { "data-role": import_canvas4.IN_CONTEXT_EDITOR_COMPONENT_END_ROLE })
326
326
  ];
327
327
  };
package/dist/index.mjs CHANGED
@@ -296,24 +296,24 @@ var ContextualEditingComponentWrapper = defineComponent3({
296
296
  const { isContextualEditing } = useUniformCurrentComposition();
297
297
  const isPlaceholder = ((_a = props.component) == null ? void 0 : _a._id) === PLACEHOLDER_ID;
298
298
  return () => {
299
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
300
- return !(isContextualEditing == null ? void 0 : isContextualEditing.value) ? (_b = (_a2 = context.slots).default) == null ? void 0 : _b.call(_a2) : [
299
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
300
+ return !(isContextualEditing == null ? void 0 : isContextualEditing.value) ? (_b = (_a2 = context.slots).default) == null ? void 0 : _b.call(_a2) : isPlaceholder && ((_d = (_c = context.slots).emptyPlaceholder) == null ? void 0 : _d.call(_c).length) === 0 ? [] : [
301
301
  h3("script", {
302
302
  "data-role": IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
303
- "data-parent-id": (_c = props.parentComponent) == null ? void 0 : _c._id,
304
- "data-parent-type": (_d = props.parentComponent) == null ? void 0 : _d.type,
305
- "data-component-id": (_e = props.component) == null ? void 0 : _e._id,
303
+ "data-parent-id": (_e = props.parentComponent) == null ? void 0 : _e._id,
304
+ "data-parent-type": (_f = props.parentComponent) == null ? void 0 : _f.type,
305
+ "data-component-id": (_g = props.component) == null ? void 0 : _g._id,
306
306
  "data-slot-name": props.slotName,
307
307
  "data-component-index": props.indexInSlot,
308
308
  "data-total-components": props.slotChildrenCount,
309
- "data-component-name": (_f = props.component) == null ? void 0 : _f.type,
309
+ "data-component-name": (_h = props.component) == null ? void 0 : _h.type,
310
310
  "data-is-placeholder": isPlaceholder ? "true" : void 0,
311
- "data-is-localized": ((_h = (_g = props.component) == null ? void 0 : _g.parameters) == null ? void 0 : _h[CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
311
+ "data-is-localized": ((_j = (_i = props.component) == null ? void 0 : _i.parameters) == null ? void 0 : _j[CANVAS_LOCALE_TAG_PARAM]) ? "true" : void 0,
312
312
  // TODO: use a proper way to get the component's title, don't assume that it's always "title"
313
313
  // https://linear.app/uniform/issue/UNI-937/show-the-right-component-title-in-the-highlighter
314
- "data-component-title": (_k = (_j = (_i = props.component) == null ? void 0 : _i.parameters) == null ? void 0 : _j.title) == null ? void 0 : _k.value
314
+ "data-component-title": (_m = (_l = (_k = props.component) == null ? void 0 : _k.parameters) == null ? void 0 : _l.title) == null ? void 0 : _m.value
315
315
  }),
316
- isPlaceholder && context.slots.emptyPlaceholder !== void 0 ? context.slots.emptyPlaceholder() : (_m = (_l = context.slots).default) == null ? void 0 : _m.call(_l),
316
+ isPlaceholder && context.slots.emptyPlaceholder !== void 0 ? context.slots.emptyPlaceholder() : (_o = (_n = context.slots).default) == null ? void 0 : _o.call(_n),
317
317
  h3("script", { "data-role": IN_CONTEXT_EDITOR_COMPONENT_END_ROLE })
318
318
  ];
319
319
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-vue",
3
- "version": "19.0.0",
3
+ "version": "19.1.1-alpha.1+3ec68fe9d",
4
4
  "description": "Vue SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -23,8 +23,8 @@
23
23
  "document": "api-extractor run --local"
24
24
  },
25
25
  "dependencies": {
26
- "@uniformdev/canvas": "19.0.0",
27
- "@uniformdev/context-vue": "19.0.0",
26
+ "@uniformdev/canvas": "19.1.1-alpha.1+3ec68fe9d",
27
+ "@uniformdev/context-vue": "19.1.1-alpha.1+3ec68fe9d",
28
28
  "@vue/test-utils": "2.3.2",
29
29
  "vue-demi": "^0.14.0"
30
30
  },
@@ -62,5 +62,5 @@
62
62
  "last 2 versions",
63
63
  "not dead"
64
64
  ],
65
- "gitHead": "e104985924b24a8de1d8dcfcca6c9167611adf85"
65
+ "gitHead": "3ec68fe9d54c7128e57cc8a5c8116fe968f65865"
66
66
  }