@tailor-cms/ce-jodit-html-manifest 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.
package/dist/index.cjs CHANGED
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  // src/index.ts
20
20
  var index_exports = {};
21
21
  __export(index_exports, {
22
+ ai: () => ai,
22
23
  default: () => index_default,
23
24
  initState: () => initState,
24
25
  name: () => name,
@@ -37,17 +38,41 @@ var ui = {
37
38
  // (e.g. 50/50 layout)
38
39
  forceFullWidth: false
39
40
  };
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: () => `
55
+ Generate rich text for a page as an object with the following
56
+ properties: { "content": "" }
57
+ where:
58
+ - 'content' is the text of the page in HTML format. Include only the text
59
+ content, without the full HTML page structure.
60
+ `,
61
+ processResponse: (val) => val
62
+ };
40
63
  var manifest = {
41
64
  type,
42
65
  version,
43
66
  name,
44
67
  ssr: false,
45
68
  initState,
46
- ui
69
+ ui,
70
+ ai
47
71
  };
48
72
  var index_default = manifest;
49
73
  // Annotate the CommonJS export names for ESM import in node:
50
74
  0 && (module.exports = {
75
+ ai,
51
76
  initState,
52
77
  name,
53
78
  type,
package/dist/index.d.cts CHANGED
@@ -1,55 +1,22 @@
1
- interface ElementData {
1
+ import * as common from '@tailor-cms/cek-common';
2
+ import { OpenAISchema } from '@tailor-cms/cek-common';
3
+
4
+ interface ElementData extends common.ElementConfig {
2
5
  content: string;
3
6
  }
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
- }
7
+ type DataInitializer = common.DataInitializer<ElementData>;
8
+ type Element = common.Element<ElementData>;
9
+ type ElementManifest = common.ElementManifest<ElementData>;
48
10
 
49
11
  declare const type = "JODIT_HTML";
50
12
  declare const name = "Jodit HTML";
51
13
  declare const initState: DataInitializer;
52
14
  declare const version = "1.0";
15
+ declare const ai: {
16
+ Schema: OpenAISchema;
17
+ getPrompt: () => string;
18
+ processResponse: (val: any) => any;
19
+ };
53
20
  declare const manifest: ElementManifest;
54
21
 
55
- export { type DataInitializer, type Element, type ElementData, type ElementManifest, manifest as default, initState, name, type, version };
22
+ export { type DataInitializer, type Element, type ElementData, type ElementManifest, ai, manifest as default, initState, name, type, version };
package/dist/index.d.ts CHANGED
@@ -1,55 +1,22 @@
1
- interface ElementData {
1
+ import * as common from '@tailor-cms/cek-common';
2
+ import { OpenAISchema } from '@tailor-cms/cek-common';
3
+
4
+ interface ElementData extends common.ElementConfig {
2
5
  content: string;
3
6
  }
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
- }
7
+ type DataInitializer = common.DataInitializer<ElementData>;
8
+ type Element = common.Element<ElementData>;
9
+ type ElementManifest = common.ElementManifest<ElementData>;
48
10
 
49
11
  declare const type = "JODIT_HTML";
50
12
  declare const name = "Jodit HTML";
51
13
  declare const initState: DataInitializer;
52
14
  declare const version = "1.0";
15
+ declare const ai: {
16
+ Schema: OpenAISchema;
17
+ getPrompt: () => string;
18
+ processResponse: (val: any) => any;
19
+ };
53
20
  declare const manifest: ElementManifest;
54
21
 
55
- export { type DataInitializer, type Element, type ElementData, type ElementManifest, manifest as default, initState, name, type, version };
22
+ export { type DataInitializer, type Element, type ElementData, type ElementManifest, ai, manifest as default, initState, name, type, version };
package/dist/index.js CHANGED
@@ -10,16 +10,40 @@ var ui = {
10
10
  // (e.g. 50/50 layout)
11
11
  forceFullWidth: false
12
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
+ };
13
35
  var manifest = {
14
36
  type,
15
37
  version,
16
38
  name,
17
39
  ssr: false,
18
40
  initState,
19
- ui
41
+ ui,
42
+ ai
20
43
  };
21
44
  var index_default = manifest;
22
45
  export {
46
+ ai,
23
47
  index_default as default,
24
48
  initState,
25
49
  name,
package/package.json CHANGED
@@ -3,7 +3,7 @@
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": "0.1.0",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": "./dist/index.js",
@@ -16,9 +16,10 @@
16
16
  "dist"
17
17
  ],
18
18
  "devDependencies": {
19
- "@tailor-cms/eslint-config": "0.0.2",
20
- "tsup": "^8.3.6",
21
- "typescript": "^5.7.3"
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
23
  },
23
24
  "tsup": {
24
25
  "entry": [
@@ -42,8 +43,11 @@
42
43
  },
43
44
  "scripts": {
44
45
  "dev": "tsup --watch",
45
- "build": "tsup",
46
- "lint": "eslint --ext .js,.ts .",
47
- "lint:fix": "pnpm lint --fix"
46
+ "build": "pnpm nuke:dist && tsup",
47
+ "lint": "eslint .",
48
+ "lint:fix": "pnpm lint --fix",
49
+ "nuke": "pnpm dlx del-cli dist node_modules",
50
+ "nuke:dist": "pnpm dlx del-cli dist",
51
+ "prepublish": "pnpm build"
48
52
  }
49
53
  }
package/dist/index.mjs 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
- };