@uniformdev/canvas-vue 19.198.3-alpha.5 → 19.199.1-alpha.8

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
@@ -1,5 +1,5 @@
1
1
  // src/components/DefaultNotImplementedComponent.ts
2
- import { CANVAS_LOCALIZATION_TYPE } from "@uniformdev/canvas";
2
+ import { CANVAS_LOCALIZATION_TYPE, EMPTY_COMPOSITION } from "@uniformdev/canvas";
3
3
  import { defineComponent, h } from "vue-demi";
4
4
  var wrapperStyles = {
5
5
  borderLeft: "4px solid #e42535",
@@ -21,8 +21,25 @@ var DefaultNotImplementedComponent = defineComponent({
21
21
  setup(props, { attrs }) {
22
22
  var _a;
23
23
  const componentType = (_a = props.component) == null ? void 0 : _a.type;
24
+ if (componentType === EMPTY_COMPOSITION.type) {
25
+ return () => h("div", {}, [
26
+ h("style", {
27
+ innerHTML: `@keyframes _uniformDelayedFadeIn { 0%,75% { opacity: 0; } to { opacity: 1; } }`
28
+ }),
29
+ h("p", { style: { animation: "_uniformDelayedFadeIn 3s" } }, [
30
+ h("span", {}, "This component only works inside Uniform Canvas editor."),
31
+ h("br"),
32
+ h("span", {}, "If you think this is an error, try "),
33
+ h(
34
+ "a",
35
+ { href: "", style: { fontWeight: "bolder", textDecoration: "underline" } },
36
+ "reloading the page"
37
+ )
38
+ ])
39
+ ]);
40
+ }
24
41
  if (componentType === CANVAS_LOCALIZATION_TYPE) {
25
- h("div", { key: "content", style: wrapperStyles }, [
42
+ return () => h("div", { key: "content", style: wrapperStyles }, [
26
43
  h("p", [
27
44
  `Seems like localization is not enabled in your application. Please read our documentation on how to `,
28
45
  h(
@@ -161,7 +178,7 @@ import {
161
178
  import {
162
179
  createCanvasChannel,
163
180
  createUniformApiEnhancer,
164
- EMPTY_COMPOSITION,
181
+ EMPTY_COMPOSITION as EMPTY_COMPOSITION2,
165
182
  IN_CONTEXT_EDITOR_EMBED_SCRIPT_ID,
166
183
  IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,
167
184
  isAllowedReferrer,
@@ -198,7 +215,7 @@ var useUniformContextualEditing = ({
198
215
  }],
199
216
  (_newValue, _oldValue, onCleanup) => {
200
217
  var _a, _b, _c, _d, _e, _f, _g;
201
- if (((_a = contextualComposition.value) == null ? void 0 : _a._id) && ((_b = initialCompositionValue == null ? void 0 : initialCompositionValue.value) == null ? void 0 : _b._id) !== EMPTY_COMPOSITION._id && ((_c = initialCompositionValue == null ? void 0 : initialCompositionValue.value) == null ? void 0 : _c._id) !== ((_d = contextualComposition.value) == null ? void 0 : _d._id)) {
218
+ if (((_a = contextualComposition.value) == null ? void 0 : _a._id) && ((_b = initialCompositionValue == null ? void 0 : initialCompositionValue.value) == null ? void 0 : _b._id) !== EMPTY_COMPOSITION2._id && ((_c = initialCompositionValue == null ? void 0 : initialCompositionValue.value) == null ? void 0 : _c._id) !== ((_d = contextualComposition.value) == null ? void 0 : _d._id)) {
202
219
  contextualComposition.value = void 0;
203
220
  return;
204
221
  }
@@ -216,7 +233,7 @@ var useUniformContextualEditing = ({
216
233
  contextualComposition.value = enhancedComposition;
217
234
  latestEventTimeStamp = message.eventTimestamp;
218
235
  });
219
- if (((_f = initialCompositionValue == null ? void 0 : initialCompositionValue.value) == null ? void 0 : _f._id) !== EMPTY_COMPOSITION._id) {
236
+ if (((_f = initialCompositionValue == null ? void 0 : initialCompositionValue.value) == null ? void 0 : _f._id) !== EMPTY_COMPOSITION2._id) {
220
237
  registeredCompositionIds.add((_g = initialCompositionValue == null ? void 0 : initialCompositionValue.value) == null ? void 0 : _g._id);
221
238
  }
222
239
  onCleanup(() => {
@@ -571,7 +588,7 @@ var UniformComposition = defineComponent5({
571
588
  var UniformComposition_default = UniformComposition;
572
589
 
573
590
  // src/components/UniformPlayground.ts
574
- import { EMPTY_COMPOSITION as EMPTY_COMPOSITION2 } from "@uniformdev/canvas";
591
+ import { EMPTY_COMPOSITION as EMPTY_COMPOSITION3 } from "@uniformdev/canvas";
575
592
  import { defineComponent as defineComponent6, h as h6 } from "vue-demi";
576
593
  var UniformPlayground = defineComponent6({
577
594
  name: "UniformPlayground",
@@ -582,7 +599,7 @@ var UniformPlayground = defineComponent6({
582
599
  }
583
600
  },
584
601
  setup(props) {
585
- return () => h6(UniformComposition_default, { data: EMPTY_COMPOSITION2, resolveRenderer: props.resolveRenderer });
602
+ return () => h6(UniformComposition_default, { data: EMPTY_COMPOSITION3, resolveRenderer: props.resolveRenderer });
586
603
  }
587
604
  });
588
605
 
package/dist/index.js CHANGED
@@ -74,8 +74,25 @@ var DefaultNotImplementedComponent = (0, import_vue_demi.defineComponent)({
74
74
  setup(props, { attrs }) {
75
75
  var _a;
76
76
  const componentType = (_a = props.component) == null ? void 0 : _a.type;
77
+ if (componentType === import_canvas.EMPTY_COMPOSITION.type) {
78
+ return () => (0, import_vue_demi.h)("div", {}, [
79
+ (0, import_vue_demi.h)("style", {
80
+ innerHTML: `@keyframes _uniformDelayedFadeIn { 0%,75% { opacity: 0; } to { opacity: 1; } }`
81
+ }),
82
+ (0, import_vue_demi.h)("p", { style: { animation: "_uniformDelayedFadeIn 3s" } }, [
83
+ (0, import_vue_demi.h)("span", {}, "This component only works inside Uniform Canvas editor."),
84
+ (0, import_vue_demi.h)("br"),
85
+ (0, import_vue_demi.h)("span", {}, "If you think this is an error, try "),
86
+ (0, import_vue_demi.h)(
87
+ "a",
88
+ { href: "", style: { fontWeight: "bolder", textDecoration: "underline" } },
89
+ "reloading the page"
90
+ )
91
+ ])
92
+ ]);
93
+ }
77
94
  if (componentType === import_canvas.CANVAS_LOCALIZATION_TYPE) {
78
- (0, import_vue_demi.h)("div", { key: "content", style: wrapperStyles }, [
95
+ return () => (0, import_vue_demi.h)("div", { key: "content", style: wrapperStyles }, [
79
96
  (0, import_vue_demi.h)("p", [
80
97
  `Seems like localization is not enabled in your application. Please read our documentation on how to `,
81
98
  (0, import_vue_demi.h)(
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/components/DefaultNotImplementedComponent.ts
2
- import { CANVAS_LOCALIZATION_TYPE } from "@uniformdev/canvas";
2
+ import { CANVAS_LOCALIZATION_TYPE, EMPTY_COMPOSITION } from "@uniformdev/canvas";
3
3
  import { defineComponent, h } from "vue-demi";
4
4
  var wrapperStyles = {
5
5
  borderLeft: "4px solid #e42535",
@@ -21,8 +21,25 @@ var DefaultNotImplementedComponent = defineComponent({
21
21
  setup(props, { attrs }) {
22
22
  var _a;
23
23
  const componentType = (_a = props.component) == null ? void 0 : _a.type;
24
+ if (componentType === EMPTY_COMPOSITION.type) {
25
+ return () => h("div", {}, [
26
+ h("style", {
27
+ innerHTML: `@keyframes _uniformDelayedFadeIn { 0%,75% { opacity: 0; } to { opacity: 1; } }`
28
+ }),
29
+ h("p", { style: { animation: "_uniformDelayedFadeIn 3s" } }, [
30
+ h("span", {}, "This component only works inside Uniform Canvas editor."),
31
+ h("br"),
32
+ h("span", {}, "If you think this is an error, try "),
33
+ h(
34
+ "a",
35
+ { href: "", style: { fontWeight: "bolder", textDecoration: "underline" } },
36
+ "reloading the page"
37
+ )
38
+ ])
39
+ ]);
40
+ }
24
41
  if (componentType === CANVAS_LOCALIZATION_TYPE) {
25
- h("div", { key: "content", style: wrapperStyles }, [
42
+ return () => h("div", { key: "content", style: wrapperStyles }, [
26
43
  h("p", [
27
44
  `Seems like localization is not enabled in your application. Please read our documentation on how to `,
28
45
  h(
@@ -161,7 +178,7 @@ import {
161
178
  import {
162
179
  createCanvasChannel,
163
180
  createUniformApiEnhancer,
164
- EMPTY_COMPOSITION,
181
+ EMPTY_COMPOSITION as EMPTY_COMPOSITION2,
165
182
  IN_CONTEXT_EDITOR_EMBED_SCRIPT_ID,
166
183
  IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,
167
184
  isAllowedReferrer,
@@ -198,7 +215,7 @@ var useUniformContextualEditing = ({
198
215
  }],
199
216
  (_newValue, _oldValue, onCleanup) => {
200
217
  var _a, _b, _c, _d, _e, _f, _g;
201
- if (((_a = contextualComposition.value) == null ? void 0 : _a._id) && ((_b = initialCompositionValue == null ? void 0 : initialCompositionValue.value) == null ? void 0 : _b._id) !== EMPTY_COMPOSITION._id && ((_c = initialCompositionValue == null ? void 0 : initialCompositionValue.value) == null ? void 0 : _c._id) !== ((_d = contextualComposition.value) == null ? void 0 : _d._id)) {
218
+ if (((_a = contextualComposition.value) == null ? void 0 : _a._id) && ((_b = initialCompositionValue == null ? void 0 : initialCompositionValue.value) == null ? void 0 : _b._id) !== EMPTY_COMPOSITION2._id && ((_c = initialCompositionValue == null ? void 0 : initialCompositionValue.value) == null ? void 0 : _c._id) !== ((_d = contextualComposition.value) == null ? void 0 : _d._id)) {
202
219
  contextualComposition.value = void 0;
203
220
  return;
204
221
  }
@@ -216,7 +233,7 @@ var useUniformContextualEditing = ({
216
233
  contextualComposition.value = enhancedComposition;
217
234
  latestEventTimeStamp = message.eventTimestamp;
218
235
  });
219
- if (((_f = initialCompositionValue == null ? void 0 : initialCompositionValue.value) == null ? void 0 : _f._id) !== EMPTY_COMPOSITION._id) {
236
+ if (((_f = initialCompositionValue == null ? void 0 : initialCompositionValue.value) == null ? void 0 : _f._id) !== EMPTY_COMPOSITION2._id) {
220
237
  registeredCompositionIds.add((_g = initialCompositionValue == null ? void 0 : initialCompositionValue.value) == null ? void 0 : _g._id);
221
238
  }
222
239
  onCleanup(() => {
@@ -571,7 +588,7 @@ var UniformComposition = defineComponent5({
571
588
  var UniformComposition_default = UniformComposition;
572
589
 
573
590
  // src/components/UniformPlayground.ts
574
- import { EMPTY_COMPOSITION as EMPTY_COMPOSITION2 } from "@uniformdev/canvas";
591
+ import { EMPTY_COMPOSITION as EMPTY_COMPOSITION3 } from "@uniformdev/canvas";
575
592
  import { defineComponent as defineComponent6, h as h6 } from "vue-demi";
576
593
  var UniformPlayground = defineComponent6({
577
594
  name: "UniformPlayground",
@@ -582,7 +599,7 @@ var UniformPlayground = defineComponent6({
582
599
  }
583
600
  },
584
601
  setup(props) {
585
- return () => h6(UniformComposition_default, { data: EMPTY_COMPOSITION2, resolveRenderer: props.resolveRenderer });
602
+ return () => h6(UniformComposition_default, { data: EMPTY_COMPOSITION3, resolveRenderer: props.resolveRenderer });
586
603
  }
587
604
  });
588
605
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-vue",
3
- "version": "19.198.3-alpha.5+c37bbd4ef2",
3
+ "version": "19.199.1-alpha.8+8e9e9ec9d1",
4
4
  "description": "Vue SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -23,9 +23,9 @@
23
23
  "document": "api-extractor run --local"
24
24
  },
25
25
  "dependencies": {
26
- "@uniformdev/canvas": "19.198.3-alpha.5+c37bbd4ef2",
27
- "@uniformdev/context-vue": "19.198.3-alpha.5+c37bbd4ef2",
28
- "@uniformdev/richtext": "19.198.3-alpha.5+c37bbd4ef2",
26
+ "@uniformdev/canvas": "19.199.1-alpha.8+8e9e9ec9d1",
27
+ "@uniformdev/context-vue": "19.199.1-alpha.8+8e9e9ec9d1",
28
+ "@uniformdev/richtext": "19.199.1-alpha.8+8e9e9ec9d1",
29
29
  "vue-demi": "^0.14.0"
30
30
  },
31
31
  "peerDependencies": {
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "c37bbd4ef2353582b4125b9dd21599634ecd5165"
62
+ "gitHead": "8e9e9ec9d1fb834f92360e8c80771dd037fbc21a"
63
63
  }