@parhelia/core 0.4.12825 → 0.4.12872
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/emoji/EmojiPicker.d.ts +18 -0
- package/dist/components/emoji/EmojiPicker.js +102 -0
- package/dist/components/emoji/EmojiPicker.js.map +1 -0
- package/dist/components/emoji/EmojiText.d.ts +19 -0
- package/dist/components/emoji/EmojiText.js +30 -0
- package/dist/components/emoji/EmojiText.js.map +1 -0
- package/dist/components/emoji/emojiData.generated.d.ts +2 -0
- package/dist/components/emoji/emojiData.generated.js +1878 -0
- package/dist/components/emoji/emojiData.generated.js.map +1 -0
- package/dist/components/emoji/emojiIndex.d.ts +46 -0
- package/dist/components/emoji/emojiIndex.js +173 -0
- package/dist/components/emoji/emojiIndex.js.map +1 -0
- package/dist/components/emoji/emoticons.d.ts +21 -0
- package/dist/components/emoji/emoticons.js +167 -0
- package/dist/components/emoji/emoticons.js.map +1 -0
- package/dist/components/emoji/textareaInsert.d.ts +19 -0
- package/dist/components/emoji/textareaInsert.js +29 -0
- package/dist/components/emoji/textareaInsert.js.map +1 -0
- package/dist/components/emoji/twemoji.d.ts +30 -0
- package/dist/components/emoji/twemoji.js +84 -0
- package/dist/components/emoji/twemoji.js.map +1 -0
- package/dist/components/ui/alert.d.ts +6 -1
- package/dist/components/ui/alert.js +12 -3
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +25 -0
- package/dist/components/ui/context-menu.js +54 -36
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/copy-button.d.ts +3 -1
- package/dist/components/ui/copy-button.js +13 -2
- package/dist/components/ui/copy-button.js.map +1 -1
- package/dist/components/ui/mention-textarea.d.ts +8 -0
- package/dist/components/ui/mention-textarea.js +98 -46
- package/dist/components/ui/mention-textarea.js.map +1 -1
- package/dist/components/ui/paste-button.js +11 -1
- package/dist/components/ui/paste-button.js.map +1 -1
- package/dist/config/config.js +43 -4
- package/dist/config/config.js.map +1 -1
- package/dist/config/types.d.ts +2 -0
- package/dist/config/types.js.map +1 -1
- package/dist/editor/ConcurrentUserLimitDialog.js +5 -2
- package/dist/editor/ConcurrentUserLimitDialog.js.map +1 -1
- package/dist/editor/ContentTree.js +7 -2
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/ContextMenu.js +11 -36
- package/dist/editor/ContextMenu.js.map +1 -1
- package/dist/editor/EditorWarning.js +8 -4
- package/dist/editor/EditorWarning.js.map +1 -1
- package/dist/editor/FieldList.js +1 -1
- package/dist/editor/FieldList.js.map +1 -1
- package/dist/editor/FieldListField.js +18 -13
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/FieldListFieldWithFallbacks.js +1 -1
- package/dist/editor/GlobalMenuBar.js +2 -1
- package/dist/editor/GlobalMenuBar.js.map +1 -1
- package/dist/editor/ImageEditor.js +3 -1
- package/dist/editor/ImageEditor.js.map +1 -1
- package/dist/editor/MainLayout.js +1 -1
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/MigrationsView.js +3 -2
- package/dist/editor/MigrationsView.js.map +1 -1
- package/dist/editor/MobileLayout.js +43 -20
- package/dist/editor/MobileLayout.js.map +1 -1
- package/dist/editor/PictureEditor.js +4 -2
- package/dist/editor/PictureEditor.js.map +1 -1
- package/dist/editor/QuickItemSwitcher.js +4 -2
- package/dist/editor/QuickItemSwitcher.js.map +1 -1
- package/dist/editor/agent-changes/agentChangeTargets.js +6 -0
- package/dist/editor/agent-changes/agentChangeTargets.js.map +1 -1
- package/dist/editor/agent-changes/agentChangeTextHighlight.d.ts +48 -4
- package/dist/editor/agent-changes/agentChangeTextHighlight.js +67 -9
- package/dist/editor/agent-changes/agentChangeTextHighlight.js.map +1 -1
- package/dist/editor/ai/HeartbeatDiagnosticsPanel.js +1 -1
- package/dist/editor/ai/InlineAiDialog.js +11 -8
- package/dist/editor/ai/InlineAiDialog.js.map +1 -1
- package/dist/editor/ai/InlineAiTrigger.js +18 -14
- package/dist/editor/ai/InlineAiTrigger.js.map +1 -1
- package/dist/editor/ai/agentActivitySummary.js +5 -0
- package/dist/editor/ai/agentActivitySummary.js.map +1 -1
- package/dist/editor/ai/agentMessageConversion.js +1 -0
- package/dist/editor/ai/agentMessageConversion.js.map +1 -1
- package/dist/editor/ai/agentMessageMarkdown.js +4 -4
- package/dist/editor/ai/agentMessageMarkdown.js.map +1 -1
- package/dist/editor/ai/dialogs/capturePageScreenshot.d.ts +4 -1
- package/dist/editor/ai/dialogs/capturePageScreenshot.js +214 -44
- package/dist/editor/ai/dialogs/capturePageScreenshot.js.map +1 -1
- package/dist/editor/ai/dialogs/captureShared.d.ts +8 -1
- package/dist/editor/ai/dialogs/captureShared.js +4 -1
- package/dist/editor/ai/dialogs/captureShared.js.map +1 -1
- package/dist/editor/ai/dialogs/offscreenPageCapture.js +1 -1
- package/dist/editor/ai/dialogs/offscreenPageCapture.js.map +1 -1
- package/dist/editor/ai/prepareInlineAiTextSelection.d.ts +2 -1
- package/dist/editor/ai/prepareInlineAiTextSelection.js +1 -2
- package/dist/editor/ai/prepareInlineAiTextSelection.js.map +1 -1
- package/dist/editor/ai/terminal/agentCost.d.ts +2 -0
- package/dist/editor/ai/terminal/agentCost.js +1 -0
- package/dist/editor/ai/terminal/agentCost.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionLiveTotals.js +3 -0
- package/dist/editor/ai/terminal/agentSessionLiveTotals.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionSelectors.d.ts +5 -2
- package/dist/editor/ai/terminal/agentSessionSelectors.js +5 -2
- package/dist/editor/ai/terminal/agentSessionSelectors.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionState.js +8 -1
- package/dist/editor/ai/terminal/agentSessionState.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentActivityOverviewPanel.js +2 -2
- package/dist/editor/ai/terminal/components/AgentActivityOverviewPanel.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentBanners.js +2 -2
- package/dist/editor/ai/terminal/components/AgentBanners.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentCostDisplay.d.ts +2 -0
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js +2 -1
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentFullPromptControls.js +22 -15
- package/dist/editor/ai/terminal/components/AgentFullPromptControls.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentModeSelector.js +7 -3
- package/dist/editor/ai/terminal/components/AgentModeSelector.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js +3 -3
- package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.js +2 -2
- package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.js +1 -1
- package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.d.ts +5 -2
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js +43 -4
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js.map +1 -1
- package/dist/editor/ai/terminal/components/AiResponseMessage.js +32 -15
- package/dist/editor/ai/terminal/components/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/ApprovalCard.d.ts +3 -1
- package/dist/editor/ai/terminal/components/ApprovalCard.js +8 -16
- package/dist/editor/ai/terminal/components/ApprovalCard.js.map +1 -1
- package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js +1 -1
- package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/EditFieldToolCallContent.d.ts +7 -4
- package/dist/editor/ai/terminal/components/EditFieldToolCallContent.js +57 -32
- package/dist/editor/ai/terminal/components/EditFieldToolCallContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.js +1 -2
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.js.map +1 -1
- package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.d.ts +6 -0
- package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.js +61 -0
- package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.js.map +1 -0
- package/dist/editor/ai/terminal/components/ToolCallDisplay.d.ts +5 -0
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js +19 -8
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/UserMessage.js +4 -2
- package/dist/editor/ai/terminal/components/UserMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/ValueDiff.js +1 -1
- package/dist/editor/ai/terminal/components/ValueDiff.js.map +1 -1
- package/dist/editor/ai/terminal/components/toolCallContentRenderers.js +7 -4
- package/dist/editor/ai/terminal/components/toolCallContentRenderers.js.map +1 -1
- package/dist/editor/ai/terminal/components/useApprovalActions.js +1 -1
- package/dist/editor/ai/terminal/components/useApprovalActions.js.map +1 -1
- package/dist/editor/ai/terminal/toolCallDiagnostics.d.ts +34 -0
- package/dist/editor/ai/terminal/toolCallDiagnostics.js +218 -0
- package/dist/editor/ai/terminal/toolCallDiagnostics.js.map +1 -0
- package/dist/editor/ai/terminal/types.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentEditorContext.js +3 -1
- package/dist/editor/ai/terminal/useAgentEditorContext.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentLoadPipeline.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentLoadPipeline.js +2 -1
- package/dist/editor/ai/terminal/useAgentLoadPipeline.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentLoader.d.ts +2 -0
- package/dist/editor/ai/terminal/useAgentLoader.js +17 -2
- package/dist/editor/ai/terminal/useAgentLoader.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentModeState.d.ts +5 -1
- package/dist/editor/ai/terminal/useAgentModeState.js +11 -3
- package/dist/editor/ai/terminal/useAgentModeState.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.js +5 -1
- package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentRunRefs.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentRunRefs.js +3 -0
- package/dist/editor/ai/terminal/useAgentRunRefs.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSessionSync.d.ts +6 -0
- package/dist/editor/ai/terminal/useAgentSessionSync.js +27 -3
- package/dist/editor/ai/terminal/useAgentSessionSync.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsData.d.ts +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js +7 -6
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js +14 -2
- package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentStatusBarContent.js +11 -4
- package/dist/editor/ai/terminal/useAgentStatusBarContent.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentStreamPipeline.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentStreamPipeline.js +2 -1
- package/dist/editor/ai/terminal/useAgentStreamPipeline.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js +11 -2
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js +3 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentToolCallHandler.js +1 -0
- package/dist/editor/ai/terminal/useAgentToolCallHandler.js.map +1 -1
- package/dist/editor/ai/types.d.ts +4 -0
- package/dist/editor/ai-image-editor/AiImageEditorDialog.d.ts +33 -0
- package/dist/editor/ai-image-editor/AiImageEditorDialog.js +372 -127
- package/dist/editor/ai-image-editor/AiImageEditorDialog.js.map +1 -1
- package/dist/editor/ai-image-editor/AiImageResultOverlay.js +4 -2
- package/dist/editor/ai-image-editor/AiImageResultOverlay.js.map +1 -1
- package/dist/editor/bridge/BridgeClient.js +11 -0
- package/dist/editor/bridge/BridgeClient.js.map +1 -1
- package/dist/editor/bridge/protocol.d.ts +63 -0
- package/dist/editor/bridge/protocol.js +8 -1
- package/dist/editor/bridge/protocol.js.map +1 -1
- package/dist/editor/client/EditorShell.js +331 -122
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/SessionExpiredOverlay.js +9 -2
- package/dist/editor/client/SessionExpiredOverlay.js.map +1 -1
- package/dist/editor/client/clipboardStorage.d.ts +10 -0
- package/dist/editor/client/clipboardStorage.js +57 -0
- package/dist/editor/client/clipboardStorage.js.map +1 -0
- package/dist/editor/client/editContext.d.ts +92 -11
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/editHistoryReconciliation.d.ts +2 -1
- package/dist/editor/client/editHistoryReconciliation.js +5 -2
- package/dist/editor/client/editHistoryReconciliation.js.map +1 -1
- package/dist/editor/client/hooks/useRepositoryItemRefresh.d.ts +4 -0
- package/dist/editor/client/hooks/useRepositoryItemRefresh.js +62 -0
- package/dist/editor/client/hooks/useRepositoryItemRefresh.js.map +1 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.d.ts +6 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js +66 -3
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
- package/dist/editor/client/itemsRepository.d.ts +10 -2
- package/dist/editor/client/itemsRepository.js +224 -43
- package/dist/editor/client/itemsRepository.js.map +1 -1
- package/dist/editor/client/liveEditState.d.ts +16 -0
- package/dist/editor/client/liveEditState.js +25 -0
- package/dist/editor/client/liveEditState.js.map +1 -0
- package/dist/editor/client/liveSessionState.d.ts +6 -0
- package/dist/editor/client/liveSessionState.js +20 -0
- package/dist/editor/client/liveSessionState.js.map +1 -0
- package/dist/editor/client/operations.d.ts +13 -2
- package/dist/editor/client/operations.js +100 -29
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/client/pageModelBuilder.d.ts +6 -0
- package/dist/editor/client/pageModelBuilder.js +74 -7
- package/dist/editor/client/pageModelBuilder.js.map +1 -1
- package/dist/editor/client/ui/EditorChrome.d.ts +2 -2
- package/dist/editor/client/ui/EditorChrome.js +12 -8
- package/dist/editor/client/ui/EditorChrome.js.map +1 -1
- package/dist/editor/client/ui/FullscreenControls.d.ts +3 -5
- package/dist/editor/client/ui/FullscreenControls.js +2 -2
- package/dist/editor/client/ui/FullscreenControls.js.map +1 -1
- package/dist/editor/client/valueStore.d.ts +22 -0
- package/dist/editor/client/valueStore.js +29 -0
- package/dist/editor/client/valueStore.js.map +1 -0
- package/dist/editor/commands/componentClipboardCommands.d.ts +35 -0
- package/dist/editor/commands/componentClipboardCommands.js +271 -0
- package/dist/editor/commands/componentClipboardCommands.js.map +1 -0
- package/dist/editor/commands/componentCommands.js +80 -19
- package/dist/editor/commands/componentCommands.js.map +1 -1
- package/dist/editor/commands/componentMenuGroups.d.ts +2 -0
- package/dist/editor/commands/componentMenuGroups.js +43 -0
- package/dist/editor/commands/componentMenuGroups.js.map +1 -0
- package/dist/editor/commands/itemCommands.d.ts +9 -0
- package/dist/editor/commands/itemCommands.js +76 -9
- package/dist/editor/commands/itemCommands.js.map +1 -1
- package/dist/editor/component-conversion/ComponentTypePickerDialog.d.ts +12 -0
- package/dist/editor/component-conversion/ComponentTypePickerDialog.js +40 -0
- package/dist/editor/component-conversion/ComponentTypePickerDialog.js.map +1 -0
- package/dist/editor/component-conversion/ConversionAiDebugButton.d.ts +17 -0
- package/dist/editor/component-conversion/ConversionAiDebugButton.js +80 -0
- package/dist/editor/component-conversion/ConversionAiDebugButton.js.map +1 -0
- package/dist/editor/component-conversion/ConvertComponentDialog.d.ts +28 -0
- package/dist/editor/component-conversion/ConvertComponentDialog.js +633 -0
- package/dist/editor/component-conversion/ConvertComponentDialog.js.map +1 -0
- package/dist/editor/component-conversion/conversionModel.d.ts +109 -0
- package/dist/editor/component-conversion/conversionModel.js +519 -0
- package/dist/editor/component-conversion/conversionModel.js.map +1 -0
- package/dist/editor/component-conversion/conversionService.d.ts +12 -0
- package/dist/editor/component-conversion/conversionService.js +16 -0
- package/dist/editor/component-conversion/conversionService.js.map +1 -0
- package/dist/editor/component-conversion/conversionTypes.d.ts +214 -0
- package/dist/editor/component-conversion/conversionTypes.js +2 -0
- package/dist/editor/component-conversion/conversionTypes.js.map +1 -0
- package/dist/editor/component-conversion/convertComponentsCommand.d.ts +25 -0
- package/dist/editor/component-conversion/convertComponentsCommand.js +196 -0
- package/dist/editor/component-conversion/convertComponentsCommand.js.map +1 -0
- package/dist/editor/editor-warnings/ValidationErrors.js +4 -4
- package/dist/editor/editor-warnings/ValidationErrors.js.map +1 -1
- package/dist/editor/field-types/AttachmentEditor.js +4 -3
- package/dist/editor/field-types/AttachmentEditor.js.map +1 -1
- package/dist/editor/field-types/DateFieldEditor.js +2 -1
- package/dist/editor/field-types/DateFieldEditor.js.map +1 -1
- package/dist/editor/field-types/DateTimeFieldEditor.js +2 -1
- package/dist/editor/field-types/DateTimeFieldEditor.js.map +1 -1
- package/dist/editor/field-types/DropLinkEditor.js +3 -1
- package/dist/editor/field-types/DropLinkEditor.js.map +1 -1
- package/dist/editor/field-types/DropListEditor.js +3 -1
- package/dist/editor/field-types/DropListEditor.js.map +1 -1
- package/dist/editor/field-types/FieldHistoryBoundary.js +28 -7
- package/dist/editor/field-types/FieldHistoryBoundary.js.map +1 -1
- package/dist/editor/field-types/ImageFieldEditor.js +3 -1
- package/dist/editor/field-types/ImageFieldEditor.js.map +1 -1
- package/dist/editor/field-types/InternalLinkFieldEditor.js +2 -1
- package/dist/editor/field-types/InternalLinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/LinkFieldEditor.js +2 -1
- package/dist/editor/field-types/LinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +68 -22
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/NameValueListEditor.js +3 -1
- package/dist/editor/field-types/NameValueListEditor.js.map +1 -1
- package/dist/editor/field-types/PictureFieldEditor.js +4 -2
- package/dist/editor/field-types/PictureFieldEditor.js.map +1 -1
- package/dist/editor/field-types/RawEditor.js +7 -4
- package/dist/editor/field-types/RawEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditor.d.ts +1 -2
- package/dist/editor/field-types/RichTextEditor.js +5 -26
- package/dist/editor/field-types/RichTextEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditorComponent.d.ts +1 -2
- package/dist/editor/field-types/RichTextEditorComponent.js +120 -34
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +68 -22
- package/dist/editor/field-types/SingleLineText.js.map +1 -1
- package/dist/editor/field-types/TreeListEditor.js +4 -2
- package/dist/editor/field-types/TreeListEditor.js.map +1 -1
- package/dist/editor/field-types/fieldStyles.d.ts +21 -0
- package/dist/editor/field-types/fieldStyles.js +22 -0
- package/dist/editor/field-types/fieldStyles.js.map +1 -0
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.d.ts +15 -1
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.js +27 -0
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.js.map +1 -1
- package/dist/editor/field-types/richtext/components/EditorDropdown.css +14 -0
- package/dist/editor/field-types/richtext/components/EditorDropdown.d.ts +3 -1
- package/dist/editor/field-types/richtext/components/EditorDropdown.js +33 -8
- package/dist/editor/field-types/richtext/components/EditorDropdown.js.map +1 -1
- package/dist/editor/field-types/richtext/components/ReactSlate.css +23 -54
- package/dist/editor/field-types/richtext/components/ReactSlate.d.ts +10 -1
- package/dist/editor/field-types/richtext/components/ReactSlate.js +365 -172
- package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -1
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js +1 -1
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js.map +1 -1
- package/dist/editor/field-types/richtext/components/ToolbarButton.js +13 -5
- package/dist/editor/field-types/richtext/components/ToolbarButton.js.map +1 -1
- package/dist/editor/field-types/richtext/config/pluginFactory.d.ts +2 -0
- package/dist/editor/field-types/richtext/config/pluginFactory.js +2 -1
- package/dist/editor/field-types/richtext/config/pluginFactory.js.map +1 -1
- package/dist/editor/field-types/richtext/hooks/useProfileCache.js +1 -0
- package/dist/editor/field-types/richtext/hooks/useProfileCache.js.map +1 -1
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.d.ts +0 -2
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js +2 -5
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js.map +1 -1
- package/dist/editor/field-types/richtext/types.d.ts +47 -2
- package/dist/editor/field-types/richtext/types.js +19 -0
- package/dist/editor/field-types/richtext/types.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/changeHighlight.d.ts +14 -0
- package/dist/editor/field-types/richtext/utils/changeHighlight.js +12 -1
- package/dist/editor/field-types/richtext/utils/changeHighlight.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/conversion.js +108 -32
- package/dist/editor/field-types/richtext/utils/conversion.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/cssClasses.d.ts +27 -0
- package/dist/editor/field-types/richtext/utils/cssClasses.js +98 -0
- package/dist/editor/field-types/richtext/utils/cssClasses.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/plugins.d.ts +40 -1
- package/dist/editor/field-types/richtext/utils/plugins.js +178 -4
- package/dist/editor/field-types/richtext/utils/plugins.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/profileMapper.d.ts +17 -1
- package/dist/editor/field-types/richtext/utils/profileMapper.js +153 -55
- package/dist/editor/field-types/richtext/utils/profileMapper.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/spellCheckText.d.ts +31 -0
- package/dist/editor/field-types/richtext/utils/spellCheckText.js +82 -0
- package/dist/editor/field-types/richtext/utils/spellCheckText.js.map +1 -0
- package/dist/editor/field-types/useFocusedFieldInput.d.ts +13 -0
- package/dist/editor/field-types/useFocusedFieldInput.js +50 -0
- package/dist/editor/field-types/useFocusedFieldInput.js.map +1 -0
- package/dist/editor/field-types/useFormFieldCaretPresence.js +8 -1
- package/dist/editor/field-types/useFormFieldCaretPresence.js.map +1 -1
- package/dist/editor/field-types/useFormFieldSelectionRange.d.ts +20 -13
- package/dist/editor/field-types/useFormFieldSelectionRange.js +40 -14
- package/dist/editor/field-types/useFormFieldSelectionRange.js.map +1 -1
- package/dist/editor/find-replace/findReplaceTargets.d.ts +2 -0
- package/dist/editor/find-replace/findReplaceTargets.js +2 -2
- package/dist/editor/find-replace/findReplaceTargets.js.map +1 -1
- package/dist/editor/itemContextMenuGroups.js +10 -1
- package/dist/editor/itemContextMenuGroups.js.map +1 -1
- package/dist/editor/media-selector/AiImageSearch.js +1 -163
- package/dist/editor/media-selector/AiImageSearch.js.map +1 -1
- package/dist/editor/media-selector/MediaDetailsView.d.ts +14 -0
- package/dist/editor/media-selector/MediaDetailsView.js +152 -0
- package/dist/editor/media-selector/MediaDetailsView.js.map +1 -0
- package/dist/editor/media-selector/MediaFolderBrowser.js +326 -106
- package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -1
- package/dist/editor/media-selector/TreeSelector.js +40 -2
- package/dist/editor/media-selector/TreeSelector.js.map +1 -1
- package/dist/editor/media-selector/UploadZone.js +1 -1
- package/dist/editor/media-selector/UploadZone.js.map +1 -1
- package/dist/editor/media-selector/useMediaFolderDrag.d.ts +26 -0
- package/dist/editor/media-selector/useMediaFolderDrag.js +153 -0
- package/dist/editor/media-selector/useMediaFolderDrag.js.map +1 -0
- package/dist/editor/menubar/ActiveUsers.js +5 -3
- package/dist/editor/menubar/ActiveUsers.js.map +1 -1
- package/dist/editor/menubar/PageSelector.js +21 -22
- package/dist/editor/menubar/PageSelector.js.map +1 -1
- package/dist/editor/menubar/ToolbarFactory.js +8 -2
- package/dist/editor/menubar/ToolbarFactory.js.map +1 -1
- package/dist/editor/menubar/VersionPreviewCard.js +4 -2
- package/dist/editor/menubar/VersionPreviewCard.js.map +1 -1
- package/dist/editor/menubar/WorkflowButton.js +10 -10
- package/dist/editor/menubar/WorkflowButton.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.d.ts +13 -0
- package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js +88 -0
- package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.d.ts +3 -4
- package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.js +15 -13
- package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.d.ts +9 -0
- package/dist/editor/menubar/toolbar-sections/EditControls.js +24 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/FullscreenControl.js +3 -2
- package/dist/editor/menubar/toolbar-sections/FullscreenControl.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/InsertControls.js +4 -2
- package/dist/editor/menubar/toolbar-sections/InsertControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/LayoutModeControls.js +3 -2
- package/dist/editor/menubar/toolbar-sections/LayoutModeControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.js +2 -2
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.d.ts +5 -0
- package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.js +16 -0
- package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/UndoRedoControls.js +2 -2
- package/dist/editor/menubar/toolbar-sections/UndoRedoControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +7 -7
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ViewportControls.d.ts +3 -4
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js +19 -31
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/index.d.ts +1 -1
- package/dist/editor/menubar/toolbar-sections/index.js +1 -1
- package/dist/editor/menubar/toolbar-sections/index.js.map +1 -1
- package/dist/editor/mobileBottomPanel.d.ts +40 -0
- package/dist/editor/mobileBottomPanel.js +63 -0
- package/dist/editor/mobileBottomPanel.js.map +1 -0
- package/dist/editor/notifications/useNotifications.js +12 -17
- package/dist/editor/notifications/useNotifications.js.map +1 -1
- package/dist/editor/page-editor-chrome/AgentChangeHighlightings.d.ts +3 -6
- package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js +8 -6
- package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.d.ts +5 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js +60 -10
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.d.ts +6 -0
- package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.js +100 -0
- package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.js.map +1 -0
- package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.d.ts +16 -0
- package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.js +23 -0
- package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.js.map +1 -0
- package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.d.ts +9 -0
- package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.js +32 -0
- package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.js.map +1 -0
- package/dist/editor/page-editor-chrome/CommentHighlightings.d.ts +4 -1
- package/dist/editor/page-editor-chrome/CommentHighlightings.js +195 -388
- package/dist/editor/page-editor-chrome/CommentHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.d.ts +14 -0
- package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.js +110 -0
- package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.js.map +1 -0
- package/dist/editor/page-editor-chrome/ConversionIndicators.d.ts +8 -0
- package/dist/editor/page-editor-chrome/ConversionIndicators.js +75 -0
- package/dist/editor/page-editor-chrome/ConversionIndicators.js.map +1 -0
- package/dist/editor/page-editor-chrome/DiffHighlightOverlay.d.ts +9 -13
- package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js +25 -20
- package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/DragInsertionOverlay.js +21 -17
- package/dist/editor/page-editor-chrome/DragInsertionOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.d.ts +1 -1
- package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.js +9 -6
- package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.js.map +1 -1
- package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.d.ts +15 -0
- package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.js +31 -0
- package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicator.d.ts +1 -1
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js +6 -3
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js +10 -6
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/FindReplaceHighlightings.d.ts +1 -1
- package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js +7 -4
- package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.d.ts +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js +13 -11
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenus.d.ts +1 -1
- package/dist/editor/page-editor-chrome/FrameMenus.js +7 -5
- package/dist/editor/page-editor-chrome/FrameMenus.js.map +1 -1
- package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.d.ts +2 -2
- package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.js +20 -39
- package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.js.map +1 -1
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.d.ts +1 -1
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js +27 -21
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/NoLayout.js +5 -3
- package/dist/editor/page-editor-chrome/NoLayout.js.map +1 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.d.ts +1 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.js +29 -23
- package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -1
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.d.ts +1 -1
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js +24 -21
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +10 -4
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.d.ts +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js +11 -10
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js.map +1 -1
- package/dist/editor/page-editor-chrome/SpellCheckHighlightings.d.ts +12 -0
- package/dist/editor/page-editor-chrome/SpellCheckHighlightings.js +197 -0
- package/dist/editor/page-editor-chrome/SpellCheckHighlightings.js.map +1 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.d.ts +1 -1
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js +226 -388
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/ValidationRulerMarks.d.ts +11 -0
- package/dist/editor/page-editor-chrome/ValidationRulerMarks.js +56 -0
- package/dist/editor/page-editor-chrome/ValidationRulerMarks.js.map +1 -0
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.d.ts +1 -1
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js +11 -8
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.d.ts +15 -2
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js +70 -9
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.d.ts +44 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.js +89 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.d.ts +17 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.js +53 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/geometry.d.ts +15 -0
- package/dist/editor/page-editor-chrome/overlay/geometry.js +40 -0
- package/dist/editor/page-editor-chrome/overlay/geometry.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.d.ts +11 -0
- package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.js +84 -0
- package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.d.ts +34 -0
- package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.js +229 -0
- package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.d.ts +9 -0
- package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.js +34 -0
- package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.d.ts +49 -0
- package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.js +241 -0
- package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.js.map +1 -0
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.d.ts +7 -0
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.js +133 -10
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.js.map +1 -1
- package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.d.ts +12 -0
- package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.js +79 -0
- package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.js.map +1 -0
- package/dist/editor/page-editor-chrome/useComponentDragHandle.js +1 -1
- package/dist/editor/page-editor-chrome/useComponentDragHandle.js.map +1 -1
- package/dist/editor/page-editor-chrome/useDragInsertionGesture.js +1 -1
- package/dist/editor/page-editor-chrome/useDragInsertionGesture.js.map +1 -1
- package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.d.ts +1 -1
- package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.js +4 -2
- package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.js.map +1 -1
- package/dist/editor/page-viewer/CanvasOverviewRuler.d.ts +11 -0
- package/dist/editor/page-viewer/CanvasOverviewRuler.js +65 -0
- package/dist/editor/page-viewer/CanvasOverviewRuler.js.map +1 -0
- package/dist/editor/page-viewer/DeviceToolbar.d.ts +1 -1
- package/dist/editor/page-viewer/DeviceToolbar.js +8 -3
- package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -1
- package/dist/editor/page-viewer/DynamicRenderingsBar.d.ts +23 -0
- package/dist/editor/page-viewer/DynamicRenderingsBar.js +28 -0
- package/dist/editor/page-viewer/DynamicRenderingsBar.js.map +1 -0
- package/dist/editor/page-viewer/DynamicRenderingsStrip.d.ts +18 -0
- package/dist/editor/page-viewer/DynamicRenderingsStrip.js +29 -0
- package/dist/editor/page-viewer/DynamicRenderingsStrip.js.map +1 -0
- package/dist/editor/page-viewer/EditorForm.js +29 -24
- package/dist/editor/page-viewer/EditorForm.js.map +1 -1
- package/dist/editor/page-viewer/FeedbackMargin.d.ts +57 -0
- package/dist/editor/page-viewer/FeedbackMargin.js +378 -0
- package/dist/editor/page-viewer/FeedbackMargin.js.map +1 -0
- package/dist/editor/page-viewer/FeedbackMarginController.d.ts +76 -0
- package/dist/editor/page-viewer/FeedbackMarginController.js +241 -0
- package/dist/editor/page-viewer/FeedbackMarginController.js.map +1 -0
- package/dist/editor/page-viewer/FeedbackMarginMarker.d.ts +16 -0
- package/dist/editor/page-viewer/FeedbackMarginMarker.js +24 -0
- package/dist/editor/page-viewer/FeedbackMarginMarker.js.map +1 -0
- package/dist/editor/page-viewer/FeedbackMarginResizeHandle.d.ts +23 -0
- package/dist/editor/page-viewer/FeedbackMarginResizeHandle.js +105 -0
- package/dist/editor/page-viewer/FeedbackMarginResizeHandle.js.map +1 -0
- package/dist/editor/page-viewer/InteractivePreviewBar.d.ts +24 -0
- package/dist/editor/page-viewer/InteractivePreviewBar.js +31 -0
- package/dist/editor/page-viewer/InteractivePreviewBar.js.map +1 -0
- package/dist/editor/page-viewer/MiniMap.d.ts +9 -3
- package/dist/editor/page-viewer/MiniMap.js +50 -60
- package/dist/editor/page-viewer/MiniMap.js.map +1 -1
- package/dist/editor/page-viewer/MinimapDropTargets.d.ts +1 -1
- package/dist/editor/page-viewer/MinimapDropTargets.js +9 -7
- package/dist/editor/page-viewer/MinimapDropTargets.js.map +1 -1
- package/dist/editor/page-viewer/MobileCommentsPanel.d.ts +16 -0
- package/dist/editor/page-viewer/MobileCommentsPanel.js +112 -0
- package/dist/editor/page-viewer/MobileCommentsPanel.js.map +1 -0
- package/dist/editor/page-viewer/PageViewer.js +22 -67
- package/dist/editor/page-viewer/PageViewer.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.d.ts +1 -0
- package/dist/editor/page-viewer/PageViewerFrame.js +625 -228
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/page-viewer/RenderingAiCheck.d.ts +18 -0
- package/dist/editor/page-viewer/RenderingAiCheck.js +45 -0
- package/dist/editor/page-viewer/RenderingAiCheck.js.map +1 -0
- package/dist/editor/page-viewer/RenderingApprovalDialog.d.ts +32 -0
- package/dist/editor/page-viewer/RenderingApprovalDialog.js +191 -0
- package/dist/editor/page-viewer/RenderingApprovalDialog.js.map +1 -0
- package/dist/editor/page-viewer/SealedClientCodePreview.d.ts +17 -0
- package/dist/editor/page-viewer/SealedClientCodePreview.js +38 -0
- package/dist/editor/page-viewer/SealedClientCodePreview.js.map +1 -0
- package/dist/editor/page-viewer/bridgeFieldPatch.d.ts +9 -0
- package/dist/editor/page-viewer/bridgeFieldPatch.js +21 -0
- package/dist/editor/page-viewer/bridgeFieldPatch.js.map +1 -1
- package/dist/editor/page-viewer/bridgeInlineEditSession.js +8 -0
- package/dist/editor/page-viewer/bridgeInlineEditSession.js.map +1 -1
- package/dist/editor/page-viewer/canvasFrameNavigation.d.ts +18 -0
- package/dist/editor/page-viewer/canvasFrameNavigation.js +36 -0
- package/dist/editor/page-viewer/canvasFrameNavigation.js.map +1 -0
- package/dist/editor/page-viewer/canvasLoadSettling.d.ts +42 -0
- package/dist/editor/page-viewer/canvasLoadSettling.js +46 -0
- package/dist/editor/page-viewer/canvasLoadSettling.js.map +1 -0
- package/dist/editor/page-viewer/canvasScrollHandoff.d.ts +34 -0
- package/dist/editor/page-viewer/canvasScrollHandoff.js +55 -0
- package/dist/editor/page-viewer/canvasScrollHandoff.js.map +1 -0
- package/dist/editor/page-viewer/canvasScrollRestore.d.ts +28 -0
- package/dist/editor/page-viewer/canvasScrollRestore.js +31 -0
- package/dist/editor/page-viewer/canvasScrollRestore.js.map +1 -0
- package/dist/editor/page-viewer/feedbackMarginLayout.d.ts +119 -0
- package/dist/editor/page-viewer/feedbackMarginLayout.js +155 -0
- package/dist/editor/page-viewer/feedbackMarginLayout.js.map +1 -0
- package/dist/editor/page-viewer/feedbackMarginSources.d.ts +36 -0
- package/dist/editor/page-viewer/feedbackMarginSources.js +196 -0
- package/dist/editor/page-viewer/feedbackMarginSources.js.map +1 -0
- package/dist/editor/page-viewer/feedbackMarginWidth.d.ts +43 -0
- package/dist/editor/page-viewer/feedbackMarginWidth.js +107 -0
- package/dist/editor/page-viewer/feedbackMarginWidth.js.map +1 -0
- package/dist/editor/page-viewer/interactivePreview.d.ts +168 -0
- package/dist/editor/page-viewer/interactivePreview.js +344 -0
- package/dist/editor/page-viewer/interactivePreview.js.map +1 -0
- package/dist/editor/page-viewer/minimapViewport.js +5 -2
- package/dist/editor/page-viewer/minimapViewport.js.map +1 -1
- package/dist/editor/page-viewer/openPageItems.d.ts +29 -0
- package/dist/editor/page-viewer/openPageItems.js +73 -0
- package/dist/editor/page-viewer/openPageItems.js.map +1 -0
- package/dist/editor/page-viewer/overviewRuler.d.ts +128 -0
- package/dist/editor/page-viewer/overviewRuler.js +226 -0
- package/dist/editor/page-viewer/overviewRuler.js.map +1 -0
- package/dist/editor/page-viewer/pageViewContext.d.ts +99 -37
- package/dist/editor/page-viewer/pageViewContext.js +207 -238
- package/dist/editor/page-viewer/pageViewContext.js.map +1 -1
- package/dist/editor/page-viewer/renderingApproval.d.ts +59 -0
- package/dist/editor/page-viewer/renderingApproval.js +186 -0
- package/dist/editor/page-viewer/renderingApproval.js.map +1 -0
- package/dist/editor/page-viewer/renderingChanges.d.ts +29 -0
- package/dist/editor/page-viewer/renderingChanges.js +40 -0
- package/dist/editor/page-viewer/renderingChanges.js.map +1 -0
- package/dist/editor/page-viewer/scrollIntoViewTextRanges.d.ts +23 -0
- package/dist/editor/page-viewer/scrollIntoViewTextRanges.js +26 -0
- package/dist/editor/page-viewer/scrollIntoViewTextRanges.js.map +1 -0
- package/dist/editor/page-viewer/useInteractivePreview.d.ts +77 -0
- package/dist/editor/page-viewer/useInteractivePreview.js +210 -0
- package/dist/editor/page-viewer/useInteractivePreview.js.map +1 -0
- package/dist/editor/pageModel.d.ts +12 -0
- package/dist/editor/personalization/ConditionTreeEditor.js +1 -1
- package/dist/editor/personalization/ConditionTreeEditor.js.map +1 -1
- package/dist/editor/personalization/PersonalizationPanel.js +1 -1
- package/dist/editor/personalization/PersonalizationPanel.js.map +1 -1
- package/dist/editor/reviews/CollapsibleText.d.ts +13 -0
- package/dist/editor/reviews/CollapsibleText.js +41 -0
- package/dist/editor/reviews/CollapsibleText.js.map +1 -0
- package/dist/editor/reviews/Comment.d.ts +10 -1
- package/dist/editor/reviews/Comment.js +47 -26
- package/dist/editor/reviews/Comment.js.map +1 -1
- package/dist/editor/reviews/CommentDisplayPopover.js +29 -25
- package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/CommentEditor.d.ts +25 -1
- package/dist/editor/reviews/CommentEditor.js +130 -24
- package/dist/editor/reviews/CommentEditor.js.map +1 -1
- package/dist/editor/reviews/CommentPopover.d.ts +0 -4
- package/dist/editor/reviews/CommentPopover.js +4 -8
- package/dist/editor/reviews/CommentPopover.js.map +1 -1
- package/dist/editor/reviews/CommentQuote.d.ts +10 -1
- package/dist/editor/reviews/CommentQuote.js +15 -10
- package/dist/editor/reviews/CommentQuote.js.map +1 -1
- package/dist/editor/reviews/CommentTargetOutline.d.ts +13 -0
- package/dist/editor/reviews/CommentTargetOutline.js +21 -0
- package/dist/editor/reviews/CommentTargetOutline.js.map +1 -0
- package/dist/editor/reviews/CommentTargetPickerDomLayer.d.ts +7 -0
- package/dist/editor/reviews/CommentTargetPickerDomLayer.js +117 -0
- package/dist/editor/reviews/CommentTargetPickerDomLayer.js.map +1 -0
- package/dist/editor/reviews/CommentThreadAgentLink.d.ts +6 -1
- package/dist/editor/reviews/CommentThreadAgentLink.js +4 -4
- package/dist/editor/reviews/CommentThreadAgentLink.js.map +1 -1
- package/dist/editor/reviews/CommentThreadCard.d.ts +34 -0
- package/dist/editor/reviews/CommentThreadCard.js +156 -0
- package/dist/editor/reviews/CommentThreadCard.js.map +1 -0
- package/dist/editor/reviews/CommentView.d.ts +7 -1
- package/dist/editor/reviews/CommentView.js +24 -6
- package/dist/editor/reviews/CommentView.js.map +1 -1
- package/dist/editor/reviews/Comments.js +5 -14
- package/dist/editor/reviews/Comments.js.map +1 -1
- package/dist/editor/reviews/CreateReviewDialog.js +36 -9
- package/dist/editor/reviews/CreateReviewDialog.js.map +1 -1
- package/dist/editor/reviews/EditReviewSettingsDialog.js +1 -1
- package/dist/editor/reviews/EditReviewSettingsDialog.js.map +1 -1
- package/dist/editor/reviews/FeedbackCard.d.ts +16 -1
- package/dist/editor/reviews/FeedbackCard.js +14 -3
- package/dist/editor/reviews/FeedbackCard.js.map +1 -1
- package/dist/editor/reviews/FeedbackFilters.d.ts +9 -5
- package/dist/editor/reviews/FeedbackFilters.js +15 -36
- package/dist/editor/reviews/FeedbackFilters.js.map +1 -1
- package/dist/editor/reviews/FeedbackModeIntro.d.ts +7 -1
- package/dist/editor/reviews/FeedbackModeIntro.js +11 -6
- package/dist/editor/reviews/FeedbackModeIntro.js.map +1 -1
- package/dist/editor/reviews/MentionText.d.ts +2 -1
- package/dist/editor/reviews/MentionText.js +5 -3
- package/dist/editor/reviews/MentionText.js.map +1 -1
- package/dist/editor/reviews/MultiReviewManager.js +18 -3
- package/dist/editor/reviews/MultiReviewManager.js.map +1 -1
- package/dist/editor/reviews/ReviewItemsPanel.js +4 -0
- package/dist/editor/reviews/ReviewItemsPanel.js.map +1 -1
- package/dist/editor/reviews/SuggestedEdit.d.ts +10 -1
- package/dist/editor/reviews/SuggestedEdit.js +77 -10
- package/dist/editor/reviews/SuggestedEdit.js.map +1 -1
- package/dist/editor/reviews/SuggestionCommentThread.d.ts +5 -1
- package/dist/editor/reviews/SuggestionCommentThread.js +48 -17
- package/dist/editor/reviews/SuggestionCommentThread.js.map +1 -1
- package/dist/editor/reviews/SuggestionDisplayPopover.d.ts +1 -3
- package/dist/editor/reviews/SuggestionDisplayPopover.js +2 -7
- package/dist/editor/reviews/SuggestionDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/SuggestionThreadCard.d.ts +19 -0
- package/dist/editor/reviews/SuggestionThreadCard.js +25 -0
- package/dist/editor/reviews/SuggestionThreadCard.js.map +1 -0
- package/dist/editor/reviews/addCommentOnTarget.d.ts +22 -0
- package/dist/editor/reviews/addCommentOnTarget.js +32 -0
- package/dist/editor/reviews/addCommentOnTarget.js.map +1 -0
- package/dist/editor/reviews/applySuggestedEditActions.js +7 -1
- package/dist/editor/reviews/applySuggestedEditActions.js.map +1 -1
- package/dist/editor/reviews/balloonLayout.d.ts +51 -0
- package/dist/editor/reviews/balloonLayout.js +101 -0
- package/dist/editor/reviews/balloonLayout.js.map +1 -0
- package/dist/editor/reviews/commentImages.d.ts +1 -2
- package/dist/editor/reviews/commentImages.js +1 -37
- package/dist/editor/reviews/commentImages.js.map +1 -1
- package/dist/editor/reviews/commentTargetPicker.d.ts +114 -0
- package/dist/editor/reviews/commentTargetPicker.js +153 -0
- package/dist/editor/reviews/commentTargetPicker.js.map +1 -0
- package/dist/editor/reviews/feedbackAvatar.js +2 -1
- package/dist/editor/reviews/feedbackAvatar.js.map +1 -1
- package/dist/editor/reviews/feedbackBalloonDate.d.ts +8 -0
- package/dist/editor/reviews/feedbackBalloonDate.js +22 -0
- package/dist/editor/reviews/feedbackBalloonDate.js.map +1 -0
- package/dist/editor/reviews/feedbackDrafts.d.ts +49 -0
- package/dist/editor/reviews/feedbackDrafts.js +74 -0
- package/dist/editor/reviews/feedbackDrafts.js.map +1 -0
- package/dist/editor/reviews/feedbackHoverState.d.ts +18 -0
- package/dist/editor/reviews/feedbackHoverState.js +35 -0
- package/dist/editor/reviews/feedbackHoverState.js.map +1 -0
- package/dist/editor/reviews/feedbackPersonFilter.d.ts +3 -0
- package/dist/editor/reviews/feedbackPersonFilter.js +32 -0
- package/dist/editor/reviews/feedbackPersonFilter.js.map +1 -0
- package/dist/editor/reviews/feedbackSelection.js +7 -3
- package/dist/editor/reviews/feedbackSelection.js.map +1 -1
- package/dist/editor/reviews/feedbackThreadSelection.d.ts +10 -0
- package/dist/editor/reviews/feedbackThreadSelection.js +31 -0
- package/dist/editor/reviews/feedbackThreadSelection.js.map +1 -0
- package/dist/editor/reviews/feedbackThreads.d.ts +50 -0
- package/dist/editor/reviews/feedbackThreads.js +135 -0
- package/dist/editor/reviews/feedbackThreads.js.map +1 -0
- package/dist/editor/reviews/feedbackWheelForwarding.d.ts +34 -0
- package/dist/editor/reviews/feedbackWheelForwarding.js +108 -0
- package/dist/editor/reviews/feedbackWheelForwarding.js.map +1 -0
- package/dist/editor/reviews/openCommentsFeedback.d.ts +1 -1
- package/dist/editor/reviews/openCommentsFeedback.js +2 -1
- package/dist/editor/reviews/openCommentsFeedback.js.map +1 -1
- package/dist/editor/reviews/pendingReviewSelection.d.ts +13 -0
- package/dist/editor/reviews/pendingReviewSelection.js +29 -0
- package/dist/editor/reviews/pendingReviewSelection.js.map +1 -0
- package/dist/editor/reviews/requestReview.d.ts +27 -0
- package/dist/editor/reviews/requestReview.js +36 -0
- package/dist/editor/reviews/requestReview.js.map +1 -0
- package/dist/editor/reviews/reviewUrlScope.d.ts +23 -0
- package/dist/editor/reviews/reviewUrlScope.js +86 -0
- package/dist/editor/reviews/reviewUrlScope.js.map +1 -0
- package/dist/editor/reviews/scrollWithin.d.ts +29 -0
- package/dist/editor/reviews/scrollWithin.js +87 -0
- package/dist/editor/reviews/scrollWithin.js.map +1 -0
- package/dist/editor/reviews/subtreeFeedback.d.ts +57 -0
- package/dist/editor/reviews/subtreeFeedback.js +137 -0
- package/dist/editor/reviews/subtreeFeedback.js.map +1 -0
- package/dist/editor/reviews/useCommentImagePaste.d.ts +9 -1
- package/dist/editor/reviews/useCommentImagePaste.js +68 -4
- package/dist/editor/reviews/useCommentImagePaste.js.map +1 -1
- package/dist/editor/reviews/useFeedbackThreads.d.ts +35 -0
- package/dist/editor/reviews/useFeedbackThreads.js +137 -0
- package/dist/editor/reviews/useFeedbackThreads.js.map +1 -0
- package/dist/editor/reviews/useMeasuredHeights.d.ts +25 -0
- package/dist/editor/reviews/useMeasuredHeights.js +176 -0
- package/dist/editor/reviews/useMeasuredHeights.js.map +1 -0
- package/dist/editor/reviews/usePendingFeedbackFocus.d.ts +7 -0
- package/dist/editor/reviews/usePendingFeedbackFocus.js +42 -0
- package/dist/editor/reviews/usePendingFeedbackFocus.js.map +1 -0
- package/dist/editor/services/agentService.d.ts +101 -5
- package/dist/editor/services/agentService.js +16 -0
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/aiService.d.ts +2 -0
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/editor/services/contentService.d.ts +11 -1
- package/dist/editor/services/contentService.js +2 -1
- package/dist/editor/services/contentService.js.map +1 -1
- package/dist/editor/services/editService.d.ts +2 -0
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/services/indexService.d.ts +1 -0
- package/dist/editor/services/indexService.js +4 -0
- package/dist/editor/services/indexService.js.map +1 -1
- package/dist/editor/services/mcpAccessService.d.ts +93 -0
- package/dist/editor/services/mcpAccessService.js +41 -0
- package/dist/editor/services/mcpAccessService.js.map +1 -0
- package/dist/editor/services/previewTokenService.d.ts +14 -0
- package/dist/editor/services/previewTokenService.js +34 -0
- package/dist/editor/services/previewTokenService.js.map +1 -0
- package/dist/editor/services/renderingsService.d.ts +117 -0
- package/dist/editor/services/renderingsService.js +245 -0
- package/dist/editor/services/renderingsService.js.map +1 -0
- package/dist/editor/services/reviewsService.d.ts +6 -1
- package/dist/editor/services/reviewsService.js +14 -6
- package/dist/editor/services/reviewsService.js.map +1 -1
- package/dist/editor/services/serviceHelper.d.ts +17 -1
- package/dist/editor/services/serviceHelper.js +67 -12
- package/dist/editor/services/serviceHelper.js.map +1 -1
- package/dist/editor/services/spellCheckService.d.ts +13 -0
- package/dist/editor/services/spellCheckService.js +33 -0
- package/dist/editor/services/spellCheckService.js.map +1 -0
- package/dist/editor/services/suggestedEditsService.d.ts +1 -0
- package/dist/editor/services/suggestedEditsService.js +7 -0
- package/dist/editor/services/suggestedEditsService.js.map +1 -1
- package/dist/editor/settings/MigrationJournalCard.js +2 -2
- package/dist/editor/settings/MigrationJournalCard.js.map +1 -1
- package/dist/editor/settings/StatusSummary.js +5 -2
- package/dist/editor/settings/StatusSummary.js.map +1 -1
- package/dist/editor/settings/index/CollectionWarningsDisplay.js +1 -1
- package/dist/editor/settings/index/CollectionWarningsDisplay.js.map +1 -1
- package/dist/editor/settings/index/IndexGenerationsSection.d.ts +4 -5
- package/dist/editor/settings/index/IndexGenerationsSection.js +83 -33
- package/dist/editor/settings/index/IndexGenerationsSection.js.map +1 -1
- package/dist/editor/settings/panels/AgentProfileConfigPanel.js +1 -1
- package/dist/editor/settings/panels/AgentProfileConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/AgentToolsPanel.js +1 -1
- package/dist/editor/settings/panels/AgentToolsPanel.js.map +1 -1
- package/dist/editor/settings/panels/JavaScriptToolAgentPanel.js +1 -1
- package/dist/editor/settings/panels/JavaScriptToolAgentPanel.js.map +1 -1
- package/dist/editor/settings/panels/JavaScriptToolConfigPanel.js +1 -1
- package/dist/editor/settings/panels/JavaScriptToolConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/McpAccessPanel.d.ts +7 -0
- package/dist/editor/settings/panels/McpAccessPanel.js +96 -0
- package/dist/editor/settings/panels/McpAccessPanel.js.map +1 -0
- package/dist/editor/settings/panels/McpAccessSettingsView.d.ts +8 -0
- package/dist/editor/settings/panels/McpAccessSettingsView.js +221 -0
- package/dist/editor/settings/panels/McpAccessSettingsView.js.map +1 -0
- package/dist/editor/settings/panels/ModelConfigPanel.js +1 -0
- package/dist/editor/settings/panels/ModelConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/ModelsPanel.js +60 -6
- package/dist/editor/settings/panels/ModelsPanel.js.map +1 -1
- package/dist/editor/settings/panels/PersistentLogsPanel.js +2 -1
- package/dist/editor/settings/panels/PersistentLogsPanel.js.map +1 -1
- package/dist/editor/settings/panels/ProjectTemplateAgentPanel.js +1 -1
- package/dist/editor/settings/panels/ProjectTemplateAgentPanel.js.map +1 -1
- package/dist/editor/settings/panels/ProvidersPanel.js +2 -1
- package/dist/editor/settings/panels/ProvidersPanel.js.map +1 -1
- package/dist/editor/settings/panels/SearchConfigPanel.js +6 -5
- package/dist/editor/settings/panels/SearchConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/SpellCheckPanel.d.ts +8 -0
- package/dist/editor/settings/panels/SpellCheckPanel.js +253 -0
- package/dist/editor/settings/panels/SpellCheckPanel.js.map +1 -0
- package/dist/editor/settings/panels/StatusPanel.js +5 -6
- package/dist/editor/settings/panels/StatusPanel.js.map +1 -1
- package/dist/editor/settings/panels/UserPreferencesPanel.js +5 -2
- package/dist/editor/settings/panels/UserPreferencesPanel.js.map +1 -1
- package/dist/editor/settings/panels/index.d.ts +2 -0
- package/dist/editor/settings/panels/index.js +2 -0
- package/dist/editor/settings/panels/index.js.map +1 -1
- package/dist/editor/sidebar/ComponentPalette.js +7 -3
- package/dist/editor/sidebar/ComponentPalette.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.d.ts +1 -1
- package/dist/editor/sidebar/ComponentTree.js +32 -56
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/sidebar/DictionaryEditor.js +2 -1
- package/dist/editor/sidebar/DictionaryEditor.js.map +1 -1
- package/dist/editor/sidebar/EditHistory.js +5 -4
- package/dist/editor/sidebar/EditHistory.js.map +1 -1
- package/dist/editor/sidebar/FeedbackSidebar.d.ts +7 -0
- package/dist/editor/sidebar/FeedbackSidebar.js +300 -0
- package/dist/editor/sidebar/FeedbackSidebar.js.map +1 -0
- package/dist/editor/sidebar/OperationDetailsContent.js +50 -0
- package/dist/editor/sidebar/OperationDetailsContent.js.map +1 -1
- package/dist/editor/sidebar/OperationItem.js +2 -0
- package/dist/editor/sidebar/OperationItem.js.map +1 -1
- package/dist/editor/sidebar/Sessions.js +3 -1
- package/dist/editor/sidebar/Sessions.js.map +1 -1
- package/dist/editor/sidebar/Validation.js +1 -1
- package/dist/editor/sidebar/Validation.js.map +1 -1
- package/dist/editor/sidebar/Workbox.js +3 -108
- package/dist/editor/sidebar/Workbox.js.map +1 -1
- package/dist/editor/sidebar/liveComponentThumbnails.d.ts +1 -1
- package/dist/editor/sidebar/liveComponentThumbnails.js +19 -14
- package/dist/editor/sidebar/liveComponentThumbnails.js.map +1 -1
- package/dist/editor/spellcheck/canvasSpellCheckContextMenu.d.ts +30 -0
- package/dist/editor/spellcheck/canvasSpellCheckContextMenu.js +69 -0
- package/dist/editor/spellcheck/canvasSpellCheckContextMenu.js.map +1 -0
- package/dist/editor/spellcheck/htmlSpellDocument.d.ts +60 -0
- package/dist/editor/spellcheck/htmlSpellDocument.js +181 -0
- package/dist/editor/spellcheck/htmlSpellDocument.js.map +1 -0
- package/dist/editor/spellcheck/htmlSpellTokenizer.d.ts +45 -0
- package/dist/editor/spellcheck/htmlSpellTokenizer.js +277 -0
- package/dist/editor/spellcheck/htmlSpellTokenizer.js.map +1 -0
- package/dist/editor/spellcheck/replacementGuard.d.ts +27 -0
- package/dist/editor/spellcheck/replacementGuard.js +29 -0
- package/dist/editor/spellcheck/replacementGuard.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckCanvasStore.d.ts +17 -0
- package/dist/editor/spellcheck/spellCheckCanvasStore.js +37 -0
- package/dist/editor/spellcheck/spellCheckCanvasStore.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckCanvasTargets.d.ts +71 -0
- package/dist/editor/spellcheck/spellCheckCanvasTargets.js +126 -0
- package/dist/editor/spellcheck/spellCheckCanvasTargets.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckClient.d.ts +66 -0
- package/dist/editor/spellcheck/spellCheckClient.js +0 -0
- package/dist/editor/spellcheck/spellCheckClient.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckContextMenu.d.ts +52 -0
- package/dist/editor/spellcheck/spellCheckContextMenu.js +120 -0
- package/dist/editor/spellcheck/spellCheckContextMenu.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckReplace.d.ts +8 -0
- package/dist/editor/spellcheck/spellCheckReplace.js +20 -0
- package/dist/editor/spellcheck/spellCheckReplace.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckStyles.d.ts +11 -0
- package/dist/editor/spellcheck/spellCheckStyles.js +12 -0
- package/dist/editor/spellcheck/spellCheckStyles.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckTypes.d.ts +94 -0
- package/dist/editor/spellcheck/spellCheckTypes.js +2 -0
- package/dist/editor/spellcheck/spellCheckTypes.js.map +1 -0
- package/dist/editor/spellcheck/textMarkHitTest.d.ts +14 -0
- package/dist/editor/spellcheck/textMarkHitTest.js +39 -0
- package/dist/editor/spellcheck/textMarkHitTest.js.map +1 -0
- package/dist/editor/spellcheck/useSpellCheck.d.ts +16 -0
- package/dist/editor/spellcheck/useSpellCheck.js +57 -0
- package/dist/editor/spellcheck/useSpellCheck.js.map +1 -0
- package/dist/editor/ui/DynamicRenderingsPublishWarning.d.ts +14 -0
- package/dist/editor/ui/DynamicRenderingsPublishWarning.js +40 -0
- package/dist/editor/ui/DynamicRenderingsPublishWarning.js.map +1 -0
- package/dist/editor/ui/ItemNameDialogNew.js +11 -2
- package/dist/editor/ui/ItemNameDialogNew.js.map +1 -1
- package/dist/editor/ui/ItemSearch.d.ts +2 -0
- package/dist/editor/ui/ItemSearch.js +2 -2
- package/dist/editor/ui/ItemSearch.js.map +1 -1
- package/dist/editor/ui/PublishDialog.d.ts +2 -0
- package/dist/editor/ui/PublishDialog.js +4 -1
- package/dist/editor/ui/PublishDialog.js.map +1 -1
- package/dist/editor/ui/PublishItemDialog.js +3 -2
- package/dist/editor/ui/PublishItemDialog.js.map +1 -1
- package/dist/editor/ui/PublishReadinessSummary.js +1 -1
- package/dist/editor/ui/PublishReadinessSummary.js.map +1 -1
- package/dist/editor/ui/PublishRestrictionsDialog.d.ts +33 -0
- package/dist/editor/ui/PublishRestrictionsDialog.js +208 -38
- package/dist/editor/ui/PublishRestrictionsDialog.js.map +1 -1
- package/dist/editor/ui/RootItemPicker.d.ts +18 -0
- package/dist/editor/ui/RootItemPicker.js +112 -0
- package/dist/editor/ui/RootItemPicker.js.map +1 -0
- package/dist/editor/ui/WorkboxItemsTable.js +1 -1
- package/dist/editor/ui/WorkboxItemsTable.js.map +1 -1
- package/dist/editor/utils/dataTransferImages.d.ts +7 -0
- package/dist/editor/utils/dataTransferImages.js +43 -0
- package/dist/editor/utils/dataTransferImages.js.map +1 -0
- package/dist/editor/utils/itemConverters.js +9 -0
- package/dist/editor/utils/itemConverters.js.map +1 -1
- package/dist/editor/utils/keyboardNavigation.js +38 -4
- package/dist/editor/utils/keyboardNavigation.js.map +1 -1
- package/dist/editor/utils.d.ts +4 -4
- package/dist/editor/utils.js +9 -8
- package/dist/editor/utils.js.map +1 -1
- package/dist/editor/validation/navigateToValidationIssue.d.ts +2 -2
- package/dist/editor/validation/navigateToValidationIssue.js +1 -1
- package/dist/editor/validation/navigateToValidationIssue.js.map +1 -1
- package/dist/editor/validation/validationRulerIssues.d.ts +17 -0
- package/dist/editor/validation/validationRulerIssues.js +44 -0
- package/dist/editor/validation/validationRulerIssues.js.map +1 -0
- package/dist/editor/views/CompareView.js +3 -4
- package/dist/editor/views/CompareView.js.map +1 -1
- package/dist/editor/views/EditorSlot.js +10 -4
- package/dist/editor/views/EditorSlot.js.map +1 -1
- package/dist/editor/views/ItemEditor.d.ts +3 -1
- package/dist/editor/views/ItemEditor.js +43 -38
- package/dist/editor/views/ItemEditor.js.map +1 -1
- package/dist/editor/views/ItemEditorPane.js +3 -3
- package/dist/editor/views/ItemEditorPane.js.map +1 -1
- package/dist/editor/views/SingleEditView.js +10 -32
- package/dist/editor/views/SingleEditView.js.map +1 -1
- package/dist/editor/views/editorSlotContext.js +62 -90
- package/dist/editor/views/editorSlotContext.js.map +1 -1
- package/dist/index.d.ts +11 -6
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/licensing/FeatureGate.js +1 -1
- package/dist/licensing/FeatureGate.js.map +1 -1
- package/dist/licensing/LicenseContext.js +31 -17
- package/dist/licensing/LicenseContext.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/setup/services/setupWizardService.d.ts +6 -2
- package/dist/setup/services/setupWizardService.js +10 -0
- package/dist/setup/services/setupWizardService.js.map +1 -1
- package/dist/setup/wizard/steps/AddModelDialog.js +1 -0
- package/dist/setup/wizard/steps/AddModelDialog.js.map +1 -1
- package/dist/setup/wizard/steps/ImportModelDialog.js +2 -1
- package/dist/setup/wizard/steps/ImportModelDialog.js.map +1 -1
- package/dist/splash-screen/ModernSplashScreen.js +4 -3
- package/dist/splash-screen/ModernSplashScreen.js.map +1 -1
- package/dist/splash-screen/RecentPages.js +5 -2
- package/dist/splash-screen/RecentPages.js.map +1 -1
- package/dist/task-board/TaskBoardWorkspace.js +49 -12
- package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
- package/dist/task-board/components/GoalsMatrix.js +1 -1
- package/dist/task-board/components/GoalsMatrix.js.map +1 -1
- package/dist/task-board/components/IssuePanel.js +4 -4
- package/dist/task-board/components/IssuePanel.js.map +1 -1
- package/dist/task-board/components/ProjectBudgetBanner.js +1 -1
- package/dist/task-board/components/ProjectBudgetBanner.js.map +1 -1
- package/dist/task-board/components/ProjectGoalsPanel.js +1 -1
- package/dist/task-board/components/ProjectGoalsPanel.js.map +1 -1
- package/dist/task-board/components/TaskDetailPanel.js +18 -8
- package/dist/task-board/components/TaskDetailPanel.js.map +1 -1
- package/dist/task-board/components/WizardCommunicationCards.js +1 -1
- package/dist/task-board/components/WizardCommunicationCards.js.map +1 -1
- package/dist/task-board/services/taskService.d.ts +1 -2
- package/dist/task-board/services/taskService.js +0 -3
- package/dist/task-board/services/taskService.js.map +1 -1
- package/dist/task-board/taskBlockers.d.ts +10 -0
- package/dist/task-board/taskBlockers.js +66 -0
- package/dist/task-board/taskBlockers.js.map +1 -0
- package/dist/task-board/types.d.ts +0 -7
- package/dist/task-board/utils/projectDashboardModel.js +7 -1
- package/dist/task-board/utils/projectDashboardModel.js.map +1 -1
- package/dist/task-board/views/DependencyGraphView.d.ts +22 -0
- package/dist/task-board/views/DependencyGraphView.js +111 -14
- package/dist/task-board/views/DependencyGraphView.js.map +1 -1
- package/dist/task-board/views/KanbanView.js +8 -10
- package/dist/task-board/views/KanbanView.js.map +1 -1
- package/dist/task-board/views/ProjectDashboardView.js +5 -13
- package/dist/task-board/views/ProjectDashboardView.js.map +1 -1
- package/dist/tour/Tour.js +4 -1
- package/dist/tour/Tour.js.map +1 -1
- package/dist/tour/sandbox-tour-copy.d.ts +8 -0
- package/dist/tour/sandbox-tour-copy.js +8 -0
- package/dist/tour/sandbox-tour-copy.js.map +1 -1
- package/dist/tour/sandbox-tour.d.ts +3 -0
- package/dist/tour/sandbox-tour.js +107 -3
- package/dist/tour/sandbox-tour.js.map +1 -1
- package/dist/types.d.ts +85 -1
- package/package.json +6 -2
- package/styles.css +17 -0
- package/dist/editor/page-editor-chrome/bridgeLinkValue.d.ts +0 -10
- package/dist/editor/page-editor-chrome/bridgeLinkValue.js +0 -55
- package/dist/editor/page-editor-chrome/bridgeLinkValue.js.map +0 -1
|
@@ -0,0 +1,633 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { AlertTriangle, Check, ChevronLeft, ChevronRight, Info, Replace, RotateCcw, Sparkles, } from "lucide-react";
|
|
4
|
+
import { Dialog, DialogContent } from "../../components/ui/dialog";
|
|
5
|
+
import { StyledDialogTitle } from "../../components/ui/styled-dialog-title";
|
|
6
|
+
import { Button } from "../../components/ui/button";
|
|
7
|
+
import { Select } from "../../components/ui/select";
|
|
8
|
+
import { Textarea } from "../../components/ui/textarea";
|
|
9
|
+
import { sanitizeHtml } from "../../lib/sanitize";
|
|
10
|
+
import { Alert, AlertDescription } from "../../components/ui/alert";
|
|
11
|
+
import { MultiSwitchButton } from "../../components/ui/multi-switch-button";
|
|
12
|
+
import { useEditContext } from "../client/editContext";
|
|
13
|
+
import DialogButtons from "../ui/DialogButtons";
|
|
14
|
+
import { LoadingState } from "../ui/LoadingState";
|
|
15
|
+
import { Spinner } from "../ui/Spinner";
|
|
16
|
+
import { buildClientRows, buildConversions, buildCurrentValues, clearLanguageValues, countPendingAiWrites, createDialogState, encodeRowValue, getLostFields, getMergedSourceIds, getRowOptions, getVisibleChildren, humanizePlaceholder, isAiRow, mergeRefinedPlan, normalizeId, setPreview, updateChild, updateRole, updateRow, } from "./conversionModel";
|
|
17
|
+
import { planComponentConversion, previewConversionValue } from "./conversionService";
|
|
18
|
+
import { ConversionAiDebugButton } from "./ConversionAiDebugButton";
|
|
19
|
+
const MODEL_STORAGE_KEY = "convertComponent.modelId";
|
|
20
|
+
function readStoredModelId() {
|
|
21
|
+
try {
|
|
22
|
+
return window.localStorage.getItem(MODEL_STORAGE_KEY) ?? undefined;
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function storeModelId(modelId) {
|
|
29
|
+
try {
|
|
30
|
+
window.localStorage.setItem(MODEL_STORAGE_KEY, modelId);
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
// Remembering the model is a convenience only.
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Reviews and adjusts a component conversion before it runs. One AI call maps
|
|
38
|
+
* the fields and writes the texts of every component in every language; the
|
|
39
|
+
* user steers it with instructions, picks the model and can change any row.
|
|
40
|
+
* Returns the operation's conversions; nothing is written here.
|
|
41
|
+
*/
|
|
42
|
+
export function ConvertComponentDialog(props) {
|
|
43
|
+
const { pageItem, componentIds, target } = props;
|
|
44
|
+
const editContext = useEditContext();
|
|
45
|
+
const showDebug = editContext?.userInfo?.preferences?.showDebugButtons ?? false;
|
|
46
|
+
const [plan, setPlan] = useState(null);
|
|
47
|
+
const [state, setState] = useState(null);
|
|
48
|
+
const [error, setError] = useState(null);
|
|
49
|
+
const [loading, setLoading] = useState(true);
|
|
50
|
+
const [mode, setMode] = useState(undefined);
|
|
51
|
+
const [refine, setRefine] = useState("idle");
|
|
52
|
+
const [refineError, setRefineError] = useState(null);
|
|
53
|
+
const [instructions, setInstructions] = useState([]);
|
|
54
|
+
const [draft, setDraft] = useState("");
|
|
55
|
+
const [activeItems, setActiveItems] = useState({});
|
|
56
|
+
const [pendingPreviews, setPendingPreviews] = useState({});
|
|
57
|
+
const [modelId, setModelId] = useState(readStoredModelId);
|
|
58
|
+
const [aiCalls, setAiCalls] = useState([]);
|
|
59
|
+
const modelIdRef = useRef(modelId);
|
|
60
|
+
modelIdRef.current = modelId;
|
|
61
|
+
/** Shows the model the server used, e.g. its default when a remembered one is gone. */
|
|
62
|
+
const syncModel = useCallback((effective) => {
|
|
63
|
+
modelIdRef.current = effective;
|
|
64
|
+
setModelId(effective);
|
|
65
|
+
}, []);
|
|
66
|
+
const controllerRef = useRef(null);
|
|
67
|
+
const refineControllerRef = useRef(null);
|
|
68
|
+
const previewSequence = useRef({});
|
|
69
|
+
const requestRefine = useCallback(async (request) => {
|
|
70
|
+
refineControllerRef.current?.abort();
|
|
71
|
+
const controller = new AbortController();
|
|
72
|
+
refineControllerRef.current = controller;
|
|
73
|
+
controllerRef.current?.signal.addEventListener("abort", () => controller.abort(), {
|
|
74
|
+
once: true,
|
|
75
|
+
});
|
|
76
|
+
setRefine("running");
|
|
77
|
+
setRefineError(null);
|
|
78
|
+
const result = await planComponentConversion({
|
|
79
|
+
page: pageItem,
|
|
80
|
+
componentIds,
|
|
81
|
+
targetTypeId: target.typeId,
|
|
82
|
+
mode: request.plan.mode,
|
|
83
|
+
useAi: true,
|
|
84
|
+
instructions: request.instructions,
|
|
85
|
+
currentMappings: request.force ? buildClientRows(request.plan, request.state) : undefined,
|
|
86
|
+
currentValues: request.force ? buildCurrentValues(request.plan, request.state) : undefined,
|
|
87
|
+
activeItems: request.activeItems,
|
|
88
|
+
modelId: modelIdRef.current,
|
|
89
|
+
includeAiDebug: showDebug,
|
|
90
|
+
}, controller.signal);
|
|
91
|
+
if (controller.signal.aborted)
|
|
92
|
+
return false;
|
|
93
|
+
if (result.type !== "success" || !result.data) {
|
|
94
|
+
setRefine("error");
|
|
95
|
+
setRefineError(result.summary ?? "The AI is unavailable.");
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
const refined = result.data;
|
|
99
|
+
setAiCalls(refined.aiCalls ?? []);
|
|
100
|
+
syncModel(refined.modelId);
|
|
101
|
+
if (!refined.aiApplied) {
|
|
102
|
+
setRefine("error");
|
|
103
|
+
setRefineError(refined.aiError ?? "The AI is unavailable.");
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
setPlan((current) => current
|
|
107
|
+
? {
|
|
108
|
+
...current,
|
|
109
|
+
groups: refined.groups,
|
|
110
|
+
items: current.items.map((item) => refined.items.find((r) => r.key === item.key) ?? item),
|
|
111
|
+
aiApplied: true,
|
|
112
|
+
models: refined.models,
|
|
113
|
+
modelId: refined.modelId,
|
|
114
|
+
}
|
|
115
|
+
: current);
|
|
116
|
+
setState((current) => current ? mergeRefinedPlan(current, refined, { force: request.force }) : current);
|
|
117
|
+
setRefine("done");
|
|
118
|
+
return true;
|
|
119
|
+
}, [pageItem, componentIds, target.typeId, showDebug, syncModel]);
|
|
120
|
+
const requestPlan = useCallback(async (requestedMode, aiInstructions) => {
|
|
121
|
+
controllerRef.current?.abort();
|
|
122
|
+
refineControllerRef.current?.abort();
|
|
123
|
+
const controller = new AbortController();
|
|
124
|
+
controllerRef.current = controller;
|
|
125
|
+
setLoading(true);
|
|
126
|
+
setError(null);
|
|
127
|
+
setRefine("idle");
|
|
128
|
+
setRefineError(null);
|
|
129
|
+
setPendingPreviews({});
|
|
130
|
+
const result = await planComponentConversion({
|
|
131
|
+
page: pageItem,
|
|
132
|
+
componentIds,
|
|
133
|
+
targetTypeId: target.typeId,
|
|
134
|
+
mode: requestedMode,
|
|
135
|
+
modelId: modelIdRef.current,
|
|
136
|
+
}, controller.signal);
|
|
137
|
+
if (controller.signal.aborted)
|
|
138
|
+
return;
|
|
139
|
+
if (result.type !== "success" || !result.data) {
|
|
140
|
+
setError(result.summary ?? result.details ?? "The conversion could not be planned.");
|
|
141
|
+
setLoading(false);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
const nextPlan = result.data;
|
|
145
|
+
syncModel(nextPlan.modelId);
|
|
146
|
+
const nextState = createDialogState(nextPlan);
|
|
147
|
+
const nextActive = Object.fromEntries(nextPlan.groups.map((g) => [g.key, g.itemKeys[0] ?? ""]));
|
|
148
|
+
setPlan(nextPlan);
|
|
149
|
+
setMode(nextPlan.mode);
|
|
150
|
+
setState(nextState);
|
|
151
|
+
setActiveItems(nextActive);
|
|
152
|
+
setLoading(false);
|
|
153
|
+
// The AI maps and writes right away; the name-and-type plan shows meanwhile.
|
|
154
|
+
if (nextPlan.aiAvailable && nextPlan.aiSuggested) {
|
|
155
|
+
void requestRefine({
|
|
156
|
+
plan: nextPlan,
|
|
157
|
+
state: nextState,
|
|
158
|
+
activeItems: nextActive,
|
|
159
|
+
instructions: aiInstructions,
|
|
160
|
+
force: false,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}, [pageItem, componentIds, target.typeId, requestRefine, syncModel]);
|
|
164
|
+
useEffect(() => {
|
|
165
|
+
void requestPlan(undefined, []);
|
|
166
|
+
return () => {
|
|
167
|
+
controllerRef.current?.abort();
|
|
168
|
+
refineControllerRef.current?.abort();
|
|
169
|
+
};
|
|
170
|
+
}, [requestPlan]);
|
|
171
|
+
const itemsByKey = useMemo(() => new Map((plan?.items ?? []).map((item) => [item.key, item])), [plan]);
|
|
172
|
+
/** Marks preview keys pending; returns a check whether this request is still the latest for a key. */
|
|
173
|
+
const beginPreviews = (keys) => {
|
|
174
|
+
const sequences = keys.map((key) => {
|
|
175
|
+
const sequence = (previewSequence.current[key] ?? 0) + 1;
|
|
176
|
+
previewSequence.current[key] = sequence;
|
|
177
|
+
return sequence;
|
|
178
|
+
});
|
|
179
|
+
setPendingPreviews((current) => ({
|
|
180
|
+
...current,
|
|
181
|
+
...Object.fromEntries(keys.map((key) => [key, true])),
|
|
182
|
+
}));
|
|
183
|
+
return (key) => previewSequence.current[key] === sequences[keys.indexOf(key)];
|
|
184
|
+
};
|
|
185
|
+
const endPreviews = (keys) => setPendingPreviews((current) => {
|
|
186
|
+
const next = { ...current };
|
|
187
|
+
for (const key of keys)
|
|
188
|
+
delete next[key];
|
|
189
|
+
return next;
|
|
190
|
+
});
|
|
191
|
+
const fetchPreview = async (group, item, field, row) => {
|
|
192
|
+
if (!plan || !row.sourceKey || row.mode === "empty")
|
|
193
|
+
return;
|
|
194
|
+
const option = group.sourceFields.find((o) => o.key === row.sourceKey);
|
|
195
|
+
if (!option)
|
|
196
|
+
return;
|
|
197
|
+
const sourceComponentId = option.componentId ?? item.sourceComponentIds[0] ?? item.anchorComponentId;
|
|
198
|
+
const key = `${item.key}:${field.id}`;
|
|
199
|
+
const isLatest = beginPreviews([key]);
|
|
200
|
+
const result = await previewConversionValue({
|
|
201
|
+
page: pageItem,
|
|
202
|
+
sourceComponentId,
|
|
203
|
+
sourceFieldId: option.fieldId,
|
|
204
|
+
targetTypeId: plan.target.typeId,
|
|
205
|
+
targetFieldId: field.id,
|
|
206
|
+
mode: row.mode,
|
|
207
|
+
instruction: row.instruction,
|
|
208
|
+
modelId: plan.modelId,
|
|
209
|
+
}, controllerRef.current?.signal);
|
|
210
|
+
if (controllerRef.current?.signal.aborted || !isLatest(key))
|
|
211
|
+
return;
|
|
212
|
+
endPreviews([key]);
|
|
213
|
+
const preview = result.type === "success" && result.data?.preview
|
|
214
|
+
? result.data.preview
|
|
215
|
+
: { hasValue: false, error: result.data?.error ?? result.summary ?? "Preview failed." };
|
|
216
|
+
setState((current) => (current ? setPreview(current, item.key, field.id, preview) : current));
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* Runs the AI again on the dialog as it is: one call that keeps the user's
|
|
220
|
+
* rows and writes every AI field of every component and language.
|
|
221
|
+
*/
|
|
222
|
+
const rerunAi = (basePlan, baseState) => requestRefine({ plan: basePlan, state: baseState, activeItems, instructions, force: true });
|
|
223
|
+
const changeRow = (group, field, sourceKey, rowMode, instruction) => {
|
|
224
|
+
if (!plan || !state)
|
|
225
|
+
return;
|
|
226
|
+
const effectiveMode = rowMode === "generate" ? "generate" : sourceKey ? rowMode : "empty";
|
|
227
|
+
const row = {
|
|
228
|
+
sourceKey: effectiveMode === "generate" ? null : sourceKey,
|
|
229
|
+
mode: effectiveMode,
|
|
230
|
+
instruction,
|
|
231
|
+
uses: undefined,
|
|
232
|
+
origin: "user",
|
|
233
|
+
};
|
|
234
|
+
let next = clearLanguageValues(updateRow(state, group.key, field.id, row), group.itemKeys, field.id);
|
|
235
|
+
// Copies read straight from the source preview; conversions ask the server
|
|
236
|
+
// for the instance on screen; AI fields run the AI for all of them.
|
|
237
|
+
for (const itemKey of group.itemKeys) {
|
|
238
|
+
const item = itemsByKey.get(itemKey);
|
|
239
|
+
if (!item)
|
|
240
|
+
continue;
|
|
241
|
+
if (effectiveMode === "empty") {
|
|
242
|
+
next = setPreview(next, itemKey, field.id, { hasValue: false });
|
|
243
|
+
}
|
|
244
|
+
else if (effectiveMode === "copy" && sourceKey) {
|
|
245
|
+
next = setPreview(next, itemKey, field.id, item.sourceValues[sourceKey] ?? { hasValue: false });
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
const previews = { ...(next.previews[itemKey] ?? {}) };
|
|
249
|
+
delete previews[field.id];
|
|
250
|
+
next = { ...next, previews: { ...next.previews, [itemKey]: previews } };
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
setState(next);
|
|
254
|
+
if (effectiveMode === "generate") {
|
|
255
|
+
void rerunAi(plan, next);
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
const activeKey = activeItems[group.key];
|
|
259
|
+
const activeItem = activeKey ? itemsByKey.get(activeKey) : undefined;
|
|
260
|
+
if (!activeItem)
|
|
261
|
+
return;
|
|
262
|
+
if (effectiveMode === "convert" || effectiveMode === "rewrite") {
|
|
263
|
+
void fetchPreview(group, activeItem, field, row);
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
const switchInstance = (group, direction) => {
|
|
267
|
+
if (!state || !plan)
|
|
268
|
+
return;
|
|
269
|
+
const keys = group.itemKeys;
|
|
270
|
+
const index = keys.indexOf(activeItems[group.key] ?? keys[0]);
|
|
271
|
+
const nextKey = keys[(index + direction + keys.length) % keys.length];
|
|
272
|
+
setActiveItems((current) => ({ ...current, [group.key]: nextKey }));
|
|
273
|
+
// Conversions this instance has not shown yet; its AI fields are already written.
|
|
274
|
+
const item = itemsByKey.get(nextKey);
|
|
275
|
+
if (!item)
|
|
276
|
+
return;
|
|
277
|
+
for (const field of plan.target.fields) {
|
|
278
|
+
const row = state.rows[group.key]?.[field.id];
|
|
279
|
+
if (row?.mode === "convert" && !state.previews[nextKey]?.[field.id]) {
|
|
280
|
+
void fetchPreview(group, item, field, row);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
const changeModel = (nextModelId) => {
|
|
285
|
+
if (!plan || !state || nextModelId === (modelId ?? plan.modelId))
|
|
286
|
+
return;
|
|
287
|
+
setModelId(nextModelId);
|
|
288
|
+
modelIdRef.current = nextModelId;
|
|
289
|
+
storeModelId(nextModelId);
|
|
290
|
+
void rerunAi(plan, state);
|
|
291
|
+
};
|
|
292
|
+
const submitInstruction = async () => {
|
|
293
|
+
if (!plan || !state || refine === "running")
|
|
294
|
+
return;
|
|
295
|
+
const text = draft.trim();
|
|
296
|
+
const next = text ? [...instructions, text] : instructions;
|
|
297
|
+
const applied = await requestRefine({ plan, state, activeItems, instructions: next, force: true });
|
|
298
|
+
if (applied) {
|
|
299
|
+
setInstructions(next);
|
|
300
|
+
setDraft("");
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
const startOver = () => {
|
|
304
|
+
setInstructions([]);
|
|
305
|
+
setDraft("");
|
|
306
|
+
void requestPlan(plan?.mode, []);
|
|
307
|
+
};
|
|
308
|
+
const pendingAiWrites = plan && state ? countPendingAiWrites(plan, state) : 0;
|
|
309
|
+
const conversions = plan && state ? buildConversions(plan, state) : [];
|
|
310
|
+
const canConvert = !!plan &&
|
|
311
|
+
!!state &&
|
|
312
|
+
!loading &&
|
|
313
|
+
refine !== "running" &&
|
|
314
|
+
conversions.length > 0 &&
|
|
315
|
+
conversions.every((c) => (c.sourceComponentIds?.length ?? 0) > 0 || (c.childActions?.length ?? 0) > 0);
|
|
316
|
+
const convert = () => {
|
|
317
|
+
if (!plan || !state || !canConvert)
|
|
318
|
+
return;
|
|
319
|
+
const count = componentIds.length;
|
|
320
|
+
const title = plan.mode === "merge"
|
|
321
|
+
? `Merge ${count} components into ${plan.target.name}`
|
|
322
|
+
: count === 1
|
|
323
|
+
? `Convert ${props.selectionLabel} to ${plan.target.name}`
|
|
324
|
+
: `Convert ${count} components to ${plan.target.name}`;
|
|
325
|
+
props.onClose?.({ mode: plan.mode, conversions, title, instructions, modelId: plan.modelId });
|
|
326
|
+
};
|
|
327
|
+
const subtitle = componentIds.length === 1
|
|
328
|
+
? props.selectionLabel
|
|
329
|
+
: mode === "merge"
|
|
330
|
+
? `${componentIds.length} components into one`
|
|
331
|
+
: `${componentIds.length} components`;
|
|
332
|
+
const warnings = plan?.notes.filter((n) => n.kind === "warning") ?? [];
|
|
333
|
+
const infos = plan?.notes.filter((n) => n.kind !== "warning") ?? [];
|
|
334
|
+
return (_jsx(Dialog, { open: true, onOpenChange: (open) => {
|
|
335
|
+
if (!open)
|
|
336
|
+
props.onClose?.(null);
|
|
337
|
+
}, children: _jsxs(DialogContent, { "data-testid": "convert-component-dialog", className: "flex flex-col overflow-hidden border-none p-0 shadow-2xl", style: { width: "min(900px, 95vw)", maxHeight: "90vh" }, children: [_jsx(StyledDialogTitle, { icon: _jsx(Replace, { strokeWidth: 1 }), title: props.sourceTypeName
|
|
338
|
+
? `Convert from ${props.sourceTypeName} to ${target.name}`
|
|
339
|
+
: `Convert to ${target.name}`, subtitle: subtitle }), loading ? (_jsx(LoadingState, { message: "Planning the conversion...", className: "py-20" })) : error || !plan || !state ? (_jsx("div", { className: "bg-white px-6 py-6", children: _jsxs(Alert, { variant: "destructive", "data-testid": "convert-component-error", children: [_jsx(AlertTriangle, { className: "h-4 w-4" }), _jsx(AlertDescription, { children: error ?? "The conversion could not be planned." })] }) })) : (_jsx("div", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto bg-white", children: _jsxs("div", { className: "space-y-6 px-6 pt-4 pb-6", children: [componentIds.length > 1 && (_jsx("section", { className: "flex flex-wrap items-center gap-3", children: plan.canMerge ? (_jsx(MultiSwitchButton, { value: plan.mode, testId: "convert-component-mode", className: "w-[340px]", "aria-label": "Conversion mode", onValueChange: (value) => {
|
|
340
|
+
if (value !== plan.mode)
|
|
341
|
+
void requestPlan(value, instructions);
|
|
342
|
+
}, options: [
|
|
343
|
+
{
|
|
344
|
+
value: "each",
|
|
345
|
+
label: `Convert each (${componentIds.length})`,
|
|
346
|
+
testId: "convert-component-mode-each",
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
value: "merge",
|
|
350
|
+
label: "Merge into one",
|
|
351
|
+
testId: "convert-component-mode-merge",
|
|
352
|
+
},
|
|
353
|
+
] })) : (_jsx("span", { className: "text-muted-foreground text-xs", children: plan.cannotMergeReason ?? "Each component is converted on its own." })) })), plan.aiAvailable && (_jsx(AiInstructions, { refine: refine, error: refineError, models: plan.models ?? [], modelId: modelId ?? plan.modelId, onModelChange: changeModel, aiCalls: showDebug ? aiCalls : undefined, instructions: instructions, draft: draft, onDraftChange: setDraft, onSubmit: () => void submitInstruction(), onStartOver: startOver })), warnings.length > 0 && (_jsxs(Alert, { variant: "warning", "data-testid": "convert-component-warnings", children: [_jsx(AlertTriangle, { className: "h-4 w-4" }), _jsx(AlertDescription, { className: "space-y-1 text-xs", children: warnings.map((note) => (_jsx("p", { children: note.text }, note.code + note.text))) })] })), plan.mode === "merge" && plan.items[0] && (_jsx(SourcesSection, { plan: plan, state: state, item: plan.items[0], onChange: (componentId, role) => setState(updateRole(state, componentId, role)) })), plan.groups.map((group) => {
|
|
354
|
+
const item = itemsByKey.get(activeItems[group.key] ?? group.itemKeys[0]);
|
|
355
|
+
if (!item)
|
|
356
|
+
return null;
|
|
357
|
+
return (_jsx(GroupSections, { plan: plan, state: state, group: group, item: item, showGroupName: plan.groups.length > 1, pendingPreviews: pendingPreviews, aiRunning: refine === "running", onChangeRow: changeRow, onGeneratePreview: (field, row) => {
|
|
358
|
+
if (row.mode === "generate")
|
|
359
|
+
void rerunAi(plan, state);
|
|
360
|
+
else
|
|
361
|
+
void fetchPreview(group, item, field, row);
|
|
362
|
+
}, onSwitchInstance: (direction) => switchInstance(group, direction), onChangeChild: (childId, child) => setState(updateChild(state, item.key, childId, child)) }, group.key));
|
|
363
|
+
}), infos.length > 0 && (_jsxs("section", { "data-testid": "convert-component-notes", children: [_jsx("h3", { className: "mb-2 text-base font-medium", children: "Good to know" }), _jsx("ul", { className: "space-y-1.5", children: infos.map((note) => (_jsxs("li", { className: "text-muted-foreground flex items-start gap-2 text-xs", "data-note-code": note.code, children: [_jsx(Info, { className: "mt-0.5 h-3.5 w-3.5 shrink-0", strokeWidth: 1.5 }), _jsx("span", { children: note.text })] }, note.code + note.text))) })] }))] }) })), _jsxs(DialogButtons, { className: "items-center", children: [plan && !loading && !error && (_jsxs("div", { className: "text-muted-foreground mr-auto text-xs", "data-testid": "convert-component-summary", children: ["Applies to ", plan.languages.join(", "), ".", pendingAiWrites > 0 && (_jsxs(_Fragment, { children: [" ", "The AI writes ", pendingAiWrites, " more value", pendingAiWrites === 1 ? "" : "s", " when you convert."] }))] })), _jsx(Button, { variant: "ghost", onClick: () => props.onClose?.(null), children: "Cancel" }), _jsx(Button, { variant: "default", disabled: !canConvert, onClick: convert, "data-testid": "convert-component-confirm", children: plan?.mode === "merge" ? "Merge" : "Convert" })] })] }) }));
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* The user's line to the AI: instructions it follows for the mapping and the
|
|
367
|
+
* written values. Each one refines the current result; all of them also apply
|
|
368
|
+
* to the values written when the user converts.
|
|
369
|
+
*/
|
|
370
|
+
function AiInstructions({ refine, error, models, modelId, onModelChange, aiCalls, instructions, draft, onDraftChange, onSubmit, onStartOver, }) {
|
|
371
|
+
const running = refine === "running";
|
|
372
|
+
return (_jsxs("section", { className: "border-highlight-100/25 bg-highlight-100/5 rounded-lg border p-3", "data-testid": "convert-component-ai", "data-state": refine, children: [_jsxs("div", { className: "mb-2 flex items-center gap-2 text-xs", children: [_jsx(Sparkles, { className: "text-highlight-100 h-3.5 w-3.5", strokeWidth: 1.5 }), _jsx("span", { className: "shrink-0 font-medium", children: "AI conversion" }), _jsx("span", { className: "text-muted-foreground ml-auto flex min-w-0 items-center gap-1.5 truncate", children: running ? (_jsxs(_Fragment, { children: [_jsx(Spinner, { size: "xs" }), _jsx("span", { "data-testid": "convert-component-ai-running", children: "Mapping and writing..." })] })) : refine === "error" ? (_jsx("span", { className: "text-feedback-red", "data-testid": "convert-component-ai-error", children: error ?? "The AI is unavailable." })) : refine === "done" ? (_jsx("span", { "data-testid": "convert-component-ai-done", children: "Fields mapped and written by AI" })) : null }), models.length > 1 && (_jsx("div", { className: "w-48 shrink-0", children: _jsx(Select, { size: "xs", maxWidth: "100%", value: modelId ?? "", disabled: running, searchable: models.length > 8, placeholder: "AI model", "data-testid": "convert-component-ai-model", options: models.map((model) => ({ value: model.id, label: model.name })), onValueChange: onModelChange }) })), models.length === 1 && (_jsx("span", { className: "text-muted-foreground shrink-0", "data-testid": "convert-component-ai-model-name", children: models[0].name })), aiCalls && _jsx(ConversionAiDebugButton, { calls: aiCalls, running: running })] }), instructions.length > 0 && (_jsx("ol", { className: "mb-2 space-y-1", "data-testid": "convert-component-ai-instructions", children: instructions.map((instruction, index) => (_jsxs("li", { className: "text-muted-foreground flex items-start gap-1.5 text-xs", "data-testid": "convert-component-ai-instruction", children: [_jsx(Check, { className: "text-highlight-100 mt-0.5 h-3 w-3 shrink-0", strokeWidth: 2 }), _jsx("span", { className: "min-w-0 break-words", children: instruction })] }, `${index}:${instruction}`))) })), _jsxs("div", { className: "flex items-end gap-2", children: [_jsx(Textarea, { value: draft, rows: 1, disabled: running, placeholder: instructions.length > 0
|
|
373
|
+
? "Refine the result, e.g. “make the text shorter”"
|
|
374
|
+
: "Tell the AI how to convert, e.g. “use the headline as a heading in the text” or “shorten the teaser to one sentence”", className: "min-h-9 bg-white", "data-testid": "convert-component-ai-input", onChange: (event) => onDraftChange(event.target.value), onKeyDown: (event) => {
|
|
375
|
+
if (event.key === "Enter" && !event.shiftKey) {
|
|
376
|
+
event.preventDefault();
|
|
377
|
+
onSubmit();
|
|
378
|
+
}
|
|
379
|
+
} }), _jsxs(Button, { size: "sm", variant: "default", disabled: running, onClick: onSubmit, "data-testid": "convert-component-ai-apply", className: "shrink-0 gap-1.5", children: [_jsx(Sparkles, { className: "h-3.5 w-3.5", strokeWidth: 1.5 }), draft.trim() ? "Apply" : refine === "error" ? "Try again" : "Run again"] })] }), instructions.length > 0 && !running && (_jsxs("button", { type: "button", className: "text-muted-foreground hover:text-foreground mt-2 flex items-center gap-1 text-[11px]", onClick: onStartOver, "data-testid": "convert-component-ai-start-over", children: [_jsx(RotateCcw, { className: "h-3 w-3", strokeWidth: 1.5 }), "Start over without instructions"] }))] }));
|
|
380
|
+
}
|
|
381
|
+
function SectionHeading({ title, subtitle, trailing, }) {
|
|
382
|
+
return (_jsxs("div", { className: "mb-3 flex items-end justify-between gap-4", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-base font-medium", children: title }), subtitle && _jsx("span", { className: "text-muted-foreground text-xs", children: subtitle })] }), trailing] }));
|
|
383
|
+
}
|
|
384
|
+
function GroupSections({ plan, state, group, item, showGroupName, pendingPreviews, aiRunning, onChangeRow, onGeneratePreview, onSwitchInstance, onChangeChild, }) {
|
|
385
|
+
const index = group.itemKeys.indexOf(item.key);
|
|
386
|
+
const lost = getLostFields(plan, state, item);
|
|
387
|
+
const children = getVisibleChildren(plan, state, item);
|
|
388
|
+
const removedChildren = children.filter((child) => (state.children[item.key]?.[child.componentId]?.action ?? child.action) === "remove");
|
|
389
|
+
const switcher = group.itemKeys.length > 1 ? (_jsxs("div", { className: "flex items-center gap-1 text-xs", "data-testid": "convert-component-instance-switcher", children: [_jsx(Button, { variant: "ghost", size: "iconXs", "aria-label": "Previous component", onClick: () => onSwitchInstance(-1), children: _jsx(ChevronLeft, { className: "h-4 w-4", strokeWidth: 1.5 }) }), _jsxs("span", { className: "text-muted-foreground max-w-[220px] truncate", "data-testid": "convert-component-instance", children: [item.name, " \u00B7 ", index + 1, " of ", group.itemKeys.length] }), _jsx(Button, { variant: "ghost", size: "iconXs", "aria-label": "Next component", onClick: () => onSwitchInstance(1), children: _jsx(ChevronRight, { className: "h-4 w-4", strokeWidth: 1.5 }) })] })) : undefined;
|
|
390
|
+
return (_jsxs(_Fragment, { children: [_jsxs("section", { "data-testid": "convert-component-fields", "data-group-key": group.key, children: [_jsx(SectionHeading, { title: showGroupName ? `Fields from ${group.sourceTypeName}` : "Fields", subtitle: plan.mode === "merge"
|
|
391
|
+
? "Each field of the new component and where its content comes from."
|
|
392
|
+
: `Each field of the new component and where its content comes from${group.itemKeys.length > 1 ? ` (one mapping for all ${group.itemKeys.length})` : ""}.`, trailing: switcher }), _jsxs("div", { className: "text-muted-foreground grid grid-cols-[minmax(0,170px)_minmax(0,240px)_minmax(0,1fr)] gap-3 px-1 pb-1.5 text-[11px] font-medium", children: [_jsxs("span", { children: [plan.target.name, " field"] }), _jsx("span", { children: "Content from" }), _jsx("span", { children: "Result" })] }), plan.target.fields.length === 0 && (_jsxs("div", { className: "text-muted-foreground border-border-default border-t px-1 py-3 text-xs", children: [plan.target.name, " has no content fields."] })), plan.target.fields.map((field) => {
|
|
393
|
+
const row = state.rows[group.key]?.[field.id] ?? {
|
|
394
|
+
sourceKey: null,
|
|
395
|
+
mode: "empty",
|
|
396
|
+
origin: "none",
|
|
397
|
+
};
|
|
398
|
+
return (_jsx(MappingRow, { plan: plan, state: state, group: group, item: item, field: field, row: row, pending: !!pendingPreviews[`${item.key}:${field.id}`] || (aiRunning && isAiRow(row)), onChange: (sourceKey, mode, instruction) => onChangeRow(group, field, sourceKey, mode, instruction), onGeneratePreview: () => onGeneratePreview(field, row) }, field.id));
|
|
399
|
+
})] }), children.length > 0 && (_jsxs("section", { "data-testid": "convert-component-children", children: [_jsx(SectionHeading, { title: "Child components", subtitle: `Components inside ${plan.mode === "merge" ? "the merged components" : item.name}.` }), children.map((child) => (_jsx(ChildRow, { plan: plan, child: child, state: state.children[item.key]?.[child.componentId], onChange: (next) => onChangeChild(child.componentId, next) }, child.componentId)))] })), _jsxs("section", { "data-testid": "convert-component-lost", children: [_jsx(SectionHeading, { title: "Won't carry over" }), _jsx(LostList, { plan: plan, item: item, lost: lost, removedChildren: removedChildren })] })] }));
|
|
400
|
+
}
|
|
401
|
+
function MappingRow({ plan, state, group, item, field, row, pending, onChange, onGeneratePreview, }) {
|
|
402
|
+
const options = getRowOptions(plan, state, group, item, field.id);
|
|
403
|
+
const value = encodeRowValue(row.sourceKey, row.mode);
|
|
404
|
+
const preview = state.previews[item.key]?.[field.id];
|
|
405
|
+
const [instruction, setInstruction] = useState(row.instruction ?? "");
|
|
406
|
+
const aiRow = row.mode === "generate" || row.mode === "rewrite";
|
|
407
|
+
const usedLabels = (row.mode === "generate" ? row.uses ?? [] : [])
|
|
408
|
+
.map((key) => group.sourceFields.find((o) => o.key === key))
|
|
409
|
+
.filter((option) => !!option)
|
|
410
|
+
.map((option) => plan.mode === "merge" && option.componentName
|
|
411
|
+
? `${option.componentName} · ${option.displayName}`
|
|
412
|
+
: option.displayName);
|
|
413
|
+
useEffect(() => {
|
|
414
|
+
setInstruction(row.instruction ?? "");
|
|
415
|
+
}, [row.instruction]);
|
|
416
|
+
return (_jsxs("div", { className: "border-border-default grid grid-cols-[minmax(0,170px)_minmax(0,240px)_minmax(0,1fr)] items-start gap-3 border-t px-1 py-2.5", "data-testid": "convert-component-row", "data-target-field": field.name, "data-mode": row.mode, children: [_jsxs("div", { className: "min-w-0 pt-1.5", children: [_jsx("div", { className: "truncate text-xs font-medium", title: field.displayName, children: field.displayName }), _jsx("div", { className: "text-muted-foreground truncate text-[11px]", children: field.type })] }), _jsxs("div", { className: "flex min-w-0 flex-col gap-1.5", children: [_jsx(Select, { size: "sm", maxWidth: "100%", value: value, options: options.map((option) => ({
|
|
417
|
+
value: option.value,
|
|
418
|
+
label: option.label,
|
|
419
|
+
description: option.description,
|
|
420
|
+
})), searchable: options.length > 8, "data-testid": "convert-component-row-source", onValueChange: (next) => {
|
|
421
|
+
const option = options.find((o) => o.value === next);
|
|
422
|
+
if (!option)
|
|
423
|
+
return;
|
|
424
|
+
onChange(option.sourceKey, option.mode, option.mode === "generate" || option.mode === "rewrite" ? row.instruction : undefined);
|
|
425
|
+
} }), aiRow && (_jsx(Textarea, { value: instruction, rows: 1, placeholder: "Instruction for this field (optional)", className: "min-h-7 px-2 py-1 text-[11px] leading-snug", "data-testid": "convert-component-row-instruction", onChange: (event) => setInstruction(event.target.value), onBlur: () => {
|
|
426
|
+
if ((row.instruction ?? "") !== instruction) {
|
|
427
|
+
onChange(row.sourceKey, row.mode, instruction || undefined);
|
|
428
|
+
}
|
|
429
|
+
}, onKeyDown: (event) => {
|
|
430
|
+
if (event.key === "Enter" && !event.shiftKey) {
|
|
431
|
+
event.preventDefault();
|
|
432
|
+
event.target.blur();
|
|
433
|
+
}
|
|
434
|
+
} })), usedLabels.length > 0 && (_jsxs("span", { className: "text-muted-foreground text-[11px]", "data-testid": "convert-component-row-uses", children: ["Based on ", usedLabels.join(", ")] })), row.origin === "ai" && row.reason && (_jsx("span", { className: "text-muted-foreground text-[11px]", children: row.reason }))] }), _jsxs("div", { className: "min-w-0 pt-1", "data-testid": "convert-component-row-preview", children: [_jsx(ValuePreview, { row: row, field: field, preview: preview, pending: pending, onGenerate: onGeneratePreview, hasSourceValue: row.mode === "generate" || !!(row.sourceKey && item.sourceValues[row.sourceKey]?.hasValue) }), row.mode === "generate" && !pending && (_jsx(OtherLanguageValues, { item: item, fieldId: field.id, currentLanguage: plan.currentLanguage, values: state.languageValues[item.key] }))] })] }));
|
|
435
|
+
}
|
|
436
|
+
function ValuePreview({ row, field, preview, pending, hasSourceValue, onGenerate, }) {
|
|
437
|
+
const aiRow = row.mode === "generate" || row.mode === "rewrite";
|
|
438
|
+
if (row.mode === "empty" || (!row.sourceKey && row.mode !== "generate")) {
|
|
439
|
+
return _jsx("span", { className: "text-muted-foreground text-xs", children: "Stays empty" });
|
|
440
|
+
}
|
|
441
|
+
if (!hasSourceValue) {
|
|
442
|
+
return _jsx("span", { className: "text-muted-foreground text-xs", children: "Source is empty" });
|
|
443
|
+
}
|
|
444
|
+
if (pending) {
|
|
445
|
+
return (_jsxs("span", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(Spinner, { size: "xs" }), aiRow ? "Writing..." : "Converting..."] }));
|
|
446
|
+
}
|
|
447
|
+
if (preview?.error) {
|
|
448
|
+
return (_jsxs("span", { className: "flex flex-wrap items-center gap-x-2 text-xs", children: [_jsx("span", { className: "text-feedback-red", children: preview.error }), aiRow && (_jsx("button", { type: "button", className: "text-highlight-100 underline-offset-2 hover:underline", onClick: onGenerate, "data-testid": "convert-component-row-generate", children: "Try again" }))] }));
|
|
449
|
+
}
|
|
450
|
+
if (!preview || (!preview.hasValue && !preview.raw)) {
|
|
451
|
+
if (aiRow) {
|
|
452
|
+
return (_jsxs("span", { className: "text-muted-foreground flex flex-wrap items-center gap-x-2 text-xs", children: [_jsx(AiBadge, {}), "Written when you convert.", _jsx("button", { type: "button", className: "text-highlight-100 underline-offset-2 hover:underline", onClick: onGenerate, "data-testid": "convert-component-row-generate", children: "Write now" })] }));
|
|
453
|
+
}
|
|
454
|
+
return _jsx("span", { className: "text-muted-foreground text-xs", children: "..." });
|
|
455
|
+
}
|
|
456
|
+
// AI-written rich text shows its formatting, so a heading the AI added reads as one.
|
|
457
|
+
if (aiRow && preview.raw && field.category === "rich-text") {
|
|
458
|
+
return (_jsxs("div", { className: "flex min-w-0 items-start gap-2 text-xs", "data-testid": "convert-component-row-value", children: [_jsx(AiBadge, {}), _jsx("div", { className: "max-h-40 min-w-0 overflow-y-auto break-words [&_a]:underline [&_h1]:mb-1 [&_h1]:text-sm [&_h1]:font-semibold [&_h2]:mb-1 [&_h2]:text-[13px] [&_h2]:font-semibold [&_h3]:mb-1 [&_h3]:font-semibold [&_li]:ml-4 [&_ol]:list-decimal [&_p]:mb-1 [&_ul]:list-disc", "data-testid": "convert-component-row-html", dangerouslySetInnerHTML: { __html: sanitizeHtml(preview.raw) } })] }));
|
|
459
|
+
}
|
|
460
|
+
return (_jsxs("div", { className: "flex min-w-0 items-start gap-2 text-xs", "data-testid": "convert-component-row-value", children: [aiRow && _jsx(AiBadge, {}), preview.imageUrl && (_jsx("img", { src: preview.imageUrl, alt: "", className: "border-border-default h-9 w-14 shrink-0 rounded border object-cover" })), _jsx("span", { className: "line-clamp-4 min-w-0 break-words", title: preview.text, children: preview.text })] }));
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* The languages besides the current one the AI already wrote this field in;
|
|
464
|
+
* hovering one shows its text. Languages still missing are written on convert.
|
|
465
|
+
*/
|
|
466
|
+
function OtherLanguageValues({ item, fieldId, currentLanguage, values, }) {
|
|
467
|
+
const others = item.languages.filter((language) => language !== currentLanguage);
|
|
468
|
+
if (others.length === 0)
|
|
469
|
+
return null;
|
|
470
|
+
return (_jsx("div", { className: "text-muted-foreground mt-1 flex flex-wrap items-center gap-1 text-[11px]", "data-testid": "convert-component-row-languages", children: others.map((language) => {
|
|
471
|
+
const value = values?.[language]?.[fieldId];
|
|
472
|
+
return (_jsx("span", { title: value ? sanitizeTooltip(value) : "Written when you convert", "data-language": language, "data-written": value ? "true" : "false", className: value
|
|
473
|
+
? "bg-highlight-100/10 text-highlight-100 rounded px-1.5 py-px"
|
|
474
|
+
: "border-border-default rounded border border-dashed px-1.5 py-px", children: language }, language));
|
|
475
|
+
}) }));
|
|
476
|
+
}
|
|
477
|
+
/** Tooltip text for a written value: its text without markup. */
|
|
478
|
+
function sanitizeTooltip(value) {
|
|
479
|
+
const element = document.createElement("div");
|
|
480
|
+
element.innerHTML = sanitizeHtml(value);
|
|
481
|
+
return (element.textContent ?? "").trim();
|
|
482
|
+
}
|
|
483
|
+
function AiBadge() {
|
|
484
|
+
return (_jsx("span", { className: "bg-highlight-100/10 text-highlight-100 shrink-0 rounded px-1.5 py-px text-[10px] font-medium", children: "AI" }));
|
|
485
|
+
}
|
|
486
|
+
function ChildRow({ plan, child, state, onChange, }) {
|
|
487
|
+
const current = state ?? {
|
|
488
|
+
action: child.action,
|
|
489
|
+
targetPlaceholder: child.targetPlaceholder,
|
|
490
|
+
targetTypeId: child.targetTypeId,
|
|
491
|
+
targetTypeName: child.targetTypeName,
|
|
492
|
+
nested: child.nested,
|
|
493
|
+
};
|
|
494
|
+
const options = [
|
|
495
|
+
...child.movePlaceholders.map((placeholder) => ({
|
|
496
|
+
value: `move|${placeholder}`,
|
|
497
|
+
label: `Move to ${humanizePlaceholder(placeholder)}`,
|
|
498
|
+
state: { action: "move", targetPlaceholder: placeholder },
|
|
499
|
+
})),
|
|
500
|
+
];
|
|
501
|
+
if (child.targetTypeId && child.targetPlaceholder) {
|
|
502
|
+
options.push({
|
|
503
|
+
value: `convert|${child.targetPlaceholder}|${child.targetTypeId}`,
|
|
504
|
+
label: `Convert to ${child.targetTypeName ?? "another type"} in ${humanizePlaceholder(child.targetPlaceholder)}`,
|
|
505
|
+
state: {
|
|
506
|
+
action: "convert",
|
|
507
|
+
targetPlaceholder: child.targetPlaceholder,
|
|
508
|
+
targetTypeId: child.targetTypeId,
|
|
509
|
+
targetTypeName: child.targetTypeName,
|
|
510
|
+
nested: child.nested,
|
|
511
|
+
},
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
options.push({ value: "remove", label: "Remove", state: { action: "remove" } });
|
|
515
|
+
const value = current.action === "move"
|
|
516
|
+
? `move|${current.targetPlaceholder}`
|
|
517
|
+
: current.action === "convert"
|
|
518
|
+
? `convert|${current.targetPlaceholder}|${current.targetTypeId}`
|
|
519
|
+
: "remove";
|
|
520
|
+
// Each field of the converted child: where it comes from, or what the AI wrote (current language).
|
|
521
|
+
const nestedFields = current.action === "convert" && current.nested
|
|
522
|
+
? current.nested.mappings
|
|
523
|
+
.filter((m) => m.mode !== "empty" && (m.mode === "generate" || m.sourceKey))
|
|
524
|
+
.map((m) => {
|
|
525
|
+
const nested = current.nested;
|
|
526
|
+
const targetField = nested.targetFields.find((f) => f.id === m.targetFieldId);
|
|
527
|
+
if (!targetField)
|
|
528
|
+
return null;
|
|
529
|
+
if (m.mode === "generate") {
|
|
530
|
+
const written = nested.values?.[plan.currentLanguage]?.[m.targetFieldId];
|
|
531
|
+
return {
|
|
532
|
+
id: m.targetFieldId,
|
|
533
|
+
field: targetField.displayName,
|
|
534
|
+
ai: true,
|
|
535
|
+
text: written ? sanitizeTooltip(written) : "Written when you convert",
|
|
536
|
+
languages: Object.keys(nested.values ?? {}).filter((language) => language !== plan.currentLanguage && nested.values[language]?.[m.targetFieldId]),
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
const source = nested.sourceFields.find((o) => o.key === m.sourceKey);
|
|
540
|
+
return source
|
|
541
|
+
? { id: m.targetFieldId, field: targetField.displayName, ai: false, text: `from ${source.displayName}`, languages: [] }
|
|
542
|
+
: null;
|
|
543
|
+
})
|
|
544
|
+
.filter((f) => f !== null)
|
|
545
|
+
: [];
|
|
546
|
+
return (_jsxs("div", { className: "border-border-default grid grid-cols-[minmax(0,170px)_minmax(0,240px)_minmax(0,1fr)] items-start gap-3 border-t px-1 py-2.5", "data-testid": "convert-component-child", "data-action": current.action, children: [_jsxs("div", { className: "min-w-0 pt-1.5", children: [_jsx("div", { className: "truncate text-xs font-medium", children: child.name }), _jsx("div", { className: "text-muted-foreground truncate text-[11px]", children: child.typeName })] }), _jsx(Select, { size: "sm", maxWidth: "100%", value: value, "data-testid": "convert-component-child-action", options: options.map((o) => ({ value: o.value, label: o.label })), onValueChange: (next) => {
|
|
547
|
+
const option = options.find((o) => o.value === next);
|
|
548
|
+
if (option)
|
|
549
|
+
onChange(option.state);
|
|
550
|
+
} }), _jsx("div", { className: "text-muted-foreground min-w-0 pt-1.5 text-xs", children: current.action === "remove" ? (child.reason ?? `Not placed in ${plan.target.name}.`) : current.action !== "convert" ? ("Moves along with its content.") : nestedFields.length === 0 ? ("Converted without field content.") : (_jsx("ul", { className: "space-y-1", "data-testid": "convert-component-child-fields", children: nestedFields.map((f) => (_jsxs("li", { className: "flex min-w-0 items-start gap-1.5", "data-ai": f.ai ? "true" : "false", children: [_jsx("span", { className: "text-foreground shrink-0 font-medium", children: f.field }), f.ai && _jsx(AiBadge, {}), _jsx("span", { className: "line-clamp-2 min-w-0 break-words", title: f.text, children: f.text }), f.languages.length > 0 && (_jsxs("span", { className: "shrink-0 text-[10px]", children: ["+", f.languages.join(", ")] }))] }, f.id))) })) })] }));
|
|
551
|
+
}
|
|
552
|
+
function SourcesSection({ plan, state, item, onChange, }) {
|
|
553
|
+
const merged = new Set(getMergedSourceIds(plan, state, item).map(normalizeId));
|
|
554
|
+
return (_jsxs("section", { "data-testid": "convert-component-sources", children: [_jsx(SectionHeading, { title: "Components", subtitle: "Merge a component's fields into the new one, or place it inside as a child." }), item.sourceRoles.map((role) => {
|
|
555
|
+
const current = state.roles[role.componentId] ?? role;
|
|
556
|
+
const options = [
|
|
557
|
+
{ value: "merge", label: "Merge its fields" },
|
|
558
|
+
...role.childPlaceholders.map((placeholder) => ({
|
|
559
|
+
value: `child|${placeholder}`,
|
|
560
|
+
label: `Add as child in ${humanizePlaceholder(placeholder)}`,
|
|
561
|
+
})),
|
|
562
|
+
];
|
|
563
|
+
if (role.targetTypeId && role.targetPlaceholder) {
|
|
564
|
+
options.push({
|
|
565
|
+
value: `child|${role.targetPlaceholder}|${role.targetTypeId}`,
|
|
566
|
+
label: `Add as ${role.targetTypeName ?? "child"} in ${humanizePlaceholder(role.targetPlaceholder)}`,
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
const value = current.role === "merge"
|
|
570
|
+
? "merge"
|
|
571
|
+
: current.targetTypeId
|
|
572
|
+
? `child|${current.targetPlaceholder}|${current.targetTypeId}`
|
|
573
|
+
: `child|${current.targetPlaceholder}`;
|
|
574
|
+
return (_jsxs("div", { className: "border-border-default grid grid-cols-[minmax(0,170px)_minmax(0,240px)_minmax(0,1fr)] items-start gap-3 border-t px-1 py-2.5", "data-testid": "convert-component-source", "data-role": current.role, children: [_jsxs("div", { className: "min-w-0 pt-1.5", children: [_jsx("div", { className: "truncate text-xs font-medium", children: role.name }), _jsx("div", { className: "text-muted-foreground truncate text-[11px]", children: role.typeName })] }), _jsx(Select, { size: "sm", maxWidth: "100%", value: value, "data-testid": "convert-component-source-role", options: options, onValueChange: (next) => {
|
|
575
|
+
if (next === "merge") {
|
|
576
|
+
onChange(role.componentId, { role: "merge" });
|
|
577
|
+
return;
|
|
578
|
+
}
|
|
579
|
+
const [, placeholder, typeId] = next.split("|");
|
|
580
|
+
onChange(role.componentId, {
|
|
581
|
+
role: "child",
|
|
582
|
+
targetPlaceholder: placeholder,
|
|
583
|
+
targetTypeId: typeId,
|
|
584
|
+
targetTypeName: typeId ? role.targetTypeName : undefined,
|
|
585
|
+
nested: typeId ? role.nested : undefined,
|
|
586
|
+
});
|
|
587
|
+
} }), _jsx("div", { className: "text-muted-foreground min-w-0 pt-1.5 text-xs", children: merged.has(normalizeId(role.componentId))
|
|
588
|
+
? "Its fields can feed the new component; it is removed afterwards."
|
|
589
|
+
: "Placed inside the new component with its content." })] }, role.componentId));
|
|
590
|
+
})] }));
|
|
591
|
+
}
|
|
592
|
+
function LostList({ plan, item, lost, removedChildren, }) {
|
|
593
|
+
const entries = [
|
|
594
|
+
...lost.map((field) => ({
|
|
595
|
+
key: `field:${field.key}`,
|
|
596
|
+
label: field.label,
|
|
597
|
+
detail: field.preview.text || (field.preview.imageUrl ? "Image" : undefined),
|
|
598
|
+
})),
|
|
599
|
+
];
|
|
600
|
+
if (removedChildren.length > 0) {
|
|
601
|
+
entries.push({
|
|
602
|
+
key: "children",
|
|
603
|
+
label: `${removedChildren.length} child component${removedChildren.length === 1 ? "" : "s"} removed`,
|
|
604
|
+
detail: removedChildren.map((c) => c.name).join(", "),
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
if (item.droppedParameters.length > 0) {
|
|
608
|
+
entries.push({
|
|
609
|
+
key: "parameters",
|
|
610
|
+
label: "Rendering parameters",
|
|
611
|
+
detail: item.droppedParameters.join(", "),
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
if (item.personalizationRulesDropped > 0) {
|
|
615
|
+
entries.push({
|
|
616
|
+
key: "personalization",
|
|
617
|
+
label: "Personalization",
|
|
618
|
+
detail: `${item.personalizationRulesDropped} rule${item.personalizationRulesDropped === 1 ? "" : "s"} that change content${plan.mode === "merge" ? " (not carried over when merging)" : ""}`,
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
if (item.suggestedEdits > 0) {
|
|
622
|
+
entries.push({
|
|
623
|
+
key: "suggested-edits",
|
|
624
|
+
label: "Suggested edits",
|
|
625
|
+
detail: "Suggestions on fields that are not copied unchanged stay with the old component.",
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
if (entries.length === 0) {
|
|
629
|
+
return (_jsx("div", { className: "text-muted-foreground text-xs", "data-testid": "convert-component-lost-none", children: "Everything with content carries over." }));
|
|
630
|
+
}
|
|
631
|
+
return (_jsx("ul", { className: "space-y-1.5", children: entries.map((entry) => (_jsxs("li", { className: "flex items-start gap-2 text-xs", "data-testid": "convert-component-lost-entry", children: [_jsx(AlertTriangle, { className: "text-feedback-orange mt-0.5 h-3.5 w-3.5 shrink-0", strokeWidth: 1.5 }), _jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "font-medium", children: entry.label }), entry.detail && (_jsxs("span", { className: "text-muted-foreground", children: [" \u00B7 ", entry.detail] }))] })] }, entry.key))) }));
|
|
632
|
+
}
|
|
633
|
+
//# sourceMappingURL=ConvertComponentDialog.js.map
|