@parhelia/core 0.1.10745
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +8 -0
- package/README.md +34 -0
- package/dev.css +3 -0
- package/dist/agents-view/AgentCard.d.ts +12 -0
- package/dist/agents-view/AgentCard.js +30 -0
- package/dist/agents-view/AgentCard.js.map +1 -0
- package/dist/agents-view/AgentsView.d.ts +5 -0
- package/dist/agents-view/AgentsView.js +255 -0
- package/dist/agents-view/AgentsView.js.map +1 -0
- package/dist/agents-view/ProfileAgentsGroup.d.ts +17 -0
- package/dist/agents-view/ProfileAgentsGroup.js +13 -0
- package/dist/agents-view/ProfileAgentsGroup.js.map +1 -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 +17 -0
- package/dist/client-components/index.js +18 -0
- package/dist/client-components/index.js.map +1 -0
- package/dist/components/ActionButton.d.ts +14 -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/FilterInput.d.ts +22 -0
- package/dist/components/FilterInput.js +29 -0
- package/dist/components/FilterInput.js.map +1 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.js +5 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/ui/CardConnector.d.ts +4 -0
- package/dist/components/ui/CardConnector.js +6 -0
- package/dist/components/ui/CardConnector.js.map +1 -0
- package/dist/components/ui/LanguageSelector.d.ts +8 -0
- package/dist/components/ui/LanguageSelector.js +47 -0
- package/dist/components/ui/LanguageSelector.js.map +1 -0
- package/dist/components/ui/PlaceholderInput.d.ts +41 -0
- package/dist/components/ui/PlaceholderInput.js +160 -0
- package/dist/components/ui/PlaceholderInput.js.map +1 -0
- package/dist/components/ui/PlaceholderInputTypes.d.ts +41 -0
- package/dist/components/ui/PlaceholderInputTypes.js +48 -0
- package/dist/components/ui/PlaceholderInputTypes.js.map +1 -0
- package/dist/components/ui/PlaceholderItemSelector.d.ts +7 -0
- package/dist/components/ui/PlaceholderItemSelector.js +154 -0
- package/dist/components/ui/PlaceholderItemSelector.js.map +1 -0
- package/dist/components/ui/alert.d.ts +7 -0
- package/dist/components/ui/alert.js +21 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.js +23 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/button.js +33 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +7 -0
- package/dist/components/ui/calendar.js +58 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +19 -0
- package/dist/components/ui/card.js +78 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.js +10 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/command.js +35 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +53 -0
- package/dist/components/ui/context-menu.js +290 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/copy-button.d.ts +10 -0
- package/dist/components/ui/copy-button.js +61 -0
- package/dist/components/ui/copy-button.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +16 -0
- package/dist/components/ui/dialog.js +37 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/dropdown-menu.js +52 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +9 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +26 -0
- package/dist/components/ui/menubar.js +55 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/paste-button.d.ts +14 -0
- package/dist/components/ui/paste-button.js +114 -0
- package/dist/components/ui/paste-button.js.map +1 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.js +66 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +7 -0
- package/dist/components/ui/progress.js +9 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/select.d.ts +18 -0
- package/dist/components/ui/select.js +34 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +3 -0
- package/dist/components/ui/sonner.js +16 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/switch.js +9 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +17 -0
- package/dist/components/ui/tabs.js +27 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.js +11 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +9 -0
- package/dist/components/ui/tooltip.js +18 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/upload-button.d.ts +15 -0
- package/dist/components/ui/upload-button.js +56 -0
- package/dist/components/ui/upload-button.js.map +1 -0
- package/dist/config/config.d.ts +24 -0
- package/dist/config/config.js +1087 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/types.d.ts +249 -0
- package/dist/config/types.js +2 -0
- package/dist/config/types.js.map +1 -0
- package/dist/editor/AspectRatioSelector.d.ts +13 -0
- package/dist/editor/AspectRatioSelector.js +71 -0
- package/dist/editor/AspectRatioSelector.js.map +1 -0
- package/dist/editor/ComponentInfo.d.ts +4 -0
- package/dist/editor/ComponentInfo.js +41 -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 +39 -0
- package/dist/editor/ContentTree.js +586 -0
- package/dist/editor/ContentTree.js.map +1 -0
- package/dist/editor/ContextMenu.d.ts +15 -0
- package/dist/editor/ContextMenu.js +239 -0
- package/dist/editor/ContextMenu.js.map +1 -0
- package/dist/editor/Editor.d.ts +12 -0
- package/dist/editor/Editor.js +59 -0
- package/dist/editor/Editor.js.map +1 -0
- package/dist/editor/EditorWarning.d.ts +5 -0
- package/dist/editor/EditorWarning.js +12 -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/FieldActionsOverlay.d.ts +18 -0
- package/dist/editor/FieldActionsOverlay.js +201 -0
- package/dist/editor/FieldActionsOverlay.js.map +1 -0
- package/dist/editor/FieldEditorPopup.d.ts +10 -0
- package/dist/editor/FieldEditorPopup.js +23 -0
- package/dist/editor/FieldEditorPopup.js.map +1 -0
- package/dist/editor/FieldHistory.d.ts +7 -0
- package/dist/editor/FieldHistory.js +42 -0
- package/dist/editor/FieldHistory.js.map +1 -0
- package/dist/editor/FieldList.d.ts +19 -0
- package/dist/editor/FieldList.js +90 -0
- package/dist/editor/FieldList.js.map +1 -0
- package/dist/editor/FieldListField.d.ts +16 -0
- package/dist/editor/FieldListField.js +231 -0
- package/dist/editor/FieldListField.js.map +1 -0
- package/dist/editor/FieldListFieldWithFallbacks.d.ts +11 -0
- package/dist/editor/FieldListFieldWithFallbacks.js +120 -0
- package/dist/editor/FieldListFieldWithFallbacks.js.map +1 -0
- package/dist/editor/FloatingToolbar.d.ts +7 -0
- package/dist/editor/FloatingToolbar.js +91 -0
- package/dist/editor/FloatingToolbar.js.map +1 -0
- package/dist/editor/ImageEditButton.d.ts +27 -0
- package/dist/editor/ImageEditButton.js +22 -0
- package/dist/editor/ImageEditButton.js.map +1 -0
- package/dist/editor/ImageEditor.d.ts +5 -0
- package/dist/editor/ImageEditor.js +76 -0
- package/dist/editor/ImageEditor.js.map +1 -0
- package/dist/editor/ItemInfo.d.ts +4 -0
- package/dist/editor/ItemInfo.js +36 -0
- package/dist/editor/ItemInfo.js.map +1 -0
- package/dist/editor/LinkEditorDialog.d.ts +18 -0
- package/dist/editor/LinkEditorDialog.js +101 -0
- package/dist/editor/LinkEditorDialog.js.map +1 -0
- package/dist/editor/MainLayout.d.ts +12 -0
- package/dist/editor/MainLayout.js +55 -0
- package/dist/editor/MainLayout.js.map +1 -0
- package/dist/editor/MobileLayout.d.ts +2 -0
- package/dist/editor/MobileLayout.js +34 -0
- package/dist/editor/MobileLayout.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 +722 -0
- package/dist/editor/PictureCropper.js.map +1 -0
- package/dist/editor/PictureEditor.d.ts +9 -0
- package/dist/editor/PictureEditor.js +180 -0
- package/dist/editor/PictureEditor.js.map +1 -0
- package/dist/editor/PictureEditorDialog.d.ts +8 -0
- package/dist/editor/PictureEditorDialog.js +195 -0
- package/dist/editor/PictureEditorDialog.js.map +1 -0
- package/dist/editor/QuickItemSwitcher.d.ts +9 -0
- package/dist/editor/QuickItemSwitcher.js +78 -0
- package/dist/editor/QuickItemSwitcher.js.map +1 -0
- package/dist/editor/ScrollingContentTree.d.ts +10 -0
- package/dist/editor/ScrollingContentTree.js +54 -0
- package/dist/editor/ScrollingContentTree.js.map +1 -0
- package/dist/editor/Titlebar.d.ts +1 -0
- package/dist/editor/Titlebar.js +46 -0
- package/dist/editor/Titlebar.js.map +1 -0
- package/dist/editor/ai/AgentCostDisplay.d.ts +32 -0
- package/dist/editor/ai/AgentCostDisplay.js +93 -0
- package/dist/editor/ai/AgentCostDisplay.js.map +1 -0
- package/dist/editor/ai/AgentHistory.d.ts +11 -0
- package/dist/editor/ai/AgentHistory.js +12 -0
- package/dist/editor/ai/AgentHistory.js.map +1 -0
- package/dist/editor/ai/AgentProfilesOverview.d.ts +9 -0
- package/dist/editor/ai/AgentProfilesOverview.js +16 -0
- package/dist/editor/ai/AgentProfilesOverview.js.map +1 -0
- package/dist/editor/ai/AgentStatusBadge.d.ts +26 -0
- package/dist/editor/ai/AgentStatusBadge.js +126 -0
- package/dist/editor/ai/AgentStatusBadge.js.map +1 -0
- package/dist/editor/ai/AgentTerminal.d.ts +14 -0
- package/dist/editor/ai/AgentTerminal.js +2634 -0
- package/dist/editor/ai/AgentTerminal.js.map +1 -0
- package/dist/editor/ai/Agents.d.ts +4 -0
- package/dist/editor/ai/Agents.js +813 -0
- package/dist/editor/ai/Agents.js.map +1 -0
- package/dist/editor/ai/AiResponseMessage.d.ts +18 -0
- package/dist/editor/ai/AiResponseMessage.js +684 -0
- package/dist/editor/ai/AiResponseMessage.js.map +1 -0
- package/dist/editor/ai/ContextInfoBar.d.ts +11 -0
- package/dist/editor/ai/ContextInfoBar.js +355 -0
- package/dist/editor/ai/ContextInfoBar.js.map +1 -0
- package/dist/editor/ai/DancingDots.d.ts +1 -0
- package/dist/editor/ai/DancingDots.js +6 -0
- package/dist/editor/ai/DancingDots.js.map +1 -0
- package/dist/editor/ai/MediaImage.d.ts +6 -0
- package/dist/editor/ai/MediaImage.js +38 -0
- package/dist/editor/ai/MediaImage.js.map +1 -0
- package/dist/editor/ai/ToolCallDisplay.d.ts +45 -0
- package/dist/editor/ai/ToolCallDisplay.js +292 -0
- package/dist/editor/ai/ToolCallDisplay.js.map +1 -0
- package/dist/editor/ai/aiPageModel.d.ts +24 -0
- package/dist/editor/ai/aiPageModel.js +97 -0
- package/dist/editor/ai/aiPageModel.js.map +1 -0
- package/dist/editor/ai/editorAiContext.d.ts +10 -0
- package/dist/editor/ai/editorAiContext.js +10 -0
- package/dist/editor/ai/editorAiContext.js.map +1 -0
- package/dist/editor/ai/types.d.ts +30 -0
- package/dist/editor/ai/types.js +2 -0
- package/dist/editor/ai/types.js.map +1 -0
- package/dist/editor/ai/useAgentStatus.d.ts +14 -0
- package/dist/editor/ai/useAgentStatus.js +203 -0
- package/dist/editor/ai/useAgentStatus.js.map +1 -0
- package/dist/editor/client/AboutDialog.d.ts +2 -0
- package/dist/editor/client/AboutDialog.js +23 -0
- package/dist/editor/client/AboutDialog.js.map +1 -0
- package/dist/editor/client/EditorShell.d.ts +37 -0
- package/dist/editor/client/EditorShell.js +2388 -0
- package/dist/editor/client/EditorShell.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 +260 -0
- package/dist/editor/client/editContext.js +29 -0
- package/dist/editor/client/editContext.js.map +1 -0
- package/dist/editor/client/fieldModificationStore.d.ts +25 -0
- package/dist/editor/client/fieldModificationStore.js +184 -0
- package/dist/editor/client/fieldModificationStore.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/hooks/useEditorUrlSync.d.ts +18 -0
- package/dist/editor/client/hooks/useEditorUrlSync.js +56 -0
- package/dist/editor/client/hooks/useEditorUrlSync.js.map +1 -0
- package/dist/editor/client/hooks/useEditorWebSocket.d.ts +11 -0
- package/dist/editor/client/hooks/useEditorWebSocket.js +86 -0
- package/dist/editor/client/hooks/useEditorWebSocket.js.map +1 -0
- package/dist/editor/client/hooks/useGlobalEditorKeyDown.d.ts +1 -0
- package/dist/editor/client/hooks/useGlobalEditorKeyDown.js +12 -0
- package/dist/editor/client/hooks/useGlobalEditorKeyDown.js.map +1 -0
- package/dist/editor/client/hooks/useMediaQuery.d.ts +1 -0
- package/dist/editor/client/hooks/useMediaQuery.js +19 -0
- package/dist/editor/client/hooks/useMediaQuery.js.map +1 -0
- package/dist/editor/client/hooks/useMediaSelector.d.ts +12 -0
- package/dist/editor/client/hooks/useMediaSelector.js +30 -0
- package/dist/editor/client/hooks/useMediaSelector.js.map +1 -0
- package/dist/editor/client/hooks/useQuota.d.ts +29 -0
- package/dist/editor/client/hooks/useQuota.js +53 -0
- package/dist/editor/client/hooks/useQuota.js.map +1 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.d.ts +35 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js +234 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -0
- package/dist/editor/client/hooks/useWorkbox.d.ts +9 -0
- package/dist/editor/client/hooks/useWorkbox.js +52 -0
- package/dist/editor/client/hooks/useWorkbox.js.map +1 -0
- package/dist/editor/client/itemsRepository.d.ts +38 -0
- package/dist/editor/client/itemsRepository.js +468 -0
- package/dist/editor/client/itemsRepository.js.map +1 -0
- package/dist/editor/client/operations.d.ts +69 -0
- package/dist/editor/client/operations.js +627 -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 +155 -0
- package/dist/editor/client/pageModelBuilder.js.map +1 -0
- package/dist/editor/client/ui/EditorChrome.d.ts +12 -0
- package/dist/editor/client/ui/EditorChrome.js +30 -0
- package/dist/editor/client/ui/EditorChrome.js.map +1 -0
- package/dist/editor/client/ui/FullscreenControls.d.ts +7 -0
- package/dist/editor/client/ui/FullscreenControls.js +21 -0
- package/dist/editor/client/ui/FullscreenControls.js.map +1 -0
- package/dist/editor/commands/agentCommands.d.ts +9 -0
- package/dist/editor/commands/agentCommands.js +30 -0
- package/dist/editor/commands/agentCommands.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 +12 -0
- package/dist/editor/commands/componentCommands.js +378 -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 +29 -0
- package/dist/editor/commands/itemCommands.js +428 -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 +91 -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/componentTreeHelper.d.ts +18 -0
- package/dist/editor/componentTreeHelper.js +123 -0
- package/dist/editor/componentTreeHelper.js.map +1 -0
- package/dist/editor/context-menu/CopyMoveMenu.d.ts +7 -0
- package/dist/editor/context-menu/CopyMoveMenu.js +58 -0
- package/dist/editor/context-menu/CopyMoveMenu.js.map +1 -0
- package/dist/editor/context-menu/InsertMenu.d.ts +9 -0
- package/dist/editor/context-menu/InsertMenu.js +229 -0
- package/dist/editor/context-menu/InsertMenu.js.map +1 -0
- package/dist/editor/control-center/About.d.ts +1 -0
- package/dist/editor/control-center/About.js +8 -0
- package/dist/editor/control-center/About.js.map +1 -0
- package/dist/editor/control-center/AllAgentsPanel.d.ts +5 -0
- package/dist/editor/control-center/AllAgentsPanel.js +126 -0
- package/dist/editor/control-center/AllAgentsPanel.js.map +1 -0
- package/dist/editor/control-center/ControlCenterMenu.d.ts +1 -0
- package/dist/editor/control-center/ControlCenterMenu.js +66 -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 +323 -0
- package/dist/editor/control-center/IndexOverview.js.map +1 -0
- package/dist/editor/control-center/Info.d.ts +1 -0
- package/dist/editor/control-center/Info.js +10 -0
- package/dist/editor/control-center/Info.js.map +1 -0
- package/dist/editor/control-center/LatestFeedback.d.ts +1 -0
- package/dist/editor/control-center/LatestFeedback.js +136 -0
- package/dist/editor/control-center/LatestFeedback.js.map +1 -0
- package/dist/editor/control-center/QuotaInfo.d.ts +1 -0
- package/dist/editor/control-center/QuotaInfo.js +102 -0
- package/dist/editor/control-center/QuotaInfo.js.map +1 -0
- package/dist/editor/control-center/Setup.d.ts +1 -0
- package/dist/editor/control-center/Setup.js +18 -0
- package/dist/editor/control-center/Setup.js.map +1 -0
- package/dist/editor/control-center/Status.d.ts +1 -0
- package/dist/editor/control-center/Status.js +79 -0
- package/dist/editor/control-center/Status.js.map +1 -0
- package/dist/editor/control-center/WebSocketMessages.d.ts +1 -0
- package/dist/editor/control-center/WebSocketMessages.js +71 -0
- package/dist/editor/control-center/WebSocketMessages.js.map +1 -0
- package/dist/editor/control-center/parhelia-setup/Overview.d.ts +1 -0
- package/dist/editor/control-center/parhelia-setup/Overview.js +91 -0
- package/dist/editor/control-center/parhelia-setup/Overview.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/EmbeddingsModelSection.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/EmbeddingsModelSection.js +195 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/EmbeddingsModelSection.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/index.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/index.js +22 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/index.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/provider/ProviderSection.d.ts +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/provider/ProviderSection.js +233 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/provider/ProviderSection.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersList.d.ts +15 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersList.js +14 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersList.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.d.ts +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.js +94 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/tools/GenerateToolsSection.d.ts +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/tools/GenerateToolsSection.js +367 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/tools/GenerateToolsSection.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/types.d.ts +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/types.js +2 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/types.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/utils.d.ts +4 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/utils.js +25 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/utils.js.map +1 -0
- package/dist/editor/control-center/setup-steps/DbSetupStep.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/DbSetupStep.js +46 -0
- package/dist/editor/control-center/setup-steps/DbSetupStep.js.map +1 -0
- package/dist/editor/control-center/setup-steps/IndexSetupStep.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/IndexSetupStep.js +36 -0
- package/dist/editor/control-center/setup-steps/IndexSetupStep.js.map +1 -0
- package/dist/editor/control-center/setup-steps/SettingsSetupStep.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/SettingsSetupStep.js +107 -0
- package/dist/editor/control-center/setup-steps/SettingsSetupStep.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 +14 -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 +28 -0
- package/dist/editor/editor-warnings/ValidationErrors.js.map +1 -0
- package/dist/editor/field-types/AttachmentEditor.d.ts +9 -0
- package/dist/editor/field-types/AttachmentEditor.js +73 -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/DateFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/DateFieldEditor.js +93 -0
- package/dist/editor/field-types/DateFieldEditor.js.map +1 -0
- package/dist/editor/field-types/DateTimeFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/DateTimeFieldEditor.js +151 -0
- package/dist/editor/field-types/DateTimeFieldEditor.js.map +1 -0
- package/dist/editor/field-types/DropLinkEditor.d.ts +5 -0
- package/dist/editor/field-types/DropLinkEditor.js +42 -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 +46 -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 +120 -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 +62 -0
- package/dist/editor/field-types/LinkFieldEditor.js.map +1 -0
- package/dist/editor/field-types/MultiLineText.d.ts +7 -0
- package/dist/editor/field-types/MultiLineText.js +48 -0
- package/dist/editor/field-types/MultiLineText.js.map +1 -0
- package/dist/editor/field-types/NameValueListEditor.d.ts +7 -0
- package/dist/editor/field-types/NameValueListEditor.js +101 -0
- package/dist/editor/field-types/NameValueListEditor.js.map +1 -0
- package/dist/editor/field-types/PictureFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/PictureFieldEditor.js +58 -0
- package/dist/editor/field-types/PictureFieldEditor.js.map +1 -0
- package/dist/editor/field-types/RawEditor.d.ts +6 -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 +7 -0
- package/dist/editor/field-types/RichTextEditor.js +21 -0
- package/dist/editor/field-types/RichTextEditor.js.map +1 -0
- package/dist/editor/field-types/RichTextEditorComponent.d.ts +8 -0
- package/dist/editor/field-types/RichTextEditorComponent.js +74 -0
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -0
- package/dist/editor/field-types/SingleLineText.d.ts +7 -0
- package/dist/editor/field-types/SingleLineText.js +113 -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 +316 -0
- package/dist/editor/field-types/TreeListEditor.js.map +1 -0
- package/dist/editor/field-types/richtext/components/EditorDropdown.d.ts +11 -0
- package/dist/editor/field-types/richtext/components/EditorDropdown.js +83 -0
- package/dist/editor/field-types/richtext/components/EditorDropdown.js.map +1 -0
- package/dist/editor/field-types/richtext/components/ReactSlate.d.ts +5 -0
- package/dist/editor/field-types/richtext/components/ReactSlate.js +607 -0
- package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleDropdown.d.ts +18 -0
- package/dist/editor/field-types/richtext/components/SimpleDropdown.js +71 -0
- package/dist/editor/field-types/richtext/components/SimpleDropdown.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.d.ts +5 -0
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js +359 -0
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbar.d.ts +16 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbar.js +181 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbar.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbarButton.d.ts +9 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbarButton.js +14 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbarButton.js.map +1 -0
- package/dist/editor/field-types/richtext/components/ToolbarButton.d.ts +3 -0
- package/dist/editor/field-types/richtext/components/ToolbarButton.js +6 -0
- package/dist/editor/field-types/richtext/components/ToolbarButton.js.map +1 -0
- package/dist/editor/field-types/richtext/config/pluginFactory.d.ts +19 -0
- package/dist/editor/field-types/richtext/config/pluginFactory.js +17 -0
- package/dist/editor/field-types/richtext/config/pluginFactory.js.map +1 -0
- package/dist/editor/field-types/richtext/contextMenuFactory.d.ts +4 -0
- package/dist/editor/field-types/richtext/contextMenuFactory.js +201 -0
- package/dist/editor/field-types/richtext/contextMenuFactory.js.map +1 -0
- package/dist/editor/field-types/richtext/hooks/useProfileCache.d.ts +68 -0
- package/dist/editor/field-types/richtext/hooks/useProfileCache.js +214 -0
- package/dist/editor/field-types/richtext/hooks/useProfileCache.js.map +1 -0
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.d.ts +25 -0
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js +64 -0
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js.map +1 -0
- package/dist/editor/field-types/richtext/index.d.ts +6 -0
- package/dist/editor/field-types/richtext/index.js +7 -0
- package/dist/editor/field-types/richtext/index.js.map +1 -0
- package/dist/editor/field-types/richtext/types.d.ts +288 -0
- package/dist/editor/field-types/richtext/types.js +107 -0
- package/dist/editor/field-types/richtext/types.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/conversion.d.ts +7 -0
- package/dist/editor/field-types/richtext/utils/conversion.js +762 -0
- package/dist/editor/field-types/richtext/utils/conversion.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/plugins.d.ts +170 -0
- package/dist/editor/field-types/richtext/utils/plugins.js +490 -0
- package/dist/editor/field-types/richtext/utils/plugins.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/profileMapper.d.ts +38 -0
- package/dist/editor/field-types/richtext/utils/profileMapper.js +386 -0
- package/dist/editor/field-types/richtext/utils/profileMapper.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/profileServiceCache.d.ts +37 -0
- package/dist/editor/field-types/richtext/utils/profileServiceCache.js +119 -0
- package/dist/editor/field-types/richtext/utils/profileServiceCache.js.map +1 -0
- package/dist/editor/fieldTypes.d.ts +129 -0
- package/dist/editor/fieldTypes.js +2 -0
- package/dist/editor/fieldTypes.js.map +1 -0
- package/dist/editor/hooks/useEditorSettings.d.ts +17 -0
- package/dist/editor/hooks/useEditorSettings.js +61 -0
- package/dist/editor/hooks/useEditorSettings.js.map +1 -0
- package/dist/editor/media-selector/AiImageSearch.d.ts +4 -0
- package/dist/editor/media-selector/AiImageSearch.js +164 -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 +57 -0
- package/dist/editor/media-selector/AiImageSearchPrompt.js.map +1 -0
- package/dist/editor/media-selector/MediaFolderBrowser.d.ts +5 -0
- package/dist/editor/media-selector/MediaFolderBrowser.js +182 -0
- package/dist/editor/media-selector/MediaFolderBrowser.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 +19 -0
- package/dist/editor/media-selector/Preview.js.map +1 -0
- package/dist/editor/media-selector/Thumbnails.d.ts +8 -0
- package/dist/editor/media-selector/Thumbnails.js +10 -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 +183 -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 +81 -0
- package/dist/editor/media-selector/UploadZone.js.map +1 -0
- package/dist/editor/media-selector/index.d.ts +8 -0
- package/dist/editor/media-selector/index.js +9 -0
- package/dist/editor/media-selector/index.js.map +1 -0
- package/dist/editor/menubar/ActiveUsers.d.ts +1 -0
- package/dist/editor/menubar/ActiveUsers.js +120 -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 +13 -0
- package/dist/editor/menubar/ApproveAndPublish.js.map +1 -0
- package/dist/editor/menubar/FavoritesControls.d.ts +8 -0
- package/dist/editor/menubar/FavoritesControls.js +124 -0
- package/dist/editor/menubar/FavoritesControls.js.map +1 -0
- package/dist/editor/menubar/GenericToolbar.d.ts +11 -0
- package/dist/editor/menubar/GenericToolbar.js +10 -0
- package/dist/editor/menubar/GenericToolbar.js.map +1 -0
- package/dist/editor/menubar/ItemActionsMenu.d.ts +3 -0
- package/dist/editor/menubar/ItemActionsMenu.js +23 -0
- package/dist/editor/menubar/ItemActionsMenu.js.map +1 -0
- package/dist/editor/menubar/ItemLanguageVersion.d.ts +1 -0
- package/dist/editor/menubar/ItemLanguageVersion.js +54 -0
- package/dist/editor/menubar/ItemLanguageVersion.js.map +1 -0
- package/dist/editor/menubar/ItemToolbar.d.ts +1 -0
- package/dist/editor/menubar/ItemToolbar.js +11 -0
- package/dist/editor/menubar/ItemToolbar.js.map +1 -0
- package/dist/editor/menubar/NavButtons.d.ts +1 -0
- package/dist/editor/menubar/NavButtons.js +40 -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 +149 -0
- package/dist/editor/menubar/PageSelector.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/ToolbarFactory.d.ts +2 -0
- package/dist/editor/menubar/ToolbarFactory.js +55 -0
- package/dist/editor/menubar/ToolbarFactory.js.map +1 -0
- package/dist/editor/menubar/User.d.ts +4 -0
- package/dist/editor/menubar/User.js +18 -0
- package/dist/editor/menubar/User.js.map +1 -0
- package/dist/editor/menubar/VersionSelector.d.ts +10 -0
- package/dist/editor/menubar/VersionSelector.js +53 -0
- package/dist/editor/menubar/VersionSelector.js.map +1 -0
- package/dist/editor/menubar/WorkflowButton.d.ts +1 -0
- package/dist/editor/menubar/WorkflowButton.js +93 -0
- package/dist/editor/menubar/WorkflowButton.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/CompareControls.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/CompareControls.js +11 -0
- package/dist/editor/menubar/toolbar-sections/CompareControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/EditControls.d.ts +7 -0
- package/dist/editor/menubar/toolbar-sections/EditControls.js +15 -0
- package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/InsertControls.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/InsertControls.js +15 -0
- package/dist/editor/menubar/toolbar-sections/InsertControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.js +41 -0
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/UtilityControls.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +17 -0
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/ViewportControls.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js +21 -0
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/index.d.ts +6 -0
- package/dist/editor/menubar/toolbar-sections/index.js +7 -0
- package/dist/editor/menubar/toolbar-sections/index.js.map +1 -0
- package/dist/editor/page-editor-chrome/CommentHighlighting.d.ts +6 -0
- package/dist/editor/page-editor-chrome/CommentHighlighting.js +270 -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 +35 -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 +26 -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 +14 -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 +346 -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 +704 -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 +64 -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 +152 -0
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js.map +1 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.d.ts +18 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +122 -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 +289 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js.map +1 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlighting.d.ts +6 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlighting.js +224 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlighting.js.map +1 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.d.ts +4 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js +16 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js.map +1 -0
- package/dist/editor/page-editor-chrome/useInlineAICompletion.d.ts +7 -0
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js +699 -0
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js.map +1 -0
- package/dist/editor/page-viewer/DeviceToolbar.d.ts +6 -0
- package/dist/editor/page-viewer/DeviceToolbar.js +21 -0
- package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -0
- package/dist/editor/page-viewer/EditorForm.d.ts +8 -0
- package/dist/editor/page-viewer/EditorForm.js +257 -0
- package/dist/editor/page-viewer/EditorForm.js.map +1 -0
- package/dist/editor/page-viewer/EditorFormPopup.d.ts +11 -0
- package/dist/editor/page-viewer/EditorFormPopup.js +41 -0
- package/dist/editor/page-viewer/EditorFormPopup.js.map +1 -0
- package/dist/editor/page-viewer/MiniMap.d.ts +9 -0
- package/dist/editor/page-viewer/MiniMap.js +233 -0
- package/dist/editor/page-viewer/MiniMap.js.map +1 -0
- package/dist/editor/page-viewer/PageViewer.d.ts +10 -0
- package/dist/editor/page-viewer/PageViewer.js +67 -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 +857 -0
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -0
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.d.ts +3 -0
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.js +339 -0
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.js.map +1 -0
- package/dist/editor/page-viewer/pageViewContext.d.ts +40 -0
- package/dist/editor/page-viewer/pageViewContext.js +156 -0
- package/dist/editor/page-viewer/pageViewContext.js.map +1 -0
- package/dist/editor/pageModel.d.ts +222 -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 +8 -0
- package/dist/editor/reviews/Comment.js +162 -0
- package/dist/editor/reviews/Comment.js.map +1 -0
- package/dist/editor/reviews/CommentDisplayPopover.d.ts +9 -0
- package/dist/editor/reviews/CommentDisplayPopover.js +104 -0
- package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -0
- package/dist/editor/reviews/CommentEditor.d.ts +20 -0
- package/dist/editor/reviews/CommentEditor.js +57 -0
- package/dist/editor/reviews/CommentEditor.js.map +1 -0
- package/dist/editor/reviews/CommentPopover.d.ts +22 -0
- package/dist/editor/reviews/CommentPopover.js +145 -0
- package/dist/editor/reviews/CommentPopover.js.map +1 -0
- package/dist/editor/reviews/CommentView.d.ts +21 -0
- package/dist/editor/reviews/CommentView.js +52 -0
- package/dist/editor/reviews/CommentView.js.map +1 -0
- package/dist/editor/reviews/Comments.d.ts +3 -0
- package/dist/editor/reviews/Comments.js +118 -0
- package/dist/editor/reviews/Comments.js.map +1 -0
- package/dist/editor/reviews/DiffView.d.ts +17 -0
- package/dist/editor/reviews/DiffView.js +57 -0
- package/dist/editor/reviews/DiffView.js.map +1 -0
- package/dist/editor/reviews/PreviewInfo.d.ts +1 -0
- package/dist/editor/reviews/PreviewInfo.js +12 -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 +186 -0
- package/dist/editor/reviews/Reviews.js.map +1 -0
- package/dist/editor/reviews/SuggestedEdit.d.ts +4 -0
- package/dist/editor/reviews/SuggestedEdit.js +200 -0
- package/dist/editor/reviews/SuggestedEdit.js.map +1 -0
- package/dist/editor/reviews/SuggestionDisplayPopover.d.ts +9 -0
- package/dist/editor/reviews/SuggestionDisplayPopover.js +204 -0
- package/dist/editor/reviews/SuggestionDisplayPopover.js.map +1 -0
- package/dist/editor/reviews/commentAi.d.ts +7 -0
- package/dist/editor/reviews/commentAi.js +100 -0
- package/dist/editor/reviews/commentAi.js.map +1 -0
- package/dist/editor/reviews/reviewCommands.d.ts +3 -0
- package/dist/editor/reviews/reviewCommands.js +38 -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/agentService.d.ts +306 -0
- package/dist/editor/services/agentService.js +627 -0
- package/dist/editor/services/agentService.js.map +1 -0
- package/dist/editor/services/aiService.d.ts +106 -0
- package/dist/editor/services/aiService.js +294 -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 +79 -0
- package/dist/editor/services/contentService.js +119 -0
- package/dist/editor/services/contentService.js.map +1 -0
- package/dist/editor/services/contextService.d.ts +26 -0
- package/dist/editor/services/contextService.js +103 -0
- package/dist/editor/services/contextService.js.map +1 -0
- package/dist/editor/services/editService.d.ts +66 -0
- package/dist/editor/services/editService.js +325 -0
- package/dist/editor/services/editService.js.map +1 -0
- package/dist/editor/services/favouritesService.d.ts +33 -0
- package/dist/editor/services/favouritesService.js +22 -0
- package/dist/editor/services/favouritesService.js.map +1 -0
- package/dist/editor/services/indexService.d.ts +13 -0
- package/dist/editor/services/indexService.js +45 -0
- package/dist/editor/services/indexService.js.map +1 -0
- package/dist/editor/services/reviewsService.d.ts +18 -0
- package/dist/editor/services/reviewsService.js +60 -0
- package/dist/editor/services/reviewsService.js.map +1 -0
- package/dist/editor/services/searchService.d.ts +17 -0
- package/dist/editor/services/searchService.js +25 -0
- package/dist/editor/services/searchService.js.map +1 -0
- package/dist/editor/services/serviceHelper.d.ts +10 -0
- package/dist/editor/services/serviceHelper.js +118 -0
- package/dist/editor/services/serviceHelper.js.map +1 -0
- package/dist/editor/services/setupService.d.ts +21 -0
- package/dist/editor/services/setupService.js +10 -0
- package/dist/editor/services/setupService.js.map +1 -0
- package/dist/editor/services/suggestedEditsService.d.ts +18 -0
- package/dist/editor/services/suggestedEditsService.js +36 -0
- package/dist/editor/services/suggestedEditsService.js.map +1 -0
- package/dist/editor/services/systemService.d.ts +4 -0
- package/dist/editor/services/systemService.js +11 -0
- package/dist/editor/services/systemService.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/Completions.d.ts +1 -0
- package/dist/editor/sidebar/Completions.js +55 -0
- package/dist/editor/sidebar/Completions.js.map +1 -0
- package/dist/editor/sidebar/ComponentPalette.d.ts +1 -0
- package/dist/editor/sidebar/ComponentPalette.js +86 -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 +691 -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 +71 -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/Divider.d.ts +6 -0
- package/dist/editor/sidebar/Divider.js +6 -0
- package/dist/editor/sidebar/Divider.js.map +1 -0
- package/dist/editor/sidebar/EditHistory.d.ts +1 -0
- package/dist/editor/sidebar/EditHistory.js +78 -0
- package/dist/editor/sidebar/EditHistory.js.map +1 -0
- package/dist/editor/sidebar/GraphQL.d.ts +2 -0
- package/dist/editor/sidebar/GraphQL.js +234 -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/LeftToolbar.d.ts +1 -0
- package/dist/editor/sidebar/LeftToolbar.js +16 -0
- package/dist/editor/sidebar/LeftToolbar.js.map +1 -0
- package/dist/editor/sidebar/MainContentTree.d.ts +5 -0
- package/dist/editor/sidebar/MainContentTree.js +70 -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/SEOInfo.d.ts +1 -0
- package/dist/editor/sidebar/SEOInfo.js +158 -0
- package/dist/editor/sidebar/SEOInfo.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 +10 -0
- package/dist/editor/sidebar/SidebarView.js +40 -0
- package/dist/editor/sidebar/SidebarView.js.map +1 -0
- package/dist/editor/sidebar/Validation.d.ts +1 -0
- package/dist/editor/sidebar/Validation.js +51 -0
- package/dist/editor/sidebar/Validation.js.map +1 -0
- package/dist/editor/sidebar/ViewSelector.d.ts +4 -0
- package/dist/editor/sidebar/ViewSelector.js +191 -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 +79 -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/CopyMoveTargetSelectorDialog.d.ts +10 -0
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.js +38 -0
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.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/DragPreview.d.ts +14 -0
- package/dist/editor/ui/DragPreview.js +33 -0
- package/dist/editor/ui/DragPreview.js.map +1 -0
- package/dist/editor/ui/Icons.d.ts +74 -0
- package/dist/editor/ui/Icons.js +106 -0
- package/dist/editor/ui/Icons.js.map +1 -0
- package/dist/editor/ui/ItemList.d.ts +16 -0
- package/dist/editor/ui/ItemList.js +19 -0
- package/dist/editor/ui/ItemList.js.map +1 -0
- package/dist/editor/ui/ItemNameDialogNew.d.ts +10 -0
- package/dist/editor/ui/ItemNameDialogNew.js +68 -0
- package/dist/editor/ui/ItemNameDialogNew.js.map +1 -0
- package/dist/editor/ui/ItemSearch.d.ts +25 -0
- package/dist/editor/ui/ItemSearch.js +92 -0
- package/dist/editor/ui/ItemSearch.js.map +1 -0
- package/dist/editor/ui/PerfectTree.d.ts +78 -0
- package/dist/editor/ui/PerfectTree.js +858 -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 +12 -0
- package/dist/editor/ui/Section.js.map +1 -0
- package/dist/editor/ui/SimpleIconButton.d.ts +14 -0
- package/dist/editor/ui/SimpleIconButton.js +15 -0
- package/dist/editor/ui/SimpleIconButton.js.map +1 -0
- package/dist/editor/ui/SimpleMenu.d.ts +6 -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 +15 -0
- package/dist/editor/ui/SimpleTabs.js +20 -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 +4 -0
- package/dist/editor/ui/Spinner.js +18 -0
- package/dist/editor/ui/Spinner.js.map +1 -0
- package/dist/editor/ui/Splitter.d.ts +22 -0
- package/dist/editor/ui/Splitter.js +443 -0
- package/dist/editor/ui/Splitter.js.map +1 -0
- package/dist/editor/ui/TemplateSelectorDialog.d.ts +8 -0
- package/dist/editor/ui/TemplateSelectorDialog.js +61 -0
- package/dist/editor/ui/TemplateSelectorDialog.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/itemConverters.d.ts +3 -0
- package/dist/editor/utils/itemConverters.js +53 -0
- package/dist/editor/utils/itemConverters.js.map +1 -0
- package/dist/editor/utils/itemutils.d.ts +3 -0
- package/dist/editor/utils/itemutils.js +24 -0
- package/dist/editor/utils/itemutils.js.map +1 -0
- package/dist/editor/utils/jsonCleaner.d.ts +8 -0
- package/dist/editor/utils/jsonCleaner.js +76 -0
- package/dist/editor/utils/jsonCleaner.js.map +1 -0
- package/dist/editor/utils/keyboardNavigation.d.ts +34 -0
- package/dist/editor/utils/keyboardNavigation.js +237 -0
- package/dist/editor/utils/keyboardNavigation.js.map +1 -0
- package/dist/editor/utils/urlUtils.d.ts +9 -0
- package/dist/editor/utils/urlUtils.js +25 -0
- package/dist/editor/utils/urlUtils.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 +65 -0
- package/dist/editor/utils.js +468 -0
- package/dist/editor/utils.js.map +1 -0
- package/dist/editor/views/CompareView.d.ts +1 -0
- package/dist/editor/views/CompareView.js +148 -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 +29 -0
- package/dist/editor/views/ItemEditor.js.map +1 -0
- package/dist/editor/views/MediaFolderEditView.d.ts +4 -0
- package/dist/editor/views/MediaFolderEditView.js +40 -0
- package/dist/editor/views/MediaFolderEditView.js.map +1 -0
- package/dist/editor/views/ParheliaView.d.ts +5 -0
- package/dist/editor/views/ParheliaView.js +136 -0
- package/dist/editor/views/ParheliaView.js.map +1 -0
- package/dist/editor/views/SingleEditView.d.ts +9 -0
- package/dist/editor/views/SingleEditView.js +33 -0
- package/dist/editor/views/SingleEditView.js.map +1 -0
- package/dist/images/bg-shape-black.webp +0 -0
- package/dist/images/wizard-bg.png +0 -0
- package/dist/images/wizard-tour.png +0 -0
- package/dist/images/wizard.png +0 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/safelist.d.ts +1 -0
- package/dist/lib/safelist.js +5 -0
- package/dist/lib/safelist.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/revision.d.ts +2 -0
- package/dist/revision.js +3 -0
- package/dist/revision.js.map +1 -0
- package/dist/splash-screen/ModernSplashScreen.d.ts +8 -0
- package/dist/splash-screen/ModernSplashScreen.js +92 -0
- package/dist/splash-screen/ModernSplashScreen.js.map +1 -0
- package/dist/splash-screen/NewPage.d.ts +3 -0
- package/dist/splash-screen/NewPage.js +145 -0
- package/dist/splash-screen/NewPage.js.map +1 -0
- package/dist/splash-screen/OpenPage.d.ts +1 -0
- package/dist/splash-screen/OpenPage.js +56 -0
- package/dist/splash-screen/OpenPage.js.map +1 -0
- package/dist/splash-screen/ParheliaAssistantChat.d.ts +8 -0
- package/dist/splash-screen/ParheliaAssistantChat.js +155 -0
- package/dist/splash-screen/ParheliaAssistantChat.js.map +1 -0
- package/dist/splash-screen/RecentAgents.d.ts +7 -0
- package/dist/splash-screen/RecentAgents.js +76 -0
- package/dist/splash-screen/RecentAgents.js.map +1 -0
- package/dist/splash-screen/RecentPages.d.ts +1 -0
- package/dist/splash-screen/RecentPages.js +47 -0
- package/dist/splash-screen/RecentPages.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/styles.css +5914 -0
- package/dist/tour/Tour.d.ts +3 -0
- package/dist/tour/Tour.js +426 -0
- package/dist/tour/Tour.js.map +1 -0
- package/dist/tour/default-tour.d.ts +9 -0
- package/dist/tour/default-tour.js +302 -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 +93 -0
- package/dist/tour/preview-tour.js.map +1 -0
- package/dist/types.d.ts +396 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/images/bg-shape-black.webp +0 -0
- package/images/wizard-bg.png +0 -0
- package/images/wizard-tour.png +0 -0
- package/images/wizard.png +0 -0
- package/package.json +93 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { createPortal } from "react-dom";
|
|
4
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
const ContextMenuRootContext = React.createContext(null);
|
|
7
|
+
function useContextMenuRoot() {
|
|
8
|
+
const ctx = React.useContext(ContextMenuRootContext);
|
|
9
|
+
if (!ctx)
|
|
10
|
+
throw new Error("ContextMenu components must be used within ContextMenu");
|
|
11
|
+
return ctx;
|
|
12
|
+
}
|
|
13
|
+
function ContextMenu({ children }) {
|
|
14
|
+
const [position, setPosition] = React.useState(null);
|
|
15
|
+
const containersRef = React.useRef(new Set());
|
|
16
|
+
const isOpen = position !== null;
|
|
17
|
+
const openAt = React.useCallback((pos) => {
|
|
18
|
+
setPosition(pos);
|
|
19
|
+
}, []);
|
|
20
|
+
const close = React.useCallback(() => {
|
|
21
|
+
setPosition(null);
|
|
22
|
+
}, []);
|
|
23
|
+
const registerContainer = React.useCallback((el) => {
|
|
24
|
+
if (el)
|
|
25
|
+
containersRef.current.add(el);
|
|
26
|
+
}, []);
|
|
27
|
+
const unregisterContainer = React.useCallback((el) => {
|
|
28
|
+
if (el)
|
|
29
|
+
containersRef.current.delete(el);
|
|
30
|
+
}, []);
|
|
31
|
+
React.useEffect(() => {
|
|
32
|
+
if (!isOpen)
|
|
33
|
+
return;
|
|
34
|
+
const handleKeyDown = (e) => {
|
|
35
|
+
if (e.key === "Escape")
|
|
36
|
+
close();
|
|
37
|
+
};
|
|
38
|
+
const handlePointerDown = (e) => {
|
|
39
|
+
const target = e.target;
|
|
40
|
+
let inside = false;
|
|
41
|
+
containersRef.current.forEach((el) => {
|
|
42
|
+
if (el.contains(target))
|
|
43
|
+
inside = true;
|
|
44
|
+
});
|
|
45
|
+
if (!inside)
|
|
46
|
+
close();
|
|
47
|
+
};
|
|
48
|
+
window.addEventListener("keydown", handleKeyDown, true);
|
|
49
|
+
// Use bubble phase so capture-phase handlers inside the menu can stop propagation
|
|
50
|
+
window.addEventListener("pointerdown", handlePointerDown);
|
|
51
|
+
// Also listen for click events so synthetic clicks (e.g., forwarded from iframes) close the menu
|
|
52
|
+
window.addEventListener("click", handlePointerDown);
|
|
53
|
+
window.addEventListener("contextmenu", handlePointerDown);
|
|
54
|
+
return () => {
|
|
55
|
+
window.removeEventListener("keydown", handleKeyDown, true);
|
|
56
|
+
window.removeEventListener("pointerdown", handlePointerDown);
|
|
57
|
+
window.removeEventListener("click", handlePointerDown);
|
|
58
|
+
window.removeEventListener("contextmenu", handlePointerDown);
|
|
59
|
+
};
|
|
60
|
+
}, [isOpen, close]);
|
|
61
|
+
const value = React.useMemo(() => ({
|
|
62
|
+
isOpen,
|
|
63
|
+
position,
|
|
64
|
+
openAt,
|
|
65
|
+
close,
|
|
66
|
+
registerContainer,
|
|
67
|
+
unregisterContainer,
|
|
68
|
+
}), [isOpen, position, openAt, close, registerContainer, unregisterContainer]);
|
|
69
|
+
return (_jsx(ContextMenuRootContext.Provider, { value: value, children: _jsx("div", { "data-slot": "context-menu", "data-testid": "context-menu", children: children }) }));
|
|
70
|
+
}
|
|
71
|
+
function ContextMenuTrigger({ asChild, children, ...rest }) {
|
|
72
|
+
const { openAt } = useContextMenuRoot();
|
|
73
|
+
const onContextMenu = (e) => {
|
|
74
|
+
if (rest.onContextMenu)
|
|
75
|
+
rest.onContextMenu(e);
|
|
76
|
+
e.preventDefault();
|
|
77
|
+
e.stopPropagation();
|
|
78
|
+
openAt({ x: e.clientX, y: e.clientY });
|
|
79
|
+
};
|
|
80
|
+
if (asChild && React.isValidElement(children)) {
|
|
81
|
+
const childOnContextMenu = children.props?.onContextMenu;
|
|
82
|
+
const composedOnContextMenu = (e) => {
|
|
83
|
+
if (childOnContextMenu)
|
|
84
|
+
childOnContextMenu(e);
|
|
85
|
+
onContextMenu(e);
|
|
86
|
+
};
|
|
87
|
+
return React.cloneElement(children, {
|
|
88
|
+
onContextMenu: composedOnContextMenu,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return (_jsx("span", { "data-slot": "context-menu-trigger", "data-testid": "context-menu-trigger", onContextMenu: onContextMenu, ...rest, children: children }));
|
|
92
|
+
}
|
|
93
|
+
function ContextMenuGroup({ children, className, }) {
|
|
94
|
+
return (_jsx("div", { "data-slot": "context-menu-group", "data-testid": "context-menu-group", className: className, children: children }));
|
|
95
|
+
}
|
|
96
|
+
function ContextMenuPortal({ children }) {
|
|
97
|
+
return _jsx(_Fragment, { children: children });
|
|
98
|
+
}
|
|
99
|
+
function ContextMenuContent({ className, children, }) {
|
|
100
|
+
const { isOpen, position, close, registerContainer, unregisterContainer } = useContextMenuRoot();
|
|
101
|
+
const [adjustedPosition, setAdjustedPosition] = React.useState(null);
|
|
102
|
+
const menuRef = React.useRef(null);
|
|
103
|
+
const contentRefCallback = React.useCallback((el) => {
|
|
104
|
+
menuRef.current = el;
|
|
105
|
+
if (el) {
|
|
106
|
+
registerContainer(el);
|
|
107
|
+
}
|
|
108
|
+
}, [registerContainer]);
|
|
109
|
+
// Calculate adjusted position based on viewport bounds
|
|
110
|
+
React.useEffect(() => {
|
|
111
|
+
if (!isOpen || !position || !menuRef.current) {
|
|
112
|
+
setAdjustedPosition(null);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const OFFSET = 1;
|
|
116
|
+
const menuRect = menuRef.current.getBoundingClientRect();
|
|
117
|
+
const viewportWidth = window.innerWidth;
|
|
118
|
+
const viewportHeight = window.innerHeight;
|
|
119
|
+
let left = position.x + OFFSET;
|
|
120
|
+
let top = position.y + OFFSET;
|
|
121
|
+
// Check if menu would overflow bottom of viewport
|
|
122
|
+
if (top + menuRect.height > viewportHeight) {
|
|
123
|
+
// Position above the click point
|
|
124
|
+
top = position.y - menuRect.height - OFFSET;
|
|
125
|
+
// Ensure it doesn't go above the viewport
|
|
126
|
+
if (top < 0) {
|
|
127
|
+
top = Math.max(0, viewportHeight - menuRect.height);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// Check if menu would overflow right edge of viewport
|
|
131
|
+
if (left + menuRect.width > viewportWidth) {
|
|
132
|
+
// Position to the left of the click point
|
|
133
|
+
left = position.x - menuRect.width - OFFSET;
|
|
134
|
+
// Ensure it doesn't go off the left edge
|
|
135
|
+
if (left < 0) {
|
|
136
|
+
left = Math.max(0, viewportWidth - menuRect.width);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
setAdjustedPosition({ left, top });
|
|
140
|
+
}, [isOpen, position, children]);
|
|
141
|
+
if (!isOpen || !position)
|
|
142
|
+
return null;
|
|
143
|
+
const OFFSET = 1;
|
|
144
|
+
const defaultLeft = position.x + OFFSET;
|
|
145
|
+
const defaultTop = position.y + OFFSET;
|
|
146
|
+
// Use adjusted position if available, otherwise use default
|
|
147
|
+
const finalPosition = adjustedPosition || {
|
|
148
|
+
left: defaultLeft,
|
|
149
|
+
top: defaultTop,
|
|
150
|
+
};
|
|
151
|
+
const node = (_jsx("div", { ref: contentRefCallback, "data-slot": "context-menu-content", "data-testid": "context-menu-content", className: cn("bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-visible rounded-md border font-light shadow-md", className), style: {
|
|
152
|
+
position: "fixed",
|
|
153
|
+
left: finalPosition.left,
|
|
154
|
+
top: finalPosition.top,
|
|
155
|
+
}, onKeyDownCapture: (e) => {
|
|
156
|
+
if (e.key === "Escape") {
|
|
157
|
+
e.stopPropagation();
|
|
158
|
+
close();
|
|
159
|
+
}
|
|
160
|
+
}, onContextMenu: (e) => {
|
|
161
|
+
e.preventDefault();
|
|
162
|
+
e.stopPropagation();
|
|
163
|
+
}, children: children }));
|
|
164
|
+
return createPortal(node, document.body);
|
|
165
|
+
}
|
|
166
|
+
function ContextMenuItem({ className, inset, variant = "default", onClick, onSelect, ...rest }) {
|
|
167
|
+
const { close } = useContextMenuRoot();
|
|
168
|
+
const disabled = rest.disabled ?? false;
|
|
169
|
+
const executedRef = React.useRef(false);
|
|
170
|
+
const performAction = (e) => {
|
|
171
|
+
if (disabled)
|
|
172
|
+
return;
|
|
173
|
+
if (executedRef.current)
|
|
174
|
+
return;
|
|
175
|
+
executedRef.current = true;
|
|
176
|
+
try {
|
|
177
|
+
if (onClick)
|
|
178
|
+
onClick(e);
|
|
179
|
+
if (onSelect)
|
|
180
|
+
onSelect(e);
|
|
181
|
+
close();
|
|
182
|
+
}
|
|
183
|
+
finally {
|
|
184
|
+
// Reset in next tick so a subsequent distinct click can trigger again
|
|
185
|
+
setTimeout(() => {
|
|
186
|
+
executedRef.current = false;
|
|
187
|
+
}, 0);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
const handleMouseDown = (e) => {
|
|
191
|
+
// Trigger on primary-button press for snappier UX and to avoid external handlers interfering
|
|
192
|
+
if (e.button === 0) {
|
|
193
|
+
performAction(e);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
const handleClick = (e) => {
|
|
197
|
+
// Fallback in case mousedown didn't fire
|
|
198
|
+
performAction(e);
|
|
199
|
+
};
|
|
200
|
+
const handleKeyDown = (e) => {
|
|
201
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
202
|
+
e.preventDefault();
|
|
203
|
+
// Cast to any to reuse performAction signature
|
|
204
|
+
performAction(e);
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
return (_jsx("div", { role: "menuitem", "data-slot": "context-menu-item", "data-testid": "context-menu-item", "data-inset": inset, "data-variant": variant, "data-disabled": disabled ? "" : undefined, className: cn("hover:text-accent-foreground focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-xs outline-hidden select-none hover:bg-[#f6eeff] focus:bg-[#f6eeff] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), onMouseDown: handleMouseDown, onClick: handleClick, onKeyDown: handleKeyDown, ...rest }));
|
|
208
|
+
}
|
|
209
|
+
function ContextMenuCheckboxItem({ className, children, checked, onClick, ...rest }) {
|
|
210
|
+
const { close } = useContextMenuRoot();
|
|
211
|
+
const handle = (e) => {
|
|
212
|
+
if (rest.disabled)
|
|
213
|
+
return;
|
|
214
|
+
if (onClick)
|
|
215
|
+
onClick(e);
|
|
216
|
+
close();
|
|
217
|
+
};
|
|
218
|
+
return (_jsxs("div", { "data-slot": "context-menu-checkbox-item", "data-testid": "context-menu-checkbox-item", "data-disabled": rest.disabled ? "" : undefined, className: cn("hover:text-accent-foreground focus:text-accent-foreground relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-xs outline-hidden select-none hover:bg-[#f6eeff] focus:bg-[#f6eeff] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), onClick: handle, ...rest, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: checked ? _jsx(CheckIcon, { className: "size-4" }) : null }), children] }));
|
|
219
|
+
}
|
|
220
|
+
function ContextMenuRadioGroup({ children }) {
|
|
221
|
+
return (_jsx("div", { "data-slot": "context-menu-radio-group", "data-testid": "context-menu-radio-group", children: children }));
|
|
222
|
+
}
|
|
223
|
+
function ContextMenuRadioItem({ className, children, checked, onClick, ...rest }) {
|
|
224
|
+
const { close } = useContextMenuRoot();
|
|
225
|
+
const handle = (e) => {
|
|
226
|
+
if (rest.disabled)
|
|
227
|
+
return;
|
|
228
|
+
if (onClick)
|
|
229
|
+
onClick(e);
|
|
230
|
+
close();
|
|
231
|
+
};
|
|
232
|
+
return (_jsxs("div", { "data-slot": "context-menu-radio-item", "data-testid": "context-menu-radio-item", "data-disabled": rest.disabled ? "" : undefined, className: cn("hover:text-accent-foreground focus:text-accent-foreground relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-xs outline-hidden select-none hover:bg-[#f6eeff] focus:bg-[#f6eeff] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), onClick: handle, ...rest, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: checked ? _jsx(CircleIcon, { className: "size-2 fill-current" }) : null }), children] }));
|
|
233
|
+
}
|
|
234
|
+
function ContextMenuLabel({ className, inset, ...rest }) {
|
|
235
|
+
return (_jsx("div", { "data-slot": "context-menu-label", "data-testid": "context-menu-label", "data-inset": inset, className: cn("text-foreground px-2 py-1.5 text-xs font-light data-[inset]:pl-8", className), ...rest }));
|
|
236
|
+
}
|
|
237
|
+
function ContextMenuSeparator({ className, ...rest }) {
|
|
238
|
+
return (_jsx("div", { role: "separator", "data-slot": "context-menu-separator", "data-testid": "context-menu-separator", className: cn("bg-border -mx-1 my-1 h-px", className), ...rest }));
|
|
239
|
+
}
|
|
240
|
+
function ContextMenuShortcut({ className, ...rest }) {
|
|
241
|
+
return (_jsx("span", { "data-slot": "context-menu-shortcut", "data-testid": "context-menu-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className), ...rest }));
|
|
242
|
+
}
|
|
243
|
+
const SubmenuContext = React.createContext(null);
|
|
244
|
+
function ContextMenuSub({ children }) {
|
|
245
|
+
const [open, setOpen] = React.useState(false);
|
|
246
|
+
const triggerRef = React.useRef(null);
|
|
247
|
+
const value = React.useMemo(() => ({ isOpen: open, setOpen, triggerRef }), [open]);
|
|
248
|
+
return (_jsx(SubmenuContext.Provider, { value: value, children: _jsx("div", { "data-slot": "context-menu-sub", "data-testid": "context-menu-sub", children: children }) }));
|
|
249
|
+
}
|
|
250
|
+
function useSubmenu() {
|
|
251
|
+
const ctx = React.useContext(SubmenuContext);
|
|
252
|
+
if (!ctx)
|
|
253
|
+
throw new Error("ContextMenuSub components must be used within ContextMenuSub");
|
|
254
|
+
return ctx;
|
|
255
|
+
}
|
|
256
|
+
function ContextMenuSubTrigger({ className, inset, children, disabled, ...rest }) {
|
|
257
|
+
const { setOpen, triggerRef } = useSubmenu();
|
|
258
|
+
const openSub = (e) => {
|
|
259
|
+
e.stopPropagation();
|
|
260
|
+
if (!disabled)
|
|
261
|
+
setOpen(true);
|
|
262
|
+
};
|
|
263
|
+
return (_jsxs("div", { ref: triggerRef, "data-slot": "context-menu-sub-trigger", "data-testid": "context-menu-sub-trigger", "data-inset": inset, "data-disabled": disabled ? "" : undefined, className: cn("hover:text-accent-foreground focus:text-accent-foreground flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-xs outline-hidden select-none hover:bg-[#f6eeff] focus:bg-[#f6eeff] data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), onMouseEnter: openSub, onClick: openSub, ...rest, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto" })] }));
|
|
264
|
+
}
|
|
265
|
+
function ContextMenuSubContent({ className, children, }) {
|
|
266
|
+
const { isOpen, setOpen, triggerRef } = useSubmenu();
|
|
267
|
+
const { registerContainer, unregisterContainer } = useContextMenuRoot();
|
|
268
|
+
const [coords, setCoords] = React.useState({
|
|
269
|
+
left: 0,
|
|
270
|
+
top: 0,
|
|
271
|
+
});
|
|
272
|
+
const subContentRefCallback = React.useCallback((el) => {
|
|
273
|
+
if (el) {
|
|
274
|
+
registerContainer(el);
|
|
275
|
+
}
|
|
276
|
+
}, [registerContainer]);
|
|
277
|
+
React.useEffect(() => {
|
|
278
|
+
const trig = triggerRef.current;
|
|
279
|
+
if (!trig)
|
|
280
|
+
return;
|
|
281
|
+
const rect = trig.getBoundingClientRect();
|
|
282
|
+
setCoords({ left: rect.right, top: rect.top });
|
|
283
|
+
}, [triggerRef.current, isOpen]);
|
|
284
|
+
if (!isOpen)
|
|
285
|
+
return null;
|
|
286
|
+
const node = (_jsx("div", { ref: subContentRefCallback, "data-slot": "context-menu-sub-content", "data-testid": "context-menu-sub-content", className: cn("bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 font-light shadow-lg", className), style: { position: "fixed", left: coords.left, top: coords.top }, onMouseLeave: () => setOpen(false), onMouseEnter: () => setOpen(true), children: children }));
|
|
287
|
+
return createPortal(node, document.body);
|
|
288
|
+
}
|
|
289
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, };
|
|
290
|
+
//# sourceMappingURL=context-menu.js.map
|
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AE,CAAC;QAC1C,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACjD,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAEjC,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,MAAM,IAAI,GAAG,CACX,cACE,GAAG,EAAE,qBAAqB,eAChB,0BAA0B,iBACxB,0BAA0B,EACtC,SAAS,EAAE,EAAE,CACX,iHAAiH,EACjH,SAAS,CACV,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,EAChE,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAClC,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,YAEhC,QAAQ,GACL,CACP,CAAC;IAEF,OAAO,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC3C,CAAC;AAED,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,GACnB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface CopyButtonProps {
|
|
2
|
+
textToCopy: string;
|
|
3
|
+
duration?: number;
|
|
4
|
+
className?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/** If true, shows icon only. If false, shows button with text */
|
|
7
|
+
iconOnly?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function CopyButton({ textToCopy, duration, className, children, iconOnly, }: CopyButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState, useEffect } from "react";
|
|
3
|
+
import { createPortal } from "react-dom";
|
|
4
|
+
import { Copy } from "lucide-react";
|
|
5
|
+
export function CopyButton({ textToCopy, duration = 2000, className, children, iconOnly = false, }) {
|
|
6
|
+
const [showCopiedHint, setShowCopiedHint] = useState(false);
|
|
7
|
+
const buttonRef = useRef(null);
|
|
8
|
+
// Add keyframes to document head once
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
const styleId = "copy-button-animations";
|
|
11
|
+
if (document.getElementById(styleId))
|
|
12
|
+
return;
|
|
13
|
+
const style = document.createElement("style");
|
|
14
|
+
style.id = styleId;
|
|
15
|
+
style.textContent = `
|
|
16
|
+
@keyframes shake {
|
|
17
|
+
0%, 100% { transform: translateX(-50%) rotate(0deg); }
|
|
18
|
+
10% { transform: translateX(-50%) rotate(-2deg) scale(1.05); }
|
|
19
|
+
20% { transform: translateX(-50%) rotate(2deg) scale(1.1); }
|
|
20
|
+
30% { transform: translateX(-50%) rotate(-2deg) scale(1.05); }
|
|
21
|
+
40% { transform: translateX(-50%) rotate(2deg) scale(1.1); }
|
|
22
|
+
50% { transform: translateX(-50%) rotate(-1deg) scale(1.02); }
|
|
23
|
+
60% { transform: translateX(-50%) rotate(1deg) scale(1.02); }
|
|
24
|
+
70% { transform: translateX(-50%) rotate(-1deg); }
|
|
25
|
+
80% { transform: translateX(-50%) rotate(1deg); }
|
|
26
|
+
90% { transform: translateX(-50%) rotate(0deg); }
|
|
27
|
+
}
|
|
28
|
+
@keyframes fadeOut {
|
|
29
|
+
0% { opacity: 1; }
|
|
30
|
+
70% { opacity: 1; }
|
|
31
|
+
100% { opacity: 0; }
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
34
|
+
document.head.appendChild(style);
|
|
35
|
+
}, []);
|
|
36
|
+
const handleCopy = async () => {
|
|
37
|
+
try {
|
|
38
|
+
await navigator.clipboard.writeText(textToCopy);
|
|
39
|
+
setShowCopiedHint(true);
|
|
40
|
+
setTimeout(() => setShowCopiedHint(false), duration);
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
console.error("Failed to copy text:", error);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const Element = iconOnly ? "span" : "button";
|
|
47
|
+
const defaultClassName = iconOnly
|
|
48
|
+
? "cursor-pointer"
|
|
49
|
+
: "text-gray-1 flex cursor-pointer items-center gap-1 p-0 text-xs";
|
|
50
|
+
const defaultChildren = iconOnly ? (_jsx(Copy, { strokeWidth: 1, className: "h-3 w-3" })) : (_jsxs(_Fragment, { children: [_jsx(Copy, { strokeWidth: 1, className: "h-3 w-3" }), " Copy"] }));
|
|
51
|
+
return (_jsxs(_Fragment, { children: [_jsx(Element, { ref: buttonRef, onClick: handleCopy, className: className || defaultClassName, children: children || defaultChildren }), showCopiedHint &&
|
|
52
|
+
buttonRef.current &&
|
|
53
|
+
createPortal(_jsx("div", { className: "pointer-events-none fixed z-[9999] rounded bg-gray-800 px-2 py-1 text-xs whitespace-nowrap text-white shadow-lg", style: {
|
|
54
|
+
animation: "shake 0.5s ease-in-out, fadeOut 2s ease-out forwards",
|
|
55
|
+
left: buttonRef.current.getBoundingClientRect().left +
|
|
56
|
+
buttonRef.current.offsetWidth / 2,
|
|
57
|
+
top: buttonRef.current.getBoundingClientRect().top - 32,
|
|
58
|
+
transform: "translateX(-50%)",
|
|
59
|
+
}, children: "Copied!" }), document.body)] }));
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=copy-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-button.js","sourceRoot":"","sources":["../../../src/components/ui/copy-button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SA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,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC7C,MAAM,gBAAgB,GAAG,QAAQ;QAC/B,CAAC,CAAC,gBAAgB;QAClB,CAAC,CAAC,gEAAgE,CAAC;IACrE,MAAM,eAAe,GAAG,QAAQ,CAAC,CAAC,CAAC,CACjC,KAAC,IAAI,IAAC,WAAW,EAAE,CAAC,EAAE,SAAS,EAAC,SAAS,GAAG,CAC7C,CAAC,CAAC,CAAC,CACF,8BACE,KAAC,IAAI,IAAC,WAAW,EAAE,CAAC,EAAE,SAAS,EAAC,SAAS,GAAG,aAC3C,CACJ,CAAC;IAEF,OAAO,CACL,8BACE,KAAC,OAAO,IACN,GAAG,EAAE,SAAgB,EACrB,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,SAAS,IAAI,gBAAgB,YAEvC,QAAQ,IAAI,eAAe,GACpB,EACT,cAAc;gBACb,SAAS,CAAC,OAAO;gBACjB,YAAY,CACV,cACE,SAAS,EAAC,iHAAiH,EAC3H,KAAK,EAAE;wBACL,SAAS,EAAE,sDAAsD;wBACjE,IAAI,EACF,SAAS,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,IAAI;4BAC9C,SAAS,CAAC,OAAO,CAAC,WAAW,GAAG,CAAC;wBACnC,GAAG,EAAE,SAAS,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,GAAG,GAAG,EAAE;wBACvD,SAAS,EAAE,kBAAkB;qBAC9B,wBAGG,EACN,QAAQ,CAAC,IAAI,CACd,IACF,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function DialogContent({ className, children, showCloseButton, overlayClassName, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
overlayClassName?: string;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
|
+
import { XIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
function Dialog({ ...props }) {
|
|
7
|
+
return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
8
|
+
}
|
|
9
|
+
function DialogTrigger({ ...props }) {
|
|
10
|
+
return _jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
11
|
+
}
|
|
12
|
+
function DialogPortal({ ...props }) {
|
|
13
|
+
return _jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
14
|
+
}
|
|
15
|
+
function DialogClose({ ...props }) {
|
|
16
|
+
return _jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
17
|
+
}
|
|
18
|
+
function DialogOverlay({ className, ...props }) {
|
|
19
|
+
return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function DialogContent({ className, children, showCloseButton = true, overlayClassName, ...props }) {
|
|
22
|
+
return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, { className: overlayClassName }), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col rounded-lg border shadow-lg duration-200", className), "data-testid": "dialog-content", ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "data-testid": "dialog-close", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
|
|
23
|
+
}
|
|
24
|
+
function DialogHeader({ className, ...props }) {
|
|
25
|
+
return (_jsx("div", { "data-slot": "dialog-header", className: cn("border-gray-3 flex flex-col gap-2 border-b px-6 py-5 text-center sm:text-left", className), ...props }));
|
|
26
|
+
}
|
|
27
|
+
function DialogFooter({ className, ...props }) {
|
|
28
|
+
return (_jsx("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }));
|
|
29
|
+
}
|
|
30
|
+
function DialogTitle({ className, ...props }) {
|
|
31
|
+
return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("text-lg leading-none font-semibold", className), ...props }));
|
|
32
|
+
}
|
|
33
|
+
function DialogDescription({ className, ...props }) {
|
|
34
|
+
return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn("text-muted-foreground text-sm", className), ...props }));
|
|
35
|
+
}
|
|
36
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
37
|
+
//# sourceMappingURL=dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../src/components/ui/dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SAAS,MAAM,CAAC,EACd,GAAG,KAAK,EAC0C;IAClD,OAAO,KAAC,eAAe,CAAC,IAAI,iBAAW,QAAQ,KAAK,KAAK,GAAI,CAAC;AAChE,CAAC;AAED,SAAS,aAAa,CAAC,EACrB,GAAG,KAAK,EAC6C;IACrD,OAAO,KAAC,eAAe,CAAC,OAAO,iBAAW,gBAAgB,KAAK,KAAK,GAAI,CAAC;AAC3E,CAAC;AAED,SAAS,YAA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AE,GAAG,KAAK,EAA+B;IACxE,OAAO,CACL,2BACY,eAAe,EACzB,SAAS,EAAE,EAAE,CACX,wDAAwD,EACxD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EAC2C;IACnD,OAAO,CACL,KAAC,eAAe,CAAC,KAAK,iBACV,cAAc,EACxB,SAAS,EAAE,EAAE,CAAC,oCAAoC,EAAE,SAAS,CAAC,KAC1D,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACiD;IACzD,OAAO,CACL,KAAC,eAAe,CAAC,WAAW,iBAChB,oBAAoB,EAC9B,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DropdownMenuContent({ className, sideOffset, align, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
variant?: "default" | "destructive";
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
16
|
+
inset?: boolean;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
22
|
+
inset?: boolean;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
function DropdownMenu({ ...props }) {
|
|
7
|
+
return _jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
8
|
+
}
|
|
9
|
+
function DropdownMenuPortal({ ...props }) {
|
|
10
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props }));
|
|
11
|
+
}
|
|
12
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
13
|
+
return (_jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props }));
|
|
14
|
+
}
|
|
15
|
+
function DropdownMenuContent({ className, sideOffset = 4, align = "start", ...props }) {
|
|
16
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, align: align, className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) w-[--radix-dropdown-menu-trigger-width] min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className), ...props }) }));
|
|
17
|
+
}
|
|
18
|
+
function DropdownMenuGroup({ ...props }) {
|
|
19
|
+
return (_jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props }));
|
|
20
|
+
}
|
|
21
|
+
function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
22
|
+
return (_jsx(DropdownMenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-xs outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
25
|
+
return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
|
|
26
|
+
}
|
|
27
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
28
|
+
return (_jsx(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props }));
|
|
29
|
+
}
|
|
30
|
+
function DropdownMenuRadioItem({ className, children, ...props }) {
|
|
31
|
+
return (_jsxs(DropdownMenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
|
|
32
|
+
}
|
|
33
|
+
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
34
|
+
return (_jsx(DropdownMenuPrimitive.Label, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className), ...props }));
|
|
35
|
+
}
|
|
36
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
37
|
+
return (_jsx(DropdownMenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: cn("bg-border -mx-1 my-1 h-px", className), ...props }));
|
|
38
|
+
}
|
|
39
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
40
|
+
return (_jsx("span", { "data-slot": "dropdown-menu-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className), ...props }));
|
|
41
|
+
}
|
|
42
|
+
function DropdownMenuSub({ ...props }) {
|
|
43
|
+
return _jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
44
|
+
}
|
|
45
|
+
function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
46
|
+
return (_jsxs(DropdownMenuPrimitive.SubTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] }));
|
|
47
|
+
}
|
|
48
|
+
function DropdownMenuSubContent({ className, ...props }) {
|
|
49
|
+
return (_jsx(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className), ...props }));
|
|
50
|
+
}
|
|
51
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
52
|
+
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../src/components/ui/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc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e,EACf,sBAAsB,EACtB,sBAAsB,GACvB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
|
+
function Input({ className, type, ...props }) {
|
|
4
|
+
return (_jsx("input", { type: type, "data-slot": "input", className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-full min-w-0 rounded-md border bg-transparent p-1 px-3 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-xs file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-xs",
|
|
5
|
+
// Use outline for focus instead of ring (box-shadow) so it doesn't override .focus-shadow
|
|
6
|
+
"focus-visible:border-ring focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring/70", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
export { Input };
|
|
9
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/ui/input.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAiC;IACzE,OAAO,CACL,gBACE,IAAI,EAAE,IAAI,eACA,OAAO,EACjB,SAAS,EAAE,EAAE,CACX,kbAAkb;QAClb,0FAA0F;QAC1F,uIAAuI,EACvI,wGAAwG,EACxG,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
3
|
+
declare function Menubar({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<typeof MenubarPrimitive.Item> & {
|
|
11
|
+
inset?: boolean;
|
|
12
|
+
variant?: "default" | "destructive";
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function MenubarCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function MenubarRadioItem({ className, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Label> & {
|
|
17
|
+
inset?: boolean;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function MenubarShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function MenubarSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
|
|
23
|
+
inset?: boolean;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
|