@tailor-cms/ce-file-display 0.0.1 → 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.
@@ -1,8 +1,7 @@
1
- import { ElementData } from '@tailor-cms/ce-file-manifest';
1
+ import { Element } from '@tailor-cms/ce-file-manifest';
2
2
  type __VLS_Props = {
3
- id: number;
4
- data: ElementData;
3
+ element: Element;
5
4
  userState: any;
6
5
  };
7
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
7
  export default _default;
package/dist/index.cjs CHANGED
@@ -30,18 +30,17 @@ const _hoisted_1 = { class: "tce-file-root" };
30
30
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
31
31
  __name: "Display",
32
32
  props: {
33
- id: {},
34
- data: {},
33
+ element: {},
35
34
  userState: {}
36
35
  },
37
36
  setup(__props) {
38
37
  const props = __props;
39
38
  const label = vue.computed(() => {
40
- const { data } = props;
39
+ const { data } = props.element;
41
40
  return data.label || "Download file";
42
41
  });
43
42
  const downloadFile = async () => {
44
- const { data } = props;
43
+ const { data } = props.element;
45
44
  const { url } = data;
46
45
  if (!url) return;
47
46
  const res = await fetch(url);
@@ -84,7 +83,7 @@ const _export_sfc = (sfc, props) => {
84
83
  }
85
84
  return target;
86
85
  };
87
- const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7501f8a1"]]);
86
+ const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7fce0cc6"]]);
88
87
  const manifest = {
89
88
  ...index_default,
90
89
  Display
package/dist/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- .tce-file-root[data-v-7501f8a1] {
2
+ .tce-file-root[data-v-7fce0cc6] {
3
3
  background-color: transparent;
4
4
  margin: 1rem;
5
5
  padding: 1.5rem;
package/dist/index.js CHANGED
@@ -28,18 +28,17 @@ const _hoisted_1 = { class: "tce-file-root" };
28
28
  const _sfc_main = /* @__PURE__ */ defineComponent({
29
29
  __name: "Display",
30
30
  props: {
31
- id: {},
32
- data: {},
31
+ element: {},
33
32
  userState: {}
34
33
  },
35
34
  setup(__props) {
36
35
  const props = __props;
37
36
  const label = computed(() => {
38
- const { data } = props;
37
+ const { data } = props.element;
39
38
  return data.label || "Download file";
40
39
  });
41
40
  const downloadFile = async () => {
42
- const { data } = props;
41
+ const { data } = props.element;
43
42
  const { url } = data;
44
43
  if (!url) return;
45
44
  const res = await fetch(url);
@@ -82,7 +81,7 @@ const _export_sfc = (sfc, props) => {
82
81
  }
83
82
  return target;
84
83
  };
85
- const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7501f8a1"]]);
84
+ const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7fce0cc6"]]);
86
85
  const manifest = {
87
86
  ...index_default,
88
87
  Display
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Tailor CMS file end-user component",
4
4
  "author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
5
5
  "type": "module",
6
- "version": "0.0.1",
6
+ "version": "0.1.0",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": "./dist/index.js",
@@ -19,20 +19,23 @@
19
19
  "vue": "^3.5.13"
20
20
  },
21
21
  "devDependencies": {
22
- "@tailor-cms/eslint-config": "0.0.2",
23
- "@vitejs/plugin-vue": "^5.2.1",
24
- "typescript": "^5.7.3",
25
- "vite": "^6.1.0",
26
- "vue-tsc": "^2.2.0",
27
- "@tailor-cms/ce-file-manifest": "0.0.1"
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-file-manifest": "0.1.0"
28
28
  },
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
32
  "scripts": {
33
33
  "dev": "vite build --watch",
34
- "build": "vue-tsc && vite build",
35
- "lint": "eslint --ext .js,.ts,.vue ./src",
36
- "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"
37
40
  }
38
41
  }