@ai-stack/payloadcms 3.0.0-beta.104
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/LICENSE.md +21 -0
- package/README.md +137 -0
- package/dist/ai/analyse.d.ts +2 -0
- package/dist/ai/analyse.d.ts.map +1 -0
- package/dist/ai/analyse.js +3 -0
- package/dist/ai/analyse.js.map +1 -0
- package/dist/ai/models/anthropic/generateRichText.d.ts +2 -0
- package/dist/ai/models/anthropic/generateRichText.d.ts.map +1 -0
- package/dist/ai/models/anthropic/generateRichText.js +38 -0
- package/dist/ai/models/anthropic/generateRichText.js.map +1 -0
- package/dist/ai/models/anthropic/index.d.ts +3 -0
- package/dist/ai/models/anthropic/index.d.ts.map +1 -0
- package/dist/ai/models/anthropic/index.js +112 -0
- package/dist/ai/models/anthropic/index.js.map +1 -0
- package/dist/ai/models/elevenLabs/generateVoice.d.ts +10 -0
- package/dist/ai/models/elevenLabs/generateVoice.d.ts.map +1 -0
- package/dist/ai/models/elevenLabs/generateVoice.js +20 -0
- package/dist/ai/models/elevenLabs/generateVoice.js.map +1 -0
- package/dist/ai/models/elevenLabs/index.d.ts +3 -0
- package/dist/ai/models/elevenLabs/index.d.ts.map +1 -0
- package/dist/ai/models/elevenLabs/index.js +129 -0
- package/dist/ai/models/elevenLabs/index.js.map +1 -0
- package/dist/ai/models/elevenLabs/voices.d.ts +4 -0
- package/dist/ai/models/elevenLabs/voices.d.ts.map +1 -0
- package/dist/ai/models/elevenLabs/voices.js +24 -0
- package/dist/ai/models/elevenLabs/voices.js.map +1 -0
- package/dist/ai/models/example-prompt-rich-text.md +47 -0
- package/dist/ai/models/example.d.ts +73 -0
- package/dist/ai/models/example.d.ts.map +1 -0
- package/dist/ai/models/example.js +126 -0
- package/dist/ai/models/example.js.map +1 -0
- package/dist/ai/models/index.d.ts +3 -0
- package/dist/ai/models/index.d.ts.map +1 -0
- package/dist/ai/models/index.js +11 -0
- package/dist/ai/models/index.js.map +1 -0
- package/dist/ai/models/openai/generateImage.d.ts +10 -0
- package/dist/ai/models/openai/generateImage.d.ts.map +1 -0
- package/dist/ai/models/openai/generateImage.js +20 -0
- package/dist/ai/models/openai/generateImage.js.map +1 -0
- package/dist/ai/models/openai/generateRichText.d.ts +2 -0
- package/dist/ai/models/openai/generateRichText.d.ts.map +1 -0
- package/dist/ai/models/openai/generateRichText.js +38 -0
- package/dist/ai/models/openai/generateRichText.js.map +1 -0
- package/dist/ai/models/openai/generateVoice.d.ts +7 -0
- package/dist/ai/models/openai/generateVoice.d.ts.map +1 -0
- package/dist/ai/models/openai/generateVoice.js +19 -0
- package/dist/ai/models/openai/generateVoice.js.map +1 -0
- package/dist/ai/models/openai/index.d.ts +3 -0
- package/dist/ai/models/openai/index.d.ts.map +1 -0
- package/dist/ai/models/openai/index.js +276 -0
- package/dist/ai/models/openai/index.js.map +1 -0
- package/dist/ai/prompts.d.ts +25 -0
- package/dist/ai/prompts.d.ts.map +1 -0
- package/dist/ai/prompts.js +214 -0
- package/dist/ai/prompts.js.map +1 -0
- package/dist/ai/schemas/lexical.schema.d.ts +31 -0
- package/dist/ai/schemas/lexical.schema.d.ts.map +1 -0
- package/dist/ai/schemas/lexical.schema.js +102 -0
- package/dist/ai/schemas/lexical.schema.js.map +1 -0
- package/dist/ai/utils/generateFileNameByPrompt.d.ts +2 -0
- package/dist/ai/utils/generateFileNameByPrompt.d.ts.map +1 -0
- package/dist/ai/utils/generateFileNameByPrompt.js +21 -0
- package/dist/ai/utils/generateFileNameByPrompt.js.map +1 -0
- package/dist/ai/utils/generateSeedPrompt.d.ts +5 -0
- package/dist/ai/utils/generateSeedPrompt.d.ts.map +1 -0
- package/dist/ai/utils/generateSeedPrompt.js +23 -0
- package/dist/ai/utils/generateSeedPrompt.js.map +1 -0
- package/dist/collections/Instructions.d.ts +3 -0
- package/dist/collections/Instructions.d.ts.map +1 -0
- package/dist/collections/Instructions.js +109 -0
- package/dist/collections/Instructions.js.map +1 -0
- package/dist/defaults.d.ts +10 -0
- package/dist/defaults.d.ts.map +1 -0
- package/dist/defaults.js +13 -0
- package/dist/defaults.js.map +1 -0
- package/dist/endpoints/index.d.ts +3 -0
- package/dist/endpoints/index.d.ts.map +1 -0
- package/dist/endpoints/index.js +141 -0
- package/dist/endpoints/index.js.map +1 -0
- package/dist/exports/client.d.ts +3 -0
- package/dist/exports/client.d.ts.map +1 -0
- package/dist/exports/client.js +4 -0
- package/dist/exports/client.js.map +1 -0
- package/dist/exports/fields.d.ts +4 -0
- package/dist/exports/fields.d.ts.map +1 -0
- package/dist/exports/fields.js +5 -0
- package/dist/exports/fields.js.map +1 -0
- package/dist/exports/types.d.ts +3 -0
- package/dist/exports/types.d.ts.map +1 -0
- package/dist/exports/types.js +3 -0
- package/dist/exports/types.js.map +1 -0
- package/dist/fields/ComposeField/ComposeField.d.ts +4 -0
- package/dist/fields/ComposeField/ComposeField.d.ts.map +1 -0
- package/dist/fields/ComposeField/ComposeField.js +18 -0
- package/dist/fields/ComposeField/ComposeField.js.map +1 -0
- package/dist/fields/LexicalEditor/ComposeFeatureComponent.d.ts +2 -0
- package/dist/fields/LexicalEditor/ComposeFeatureComponent.d.ts.map +1 -0
- package/dist/fields/LexicalEditor/ComposeFeatureComponent.js +15 -0
- package/dist/fields/LexicalEditor/ComposeFeatureComponent.js.map +1 -0
- package/dist/fields/LexicalEditor/feature.client.d.ts +2 -0
- package/dist/fields/LexicalEditor/feature.client.d.ts.map +1 -0
- package/dist/fields/LexicalEditor/feature.client.js +13 -0
- package/dist/fields/LexicalEditor/feature.client.js.map +1 -0
- package/dist/fields/LexicalEditor/feature.server.d.ts +2 -0
- package/dist/fields/LexicalEditor/feature.server.d.ts.map +1 -0
- package/dist/fields/LexicalEditor/feature.server.js +12 -0
- package/dist/fields/LexicalEditor/feature.server.js.map +1 -0
- package/dist/fields/PromptEditorField/PromptEditorField.d.ts +4 -0
- package/dist/fields/PromptEditorField/PromptEditorField.d.ts.map +1 -0
- package/dist/fields/PromptEditorField/PromptEditorField.js +41 -0
- package/dist/fields/PromptEditorField/PromptEditorField.js.map +1 -0
- package/dist/fields/SelectField/SelectField.d.ts +10 -0
- package/dist/fields/SelectField/SelectField.d.ts.map +1 -0
- package/dist/fields/SelectField/SelectField.js +41 -0
- package/dist/fields/SelectField/SelectField.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/init.d.ts +4 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/init.js +81 -0
- package/dist/init.js.map +1 -0
- package/dist/libraries/autocomplete/AutocompleteTextArea.d.ts +8 -0
- package/dist/libraries/autocomplete/AutocompleteTextArea.d.ts.map +1 -0
- package/dist/libraries/autocomplete/AutocompleteTextArea.js +437 -0
- package/dist/libraries/autocomplete/AutocompleteTextArea.js.map +1 -0
- package/dist/libraries/autocomplete/AutocompleteTextArea.module.scss +35 -0
- package/dist/libraries/handlebars/asyncHandlebars.d.ts +2 -0
- package/dist/libraries/handlebars/asyncHandlebars.d.ts.map +1 -0
- package/dist/libraries/handlebars/asyncHandlebars.js +5 -0
- package/dist/libraries/handlebars/asyncHandlebars.js.map +1 -0
- package/dist/libraries/handlebars/helpers.d.ts +2 -0
- package/dist/libraries/handlebars/helpers.d.ts.map +1 -0
- package/dist/libraries/handlebars/helpers.js +22 -0
- package/dist/libraries/handlebars/helpers.js.map +1 -0
- package/dist/libraries/handlebars/helpersMap.d.ts +12 -0
- package/dist/libraries/handlebars/helpersMap.d.ts.map +1 -0
- package/dist/libraries/handlebars/helpersMap.js +13 -0
- package/dist/libraries/handlebars/helpersMap.js.map +1 -0
- package/dist/libraries/handlebars/replacePlaceholders.d.ts +2 -0
- package/dist/libraries/handlebars/replacePlaceholders.d.ts.map +1 -0
- package/dist/libraries/handlebars/replacePlaceholders.js +8 -0
- package/dist/libraries/handlebars/replacePlaceholders.js.map +1 -0
- package/dist/plugin.d.ts +5 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +121 -0
- package/dist/plugin.js.map +1 -0
- package/dist/providers/InstructionsProvider/InstructionsProvider.d.ts +6 -0
- package/dist/providers/InstructionsProvider/InstructionsProvider.d.ts.map +1 -0
- package/dist/providers/InstructionsProvider/InstructionsProvider.js +31 -0
- package/dist/providers/InstructionsProvider/InstructionsProvider.js.map +1 -0
- package/dist/providers/InstructionsProvider/useInstructions.d.ts +4 -0
- package/dist/providers/InstructionsProvider/useInstructions.d.ts.map +1 -0
- package/dist/providers/InstructionsProvider/useInstructions.js +38 -0
- package/dist/providers/InstructionsProvider/useInstructions.js.map +1 -0
- package/dist/styles.d.js +2 -0
- package/dist/styles.d.js.map +1 -0
- package/dist/translations/en.json +4 -0
- package/dist/translations/es.json +4 -0
- package/dist/translations/fa.json +4 -0
- package/dist/translations/fr.json +4 -0
- package/dist/translations/index.d.ts +38 -0
- package/dist/translations/index.d.ts.map +1 -0
- package/dist/translations/index.js +36 -0
- package/dist/translations/index.js.map +1 -0
- package/dist/translations/pl.json +4 -0
- package/dist/translations/ru.json +4 -0
- package/dist/translations/translation-schema.json +16 -0
- package/dist/translations/uk.json +4 -0
- package/dist/types.d.ts +94 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/Compose/Compose.d.ts +9 -0
- package/dist/ui/Compose/Compose.d.ts.map +1 -0
- package/dist/ui/Compose/Compose.js +176 -0
- package/dist/ui/Compose/Compose.js.map +1 -0
- package/dist/ui/Compose/UndoRedoActions.d.ts +4 -0
- package/dist/ui/Compose/UndoRedoActions.d.ts.map +1 -0
- package/dist/ui/Compose/UndoRedoActions.js +56 -0
- package/dist/ui/Compose/UndoRedoActions.js.map +1 -0
- package/dist/ui/Compose/compose.module.scss +19 -0
- package/dist/ui/Compose/hooks/menu/Item.d.ts +5 -0
- package/dist/ui/Compose/hooks/menu/Item.d.ts.map +1 -0
- package/dist/ui/Compose/hooks/menu/Item.js +32 -0
- package/dist/ui/Compose/hooks/menu/Item.js.map +1 -0
- package/dist/ui/Compose/hooks/menu/TranslateMenu.d.ts +4 -0
- package/dist/ui/Compose/hooks/menu/TranslateMenu.d.ts.map +1 -0
- package/dist/ui/Compose/hooks/menu/TranslateMenu.js +78 -0
- package/dist/ui/Compose/hooks/menu/TranslateMenu.js.map +1 -0
- package/dist/ui/Compose/hooks/menu/items.d.ts +9 -0
- package/dist/ui/Compose/hooks/menu/items.d.ts.map +1 -0
- package/dist/ui/Compose/hooks/menu/items.js +12 -0
- package/dist/ui/Compose/hooks/menu/items.js.map +1 -0
- package/dist/ui/Compose/hooks/menu/itemsMap.d.ts +11 -0
- package/dist/ui/Compose/hooks/menu/itemsMap.d.ts.map +1 -0
- package/dist/ui/Compose/hooks/menu/itemsMap.js +68 -0
- package/dist/ui/Compose/hooks/menu/itemsMap.js.map +1 -0
- package/dist/ui/Compose/hooks/menu/menu.module.scss +109 -0
- package/dist/ui/Compose/hooks/menu/useMenu.d.ts +11 -0
- package/dist/ui/Compose/hooks/menu/useMenu.d.ts.map +1 -0
- package/dist/ui/Compose/hooks/menu/useMenu.js +93 -0
- package/dist/ui/Compose/hooks/menu/useMenu.js.map +1 -0
- package/dist/ui/Compose/hooks/useGenerate.d.ts +11 -0
- package/dist/ui/Compose/hooks/useGenerate.d.ts.map +1 -0
- package/dist/ui/Compose/hooks/useGenerate.js +175 -0
- package/dist/ui/Compose/hooks/useGenerate.js.map +1 -0
- package/dist/ui/Compose/hooks/useHistory.d.ts +9 -0
- package/dist/ui/Compose/hooks/useHistory.d.ts.map +1 -0
- package/dist/ui/Compose/hooks/useHistory.js +171 -0
- package/dist/ui/Compose/hooks/useHistory.js.map +1 -0
- package/dist/ui/Icons/Icons.d.ts +45 -0
- package/dist/ui/Icons/Icons.d.ts.map +1 -0
- package/dist/ui/Icons/Icons.js +154 -0
- package/dist/ui/Icons/Icons.js.map +1 -0
- package/dist/ui/Icons/LottieAnimation.d.ts +5 -0
- package/dist/ui/Icons/LottieAnimation.d.ts.map +1 -0
- package/dist/ui/Icons/LottieAnimation.js +100 -0
- package/dist/ui/Icons/LottieAnimation.js.map +1 -0
- package/dist/ui/Icons/icons.module.css +26 -0
- package/dist/utilities/getFieldBySchemaPath.d.ts +3 -0
- package/dist/utilities/getFieldBySchemaPath.d.ts.map +1 -0
- package/dist/utilities/getFieldBySchemaPath.js +37 -0
- package/dist/utilities/getFieldBySchemaPath.js.map +1 -0
- package/dist/utilities/getFieldInfo.d.ts +3 -0
- package/dist/utilities/getFieldInfo.d.ts.map +1 -0
- package/dist/utilities/getFieldInfo.js +14 -0
- package/dist/utilities/getFieldInfo.js.map +1 -0
- package/dist/utilities/isPluginActivated.d.ts +2 -0
- package/dist/utilities/isPluginActivated.d.ts.map +1 -0
- package/dist/utilities/isPluginActivated.js +5 -0
- package/dist/utilities/isPluginActivated.js.map +1 -0
- package/dist/utilities/jsonToZod.d.ts +3 -0
- package/dist/utilities/jsonToZod.d.ts.map +1 -0
- package/dist/utilities/jsonToZod.js +33 -0
- package/dist/utilities/jsonToZod.js.map +1 -0
- package/dist/utilities/lexicalToHTML.d.ts +4 -0
- package/dist/utilities/lexicalToHTML.d.ts.map +1 -0
- package/dist/utilities/lexicalToHTML.js +11 -0
- package/dist/utilities/lexicalToHTML.js.map +1 -0
- package/dist/utilities/setSafeLexicalState.d.ts +5 -0
- package/dist/utilities/setSafeLexicalState.d.ts.map +1 -0
- package/dist/utilities/setSafeLexicalState.js +20 -0
- package/dist/utilities/setSafeLexicalState.js.map +1 -0
- package/dist/utilities/updateFieldsConfig.d.ts +8 -0
- package/dist/utilities/updateFieldsConfig.d.ts.map +1 -0
- package/dist/utilities/updateFieldsConfig.js +89 -0
- package/dist/utilities/updateFieldsConfig.js.map +1 -0
- package/package.json +124 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const PluginIcon: ({ color, isLoading }: {
|
|
2
|
+
color?: string;
|
|
3
|
+
isLoading: any;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const TuneIcon: ({ color, size }: {
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: number;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const LocalLibraryIcon: ({ color, size }: {
|
|
10
|
+
color?: string;
|
|
11
|
+
size?: number;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const SpellCheckIcon: ({ color, size }: {
|
|
14
|
+
color?: string;
|
|
15
|
+
size?: number;
|
|
16
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const TranslateIcon: ({ color, size }: {
|
|
18
|
+
color?: string;
|
|
19
|
+
size?: number;
|
|
20
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const DocsAddOnIcon: ({ color, size }: {
|
|
22
|
+
color?: string;
|
|
23
|
+
size?: number;
|
|
24
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const SummarizeIcon: ({ color, size }: {
|
|
26
|
+
color?: string;
|
|
27
|
+
size?: number;
|
|
28
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const SegmentIcon: ({ color, size }: {
|
|
30
|
+
color?: string;
|
|
31
|
+
size?: number;
|
|
32
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const StylusNoteIcon: ({ color, size }: {
|
|
34
|
+
color?: string;
|
|
35
|
+
size?: number;
|
|
36
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare const EditNoteIcon: ({ color, size }: {
|
|
38
|
+
color?: string;
|
|
39
|
+
size?: number;
|
|
40
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare const ArrowIcon: ({ color, size }: {
|
|
42
|
+
color?: string;
|
|
43
|
+
size?: number;
|
|
44
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
//# sourceMappingURL=Icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icons.d.ts","sourceRoot":"","sources":["../../../src/ui/Icons/Icons.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU;;;6CAMtB,CAAA;AAED,eAAO,MAAM,QAAQ;;;6CAQpB,CAAA;AAED,eAAO,MAAM,gBAAgB;;;6CAQ5B,CAAA;AAED,eAAO,MAAM,cAAc;;;6CAQ1B,CAAA;AAED,eAAO,MAAM,aAAa;;;6CAQzB,CAAA;AAED,eAAO,MAAM,aAAa;;;6CAQzB,CAAA;AAED,eAAO,MAAM,aAAa;;;6CAQzB,CAAA;AAED,eAAO,MAAM,WAAW;;;6CAQvB,CAAA;AAED,eAAO,MAAM,cAAc;;;6CAQ1B,CAAA;AAED,eAAO,MAAM,YAAY;;;6CAQxB,CAAA;AAED,eAAO,MAAM,SAAS;;;6CAQrB,CAAA"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import LottieAnimation from './LottieAnimation.js';
|
|
4
|
+
import styles from './icons.module.css';
|
|
5
|
+
export const PluginIcon = ({ color = 'white', isLoading })=>{
|
|
6
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
7
|
+
className: styles.actions_icon,
|
|
8
|
+
children: /*#__PURE__*/ _jsx(LottieAnimation, {
|
|
9
|
+
isLoading: isLoading
|
|
10
|
+
})
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export const TuneIcon = ({ color = 'white', size = 24 })=>{
|
|
14
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
15
|
+
className: styles.icon,
|
|
16
|
+
children: /*#__PURE__*/ _jsx("svg", {
|
|
17
|
+
height: size,
|
|
18
|
+
viewBox: "0 -960 960 960",
|
|
19
|
+
width: size,
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
22
|
+
d: "M450-130v-220h60v80h320v60H510v80h-60Zm-320-80v-60h220v60H130Zm160-160v-80H130v-60h160v-80h60v220h-60Zm160-80v-60h380v60H450Zm160-160v-220h60v80h160v60H670v80h-60Zm-480-80v-60h380v60H130Z"
|
|
23
|
+
})
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
export const LocalLibraryIcon = ({ color = 'white', size = 24 })=>{
|
|
28
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
29
|
+
className: styles.icon,
|
|
30
|
+
children: /*#__PURE__*/ _jsx("svg", {
|
|
31
|
+
height: size,
|
|
32
|
+
viewBox: "0 -960 960 960",
|
|
33
|
+
width: size,
|
|
34
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
35
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
36
|
+
d: "M480-115.38q-67.38-54.93-148.85-86.7Q249.69-233.85 160-240v-373.85q91.77 5.39 174.38 43.81Q417-531.62 480-474.92q63-56.7 145.62-95.12 82.61-38.42 174.38-43.81V-240q-89.92 6.15-171.27 37.92-81.35 31.77-148.73 86.7Zm0-50.16q63-46.23 134-74.56 71-28.33 146-37.44v-291.38q-78.38 13-149.65 50.57-71.27 37.58-130.35 96.66-59.08-59.08-130.35-96.66-71.27-37.57-149.65-50.57v291.38q75 9.11 146 37.44t134 74.56Zm0-451.38q-53.31 0-91.27-37.96-37.96-37.97-37.96-91.27 0-53.31 37.96-91.27 37.96-37.96 91.27-37.96 53.31 0 91.27 37.96 37.96 37.96 37.96 91.27 0 53.3-37.96 91.27-37.96 37.96-91.27 37.96Zm.03-40q36.82 0 63.01-26.22 26.19-26.22 26.19-63.04t-26.22-63.01q-26.22-26.19-63.04-26.19t-63.01 26.21q-26.19 26.22-26.19 63.04t26.22 63.01q26.22 26.2 63.04 26.2Zm-.03-89.23Zm0 324.46Z"
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
export const SpellCheckIcon = ({ color = 'white', size = 24 })=>{
|
|
42
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
43
|
+
className: styles.icon,
|
|
44
|
+
children: /*#__PURE__*/ _jsx("svg", {
|
|
45
|
+
height: size,
|
|
46
|
+
viewBox: "0 -960 960 960",
|
|
47
|
+
width: size,
|
|
48
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
49
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
50
|
+
d: "M564-93.85 407.85-250 450-292.15l114 114 226.77-226.77 42.15 42.15L564-93.85ZM135.39-320l191.69-520h69.38l190.92 520h-68.92l-49.07-142H250.92l-49.84 142h-65.69ZM272-518h178.31L362-765.54h-3.23L272-518Z"
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
export const TranslateIcon = ({ color = 'white', size = 24 })=>{
|
|
56
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
57
|
+
className: styles.icon,
|
|
58
|
+
children: /*#__PURE__*/ _jsx("svg", {
|
|
59
|
+
height: size,
|
|
60
|
+
viewBox: "0 -960 960 960",
|
|
61
|
+
width: size,
|
|
62
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
63
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
64
|
+
d: "m476-100 178.15-460h62.46l178.16 460h-63.62l-45.3-122H584.92l-45.31 122H476ZM160.38-217.69l-42.15-42.16 198.92-199.3q-34.61-35-65.8-83.08Q220.15-590.31 200-640h63.61q17.31 36.31 42.12 72.62 24.81 36.3 53.58 66.07 42.61-43 80.61-104.42T493.62-720H67.69v-60H330v-64.61h60V-780h262.31v60h-97.93q-19.46 67.38-62.03 140.88-42.58 73.5-90.89 121.2l98.69 101.07-22.69 61.62-118.15-121.16-198.93 198.7Zm443.77-57.39h162.46l-81.23-218.23-81.23 218.23Z"
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
export const DocsAddOnIcon = ({ color = 'white', size = 24 })=>{
|
|
70
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
71
|
+
className: styles.icon,
|
|
72
|
+
children: /*#__PURE__*/ _jsx("svg", {
|
|
73
|
+
height: size,
|
|
74
|
+
viewBox: "0 -960 960 960",
|
|
75
|
+
width: size,
|
|
76
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
77
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
78
|
+
d: "M650-131v-120H530v-60h120v-120h60v120h120v60H710v120h-60ZM170-250v-60h281.85q-1.85 15.8-1.35 30.09t2.35 29.91H170Zm0-160v-60h379.08q-17.23 12.15-31.5 27.15-14.27 15-25.96 32.85H170Zm0-160v-60h580v60H170Zm0-160v-60h580v60H170Z"
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
export const SummarizeIcon = ({ color = 'white', size = 24 })=>{
|
|
84
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
85
|
+
className: styles.icon,
|
|
86
|
+
children: /*#__PURE__*/ _jsx("svg", {
|
|
87
|
+
height: size,
|
|
88
|
+
viewBox: "0 -960 960 960",
|
|
89
|
+
width: size,
|
|
90
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
91
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
92
|
+
d: "M320-603.85q15.08 0 25.62-10.53 10.53-10.54 10.53-25.62 0-15.08-10.53-25.62-10.54-10.53-25.62-10.53-15.08 0-25.62 10.53-10.53 10.54-10.53 25.62 0 15.08 10.53 25.62 10.54 10.53 25.62 10.53Zm0 160q15.08 0 25.62-10.53 10.53-10.54 10.53-25.62 0-15.08-10.53-25.62-10.54-10.53-25.62-10.53-15.08 0-25.62 10.53-10.53 10.54-10.53 25.62 0 15.08 10.53 25.62 10.54 10.53 25.62 10.53Zm0 160q15.08 0 25.62-10.53 10.53-10.54 10.53-25.62 0-15.08-10.53-25.62-10.54-10.53-25.62-10.53-15.08 0-25.62 10.53-10.53 10.54-10.53 25.62 0 15.08 10.53 25.62 10.54 10.53 25.62 10.53ZM212.31-140Q182-140 161-161q-21-21-21-51.31v-535.38Q140-778 161-799q21-21 51.31-21h419.23L820-631.54v419.23Q820-182 799-161q-21 21-51.31 21H212.31Zm0-60h535.38q5.39 0 8.85-3.46t3.46-8.85V-600H600v-160H212.31q-5.39 0-8.85 3.46t-3.46 8.85v535.38q0 5.39 3.46 8.85t8.85 3.46ZM200-760v160-160V-200v-560Z"
|
|
93
|
+
})
|
|
94
|
+
})
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
export const SegmentIcon = ({ color = 'white', size = 24 })=>{
|
|
98
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
99
|
+
className: styles.icon,
|
|
100
|
+
children: /*#__PURE__*/ _jsx("svg", {
|
|
101
|
+
height: size,
|
|
102
|
+
viewBox: "0 -960 960 960",
|
|
103
|
+
width: size,
|
|
104
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
105
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
106
|
+
d: "M380-254.62v-59.99h440v59.99H380ZM380-450v-60h440v60H380ZM140-645.39v-59.99h680v59.99H140Z"
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
export const StylusNoteIcon = ({ color = 'white', size = 24 })=>{
|
|
112
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
113
|
+
className: styles.icon,
|
|
114
|
+
children: /*#__PURE__*/ _jsx("svg", {
|
|
115
|
+
height: size,
|
|
116
|
+
viewBox: "0 -960 960 960",
|
|
117
|
+
width: size,
|
|
118
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
119
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
120
|
+
d: "m487.46-283.15 332.31-332.31q2.69-2.69 2.69-6.54t-2.69-6.54l-38.92-38.92q-2.7-2.69-6.54-2.69-3.85 0-6.54 2.69L435.46-335.15l52 52Zm-251 72.38q-89.23-5-134-39.69-44.77-34.69-44.77-98.16 0-60.76 51-98.57 51-37.81 141.77-45.81 43.62-3.77 65.43-15.77 21.8-12 21.8-33.23 0-29.46-29.5-44.96t-96.73-22.27l5.46-59.62q92.23 8.77 136.5 39.77 44.27 31 44.27 87.08 0 47.61-36.57 75.5-36.58 27.88-106.2 33.5-68.61 5.77-102.92 26.77t-34.31 57.61q0 37.31 28.58 55.51 28.58 18.19 92.65 22.34l-2.46 60Zm260.38 3.15L359.92-344.54l373.54-373.15q17.69-17.69 41.35-17.5 23.65.19 41.34 17.5L870-663.85q17.69 17.7 17.69 41.54 0 23.85-17.69 41.54L496.84-207.62ZM363.23-180q-13.54 3.23-23.84-7.08-10.31-10.31-7.08-23.84l27.61-133.62 136.92 136.92L363.23-180Z"
|
|
121
|
+
})
|
|
122
|
+
})
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
export const EditNoteIcon = ({ color = 'white', size = 24 })=>{
|
|
126
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
127
|
+
className: styles.icon,
|
|
128
|
+
children: /*#__PURE__*/ _jsx("svg", {
|
|
129
|
+
height: size,
|
|
130
|
+
viewBox: "0 -960 960 960",
|
|
131
|
+
width: size,
|
|
132
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
133
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
134
|
+
d: "M180-400v-60h280v60H180Zm0-160v-60h440v60H180Zm0-160v-60h440v60H180Zm344.62 540v-105.69l217.15-216.16q7.46-7.46 16.11-10.5 8.65-3.03 17.3-3.03 9.43 0 18.25 3.53 8.82 3.54 16.03 10.62l37 37.38q6.46 7.47 10 16.16Q860-439 860-430.31t-3.23 17.69q-3.23 9-10.31 16.46L630.31-180H524.62Zm287.69-250.31-37-37.38 37 37.38Zm-240 202.62h38l129.84-130.47-18.38-19-18.62-18.76-130.84 130.23v38Zm149.46-149.47-18.62-18.76 37 37.76-18.38-19Z"
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
export const ArrowIcon = ({ color = 'white', size = 24 })=>{
|
|
140
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
141
|
+
className: styles.icon,
|
|
142
|
+
children: /*#__PURE__*/ _jsx("svg", {
|
|
143
|
+
height: size,
|
|
144
|
+
viewBox: "0 -960 960 960",
|
|
145
|
+
width: size,
|
|
146
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
147
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
148
|
+
d: "m531.69-480-184-184L376-692.31 588.31-480 376-267.69 347.69-296l184-184Z"
|
|
149
|
+
})
|
|
150
|
+
})
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
//# sourceMappingURL=Icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/ui/Icons/Icons.tsx"],"sourcesContent":["import React from 'react'\n\nimport LottieAnimation from './LottieAnimation.js'\nimport styles from './icons.module.css'\n\nexport const PluginIcon = ({ color = 'white', isLoading }) => {\n return (\n <span className={styles.actions_icon}>\n <LottieAnimation isLoading={isLoading} />\n </span>\n )\n}\n\nexport const TuneIcon = ({ color = 'white', size = 24 }) => {\n return (\n <span className={styles.icon}>\n <svg height={size} viewBox=\"0 -960 960 960\" width={size} xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M450-130v-220h60v80h320v60H510v80h-60Zm-320-80v-60h220v60H130Zm160-160v-80H130v-60h160v-80h60v220h-60Zm160-80v-60h380v60H450Zm160-160v-220h60v80h160v60H670v80h-60Zm-480-80v-60h380v60H130Z\" />\n </svg>\n </span>\n )\n}\n\nexport const LocalLibraryIcon = ({ color = 'white', size = 24 }) => {\n return (\n <span className={styles.icon}>\n <svg height={size} viewBox=\"0 -960 960 960\" width={size} xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M480-115.38q-67.38-54.93-148.85-86.7Q249.69-233.85 160-240v-373.85q91.77 5.39 174.38 43.81Q417-531.62 480-474.92q63-56.7 145.62-95.12 82.61-38.42 174.38-43.81V-240q-89.92 6.15-171.27 37.92-81.35 31.77-148.73 86.7Zm0-50.16q63-46.23 134-74.56 71-28.33 146-37.44v-291.38q-78.38 13-149.65 50.57-71.27 37.58-130.35 96.66-59.08-59.08-130.35-96.66-71.27-37.57-149.65-50.57v291.38q75 9.11 146 37.44t134 74.56Zm0-451.38q-53.31 0-91.27-37.96-37.96-37.97-37.96-91.27 0-53.31 37.96-91.27 37.96-37.96 91.27-37.96 53.31 0 91.27 37.96 37.96 37.96 37.96 91.27 0 53.3-37.96 91.27-37.96 37.96-91.27 37.96Zm.03-40q36.82 0 63.01-26.22 26.19-26.22 26.19-63.04t-26.22-63.01q-26.22-26.19-63.04-26.19t-63.01 26.21q-26.19 26.22-26.19 63.04t26.22 63.01q26.22 26.2 63.04 26.2Zm-.03-89.23Zm0 324.46Z\" />\n </svg>\n </span>\n )\n}\n\nexport const SpellCheckIcon = ({ color = 'white', size = 24 }) => {\n return (\n <span className={styles.icon}>\n <svg height={size} viewBox=\"0 -960 960 960\" width={size} xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M564-93.85 407.85-250 450-292.15l114 114 226.77-226.77 42.15 42.15L564-93.85ZM135.39-320l191.69-520h69.38l190.92 520h-68.92l-49.07-142H250.92l-49.84 142h-65.69ZM272-518h178.31L362-765.54h-3.23L272-518Z\" />\n </svg>\n </span>\n )\n}\n\nexport const TranslateIcon = ({ color = 'white', size = 24 }) => {\n return (\n <span className={styles.icon}>\n <svg height={size} viewBox=\"0 -960 960 960\" width={size} xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m476-100 178.15-460h62.46l178.16 460h-63.62l-45.3-122H584.92l-45.31 122H476ZM160.38-217.69l-42.15-42.16 198.92-199.3q-34.61-35-65.8-83.08Q220.15-590.31 200-640h63.61q17.31 36.31 42.12 72.62 24.81 36.3 53.58 66.07 42.61-43 80.61-104.42T493.62-720H67.69v-60H330v-64.61h60V-780h262.31v60h-97.93q-19.46 67.38-62.03 140.88-42.58 73.5-90.89 121.2l98.69 101.07-22.69 61.62-118.15-121.16-198.93 198.7Zm443.77-57.39h162.46l-81.23-218.23-81.23 218.23Z\" />\n </svg>\n </span>\n )\n}\n\nexport const DocsAddOnIcon = ({ color = 'white', size = 24 }) => {\n return (\n <span className={styles.icon}>\n <svg height={size} viewBox=\"0 -960 960 960\" width={size} xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M650-131v-120H530v-60h120v-120h60v120h120v60H710v120h-60ZM170-250v-60h281.85q-1.85 15.8-1.35 30.09t2.35 29.91H170Zm0-160v-60h379.08q-17.23 12.15-31.5 27.15-14.27 15-25.96 32.85H170Zm0-160v-60h580v60H170Zm0-160v-60h580v60H170Z\" />\n </svg>\n </span>\n )\n}\n\nexport const SummarizeIcon = ({ color = 'white', size = 24 }) => {\n return (\n <span className={styles.icon}>\n <svg height={size} viewBox=\"0 -960 960 960\" width={size} xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M320-603.85q15.08 0 25.62-10.53 10.53-10.54 10.53-25.62 0-15.08-10.53-25.62-10.54-10.53-25.62-10.53-15.08 0-25.62 10.53-10.53 10.54-10.53 25.62 0 15.08 10.53 25.62 10.54 10.53 25.62 10.53Zm0 160q15.08 0 25.62-10.53 10.53-10.54 10.53-25.62 0-15.08-10.53-25.62-10.54-10.53-25.62-10.53-15.08 0-25.62 10.53-10.53 10.54-10.53 25.62 0 15.08 10.53 25.62 10.54 10.53 25.62 10.53Zm0 160q15.08 0 25.62-10.53 10.53-10.54 10.53-25.62 0-15.08-10.53-25.62-10.54-10.53-25.62-10.53-15.08 0-25.62 10.53-10.53 10.54-10.53 25.62 0 15.08 10.53 25.62 10.54 10.53 25.62 10.53ZM212.31-140Q182-140 161-161q-21-21-21-51.31v-535.38Q140-778 161-799q21-21 51.31-21h419.23L820-631.54v419.23Q820-182 799-161q-21 21-51.31 21H212.31Zm0-60h535.38q5.39 0 8.85-3.46t3.46-8.85V-600H600v-160H212.31q-5.39 0-8.85 3.46t-3.46 8.85v535.38q0 5.39 3.46 8.85t8.85 3.46ZM200-760v160-160V-200v-560Z\" />\n </svg>\n </span>\n )\n}\n\nexport const SegmentIcon = ({ color = 'white', size = 24 }) => {\n return (\n <span className={styles.icon}>\n <svg height={size} viewBox=\"0 -960 960 960\" width={size} xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M380-254.62v-59.99h440v59.99H380ZM380-450v-60h440v60H380ZM140-645.39v-59.99h680v59.99H140Z\" />\n </svg>\n </span>\n )\n}\n\nexport const StylusNoteIcon = ({ color = 'white', size = 24 }) => {\n return (\n <span className={styles.icon}>\n <svg height={size} viewBox=\"0 -960 960 960\" width={size} xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m487.46-283.15 332.31-332.31q2.69-2.69 2.69-6.54t-2.69-6.54l-38.92-38.92q-2.7-2.69-6.54-2.69-3.85 0-6.54 2.69L435.46-335.15l52 52Zm-251 72.38q-89.23-5-134-39.69-44.77-34.69-44.77-98.16 0-60.76 51-98.57 51-37.81 141.77-45.81 43.62-3.77 65.43-15.77 21.8-12 21.8-33.23 0-29.46-29.5-44.96t-96.73-22.27l5.46-59.62q92.23 8.77 136.5 39.77 44.27 31 44.27 87.08 0 47.61-36.57 75.5-36.58 27.88-106.2 33.5-68.61 5.77-102.92 26.77t-34.31 57.61q0 37.31 28.58 55.51 28.58 18.19 92.65 22.34l-2.46 60Zm260.38 3.15L359.92-344.54l373.54-373.15q17.69-17.69 41.35-17.5 23.65.19 41.34 17.5L870-663.85q17.69 17.7 17.69 41.54 0 23.85-17.69 41.54L496.84-207.62ZM363.23-180q-13.54 3.23-23.84-7.08-10.31-10.31-7.08-23.84l27.61-133.62 136.92 136.92L363.23-180Z\" />\n </svg>\n </span>\n )\n}\n\nexport const EditNoteIcon = ({ color = 'white', size = 24 }) => {\n return (\n <span className={styles.icon}>\n <svg height={size} viewBox=\"0 -960 960 960\" width={size} xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M180-400v-60h280v60H180Zm0-160v-60h440v60H180Zm0-160v-60h440v60H180Zm344.62 540v-105.69l217.15-216.16q7.46-7.46 16.11-10.5 8.65-3.03 17.3-3.03 9.43 0 18.25 3.53 8.82 3.54 16.03 10.62l37 37.38q6.46 7.47 10 16.16Q860-439 860-430.31t-3.23 17.69q-3.23 9-10.31 16.46L630.31-180H524.62Zm287.69-250.31-37-37.38 37 37.38Zm-240 202.62h38l129.84-130.47-18.38-19-18.62-18.76-130.84 130.23v38Zm149.46-149.47-18.62-18.76 37 37.76-18.38-19Z\" />\n </svg>\n </span>\n )\n}\n\nexport const ArrowIcon = ({ color = 'white', size = 24 }) => {\n return (\n <span className={styles.icon}>\n <svg height={size} viewBox=\"0 -960 960 960\" width={size} xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m531.69-480-184-184L376-692.31 588.31-480 376-267.69 347.69-296l184-184Z\" />\n </svg>\n </span>\n )\n}\n"],"names":["React","LottieAnimation","styles","PluginIcon","color","isLoading","span","className","actions_icon","TuneIcon","size","icon","svg","height","viewBox","width","xmlns","path","d","LocalLibraryIcon","SpellCheckIcon","TranslateIcon","DocsAddOnIcon","SummarizeIcon","SegmentIcon","StylusNoteIcon","EditNoteIcon","ArrowIcon"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LottieAnimation.d.ts","sourceRoot":"","sources":["../../../src/ui/Icons/LottieAnimation.tsx"],"names":[],"mappings":"AAIA,QAAA,MAAM,eAAe;;6CAqEpB,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import styles from './icons.module.css';
|
|
4
|
+
const LottieAnimation = ({ isLoading = false })=>{
|
|
5
|
+
const svgRef = useRef(null);
|
|
6
|
+
const [animations, setAnimations] = useState([]);
|
|
7
|
+
useEffect(()=>{
|
|
8
|
+
const svg = svgRef.current;
|
|
9
|
+
if (!svg) return;
|
|
10
|
+
const animateTransform = (element, keyframes)=>{
|
|
11
|
+
const animation = element.animate(keyframes, {
|
|
12
|
+
direction: 'alternate',
|
|
13
|
+
duration: 1000,
|
|
14
|
+
easing: 'ease-in-out',
|
|
15
|
+
iterations: Infinity
|
|
16
|
+
});
|
|
17
|
+
return animation;
|
|
18
|
+
};
|
|
19
|
+
// Animate Group 2 (Rectangle)
|
|
20
|
+
const rectangle = svg.querySelector('#group2');
|
|
21
|
+
const rectangleAnimation = animateTransform(rectangle, [
|
|
22
|
+
{
|
|
23
|
+
transform: 'translate(0, 0) scale(1)'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
transform: 'translate(0, 0) scale(2.54)'
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
transform: 'translate(0, 0) scale(1)'
|
|
30
|
+
}
|
|
31
|
+
]);
|
|
32
|
+
// Animate Group 3 (Triangle)
|
|
33
|
+
const triangle = svg.querySelector('#group3');
|
|
34
|
+
const triangleAnimation = animateTransform(triangle, [
|
|
35
|
+
{
|
|
36
|
+
transform: 'translate(-69.5px, 77.5px) scale(1)'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
transform: 'translate(-70px, 73px) scale(0.36)'
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
transform: 'translate(-69.5px, 77.5px) scale(1)'
|
|
43
|
+
}
|
|
44
|
+
]);
|
|
45
|
+
setAnimations([
|
|
46
|
+
rectangleAnimation,
|
|
47
|
+
triangleAnimation
|
|
48
|
+
]);
|
|
49
|
+
// Clean up animations on unmount
|
|
50
|
+
return ()=>{
|
|
51
|
+
rectangleAnimation.cancel();
|
|
52
|
+
triangleAnimation.cancel();
|
|
53
|
+
};
|
|
54
|
+
}, []);
|
|
55
|
+
useEffect(()=>{
|
|
56
|
+
if (isLoading) {
|
|
57
|
+
animations.forEach((animation)=>animation.play());
|
|
58
|
+
} else {
|
|
59
|
+
animations.forEach((animation)=>animation.pause());
|
|
60
|
+
}
|
|
61
|
+
}, [
|
|
62
|
+
isLoading,
|
|
63
|
+
animations
|
|
64
|
+
]);
|
|
65
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
66
|
+
style: {
|
|
67
|
+
left: '3px',
|
|
68
|
+
position: 'relative',
|
|
69
|
+
top: '-6px'
|
|
70
|
+
},
|
|
71
|
+
children: /*#__PURE__*/ _jsxs("svg", {
|
|
72
|
+
height: "41",
|
|
73
|
+
ref: svgRef,
|
|
74
|
+
viewBox: "-250 -250 500 500",
|
|
75
|
+
width: "41",
|
|
76
|
+
children: [
|
|
77
|
+
/*#__PURE__*/ _jsx("g", {
|
|
78
|
+
id: "group2",
|
|
79
|
+
children: /*#__PURE__*/ _jsx("rect", {
|
|
80
|
+
className: styles.color_fill,
|
|
81
|
+
height: "41",
|
|
82
|
+
width: "41",
|
|
83
|
+
x: "-20.5",
|
|
84
|
+
y: "-20.5"
|
|
85
|
+
})
|
|
86
|
+
}),
|
|
87
|
+
/*#__PURE__*/ _jsx("g", {
|
|
88
|
+
id: "group3",
|
|
89
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
90
|
+
className: styles.color_fill,
|
|
91
|
+
d: "M48.5 57.5L48.5 -57.5L-49.5 -1.093L48.5 57.5Z"
|
|
92
|
+
})
|
|
93
|
+
})
|
|
94
|
+
]
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
export default LottieAnimation;
|
|
99
|
+
|
|
100
|
+
//# sourceMappingURL=LottieAnimation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/ui/Icons/LottieAnimation.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react'\n\nimport styles from './icons.module.css'\n\nconst LottieAnimation = ({ isLoading = false }) => {\n const svgRef = useRef(null)\n const [animations, setAnimations] = useState([])\n\n useEffect(() => {\n const svg = svgRef.current\n if (!svg) return\n\n const animateTransform = (element, keyframes) => {\n const animation = element.animate(keyframes, {\n direction: 'alternate',\n duration: 1000,\n easing: 'ease-in-out',\n iterations: Infinity,\n })\n return animation\n }\n\n // Animate Group 2 (Rectangle)\n const rectangle = svg.querySelector('#group2')\n const rectangleAnimation = animateTransform(rectangle, [\n { transform: 'translate(0, 0) scale(1)' },\n { transform: 'translate(0, 0) scale(2.54)' },\n { transform: 'translate(0, 0) scale(1)' },\n ])\n\n // Animate Group 3 (Triangle)\n const triangle = svg.querySelector('#group3')\n const triangleAnimation = animateTransform(triangle, [\n { transform: 'translate(-69.5px, 77.5px) scale(1)' },\n { transform: 'translate(-70px, 73px) scale(0.36)' },\n { transform: 'translate(-69.5px, 77.5px) scale(1)' },\n ])\n\n setAnimations([rectangleAnimation, triangleAnimation])\n\n // Clean up animations on unmount\n return () => {\n rectangleAnimation.cancel()\n triangleAnimation.cancel()\n }\n }, [])\n\n useEffect(() => {\n if (isLoading) {\n animations.forEach((animation) => animation.play())\n } else {\n animations.forEach((animation) => animation.pause())\n }\n }, [isLoading, animations])\n\n return (\n <span\n style={{\n left: '3px',\n position: 'relative',\n top: '-6px',\n }}\n >\n <svg height=\"41\" ref={svgRef} viewBox=\"-250 -250 500 500\" width=\"41\">\n <g id=\"group2\">\n <rect className={styles.color_fill} height=\"41\" width=\"41\" x=\"-20.5\" y=\"-20.5\" />\n </g>\n <g id=\"group3\">\n <path className={styles.color_fill} d=\"M48.5 57.5L48.5 -57.5L-49.5 -1.093L48.5 57.5Z\" />\n </g>\n </svg>\n </span>\n )\n}\n\nexport default LottieAnimation\n"],"names":["React","useEffect","useRef","useState","styles","LottieAnimation","isLoading","svgRef","animations","setAnimations","svg","current","animateTransform","element","keyframes","animation","animate","direction","duration","easing","iterations","Infinity","rectangle","querySelector","rectangleAnimation","transform","triangle","triangleAnimation","cancel","forEach","play","pause","span","style","left","position","top","height","ref","viewBox","width","g","id","rect","className","color_fill","x","y","path","d"],"mappings":";AAAA,OAAOA,SAASC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAO;AAE1D,OAAOC,YAAY,qBAAoB;AAEvC,MAAMC,kBAAkB,CAAC,EAAEC,YAAY,KAAK,EAAE;IAC5C,MAAMC,SAASL,OAAO;IACtB,MAAM,CAACM,YAAYC,cAAc,GAAGN,SAAS,EAAE;IAE/CF,UAAU;QACR,MAAMS,MAAMH,OAAOI,OAAO;QAC1B,IAAI,CAACD,KAAK;QAEV,MAAME,mBAAmB,CAACC,SAASC;YACjC,MAAMC,YAAYF,QAAQG,OAAO,CAACF,WAAW;gBAC3CG,WAAW;gBACXC,UAAU;gBACVC,QAAQ;gBACRC,YAAYC;YACd;YACA,OAAON;QACT;QAEA,8BAA8B;QAC9B,MAAMO,YAAYZ,IAAIa,aAAa,CAAC;QACpC,MAAMC,qBAAqBZ,iBAAiBU,WAAW;YACrD;gBAAEG,WAAW;YAA2B;YACxC;gBAAEA,WAAW;YAA8B;YAC3C;gBAAEA,WAAW;YAA2B;SACzC;QAED,6BAA6B;QAC7B,MAAMC,WAAWhB,IAAIa,aAAa,CAAC;QACnC,MAAMI,oBAAoBf,iBAAiBc,UAAU;YACnD;gBAAED,WAAW;YAAsC;YACnD;gBAAEA,WAAW;YAAqC;YAClD;gBAAEA,WAAW;YAAsC;SACpD;QAEDhB,cAAc;YAACe;YAAoBG;SAAkB;QAErD,iCAAiC;QACjC,OAAO;YACLH,mBAAmBI,MAAM;YACzBD,kBAAkBC,MAAM;QAC1B;IACF,GAAG,EAAE;IAEL3B,UAAU;QACR,IAAIK,WAAW;YACbE,WAAWqB,OAAO,CAAC,CAACd,YAAcA,UAAUe,IAAI;QAClD,OAAO;YACLtB,WAAWqB,OAAO,CAAC,CAACd,YAAcA,UAAUgB,KAAK;QACnD;IACF,GAAG;QAACzB;QAAWE;KAAW;IAE1B,qBACE,KAACwB;QACCC,OAAO;YACLC,MAAM;YACNC,UAAU;YACVC,KAAK;QACP;kBAEA,cAAA,MAAC1B;YAAI2B,QAAO;YAAKC,KAAK/B;YAAQgC,SAAQ;YAAoBC,OAAM;;8BAC9D,KAACC;oBAAEC,IAAG;8BACJ,cAAA,KAACC;wBAAKC,WAAWxC,OAAOyC,UAAU;wBAAER,QAAO;wBAAKG,OAAM;wBAAKM,GAAE;wBAAQC,GAAE;;;8BAEzE,KAACN;oBAAEC,IAAG;8BACJ,cAAA,KAACM;wBAAKJ,WAAWxC,OAAOyC,UAAU;wBAAEI,GAAE;;;;;;AAKhD;AAEA,eAAe5C,gBAAe"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.actions_icon {
|
|
2
|
+
border-right: 1px solid var(--theme-elevation-150);
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
max-width: 30px;
|
|
5
|
+
padding-right: 8px;
|
|
6
|
+
padding-left: 8px;
|
|
7
|
+
|
|
8
|
+
max-height: 24px;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.icon {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.icon > svg{
|
|
21
|
+
fill: var(--theme-elevation-800);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.color_fill {
|
|
25
|
+
fill: var(--theme-elevation-800);
|
|
26
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ClientCollectionConfig, CollectionConfig, Field } from 'payload';
|
|
2
|
+
export declare const getFieldBySchemaPath: (collectionConfig: ClientCollectionConfig | CollectionConfig, schemaPath: string) => Field | null;
|
|
3
|
+
//# sourceMappingURL=getFieldBySchemaPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFieldBySchemaPath.d.ts","sourceRoot":"","sources":["../../src/utilities/getFieldBySchemaPath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE9E,eAAO,MAAM,oBAAoB,qBACb,sBAAsB,GAAG,gBAAgB,cAC/C,MAAM,KACjB,KAAK,GAAG,IAyCV,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const getFieldBySchemaPath = (collectionConfig, schemaPath)=>{
|
|
2
|
+
const pathParts = schemaPath.split('.');
|
|
3
|
+
const targetFieldName = pathParts[pathParts.length - 1];
|
|
4
|
+
const findField = (fields, remainingPath)=>{
|
|
5
|
+
for (const field of fields){
|
|
6
|
+
if (remainingPath.length === 1 && field.name === targetFieldName) {
|
|
7
|
+
return field;
|
|
8
|
+
}
|
|
9
|
+
if (field.type === 'group' && field.fields) {
|
|
10
|
+
const result = findField(field.fields, remainingPath.slice(1));
|
|
11
|
+
if (result) return result;
|
|
12
|
+
}
|
|
13
|
+
if (field.type === 'array' && field.fields) {
|
|
14
|
+
const result = findField(field.fields, remainingPath.slice(1));
|
|
15
|
+
if (result) return result;
|
|
16
|
+
}
|
|
17
|
+
if (field.type === 'tabs') {
|
|
18
|
+
for (const tab of field.tabs){
|
|
19
|
+
const result = findField(tab.fields, remainingPath);
|
|
20
|
+
if (result) return result;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (field.type === 'blocks') {
|
|
24
|
+
for (const block of field.blocks){
|
|
25
|
+
if (block.slug === remainingPath[0]) {
|
|
26
|
+
const result = findField(block.fields, remainingPath.slice(1));
|
|
27
|
+
if (result) return result;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
};
|
|
34
|
+
return findField(collectionConfig.fields, pathParts.slice(1));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=getFieldBySchemaPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/getFieldBySchemaPath.ts"],"sourcesContent":["import type { ClientCollectionConfig, CollectionConfig, Field } from 'payload'\n\nexport const getFieldBySchemaPath = (\n collectionConfig: ClientCollectionConfig | CollectionConfig,\n schemaPath: string, // e.g., \"posts.content\"\n): Field | null => {\n const pathParts = schemaPath.split('.')\n const targetFieldName = pathParts[pathParts.length - 1]\n\n const findField = (fields, remainingPath: string[]): Field | null => {\n for (const field of fields) {\n if (remainingPath.length === 1 && field.name === targetFieldName) {\n return field\n }\n\n if (field.type === 'group' && field.fields) {\n const result = findField(field.fields, remainingPath.slice(1))\n if (result) return result\n }\n\n if (field.type === 'array' && field.fields) {\n const result = findField(field.fields, remainingPath.slice(1))\n if (result) return result\n }\n\n if (field.type === 'tabs') {\n for (const tab of field.tabs) {\n const result = findField(tab.fields, remainingPath)\n if (result) return result\n }\n }\n\n if (field.type === 'blocks') {\n for (const block of field.blocks) {\n if (block.slug === remainingPath[0]) {\n const result = findField(block.fields, remainingPath.slice(1))\n if (result) return result\n }\n }\n }\n }\n\n return null\n }\n\n return findField(collectionConfig.fields, pathParts.slice(1))\n}\n"],"names":["getFieldBySchemaPath","collectionConfig","schemaPath","pathParts","split","targetFieldName","length","findField","fields","remainingPath","field","name","type","result","slice","tab","tabs","block","blocks","slug"],"mappings":"AAEA,OAAO,MAAMA,uBAAuB,CAClCC,kBACAC;IAEA,MAAMC,YAAYD,WAAWE,KAAK,CAAC;IACnC,MAAMC,kBAAkBF,SAAS,CAACA,UAAUG,MAAM,GAAG,EAAE;IAEvD,MAAMC,YAAY,CAACC,QAAQC;QACzB,KAAK,MAAMC,SAASF,OAAQ;YAC1B,IAAIC,cAAcH,MAAM,KAAK,KAAKI,MAAMC,IAAI,KAAKN,iBAAiB;gBAChE,OAAOK;YACT;YAEA,IAAIA,MAAME,IAAI,KAAK,WAAWF,MAAMF,MAAM,EAAE;gBAC1C,MAAMK,SAASN,UAAUG,MAAMF,MAAM,EAAEC,cAAcK,KAAK,CAAC;gBAC3D,IAAID,QAAQ,OAAOA;YACrB;YAEA,IAAIH,MAAME,IAAI,KAAK,WAAWF,MAAMF,MAAM,EAAE;gBAC1C,MAAMK,SAASN,UAAUG,MAAMF,MAAM,EAAEC,cAAcK,KAAK,CAAC;gBAC3D,IAAID,QAAQ,OAAOA;YACrB;YAEA,IAAIH,MAAME,IAAI,KAAK,QAAQ;gBACzB,KAAK,MAAMG,OAAOL,MAAMM,IAAI,CAAE;oBAC5B,MAAMH,SAASN,UAAUQ,IAAIP,MAAM,EAAEC;oBACrC,IAAII,QAAQ,OAAOA;gBACrB;YACF;YAEA,IAAIH,MAAME,IAAI,KAAK,UAAU;gBAC3B,KAAK,MAAMK,SAASP,MAAMQ,MAAM,CAAE;oBAChC,IAAID,MAAME,IAAI,KAAKV,aAAa,CAAC,EAAE,EAAE;wBACnC,MAAMI,SAASN,UAAUU,MAAMT,MAAM,EAAEC,cAAcK,KAAK,CAAC;wBAC3D,IAAID,QAAQ,OAAOA;oBACrB;gBACF;YACF;QACF;QAEA,OAAO;IACT;IAEA,OAAON,UAAUN,iBAAiBO,MAAM,EAAEL,UAAUW,KAAK,CAAC;AAC5D,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFieldInfo.d.ts","sourceRoot":"","sources":["../../src/utilities/getFieldInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,eAAO,MAAM,YAAY,gBAAiB,WAAW,CAAC,aAAa,CAAC,cAAc,MAAM,QAUvF,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getFieldBySchemaPath } from './getFieldBySchemaPath.js';
|
|
2
|
+
export const getFieldInfo = (collections, schemaPath)=>{
|
|
3
|
+
let fieldInfo = null;
|
|
4
|
+
//TODO: Only run below for enabled collections
|
|
5
|
+
for(const collectionsKey in collections){
|
|
6
|
+
const collection = collections[collectionsKey];
|
|
7
|
+
fieldInfo = getFieldBySchemaPath(collection.config, schemaPath);
|
|
8
|
+
if (fieldInfo) {
|
|
9
|
+
return fieldInfo;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=getFieldInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/getFieldInfo.ts"],"sourcesContent":["import type { BasePayload } from 'payload'\n\nimport { getFieldBySchemaPath } from './getFieldBySchemaPath.js'\n\nexport const getFieldInfo = (collections: BasePayload['collections'], schemaPath: string) => {\n let fieldInfo = null\n //TODO: Only run below for enabled collections\n for (const collectionsKey in collections) {\n const collection = collections[collectionsKey]\n fieldInfo = getFieldBySchemaPath(collection.config, schemaPath)\n if (fieldInfo) {\n return fieldInfo\n }\n }\n}\n"],"names":["getFieldBySchemaPath","getFieldInfo","collections","schemaPath","fieldInfo","collectionsKey","collection","config"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ,4BAA2B;AAEhE,OAAO,MAAMC,eAAe,CAACC,aAAyCC;IACpE,IAAIC,YAAY;IAChB,8CAA8C;IAC9C,IAAK,MAAMC,kBAAkBH,YAAa;QACxC,MAAMI,aAAaJ,WAAW,CAACG,eAAe;QAC9CD,YAAYJ,qBAAqBM,WAAWC,MAAM,EAAEJ;QACpD,IAAIC,WAAW;YACb,OAAOA;QACT;IACF;AACF,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isPluginActivated.d.ts","sourceRoot":"","sources":["../../src/utilities/isPluginActivated.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,cAE7B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/isPluginActivated.ts"],"sourcesContent":["export const isPluginActivated = () => {\n return process.env.OPENAI_API_KEY || process.env.ANTHROPIC_API_KEY\n}\n"],"names":["isPluginActivated","process","env","OPENAI_API_KEY","ANTHROPIC_API_KEY"],"mappings":"AAAA,OAAO,MAAMA,oBAAoB;IAC/B,OAAOC,QAAQC,GAAG,CAACC,cAAc,IAAIF,QAAQC,GAAG,CAACE,iBAAiB;AACpE,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonToZod.d.ts","sourceRoot":"","sources":["../../src/utilities/jsonToZod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,wBAAgB,eAAe,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CA6B3D"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export function jsonSchemaToZod(schema) {
|
|
3
|
+
switch(schema.type){
|
|
4
|
+
case 'string':
|
|
5
|
+
return z.string();
|
|
6
|
+
case 'number':
|
|
7
|
+
return z.number();
|
|
8
|
+
case 'integer':
|
|
9
|
+
return z.number().int();
|
|
10
|
+
case 'boolean':
|
|
11
|
+
return z.boolean();
|
|
12
|
+
case 'null':
|
|
13
|
+
return z.null();
|
|
14
|
+
case 'array':
|
|
15
|
+
if (schema.items) {
|
|
16
|
+
return z.array(jsonSchemaToZod(schema.items));
|
|
17
|
+
}
|
|
18
|
+
return z.array(z.any());
|
|
19
|
+
case 'object':
|
|
20
|
+
if (schema.properties) {
|
|
21
|
+
const shape = {};
|
|
22
|
+
for (const [key, value] of Object.entries(schema.properties)){
|
|
23
|
+
shape[key] = jsonSchemaToZod(value);
|
|
24
|
+
}
|
|
25
|
+
return z.object(shape);
|
|
26
|
+
}
|
|
27
|
+
return z.object({});
|
|
28
|
+
default:
|
|
29
|
+
return z.any();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=jsonToZod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/jsonToZod.ts"],"sourcesContent":["import { z } from 'zod'\n\nexport function jsonSchemaToZod(schema: any): z.ZodType<any> {\n switch (schema.type) {\n case 'string':\n return z.string()\n case 'number':\n return z.number()\n case 'integer':\n return z.number().int()\n case 'boolean':\n return z.boolean()\n case 'null':\n return z.null()\n case 'array':\n if (schema.items) {\n return z.array(jsonSchemaToZod(schema.items))\n }\n return z.array(z.any())\n case 'object':\n if (schema.properties) {\n const shape: { [key: string]: z.ZodType<any> } = {}\n for (const [key, value] of Object.entries(schema.properties)) {\n shape[key] = jsonSchemaToZod(value)\n }\n return z.object(shape)\n }\n return z.object({})\n default:\n return z.any()\n }\n}\n"],"names":["z","jsonSchemaToZod","schema","type","string","number","int","boolean","null","items","array","any","properties","shape","key","value","Object","entries","object"],"mappings":"AAAA,SAASA,CAAC,QAAQ,MAAK;AAEvB,OAAO,SAASC,gBAAgBC,MAAW;IACzC,OAAQA,OAAOC,IAAI;QACjB,KAAK;YACH,OAAOH,EAAEI,MAAM;QACjB,KAAK;YACH,OAAOJ,EAAEK,MAAM;QACjB,KAAK;YACH,OAAOL,EAAEK,MAAM,GAAGC,GAAG;QACvB,KAAK;YACH,OAAON,EAAEO,OAAO;QAClB,KAAK;YACH,OAAOP,EAAEQ,IAAI;QACf,KAAK;YACH,IAAIN,OAAOO,KAAK,EAAE;gBAChB,OAAOT,EAAEU,KAAK,CAACT,gBAAgBC,OAAOO,KAAK;YAC7C;YACA,OAAOT,EAAEU,KAAK,CAACV,EAAEW,GAAG;QACtB,KAAK;YACH,IAAIT,OAAOU,UAAU,EAAE;gBACrB,MAAMC,QAA2C,CAAC;gBAClD,KAAK,MAAM,CAACC,KAAKC,MAAM,IAAIC,OAAOC,OAAO,CAACf,OAAOU,UAAU,EAAG;oBAC5DC,KAAK,CAACC,IAAI,GAAGb,gBAAgBc;gBAC/B;gBACA,OAAOf,EAAEkB,MAAM,CAACL;YAClB;YACA,OAAOb,EAAEkB,MAAM,CAAC,CAAC;QACnB;YACE,OAAOlB,EAAEW,GAAG;IAChB;AACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SerializedEditorState } from 'lexical';
|
|
2
|
+
import { type SanitizedServerEditorConfig } from '@payloadcms/richtext-lexical';
|
|
3
|
+
export declare function lexicalToHTML(editorData: SerializedEditorState, editorConfig: SanitizedServerEditorConfig): Promise<string>;
|
|
4
|
+
//# sourceMappingURL=lexicalToHTML.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lexicalToHTML.d.ts","sourceRoot":"","sources":["../../src/utilities/lexicalToHTML.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,EACL,KAAK,2BAA2B,EAGjC,MAAM,8BAA8B,CAAA;AAErC,wBAAsB,aAAa,CACjC,UAAU,EAAE,qBAAqB,EACjC,YAAY,EAAE,2BAA2B,mBAM1C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { consolidateHTMLConverters, convertLexicalToHTML } from '@payloadcms/richtext-lexical';
|
|
2
|
+
export async function lexicalToHTML(editorData, editorConfig) {
|
|
3
|
+
return await convertLexicalToHTML({
|
|
4
|
+
converters: consolidateHTMLConverters({
|
|
5
|
+
editorConfig
|
|
6
|
+
}),
|
|
7
|
+
data: editorData
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=lexicalToHTML.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/lexicalToHTML.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\n\nimport {\n type SanitizedServerEditorConfig,\n consolidateHTMLConverters,\n convertLexicalToHTML,\n} from '@payloadcms/richtext-lexical'\n\nexport async function lexicalToHTML(\n editorData: SerializedEditorState,\n editorConfig: SanitizedServerEditorConfig,\n) {\n return await convertLexicalToHTML({\n converters: consolidateHTMLConverters({ editorConfig }),\n data: editorData,\n })\n}\n"],"names":["consolidateHTMLConverters","convertLexicalToHTML","lexicalToHTML","editorData","editorConfig","converters","data"],"mappings":"AAEA,SAEEA,yBAAyB,EACzBC,oBAAoB,QACf,+BAA8B;AAErC,OAAO,eAAeC,cACpBC,UAAiC,EACjCC,YAAyC;IAEzC,OAAO,MAAMH,qBAAqB;QAChCI,YAAYL,0BAA0B;YAAEI;QAAa;QACrDE,MAAMH;IACR;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setSafeLexicalState.d.ts","sourceRoot":"","sources":["../../src/utilities/setSafeLexicalState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAIvC,KAAK,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAA;AAExC,eAAO,MAAM,mBAAmB,+BAEd,aAAa,WACrB,YAAY,SAoBrB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { $getRoot } from 'lexical';
|
|
2
|
+
export const setSafeLexicalState = (state, editorInstance, action = 'replace')=>{
|
|
3
|
+
try {
|
|
4
|
+
const editorState = editorInstance.parseEditorState(state);
|
|
5
|
+
if (editorState.isEmpty()) return;
|
|
6
|
+
editorInstance.update(()=>{
|
|
7
|
+
const root = $getRoot();
|
|
8
|
+
root.clear() //TODO: this is hack to prevent reconciliation error - find a way
|
|
9
|
+
;
|
|
10
|
+
editorInstance.setEditorState(editorState);
|
|
11
|
+
}, {
|
|
12
|
+
discrete: true
|
|
13
|
+
});
|
|
14
|
+
} catch (e) {
|
|
15
|
+
// console.error('Error setting object:', e)
|
|
16
|
+
// setValue(object) //TODO: This breaks the editor find a better way to handle objects that are not valid
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=setSafeLexicalState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/setSafeLexicalState.ts"],"sourcesContent":["import { LexicalEditor } from 'lexical'\n\nimport { $getRoot } from 'lexical'\n\ntype EditorAction = 'update' | 'replace'\n\nexport const setSafeLexicalState = (\n state,\n editorInstance: LexicalEditor,\n action: EditorAction = 'replace',\n) => {\n try {\n const editorState = editorInstance.parseEditorState(state)\n if (editorState.isEmpty()) return\n\n editorInstance.update(\n () => {\n const root = $getRoot()\n root.clear() //TODO: this is hack to prevent reconciliation error - find a way\n editorInstance.setEditorState(editorState)\n },\n {\n discrete: true,\n },\n )\n } catch (e) {\n // console.error('Error setting object:', e)\n // setValue(object) //TODO: This breaks the editor find a better way to handle objects that are not valid\n }\n}\n"],"names":["$getRoot","setSafeLexicalState","state","editorInstance","action","editorState","parseEditorState","isEmpty","update","root","clear","setEditorState","discrete","e"],"mappings":"AAEA,SAASA,QAAQ,QAAQ,UAAS;AAIlC,OAAO,MAAMC,sBAAsB,CACjCC,OACAC,gBACAC,SAAuB,SAAS;IAEhC,IAAI;QACF,MAAMC,cAAcF,eAAeG,gBAAgB,CAACJ;QACpD,IAAIG,YAAYE,OAAO,IAAI;QAE3BJ,eAAeK,MAAM,CACnB;YACE,MAAMC,OAAOT;YACbS,KAAKC,KAAK,GAAG,iEAAiE;;YAC9EP,eAAeQ,cAAc,CAACN;QAChC,GACA;YACEO,UAAU;QACZ;IAEJ,EAAE,OAAOC,GAAG;IACV,4CAA4C;IAC5C,yGAAyG;IAC3G;AACF,EAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CollectionConfig } from 'payload';
|
|
2
|
+
interface UpdateFieldsConfig {
|
|
3
|
+
schemaPathMap: Record<string, string>;
|
|
4
|
+
updatedCollectionConfig: CollectionConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare const updateFieldsConfig: (collectionConfig: CollectionConfig) => UpdateFieldsConfig;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=updateFieldsConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateFieldsConfig.d.ts","sourceRoot":"","sources":["../../src/utilities/updateFieldsConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,UAAU,kBAAkB;IAC1B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,uBAAuB,EAAE,gBAAgB,CAAA;CAC1C;AAED,eAAO,MAAM,kBAAkB,qBAAsB,gBAAgB,KAAG,kBA0FvE,CAAA"}
|