@uniformdev/canvas-vue 18.38.2-alpha.6 → 19.1.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
@@ -167,7 +167,6 @@ import {
167
167
  isUpdateCompositionMessage
168
168
  } from "@uniformdev/canvas";
169
169
  import { computed as computed2, onMounted, ref, watch } from "vue-demi";
170
- var createApiEnhancer = createUniformApiEnhancer;
171
170
  var registeredCompositionIds = /* @__PURE__ */ new Set();
172
171
  var useUniformContextualEditing = ({
173
172
  initialCompositionValue,
@@ -260,7 +259,6 @@ function isInContextEditingMode() {
260
259
  );
261
260
  return isOpenedByInContextEditor && isAllowlistedReferrer;
262
261
  }
263
- var useContextualEditing = useUniformContextualEditing;
264
262
 
265
263
  // src/utils/constants.ts
266
264
  var globalCompositionEnhancerInjectionKey = "uniformGlobalCompositionEnhancer";
@@ -298,24 +296,24 @@ var ContextualEditingComponentWrapper = defineComponent3({
298
296
  const { isContextualEditing } = useUniformCurrentComposition();
299
297
  const isPlaceholder = ((_a = props.component) == null ? void 0 : _a._id) === PLACEHOLDER_ID;
300
298
  return () => {
301
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
302
- 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 ? [] : [
303
301
  h3("script", {
304
302
  "data-role": IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
305
- "data-parent-id": (_c = props.parentComponent) == null ? void 0 : _c._id,
306
- "data-parent-type": (_d = props.parentComponent) == null ? void 0 : _d.type,
307
- "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,
308
306
  "data-slot-name": props.slotName,
309
307
  "data-component-index": props.indexInSlot,
310
308
  "data-total-components": props.slotChildrenCount,
311
- "data-component-name": (_f = props.component) == null ? void 0 : _f.type,
309
+ "data-component-name": (_h = props.component) == null ? void 0 : _h.type,
312
310
  "data-is-placeholder": isPlaceholder ? "true" : void 0,
313
- "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,
314
312
  // TODO: use a proper way to get the component's title, don't assume that it's always "title"
315
313
  // https://linear.app/uniform/issue/UNI-937/show-the-right-component-title-in-the-highlighter
316
- "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
317
315
  }),
318
- 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),
319
317
  h3("script", { "data-role": IN_CONTEXT_EDITOR_COMPONENT_END_ROLE })
320
318
  ];
321
319
  };
@@ -382,7 +380,6 @@ var UniformComposition = defineComponent4({
382
380
  );
383
381
  }
384
382
  });
385
- var Composition = UniformComposition;
386
383
 
387
384
  // src/components/UniformSlot.ts
