@parhelia/core 0.1.12788 → 0.1.12790
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.d.ts +6 -2
- package/dist/agents-view/AgentCard.js +79 -147
- package/dist/agents-view/AgentCard.js.map +1 -1
- package/dist/agents-view/AgentsSidebar.d.ts +4 -9
- package/dist/agents-view/AgentsSidebar.js +10 -13
- package/dist/agents-view/AgentsSidebar.js.map +1 -1
- package/dist/agents-view/AgentsTitlebar.d.ts +3 -3
- package/dist/agents-view/AgentsTitlebar.js +10 -7
- package/dist/agents-view/AgentsTitlebar.js.map +1 -1
- package/dist/agents-view/AgentsView.d.ts +20 -7
- package/dist/agents-view/AgentsView.js +79 -255
- package/dist/agents-view/AgentsView.js.map +1 -1
- package/dist/agents-view/AgentsWorkspaceView.d.ts +1 -1
- package/dist/agents-view/AgentsWorkspaceView.js +66 -53
- package/dist/agents-view/AgentsWorkspaceView.js.map +1 -1
- package/dist/agents-view/DateAgentsGroup.d.ts +17 -0
- package/dist/agents-view/DateAgentsGroup.js +8 -0
- package/dist/agents-view/DateAgentsGroup.js.map +1 -0
- package/dist/agents-view/ProfileAgentsGroup.d.ts +2 -2
- package/dist/agents-view/ProfileAgentsGroup.js +9 -5
- package/dist/agents-view/ProfileAgentsGroup.js.map +1 -1
- package/dist/agents-view/agentsNavStore.d.ts +8 -0
- package/dist/agents-view/agentsNavStore.js +24 -0
- package/dist/agents-view/agentsNavStore.js.map +1 -0
- package/dist/components/PageHeader.d.ts +5 -1
- package/dist/components/PageHeader.js +2 -2
- package/dist/components/PageHeader.js.map +1 -1
- package/dist/components/ui/LanguageSelector.d.ts +3 -1
- package/dist/components/ui/LanguageSelector.js +8 -4
- package/dist/components/ui/LanguageSelector.js.map +1 -1
- package/dist/components/ui/PlaceholderInput.d.ts +0 -8
- package/dist/components/ui/PlaceholderInput.js +1 -42
- package/dist/components/ui/PlaceholderInput.js.map +1 -1
- package/dist/components/ui/PlaceholderInputParser.d.ts +9 -0
- package/dist/components/ui/PlaceholderInputParser.js +98 -0
- package/dist/components/ui/PlaceholderInputParser.js.map +1 -0
- package/dist/components/ui/PlaceholderInputTypes.d.ts +1 -1
- package/dist/components/ui/UserPicker.d.ts +34 -0
- package/dist/components/ui/UserPicker.js +73 -0
- package/dist/components/ui/UserPicker.js.map +1 -0
- package/dist/components/ui/copy-button.js +2 -1
- package/dist/components/ui/copy-button.js.map +1 -1
- package/dist/components/ui/popover.js +22 -4
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/select.js +1 -2
- package/dist/components/ui/select.js.map +1 -1
- package/dist/config/config.js +15 -2
- package/dist/config/config.js.map +1 -1
- package/dist/editor/ContentTree.d.ts +14 -1
- package/dist/editor/ContentTree.js +69 -19
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/Editor.js +5 -8
- package/dist/editor/Editor.js.map +1 -1
- package/dist/editor/EditorLoadingOverlay.d.ts +1 -0
- package/dist/editor/EditorLoadingOverlay.js +7 -0
- package/dist/editor/EditorLoadingOverlay.js.map +1 -0
- package/dist/editor/FieldActionsOverlay.js +31 -4
- package/dist/editor/FieldActionsOverlay.js.map +1 -1
- package/dist/editor/FieldListField.js +6 -1
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/GlobalMenuBar.js +9 -6
- package/dist/editor/GlobalMenuBar.js.map +1 -1
- package/dist/editor/ai/AgentSharingSection.js +15 -2
- package/dist/editor/ai/AgentSharingSection.js.map +1 -1
- package/dist/editor/ai/Agents.js +2 -3
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/InlineAiDialog.d.ts +5 -0
- package/dist/editor/ai/InlineAiDialog.js +77 -64
- package/dist/editor/ai/InlineAiDialog.js.map +1 -1
- package/dist/editor/ai/InlineAiTrigger.js +4 -0
- package/dist/editor/ai/InlineAiTrigger.js.map +1 -1
- package/dist/editor/ai/agentTodoExtraction.d.ts +7 -1
- package/dist/editor/ai/agentTodoExtraction.js +33 -0
- package/dist/editor/ai/agentTodoExtraction.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentDocumentList.d.ts +13 -0
- package/dist/editor/ai/terminal/components/AgentDocumentList.js +61 -46
- package/dist/editor/ai/terminal/components/AgentDocumentList.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentProfileModelSettingsSection.d.ts +4 -3
- package/dist/editor/ai/terminal/components/AgentProfileModelSettingsSection.js +6 -9
- package/dist/editor/ai/terminal/components/AgentProfileModelSettingsSection.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.d.ts +10 -2
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.js +42 -9
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.d.ts +19 -0
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js +71 -0
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentSettingsContent.d.ts +4 -3
- package/dist/editor/ai/terminal/components/AgentSettingsContent.js +2 -2
- package/dist/editor/ai/terminal/components/AgentSettingsContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalContextChrome.d.ts +2 -0
- package/dist/editor/ai/terminal/components/AgentTerminalContextChrome.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalContextPanels.js +4 -2
- package/dist/editor/ai/terminal/components/AgentTerminalContextPanels.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.d.ts +3 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js +2 -2
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullPromptControls.d.ts +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullPromptControls.js +2 -2
- package/dist/editor/ai/terminal/components/AgentTerminalFullPromptControls.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.d.ts +5 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.js +2 -2
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.d.ts +2 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js +2 -2
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalView.d.ts +2 -1
- package/dist/editor/ai/terminal/components/AgentTerminalView.js +7 -2
- package/dist/editor/ai/terminal/components/AgentTerminalView.js.map +1 -1
- package/dist/editor/ai/terminal/components/ContextInfoBar.d.ts +3 -1
- package/dist/editor/ai/terminal/components/ContextInfoBar.js +12 -3
- package/dist/editor/ai/terminal/components/ContextInfoBar.js.map +1 -1
- package/dist/editor/ai/terminal/components/EditOperationsPanel.d.ts +3 -1
- package/dist/editor/ai/terminal/components/EditOperationsPanel.js +13 -2
- package/dist/editor/ai/terminal/components/EditOperationsPanel.js.map +1 -1
- package/dist/editor/ai/terminal/components/QueuedPromptsPanel.d.ts +5 -1
- package/dist/editor/ai/terminal/components/QueuedPromptsPanel.js +12 -12
- package/dist/editor/ai/terminal/components/QueuedPromptsPanel.js.map +1 -1
- package/dist/editor/ai/terminal/components/SpawnedAgentsPanel.d.ts +2 -1
- package/dist/editor/ai/terminal/components/SpawnedAgentsPanel.js +18 -14
- package/dist/editor/ai/terminal/components/SpawnedAgentsPanel.js.map +1 -1
- package/dist/editor/ai/terminal/components/TodoListPanel.d.ts +2 -1
- package/dist/editor/ai/terminal/components/TodoListPanel.js +10 -6
- package/dist/editor/ai/terminal/components/TodoListPanel.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentPromptComposerSurface.d.ts +3 -2
- package/dist/editor/ai/terminal/useAgentSessionSync.d.ts +9 -1
- package/dist/editor/ai/terminal/useAgentSessionSync.js +7 -1
- package/dist/editor/ai/terminal/useAgentSessionSync.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsNavigation.d.ts +3 -2
- package/dist/editor/ai/terminal/useAgentSettingsNavigation.js +3 -21
- package/dist/editor/ai/terminal/useAgentSettingsNavigation.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsPanel.d.ts +3 -2
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js +1 -2
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js +2 -2
- package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentStatusBarContent.js +1 -1
- package/dist/editor/ai/terminal/useAgentStatusBarContent.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.d.ts +2 -1
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js +122 -2
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSubmitLifecycle.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentSubmitLifecycle.js +2 -1
- package/dist/editor/ai/terminal/useAgentSubmitLifecycle.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSubmitResponseHandler.js +1 -0
- package/dist/editor/ai/terminal/useAgentSubmitResponseHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalActions.d.ts +6 -5
- package/dist/editor/ai/terminal/useAgentTerminalActions.js +3 -10
- package/dist/editor/ai/terminal/useAgentTerminalActions.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js +45 -6
- package/dist/editor/ai/terminal/useAgentTerminalController.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalViewProps.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalViewProps.js +2 -1
- package/dist/editor/ai/terminal/useAgentTerminalViewProps.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTextareaDropHandlers.d.ts +25 -0
- package/dist/editor/ai/terminal/useAgentTextareaDropHandlers.js +187 -0
- package/dist/editor/ai/terminal/useAgentTextareaDropHandlers.js.map +1 -0
- package/dist/editor/client/AboutDialog.js +2 -1
- package/dist/editor/client/AboutDialog.js.map +1 -1
- package/dist/editor/client/EditorShell.js +118 -30
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +4 -1
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/fieldModificationStore.d.ts +5 -2
- package/dist/editor/client/fieldModificationStore.js +31 -21
- package/dist/editor/client/fieldModificationStore.js.map +1 -1
- package/dist/editor/client/hooks/useEditorWebSocket.js +0 -47
- package/dist/editor/client/hooks/useEditorWebSocket.js.map +1 -1
- package/dist/editor/client/hooks/useSocketMessageHandler.d.ts +1 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js +47 -49
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
- package/dist/editor/client/itemsRepository.d.ts +8 -5
- package/dist/editor/client/itemsRepository.js +30 -37
- package/dist/editor/client/itemsRepository.js.map +1 -1
- package/dist/editor/client/operations.d.ts +8 -1
- package/dist/editor/client/operations.js +29 -9
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/client/ui/EditorChrome.js +7 -1
- package/dist/editor/client/ui/EditorChrome.js.map +1 -1
- package/dist/editor/commands/createVersionCommand.js +8 -2
- package/dist/editor/commands/createVersionCommand.js.map +1 -1
- package/dist/editor/field-types/DropLinkEditor.js +4 -1
- package/dist/editor/field-types/DropLinkEditor.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +3 -1
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/NameValueListEditor.js +4 -1
- package/dist/editor/field-types/NameValueListEditor.js.map +1 -1
- package/dist/editor/field-types/PictureFieldEditor.js +8 -4
- package/dist/editor/field-types/PictureFieldEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditorComponent.js +6 -2
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +3 -1
- package/dist/editor/field-types/SingleLineText.js.map +1 -1
- package/dist/editor/field-types/TreeListEditor.js +6 -1
- package/dist/editor/field-types/TreeListEditor.js.map +1 -1
- package/dist/editor/field-types/richtext/contextMenuFactory.d.ts +2 -1
- package/dist/editor/field-types/richtext/contextMenuFactory.js +7 -5
- package/dist/editor/field-types/richtext/contextMenuFactory.js.map +1 -1
- package/dist/editor/hooks/useNavigationPanelLogic.d.ts +3 -3
- package/dist/editor/hooks/useNavigationPanelLogic.js +5 -5
- package/dist/editor/hooks/useNavigationPanelLogic.js.map +1 -1
- package/dist/editor/menubar/ItemLanguageVersion.d.ts +4 -1
- package/dist/editor/menubar/ItemLanguageVersion.js +11 -3
- package/dist/editor/menubar/ItemLanguageVersion.js.map +1 -1
- package/dist/editor/menubar/VersionPreviewCard.js +26 -6
- package/dist/editor/menubar/VersionPreviewCard.js.map +1 -1
- package/dist/editor/menubar/VersionSelector.js +17 -6
- package/dist/editor/menubar/VersionSelector.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.d.ts +7 -0
- package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.js +37 -0
- package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js +2 -2
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js +7 -11
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/index.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/index.js +1 -0
- package/dist/editor/menubar/toolbar-sections/index.js.map +1 -1
- package/dist/editor/notifications/useNotifications.js +11 -4
- package/dist/editor/notifications/useNotifications.js.map +1 -1
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js +3 -1
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.d.ts +4 -2
- package/dist/editor/page-editor-chrome/FrameMenu.js +33 -9
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
- package/dist/editor/page-editor-chrome/InlineEditor.d.ts +4 -2
- package/dist/editor/page-editor-chrome/InlineEditor.js +125 -20
- package/dist/editor/page-editor-chrome/InlineEditor.js.map +1 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.d.ts +4 -2
- package/dist/editor/page-editor-chrome/PageEditorChrome.js +16 -3
- package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -1
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js +36 -13
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js +24 -4
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js +52 -22
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js.map +1 -1
- package/dist/editor/page-viewer/MiniMap.js +29 -21
- package/dist/editor/page-viewer/MiniMap.js.map +1 -1
- package/dist/editor/page-viewer/PageViewer.d.ts +4 -2
- package/dist/editor/page-viewer/PageViewer.js +14 -6
- package/dist/editor/page-viewer/PageViewer.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.d.ts +4 -2
- package/dist/editor/page-viewer/PageViewerFrame.js +171 -52
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/reviews/Comment.js +24 -0
- package/dist/editor/reviews/Comment.js.map +1 -1
- package/dist/editor/services/agentService.d.ts +18 -1
- package/dist/editor/services/agentService.js +34 -3
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/aiService.d.ts +0 -36
- package/dist/editor/services/aiService.js +7 -64
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/editor/services/manualService.d.ts +31 -0
- package/dist/editor/services/manualService.js +77 -0
- package/dist/editor/services/manualService.js.map +1 -0
- package/dist/editor/services/serviceHelper.js +0 -14
- package/dist/editor/services/serviceHelper.js.map +1 -1
- package/dist/editor/services/systemService.d.ts +4 -0
- package/dist/editor/services/systemService.js +3 -0
- package/dist/editor/services/systemService.js.map +1 -1
- package/dist/editor/services/userService.d.ts +6 -0
- package/dist/editor/services/userService.js +13 -0
- package/dist/editor/services/userService.js.map +1 -0
- package/dist/editor/settings/About.js +178 -1
- package/dist/editor/settings/About.js.map +1 -1
- package/dist/editor/settings/QuotaInfo.js +7 -7
- package/dist/editor/settings/QuotaInfo.js.map +1 -1
- package/dist/editor/settings/QuotaUserPicker.js +15 -55
- package/dist/editor/settings/QuotaUserPicker.js.map +1 -1
- package/dist/editor/settings/SettingsBreadcrumb.js +1 -1
- package/dist/editor/settings/SettingsBreadcrumb.js.map +1 -1
- package/dist/editor/settings/SettingsView.js +1 -1
- package/dist/editor/settings/SettingsView.js.map +1 -1
- package/dist/editor/settings/panels/AgentProfileConfigPanel.d.ts +2 -1
- package/dist/editor/settings/panels/AgentProfileConfigPanel.js +4 -2
- package/dist/editor/settings/panels/AgentProfileConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/AgentProfileEditorPanel.d.ts +1 -0
- package/dist/editor/settings/panels/AgentProfileEditorPanel.js +1 -1
- package/dist/editor/settings/panels/AgentProfileEditorPanel.js.map +1 -1
- package/dist/editor/settings/panels/AgentsPanel.js +15 -10
- package/dist/editor/settings/panels/AgentsPanel.js.map +1 -1
- package/dist/editor/settings/panels/ClusterInstancesPanel.js +37 -10
- package/dist/editor/settings/panels/ClusterInstancesPanel.js.map +1 -1
- package/dist/editor/settings/panels/CreateMcpServerDialog.d.ts +7 -0
- package/dist/editor/settings/panels/CreateMcpServerDialog.js +71 -0
- package/dist/editor/settings/panels/CreateMcpServerDialog.js.map +1 -0
- package/dist/editor/settings/panels/JavaScriptToolsPanel.js +13 -17
- package/dist/editor/settings/panels/JavaScriptToolsPanel.js.map +1 -1
- package/dist/editor/settings/panels/McpToolsPanel.js +17 -8
- package/dist/editor/settings/panels/McpToolsPanel.js.map +1 -1
- package/dist/editor/settings/panels/ModelsPanel.js +92 -56
- package/dist/editor/settings/panels/ModelsPanel.js.map +1 -1
- package/dist/editor/settings/panels/ProvidersPanel.js +46 -47
- package/dist/editor/settings/panels/ProvidersPanel.js.map +1 -1
- package/dist/editor/settings/panels/SearchConfigPanel.js +2 -2
- package/dist/editor/settings/panels/SearchConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/UserPreferencesPanel.d.ts +2 -0
- package/dist/editor/settings/panels/UserPreferencesPanel.js +17 -0
- package/dist/editor/settings/panels/UserPreferencesPanel.js.map +1 -0
- package/dist/editor/settings/panels/index.d.ts +1 -0
- package/dist/editor/settings/panels/index.js +1 -0
- package/dist/editor/settings/panels/index.js.map +1 -1
- package/dist/editor/sidebar/EditHistory.js +18 -3
- package/dist/editor/sidebar/EditHistory.js.map +1 -1
- package/dist/editor/sidebar/LabelButton.d.ts +3 -3
- package/dist/editor/sidebar/LabelButton.js +4 -4
- package/dist/editor/sidebar/LabelButton.js.map +1 -1
- package/dist/editor/sidebar/MobileWorkspacePopover.d.ts +2 -2
- package/dist/editor/sidebar/MobileWorkspacePopover.js +2 -2
- package/dist/editor/sidebar/MobileWorkspacePopover.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/WorkspaceButton.d.ts +3 -1
- package/dist/editor/sidebar/WorkspaceButton.js +15 -7
- package/dist/editor/sidebar/WorkspaceButton.js.map +1 -1
- package/dist/editor/sidebar/WorkspaceRail.js +6 -5
- 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/ui/ItemCollectionEditor.d.ts +27 -3
- package/dist/editor/ui/ItemCollectionEditor.js +44 -5
- package/dist/editor/ui/ItemCollectionEditor.js.map +1 -1
- package/dist/editor/ui/PerfectTree.js +1 -1
- package/dist/editor/ui/PerfectTree.js.map +1 -1
- package/dist/editor/utils.js +33 -11
- package/dist/editor/utils.js.map +1 -1
- package/dist/editor/version-diff/versionDiffTargets.js +7 -1
- package/dist/editor/version-diff/versionDiffTargets.js.map +1 -1
- package/dist/editor/views/EditorSlot.js +3 -2
- package/dist/editor/views/EditorSlot.js.map +1 -1
- package/dist/editor/views/ItemEditorPane.d.ts +11 -0
- package/dist/editor/views/ItemEditorPane.js +19 -0
- package/dist/editor/views/ItemEditorPane.js.map +1 -0
- package/dist/editor/views/editorSlotContext.d.ts +2 -0
- package/dist/editor/views/editorSlotContext.js +3 -0
- package/dist/editor/views/editorSlotContext.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/setup/services/setupWizardService.d.ts +10 -0
- package/dist/setup/services/setupWizardService.js +7 -0
- package/dist/setup/services/setupWizardService.js.map +1 -1
- package/dist/task-board/TaskBoardWorkspace.js +1 -0
- package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
- package/dist/task-board/components/ProjectExecutionUserPicker.js +15 -61
- package/dist/task-board/components/ProjectExecutionUserPicker.js.map +1 -1
- package/dist/task-board/components/ProjectListContent.d.ts +1 -0
- package/dist/task-board/components/ProjectListContent.js.map +1 -1
- package/dist/task-board/components/ProjectSelector.d.ts +1 -0
- package/dist/task-board/components/ProjectSelector.js +7 -1
- package/dist/task-board/components/ProjectSelector.js.map +1 -1
- package/dist/task-board/components/TaskBoardTitlebar.js +1 -1
- package/dist/task-board/components/TaskBoardTitlebar.js.map +1 -1
- package/dist/task-board/taskBoardNavStore.d.ts +1 -0
- package/dist/task-board/taskBoardNavStore.js +1 -0
- package/dist/task-board/taskBoardNavStore.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/package.json +1 -1
- package/dist/agents-view/AgentsInbox.d.ts +0 -26
- package/dist/agents-view/AgentsInbox.js +0 -31
- package/dist/agents-view/AgentsInbox.js.map +0 -1
- package/dist/editor/ai/agentDiagnostics.test.d.ts +0 -1
- package/dist/editor/ai/agentDiagnostics.test.js +0 -298
- package/dist/editor/ai/agentDiagnostics.test.js.map +0 -1
- package/dist/editor/ai/terminal/agentQuestionnaireTranscriptRecovery.test.d.ts +0 -1
- package/dist/editor/ai/terminal/agentQuestionnaireTranscriptRecovery.test.js +0 -109
- package/dist/editor/ai/terminal/agentQuestionnaireTranscriptRecovery.test.js.map +0 -1
- package/dist/editor/ai/terminal/agentSessionSelectors.test.d.ts +0 -1
- package/dist/editor/ai/terminal/agentSessionSelectors.test.js +0 -219
- package/dist/editor/ai/terminal/agentSessionSelectors.test.js.map +0 -1
- package/dist/editor/ai/terminal/agentSessionSnapshot.test.d.ts +0 -1
- package/dist/editor/ai/terminal/agentSessionSnapshot.test.js +0 -136
- package/dist/editor/ai/terminal/agentSessionSnapshot.test.js.map +0 -1
- package/dist/editor/ai/terminal/agentSessionState.test.d.ts +0 -1
- package/dist/editor/ai/terminal/agentSessionState.test.js +0 -476
- package/dist/editor/ai/terminal/agentSessionState.test.js.map +0 -1
- package/dist/editor/ai/terminal/useAgentInitialPrompt.test.d.ts +0 -1
- package/dist/editor/ai/terminal/useAgentInitialPrompt.test.js +0 -63
- package/dist/editor/ai/terminal/useAgentInitialPrompt.test.js.map +0 -1
- package/dist/editor/ai/terminal/useAgentPendingDialogRecovery.test.d.ts +0 -1
- package/dist/editor/ai/terminal/useAgentPendingDialogRecovery.test.js +0 -80
- package/dist/editor/ai/terminal/useAgentPendingDialogRecovery.test.js.map +0 -1
- package/dist/editor/ai/terminal/useAgentQuestionnaireDialogRecovery.test.d.ts +0 -1
- package/dist/editor/ai/terminal/useAgentQuestionnaireDialogRecovery.test.js +0 -135
- package/dist/editor/ai/terminal/useAgentQuestionnaireDialogRecovery.test.js.map +0 -1
- package/dist/editor/ai/terminal/useAgentSession.test.d.ts +0 -1
- package/dist/editor/ai/terminal/useAgentSession.test.js +0 -181
- package/dist/editor/ai/terminal/useAgentSession.test.js.map +0 -1
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.test.d.ts +0 -1
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.test.js +0 -88
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.test.js.map +0 -1
- package/dist/editor/ai/useAgentPanes.test.d.ts +0 -1
- package/dist/editor/ai/useAgentPanes.test.js +0 -198
- package/dist/editor/ai/useAgentPanes.test.js.map +0 -1
- package/dist/editor/debugSessionLog.d.ts +0 -9
- package/dist/editor/debugSessionLog.js +0 -19
- package/dist/editor/debugSessionLog.js.map +0 -1
- package/dist/editor/services/agentDialogService.test.d.ts +0 -1
- package/dist/editor/services/agentDialogService.test.js +0 -56
- package/dist/editor/services/agentDialogService.test.js.map +0 -1
- package/dist/editor/services/agentSubscriptionRegistry.test.d.ts +0 -1
- package/dist/editor/services/agentSubscriptionRegistry.test.js +0 -104
- package/dist/editor/services/agentSubscriptionRegistry.test.js.map +0 -1
- package/dist/test/setup.d.ts +0 -0
- package/dist/test/setup.js +0 -37
- package/dist/test/setup.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageViewer.js","sourceRoot":"","sources":["../../../src/editor/page-viewer/PageViewer.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,c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B,KAAK,CACN,EAEH,IAAI,EAAE,KAAC,CAAC,IAAC,SAAS,EAAC,QAAQ,GAAG,EAC9B,KAAK,EAAC,OAAO,EACb,SAAS,EAAC,MAAM,GAChB,IACE,EACN,cAAK,SAAS,EAAC,gCAAgC,YAC7C,KAAC,aAAa,IACZ,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,kBAAkB,EAClC,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,aAAa,GACxB,GACE,IACF,GACF,CACP;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC,YAC5C,KAAC,QAAQ,IACP,MAAM,EAAE,YAAY,EACpB,iBAAiB,EAAC,iCAAiC,EACnD,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,EACjD,eAAe,EAAC,6BAA6B,GAC7C,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -4,9 +4,11 @@ declare global {
|
|
|
4
4
|
requestRefresh?: (newUri?: string) => boolean;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
type PageViewerFrameProps = {
|
|
8
8
|
compareView: boolean;
|
|
9
9
|
pageViewContext?: PageViewContext;
|
|
10
10
|
className?: string;
|
|
11
11
|
slotCloseButton?: React.ReactNode;
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
|
+
export declare function PageViewerFrame(props: PageViewerFrameProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { useEffect, useRef, useState } from "react";
|
|
3
3
|
import { MiniMap } from "./MiniMap";
|
|
4
4
|
import { useEditContext, useEditContextRef, useFieldsEditContext, useFieldsEditContextRef, } from "../client/editContext";
|
|
5
|
+
import { useSlotContext } from "../views/editorSlotContext";
|
|
5
6
|
import { useDebouncedCallback, useThrottledCallback } from "use-debounce";
|
|
6
7
|
import { PageEditorChrome } from "../page-editor-chrome/PageEditorChrome";
|
|
7
8
|
import { useViewportChangeSignal } from "./pageViewContext";
|
|
@@ -23,14 +24,44 @@ import { DeviceToolbar } from "./DeviceToolbar";
|
|
|
23
24
|
import { buildPageModelSkeleton } from "./pageModelSkeletonBuilder";
|
|
24
25
|
import { toSitecoreDate } from "../utils/sitecoreDate";
|
|
25
26
|
const EDITOR_CSS_STYLE_ID = "parhelia-editor-css";
|
|
26
|
-
|
|
27
|
+
function getAccessibleIframeDocument(iframe, location) {
|
|
28
|
+
if (!iframe)
|
|
29
|
+
return null;
|
|
30
|
+
try {
|
|
31
|
+
return iframe.contentDocument || iframe.contentWindow?.document || null;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function getAccessibleIframeLocationHref(iframe) {
|
|
38
|
+
try {
|
|
39
|
+
return iframe?.contentWindow?.location?.href;
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function getAccessibleIframeLocationOrigin(iframe) {
|
|
46
|
+
try {
|
|
47
|
+
return iframe?.contentWindow?.location?.origin;
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export function PageViewerFrame(props) {
|
|
27
54
|
const editContext = useEditContext();
|
|
28
|
-
const fieldsContext = useFieldsEditContext();
|
|
29
55
|
useViewportChangeSignal();
|
|
56
|
+
if (!editContext || !props.pageViewContext)
|
|
57
|
+
return null;
|
|
58
|
+
return (_jsx(PageViewerFrameContent, { ...props, editContext: editContext, pageViewContext: props.pageViewContext }));
|
|
59
|
+
}
|
|
60
|
+
function PageViewerFrameContent({ compareView, pageViewContext, editContext, className, slotCloseButton, }) {
|
|
61
|
+
const fieldsContext = useFieldsEditContext();
|
|
62
|
+
const slotContext = useSlotContext();
|
|
30
63
|
const pathname = usePathname();
|
|
31
64
|
const pageViewContextRef = useRef(undefined);
|
|
32
|
-
if (!editContext || !pageViewContext)
|
|
33
|
-
return null;
|
|
34
65
|
useEffect(() => {
|
|
35
66
|
pageViewContextRef.current = pageViewContext;
|
|
36
67
|
}, [pageViewContext]);
|
|
@@ -80,7 +111,7 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
80
111
|
if (!iframeRef.current)
|
|
81
112
|
return;
|
|
82
113
|
const iframe = iframeRef.current;
|
|
83
|
-
const doc = iframe.
|
|
114
|
+
const doc = getAccessibleIframeDocument(iframe, "PageViewerFrame.tsx:updateMiniMapVisibility");
|
|
84
115
|
if (!doc?.documentElement)
|
|
85
116
|
return;
|
|
86
117
|
const scrollContainer = doc.scrollingElement || doc.body;
|
|
@@ -182,7 +213,7 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
182
213
|
}, []);
|
|
183
214
|
// If the editor mode flips (edit/preview), re-apply CSS and disable inline editing in the iframe.
|
|
184
215
|
useEffect(() => {
|
|
185
|
-
const doc = iframeRef.current
|
|
216
|
+
const doc = getAccessibleIframeDocument(iframeRef.current, "PageViewerFrame.tsx:mode-css");
|
|
186
217
|
const isPreview = editContext.mode === "preview";
|
|
187
218
|
if (doc)
|
|
188
219
|
ensureEditorCssGuard(doc, !isPreview);
|
|
@@ -204,7 +235,13 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
204
235
|
const modeOnlyChange = prevMode !== editContext.mode &&
|
|
205
236
|
prevMode !== "preview" &&
|
|
206
237
|
editContext.mode !== "preview";
|
|
207
|
-
|
|
238
|
+
let savedScrollY = 0;
|
|
239
|
+
try {
|
|
240
|
+
savedScrollY = iframeRef.current?.contentWindow?.scrollY ?? 0;
|
|
241
|
+
}
|
|
242
|
+
catch {
|
|
243
|
+
savedScrollY = 0;
|
|
244
|
+
}
|
|
208
245
|
const renderUrl = new URL(urlPath, window.location.origin);
|
|
209
246
|
const editRev = uuid();
|
|
210
247
|
renderUrl.searchParams.set("edit_rev", editRev);
|
|
@@ -227,7 +264,13 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
227
264
|
}
|
|
228
265
|
// Detect if the version in the URL changed - this requires a full reload, not just requestRefresh
|
|
229
266
|
// because Next.js router.replace may not properly refetch server data for version changes.
|
|
230
|
-
|
|
267
|
+
let currentIframeUrl;
|
|
268
|
+
try {
|
|
269
|
+
currentIframeUrl = iframeRef.current?.contentWindow?.location?.href;
|
|
270
|
+
}
|
|
271
|
+
catch {
|
|
272
|
+
currentIframeUrl = undefined;
|
|
273
|
+
}
|
|
231
274
|
const currentVersion = currentIframeUrl
|
|
232
275
|
? new URL(currentIframeUrl).searchParams.get("sc_version")
|
|
233
276
|
: null;
|
|
@@ -241,7 +284,7 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
241
284
|
const runIntegrationRefresh = (refreshFn, message) => {
|
|
242
285
|
console.log(message);
|
|
243
286
|
refreshFn(renderUrl.toString());
|
|
244
|
-
const doc = iframeRef.current
|
|
287
|
+
const doc = getAccessibleIframeDocument(iframeRef.current, "PageViewerFrame.tsx:integration-refresh-doc");
|
|
245
288
|
if (doc) {
|
|
246
289
|
requestPageModelBuild(doc);
|
|
247
290
|
}
|
|
@@ -249,7 +292,7 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
249
292
|
// which can remove our injected style. Re-ensure a few times post-refresh.
|
|
250
293
|
const ensureLater = (delay) => {
|
|
251
294
|
setTimeout(() => {
|
|
252
|
-
const doc = iframeRef.current
|
|
295
|
+
const doc = getAccessibleIframeDocument(iframeRef.current, "PageViewerFrame.tsx:integration-refresh-ensure-later");
|
|
253
296
|
if (doc)
|
|
254
297
|
ensureEditorCssGuard(doc, editContext.mode !== "preview");
|
|
255
298
|
rebindIframeInteractionsRef.current?.();
|
|
@@ -303,14 +346,27 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
303
346
|
};
|
|
304
347
|
// Use requestRefresh for normal refreshes, but force full reload for version changes.
|
|
305
348
|
// If requestRefresh is temporarily unavailable, wait briefly before falling back.
|
|
306
|
-
|
|
349
|
+
let integrationRefreshFn;
|
|
350
|
+
try {
|
|
351
|
+
integrationRefreshFn = iframeRef.current?.contentWindow?.requestRefresh;
|
|
352
|
+
}
|
|
353
|
+
catch {
|
|
354
|
+
integrationRefreshFn = undefined;
|
|
355
|
+
}
|
|
307
356
|
if (!versionChanged && integrationRefreshFn) {
|
|
308
357
|
runIntegrationRefresh(integrationRefreshFn, "Integration - requesting refresh");
|
|
309
358
|
}
|
|
310
359
|
else if (!versionChanged && !shouldUseIframeSrcReload) {
|
|
311
360
|
const retryDelayMs = 150;
|
|
312
361
|
const retryTimer = setTimeout(() => {
|
|
313
|
-
|
|
362
|
+
let retryIntegrationRefreshFn;
|
|
363
|
+
try {
|
|
364
|
+
retryIntegrationRefreshFn =
|
|
365
|
+
iframeRef.current?.contentWindow?.requestRefresh;
|
|
366
|
+
}
|
|
367
|
+
catch {
|
|
368
|
+
retryIntegrationRefreshFn = undefined;
|
|
369
|
+
}
|
|
314
370
|
if (retryIntegrationRefreshFn) {
|
|
315
371
|
runIntegrationRefresh(retryIntegrationRefreshFn, "Integration became available after brief wait - requesting refresh");
|
|
316
372
|
return;
|
|
@@ -341,18 +397,33 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
341
397
|
if (editContext.selection.length > 0 &&
|
|
342
398
|
fieldsContext.focusedField.item.id !== editContext.selection[0])
|
|
343
399
|
return;
|
|
344
|
-
|
|
400
|
+
let fieldElement;
|
|
401
|
+
try {
|
|
402
|
+
fieldElement = findFieldElement(iframeRef.current, fieldsContext.focusedField);
|
|
403
|
+
}
|
|
404
|
+
catch {
|
|
405
|
+
fieldElement = null;
|
|
406
|
+
}
|
|
345
407
|
if (fieldElement) {
|
|
346
408
|
const rect = getAbsolutePosition(fieldElement, iframeRef.current);
|
|
347
|
-
|
|
409
|
+
let scrollTop = 0;
|
|
410
|
+
try {
|
|
411
|
+
scrollTop = iframeRef.current?.contentWindow?.scrollY || 0;
|
|
412
|
+
}
|
|
413
|
+
catch {
|
|
414
|
+
scrollTop = 0;
|
|
415
|
+
}
|
|
348
416
|
const iframeHeight = iframeRef.current?.getBoundingClientRect().height;
|
|
349
417
|
const isInViewport = rect.y + rect.height > scrollTop &&
|
|
350
418
|
rect.y < scrollTop + (iframeHeight || 0);
|
|
351
419
|
if (!isInViewport) {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
420
|
+
try {
|
|
421
|
+
iframeRef.current?.contentWindow?.scrollTo({
|
|
422
|
+
top: rect.y,
|
|
423
|
+
behavior: "smooth",
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
catch { }
|
|
356
427
|
}
|
|
357
428
|
}
|
|
358
429
|
}
|
|
@@ -396,7 +467,7 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
396
467
|
return;
|
|
397
468
|
}
|
|
398
469
|
console.log("Content loaded in " + (performance.now() - start) + " ms");
|
|
399
|
-
const doc = iframeRef.current
|
|
470
|
+
const doc = getAccessibleIframeDocument(iframeRef.current, "PageViewerFrame.tsx:loadContent-doc");
|
|
400
471
|
if (doc) {
|
|
401
472
|
if (initialLoad) {
|
|
402
473
|
// Guard again just before applying
|
|
@@ -430,10 +501,14 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
430
501
|
morphdom(doc.documentElement, newDoc.documentElement);
|
|
431
502
|
}
|
|
432
503
|
rebindIframeInteractionsRef.current?.();
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
504
|
+
try {
|
|
505
|
+
const xa = iframeRef.current.contentWindow.XA;
|
|
506
|
+
if (xa) {
|
|
507
|
+
console.log("init XA");
|
|
508
|
+
xa.init();
|
|
509
|
+
}
|
|
436
510
|
}
|
|
511
|
+
catch { }
|
|
437
512
|
setShowSpinner(false);
|
|
438
513
|
}
|
|
439
514
|
ensureEditorCssGuard(doc, editContext.mode !== "preview");
|
|
@@ -455,18 +530,32 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
455
530
|
}
|
|
456
531
|
};
|
|
457
532
|
useEffect(() => {
|
|
458
|
-
|
|
459
|
-
|
|
533
|
+
const iframeDoc = getAccessibleIframeDocument(iframeRef.current, "PageViewerFrame.tsx:scrollIntoView-doc");
|
|
534
|
+
if (!editContext.scrollIntoView || !iframeDoc?.documentElement)
|
|
460
535
|
return;
|
|
461
536
|
const component = getComponentById(editContext.scrollIntoView, pageViewContextRef.current.page);
|
|
462
537
|
if (!component)
|
|
463
538
|
return;
|
|
464
|
-
|
|
539
|
+
let rect;
|
|
540
|
+
try {
|
|
541
|
+
rect = findComponentRect(iframeRef.current, component, true);
|
|
542
|
+
}
|
|
543
|
+
catch {
|
|
544
|
+
rect = undefined;
|
|
545
|
+
}
|
|
465
546
|
if (!rect)
|
|
466
547
|
return;
|
|
548
|
+
if (!iframeRef.current)
|
|
549
|
+
return;
|
|
467
550
|
// Check if element is already in viewport
|
|
468
551
|
const iframeHeight = iframeRef.current.getBoundingClientRect().height;
|
|
469
|
-
|
|
552
|
+
let scrollTop = 0;
|
|
553
|
+
try {
|
|
554
|
+
scrollTop = iframeRef.current?.contentWindow?.scrollY || 0;
|
|
555
|
+
}
|
|
556
|
+
catch {
|
|
557
|
+
scrollTop = 0;
|
|
558
|
+
}
|
|
470
559
|
const elementTop = rect.rect.y;
|
|
471
560
|
const isInViewport = elementTop >= scrollTop && elementTop <= scrollTop + iframeHeight;
|
|
472
561
|
// If already in viewport, no need to scroll
|
|
@@ -475,10 +564,13 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
475
564
|
return;
|
|
476
565
|
}
|
|
477
566
|
const scrollPosition = rect.rect.y - iframeHeight / 2 + rect.rect.height / 2;
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
567
|
+
try {
|
|
568
|
+
iframeRef.current?.contentWindow?.scrollTo({
|
|
569
|
+
top: scrollPosition,
|
|
570
|
+
behavior: "smooth",
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
catch { }
|
|
482
574
|
editContext.setScrollIntoView(undefined);
|
|
483
575
|
}, [editContext.scrollIntoView, pageViewContext.page]);
|
|
484
576
|
useEffect(() => {
|
|
@@ -498,7 +590,7 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
498
590
|
};
|
|
499
591
|
}, []);
|
|
500
592
|
const selecionChangeHandler = useDebouncedCallback(() => {
|
|
501
|
-
const sel = iframeRef.current?.
|
|
593
|
+
const sel = getAccessibleIframeDocument(iframeRef.current, "PageViewerFrame.tsx:selectionchange-doc")?.getSelection();
|
|
502
594
|
const isInlineAiUiFocused = () => {
|
|
503
595
|
const activeEl = document.activeElement;
|
|
504
596
|
return !!(activeEl?.closest(".agent-inline-dialog") ||
|
|
@@ -571,7 +663,7 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
571
663
|
rangeClone.setStartAfter(textNode);
|
|
572
664
|
rangeClone.collapse(true);
|
|
573
665
|
// Update the selection
|
|
574
|
-
const iframeSel = iframeRef.current?.
|
|
666
|
+
const iframeSel = getAccessibleIframeDocument(iframeRef.current, "PageViewerFrame.tsx:replaceText-doc")?.getSelection();
|
|
575
667
|
if (iframeSel) {
|
|
576
668
|
iframeSel.removeAllRanges();
|
|
577
669
|
iframeSel.addRange(rangeClone);
|
|
@@ -593,6 +685,7 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
593
685
|
fieldName: fieldElement?.getAttribute("data-fieldname") || undefined,
|
|
594
686
|
item: { id: itemId, language, version },
|
|
595
687
|
},
|
|
688
|
+
originatingSlotId: slotContext?.slotId,
|
|
596
689
|
refresh: "none",
|
|
597
690
|
value: valueToSave,
|
|
598
691
|
});
|
|
@@ -620,7 +713,9 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
620
713
|
// Activate the editor slot this iframe belongs to
|
|
621
714
|
const slotElement = iframe?.closest("[data-editor-slot]");
|
|
622
715
|
const slotId = slotElement?.getAttribute("data-slotid");
|
|
623
|
-
|
|
716
|
+
const activeSlotId = editContextRef.current?.getActiveSlotId?.() ??
|
|
717
|
+
editContextRef.current?.activeSlotId;
|
|
718
|
+
if (slotId && activeSlotId !== slotId) {
|
|
624
719
|
editContextRef.current?.setActiveSlot(slotId);
|
|
625
720
|
}
|
|
626
721
|
// Skip selection changes on right-click (button 2) - let context menu handler deal with it
|
|
@@ -659,7 +754,7 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
659
754
|
const page = pageViewContextRef.current?.page;
|
|
660
755
|
if (page) {
|
|
661
756
|
// Build ordered list of visible component ids by DOM order
|
|
662
|
-
const doc = iframeRef.current
|
|
757
|
+
const doc = getAccessibleIframeDocument(iframeRef.current, "PageViewerFrame.tsx:shift-select-doc");
|
|
663
758
|
const orderedIds = [];
|
|
664
759
|
if (doc) {
|
|
665
760
|
const all = Array.from(doc.querySelectorAll("[data-component-id]"));
|
|
@@ -823,12 +918,18 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
823
918
|
return;
|
|
824
919
|
boundDocumentElement.removeEventListener("mousedown", handleIframeMouseDown);
|
|
825
920
|
boundDocumentElement.removeEventListener("click", handleIframeClick);
|
|
826
|
-
|
|
921
|
+
try {
|
|
922
|
+
iframe.contentWindow?.removeEventListener("contextmenu", handleContextMenu, true);
|
|
923
|
+
}
|
|
924
|
+
catch { }
|
|
827
925
|
boundDocument.removeEventListener("selectionchange", selecionChangeHandler);
|
|
828
926
|
boundDocument.removeEventListener("keydown", handleIframeKeyDown);
|
|
829
927
|
boundDocumentElement.removeEventListener("blur", handleIframeBlur, true);
|
|
830
928
|
boundScrollContainer?.removeEventListener("scroll", handleIframeScroll);
|
|
831
|
-
|
|
929
|
+
try {
|
|
930
|
+
iframe.contentWindow?.removeEventListener("scroll", handleIframeWindowScroll);
|
|
931
|
+
}
|
|
932
|
+
catch { }
|
|
832
933
|
mutationObserver?.disconnect();
|
|
833
934
|
mutationObserver = null;
|
|
834
935
|
boundScrollContainer = null;
|
|
@@ -836,7 +937,11 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
836
937
|
boundDocument = null;
|
|
837
938
|
};
|
|
838
939
|
const attachListeners = () => {
|
|
839
|
-
|
|
940
|
+
// The iframe may navigate to a different origin (e.g. an auth redirect),
|
|
941
|
+
// in which case reading contentDocument/contentWindow.document throws a
|
|
942
|
+
// SecurityError. Treat that as an inaccessible frame and skip wiring up
|
|
943
|
+
// listeners instead of letting the exception unwind into React.
|
|
944
|
+
const iframeDocument = getAccessibleIframeDocument(iframe, "PageViewerFrame.tsx:attachListeners-document-access");
|
|
840
945
|
const iframeDocumentElement = iframeDocument?.documentElement;
|
|
841
946
|
if (!iframeDocument || !iframeDocumentElement)
|
|
842
947
|
return;
|
|
@@ -850,13 +955,17 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
850
955
|
boundDocumentElement = iframeDocumentElement;
|
|
851
956
|
iframeDocumentElement.addEventListener("mousedown", handleIframeMouseDown);
|
|
852
957
|
iframeDocumentElement.addEventListener("click", handleIframeClick);
|
|
853
|
-
|
|
958
|
+
try {
|
|
959
|
+
iframe.contentWindow?.addEventListener("contextmenu", handleContextMenu, true);
|
|
960
|
+
}
|
|
961
|
+
catch { }
|
|
854
962
|
boundScrollContainer =
|
|
855
|
-
|
|
856
|
-
iframe.contentWindow?.document.body ||
|
|
857
|
-
null;
|
|
963
|
+
iframeDocument.scrollingElement || iframeDocument.body || null;
|
|
858
964
|
boundScrollContainer?.addEventListener("scroll", handleIframeScroll);
|
|
859
|
-
|
|
965
|
+
try {
|
|
966
|
+
iframe.contentWindow?.addEventListener("scroll", handleIframeWindowScroll);
|
|
967
|
+
}
|
|
968
|
+
catch { }
|
|
860
969
|
iframeDocument.addEventListener("selectionchange", selecionChangeHandler);
|
|
861
970
|
iframeDocument.addEventListener("keydown", handleIframeKeyDown);
|
|
862
971
|
iframeDocumentElement.addEventListener("blur", handleIframeBlur, true);
|
|
@@ -887,7 +996,7 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
887
996
|
const href = anchor.getAttribute("href") || anchor.href;
|
|
888
997
|
let hrefUrl;
|
|
889
998
|
try {
|
|
890
|
-
hrefUrl = new URL(anchor.href, iframe
|
|
999
|
+
hrefUrl = new URL(anchor.href, getAccessibleIframeLocationHref(iframe) || window.location.href);
|
|
891
1000
|
}
|
|
892
1001
|
catch {
|
|
893
1002
|
return undefined;
|
|
@@ -965,12 +1074,12 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
965
1074
|
if (isPreviewOrSuggestions) {
|
|
966
1075
|
let hrefUrl;
|
|
967
1076
|
try {
|
|
968
|
-
hrefUrl = new URL(anchor.href, iframe
|
|
1077
|
+
hrefUrl = new URL(anchor.href, getAccessibleIframeLocationHref(iframe) || window.location.href);
|
|
969
1078
|
}
|
|
970
1079
|
catch {
|
|
971
1080
|
return;
|
|
972
1081
|
}
|
|
973
|
-
const iframeOrigin = iframe
|
|
1082
|
+
const iframeOrigin = getAccessibleIframeLocationOrigin(iframe);
|
|
974
1083
|
const isInternalLink = hrefUrl.origin === window.location.origin ||
|
|
975
1084
|
(iframeOrigin ? hrefUrl.origin === iframeOrigin : false);
|
|
976
1085
|
if (!isInternalLink) {
|
|
@@ -1146,8 +1255,9 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
1146
1255
|
rebindIframeInteractionsRef.current = attachListeners;
|
|
1147
1256
|
if (iframe) {
|
|
1148
1257
|
// If the iframe is already loaded, attach the listener immediately
|
|
1149
|
-
|
|
1150
|
-
|
|
1258
|
+
const iframeDoc = getAccessibleIframeDocument(iframe, "PageViewerFrame.tsx:initial-attach-ready-state");
|
|
1259
|
+
if (iframeDoc?.readyState === "complete" ||
|
|
1260
|
+
iframeDoc?.readyState === "interactive") {
|
|
1151
1261
|
handleLoad();
|
|
1152
1262
|
}
|
|
1153
1263
|
iframe.addEventListener("load", handleLoad);
|
|
@@ -1162,7 +1272,10 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
1162
1272
|
};
|
|
1163
1273
|
}, [iframeRef.current]);
|
|
1164
1274
|
useEffect(() => {
|
|
1165
|
-
|
|
1275
|
+
try {
|
|
1276
|
+
iframeRef.current?.contentWindow?.postMessage({ type: "componentsSelected", componentIds: editContext.selection }, window.location.origin);
|
|
1277
|
+
}
|
|
1278
|
+
catch { }
|
|
1166
1279
|
}, [editContext.selection]);
|
|
1167
1280
|
const updateScrollPosition = (e) => {
|
|
1168
1281
|
setScroll(e);
|
|
@@ -1172,7 +1285,7 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
1172
1285
|
useEffect(() => {
|
|
1173
1286
|
if (!iframeRef.current)
|
|
1174
1287
|
return;
|
|
1175
|
-
const body = iframeRef.current.
|
|
1288
|
+
const body = getAccessibleIframeDocument(iframeRef.current, "PageViewerFrame.tsx:zoom-doc")?.documentElement;
|
|
1176
1289
|
if (!body)
|
|
1177
1290
|
return;
|
|
1178
1291
|
body.style.transform = `scale(${zoom})`;
|
|
@@ -1196,7 +1309,7 @@ export function PageViewerFrame({ compareView, pageViewContext, className, slotC
|
|
|
1196
1309
|
"px",
|
|
1197
1310
|
}, children: [_jsxs("div", { className: "relative h-full w-full overflow-hidden", children: [_jsx("iframe", { ref: iframeRef, className: "page-iframe h-full w-full bg-white", style: { height: deviceHeight }, src: iframeSrc, "data-testid": "pageEditoriframe", onLoad: () => {
|
|
1198
1311
|
// Handle iframe load when using src attribute (initial load)
|
|
1199
|
-
const doc = iframeRef.current
|
|
1312
|
+
const doc = getAccessibleIframeDocument(iframeRef.current, "PageViewerFrame.tsx:onLoad-doc");
|
|
1200
1313
|
if (doc && iframeSrc) {
|
|
1201
1314
|
setShowSpinner(false);
|
|
1202
1315
|
ensureEditorCssGuard(doc, editContext.mode !== "preview");
|
|
@@ -1350,8 +1463,14 @@ function getElementDepth(element) {
|
|
|
1350
1463
|
function injectSXAScripts(iframe) {
|
|
1351
1464
|
if (!iframe)
|
|
1352
1465
|
return;
|
|
1353
|
-
const iframeDocument = iframe.
|
|
1354
|
-
|
|
1466
|
+
const iframeDocument = getAccessibleIframeDocument(iframe, "PageViewerFrame.tsx:injectSXAScripts-doc");
|
|
1467
|
+
let iframeWindow;
|
|
1468
|
+
try {
|
|
1469
|
+
iframeWindow = iframe.contentWindow;
|
|
1470
|
+
}
|
|
1471
|
+
catch {
|
|
1472
|
+
iframeWindow = null;
|
|
1473
|
+
}
|
|
1355
1474
|
if (!iframeDocument || !iframeWindow)
|
|
1356
1475
|
return;
|
|
1357
1476
|
iframeWindow.Sitecore = {
|