@tailor-cms/ce-jodit-html-manifest 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/index.cjs CHANGED
@@ -1,55 +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
- default: () => index_default,
23
- initState: () => initState,
24
- name: () => name,
25
- type: () => type,
26
- version: () => version
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
27
4
  });
28
- module.exports = __toCommonJS(index_exports);
29
- var type = "JODIT_HTML";
30
- var name = "Jodit HTML";
31
- var initState = () => ({ content: "" });
32
- var version = "1.0";
33
- var ui = {
34
- // Display icon, https://pictogrammers.com/library/mdi/
35
- icon: "mdi-text-box-outline",
36
- // Does element support only full width or can be used within layouts
37
- // (e.g. 50/50 layout)
38
- 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
39
14
  };
40
- var manifest = {
41
- type,
42
- version,
43
- name,
44
- ssr: false,
45
- initState,
46
- ui
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: () => `
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
47
34
  };
48
- var index_default = manifest;
49
- // Annotate the CommonJS export names for ESM import in node:
50
- 0 && (module.exports = {
51
- initState,
52
- name,
53
- type,
54
- version
55
- });
35
+ const manifest = {
36
+ type,
37
+ version: "1.0",
38
+ name,
39
+ ssr: false,
40
+ initState,
41
+ isEmpty,
42
+ ui,
43
+ ai
44
+ };
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,55 +1,21 @@
1
- interface ElementData {
2
- content: string;
3
- }
4
- interface Element {
5
- id: number;
6
- uid: string;
7
- activityId: number;
8
- repositoryId: number;
9
- contentId: string;
10
- contentSignature: string;
11
- type: string;
12
- position: number;
13
- data: ElementData;
14
- meta: {
15
- [key: string]: unknown;
16
- };
17
- refs: {
18
- [key: string]: unknown;
19
- };
20
- linked: boolean;
21
- detached: boolean;
22
- createdAt: string;
23
- updatedAt: string;
24
- deletedAt: string | null;
25
- }
26
- type DataInitializer = () => ElementData;
27
- interface ElementManifest {
28
- type: string;
29
- version: string;
30
- name: string;
31
- ssr: boolean;
32
- initState: DataInitializer;
33
- Edit?: object;
34
- TopToolbar?: object;
35
- SideToolbar?: object;
36
- Display?: object;
37
- ui: {
38
- icon: string;
39
- forceFullWidth: boolean;
40
- };
41
- mocks?: {
42
- displayContexts: Array<{
43
- name: string;
44
- data: any;
45
- }>;
46
- };
47
- }
1
+ import * as common from "@tailor-cms/cek-common";
2
+ import { AiConfig } from "@tailor-cms/cek-common";
48
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
49
13
  declare const type = "JODIT_HTML";
50
14
  declare const name = "Jodit HTML";
51
15
  declare const initState: DataInitializer;
16
+ declare const isEmpty: (data: ElementData) => boolean;
52
17
  declare const version = "1.0";
18
+ declare const ai: AiConfig;
53
19
  declare const manifest: ElementManifest;
54
-
55
- export { type DataInitializer, type Element, type ElementData, type ElementManifest, 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 CHANGED
@@ -1,28 +1,42 @@
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
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
12
10
  };
13
- var manifest = {
14
- type,
15
- version,
16
- name,
17
- ssr: false,
18
- initState,
19
- ui
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
20
30
  };
21
- var index_default = manifest;
22
- export {
23
- index_default as default,
24
- initState,
25
- name,
26
- type,
27
- version
31
+ const manifest = {
32
+ type,
33
+ version: "1.0",
34
+ name,
35
+ ssr: false,
36
+ initState,
37
+ isEmpty,
38
+ ui,
39
+ ai
28
40
  };
41
+ //#endregion
42
+ export { ai, manifest as default, initState, isEmpty, name, type, version };
package/package.json CHANGED
@@ -3,47 +3,46 @@
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.0.8",
6
+ "version": "2.0.0",
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/eslint-config": "0.0.2",
20
- "tsup": "^8.3.6",
21
- "typescript": "^5.7.3"
22
+ "@tailor-cms/eslint-config": "2.0.1",
23
+ "tsdown": "^0.21.10",
24
+ "typescript": "^6.0.3"
22
25
  },
23
- "tsup": {
24
- "entry": [
25
- "src/index.ts"
26
- ],
27
- "target": [
28
- "node14",
29
- "es2022"
30
- ],
26
+ "tsdown": {
27
+ "target": "node24",
31
28
  "format": [
32
29
  "cjs",
33
30
  "esm"
34
- ],
35
- "bundle": true,
36
- "minify": false,
37
- "clean": false,
38
- "dts": true
31
+ ]
39
32
  },
40
33
  "publishConfig": {
41
34
  "access": "public"
42
35
  },
36
+ "engines": {
37
+ "node": ">=24"
38
+ },
43
39
  "scripts": {
44
- "dev": "tsup --watch",
45
- "build": "tsup",
46
- "lint": "eslint --ext .js,.ts .",
47
- "lint:fix": "pnpm lint --fix"
40
+ "dev": "tsdown --watch",
41
+ "build": "pnpm nuke:dist && tsdown",
42
+ "lint": "eslint .",
43
+ "lint:fix": "pnpm lint --fix",
44
+ "nuke": "pnpm dlx del-cli dist node_modules",
45
+ "nuke:dist": "pnpm dlx del-cli dist",
46
+ "prepublish": "pnpm build"
48
47
  }
49
48
  }
package/dist/index.d.ts DELETED
@@ -1,55 +0,0 @@
1
- interface ElementData {
2
- content: string;
3
- }
4
- interface Element {
5
- id: number;
6
- uid: string;
7
- activityId: number;
8
- repositoryId: number;
9
- contentId: string;
10
- contentSignature: string;
11
- type: string;
12
- position: number;
13
- data: ElementData;
14
- meta: {
15
- [key: string]: unknown;
16
- };
17
- refs: {
18
- [key: string]: unknown;
19
- };
20
- linked: boolean;
21
- detached: boolean;
22
- createdAt: string;
23
- updatedAt: string;
24
- deletedAt: string | null;
25
- }
26
- type DataInitializer = () => ElementData;
27
- interface ElementManifest {
28
- type: string;
29
- version: string;
30
- name: string;
31
- ssr: boolean;
32
- initState: DataInitializer;
33
- Edit?: object;
34
- TopToolbar?: object;
35
- SideToolbar?: object;
36
- Display?: object;
37
- ui: {
38
- icon: string;
39
- forceFullWidth: boolean;
40
- };
41
- mocks?: {
42
- displayContexts: Array<{
43
- name: string;
44
- data: any;
45
- }>;
46
- };
47
- }
48
-
49
- declare const type = "JODIT_HTML";
50
- declare const name = "Jodit HTML";
51
- declare const initState: DataInitializer;
52
- declare const version = "1.0";
53
- declare const manifest: ElementManifest;
54
-
55
- export { type DataInitializer, type Element, type ElementData, type ElementManifest, manifest as default, initState, name, type, version };
package/dist/index.js DELETED
@@ -1,28 +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 manifest = {
14
- type,
15
- version,
16
- name,
17
- ssr: false,
18
- initState,
19
- ui
20
- };
21
- var index_default = manifest;
22
- export {
23
- index_default as default,
24
- initState,
25
- name,
26
- type,
27
- version
28
- };