@tailor-cms/ce-jodit-html-display 0.0.8 → 2.0.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.
- package/dist/components/Display.vue.d.ts +4 -4
- package/dist/index.cjs +65 -47
- package/dist/index.css +80 -3
- package/dist/index.js +61 -48
- package/package.json +19 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Element } from '@tailor-cms/ce-jodit-html-manifest';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
|
|
4
|
-
data: ElementData;
|
|
3
|
+
element: Element;
|
|
5
4
|
};
|
|
6
|
-
declare const
|
|
5
|
+
declare const __VLS_export: 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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
7
|
export default _default;
|
package/dist/index.cjs
CHANGED
|
@@ -1,56 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
require('./index.css');let vue = require("vue");
|
|
6
|
+
//#region ../manifest/dist/index.mjs
|
|
5
7
|
var type = "JODIT_HTML";
|
|
6
8
|
var name = "Jodit HTML";
|
|
7
9
|
var initState = () => ({ content: "" });
|
|
8
|
-
var
|
|
9
|
-
var ui = {
|
|
10
|
-
// Display icon, https://pictogrammers.com/library/mdi/
|
|
11
|
-
icon: "mdi-text-box-outline",
|
|
12
|
-
// Does element support only full width or can be used within layouts
|
|
13
|
-
// (e.g. 50/50 layout)
|
|
14
|
-
forceFullWidth: false
|
|
15
|
-
};
|
|
10
|
+
var isEmpty = (data) => !data.content;
|
|
16
11
|
var manifest$1 = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
type,
|
|
13
|
+
version: "1.0",
|
|
14
|
+
name,
|
|
15
|
+
ssr: false,
|
|
16
|
+
initState,
|
|
17
|
+
isEmpty,
|
|
18
|
+
ui: {
|
|
19
|
+
icon: "mdi-text-box-outline",
|
|
20
|
+
forceFullWidth: false
|
|
21
|
+
},
|
|
22
|
+
ai: {
|
|
23
|
+
Schema: {
|
|
24
|
+
type: "json_schema",
|
|
25
|
+
name: "ce_jodit_html",
|
|
26
|
+
schema: {
|
|
27
|
+
type: "object",
|
|
28
|
+
properties: { content: { type: "string" } },
|
|
29
|
+
required: ["content"],
|
|
30
|
+
additionalProperties: false
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
getPrompt: () => `
|
|
34
|
+
Generate rich text for a page as an object with the following
|
|
35
|
+
properties: { "content": "" }
|
|
36
|
+
where:
|
|
37
|
+
- 'content' is the text of the page in HTML format. Include only the text
|
|
38
|
+
content, without the full HTML page structure.
|
|
39
|
+
`,
|
|
40
|
+
processResponse: (val) => val
|
|
41
|
+
}
|
|
23
42
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
vue.createElementVNode("span", {
|
|
37
|
-
innerHTML: _ctx.data.content
|
|
38
|
-
}, null, 8, _hoisted_2)
|
|
39
|
-
]);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/components/Display.vue?vue&type=script&setup=true&lang.ts
|
|
45
|
+
var _hoisted_1 = { class: "ce-jodit-html-root" };
|
|
46
|
+
var _hoisted_2 = ["innerHTML"];
|
|
47
|
+
var Display_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
48
|
+
__name: "Display",
|
|
49
|
+
props: { element: {} },
|
|
50
|
+
setup(__props) {
|
|
51
|
+
return (_ctx, _cache) => {
|
|
52
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1, [(0, vue.createElementVNode)("span", { innerHTML: __props.element.data.content }, null, 8, _hoisted_2)]);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
42
55
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region \0plugin-vue:export-helper
|
|
58
|
+
var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
59
|
+
const target = sfc.__vccOpts || sfc;
|
|
60
|
+
for (const [key, val] of props) target[key] = val;
|
|
61
|
+
return target;
|
|
49
62
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/components/Display.vue
|
|
65
|
+
var Display_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Display_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-04b81a2b"]]);
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/index.ts
|
|
68
|
+
var manifest = {
|
|
69
|
+
...manifest$1,
|
|
70
|
+
Display: Display_default
|
|
54
71
|
};
|
|
55
|
-
|
|
72
|
+
//#endregion
|
|
73
|
+
exports.Display = Display_default;
|
|
56
74
|
exports.default = manifest;
|
package/dist/index.css
CHANGED
|
@@ -1,4 +1,81 @@
|
|
|
1
|
-
.ce-jodit-html-root[data-v-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
@@ -1,56 +1,69 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import
|
|
1
|
+
import { createElementBlock, createElementVNode, defineComponent, openBlock } from "vue";
|
|
2
|
+
import './index.css';//#region ../manifest/dist/index.mjs
|
|
3
3
|
var type = "JODIT_HTML";
|
|
4
4
|
var name = "Jodit HTML";
|
|
5
5
|
var initState = () => ({ content: "" });
|
|
6
|
-
var
|
|
7
|
-
var ui = {
|
|
8
|
-
// Display icon, https://pictogrammers.com/library/mdi/
|
|
9
|
-
icon: "mdi-text-box-outline",
|
|
10
|
-
// Does element support only full width or can be used within layouts
|
|
11
|
-
// (e.g. 50/50 layout)
|
|
12
|
-
forceFullWidth: false
|
|
13
|
-
};
|
|
6
|
+
var isEmpty = (data) => !data.content;
|
|
14
7
|
var manifest$1 = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
type,
|
|
9
|
+
version: "1.0",
|
|
10
|
+
name,
|
|
11
|
+
ssr: false,
|
|
12
|
+
initState,
|
|
13
|
+
isEmpty,
|
|
14
|
+
ui: {
|
|
15
|
+
icon: "mdi-text-box-outline",
|
|
16
|
+
forceFullWidth: false
|
|
17
|
+
},
|
|
18
|
+
ai: {
|
|
19
|
+
Schema: {
|
|
20
|
+
type: "json_schema",
|
|
21
|
+
name: "ce_jodit_html",
|
|
22
|
+
schema: {
|
|
23
|
+
type: "object",
|
|
24
|
+
properties: { content: { type: "string" } },
|
|
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
|
+
}
|
|
21
38
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
createElementVNode("span", {
|
|
35
|
-
innerHTML: _ctx.data.content
|
|
36
|
-
}, null, 8, _hoisted_2)
|
|
37
|
-
]);
|
|
38
|
-
};
|
|
39
|
-
}
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/components/Display.vue?vue&type=script&setup=true&lang.ts
|
|
41
|
+
var _hoisted_1 = { class: "ce-jodit-html-root" };
|
|
42
|
+
var _hoisted_2 = ["innerHTML"];
|
|
43
|
+
var Display_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
44
|
+
__name: "Display",
|
|
45
|
+
props: { element: {} },
|
|
46
|
+
setup(__props) {
|
|
47
|
+
return (_ctx, _cache) => {
|
|
48
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("span", { innerHTML: __props.element.data.content }, null, 8, _hoisted_2)]);
|
|
49
|
+
};
|
|
50
|
+
}
|
|
40
51
|
});
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
};
|
|
48
|
-
const Display = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ac151d53"]]);
|
|
49
|
-
const manifest = {
|
|
50
|
-
...index_default,
|
|
51
|
-
Display
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region \0plugin-vue:export-helper
|
|
54
|
+
var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
55
|
+
const target = sfc.__vccOpts || sfc;
|
|
56
|
+
for (const [key, val] of props) target[key] = val;
|
|
57
|
+
return target;
|
|
52
58
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/components/Display.vue
|
|
61
|
+
var Display_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Display_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-04b81a2b"]]);
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/index.ts
|
|
64
|
+
var manifest = {
|
|
65
|
+
...manifest$1,
|
|
66
|
+
Display: Display_default
|
|
56
67
|
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { Display_default as Display, manifest as default };
|
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
|
|
6
|
+
"version": "2.0.0",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
9
|
"import": "./dist/index.js",
|
|
@@ -16,23 +16,31 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"vue": "^3.5.
|
|
19
|
+
"vue": "^3.5.29"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@tailor-cms/eslint-config": "
|
|
23
|
-
"@vitejs/plugin-vue": "^
|
|
24
|
-
"typescript": "^
|
|
25
|
-
"vite": "^
|
|
26
|
-
"
|
|
27
|
-
"
|
|
22
|
+
"@tailor-cms/eslint-config": "2.0.1",
|
|
23
|
+
"@vitejs/plugin-vue": "^6.0.6",
|
|
24
|
+
"typescript": "^6.0.3",
|
|
25
|
+
"vite": "^8.0.10",
|
|
26
|
+
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
27
|
+
"vue-tsc": "^3.2.7",
|
|
28
|
+
"vuetify": "^4.0.6",
|
|
29
|
+
"@tailor-cms/ce-jodit-html-manifest": "2.0.0"
|
|
28
30
|
},
|
|
29
31
|
"publishConfig": {
|
|
30
32
|
"access": "public"
|
|
31
33
|
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=24"
|
|
36
|
+
},
|
|
32
37
|
"scripts": {
|
|
33
38
|
"dev": "vite build --watch",
|
|
34
|
-
"build": "vue-tsc && vite build",
|
|
35
|
-
"lint": "eslint
|
|
36
|
-
"lint:fix": "pnpm lint --fix"
|
|
39
|
+
"build": "pnpm nuke:dist && vue-tsc && vite build",
|
|
40
|
+
"lint": "eslint ./src",
|
|
41
|
+
"lint:fix": "pnpm lint --fix",
|
|
42
|
+
"nuke": "pnpm dlx del-cli dist node_modules",
|
|
43
|
+
"nuke:dist": "pnpm dlx del-cli dist",
|
|
44
|
+
"prepublish": "pnpm build"
|
|
37
45
|
}
|
|
38
46
|
}
|