@tailor-cms/ce-jodit-html-manifest 0.1.0 → 2.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
@@ -1,80 +1,52 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name2 in all)
7
- __defProp(target, name2, { get: all[name2], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/index.ts
20
- var index_exports = {};
21
- __export(index_exports, {
22
- ai: () => ai,
23
- default: () => index_default,
24
- initState: () => initState,
25
- name: () => name,
26
- type: () => type,
27
- version: () => version
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
28
4
  });
29
- module.exports = __toCommonJS(index_exports);
30
- var type = "JODIT_HTML";
31
- var name = "Jodit HTML";
32
- var initState = () => ({ content: "" });
33
- var version = "1.0";
34
- var ui = {
35
- // Display icon, https://pictogrammers.com/library/mdi/
36
- icon: "mdi-text-box-outline",
37
- // Does element support only full width or can be used within layouts
38
- // (e.g. 50/50 layout)
39
- forceFullWidth: false
5
+ //#region src/index.ts
6
+ const type = "JODIT_HTML";
7
+ const name = "Jodit HTML";
8
+ const initState = () => ({ content: "" });
9
+ const isEmpty = (data) => !data.content;
10
+ const version = "1.0";
11
+ const ui = {
12
+ icon: "mdi-text-box-outline",
13
+ forceFullWidth: false
40
14
  };
41
- var ai = {
42
- Schema: {
43
- type: "json_schema",
44
- name: "ce_jodit_html",
45
- schema: {
46
- type: "object",
47
- properties: {
48
- content: { type: "string" }
49
- },
50
- required: ["content"],
51
- additionalProperties: false
52
- }
53
- },
54
- getPrompt: () => `
15
+ const ai = {
16
+ Schema: {
17
+ type: "json_schema",
18
+ name: "ce_jodit_html",
19
+ schema: {
20
+ type: "object",
21
+ properties: { content: { type: "string" } },
22
+ required: ["content"],
23
+ additionalProperties: false
24
+ }
25
+ },
26
+ getPrompt: () => `
55
27
  Generate rich text for a page as an object with the following
56
28
  properties: { "content": "" }
57
29
  where:
58
30
  - 'content' is the text of the page in HTML format. Include only the text
59
31
  content, without the full HTML page structure.
60
32
  `,
61
- processResponse: (val) => val
33
+ processResponse: (val) => val
62
34
  };
63
- var manifest = {
64
- type,
65
- version,
66
- name,
67
- ssr: false,
68
- initState,
69
- ui,
70
- ai
35
+ const manifest = {
36
+ type,
37
+ version: "1.0",
38
+ name,
39
+ ssr: false,
40
+ initState,
41
+ isEmpty,
42
+ ui,
43
+ ai
71
44
  };
72
- var index_default = manifest;
73
- // Annotate the CommonJS export names for ESM import in node:
74
- 0 && (module.exports = {
75
- ai,
76
- initState,
77
- name,
78
- type,
79
- version
80
- });
45
+ //#endregion
46
+ exports.ai = ai;
47
+ exports.default = manifest;
48
+ exports.initState = initState;
49
+ exports.isEmpty = isEmpty;
50
+ exports.name = name;
51
+ exports.type = type;
52
+ exports.version = version;
package/dist/index.d.cts CHANGED
@@ -1,22 +1,21 @@
1
- import * as common from '@tailor-cms/cek-common';
2
- import { OpenAISchema } from '@tailor-cms/cek-common';
1
+ import * as common from "@tailor-cms/cek-common";
2
+ import { AiConfig } from "@tailor-cms/cek-common";
3
3
 
4
+ //#region src/interfaces.d.ts
4
5
  interface ElementData extends common.ElementConfig {
5
- content: string;
6
+ content: string;
6
7
  }
7
8
  type DataInitializer = common.DataInitializer<ElementData>;
8
9
  type Element = common.Element<ElementData>;
9
10
  type ElementManifest = common.ElementManifest<ElementData>;
10
-
11
+ //#endregion
12
+ //#region src/index.d.ts
11
13
  declare const type = "JODIT_HTML";
12
14
  declare const name = "Jodit HTML";
13
15
  declare const initState: DataInitializer;
16
+ declare const isEmpty: (data: ElementData) => boolean;
14
17
  declare const version = "1.0";
15
- declare const ai: {
16
- Schema: OpenAISchema;
17
- getPrompt: () => string;
18
- processResponse: (val: any) => any;
19
- };
18
+ declare const ai: AiConfig;
20
19
  declare const manifest: ElementManifest;
21
-
22
- export { type DataInitializer, type Element, type ElementData, type ElementManifest, ai, manifest as default, initState, name, type, version };
20
+ //#endregion
21
+ export { DataInitializer, Element, ElementData, ElementManifest, ai, manifest as default, initState, isEmpty, name, type, version };
@@ -0,0 +1,21 @@
1
+ import * as common from "@tailor-cms/cek-common";
2
+ import { AiConfig } from "@tailor-cms/cek-common";
3
+
4
+ //#region src/interfaces.d.ts
5
+ interface ElementData extends common.ElementConfig {
6
+ content: string;
7
+ }
8
+ type DataInitializer = common.DataInitializer<ElementData>;
9
+ type Element = common.Element<ElementData>;
10
+ type ElementManifest = common.ElementManifest<ElementData>;
11
+ //#endregion
12
+ //#region src/index.d.ts
13
+ declare const type = "JODIT_HTML";
14
+ declare const name = "Jodit HTML";
15
+ declare const initState: DataInitializer;
16
+ declare const isEmpty: (data: ElementData) => boolean;
17
+ declare const version = "1.0";
18
+ declare const ai: AiConfig;
19
+ declare const manifest: ElementManifest;
20
+ //#endregion
21
+ export { DataInitializer, Element, ElementData, ElementManifest, ai, manifest as default, initState, isEmpty, name, type, version };
package/dist/index.mjs ADDED
@@ -0,0 +1,42 @@
1
+ //#region src/index.ts
2
+ const type = "JODIT_HTML";
3
+ const name = "Jodit HTML";
4
+ const initState = () => ({ content: "" });
5
+ const isEmpty = (data) => !data.content;
6
+ const version = "1.0";
7
+ const ui = {
8
+ icon: "mdi-text-box-outline",
9
+ forceFullWidth: false
10
+ };
11
+ const ai = {
12
+ Schema: {
13
+ type: "json_schema",
14
+ name: "ce_jodit_html",
15
+ schema: {
16
+ type: "object",
17
+ properties: { content: { type: "string" } },
18
+ required: ["content"],
19
+ additionalProperties: false
20
+ }
21
+ },
22
+ getPrompt: () => `
23
+ Generate rich text for a page as an object with the following
24
+ properties: { "content": "" }
25
+ where:
26
+ - 'content' is the text of the page in HTML format. Include only the text
27
+ content, without the full HTML page structure.
28
+ `,
29
+ processResponse: (val) => val
30
+ };
31
+ const manifest = {
32
+ type,
33
+ version: "1.0",
34
+ name,
35
+ ssr: false,
36
+ initState,
37
+ isEmpty,
38
+ ui,
39
+ ai
40
+ };
41
+ //#endregion
42
+ export { ai, manifest as default, initState, isEmpty, name, type, version };
package/package.json CHANGED
@@ -3,47 +3,42 @@
3
3
  "description": "Tailor CMS Jodit HTML editor manifest",
4
4
  "author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
5
5
  "type": "module",
6
- "version": "0.1.0",
6
+ "version": "2.0.1",
7
7
  "exports": {
8
8
  ".": {
9
- "import": "./dist/index.js",
9
+ "import": "./dist/index.mjs",
10
10
  "require": "./dist/index.cjs"
11
11
  }
12
12
  },
13
13
  "main": "./dist/index.cjs",
14
- "types": "./dist/index.d.ts",
14
+ "types": "./dist/index.d.mts",
15
15
  "files": [
16
16
  "dist"
17
17
  ],
18
+ "dependencies": {
19
+ "@tailor-cms/cek-common": "2.0.1"
20
+ },
18
21
  "devDependencies": {
19
- "@tailor-cms/cek-common": "^1.3.2",
20
- "@tailor-cms/eslint-config": "1.1.2",
21
- "tsup": "^8.5.0",
22
- "typescript": "^5.8.3"
22
+ "@tailor-cms/eslint-config": "2.0.1",
23
+ "tsdown": "^0.21.10",
24
+ "typescript": "^6.0.3"
23
25
  },
24
- "tsup": {
25
- "entry": [
26
- "src/index.ts"
27
- ],
28
- "target": [
29
- "node14",
30
- "es2022"
31
- ],
26
+ "tsdown": {
27
+ "target": "node24",
32
28
  "format": [
33
29
  "cjs",
34
30
  "esm"
35
- ],
36
- "bundle": true,
37
- "minify": false,
38
- "clean": false,
39
- "dts": true
31
+ ]
40
32
  },
41
33
  "publishConfig": {
42
34
  "access": "public"
43
35
  },
36
+ "engines": {
37
+ "node": ">=24"
38
+ },
44
39
  "scripts": {
45
- "dev": "tsup --watch",
46
- "build": "pnpm nuke:dist && tsup",
40
+ "dev": "tsdown --watch",
41
+ "build": "pnpm nuke:dist && tsdown",
47
42
  "lint": "eslint .",
48
43
  "lint:fix": "pnpm lint --fix",
49
44
  "nuke": "pnpm dlx del-cli dist node_modules",
package/dist/index.d.ts DELETED
@@ -1,22 +0,0 @@
1
- import * as common from '@tailor-cms/cek-common';
2
- import { OpenAISchema } from '@tailor-cms/cek-common';
3
-
4
- interface ElementData extends common.ElementConfig {
5
- content: string;
6
- }
7
- type DataInitializer = common.DataInitializer<ElementData>;
8
- type Element = common.Element<ElementData>;
9
- type ElementManifest = common.ElementManifest<ElementData>;
10
-
11
- declare const type = "JODIT_HTML";
12
- declare const name = "Jodit HTML";
13
- declare const initState: DataInitializer;
14
- declare const version = "1.0";
15
- declare const ai: {
16
- Schema: OpenAISchema;
17
- getPrompt: () => string;
18
- processResponse: (val: any) => any;
19
- };
20
- declare const manifest: ElementManifest;
21
-
22
- export { type DataInitializer, type Element, type ElementData, type ElementManifest, ai, manifest as default, initState, name, type, version };
package/dist/index.js DELETED
@@ -1,52 +0,0 @@
1
- // src/index.ts
2
- var type = "JODIT_HTML";
3
- var name = "Jodit HTML";
4
- var initState = () => ({ content: "" });
5
- var version = "1.0";
6
- var ui = {
7
- // Display icon, https://pictogrammers.com/library/mdi/
8
- icon: "mdi-text-box-outline",
9
- // Does element support only full width or can be used within layouts
10
- // (e.g. 50/50 layout)
11
- forceFullWidth: false
12
- };
13
- var ai = {
14
- Schema: {
15
- type: "json_schema",
16
- name: "ce_jodit_html",
17
- schema: {
18
- type: "object",
19
- properties: {
20
- content: { type: "string" }
21
- },
22
- required: ["content"],
23
- additionalProperties: false
24
- }
25
- },
26
- getPrompt: () => `
27
- Generate rich text for a page as an object with the following
28
- properties: { "content": "" }
29
- where:
30
- - 'content' is the text of the page in HTML format. Include only the text
31
- content, without the full HTML page structure.
32
- `,
33
- processResponse: (val) => val
34
- };
35
- var manifest = {
36
- type,
37
- version,
38
- name,
39
- ssr: false,
40
- initState,
41
- ui,
42
- ai
43
- };
44
- var index_default = manifest;
45
- export {
46
- ai,
47
- index_default as default,
48
- initState,
49
- name,
50
- type,
51
- version
52
- };