388
385
  import {
@@ -548,7 +545,6 @@ function renderComponent({
548
545
  );
549
546
  return h5("");
550
547
  }
551
- var SlotContent = UniformSlot;
552
548
 
553
549
  // src/composables/useCompositionEventEffect.ts
554
550
  import {
@@ -587,18 +583,14 @@ async function useCompositionEventEffect({
587
583
  );
588
584
  }
589
585
  export {
590
- Composition,
591
586
  DefaultNotImplementedComponent,
592
- SlotContent,
593
587
  UniformComponent,
594
588
  UniformComposition,
595
589
  UniformSlot,
596
590
  convertComponentToProps,
597
- createApiEnhancer,
598
591
  createUniformApiEnhancer,
599
592
  globalCompositionEnhancerInjectionKey,
600
593
  useCompositionEventEffect,
601
- useContextualEditing,
602
594
  useUniformContextualEditing,
603
595
  useUniformCurrentComponent,
604
596
  useUniformCurrentComposition
package/dist/index.js CHANGED
@@ -20,18 +20,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var src_exports = {};
22
22
  __export(src_exports, {
23
- Composition: () => Composition,
24
23
  DefaultNotImplementedComponent: () => DefaultNotImplementedComponent,
25
- SlotContent: () => SlotContent,
26
24
  UniformComponent: () => UniformComponent,
27
25
  UniformComposition: () => UniformComposition,
28
26
  UniformSlot: () => UniformSlot,
29
27
  convertComponentToProps: () => convertComponentToProps,
30
- createApiEnhancer: () => createApiEnhancer,
31
28
  createUniformApiEnhancer: () => import_canvas3.createUniformApiEnhancer,
32
29
  globalCompositionEnhancerInjectionKey: () => globalCompositionEnhancerInjectionKey,
33
30
  useCompositionEventEffect: () => useCompositionEventEffect,
34
- useContextualEditing: () => useContextualEditing,
35
31
  useUniformContextualEditing: () => useUniformContextualEditing,
36
32
  useUniformCurrentComponent: () => useUniformCurrentComponent,
37
33
  useUniformCurrentComposition: () => useUniformCurrentComposition
@@ -184,7 +180,6 @@ var import_vue_demi5 = require("vue-demi");
184
180
  // src/composables/useUniformContextualEditing.ts
185
181
  var import_canvas3 = require("@uniformdev/canvas");
186
182
  var import_vue_demi3 = require("vue-demi");
187
- var createApiEnhancer = import_canvas3.createUniformApiEnhancer;
188
183
  var registeredCompositionIds = /* @__PURE__ */ new Set();
189
184
  var useUniformContextualEditing = ({
190
185
  initialCompositionValue,
@@ -277,7 +272,6 @@ function isInContextEditingMode() {
277
272
  );
278
273
  return isOpenedByInContextEditor && isAllowlistedReferrer;
279
274
  }
280
- var useContextualEditing = useUniformContextualEditing;
281
275
 
282
276
  // src/utils/constants.ts
283
277
  var globalCompositionEnhancerInjectionKey = "uniformGlobalCompositionEnhancer";
@@ -310,24 +304,24 @@ var ContextualEditingComponentWrapper = (0, import_vue_demi4.defineComponent)({
310
304
  const { isContextualEditing } = useUniformCurrentComposition();
311
305
  const isPlaceholder = ((_a = props.component) == null ? void 0 : _a._id) === import_canvas4.PLACEHOLDER_ID;
312
306
  return () => {
313
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
314
- 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 ? [] : [
315
309
  (0, import_vue_demi4.h)("script", {
316
310
  "data-role": import_canvas4.IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
317
- "data-parent-id": (_c = props.parentComponent) == null ? void 0 : _c._id,
318
- "data-parent-type": (_d = props.parentComponent) == null ? void 0 : _d.type,
319
- "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,
320
314
  "data-slot-name": props.slotName,
321
315
  "data-component-index": props.indexInSlot,
322
316
  "data-total-components": props.slotChildrenCount,
323
- "data-component-name": (_f = props.component) == null ? void 0 : _f.type,
317
+ "data-component-name": (_h = props.component) == null ? void 0 : _h.type,
324
318
  "data-is-placeholder": isPlaceholder ? "true" : void 0,
325
- "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,
326
320
  // TODO: use a proper way to get the component's title, don't assume that it's always "title"
327
321
  // https://linear.app/uniform/issue/UNI-937/show-the-right-component-title-in-the-highlighter
328
- "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
329
323
  }),
330
- 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),
331
325
  (0, import_vue_demi4.h)("script", { "data-role": import_canvas4.IN_CONTEXT_EDITOR_COMPONENT_END_ROLE })
332
326
  ];
333
327
  };
@@ -394,7 +388,6 @@ var UniformComposition = (0, import_vue_demi5.defineComponent)({
394
388
  );
395
389
  }
396
390
  });
397
- var Composition = UniformComposition;
398
391
 
399
392
  // src/components/UniformSlot.ts
400
393
  var import_canvas5 = require("@uniformdev/canvas");
@@ -553,7 +546,6 @@ function renderComponent({
553
546
  );
554
547
  return (0, import_vue_demi6.h)("");
555
548
  }
556
- var SlotContent = UniformSlot;
557
549
 
558
550
  // src/composables/useCompositionEventEffect.ts
559
551
  var import_canvas6 = require("@uniformdev/canvas");
@@ -589,18 +581,14 @@ async function useCompositionEventEffect({
589
581
  }
590
582
  // Annotate the CommonJS export names for ESM import in node:
591
583
  0 && (module.exports = {
592
- Composition,
593
584
  DefaultNotImplementedComponent,
594
- SlotContent,
595
585
  UniformComponent,
596
586
  UniformComposition,
597
587
  UniformSlot,
598
588
  convertComponentToProps,
599
- createApiEnhancer,
600
589
  createUniformApiEnhancer,
601
590
  globalCompositionEnhancerInjectionKey,
602
591
  useCompositionEventEffect,
603
- useContextualEditing,
604
592
  useUniformContextualEditing,
605
593
  useUniformCurrentComponent,
606
594
  useUniformCurrentComposition
package/dist/index.mjs CHANGED
@@ -167,7 +167,6 @@ import {
167
167
  isUpdateCompositionMessage
168
168
  } from "@uniformdev/canvas";
169
169
  import { computed as computed2, onMounted, ref, watch } from "vue-demi";
170
- var createApiEnhancer = createUniformApiEnhancer;
171
170
  var registeredCompositionIds = /* @__PURE__ */ new Set();
172
171
  var useUniformContextualEditing = ({
173
172
  initialCompositionValue,
@@ -260,7 +259,6 @@ function isInContextEditingMode() {
260
259
  );
261
260
  return isOpenedByInContextEditor && isAllowlistedReferrer;
262
261
  }
263
- var useContextualEditing = useUniformContextualEditing;
264
262
 
265
263
  // src/utils/constants.ts
266
264
  var globalCompositionEnhancerInjectionKey = "uniformGlobalCompositionEnhancer";
@@ -298,24 +296,24 @@ var ContextualEditingComponentWrapper = defineComponent3({
298
296
  const { isContextualEditing } = useUniformCurrentComposition();
299
297
  const isPlaceholder = ((_a = props.component) == null ? void 0 : _a._id) === PLACEHOLDER_ID;
300
298
  return () => {
301
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
302
- 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 ? [] : [
303
301
  h3("script", {
304
302
  "data-role": IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
305
- "data-parent-id": (_c = props.parentComponent) == null ? void 0 : _c._id,
306
- "data-parent-type": (_d = props.parentComponent) == null ? void 0 : _d.type,
307
- "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,
308
306
  "data-slot-name": props.slotName,
309
307
  "data-component-index": props.indexInSlot,
310
308
  "data-total-components": props.slotChildrenCount,
311
- "data-component-name": (_f = props.component) == null ? void 0 : _f.type,
309
+ "data-component-name": (_h = props.component) == null ? void 0 : _h.type,
312
310
  "data-is-placeholder": isPlaceholder ? "true" : void 0,
313
- "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,
314
312
  // TODO: use a proper way to get the component's title, don't assume that it's always "title"
315
313
  // https://linear.app/uniform/issue/UNI-937/show-the-right-component-title-in-the-highlighter
316
- "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
317
315
  }),
318
- 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),
319
317
  h3("script", { "data-role": IN_CONTEXT_EDITOR_COMPONENT_END_ROLE })
320
318
  ];
321
319
  };
@@ -382,7 +380,6 @@ var UniformComposition = defineComponent4({
382
380
  );
383
381
  }
384
382
  });
385
- var Composition = UniformComposition;
386
383
 
387
384
  // src/components/UniformSlot.ts
388
385
  import {
@@ -548,7 +545,6 @@ function renderComponent({
548
545
  );
549
546
  return h5("");
550
547
  }
551
- var SlotContent = UniformSlot;
552
548
 
553
549
  // src/composables/useCompositionEventEffect.ts
554
550
  import {
@@ -587,18 +583,14 @@ async function useCompositionEventEffect({
587
583
  );
588
584
  }
589
585
  export {
590
- Composition,
591
586
  DefaultNotImplementedComponent,
592
- SlotContent,
593
587
  UniformComponent,
594
588
  UniformComposition,
595
589
  UniformSlot,
596
590
  convertComponentToProps,
597
- createApiEnhancer,
598
591
  createUniformApiEnhancer,
599
592
  globalCompositionEnhancerInjectionKey,
600
593
  useCompositionEventEffect,
601
- useContextualEditing,
602
594
  useUniformContextualEditing,
603
595
  useUniformCurrentComponent,
604
596
  useUniformCurrentComposition
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-vue",
3
- "version": "18.38.2-alpha.6+d4938f167",
3
+ "version": "19.1.0",
4
4
  "description": "Vue SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -23,12 +23,12 @@
23
23
  "document": "api-extractor run --local"
24
24
  },
25
25
  "dependencies": {
26
- "@uniformdev/canvas": "18.38.2-alpha.6+d4938f167",
26
+ "@uniformdev/canvas": "19.1.0",
27
+ "@uniformdev/context-vue": "19.1.0",
27
28
  "@vue/test-utils": "2.3.2",
28
29
  "vue-demi": "^0.14.0"
29
30
  },
30
31
  "peerDependencies": {
31
- "@uniformdev/context-vue": ">=18.0.0",
32
32
  "@vue/composition-api": "^1.0.0-rc.1",
33
33
  "vue": "^2.0.0 || >=3.0.0"
34
34
  },
@@ -40,7 +40,6 @@
40
40
  "devDependencies": {
41
41
  "@testing-library/vue": "7.0.0",
42
42
  "@types/uuid": "9.0.1",
43
- "@uniformdev/context-vue": "18.38.2-alpha.6+d4938f167",
44
43
  "@vue/server-test-utils": "1.3.0",
45
44
  "vue": "3.2.45",
46
45
  "vue-server-renderer": "2.7.14",
@@ -63,5 +62,5 @@
63
62
  "last 2 versions",
64
63
  "not dead"
65
64
  ],
66
- "gitHead": "d4938f167d196bbd523e6cdd031f56fab4ceebf6"
65
+ "gitHead": "0a06bc3cbf5a3ef7eb72b7ba237e76df645a4a88"
67
66
  }