@parhelia/core 0.1.12808 → 0.1.12836
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/agents-view/AgentCard.js +20 -18
- package/dist/agents-view/AgentCard.js.map +1 -1
- package/dist/agents-view/AgentsSidebar.js +3 -3
- package/dist/agents-view/AgentsSidebar.js.map +1 -1
- package/dist/agents-view/AgentsTitlebar.js +2 -2
- package/dist/agents-view/AgentsTitlebar.js.map +1 -1
- package/dist/agents-view/AgentsView.js +9 -9
- package/dist/agents-view/AgentsView.js.map +1 -1
- package/dist/agents-view/AgentsWorkspaceView.js +20 -16
- package/dist/agents-view/AgentsWorkspaceView.js.map +1 -1
- package/dist/agents-view/CreateAgentView.js +1 -1
- package/dist/agents-view/CreateAgentView.js.map +1 -1
- package/dist/agents-view/DateAgentsGroup.js +1 -1
- package/dist/agents-view/DateAgentsGroup.js.map +1 -1
- package/dist/agents-view/ProfileAgentsGroup.js +5 -5
- package/dist/agents-view/ProfileAgentsGroup.js.map +1 -1
- package/dist/components/FilterInput.js +1 -1
- package/dist/components/FilterInput.js.map +1 -1
- package/dist/components/MarkdownDisplay.js +29 -16
- package/dist/components/MarkdownDisplay.js.map +1 -1
- package/dist/components/PageHeader.js +2 -2
- package/dist/components/PageHeader.js.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/ui/LanguageSelectionGrid.d.ts +25 -0
- package/dist/components/ui/LanguageSelectionGrid.js +40 -0
- package/dist/components/ui/LanguageSelectionGrid.js.map +1 -0
- package/dist/components/ui/LanguageSelector.d.ts +3 -1
- package/dist/components/ui/LanguageSelector.js +2 -2
- package/dist/components/ui/LanguageSelector.js.map +1 -1
- package/dist/components/ui/PlaceholderInput.js +2 -2
- package/dist/components/ui/PlaceholderInput.js.map +1 -1
- package/dist/components/ui/PlaceholderInputParser.js.map +1 -1
- package/dist/components/ui/PlaceholderInputTypes.js +1 -1
- package/dist/components/ui/PlaceholderInputTypes.js.map +1 -1
- package/dist/components/ui/PlaceholderItemSelector.js +3 -3
- package/dist/components/ui/PlaceholderItemSelector.js.map +1 -1
- package/dist/components/ui/UserPicker.js +2 -2
- package/dist/components/ui/UserPicker.js.map +1 -1
- package/dist/components/ui/accordion.js +2 -2
- package/dist/components/ui/alert-dialog.js +2 -2
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/badge.d.ts +3 -2
- package/dist/components/ui/badge.js +12 -7
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +1 -1
- package/dist/components/ui/breadcrumb.js +5 -5
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.js +3 -3
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/card.js +3 -3
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/close-button.d.ts +13 -0
- package/dist/components/ui/close-button.js +29 -0
- package/dist/components/ui/close-button.js.map +1 -0
- package/dist/components/ui/close-icon.d.ts +7 -0
- package/dist/components/ui/close-icon.js +14 -0
- package/dist/components/ui/close-icon.js.map +1 -0
- package/dist/components/ui/command.js +2 -2
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.js +8 -8
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/copy-button.js +2 -2
- package/dist/components/ui/copy-button.js.map +1 -1
- package/dist/components/ui/delete-button.d.ts +13 -0
- package/dist/components/ui/delete-button.js +36 -0
- package/dist/components/ui/delete-button.js.map +1 -0
- package/dist/components/ui/delete-icon.d.ts +7 -0
- package/dist/components/ui/delete-icon.js +14 -0
- package/dist/components/ui/delete-icon.js.map +1 -0
- package/dist/components/ui/dialog.js +3 -3
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/mention-textarea.d.ts +10 -0
- package/dist/components/ui/mention-textarea.js +180 -0
- package/dist/components/ui/mention-textarea.js.map +1 -0
- package/dist/components/ui/paste-button.js +2 -2
- package/dist/components/ui/paste-button.js.map +1 -1
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/progress.js +2 -2
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/select.js +2 -2
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/sonner.js +1 -1
- package/dist/components/ui/styled-dialog-title.js +1 -1
- package/dist/components/ui/styled-dialog-title.js.map +1 -1
- package/dist/components/ui/tabs.js +3 -3
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/tooltip.js +1 -1
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/config/config.js +24 -35
- package/dist/config/config.js.map +1 -1
- package/dist/config/notificationRoutes.js +111 -10
- package/dist/config/notificationRoutes.js.map +1 -1
- package/dist/config/types.js.map +1 -1
- package/dist/editor/AdminRequiredView.js +4 -2
- package/dist/editor/AdminRequiredView.js.map +1 -1
- package/dist/editor/AspectRatioSelector.js +5 -5
- package/dist/editor/AspectRatioSelector.js.map +1 -1
- package/dist/editor/ConcurrentUserLimitDialog.js +11 -4
- package/dist/editor/ConcurrentUserLimitDialog.js.map +1 -1
- package/dist/editor/ConfirmationDialog.js +3 -1
- package/dist/editor/ConfirmationDialog.js.map +1 -1
- package/dist/editor/ContentTree.d.ts +6 -1
- package/dist/editor/ContentTree.js +11 -5
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/ContextMenu.js +1 -1
- package/dist/editor/ContextMenu.js.map +1 -1
- package/dist/editor/DeleteItemsWarning.js +2 -2
- package/dist/editor/DeleteItemsWarning.js.map +1 -1
- package/dist/editor/Editor.js.map +1 -1
- package/dist/editor/EditorLoadingOverlay.js +1 -1
- package/dist/editor/EditorLoadingOverlay.js.map +1 -1
- package/dist/editor/EditorWarning.js +4 -4
- package/dist/editor/EditorWarning.js.map +1 -1
- package/dist/editor/FieldActionsOverlay.js +7 -7
- package/dist/editor/FieldActionsOverlay.js.map +1 -1
- package/dist/editor/FieldEditorPopup.js +2 -2
- package/dist/editor/FieldEditorPopup.js.map +1 -1
- package/dist/editor/FieldHistory.js +21 -14
- package/dist/editor/FieldHistory.js.map +1 -1
- package/dist/editor/FieldList.js +1 -1
- package/dist/editor/FieldList.js.map +1 -1
- package/dist/editor/FieldListField.js +27 -26
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/FieldListFieldWithFallbacks.js +4 -3
- package/dist/editor/FieldListFieldWithFallbacks.js.map +1 -1
- package/dist/editor/GlobalMenuBar.js +1 -1
- package/dist/editor/GlobalMenuBar.js.map +1 -1
- package/dist/editor/ImageEditButton.js +3 -3
- package/dist/editor/ImageEditButton.js.map +1 -1
- package/dist/editor/ImageEditor.js +2 -1
- package/dist/editor/ImageEditor.js.map +1 -1
- package/dist/editor/ItemInfo.js +10 -7
- package/dist/editor/ItemInfo.js.map +1 -1
- package/dist/editor/LinkEditorDialog.js +13 -8
- package/dist/editor/LinkEditorDialog.js.map +1 -1
- package/dist/editor/MainLayout.js +8 -5
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/MigrationsView.js +16 -35
- package/dist/editor/MigrationsView.js.map +1 -1
- package/dist/editor/MobileLayout.js +2 -2
- package/dist/editor/MobileLayout.js.map +1 -1
- package/dist/editor/PictureCropper.js +14 -9
- package/dist/editor/PictureCropper.js.map +1 -1
- package/dist/editor/PictureEditor.js +13 -6
- package/dist/editor/PictureEditor.js.map +1 -1
- package/dist/editor/QuickItemSwitcher.js +9 -9
- package/dist/editor/QuickItemSwitcher.js.map +1 -1
- package/dist/editor/SetupWizard.js +6 -4
- package/dist/editor/SetupWizard.js.map +1 -1
- package/dist/editor/ai/AgentInlineDialogContent.js +1 -1
- package/dist/editor/ai/AgentInlineDialogContent.js.map +1 -1
- package/dist/editor/ai/AgentPanesGrid.js +1 -1
- package/dist/editor/ai/AgentPanesGrid.js.map +1 -1
- package/dist/editor/ai/AgentProfileSelector.js +7 -5
- package/dist/editor/ai/AgentProfileSelector.js.map +1 -1
- package/dist/editor/ai/AgentSharingSection.js +7 -7
- package/dist/editor/ai/AgentSharingSection.js.map +1 -1
- package/dist/editor/ai/AgentStatusBadge.js +15 -15
- package/dist/editor/ai/AgentStatusBadge.js.map +1 -1
- package/dist/editor/ai/Agents.js +31 -29
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/ContentInspectorPopover.js +18 -13
- package/dist/editor/ai/ContentInspectorPopover.js.map +1 -1
- package/dist/editor/ai/GuidanceOverlay.js +11 -8
- package/dist/editor/ai/GuidanceOverlay.js.map +1 -1
- package/dist/editor/ai/HeartbeatDiagnosticsPanel.js +46 -26
- package/dist/editor/ai/HeartbeatDiagnosticsPanel.js.map +1 -1
- package/dist/editor/ai/InlineAiDialog.js +121 -50
- package/dist/editor/ai/InlineAiDialog.js.map +1 -1
- package/dist/editor/ai/InlineAiTrigger.js +9 -4
- package/dist/editor/ai/InlineAiTrigger.js.map +1 -1
- package/dist/editor/ai/MediaImage.js +5 -5
- package/dist/editor/ai/MediaImage.js.map +1 -1
- package/dist/editor/ai/TimeWithTooltip.js +2 -4
- package/dist/editor/ai/TimeWithTooltip.js.map +1 -1
- package/dist/editor/ai/agentDiagnostics.js +2 -1
- package/dist/editor/ai/agentDiagnostics.js.map +1 -1
- package/dist/editor/ai/agentDialogRegistry.js.map +1 -1
- package/dist/editor/ai/agentMessageHelpers.js.map +1 -1
- package/dist/editor/ai/agentMessageMarkdown.js +10 -10
- package/dist/editor/ai/agentMessageMarkdown.js.map +1 -1
- package/dist/editor/ai/agentWatchdogStatusRegistry.js.map +1 -1
- package/dist/editor/ai/dialogs/AgentDialogHandler.js +2 -4
- package/dist/editor/ai/dialogs/AgentDialogHandler.js.map +1 -1
- package/dist/editor/ai/dialogs/ComponentTypeSelectorInline.js +12 -11
- package/dist/editor/ai/dialogs/ComponentTypeSelectorInline.js.map +1 -1
- package/dist/editor/ai/dialogs/QuestionnaireInline.js +31 -27
- package/dist/editor/ai/dialogs/QuestionnaireInline.js.map +1 -1
- package/dist/editor/ai/dialogs/browserBoundCapture.js +1 -2
- package/dist/editor/ai/dialogs/browserBoundCapture.js.map +1 -1
- package/dist/editor/ai/dialogs/capturePageDom.js +2 -1
- package/dist/editor/ai/dialogs/capturePageDom.js.map +1 -1
- package/dist/editor/ai/dialogs/capturePageScreenshot.js +10 -5
- package/dist/editor/ai/dialogs/capturePageScreenshot.js.map +1 -1
- package/dist/editor/ai/terminal/agentPromptPlaceholders.js +1 -1
- package/dist/editor/ai/terminal/agentPromptPlaceholders.js.map +1 -1
- package/dist/editor/ai/terminal/agentQuestionnaireTranscriptRecovery.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionCostLimit.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionLiveTotals.js +2 -1
- package/dist/editor/ai/terminal/agentSessionLiveTotals.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionSelectors.js +1 -1
- package/dist/editor/ai/terminal/agentSessionSelectors.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionSnapshot.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionState.js +32 -16
- package/dist/editor/ai/terminal/agentSessionState.js.map +1 -1
- package/dist/editor/ai/terminal/agentStartRequest.js +8 -0
- package/dist/editor/ai/terminal/agentStartRequest.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentBanners.js +3 -3
- package/dist/editor/ai/terminal/components/AgentBanners.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentBrowserClaimBanner.js +1 -1
- package/dist/editor/ai/terminal/components/AgentBrowserClaimBanner.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js +12 -12
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentDocumentList.js +42 -30
- package/dist/editor/ai/terminal/components/AgentDocumentList.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentFullPromptControls.js +1 -1
- package/dist/editor/ai/terminal/components/AgentFullPromptControls.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentGreeting.js +3 -3
- package/dist/editor/ai/terminal/components/AgentGreeting.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentLoadingContent.js +1 -1
- package/dist/editor/ai/terminal/components/AgentLoadingContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentModeSelector.js +3 -3
- package/dist/editor/ai/terminal/components/AgentModeSelector.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentParentLink.js +1 -1
- package/dist/editor/ai/terminal/components/AgentParentLink.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPredefinedPromptsButton.js +1 -1
- package/dist/editor/ai/terminal/components/AgentPredefinedPromptsButton.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentProfileModelSettingsSection.js +3 -3
- package/dist/editor/ai/terminal/components/AgentProfileModelSettingsSection.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptComposer.js +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptComposer.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.js +2 -2
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js +5 -5
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js.map +1 -1
- 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/AgentRunStatusBanners.js +3 -3
- package/dist/editor/ai/terminal/components/AgentRunStatusBanners.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentSettingsContent.js +1 -1
- package/dist/editor/ai/terminal/components/AgentSettingsContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentSettingsPopover.js +1 -1
- package/dist/editor/ai/terminal/components/AgentSettingsPopover.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentSettingsSections.js +11 -11
- package/dist/editor/ai/terminal/components/AgentSettingsSections.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentSkillSettingsSection.js +8 -6
- package/dist/editor/ai/terminal/components/AgentSkillSettingsSection.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentSummaryAssistantResponse.js +2 -2
- package/dist/editor/ai/terminal/components/AgentSummaryAssistantResponse.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentSummaryErrorNotice.js +1 -1
- package/dist/editor/ai/terminal/components/AgentSummaryErrorNotice.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentSummaryPlaceholder.js +1 -1
- package/dist/editor/ai/terminal/components/AgentSummaryPlaceholder.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalContextChrome.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalContextPanels.js +2 -2
- package/dist/editor/ai/terminal/components/AgentTerminalContextPanels.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalDialogHost.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js +2 -4
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.js +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalMessageGroups.js +2 -1
- package/dist/editor/ai/terminal/components/AgentTerminalMessageGroups.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js +28 -24
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalView.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentThinkingDots.js +3 -3
- package/dist/editor/ai/terminal/components/AgentThinkingDots.js.map +1 -1
- package/dist/editor/ai/terminal/components/AiResponseMessage.js +49 -48
- package/dist/editor/ai/terminal/components/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/ContextInfoBar.js +18 -16
- package/dist/editor/ai/terminal/components/ContextInfoBar.js.map +1 -1
- package/dist/editor/ai/terminal/components/EditOperationsPanel.js +5 -5
- package/dist/editor/ai/terminal/components/EditOperationsPanel.js.map +1 -1
- package/dist/editor/ai/terminal/components/HeartbeatMessage.d.ts +1 -1
- package/dist/editor/ai/terminal/components/HeartbeatMessage.js +2 -2
- package/dist/editor/ai/terminal/components/HeartbeatMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/InitialThinkingSplash.js +2 -2
- package/dist/editor/ai/terminal/components/InitialThinkingSplash.js.map +1 -1
- package/dist/editor/ai/terminal/components/QueuedPromptsPanel.js +7 -6
- package/dist/editor/ai/terminal/components/QueuedPromptsPanel.js.map +1 -1
- package/dist/editor/ai/terminal/components/SpawnedAgentsPanel.js +22 -22
- package/dist/editor/ai/terminal/components/SpawnedAgentsPanel.js.map +1 -1
- package/dist/editor/ai/terminal/components/TodoListPanel.js +14 -14
- package/dist/editor/ai/terminal/components/TodoListPanel.js.map +1 -1
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js +37 -36
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/UserMessage.js +2 -2
- package/dist/editor/ai/terminal/components/UserMessage.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentContextDisplayNames.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentCostLimitActions.js +1 -3
- package/dist/editor/ai/terminal/useAgentCostLimitActions.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentCostLimitWatcher.js +1 -1
- package/dist/editor/ai/terminal/useAgentCostLimitWatcher.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentDraftInitializer.js +1 -3
- package/dist/editor/ai/terminal/useAgentDraftInitializer.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentEditorContextSync.js +1 -1
- package/dist/editor/ai/terminal/useAgentEditorContextSync.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentInfoSocketHandler.js +1 -1
- package/dist/editor/ai/terminal/useAgentInfoSocketHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentInlineDialogEvents.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentInlineDialogPipeline.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentInlineDialogState.js +1 -1
- package/dist/editor/ai/terminal/useAgentInlineDialogState.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentLoader.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentModeState.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentPendingDialogRecovery.js +9 -2
- package/dist/editor/ai/terminal/useAgentPendingDialogRecovery.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentProfileSelection.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentPromptComposerHandlers.js +2 -1
- package/dist/editor/ai/terminal/useAgentPromptComposerHandlers.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentPromptComposerSurface.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentPromptDraft.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentQuestionnaireDialogRecovery.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentQuickActions.js +2 -8
- package/dist/editor/ai/terminal/useAgentQuickActions.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentRunResyncSocketHandler.js +4 -1
- package/dist/editor/ai/terminal/useAgentRunResyncSocketHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentRunStartSocketHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentRunStatusSocketHandler.js +5 -8
- package/dist/editor/ai/terminal/useAgentRunStatusSocketHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSession.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSessionFacade.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSessionSync.js +1 -2
- package/dist/editor/ai/terminal/useAgentSessionSync.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsCommands.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsData.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js +3 -3
- package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSkillActions.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSocketMessageRouter.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentStatusBarContent.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentStopGuardState.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentStreamPipeline.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentStreamWatchdog.js +1 -5
- package/dist/editor/ai/terminal/useAgentStreamWatchdog.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js +4 -2
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSubmitLifecycle.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSummaryQuestionnaireScroll.js +1 -1
- package/dist/editor/ai/terminal/useAgentSummaryQuestionnaireScroll.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalBackgroundEvents.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalChrome.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js +2 -2
- package/dist/editor/ai/terminal/useAgentTerminalController.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalNotices.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalScroll.js +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalScroll.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalViewProps.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalViewState.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTextareaDropHandlers.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentToolApprovalSupersede.js +18 -6
- package/dist/editor/ai/terminal/useAgentToolApprovalSupersede.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentToolResultHandler.js +3 -1
- package/dist/editor/ai/terminal/useAgentToolResultHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentUserMessageSocketHandler.js.map +1 -1
- package/dist/editor/ai/types.d.ts +1 -1
- package/dist/editor/ai/useAgentPanes.js +8 -2
- package/dist/editor/ai/useAgentPanes.js.map +1 -1
- package/dist/editor/ai/useAgentStatus.js +3 -1
- package/dist/editor/ai/useAgentStatus.js.map +1 -1
- package/dist/editor/ai/useInlineAiPosition.js +37 -15
- package/dist/editor/ai/useInlineAiPosition.js.map +1 -1
- package/dist/editor/ai-image-editor/AiImageEditorDialog.js +37 -17
- package/dist/editor/ai-image-editor/AiImageEditorDialog.js.map +1 -1
- package/dist/editor/ai-image-editor/AiImageResultOverlay.js +2 -2
- package/dist/editor/ai-image-editor/AiImageResultOverlay.js.map +1 -1
- package/dist/editor/client/AboutDialog.js +2 -2
- package/dist/editor/client/AboutDialog.js.map +1 -1
- package/dist/editor/client/EditorShell.js +60 -42
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/OperationDialogContent.js +3 -3
- package/dist/editor/client/OperationDialogContent.js.map +1 -1
- package/dist/editor/client/SessionExpiredOverlay.d.ts +1 -0
- package/dist/editor/client/SessionExpiredOverlay.js +25 -0
- package/dist/editor/client/SessionExpiredOverlay.js.map +1 -0
- package/dist/editor/client/editContext.d.ts +1 -0
- package/dist/editor/client/editContext.js +3 -7
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/fieldModificationStore.js.map +1 -1
- package/dist/editor/client/helpers.js +3 -3
- package/dist/editor/client/helpers.js.map +1 -1
- package/dist/editor/client/hooks/feedbackSocketState.d.ts +6 -0
- package/dist/editor/client/hooks/feedbackSocketState.js +16 -0
- package/dist/editor/client/hooks/feedbackSocketState.js.map +1 -0
- package/dist/editor/client/hooks/useEditorWebSocket.js +5 -6
- package/dist/editor/client/hooks/useEditorWebSocket.js.map +1 -1
- package/dist/editor/client/hooks/useMediaSelector.js.map +1 -1
- package/dist/editor/client/hooks/useSocketMessageHandler.js +29 -25
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
- package/dist/editor/client/hooks/useWorkbox.d.ts +1 -0
- package/dist/editor/client/hooks/useWorkbox.js +45 -32
- package/dist/editor/client/hooks/useWorkbox.js.map +1 -1
- package/dist/editor/client/hooks/workboxDescriptors.d.ts +6 -0
- package/dist/editor/client/hooks/workboxDescriptors.js +49 -0
- package/dist/editor/client/hooks/workboxDescriptors.js.map +1 -0
- package/dist/editor/client/itemsRepository.js.map +1 -1
- package/dist/editor/client/operations.d.ts +1 -0
- package/dist/editor/client/operations.js +48 -34
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/client/ui/DevModeIndicator.js +1 -1
- package/dist/editor/client/ui/DevModeIndicator.js.map +1 -1
- package/dist/editor/client/ui/EditorChrome.js +3 -2
- package/dist/editor/client/ui/EditorChrome.js.map +1 -1
- package/dist/editor/client/ui/FullscreenControls.js +1 -1
- package/dist/editor/client/ui/FullscreenControls.js.map +1 -1
- package/dist/editor/client/waitForEditOperationTerminal.js.map +1 -1
- package/dist/editor/commands/agentCommands.js +1 -1
- package/dist/editor/commands/agentCommands.js.map +1 -1
- package/dist/editor/commands/commands.js.map +1 -1
- package/dist/editor/commands/componentCommands.js +7 -3
- package/dist/editor/commands/componentCommands.js.map +1 -1
- package/dist/editor/commands/createVersionCommand.js +1 -3
- package/dist/editor/commands/createVersionCommand.js.map +1 -1
- package/dist/editor/commands/customCommandConverter.js +10 -8
- package/dist/editor/commands/customCommandConverter.js.map +1 -1
- package/dist/editor/commands/handlers/agentHandler.js.map +1 -1
- package/dist/editor/commands/handlers/uiActionHandlers.d.ts +1 -0
- package/dist/editor/commands/handlers/uiActionHandlers.js +25 -2
- package/dist/editor/commands/handlers/uiActionHandlers.js.map +1 -1
- package/dist/editor/commands/itemCommands.js +19 -11
- package/dist/editor/commands/itemCommands.js.map +1 -1
- package/dist/editor/commands/keyboardCommands.js +4 -2
- package/dist/editor/commands/keyboardCommands.js.map +1 -1
- package/dist/editor/commands/templateBuilderCommands.js.map +1 -1
- package/dist/editor/commands/undo.js +7 -3
- package/dist/editor/commands/undo.js.map +1 -1
- package/dist/editor/content-tree/IndicatorSettings.js +2 -2
- package/dist/editor/content-tree/TreeOptions.js +1 -1
- package/dist/editor/content-tree/TreeSettingsMenu.js +7 -3
- package/dist/editor/content-tree/TreeSettingsMenu.js.map +1 -1
- package/dist/editor/context-menu/InsertMenu.js +7 -7
- package/dist/editor/context-menu/InsertMenu.js.map +1 -1
- package/dist/editor/field-types/AttachmentEditor.js +3 -3
- package/dist/editor/field-types/AttachmentEditor.js.map +1 -1
- package/dist/editor/field-types/DateFieldEditor.js +1 -1
- package/dist/editor/field-types/DateFieldEditor.js.map +1 -1
- package/dist/editor/field-types/DateTimeFieldEditor.js +1 -1
- package/dist/editor/field-types/DateTimeFieldEditor.js.map +1 -1
- package/dist/editor/field-types/DropLinkEditor.js +1 -4
- package/dist/editor/field-types/DropLinkEditor.js.map +1 -1
- package/dist/editor/field-types/ImageFieldEditor.js +1 -1
- package/dist/editor/field-types/ImageFieldEditor.js.map +1 -1
- package/dist/editor/field-types/InternalLinkFieldEditor.js +15 -7
- package/dist/editor/field-types/InternalLinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/LinkFieldEditor.js +1 -1
- package/dist/editor/field-types/LinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +1 -1
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/NameValueListEditor.js +3 -2
- package/dist/editor/field-types/NameValueListEditor.js.map +1 -1
- package/dist/editor/field-types/PictureFieldEditor.js +12 -10
- package/dist/editor/field-types/PictureFieldEditor.js.map +1 -1
- package/dist/editor/field-types/RawEditor.js +1 -1
- package/dist/editor/field-types/RawEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditor.js +7 -5
- package/dist/editor/field-types/RichTextEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditorComponent.js +10 -7
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +1 -1
- package/dist/editor/field-types/SingleLineText.js.map +1 -1
- package/dist/editor/field-types/TreeListEditor.js +66 -8
- package/dist/editor/field-types/TreeListEditor.js.map +1 -1
- package/dist/editor/field-types/richtext/components/EditorDropdown.css +7 -6
- package/dist/editor/field-types/richtext/components/EditorDropdown.d.ts +5 -5
- package/dist/editor/field-types/richtext/components/EditorDropdown.js +21 -20
- package/dist/editor/field-types/richtext/components/EditorDropdown.js.map +1 -1
- package/dist/editor/field-types/richtext/components/ReactSlate.css +70 -31
- package/dist/editor/field-types/richtext/components/ReactSlate.js +37 -12
- package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -1
- package/dist/editor/field-types/richtext/components/SimpleDropdown.js +11 -6
- package/dist/editor/field-types/richtext/components/SimpleDropdown.js.map +1 -1
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.css +29 -16
- 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/SimpleToolbarButton.js +4 -2
- package/dist/editor/field-types/richtext/components/SimpleToolbarButton.js.map +1 -1
- package/dist/editor/field-types/richtext/components/ToolbarButton.js +3 -3
- package/dist/editor/field-types/richtext/components/ToolbarButton.js.map +1 -1
- package/dist/editor/field-types/richtext/config/pluginFactory.d.ts +1 -1
- package/dist/editor/field-types/richtext/config/pluginFactory.js +1 -1
- package/dist/editor/field-types/richtext/config/pluginFactory.js.map +1 -1
- package/dist/editor/field-types/richtext/contextMenuFactory.js +58 -4
- package/dist/editor/field-types/richtext/contextMenuFactory.js.map +1 -1
- package/dist/editor/field-types/richtext/hooks/useProfileCache.d.ts +1 -1
- package/dist/editor/field-types/richtext/hooks/useProfileCache.js +19 -19
- package/dist/editor/field-types/richtext/hooks/useProfileCache.js.map +1 -1
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.d.ts +1 -1
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js +9 -9
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/conversion.d.ts +2 -2
- package/dist/editor/field-types/richtext/utils/conversion.js +275 -212
- package/dist/editor/field-types/richtext/utils/conversion.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/plugins.js +96 -69
- package/dist/editor/field-types/richtext/utils/plugins.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/profileMapper.d.ts +1 -1
- package/dist/editor/field-types/richtext/utils/profileMapper.js +186 -171
- package/dist/editor/field-types/richtext/utils/profileMapper.js.map +1 -1
- package/dist/editor/field-types/textContextMenuFactory.js +1 -1
- package/dist/editor/field-types/textContextMenuFactory.js.map +1 -1
- package/dist/editor/hooks/useNavigationPanelLogic.js.map +1 -1
- package/dist/editor/hooks/useParheliaSettings.js +8 -7
- package/dist/editor/hooks/useParheliaSettings.js.map +1 -1
- package/dist/editor/insertMenuItems.js +1 -1
- package/dist/editor/insertMenuItems.js.map +1 -1
- package/dist/editor/manualActionEvents.js +3 -1
- package/dist/editor/manualActionEvents.js.map +1 -1
- package/dist/editor/media-selector/AiImageSearchPrompt.js +1 -1
- package/dist/editor/media-selector/MediaFolderBrowser.d.ts +1 -1
- package/dist/editor/media-selector/MediaFolderBrowser.js +178 -29
- package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -1
- package/dist/editor/media-selector/MediaSelector.js +4 -2
- package/dist/editor/media-selector/MediaSelector.js.map +1 -1
- package/dist/editor/media-selector/Preview.js +9 -5
- package/dist/editor/media-selector/Preview.js.map +1 -1
- package/dist/editor/media-selector/Thumbnails.js +3 -3
- package/dist/editor/media-selector/Thumbnails.js.map +1 -1
- package/dist/editor/media-selector/TreeSelector.js +7 -7
- package/dist/editor/media-selector/TreeSelector.js.map +1 -1
- package/dist/editor/media-selector/UploadZone.js +4 -4
- package/dist/editor/media-selector/UploadZone.js.map +1 -1
- package/dist/editor/menubar/ActiveUsers.js +5 -5
- package/dist/editor/menubar/ActiveUsers.js.map +1 -1
- package/dist/editor/menubar/FavoritesControls.js +5 -3
- package/dist/editor/menubar/FavoritesControls.js.map +1 -1
- package/dist/editor/menubar/GenericToolbar.js +1 -1
- package/dist/editor/menubar/ItemActionsMenu.js +1 -1
- package/dist/editor/menubar/ItemActionsMenu.js.map +1 -1
- package/dist/editor/menubar/PageSelector.js +3 -3
- package/dist/editor/menubar/PageSelector.js.map +1 -1
- package/dist/editor/menubar/PreviewDatePicker.js +1 -1
- package/dist/editor/menubar/PreviewDatePicker.js.map +1 -1
- package/dist/editor/menubar/Separator.js +1 -1
- package/dist/editor/menubar/Separator.js.map +1 -1
- package/dist/editor/menubar/ToolbarFactory.js +2 -1
- package/dist/editor/menubar/ToolbarFactory.js.map +1 -1
- package/dist/editor/menubar/VersionPreviewCard.js +9 -4
- package/dist/editor/menubar/VersionPreviewCard.js.map +1 -1
- package/dist/editor/menubar/VersionSelector.js +7 -9
- package/dist/editor/menubar/VersionSelector.js.map +1 -1
- package/dist/editor/menubar/WorkflowButton.js +8 -9
- package/dist/editor/menubar/WorkflowButton.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/CompareControls.js +3 -1
- package/dist/editor/menubar/toolbar-sections/CompareControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/CustomCommandsToolbar.js +1 -1
- package/dist/editor/menubar/toolbar-sections/CustomCommandsToolbar.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.js +1 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js +55 -54
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/UndoRedoControls.js +10 -6
- package/dist/editor/menubar/toolbar-sections/UndoRedoControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js +4 -4
- 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/notifications/NotificationCenter.js +6 -5
- package/dist/editor/notifications/NotificationCenter.js.map +1 -1
- package/dist/editor/notifications/NotificationItem.js +5 -5
- package/dist/editor/notifications/NotificationItem.js.map +1 -1
- package/dist/editor/notifications/WatchButton.js +9 -7
- package/dist/editor/notifications/WatchButton.js.map +1 -1
- package/dist/editor/notifications/notificationListState.js +4 -1
- package/dist/editor/notifications/notificationListState.js.map +1 -1
- package/dist/editor/notifications/notificationRoutes.js.map +1 -1
- package/dist/editor/notifications/useNotifications.js +47 -18
- package/dist/editor/notifications/useNotifications.js.map +1 -1
- package/dist/editor/notifications/watchEventOptions.js +6 -2
- package/dist/editor/notifications/watchEventOptions.js.map +1 -1
- package/dist/editor/page-editor-chrome/CommentHighlightings.d.ts +2 -3
- package/dist/editor/page-editor-chrome/CommentHighlightings.js +227 -12
- package/dist/editor/page-editor-chrome/CommentHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js +11 -57
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.d.ts +1 -3
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js +17 -76
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/FieldEditedIndicators.d.ts +1 -3
- package/dist/editor/page-editor-chrome/FieldEditedIndicators.js +2 -2
- package/dist/editor/page-editor-chrome/FieldEditedIndicators.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js +51 -144
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenus.js +4 -5
- package/dist/editor/page-editor-chrome/FrameMenus.js.map +1 -1
- package/dist/editor/page-editor-chrome/InlineEditor.js +703 -60
- package/dist/editor/page-editor-chrome/InlineEditor.js.map +1 -1
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js +92 -12
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/NoLayout.js +1 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.js +39 -46
- package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -1
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js +8 -46
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +9 -9
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.d.ts +2 -4
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js +199 -216
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js.map +1 -1
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.d.ts +2 -3
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js +227 -12
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.d.ts +1 -2
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js +79 -133
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.d.ts +21 -0
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js +322 -0
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/geometry.d.ts +35 -0
- package/dist/editor/page-editor-chrome/overlay/geometry.js +137 -0
- package/dist/editor/page-editor-chrome/overlay/geometry.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/iframeAccess.d.ts +2 -0
- package/dist/editor/page-editor-chrome/overlay/iframeAccess.js +21 -0
- package/dist/editor/page-editor-chrome/overlay/iframeAccess.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/useOverlayMeasurement.d.ts +10 -0
- package/dist/editor/page-editor-chrome/overlay/useOverlayMeasurement.js +28 -0
- package/dist/editor/page-editor-chrome/overlay/useOverlayMeasurement.js.map +1 -0
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js +5 -5
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js.map +1 -1
- package/dist/editor/page-viewer/DeviceToolbar.js +2 -2
- package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -1
- package/dist/editor/page-viewer/EditorForm.js +30 -17
- package/dist/editor/page-viewer/EditorForm.js.map +1 -1
- package/dist/editor/page-viewer/EditorFormHintPopover.js +1 -1
- package/dist/editor/page-viewer/EditorFormHintPopover.js.map +1 -1
- package/dist/editor/page-viewer/MiniMap.js +58 -30
- package/dist/editor/page-viewer/MiniMap.js.map +1 -1
- package/dist/editor/page-viewer/PageViewer.js +5 -4
- package/dist/editor/page-viewer/PageViewer.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +68 -10
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/page-viewer/RenderingParametersSection.js +13 -7
- package/dist/editor/page-viewer/RenderingParametersSection.js.map +1 -1
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.js +39 -22
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.js.map +1 -1
- package/dist/editor/page-viewer/pageViewContext.js.map +1 -1
- package/dist/editor/personalization/ActionList.js +2 -2
- package/dist/editor/personalization/ActionList.js.map +1 -1
- package/dist/editor/personalization/ConditionTreeEditor.js +9 -9
- package/dist/editor/personalization/ConditionTreeEditor.js.map +1 -1
- package/dist/editor/personalization/PersonalizationPanel.d.ts +3 -1
- package/dist/editor/personalization/PersonalizationPanel.js +39 -18
- package/dist/editor/personalization/PersonalizationPanel.js.map +1 -1
- package/dist/editor/personalization/RuleElementPicker.js +3 -3
- package/dist/editor/personalization/RuleElementPicker.js.map +1 -1
- package/dist/editor/personalization/RuleList.js +13 -10
- package/dist/editor/personalization/RuleList.js.map +1 -1
- package/dist/editor/personalization/RuleParameterInput.js +10 -7
- package/dist/editor/personalization/RuleParameterInput.js.map +1 -1
- package/dist/editor/personalization/TreeItemPicker.js +4 -6
- package/dist/editor/personalization/TreeItemPicker.js.map +1 -1
- package/dist/editor/personalization/utils.js.map +1 -1
- package/dist/editor/reviews/Comment.d.ts +5 -1
- package/dist/editor/reviews/Comment.js +32 -102
- package/dist/editor/reviews/Comment.js.map +1 -1
- package/dist/editor/reviews/CommentDisplayPopover.js +239 -78
- package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/CommentEditor.d.ts +4 -2
- package/dist/editor/reviews/CommentEditor.js +16 -8
- package/dist/editor/reviews/CommentEditor.js.map +1 -1
- package/dist/editor/reviews/CommentPopover.js +7 -4
- package/dist/editor/reviews/CommentPopover.js.map +1 -1
- package/dist/editor/reviews/CommentView.d.ts +4 -1
- package/dist/editor/reviews/CommentView.js +37 -38
- package/dist/editor/reviews/CommentView.js.map +1 -1
- package/dist/editor/reviews/Comments.js +219 -26
- package/dist/editor/reviews/Comments.js.map +1 -1
- package/dist/editor/reviews/CommentsAndFeedback.d.ts +2 -8
- package/dist/editor/reviews/CommentsAndFeedback.js +10 -43
- package/dist/editor/reviews/CommentsAndFeedback.js.map +1 -1
- package/dist/editor/reviews/CreateReviewConfirmStep.js +2 -2
- package/dist/editor/reviews/CreateReviewConfirmStep.js.map +1 -1
- package/dist/editor/reviews/CreateReviewDetailsStep.js +9 -9
- package/dist/editor/reviews/CreateReviewDetailsStep.js.map +1 -1
- package/dist/editor/reviews/CreateReviewDialog.js +1 -1
- package/dist/editor/reviews/CreateReviewDialog.js.map +1 -1
- package/dist/editor/reviews/CreateReviewSuccessStep.js +2 -2
- package/dist/editor/reviews/CreateReviewSuccessStep.js.map +1 -1
- package/dist/editor/reviews/DecisionsMatrix.js +28 -24
- package/dist/editor/reviews/DecisionsMatrix.js.map +1 -1
- package/dist/editor/reviews/DiffView.js +6 -6
- package/dist/editor/reviews/DiffView.js.map +1 -1
- package/dist/editor/reviews/EditReviewSettingsDialog.js +68 -54
- package/dist/editor/reviews/EditReviewSettingsDialog.js.map +1 -1
- package/dist/editor/reviews/FeedbackCard.d.ts +20 -0
- package/dist/editor/reviews/FeedbackCard.js +30 -0
- package/dist/editor/reviews/FeedbackCard.js.map +1 -0
- package/dist/editor/reviews/ItemTreeSelector.js +1 -1
- package/dist/editor/reviews/ItemTreeSelector.js.map +1 -1
- package/dist/editor/reviews/LatestFeedback.js +16 -44
- package/dist/editor/reviews/LatestFeedback.js.map +1 -1
- package/dist/editor/reviews/MentionText.d.ts +3 -0
- package/dist/editor/reviews/MentionText.js +138 -0
- package/dist/editor/reviews/MentionText.js.map +1 -0
- package/dist/editor/reviews/PreconfiguredReviewerSelector.js +1 -1
- package/dist/editor/reviews/PreconfiguredReviewerSelector.js.map +1 -1
- package/dist/editor/reviews/ReviewCard.js +12 -11
- package/dist/editor/reviews/ReviewCard.js.map +1 -1
- package/dist/editor/reviews/ReviewDetail.js +5 -5
- package/dist/editor/reviews/ReviewDetail.js.map +1 -1
- package/dist/editor/reviews/ReviewersPanel.js +32 -19
- package/dist/editor/reviews/ReviewersPanel.js.map +1 -1
- package/dist/editor/reviews/ReviewsList.js +3 -2
- package/dist/editor/reviews/ReviewsList.js.map +1 -1
- package/dist/editor/reviews/SuggestedEdit.d.ts +4 -1
- package/dist/editor/reviews/SuggestedEdit.js +41 -41
- package/dist/editor/reviews/SuggestedEdit.js.map +1 -1
- package/dist/editor/reviews/SuggestionCommentThread.d.ts +14 -0
- package/dist/editor/reviews/SuggestionCommentThread.js +151 -0
- package/dist/editor/reviews/SuggestionCommentThread.js.map +1 -0
- package/dist/editor/reviews/SuggestionDisplayPopover.js +39 -38
- package/dist/editor/reviews/SuggestionDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/commentAi.js.map +1 -1
- package/dist/editor/reviews/feedbackAvatar.d.ts +7 -0
- package/dist/editor/reviews/feedbackAvatar.js +45 -0
- package/dist/editor/reviews/feedbackAvatar.js.map +1 -0
- package/dist/editor/reviews/feedbackCommentRules.d.ts +3 -0
- package/dist/editor/reviews/feedbackCommentRules.js +15 -0
- package/dist/editor/reviews/feedbackCommentRules.js.map +1 -0
- package/dist/editor/reviews/feedbackSelection.d.ts +3 -0
- package/dist/editor/reviews/feedbackSelection.js +37 -0
- package/dist/editor/reviews/feedbackSelection.js.map +1 -0
- package/dist/editor/reviews/latestFeedbackData.d.ts +11 -0
- package/dist/editor/reviews/latestFeedbackData.js +34 -0
- package/dist/editor/reviews/latestFeedbackData.js.map +1 -0
- package/dist/editor/reviews/reviewCommands.js +2 -2
- package/dist/editor/reviews/reviewCommands.js.map +1 -1
- package/dist/editor/reviews/useMultiReview.js +5 -4
- package/dist/editor/reviews/useMultiReview.js.map +1 -1
- package/dist/editor/services/agentService.d.ts +5 -2
- package/dist/editor/services/agentService.js +11 -8
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/agentStatus.js +1 -1
- package/dist/editor/services/agentStatus.js.map +1 -1
- package/dist/editor/services/contentService.d.ts +5 -1
- package/dist/editor/services/contentService.js +2 -2
- package/dist/editor/services/contentService.js.map +1 -1
- package/dist/editor/services/contextService.js.map +1 -1
- package/dist/editor/services/customCommandsService.js.map +1 -1
- package/dist/editor/services/editService.js +1 -3
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/services/indexService.js.map +1 -1
- package/dist/editor/services/indicatorService.js.map +1 -1
- package/dist/editor/services/localStorageService.js +3 -3
- package/dist/editor/services/localStorageService.js.map +1 -1
- package/dist/editor/services/notificationService.d.ts +1 -0
- package/dist/editor/services/notificationService.js +5 -1
- package/dist/editor/services/notificationService.js.map +1 -1
- package/dist/editor/services/personalizationService.js.map +1 -1
- package/dist/editor/services/reviewsService.d.ts +1 -1
- package/dist/editor/services/reviewsService.js +6 -2
- package/dist/editor/services/reviewsService.js.map +1 -1
- package/dist/editor/services/serviceHelper.d.ts +8 -0
- package/dist/editor/services/serviceHelper.js +59 -0
- package/dist/editor/services/serviceHelper.js.map +1 -1
- package/dist/editor/services/suggestedEditsService.js.map +1 -1
- package/dist/editor/services/systemService.d.ts +36 -0
- package/dist/editor/services/systemService.js +6 -0
- package/dist/editor/services/systemService.js.map +1 -1
- package/dist/editor/services/templateBuilderService.js +5 -6
- package/dist/editor/services/templateBuilderService.js.map +1 -1
- package/dist/editor/settings/About.js +47 -37
- package/dist/editor/settings/About.js.map +1 -1
- package/dist/editor/settings/IndexOverview.js +9 -8
- package/dist/editor/settings/IndexOverview.js.map +1 -1
- package/dist/editor/settings/QuotaInfo.js +90 -69
- package/dist/editor/settings/QuotaInfo.js.map +1 -1
- package/dist/editor/settings/QuotaUserPicker.js +2 -2
- package/dist/editor/settings/QuotaUserPicker.js.map +1 -1
- package/dist/editor/settings/SettingsBreadcrumb.d.ts +3 -6
- package/dist/editor/settings/SettingsBreadcrumb.js +12 -2
- package/dist/editor/settings/SettingsBreadcrumb.js.map +1 -1
- package/dist/editor/settings/SettingsHeaderActionsContext.d.ts +9 -3
- package/dist/editor/settings/SettingsHeaderActionsContext.js +6 -6
- package/dist/editor/settings/SettingsHeaderActionsContext.js.map +1 -1
- package/dist/editor/settings/SettingsPanelLayout.d.ts +28 -0
- package/dist/editor/settings/SettingsPanelLayout.js +24 -0
- package/dist/editor/settings/SettingsPanelLayout.js.map +1 -0
- package/dist/editor/settings/SettingsView.js +17 -23
- package/dist/editor/settings/SettingsView.js.map +1 -1
- package/dist/editor/settings/StatusSummary.js +18 -18
- package/dist/editor/settings/StatusSummary.js.map +1 -1
- package/dist/editor/settings/index/AdvancedSettings.d.ts +1 -1
- package/dist/editor/settings/index/AdvancedSettings.js +13 -11
- package/dist/editor/settings/index/AdvancedSettings.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/EmbeddingProviderInfo.js +7 -5
- package/dist/editor/settings/index/EmbeddingProviderInfo.js.map +1 -1
- package/dist/editor/settings/index/IndexStatusCards.js +3 -2
- package/dist/editor/settings/index/IndexStatusCards.js.map +1 -1
- package/dist/editor/settings/index/LatestEmbeddingsList.js +3 -1
- package/dist/editor/settings/index/LatestEmbeddingsList.js.map +1 -1
- package/dist/editor/settings/index/QueueErrorsDisplay.js +1 -1
- package/dist/editor/settings/index/QueueErrorsDisplay.js.map +1 -1
- package/dist/editor/settings/index/RebuildIndexSection.js +24 -22
- package/dist/editor/settings/index/RebuildIndexSection.js.map +1 -1
- package/dist/editor/settings/index/RecentBatchesList.js +20 -18
- package/dist/editor/settings/index/RecentBatchesList.js.map +1 -1
- package/dist/editor/settings/index/types.d.ts +0 -2
- package/dist/editor/settings/index/utils.js +16 -16
- package/dist/editor/settings/index/utils.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.d.ts +2 -0
- package/dist/editor/settings/panels/AgentToolsPanel.js +149 -0
- package/dist/editor/settings/panels/AgentToolsPanel.js.map +1 -0
- package/dist/editor/settings/panels/AgentsPanel.js +27 -10
- package/dist/editor/settings/panels/AgentsPanel.js.map +1 -1
- package/dist/editor/settings/panels/ClusterInstancesPanel.js +18 -52
- package/dist/editor/settings/panels/ClusterInstancesPanel.js.map +1 -1
- package/dist/editor/settings/panels/CreateAgentProfileDialog.js +2 -2
- package/dist/editor/settings/panels/CreateAgentProfileDialog.js.map +1 -1
- package/dist/editor/settings/panels/CreateJavaScriptToolDialog.js +3 -3
- package/dist/editor/settings/panels/CreateJavaScriptToolDialog.js.map +1 -1
- package/dist/editor/settings/panels/CreateMcpServerDialog.js +13 -5
- package/dist/editor/settings/panels/CreateMcpServerDialog.js.map +1 -1
- package/dist/editor/settings/panels/FieldTypeSerializersPanel.d.ts +2 -0
- package/dist/editor/settings/panels/FieldTypeSerializersPanel.js +50 -0
- package/dist/editor/settings/panels/FieldTypeSerializersPanel.js.map +1 -0
- package/dist/editor/settings/panels/GroupedFieldConfigPanel.js +6 -5
- package/dist/editor/settings/panels/GroupedFieldConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/ItemConfigPanel.js +3 -3
- package/dist/editor/settings/panels/ItemConfigPanel.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/JavaScriptToolsPanel.js +31 -13
- package/dist/editor/settings/panels/JavaScriptToolsPanel.js.map +1 -1
- package/dist/editor/settings/panels/McpToolsPanel.js +26 -15
- package/dist/editor/settings/panels/McpToolsPanel.js.map +1 -1
- package/dist/editor/settings/panels/ModelConfigPanel.js +1 -1
- package/dist/editor/settings/panels/ModelConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/ModelsPanel.js +88 -63
- package/dist/editor/settings/panels/ModelsPanel.js.map +1 -1
- package/dist/editor/settings/panels/NotificationSubscriptionsPanel.js +24 -6
- package/dist/editor/settings/panels/NotificationSubscriptionsPanel.js.map +1 -1
- package/dist/editor/settings/panels/PersistentLogsPanel.js +22 -13
- 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/ProjectTemplateSelector.js +5 -37
- package/dist/editor/settings/panels/ProjectTemplateSelector.js.map +1 -1
- package/dist/editor/settings/panels/ProjectTemplateSelectorList.d.ts +13 -0
- package/dist/editor/settings/panels/ProjectTemplateSelectorList.js +42 -0
- package/dist/editor/settings/panels/ProjectTemplateSelectorList.js.map +1 -0
- package/dist/editor/settings/panels/ProjectTemplatesPanel.js +106 -84
- package/dist/editor/settings/panels/ProjectTemplatesPanel.js.map +1 -1
- package/dist/editor/settings/panels/ProviderIcon.js +7 -7
- package/dist/editor/settings/panels/ProviderIcon.js.map +1 -1
- package/dist/editor/settings/panels/ProvidersPanel.js +71 -49
- package/dist/editor/settings/panels/ProvidersPanel.js.map +1 -1
- package/dist/editor/settings/panels/SearchConfigPanel.js +10 -9
- package/dist/editor/settings/panels/SearchConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/SettingsPanel.js +2 -1
- package/dist/editor/settings/panels/SettingsPanel.js.map +1 -1
- package/dist/editor/settings/panels/StatusPanel.js +32 -11
- package/dist/editor/settings/panels/StatusPanel.js.map +1 -1
- package/dist/editor/settings/panels/UserPreferencesPanel.js +3 -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/settings/status/coreStatusChecks.js +2 -1
- package/dist/editor/settings/status/coreStatusChecks.js.map +1 -1
- package/dist/editor/settings/status/useStartupChecks.js +1 -1
- package/dist/editor/settings/status/useStartupChecks.js.map +1 -1
- package/dist/editor/setup-wizard/steps/CompleteStep.js +6 -3
- package/dist/editor/setup-wizard/steps/CompleteStep.js.map +1 -1
- package/dist/editor/setup-wizard/steps/CreateSettingsStep.d.ts +1 -1
- package/dist/editor/setup-wizard/steps/CreateSettingsStep.js +3 -3
- package/dist/editor/setup-wizard/steps/CreateSettingsStep.js.map +1 -1
- package/dist/editor/setup-wizard/steps/LicenseActivationStep.js +12 -8
- package/dist/editor/setup-wizard/steps/LicenseActivationStep.js.map +1 -1
- package/dist/editor/setup-wizard/steps/LicenseEmailStep.js +3 -3
- package/dist/editor/setup-wizard/steps/LicenseEmailStep.js.map +1 -1
- package/dist/editor/setup-wizard/steps/ModelSelectionStep.js +20 -20
- package/dist/editor/setup-wizard/steps/ModelSelectionStep.js.map +1 -1
- package/dist/editor/setup-wizard/steps/ProviderStep.js +25 -15
- package/dist/editor/setup-wizard/steps/ProviderStep.js.map +1 -1
- package/dist/editor/setup-wizard/steps/WelcomeStep.js +1 -1
- package/dist/editor/setup-wizard/steps/WelcomeStep.js.map +1 -1
- package/dist/editor/sidebar/Completions.js +1 -1
- package/dist/editor/sidebar/Completions.js.map +1 -1
- package/dist/editor/sidebar/ComponentPalette.js +7 -5
- package/dist/editor/sidebar/ComponentPalette.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.js +38 -31
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/sidebar/DictionaryEditor.js +1 -1
- package/dist/editor/sidebar/DictionaryEditor.js.map +1 -1
- package/dist/editor/sidebar/EditHistory.js +2 -4
- package/dist/editor/sidebar/EditHistory.js.map +1 -1
- package/dist/editor/sidebar/Favorites.d.ts +5 -1
- package/dist/editor/sidebar/Favorites.js +39 -55
- package/dist/editor/sidebar/Favorites.js.map +1 -1
- package/dist/editor/sidebar/Insert.js +1 -1
- package/dist/editor/sidebar/MainContentTree.js +5 -2
- package/dist/editor/sidebar/MainContentTree.js.map +1 -1
- package/dist/editor/sidebar/MobileWorkspacePopover.js +2 -2
- package/dist/editor/sidebar/MobileWorkspacePopover.js.map +1 -1
- package/dist/editor/sidebar/MorePanelsButton.js +2 -2
- package/dist/editor/sidebar/MorePanelsButton.js.map +1 -1
- package/dist/editor/sidebar/NavigationPanelItem.js +3 -3
- package/dist/editor/sidebar/NavigationPanelItem.js.map +1 -1
- package/dist/editor/sidebar/NavigationPanelMenuItem.js +2 -2
- package/dist/editor/sidebar/NavigationPanelMenuItem.js.map +1 -1
- package/dist/editor/sidebar/OperationItem.js +17 -12
- package/dist/editor/sidebar/OperationItem.js.map +1 -1
- package/dist/editor/sidebar/SidebarPanel.js +17 -13
- package/dist/editor/sidebar/SidebarPanel.js.map +1 -1
- package/dist/editor/sidebar/TimelineView.js +3 -3
- package/dist/editor/sidebar/TimelineView.js.map +1 -1
- package/dist/editor/sidebar/Validation.js +2 -2
- package/dist/editor/sidebar/Validation.js.map +1 -1
- package/dist/editor/sidebar/Workbox.js +84 -20
- package/dist/editor/sidebar/Workbox.js.map +1 -1
- package/dist/editor/sidebar/WorkspaceButton.js +2 -2
- package/dist/editor/sidebar/WorkspaceButton.js.map +1 -1
- package/dist/editor/sidebar/WorkspaceRail.js +3 -3
- package/dist/editor/sidebar/WorkspaceRail.js.map +1 -1
- package/dist/editor/sidebar/WorkspaceRailMobile.js +2 -2
- package/dist/editor/sidebar/WorkspaceRailMobile.js.map +1 -1
- package/dist/editor/template-wizard/TemplateBuilderDialog.js +1 -1
- package/dist/editor/template-wizard/TemplateBuilderDialog.js.map +1 -1
- package/dist/editor/template-wizard/TemplateStructureInlineEditor.js +162 -96
- package/dist/editor/template-wizard/TemplateStructureInlineEditor.js.map +1 -1
- package/dist/editor/tree-indicators/GutterColumns.js +12 -12
- package/dist/editor/tree-indicators/GutterColumns.js.map +1 -1
- package/dist/editor/tree-indicators/GutterContext.js +5 -1
- package/dist/editor/tree-indicators/GutterContext.js.map +1 -1
- package/dist/editor/ui/CenteredMessage.js +1 -1
- package/dist/editor/ui/CenteredMessage.js.map +1 -1
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.js +3 -3
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.js.map +1 -1
- package/dist/editor/ui/DragPreview.js +15 -14
- package/dist/editor/ui/DragPreview.js.map +1 -1
- package/dist/editor/ui/ExportItemsDialog.js +1 -1
- package/dist/editor/ui/ExportItemsDialog.js.map +1 -1
- package/dist/editor/ui/HomeButton.js +1 -1
- package/dist/editor/ui/HomeButton.js.map +1 -1
- package/dist/editor/ui/HomeListRow.d.ts +11 -0
- package/dist/editor/ui/HomeListRow.js +11 -0
- package/dist/editor/ui/HomeListRow.js.map +1 -0
- package/dist/editor/ui/IconSelectorDialog.js +5 -5
- package/dist/editor/ui/IconSelectorDialog.js.map +1 -1
- package/dist/editor/ui/Icons.js +8 -8
- package/dist/editor/ui/Icons.js.map +1 -1
- package/dist/editor/ui/ImportItemsDialog.js +1 -1
- package/dist/editor/ui/ImportItemsDialog.js.map +1 -1
- package/dist/editor/ui/ItemCollectionEditor.js +28 -24
- package/dist/editor/ui/ItemCollectionEditor.js.map +1 -1
- package/dist/editor/ui/ItemList.js +1 -1
- package/dist/editor/ui/ItemList.js.map +1 -1
- package/dist/editor/ui/ItemNameDialogNew.js +1 -1
- package/dist/editor/ui/ItemNameDialogNew.js.map +1 -1
- package/dist/editor/ui/ItemSearch.js +2 -2
- package/dist/editor/ui/ItemSearch.js.map +1 -1
- package/dist/editor/ui/PerfectTree.d.ts +3 -1
- package/dist/editor/ui/PerfectTree.js +31 -17
- package/dist/editor/ui/PerfectTree.js.map +1 -1
- package/dist/editor/ui/PublishItemDialog.d.ts +1 -1
- package/dist/editor/ui/PublishItemDialog.js +8 -7
- package/dist/editor/ui/PublishItemDialog.js.map +1 -1
- package/dist/editor/ui/PublishRestrictionsDialog.js +67 -62
- package/dist/editor/ui/PublishRestrictionsDialog.js.map +1 -1
- package/dist/editor/ui/Section.js +7 -5
- package/dist/editor/ui/Section.js.map +1 -1
- package/dist/editor/ui/SharedFolderSelectorDialog.js +1 -1
- package/dist/editor/ui/SharedFolderSelectorDialog.js.map +1 -1
- package/dist/editor/ui/SimpleIconButton.js +1 -1
- package/dist/editor/ui/SimpleIconButton.js.map +1 -1
- package/dist/editor/ui/SimpleMenu.js +6 -5
- package/dist/editor/ui/SimpleMenu.js.map +1 -1
- package/dist/editor/ui/SimpleTable.js +1 -1
- package/dist/editor/ui/SimpleTable.js.map +1 -1
- package/dist/editor/ui/SimpleTabs.d.ts +3 -1
- package/dist/editor/ui/SimpleTabs.js +33 -16
- package/dist/editor/ui/SimpleTabs.js.map +1 -1
- package/dist/editor/ui/SimpleToolbar.js +1 -1
- package/dist/editor/ui/SimpleToolbar.js.map +1 -1
- package/dist/editor/ui/Splitter.js +12 -8
- package/dist/editor/ui/Splitter.js.map +1 -1
- package/dist/editor/ui/TemplateSelectorDialog.js +5 -5
- package/dist/editor/ui/TemplateSelectorDialog.js.map +1 -1
- package/dist/editor/ui/TreeListSelector.js +1 -1
- package/dist/editor/ui/TreeListSelector.js.map +1 -1
- package/dist/editor/ui/splitterResizeEvent.d.ts +2 -0
- package/dist/editor/ui/splitterResizeEvent.js +7 -0
- package/dist/editor/ui/splitterResizeEvent.js.map +1 -0
- package/dist/editor/utils/dedupeInflight.d.ts +1 -0
- package/dist/editor/utils/dedupeInflight.js +13 -0
- package/dist/editor/utils/dedupeInflight.js.map +1 -0
- package/dist/editor/utils/jsonCleaner.js +10 -10
- package/dist/editor/utils/jsonCleaner.js.map +1 -1
- package/dist/editor/utils/keyboardNavigation.js +2 -1
- package/dist/editor/utils/keyboardNavigation.js.map +1 -1
- package/dist/editor/utils/selectionContext.js.map +1 -1
- package/dist/editor/utils/versionAtDate.js.map +1 -1
- package/dist/editor/utils.js.map +1 -1
- package/dist/editor/version-diff/versionDiffHighlightStyles.d.ts +6 -6
- package/dist/editor/version-diff/versionDiffHighlightStyles.js +6 -6
- package/dist/editor/version-diff/versionDiffHighlightStyles.js.map +1 -1
- package/dist/editor/version-diff/versionDiffTargets.js.map +1 -1
- package/dist/editor/views/CompareView.js +3 -3
- package/dist/editor/views/CompareView.js.map +1 -1
- package/dist/editor/views/EditView.js +1 -1
- package/dist/editor/views/EditView.js.map +1 -1
- package/dist/editor/views/EditorSlot.js +5 -5
- package/dist/editor/views/EditorSlot.js.map +1 -1
- package/dist/editor/views/ItemEditor.js +2 -2
- package/dist/editor/views/ItemEditor.js.map +1 -1
- package/dist/editor/views/ItemEditorPane.js +2 -2
- package/dist/editor/views/ItemEditorPane.js.map +1 -1
- package/dist/editor/views/MediaFolderEditView.js +1 -1
- package/dist/editor/views/MediaFolderEditView.js.map +1 -1
- package/dist/editor/views/SingleEditView.js +15 -6
- package/dist/editor/views/SingleEditView.js.map +1 -1
- package/dist/editor/views/editorSlotContext.js +2 -1
- package/dist/editor/views/editorSlotContext.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/safelist.js +1 -1
- package/dist/lib/safelist.js.map +1 -1
- package/dist/lib/sanitize.js +79 -11
- package/dist/lib/sanitize.js.map +1 -1
- package/dist/licensing/EmailEntry.js +2 -1
- package/dist/licensing/EmailEntry.js.map +1 -1
- package/dist/licensing/FeatureGate.js +6 -6
- package/dist/licensing/FeatureGate.js.map +1 -1
- package/dist/licensing/LicenseActivationForm.js +2 -1
- package/dist/licensing/LicenseActivationForm.js.map +1 -1
- package/dist/licensing/LicenseCodeEntry.js +7 -3
- package/dist/licensing/LicenseCodeEntry.js.map +1 -1
- package/dist/licensing/LicenseContext.js +3 -4
- package/dist/licensing/LicenseContext.js.map +1 -1
- package/dist/licensing/LicenseOverlay.js +3 -1
- package/dist/licensing/LicenseOverlay.js.map +1 -1
- package/dist/licensing/licenseService.js +4 -3
- package/dist/licensing/licenseService.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/setup/services/setupWizardService.js +28 -13
- package/dist/setup/services/setupWizardService.js.map +1 -1
- package/dist/setup/wizard/steps/AddModelDialog.js +8 -8
- package/dist/setup/wizard/steps/AddModelDialog.js.map +1 -1
- package/dist/setup/wizard/steps/ImportModelDialog.js +17 -15
- package/dist/setup/wizard/steps/ImportModelDialog.js.map +1 -1
- package/dist/splash-screen/DialogWrappers.js +2 -2
- package/dist/splash-screen/DialogWrappers.js.map +1 -1
- package/dist/splash-screen/ModernSplashScreen.js +201 -65
- package/dist/splash-screen/ModernSplashScreen.js.map +1 -1
- package/dist/splash-screen/NewPage.js +12 -9
- package/dist/splash-screen/NewPage.js.map +1 -1
- package/dist/splash-screen/OpenPage.js +10 -9
- package/dist/splash-screen/OpenPage.js.map +1 -1
- package/dist/splash-screen/ParheliaAssistantChat.js +13 -12
- package/dist/splash-screen/ParheliaAssistantChat.js.map +1 -1
- package/dist/splash-screen/RecentPages.js +11 -10
- package/dist/splash-screen/RecentPages.js.map +1 -1
- package/dist/task-board/TaskBoardWorkspace.js +46 -29
- package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
- package/dist/task-board/components/AddDependencyDialog.js +5 -2
- package/dist/task-board/components/AddDependencyDialog.js.map +1 -1
- package/dist/task-board/components/CommentsList.js +6 -4
- package/dist/task-board/components/CommentsList.js.map +1 -1
- package/dist/task-board/components/CreateProjectDialog.js +10 -10
- package/dist/task-board/components/CreateProjectDialog.js.map +1 -1
- package/dist/task-board/components/CreateTaskDialog.js +3 -2
- package/dist/task-board/components/CreateTaskDialog.js.map +1 -1
- package/dist/task-board/components/ItemCollectionEditorDialog.js +1 -1
- package/dist/task-board/components/ItemCollectionEditorDialog.js.map +1 -1
- package/dist/task-board/components/ItemCollectionPicker.js +3 -3
- package/dist/task-board/components/ItemCollectionPicker.js.map +1 -1
- package/dist/task-board/components/ProjectDashboard.d.ts +1 -0
- package/dist/task-board/components/ProjectDashboard.js +27 -33
- package/dist/task-board/components/ProjectDashboard.js.map +1 -1
- package/dist/task-board/components/ProjectExecutionUserPicker.js +1 -1
- package/dist/task-board/components/ProjectExecutionUserPicker.js.map +1 -1
- package/dist/task-board/components/ProjectListContent.js +10 -9
- package/dist/task-board/components/ProjectListContent.js.map +1 -1
- package/dist/task-board/components/ProjectOverviewContent.js +10 -83
- package/dist/task-board/components/ProjectOverviewContent.js.map +1 -1
- package/dist/task-board/components/ProjectPropertiesPanel.js +10 -9
- package/dist/task-board/components/ProjectPropertiesPanel.js.map +1 -1
- package/dist/task-board/components/ProjectSettingsDialog.js +20 -12
- package/dist/task-board/components/ProjectSettingsDialog.js.map +1 -1
- package/dist/task-board/components/TaskAgentPanel.js +14 -6
- package/dist/task-board/components/TaskAgentPanel.js.map +1 -1
- package/dist/task-board/components/TaskAssigneePicker.js +15 -7
- package/dist/task-board/components/TaskAssigneePicker.js.map +1 -1
- package/dist/task-board/components/TaskAttachmentsSection.js +10 -6
- package/dist/task-board/components/TaskAttachmentsSection.js.map +1 -1
- package/dist/task-board/components/TaskBoardBreadcrumb.d.ts +17 -0
- package/dist/task-board/components/TaskBoardBreadcrumb.js +14 -0
- package/dist/task-board/components/TaskBoardBreadcrumb.js.map +1 -0
- package/dist/task-board/components/TaskBoardMyTasksSidebar.js +4 -4
- package/dist/task-board/components/TaskBoardMyTasksSidebar.js.map +1 -1
- package/dist/task-board/components/TaskBoardProjectListSidebar.js +3 -3
- package/dist/task-board/components/TaskBoardProjectListSidebar.js.map +1 -1
- package/dist/task-board/components/TaskBoardProjectSelector.d.ts +8 -0
- package/dist/task-board/components/TaskBoardProjectSelector.js +20 -0
- package/dist/task-board/components/TaskBoardProjectSelector.js.map +1 -0
- package/dist/task-board/components/TaskBoardTitlebar.js +43 -5
- package/dist/task-board/components/TaskBoardTitlebar.js.map +1 -1
- package/dist/task-board/components/TaskCard.js +32 -7
- package/dist/task-board/components/TaskCard.js.map +1 -1
- package/dist/task-board/components/TaskDetailPanel.js +29 -26
- package/dist/task-board/components/TaskDetailPanel.js.map +1 -1
- package/dist/task-board/components/TaskReviewActions.js +4 -3
- package/dist/task-board/components/TaskReviewActions.js.map +1 -1
- package/dist/task-board/components/TaskRow.js +11 -7
- package/dist/task-board/components/TaskRow.js.map +1 -1
- package/dist/task-board/components/TaskboardPersistentLogPanel.js +17 -10
- package/dist/task-board/components/TaskboardPersistentLogPanel.js.map +1 -1
- package/dist/task-board/components/WizardCommunicationCards.js +7 -5
- package/dist/task-board/components/WizardCommunicationCards.js.map +1 -1
- package/dist/task-board/components/WizardCommunicationCenter.js +5 -2
- package/dist/task-board/components/WizardCommunicationCenter.js.map +1 -1
- package/dist/task-board/components/WizardCommunicationShared.js +18 -18
- package/dist/task-board/components/WizardCommunicationShared.js.map +1 -1
- package/dist/task-board/components/WizardTask.js +2 -3
- package/dist/task-board/components/WizardTask.js.map +1 -1
- package/dist/task-board/components/WizardTaskDetailsPanel.js +8 -7
- package/dist/task-board/components/WizardTaskDetailsPanel.js.map +1 -1
- package/dist/task-board/persistentLogCopy.js +3 -1
- package/dist/task-board/persistentLogCopy.js.map +1 -1
- package/dist/task-board/persistentLogLabels.js.map +1 -1
- package/dist/task-board/services/taskService.js +4 -2
- package/dist/task-board/services/taskService.js.map +1 -1
- package/dist/task-board/taskAgentConfig.js +6 -2
- package/dist/task-board/taskAgentConfig.js.map +1 -1
- package/dist/task-board/taskAgentLink.js +1 -3
- package/dist/task-board/taskAgentLink.js.map +1 -1
- package/dist/task-board/taskExecutionRecords.js.map +1 -1
- package/dist/task-board/taskExecutionStatus.js +14 -19
- package/dist/task-board/taskExecutionStatus.js.map +1 -1
- package/dist/task-board/taskStatus.js.map +1 -1
- package/dist/task-board/useTaskBoardAgentPanelState.js +1 -3
- package/dist/task-board/useTaskBoardAgentPanelState.js.map +1 -1
- package/dist/task-board/utils/projectHierarchy.js.map +1 -1
- package/dist/task-board/utils/taskDependencyOrdering.js +2 -1
- package/dist/task-board/utils/taskDependencyOrdering.js.map +1 -1
- package/dist/task-board/views/DependencyGraphView.js +106 -58
- package/dist/task-board/views/DependencyGraphView.js.map +1 -1
- package/dist/task-board/views/KanbanView.js +44 -16
- package/dist/task-board/views/KanbanView.js.map +1 -1
- package/dist/task-board/views/ListView.js +5 -3
- package/dist/task-board/views/ListView.js.map +1 -1
- package/dist/task-board/views/WizardView.js +30 -27
- package/dist/task-board/views/WizardView.js.map +1 -1
- package/dist/tour/Tour.js +7 -7
- package/dist/tour/Tour.js.map +1 -1
- package/dist/tour/default-tour.js +169 -17
- package/dist/tour/default-tour.js.map +1 -1
- package/dist/tour/preview-tour.js +1 -1
- package/dist/tour/preview-tour.js.map +1 -1
- package/dist/types.d.ts +9 -0
- package/package.json +1 -1
- package/styles.css +129 -907
- package/dist/components/Error.d.ts +0 -9
- package/dist/components/Error.js +0 -24
- package/dist/components/Error.js.map +0 -1
- package/dist/components/ui/menubar.d.ts +0 -26
- package/dist/components/ui/menubar.js +0 -55
- package/dist/components/ui/menubar.js.map +0 -1
- package/dist/config/types/index.d.ts +0 -2
- package/dist/config/types/index.js +0 -4
- package/dist/config/types/index.js.map +0 -1
- package/dist/editor/FloatingToolbar.d.ts +0 -7
- package/dist/editor/FloatingToolbar.js +0 -91
- package/dist/editor/FloatingToolbar.js.map +0 -1
- package/dist/editor/NewEditorClient.d.ts +0 -5
- package/dist/editor/NewEditorClient.js +0 -7
- package/dist/editor/NewEditorClient.js.map +0 -1
- package/dist/editor/PictureEditorDialog.d.ts +0 -8
- package/dist/editor/PictureEditorDialog.js +0 -198
- package/dist/editor/PictureEditorDialog.js.map +0 -1
- package/dist/editor/SetupLoadingScreen.d.ts +0 -5
- package/dist/editor/SetupLoadingScreen.js +0 -11
- package/dist/editor/SetupLoadingScreen.js.map +0 -1
- package/dist/editor/client/GenericDialog.d.ts +0 -10
- package/dist/editor/client/GenericDialog.js +0 -25
- package/dist/editor/client/GenericDialog.js.map +0 -1
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.d.ts +0 -8
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.js +0 -91
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.js.map +0 -1
- package/dist/editor/content-tree/index.d.ts +0 -3
- package/dist/editor/content-tree/index.js +0 -4
- package/dist/editor/content-tree/index.js.map +0 -1
- package/dist/editor/context-menu/CopyMoveMenu.d.ts +0 -7
- package/dist/editor/context-menu/CopyMoveMenu.js +0 -58
- package/dist/editor/context-menu/CopyMoveMenu.js.map +0 -1
- package/dist/editor/menubar/ApproveAndPublish.d.ts +0 -1
- package/dist/editor/menubar/ApproveAndPublish.js +0 -13
- package/dist/editor/menubar/ApproveAndPublish.js.map +0 -1
- package/dist/editor/menubar/ItemToolbar.d.ts +0 -1
- package/dist/editor/menubar/ItemToolbar.js +0 -12
- package/dist/editor/menubar/ItemToolbar.js.map +0 -1
- package/dist/editor/menubar/NavButtons.d.ts +0 -1
- package/dist/editor/menubar/NavButtons.js +0 -40
- package/dist/editor/menubar/NavButtons.js.map +0 -1
- package/dist/editor/menubar/SiteInfo.d.ts +0 -1
- package/dist/editor/menubar/SiteInfo.js +0 -27
- package/dist/editor/menubar/SiteInfo.js.map +0 -1
- package/dist/editor/menubar/UserMenu.d.ts +0 -5
- package/dist/editor/menubar/UserMenu.js +0 -33
- package/dist/editor/menubar/UserMenu.js.map +0 -1
- package/dist/editor/page-editor-chrome/CommentHighlighting.d.ts +0 -6
- package/dist/editor/page-editor-chrome/CommentHighlighting.js +0 -316
- package/dist/editor/page-editor-chrome/CommentHighlighting.js.map +0 -1
- package/dist/editor/page-editor-chrome/SuggestionHighlighting.d.ts +0 -6
- package/dist/editor/page-editor-chrome/SuggestionHighlighting.js +0 -224
- package/dist/editor/page-editor-chrome/SuggestionHighlighting.js.map +0 -1
- package/dist/editor/picture-shared.d.ts +0 -16
- package/dist/editor/picture-shared.js +0 -25
- package/dist/editor/picture-shared.js.map +0 -1
- package/dist/editor/registry/SidebarRegistry.d.ts +0 -96
- package/dist/editor/registry/SidebarRegistry.js +0 -166
- package/dist/editor/registry/SidebarRegistry.js.map +0 -1
- package/dist/editor/registry/WorkspaceRegistry.d.ts +0 -71
- package/dist/editor/registry/WorkspaceRegistry.js +0 -112
- package/dist/editor/registry/WorkspaceRegistry.js.map +0 -1
- package/dist/editor/registry/index.d.ts +0 -2
- package/dist/editor/registry/index.js +0 -4
- package/dist/editor/registry/index.js.map +0 -1
- package/dist/editor/reviews/PagesPanel.d.ts +0 -21
- package/dist/editor/reviews/PagesPanel.js +0 -140
- package/dist/editor/reviews/PagesPanel.js.map +0 -1
- package/dist/editor/reviews/PreviewInfo.d.ts +0 -1
- package/dist/editor/reviews/PreviewInfo.js +0 -9
- package/dist/editor/reviews/PreviewInfo.js.map +0 -1
- package/dist/editor/services-server/api.d.ts +0 -18
- package/dist/editor/services-server/api.js +0 -116
- package/dist/editor/services-server/api.js.map +0 -1
- package/dist/editor/settings/Info.d.ts +0 -1
- package/dist/editor/settings/Info.js +0 -11
- package/dist/editor/settings/Info.js.map +0 -1
- package/dist/editor/settings/Status.d.ts +0 -1
- package/dist/editor/settings/Status.js +0 -89
- package/dist/editor/settings/Status.js.map +0 -1
- package/dist/editor/settings/WebSocketMessages.d.ts +0 -1
- package/dist/editor/settings/WebSocketMessages.js +0 -74
- package/dist/editor/settings/WebSocketMessages.js.map +0 -1
- package/dist/editor/settings/panels/useSidebarEditor.d.ts +0 -15
- package/dist/editor/settings/panels/useSidebarEditor.js +0 -24
- package/dist/editor/settings/panels/useSidebarEditor.js.map +0 -1
- package/dist/editor/sidebar/Divider.d.ts +0 -6
- package/dist/editor/sidebar/Divider.js +0 -6
- package/dist/editor/sidebar/Divider.js.map +0 -1
- package/dist/editor/sidebar/LabelButton.d.ts +0 -5
- package/dist/editor/sidebar/LabelButton.js +0 -12
- package/dist/editor/sidebar/LabelButton.js.map +0 -1
- package/dist/editor/sidebar/Performance.d.ts +0 -1
- package/dist/editor/sidebar/Performance.js +0 -32
- package/dist/editor/sidebar/Performance.js.map +0 -1
- package/dist/editor/sidebar/SEOInfo.d.ts +0 -1
- package/dist/editor/sidebar/SEOInfo.js +0 -158
- package/dist/editor/sidebar/SEOInfo.js.map +0 -1
- package/dist/editor/sidebar/Sidebar.d.ts +0 -1
- package/dist/editor/sidebar/Sidebar.js +0 -11
- package/dist/editor/sidebar/Sidebar.js.map +0 -1
- package/dist/editor/ui/Toolbar.d.ts +0 -3
- package/dist/editor/ui/Toolbar.js +0 -5
- package/dist/editor/ui/Toolbar.js.map +0 -1
- package/dist/editor/utils/useMemoDebug.d.ts +0 -1
- package/dist/editor/utils/useMemoDebug.js +0 -18
- package/dist/editor/utils/useMemoDebug.js.map +0 -1
- package/dist/editor/views/ParheliaView.d.ts +0 -5
- package/dist/editor/views/ParheliaView.js +0 -181
- package/dist/editor/views/ParheliaView.js.map +0 -1
- package/dist/setup/utils/modelPricing.d.ts +0 -7
- package/dist/setup/utils/modelPricing.js +0 -106
- package/dist/setup/utils/modelPricing.js.map +0 -1
- package/dist/splash-screen/ParheliaLogo.d.ts +0 -4
- package/dist/splash-screen/ParheliaLogo.js +0 -134
- package/dist/splash-screen/ParheliaLogo.js.map +0 -1
- package/dist/splash-screen/SectionHeadline.d.ts +0 -4
- package/dist/splash-screen/SectionHeadline.js +0 -7
- package/dist/splash-screen/SectionHeadline.js.map +0 -1
- package/dist/task-board/components/ProjectAgentsPanel.d.ts +0 -4
- package/dist/task-board/components/ProjectAgentsPanel.js +0 -156
- package/dist/task-board/components/ProjectAgentsPanel.js.map +0 -1
- package/dist/task-board/components/ProjectSelector.d.ts +0 -21
- package/dist/task-board/components/ProjectSelector.js +0 -16
- package/dist/task-board/components/ProjectSelector.js.map +0 -1
- package/dist/task-board/components/TaskDetailDialog.d.ts +0 -12
- package/dist/task-board/components/TaskDetailDialog.js +0 -8
- package/dist/task-board/components/TaskDetailDialog.js.map +0 -1
- package/dist/task-board/index.d.ts +0 -15
- package/dist/task-board/index.js +0 -18
- package/dist/task-board/index.js.map +0 -1
- package/dist/task-board/views/PlanningView.d.ts +0 -7
- package/dist/task-board/views/PlanningView.js +0 -112
- package/dist/task-board/views/PlanningView.js.map +0 -1
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useEditContext, useFieldsEditContext } from "../client/editContext";
|
|
3
|
-
import { findFieldElement } from "../utils";
|
|
4
|
-
import { useState, useRef } from "react";
|
|
5
|
-
import { useEffect } from "react";
|
|
6
|
-
import { cn } from "../../lib/utils";
|
|
7
|
-
import { CommentIcon } from "../ui/Icons";
|
|
8
|
-
import { CommentDisplayPopover } from "../reviews/CommentDisplayPopover";
|
|
9
|
-
export function CommentHighlighting({ comment, scale, iframe, }) {
|
|
10
|
-
const editContext = useEditContext();
|
|
11
|
-
const isSelected = comment.id === editContext?.selectedComment?.id;
|
|
12
|
-
const modifiedFields = useFieldsEditContext();
|
|
13
|
-
const [range, setRange] = useState([
|
|
14
|
-
comment.rangeStart || 0,
|
|
15
|
-
comment.rangeEnd || 0,
|
|
16
|
-
]);
|
|
17
|
-
const [rects, setRects] = useState(null);
|
|
18
|
-
const [isTextRange, setIsTextRange] = useState(false);
|
|
19
|
-
if (!editContext || !iframe)
|
|
20
|
-
return null;
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
const findRange = async () => {
|
|
23
|
-
if (!editContext)
|
|
24
|
-
return;
|
|
25
|
-
if (comment.fieldValue &&
|
|
26
|
-
comment.fieldId &&
|
|
27
|
-
comment.rangeStart !== undefined &&
|
|
28
|
-
comment.rangeEnd !== undefined) {
|
|
29
|
-
const field = await editContext.itemsRepository.getField({
|
|
30
|
-
item: {
|
|
31
|
-
id: comment.itemId,
|
|
32
|
-
language: comment.language,
|
|
33
|
-
version: comment.version,
|
|
34
|
-
},
|
|
35
|
-
fieldId: comment.fieldId,
|
|
36
|
-
});
|
|
37
|
-
const modifiedField = modifiedFields?.modifiedFields.find((x) => x.fieldId === field?.id &&
|
|
38
|
-
x.item.id === comment.itemId &&
|
|
39
|
-
x.item.language === comment.language &&
|
|
40
|
-
x.item.version === comment.version);
|
|
41
|
-
const mapping = computeMapping(modifiedField?.value || field?.rawValue || "", comment.fieldValue);
|
|
42
|
-
const mappedRange = [
|
|
43
|
-
mapping[comment.rangeStart],
|
|
44
|
-
mapping[comment.rangeEnd],
|
|
45
|
-
];
|
|
46
|
-
if (mappedRange[0] !== undefined && mappedRange[1] !== undefined) {
|
|
47
|
-
setRange(mappedRange);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
findRange();
|
|
52
|
-
}, [comment.fieldValue, modifiedFields?.modifiedFields]);
|
|
53
|
-
const rafRef = useRef(null);
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
if (!iframe) {
|
|
56
|
-
setRects(null);
|
|
57
|
-
setIsTextRange(false);
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
const calculateRects = () => {
|
|
61
|
-
if (!iframe) {
|
|
62
|
-
setRects(null);
|
|
63
|
-
setIsTextRange(false);
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const fieldElement = comment.fieldId
|
|
67
|
-
? findFieldElement(iframe, {
|
|
68
|
-
item: {
|
|
69
|
-
id: comment.itemId,
|
|
70
|
-
language: comment.language,
|
|
71
|
-
version: comment.version,
|
|
72
|
-
},
|
|
73
|
-
fieldId: comment.fieldId,
|
|
74
|
-
})
|
|
75
|
-
: undefined;
|
|
76
|
-
let calculatedRects = null;
|
|
77
|
-
let calculatedIsTextRange = false;
|
|
78
|
-
if (fieldElement && range[0] !== undefined && range[1] !== undefined) {
|
|
79
|
-
const startData = getTextNodeAtOffset(fieldElement, range[0]);
|
|
80
|
-
const endData = getTextNodeAtOffset(fieldElement, range[1]);
|
|
81
|
-
if (startData && endData) {
|
|
82
|
-
const textRange = document.createRange();
|
|
83
|
-
textRange.setStart(startData.node, startData.offset);
|
|
84
|
-
textRange.setEnd(endData.node, endData.offset);
|
|
85
|
-
calculatedRects = textRange.getClientRects();
|
|
86
|
-
calculatedIsTextRange = true;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
if (!calculatedRects || calculatedRects.length === 0) {
|
|
90
|
-
let fallbackElement = fieldElement;
|
|
91
|
-
if (!fallbackElement &&
|
|
92
|
-
comment.itemId &&
|
|
93
|
-
editContext.page &&
|
|
94
|
-
iframe.contentWindow?.document.body) {
|
|
95
|
-
const componentStart = iframe.contentWindow?.document.body.querySelector("[data-component-start='" + comment.itemId + "']");
|
|
96
|
-
fallbackElement = componentStart?.nextElementSibling;
|
|
97
|
-
while (fallbackElement && fallbackElement.tagName === "SCRIPT") {
|
|
98
|
-
fallbackElement = fallbackElement.nextElementSibling;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
if (fallbackElement) {
|
|
102
|
-
const fallbackRect = fallbackElement.getBoundingClientRect();
|
|
103
|
-
if (fallbackRect) {
|
|
104
|
-
calculatedRects = {
|
|
105
|
-
length: 1,
|
|
106
|
-
0: fallbackRect,
|
|
107
|
-
item: (index) => (index === 0 ? fallbackRect : null),
|
|
108
|
-
[Symbol.iterator]: function* () {
|
|
109
|
-
yield fallbackRect;
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
setRects(calculatedRects);
|
|
116
|
-
setIsTextRange(calculatedIsTextRange);
|
|
117
|
-
};
|
|
118
|
-
const scheduleUpdate = () => {
|
|
119
|
-
if (rafRef.current != null)
|
|
120
|
-
window.cancelAnimationFrame(rafRef.current);
|
|
121
|
-
rafRef.current = window.requestAnimationFrame(() => {
|
|
122
|
-
rafRef.current = null;
|
|
123
|
-
try {
|
|
124
|
-
calculateRects();
|
|
125
|
-
}
|
|
126
|
-
catch {
|
|
127
|
-
setRects(null);
|
|
128
|
-
setIsTextRange(false);
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
};
|
|
132
|
-
// Initial calculation
|
|
133
|
-
calculateRects();
|
|
134
|
-
// Get scroll container from iframe
|
|
135
|
-
const iframeDoc = iframe.contentWindow?.document;
|
|
136
|
-
const scrollContainer = iframeDoc?.scrollingElement || iframeDoc?.body || null;
|
|
137
|
-
const iframeWindow = iframe.contentWindow;
|
|
138
|
-
// Add scroll and resize listeners
|
|
139
|
-
scrollContainer?.addEventListener("scroll", scheduleUpdate, {
|
|
140
|
-
passive: true,
|
|
141
|
-
});
|
|
142
|
-
iframeWindow?.addEventListener("scroll", scheduleUpdate, { passive: true });
|
|
143
|
-
iframeWindow?.addEventListener("resize", scheduleUpdate);
|
|
144
|
-
// Cleanup function
|
|
145
|
-
return () => {
|
|
146
|
-
if (rafRef.current != null) {
|
|
147
|
-
window.cancelAnimationFrame(rafRef.current);
|
|
148
|
-
rafRef.current = null;
|
|
149
|
-
}
|
|
150
|
-
scrollContainer?.removeEventListener("scroll", scheduleUpdate);
|
|
151
|
-
iframeWindow?.removeEventListener("scroll", scheduleUpdate);
|
|
152
|
-
iframeWindow?.removeEventListener("resize", scheduleUpdate);
|
|
153
|
-
};
|
|
154
|
-
}, [
|
|
155
|
-
comment.fieldId,
|
|
156
|
-
comment.itemId,
|
|
157
|
-
comment.language,
|
|
158
|
-
comment.version,
|
|
159
|
-
range,
|
|
160
|
-
iframe,
|
|
161
|
-
editContext,
|
|
162
|
-
]);
|
|
163
|
-
if (!rects || rects.length === 0) {
|
|
164
|
-
return null;
|
|
165
|
-
}
|
|
166
|
-
const iframeRect = iframe.getBoundingClientRect();
|
|
167
|
-
return (_jsx(_Fragment, { children: Array.from(rects).map((rect, index) => (_jsxs("div", { style: {
|
|
168
|
-
position: "absolute",
|
|
169
|
-
top: rect.top * scale,
|
|
170
|
-
left: rect.left * scale,
|
|
171
|
-
width: rect.width * scale,
|
|
172
|
-
height: rect.height * scale,
|
|
173
|
-
pointerEvents: "none",
|
|
174
|
-
}, children: [index === 0 && (_jsx(CommentDisplayPopover, { comment: comment, onCommentUpdated: () => {
|
|
175
|
-
// Reload comments to reflect any changes
|
|
176
|
-
editContext?.loadComments?.();
|
|
177
|
-
}, children: _jsx("div", { className: cn("pointer-events-auto absolute h-5 w-5 cursor-pointer", rect.top * scale < 18 ? "top-0" : "top-[-18px]", (rect.left + rect.width) * scale > iframeRect.width - 18
|
|
178
|
-
? "right-0"
|
|
179
|
-
: "right-[-18px]"), onClick: () => {
|
|
180
|
-
// Set this comment as selected
|
|
181
|
-
editContext?.setSelectedComment(comment);
|
|
182
|
-
editContext?.setScrollIntoView(comment.itemId);
|
|
183
|
-
editContext?.select([comment.itemId]);
|
|
184
|
-
if (comment.fieldId) {
|
|
185
|
-
const fieldsContext = modifiedFields; // alias for readability
|
|
186
|
-
fieldsContext?.setFocusedField({
|
|
187
|
-
fieldId: comment.fieldId,
|
|
188
|
-
item: {
|
|
189
|
-
id: comment.itemId,
|
|
190
|
-
language: comment.language,
|
|
191
|
-
version: comment.version,
|
|
192
|
-
},
|
|
193
|
-
}, false);
|
|
194
|
-
}
|
|
195
|
-
}, children: _jsx(CommentIcon, { className: comment.isResolved
|
|
196
|
-
? "text-green-500 hover:text-green-600"
|
|
197
|
-
: isSelected
|
|
198
|
-
? "text-red-700 hover:text-red-800"
|
|
199
|
-
: "text-blue-500 hover:text-blue-600" }) }) })), isTextRange && (_jsx("div", { className: "opacity-45", style: {
|
|
200
|
-
width: "100%",
|
|
201
|
-
height: "100%",
|
|
202
|
-
backgroundColor: isSelected
|
|
203
|
-
? "rgba(255, 0, 0, 1)" // Darker red for selected
|
|
204
|
-
: comment.isResolved
|
|
205
|
-
? "rgba(0, 255, 0, 0.45)" // Green for resolved
|
|
206
|
-
: "rgba(0, 0, 255, 0.45)", // Red for unresolved
|
|
207
|
-
} }))] }, index))) }));
|
|
208
|
-
}
|
|
209
|
-
function getTextNodeAtOffset(root, offset) {
|
|
210
|
-
const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT, null);
|
|
211
|
-
let currentNode;
|
|
212
|
-
while ((currentNode = walker.nextNode())) {
|
|
213
|
-
const nodeLength = currentNode.textContent?.length || 0;
|
|
214
|
-
if (offset <= nodeLength) {
|
|
215
|
-
return { node: currentNode, offset };
|
|
216
|
-
}
|
|
217
|
-
offset -= nodeLength;
|
|
218
|
-
}
|
|
219
|
-
return null;
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Erzeugt ein Mapping von Positionen im modifizierten String s2 auf die entsprechenden Positionen in s1,
|
|
223
|
-
* basierend auf einer minimalen Edit-Sequenz (Levenshtein-Distance).
|
|
224
|
-
*
|
|
225
|
-
* @param s1 Originalstring
|
|
226
|
-
* @param s2 Modifizierter String
|
|
227
|
-
* @returns Ein Array, in dem mapping[j] die Position in s1 angibt, die erreicht wird, nachdem das j-te Zeichen in s2 erzeugt wurde.
|
|
228
|
-
*/
|
|
229
|
-
function computeMapping(s1, s2) {
|
|
230
|
-
const n = s1.length;
|
|
231
|
-
const m = s2.length;
|
|
232
|
-
// 1. Aufbau der DP-Matrix und Backpointer-Matrix
|
|
233
|
-
// dp[i][j] enthält die minimale Anzahl von Operationen, um s1[0..i-1] in s2[0..j-1] zu überführen.
|
|
234
|
-
const dp = Array.from({ length: n + 1 }, () => new Array(m + 1).fill(0));
|
|
235
|
-
const back = Array.from({ length: n + 1 }, () => new Array(m + 1).fill(""));
|
|
236
|
-
// Initialisierung: leere Präfixe
|
|
237
|
-
for (let i = 0; i <= n; i++) {
|
|
238
|
-
dp[i][0] = i;
|
|
239
|
-
if (i > 0) {
|
|
240
|
-
back[i][0] = "D"; // "Deletion": Zeichen aus s1 wird gelöscht.
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
for (let j = 0; j <= m; j++) {
|
|
244
|
-
dp[0][j] = j;
|
|
245
|
-
if (j > 0) {
|
|
246
|
-
back[0][j] = "I"; // "Insertion": Zeichen in s2 wurde eingefügt.
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
// Füllen der DP-Matrix (Wagner–Fischer-Algorithmus)
|
|
250
|
-
for (let i = 1; i <= n; i++) {
|
|
251
|
-
for (let j = 1; j <= m; j++) {
|
|
252
|
-
const cost = s1[i - 1] === s2[j - 1] ? 0 : 1;
|
|
253
|
-
// Drei Möglichkeiten:
|
|
254
|
-
const deletion = dp[i - 1][j] + 1;
|
|
255
|
-
const insertion = dp[i][j - 1] + 1;
|
|
256
|
-
const substitution = dp[i - 1][j - 1] + cost; // "M" (Match) wenn cost==0, sonst "S" (Substitution)
|
|
257
|
-
// Feste Tie-Breaking Reihenfolge: zuerst Deletion, dann Insertion, dann Substitution.
|
|
258
|
-
let bestVal = deletion;
|
|
259
|
-
let op = "D";
|
|
260
|
-
if (insertion < bestVal) {
|
|
261
|
-
bestVal = insertion;
|
|
262
|
-
op = "I";
|
|
263
|
-
}
|
|
264
|
-
if (substitution < bestVal) {
|
|
265
|
-
bestVal = substitution;
|
|
266
|
-
op = cost === 0 ? "M" : "S";
|
|
267
|
-
}
|
|
268
|
-
dp[i][j] = bestVal;
|
|
269
|
-
back[i][j] = op;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
// 2. Rekonstruktion des Edit-Skripts per Backtracking
|
|
273
|
-
const ops = [];
|
|
274
|
-
let i = n;
|
|
275
|
-
let j = m;
|
|
276
|
-
while (i > 0 || j > 0) {
|
|
277
|
-
const op = back[i][j];
|
|
278
|
-
ops.push(op);
|
|
279
|
-
if (op === "M" || op === "S") {
|
|
280
|
-
i--;
|
|
281
|
-
j--;
|
|
282
|
-
}
|
|
283
|
-
else if (op === "D") {
|
|
284
|
-
i--;
|
|
285
|
-
}
|
|
286
|
-
else if (op === "I") {
|
|
287
|
-
j--;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
ops.reverse(); // Jetzt liegen die Operationen in der Vorwärtsreihenfolge vor.
|
|
291
|
-
// 3. Simulation der Transformation von s1 zu s2 und Aufbau des Mappings.
|
|
292
|
-
// mapping[j] soll die Position in s1 angeben, nachdem das j-te Zeichen in s2 erzeugt wurde.
|
|
293
|
-
const mapping = new Array(m + 1);
|
|
294
|
-
let iPos = 0; // Aktuelle Position in s1
|
|
295
|
-
let jPos = 0; // Aktuelle Position in s2
|
|
296
|
-
mapping[jPos] = iPos; // Vor jeglicher Transformation
|
|
297
|
-
for (const op of ops) {
|
|
298
|
-
if (op === "M" || op === "S") {
|
|
299
|
-
// Bei Match oder Substitution wird in beiden Strings ein Zeichen verarbeitet.
|
|
300
|
-
iPos++;
|
|
301
|
-
jPos++;
|
|
302
|
-
mapping[jPos] = iPos;
|
|
303
|
-
}
|
|
304
|
-
else if (op === "I") {
|
|
305
|
-
// Bei Insertion wird in s2 ein Zeichen eingefügt, s1 bleibt unverändert.
|
|
306
|
-
jPos++;
|
|
307
|
-
mapping[jPos] = iPos;
|
|
308
|
-
}
|
|
309
|
-
else if (op === "D") {
|
|
310
|
-
// Bei Deletion wird in s1 ein Zeichen übersprungen.
|
|
311
|
-
iPos++;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
return mapping;
|
|
315
|
-
}
|
|
316
|
-
//# sourceMappingURL=CommentHighlighting.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommentHighlighting.js","sourceRoot":"","sources":["../../../src/editor/page-editor-chrome/CommentHighlighting.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAqB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE/D,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,MAAM,UAAU,mBAAmB,CAAC,EAClC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AC9E,IAAI,EAAE,CAAC;YACP,IAAI,EAAE,CAAC;YACP,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;QACvB,CAAC;aAAM,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;YACtB,yEAAyE;YACzE,IAAI,EAAE,CAAC;YACP,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;QACvB,CAAC;aAAM,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;YACtB,oDAAoD;YACpD,IAAI,EAAE,CAAC;QACT,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useEditContext, useFieldsEditContext } from "../client/editContext";
|
|
3
|
-
import { findFieldElement } from "../utils";
|
|
4
|
-
import { useState } from "react";
|
|
5
|
-
import { useEffect } from "react";
|
|
6
|
-
import { cn } from "../../lib/utils";
|
|
7
|
-
import { Lightbulb } from "lucide-react";
|
|
8
|
-
import * as DiffLib from "diff";
|
|
9
|
-
import { SuggestionDisplayPopover } from "../reviews/SuggestionDisplayPopover";
|
|
10
|
-
export function SuggestionHighlighting({ suggestion, scale, iframe, }) {
|
|
11
|
-
const editContext = useEditContext();
|
|
12
|
-
const modifiedFields = useFieldsEditContext();
|
|
13
|
-
const [ranges, setRanges] = useState([]);
|
|
14
|
-
const [textContent, setTextContent] = useState("");
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
const findRanges = async () => {
|
|
17
|
-
if (!editContext)
|
|
18
|
-
return;
|
|
19
|
-
const field = await editContext.itemsRepository.getField({
|
|
20
|
-
item: {
|
|
21
|
-
id: suggestion.itemId,
|
|
22
|
-
language: suggestion.mainItemLanguage,
|
|
23
|
-
version: suggestion.mainItemVersion,
|
|
24
|
-
},
|
|
25
|
-
fieldId: suggestion.fieldId,
|
|
26
|
-
});
|
|
27
|
-
const modifiedField = modifiedFields?.modifiedFields.find((x) => x.fieldId === field?.id &&
|
|
28
|
-
x.item.id === suggestion.itemId &&
|
|
29
|
-
x.item.language === suggestion.mainItemLanguage &&
|
|
30
|
-
x.item.version === suggestion.mainItemVersion);
|
|
31
|
-
// Calculate the actual differences between oldValue and newValue
|
|
32
|
-
const oldValue = suggestion.oldValue || field?.rawValue || "";
|
|
33
|
-
const newValue = modifiedField?.value || suggestion.newValue || "";
|
|
34
|
-
// If values are identical, no need to highlight
|
|
35
|
-
if (oldValue === newValue) {
|
|
36
|
-
setRanges([]);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
// Save oldValue for use in the component
|
|
40
|
-
setTextContent(oldValue);
|
|
41
|
-
// Use the diff library to find the changed parts - using diffChars for more precise matching
|
|
42
|
-
const diffResult = DiffLib.diffChars(oldValue, newValue);
|
|
43
|
-
const changeRanges = [];
|
|
44
|
-
let positionInOld = 0;
|
|
45
|
-
// Process the diff result to find all change ranges
|
|
46
|
-
for (const part of diffResult) {
|
|
47
|
-
if (part.removed) {
|
|
48
|
-
// If a part is removed, highlight it in the original text
|
|
49
|
-
changeRanges.push([positionInOld, positionInOld + part.value.length]);
|
|
50
|
-
positionInOld += part.value.length;
|
|
51
|
-
}
|
|
52
|
-
else if (part.added) {
|
|
53
|
-
// For added parts, mark the insertion point
|
|
54
|
-
if (changeRanges.length > 0) {
|
|
55
|
-
const lastRange = changeRanges[changeRanges.length - 1];
|
|
56
|
-
if (lastRange && lastRange[1] === positionInOld) {
|
|
57
|
-
// If this addition comes right after a removal, the previous range already covers the position
|
|
58
|
-
continue;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
// Mark the insertion point for new content
|
|
62
|
-
changeRanges.push([positionInOld, positionInOld]);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
// Unchanged part, just advance the position
|
|
66
|
-
positionInOld += part.value.length;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
// Merge adjacent or overlapping ranges
|
|
70
|
-
const mergedRanges = [];
|
|
71
|
-
if (changeRanges.length > 0) {
|
|
72
|
-
changeRanges.sort((a, b) => a[0] - b[0]);
|
|
73
|
-
// Start with the first range
|
|
74
|
-
const firstRange = changeRanges[0];
|
|
75
|
-
if (!firstRange) {
|
|
76
|
-
setRanges([]);
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
let currentRange = [...firstRange];
|
|
80
|
-
// Process the rest of the ranges
|
|
81
|
-
for (let i = 1; i < changeRanges.length; i++) {
|
|
82
|
-
const nextRange = changeRanges[i];
|
|
83
|
-
// Skip undefined ranges
|
|
84
|
-
if (!nextRange)
|
|
85
|
-
continue;
|
|
86
|
-
// If the next range starts very close to the end of the current range, merge them
|
|
87
|
-
if (nextRange[0] <= currentRange[1] + 3) {
|
|
88
|
-
// Allow slightly larger gaps (3 chars) for better highlighting
|
|
89
|
-
// Extend the current range
|
|
90
|
-
currentRange[1] = Math.max(currentRange[1], nextRange[1]);
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
// Save the current range and start a new one
|
|
94
|
-
mergedRanges.push([currentRange[0], currentRange[1]]);
|
|
95
|
-
currentRange = [...nextRange];
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
// Add the last range
|
|
99
|
-
mergedRanges.push([currentRange[0], currentRange[1]]);
|
|
100
|
-
}
|
|
101
|
-
// Set ranges to highlight the changed parts
|
|
102
|
-
setRanges(mergedRanges);
|
|
103
|
-
};
|
|
104
|
-
findRanges();
|
|
105
|
-
}, [editContext, modifiedFields?.modifiedFields, suggestion]);
|
|
106
|
-
if (!editContext)
|
|
107
|
-
return null;
|
|
108
|
-
if (!suggestion.fieldId)
|
|
109
|
-
return null;
|
|
110
|
-
const fieldElement = findFieldElement(iframe, {
|
|
111
|
-
item: {
|
|
112
|
-
id: suggestion.itemId,
|
|
113
|
-
language: suggestion.mainItemLanguage,
|
|
114
|
-
version: suggestion.mainItemVersion,
|
|
115
|
-
},
|
|
116
|
-
fieldId: suggestion.fieldId,
|
|
117
|
-
});
|
|
118
|
-
if (!fieldElement)
|
|
119
|
-
return null;
|
|
120
|
-
// Process each range and collect all DOM rectangles
|
|
121
|
-
const allRects = [];
|
|
122
|
-
ranges.forEach((range) => {
|
|
123
|
-
if (range[0] !== undefined && range[1] !== undefined) {
|
|
124
|
-
// For insertion points (zero-length ranges), expand to include at least one character
|
|
125
|
-
// to make it visible
|
|
126
|
-
const start = range[0];
|
|
127
|
-
const end = range[0] === range[1]
|
|
128
|
-
? Math.min(range[0] + 1, textContent.length)
|
|
129
|
-
: range[1];
|
|
130
|
-
if (start < end) {
|
|
131
|
-
const startData = getTextNodeAtPosition(fieldElement, start);
|
|
132
|
-
const endData = getTextNodeAtPosition(fieldElement, end);
|
|
133
|
-
if (startData && endData) {
|
|
134
|
-
try {
|
|
135
|
-
const textRange = document.createRange();
|
|
136
|
-
textRange.setStart(startData.node, startData.offset);
|
|
137
|
-
textRange.setEnd(endData.node, endData.offset);
|
|
138
|
-
const rangeRects = textRange.getClientRects();
|
|
139
|
-
// Convert DOMRectList to Array
|
|
140
|
-
for (let i = 0; i < rangeRects.length; i++) {
|
|
141
|
-
const rect = rangeRects[i];
|
|
142
|
-
if (rect) {
|
|
143
|
-
allRects.push(rect);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
catch (e) {
|
|
148
|
-
console.error("Error creating range", e);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
// If no rects were found, fall back to highlighting the entire field
|
|
155
|
-
if (allRects.length === 0 && ranges.length > 0) {
|
|
156
|
-
const fallbackRect = fieldElement.getBoundingClientRect();
|
|
157
|
-
allRects.push(fallbackRect);
|
|
158
|
-
}
|
|
159
|
-
const iframeRect = iframe.getBoundingClientRect();
|
|
160
|
-
return (_jsx(_Fragment, { children: allRects.map((rect, index) => (_jsx("div", { style: {
|
|
161
|
-
position: "absolute",
|
|
162
|
-
top: rect.top * scale,
|
|
163
|
-
left: rect.left * scale,
|
|
164
|
-
width: rect.width * scale,
|
|
165
|
-
height: rect.height * scale,
|
|
166
|
-
pointerEvents: "none",
|
|
167
|
-
}, children: index === 0 && (_jsx(SuggestionDisplayPopover, { suggestion: suggestion, onSuggestionUpdated: () => {
|
|
168
|
-
// The suggestion updates will be reflected when the component re-renders
|
|
169
|
-
// with the updated suggestedEdits from the edit context
|
|
170
|
-
}, children: _jsx("div", { className: cn("pointer-events-auto absolute h-5 w-5 cursor-pointer", rect.top * scale < 18 ? "top-0" : "top-[-18px]", (rect.left + rect.width) * scale > iframeRect.width - 18
|
|
171
|
-
? "right-0"
|
|
172
|
-
: "right-[-18px]"), onClick: () => {
|
|
173
|
-
editContext.select([suggestion.itemId]);
|
|
174
|
-
const fieldsContext = modifiedFields; // alias to use setter
|
|
175
|
-
fieldsContext?.setFocusedField({
|
|
176
|
-
item: {
|
|
177
|
-
id: suggestion.itemId,
|
|
178
|
-
language: suggestion.mainItemLanguage,
|
|
179
|
-
version: suggestion.mainItemVersion,
|
|
180
|
-
},
|
|
181
|
-
fieldId: suggestion.fieldId,
|
|
182
|
-
}, true);
|
|
183
|
-
}, children: _jsx(Lightbulb, { className: "rounded-full bg-emerald-400/70 p-1.5 text-white", size: 24, strokeWidth: 3 }) }) })) }, index))) }));
|
|
184
|
-
}
|
|
185
|
-
// Improved function to find text node at a given character position
|
|
186
|
-
function getTextNodeAtPosition(root, targetOffset) {
|
|
187
|
-
// Handle edge cases
|
|
188
|
-
if (targetOffset < 0)
|
|
189
|
-
return null;
|
|
190
|
-
// Get all text nodes in order
|
|
191
|
-
const textNodes = [];
|
|
192
|
-
const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT, null);
|
|
193
|
-
let node;
|
|
194
|
-
while ((node = walker.nextNode())) {
|
|
195
|
-
if (node)
|
|
196
|
-
textNodes.push(node);
|
|
197
|
-
}
|
|
198
|
-
let currentOffset = 0;
|
|
199
|
-
// Walk through all text nodes to find the one containing our target position
|
|
200
|
-
for (const node of textNodes) {
|
|
201
|
-
const nodeLength = node.textContent?.length || 0;
|
|
202
|
-
// If this node contains our target position
|
|
203
|
-
if (currentOffset + nodeLength >= targetOffset) {
|
|
204
|
-
return {
|
|
205
|
-
node: node,
|
|
206
|
-
offset: targetOffset - currentOffset,
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
currentOffset += nodeLength;
|
|
210
|
-
}
|
|
211
|
-
// If we've gone through all nodes and haven't found the position
|
|
212
|
-
// Return the last position in the last text node
|
|
213
|
-
if (textNodes.length > 0) {
|
|
214
|
-
const lastNode = textNodes[textNodes.length - 1];
|
|
215
|
-
if (lastNode) {
|
|
216
|
-
return {
|
|
217
|
-
node: lastNode,
|
|
218
|
-
offset: lastNode.textContent?.length || 0,
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
return null;
|
|
223
|
-
}
|
|
224
|
-
//# sourceMappingURL=SuggestionHighlighting.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SuggestionHighlighting.js","sourceRoot":"","sources":["../../../src/editor/page-editor-chrome/SuggestionHighlighting.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,OAAO,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAE/E,MAAM,UAAU,sBAAsB,CAAC,EACrC,UAAU,EACV,KAAK,EACL,MA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CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PictureVariant } from "./fieldTypes";
|
|
2
|
-
export type PictureParams = {
|
|
3
|
-
variant?: string;
|
|
4
|
-
aspectRatio?: number;
|
|
5
|
-
scales?: number[];
|
|
6
|
-
maxWidth?: number;
|
|
7
|
-
custom?: {
|
|
8
|
-
[paramName: string]: string | number | boolean | undefined;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export type MediaPictureParams = {
|
|
12
|
-
default: PictureParams;
|
|
13
|
-
[mediaQuery: string]: PictureParams;
|
|
14
|
-
};
|
|
15
|
-
export declare function getRenderedPictureVariant(params: PictureParams, variants: PictureVariant[]): PictureVariant;
|
|
16
|
-
export declare function getBestMatchingVariant(variants: PictureVariant[], aspectRatio: number | undefined): PictureVariant;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export function getRenderedPictureVariant(params, variants) {
|
|
2
|
-
const variantName = params.variant ?? "auto";
|
|
3
|
-
const variant = variantName.toLocaleLowerCase() === "auto" && params.aspectRatio
|
|
4
|
-
? getBestMatchingVariant(variants, params.aspectRatio)
|
|
5
|
-
: variants.find((v) => v.name.toLowerCase() == variantName.toLowerCase()) ?? variants[0];
|
|
6
|
-
return variant;
|
|
7
|
-
}
|
|
8
|
-
export function getBestMatchingVariant(variants, aspectRatio) {
|
|
9
|
-
if (!aspectRatio)
|
|
10
|
-
return (variants.find((v) => v.name.toLowerCase() == "default") ?? variants[0]);
|
|
11
|
-
let minDistance = 1000000;
|
|
12
|
-
let bestMatch = undefined;
|
|
13
|
-
for (let i = 0; i < variants.length; i++) {
|
|
14
|
-
const variant = variants[i];
|
|
15
|
-
if (!variant.src)
|
|
16
|
-
continue;
|
|
17
|
-
const distance = Math.abs(aspectRatio - variant.aspectRatio);
|
|
18
|
-
if (distance < minDistance) {
|
|
19
|
-
minDistance = distance;
|
|
20
|
-
bestMatch = variant;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return bestMatch ?? variants[0];
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=picture-shared.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"picture-shared.js","sourceRoot":"","sources":["../../src/editor/picture-shared.tsx"],"names":[],"mappings":"AAeA,MAAM,UAAU,yBAAyB,CACvC,MAAqB,EACrB,QAA0B;IAE1B,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC;IAE7C,MAAM,OAAO,GACX,WAAW,CAAC,iBAAiB,EAAE,KAAK,MAAM,IAAI,MAAM,CAAC,WAAW;QAC9D,CAAC,CAAC,sBAAsB,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC;QACtD,CAAC,CAAC,QAAQ,CAAC,IAAI,CACX,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,WAAW,CAAC,WAAW,EAAE,CACzD,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC;IACvB,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,QAA0B,EAC1B,WAA+B;IAE/B,IAAI,CAAC,WAAW;QACd,OAAO,CACL,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,SAAS,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CACvE,CAAC;IAEJ,IAAI,WAAW,GAAG,OAAO,CAAC;IAC1B,IAAI,SAAS,GAAG,SAAS,CAAC;IAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC5B,IAAI,CAAC,OAAO,CAAC,GAAG;YAAE,SA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