@tailor-cms/ce-embed-display 0.0.8 → 0.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.
@@ -0,0 +1,11 @@
1
+ import { Element } from '@tailor-cms/ce-embed-manifest';
2
+ type __VLS_Props = {
3
+ element: Element;
4
+ userState: any;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ interaction: (...args: any[]) => void;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onInteraction?: ((...args: any[]) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ export default _default;
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- var import_style = require("./style.css");
2
+ var import_index = require("./index.css");
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
4
4
  const vue = require("vue");
5
5
  var type = "EMBED";
@@ -20,25 +20,25 @@ var manifest$1 = {
20
20
  initState,
21
21
  ui
22
22
  };
23
- var src_default = manifest$1;
24
- const _hoisted_1 = { class: "tce-root" };
23
+ var index_default = manifest$1;
24
+ const _hoisted_1 = { class: "tce-embed-root" };
25
25
  const _hoisted_2 = ["height", "src"];
26
26
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
27
27
  __name: "Display",
28
28
  props: {
29
- id: {},
30
- data: {},
29
+ element: {},
31
30
  userState: {}
32
31
  },
33
32
  emits: ["interaction"],
34
- setup(__props, { emit }) {
33
+ setup(__props, { emit: __emit }) {
35
34
  const props = __props;
36
- const submit = () => emit("interaction", { id: props.id });
35
+ const emit = __emit;
36
+ const submit = () => emit("interaction", { id: props.element.id });
37
37
  return (_ctx, _cache) => {
38
38
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
39
39
  vue.createElementVNode("iframe", {
40
- height: _ctx.data.height,
41
- src: _ctx.data.url,
40
+ height: _ctx.element.data.height,
41
+ src: _ctx.element.data.url,
42
42
  class: "d-block w-100",
43
43
  frameborder: "0",
44
44
  title: "PDF Viewer",
@@ -48,7 +48,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
48
48
  };
49
49
  }
50
50
  });
51
- const Display_vue_vue_type_style_index_0_scoped_78779c51_lang = "";
52
51
  const _export_sfc = (sfc, props) => {
53
52
  const target = sfc.__vccOpts || sfc;
54
53
  for (const [key, val] of props) {
@@ -56,9 +55,9 @@ const _export_sfc = (sfc, props) => {
56
55
  }
57
56
  return target;
58
57
  };
59
- const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-78779c51"]]);
58
+ const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f2a36528"]]);
60
59
  const manifest = {
61
- ...src_default,
60
+ ...index_default,
62
61
  Display
63
62
  };
64
63
  exports.Display = Display;
package/dist/index.css ADDED
@@ -0,0 +1,3 @@
1
+
2
+ .tce-embed-root[data-v-f2a36528] {
3
+ }
@@ -0,0 +1,5 @@
1
+ import type { ElementManifest } from '@tailor-cms/ce-embed-manifest';
2
+ import Display from './components/Display.vue';
3
+ declare const manifest: ElementManifest;
4
+ export default manifest;
5
+ export { Display };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import "./style.css";
2
- import { defineComponent, openBlock, createElementBlock, createElementVNode } from "vue";
1
+ import "./index.css";
2
+ import { defineComponent, createElementBlock, openBlock, createElementVNode } from "vue";
3
3
  var type = "EMBED";
4
4
  var name = "Embed";
5
5
  var initState = () => ({ height: 260 });
@@ -18,25 +18,25 @@ var manifest$1 = {
18
18
  initState,
19
19
  ui
20
20
  };
21
- var src_default = manifest$1;
22
- const _hoisted_1 = { class: "tce-root" };
21
+ var index_default = manifest$1;
22
+ const _hoisted_1 = { class: "tce-embed-root" };
23
23
  const _hoisted_2 = ["height", "src"];
24
24
  const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  __name: "Display",
26
26
  props: {
27
- id: {},
28
- data: {},
27
+ element: {},
29
28
  userState: {}
30
29
  },
31
30
  emits: ["interaction"],
32
- setup(__props, { emit }) {
31
+ setup(__props, { emit: __emit }) {
33
32
  const props = __props;
34
- const submit = () => emit("interaction", { id: props.id });
33
+ const emit = __emit;
34
+ const submit = () => emit("interaction", { id: props.element.id });
35
35
  return (_ctx, _cache) => {
36
36
  return openBlock(), createElementBlock("div", _hoisted_1, [
37
37
  createElementVNode("iframe", {
38
- height: _ctx.data.height,
39
- src: _ctx.data.url,
38
+ height: _ctx.element.data.height,
39
+ src: _ctx.element.data.url,
40
40
  class: "d-block w-100",
41
41
  frameborder: "0",
42
42
  title: "PDF Viewer",
@@ -46,7 +46,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
46
  };
47
47
  }
48
48
  });
49
- const Display_vue_vue_type_style_index_0_scoped_78779c51_lang = "";
50
49
  const _export_sfc = (sfc, props) => {
51
50
  const target = sfc.__vccOpts || sfc;
52
51
  for (const [key, val] of props) {
@@ -54,9 +53,9 @@ const _export_sfc = (sfc, props) => {
54
53
  }
55
54
  return target;
56
55
  };
57
- const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-78779c51"]]);
56
+ const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f2a36528"]]);
58
57
  const manifest = {
59
- ...src_default,
58
+ ...index_default,
60
59
  Display
61
60
  };
62
61
  export {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Tailor CMS embed element end-user component",
4
4
  "author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
5
5
  "type": "module",
6
- "version": "0.0.8",
6
+ "version": "0.1.0",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": "./dist/index.js",
@@ -11,27 +11,31 @@
11
11
  }
12
12
  },
13
13
  "main": "./dist/index.cjs",
14
+ "types": "./types/index.d.ts",
14
15
  "files": [
15
16
  "dist"
16
17
  ],
17
18
  "peerDependencies": {
18
- "vue": "^3.3.4"
19
+ "vue": "^3.5.13"
19
20
  },
20
21
  "devDependencies": {
21
- "@tailor-cms/eslint-config": "0.0.2",
22
- "@vitejs/plugin-vue": "^4.2.3",
23
- "typescript": "^5.1.6",
24
- "vite": "^4.4.5",
25
- "vue-tsc": "^1.8.5",
26
- "@tailor-cms/ce-embed-manifest": "0.0.8"
22
+ "@tailor-cms/eslint-config": "1.1.2",
23
+ "@vitejs/plugin-vue": "^6.0.0",
24
+ "typescript": "^5.8.3",
25
+ "vite": "^7.0.3",
26
+ "vue-tsc": "^3.0.1",
27
+ "@tailor-cms/ce-embed-manifest": "0.1.0"
27
28
  },
28
29
  "publishConfig": {
29
30
  "access": "public"
30
31
  },
31
32
  "scripts": {
32
33
  "dev": "vite build --watch",
33
- "build": "vue-tsc --noEmit && vite build",
34
- "lint": "eslint --ext .js,.ts,.vue ./src",
35
- "lint:fix": "pnpm lint --fix"
34
+ "build": "pnpm nuke:dist && vue-tsc && vite build",
35
+ "lint": "eslint ./src",
36
+ "lint:fix": "pnpm lint --fix",
37
+ "nuke": "pnpm dlx del-cli dist node_modules",
38
+ "nuke:dist": "pnpm dlx del-cli dist",
39
+ "prepublish": "pnpm build"
36
40
  }
37
41
  }
package/dist/style.css DELETED
@@ -1,4 +0,0 @@
1
- .tce-root[data-v-78779c51] {
2
- font-family: Arial, Helvetica, sans-serif;
3
- font-size: 1rem;
4
- }