@tailor-cms/ce-image-display 0.0.1 → 1.0.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.cjs CHANGED
@@ -5,8 +5,11 @@ const vue = require("vue");
5
5
  var type = "CE_IMAGE";
6
6
  var name = "Image";
7
7
  var initState = () => ({
8
- url: ""
8
+ url: null,
9
+ alt: "",
10
+ assets: {}
9
11
  });
12
+ var version = "1.0";
10
13
  var ui = {
11
14
  // Display icon, https://pictogrammers.com/library/mdi/
12
15
  icon: "mdi-image",
@@ -14,23 +17,17 @@ var ui = {
14
17
  // (e.g. 50/50 layout)
15
18
  forceFullWidth: true
16
19
  };
17
- var mocks = {
18
- displayContexts: [
19
- { name: "Test preset 1", data: { state: "I have a value" } },
20
- { name: "Test preset 2", data: { state: "I have a different value" } }
21
- ]
22
- };
23
20
  var manifest$1 = {
24
21
  type,
25
- version: "1.0",
22
+ version,
26
23
  name,
27
24
  ssr: false,
28
25
  initState,
29
- ui,
30
- mocks
26
+ ui
31
27
  };
32
28
  var src_default = manifest$1;
33
- const _hoisted_1 = { class: "d-flex align-center justify-center fill-height" };
29
+ const _hoisted_1 = { class: "tce-root" };
30
+ const _hoisted_2 = { class: "d-flex align-center justify-center fill-height" };
34
31
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
35
32
  __name: "Display",
36
33
  props: {
@@ -42,26 +39,56 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
42
39
  return (_ctx, _cache) => {
43
40
  const _component_VProgressCircular = vue.resolveComponent("VProgressCircular");
44
41
  const _component_VImg = vue.resolveComponent("VImg");
45
- return vue.openBlock(), vue.createBlock(_component_VImg, {
46
- src: _ctx.data.url,
47
- class: "mx-auto"
48
- }, {
49
- placeholder: vue.withCtx(() => [
50
- vue.createElementVNode("div", _hoisted_1, [
51
- vue.createVNode(_component_VProgressCircular, {
52
- color: "blue-grey-darken-3",
53
- indeterminate: ""
54
- })
55
- ])
56
- ]),
57
- _: 1
58
- }, 8, ["src"]);
42
+ const _component_VIcon = vue.resolveComponent("VIcon");
43
+ const _component_VSheet = vue.resolveComponent("VSheet");
44
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
45
+ _ctx.data.url ? (vue.openBlock(), vue.createBlock(_component_VImg, {
46
+ key: 0,
47
+ alt: _ctx.data.alt,
48
+ src: _ctx.data.url,
49
+ class: "mx-auto"
50
+ }, {
51
+ placeholder: vue.withCtx(() => [
52
+ vue.createElementVNode("div", _hoisted_2, [
53
+ vue.createVNode(_component_VProgressCircular, {
54
+ color: "blue-grey-darken-3",
55
+ indeterminate: ""
56
+ })
57
+ ])
58
+ ]),
59
+ _: 1
60
+ }, 8, ["alt", "src"])) : (vue.openBlock(), vue.createBlock(_component_VSheet, {
61
+ key: 1,
62
+ class: "d-flex justify-center align-center my-2 text-h6",
63
+ height: "15.5rem"
64
+ }, {
65
+ default: vue.withCtx(() => [
66
+ vue.createVNode(_component_VIcon, { class: "mr-2" }, {
67
+ default: vue.withCtx(() => [
68
+ vue.createTextVNode("mdi-image-outline")
69
+ ]),
70
+ _: 1
71
+ }),
72
+ vue.createTextVNode(" Image placeholder ")
73
+ ]),
74
+ _: 1
75
+ }))
76
+ ]);
59
77
  };
60
78
  }
61
79
  });
80
+ const Display_vue_vue_type_style_index_0_scoped_3caceda2_lang = "";
81
+ const _export_sfc = (sfc, props) => {
82
+ const target = sfc.__vccOpts || sfc;
83
+ for (const [key, val] of props) {
84
+ target[key] = val;
85
+ }
86
+ return target;
87
+ };
88
+ const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3caceda2"]]);
62
89
  const manifest = {
63
90
  ...src_default,
64
- Display: _sfc_main
91
+ Display
65
92
  };
66
- exports.Display = _sfc_main;
93
+ exports.Display = Display;
67
94
  exports.default = manifest;
package/dist/index.js CHANGED
@@ -1,10 +1,13 @@
1
1
  import "./style.css";
2
- import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode } from "vue";
2
+ import { defineComponent, resolveComponent, openBlock, createElementBlock, createBlock, withCtx, createElementVNode, createVNode, createTextVNode } from "vue";
3
3
  var type = "CE_IMAGE";
4
4
  var name = "Image";
5
5
  var initState = () => ({
6
- url: ""
6
+ url: null,
7
+ alt: "",
8
+ assets: {}
7
9
  });
