@tailor-cms/ce-jodit-html-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.
@@ -1,7 +1,6 @@
1
- import { ElementData } from '@tailor-cms/ce-jodit-html-manifest';
1
+ import { Element } from '@tailor-cms/ce-jodit-html-manifest';
2
2
  type __VLS_Props = {
3
- id: number;
4
- data: ElementData;
3
+ element: Element;
5
4
  };
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, {}, HTMLDivElement>;
5
+ 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>;
7
6
  export default _default;
package/dist/index.cjs CHANGED
@@ -13,13 +13,36 @@ var ui = {
13
13
  // (e.g. 50/50 layout)
14
14
  forceFullWidth: false
15
15
  };
16
+ var ai = {
17
+ Schema: {
18
+ type: "json_schema",
19
+ name: "ce_jodit_html",
20
+ schema: {
21
+ type: "object",
22
+ properties: {
23
+ content: { type: "string" }
24
+ },
25
+ required: ["content"],
26
+ additionalProperties: false
27
+ }
28
+ },
29
+ getPrompt: () => `
30
+ Generate rich text for a page as an object with the following
31
+ properties: { "content": "" }
32
+ where:
33
+ - 'content' is the text of the page in HTML format. Include only the text
34
+ content, without the full HTML page structure.
35
+ `,
36
+ processResponse: (val) => val
37
+ };
16
38
  var manifest$1 = {
17
39
  type,
18
40
  version,
19
41
  name,
20
42
  ssr: false,
21
43
  initState,
22
- ui
44
+ ui,
45
+ ai
23
46
  };
24
47
  var index_default = manifest$1;
25
48
  const _hoisted_1 = { class: "ce-jodit-html-root" };
@@ -27,14 +50,13 @@ const _hoisted_2 = ["innerHTML"];
27
50
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
28
51
  __name: "Display",
29
52
  props: {
30
- id: {},
31
- data: {}
53
+ element: {}
32
54
  },
33
55
  setup(__props) {
34
56
  return (_ctx, _cache) => {
35
57
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
36
58
  vue.createElementVNode("span", {
37
- innerHTML: _ctx.data.content
59
+ innerHTML: _ctx.element.data.content
38
60
  }, null, 8, _hoisted_2)
39
61
  ]);
40
62
  };
@@ -47,7 +69,7 @@ const _export_sfc = (sfc, props) => {
47
69
  }
48
70
  return target;
49
71
  };
