@alpaca-editor/core 1.0.0 → 1.0.3
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/build.css +3 -0
- package/components.json +21 -0
- package/dev.css +3 -0
- package/dist/client-components/api.d.ts +1 -0
- package/dist/client-components/api.js +4 -0
- package/dist/client-components/api.js.map +1 -0
- package/dist/client-components/index.d.ts +16 -0
- package/dist/client-components/index.js +17 -0
- package/dist/client-components/index.js.map +1 -0
- package/dist/components/ActionButton.d.ts +12 -0
- package/dist/components/ActionButton.js +6 -0
- package/dist/components/ActionButton.js.map +1 -0
- package/dist/components/Error.d.ts +9 -0
- package/dist/components/Error.js +24 -0
- package/dist/components/Error.js.map +1 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/button.js +32 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/config/config.d.ts +6 -0
- package/dist/config/config.js +647 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/types.d.ts +223 -0
- package/dist/config/types.js +2 -0
- package/dist/config/types.js.map +1 -0
- package/dist/editor/ComponentInfo.d.ts +4 -0
- package/dist/editor/ComponentInfo.js +29 -0
- package/dist/editor/ComponentInfo.js.map +1 -0
- package/dist/editor/ConfirmationDialog.d.ts +19 -0
- package/dist/editor/ConfirmationDialog.js +31 -0
- package/dist/editor/ConfirmationDialog.js.map +1 -0
- package/dist/editor/ContentTree.d.ts +35 -0
- package/dist/editor/ContentTree.js +404 -0
- package/dist/editor/ContentTree.js.map +1 -0
- package/dist/editor/ContextMenu.d.ts +13 -0
- package/dist/editor/ContextMenu.js +114 -0
- package/dist/editor/ContextMenu.js.map +1 -0
- package/dist/editor/Editor.d.ts +11 -0
- package/dist/editor/Editor.js +50 -0
- package/dist/editor/Editor.js.map +1 -0
- package/dist/editor/EditorWarning.d.ts +5 -0
- package/dist/editor/EditorWarning.js +11 -0
- package/dist/editor/EditorWarning.js.map +1 -0
- package/dist/editor/EditorWarnings.d.ts +9 -0
- package/dist/editor/EditorWarnings.js +19 -0
- package/dist/editor/EditorWarnings.js.map +1 -0
- package/dist/editor/FieldEditorPopup.d.ts +10 -0
- package/dist/editor/FieldEditorPopup.js +22 -0
- package/dist/editor/FieldEditorPopup.js.map +1 -0
- package/dist/editor/FieldHistory.d.ts +6 -0
- package/dist/editor/FieldHistory.js +38 -0
- package/dist/editor/FieldHistory.js.map +1 -0
- package/dist/editor/FieldList.d.ts +16 -0
- package/dist/editor/FieldList.js +58 -0
- package/dist/editor/FieldList.js.map +1 -0
- package/dist/editor/FieldListField.d.ts +14 -0
- package/dist/editor/FieldListField.js +161 -0
- package/dist/editor/FieldListField.js.map +1 -0
- package/dist/editor/FieldListFieldWithFallbacks.d.ts +10 -0
- package/dist/editor/FieldListFieldWithFallbacks.js +109 -0
- package/dist/editor/FieldListFieldWithFallbacks.js.map +1 -0
- package/dist/editor/FloatingToolbar.d.ts +7 -0
- package/dist/editor/FloatingToolbar.js +90 -0
- package/dist/editor/FloatingToolbar.js.map +1 -0
- package/dist/editor/ImageEditor.d.ts +5 -0
- package/dist/editor/ImageEditor.js +53 -0
- package/dist/editor/ImageEditor.js.map +1 -0
- package/dist/editor/InsertMenu.d.ts +8 -0
- package/dist/editor/InsertMenu.js +158 -0
- package/dist/editor/InsertMenu.js.map +1 -0
- package/dist/editor/ItemInfo.d.ts +4 -0
- package/dist/editor/ItemInfo.js +28 -0
- package/dist/editor/ItemInfo.js.map +1 -0
- package/dist/editor/LinkEditorDialog.d.ts +15 -0
- package/dist/editor/LinkEditorDialog.js +84 -0
- package/dist/editor/LinkEditorDialog.js.map +1 -0
- package/dist/editor/MainLayout.d.ts +9 -0
- package/dist/editor/MainLayout.js +41 -0
- package/dist/editor/MainLayout.js.map +1 -0
- package/dist/editor/NewEditorClient.d.ts +5 -0
- package/dist/editor/NewEditorClient.js +7 -0
- package/dist/editor/NewEditorClient.js.map +1 -0
- package/dist/editor/PictureCropper.d.ts +6 -0
- package/dist/editor/PictureCropper.js +327 -0
- package/dist/editor/PictureCropper.js.map +1 -0
- package/dist/editor/PictureEditor.d.ts +8 -0
- package/dist/editor/PictureEditor.js +102 -0
- package/dist/editor/PictureEditor.js.map +1 -0
- package/dist/editor/PictureEditorDialog.d.ts +8 -0
- package/dist/editor/PictureEditorDialog.js +189 -0
- package/dist/editor/PictureEditorDialog.js.map +1 -0
- package/dist/editor/ScrollingContentTree.d.ts +6 -0
- package/dist/editor/ScrollingContentTree.js +25 -0
- package/dist/editor/ScrollingContentTree.js.map +1 -0
- package/dist/editor/Terminal.d.ts +14 -0
- package/dist/editor/Terminal.js +107 -0
- package/dist/editor/Terminal.js.map +1 -0
- package/dist/editor/Titlebar.d.ts +1 -0
- package/dist/editor/Titlebar.js +9 -0
- package/dist/editor/Titlebar.js.map +1 -0
- package/dist/editor/ai/AiPopup.d.ts +10 -0
- package/dist/editor/ai/AiPopup.js +23 -0
- package/dist/editor/ai/AiPopup.js.map +1 -0
- package/dist/editor/ai/AiResponseMessage.d.ts +8 -0
- package/dist/editor/ai/AiResponseMessage.js +22 -0
- package/dist/editor/ai/AiResponseMessage.js.map +1 -0
- package/dist/editor/ai/AiTerminal.d.ts +34 -0
- package/dist/editor/ai/AiTerminal.js +236 -0
- package/dist/editor/ai/AiTerminal.js.map +1 -0
- package/dist/editor/ai/AiToolCall.d.ts +9 -0
- package/dist/editor/ai/AiToolCall.js +16 -0
- package/dist/editor/ai/AiToolCall.js.map +1 -0
- package/dist/editor/ai/EditorAiTerminal.d.ts +5 -0
- package/dist/editor/ai/EditorAiTerminal.js +7 -0
- package/dist/editor/ai/EditorAiTerminal.js.map +1 -0
- package/dist/editor/ai/editorAiContext.d.ts +11 -0
- package/dist/editor/ai/editorAiContext.js +12 -0
- package/dist/editor/ai/editorAiContext.js.map +1 -0
- package/dist/editor/client/DialogContext.d.ts +12 -0
- package/dist/editor/client/DialogContext.js +25 -0
- package/dist/editor/client/DialogContext.js.map +1 -0
- package/dist/editor/client/EditorClient.d.ts +26 -0
- package/dist/editor/client/EditorClient.js +1298 -0
- package/dist/editor/client/EditorClient.js.map +1 -0
- package/dist/editor/client/GenericDialog.d.ts +10 -0
- package/dist/editor/client/GenericDialog.js +25 -0
- package/dist/editor/client/GenericDialog.js.map +1 -0
- package/dist/editor/client/editContext.d.ts +199 -0
- package/dist/editor/client/editContext.js +20 -0
- package/dist/editor/client/editContext.js.map +1 -0
- package/dist/editor/client/helpers.d.ts +12 -0
- package/dist/editor/client/helpers.js +29 -0
- package/dist/editor/client/helpers.js.map +1 -0
- package/dist/editor/client/itemsRepository.d.ts +24 -0
- package/dist/editor/client/itemsRepository.js +253 -0
- package/dist/editor/client/itemsRepository.js.map +1 -0
- package/dist/editor/client/operations.d.ts +57 -0
- package/dist/editor/client/operations.js +393 -0
- package/dist/editor/client/operations.js.map +1 -0
- package/dist/editor/client/pageModelBuilder.d.ts +6 -0
- package/dist/editor/client/pageModelBuilder.js +127 -0
- package/dist/editor/client/pageModelBuilder.js.map +1 -0
- package/dist/editor/commands/commands.d.ts +19 -0
- package/dist/editor/commands/commands.js +2 -0
- package/dist/editor/commands/commands.js.map +1 -0
- package/dist/editor/commands/componentCommands.d.ts +13 -0
- package/dist/editor/commands/componentCommands.js +271 -0
- package/dist/editor/commands/componentCommands.js.map +1 -0
- package/dist/editor/commands/createVersionCommand.d.ts +4 -0
- package/dist/editor/commands/createVersionCommand.js +24 -0
- package/dist/editor/commands/createVersionCommand.js.map +1 -0
- package/dist/editor/commands/deleteVersionCommand.d.ts +4 -0
- package/dist/editor/commands/deleteVersionCommand.js +53 -0
- package/dist/editor/commands/deleteVersionCommand.js.map +1 -0
- package/dist/editor/commands/itemCommands.d.ts +17 -0
- package/dist/editor/commands/itemCommands.js +132 -0
- package/dist/editor/commands/itemCommands.js.map +1 -0
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.d.ts +8 -0
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.js +89 -0
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.js.map +1 -0
- package/dist/editor/commands/undo.d.ts +15 -0
- package/dist/editor/commands/undo.js +29 -0
- package/dist/editor/commands/undo.js.map +1 -0
- package/dist/editor/component-designer/ComponentDesigner.d.ts +1 -0
- package/dist/editor/component-designer/ComponentDesigner.js +56 -0
- package/dist/editor/component-designer/ComponentDesigner.js.map +1 -0
- package/dist/editor/component-designer/ComponentDesignerAiTerminal.d.ts +1 -0
- package/dist/editor/component-designer/ComponentDesignerAiTerminal.js +7 -0
- package/dist/editor/component-designer/ComponentDesignerAiTerminal.js.map +1 -0
- package/dist/editor/component-designer/ComponentDesignerMenu.d.ts +1 -0
- package/dist/editor/component-designer/ComponentDesignerMenu.js +65 -0
- package/dist/editor/component-designer/ComponentDesignerMenu.js.map +1 -0
- package/dist/editor/component-designer/ComponentEditor.d.ts +4 -0
- package/dist/editor/component-designer/ComponentEditor.js +57 -0
- package/dist/editor/component-designer/ComponentEditor.js.map +1 -0
- package/dist/editor/component-designer/ComponentRenderingCodeEditor.d.ts +5 -0
- package/dist/editor/component-designer/ComponentRenderingCodeEditor.js +11 -0
- package/dist/editor/component-designer/ComponentRenderingCodeEditor.js.map +1 -0
- package/dist/editor/component-designer/ComponentRenderingEditor.d.ts +1 -0
- package/dist/editor/component-designer/ComponentRenderingEditor.js +69 -0
- package/dist/editor/component-designer/ComponentRenderingEditor.js.map +1 -0
- package/dist/editor/component-designer/ComponentsDropdown.d.ts +4 -0
- package/dist/editor/component-designer/ComponentsDropdown.js +20 -0
- package/dist/editor/component-designer/ComponentsDropdown.js.map +1 -0
- package/dist/editor/component-designer/PlaceholdersEditor.d.ts +4 -0
- package/dist/editor/component-designer/PlaceholdersEditor.js +68 -0
- package/dist/editor/component-designer/PlaceholdersEditor.js.map +1 -0
- package/dist/editor/component-designer/RenderingsDropdown.d.ts +1 -0
- package/dist/editor/component-designer/RenderingsDropdown.js +23 -0
- package/dist/editor/component-designer/RenderingsDropdown.js.map +1 -0
- package/dist/editor/component-designer/TemplateEditor.d.ts +1 -0
- package/dist/editor/component-designer/TemplateEditor.js +142 -0
- package/dist/editor/component-designer/TemplateEditor.js.map +1 -0
- package/dist/editor/component-designer/aiContext.d.ts +5 -0
- package/dist/editor/component-designer/aiContext.js +16 -0
- package/dist/editor/component-designer/aiContext.js.map +1 -0
- package/dist/editor/componentTreeHelper.d.ts +16 -0
- package/dist/editor/componentTreeHelper.js +87 -0
- package/dist/editor/componentTreeHelper.js.map +1 -0
- package/dist/editor/control-center/ControlCenterMenu.d.ts +1 -0
- package/dist/editor/control-center/ControlCenterMenu.js +57 -0
- package/dist/editor/control-center/ControlCenterMenu.js.map +1 -0
- package/dist/editor/control-center/IndexOverview.d.ts +1 -0
- package/dist/editor/control-center/IndexOverview.js +25 -0
- package/dist/editor/control-center/IndexOverview.js.map +1 -0
- package/dist/editor/control-center/IndexSettings.d.ts +5 -0
- package/dist/editor/control-center/IndexSettings.js +104 -0
- package/dist/editor/control-center/IndexSettings.js.map +1 -0
- package/dist/editor/control-center/Status.d.ts +1 -0
- package/dist/editor/control-center/Status.js +5 -0
- package/dist/editor/control-center/Status.js.map +1 -0
- package/dist/editor/editor-warnings/ItemLocked.d.ts +2 -0
- package/dist/editor/editor-warnings/ItemLocked.js +38 -0
- package/dist/editor/editor-warnings/ItemLocked.js.map +1 -0
- package/dist/editor/editor-warnings/NoLanguageWriteAccess.d.ts +2 -0
- package/dist/editor/editor-warnings/NoLanguageWriteAccess.js +14 -0
- package/dist/editor/editor-warnings/NoLanguageWriteAccess.js.map +1 -0
- package/dist/editor/editor-warnings/NoWorkflowWriteAccess.d.ts +2 -0
- package/dist/editor/editor-warnings/NoWorkflowWriteAccess.js +14 -0
- package/dist/editor/editor-warnings/NoWorkflowWriteAccess.js.map +1 -0
- package/dist/editor/editor-warnings/NoWriteAccess.d.ts +2 -0
- package/dist/editor/editor-warnings/NoWriteAccess.js +12 -0
- package/dist/editor/editor-warnings/NoWriteAccess.js.map +1 -0
- package/dist/editor/editor-warnings/ValidationErrors.d.ts +2 -0
- package/dist/editor/editor-warnings/ValidationErrors.js +25 -0
- package/dist/editor/editor-warnings/ValidationErrors.js.map +1 -0
- package/dist/editor/field-types/AttachmentEditor.d.ts +4 -0
- package/dist/editor/field-types/AttachmentEditor.js +5 -0
- package/dist/editor/field-types/AttachmentEditor.js.map +1 -0
- package/dist/editor/field-types/CheckboxEditor.d.ts +5 -0
- package/dist/editor/field-types/CheckboxEditor.js +30 -0
- package/dist/editor/field-types/CheckboxEditor.js.map +1 -0
- package/dist/editor/field-types/DropLinkEditor.d.ts +5 -0
- package/dist/editor/field-types/DropLinkEditor.js +49 -0
- package/dist/editor/field-types/DropLinkEditor.js.map +1 -0
- package/dist/editor/field-types/DropListEditor.d.ts +5 -0
- package/dist/editor/field-types/DropListEditor.js +56 -0
- package/dist/editor/field-types/DropListEditor.js.map +1 -0
- package/dist/editor/field-types/ImageFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/ImageFieldEditor.js +34 -0
- package/dist/editor/field-types/ImageFieldEditor.js.map +1 -0
- package/dist/editor/field-types/InternalLinkFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/InternalLinkFieldEditor.js +59 -0
- package/dist/editor/field-types/InternalLinkFieldEditor.js.map +1 -0
- package/dist/editor/field-types/LinkFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/LinkFieldEditor.js +56 -0
- package/dist/editor/field-types/LinkFieldEditor.js.map +1 -0
- package/dist/editor/field-types/MultiLineText.d.ts +6 -0
- package/dist/editor/field-types/MultiLineText.js +33 -0
- package/dist/editor/field-types/MultiLineText.js.map +1 -0
- package/dist/editor/field-types/PictureFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/PictureFieldEditor.js +57 -0
- package/dist/editor/field-types/PictureFieldEditor.js.map +1 -0
- package/dist/editor/field-types/RawEditor.d.ts +5 -0
- package/dist/editor/field-types/RawEditor.js +31 -0
- package/dist/editor/field-types/RawEditor.js.map +1 -0
- package/dist/editor/field-types/ReactQuill.d.ts +125 -0
- package/dist/editor/field-types/ReactQuill.js +385 -0
- package/dist/editor/field-types/ReactQuill.js.map +1 -0
- package/dist/editor/field-types/RichTextEditor.d.ts +5 -0
- package/dist/editor/field-types/RichTextEditor.js +8 -0
- package/dist/editor/field-types/RichTextEditor.js.map +1 -0
- package/dist/editor/field-types/RichTextEditorComponent.d.ts +6 -0
- package/dist/editor/field-types/RichTextEditorComponent.js +70 -0
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -0
- package/dist/editor/field-types/SingleLineText.d.ts +6 -0
- package/dist/editor/field-types/SingleLineText.js +90 -0
- package/dist/editor/field-types/SingleLineText.js.map +1 -0
- package/dist/editor/field-types/TreeListEditor.d.ts +5 -0
- package/dist/editor/field-types/TreeListEditor.js +132 -0
- package/dist/editor/field-types/TreeListEditor.js.map +1 -0
- package/dist/editor/fieldTypes.d.ts +117 -0
- package/dist/editor/fieldTypes.js +2 -0
- package/dist/editor/fieldTypes.js.map +1 -0
- package/dist/editor/media-selector/AiImageSearch.d.ts +4 -0
- package/dist/editor/media-selector/AiImageSearch.js +105 -0
- package/dist/editor/media-selector/AiImageSearch.js.map +1 -0
- package/dist/editor/media-selector/AiImageSearchPrompt.d.ts +3 -0
- package/dist/editor/media-selector/AiImageSearchPrompt.js +56 -0
- package/dist/editor/media-selector/AiImageSearchPrompt.js.map +1 -0
- package/dist/editor/media-selector/MediaSelector.d.ts +9 -0
- package/dist/editor/media-selector/MediaSelector.js +8 -0
- package/dist/editor/media-selector/MediaSelector.js.map +1 -0
- package/dist/editor/media-selector/Preview.d.ts +4 -0
- package/dist/editor/media-selector/Preview.js +7 -0
- package/dist/editor/media-selector/Preview.js.map +1 -0
- package/dist/editor/media-selector/Thumbnails.d.ts +13 -0
- package/dist/editor/media-selector/Thumbnails.js +9 -0
- package/dist/editor/media-selector/Thumbnails.js.map +1 -0
- package/dist/editor/media-selector/TreeSelector.d.ts +7 -0
- package/dist/editor/media-selector/TreeSelector.js +165 -0
- package/dist/editor/media-selector/TreeSelector.js.map +1 -0
- package/dist/editor/media-selector/UploadZone.d.ts +4 -0
- package/dist/editor/media-selector/UploadZone.js +78 -0
- package/dist/editor/media-selector/UploadZone.js.map +1 -0
- package/dist/editor/menubar/ActionsMenu.d.ts +1 -0
- package/dist/editor/menubar/ActionsMenu.js +31 -0
- package/dist/editor/menubar/ActionsMenu.js.map +1 -0
- package/dist/editor/menubar/ActiveUsers.d.ts +1 -0
- package/dist/editor/menubar/ActiveUsers.js +11 -0
- package/dist/editor/menubar/ActiveUsers.js.map +1 -0
- package/dist/editor/menubar/ApproveAndPublish.d.ts +1 -0
- package/dist/editor/menubar/ApproveAndPublish.js +11 -0
- package/dist/editor/menubar/ApproveAndPublish.js.map +1 -0
- package/dist/editor/menubar/BrowseHistory.d.ts +6 -0
- package/dist/editor/menubar/BrowseHistory.js +12 -0
- package/dist/editor/menubar/BrowseHistory.js.map +1 -0
- package/dist/editor/menubar/ItemLanguageVersion.d.ts +1 -0
- package/dist/editor/menubar/ItemLanguageVersion.js +34 -0
- package/dist/editor/menubar/ItemLanguageVersion.js.map +1 -0
- package/dist/editor/menubar/LanguageSelector.d.ts +9 -0
- package/dist/editor/menubar/LanguageSelector.js +31 -0
- package/dist/editor/menubar/LanguageSelector.js.map +1 -0
- package/dist/editor/menubar/Menu.d.ts +1 -0
- package/dist/editor/menubar/Menu.js +63 -0
- package/dist/editor/menubar/Menu.js.map +1 -0
- package/dist/editor/menubar/NavButtons.d.ts +1 -0
- package/dist/editor/menubar/NavButtons.js +41 -0
- package/dist/editor/menubar/NavButtons.js.map +1 -0
- package/dist/editor/menubar/PageSelector.d.ts +4 -0
- package/dist/editor/menubar/PageSelector.js +48 -0
- package/dist/editor/menubar/PageSelector.js.map +1 -0
- package/dist/editor/menubar/PageViewerControls.d.ts +1 -0
- package/dist/editor/menubar/PageViewerControls.js +35 -0
- package/dist/editor/menubar/PageViewerControls.js.map +1 -0
- package/dist/editor/menubar/Separator.d.ts +3 -0
- package/dist/editor/menubar/Separator.js +6 -0
- package/dist/editor/menubar/Separator.js.map +1 -0
- package/dist/editor/menubar/SiteInfo.d.ts +1 -0
- package/dist/editor/menubar/SiteInfo.js +24 -0
- package/dist/editor/menubar/SiteInfo.js.map +1 -0
- package/dist/editor/menubar/User.d.ts +4 -0
- package/dist/editor/menubar/User.js +16 -0
- package/dist/editor/menubar/User.js.map +1 -0
- package/dist/editor/menubar/VersionSelector.d.ts +9 -0
- package/dist/editor/menubar/VersionSelector.js +47 -0
- package/dist/editor/menubar/VersionSelector.js.map +1 -0
- package/dist/editor/page-editor-chrome/CommentHighlighting.d.ts +6 -0
- package/dist/editor/page-editor-chrome/CommentHighlighting.js +212 -0
- package/dist/editor/page-editor-chrome/CommentHighlighting.js.map +1 -0
- package/dist/editor/page-editor-chrome/CommentHighlightings.d.ts +4 -0
- package/dist/editor/page-editor-chrome/CommentHighlightings.js +15 -0
- package/dist/editor/page-editor-chrome/CommentHighlightings.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicator.d.ts +4 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js +25 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicators.d.ts +1 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicators.js +13 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicators.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.d.ts +8 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js +25 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicators.d.ts +6 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicators.js +13 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicators.js.map +1 -0
- package/dist/editor/page-editor-chrome/FrameMenu.d.ts +7 -0
- package/dist/editor/page-editor-chrome/FrameMenu.js +176 -0
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -0
- package/dist/editor/page-editor-chrome/FrameMenus.d.ts +5 -0
- package/dist/editor/page-editor-chrome/FrameMenus.js +22 -0
- package/dist/editor/page-editor-chrome/FrameMenus.js.map +1 -0
- package/dist/editor/page-editor-chrome/InlineEditor.d.ts +5 -0
- package/dist/editor/page-editor-chrome/InlineEditor.js +99 -0
- package/dist/editor/page-editor-chrome/InlineEditor.js.map +1 -0
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.d.ts +1 -0
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js +33 -0
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js.map +1 -0
- package/dist/editor/page-editor-chrome/NoLayout.d.ts +1 -0
- package/dist/editor/page-editor-chrome/NoLayout.js +19 -0
- package/dist/editor/page-editor-chrome/NoLayout.js.map +1 -0
- package/dist/editor/page-editor-chrome/PageEditorChrome.d.ts +6 -0
- package/dist/editor/page-editor-chrome/PageEditorChrome.js +63 -0
- package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -0
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.d.ts +1 -0
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js +107 -0
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js.map +1 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.d.ts +14 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +80 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.d.ts +5 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js +145 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js.map +1 -0
- package/dist/editor/page-viewer/DeviceToolbar.d.ts +6 -0
- package/dist/editor/page-viewer/DeviceToolbar.js +19 -0
- package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -0
- package/dist/editor/page-viewer/EditorForm.d.ts +5 -0
- package/dist/editor/page-viewer/EditorForm.js +128 -0
- package/dist/editor/page-viewer/EditorForm.js.map +1 -0
- package/dist/editor/page-viewer/MiniMap.d.ts +9 -0
- package/dist/editor/page-viewer/MiniMap.js +222 -0
- package/dist/editor/page-viewer/MiniMap.js.map +1 -0
- package/dist/editor/page-viewer/PageViewer.d.ts +8 -0
- package/dist/editor/page-viewer/PageViewer.js +62 -0
- package/dist/editor/page-viewer/PageViewer.js.map +1 -0
- package/dist/editor/page-viewer/PageViewerFrame.d.ts +11 -0
- package/dist/editor/page-viewer/PageViewerFrame.js +690 -0
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -0
- package/dist/editor/page-viewer/pageViewContext.d.ts +38 -0
- package/dist/editor/page-viewer/pageViewContext.js +115 -0
- package/dist/editor/page-viewer/pageViewContext.js.map +1 -0
- package/dist/editor/pageModel.d.ts +171 -0
- package/dist/editor/pageModel.js +2 -0
- package/dist/editor/pageModel.js.map +1 -0
- package/dist/editor/picture-shared.d.ts +16 -0
- package/dist/editor/picture-shared.js +25 -0
- package/dist/editor/picture-shared.js.map +1 -0
- package/dist/editor/reviews/Comment.d.ts +4 -0
- package/dist/editor/reviews/Comment.js +114 -0
- package/dist/editor/reviews/Comment.js.map +1 -0
- package/dist/editor/reviews/Comments.d.ts +1 -0
- package/dist/editor/reviews/Comments.js +22 -0
- package/dist/editor/reviews/Comments.js.map +1 -0
- package/dist/editor/reviews/PreviewInfo.d.ts +1 -0
- package/dist/editor/reviews/PreviewInfo.js +11 -0
- package/dist/editor/reviews/PreviewInfo.js.map +1 -0
- package/dist/editor/reviews/Reviews.d.ts +1 -0
- package/dist/editor/reviews/Reviews.js +160 -0
- package/dist/editor/reviews/Reviews.js.map +1 -0
- package/dist/editor/reviews/reviewCommands.d.ts +3 -0
- package/dist/editor/reviews/reviewCommands.js +42 -0
- package/dist/editor/reviews/reviewCommands.js.map +1 -0
- package/dist/editor/reviews/useReviews.d.ts +12 -0
- package/dist/editor/reviews/useReviews.js +43 -0
- package/dist/editor/reviews/useReviews.js.map +1 -0
- package/dist/editor/services/aiService.d.ts +34 -0
- package/dist/editor/services/aiService.js +95 -0
- package/dist/editor/services/aiService.js.map +1 -0
- package/dist/editor/services/componentDesignerService.d.ts +46 -0
- package/dist/editor/services/componentDesignerService.js +72 -0
- package/dist/editor/services/componentDesignerService.js.map +1 -0
- package/dist/editor/services/contentService.d.ts +34 -0
- package/dist/editor/services/contentService.js +92 -0
- package/dist/editor/services/contentService.js.map +1 -0
- package/dist/editor/services/editService.d.ts +34 -0
- package/dist/editor/services/editService.js +294 -0
- package/dist/editor/services/editService.js.map +1 -0
- package/dist/editor/services/indexService.d.ts +6 -0
- package/dist/editor/services/indexService.js +19 -0
- package/dist/editor/services/indexService.js.map +1 -0
- package/dist/editor/services/reviewsService.d.ts +12 -0
- package/dist/editor/services/reviewsService.js +32 -0
- package/dist/editor/services/reviewsService.js.map +1 -0
- package/dist/editor/services/serviceHelper.d.ts +9 -0
- package/dist/editor/services/serviceHelper.js +64 -0
- package/dist/editor/services/serviceHelper.js.map +1 -0
- package/dist/editor/services/systemService.d.ts +2 -0
- package/dist/editor/services/systemService.js +5 -0
- package/dist/editor/services/systemService.js.map +1 -0
- package/dist/editor/services/translationService.d.ts +11 -0
- package/dist/editor/services/translationService.js +11 -0
- package/dist/editor/services/translationService.js.map +1 -0
- package/dist/editor/services-server/api.d.ts +19 -0
- package/dist/editor/services-server/api.js +111 -0
- package/dist/editor/services-server/api.js.map +1 -0
- package/dist/editor/services-server/graphQL.d.ts +29 -0
- package/dist/editor/services-server/graphQL.js +53 -0
- package/dist/editor/services-server/graphQL.js.map +1 -0
- package/dist/editor/sidebar/ComponentPalette.d.ts +1 -0
- package/dist/editor/sidebar/ComponentPalette.js +53 -0
- package/dist/editor/sidebar/ComponentPalette.js.map +1 -0
- package/dist/editor/sidebar/ComponentTree.d.ts +1 -0
- package/dist/editor/sidebar/ComponentTree.js +360 -0
- package/dist/editor/sidebar/ComponentTree.js.map +1 -0
- package/dist/editor/sidebar/Debug.d.ts +1 -0
- package/dist/editor/sidebar/Debug.js +58 -0
- package/dist/editor/sidebar/Debug.js.map +1 -0
- package/dist/editor/sidebar/DictionaryEditor.d.ts +1 -0
- package/dist/editor/sidebar/DictionaryEditor.js +158 -0
- package/dist/editor/sidebar/DictionaryEditor.js.map +1 -0
- package/dist/editor/sidebar/EditHistory.d.ts +1 -0
- package/dist/editor/sidebar/EditHistory.js +72 -0
- package/dist/editor/sidebar/EditHistory.js.map +1 -0
- package/dist/editor/sidebar/GraphQL.d.ts +1 -0
- package/dist/editor/sidebar/GraphQL.js +113 -0
- package/dist/editor/sidebar/GraphQL.js.map +1 -0
- package/dist/editor/sidebar/Insert.d.ts +1 -0
- package/dist/editor/sidebar/Insert.js +22 -0
- package/dist/editor/sidebar/Insert.js.map +1 -0
- package/dist/editor/sidebar/MainContentTree.d.ts +4 -0
- package/dist/editor/sidebar/MainContentTree.js +49 -0
- package/dist/editor/sidebar/MainContentTree.js.map +1 -0
- package/dist/editor/sidebar/Performance.d.ts +1 -0
- package/dist/editor/sidebar/Performance.js +32 -0
- package/dist/editor/sidebar/Performance.js.map +1 -0
- package/dist/editor/sidebar/Sessions.d.ts +1 -0
- package/dist/editor/sidebar/Sessions.js +29 -0
- package/dist/editor/sidebar/Sessions.js.map +1 -0
- package/dist/editor/sidebar/Sidebar.d.ts +1 -0
- package/dist/editor/sidebar/Sidebar.js +13 -0
- package/dist/editor/sidebar/Sidebar.js.map +1 -0
- package/dist/editor/sidebar/SidebarView.d.ts +8 -0
- package/dist/editor/sidebar/SidebarView.js +74 -0
- package/dist/editor/sidebar/SidebarView.js.map +1 -0
- package/dist/editor/sidebar/Translations.d.ts +1 -0
- package/dist/editor/sidebar/Translations.js +158 -0
- package/dist/editor/sidebar/Translations.js.map +1 -0
- package/dist/editor/sidebar/Validation.d.ts +1 -0
- package/dist/editor/sidebar/Validation.js +50 -0
- package/dist/editor/sidebar/Validation.js.map +1 -0
- package/dist/editor/sidebar/ViewSelector.d.ts +1 -0
- package/dist/editor/sidebar/ViewSelector.js +13 -0
- package/dist/editor/sidebar/ViewSelector.js.map +1 -0
- package/dist/editor/sidebar/Workbox.d.ts +1 -0
- package/dist/editor/sidebar/Workbox.js +78 -0
- package/dist/editor/sidebar/Workbox.js.map +1 -0
- package/dist/editor/ui/CenteredMessage.d.ts +3 -0
- package/dist/editor/ui/CenteredMessage.js +5 -0
- package/dist/editor/ui/CenteredMessage.js.map +1 -0
- package/dist/editor/ui/CopyToClipboardButton.d.ts +3 -0
- package/dist/editor/ui/CopyToClipboardButton.js +15 -0
- package/dist/editor/ui/CopyToClipboardButton.js.map +1 -0
- package/dist/editor/ui/DialogButtons.d.ts +3 -0
- package/dist/editor/ui/DialogButtons.js +5 -0
- package/dist/editor/ui/DialogButtons.js.map +1 -0
- package/dist/editor/ui/Icons.d.ts +38 -0
- package/dist/editor/ui/Icons.js +56 -0
- package/dist/editor/ui/Icons.js.map +1 -0
- package/dist/editor/ui/ItemNameDialog.d.ts +11 -0
- package/dist/editor/ui/ItemNameDialog.js +40 -0
- package/dist/editor/ui/ItemNameDialog.js.map +1 -0
- package/dist/editor/ui/ItemNameDialogNew.d.ts +10 -0
- package/dist/editor/ui/ItemNameDialogNew.js +56 -0
- package/dist/editor/ui/ItemNameDialogNew.js.map +1 -0
- package/dist/editor/ui/ItemSearch.d.ts +23 -0
- package/dist/editor/ui/ItemSearch.js +90 -0
- package/dist/editor/ui/ItemSearch.js.map +1 -0
- package/dist/editor/ui/PerfectTree.d.ts +60 -0
- package/dist/editor/ui/PerfectTree.js +187 -0
- package/dist/editor/ui/PerfectTree.js.map +1 -0
- package/dist/editor/ui/Section.d.ts +4 -0
- package/dist/editor/ui/Section.js +10 -0
- package/dist/editor/ui/Section.js.map +1 -0
- package/dist/editor/ui/SimpleIconButton.d.ts +11 -0
- package/dist/editor/ui/SimpleIconButton.js +9 -0
- package/dist/editor/ui/SimpleIconButton.js.map +1 -0
- package/dist/editor/ui/SimpleMenu.d.ts +13 -0
- package/dist/editor/ui/SimpleMenu.js +7 -0
- package/dist/editor/ui/SimpleMenu.js.map +1 -0
- package/dist/editor/ui/SimpleTable.d.ts +14 -0
- package/dist/editor/ui/SimpleTable.js +9 -0
- package/dist/editor/ui/SimpleTable.js.map +1 -0
- package/dist/editor/ui/SimpleTabs.d.ts +12 -0
- package/dist/editor/ui/SimpleTabs.js +19 -0
- package/dist/editor/ui/SimpleTabs.js.map +1 -0
- package/dist/editor/ui/SimpleToolbar.d.ts +3 -0
- package/dist/editor/ui/SimpleToolbar.js +5 -0
- package/dist/editor/ui/SimpleToolbar.js.map +1 -0
- package/dist/editor/ui/Spinner.d.ts +3 -0
- package/dist/editor/ui/Spinner.js +5 -0
- package/dist/editor/ui/Spinner.js.map +1 -0
- package/dist/editor/ui/Splitter.d.ts +15 -0
- package/dist/editor/ui/Splitter.js +151 -0
- package/dist/editor/ui/Splitter.js.map +1 -0
- package/dist/editor/ui/StackedPanels.d.ts +5 -0
- package/dist/editor/ui/StackedPanels.js +67 -0
- package/dist/editor/ui/StackedPanels.js.map +1 -0
- package/dist/editor/ui/Toolbar.d.ts +3 -0
- package/dist/editor/ui/Toolbar.js +5 -0
- package/dist/editor/ui/Toolbar.js.map +1 -0
- package/dist/editor/utils/id-helper.d.ts +1 -0
- package/dist/editor/utils/id-helper.js +5 -0
- package/dist/editor/utils/id-helper.js.map +1 -0
- package/dist/editor/utils/insertOptions.d.ts +3 -0
- package/dist/editor/utils/insertOptions.js +43 -0
- package/dist/editor/utils/insertOptions.js.map +1 -0
- package/dist/editor/utils/itemutils.d.ts +3 -0
- package/dist/editor/utils/itemutils.js +22 -0
- package/dist/editor/utils/itemutils.js.map +1 -0
- package/dist/editor/utils/useMemoDebug.d.ts +1 -0
- package/dist/editor/utils/useMemoDebug.js +18 -0
- package/dist/editor/utils/useMemoDebug.js.map +1 -0
- package/dist/editor/utils.d.ts +44 -0
- package/dist/editor/utils.js +309 -0
- package/dist/editor/utils.js.map +1 -0
- package/dist/editor/views/CompareView.d.ts +1 -0
- package/dist/editor/views/CompareView.js +145 -0
- package/dist/editor/views/CompareView.js.map +1 -0
- package/dist/editor/views/EditView.d.ts +1 -0
- package/dist/editor/views/EditView.js +15 -0
- package/dist/editor/views/EditView.js.map +1 -0
- package/dist/editor/views/ItemEditor.d.ts +7 -0
- package/dist/editor/views/ItemEditor.js +22 -0
- package/dist/editor/views/ItemEditor.js.map +1 -0
- package/dist/editor/views/SingleEditView.d.ts +8 -0
- package/dist/editor/views/SingleEditView.js +23 -0
- package/dist/editor/views/SingleEditView.js.map +1 -0
- package/dist/images/bg-shape-black.webp +0 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/page-wizard/PageWizard.d.ts +70 -0
- package/dist/page-wizard/PageWizard.js +60 -0
- package/dist/page-wizard/PageWizard.js.map +1 -0
- package/dist/page-wizard/SelectWizard.d.ts +7 -0
- package/dist/page-wizard/SelectWizard.js +41 -0
- package/dist/page-wizard/SelectWizard.js.map +1 -0
- package/dist/page-wizard/WizardSteps.d.ts +8 -0
- package/dist/page-wizard/WizardSteps.js +69 -0
- package/dist/page-wizard/WizardSteps.js.map +1 -0
- package/dist/page-wizard/service.d.ts +15 -0
- package/dist/page-wizard/service.js +22 -0
- package/dist/page-wizard/service.js.map +1 -0
- package/dist/page-wizard/startPageWizardCommand.d.ts +13 -0
- package/dist/page-wizard/startPageWizardCommand.js +21 -0
- package/dist/page-wizard/startPageWizardCommand.js.map +1 -0
- package/dist/page-wizard/steps/BuildPageStep.d.ts +2 -0
- package/dist/page-wizard/steps/BuildPageStep.js +133 -0
- package/dist/page-wizard/steps/BuildPageStep.js.map +1 -0
- package/dist/page-wizard/steps/CollectStep.d.ts +2 -0
- package/dist/page-wizard/steps/CollectStep.js +119 -0
- package/dist/page-wizard/steps/CollectStep.js.map +1 -0
- package/dist/page-wizard/steps/ComponentTypesSelector.d.ts +11 -0
- package/dist/page-wizard/steps/ComponentTypesSelector.js +209 -0
- package/dist/page-wizard/steps/ComponentTypesSelector.js.map +1 -0
- package/dist/page-wizard/steps/Components.d.ts +9 -0
- package/dist/page-wizard/steps/Components.js +89 -0
- package/dist/page-wizard/steps/Components.js.map +1 -0
- package/dist/page-wizard/steps/CreatePage.d.ts +12 -0
- package/dist/page-wizard/steps/CreatePage.js +140 -0
- package/dist/page-wizard/steps/CreatePage.js.map +1 -0
- package/dist/page-wizard/steps/CreatePageAndLayoutStep.d.ts +2 -0
- package/dist/page-wizard/steps/CreatePageAndLayoutStep.js +228 -0
- package/dist/page-wizard/steps/CreatePageAndLayoutStep.js.map +1 -0
- package/dist/page-wizard/steps/EditButton.d.ts +8 -0
- package/dist/page-wizard/steps/EditButton.js +5 -0
- package/dist/page-wizard/steps/EditButton.js.map +1 -0
- package/dist/page-wizard/steps/FieldEditor.d.ts +5 -0
- package/dist/page-wizard/steps/FieldEditor.js +28 -0
- package/dist/page-wizard/steps/FieldEditor.js.map +1 -0
- package/dist/page-wizard/steps/Generate.d.ts +5 -0
- package/dist/page-wizard/steps/Generate.js +10 -0
- package/dist/page-wizard/steps/Generate.js.map +1 -0
- package/dist/page-wizard/steps/ImagesStep.d.ts +2 -0
- package/dist/page-wizard/steps/ImagesStep.js +156 -0
- package/dist/page-wizard/steps/ImagesStep.js.map +1 -0
- package/dist/page-wizard/steps/LayoutStep.d.ts +2 -0
- package/dist/page-wizard/steps/LayoutStep.js +118 -0
- package/dist/page-wizard/steps/LayoutStep.js.map +1 -0
- package/dist/page-wizard/steps/SelectStep.d.ts +2 -0
- package/dist/page-wizard/steps/SelectStep.js +145 -0
- package/dist/page-wizard/steps/SelectStep.js.map +1 -0
- package/dist/page-wizard/steps/schema.d.ts +13 -0
- package/dist/page-wizard/steps/schema.js +137 -0
- package/dist/page-wizard/steps/schema.js.map +1 -0
- package/dist/page-wizard/steps/usePageCreator.d.ts +6 -0
- package/dist/page-wizard/steps/usePageCreator.js +192 -0
- package/dist/page-wizard/steps/usePageCreator.js.map +1 -0
- package/dist/splash-screen/NewPage.d.ts +3 -0
- package/dist/splash-screen/NewPage.js +129 -0
- package/dist/splash-screen/NewPage.js.map +1 -0
- package/dist/splash-screen/SectionHeadline.d.ts +4 -0
- package/dist/splash-screen/SectionHeadline.js +7 -0
- package/dist/splash-screen/SectionHeadline.js.map +1 -0
- package/dist/splash-screen/SplashScreen.d.ts +1 -0
- package/dist/splash-screen/SplashScreen.js +79 -0
- package/dist/splash-screen/SplashScreen.js.map +1 -0
- package/dist/styles.css +2739 -0
- package/dist/tour/Tour.d.ts +3 -0
- package/dist/tour/Tour.js +319 -0
- package/dist/tour/Tour.js.map +1 -0
- package/dist/tour/default-tour.d.ts +9 -0
- package/dist/tour/default-tour.js +229 -0
- package/dist/tour/default-tour.js.map +1 -0
- package/dist/tour/preview-tour.d.ts +2 -0
- package/dist/tour/preview-tour.js +91 -0
- package/dist/tour/preview-tour.js.map +1 -0
- package/dist/types.d.ts +259 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +12 -5
- package/src/components/ui/button.tsx +62 -0
- package/src/editor/Titlebar.tsx +2 -2
- package/src/editor/client/EditorClient.tsx +8 -9
- package/src/editor/menubar/ActionsMenu.tsx +1 -1
- package/src/editor/menubar/Menu.tsx +3 -3
- package/src/editor/menubar/VersionSelector.tsx +9 -10
- package/src/editor/page-editor-chrome/CommentHighlighting.tsx +8 -9
- package/src/editor/page-viewer/MiniMap.tsx +11 -11
- package/src/editor/reviews/Comment.tsx +38 -33
- package/src/editor/sidebar/ComponentTree.tsx +512 -512
- package/src/editor/sidebar/Insert.tsx +2 -2
- package/src/editor/sidebar/MainContentTree.tsx +1 -0
- package/src/editor/sidebar/Translations.tsx +12 -12
- package/src/editor/sidebar/ViewSelector.tsx +6 -7
- package/src/editor/ui/PerfectTree.tsx +2 -2
- package/src/editor/ui/SimpleTable.tsx +3 -6
- package/src/editor/utils.ts +32 -29
- package/src/index.ts +2 -0
- package/src/lib/utils.ts +6 -0
- package/src/splash-screen/SplashScreen.tsx +2 -2
- package/styles.css +124 -2
- package/tsconfig.build.json +23 -13
- package/tsconfig.json +3 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
|
+
import { TerminalService } from "primereact/terminalservice";
|
|
5
|
+
import { Terminal } from "../Terminal";
|
|
6
|
+
import { useEditContext } from "../client/editContext";
|
|
7
|
+
import { Dropdown } from "primereact/dropdown";
|
|
8
|
+
import Cookies from "universal-cookie";
|
|
9
|
+
import { WizardIcon } from "../ui/Icons";
|
|
10
|
+
import { AiResponseMessage } from "./AiResponseMessage";
|
|
11
|
+
import { loadAiProfiles } from "../services/aiService";
|
|
12
|
+
import { SimpleIconButton } from "../ui/SimpleIconButton";
|
|
13
|
+
export function AiTerminal({ closeButton, createAiContext, defaultProfile, options, }) {
|
|
14
|
+
const editContext = useEditContext();
|
|
15
|
+
const [showPredefined, setShowPredefined] = useState(false);
|
|
16
|
+
if (!editContext)
|
|
17
|
+
return null;
|
|
18
|
+
const [messages, setMessages] = useState([]);
|
|
19
|
+
const [response, setResponse] = useState();
|
|
20
|
+
const [model, setModel] = useState();
|
|
21
|
+
const [prompt, setPrompt] = useState("");
|
|
22
|
+
const [profiles, setProfiles] = useState([]);
|
|
23
|
+
const [activeProfile, setActiveProfile] = useState();
|
|
24
|
+
const [initialPromptExecuted, setInitialPromptExecuted] = useState(false);
|
|
25
|
+
const selection = editContext.selection;
|
|
26
|
+
const terminalRef = useRef(null);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (options?.initialPrompt && !initialPromptExecuted && model) {
|
|
29
|
+
// Set the initial prompt text into the terminal's state.
|
|
30
|
+
console.log("setting prompt", options.initialPrompt);
|
|
31
|
+
setPrompt(options.initialPrompt);
|
|
32
|
+
setInitialPromptExecuted(true);
|
|
33
|
+
// Wait for the Terminal to update, then programmatically submit.
|
|
34
|
+
setTimeout(() => {
|
|
35
|
+
terminalRef.current?.submit();
|
|
36
|
+
}, 100);
|
|
37
|
+
}
|
|
38
|
+
}, [options?.initialPrompt, initialPromptExecuted, model]);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
async function fetchProfiles() {
|
|
41
|
+
if (!editContext?.currentItemDescriptor)
|
|
42
|
+
return;
|
|
43
|
+
const profiles = await loadAiProfiles(editContext.currentItemDescriptor);
|
|
44
|
+
setProfiles(profiles);
|
|
45
|
+
if (!activeProfile)
|
|
46
|
+
setActiveProfile(profiles.find((x) => x.name == defaultProfile) || profiles[0]);
|
|
47
|
+
}
|
|
48
|
+
fetchProfiles();
|
|
49
|
+
}, [editContext?.currentItemDescriptor]);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (activeProfile?.defaultModel)
|
|
52
|
+
setModel(activeProfile.defaultModel);
|
|
53
|
+
}, [activeProfile]);
|
|
54
|
+
const messagesRef = useRef(messages);
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
messagesRef.current = messages;
|
|
57
|
+
}, [messages]);
|
|
58
|
+
async function commandHandler(text, callback) {
|
|
59
|
+
const newMessages = [
|
|
60
|
+
...messagesRef.current,
|
|
61
|
+
{ content: text, role: "user", name: "user" },
|
|
62
|
+
];
|
|
63
|
+
const context = createAiContext({ editContext });
|
|
64
|
+
let lastOpIndex = 0;
|
|
65
|
+
const selectedText = editContext?.selectedRange?.text || null;
|
|
66
|
+
if (!activeProfile || !model)
|
|
67
|
+
return;
|
|
68
|
+
const messages = [
|
|
69
|
+
...(options?.hiddenSystemPrompt
|
|
70
|
+
? [
|
|
71
|
+
{
|
|
72
|
+
role: "system",
|
|
73
|
+
name: "system",
|
|
74
|
+
content: options.hiddenSystemPrompt,
|
|
75
|
+
},
|
|
76
|
+
]
|
|
77
|
+
: []),
|
|
78
|
+
...newMessages,
|
|
79
|
+
];
|
|
80
|
+
console.log(messages);
|
|
81
|
+
const response = await executePrompt(activeProfile.id, messages, selection, editContext.sessionId, model, selectedText, context, (response) => {
|
|
82
|
+
setResponse(response);
|
|
83
|
+
handleResponse(response, callback, false);
|
|
84
|
+
if (response.editOperations.length) {
|
|
85
|
+
if (!editContext)
|
|
86
|
+
return;
|
|
87
|
+
const newOps = response.editOperations.slice(lastOpIndex);
|
|
88
|
+
if (newOps.length === 0)
|
|
89
|
+
return;
|
|
90
|
+
const isEditTextFieldOp = (op) => {
|
|
91
|
+
if (op.type !== "edit-field")
|
|
92
|
+
return false;
|
|
93
|
+
const editFieldOp = op;
|
|
94
|
+
return (editFieldOp.fieldType &&
|
|
95
|
+
editFieldOp.fieldType.indexOf("text") !== -1);
|
|
96
|
+
};
|
|
97
|
+
const isEditTextField = isEditTextFieldOp(newOps[newOps.length - 1]);
|
|
98
|
+
if (isEditTextField)
|
|
99
|
+
lastOpIndex = response.editOperations.length - 1;
|
|
100
|
+
else
|
|
101
|
+
lastOpIndex = response.editOperations.length;
|
|
102
|
+
newOps.forEach((op) => {
|
|
103
|
+
if (isEditTextFieldOp(op)) {
|
|
104
|
+
const editFieldOp = op;
|
|
105
|
+
if (editFieldOp.item) {
|
|
106
|
+
editContext.itemsRepository.updateFieldValue(editFieldOp, editFieldOp.user ?? { name: "unknown", ai: false }, false, editFieldOp.value);
|
|
107
|
+
editContext.select([editFieldOp.item.id]);
|
|
108
|
+
editContext.setScrollIntoView(editFieldOp.item.id);
|
|
109
|
+
editContext?.setFocusedField(editFieldOp, false);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
const addOp = op;
|
|
114
|
+
if (op.type === "add-component" && addOp.componentId) {
|
|
115
|
+
const newComponentId = addOp.componentId;
|
|
116
|
+
editContext.select([newComponentId]);
|
|
117
|
+
editContext.setScrollIntoView(newComponentId);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
if (response) {
|
|
124
|
+
handleResponse(response, callback, true);
|
|
125
|
+
if (context.callback)
|
|
126
|
+
context.callback(response);
|
|
127
|
+
editContext?.requestRefresh("immediate");
|
|
128
|
+
}
|
|
129
|
+
if (response?.responseText)
|
|
130
|
+
newMessages.push({
|
|
131
|
+
content: response.responseText,
|
|
132
|
+
role: "assistant",
|
|
133
|
+
name: "assistant",
|
|
134
|
+
});
|
|
135
|
+
setResponse(response ? response : undefined);
|
|
136
|
+
setMessages(newMessages);
|
|
137
|
+
}
|
|
138
|
+
useEffect(() => {
|
|
139
|
+
TerminalService.on("command", commandHandler);
|
|
140
|
+
return () => {
|
|
141
|
+
TerminalService.off("command", commandHandler);
|
|
142
|
+
};
|
|
143
|
+
}, []);
|
|
144
|
+
return (_jsx("div", { className: "h-full flex flex-col relative flex-1 pl-1.5", "data-testid": "ai-terminal", children: _jsxs("div", { className: "flex-1 relative", children: [_jsx("div", { className: "inset-0 absolute tour-ai-terminal", children: _jsx(Terminal, { disabled: !model, ref: terminalRef, onReset: () => {
|
|
145
|
+
setMessages([]);
|
|
146
|
+
setResponse(undefined);
|
|
147
|
+
}, infobar: response?.numInputTokens && (_jsxs("div", { className: "text-gray-400 text-right", style: { fontSize: "10px" }, children: ["Tokens in: ", response?.numInputTokens?.toLocaleString(), " out:", " ", response?.numOutputTokens?.toLocaleString(), " ", response?.numCachedTokens
|
|
148
|
+
? `cached: ${response?.numCachedTokens?.toLocaleString()} `
|
|
149
|
+
: "", response?.state] })), prompt: prompt, setPrompt: setPrompt, statusbar: _jsxs("div", { className: "flex items-center justify-between gap-1 flex-1", children: [_jsxs("a", { className: "text-xs text-blue-300 cursor-pointer flex items-center gap-1 ml-1", onClick: () => {
|
|
150
|
+
setShowPredefined(!showPredefined);
|
|
151
|
+
}, children: [_jsx(WizardIcon, { className: "w-5 h-5" }), "Predefined prompts"] }), editContext.selection?.length > 0 && (_jsxs("div", { className: "text-xs text-red-400 flex items-center mr-2", children: [editContext.selection.length, " items selected", _jsx(SimpleIconButton, { icon: "pi pi-times", label: "Clear selection", onClick: () => {
|
|
152
|
+
editContext.select([]);
|
|
153
|
+
} })] })), showPredefined && (_jsx("div", { className: "absolute right-0 left-0 bottom-8 text-sm overflow-y-auto bg-white p-3 pb-1 flex flex-col gap-1 ", children: activeProfile &&
|
|
154
|
+
activeProfile.prompts.map((p, index) => (_jsx("div", { className: "p-1.5 mb-1 border border-gray-200 rounded-lg cursor-pointer text-gray-700 text-xs", onClick: () => {
|
|
155
|
+
setPrompt(p.prompt);
|
|
156
|
+
setShowPredefined(false);
|
|
157
|
+
}, children: p.title }, index))) }))] }), toolbar: _jsxs("div", { className: "flex items-stretch gap-1", children: [_jsx(Dropdown, { className: "text-sm", value: activeProfile, onChange: (e) => setActiveProfile(e.value), optionLabel: "name", options: profiles }), activeProfile && (_jsx(Dropdown, { className: "text-sm", value: model, onChange: (e) => setModel(e.value), options: activeProfile.models })), closeButton] }), commandHandler: (v, callback) => {
|
|
158
|
+
commandHandler(v, callback);
|
|
159
|
+
} }) }), activeProfile?.errorMessage && (_jsx("div", { className: "text-red-500 text-sm p-2 inset-0 absolute grid items-center justify-center", children: activeProfile?.errorMessage })), !model && (_jsx("div", { className: "inset-0 absolute grid items-center justify-center text-gray-400 text-sm", children: !activeProfile ? "No profile selected" : "No model selected" }))] }) }));
|
|
160
|
+
}
|
|
161
|
+
async function executePrompt(profileId, messages, selection, session, model, selectedText, context, callback) {
|
|
162
|
+
const response = await fetch(context.endpoint, {
|
|
163
|
+
method: "POST",
|
|
164
|
+
body: JSON.stringify({
|
|
165
|
+
...context.promptData,
|
|
166
|
+
profileId,
|
|
167
|
+
messages,
|
|
168
|
+
selection,
|
|
169
|
+
selectedText,
|
|
170
|
+
model,
|
|
171
|
+
sessionId: session,
|
|
172
|
+
}),
|
|
173
|
+
credentials: "include",
|
|
174
|
+
headers: {
|
|
175
|
+
"Content-Type": "application/json",
|
|
176
|
+
Cookie: new Cookies().getAll(),
|
|
177
|
+
},
|
|
178
|
+
});
|
|
179
|
+
if (!response?.body)
|
|
180
|
+
return null;
|
|
181
|
+
const reader = response.body.getReader();
|
|
182
|
+
const decoder = new TextDecoder();
|
|
183
|
+
let buffer = "";
|
|
184
|
+
let result = null;
|
|
185
|
+
while (true) {
|
|
186
|
+
const { done, value } = await reader.read();
|
|
187
|
+
if (done) {
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
buffer += decoder.decode(value, { stream: true }); // 'stream: true' ensures that any incomplete multi-byte characters aren't malformed.
|
|
191
|
+
// Split the buffer by newline and keep the last partial line for the next iteration.
|
|
192
|
+
const lines = buffer.split("\n");
|
|
193
|
+
if (lines.length > 0) {
|
|
194
|
+
buffer = lines.pop() || ""; // Incomplete line (if any) is kept for the next iteration.
|
|
195
|
+
for (let line of lines) {
|
|
196
|
+
if (line.trim() === "")
|
|
197
|
+
continue; // Skip empty lines if any.
|
|
198
|
+
try {
|
|
199
|
+
const jsonData = JSON.parse(line);
|
|
200
|
+
callback(jsonData);
|
|
201
|
+
result = jsonData;
|
|
202
|
+
}
|
|
203
|
+
catch (e) {
|
|
204
|
+
console.error("Error parsing line:" + line, e);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
// If there's any remaining content in the buffer after processing all chunks, try to process it.
|
|
210
|
+
if (buffer.trim() !== "") {
|
|
211
|
+
try {
|
|
212
|
+
const jsonData = JSON.parse(buffer);
|
|
213
|
+
result = jsonData;
|
|
214
|
+
}
|
|
215
|
+
catch (e) {
|
|
216
|
+
console.error("Error parsing the final buffer content:", e);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return result;
|
|
220
|
+
}
|
|
221
|
+
function handleResponse(response, terminalCallback, isFinished) {
|
|
222
|
+
const toolcalls = response?.toolCalls?.map((tool_call) => {
|
|
223
|
+
return {
|
|
224
|
+
func: tool_call.function?.name,
|
|
225
|
+
arguments: tool_call.function?.arguments,
|
|
226
|
+
result: tool_call.result,
|
|
227
|
+
error: tool_call.error,
|
|
228
|
+
};
|
|
229
|
+
}) || [];
|
|
230
|
+
const responseText = response.responseText
|
|
231
|
+
?.trim()
|
|
232
|
+
.replace(/\n/g, "<br/>")
|
|
233
|
+
?.replace(/\*\*(.*?)\*\*/g, "<b>$1</b>");
|
|
234
|
+
terminalCallback(_jsx(AiResponseMessage, { responseText: responseText, toolcalls: toolcalls, editOperations: response.editOperations, finished: isFinished }), isFinished);
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=AiTerminal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiTerminal.js","sourceRoot":"","sources":["../../../src/editor/ai/AiTerminal.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAa,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAMlE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAoC1D,MAAM,UAAU,UAAU,CAAC,EACzB,WAAW,EACX,eAAe,EACf,cAAc,EACd,OAAO,GAMR;IACC,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5D,IAAI,CAAC,WAAW;QA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AAM,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACzB,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACpC,MAAM,GAAG,QAAQ,CAAC;QACpB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CAAC,yCAAyC,EAAE,CAAC,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,cAAc,CACrB,QAAa,EACb,gBAAoE,EACpE,UAAmB;IAEnB,MAAM,SAAS,GACb,QAAQ,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,SAAc,EAAE,EAAE;QAC1C,OAAO;YACL,IAAI,EAAE,SAAS,CAAC,QAAQ,EAAE,IAAI;YAC9B,SAAS,EAAE,SAAS,CAAC,QAAQ,EAAE,SAAS;YACxC,MAAM,EAAE,SAAS,CAAC,MAAM;YACxB,KAAK,EAAE,SAAS,CAAC,KAAK;SACvB,CAAC;IACJ,CAAC,CAAC,IAAI,EAAE,CAAC;IAEX,MAAM,YAAY,GAAG,QAAQ,CAAC,YAAY;QACxC,EAAE,IAAI,EAAE;SACP,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC;QACxB,EAAE,OAAO,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;IAE3C,gBAAgB,CACd,KAAC,iBAAiB,IAChB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,QAAQ,CAAC,cAAc,EACvC,QAAQ,EAAE,UAAU,GACpB,EACF,UAAU,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { JsonView, defaultStyles } from "react-json-view-lite";
|
|
4
|
+
export function AiToolCall({ toolCall }) {
|
|
5
|
+
const [expanded, setExpaded] = useState(false);
|
|
6
|
+
return (_jsxs("div", { className: "mt-2", children: [_jsxs("div", { onClick: () => setExpaded(!expanded), className: "flex items-center cursor-pointer", children: [_jsx("i", { className: "pi pi-angle-right" }), " ", toolCall.func] }), expanded && (_jsxs("div", { className: "ml-4", children: [_jsx("div", { className: "italic", children: "Args:" }), _jsx("div", { children: renderJsonOrText(toolCall.arguments) }), _jsx("div", { className: "italic mt-1", children: "Result:" }), _jsxs("div", { className: "mb-4", children: [toolCall.error && (_jsx("div", { className: "text-red", children: toolCall.error })), renderJsonOrText(toolCall.result)] })] }))] }));
|
|
7
|
+
}
|
|
8
|
+
function renderJsonOrText(json) {
|
|
9
|
+
try {
|
|
10
|
+
return _jsx(JsonView, { data: JSON.parse(json), style: defaultStyles });
|
|
11
|
+
}
|
|
12
|
+
catch (e) {
|
|
13
|
+
return _jsx("div", { children: json });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=AiToolCall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiToolCall.js","sourceRoot":"","sources":["../../../src/editor/ai/AiToolCall.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAS/D,MAAM,UAAU,UAAU,CAAC,EAAE,QAAQ,EAA0B;IAC7D,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE/C,OAAO,CACL,eAAK,SAAS,EAAC,MAAM,aACnB,eACE,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,EACpC,SAAS,EAAC,kCAAkC,aAE5C,YAAG,SAAS,EAAC,mBAAmB,GAAG,OAAE,QAAQ,CAAC,IAAI,IAC9C,EACL,QAAQ,IAAI,CACX,eAAK,SAAS,EAAC,MAAM,aACnB,cAAK,SAAS,EAAC,QAAQ,sBAAY,EACnC,wBAAM,gBAAgB,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAO,EACjD,cAAK,SAAS,EAAC,aAAa,wBAAc,EAC1C,eAAK,SAAS,EAAC,MAAM,aAClB,QAAQ,CAAC,KAAK,IAAI,CACjB,cAAK,SAAS,EAAC,UAAU,YAAE,QAAQ,CAAC,KAAK,GAAO,CACjD,EACA,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,IAC9B,IACF,CACP,IACG,CACP,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAY;IACpC,IAAI,CAAC;QACH,OAAO,KAAC,QAAQ,IAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,aAAa,GAAI,CAAC;IACpE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,wBAAM,IAAI,GAAO,CAAC;IAC3B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { AiTerminal } from "./AiTerminal";
|
|
3
|
+
import { createEditorAiContext } from "./editorAiContext";
|
|
4
|
+
export function EditorAiTerminal({ closeButton, options, }) {
|
|
5
|
+
return (_jsx(AiTerminal, { options: options, closeButton: closeButton, createAiContext: createEditorAiContext, defaultProfile: "Editor" }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=EditorAiTerminal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorAiTerminal.js","sourceRoot":"","sources":["../../../src/editor/ai/EditorAiTerminal.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,UAAU,gBAAgB,CAAC,EAC/B,WAAW,EACX,OAAO,GAIR;IACC,OAAO,CACL,KAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,qBAAqB,EACtC,cAAc,EAAC,QAAQ,GACvB,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EditContextType } from "../client/editContext";
|
|
2
|
+
export declare function createEditorAiContext({ editContext, }: {
|
|
3
|
+
editContext: EditContextType;
|
|
4
|
+
}): {
|
|
5
|
+
endpoint: string;
|
|
6
|
+
promptData: {
|
|
7
|
+
itemid: string | undefined;
|
|
8
|
+
language: string | undefined;
|
|
9
|
+
version: number | undefined;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function createEditorAiContext({ editContext, }) {
|
|
2
|
+
const aiPromptUrl = editContext.configuration.services.aiService.promptUrl;
|
|
3
|
+
return {
|
|
4
|
+
endpoint: aiPromptUrl,
|
|
5
|
+
promptData: {
|
|
6
|
+
itemid: editContext.currentItemDescriptor?.id,
|
|
7
|
+
language: editContext.currentItemDescriptor?.language,
|
|
8
|
+
version: editContext.currentItemDescriptor?.version,
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=editorAiContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editorAiContext.js","sourceRoot":"","sources":["../../../src/editor/ai/editorAiContext.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CAAC,EACpC,WAAW,GAGZ;IACC,MAAM,WAAW,GAAG,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC;IAE3E,OAAO;QACL,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE;YACV,MAAM,EAAE,WAAW,CAAC,qBAAqB,EAAE,EAAE;YAC7C,QAAQ,EAAE,WAAW,CAAC,qBAAqB,EAAE,QAAQ;YACrD,OAAO,EAAE,WAAW,CAAC,qBAAqB,EAAE,OAAO;SACpD;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
export type DialogProps<T> = {
|
|
3
|
+
onClose: (result: T | null) => void;
|
|
4
|
+
};
|
|
5
|
+
export type OpenDialog = <T, P>(Component: React.ComponentType<P & DialogProps<T>>, props: P) => Promise<T | null>;
|
|
6
|
+
export interface DialogContextValue {
|
|
7
|
+
openDialog: OpenDialog;
|
|
8
|
+
}
|
|
9
|
+
export declare const DialogProvider: React.FC<{
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const useDialog: () => DialogContextValue;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// DialogContext.tsx
|
|
3
|
+
import { createContext, useContext, useState } from "react";
|
|
4
|
+
const DialogContext = createContext(undefined);
|
|
5
|
+
export const DialogProvider = ({ children, }) => {
|
|
6
|
+
const [dialog, setDialog] = useState(null);
|
|
7
|
+
const openDialog = (Component, props) => {
|
|
8
|
+
return new Promise((resolve) => {
|
|
9
|
+
const handleClose = (result) => {
|
|
10
|
+
setDialog(null);
|
|
11
|
+
resolve(result);
|
|
12
|
+
};
|
|
13
|
+
setDialog(_jsx(Component, { ...props, onClose: handleClose }));
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
return (_jsxs(DialogContext.Provider, { value: { openDialog }, children: [children, dialog] }));
|
|
17
|
+
};
|
|
18
|
+
export const useDialog = () => {
|
|
19
|
+
const context = useContext(DialogContext);
|
|
20
|
+
if (!context) {
|
|
21
|
+
throw new Error("useDialog must be used within a DialogProvider");
|
|
22
|
+
}
|
|
23
|
+
return context;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=DialogContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogContext.js","sourceRoot":"","sources":["../../../src/editor/client/DialogContext.tsx"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AAe9E,MAAM,aAAa,GAAG,aAAa,CAAiC,SAAS,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,cAAc,GAAsC,CAAC,EAChE,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAY,IAAI,CAAC,CAAC;IAEtD,MAAM,UAAU,GAAe,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE;QAClD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,MAAM,WAAW,GAAG,CAAC,MAAW,EAAE,EAAE;gBAClC,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChB,OAAO,CAAC,MAAM,CAAC,CAAC;YAClB,CAAC,CAAC;YAEF,SAAS,CAAC,KAAC,SAAS,OAAM,KAAa,EAAE,OAAO,EAAE,WAAW,GAAI,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,UAAU,EAAE,aAC1C,QAAQ,EACR,MAAM,IACgB,CAC1B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAuB,EAAE;IAChD,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EditorConfiguration } from "../../config/types";
|
|
2
|
+
import "primeicons/primeicons.css";
|
|
3
|
+
import "primereact/resources/themes/md-light-indigo/theme.css";
|
|
4
|
+
import "react-json-view-lite/dist/index.css";
|
|
5
|
+
import { FieldDescriptor } from "../../types";
|
|
6
|
+
import { FieldButton, ItemDescriptor } from "../pageModel";
|
|
7
|
+
export type FieldAction = {
|
|
8
|
+
field: FieldDescriptor;
|
|
9
|
+
actionButton: FieldButton;
|
|
10
|
+
message?: string;
|
|
11
|
+
state: "running" | "success" | "error";
|
|
12
|
+
};
|
|
13
|
+
export type WindowSize = {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
};
|
|
17
|
+
export type InsertingState = {
|
|
18
|
+
positionElement: Element;
|
|
19
|
+
positionAnchor: "left" | "right" | "top" | "bottom";
|
|
20
|
+
};
|
|
21
|
+
export declare function EditorClient({ configuration, className, item: loadItemDescriptor, sessionId, }: {
|
|
22
|
+
configuration: EditorConfiguration;
|
|
23
|
+
className?: string;
|
|
24
|
+
item?: ItemDescriptor;
|
|
25
|
+
sessionId: string;
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|