10
+ var version = "1.0";
8
11
  var ui = {
9
12
  // Display icon, https://pictogrammers.com/library/mdi/
10
13
  icon: "mdi-image",
@@ -12,23 +15,17 @@ var ui = {
12
15
  // (e.g. 50/50 layout)
13
16
  forceFullWidth: true
14
17
  };
15
- var mocks = {
16
- displayContexts: [
17
- { name: "Test preset 1", data: { state: "I have a value" } },
18
- { name: "Test preset 2", data: { state: "I have a different value" } }
19
- ]
20
- };
21
18
  var manifest$1 = {
22
19
  type,
23
- version: "1.0",
20
+ version,
24
21
  name,
25
22
  ssr: false,
26
23
  initState,
27
- ui,
28
- mocks
24
+ ui
29
25
  };
30
26
  var src_default = manifest$1;
31
- const _hoisted_1 = { class: "d-flex align-center justify-center fill-height" };
27
+ const _hoisted_1 = { class: "tce-root" };
28
+ const _hoisted_2 = { class: "d-flex align-center justify-center fill-height" };
32
29
  const _sfc_main = /* @__PURE__ */ defineComponent({
33
30
  __name: "Display",
34
31
  props: {
@@ -40,28 +37,58 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
37
  return (_ctx, _cache) => {
41
38
  const _component_VProgressCircular = resolveComponent("VProgressCircular");
42
39
  const _component_VImg = resolveComponent("VImg");
43
- return openBlock(), createBlock(_component_VImg, {
44
- src: _ctx.data.url,
45
- class: "mx-auto"
46
- }, {
47
- placeholder: withCtx(() => [
48
- createElementVNode("div", _hoisted_1, [
49
- createVNode(_component_VProgressCircular, {
50
- color: "blue-grey-darken-3",
51
- indeterminate: ""
52
- })
53
- ])
54
- ]),
55
- _: 1
56
- }, 8, ["src"]);
40
+ const _component_VIcon = resolveComponent("VIcon");
41
+ const _component_VSheet = resolveComponent("VSheet");
42
+ return openBlock(), createElementBlock("div", _hoisted_1, [
43
+ _ctx.data.url ? (openBlock(), createBlock(_component_VImg, {
44
+ key: 0,
45
+ alt: _ctx.data.alt,
46
+ src: _ctx.data.url,
47
+ class: "mx-auto"
48
+ }, {
49
+ placeholder: withCtx(() => [
50
+ createElementVNode("div", _hoisted_2, [
51
+ createVNode(_component_VProgressCircular, {
52
+ color: "blue-grey-darken-3",
53
+ indeterminate: ""
54
+ })
55
+ ])
56
+ ]),
57
+ _: 1
58
+ }, 8, ["alt", "src"])) : (openBlock(), createBlock(_component_VSheet, {
59
+ key: 1,
60
+ class: "d-flex justify-center align-center my-2 text-h6",
61
+ height: "15.5rem"
62
+ }, {
63
+ default: withCtx(() => [
64
+ createVNode(_component_VIcon, { class: "mr-2" }, {
65
+ default: withCtx(() => [
66
+ createTextVNode("mdi-image-outline")
67
+ ]),
68
+ _: 1
69
+ }),
70
+ createTextVNode(" Image placeholder ")
71
+ ]),
72
+ _: 1
73
+ }))
74
+ ]);
57
75
  };
58
76
  }
59
77
  });
78
+ const Display_vue_vue_type_style_index_0_scoped_3caceda2_lang = "";
79
+ const _export_sfc = (sfc, props) => {
80
+ const target = sfc.__vccOpts || sfc;
81
+ for (const [key, val] of props) {
82
+ target[key] = val;
83
+ }
84
+ return target;
85
+ };
86
+ const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3caceda2"]]);
60
87
  const manifest = {
61
88
  ...src_default,
62
- Display: _sfc_main
89
+ Display
63
90
  };
64
91
  export {
65
- _sfc_main as Display,
92
+ Display,
66
93
  manifest as default
67
94
  };
package/dist/style.css CHANGED
@@ -1,9 +1,5 @@
1
1
 
2
- .tce-root[data-v-84c72b14] {
3
- background-color: transparent;
4
- margin-top: 1rem;
5
- padding: 1.25rem;
6
- border: 2px dashed #888;
2
+ .tce-root[data-v-3caceda2] {
7
3
  font-family: Arial, Helvetica, sans-serif;
8
4
  font-size: 1rem;
9
5
  }
package/package.json CHANGED
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "name": "@tailor-cms/ce-image-display",
3
+ "description": "Tailor CMS image element end-user component",
4
+ "author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
3
5
  "type": "module",
4
- "version": "0.0.1",
6
+ "version": "1.0.1",
5
7
  "exports": {
6
8
  ".": {
7
9
  "import": "./dist/index.js",
@@ -21,10 +23,8 @@
21
23
  "typescript": "^5.1.6",
22
24
  "vite": "^4.4.5",
23
25
  "vue-tsc": "^1.8.5",
24
- "tce-manifest": "npm:@tailor-cms/ce-image-manifest@0.0.1"
26
+ "@tailor-cms/ce-image-manifest": "1.0.1"
25
27
  },
26
- "description": "Tailor image element",
27
- "author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },