@ai-stack/payloadcms 3.2.1-beta → 3.2.3-beta

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.
Files changed (41) hide show
  1. package/LICENSE.md +2 -2
  2. package/README.md +14 -7
  3. package/dist/ai/models/openai/generateImage.d.ts.map +1 -1
  4. package/dist/ai/models/openai/generateImage.js +0 -1
  5. package/dist/ai/models/openai/generateImage.js.map +1 -1
  6. package/dist/ai/models/openai/generateRichText.d.ts +1 -1
  7. package/dist/ai/models/openai/generateRichText.d.ts.map +1 -1
  8. package/dist/ai/models/openai/generateRichText.js +14 -7
  9. package/dist/ai/models/openai/generateRichText.js.map +1 -1
  10. package/dist/ai/schemas/lexicalJsonSchema.d.ts +369 -0
  11. package/dist/ai/schemas/lexicalJsonSchema.d.ts.map +1 -1
  12. package/dist/ai/schemas/lexicalJsonSchema.js +547 -214
  13. package/dist/ai/schemas/lexicalJsonSchema.js.map +1 -1
  14. package/dist/collections/Instructions.js +3 -3
  15. package/dist/collections/Instructions.js.map +1 -1
  16. package/dist/endpoints/index.js.map +1 -1
  17. package/dist/fields/LexicalEditor/feature.client.d.ts.map +1 -1
  18. package/dist/fields/LexicalEditor/feature.client.js +4 -0
  19. package/dist/fields/LexicalEditor/feature.client.js.map +1 -1
  20. package/dist/plugin.d.ts.map +1 -1
  21. package/dist/plugin.js +26 -0
  22. package/dist/plugin.js.map +1 -1
  23. package/dist/types.d.ts +2 -0
  24. package/dist/types.d.ts.map +1 -1
  25. package/dist/types.js.map +1 -1
  26. package/dist/ui/Compose/Compose.js +4 -3
  27. package/dist/ui/Compose/Compose.js.map +1 -1
  28. package/dist/ui/Compose/{compose.module.scss → compose.module.css} +7 -7
  29. package/dist/ui/Compose/hooks/menu/useMenu.d.ts +2 -1
  30. package/dist/ui/Compose/hooks/menu/useMenu.d.ts.map +1 -1
  31. package/dist/ui/Compose/hooks/menu/useMenu.js +15 -4
  32. package/dist/ui/Compose/hooks/menu/useMenu.js.map +1 -1
  33. package/dist/ui/Compose/hooks/useGenerate.d.ts +1 -0
  34. package/dist/ui/Compose/hooks/useGenerate.d.ts.map +1 -1
  35. package/dist/ui/Compose/hooks/useGenerate.js +40 -11
  36. package/dist/ui/Compose/hooks/useGenerate.js.map +1 -1
  37. package/dist/utilities/editorSchemaValidator.d.ts +3 -0
  38. package/dist/utilities/editorSchemaValidator.d.ts.map +1 -0
  39. package/dist/utilities/editorSchemaValidator.js +31 -0
  40. package/dist/utilities/editorSchemaValidator.js.map +1 -0
  41. package/package.json +3 -5
package/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- ## 1. MIT License (for open-source use)
1
+ ## 1. MIT License
2
2
 
3
3
  Copyright (c) 2024 Ashish Mishra
4
4
 
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
package/README.md CHANGED
@@ -8,15 +8,16 @@
8
8
 
9
9
  The Payload AI Plugin is an advanced extension that integrates modern AI capabilities into your Payload CMS, streamlining content creation and management.
10
10
 
11
- > **⚠️ Important:** This plugin is in active development. We're doing our best to improve its features and functionality. Please be prepared for regular updates; at the moment, the plugin has only been tested with Payload version v3.0.0-beta.104.
11
+ > **⚠️ Important:** This plugin is in active development. We're doing our best to improve its features and functionality. Please be prepared for regular updates; at the moment, the plugin has only been tested with Payload version v3.2.1.
12
12
  >
