@strapi/content-type-builder 5.25.0 → 5.27.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/admin/components/AIChat/Chat.js +435 -0
- package/dist/admin/components/AIChat/Chat.js.map +1 -0
- package/dist/admin/components/AIChat/Chat.mjs +433 -0
- package/dist/admin/components/AIChat/Chat.mjs.map +1 -0
- package/dist/admin/components/AIChat/FeedbackModal.js +237 -0
- package/dist/admin/components/AIChat/FeedbackModal.js.map +1 -0
- package/dist/admin/components/AIChat/FeedbackModal.mjs +233 -0
- package/dist/admin/components/AIChat/FeedbackModal.mjs.map +1 -0
- package/dist/admin/components/AIChat/UploadCodeModal.js +427 -0
- package/dist/admin/components/AIChat/UploadCodeModal.js.map +1 -0
- package/dist/admin/components/AIChat/UploadCodeModal.mjs +423 -0
- package/dist/admin/components/AIChat/UploadCodeModal.mjs.map +1 -0
- package/dist/admin/components/AIChat/UploadFigmaModal.js +377 -0
- package/dist/admin/components/AIChat/UploadFigmaModal.js.map +1 -0
- package/dist/admin/components/AIChat/UploadFigmaModal.mjs +373 -0
- package/dist/admin/components/AIChat/UploadFigmaModal.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/Alert.js +46 -0
- package/dist/admin/components/AIChat/components/Alert.js.map +1 -0
- package/dist/admin/components/AIChat/components/Alert.mjs +44 -0
- package/dist/admin/components/AIChat/components/Alert.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/AnimatedBox.js +34 -0
- package/dist/admin/components/AIChat/components/AnimatedBox.js.map +1 -0
- package/dist/admin/components/AIChat/components/AnimatedBox.mjs +32 -0
- package/dist/admin/components/AIChat/components/AnimatedBox.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/Attachments/AttachmentPreview.js +92 -0
- package/dist/admin/components/AIChat/components/Attachments/AttachmentPreview.js.map +1 -0
- package/dist/admin/components/AIChat/components/Attachments/AttachmentPreview.mjs +90 -0
- package/dist/admin/components/AIChat/components/Attachments/AttachmentPreview.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/Attachments/components/Attachment.js +100 -0
- package/dist/admin/components/AIChat/components/Attachments/components/Attachment.js.map +1 -0
- package/dist/admin/components/AIChat/components/Attachments/components/Attachment.mjs +97 -0
- package/dist/admin/components/AIChat/components/Attachments/components/Attachment.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/Base64Image.js +127 -0
- package/dist/admin/components/AIChat/components/Base64Image.js.map +1 -0
- package/dist/admin/components/AIChat/components/Base64Image.mjs +125 -0
- package/dist/admin/components/AIChat/components/Base64Image.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/Collapsible.js +71 -0
- package/dist/admin/components/AIChat/components/Collapsible.js.map +1 -0
- package/dist/admin/components/AIChat/components/Collapsible.mjs +66 -0
- package/dist/admin/components/AIChat/components/Collapsible.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/Dropzone.js +172 -0
- package/dist/admin/components/AIChat/components/Dropzone.js.map +1 -0
- package/dist/admin/components/AIChat/components/Dropzone.mjs +167 -0
- package/dist/admin/components/AIChat/components/Dropzone.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/FloatingPanel.js +166 -0
- package/dist/admin/components/AIChat/components/FloatingPanel.js.map +1 -0
- package/dist/admin/components/AIChat/components/FloatingPanel.mjs +163 -0
- package/dist/admin/components/AIChat/components/FloatingPanel.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/FullScreenImage.js +190 -0
- package/dist/admin/components/AIChat/components/FullScreenImage.js.map +1 -0
- package/dist/admin/components/AIChat/components/FullScreenImage.mjs +187 -0
- package/dist/admin/components/AIChat/components/FullScreenImage.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/ImagePreview.js +87 -0
- package/dist/admin/components/AIChat/components/ImagePreview.js.map +1 -0
- package/dist/admin/components/AIChat/components/ImagePreview.mjs +85 -0
- package/dist/admin/components/AIChat/components/ImagePreview.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/Input.js +126 -0
- package/dist/admin/components/AIChat/components/Input.js.map +1 -0
- package/dist/admin/components/AIChat/components/Input.mjs +121 -0
- package/dist/admin/components/AIChat/components/Input.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/Messages/Marker.js +138 -0
- package/dist/admin/components/AIChat/components/Messages/Marker.js.map +1 -0
- package/dist/admin/components/AIChat/components/Messages/Marker.mjs +136 -0
- package/dist/admin/components/AIChat/components/Messages/Marker.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/Messages/Message.js +214 -0
- package/dist/admin/components/AIChat/components/Messages/Message.js.map +1 -0
- package/dist/admin/components/AIChat/components/Messages/Message.mjs +212 -0
- package/dist/admin/components/AIChat/components/Messages/Message.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/ResizableTextArea.js +78 -0
- package/dist/admin/components/AIChat/components/ResizableTextArea.js.map +1 -0
- package/dist/admin/components/AIChat/components/ResizableTextArea.mjs +76 -0
- package/dist/admin/components/AIChat/components/ResizableTextArea.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/SimpleMenu.js +60 -0
- package/dist/admin/components/AIChat/components/SimpleMenu.js.map +1 -0
- package/dist/admin/components/AIChat/components/SimpleMenu.mjs +35 -0
- package/dist/admin/components/AIChat/components/SimpleMenu.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/StepModal.js +175 -0
- package/dist/admin/components/AIChat/components/StepModal.js.map +1 -0
- package/dist/admin/components/AIChat/components/StepModal.mjs +171 -0
- package/dist/admin/components/AIChat/components/StepModal.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/animations.js +67 -0
- package/dist/admin/components/AIChat/components/animations.js.map +1 -0
- package/dist/admin/components/AIChat/components/animations.mjs +65 -0
- package/dist/admin/components/AIChat/components/animations.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/icons/FigmaIcon.js +50 -0
- package/dist/admin/components/AIChat/components/icons/FigmaIcon.js.map +1 -0
- package/dist/admin/components/AIChat/components/icons/FigmaIcon.mjs +48 -0
- package/dist/admin/components/AIChat/components/icons/FigmaIcon.mjs.map +1 -0
- package/dist/admin/components/AIChat/components/icons/StopIcon.js +25 -0
- package/dist/admin/components/AIChat/components/icons/StopIcon.js.map +1 -0
- package/dist/admin/components/AIChat/components/icons/StopIcon.mjs +23 -0
- package/dist/admin/components/AIChat/components/icons/StopIcon.mjs.map +1 -0
- package/dist/admin/components/AIChat/hooks/useAIFetch.js +107 -0
- package/dist/admin/components/AIChat/hooks/useAIFetch.js.map +1 -0
- package/dist/admin/components/AIChat/hooks/useAIFetch.mjs +96 -0
- package/dist/admin/components/AIChat/hooks/useAIFetch.mjs.map +1 -0
- package/dist/admin/components/AIChat/hooks/useAttachments.js +152 -0
- package/dist/admin/components/AIChat/hooks/useAttachments.js.map +1 -0
- package/dist/admin/components/AIChat/hooks/useAttachments.mjs +150 -0
- package/dist/admin/components/AIChat/hooks/useAttachments.mjs.map +1 -0
- package/dist/admin/components/AIChat/hooks/useChatTitle.js +47 -0
- package/dist/admin/components/AIChat/hooks/useChatTitle.js.map +1 -0
- package/dist/admin/components/AIChat/hooks/useChatTitle.mjs +45 -0
- package/dist/admin/components/AIChat/hooks/useChatTitle.mjs.map +1 -0
- package/dist/admin/components/AIChat/hooks/useCodeUpload.js +212 -0
- package/dist/admin/components/AIChat/hooks/useCodeUpload.js.map +1 -0
- package/dist/admin/components/AIChat/hooks/useCodeUpload.mjs +207 -0
- package/dist/admin/components/AIChat/hooks/useCodeUpload.mjs.map +1 -0
- package/dist/admin/components/AIChat/hooks/useFeedback.js +76 -0
- package/dist/admin/components/AIChat/hooks/useFeedback.js.map +1 -0
- package/dist/admin/components/AIChat/hooks/useFeedback.mjs +74 -0
- package/dist/admin/components/AIChat/hooks/useFeedback.mjs.map +1 -0
- package/dist/admin/components/AIChat/hooks/useFigmaUpload.js +206 -0
- package/dist/admin/components/AIChat/hooks/useFigmaUpload.js.map +1 -0
- package/dist/admin/components/AIChat/hooks/useFigmaUpload.mjs +200 -0
- package/dist/admin/components/AIChat/hooks/useFigmaUpload.mjs.map +1 -0
- package/dist/admin/components/AIChat/hooks/useLastSeenSchemas.js +115 -0
- package/dist/admin/components/AIChat/hooks/useLastSeenSchemas.js.map +1 -0
- package/dist/admin/components/AIChat/hooks/useLastSeenSchemas.mjs +113 -0
- package/dist/admin/components/AIChat/hooks/useLastSeenSchemas.mjs.map +1 -0
- package/dist/admin/components/AIChat/hooks/useTranslations.js +19 -0
- package/dist/admin/components/AIChat/hooks/useTranslations.js.map +1 -0
- package/dist/admin/components/AIChat/hooks/useTranslations.mjs +17 -0
- package/dist/admin/components/AIChat/hooks/useTranslations.mjs.map +1 -0
- package/dist/admin/components/AIChat/lib/aiClient.js +168 -0
- package/dist/admin/components/AIChat/lib/aiClient.js.map +1 -0
- package/dist/admin/components/AIChat/lib/aiClient.mjs +161 -0
- package/dist/admin/components/AIChat/lib/aiClient.mjs.map +1 -0
- package/dist/admin/components/AIChat/lib/constants.js +16 -0
- package/dist/admin/components/AIChat/lib/constants.js.map +1 -0
- package/dist/admin/components/AIChat/lib/constants.mjs +10 -0
- package/dist/admin/components/AIChat/lib/constants.mjs.map +1 -0
- package/dist/admin/components/AIChat/lib/misc.js +8 -0
- package/dist/admin/components/AIChat/lib/misc.js.map +1 -0
- package/dist/admin/components/AIChat/lib/misc.mjs +6 -0
- package/dist/admin/components/AIChat/lib/misc.mjs.map +1 -0
- package/dist/admin/components/AIChat/lib/transforms/schemas/fromCTB.js +46 -0
- package/dist/admin/components/AIChat/lib/transforms/schemas/fromCTB.js.map +1 -0
- package/dist/admin/components/AIChat/lib/transforms/schemas/fromCTB.mjs +44 -0
- package/dist/admin/components/AIChat/lib/transforms/schemas/fromCTB.mjs.map +1 -0
- package/dist/admin/components/AIChat/lib/transforms/schemas/toCTB.js +151 -0
- package/dist/admin/components/AIChat/lib/transforms/schemas/toCTB.js.map +1 -0
- package/dist/admin/components/AIChat/lib/transforms/schemas/toCTB.mjs +148 -0
- package/dist/admin/components/AIChat/lib/transforms/schemas/toCTB.mjs.map +1 -0
- package/dist/admin/components/AIChat/providers/ChatProvider.js +191 -0
- package/dist/admin/components/AIChat/providers/ChatProvider.js.map +1 -0
- package/dist/admin/components/AIChat/providers/ChatProvider.mjs +187 -0
- package/dist/admin/components/AIChat/providers/ChatProvider.mjs.map +1 -0
- package/dist/admin/components/AIChat/providers/SchemaProvider.js +90 -0
- package/dist/admin/components/AIChat/providers/SchemaProvider.js.map +1 -0
- package/dist/admin/components/AIChat/providers/SchemaProvider.mjs +88 -0
- package/dist/admin/components/AIChat/providers/SchemaProvider.mjs.map +1 -0
- package/dist/admin/components/ComponentList.js +1 -0
- package/dist/admin/components/ComponentList.js.map +1 -1
- package/dist/admin/components/ComponentList.mjs +1 -0
- package/dist/admin/components/ComponentList.mjs.map +1 -1
- package/dist/admin/components/ContentTypeBuilderNav/ContentTypeBuilderNav.js +165 -161
- package/dist/admin/components/ContentTypeBuilderNav/ContentTypeBuilderNav.js.map +1 -1
- package/dist/admin/components/ContentTypeBuilderNav/ContentTypeBuilderNav.mjs +165 -161
- package/dist/admin/components/ContentTypeBuilderNav/ContentTypeBuilderNav.mjs.map +1 -1
- package/dist/admin/components/DataManager/DataManagerContext.js.map +1 -1
- package/dist/admin/components/DataManager/DataManagerContext.mjs.map +1 -1
- package/dist/admin/components/DataManager/reducer.js +48 -6
- package/dist/admin/components/DataManager/reducer.js.map +1 -1
- package/dist/admin/components/DataManager/reducer.mjs +48 -6
- package/dist/admin/components/DataManager/reducer.mjs.map +1 -1
- package/dist/admin/components/FormModal/utils/canEditContentType.js.map +1 -1
- package/dist/admin/components/FormModal/utils/canEditContentType.mjs.map +1 -1
- package/dist/admin/pages/App/index.js +60 -29
- package/dist/admin/pages/App/index.js.map +1 -1
- package/dist/admin/pages/App/index.mjs +62 -31
- package/dist/admin/pages/App/index.mjs.map +1 -1
- package/dist/admin/pages/ListView/EmptyState.js +75 -9
- package/dist/admin/pages/ListView/EmptyState.js.map +1 -1
- package/dist/admin/pages/ListView/EmptyState.mjs +77 -11
- package/dist/admin/pages/ListView/EmptyState.mjs.map +1 -1
- package/dist/admin/src/components/AIChat/Chat.d.ts +2 -0
- package/dist/admin/src/components/AIChat/FeedbackModal.d.ts +13 -0
- package/dist/admin/src/components/AIChat/UploadCodeModal.d.ts +12 -0
- package/dist/admin/src/components/AIChat/UploadFigmaModal.d.ts +12 -0
- package/dist/admin/src/components/AIChat/components/Alert.d.ts +6 -0
- package/dist/admin/src/components/AIChat/components/AnimatedBox.d.ts +13 -0
- package/dist/admin/src/components/AIChat/components/Attachments/AttachmentPreview.d.ts +9 -0
- package/dist/admin/src/components/AIChat/components/Attachments/components/Attachment.d.ts +27 -0
- package/dist/admin/src/components/AIChat/components/Base64Image.d.ts +9 -0
- package/dist/admin/src/components/AIChat/components/Collapsible.d.ts +18 -0
- package/dist/admin/src/components/AIChat/components/Dropzone.d.ts +35 -0
- package/dist/admin/src/components/AIChat/components/FloatingPanel.d.ts +34 -0
- package/dist/admin/src/components/AIChat/components/FullScreenImage.d.ts +20 -0
- package/dist/admin/src/components/AIChat/components/ImagePreview.d.ts +8 -0
- package/dist/admin/src/components/AIChat/components/ImagePreviewGroup.d.ts +7 -0
- package/dist/admin/src/components/AIChat/components/Input.d.ts +43 -0
- package/dist/admin/src/components/AIChat/components/Messages/Marker.d.ts +2 -0
- package/dist/admin/src/components/AIChat/components/Messages/Message.d.ts +5 -0
- package/dist/admin/src/components/AIChat/components/ResizableTextArea.d.ts +9 -0
- package/dist/admin/src/components/AIChat/components/SimpleMenu.d.ts +32 -0
- package/dist/admin/src/components/AIChat/components/StepModal.d.ts +37 -0
- package/dist/admin/src/components/AIChat/components/animations.d.ts +8 -0
- package/dist/admin/src/components/AIChat/components/icons/FigmaIcon.d.ts +5 -0
- package/dist/admin/src/components/AIChat/components/icons/StopIcon.d.ts +5 -0
- package/dist/admin/src/components/AIChat/hooks/useAIFetch.d.ts +147 -0
- package/dist/admin/src/components/AIChat/hooks/useAttachments.d.ts +8 -0
- package/dist/admin/src/components/AIChat/hooks/useChatTitle.d.ts +13 -0
- package/dist/admin/src/components/AIChat/hooks/useCodeUpload.d.ts +31 -0
- package/dist/admin/src/components/AIChat/hooks/useFeedback.d.ts +7 -0
- package/dist/admin/src/components/AIChat/hooks/useFigmaUpload.d.ts +61 -0
- package/dist/admin/src/components/AIChat/hooks/useLastSeenSchemas.d.ts +10 -0
- package/dist/admin/src/components/AIChat/hooks/useTranslations.d.ts +3 -0
- package/dist/admin/src/components/AIChat/lib/aiClient.d.ts +32 -0
- package/dist/admin/src/components/AIChat/lib/constants.d.ts +12 -0
- package/dist/admin/src/components/AIChat/lib/fileToAttachment.d.ts +2 -0
- package/dist/admin/src/components/AIChat/lib/misc.d.ts +1 -0
- package/dist/admin/src/components/AIChat/lib/transforms/schemas/fromCTB.d.ts +3 -0
- package/dist/admin/src/components/AIChat/lib/transforms/schemas/toCTB.d.ts +16 -0
- package/dist/admin/src/components/AIChat/lib/types/annotations.d.ts +19 -0
- package/dist/admin/src/components/AIChat/lib/types/attachments.d.ts +15 -0
- package/dist/admin/src/components/AIChat/lib/types/feedback.d.ts +1 -0
- package/dist/admin/src/components/AIChat/lib/types/messages.d.ts +26 -0
- package/dist/admin/src/components/AIChat/lib/types/schema.d.ts +20 -0
- package/dist/admin/src/components/AIChat/providers/ChatProvider.d.ts +30 -0
- package/dist/admin/src/components/AIChat/providers/SchemaProvider.d.ts +10 -0
- package/dist/admin/src/components/ComponentList.d.ts +1 -1
- package/dist/admin/src/components/DataManager/DataManagerContext.d.ts +1 -1
- package/dist/admin/translations/ar.json.js +187 -2
- package/dist/admin/translations/ar.json.js.map +1 -1
- package/dist/admin/translations/ar.json.mjs +187 -3
- package/dist/admin/translations/ar.json.mjs.map +1 -1
- package/dist/admin/translations/de.json.js +42 -7
- package/dist/admin/translations/de.json.js.map +1 -1
- package/dist/admin/translations/de.json.mjs +42 -7
- package/dist/admin/translations/de.json.mjs.map +1 -1
- package/dist/admin/translations/en.json.js +53 -2
- package/dist/admin/translations/en.json.js.map +1 -1
- package/dist/admin/translations/en.json.mjs +53 -2
- package/dist/admin/translations/en.json.mjs.map +1 -1
- package/dist/admin/translations/es.json.js +37 -15
- package/dist/admin/translations/es.json.js.map +1 -1
- package/dist/admin/translations/es.json.mjs +37 -15
- package/dist/admin/translations/es.json.mjs.map +1 -1
- package/dist/admin/translations/fr.json.js +165 -3
- package/dist/admin/translations/fr.json.js.map +1 -1
- package/dist/admin/translations/fr.json.mjs +165 -4
- package/dist/admin/translations/fr.json.mjs.map +1 -1
- package/dist/admin/translations/id.json.js +93 -23
- package/dist/admin/translations/id.json.js.map +1 -1
- package/dist/admin/translations/id.json.mjs +93 -23
- package/dist/admin/translations/id.json.mjs.map +1 -1
- package/dist/admin/translations/it.json.js +75 -6
- package/dist/admin/translations/it.json.js.map +1 -1
- package/dist/admin/translations/it.json.mjs +75 -6
- package/dist/admin/translations/it.json.mjs.map +1 -1
- package/dist/admin/translations/ja.json.js +191 -5
- package/dist/admin/translations/ja.json.js.map +1 -1
- package/dist/admin/translations/ja.json.mjs +191 -6
- package/dist/admin/translations/ja.json.mjs.map +1 -1
- package/dist/admin/translations/ko.json.js +70 -16
- package/dist/admin/translations/ko.json.js.map +1 -1
- package/dist/admin/translations/ko.json.mjs +70 -16
- package/dist/admin/translations/ko.json.mjs.map +1 -1
- package/dist/admin/translations/ms.json.js +104 -31
- package/dist/admin/translations/ms.json.js.map +1 -1
- package/dist/admin/translations/ms.json.mjs +104 -31
- package/dist/admin/translations/ms.json.mjs.map +1 -1
- package/dist/admin/translations/nl.json.js +95 -15
- package/dist/admin/translations/nl.json.js.map +1 -1
- package/dist/admin/translations/nl.json.mjs +95 -15
- package/dist/admin/translations/nl.json.mjs.map +1 -1
- package/dist/admin/translations/pl.json.js +55 -11
- package/dist/admin/translations/pl.json.js.map +1 -1
- package/dist/admin/translations/pl.json.mjs +55 -11
- package/dist/admin/translations/pl.json.mjs.map +1 -1
- package/dist/admin/translations/pt-BR.json.js +54 -10
- package/dist/admin/translations/pt-BR.json.js.map +1 -1
- package/dist/admin/translations/pt-BR.json.mjs +54 -10
- package/dist/admin/translations/pt-BR.json.mjs.map +1 -1
- package/dist/admin/translations/pt.json.js +187 -2
- package/dist/admin/translations/pt.json.js.map +1 -1
- package/dist/admin/translations/pt.json.mjs +187 -3
- package/dist/admin/translations/pt.json.mjs.map +1 -1
- package/dist/admin/translations/ru.json.js +26 -1
- package/dist/admin/translations/ru.json.js.map +1 -1
- package/dist/admin/translations/ru.json.mjs +26 -1
- package/dist/admin/translations/ru.json.mjs.map +1 -1
- package/dist/admin/translations/sk.json.js +21 -1
- package/dist/admin/translations/sk.json.js.map +1 -1
- package/dist/admin/translations/sk.json.mjs +21 -1
- package/dist/admin/translations/sk.json.mjs.map +1 -1
- package/dist/admin/translations/sv.json.js +21 -1
- package/dist/admin/translations/sv.json.js.map +1 -1
- package/dist/admin/translations/sv.json.mjs +21 -1
- package/dist/admin/translations/sv.json.mjs.map +1 -1
- package/dist/admin/translations/th.json.js +21 -1
- package/dist/admin/translations/th.json.js.map +1 -1
- package/dist/admin/translations/th.json.mjs +21 -1
- package/dist/admin/translations/th.json.mjs.map +1 -1
- package/dist/admin/translations/tr.json.js +21 -1
- package/dist/admin/translations/tr.json.js.map +1 -1
- package/dist/admin/translations/tr.json.mjs +21 -1
- package/dist/admin/translations/tr.json.mjs.map +1 -1
- package/dist/admin/translations/uk.json.js +21 -2
- package/dist/admin/translations/uk.json.js.map +1 -1
- package/dist/admin/translations/uk.json.mjs +21 -2
- package/dist/admin/translations/uk.json.mjs.map +1 -1
- package/dist/admin/translations/zh-Hans.json.js +222 -133
- package/dist/admin/translations/zh-Hans.json.js.map +1 -1
- package/dist/admin/translations/zh-Hans.json.mjs +222 -133
- package/dist/admin/translations/zh-Hans.json.mjs.map +1 -1
- package/dist/admin/translations/zh.json.js +21 -1
- package/dist/admin/translations/zh.json.js.map +1 -1
- package/dist/admin/translations/zh.json.mjs +21 -1
- package/dist/admin/translations/zh.json.mjs.map +1 -1
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +2 -0
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/register.js +98 -0
- package/dist/server/register.js.map +1 -0
- package/dist/server/register.mjs +96 -0
- package/dist/server/register.mjs.map +1 -0
- package/dist/server/src/controllers/ai/auth.d.ts +1 -0
- package/dist/server/src/controllers/ai/auth.d.ts.map +1 -0
- package/dist/server/src/controllers/ai/index.d.ts +1 -0
- package/dist/server/src/controllers/ai/index.d.ts.map +1 -0
- package/dist/server/src/index.d.ts +1 -0
- package/dist/server/src/index.d.ts.map +1 -1
- package/dist/server/src/register.d.ts +11 -0
- package/dist/server/src/register.d.ts.map +1 -0
- package/package.json +12 -5
- package/dist/admin/components/DataManager/utils/formatSchemas.js +0 -21
- package/dist/admin/components/DataManager/utils/formatSchemas.js.map +0 -1
- package/dist/admin/components/DataManager/utils/formatSchemas.mjs +0 -18
- package/dist/admin/components/DataManager/utils/formatSchemas.mjs.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface UploadFigmaContextType {
|
|
2
|
+
isFigmaUploadOpen: boolean;
|
|
3
|
+
submitOnFinish: boolean;
|
|
4
|
+
openFigmaUpload: (submitOnFinish?: boolean) => void;
|
|
5
|
+
closeFigmaUpload: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const useUploadFigmaToChat: () => UploadFigmaContextType;
|
|
8
|
+
export declare const UploadFigmaToChatProvider: ({ children }: {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const UploadFigmaModal: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Translates and fades in from a specified direction.
|
|
4
|
+
*/
|
|
5
|
+
export declare const AnimatedBox: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<Omit<import("@strapi/design-system").TransientBoxProps & {
|
|
6
|
+
children?: import("react").ReactNode;
|
|
7
|
+
} & import("@strapi/design-system/dist/types").AsProp<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>> & Omit<Omit<any, "ref">, "children" | keyof import("@strapi/design-system/dist/types").AsProp<C> | keyof import("@strapi/design-system").TransientBoxProps> & {
|
|
8
|
+
ref?: any;
|
|
9
|
+
}, "ref"> & {
|
|
10
|
+
ref?: any;
|
|
11
|
+
}, {
|
|
12
|
+
$direction?: "left" | "up" | undefined;
|
|
13
|
+
}>> & Omit<import("@strapi/design-system").BoxComponent<"div">, keyof import("react").Component<any, {}, any>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Attachment as TAttachment } from '../../lib/types/attachments';
|
|
2
|
+
import { AttachmentRootProps } from './components/Attachment';
|
|
3
|
+
interface AttachmentPreviewProps {
|
|
4
|
+
attachment: TAttachment;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
onRemove?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const AttachmentPreview: ({ attachment, onRemove, ...props }: AttachmentPreviewProps & Omit<AttachmentRootProps, 'children'>) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface AttachmentContextValue {
|
|
3
|
+
error?: string | null;
|
|
4
|
+
}
|
|
5
|
+
declare const useAttachmentContext: () => AttachmentContextValue;
|
|
6
|
+
export interface AttachmentRootProps {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
error?: string | null;
|
|
9
|
+
minWidth?: string;
|
|
10
|
+
maxWidth?: string;
|
|
11
|
+
}
|
|
12
|
+
interface AttachmentPreviewProps {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
interface AttachmentTitleProps {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
interface AttachmentRemoveProps {
|
|
19
|
+
onClick: () => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const Attachment: {
|
|
22
|
+
Root: ({ children, error, minWidth, maxWidth }: AttachmentRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
Preview: ({ children }: AttachmentPreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
Title: ({ children }: AttachmentTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
Remove: ({ onClick }: AttachmentRemoveProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
};
|
|
27
|
+
export { useAttachmentContext };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ImgHTMLAttributes } from 'react';
|
|
2
|
+
interface Base64ImgProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
3
|
+
src: string;
|
|
4
|
+
inferSize?: boolean;
|
|
5
|
+
onLoad?: (e: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
6
|
+
onError?: (e: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const Base64Img: React.FC<Base64ImgProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface CollapsibleContextValue {
|
|
2
|
+
open: boolean;
|
|
3
|
+
toggle: () => void;
|
|
4
|
+
}
|
|
5
|
+
export declare const useCollapsible: () => CollapsibleContextValue;
|
|
6
|
+
export declare const Collapsible: ({ children, defaultOpen, }: {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const CollapsibleTrigger: ({ children, }: {
|
|
11
|
+
children: React.ReactNode | ((props: {
|
|
12
|
+
open: boolean;
|
|
13
|
+
}) => React.ReactNode);
|
|
14
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const CollapsibleContent: ({ children }: {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Flex } from '@strapi/design-system';
|
|
3
|
+
interface UseClipboardPasteProps {
|
|
4
|
+
onAddFiles: (files: File[]) => void;
|
|
5
|
+
isEnabled?: boolean;
|
|
6
|
+
accept?: {
|
|
7
|
+
[key: string]: string[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare const useClipboardPasteImages: ({ onAddFiles, isEnabled, }: UseClipboardPasteProps) => void;
|
|
11
|
+
export interface DropzoneContextValue {
|
|
12
|
+
isEnabled?: boolean;
|
|
13
|
+
isDragActive?: boolean;
|
|
14
|
+
onAddFiles?: (files: File[]) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const useDropzoneContext: () => DropzoneContextValue;
|
|
17
|
+
export interface DropzoneRootProps extends React.ComponentPropsWithoutRef<typeof Flex> {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
isEnabled?: boolean;
|
|
20
|
+
onAddFiles?: (files: File[]) => void;
|
|
21
|
+
accept?: {
|
|
22
|
+
[key: string]: string[];
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export declare const Root: ({ children, isEnabled, onAddFiles, accept, ...props }: DropzoneRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
interface DropzoneAreaProps extends React.ComponentPropsWithoutRef<typeof Flex> {
|
|
27
|
+
error?: string | null;
|
|
28
|
+
title?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const Dropzone: {
|
|
31
|
+
Root: ({ children, isEnabled, onAddFiles, accept, ...props }: DropzoneRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
Area: ({ error, title, ...props }: DropzoneAreaProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
33
|
+
useDropzoneContext: () => DropzoneContextValue;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type PanelSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
type PanelPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
4
|
+
interface PanelContextValue {
|
|
5
|
+
size: PanelSize;
|
|
6
|
+
position: PanelPosition;
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
onToggle: () => void;
|
|
9
|
+
}
|
|
10
|
+
interface RootProps {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
size?: PanelSize;
|
|
13
|
+
position?: PanelPosition;
|
|
14
|
+
isOpen?: boolean;
|
|
15
|
+
onToggle?: () => void;
|
|
16
|
+
toggleIcon?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare const Panel: {
|
|
19
|
+
Root: ({ children, size, position, isOpen, onToggle, toggleIcon, }: RootProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
Header: ({ children }: {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
Body: ({ children }: {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
Footer: ({ children }: {
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
Close: ({ label }: {
|
|
30
|
+
label?: string;
|
|
31
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
};
|
|
33
|
+
export declare const usePanel: () => PanelContextValue;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface FullScreenImageProps {
|
|
3
|
+
src: string;
|
|
4
|
+
alt: string;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
}
|
|
7
|
+
interface FullScreenImageRootProps extends FullScreenImageProps {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
defaultOpen?: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface FullScreenImageTriggerProps {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const setOpacity: (hex: string, alpha: number) => string;
|
|
16
|
+
export declare const FullScreenImage: {
|
|
17
|
+
Root: ({ children, src, alt, onClose, defaultOpen }: FullScreenImageRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
Trigger: ({ children, asChild }: FullScreenImageTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface Base64ImageProps {
|
|
2
|
+
imageUrl: string;
|
|
3
|
+
imageName: string;
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
onSelect?: (selected: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ImagePreview: ({ imageUrl, imageName, selected, onSelect, }: Base64ImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FigmaImage } from '../hooks/useFigmaUpload';
|
|
2
|
+
interface ImagePreviewGroupProps {
|
|
3
|
+
images: FigmaImage[];
|
|
4
|
+
onSelectionChange?: (selectedFrames: string[]) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const ImagePreviewGroup: ({ images, onSelectionChange }: ImagePreviewGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Box, Flex } from '@strapi/design-system';
|
|
3
|
+
export interface InputContextValue {
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const InputContext: import("react").Context<InputContextValue>;
|
|
7
|
+
export declare const useInput: () => InputContextValue;
|
|
8
|
+
export interface InputRootProps extends React.ComponentPropsWithoutRef<typeof Flex> {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const Root: ({ children, isLoading, ...props }: InputRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
interface HeaderProps extends React.ComponentPropsWithoutRef<typeof Box> {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
isThinking?: boolean;
|
|
16
|
+
thinkingMessage?: string;
|
|
17
|
+
}
|
|
18
|
+
interface InputAttachmentsProps extends React.ComponentPropsWithoutRef<typeof Flex> {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
interface ContentProps extends React.ComponentPropsWithoutRef<typeof Box> {
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
disclaimer?: string;
|
|
24
|
+
error?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare const Input: {
|
|
27
|
+
Root: ({ children, isLoading, ...props }: InputRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
Header: ({ children, ...props }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
HeaderItem: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<import("@strapi/design-system").TransientBoxProps & {
|
|
30
|
+
children?: import("react").ReactNode;
|
|
31
|
+
} & import("@strapi/design-system/dist/types").AsProp<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>> & Omit<Omit<any, "ref">, "children" | keyof import("@strapi/design-system/dist/types").AsProp<C> | keyof import("@strapi/design-system").TransientBoxProps> & {
|
|
32
|
+
ref?: any;
|
|
33
|
+
}, "ref"> & {
|
|
34
|
+
ref?: any;
|
|
35
|
+
}, never>> & Omit<import("@strapi/design-system").BoxComponent<"div">, keyof import("react").Component<any, {}, any>>;
|
|
36
|
+
Attachments: ({ children, gap, ...props }: InputAttachmentsProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
Content: ({ children, disclaimer, error, ...props }: ContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
Actions: ({ children }: {
|
|
39
|
+
children: React.ReactNode;
|
|
40
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
useInput: () => InputContextValue;
|
|
42
|
+
};
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface TextAreaProps {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
5
|
+
onSubmit?: (e: React.FormEvent<HTMLFormElement>) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const ResizableTextArea: ({ value, onChange, onSubmit, placeholder }: TextAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Menu } from '@strapi/design-system';
|
|
3
|
+
type SimpleMenuProps = Menu.TriggerProps & Pick<Menu.ContentProps, 'popoverPlacement' | 'intersectionId'> & {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
onOpen?: () => void;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
};
|
|
8
|
+
declare const SimpleMenu: React.ForwardRefExoticComponent<(Omit<Omit<import("@strapi/design-system").ButtonProps, "tag"> & {
|
|
9
|
+
endIcon?: React.ReactNode;
|
|
10
|
+
label?: React.ReactNode;
|
|
11
|
+
} & {
|
|
12
|
+
tag?: (<C extends React.ElementType<any, keyof React.JSX.IntrinsicElements> = "button">(props: React.PropsWithoutRef<import("@strapi/design-system").ButtonProps<C>> & React.RefAttributes<unknown>) => React.ReactNode) | undefined;
|
|
13
|
+
icon?: React.ReactNode;
|
|
14
|
+
} & Pick<Menu.ContentProps, "popoverPlacement" | "intersectionId"> & {
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
onOpen?: (() => void) | undefined;
|
|
17
|
+
onClose?: (() => void) | undefined;
|
|
18
|
+
}, "ref"> | Omit<Omit<import("@strapi/design-system").ButtonProps, "tag"> & {
|
|
19
|
+
endIcon?: React.ReactNode;
|
|
20
|
+
label?: React.ReactNode;
|
|
21
|
+
} & {
|
|
22
|
+
tag: <C_1 extends React.ElementType<any, keyof React.JSX.IntrinsicElements> = "button">(props: React.PropsWithoutRef<import("@strapi/design-system").IconButtonProps<C_1>> & React.RefAttributes<unknown>) => React.ReactNode;
|
|
23
|
+
icon: React.ReactNode;
|
|
24
|
+
} & Pick<Menu.ContentProps, "popoverPlacement" | "intersectionId"> & {
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
onOpen?: (() => void) | undefined;
|
|
27
|
+
onClose?: (() => void) | undefined;
|
|
28
|
+
}, "ref">) & React.RefAttributes<HTMLButtonElement>>;
|
|
29
|
+
declare const MenuItem: ({ onSelect, disabled, isLink, startIcon, endIcon, isExternal, variant, ...props }: Menu.ItemProps<(props: Omit<import("@strapi/design-system").BaseLinkProps<"a">, "ref"> & React.RefAttributes<HTMLAnchorElement>) => React.ReactNode>) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
type MenuItemProps = Menu.ItemProps;
|
|
31
|
+
export { SimpleMenu, MenuItem, Menu };
|
|
32
|
+
export type { SimpleMenuProps, MenuItemProps };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface StepModalContextType {
|
|
3
|
+
currentStep: number;
|
|
4
|
+
goToStep: (step: number) => void;
|
|
5
|
+
nextStep: () => Promise<boolean>;
|
|
6
|
+
prevStep: () => void;
|
|
7
|
+
isFirstStep: boolean;
|
|
8
|
+
isLastStep: boolean;
|
|
9
|
+
totalSteps: number;
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
error: Error | null;
|
|
12
|
+
setError: (error: Error | null) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const useStepModal: () => StepModalContextType;
|
|
15
|
+
interface StepModalProps {
|
|
16
|
+
open: boolean;
|
|
17
|
+
onOpenChange: (open: boolean) => void;
|
|
18
|
+
title?: string;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
onComplete?: () => void;
|
|
21
|
+
onCancel?: () => void;
|
|
22
|
+
}
|
|
23
|
+
interface StepProps {
|
|
24
|
+
title?: string;
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
nextLabel?: string;
|
|
27
|
+
cancelLabel?: string;
|
|
28
|
+
backLabel?: string;
|
|
29
|
+
disableNext?: boolean;
|
|
30
|
+
onNext?: () => Promise<boolean> | boolean;
|
|
31
|
+
}
|
|
32
|
+
declare const StepModal: {
|
|
33
|
+
({ open, onOpenChange, title, children, onComplete, onCancel, }: StepModalProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
Step: ({ children }: StepProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
};
|
|
36
|
+
declare const Step: ({ children }: StepProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export { StepModal, Step };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const ANIMATIONS: {
|
|
2
|
+
fadeIn: import("styled-components/dist/models/Keyframes").default;
|
|
3
|
+
scaleIn: import("styled-components/dist/models/Keyframes").default;
|
|
4
|
+
slideUpIn: import("styled-components/dist/models/Keyframes").default;
|
|
5
|
+
slideUpOut: import("styled-components/dist/models/Keyframes").default;
|
|
6
|
+
slideDownIn: import("styled-components/dist/models/Keyframes").default;
|
|
7
|
+
slideDownOut: import("styled-components/dist/models/Keyframes").default;
|
|
8
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { UIMessage, useChat } from '@ai-sdk/react';
|
|
2
|
+
import { Attachment } from '../lib/types/attachments';
|
|
3
|
+
import { Schema } from '../lib/types/schema';
|
|
4
|
+
/**
|
|
5
|
+
* Chat title
|
|
6
|
+
*/
|
|
7
|
+
export declare namespace GenerateTitle {
|
|
8
|
+
interface Request {
|
|
9
|
+
body: {
|
|
10
|
+
chatId: string;
|
|
11
|
+
message: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
interface Response {
|
|
15
|
+
data: {
|
|
16
|
+
title: string;
|
|
17
|
+
};
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Upload a project to the chat
|
|
23
|
+
*/
|
|
24
|
+
export declare namespace UploadProject {
|
|
25
|
+
interface Request {
|
|
26
|
+
body: {
|
|
27
|
+
chatId: string;
|
|
28
|
+
name: string;
|
|
29
|
+
type: 'code';
|
|
30
|
+
files: {
|
|
31
|
+
path: string;
|
|
32
|
+
content: string;
|
|
33
|
+
}[];
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
interface Response {
|
|
37
|
+
data: Attachment;
|
|
38
|
+
error?: string;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Send chat feedback
|
|
43
|
+
*/
|
|
44
|
+
export type FeedbackReasonIds = 'invalid_schema' | 'bad_recommendation' | 'slow' | 'instructions_ignored' | 'being_lazy' | 'other';
|
|
45
|
+
declare namespace SendFeedback {
|
|
46
|
+
interface Request {
|
|
47
|
+
body: {
|
|
48
|
+
chatId: string;
|
|
49
|
+
type: 'upvote' | 'downvote';
|
|
50
|
+
feedback?: string;
|
|
51
|
+
reasons?: FeedbackReasonIds[];
|
|
52
|
+
messageId: string;
|
|
53
|
+
messages: UIMessage[];
|
|
54
|
+
schemas: Schema[];
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Upload media
|
|
60
|
+
*/
|
|
61
|
+
export declare namespace UploadMedia {
|
|
62
|
+
interface Request {
|
|
63
|
+
body: {
|
|
64
|
+
url: string;
|
|
65
|
+
filename: string;
|
|
66
|
+
chatId: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
interface Response {
|
|
70
|
+
data: Attachment;
|
|
71
|
+
error?: string;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Collection of API endpoints and their corresponding request/response types
|
|
76
|
+
*/
|
|
77
|
+
type AIEndpoints = {
|
|
78
|
+
'/schemas/chat/generate-title': {
|
|
79
|
+
request: GenerateTitle.Request;
|
|
80
|
+
response: GenerateTitle.Response;
|
|
81
|
+
};
|
|
82
|
+
'/schemas/chat/attachment': {
|
|
83
|
+
request: UploadProject.Request;
|
|
84
|
+
response: UploadProject.Response;
|
|
85
|
+
};
|
|
86
|
+
'/schemas/chat/feedback': {
|
|
87
|
+
request: SendFeedback.Request;
|
|
88
|
+
response: void;
|
|
89
|
+
};
|
|
90
|
+
'/media/upload': {
|
|
91
|
+
request: UploadMedia.Request;
|
|
92
|
+
response: UploadMedia.Response;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
type RequestType<T extends keyof AIEndpoints> = AIEndpoints[T]['request'];
|
|
96
|
+
type ResponseType<T extends keyof AIEndpoints> = AIEndpoints[T]['response'];
|
|
97
|
+
export declare const TOO_MANY_REQUESTS_ERROR = "Too many requests";
|
|
98
|
+
export declare const LICENSE_LIMIT_REACHED_ERROR = "License limit";
|
|
99
|
+
export declare const LICENSE_LIMIT_EXCEEDED_ERROR = "AI credit limit exceeded";
|
|
100
|
+
export declare const CHAT_TOO_LONG_ERROR = "Chat too long";
|
|
101
|
+
export declare const ATTACHMENT_TOO_BIG_ERROR = "Attachment too big";
|
|
102
|
+
export declare const ATTACHMENT_NOT_FOUND_ERROR = "Attachment not found";
|
|
103
|
+
export declare const INVALID_REQUEST_ERROR = "Invalid request";
|
|
104
|
+
/**
|
|
105
|
+
* Base hook factory for making type-safe API calls to Strapi AI endpoints.
|
|
106
|
+
* Creates a hook specific to a single endpoint.
|
|
107
|
+
*/
|
|
108
|
+
export declare const createAIFetchHook: <T extends keyof AIEndpoints>(endpoint: T) => () => {
|
|
109
|
+
isPending: boolean;
|
|
110
|
+
error: string | null;
|
|
111
|
+
fetch: (options?: Omit<RequestInit, 'body'> & Partial<RequestType<T>> & {
|
|
112
|
+
formData?: FormData;
|
|
113
|
+
}) => Promise<ResponseType<T> | null>;
|
|
114
|
+
};
|
|
115
|
+
export declare const useFetchGenerateTitle: () => {
|
|
116
|
+
isPending: boolean;
|
|
117
|
+
error: string | null;
|
|
118
|
+
fetch: (options?: Omit<RequestInit, "body"> & Partial<GenerateTitle.Request> & {
|
|
119
|
+
formData?: FormData | undefined;
|
|
120
|
+
}) => Promise<GenerateTitle.Response | null>;
|
|
121
|
+
};
|
|
122
|
+
export declare const useFetchUploadProject: () => {
|
|
123
|
+
isPending: boolean;
|
|
124
|
+
error: string | null;
|
|
125
|
+
fetch: (options?: Omit<RequestInit, "body"> & Partial<UploadProject.Request> & {
|
|
126
|
+
formData?: FormData | undefined;
|
|
127
|
+
}) => Promise<UploadProject.Response | null>;
|
|
128
|
+
};
|
|
129
|
+
export declare const useFetchSendFeedback: () => {
|
|
130
|
+
isPending: boolean;
|
|
131
|
+
error: string | null;
|
|
132
|
+
fetch: (options?: Omit<RequestInit, "body"> & Partial<SendFeedback.Request> & {
|
|
133
|
+
formData?: FormData | undefined;
|
|
134
|
+
}) => Promise<void | null>;
|
|
135
|
+
};
|
|
136
|
+
export declare const useFetchUploadMedia: () => {
|
|
137
|
+
isPending: boolean;
|
|
138
|
+
error: string | null;
|
|
139
|
+
fetch: (options?: Omit<RequestInit, "body"> & Partial<UploadMedia.Request> & {
|
|
140
|
+
formData?: FormData | undefined;
|
|
141
|
+
}) => Promise<UploadMedia.Response | null>;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Hook wrapper for AI SDK's useChat with Strapi-specific configuration
|
|
145
|
+
*/
|
|
146
|
+
export declare const useAIChat: typeof useChat;
|
|
147
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Attachment } from '../lib/types/attachments';
|
|
2
|
+
export declare function useAttachments(): {
|
|
3
|
+
attachments: Attachment[];
|
|
4
|
+
attachFiles: (newFiles: File[], description?: string) => Promise<void>;
|
|
5
|
+
addAttachments: (newAttachments: Attachment[]) => void;
|
|
6
|
+
removeAttachment: (attachment: Attachment) => void;
|
|
7
|
+
removeAttachmentByIndex: (index: number) => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { UIMessage } from '@ai-sdk/react';
|
|
2
|
+
interface UseChatTitleProps {
|
|
3
|
+
chatId: string;
|
|
4
|
+
messages: UIMessage[];
|
|
5
|
+
}
|
|
6
|
+
export declare const useChatTitle: ({ chatId, messages }: UseChatTitleProps) => {
|
|
7
|
+
title: string | undefined;
|
|
8
|
+
isGenerating: boolean;
|
|
9
|
+
error: string | null;
|
|
10
|
+
generateTitle: () => Promise<void>;
|
|
11
|
+
resetTitle: () => void;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Attachment } from '../lib/types/attachments';
|
|
2
|
+
export interface ProjectFile {
|
|
3
|
+
path: string;
|
|
4
|
+
content: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ProcessOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Additional glob patterns to ignore
|
|
9
|
+
*/
|
|
10
|
+
ignorePatterns?: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare function openZipFile(file: File, options?: ProcessOptions): Promise<ProjectFile[]>;
|
|
13
|
+
export declare function processFolder(files: FileList | File[], options?: ProcessOptions): Promise<{
|
|
14
|
+
files: ProjectFile[];
|
|
15
|
+
projectName: string;
|
|
16
|
+
}>;
|
|
17
|
+
export declare function processZipFile(file: File, options?: ProcessOptions): Promise<{
|
|
18
|
+
files: ProjectFile[];
|
|
19
|
+
projectName: string;
|
|
20
|
+
}>;
|
|
21
|
+
interface UseCodeUploadOptions {
|
|
22
|
+
onSuccess?: (attachment: Attachment, projectName: string) => void;
|
|
23
|
+
onError?: (error: string) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function useCodeUpload({ onSuccess, onError }?: UseCodeUploadOptions): {
|
|
26
|
+
processZipFile: (file: File) => Promise<Attachment>;
|
|
27
|
+
processFolder: (files: FileList | File[]) => Promise<Attachment>;
|
|
28
|
+
isLoading: boolean;
|
|
29
|
+
error: string | null;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FeedbackReasonIds } from './useAIFetch';
|
|
2
|
+
export declare const useFeedback: () => {
|
|
3
|
+
upvoteMessage: (messageId: string) => Promise<void | null>;
|
|
4
|
+
downvoteMessage: (messageId: string, feedback: string, reasons: FeedbackReasonIds[]) => Promise<void | null>;
|
|
5
|
+
isPending: boolean;
|
|
6
|
+
error: string | null;
|
|
7
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Attachment } from '../lib/types/attachments';
|
|
2
|
+
/**================================================================================
|
|
3
|
+
* Constants
|
|
4
|
+
*================================================================================*/
|
|
5
|
+
export declare const FIGMA_TOKEN_STORAGE_KEY = "strapi-ai-figma-token";
|
|
6
|
+
/**================================================================================
|
|
7
|
+
* Types
|
|
8
|
+
*================================================================================*/
|
|
9
|
+
export interface FigmaNodeData {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
type: string;
|
|
13
|
+
children?: FigmaNodeData[];
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
export interface FigmaFileData {
|
|
17
|
+
document: FigmaNodeData;
|
|
18
|
+
schemaVersion: number;
|
|
19
|
+
name: string;
|
|
20
|
+
lastModified: string;
|
|
21
|
+
thumbnailUrl: string;
|
|
22
|
+
version: string;
|
|
23
|
+
role: string;
|
|
24
|
+
}
|
|
25
|
+
export interface FigmaImage extends Attachment {
|
|
26
|
+
}
|
|
27
|
+
interface UseFigmaUploadOptions {
|
|
28
|
+
onSuccess?: (attachments: FigmaImage[]) => void;
|
|
29
|
+
onError?: (error: string) => void;
|
|
30
|
+
}
|
|
31
|
+
/**================================================================================
|
|
32
|
+
* Token Storage Utils
|
|
33
|
+
*================================================================================*/
|
|
34
|
+
/**
|
|
35
|
+
* Get Figma token from localStorage
|
|
36
|
+
*/
|
|
37
|
+
export declare const getFigmaToken: () => string;
|
|
38
|
+
/**
|
|
39
|
+
* Save Figma token to localStorage
|
|
40
|
+
*/
|
|
41
|
+
export declare const saveFigmaToken: (token: string) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Check if Figma token exists in localStorage
|
|
44
|
+
*/
|
|
45
|
+
export declare const hasFigmaToken: () => boolean;
|
|
46
|
+
/**================================================================================
|
|
47
|
+
* Hooks
|
|
48
|
+
*================================================================================*/
|
|
49
|
+
export declare function useFigmaUpload({ onSuccess, onError }?: UseFigmaUploadOptions): {
|
|
50
|
+
processFigmaUrl: (figmaUrl: string) => Promise<{
|
|
51
|
+
id: string;
|
|
52
|
+
type: "file";
|
|
53
|
+
filename: string | undefined;
|
|
54
|
+
mediaType: string;
|
|
55
|
+
url: string;
|
|
56
|
+
status: "ready";
|
|
57
|
+
}[] | undefined>;
|
|
58
|
+
isLoading: boolean;
|
|
59
|
+
error: string | null;
|
|
60
|
+
};
|
|
61
|
+
export {};
|