50
- const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ac151d53"]]);
72
+ const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-04b81a2b"]]);
51
73
  const manifest = {
52
74
  ...index_default,
53
75
  Display
package/dist/index.css CHANGED
@@ -1,4 +1,81 @@
1
- .ce-jodit-html-root[data-v-ac151d53] {
2
- font-family: Arial, Helvetica, sans-serif;
3
- font-size: 1rem;
1
+ .ce-jodit-html-root[data-v-04b81a2b] span * {
2
+ word-break: break-word;
3
+ }
4
+ .ce-jodit-html-root[data-v-04b81a2b] span > * + * {
5
+ margin-top: 0.75em;
6
+ }
7
+ .ce-jodit-html-root[data-v-04b81a2b] span h1,
8
+ .ce-jodit-html-root[data-v-04b81a2b] span h2,
9
+ .ce-jodit-html-root[data-v-04b81a2b] span h3,
10
+ .ce-jodit-html-root[data-v-04b81a2b] span h4,
11
+ .ce-jodit-html-root[data-v-04b81a2b] span h5,
12
+ .ce-jodit-html-root[data-v-04b81a2b] span h6 {
13
+ line-height: 1;
14
+ }
15
+ .ce-jodit-html-root[data-v-04b81a2b] span h1 {
16
+ font-size: 2.5rem;
17
+ }
18
+ .ce-jodit-html-root[data-v-04b81a2b] span h2 {
19
+ font-size: 2.25rem;
20
+ }
21
+ .ce-jodit-html-root[data-v-04b81a2b] span h3 {
22
+ font-size: 2rem;
23
+ }
24
+ .ce-jodit-html-root[data-v-04b81a2b] span h4 {
25
+ font-size: 1.75rem;
26
+ }
27
+ .ce-jodit-html-root[data-v-04b81a2b] span h5 {
28
+ font-size: 1.5rem;
29
+ }
30
+ .ce-jodit-html-root[data-v-04b81a2b] span h6 {
31
+ font-size: 1.25rem;
32
+ }
33
+ .ce-jodit-html-root[data-v-04b81a2b] span blockquote {
34
+ padding: 0.25rem 1rem;
35
+ border-left: 2px solid rgba(13, 13, 13, 0.1);
36
+ font-family: Georgia, "Times New Roman", Times, serif;
37
+ font-style: italic;
38
+ }
39
+ .ce-jodit-html-root[data-v-04b81a2b] span ul,
40
+ .ce-jodit-html-root[data-v-04b81a2b] span ol {
41
+ padding: 0 1.25rem;
42
+ }
43
+ .ce-jodit-html-root[data-v-04b81a2b] span code {
44
+ font-family: "Source Code Pro", monospace !important;
45
+ background: #eee;
46
+ padding: 0.125rem 0.5rem;
47
+ border-radius: 8px;
48
+ }
49
+ .ce-jodit-html-root[data-v-04b81a2b] span pre {
50
+ border-radius: 8px;
51
+ padding: 0.5rem 1rem;
52
+ background: #eee;
53
+ }
54
+ .ce-jodit-html-root[data-v-04b81a2b] span pre code {
55
+ padding: 0;
56
+ font-size: 0.875rem;
57
+ background: none;
58
+ }
59
+ .ce-jodit-html-root[data-v-04b81a2b] span hr {
60
+ border: none;
61
+ border-top: 2px solid rgba(13, 13, 13, 0.1);
62
+ margin: 2rem 0;
63
+ }
64
+ .ce-jodit-html-root[data-v-04b81a2b] span table {
65
+ width: 100%;
66
+ border-spacing: 0;
67
+ border-radius: 4px;
68
+ overflow: hidden;
69
+ border: 1px solid rgba(0, 0, 0, 0.12);
70
+ text-align: left;
71
+ }
72
+ .ce-jodit-html-root[data-v-04b81a2b] span table th,
73
+ .ce-jodit-html-root[data-v-04b81a2b] span table td {
74
+ padding: 0.75rem;
75
+ }
76
+ .ce-jodit-html-root[data-v-04b81a2b] span table th {
77
+ background-color: #fafafa;
78
+ }
79
+ .ce-jodit-html-root[data-v-04b81a2b] span table td {
80
+ border-top: 1px solid rgba(0, 0, 0, 0.12);
4
81
  }
package/dist/index.js CHANGED
@@ -11,13 +11,36 @@ var ui = {
11
11
  // (e.g. 50/50 layout)
12
12
  forceFullWidth: false
13
13
  };
14
+ var ai = {
15
+ Schema: {
16
+ type: "json_schema",
17
+ name: "ce_jodit_html",
18
+ schema: {
19
+ type: "object",
20
+ properties: {
21
+ content: { type: "string" }
22
+ },
23
+ required: ["content"],
24
+ additionalProperties: false
25
+ }
26
+ },
27
+ getPrompt: () => `
28
+ Generate rich text for a page as an object with the following
29
+ properties: { "content": "" }
30
+ where:
31
+ - 'content' is the text of the page in HTML format. Include only the text
32
+ content, without the full HTML page structure.
33
+ `,
34
+ processResponse: (val) => val
35
+ };
14
36
  var manifest$1 = {
15
37
  type,
16
38
  version,
17
39
  name,
18
40
  ssr: false,
19
41
  initState,
20
- ui
42
+ ui,
43
+ ai
21
44
  };
22
45
  var index_default = manifest$1;
23
46
  const _hoisted_1 = { class: "ce-jodit-html-root" };
@@ -25,14 +48,13 @@ const _hoisted_2 = ["innerHTML"];
25
48
  const _sfc_main = /* @__PURE__ */ defineComponent({
26
49
  __name: "Display",
27
50
  props: {
28
- id: {},
29
- data: {}
51
+ element: {}
30
52
  },
31
53
  setup(__props) {
32
54
  return (_ctx, _cache) => {
33
55
  return openBlock(), createElementBlock("div", _hoisted_1, [
34
56
  createElementVNode("span", {
35
- innerHTML: _ctx.data.content
57
+ innerHTML: _ctx.element.data.content
36
58
  }, null, 8, _hoisted_2)
37
59
  ]);
38
60
  };
@@ -45,7 +67,7 @@ const _export_sfc = (sfc, props) => {
45
67
  }
46
68
  return target;
47
69
  };
48
- const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ac151d53"]]);
70
+ const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-04b81a2b"]]);
49
71
  const manifest = {
50
72
  ...index_default,
51
73
  Display
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Tailor CMS Jodit HTML editor 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",
@@ -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-jodit-html-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-jodit-html-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
  }