13
- > To give it a try, we recommend using [Payload's website template](https://github.com/payloadcms/payload/tree/v3.0.0-beta.104/templates/website).
13
+ > To give it a try, we recommend using [Payload's website template](https://github.com/payloadcms/payload/tree/v3.2.1/templates/website).
14
14
 
15
15
  ---
16
16
 
17
17
  ### 🎥 [Watch the Magic in Action](https://youtu.be/qaYukeGpuu4)
18
18
  Want to dive deeper?
19
19
  ### 🎥 [Explore More in Our Extended Demo](https://youtu.be/LEsuHbKalNY)
20
+ ### ⚙️ [Guide to Personalize](guide.md)
20
21
 
21
22
 
22
23
  ## ✨ Supported Fields and Features
@@ -50,6 +51,7 @@ Want to dive deeper?
50
51
  - [Installation](#-installation)
51
52
  - [Usage](#-usage)
52
53
  - [Configuration](#%EF%B8%8F-configuration)
54
+ - [Setup Guide](guide.md)
53
55
  - [Contributing](#-contributing)
54
56
 
55
57
  ## 📦 Installation
@@ -77,6 +79,7 @@ export default buildConfig({
77
79
  [Posts.slug]: true,
78
80
  },
79
81
  debugging: false,
82
+ disableSponsorMessage: false
80
83
  }),
81
84
  ],
82
85
  // ... your existing Payload configuration
@@ -84,7 +87,7 @@ export default buildConfig({
84
87
 
85
88
 
86
89
  // Add below in Lexical Editor field config
87
- import { PayloadAiPluginLexicalEditorFeature } from '@ai-stack/payloadcms'
90
+ import { PayloadAiPluginLexicalEditorFeature } from '@ai-stack/payloadcms/fields'
88
91
 
89
92
  fields: [
90
93
  {
@@ -105,14 +108,14 @@ fields: [
105
108
 
106
109
  ## ⚙️ Configuration
107
110
 
108
- Choose your AI model by providing one or more of the following environment variables.
109
- Create a .env file in your project root and add any of the following variables:
110
-
111
+ To get started, choose your preferred AI model by setting one or more of the following environment variables. Create a .env file in your project root and add any of the following keys:
111
112
  ```
112
113
  OPENAI_API_KEY=your-openai-api-key
113
114
  ANTHROPIC_API_KEY=your-anthropic-api-key
114
115
  ELEVENLABS_API_KEY=your-elevenlabs-api-key
115
116
  ```
117
+ For detailed guidance on personalizing and configuring the plugin to match your needs, check out the **[Complete Guide](guide.md)**. It walks you through every step, from setting up fields to generating amazing content!
118
+
116
119
 
117
120
  ### Enabling AI for Custom Components
118
121
 
@@ -126,4 +129,8 @@ ELEVENLABS_API_KEY=your-elevenlabs-api-key
126
129
 
127
130
  ## 👥 Contributing
128
131
 
129
- Innovators: welcome! We're always excited to expand our community. Connect with us on [Discord](https://discord.com/channels/967097582721572934/1264949995656843345) to get started.
132
+ Innovators: welcome! We're always excited to expand our community and hear fresh ideas. Whether you’re here to share feedback, suggest features, or contribute code, we’d love to have you on board.
133
+
134
+ Feel free to create a pull request with your ideas, improvements, or bug fixes. No contribution is too small, and every bit helps us grow!
135
+
136
+ Join the conversation on Payload's [Discord](https://discord.com/channels/967097582721572934/1264949995656843345) and let’s build something amazing together! 🚀✨
@@ -1 +1 @@
1
- {"version":3,"file":"generateImage.d.ts","sourceRoot":"","sources":["../../../../src/ai/models/openai/generateImage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAIlE,eAAO,MAAM,aAAa,WAChB,MAAM,8BAKX;IACD,IAAI,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAA;IAClC,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAA;IACpC,OAAO,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAA;CACvC;;;EAkBF,CAAA"}
1
+ {"version":3,"file":"generateImage.d.ts","sourceRoot":"","sources":["../../../../src/ai/models/openai/generateImage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAIlE,eAAO,MAAM,aAAa,WAChB,MAAM,8BAKX;IACD,IAAI,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAA;IAClC,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAA;IACpC,OAAO,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAA;CACvC;;;EAiBF,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import OpenAI from 'openai';
2
2
  export const generateImage = async (prompt, { size = '1024x1024', style = 'natural', version = 'dall-e-3' } = {})=>{
3
3
  const openaiAPI = new OpenAI();
4
- console.log('generateImage: ', size, style, version, prompt);
5
4
  const response = await openaiAPI.images.generate({
6
5
  model: version,
7
6
  n: 1,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/ai/models/openai/generateImage.ts"],"sourcesContent":["import type { ImageGenerateParams } from 'openai/resources/images'\n\nimport OpenAI from 'openai'\n\nexport const generateImage = async (\n prompt: string,\n {\n size = '1024x1024',\n style = 'natural',\n version = 'dall-e-3',\n }: {\n size?: ImageGenerateParams['size']\n style?: ImageGenerateParams['style']\n version?: ImageGenerateParams['model']\n } = {},\n) => {\n const openaiAPI = new OpenAI()\n console.log('generateImage: ', size, style, version, prompt)\n const response = await openaiAPI.images.generate({\n model: version,\n n: 1,\n prompt,\n response_format: 'b64_json',\n size,\n style,\n })\n\n const { b64_json, revised_prompt } = response.data[0] || {}\n return {\n alt: revised_prompt,\n buffer: Buffer.from(b64_json, 'base64'),\n }\n}\n"],"names":["OpenAI","generateImage","prompt","size","style","version","openaiAPI","console","log","response","images","generate","model","n","response_format","b64_json","revised_prompt","data","alt","buffer","Buffer","from"],"mappings":"AAEA,OAAOA,YAAY,SAAQ;AAE3B,OAAO,MAAMC,gBAAgB,OAC3BC,QACA,EACEC,OAAO,WAAW,EAClBC,QAAQ,SAAS,EACjBC,UAAU,UAAU,EAKrB,GAAG,CAAC,CAAC;IAEN,MAAMC,YAAY,IAAIN;IACtBO,QAAQC,GAAG,CAAC,mBAAmBL,MAAMC,OAAOC,SAASH;IACrD,MAAMO,WAAW,MAAMH,UAAUI,MAAM,CAACC,QAAQ,CAAC;QAC/CC,OAAOP;QACPQ,GAAG;QACHX;QACAY,iBAAiB;QACjBX;QACAC;IACF;IAEA,MAAM,EAAEW,QAAQ,EAAEC,cAAc,EAAE,GAAGP,SAASQ,IAAI,CAAC,EAAE,IAAI,CAAC;IAC1D,OAAO;QACLC,KAAKF;QACLG,QAAQC,OAAOC,IAAI,CAACN,UAAU;IAChC;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/ai/models/openai/generateImage.ts"],"sourcesContent":["import type { ImageGenerateParams } from 'openai/resources/images'\n\nimport OpenAI from 'openai'\n\nexport const generateImage = async (\n prompt: string,\n {\n size = '1024x1024',\n style = 'natural',\n version = 'dall-e-3',\n }: {\n size?: ImageGenerateParams['size']\n style?: ImageGenerateParams['style']\n version?: ImageGenerateParams['model']\n } = {},\n) => {\n const openaiAPI = new OpenAI()\n const response = await openaiAPI.images.generate({\n model: version,\n n: 1,\n prompt,\n response_format: 'b64_json',\n size,\n style,\n })\n\n const { b64_json, revised_prompt } = response.data[0] || {}\n return {\n alt: revised_prompt,\n buffer: Buffer.from(b64_json, 'base64'),\n }\n}\n"],"names":["OpenAI","generateImage","prompt","size","style","version","openaiAPI","response","images","generate","model","n","response_format","b64_json","revised_prompt","data","alt","buffer","Buffer","from"],"mappings":"AAEA,OAAOA,YAAY,SAAQ;AAE3B,OAAO,MAAMC,gBAAgB,OAC3BC,QACA,EACEC,OAAO,WAAW,EAClBC,QAAQ,SAAS,EACjBC,UAAU,UAAU,EAKrB,GAAG,CAAC,CAAC;IAEN,MAAMC,YAAY,IAAIN;IACtB,MAAMO,WAAW,MAAMD,UAAUE,MAAM,CAACC,QAAQ,CAAC;QAC/CC,OAAOL;QACPM,GAAG;QACHT;QACAU,iBAAiB;QACjBT;QACAC;IACF;IAEA,MAAM,EAAES,QAAQ,EAAEC,cAAc,EAAE,GAAGP,SAASQ,IAAI,CAAC,EAAE,IAAI,CAAC;IAC1D,OAAO;QACLC,KAAKF;QACLG,QAAQC,OAAOC,IAAI,CAACN,UAAU;IAChC;AACF,EAAC"}
@@ -1,2 +1,2 @@
1
- export declare const generateRichText: (text: string, options: any) => Promise<Response>;
1
+ export declare const generateRichText: (text: string, options?: any) => Promise<Response>;
2
2
  //# sourceMappingURL=generateRichText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generateRichText.d.ts","sourceRoot":"","sources":["../../../../src/ai/models/openai/generateRichText.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,SAAgB,MAAM,WAAW,GAAG,sBAgChE,CAAA"}
1
+ {"version":3,"file":"generateRichText.d.ts","sourceRoot":"","sources":["../../../../src/ai/models/openai/generateRichText.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,SAAgB,MAAM,YAAW,GAAG,sBAoChE,CAAA"}
@@ -1,9 +1,19 @@
1
1
  import { openai } from '@ai-sdk/openai';
2
2
  import { jsonSchema, streamObject } from 'ai';
3
- import { exampleOutput } from '../example.js';
4
- export const generateRichText = async (text, options)=>{
3
+ export const generateRichText = async (text, options = {})=>{
4
+ console.log('Running handler with prompts:', options.editorSchema);
5
5
  const streamResult = await streamObject({
6
- model: openai(options.model),
6
+ maxTokens: options.maxTokens || 5000,
7
+ model: openai(options.model, {
8
+ structuredOutputs: true
9
+ }),
10
+ onFinish: (result)=>{
11
+ console.log('Finished generating rich text:', {
12
+ options,
13
+ rawResponse: result.rawResponse,
14
+ result
15
+ });
16
+ },
7
17
  prompt: text,
8
18
  schema: jsonSchema(options.editorSchema),
9
19
  system: `${options.system}
@@ -23,14 +33,11 @@ RICH TEXT EDITOR TOOLS:
23
33
  - Apply correct heading levels (h1, h2, h3) for hierarchical structure.
24
34
  - Utilize bullet points or numbered lists as required by the layout.
25
35
 
26
- SAMPLE OUTPUT OBJECT:
27
- ${JSON.stringify(exampleOutput)}
28
-
29
36
  ADDITIONAL GUIDELINES:
30
37
  - Ensure coherence and logical flow between all sections.
31
38
  - Maintain a consistent tone and style throughout the content.
32
39
  - Use clear and concise language appropriate for the target audience.
33
- - Double-check that all JSON fields are properly filled and formatted.`
40
+ `
34
41
  });
35
42
  return streamResult.toTextStreamResponse();
36
43
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/ai/models/openai/generateRichText.ts"],"sourcesContent":["import { openai } from '@ai-sdk/openai'\nimport { jsonSchema, streamObject } from 'ai'\n\nimport { exampleOutput } from '../example.js'\n\nexport const generateRichText = async (text: string, options: any) => {\n const streamResult = await streamObject({\n model: openai(options.model),\n prompt: text,\n schema: jsonSchema(options.editorSchema),\n system: `${options.system}\n\nRULES:\n- Generate original and unique content based on the given topic.\n- Strictly adhere to the specified layout and formatting instructions.\n- Utilize the provided rich text editor tools for appropriate formatting.\n- Ensure the output follows the structure of the sample output object.\n- Produce valid JSON with no undefined or null values.\n\nLAYOUT INSTRUCTIONS:\n${options.layout}\n\nRICH TEXT EDITOR TOOLS:\n- Use appropriate formatting tools such as bold, italic, or underline for emphasis where needed.\n- Apply correct heading levels (h1, h2, h3) for hierarchical structure.\n- Utilize bullet points or numbered lists as required by the layout.\n\nSAMPLE OUTPUT OBJECT:\n${JSON.stringify(exampleOutput)}\n\nADDITIONAL GUIDELINES:\n- Ensure coherence and logical flow between all sections.\n- Maintain a consistent tone and style throughout the content.\n- Use clear and concise language appropriate for the target audience.\n- Double-check that all JSON fields are properly filled and formatted.`,\n })\n return streamResult.toTextStreamResponse()\n}\n"],"names":["openai","jsonSchema","streamObject","exampleOutput","generateRichText","text","options","streamResult","model","prompt","schema","editorSchema","system","layout","JSON","stringify","toTextStreamResponse"],"mappings":"AAAA,SAASA,MAAM,QAAQ,iBAAgB;AACvC,SAASC,UAAU,EAAEC,YAAY,QAAQ,KAAI;AAE7C,SAASC,aAAa,QAAQ,gBAAe;AAE7C,OAAO,MAAMC,mBAAmB,OAAOC,MAAcC;IACnD,MAAMC,eAAe,MAAML,aAAa;QACtCM,OAAOR,OAAOM,QAAQE,KAAK;QAC3BC,QAAQJ;QACRK,QAAQT,WAAWK,QAAQK,YAAY;QACvCC,QAAQ,GAAGN,QAAQM,MAAM,CAAC;;;;;;;;;;AAU9B,EAAEN,QAAQO,MAAM,CAAC;;;;;;;;AAQjB,EAAEC,KAAKC,SAAS,CAACZ,eAAe;;;;;;sEAMsC,CAAC;IACrE;IACA,OAAOI,aAAaS,oBAAoB;AAC1C,EAAC"}
1
+ {"version":3,"sources":["../../../../src/ai/models/openai/generateRichText.ts"],"sourcesContent":["import { openai } from '@ai-sdk/openai'\nimport { jsonSchema, streamObject } from 'ai'\n\nexport const generateRichText = async (text: string, options: any = {}) => {\n console.log('Running handler with prompts:', options.editorSchema)\n const streamResult = await streamObject({\n maxTokens: options.maxTokens || 5000,\n model: openai(options.model,{\n structuredOutputs: true,\n }),\n onFinish: (result) => {\n console.log('Finished generating rich text:', { options, rawResponse: result.rawResponse, result })\n },\n prompt: text,\n schema: jsonSchema(options.editorSchema),\n system: `${options.system}\n\nRULES:\n- Generate original and unique content based on the given topic.\n- Strictly adhere to the specified layout and formatting instructions.\n- Utilize the provided rich text editor tools for appropriate formatting.\n- Ensure the output follows the structure of the sample output object.\n- Produce valid JSON with no undefined or null values.\n\nLAYOUT INSTRUCTIONS:\n${options.layout}\n\nRICH TEXT EDITOR TOOLS:\n- Use appropriate formatting tools such as bold, italic, or underline for emphasis where needed.\n- Apply correct heading levels (h1, h2, h3) for hierarchical structure.\n- Utilize bullet points or numbered lists as required by the layout.\n\nADDITIONAL GUIDELINES:\n- Ensure coherence and logical flow between all sections.\n- Maintain a consistent tone and style throughout the content.\n- Use clear and concise language appropriate for the target audience.\n`,\n })\n return streamResult.toTextStreamResponse()\n}\n"],"names":["openai","jsonSchema","streamObject","generateRichText","text","options","console","log","editorSchema","streamResult","maxTokens","model","structuredOutputs","onFinish","result","rawResponse","prompt","schema","system","layout","toTextStreamResponse"],"mappings":"AAAA,SAASA,MAAM,QAAQ,iBAAgB;AACvC,SAASC,UAAU,EAAEC,YAAY,QAAQ,KAAI;AAE7C,OAAO,MAAMC,mBAAmB,OAAOC,MAAcC,UAAe,CAAC,CAAC;IACpEC,QAAQC,GAAG,CAAC,iCAAiCF,QAAQG,YAAY;IACjE,MAAMC,eAAe,MAAMP,aAAa;QACtCQ,WAAWL,QAAQK,SAAS,IAAI;QAChCC,OAAOX,OAAOK,QAAQM,KAAK,EAAC;YAC1BC,mBAAmB;QACrB;QACAC,UAAU,CAACC;YACTR,QAAQC,GAAG,CAAC,kCAAkC;gBAAEF;gBAASU,aAAaD,OAAOC,WAAW;gBAAED;YAAO;QACnG;QACAE,QAAQZ;QACRa,QAAQhB,WAAWI,QAAQG,YAAY;QACvCU,QAAQ,GAAGb,QAAQa,MAAM,CAAC;;;;;;;;;;AAU9B,EAAEb,QAAQc,MAAM,CAAC;;;;;;;;;;;AAWjB,CAAC;IACC;IACA,OAAOV,aAAaW,oBAAoB;AAC1C,EAAC"}
@@ -1,2 +1,371 @@
1
+ export declare const documentSchema: {
2
+ type: string;
3
+ $schema: string;
4
+ additionalProperties: boolean;
5
+ definitions: {
6
+ TextNode: {
7
+ type: string;
8
+ additionalProperties: boolean;
9
+ properties: {
10
+ type: {
11
+ type: string;
12
+ enum: string[];
13
+ };
14
+ detail: {
15
+ type: string;
16
+ description: string;
17
+ enum: number[];
18
+ examples: {
19
+ description: string;
20
+ value: number;
21
+ }[];
22
+ };
23
+ direction: {
24
+ type: string[];
25
+ enum: string[];
26
+ };
27
+ format: {
28
+ type: string;
29
+ description: string;
30
+ };
31
+ indent: {
32
+ type: string;
33
+ };
34
+ mode: {
35
+ type: string;
36
+ description: string;
37
+ enum: number[];
38
+ examples: {
39
+ description: string;
40
+ value: number;
41
+ }[];
42
+ };
43
+ style: {
44
+ type: string;
45
+ description: string;
46
+ };
47
+ text: {
48
+ type: string;
49
+ };
50
+ version: {
51
+ type: string;
52
+ };
53
+ };
54
+ required: string[];
55
+ };
56
+ TableCellNode: {
57
+ type: string;
58
+ additionalProperties: boolean;
59
+ properties: {
60
+ type: {
61
+ type: string;
62
+ enum: string[];
63
+ };
64
+ children: {
65
+ type: string;
66
+ items: {
67
+ $ref: string;
68
+ };
69
+ };
70
+ colSpan: {
71
+ type: string;
72
+ };
73
+ direction: {
74
+ type: string[];
75
+ enum: string[];
76
+ };
77
+ headerState: {
78
+ type: string;
79
+ };
80
+ indent: {
81
+ type: string;
82
+ };
83
+ version: {
84
+ type: string;
85
+ };
86
+ width: {
87
+ type: string[];
88
+ enum: any[];
89
+ };
90
+ };
91
+ required: string[];
92
+ };
93
+ TableRowNode: {
94
+ type: string;
95
+ additionalProperties: boolean;
96
+ properties: {
97
+ type: {
98
+ type: string;
99
+ enum: string[];
100
+ };
101
+ children: {
102
+ type: string;
103
+ items: {
104
+ $ref: string;
105
+ };
106
+ };
107
+ height: {
108
+ type: string;
109
+ };
110
+ };
111
+ required: string[];
112
+ };
113
+ TableNode: {
114
+ type: string;
115
+ additionalProperties: boolean;
116
+ properties: {
117
+ type: {
118
+ type: string;
119
+ enum: string[];
120
+ };
121
+ children: {
122
+ type: string;
123
+ items: {
124
+ $ref: string;
125
+ };
126
+ };
127
+ };
128
+ required: string[];
129
+ };
130
+ HeadingNode: {
131
+ type: string;
132
+ additionalProperties: boolean;
133
+ properties: {
134
+ type: {
135
+ type: string;
136
+ enum: string[];
137
+ };
138
+ children: {
139
+ type: string;
140
+ items: {
141
+ anyOf: {
142
+ $ref: string;
143
+ }[];
144
+ };
145
+ };
146
+ direction: {
147
+ type: string[];
148
+ enum: string[];
149
+ };
150
+ indent: {
151
+ type: string;
152
+ };
153
+ tag: {
154
+ type: string;
155
+ enum: string[];
156
+ };
157
+ version: {
158
+ type: string;
159
+ };
160
+ };
161
+ required: string[];
162
+ };
163
+ ParagraphNode: {
164
+ type: string;
165
+ additionalProperties: boolean;
166
+ properties: {
167
+ type: {
168
+ type: string;
169
+ enum: string[];
170
+ };
171
+ children: {
172
+ type: string;
173
+ items: {
174
+ anyOf: {
175
+ $ref: string;
176
+ }[];
177
+ };
178
+ };
179
+ direction: {
180
+ type: string[];
181
+ enum: string[];
182
+ };
183
+ format: {
184
+ type: string;
185
+ enum: string[];
186
+ };
187
+ indent: {
188
+ type: string;
189
+ };
190
+ textFormat: {
191
+ type: string;
192
+ };
193
+ textStyle: {
194
+ type: string;
195
+ description: string;
196
+ };
197
+ version: {
198
+ type: string;
199
+ };
200
+ };
201
+ required: string[];
202
+ };
203
+ LinkNode: {
204
+ type: string;
205
+ additionalProperties: boolean;
206
+ properties: {
207
+ type: {
208
+ type: string;
209
+ enum: string[];
210
+ };
211
+ children: {
212
+ type: string;
213
+ items: {
214
+ $ref: string;
215
+ };
216
+ };
217
+ url: {
218
+ type: string;
219
+ };
220
+ };
221
+ required: string[];
222
+ };
223
+ ListItemNode: {
224
+ type: string;
225
+ additionalProperties: boolean;
226
+ properties: {
227
+ type: {
228
+ type: string;
229
+ enum: string[];
230
+ };
231
+ children: {
232
+ type: string;
233
+ items: {
234
+ anyOf: {
235
+ $ref: string;
236
+ }[];
237
+ };
238
+ };
239
+ };
240
+ required: string[];
241
+ };
242
+ ListNode: {
243
+ type: string;
244
+ additionalProperties: boolean;
245
+ properties: {
246
+ type: {
247
+ type: string;
248
+ enum: string[];
249
+ };
250
+ children: {
251
+ type: string;
252
+ items: {
253
+ $ref: string;
254
+ };
255
+ };
256
+ listType: {
257
+ type: string;
258
+ enum: string[];
259
+ };
260
+ };
261
+ required: string[];
262
+ };
263
+ QuoteNode: {
264
+ type: string;
265
+ additionalProperties: boolean;
266
+ properties: {
267
+ type: {
268
+ type: string;
269
+ enum: string[];
270
+ };
271
+ children: {
272
+ type: string;
273
+ items: {
274
+ anyOf: {
275
+ $ref: string;
276
+ }[];
277
+ };
278
+ };
279
+ };
280
+ required: string[];
281
+ };
282
+ CodeNode: {
283
+ type: string;
284
+ additionalProperties: boolean;
285
+ properties: {
286
+ type: {
287
+ type: string;
288
+ enum: string[];
289
+ };
290
+ code: {
291
+ type: string;
292
+ };
293
+ language: {
294
+ type: string;
295
+ };
296
+ };
297
+ required: string[];
298
+ };
299
+ HorizontalRuleNode: {
300
+ type: string;
301
+ additionalProperties: boolean;
302
+ properties: {
303
+ type: {
304
+ type: string;
305
+ enum: string[];
306
+ };
307
+ };
308
+ required: string[];
309
+ };
310
+ ImageNode: {
311
+ type: string;
312
+ additionalProperties: boolean;
313
+ properties: {
314
+ type: {
315
+ type: string;
316
+ enum: string[];
317
+ };
318
+ alt: {
319
+ type: string;
320
+ };
321
+ caption: {
322
+ type: string;
323
+ items: {
324
+ $ref: string;
325
+ };
326
+ };
327
+ src: {
328
+ type: string;
329
+ };
330
+ };
331
+ required: string[];
332
+ };
333
+ RootNode: {
334
+ type: string;
335
+ additionalProperties: boolean;
336
+ properties: {
337
+ type: {
338
+ type: string;
339
+ enum: string[];
340
+ };
341
+ children: {
342
+ type: string;
343
+ items: {
344
+ anyOf: {
345
+ $ref: string;
346
+ }[];
347
+ };
348
+ };
349
+ direction: {
350
+ type: string[];
351
+ enum: string[];
352
+ };
353
+ indent: {
354
+ type: string;
355
+ };
356
+ version: {
357
+ type: string;
358
+ };
359
+ };
360
+ required: string[];
361
+ };
362
+ };
363
+ properties: {
364
+ root: {
365
+ $ref: string;
366
+ };
367
+ };
368
+ required: string[];
369
+ };
1
370
  export declare const lexicalJsonSchema: (customNodes?: any[]) => any;
2
371
  //# sourceMappingURL=lexicalJsonSchema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lexicalJsonSchema.d.ts","sourceRoot":"","sources":["../../../src/ai/schemas/lexicalJsonSchema.ts"],"names":[],"mappings":"AAsMA,eAAO,MAAM,iBAAiB,8BAa7B,CAAA"}
1
+ {"version":3,"file":"lexicalJsonSchema.d.ts","sourceRoot":"","sources":["../../../src/ai/schemas/lexicalJsonSchema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkW1B,CAAA;AAED,eAAO,MAAM,iBAAiB,8BAa7B,CAAA"}