@parhelia/core 0.1.12902 → 0.1.12903
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/AgentsWorkspaceView.js +40 -5
- package/dist/agents-view/AgentsWorkspaceView.js.map +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +2 -2
- package/dist/components/ui/context-menu.js +64 -7
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/dialog.js +27 -5
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/config/config.js +83 -3
- package/dist/config/config.js.map +1 -1
- package/dist/editor/AspectRatioSelector.js +27 -24
- package/dist/editor/AspectRatioSelector.js.map +1 -1
- package/dist/editor/ConcurrentUserLimitDialog.js +1 -1
- package/dist/editor/ConcurrentUserLimitDialog.js.map +1 -1
- package/dist/editor/ConfirmationDialog.js +6 -4
- package/dist/editor/ConfirmationDialog.js.map +1 -1
- package/dist/editor/ContentTree.js +4 -3
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/EditorWarning.js +1 -1
- package/dist/editor/EditorWarning.js.map +1 -1
- package/dist/editor/FieldListField.js +12 -8
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/PictureCropper.js +73 -37
- package/dist/editor/PictureCropper.js.map +1 -1
- package/dist/editor/SetupWizard.js +14 -12
- package/dist/editor/SetupWizard.js.map +1 -1
- package/dist/editor/WorkspaceTitleSwitcher.js +1 -1
- package/dist/editor/WorkspaceTitleSwitcher.js.map +1 -1
- package/dist/editor/ai/Agents.js +19 -3
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/dialogs/AgentDialogHandler.js +87 -9
- package/dist/editor/ai/dialogs/AgentDialogHandler.js.map +1 -1
- package/dist/editor/ai/dialogs/agentDialogTypes.d.ts +18 -0
- package/dist/editor/ai/dialogs/agentDialogTypes.js +5 -0
- package/dist/editor/ai/dialogs/agentDialogTypes.js.map +1 -1
- package/dist/editor/ai/dialogs/browserBoundCapture.d.ts +6 -9
- package/dist/editor/ai/dialogs/browserBoundCapture.js +17 -25
- package/dist/editor/ai/dialogs/browserBoundCapture.js.map +1 -1
- package/dist/editor/ai/dialogs/capturePageDom.js +2 -18
- package/dist/editor/ai/dialogs/capturePageDom.js.map +1 -1
- package/dist/editor/ai/dialogs/capturePageScreenshot.d.ts +27 -1
- package/dist/editor/ai/dialogs/capturePageScreenshot.js +11 -24
- package/dist/editor/ai/dialogs/capturePageScreenshot.js.map +1 -1
- package/dist/editor/ai/dialogs/captureShared.d.ts +10 -0
- package/dist/editor/ai/dialogs/captureShared.js +39 -0
- package/dist/editor/ai/dialogs/captureShared.js.map +1 -0
- package/dist/editor/ai/dialogs/offscreenPageCapture.d.ts +44 -0
- package/dist/editor/ai/dialogs/offscreenPageCapture.js +300 -0
- package/dist/editor/ai/dialogs/offscreenPageCapture.js.map +1 -0
- package/dist/editor/ai/terminal/agentContextMerge.js +7 -1
- package/dist/editor/ai/terminal/agentContextMerge.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionState.d.ts +28 -0
- package/dist/editor/ai/terminal/agentSessionState.js +63 -3
- package/dist/editor/ai/terminal/agentSessionState.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentContextItemPicker.d.ts +11 -0
- package/dist/editor/ai/terminal/components/AgentContextItemPicker.js +81 -0
- package/dist/editor/ai/terminal/components/AgentContextItemPicker.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentProjectProgress.js +1 -1
- package/dist/editor/ai/terminal/components/AgentProjectProgress.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.d.ts +3 -1
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js +27 -14
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentSuggestionBanner.d.ts +16 -0
- package/dist/editor/ai/terminal/components/AgentSuggestionBanner.js +41 -0
- package/dist/editor/ai/terminal/components/AgentSuggestionBanner.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentSummaryAssistantResponse.d.ts +1 -3
- 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/AgentTerminalFullUpperContent.d.ts +10 -5
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.js +3 -3
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalMessageGroups.d.ts +1 -3
- package/dist/editor/ai/terminal/components/AgentTerminalMessageGroups.js +2 -2
- package/dist/editor/ai/terminal/components/AgentTerminalMessageGroups.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.d.ts +2 -5
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js +2 -2
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalView.js +3 -2
- package/dist/editor/ai/terminal/components/AgentTerminalView.js.map +1 -1
- package/dist/editor/ai/terminal/components/AiResponseMessage.d.ts +1 -11
- package/dist/editor/ai/terminal/components/AiResponseMessage.js +42 -5
- package/dist/editor/ai/terminal/components/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/ToolCallDisplay.d.ts +14 -11
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js +13 -71
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/UserMessage.js +104 -58
- package/dist/editor/ai/terminal/components/UserMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/toolCallApprovalGate.d.ts +21 -0
- package/dist/editor/ai/terminal/components/toolCallApprovalGate.js +32 -0
- package/dist/editor/ai/terminal/components/toolCallApprovalGate.js.map +1 -0
- package/dist/editor/ai/terminal/types.d.ts +1 -3
- package/dist/editor/ai/terminal/useAgentEditorContext.d.ts +2 -6
- package/dist/editor/ai/terminal/useAgentEditorContext.js +41 -10
- package/dist/editor/ai/terminal/useAgentEditorContext.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentInitialPrompt.js +4 -1
- package/dist/editor/ai/terminal/useAgentInitialPrompt.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentLoadErrorHandler.d.ts +3 -0
- package/dist/editor/ai/terminal/useAgentLoadErrorHandler.js +7 -5
- package/dist/editor/ai/terminal/useAgentLoadErrorHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentLoadPipeline.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentLoadPipeline.js +3 -1
- package/dist/editor/ai/terminal/useAgentLoadPipeline.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentLoader.js +4 -1
- package/dist/editor/ai/terminal/useAgentLoader.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentRunResyncSocketHandler.js +3 -3
- package/dist/editor/ai/terminal/useAgentRunResyncSocketHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentRunStatusSocketHandler.d.ts +0 -2
- package/dist/editor/ai/terminal/useAgentRunStatusSocketHandler.js +4 -9
- package/dist/editor/ai/terminal/useAgentRunStatusSocketHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSession.d.ts +0 -1
- package/dist/editor/ai/terminal/useAgentSession.js +0 -5
- package/dist/editor/ai/terminal/useAgentSession.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSessionCommandBindings.d.ts +0 -2
- package/dist/editor/ai/terminal/useAgentSessionCommandBindings.js +1 -5
- package/dist/editor/ai/terminal/useAgentSessionCommandBindings.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSessionFacade.d.ts +0 -2
- package/dist/editor/ai/terminal/useAgentSessionFacade.js +0 -3
- package/dist/editor/ai/terminal/useAgentSessionFacade.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSessionSync.d.ts +1 -6
- package/dist/editor/ai/terminal/useAgentSessionSync.js +1 -14
- package/dist/editor/ai/terminal/useAgentSessionSync.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSocketMessageRouter.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentSocketMessageRouter.js +6 -1
- package/dist/editor/ai/terminal/useAgentSocketMessageRouter.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentStreamPipeline.d.ts +2 -2
- package/dist/editor/ai/terminal/useAgentStreamPipeline.js +7 -3
- package/dist/editor/ai/terminal/useAgentStreamPipeline.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.d.ts +2 -0
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js +7 -1
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSuggestionSocketHandler.d.ts +25 -0
- package/dist/editor/ai/terminal/useAgentSuggestionSocketHandler.js +35 -0
- package/dist/editor/ai/terminal/useAgentSuggestionSocketHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalController.d.ts +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js +58 -26
- package/dist/editor/ai/terminal/useAgentTerminalController.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalViewProps.d.ts +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalViewProps.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentToolResultHandler.d.ts +6 -0
- package/dist/editor/ai/terminal/useAgentToolResultHandler.js +18 -1
- package/dist/editor/ai/terminal/useAgentToolResultHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentUserMessageSocketHandler.js +3 -1
- package/dist/editor/ai/terminal/useAgentUserMessageSocketHandler.js.map +1 -1
- package/dist/editor/ai/useAgentPanes.d.ts +1 -1
- package/dist/editor/ai/useAgentPanes.js +25 -3
- package/dist/editor/ai/useAgentPanes.js.map +1 -1
- package/dist/editor/ai-image-editor/AiImageEditorDialog.js +107 -16
- package/dist/editor/ai-image-editor/AiImageEditorDialog.js.map +1 -1
- package/dist/editor/client/EditorShell.d.ts +0 -10
- package/dist/editor/client/EditorShell.js +11 -3
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +19 -2
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/operations.d.ts +4 -2
- package/dist/editor/client/operations.js +106 -33
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/field-types/AttachmentEditor.js +42 -4
- package/dist/editor/field-types/AttachmentEditor.js.map +1 -1
- package/dist/editor/media-selector/MediaFolderBrowser.js +142 -32
- package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -1
- package/dist/editor/media-selector/Preview.d.ts +2 -1
- package/dist/editor/media-selector/Preview.js +45 -2
- package/dist/editor/media-selector/Preview.js.map +1 -1
- package/dist/editor/media-selector/Thumbnails.d.ts +5 -1
- package/dist/editor/media-selector/Thumbnails.js +72 -11
- package/dist/editor/media-selector/Thumbnails.js.map +1 -1
- package/dist/editor/media-selector/TreeSelector.js +130 -22
- package/dist/editor/media-selector/TreeSelector.js.map +1 -1
- package/dist/editor/media-selector/UploadZone.d.ts +2 -1
- package/dist/editor/media-selector/UploadZone.js +7 -15
- package/dist/editor/media-selector/UploadZone.js.map +1 -1
- package/dist/editor/media-selector/mediaFileType.d.ts +12 -0
- package/dist/editor/media-selector/mediaFileType.js +95 -0
- package/dist/editor/media-selector/mediaFileType.js.map +1 -0
- package/dist/editor/media-selector/mediaSelectionPath.d.ts +5 -0
- package/dist/editor/media-selector/mediaSelectionPath.js +21 -0
- package/dist/editor/media-selector/mediaSelectionPath.js.map +1 -0
- package/dist/editor/media-selector/mediaUpload.d.ts +30 -0
- package/dist/editor/media-selector/mediaUpload.js +155 -0
- package/dist/editor/media-selector/mediaUpload.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/UndoRedoControls.js +52 -29
- package/dist/editor/menubar/toolbar-sections/UndoRedoControls.js.map +1 -1
- package/dist/editor/page-editor-chrome/ComponentOperationBubble.d.ts +8 -0
- package/dist/editor/page-editor-chrome/ComponentOperationBubble.js +8 -0
- package/dist/editor/page-editor-chrome/ComponentOperationBubble.js.map +1 -0
- package/dist/editor/page-editor-chrome/DragInsertionOverlay.js +190 -2
- package/dist/editor/page-editor-chrome/DragInsertionOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js +101 -12
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenus.js +6 -1
- package/dist/editor/page-editor-chrome/FrameMenus.js.map +1 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.js +95 -24
- package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/placeholderZones.d.ts +1 -0
- package/dist/editor/page-editor-chrome/overlay/placeholderZones.js +14 -9
- package/dist/editor/page-editor-chrome/overlay/placeholderZones.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +64 -99
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/page-viewer/bridgeKeyboardShortcuts.d.ts +3 -0
- package/dist/editor/page-viewer/bridgeKeyboardShortcuts.js +36 -0
- package/dist/editor/page-viewer/bridgeKeyboardShortcuts.js.map +1 -0
- package/dist/editor/page-viewer/renderUrl.d.ts +14 -0
- package/dist/editor/page-viewer/renderUrl.js +83 -0
- package/dist/editor/page-viewer/renderUrl.js.map +1 -0
- package/dist/editor/reviews/CreateReviewDialog.js +1 -1
- package/dist/editor/reviews/CreateReviewDialog.js.map +1 -1
- package/dist/editor/reviews/EditReviewSettingsDialog.js +1 -1
- package/dist/editor/reviews/EditReviewSettingsDialog.js.map +1 -1
- package/dist/editor/services/agentService.d.ts +16 -24
- package/dist/editor/services/agentService.js +24 -22
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/contentService.d.ts +5 -0
- package/dist/editor/services/contentService.js.map +1 -1
- package/dist/editor/services/editService.d.ts +12 -0
- package/dist/editor/services/editService.js +3 -0
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/settings/panels/AgentsPanel.js +1 -1
- package/dist/editor/settings/panels/AgentsPanel.js.map +1 -1
- package/dist/editor/settings/panels/ModelsPanel.js +94 -26
- package/dist/editor/settings/panels/ModelsPanel.js.map +1 -1
- package/dist/editor/setup-wizard/SetupStepError.d.ts +8 -0
- package/dist/editor/setup-wizard/SetupStepError.js +7 -0
- package/dist/editor/setup-wizard/SetupStepError.js.map +1 -0
- package/dist/editor/setup-wizard/SetupStepHeader.d.ts +15 -0
- package/dist/editor/setup-wizard/SetupStepHeader.js +6 -0
- package/dist/editor/setup-wizard/SetupStepHeader.js.map +1 -0
- package/dist/editor/setup-wizard/SetupStepLayout.d.ts +33 -0
- package/dist/editor/setup-wizard/SetupStepLayout.js +16 -0
- package/dist/editor/setup-wizard/SetupStepLayout.js.map +1 -0
- package/dist/editor/setup-wizard/steps/CompleteStep.js +12 -10
- package/dist/editor/setup-wizard/steps/CompleteStep.js.map +1 -1
- package/dist/editor/setup-wizard/steps/CreateSettingsStep.js +4 -2
- package/dist/editor/setup-wizard/steps/CreateSettingsStep.js.map +1 -1
- package/dist/editor/setup-wizard/steps/LicenseActivationStep.js +95 -28
- package/dist/editor/setup-wizard/steps/LicenseActivationStep.js.map +1 -1
- package/dist/editor/setup-wizard/steps/LicenseEmailStep.d.ts +2 -1
- package/dist/editor/setup-wizard/steps/LicenseEmailStep.js +12 -4
- package/dist/editor/setup-wizard/steps/LicenseEmailStep.js.map +1 -1
- package/dist/editor/setup-wizard/steps/ModelSelectionStep.d.ts +1 -1
- package/dist/editor/setup-wizard/steps/ModelSelectionStep.js +62 -58
- package/dist/editor/setup-wizard/steps/ModelSelectionStep.js.map +1 -1
- package/dist/editor/setup-wizard/steps/ProviderStep.js +63 -19
- package/dist/editor/setup-wizard/steps/ProviderStep.js.map +1 -1
- package/dist/editor/setup-wizard/steps/WelcomeStep.js +2 -1
- package/dist/editor/setup-wizard/steps/WelcomeStep.js.map +1 -1
- package/dist/editor/sidebar/ComponentPalette.js +1 -1
- package/dist/editor/sidebar/ComponentPalette.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.js +24 -30
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/template-wizard/TemplateStructureInlineEditor.js +1 -1
- package/dist/editor/template-wizard/TemplateStructureInlineEditor.js.map +1 -1
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.js +2 -2
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.js.map +1 -1
- package/dist/editor/ui/DialogButtons.js +1 -1
- package/dist/editor/ui/DialogButtons.js.map +1 -1
- package/dist/editor/ui/IconSelectorDialog.js +1 -1
- package/dist/editor/ui/IconSelectorDialog.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/PublishDialog.js +1 -1
- package/dist/editor/ui/PublishDialog.js.map +1 -1
- package/dist/editor/ui/PublishItemDialog.js +1 -1
- package/dist/editor/ui/PublishItemDialog.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/TemplateSelectorDialog.js +1 -1
- package/dist/editor/ui/TemplateSelectorDialog.js.map +1 -1
- package/dist/editor/views/EditorSlot.js +1 -1
- package/dist/editor/views/EditorSlot.js.map +1 -1
- package/dist/editor/views/MediaFolderEditView.js +1 -1
- package/dist/editor/views/MediaFolderEditView.js.map +1 -1
- package/dist/lib/viewTransition.js +7 -1
- package/dist/lib/viewTransition.js.map +1 -1
- package/dist/logging/consolePrefix.js +13 -0
- package/dist/logging/consolePrefix.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/setup/services/setupWizardService.d.ts +2 -0
- package/dist/setup/services/setupWizardService.js +12 -0
- package/dist/setup/services/setupWizardService.js.map +1 -1
- package/dist/setup/wizard/steps/ImportModelDialog.js +35 -86
- package/dist/setup/wizard/steps/ImportModelDialog.js.map +1 -1
- package/dist/splash-screen/ModernSplashScreen.js +12 -0
- package/dist/splash-screen/ModernSplashScreen.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/ProjectOverviewContent.js +1 -1
- package/dist/task-board/components/ProjectOverviewContent.js.map +1 -1
- package/dist/task-board/components/ProjectSettingsDialog.js +1 -1
- package/dist/task-board/components/ProjectSettingsDialog.js.map +1 -1
- package/images/Parhelia-Onboarding-BG.jpg +0 -0
- package/package.json +1 -1
- package/dist/editor/ai/terminal/components/AgentBrowserClaimBanner.d.ts +0 -10
- package/dist/editor/ai/terminal/components/AgentBrowserClaimBanner.js +0 -24
- package/dist/editor/ai/terminal/components/AgentBrowserClaimBanner.js.map +0 -1
- package/dist/editor/ai/terminal/useAgentBrowserCapture.d.ts +0 -24
- package/dist/editor/ai/terminal/useAgentBrowserCapture.js +0 -147
- package/dist/editor/ai/terminal/useAgentBrowserCapture.js.map +0 -1
- package/dist/editor/ai/terminal/useAgentBrowserCapturePanel.d.ts +0 -29
- package/dist/editor/ai/terminal/useAgentBrowserCapturePanel.js +0 -36
- package/dist/editor/ai/terminal/useAgentBrowserCapturePanel.js.map +0 -1
- package/dist/editor/ai/terminal/useAgentBrowserCaptureUi.d.ts +0 -18
- package/dist/editor/ai/terminal/useAgentBrowserCaptureUi.js +0 -36
- package/dist/editor/ai/terminal/useAgentBrowserCaptureUi.js.map +0 -1
- package/images/bg-shape-black.webp +0 -0
- package/images/parhelia-logo-1.jpg +0 -0
- package/images/phlogo.png +0 -0
- package/images/wizard-bg.png +0 -0
|
@@ -19,6 +19,7 @@ import { loadFieldButtons } from "../services/editService";
|
|
|
19
19
|
import { usePathname } from "../client/navigation";
|
|
20
20
|
import { EditorWarnings } from "../EditorWarnings";
|
|
21
21
|
import { FieldActionsOverlay, } from "../FieldActionsOverlay";
|
|
22
|
+
import { alignLoopbackHostToEditor, alignXmCloudManagedEditingHostToEditor, applyParheliaRenderContext, getEditorQueryParam, } from "./renderUrl";
|
|
22
23
|
import { NoLayout } from "../page-editor-chrome/NoLayout";
|
|
23
24
|
import { Spinner } from "../ui/Spinner";
|
|
24
25
|
import { DeviceToolbar } from "./DeviceToolbar";
|
|
@@ -27,6 +28,7 @@ import { toSitecoreDate } from "../utils/sitecoreDate";
|
|
|
27
28
|
import { BridgeClient } from "../bridge/BridgeClient";
|
|
28
29
|
import { getSuggestionDisplayValue } from "../reviews/suggestionDisplayValue";
|
|
29
30
|
import { buildBridgeFieldPatchPayload, getBridgeFieldPatchValue, } from "./bridgeFieldPatch";
|
|
31
|
+
import { createKeyboardEventFromBridgeInteraction } from "./bridgeKeyboardShortcuts";
|
|
30
32
|
const ZOOM_MIN = 0.25;
|
|
31
33
|
const ZOOM_MAX = 2;
|
|
32
34
|
const ZOOM_STEP = 0.25;
|
|
@@ -320,7 +322,7 @@ function getIframeWindowScroll(iframe) {
|
|
|
320
322
|
return undefined;
|
|
321
323
|
}
|
|
322
324
|
}
|
|
323
|
-
function restoreIframeWindowScroll(iframe, targetScroll) {
|
|
325
|
+
function restoreIframeWindowScroll(iframe, targetScroll, options = {}) {
|
|
324
326
|
if (!targetScroll)
|
|
325
327
|
return false;
|
|
326
328
|
try {
|
|
@@ -328,20 +330,41 @@ function restoreIframeWindowScroll(iframe, targetScroll) {
|
|
|
328
330
|
if (!win)
|
|
329
331
|
return false;
|
|
330
332
|
let attempts = 0;
|
|
333
|
+
let completed = false;
|
|
334
|
+
const maxAttempts = options.maxAttempts ?? 8;
|
|
335
|
+
const finish = (settled) => {
|
|
336
|
+
if (completed)
|
|
337
|
+
return;
|
|
338
|
+
completed = true;
|
|
339
|
+
if (settled) {
|
|
340
|
+
options.onSettled?.();
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
options.onExpired?.();
|
|
344
|
+
}
|
|
345
|
+
};
|
|
331
346
|
const apply = () => {
|
|
332
347
|
try {
|
|
333
348
|
attempts += 1;
|
|
334
349
|
win.scrollTo(targetScroll.x, targetScroll.y);
|
|
335
350
|
const settled = Math.abs((win.scrollX || 0) - targetScroll.x) <= 1 &&
|
|
336
351
|
Math.abs((win.scrollY || 0) - targetScroll.y) <= 1;
|
|
337
|
-
if (
|
|
352
|
+
if (settled) {
|
|
353
|
+
finish(true);
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
if (attempts < maxAttempts) {
|
|
338
357
|
window.requestAnimationFrame(apply);
|
|
339
358
|
}
|
|
359
|
+
else {
|
|
360
|
+
finish(false);
|
|
361
|
+
}
|
|
340
362
|
}
|
|
341
363
|
catch {
|
|
342
364
|
// Cross-origin preview frames expose a WindowProxy, but reading named
|
|
343
365
|
// properties such as scrollTo/scrollX can throw. In that case the
|
|
344
366
|
// bridge-side scroll restoration is responsible for preserving scroll.
|
|
367
|
+
finish(false);
|
|
345
368
|
}
|
|
346
369
|
};
|
|
347
370
|
window.requestAnimationFrame(apply);
|
|
@@ -357,28 +380,6 @@ function applyIframeZoom(_iframe, _zoom, _location) {
|
|
|
357
380
|
function clampEditorZoom(value) {
|
|
358
381
|
return Math.min(ZOOM_MAX, Math.max(ZOOM_MIN, value));
|
|
359
382
|
}
|
|
360
|
-
function isLoopbackHost(hostname) {
|
|
361
|
-
return hostname === "localhost" || hostname === "127.0.0.1";
|
|
362
|
-
}
|
|
363
|
-
function alignLoopbackHostToEditor(url) {
|
|
364
|
-
if (isLoopbackHost(window.location.hostname) &&
|
|
365
|
-
isLoopbackHost(url.hostname)) {
|
|
366
|
-
// Sitecore auth cookies are host-scoped, so localhost and 127.0.0.1 are
|
|
367
|
-
// different origins even when they point at the same machine.
|
|
368
|
-
url.hostname = window.location.hostname;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
function isXmCloudManagedEditingHost(url) {
|
|
372
|
-
return url.hostname.endsWith("-eh.sitecorecloud.io");
|
|
373
|
-
}
|
|
374
|
-
function alignXmCloudManagedEditingHostToEditor(url) {
|
|
375
|
-
if (window.location.hostname.endsWith(".sitecorecloud.io") &&
|
|
376
|
-
isXmCloudManagedEditingHost(url)) {
|
|
377
|
-
url.protocol = window.location.protocol;
|
|
378
|
-
url.hostname = window.location.hostname;
|
|
379
|
-
url.port = window.location.port;
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
383
|
function getUrlOrigin(url) {
|
|
383
384
|
if (!url)
|
|
384
385
|
return undefined;
|
|
@@ -392,61 +393,6 @@ function getUrlOrigin(url) {
|
|
|
392
393
|
return undefined;
|
|
393
394
|
}
|
|
394
395
|
}
|
|
395
|
-
function getEditorQueryParam(name) {
|
|
396
|
-
try {
|
|
397
|
-
return new URLSearchParams(window.location.search).get(name) || undefined;
|
|
398
|
-
}
|
|
399
|
-
catch {
|
|
400
|
-
return undefined;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
function inferRoutePathFromSitecoreItemPath(itemPath) {
|
|
404
|
-
const segments = (itemPath || "")
|
|
405
|
-
.split("/")
|
|
406
|
-
.map((segment) => segment.trim())
|
|
407
|
-
.filter(Boolean);
|
|
408
|
-
const homeIndex = segments
|
|
409
|
-
.map((segment) => segment.toLowerCase())
|
|
410
|
-
.lastIndexOf("home");
|
|
411
|
-
if (homeIndex < 0)
|
|
412
|
-
return undefined;
|
|
413
|
-
const routeSegments = segments.slice(homeIndex + 1);
|
|
414
|
-
if (routeSegments.length === 0)
|
|
415
|
-
return "/";
|
|
416
|
-
return `/${routeSegments.map(encodeURIComponent).join("/")}`;
|
|
417
|
-
}
|
|
418
|
-
function isRootRenderPath(pathname) {
|
|
419
|
-
return !pathname || pathname === "/";
|
|
420
|
-
}
|
|
421
|
-
function applyParheliaRenderContext(renderUrl, pageItemDescriptor, siteName) {
|
|
422
|
-
if (siteName) {
|
|
423
|
-
if (!renderUrl.searchParams.has("site")) {
|
|
424
|
-
renderUrl.searchParams.set("site", siteName);
|
|
425
|
-
}
|
|
426
|
-
// Same-origin Sitecore fallback URLs use sc_site for site resolution and can
|
|
427
|
-
// canonical-redirect to the public site host before the editor iframe loads.
|
|
428
|
-
if (renderUrl.origin !== window.location.origin &&
|
|
429
|
-
!renderUrl.searchParams.has("sc_site")) {
|
|
430
|
-
renderUrl.searchParams.set("sc_site", siteName);
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
if (!renderUrl.searchParams.has("sc_itemid")) {
|
|
434
|
-
renderUrl.searchParams.set("sc_itemid", pageItemDescriptor.id);
|
|
435
|
-
}
|
|
436
|
-
if (!renderUrl.searchParams.has("sc_lang")) {
|
|
437
|
-
renderUrl.searchParams.set("sc_lang", pageItemDescriptor.language);
|
|
438
|
-
}
|
|
439
|
-
if (!renderUrl.searchParams.has("sc_version")) {
|
|
440
|
-
renderUrl.searchParams.set("sc_version", String(pageItemDescriptor.version));
|
|
441
|
-
}
|
|
442
|
-
const routePath = inferRoutePathFromSitecoreItemPath(pageItemDescriptor.path);
|
|
443
|
-
if (!routePath || !isRootRenderPath(renderUrl.pathname))
|
|
444
|
-
return;
|
|
445
|
-
renderUrl.pathname = routePath;
|
|
446
|
-
if (!renderUrl.searchParams.has("route")) {
|
|
447
|
-
renderUrl.searchParams.set("route", routePath);
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
396
|
function resolveBridgeComponentId(rawId, page) {
|
|
451
397
|
if (!rawId)
|
|
452
398
|
return undefined;
|
|
@@ -607,6 +553,34 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
607
553
|
const latestBridgeScrollRef = useRef(undefined);
|
|
608
554
|
const directOverlayScrollSyncRef = useRef(false);
|
|
609
555
|
const pendingRefreshScrollRef = useRef(undefined);
|
|
556
|
+
const restorePendingRefreshScroll = useCallback((iframe, targetScroll, observedScroll) => {
|
|
557
|
+
if (!targetScroll)
|
|
558
|
+
return;
|
|
559
|
+
const clearPendingTarget = () => {
|
|
560
|
+
if (pendingRefreshScrollRef.current === targetScroll) {
|
|
561
|
+
pendingRefreshScrollRef.current = undefined;
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
const restoreStarted = restoreIframeWindowScroll(iframe, targetScroll, {
|
|
565
|
+
maxAttempts: 150,
|
|
566
|
+
onSettled: clearPendingTarget,
|
|
567
|
+
onExpired: clearPendingTarget,
|
|
568
|
+
});
|
|
569
|
+
if (!restoreStarted) {
|
|
570
|
+
clearPendingTarget();
|
|
571
|
+
}
|
|
572
|
+
const currentScroll = observedScroll ??
|
|
573
|
+
getIframeWindowScroll(iframe) ?? { x: 0, y: 0 };
|
|
574
|
+
const deltaX = targetScroll.x - currentScroll.x;
|
|
575
|
+
const deltaY = targetScroll.y - currentScroll.y;
|
|
576
|
+
if (Math.abs(deltaX) > 1 || Math.abs(deltaY) > 1) {
|
|
577
|
+
bridgeClientRef.current?.sendCommand("scrollBy", {
|
|
578
|
+
x: deltaX,
|
|
579
|
+
y: deltaY,
|
|
580
|
+
behavior: "instant",
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
}, []);
|
|
610
584
|
const suppressNextSelectionScrollRef = useRef(false);
|
|
611
585
|
// Timestamp (ms) until which selection auto-scroll is suppressed. Held open for
|
|
612
586
|
// the whole drag and a short window after, so the drop's re-selection doesn't
|
|
@@ -1200,6 +1174,11 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1200
1174
|
cancelable: true,
|
|
1201
1175
|
detail: caretAnchor ? { anchor: caretAnchor } : undefined,
|
|
1202
1176
|
}));
|
|
1177
|
+
return;
|
|
1178
|
+
}
|
|
1179
|
+
const keyboardEvent = createKeyboardEventFromBridgeInteraction(interaction);
|
|
1180
|
+
if (keyboardEvent) {
|
|
1181
|
+
void editContextRef.current?.handleKeyDown(keyboardEvent);
|
|
1203
1182
|
}
|
|
1204
1183
|
return;
|
|
1205
1184
|
}
|
|
@@ -1548,6 +1527,9 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1548
1527
|
bridge.sendCommand("setZoom", {
|
|
1549
1528
|
zoom: pageViewContextRef.current?.zoom ?? 1,
|
|
1550
1529
|
});
|
|
1530
|
+
if (pendingRefreshScrollRef.current) {
|
|
1531
|
+
restorePendingRefreshScroll(iframe, pendingRefreshScrollRef.current);
|
|
1532
|
+
}
|
|
1551
1533
|
break;
|
|
1552
1534
|
case "structureUpdated":
|
|
1553
1535
|
pageViewContext.setBridgeStructure(event.payload.structure);
|
|
@@ -1611,17 +1593,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1611
1593
|
x: 0,
|
|
1612
1594
|
y: 0,
|
|
1613
1595
|
};
|
|
1614
|
-
|
|
1615
|
-
const deltaY = targetScroll.y - observedScroll.y;
|
|
1616
|
-
pendingRefreshScrollRef.current = undefined;
|
|
1617
|
-
if (Math.abs(deltaX) > 1 || Math.abs(deltaY) > 1) {
|
|
1618
|
-
restoreIframeWindowScroll(iframe, targetScroll);
|
|
1619
|
-
bridgeClientRef.current?.sendCommand("scrollBy", {
|
|
1620
|
-
x: deltaX,
|
|
1621
|
-
y: deltaY,
|
|
1622
|
-
behavior: "instant",
|
|
1623
|
-
});
|
|
1624
|
-
}
|
|
1596
|
+
restorePendingRefreshScroll(iframe, targetScroll, observedScroll);
|
|
1625
1597
|
}
|
|
1626
1598
|
setShowSpinner(false);
|
|
1627
1599
|
break;
|
|
@@ -1706,6 +1678,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1706
1678
|
scheduleBridgeDomRevision,
|
|
1707
1679
|
scheduleBridgeGeometryRevision,
|
|
1708
1680
|
shouldTrackMinimapScroll,
|
|
1681
|
+
restorePendingRefreshScroll,
|
|
1709
1682
|
]);
|
|
1710
1683
|
useEffect(() => {
|
|
1711
1684
|
const repository = editContext.itemsRepository;
|
|
@@ -2414,15 +2387,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2414
2387
|
setShowSpinner(false);
|
|
2415
2388
|
applyIframeZoom(iframeRef.current, zoom, "PageViewerFrame.tsx:onLoad-zoom");
|
|
2416
2389
|
if (pendingRefreshScrollRef.current) {
|
|
2417
|
-
|
|
2418
|
-
pendingRefreshScrollRef.current = undefined;
|
|
2419
|
-
restoreIframeWindowScroll(iframeRef.current, targetScroll);
|
|
2420
|
-
const observedScroll = getIframeWindowScroll(iframeRef.current) ?? { x: 0, y: 0 };
|
|
2421
|
-
bridgeClientRef.current?.sendCommand("scrollBy", {
|
|
2422
|
-
x: targetScroll.x - observedScroll.x,
|
|
2423
|
-
y: targetScroll.y - observedScroll.y,
|
|
2424
|
-
behavior: "instant",
|
|
2425
|
-
});
|
|
2390
|
+
restorePendingRefreshScroll(iframeRef.current, pendingRefreshScrollRef.current);
|
|
2426
2391
|
}
|
|
2427
2392
|
}
|
|
2428
2393
|
} }), iframeElement && (_jsx(IframeOverlayProvider, { iframe: iframeElement, mode: "scrolling", scrollScale: 1, visualScale: 1, invalidationKey: `${zoom}:${bridgeGeometryRevision}`, deferredInvalidationMs: ZOOM_TRANSITION_MS + 50, children: _jsx(PageEditorChrome, { iframe: iframeElement, compareView: compareView, pageViewContext: pageViewContext, onBridgeRichTextCommand: sendApplyRichTextCommand }) })), pageViewContext.deviceHeight && pageViewContext.device && (_jsx("div", { className: "bg-neutral-grey-5 relative z-40 h-full w-full" }))] }), !pageViewContext.fullscreen &&
|