@parhelia/core 0.4.12825 → 0.4.12872
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/emoji/EmojiPicker.d.ts +18 -0
- package/dist/components/emoji/EmojiPicker.js +102 -0
- package/dist/components/emoji/EmojiPicker.js.map +1 -0
- package/dist/components/emoji/EmojiText.d.ts +19 -0
- package/dist/components/emoji/EmojiText.js +30 -0
- package/dist/components/emoji/EmojiText.js.map +1 -0
- package/dist/components/emoji/emojiData.generated.d.ts +2 -0
- package/dist/components/emoji/emojiData.generated.js +1878 -0
- package/dist/components/emoji/emojiData.generated.js.map +1 -0
- package/dist/components/emoji/emojiIndex.d.ts +46 -0
- package/dist/components/emoji/emojiIndex.js +173 -0
- package/dist/components/emoji/emojiIndex.js.map +1 -0
- package/dist/components/emoji/emoticons.d.ts +21 -0
- package/dist/components/emoji/emoticons.js +167 -0
- package/dist/components/emoji/emoticons.js.map +1 -0
- package/dist/components/emoji/textareaInsert.d.ts +19 -0
- package/dist/components/emoji/textareaInsert.js +29 -0
- package/dist/components/emoji/textareaInsert.js.map +1 -0
- package/dist/components/emoji/twemoji.d.ts +30 -0
- package/dist/components/emoji/twemoji.js +84 -0
- package/dist/components/emoji/twemoji.js.map +1 -0
- package/dist/components/ui/alert.d.ts +6 -1
- package/dist/components/ui/alert.js +12 -3
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +25 -0
- package/dist/components/ui/context-menu.js +54 -36
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/copy-button.d.ts +3 -1
- package/dist/components/ui/copy-button.js +13 -2
- package/dist/components/ui/copy-button.js.map +1 -1
- package/dist/components/ui/mention-textarea.d.ts +8 -0
- package/dist/components/ui/mention-textarea.js +98 -46
- package/dist/components/ui/mention-textarea.js.map +1 -1
- package/dist/components/ui/paste-button.js +11 -1
- package/dist/components/ui/paste-button.js.map +1 -1
- package/dist/config/config.js +43 -4
- package/dist/config/config.js.map +1 -1
- package/dist/config/types.d.ts +2 -0
- package/dist/config/types.js.map +1 -1
- package/dist/editor/ConcurrentUserLimitDialog.js +5 -2
- package/dist/editor/ConcurrentUserLimitDialog.js.map +1 -1
- package/dist/editor/ContentTree.js +7 -2
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/ContextMenu.js +11 -36
- package/dist/editor/ContextMenu.js.map +1 -1
- package/dist/editor/EditorWarning.js +8 -4
- package/dist/editor/EditorWarning.js.map +1 -1
- package/dist/editor/FieldList.js +1 -1
- package/dist/editor/FieldList.js.map +1 -1
- package/dist/editor/FieldListField.js +18 -13
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/FieldListFieldWithFallbacks.js +1 -1
- package/dist/editor/GlobalMenuBar.js +2 -1
- package/dist/editor/GlobalMenuBar.js.map +1 -1
- package/dist/editor/ImageEditor.js +3 -1
- package/dist/editor/ImageEditor.js.map +1 -1
- package/dist/editor/MainLayout.js +1 -1
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/MigrationsView.js +3 -2
- package/dist/editor/MigrationsView.js.map +1 -1
- package/dist/editor/MobileLayout.js +43 -20
- package/dist/editor/MobileLayout.js.map +1 -1
- package/dist/editor/PictureEditor.js +4 -2
- package/dist/editor/PictureEditor.js.map +1 -1
- package/dist/editor/QuickItemSwitcher.js +4 -2
- package/dist/editor/QuickItemSwitcher.js.map +1 -1
- package/dist/editor/agent-changes/agentChangeTargets.js +6 -0
- package/dist/editor/agent-changes/agentChangeTargets.js.map +1 -1
- package/dist/editor/agent-changes/agentChangeTextHighlight.d.ts +48 -4
- package/dist/editor/agent-changes/agentChangeTextHighlight.js +67 -9
- package/dist/editor/agent-changes/agentChangeTextHighlight.js.map +1 -1
- package/dist/editor/ai/HeartbeatDiagnosticsPanel.js +1 -1
- package/dist/editor/ai/InlineAiDialog.js +11 -8
- package/dist/editor/ai/InlineAiDialog.js.map +1 -1
- package/dist/editor/ai/InlineAiTrigger.js +18 -14
- package/dist/editor/ai/InlineAiTrigger.js.map +1 -1
- package/dist/editor/ai/agentActivitySummary.js +5 -0
- package/dist/editor/ai/agentActivitySummary.js.map +1 -1
- package/dist/editor/ai/agentMessageConversion.js +1 -0
- package/dist/editor/ai/agentMessageConversion.js.map +1 -1
- package/dist/editor/ai/agentMessageMarkdown.js +4 -4
- package/dist/editor/ai/agentMessageMarkdown.js.map +1 -1
- package/dist/editor/ai/dialogs/capturePageScreenshot.d.ts +4 -1
- package/dist/editor/ai/dialogs/capturePageScreenshot.js +214 -44
- package/dist/editor/ai/dialogs/capturePageScreenshot.js.map +1 -1
- package/dist/editor/ai/dialogs/captureShared.d.ts +8 -1
- package/dist/editor/ai/dialogs/captureShared.js +4 -1
- package/dist/editor/ai/dialogs/captureShared.js.map +1 -1
- package/dist/editor/ai/dialogs/offscreenPageCapture.js +1 -1
- package/dist/editor/ai/dialogs/offscreenPageCapture.js.map +1 -1
- package/dist/editor/ai/prepareInlineAiTextSelection.d.ts +2 -1
- package/dist/editor/ai/prepareInlineAiTextSelection.js +1 -2
- package/dist/editor/ai/prepareInlineAiTextSelection.js.map +1 -1
- package/dist/editor/ai/terminal/agentCost.d.ts +2 -0
- package/dist/editor/ai/terminal/agentCost.js +1 -0
- package/dist/editor/ai/terminal/agentCost.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionLiveTotals.js +3 -0
- package/dist/editor/ai/terminal/agentSessionLiveTotals.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionSelectors.d.ts +5 -2
- package/dist/editor/ai/terminal/agentSessionSelectors.js +5 -2
- package/dist/editor/ai/terminal/agentSessionSelectors.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionState.js +8 -1
- package/dist/editor/ai/terminal/agentSessionState.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentActivityOverviewPanel.js +2 -2
- package/dist/editor/ai/terminal/components/AgentActivityOverviewPanel.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentBanners.js +2 -2
- package/dist/editor/ai/terminal/components/AgentBanners.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentCostDisplay.d.ts +2 -0
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js +2 -1
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentFullPromptControls.js +22 -15
- package/dist/editor/ai/terminal/components/AgentFullPromptControls.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentModeSelector.js +7 -3
- package/dist/editor/ai/terminal/components/AgentModeSelector.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js +3 -3
- package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.js +2 -2
- package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.js +1 -1
- package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.d.ts +5 -2
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js +43 -4
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js.map +1 -1
- package/dist/editor/ai/terminal/components/AiResponseMessage.js +32 -15
- package/dist/editor/ai/terminal/components/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/ApprovalCard.d.ts +3 -1
- package/dist/editor/ai/terminal/components/ApprovalCard.js +8 -16
- package/dist/editor/ai/terminal/components/ApprovalCard.js.map +1 -1
- package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js +1 -1
- package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/EditFieldToolCallContent.d.ts +7 -4
- package/dist/editor/ai/terminal/components/EditFieldToolCallContent.js +57 -32
- package/dist/editor/ai/terminal/components/EditFieldToolCallContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.js +1 -2
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.js.map +1 -1
- package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.d.ts +6 -0
- package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.js +61 -0
- package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.js.map +1 -0
- package/dist/editor/ai/terminal/components/ToolCallDisplay.d.ts +5 -0
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js +19 -8
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/UserMessage.js +4 -2
- package/dist/editor/ai/terminal/components/UserMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/ValueDiff.js +1 -1
- package/dist/editor/ai/terminal/components/ValueDiff.js.map +1 -1
- package/dist/editor/ai/terminal/components/toolCallContentRenderers.js +7 -4
- package/dist/editor/ai/terminal/components/toolCallContentRenderers.js.map +1 -1
- package/dist/editor/ai/terminal/components/useApprovalActions.js +1 -1
- package/dist/editor/ai/terminal/components/useApprovalActions.js.map +1 -1
- package/dist/editor/ai/terminal/toolCallDiagnostics.d.ts +34 -0
- package/dist/editor/ai/terminal/toolCallDiagnostics.js +218 -0
- package/dist/editor/ai/terminal/toolCallDiagnostics.js.map +1 -0
- package/dist/editor/ai/terminal/types.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentEditorContext.js +3 -1
- package/dist/editor/ai/terminal/useAgentEditorContext.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentLoadPipeline.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentLoadPipeline.js +2 -1
- package/dist/editor/ai/terminal/useAgentLoadPipeline.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentLoader.d.ts +2 -0
- package/dist/editor/ai/terminal/useAgentLoader.js +17 -2
- package/dist/editor/ai/terminal/useAgentLoader.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentModeState.d.ts +5 -1
- package/dist/editor/ai/terminal/useAgentModeState.js +11 -3
- package/dist/editor/ai/terminal/useAgentModeState.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.js +5 -1
- package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentRunRefs.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentRunRefs.js +3 -0
- package/dist/editor/ai/terminal/useAgentRunRefs.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSessionSync.d.ts +6 -0
- package/dist/editor/ai/terminal/useAgentSessionSync.js +27 -3
- package/dist/editor/ai/terminal/useAgentSessionSync.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsData.d.ts +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js +7 -6
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js +14 -2
- package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentStatusBarContent.js +11 -4
- package/dist/editor/ai/terminal/useAgentStatusBarContent.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentStreamPipeline.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentStreamPipeline.js +2 -1
- package/dist/editor/ai/terminal/useAgentStreamPipeline.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js +11 -2
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js +3 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentToolCallHandler.js +1 -0
- package/dist/editor/ai/terminal/useAgentToolCallHandler.js.map +1 -1
- package/dist/editor/ai/types.d.ts +4 -0
- package/dist/editor/ai-image-editor/AiImageEditorDialog.d.ts +33 -0
- package/dist/editor/ai-image-editor/AiImageEditorDialog.js +372 -127
- package/dist/editor/ai-image-editor/AiImageEditorDialog.js.map +1 -1
- package/dist/editor/ai-image-editor/AiImageResultOverlay.js +4 -2
- package/dist/editor/ai-image-editor/AiImageResultOverlay.js.map +1 -1
- package/dist/editor/bridge/BridgeClient.js +11 -0
- package/dist/editor/bridge/BridgeClient.js.map +1 -1
- package/dist/editor/bridge/protocol.d.ts +63 -0
- package/dist/editor/bridge/protocol.js +8 -1
- package/dist/editor/bridge/protocol.js.map +1 -1
- package/dist/editor/client/EditorShell.js +331 -122
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/SessionExpiredOverlay.js +9 -2
- package/dist/editor/client/SessionExpiredOverlay.js.map +1 -1
- package/dist/editor/client/clipboardStorage.d.ts +10 -0
- package/dist/editor/client/clipboardStorage.js +57 -0
- package/dist/editor/client/clipboardStorage.js.map +1 -0
- package/dist/editor/client/editContext.d.ts +92 -11
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/editHistoryReconciliation.d.ts +2 -1
- package/dist/editor/client/editHistoryReconciliation.js +5 -2
- package/dist/editor/client/editHistoryReconciliation.js.map +1 -1
- package/dist/editor/client/hooks/useRepositoryItemRefresh.d.ts +4 -0
- package/dist/editor/client/hooks/useRepositoryItemRefresh.js +62 -0
- package/dist/editor/client/hooks/useRepositoryItemRefresh.js.map +1 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.d.ts +6 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js +66 -3
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
- package/dist/editor/client/itemsRepository.d.ts +10 -2
- package/dist/editor/client/itemsRepository.js +224 -43
- package/dist/editor/client/itemsRepository.js.map +1 -1
- package/dist/editor/client/liveEditState.d.ts +16 -0
- package/dist/editor/client/liveEditState.js +25 -0
- package/dist/editor/client/liveEditState.js.map +1 -0
- package/dist/editor/client/liveSessionState.d.ts +6 -0
- package/dist/editor/client/liveSessionState.js +20 -0
- package/dist/editor/client/liveSessionState.js.map +1 -0
- package/dist/editor/client/operations.d.ts +13 -2
- package/dist/editor/client/operations.js +100 -29
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/client/pageModelBuilder.d.ts +6 -0
- package/dist/editor/client/pageModelBuilder.js +74 -7
- package/dist/editor/client/pageModelBuilder.js.map +1 -1
- package/dist/editor/client/ui/EditorChrome.d.ts +2 -2
- package/dist/editor/client/ui/EditorChrome.js +12 -8
- package/dist/editor/client/ui/EditorChrome.js.map +1 -1
- package/dist/editor/client/ui/FullscreenControls.d.ts +3 -5
- package/dist/editor/client/ui/FullscreenControls.js +2 -2
- package/dist/editor/client/ui/FullscreenControls.js.map +1 -1
- package/dist/editor/client/valueStore.d.ts +22 -0
- package/dist/editor/client/valueStore.js +29 -0
- package/dist/editor/client/valueStore.js.map +1 -0
- package/dist/editor/commands/componentClipboardCommands.d.ts +35 -0
- package/dist/editor/commands/componentClipboardCommands.js +271 -0
- package/dist/editor/commands/componentClipboardCommands.js.map +1 -0
- package/dist/editor/commands/componentCommands.js +80 -19
- package/dist/editor/commands/componentCommands.js.map +1 -1
- package/dist/editor/commands/componentMenuGroups.d.ts +2 -0
- package/dist/editor/commands/componentMenuGroups.js +43 -0
- package/dist/editor/commands/componentMenuGroups.js.map +1 -0
- package/dist/editor/commands/itemCommands.d.ts +9 -0
- package/dist/editor/commands/itemCommands.js +76 -9
- package/dist/editor/commands/itemCommands.js.map +1 -1
- package/dist/editor/component-conversion/ComponentTypePickerDialog.d.ts +12 -0
- package/dist/editor/component-conversion/ComponentTypePickerDialog.js +40 -0
- package/dist/editor/component-conversion/ComponentTypePickerDialog.js.map +1 -0
- package/dist/editor/component-conversion/ConversionAiDebugButton.d.ts +17 -0
- package/dist/editor/component-conversion/ConversionAiDebugButton.js +80 -0
- package/dist/editor/component-conversion/ConversionAiDebugButton.js.map +1 -0
- package/dist/editor/component-conversion/ConvertComponentDialog.d.ts +28 -0
- package/dist/editor/component-conversion/ConvertComponentDialog.js +633 -0
- package/dist/editor/component-conversion/ConvertComponentDialog.js.map +1 -0
- package/dist/editor/component-conversion/conversionModel.d.ts +109 -0
- package/dist/editor/component-conversion/conversionModel.js +519 -0
- package/dist/editor/component-conversion/conversionModel.js.map +1 -0
- package/dist/editor/component-conversion/conversionService.d.ts +12 -0
- package/dist/editor/component-conversion/conversionService.js +16 -0
- package/dist/editor/component-conversion/conversionService.js.map +1 -0
- package/dist/editor/component-conversion/conversionTypes.d.ts +214 -0
- package/dist/editor/component-conversion/conversionTypes.js +2 -0
- package/dist/editor/component-conversion/conversionTypes.js.map +1 -0
- package/dist/editor/component-conversion/convertComponentsCommand.d.ts +25 -0
- package/dist/editor/component-conversion/convertComponentsCommand.js +196 -0
- package/dist/editor/component-conversion/convertComponentsCommand.js.map +1 -0
- package/dist/editor/editor-warnings/ValidationErrors.js +4 -4
- package/dist/editor/editor-warnings/ValidationErrors.js.map +1 -1
- package/dist/editor/field-types/AttachmentEditor.js +4 -3
- package/dist/editor/field-types/AttachmentEditor.js.map +1 -1
- package/dist/editor/field-types/DateFieldEditor.js +2 -1
- package/dist/editor/field-types/DateFieldEditor.js.map +1 -1
- package/dist/editor/field-types/DateTimeFieldEditor.js +2 -1
- package/dist/editor/field-types/DateTimeFieldEditor.js.map +1 -1
- package/dist/editor/field-types/DropLinkEditor.js +3 -1
- package/dist/editor/field-types/DropLinkEditor.js.map +1 -1
- package/dist/editor/field-types/DropListEditor.js +3 -1
- package/dist/editor/field-types/DropListEditor.js.map +1 -1
- package/dist/editor/field-types/FieldHistoryBoundary.js +28 -7
- package/dist/editor/field-types/FieldHistoryBoundary.js.map +1 -1
- package/dist/editor/field-types/ImageFieldEditor.js +3 -1
- package/dist/editor/field-types/ImageFieldEditor.js.map +1 -1
- package/dist/editor/field-types/InternalLinkFieldEditor.js +2 -1
- package/dist/editor/field-types/InternalLinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/LinkFieldEditor.js +2 -1
- package/dist/editor/field-types/LinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +68 -22
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/NameValueListEditor.js +3 -1
- package/dist/editor/field-types/NameValueListEditor.js.map +1 -1
- package/dist/editor/field-types/PictureFieldEditor.js +4 -2
- package/dist/editor/field-types/PictureFieldEditor.js.map +1 -1
- package/dist/editor/field-types/RawEditor.js +7 -4
- package/dist/editor/field-types/RawEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditor.d.ts +1 -2
- package/dist/editor/field-types/RichTextEditor.js +5 -26
- package/dist/editor/field-types/RichTextEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditorComponent.d.ts +1 -2
- package/dist/editor/field-types/RichTextEditorComponent.js +120 -34
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +68 -22
- package/dist/editor/field-types/SingleLineText.js.map +1 -1
- package/dist/editor/field-types/TreeListEditor.js +4 -2
- package/dist/editor/field-types/TreeListEditor.js.map +1 -1
- package/dist/editor/field-types/fieldStyles.d.ts +21 -0
- package/dist/editor/field-types/fieldStyles.js +22 -0
- package/dist/editor/field-types/fieldStyles.js.map +1 -0
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.d.ts +15 -1
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.js +27 -0
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.js.map +1 -1
- package/dist/editor/field-types/richtext/components/EditorDropdown.css +14 -0
- package/dist/editor/field-types/richtext/components/EditorDropdown.d.ts +3 -1
- package/dist/editor/field-types/richtext/components/EditorDropdown.js +33 -8
- package/dist/editor/field-types/richtext/components/EditorDropdown.js.map +1 -1
- package/dist/editor/field-types/richtext/components/ReactSlate.css +23 -54
- package/dist/editor/field-types/richtext/components/ReactSlate.d.ts +10 -1
- package/dist/editor/field-types/richtext/components/ReactSlate.js +365 -172
- package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -1
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js +1 -1
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js.map +1 -1
- package/dist/editor/field-types/richtext/components/ToolbarButton.js +13 -5
- package/dist/editor/field-types/richtext/components/ToolbarButton.js.map +1 -1
- package/dist/editor/field-types/richtext/config/pluginFactory.d.ts +2 -0
- package/dist/editor/field-types/richtext/config/pluginFactory.js +2 -1
- package/dist/editor/field-types/richtext/config/pluginFactory.js.map +1 -1
- package/dist/editor/field-types/richtext/hooks/useProfileCache.js +1 -0
- package/dist/editor/field-types/richtext/hooks/useProfileCache.js.map +1 -1
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.d.ts +0 -2
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js +2 -5
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js.map +1 -1
- package/dist/editor/field-types/richtext/types.d.ts +47 -2
- package/dist/editor/field-types/richtext/types.js +19 -0
- package/dist/editor/field-types/richtext/types.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/changeHighlight.d.ts +14 -0
- package/dist/editor/field-types/richtext/utils/changeHighlight.js +12 -1
- package/dist/editor/field-types/richtext/utils/changeHighlight.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/conversion.js +108 -32
- package/dist/editor/field-types/richtext/utils/conversion.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/cssClasses.d.ts +27 -0
- package/dist/editor/field-types/richtext/utils/cssClasses.js +98 -0
- package/dist/editor/field-types/richtext/utils/cssClasses.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/plugins.d.ts +40 -1
- package/dist/editor/field-types/richtext/utils/plugins.js +178 -4
- package/dist/editor/field-types/richtext/utils/plugins.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/profileMapper.d.ts +17 -1
- package/dist/editor/field-types/richtext/utils/profileMapper.js +153 -55
- package/dist/editor/field-types/richtext/utils/profileMapper.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/spellCheckText.d.ts +31 -0
- package/dist/editor/field-types/richtext/utils/spellCheckText.js +82 -0
- package/dist/editor/field-types/richtext/utils/spellCheckText.js.map +1 -0
- package/dist/editor/field-types/useFocusedFieldInput.d.ts +13 -0
- package/dist/editor/field-types/useFocusedFieldInput.js +50 -0
- package/dist/editor/field-types/useFocusedFieldInput.js.map +1 -0
- package/dist/editor/field-types/useFormFieldCaretPresence.js +8 -1
- package/dist/editor/field-types/useFormFieldCaretPresence.js.map +1 -1
- package/dist/editor/field-types/useFormFieldSelectionRange.d.ts +20 -13
- package/dist/editor/field-types/useFormFieldSelectionRange.js +40 -14
- package/dist/editor/field-types/useFormFieldSelectionRange.js.map +1 -1
- package/dist/editor/find-replace/findReplaceTargets.d.ts +2 -0
- package/dist/editor/find-replace/findReplaceTargets.js +2 -2
- package/dist/editor/find-replace/findReplaceTargets.js.map +1 -1
- package/dist/editor/itemContextMenuGroups.js +10 -1
- package/dist/editor/itemContextMenuGroups.js.map +1 -1
- package/dist/editor/media-selector/AiImageSearch.js +1 -163
- package/dist/editor/media-selector/AiImageSearch.js.map +1 -1
- package/dist/editor/media-selector/MediaDetailsView.d.ts +14 -0
- package/dist/editor/media-selector/MediaDetailsView.js +152 -0
- package/dist/editor/media-selector/MediaDetailsView.js.map +1 -0
- package/dist/editor/media-selector/MediaFolderBrowser.js +326 -106
- package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -1
- package/dist/editor/media-selector/TreeSelector.js +40 -2
- package/dist/editor/media-selector/TreeSelector.js.map +1 -1
- package/dist/editor/media-selector/UploadZone.js +1 -1
- package/dist/editor/media-selector/UploadZone.js.map +1 -1
- package/dist/editor/media-selector/useMediaFolderDrag.d.ts +26 -0
- package/dist/editor/media-selector/useMediaFolderDrag.js +153 -0
- package/dist/editor/media-selector/useMediaFolderDrag.js.map +1 -0
- package/dist/editor/menubar/ActiveUsers.js +5 -3
- package/dist/editor/menubar/ActiveUsers.js.map +1 -1
- package/dist/editor/menubar/PageSelector.js +21 -22
- package/dist/editor/menubar/PageSelector.js.map +1 -1
- package/dist/editor/menubar/ToolbarFactory.js +8 -2
- package/dist/editor/menubar/ToolbarFactory.js.map +1 -1
- package/dist/editor/menubar/VersionPreviewCard.js +4 -2
- package/dist/editor/menubar/VersionPreviewCard.js.map +1 -1
- package/dist/editor/menubar/WorkflowButton.js +10 -10
- package/dist/editor/menubar/WorkflowButton.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.d.ts +13 -0
- package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js +88 -0
- package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.d.ts +3 -4
- package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.js +15 -13
- package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.d.ts +9 -0
- package/dist/editor/menubar/toolbar-sections/EditControls.js +24 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/FullscreenControl.js +3 -2
- package/dist/editor/menubar/toolbar-sections/FullscreenControl.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/InsertControls.js +4 -2
- package/dist/editor/menubar/toolbar-sections/InsertControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/LayoutModeControls.js +3 -2
- package/dist/editor/menubar/toolbar-sections/LayoutModeControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.js +2 -2
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.d.ts +5 -0
- package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.js +16 -0
- package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/UndoRedoControls.js +2 -2
- package/dist/editor/menubar/toolbar-sections/UndoRedoControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +7 -7
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ViewportControls.d.ts +3 -4
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js +19 -31
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/index.d.ts +1 -1
- package/dist/editor/menubar/toolbar-sections/index.js +1 -1
- package/dist/editor/menubar/toolbar-sections/index.js.map +1 -1
- package/dist/editor/mobileBottomPanel.d.ts +40 -0
- package/dist/editor/mobileBottomPanel.js +63 -0
- package/dist/editor/mobileBottomPanel.js.map +1 -0
- package/dist/editor/notifications/useNotifications.js +12 -17
- package/dist/editor/notifications/useNotifications.js.map +1 -1
- package/dist/editor/page-editor-chrome/AgentChangeHighlightings.d.ts +3 -6
- package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js +8 -6
- package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.d.ts +5 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js +60 -10
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.d.ts +6 -0
- package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.js +100 -0
- package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.js.map +1 -0
- package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.d.ts +16 -0
- package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.js +23 -0
- package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.js.map +1 -0
- package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.d.ts +9 -0
- package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.js +32 -0
- package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.js.map +1 -0
- package/dist/editor/page-editor-chrome/CommentHighlightings.d.ts +4 -1
- package/dist/editor/page-editor-chrome/CommentHighlightings.js +195 -388
- package/dist/editor/page-editor-chrome/CommentHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.d.ts +14 -0
- package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.js +110 -0
- package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.js.map +1 -0
- package/dist/editor/page-editor-chrome/ConversionIndicators.d.ts +8 -0
- package/dist/editor/page-editor-chrome/ConversionIndicators.js +75 -0
- package/dist/editor/page-editor-chrome/ConversionIndicators.js.map +1 -0
- package/dist/editor/page-editor-chrome/DiffHighlightOverlay.d.ts +9 -13
- package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js +25 -20
- package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/DragInsertionOverlay.js +21 -17
- package/dist/editor/page-editor-chrome/DragInsertionOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.d.ts +1 -1
- package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.js +9 -6
- package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.js.map +1 -1
- package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.d.ts +15 -0
- package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.js +31 -0
- package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicator.d.ts +1 -1
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js +6 -3
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js +10 -6
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/FindReplaceHighlightings.d.ts +1 -1
- package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js +7 -4
- package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.d.ts +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js +13 -11
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenus.d.ts +1 -1
- package/dist/editor/page-editor-chrome/FrameMenus.js +7 -5
- package/dist/editor/page-editor-chrome/FrameMenus.js.map +1 -1
- package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.d.ts +2 -2
- package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.js +20 -39
- package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.js.map +1 -1
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.d.ts +1 -1
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js +27 -21
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/NoLayout.js +5 -3
- package/dist/editor/page-editor-chrome/NoLayout.js.map +1 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.d.ts +1 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.js +29 -23
- package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -1
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.d.ts +1 -1
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js +24 -21
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +10 -4
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.d.ts +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js +11 -10
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js.map +1 -1
- package/dist/editor/page-editor-chrome/SpellCheckHighlightings.d.ts +12 -0
- package/dist/editor/page-editor-chrome/SpellCheckHighlightings.js +197 -0
- package/dist/editor/page-editor-chrome/SpellCheckHighlightings.js.map +1 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.d.ts +1 -1
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js +226 -388
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/ValidationRulerMarks.d.ts +11 -0
- package/dist/editor/page-editor-chrome/ValidationRulerMarks.js +56 -0
- package/dist/editor/page-editor-chrome/ValidationRulerMarks.js.map +1 -0
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.d.ts +1 -1
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js +11 -8
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.d.ts +15 -2
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js +70 -9
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.d.ts +44 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.js +89 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.d.ts +17 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.js +53 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/geometry.d.ts +15 -0
- package/dist/editor/page-editor-chrome/overlay/geometry.js +40 -0
- package/dist/editor/page-editor-chrome/overlay/geometry.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.d.ts +11 -0
- package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.js +84 -0
- package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.d.ts +34 -0
- package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.js +229 -0
- package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.d.ts +9 -0
- package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.js +34 -0
- package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.d.ts +49 -0
- package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.js +241 -0
- package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.js.map +1 -0
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.d.ts +7 -0
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.js +133 -10
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.js.map +1 -1
- package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.d.ts +12 -0
- package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.js +79 -0
- package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.js.map +1 -0
- package/dist/editor/page-editor-chrome/useComponentDragHandle.js +1 -1
- package/dist/editor/page-editor-chrome/useComponentDragHandle.js.map +1 -1
- package/dist/editor/page-editor-chrome/useDragInsertionGesture.js +1 -1
- package/dist/editor/page-editor-chrome/useDragInsertionGesture.js.map +1 -1
- package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.d.ts +1 -1
- package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.js +4 -2
- package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.js.map +1 -1
- package/dist/editor/page-viewer/CanvasOverviewRuler.d.ts +11 -0
- package/dist/editor/page-viewer/CanvasOverviewRuler.js +65 -0
- package/dist/editor/page-viewer/CanvasOverviewRuler.js.map +1 -0
- package/dist/editor/page-viewer/DeviceToolbar.d.ts +1 -1
- package/dist/editor/page-viewer/DeviceToolbar.js +8 -3
- package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -1
- package/dist/editor/page-viewer/DynamicRenderingsBar.d.ts +23 -0
- package/dist/editor/page-viewer/DynamicRenderingsBar.js +28 -0
- package/dist/editor/page-viewer/DynamicRenderingsBar.js.map +1 -0
- package/dist/editor/page-viewer/DynamicRenderingsStrip.d.ts +18 -0
- package/dist/editor/page-viewer/DynamicRenderingsStrip.js +29 -0
- package/dist/editor/page-viewer/DynamicRenderingsStrip.js.map +1 -0
- package/dist/editor/page-viewer/EditorForm.js +29 -24
- package/dist/editor/page-viewer/EditorForm.js.map +1 -1
- package/dist/editor/page-viewer/FeedbackMargin.d.ts +57 -0
- package/dist/editor/page-viewer/FeedbackMargin.js +378 -0
- package/dist/editor/page-viewer/FeedbackMargin.js.map +1 -0
- package/dist/editor/page-viewer/FeedbackMarginController.d.ts +76 -0
- package/dist/editor/page-viewer/FeedbackMarginController.js +241 -0
- package/dist/editor/page-viewer/FeedbackMarginController.js.map +1 -0
- package/dist/editor/page-viewer/FeedbackMarginMarker.d.ts +16 -0
- package/dist/editor/page-viewer/FeedbackMarginMarker.js +24 -0
- package/dist/editor/page-viewer/FeedbackMarginMarker.js.map +1 -0
- package/dist/editor/page-viewer/FeedbackMarginResizeHandle.d.ts +23 -0
- package/dist/editor/page-viewer/FeedbackMarginResizeHandle.js +105 -0
- package/dist/editor/page-viewer/FeedbackMarginResizeHandle.js.map +1 -0
- package/dist/editor/page-viewer/InteractivePreviewBar.d.ts +24 -0
- package/dist/editor/page-viewer/InteractivePreviewBar.js +31 -0
- package/dist/editor/page-viewer/InteractivePreviewBar.js.map +1 -0
- package/dist/editor/page-viewer/MiniMap.d.ts +9 -3
- package/dist/editor/page-viewer/MiniMap.js +50 -60
- package/dist/editor/page-viewer/MiniMap.js.map +1 -1
- package/dist/editor/page-viewer/MinimapDropTargets.d.ts +1 -1
- package/dist/editor/page-viewer/MinimapDropTargets.js +9 -7
- package/dist/editor/page-viewer/MinimapDropTargets.js.map +1 -1
- package/dist/editor/page-viewer/MobileCommentsPanel.d.ts +16 -0
- package/dist/editor/page-viewer/MobileCommentsPanel.js +112 -0
- package/dist/editor/page-viewer/MobileCommentsPanel.js.map +1 -0
- package/dist/editor/page-viewer/PageViewer.js +22 -67
- package/dist/editor/page-viewer/PageViewer.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.d.ts +1 -0
- package/dist/editor/page-viewer/PageViewerFrame.js +625 -228
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/page-viewer/RenderingAiCheck.d.ts +18 -0
- package/dist/editor/page-viewer/RenderingAiCheck.js +45 -0
- package/dist/editor/page-viewer/RenderingAiCheck.js.map +1 -0
- package/dist/editor/page-viewer/RenderingApprovalDialog.d.ts +32 -0
- package/dist/editor/page-viewer/RenderingApprovalDialog.js +191 -0
- package/dist/editor/page-viewer/RenderingApprovalDialog.js.map +1 -0
- package/dist/editor/page-viewer/SealedClientCodePreview.d.ts +17 -0
- package/dist/editor/page-viewer/SealedClientCodePreview.js +38 -0
- package/dist/editor/page-viewer/SealedClientCodePreview.js.map +1 -0
- package/dist/editor/page-viewer/bridgeFieldPatch.d.ts +9 -0
- package/dist/editor/page-viewer/bridgeFieldPatch.js +21 -0
- package/dist/editor/page-viewer/bridgeFieldPatch.js.map +1 -1
- package/dist/editor/page-viewer/bridgeInlineEditSession.js +8 -0
- package/dist/editor/page-viewer/bridgeInlineEditSession.js.map +1 -1
- package/dist/editor/page-viewer/canvasFrameNavigation.d.ts +18 -0
- package/dist/editor/page-viewer/canvasFrameNavigation.js +36 -0
- package/dist/editor/page-viewer/canvasFrameNavigation.js.map +1 -0
- package/dist/editor/page-viewer/canvasLoadSettling.d.ts +42 -0
- package/dist/editor/page-viewer/canvasLoadSettling.js +46 -0
- package/dist/editor/page-viewer/canvasLoadSettling.js.map +1 -0
- package/dist/editor/page-viewer/canvasScrollHandoff.d.ts +34 -0
- package/dist/editor/page-viewer/canvasScrollHandoff.js +55 -0
- package/dist/editor/page-viewer/canvasScrollHandoff.js.map +1 -0
- package/dist/editor/page-viewer/canvasScrollRestore.d.ts +28 -0
- package/dist/editor/page-viewer/canvasScrollRestore.js +31 -0
- package/dist/editor/page-viewer/canvasScrollRestore.js.map +1 -0
- package/dist/editor/page-viewer/feedbackMarginLayout.d.ts +119 -0
- package/dist/editor/page-viewer/feedbackMarginLayout.js +155 -0
- package/dist/editor/page-viewer/feedbackMarginLayout.js.map +1 -0
- package/dist/editor/page-viewer/feedbackMarginSources.d.ts +36 -0
- package/dist/editor/page-viewer/feedbackMarginSources.js +196 -0
- package/dist/editor/page-viewer/feedbackMarginSources.js.map +1 -0
- package/dist/editor/page-viewer/feedbackMarginWidth.d.ts +43 -0
- package/dist/editor/page-viewer/feedbackMarginWidth.js +107 -0
- package/dist/editor/page-viewer/feedbackMarginWidth.js.map +1 -0
- package/dist/editor/page-viewer/interactivePreview.d.ts +168 -0
- package/dist/editor/page-viewer/interactivePreview.js +344 -0
- package/dist/editor/page-viewer/interactivePreview.js.map +1 -0
- package/dist/editor/page-viewer/minimapViewport.js +5 -2
- package/dist/editor/page-viewer/minimapViewport.js.map +1 -1
- package/dist/editor/page-viewer/openPageItems.d.ts +29 -0
- package/dist/editor/page-viewer/openPageItems.js +73 -0
- package/dist/editor/page-viewer/openPageItems.js.map +1 -0
- package/dist/editor/page-viewer/overviewRuler.d.ts +128 -0
- package/dist/editor/page-viewer/overviewRuler.js +226 -0
- package/dist/editor/page-viewer/overviewRuler.js.map +1 -0
- package/dist/editor/page-viewer/pageViewContext.d.ts +99 -37
- package/dist/editor/page-viewer/pageViewContext.js +207 -238
- package/dist/editor/page-viewer/pageViewContext.js.map +1 -1
- package/dist/editor/page-viewer/renderingApproval.d.ts +59 -0
- package/dist/editor/page-viewer/renderingApproval.js +186 -0
- package/dist/editor/page-viewer/renderingApproval.js.map +1 -0
- package/dist/editor/page-viewer/renderingChanges.d.ts +29 -0
- package/dist/editor/page-viewer/renderingChanges.js +40 -0
- package/dist/editor/page-viewer/renderingChanges.js.map +1 -0
- package/dist/editor/page-viewer/scrollIntoViewTextRanges.d.ts +23 -0
- package/dist/editor/page-viewer/scrollIntoViewTextRanges.js +26 -0
- package/dist/editor/page-viewer/scrollIntoViewTextRanges.js.map +1 -0
- package/dist/editor/page-viewer/useInteractivePreview.d.ts +77 -0
- package/dist/editor/page-viewer/useInteractivePreview.js +210 -0
- package/dist/editor/page-viewer/useInteractivePreview.js.map +1 -0
- package/dist/editor/pageModel.d.ts +12 -0
- package/dist/editor/personalization/ConditionTreeEditor.js +1 -1
- package/dist/editor/personalization/ConditionTreeEditor.js.map +1 -1
- package/dist/editor/personalization/PersonalizationPanel.js +1 -1
- package/dist/editor/personalization/PersonalizationPanel.js.map +1 -1
- package/dist/editor/reviews/CollapsibleText.d.ts +13 -0
- package/dist/editor/reviews/CollapsibleText.js +41 -0
- package/dist/editor/reviews/CollapsibleText.js.map +1 -0
- package/dist/editor/reviews/Comment.d.ts +10 -1
- package/dist/editor/reviews/Comment.js +47 -26
- package/dist/editor/reviews/Comment.js.map +1 -1
- package/dist/editor/reviews/CommentDisplayPopover.js +29 -25
- package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/CommentEditor.d.ts +25 -1
- package/dist/editor/reviews/CommentEditor.js +130 -24
- package/dist/editor/reviews/CommentEditor.js.map +1 -1
- package/dist/editor/reviews/CommentPopover.d.ts +0 -4
- package/dist/editor/reviews/CommentPopover.js +4 -8
- package/dist/editor/reviews/CommentPopover.js.map +1 -1
- package/dist/editor/reviews/CommentQuote.d.ts +10 -1
- package/dist/editor/reviews/CommentQuote.js +15 -10
- package/dist/editor/reviews/CommentQuote.js.map +1 -1
- package/dist/editor/reviews/CommentTargetOutline.d.ts +13 -0
- package/dist/editor/reviews/CommentTargetOutline.js +21 -0
- package/dist/editor/reviews/CommentTargetOutline.js.map +1 -0
- package/dist/editor/reviews/CommentTargetPickerDomLayer.d.ts +7 -0
- package/dist/editor/reviews/CommentTargetPickerDomLayer.js +117 -0
- package/dist/editor/reviews/CommentTargetPickerDomLayer.js.map +1 -0
- package/dist/editor/reviews/CommentThreadAgentLink.d.ts +6 -1
- package/dist/editor/reviews/CommentThreadAgentLink.js +4 -4
- package/dist/editor/reviews/CommentThreadAgentLink.js.map +1 -1
- package/dist/editor/reviews/CommentThreadCard.d.ts +34 -0
- package/dist/editor/reviews/CommentThreadCard.js +156 -0
- package/dist/editor/reviews/CommentThreadCard.js.map +1 -0
- package/dist/editor/reviews/CommentView.d.ts +7 -1
- package/dist/editor/reviews/CommentView.js +24 -6
- package/dist/editor/reviews/CommentView.js.map +1 -1
- package/dist/editor/reviews/Comments.js +5 -14
- package/dist/editor/reviews/Comments.js.map +1 -1
- package/dist/editor/reviews/CreateReviewDialog.js +36 -9
- package/dist/editor/reviews/CreateReviewDialog.js.map +1 -1
- package/dist/editor/reviews/EditReviewSettingsDialog.js +1 -1
- package/dist/editor/reviews/EditReviewSettingsDialog.js.map +1 -1
- package/dist/editor/reviews/FeedbackCard.d.ts +16 -1
- package/dist/editor/reviews/FeedbackCard.js +14 -3
- package/dist/editor/reviews/FeedbackCard.js.map +1 -1
- package/dist/editor/reviews/FeedbackFilters.d.ts +9 -5
- package/dist/editor/reviews/FeedbackFilters.js +15 -36
- package/dist/editor/reviews/FeedbackFilters.js.map +1 -1
- package/dist/editor/reviews/FeedbackModeIntro.d.ts +7 -1
- package/dist/editor/reviews/FeedbackModeIntro.js +11 -6
- package/dist/editor/reviews/FeedbackModeIntro.js.map +1 -1
- package/dist/editor/reviews/MentionText.d.ts +2 -1
- package/dist/editor/reviews/MentionText.js +5 -3
- package/dist/editor/reviews/MentionText.js.map +1 -1
- package/dist/editor/reviews/MultiReviewManager.js +18 -3
- package/dist/editor/reviews/MultiReviewManager.js.map +1 -1
- package/dist/editor/reviews/ReviewItemsPanel.js +4 -0
- package/dist/editor/reviews/ReviewItemsPanel.js.map +1 -1
- package/dist/editor/reviews/SuggestedEdit.d.ts +10 -1
- package/dist/editor/reviews/SuggestedEdit.js +77 -10
- package/dist/editor/reviews/SuggestedEdit.js.map +1 -1
- package/dist/editor/reviews/SuggestionCommentThread.d.ts +5 -1
- package/dist/editor/reviews/SuggestionCommentThread.js +48 -17
- package/dist/editor/reviews/SuggestionCommentThread.js.map +1 -1
- package/dist/editor/reviews/SuggestionDisplayPopover.d.ts +1 -3
- package/dist/editor/reviews/SuggestionDisplayPopover.js +2 -7
- package/dist/editor/reviews/SuggestionDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/SuggestionThreadCard.d.ts +19 -0
- package/dist/editor/reviews/SuggestionThreadCard.js +25 -0
- package/dist/editor/reviews/SuggestionThreadCard.js.map +1 -0
- package/dist/editor/reviews/addCommentOnTarget.d.ts +22 -0
- package/dist/editor/reviews/addCommentOnTarget.js +32 -0
- package/dist/editor/reviews/addCommentOnTarget.js.map +1 -0
- package/dist/editor/reviews/applySuggestedEditActions.js +7 -1
- package/dist/editor/reviews/applySuggestedEditActions.js.map +1 -1
- package/dist/editor/reviews/balloonLayout.d.ts +51 -0
- package/dist/editor/reviews/balloonLayout.js +101 -0
- package/dist/editor/reviews/balloonLayout.js.map +1 -0
- package/dist/editor/reviews/commentImages.d.ts +1 -2
- package/dist/editor/reviews/commentImages.js +1 -37
- package/dist/editor/reviews/commentImages.js.map +1 -1
- package/dist/editor/reviews/commentTargetPicker.d.ts +114 -0
- package/dist/editor/reviews/commentTargetPicker.js +153 -0
- package/dist/editor/reviews/commentTargetPicker.js.map +1 -0
- package/dist/editor/reviews/feedbackAvatar.js +2 -1
- package/dist/editor/reviews/feedbackAvatar.js.map +1 -1
- package/dist/editor/reviews/feedbackBalloonDate.d.ts +8 -0
- package/dist/editor/reviews/feedbackBalloonDate.js +22 -0
- package/dist/editor/reviews/feedbackBalloonDate.js.map +1 -0
- package/dist/editor/reviews/feedbackDrafts.d.ts +49 -0
- package/dist/editor/reviews/feedbackDrafts.js +74 -0
- package/dist/editor/reviews/feedbackDrafts.js.map +1 -0
- package/dist/editor/reviews/feedbackHoverState.d.ts +18 -0
- package/dist/editor/reviews/feedbackHoverState.js +35 -0
- package/dist/editor/reviews/feedbackHoverState.js.map +1 -0
- package/dist/editor/reviews/feedbackPersonFilter.d.ts +3 -0
- package/dist/editor/reviews/feedbackPersonFilter.js +32 -0
- package/dist/editor/reviews/feedbackPersonFilter.js.map +1 -0
- package/dist/editor/reviews/feedbackSelection.js +7 -3
- package/dist/editor/reviews/feedbackSelection.js.map +1 -1
- package/dist/editor/reviews/feedbackThreadSelection.d.ts +10 -0
- package/dist/editor/reviews/feedbackThreadSelection.js +31 -0
- package/dist/editor/reviews/feedbackThreadSelection.js.map +1 -0
- package/dist/editor/reviews/feedbackThreads.d.ts +50 -0
- package/dist/editor/reviews/feedbackThreads.js +135 -0
- package/dist/editor/reviews/feedbackThreads.js.map +1 -0
- package/dist/editor/reviews/feedbackWheelForwarding.d.ts +34 -0
- package/dist/editor/reviews/feedbackWheelForwarding.js +108 -0
- package/dist/editor/reviews/feedbackWheelForwarding.js.map +1 -0
- package/dist/editor/reviews/openCommentsFeedback.d.ts +1 -1
- package/dist/editor/reviews/openCommentsFeedback.js +2 -1
- package/dist/editor/reviews/openCommentsFeedback.js.map +1 -1
- package/dist/editor/reviews/pendingReviewSelection.d.ts +13 -0
- package/dist/editor/reviews/pendingReviewSelection.js +29 -0
- package/dist/editor/reviews/pendingReviewSelection.js.map +1 -0
- package/dist/editor/reviews/requestReview.d.ts +27 -0
- package/dist/editor/reviews/requestReview.js +36 -0
- package/dist/editor/reviews/requestReview.js.map +1 -0
- package/dist/editor/reviews/reviewUrlScope.d.ts +23 -0
- package/dist/editor/reviews/reviewUrlScope.js +86 -0
- package/dist/editor/reviews/reviewUrlScope.js.map +1 -0
- package/dist/editor/reviews/scrollWithin.d.ts +29 -0
- package/dist/editor/reviews/scrollWithin.js +87 -0
- package/dist/editor/reviews/scrollWithin.js.map +1 -0
- package/dist/editor/reviews/subtreeFeedback.d.ts +57 -0
- package/dist/editor/reviews/subtreeFeedback.js +137 -0
- package/dist/editor/reviews/subtreeFeedback.js.map +1 -0
- package/dist/editor/reviews/useCommentImagePaste.d.ts +9 -1
- package/dist/editor/reviews/useCommentImagePaste.js +68 -4
- package/dist/editor/reviews/useCommentImagePaste.js.map +1 -1
- package/dist/editor/reviews/useFeedbackThreads.d.ts +35 -0
- package/dist/editor/reviews/useFeedbackThreads.js +137 -0
- package/dist/editor/reviews/useFeedbackThreads.js.map +1 -0
- package/dist/editor/reviews/useMeasuredHeights.d.ts +25 -0
- package/dist/editor/reviews/useMeasuredHeights.js +176 -0
- package/dist/editor/reviews/useMeasuredHeights.js.map +1 -0
- package/dist/editor/reviews/usePendingFeedbackFocus.d.ts +7 -0
- package/dist/editor/reviews/usePendingFeedbackFocus.js +42 -0
- package/dist/editor/reviews/usePendingFeedbackFocus.js.map +1 -0
- package/dist/editor/services/agentService.d.ts +101 -5
- package/dist/editor/services/agentService.js +16 -0
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/aiService.d.ts +2 -0
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/editor/services/contentService.d.ts +11 -1
- package/dist/editor/services/contentService.js +2 -1
- package/dist/editor/services/contentService.js.map +1 -1
- package/dist/editor/services/editService.d.ts +2 -0
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/services/indexService.d.ts +1 -0
- package/dist/editor/services/indexService.js +4 -0
- package/dist/editor/services/indexService.js.map +1 -1
- package/dist/editor/services/mcpAccessService.d.ts +93 -0
- package/dist/editor/services/mcpAccessService.js +41 -0
- package/dist/editor/services/mcpAccessService.js.map +1 -0
- package/dist/editor/services/previewTokenService.d.ts +14 -0
- package/dist/editor/services/previewTokenService.js +34 -0
- package/dist/editor/services/previewTokenService.js.map +1 -0
- package/dist/editor/services/renderingsService.d.ts +117 -0
- package/dist/editor/services/renderingsService.js +245 -0
- package/dist/editor/services/renderingsService.js.map +1 -0
- package/dist/editor/services/reviewsService.d.ts +6 -1
- package/dist/editor/services/reviewsService.js +14 -6
- package/dist/editor/services/reviewsService.js.map +1 -1
- package/dist/editor/services/serviceHelper.d.ts +17 -1
- package/dist/editor/services/serviceHelper.js +67 -12
- package/dist/editor/services/serviceHelper.js.map +1 -1
- package/dist/editor/services/spellCheckService.d.ts +13 -0
- package/dist/editor/services/spellCheckService.js +33 -0
- package/dist/editor/services/spellCheckService.js.map +1 -0
- package/dist/editor/services/suggestedEditsService.d.ts +1 -0
- package/dist/editor/services/suggestedEditsService.js +7 -0
- package/dist/editor/services/suggestedEditsService.js.map +1 -1
- package/dist/editor/settings/MigrationJournalCard.js +2 -2
- package/dist/editor/settings/MigrationJournalCard.js.map +1 -1
- package/dist/editor/settings/StatusSummary.js +5 -2
- package/dist/editor/settings/StatusSummary.js.map +1 -1
- package/dist/editor/settings/index/CollectionWarningsDisplay.js +1 -1
- package/dist/editor/settings/index/CollectionWarningsDisplay.js.map +1 -1
- package/dist/editor/settings/index/IndexGenerationsSection.d.ts +4 -5
- package/dist/editor/settings/index/IndexGenerationsSection.js +83 -33
- package/dist/editor/settings/index/IndexGenerationsSection.js.map +1 -1
- package/dist/editor/settings/panels/AgentProfileConfigPanel.js +1 -1
- package/dist/editor/settings/panels/AgentProfileConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/AgentToolsPanel.js +1 -1
- package/dist/editor/settings/panels/AgentToolsPanel.js.map +1 -1
- package/dist/editor/settings/panels/JavaScriptToolAgentPanel.js +1 -1
- package/dist/editor/settings/panels/JavaScriptToolAgentPanel.js.map +1 -1
- package/dist/editor/settings/panels/JavaScriptToolConfigPanel.js +1 -1
- package/dist/editor/settings/panels/JavaScriptToolConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/McpAccessPanel.d.ts +7 -0
- package/dist/editor/settings/panels/McpAccessPanel.js +96 -0
- package/dist/editor/settings/panels/McpAccessPanel.js.map +1 -0
- package/dist/editor/settings/panels/McpAccessSettingsView.d.ts +8 -0
- package/dist/editor/settings/panels/McpAccessSettingsView.js +221 -0
- package/dist/editor/settings/panels/McpAccessSettingsView.js.map +1 -0
- package/dist/editor/settings/panels/ModelConfigPanel.js +1 -0
- package/dist/editor/settings/panels/ModelConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/ModelsPanel.js +60 -6
- package/dist/editor/settings/panels/ModelsPanel.js.map +1 -1
- package/dist/editor/settings/panels/PersistentLogsPanel.js +2 -1
- package/dist/editor/settings/panels/PersistentLogsPanel.js.map +1 -1
- package/dist/editor/settings/panels/ProjectTemplateAgentPanel.js +1 -1
- package/dist/editor/settings/panels/ProjectTemplateAgentPanel.js.map +1 -1
- package/dist/editor/settings/panels/ProvidersPanel.js +2 -1
- package/dist/editor/settings/panels/ProvidersPanel.js.map +1 -1
- package/dist/editor/settings/panels/SearchConfigPanel.js +6 -5
- package/dist/editor/settings/panels/SearchConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/SpellCheckPanel.d.ts +8 -0
- package/dist/editor/settings/panels/SpellCheckPanel.js +253 -0
- package/dist/editor/settings/panels/SpellCheckPanel.js.map +1 -0
- package/dist/editor/settings/panels/StatusPanel.js +5 -6
- package/dist/editor/settings/panels/StatusPanel.js.map +1 -1
- package/dist/editor/settings/panels/UserPreferencesPanel.js +5 -2
- package/dist/editor/settings/panels/UserPreferencesPanel.js.map +1 -1
- package/dist/editor/settings/panels/index.d.ts +2 -0
- package/dist/editor/settings/panels/index.js +2 -0
- package/dist/editor/settings/panels/index.js.map +1 -1
- package/dist/editor/sidebar/ComponentPalette.js +7 -3
- package/dist/editor/sidebar/ComponentPalette.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.d.ts +1 -1
- package/dist/editor/sidebar/ComponentTree.js +32 -56
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/sidebar/DictionaryEditor.js +2 -1
- package/dist/editor/sidebar/DictionaryEditor.js.map +1 -1
- package/dist/editor/sidebar/EditHistory.js +5 -4
- package/dist/editor/sidebar/EditHistory.js.map +1 -1
- package/dist/editor/sidebar/FeedbackSidebar.d.ts +7 -0
- package/dist/editor/sidebar/FeedbackSidebar.js +300 -0
- package/dist/editor/sidebar/FeedbackSidebar.js.map +1 -0
- package/dist/editor/sidebar/OperationDetailsContent.js +50 -0
- package/dist/editor/sidebar/OperationDetailsContent.js.map +1 -1
- package/dist/editor/sidebar/OperationItem.js +2 -0
- package/dist/editor/sidebar/OperationItem.js.map +1 -1
- package/dist/editor/sidebar/Sessions.js +3 -1
- package/dist/editor/sidebar/Sessions.js.map +1 -1
- package/dist/editor/sidebar/Validation.js +1 -1
- package/dist/editor/sidebar/Validation.js.map +1 -1
- package/dist/editor/sidebar/Workbox.js +3 -108
- package/dist/editor/sidebar/Workbox.js.map +1 -1
- package/dist/editor/sidebar/liveComponentThumbnails.d.ts +1 -1
- package/dist/editor/sidebar/liveComponentThumbnails.js +19 -14
- package/dist/editor/sidebar/liveComponentThumbnails.js.map +1 -1
- package/dist/editor/spellcheck/canvasSpellCheckContextMenu.d.ts +30 -0
- package/dist/editor/spellcheck/canvasSpellCheckContextMenu.js +69 -0
- package/dist/editor/spellcheck/canvasSpellCheckContextMenu.js.map +1 -0
- package/dist/editor/spellcheck/htmlSpellDocument.d.ts +60 -0
- package/dist/editor/spellcheck/htmlSpellDocument.js +181 -0
- package/dist/editor/spellcheck/htmlSpellDocument.js.map +1 -0
- package/dist/editor/spellcheck/htmlSpellTokenizer.d.ts +45 -0
- package/dist/editor/spellcheck/htmlSpellTokenizer.js +277 -0
- package/dist/editor/spellcheck/htmlSpellTokenizer.js.map +1 -0
- package/dist/editor/spellcheck/replacementGuard.d.ts +27 -0
- package/dist/editor/spellcheck/replacementGuard.js +29 -0
- package/dist/editor/spellcheck/replacementGuard.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckCanvasStore.d.ts +17 -0
- package/dist/editor/spellcheck/spellCheckCanvasStore.js +37 -0
- package/dist/editor/spellcheck/spellCheckCanvasStore.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckCanvasTargets.d.ts +71 -0
- package/dist/editor/spellcheck/spellCheckCanvasTargets.js +126 -0
- package/dist/editor/spellcheck/spellCheckCanvasTargets.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckClient.d.ts +66 -0
- package/dist/editor/spellcheck/spellCheckClient.js +0 -0
- package/dist/editor/spellcheck/spellCheckClient.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckContextMenu.d.ts +52 -0
- package/dist/editor/spellcheck/spellCheckContextMenu.js +120 -0
- package/dist/editor/spellcheck/spellCheckContextMenu.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckReplace.d.ts +8 -0
- package/dist/editor/spellcheck/spellCheckReplace.js +20 -0
- package/dist/editor/spellcheck/spellCheckReplace.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckStyles.d.ts +11 -0
- package/dist/editor/spellcheck/spellCheckStyles.js +12 -0
- package/dist/editor/spellcheck/spellCheckStyles.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckTypes.d.ts +94 -0
- package/dist/editor/spellcheck/spellCheckTypes.js +2 -0
- package/dist/editor/spellcheck/spellCheckTypes.js.map +1 -0
- package/dist/editor/spellcheck/textMarkHitTest.d.ts +14 -0
- package/dist/editor/spellcheck/textMarkHitTest.js +39 -0
- package/dist/editor/spellcheck/textMarkHitTest.js.map +1 -0
- package/dist/editor/spellcheck/useSpellCheck.d.ts +16 -0
- package/dist/editor/spellcheck/useSpellCheck.js +57 -0
- package/dist/editor/spellcheck/useSpellCheck.js.map +1 -0
- package/dist/editor/ui/DynamicRenderingsPublishWarning.d.ts +14 -0
- package/dist/editor/ui/DynamicRenderingsPublishWarning.js +40 -0
- package/dist/editor/ui/DynamicRenderingsPublishWarning.js.map +1 -0
- package/dist/editor/ui/ItemNameDialogNew.js +11 -2
- package/dist/editor/ui/ItemNameDialogNew.js.map +1 -1
- package/dist/editor/ui/ItemSearch.d.ts +2 -0
- package/dist/editor/ui/ItemSearch.js +2 -2
- package/dist/editor/ui/ItemSearch.js.map +1 -1
- package/dist/editor/ui/PublishDialog.d.ts +2 -0
- package/dist/editor/ui/PublishDialog.js +4 -1
- package/dist/editor/ui/PublishDialog.js.map +1 -1
- package/dist/editor/ui/PublishItemDialog.js +3 -2
- package/dist/editor/ui/PublishItemDialog.js.map +1 -1
- package/dist/editor/ui/PublishReadinessSummary.js +1 -1
- package/dist/editor/ui/PublishReadinessSummary.js.map +1 -1
- package/dist/editor/ui/PublishRestrictionsDialog.d.ts +33 -0
- package/dist/editor/ui/PublishRestrictionsDialog.js +208 -38
- package/dist/editor/ui/PublishRestrictionsDialog.js.map +1 -1
- package/dist/editor/ui/RootItemPicker.d.ts +18 -0
- package/dist/editor/ui/RootItemPicker.js +112 -0
- package/dist/editor/ui/RootItemPicker.js.map +1 -0
- package/dist/editor/ui/WorkboxItemsTable.js +1 -1
- package/dist/editor/ui/WorkboxItemsTable.js.map +1 -1
- package/dist/editor/utils/dataTransferImages.d.ts +7 -0
- package/dist/editor/utils/dataTransferImages.js +43 -0
- package/dist/editor/utils/dataTransferImages.js.map +1 -0
- package/dist/editor/utils/itemConverters.js +9 -0
- package/dist/editor/utils/itemConverters.js.map +1 -1
- package/dist/editor/utils/keyboardNavigation.js +38 -4
- package/dist/editor/utils/keyboardNavigation.js.map +1 -1
- package/dist/editor/utils.d.ts +4 -4
- package/dist/editor/utils.js +9 -8
- package/dist/editor/utils.js.map +1 -1
- package/dist/editor/validation/navigateToValidationIssue.d.ts +2 -2
- package/dist/editor/validation/navigateToValidationIssue.js +1 -1
- package/dist/editor/validation/navigateToValidationIssue.js.map +1 -1
- package/dist/editor/validation/validationRulerIssues.d.ts +17 -0
- package/dist/editor/validation/validationRulerIssues.js +44 -0
- package/dist/editor/validation/validationRulerIssues.js.map +1 -0
- package/dist/editor/views/CompareView.js +3 -4
- package/dist/editor/views/CompareView.js.map +1 -1
- package/dist/editor/views/EditorSlot.js +10 -4
- package/dist/editor/views/EditorSlot.js.map +1 -1
- package/dist/editor/views/ItemEditor.d.ts +3 -1
- package/dist/editor/views/ItemEditor.js +43 -38
- package/dist/editor/views/ItemEditor.js.map +1 -1
- package/dist/editor/views/ItemEditorPane.js +3 -3
- package/dist/editor/views/ItemEditorPane.js.map +1 -1
- package/dist/editor/views/SingleEditView.js +10 -32
- package/dist/editor/views/SingleEditView.js.map +1 -1
- package/dist/editor/views/editorSlotContext.js +62 -90
- package/dist/editor/views/editorSlotContext.js.map +1 -1
- package/dist/index.d.ts +11 -6
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/licensing/FeatureGate.js +1 -1
- package/dist/licensing/FeatureGate.js.map +1 -1
- package/dist/licensing/LicenseContext.js +31 -17
- package/dist/licensing/LicenseContext.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/setup/services/setupWizardService.d.ts +6 -2
- package/dist/setup/services/setupWizardService.js +10 -0
- package/dist/setup/services/setupWizardService.js.map +1 -1
- package/dist/setup/wizard/steps/AddModelDialog.js +1 -0
- package/dist/setup/wizard/steps/AddModelDialog.js.map +1 -1
- package/dist/setup/wizard/steps/ImportModelDialog.js +2 -1
- package/dist/setup/wizard/steps/ImportModelDialog.js.map +1 -1
- package/dist/splash-screen/ModernSplashScreen.js +4 -3
- package/dist/splash-screen/ModernSplashScreen.js.map +1 -1
- package/dist/splash-screen/RecentPages.js +5 -2
- package/dist/splash-screen/RecentPages.js.map +1 -1
- package/dist/task-board/TaskBoardWorkspace.js +49 -12
- package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
- package/dist/task-board/components/GoalsMatrix.js +1 -1
- package/dist/task-board/components/GoalsMatrix.js.map +1 -1
- package/dist/task-board/components/IssuePanel.js +4 -4
- package/dist/task-board/components/IssuePanel.js.map +1 -1
- package/dist/task-board/components/ProjectBudgetBanner.js +1 -1
- package/dist/task-board/components/ProjectBudgetBanner.js.map +1 -1
- package/dist/task-board/components/ProjectGoalsPanel.js +1 -1
- package/dist/task-board/components/ProjectGoalsPanel.js.map +1 -1
- package/dist/task-board/components/TaskDetailPanel.js +18 -8
- package/dist/task-board/components/TaskDetailPanel.js.map +1 -1
- package/dist/task-board/components/WizardCommunicationCards.js +1 -1
- package/dist/task-board/components/WizardCommunicationCards.js.map +1 -1
- package/dist/task-board/services/taskService.d.ts +1 -2
- package/dist/task-board/services/taskService.js +0 -3
- package/dist/task-board/services/taskService.js.map +1 -1
- package/dist/task-board/taskBlockers.d.ts +10 -0
- package/dist/task-board/taskBlockers.js +66 -0
- package/dist/task-board/taskBlockers.js.map +1 -0
- package/dist/task-board/types.d.ts +0 -7
- package/dist/task-board/utils/projectDashboardModel.js +7 -1
- package/dist/task-board/utils/projectDashboardModel.js.map +1 -1
- package/dist/task-board/views/DependencyGraphView.d.ts +22 -0
- package/dist/task-board/views/DependencyGraphView.js +111 -14
- package/dist/task-board/views/DependencyGraphView.js.map +1 -1
- package/dist/task-board/views/KanbanView.js +8 -10
- package/dist/task-board/views/KanbanView.js.map +1 -1
- package/dist/task-board/views/ProjectDashboardView.js +5 -13
- package/dist/task-board/views/ProjectDashboardView.js.map +1 -1
- package/dist/tour/Tour.js +4 -1
- package/dist/tour/Tour.js.map +1 -1
- package/dist/tour/sandbox-tour-copy.d.ts +8 -0
- package/dist/tour/sandbox-tour-copy.js +8 -0
- package/dist/tour/sandbox-tour-copy.js.map +1 -1
- package/dist/tour/sandbox-tour.d.ts +3 -0
- package/dist/tour/sandbox-tour.js +107 -3
- package/dist/tour/sandbox-tour.js.map +1 -1
- package/dist/types.d.ts +85 -1
- package/package.json +6 -2
- package/styles.css +17 -0
- package/dist/editor/page-editor-chrome/bridgeLinkValue.d.ts +0 -10
- package/dist/editor/page-editor-chrome/bridgeLinkValue.js +0 -55
- package/dist/editor/page-editor-chrome/bridgeLinkValue.js.map +0 -1
|
@@ -1,17 +1,30 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore, } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { MiniMap } from "./MiniMap";
|
|
4
|
+
import { FEEDBACK_MARGIN_MIN_WIDTH, FEEDBACK_MARGIN_RAIL_WIDTH, FeedbackMargin, } from "./FeedbackMargin";
|
|
5
|
+
import { getFeedbackMarginRoom, resolveFeedbackMarginSize, shouldShowFeedbackMargin, } from "./feedbackMarginLayout";
|
|
6
|
+
import { useFeedbackMarginCollapsed, useFeedbackMarginPreferredWidth, } from "./feedbackMarginWidth";
|
|
7
|
+
import { handleCanvasPickInteraction, isCanvasPickSelection, markPickedSelection, releasePickedSelection, stopCommentTargetPicking, useCommentTargetPicking, } from "../reviews/commentTargetPicker";
|
|
8
|
+
import { shouldOpenMobileFormOnCanvasTap } from "../mobileBottomPanel";
|
|
9
|
+
import { navigateCanvasFrame } from "./canvasFrameNavigation";
|
|
10
|
+
import { isCanvasLoadSettling, resolveDeferredCanvasRefresh, } from "./canvasLoadSettling";
|
|
11
|
+
import { getCanvasScrollHandoffKey, stashCanvasScrollHandoff, takeCanvasScrollHandoff, } from "./canvasScrollHandoff";
|
|
12
|
+
import { getCanvasScrollRestoreCommand } from "./canvasScrollRestore";
|
|
4
13
|
import { resolveMiniMapVisibility, } from "./minimapVisibility";
|
|
5
14
|
import { useCanvasSelection, useEditContext, useEditContextRef, useFieldsEditContext, useFieldsEditContextRef, } from "../client/editContext";
|
|
6
15
|
import { useSlotContext } from "../views/editorSlotContext";
|
|
16
|
+
import { getScrollIntoViewTextRangeKey, getScrollIntoViewTextRangeQuery, SCROLL_INTO_VIEW_BRIDGE_SOURCE, } from "./scrollIntoViewTextRanges";
|
|
7
17
|
import { useDebouncedCallback, useThrottledCallback } from "use-debounce";
|
|
8
18
|
import { PageEditorChrome } from "../page-editor-chrome/PageEditorChrome";
|
|
19
|
+
import { BridgePasteCleanupOverlay } from "../page-editor-chrome/BridgePasteCleanupOverlay";
|
|
9
20
|
import { useBridgeInlineEditing, } from "../page-editor-chrome/useBridgeInlineEditing";
|
|
10
21
|
import { createBridgeInlineEditSessionCoordinator, } from "./bridgeInlineEditSession";
|
|
11
22
|
import { getInlineAiAnchorFromBridgeToolbar, getVisibleBridgeToolbarRect, waitForVisibleBridgeToolbarRect, } from "../page-editor-chrome/bridgeInlineFormatToolbarLayout";
|
|
12
23
|
import { IFRAME_OVERLAY_BRIDGE_DRAG_GESTURE_EVENT, IFRAME_OVERLAY_BRIDGE_GEOMETRY_EVENT, IFRAME_OVERLAY_BRIDGE_SCROLL_EVENT, IframeOverlayProvider, } from "../page-editor-chrome/overlay/IframeOverlayProvider";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
24
|
+
import { createOverviewRulerStore, OverviewRulerContext, } from "./overviewRuler";
|
|
25
|
+
import { CanvasOverviewRuler } from "./CanvasOverviewRuler";
|
|
26
|
+
import { getBridgeGeometryDocumentSize, getBridgeGeometryScrollScale, getBridgeOverlayGeometryDetail, projectBridgeGeometryToScroll, } from "../page-editor-chrome/overlay/geometry";
|
|
27
|
+
import { CANVAS_REFRESH_COMPLETED_EVENT, usePageViewState, } from "./pageViewContext";
|
|
15
28
|
import uuid from "react-uuid";
|
|
16
29
|
import { cn } from "../../lib/utils";
|
|
17
30
|
import { normalizeMarkerId } from "../utils";
|
|
@@ -25,7 +38,12 @@ import { FieldActionsOverlay, } from "../FieldActionsOverlay";
|
|
|
25
38
|
import { alignLoopbackHostToEditor, alignXmCloudManagedEditingHostToEditor, applyParheliaRenderContext, crossesPreviewRenderBoundary, getEditorQueryParam, } from "./renderUrl";
|
|
26
39
|
import { NoLayout } from "../page-editor-chrome/NoLayout";
|
|
27
40
|
import { Spinner } from "../ui/Spinner";
|
|
41
|
+
import { buildCanvasSpellCheckMenuItems } from "../spellcheck/canvasSpellCheckContextMenu";
|
|
28
42
|
import { DeviceToolbar } from "./DeviceToolbar";
|
|
43
|
+
import { DynamicRenderingsStrip } from "./DynamicRenderingsStrip";
|
|
44
|
+
import { readCanvasRenderings } from "./interactivePreview";
|
|
45
|
+
import { recordPageRenderingIds } from "./renderingApproval";
|
|
46
|
+
import { useInteractivePreview } from "./useInteractivePreview";
|
|
29
47
|
import { isPreviewEditAttemptInteraction, showPreviewEditAttemptToast, } from "./previewEditAttempt";
|
|
30
48
|
import { FullscreenControls } from "../client/ui/FullscreenControls";
|
|
31
49
|
import { PageSelector } from "../menubar/PageSelector";
|
|
@@ -51,14 +69,13 @@ import { downloadLink } from "../bridge/linkDownload";
|
|
|
51
69
|
const ZOOM_MIN = 0.25;
|
|
52
70
|
const ZOOM_MAX = 2;
|
|
53
71
|
const ZOOM_STEP = 0.25;
|
|
54
|
-
const ZOOM_TRANSITION_MS = 300;
|
|
72
|
+
export const ZOOM_TRANSITION_MS = 300;
|
|
55
73
|
// useSyncExternalStore fallbacks for frames rendered without a slot context.
|
|
56
74
|
const subscribeToNothing = () => () => { };
|
|
57
75
|
const getUndefined = () => undefined;
|
|
58
76
|
const BRIDGE_INLINE_EDIT_RELEASE_EVENT = "parhelia:bridge-inline-edit-release";
|
|
59
77
|
const INLINE_AI_CLOSE_EVENT = "inline-ai-close";
|
|
60
78
|
const BRIDGE_INLINE_LINK_OPEN_EVENT = "bridge-inline-link-open";
|
|
61
|
-
const SCROLL_INTO_VIEW_BRIDGE_SOURCE = "scroll-into-view";
|
|
62
79
|
// How long a requested canvas refresh may suppress viewport reactions
|
|
63
80
|
// (selection auto-scroll, scrollIntoView) before it is presumed lost.
|
|
64
81
|
const CANVAS_REFRESH_IN_FLIGHT_MAX_MS = 15000;
|
|
@@ -119,37 +136,10 @@ function dispatchBridgeOverlayScroll(iframe, scroll, scrollScale = 1) {
|
|
|
119
136
|
},
|
|
120
137
|
}));
|
|
121
138
|
}
|
|
122
|
-
function getBridgeGeometryScrollScale(geometry) {
|
|
123
|
-
return typeof geometry?.scrollScale === "number" &&
|
|
124
|
-
Number.isFinite(geometry.scrollScale) &&
|
|
125
|
-
geometry.scrollScale > 0
|
|
126
|
-
? geometry.scrollScale
|
|
127
|
-
: 1;
|
|
128
|
-
}
|
|
129
139
|
function dispatchBridgeOverlayGeometry(iframe, geometry, scrollOverride) {
|
|
130
|
-
const
|
|
131
|
-
const scrollScale = getBridgeGeometryScrollScale(geometry);
|
|
132
|
-
const scroll = scrollOverride ?? geometry?.scroll;
|
|
133
|
-
const detail = {
|
|
134
|
-
scrollLeft: (scroll?.x ?? 0) * scrollScale,
|
|
135
|
-
scrollTop: (scroll?.y ?? 0) * scrollScale,
|
|
136
|
-
viewportWidth: geometry?.viewport.width,
|
|
137
|
-
viewportHeight: geometry?.viewport.height,
|
|
138
|
-
scrollWidth: documentSize?.width,
|
|
139
|
-
scrollHeight: documentSize?.height,
|
|
140
|
-
};
|
|
140
|
+
const detail = getBridgeOverlayGeometryDetail(geometry, scrollOverride);
|
|
141
141
|
iframe?.dispatchEvent(new CustomEvent(IFRAME_OVERLAY_BRIDGE_GEOMETRY_EVENT, { detail }));
|
|
142
142
|
}
|
|
143
|
-
function getBridgeGeometryDocumentSize(geometry) {
|
|
144
|
-
if (!geometry)
|
|
145
|
-
return undefined;
|
|
146
|
-
const rectScale = geometry.rectScale ?? 1;
|
|
147
|
-
const scrollScale = getBridgeGeometryScrollScale(geometry);
|
|
148
|
-
return {
|
|
149
|
-
width: Math.max(geometry.viewport.width, ...geometry.targets.map((target) => target.rect.right * rectScale + geometry.scroll.x * scrollScale)),
|
|
150
|
-
height: Math.max(geometry.viewport.height, ...geometry.targets.map((target) => target.rect.bottom * rectScale + geometry.scroll.y * scrollScale)),
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
143
|
function bridgeKeysMatch(left, right) {
|
|
154
144
|
const normalizedLeft = normalizeMarkerId(left);
|
|
155
145
|
const normalizedRight = normalizeMarkerId(right);
|
|
@@ -266,7 +256,9 @@ function findScrollIntoViewDocumentBounds(geometry, target, options = {}) {
|
|
|
266
256
|
? findBridgeComponentDocumentBounds(geometry, target.fallbackComponentId)
|
|
267
257
|
: undefined));
|
|
268
258
|
}
|
|
269
|
-
|
|
259
|
+
// The scroll measures the target under its own keys (see
|
|
260
|
+
// `getScrollIntoViewTextRangeKey`), never an overlay's.
|
|
261
|
+
const textRangeBounds = findBridgeTextRangeDocumentBounds(geometry, getScrollIntoViewTextRangeKey(target.key));
|
|
270
262
|
if (textRangeBounds || !options.includeTextRangeFallback) {
|
|
271
263
|
return textRangeBounds;
|
|
272
264
|
}
|
|
@@ -310,8 +302,8 @@ function getScrollIntoViewSignature(target) {
|
|
|
310
302
|
].join("|");
|
|
311
303
|
}
|
|
312
304
|
function requestScrollTargetGeometry(pageViewContext, target) {
|
|
313
|
-
const textRanges = target
|
|
314
|
-
if (!textRanges
|
|
305
|
+
const textRanges = getScrollIntoViewTextRangeQuery(target);
|
|
306
|
+
if (!textRanges.length)
|
|
315
307
|
return false;
|
|
316
308
|
return (pageViewContext.requestBridgeGeometry?.({
|
|
317
309
|
source: SCROLL_INTO_VIEW_BRIDGE_SOURCE,
|
|
@@ -329,7 +321,7 @@ function getFocusedFieldScrollKey(field) {
|
|
|
329
321
|
].join("|");
|
|
330
322
|
}
|
|
331
323
|
function scrollBridgeBoundsIntoView(pageViewContext, bounds, currentScroll) {
|
|
332
|
-
const geometry = pageViewContext.bridgeGeometry;
|
|
324
|
+
const geometry = pageViewContext.getState().bridgeGeometry;
|
|
333
325
|
if (!geometry)
|
|
334
326
|
return false;
|
|
335
327
|
const scrollScale = getBridgeGeometryScrollScale(geometry);
|
|
@@ -392,6 +384,10 @@ function restoreIframeWindowScroll(iframe, targetScroll, options = {}) {
|
|
|
392
384
|
}
|
|
393
385
|
};
|
|
394
386
|
const apply = () => {
|
|
387
|
+
if (options.isCurrent?.() === false) {
|
|
388
|
+
completed = true;
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
395
391
|
try {
|
|
396
392
|
attempts += 1;
|
|
397
393
|
win.scrollTo(targetScroll.x, targetScroll.y);
|
|
@@ -584,12 +580,27 @@ function getBridgeSelectionMetadataString(selection, key) {
|
|
|
584
580
|
}
|
|
585
581
|
export function PageViewerFrame(props) {
|
|
586
582
|
const editContext = useEditContext();
|
|
587
|
-
useViewportChangeSignal();
|
|
588
583
|
if (!editContext || !props.pageViewContext)
|
|
589
584
|
return null;
|
|
590
585
|
return (_jsx(PageViewerFrameContent, { ...props, editContext: editContext, pageViewContext: props.pageViewContext }));
|
|
591
586
|
}
|
|
592
587
|
function PageViewerFrameContent({ compareView, pageViewContext, editContext, className, slotCloseButton, }) {
|
|
588
|
+
// The page view state this frame renders from. Handlers and effects that run
|
|
589
|
+
// later read the current state (`getState()`) instead.
|
|
590
|
+
// Which page to load and from where: the canvas load effect depends on these
|
|
591
|
+
// values and runs whenever one changes.
|
|
592
|
+
const pageItemDescriptor = usePageViewState(pageViewContext, (state) => state.pageItemDescriptor);
|
|
593
|
+
const editUrl = usePageViewState(pageViewContext, (state) => state.editUrl);
|
|
594
|
+
const previewUrl = usePageViewState(pageViewContext, (state) => state.previewUrl);
|
|
595
|
+
const siteName = usePageViewState(pageViewContext, (state) => state.site?.name);
|
|
596
|
+
const page = usePageViewState(pageViewContext, (state) => state.page);
|
|
597
|
+
const zoom = usePageViewState(pageViewContext, (state) => state.zoom);
|
|
598
|
+
const device = usePageViewState(pageViewContext, (state) => state.device);
|
|
599
|
+
const deviceWidth = usePageViewState(pageViewContext, (state) => state.deviceWidth);
|
|
600
|
+
const deviceHeight = usePageViewState(pageViewContext, (state) => state.deviceHeight);
|
|
601
|
+
const fullscreen = usePageViewState(pageViewContext, (state) => state.fullscreen);
|
|
602
|
+
const bridgeReady = usePageViewState(pageViewContext, (state) => state.bridgeReady);
|
|
603
|
+
const bridgeStructure = usePageViewState(pageViewContext, (state) => state.bridgeStructure);
|
|
593
604
|
const fieldsContext = useFieldsEditContext();
|
|
594
605
|
const slotContext = useSlotContext();
|
|
595
606
|
const canvasSelection = useCanvasSelection();
|
|
@@ -598,13 +609,6 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
598
609
|
useEffect(() => {
|
|
599
610
|
pageViewContextRef.current = pageViewContext;
|
|
600
611
|
}, [pageViewContext]);
|
|
601
|
-
const latestBridgeSelectionRef = useRef(pageViewContext.bridgeSelection);
|
|
602
|
-
// Bridge events are ordered, but the context setter commits asynchronously.
|
|
603
|
-
// A layout synchronization cannot run later and clobber a newer event-time
|
|
604
|
-
// ref the way a pending passive effect could.
|
|
605
|
-
useLayoutEffect(() => {
|
|
606
|
-
latestBridgeSelectionRef.current = pageViewContext.bridgeSelection;
|
|
607
|
-
}, [pageViewContext.bridgeSelection]);
|
|
608
612
|
const editContextRef = useEditContextRef();
|
|
609
613
|
const fieldsContextRef = useFieldsEditContextRef();
|
|
610
614
|
const iframeRef = useRef(null);
|
|
@@ -633,6 +637,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
633
637
|
};
|
|
634
638
|
}, []);
|
|
635
639
|
const [isBridgeInlineEditing, setIsBridgeInlineEditing] = useState(false);
|
|
640
|
+
const pickingCommentTarget = useCommentTargetPicking();
|
|
636
641
|
const bridgeInlineEditSessionRef = useRef(null);
|
|
637
642
|
if (!bridgeInlineEditSessionRef.current) {
|
|
638
643
|
bridgeInlineEditSessionRef.current =
|
|
@@ -657,7 +662,15 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
657
662
|
const directOverlayScrollSyncRef = useRef(false);
|
|
658
663
|
const lastBridgeHoverInteractionRef = useRef(undefined);
|
|
659
664
|
const [bridgeInteraction, setBridgeInteraction] = useState(undefined);
|
|
665
|
+
const [pasteCleanupMenu, setPasteCleanupMenu] = useState();
|
|
666
|
+
const sendPasteCleanupCommand = useCallback((payload) => {
|
|
667
|
+
bridgeClientRef.current?.sendCommand("pasteCleanup", payload);
|
|
668
|
+
}, []);
|
|
660
669
|
const pendingRefreshScrollRef = useRef(undefined);
|
|
670
|
+
// Selected component handed over by a frame that unmounted for a layout
|
|
671
|
+
// switch; once geometry arrives it is put back at its previous distance
|
|
672
|
+
// from the canvas top (see canvasScrollHandoff).
|
|
673
|
+
const pendingScrollAnchorRef = useRef(undefined);
|
|
661
674
|
// #fragment carried by a canvas link navigation (preview click / alt+click).
|
|
662
675
|
// Applied to the next iframe src load so the browser lands the canvas on the
|
|
663
676
|
// linked section instead of the page top.
|
|
@@ -721,11 +734,18 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
721
734
|
// bridge is delivering that newer target. Restoring the stale capture
|
|
722
735
|
// would fight it (restoreIframeWindowScroll re-asserts for ~150
|
|
723
736
|
// frames and cancels in-flight smooth scrolls).
|
|
737
|
+
logFieldValueDiagnostic("canvas-load", `scroll restore ctx=${pageViewContextRef.current?.debugId} dropped y=${targetScroll.y}: newer scroll command`);
|
|
724
738
|
clearPendingTarget();
|
|
725
739
|
return;
|
|
726
740
|
}
|
|
727
|
-
const
|
|
728
|
-
|
|
741
|
+
const iframeScroll = getIframeWindowScroll(iframe);
|
|
742
|
+
if (!iframeScroll && !bridgeClientRef.current?.isReady()) {
|
|
743
|
+
// A cross-origin host can only be scrolled through the bridge, and the
|
|
744
|
+
// iframe load event fires before its handshake. Keep the target for
|
|
745
|
+
// the bridge's ready event instead of dropping it here.
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
const currentScroll = iframeScroll ?? observedScroll ?? { x: 0, y: 0 };
|
|
729
749
|
const deltaX = targetScroll.x - currentScroll.x;
|
|
730
750
|
const deltaY = targetScroll.y - currentScroll.y;
|
|
731
751
|
// Already at the target: re-asserting the position would be a no-op
|
|
@@ -735,19 +755,33 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
735
755
|
clearPendingTarget();
|
|
736
756
|
return;
|
|
737
757
|
}
|
|
758
|
+
logFieldValueDiagnostic("canvas-load", `scroll restore ctx=${pageViewContextRef.current?.debugId} y=${currentScroll.y}->${targetScroll.y} from=${iframeScroll ? "window" : "bridge"}`);
|
|
738
759
|
const restoreStarted = restoreIframeWindowScroll(iframe, targetScroll, {
|
|
739
760
|
maxAttempts: 150,
|
|
740
761
|
onSettled: clearPendingTarget,
|
|
741
762
|
onExpired: clearPendingTarget,
|
|
763
|
+
// A newer target (or a cleared one) owns the viewport now; re-asserting
|
|
764
|
+
// this one for the rest of the ~150 frames would fight it.
|
|
765
|
+
isCurrent: () => pendingRefreshScrollRef.current === targetScroll,
|
|
742
766
|
});
|
|
743
767
|
if (!restoreStarted) {
|
|
744
768
|
clearPendingTarget();
|
|
745
769
|
}
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
770
|
+
// The window restore above, or an earlier call for the same target, may
|
|
771
|
+
// land first: only an absolute command is safe (see canvasScrollRestore).
|
|
772
|
+
const bridge = bridgeClientRef.current;
|
|
773
|
+
const restoreCommand = getCanvasScrollRestoreCommand({
|
|
774
|
+
target: targetScroll,
|
|
775
|
+
current: currentScroll,
|
|
776
|
+
supportsScrollTo: !!bridge?.supportsCapability("scrollTo"),
|
|
777
|
+
windowReadable: !!iframeScroll,
|
|
750
778
|
});
|
|
779
|
+
if (restoreCommand?.name === "scrollTo") {
|
|
780
|
+
bridge?.sendCommand("scrollTo", restoreCommand.payload);
|
|
781
|
+
}
|
|
782
|
+
else if (restoreCommand?.name === "scrollBy") {
|
|
783
|
+
bridge?.sendCommand("scrollBy", restoreCommand.payload);
|
|
784
|
+
}
|
|
751
785
|
}, []);
|
|
752
786
|
const suppressNextSelectionScrollRef = useRef(false);
|
|
753
787
|
// Timestamp (ms) until which selection auto-scroll is suppressed. Held open for
|
|
@@ -769,7 +803,19 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
769
803
|
requestedTextRangeGeometry: false,
|
|
770
804
|
});
|
|
771
805
|
const [showSpinner, setShowSpinner] = useState(false);
|
|
806
|
+
// Collects the canvas highlightings' marks for the overview ruler.
|
|
807
|
+
const [overviewRulerStore] = useState(createOverviewRulerStore);
|
|
772
808
|
const [iframeSrc, setIframeSrc] = useState();
|
|
809
|
+
// Mirrors iframeSrc for the render effect, which must read the last
|
|
810
|
+
// requested canvas URL without re-running on it. The iframe's `src`
|
|
811
|
+
// attribute no longer tracks it: later loads go through location.replace()
|
|
812
|
+
// (see navigateCanvasFrame), so the attribute keeps the first URL.
|
|
813
|
+
const requestedIframeSrcRef = useRef(undefined);
|
|
814
|
+
// The full iframe load that has been requested but whose bridge has not
|
|
815
|
+
// connected yet. The render effect consults it so a pre-bridge re-run for the
|
|
816
|
+
// same URL waits for this load instead of issuing a second one (see
|
|
817
|
+
// canvasLoadSettling.ts). Cleared once the bridge reports ready.
|
|
818
|
+
const inFlightCanvasLoadRef = useRef(null);
|
|
773
819
|
const [loadedIframeSrc, setLoadedIframeSrc] = useState();
|
|
774
820
|
const [scroll, setScroll] = useState(0);
|
|
775
821
|
const [showMiniMap, setShowMiniMap] = useState(false);
|
|
@@ -788,6 +834,13 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
788
834
|
iframeRef.current = node;
|
|
789
835
|
setIframeElement(node);
|
|
790
836
|
}, []);
|
|
837
|
+
// Apply the requested canvas URL to the frame. Runs again for a remounted
|
|
838
|
+
// iframe element so a fresh frame picks up the current URL.
|
|
839
|
+
useEffect(() => {
|
|
840
|
+
if (!iframeElement || !iframeSrc)
|
|
841
|
+
return;
|
|
842
|
+
navigateCanvasFrame(iframeElement, iframeSrc);
|
|
843
|
+
}, [iframeElement, iframeSrc]);
|
|
791
844
|
// Clear preSelectedAction when overlay is closed
|
|
792
845
|
useEffect(() => {
|
|
793
846
|
if (editContext?.currentOverlay !==
|
|
@@ -795,8 +848,47 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
795
848
|
setPreSelectedAction(undefined);
|
|
796
849
|
}
|
|
797
850
|
}, [editContext?.currentOverlay, contextMenuField?.fieldId]);
|
|
798
|
-
const zoom = pageViewContext.zoom;
|
|
799
851
|
const [currentItemDescriptor, setCurrentItemDescriptor] = useState(undefined);
|
|
852
|
+
// The iframe, and with it the scroll position, goes away with this frame.
|
|
853
|
+
// A layout switch (fullscreen on/off) mounts a new frame for the same page
|
|
854
|
+
// right away; hand it the scroll so the page does not jump back to the top.
|
|
855
|
+
const loadedItemDescriptorRef = useRef(undefined);
|
|
856
|
+
useLayoutEffect(() => {
|
|
857
|
+
loadedItemDescriptorRef.current = currentItemDescriptor;
|
|
858
|
+
}, [currentItemDescriptor]);
|
|
859
|
+
useLayoutEffect(() => () => {
|
|
860
|
+
const loadedItemDescriptor = loadedItemDescriptorRef.current;
|
|
861
|
+
const unmountingContextId = pageViewContextRef.current?.debugId;
|
|
862
|
+
if (!loadedItemDescriptor) {
|
|
863
|
+
logFieldValueDiagnostic("canvas-load", `frame unmount ctx=${unmountingContextId} no handoff: no page loaded`);
|
|
864
|
+
return;
|
|
865
|
+
}
|
|
866
|
+
// Layout cleanups run before React detaches the iframe, so the live
|
|
867
|
+
// window scroll is still readable for same-origin hosts.
|
|
868
|
+
const windowScroll = getIframeWindowScroll(iframeRef.current);
|
|
869
|
+
const scroll = windowScroll ?? latestBridgeScrollRef.current;
|
|
870
|
+
if (!scroll) {
|
|
871
|
+
logFieldValueDiagnostic("canvas-load", `frame unmount ctx=${unmountingContextId} no handoff: no scroll known`);
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
874
|
+
let anchor;
|
|
875
|
+
const geometry = pageViewContextRef.current?.getState().bridgeGeometry;
|
|
876
|
+
const selection = editContextRef.current?.getSelection() ?? [];
|
|
877
|
+
const selectedComponentId = selection[selection.length - 1];
|
|
878
|
+
const bounds = selectedComponentId
|
|
879
|
+
? findBridgeComponentDocumentBounds(geometry, selectedComponentId)
|
|
880
|
+
: undefined;
|
|
881
|
+
if (geometry && selectedComponentId && bounds) {
|
|
882
|
+
const viewportTop = bounds.y - scroll.y * getBridgeGeometryScrollScale(geometry);
|
|
883
|
+
// Only a component the user can see anchors the view.
|
|
884
|
+
if (viewportTop < geometry.viewport.height &&
|
|
885
|
+
viewportTop + bounds.height > 0) {
|
|
886
|
+
anchor = { componentId: selectedComponentId, viewportTop };
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
logFieldValueDiagnostic("canvas-load", `frame unmount ctx=${unmountingContextId} handoff y=${scroll.y} from=${windowScroll ? "window" : "bridge"} anchor=${anchor?.componentId ?? "none"}`);
|
|
890
|
+
stashCanvasScrollHandoff(getCanvasScrollHandoffKey(loadedItemDescriptor), { scroll, anchor });
|
|
891
|
+
}, []);
|
|
800
892
|
// Field action handlers for the overlay
|
|
801
893
|
const handleActionClick = async (action, event) => {
|
|
802
894
|
if (contextMenuField) {
|
|
@@ -810,7 +902,6 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
810
902
|
};
|
|
811
903
|
// Note: handleParameterizedActionFromContextMenu is now created inline in handleContextMenu
|
|
812
904
|
// to avoid React state timing issues with contextMenuPosition
|
|
813
|
-
const pageItemDescriptor = pageViewContext.pageItemDescriptor;
|
|
814
905
|
const shouldTrackMinimapScroll = useCallback(() => {
|
|
815
906
|
const editor = editContextRef.current;
|
|
816
907
|
return !!(showMiniMap &&
|
|
@@ -822,9 +913,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
822
913
|
if (!shouldTrackMinimapScroll())
|
|
823
914
|
return;
|
|
824
915
|
setScroll(e);
|
|
825
|
-
|
|
826
|
-
pageViewContextRef.current?.setScroll(e);
|
|
827
|
-
}, [compareView, shouldTrackMinimapScroll]);
|
|
916
|
+
}, [shouldTrackMinimapScroll]);
|
|
828
917
|
const scrollHandler = useThrottledCallback(updateScrollPosition, 100);
|
|
829
918
|
const scrollHandlerRef = useRef(scrollHandler);
|
|
830
919
|
useEffect(() => {
|
|
@@ -840,14 +929,13 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
840
929
|
}, []);
|
|
841
930
|
const projectCurrentBridgeGeometryToScroll = useCallback((scroll) => {
|
|
842
931
|
const activeContext = pageViewContextRef.current;
|
|
843
|
-
const currentGeometry = activeContext?.bridgeGeometry;
|
|
932
|
+
const currentGeometry = activeContext?.getState().bridgeGeometry;
|
|
844
933
|
const projectedGeometry = projectBridgeGeometryToScroll(currentGeometry, scroll);
|
|
845
934
|
if (!activeContext ||
|
|
846
935
|
!projectedGeometry ||
|
|
847
936
|
projectedGeometry === currentGeometry) {
|
|
848
937
|
return;
|
|
849
938
|
}
|
|
850
|
-
activeContext.bridgeGeometry = projectedGeometry;
|
|
851
939
|
activeContext.setBridgeGeometry(projectedGeometry);
|
|
852
940
|
scheduleBridgeGeometryRevision();
|
|
853
941
|
}, [scheduleBridgeGeometryRevision]);
|
|
@@ -959,11 +1047,13 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
959
1047
|
});
|
|
960
1048
|
if (!previewScope.onlySuggestionId)
|
|
961
1049
|
return;
|
|
962
|
-
const structureField = pageViewContextRef.current
|
|
1050
|
+
const structureField = pageViewContextRef.current
|
|
1051
|
+
?.getState()
|
|
1052
|
+
.bridgeStructure?.fields.find((candidate) => candidate.elementKey === elementKey);
|
|
963
1053
|
if (!structureField)
|
|
964
1054
|
return;
|
|
965
|
-
const fallbackItem = pageViewContextRef.current?.pageItemDescriptor ??
|
|
966
|
-
pageViewContextRef.current?.page?.item?.descriptor;
|
|
1055
|
+
const fallbackItem = pageViewContextRef.current?.getState().pageItemDescriptor ??
|
|
1056
|
+
pageViewContextRef.current?.getState().page?.item?.descriptor;
|
|
967
1057
|
const bridgeItem = structureField.item;
|
|
968
1058
|
const itemDescriptor = {
|
|
969
1059
|
id: bridgeItem?.id ?? fallbackItem?.id,
|
|
@@ -986,9 +1076,9 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
986
1076
|
itemId: itemDescriptor.id,
|
|
987
1077
|
language: itemDescriptor.language,
|
|
988
1078
|
version: itemDescriptor.version,
|
|
989
|
-
pageItemId: pageViewContextRef.current?.pageItemDescriptor?.id,
|
|
990
|
-
pageItemLanguage: pageViewContextRef.current?.pageItemDescriptor?.language,
|
|
991
|
-
pageItemVersion: pageViewContextRef.current?.pageItemDescriptor?.version,
|
|
1079
|
+
pageItemId: pageViewContextRef.current?.getState().pageItemDescriptor?.id,
|
|
1080
|
+
pageItemLanguage: pageViewContextRef.current?.getState().pageItemDescriptor?.language,
|
|
1081
|
+
pageItemVersion: pageViewContextRef.current?.getState().pageItemDescriptor?.version,
|
|
992
1082
|
};
|
|
993
1083
|
if (!previewScopeCoversField(previewScope, editor.suggestedEdits, suggestionField)) {
|
|
994
1084
|
return;
|
|
@@ -1188,16 +1278,17 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1188
1278
|
repositoryValue,
|
|
1189
1279
|
modifiedFields: preferRepositoryValue
|
|
1190
1280
|
? undefined
|
|
1191
|
-
:
|
|
1281
|
+
: (slotContext?.fieldModificationStore.getAllFields() ??
|
|
1282
|
+
fieldsContext?.modifiedFields),
|
|
1192
1283
|
suggestedEdits: editContext.suggestedEdits,
|
|
1193
1284
|
field: {
|
|
1194
1285
|
fieldId: field.id || structureField.fieldId,
|
|
1195
1286
|
itemId: itemDescriptor.id,
|
|
1196
1287
|
language: itemDescriptor.language,
|
|
1197
1288
|
version: itemDescriptor.version,
|
|
1198
|
-
pageItemId:
|
|
1199
|
-
pageItemLanguage:
|
|
1200
|
-
pageItemVersion:
|
|
1289
|
+
pageItemId: pageItemDescriptor?.id,
|
|
1290
|
+
pageItemLanguage: pageItemDescriptor?.language,
|
|
1291
|
+
pageItemVersion: pageItemDescriptor?.version,
|
|
1201
1292
|
},
|
|
1202
1293
|
mode: previewScope.mode,
|
|
1203
1294
|
onlySuggestionId: previewScope.onlySuggestionId,
|
|
@@ -1217,7 +1308,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1217
1308
|
editContext.suggestedEdits,
|
|
1218
1309
|
editContext.suggestionVariantSelection,
|
|
1219
1310
|
fieldsContext?.modifiedFields,
|
|
1220
|
-
|
|
1311
|
+
slotContext?.fieldModificationStore,
|
|
1312
|
+
pageItemDescriptor,
|
|
1221
1313
|
]);
|
|
1222
1314
|
const buildBridgeFieldPatch = useCallback(({ field, structureField, itemDescriptor, preferRepositoryValue, replaceActiveInlineEdit, }) => {
|
|
1223
1315
|
const display = getBridgePatchDisplayValue({
|
|
@@ -1292,8 +1384,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1292
1384
|
return;
|
|
1293
1385
|
}
|
|
1294
1386
|
const sourceItem = activeField.item ??
|
|
1295
|
-
pageViewContextRef.current?.page?.item ??
|
|
1296
|
-
pageViewContextRef.current?.pageItemDescriptor;
|
|
1387
|
+
pageViewContextRef.current?.getState().page?.item ??
|
|
1388
|
+
pageViewContextRef.current?.getState().pageItemDescriptor;
|
|
1297
1389
|
const version = typeof sourceItem?.version === "number" &&
|
|
1298
1390
|
Number.isFinite(sourceItem.version)
|
|
1299
1391
|
? sourceItem.version
|
|
@@ -1325,30 +1417,34 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1325
1417
|
});
|
|
1326
1418
|
lastSentBridgeCaretRef.current = nextKey;
|
|
1327
1419
|
}, [clearBridgeRemoteCaretPosition, editContextRef, pageViewContextRef]);
|
|
1420
|
+
// Subscribed, not rendered: carets move on every keystroke of every session.
|
|
1421
|
+
const remoteCaretsStore = editContext.remoteCaretsStore;
|
|
1328
1422
|
useEffect(() => {
|
|
1329
|
-
|
|
1330
|
-
const structureFields = pageViewContext.bridgeStructure?.fields ?? [];
|
|
1331
|
-
if (!bridge || structureFields.length === 0)
|
|
1423
|
+
if (!remoteCaretsStore)
|
|
1332
1424
|
return;
|
|
1333
|
-
const
|
|
1334
|
-
|
|
1335
|
-
structureFields
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1425
|
+
const syncRemoteFieldDrafts = () => {
|
|
1426
|
+
const bridge = bridgeClientRef.current;
|
|
1427
|
+
const structureFields = bridgeStructure?.fields ?? [];
|
|
1428
|
+
if (!bridge || structureFields.length === 0)
|
|
1429
|
+
return;
|
|
1430
|
+
const patches = buildRemoteCaretFieldPatches({
|
|
1431
|
+
remoteCarets: remoteCaretsStore.get(),
|
|
1432
|
+
structureFields,
|
|
1433
|
+
activeInlineEdit: activeBridgeInlineEditRef.current,
|
|
1434
|
+
});
|
|
1435
|
+
// Keep the host informed about the complete live-draft set. Unlike an
|
|
1436
|
+
// ordinary field patch, this state survives host-app/React renders: the
|
|
1437
|
+
// bridge reapplies these values in its mutation observer before other
|
|
1438
|
+
// observers can see stale server markup.
|
|
1439
|
+
bridge.sendCommand("syncRemoteFieldDrafts", { drafts: patches });
|
|
1440
|
+
for (const patch of patches) {
|
|
1441
|
+
const structureField = structureFields.find((field) => field.elementKey === patch.elementKey);
|
|
1442
|
+
sendBridgeFieldPatch(bridge, patch, structureField?.textContent);
|
|
1443
|
+
}
|
|
1444
|
+
};
|
|
1445
|
+
syncRemoteFieldDrafts();
|
|
1446
|
+
return remoteCaretsStore.subscribe(syncRemoteFieldDrafts);
|
|
1447
|
+
}, [remoteCaretsStore, bridgeStructure, sendBridgeFieldPatch]);
|
|
1352
1448
|
const handleBridgeSelection = useCallback((selection, iframe) => {
|
|
1353
1449
|
const editor = editContextRef.current;
|
|
1354
1450
|
if (!editor)
|
|
@@ -1376,8 +1472,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1376
1472
|
}
|
|
1377
1473
|
clearBridgeRemoteCaretPosition();
|
|
1378
1474
|
const item = selection.activeField.item ??
|
|
1379
|
-
pageViewContextRef.current?.page?.item ??
|
|
1380
|
-
pageViewContextRef.current?.pageItemDescriptor;
|
|
1475
|
+
pageViewContextRef.current?.getState().page?.item ??
|
|
1476
|
+
pageViewContextRef.current?.getState().pageItemDescriptor;
|
|
1381
1477
|
if (!item?.id) {
|
|
1382
1478
|
editor.setSelectedRange(undefined);
|
|
1383
1479
|
return;
|
|
@@ -1418,7 +1514,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1418
1514
|
editor.setSelectedRange(nextRange);
|
|
1419
1515
|
}, [clearBridgeRemoteCaretPosition, sendBridgeRemoteCaretPosition]);
|
|
1420
1516
|
const resolveBridgeFieldDescriptor = useCallback(async (interaction) => {
|
|
1421
|
-
const pageView = pageViewContextRef.current;
|
|
1517
|
+
const pageView = pageViewContextRef.current?.getState();
|
|
1422
1518
|
const selectedRange = editContextRef.current?.selectedRange;
|
|
1423
1519
|
const selectedRangeElementKey = selectedRange?.elementKey;
|
|
1424
1520
|
const selectedRangeMatchesInteraction = !!((interaction.kind === "contextMenu" ||
|
|
@@ -1544,7 +1640,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1544
1640
|
clearBridgeTextCompletion();
|
|
1545
1641
|
return;
|
|
1546
1642
|
}
|
|
1547
|
-
const bridgeSelection =
|
|
1643
|
+
const bridgeSelection = pageViewContextRef.current?.getState().bridgeSelection;
|
|
1548
1644
|
const selectionMatches = bridgeSelectionMatchesInteraction(bridgeSelection, interaction);
|
|
1549
1645
|
const activeField = selectionMatches
|
|
1550
1646
|
? bridgeSelection?.activeField
|
|
@@ -1688,6 +1784,9 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1688
1784
|
sendTextCompletionCommand,
|
|
1689
1785
|
]);
|
|
1690
1786
|
const handleBridgeInteraction = useCallback(async (interaction, iframe) => {
|
|
1787
|
+
if (interaction.kind === "click" && interaction.fieldId) {
|
|
1788
|
+
logFieldValueDiagnostic("bridge-inline", `interaction click field=${interaction.fieldId} element=${interaction.elementKey ?? "none"} component=${interaction.componentId ?? "none"}`);
|
|
1789
|
+
}
|
|
1691
1790
|
if (interaction.kind === "wheel") {
|
|
1692
1791
|
if (!interaction.ctrlKey && !interaction.metaKey)
|
|
1693
1792
|
return;
|
|
@@ -1752,10 +1851,10 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1752
1851
|
const editor = editContextRef.current;
|
|
1753
1852
|
let linkRange = editor?.selectedRange;
|
|
1754
1853
|
if (!isBridgeLinkShortcutRange(linkRange, interaction)) {
|
|
1755
|
-
const bridgeSelection =
|
|
1854
|
+
const bridgeSelection = pageViewContextRef.current?.getState().bridgeSelection;
|
|
1756
1855
|
const item = bridgeSelection?.activeField?.item ??
|
|
1757
|
-
pageViewContextRef.current?.page?.item ??
|
|
1758
|
-
pageViewContextRef.current?.pageItemDescriptor;
|
|
1856
|
+
pageViewContextRef.current?.getState().page?.item ??
|
|
1857
|
+
pageViewContextRef.current?.getState().pageItemDescriptor;
|
|
1759
1858
|
if (bridgeSelection &&
|
|
1760
1859
|
!bridgeSelection.collapsed &&
|
|
1761
1860
|
bridgeSelection.text?.trim() &&
|
|
@@ -1823,16 +1922,16 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1823
1922
|
const editor = editContextRef.current;
|
|
1824
1923
|
const field = await resolveBridgeFieldDescriptor(interaction);
|
|
1825
1924
|
if (editor && field) {
|
|
1826
|
-
await
|
|
1925
|
+
await fieldsContextRef.current?.setFocusedField(field, editor.mode !== "suggestions");
|
|
1827
1926
|
}
|
|
1828
1927
|
const iframeRect = iframe.getBoundingClientRect();
|
|
1829
|
-
const bridgeSelection =
|
|
1928
|
+
const bridgeSelection = pageViewContextRef.current?.getState().bridgeSelection;
|
|
1830
1929
|
const commandRange = resolveBridgeInlineAiSelectionRange({
|
|
1831
1930
|
interaction,
|
|
1832
1931
|
bridgeSelection,
|
|
1833
1932
|
iframeRect,
|
|
1834
|
-
fallbackItem: pageViewContextRef.current?.page?.item ??
|
|
1835
|
-
pageViewContextRef.current?.pageItemDescriptor,
|
|
1933
|
+
fallbackItem: pageViewContextRef.current?.getState().page?.item ??
|
|
1934
|
+
pageViewContextRef.current?.getState().pageItemDescriptor,
|
|
1836
1935
|
});
|
|
1837
1936
|
const fallbackCaretRect = !interaction.selectionRect &&
|
|
1838
1937
|
!interaction.caretRect &&
|
|
@@ -1956,8 +2055,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1956
2055
|
structuredFieldValue,
|
|
1957
2056
|
anchorIndex: interaction.link.anchorIndex,
|
|
1958
2057
|
});
|
|
1959
|
-
const sourceItem = pageViewContextRef.current?.page?.item ??
|
|
1960
|
-
pageViewContextRef.current?.pageItemDescriptor ??
|
|
2058
|
+
const sourceItem = pageViewContextRef.current?.getState().page?.item ??
|
|
2059
|
+
pageViewContextRef.current?.getState().pageItemDescriptor ??
|
|
1961
2060
|
interaction.item;
|
|
1962
2061
|
if (!targetItemId &&
|
|
1963
2062
|
canvasLinkHash &&
|
|
@@ -1968,7 +2067,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
1968
2067
|
if (!targetItemId && sourceItem) {
|
|
1969
2068
|
const linkPath = extractInternalLinkPath(interaction.link.href, window.location.href);
|
|
1970
2069
|
if (linkPath) {
|
|
1971
|
-
const resolvedPage = await resolvePageAndSiteByPath(linkPath, sourceItem.language ?? "en", pageViewContextRef.current?.site?.name);
|
|
2070
|
+
const resolvedPage = await resolvePageAndSiteByPath(linkPath, sourceItem.language ?? "en", pageViewContextRef.current?.getState().site?.name);
|
|
1972
2071
|
targetItemId = resolvedPage?.pageItem.id;
|
|
1973
2072
|
}
|
|
1974
2073
|
}
|
|
@@ -2028,7 +2127,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2028
2127
|
!interaction.fieldId &&
|
|
2029
2128
|
interaction.clientX !== undefined &&
|
|
2030
2129
|
interaction.clientY !== undefined) {
|
|
2031
|
-
const fieldTarget = findBridgeFieldTargetAtPoint(pageViewContextRef.current?.bridgeGeometry, interaction.clientX, interaction.clientY);
|
|
2130
|
+
const fieldTarget = findBridgeFieldTargetAtPoint(pageViewContextRef.current?.getState().bridgeGeometry, interaction.clientX, interaction.clientY);
|
|
2032
2131
|
if (fieldTarget?.fieldId) {
|
|
2033
2132
|
effectiveInteraction = {
|
|
2034
2133
|
...interaction,
|
|
@@ -2037,7 +2136,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2037
2136
|
};
|
|
2038
2137
|
}
|
|
2039
2138
|
}
|
|
2040
|
-
const componentId = resolveBridgeComponentId(effectiveInteraction.componentId, pageViewContextRef.current?.page);
|
|
2139
|
+
const componentId = resolveBridgeComponentId(effectiveInteraction.componentId, pageViewContextRef.current?.getState().page);
|
|
2041
2140
|
const isEditableFieldClick = !!(effectiveInteraction.kind === "click" &&
|
|
2042
2141
|
effectiveInteraction.fieldId &&
|
|
2043
2142
|
effectiveInteraction.elementKey &&
|
|
@@ -2105,7 +2204,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2105
2204
|
const currentSelection = editor.getSelection();
|
|
2106
2205
|
if (interaction.kind === "contextMenu") {
|
|
2107
2206
|
if (pageViewContextRef.current) {
|
|
2108
|
-
pageViewContextRef.current.
|
|
2207
|
+
pageViewContextRef.current.setBridgeInteraction(effectiveInteraction);
|
|
2109
2208
|
}
|
|
2110
2209
|
const selectedIds = currentSelection.includes(componentId)
|
|
2111
2210
|
? currentSelection
|
|
@@ -2113,7 +2212,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2113
2212
|
if (!currentSelection.includes(componentId)) {
|
|
2114
2213
|
selectFromBridgeInteraction(selectedIds);
|
|
2115
2214
|
}
|
|
2116
|
-
const page = pageViewContextRef.current?.page;
|
|
2215
|
+
const page = pageViewContextRef.current?.getState().page;
|
|
2117
2216
|
if (!page)
|
|
2118
2217
|
return;
|
|
2119
2218
|
const selectedComponents = selectedIds
|
|
@@ -2189,6 +2288,23 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2189
2288
|
}, 100);
|
|
2190
2289
|
};
|
|
2191
2290
|
items = await buildComponentContextMenuItems(selectedComponents, editor, field, fieldButtons, handleParameterizedActionWithPosition);
|
|
2291
|
+
// Right-click on an underlined misspelling: suggestions come first.
|
|
2292
|
+
const spellItems = await buildCanvasSpellCheckMenuItems({
|
|
2293
|
+
editor,
|
|
2294
|
+
geometry: pageViewContextRef.current?.getState().bridgeGeometry,
|
|
2295
|
+
clientX: interaction.clientX,
|
|
2296
|
+
clientY: interaction.clientY,
|
|
2297
|
+
enabled: !editor.readonly &&
|
|
2298
|
+
editor.mode === "edit" &&
|
|
2299
|
+
editor.userInfo?.preferences?.spellCheckEnabled !== false,
|
|
2300
|
+
});
|
|
2301
|
+
if (spellItems.length > 0) {
|
|
2302
|
+
items = [
|
|
2303
|
+
...spellItems,
|
|
2304
|
+
{ id: "spellcheck-section-separator", separator: true },
|
|
2305
|
+
...items,
|
|
2306
|
+
];
|
|
2307
|
+
}
|
|
2192
2308
|
}
|
|
2193
2309
|
catch (error) {
|
|
2194
2310
|
console.error("Failed to build component context menu:", error);
|
|
@@ -2212,7 +2328,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2212
2328
|
return;
|
|
2213
2329
|
}
|
|
2214
2330
|
if (interaction.shiftKey && currentSelection.length > 0) {
|
|
2215
|
-
const orderedIds = getOrderedBridgeComponentIds(pageViewContextRef.current?.bridgeGeometry, pageViewContextRef.current?.page);
|
|
2331
|
+
const orderedIds = getOrderedBridgeComponentIds(pageViewContextRef.current?.getState().bridgeGeometry, pageViewContextRef.current?.getState().page);
|
|
2216
2332
|
const anchorId = currentSelection[currentSelection.length - 1];
|
|
2217
2333
|
const anchorIndex = orderedIds.findIndex((id) => bridgeIdsMatch(id, anchorId));
|
|
2218
2334
|
const targetIndex = orderedIds.findIndex((id) => bridgeIdsMatch(id, componentId));
|
|
@@ -2248,6 +2364,18 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2248
2364
|
return;
|
|
2249
2365
|
}
|
|
2250
2366
|
selectFromBridgeInteraction([componentId]);
|
|
2367
|
+
// On a phone the tap also opens the edit form when the component is
|
|
2368
|
+
// already selected: the selection-driven auto-open in the shell only
|
|
2369
|
+
// reacts to changes, and the comments panel may be covering the form.
|
|
2370
|
+
if (interaction.kind === "click" &&
|
|
2371
|
+
shouldOpenMobileFormOnCanvasTap({
|
|
2372
|
+
isMobile: editor.isMobile,
|
|
2373
|
+
workspaceId: editor.workspaceId,
|
|
2374
|
+
mode: editor.mode,
|
|
2375
|
+
hasTarget: true,
|
|
2376
|
+
})) {
|
|
2377
|
+
editor.setMobileEditorPanelOpen(true);
|
|
2378
|
+
}
|
|
2251
2379
|
if (isEditableFieldClick) {
|
|
2252
2380
|
clearSelectedRangeForEditableClick();
|
|
2253
2381
|
beginTrackedBridgeInlineEditAfterSelection(effectiveInteraction);
|
|
@@ -2282,7 +2410,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2282
2410
|
const active = activeBridgePointerDragRef.current;
|
|
2283
2411
|
if (!active || event.pointerId !== active.pointerId)
|
|
2284
2412
|
return;
|
|
2285
|
-
const projected = projectParentPointerToHost(event.clientX, event.clientY, iframe.getBoundingClientRect(), pageViewContextRef.current?.bridgeGeometry?.viewport);
|
|
2413
|
+
const projected = projectParentPointerToHost(event.clientX, event.clientY, iframe.getBoundingClientRect(), pageViewContextRef.current?.getState().bridgeGeometry?.viewport);
|
|
2286
2414
|
if (!projected.inside)
|
|
2287
2415
|
return;
|
|
2288
2416
|
active.clientX = projected.clientX;
|
|
@@ -2301,7 +2429,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2301
2429
|
if (!active)
|
|
2302
2430
|
return;
|
|
2303
2431
|
const rect = iframe.getBoundingClientRect();
|
|
2304
|
-
const payload = resolveParentBridgePointerRelease(active, event, rect, pageViewContextRef.current?.bridgeGeometry?.viewport);
|
|
2432
|
+
const payload = resolveParentBridgePointerRelease(active, event, rect, pageViewContextRef.current?.getState().bridgeGeometry?.viewport);
|
|
2305
2433
|
if (!payload)
|
|
2306
2434
|
return;
|
|
2307
2435
|
// Clear before dispatching and before asking the host to clean up. Any
|
|
@@ -2358,7 +2486,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2358
2486
|
lastY = scroll.y;
|
|
2359
2487
|
latestBridgeScrollRef.current = scroll;
|
|
2360
2488
|
projectCurrentBridgeGeometryToScroll(scroll);
|
|
2361
|
-
dispatchBridgeOverlayScroll(iframe, scroll, getBridgeGeometryScrollScale(pageViewContextRef.current?.bridgeGeometry));
|
|
2489
|
+
dispatchBridgeOverlayScroll(iframe, scroll, getBridgeGeometryScrollScale(pageViewContextRef.current?.getState().bridgeGeometry));
|
|
2362
2490
|
};
|
|
2363
2491
|
iframeDocument.addEventListener("scroll", handleScroll, {
|
|
2364
2492
|
capture: true,
|
|
@@ -2391,8 +2519,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2391
2519
|
return;
|
|
2392
2520
|
}
|
|
2393
2521
|
const allowedHostOrigins = [
|
|
2394
|
-
getUrlOrigin(
|
|
2395
|
-
getUrlOrigin(
|
|
2522
|
+
getUrlOrigin(editUrl),
|
|
2523
|
+
getUrlOrigin(previewUrl),
|
|
2396
2524
|
].filter((origin) => Boolean(origin));
|
|
2397
2525
|
// The iframe can finish loading before the page-view URLs have propagated
|
|
2398
2526
|
// into context, and a same-origin host can normalize its live URL after the
|
|
@@ -2406,6 +2534,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2406
2534
|
editorOrigin: window.location.origin,
|
|
2407
2535
|
allowedHostOrigins,
|
|
2408
2536
|
onReadyChange: (ready) => {
|
|
2537
|
+
if (ready)
|
|
2538
|
+
inFlightCanvasLoadRef.current = null;
|
|
2409
2539
|
pageViewContext.setBridgeReady(ready);
|
|
2410
2540
|
if (!ready)
|
|
2411
2541
|
pageViewContext.setIframeSupportsRefresh(false);
|
|
@@ -2440,6 +2570,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2440
2570
|
selectedComponentIds: editContextRef.current?.getSelection() ?? [],
|
|
2441
2571
|
featureFlags: {
|
|
2442
2572
|
crossOriginBridge: true,
|
|
2573
|
+
pasteCleanupOverlay: true,
|
|
2443
2574
|
// Lets the host emit its own perf logs + interaction perf
|
|
2444
2575
|
// timestamps without needing a flag in the iframe's origin.
|
|
2445
2576
|
perfTrace: isPerfTraceEnabled(),
|
|
@@ -2448,7 +2579,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2448
2579
|
acknowledgedCapabilities: bridge.getAcknowledgedCapabilities(),
|
|
2449
2580
|
});
|
|
2450
2581
|
bridge.sendCommand("setZoom", {
|
|
2451
|
-
zoom: pageViewContextRef.current?.zoom ?? 1,
|
|
2582
|
+
zoom: pageViewContextRef.current?.getState().zoom ?? 1,
|
|
2452
2583
|
});
|
|
2453
2584
|
// Ready confirms the bridge transport, not that its initial
|
|
2454
2585
|
// mutation-driven geometry snapshot reached the editor. Query the
|
|
@@ -2462,8 +2593,12 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2462
2593
|
bridge.sendCommand("queryGeometry", {
|
|
2463
2594
|
textRanges: Array.from(bridgeTextRangeSourcesRef.current.values()).flat(),
|
|
2464
2595
|
});
|
|
2465
|
-
|
|
2466
|
-
|
|
2596
|
+
// With a handed-over anchor, the first geometry decides the
|
|
2597
|
+
// target (see the anchor effect); a relative scrollBy sent now
|
|
2598
|
+
// would add up with the anchor's on cross-origin hosts.
|
|
2599
|
+
if (pendingRefreshScrollRef.current &&
|
|
2600
|
+
!pendingScrollAnchorRef.current) {
|
|
2601
|
+
restorePendingRefreshScroll(iframe, pendingRefreshScrollRef.current, event.payload.scroll);
|
|
2467
2602
|
}
|
|
2468
2603
|
break;
|
|
2469
2604
|
case "structureUpdated":
|
|
@@ -2493,7 +2628,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2493
2628
|
pageViewContext.setPageSkeleton(event.payload.pageSkeleton);
|
|
2494
2629
|
break;
|
|
2495
2630
|
case "resizeChanged": {
|
|
2496
|
-
const currentGeometry = pageViewContext.bridgeGeometry;
|
|
2631
|
+
const currentGeometry = pageViewContext.getState().bridgeGeometry;
|
|
2497
2632
|
const viewportChanged = !currentGeometry ||
|
|
2498
2633
|
currentGeometry.viewport.width !== event.payload.viewport.width ||
|
|
2499
2634
|
currentGeometry.viewport.height !==
|
|
@@ -2508,7 +2643,6 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2508
2643
|
// example, when the minimap narrows the canvas). Remove that stale
|
|
2509
2644
|
// snapshot immediately and request its replacement now, preserving
|
|
2510
2645
|
// every overlay's registered text-range query.
|
|
2511
|
-
pageViewContext.bridgeGeometry = undefined;
|
|
2512
2646
|
pageViewContext.setBridgeGeometry(undefined);
|
|
2513
2647
|
scheduleBridgeGeometryRevision();
|
|
2514
2648
|
bridge.sendCommand("queryGeometry", {
|
|
@@ -2532,7 +2666,6 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2532
2666
|
: undefined) ?? event.payload.geometry.scroll;
|
|
2533
2667
|
const geometry = projectBridgeGeometryToScroll(event.payload.geometry, liveScroll) ?? event.payload.geometry;
|
|
2534
2668
|
latestBridgeScrollRef.current = geometry.scroll;
|
|
2535
|
-
pageViewContext.bridgeGeometry = geometry;
|
|
2536
2669
|
pageViewContext.setBridgeGeometry(geometry);
|
|
2537
2670
|
scheduleBridgeGeometryRevision();
|
|
2538
2671
|
dispatchBridgeOverlayScroll(iframe, geometry.scroll, getBridgeGeometryScrollScale(geometry));
|
|
@@ -2543,10 +2676,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2543
2676
|
break;
|
|
2544
2677
|
}
|
|
2545
2678
|
case "domUpdated":
|
|
2546
|
-
pageViewContext.bridgeDom = event.payload;
|
|
2547
2679
|
pageViewContext.setBridgeDom(event.payload);
|
|
2548
2680
|
scheduleBridgeDomRevision();
|
|
2549
|
-
window.dispatchEvent(new CustomEvent(BRIDGE_DOM_UPDATED_EVENT));
|
|
2550
2681
|
break;
|
|
2551
2682
|
case "refreshStarted":
|
|
2552
2683
|
hostAppRefreshSawStructureUpdateRef.current = false;
|
|
@@ -2589,7 +2720,6 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2589
2720
|
: undefined) ?? event.payload.geometry.scroll;
|
|
2590
2721
|
const geometry = projectBridgeGeometryToScroll(event.payload.geometry, liveScroll) ?? event.payload.geometry;
|
|
2591
2722
|
latestBridgeScrollRef.current = geometry.scroll;
|
|
2592
|
-
pageViewContext.bridgeGeometry = geometry;
|
|
2593
2723
|
pageViewContext.setBridgeGeometry(geometry);
|
|
2594
2724
|
scheduleBridgeGeometryRevision();
|
|
2595
2725
|
dispatchBridgeOverlayScroll(iframe, geometry.scroll, getBridgeGeometryScrollScale(geometry));
|
|
@@ -2606,6 +2736,9 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2606
2736
|
// The host already replayed a scroll issued during the refresh
|
|
2607
2737
|
// (e.g. a minimap navigation) — restoring the pre-refresh
|
|
2608
2738
|
// position now would clobber that newer intent.
|
|
2739
|
+
if (pendingRefreshScrollRef.current) {
|
|
2740
|
+
logFieldValueDiagnostic("canvas-load", `scroll restore ctx=${pageViewContext.debugId} dropped y=${pendingRefreshScrollRef.current.y}: host replayed a newer scroll`);
|
|
2741
|
+
}
|
|
2609
2742
|
pendingRefreshScrollRef.current = undefined;
|
|
2610
2743
|
}
|
|
2611
2744
|
else if (pendingRefreshScrollRef.current) {
|
|
@@ -2635,10 +2768,24 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2635
2768
|
}
|
|
2636
2769
|
setShowSpinner(false);
|
|
2637
2770
|
break;
|
|
2771
|
+
case "pasteCleanupChanged":
|
|
2772
|
+
setPasteCleanupMenu(event.payload.menu);
|
|
2773
|
+
break;
|
|
2638
2774
|
case "selectionChanged":
|
|
2639
|
-
latestBridgeSelectionRef.current = event.payload.selection;
|
|
2640
2775
|
pageViewContext.setBridgeSelection(event.payload.selection);
|
|
2641
2776
|
handleBridgeSelection(event.payload.selection, iframe);
|
|
2777
|
+
// Comment target picking: a passage selected on the canvas is
|
|
2778
|
+
// the target once the pointer is released. The composer reads
|
|
2779
|
+
// the selection from the edit context, which the call above
|
|
2780
|
+
// updates with the next render. The formatting menu stays away
|
|
2781
|
+
// from a passage picked this way until the selection changes.
|
|
2782
|
+
releasePickedSelection(event.payload.selection);
|
|
2783
|
+
if (!compareView &&
|
|
2784
|
+
isCanvasPickSelection(event.payload.selection)) {
|
|
2785
|
+
markPickedSelection(event.payload.selection);
|
|
2786
|
+
stopCommentTargetPicking();
|
|
2787
|
+
window.requestAnimationFrame(() => window.requestAnimationFrame(() => editContextRef.current?.addComment()));
|
|
2788
|
+
}
|
|
2642
2789
|
break;
|
|
2643
2790
|
case "fieldValueChanged":
|
|
2644
2791
|
handleBridgeFieldValueChanged(event.payload);
|
|
@@ -2679,6 +2826,12 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2679
2826
|
transportMs: Date.now() - event.timestamp,
|
|
2680
2827
|
}, eventAt ?? event.timestamp);
|
|
2681
2828
|
}
|
|
2829
|
+
// While picking a comment target, clicks, Escape and the context
|
|
2830
|
+
// menu belong to the picker, not to selection or inline editing.
|
|
2831
|
+
if (!compareView &&
|
|
2832
|
+
handleCanvasPickInteraction(event.payload, editContextRef.current, pageViewContextRef.current?.getState().pageItemDescriptor)) {
|
|
2833
|
+
break;
|
|
2834
|
+
}
|
|
2682
2835
|
setBridgeInteraction(event.payload);
|
|
2683
2836
|
pageViewContext.setBridgeInteraction(event.payload);
|
|
2684
2837
|
void handleBridgeInteraction(event.payload, iframe);
|
|
@@ -2728,7 +2881,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2728
2881
|
// late echo of a scroll the overlay already applied; re-dispatching
|
|
2729
2882
|
// it would briefly drag the overlay back to a stale position.
|
|
2730
2883
|
if (!directOverlayScrollSyncRef.current) {
|
|
2731
|
-
dispatchBridgeOverlayScroll(iframe, event.payload.scroll, getBridgeGeometryScrollScale(pageViewContextRef.current?.bridgeGeometry));
|
|
2884
|
+
dispatchBridgeOverlayScroll(iframe, event.payload.scroll, getBridgeGeometryScrollScale(pageViewContextRef.current?.getState().bridgeGeometry));
|
|
2732
2885
|
}
|
|
2733
2886
|
if (shouldTrackMinimapScroll()) {
|
|
2734
2887
|
scrollHandlerRef.current(event.payload.scroll.y);
|
|
@@ -2740,6 +2893,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2740
2893
|
}
|
|
2741
2894
|
},
|
|
2742
2895
|
});
|
|
2896
|
+
setPasteCleanupMenu(undefined);
|
|
2743
2897
|
bridgeClientRef.current = client;
|
|
2744
2898
|
pageViewContext.setBridgeReady(false);
|
|
2745
2899
|
client.connect();
|
|
@@ -2767,8 +2921,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2767
2921
|
clearActiveBridgeInlineEdit,
|
|
2768
2922
|
bridgeInlineEditSession,
|
|
2769
2923
|
reconcileActiveBridgeInlineEdit,
|
|
2770
|
-
|
|
2771
|
-
|
|
2924
|
+
editUrl,
|
|
2925
|
+
previewUrl,
|
|
2772
2926
|
scheduleBridgeDomRevision,
|
|
2773
2927
|
scheduleBridgeGeometryRevision,
|
|
2774
2928
|
shouldTrackMinimapScroll,
|
|
@@ -2784,7 +2938,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2784
2938
|
if (fieldChanges.length === 0)
|
|
2785
2939
|
return;
|
|
2786
2940
|
const bridge = bridgeClientRef.current;
|
|
2787
|
-
const structure = pageViewContextRef.current?.bridgeStructure;
|
|
2941
|
+
const structure = pageViewContextRef.current?.getState().bridgeStructure;
|
|
2788
2942
|
if (!bridge || !structure?.fields.length)
|
|
2789
2943
|
return;
|
|
2790
2944
|
const processResolvedField = (change, changedFieldId, field) => {
|
|
@@ -2792,8 +2946,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2792
2946
|
return;
|
|
2793
2947
|
const patchedElementKeys = new Set();
|
|
2794
2948
|
const patches = [];
|
|
2795
|
-
const pageItemDescriptor = pageViewContextRef.current?.pageItemDescriptor ??
|
|
2796
|
-
pageViewContextRef.current?.page?.item?.descriptor;
|
|
2949
|
+
const pageItemDescriptor = pageViewContextRef.current?.getState().pageItemDescriptor ??
|
|
2950
|
+
pageViewContextRef.current?.getState().page?.item?.descriptor;
|
|
2797
2951
|
for (const structureField of structure.fields) {
|
|
2798
2952
|
if (!structureField.elementKey)
|
|
2799
2953
|
continue;
|
|
@@ -2832,7 +2986,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2832
2986
|
// stale mid-typing — applying it would roll the canvas text back
|
|
2833
2987
|
// and make the remote caret jump against the shorter text.
|
|
2834
2988
|
if (hasRemoteCaretDraftForField({
|
|
2835
|
-
remoteCarets: editContextRef.current?.
|
|
2989
|
+
remoteCarets: editContextRef.current?.remoteCaretsStore?.get(),
|
|
2836
2990
|
fieldId: structureField.fieldId,
|
|
2837
2991
|
item: structureField.item,
|
|
2838
2992
|
})) {
|
|
@@ -2860,8 +3014,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2860
3014
|
};
|
|
2861
3015
|
const asyncFieldChanges = [];
|
|
2862
3016
|
for (const change of fieldChanges) {
|
|
2863
|
-
const pageItemDescriptor = pageViewContextRef.current?.pageItemDescriptor ??
|
|
2864
|
-
pageViewContextRef.current?.page?.item?.descriptor;
|
|
3017
|
+
const pageItemDescriptor = pageViewContextRef.current?.getState().pageItemDescriptor ??
|
|
3018
|
+
pageViewContextRef.current?.getState().page?.item?.descriptor;
|
|
2865
3019
|
if (!bridgeStructureTargetsChangedItem(structure.fields, change.item, pageItemDescriptor)) {
|
|
2866
3020
|
continue;
|
|
2867
3021
|
}
|
|
@@ -2924,8 +3078,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2924
3078
|
]);
|
|
2925
3079
|
useEffect(() => {
|
|
2926
3080
|
const bridge = bridgeClientRef.current;
|
|
2927
|
-
const structure =
|
|
2928
|
-
if (!
|
|
3081
|
+
const structure = bridgeStructure;
|
|
3082
|
+
if (!bridgeReady || !bridge || !structure?.fields.length) {
|
|
2929
3083
|
return;
|
|
2930
3084
|
}
|
|
2931
3085
|
let disposed = false;
|
|
@@ -2938,8 +3092,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2938
3092
|
continue;
|
|
2939
3093
|
if (patchedElementKeys.has(structureField.elementKey))
|
|
2940
3094
|
continue;
|
|
2941
|
-
const fallbackItem = pageViewContextRef.current?.pageItemDescriptor ??
|
|
2942
|
-
pageViewContextRef.current?.page?.item?.descriptor;
|
|
3095
|
+
const fallbackItem = pageViewContextRef.current?.getState().pageItemDescriptor ??
|
|
3096
|
+
pageViewContextRef.current?.getState().page?.item?.descriptor;
|
|
2943
3097
|
const bridgeItem = structureField.item;
|
|
2944
3098
|
const itemDescriptor = {
|
|
2945
3099
|
id: bridgeItem?.id ?? fallbackItem?.id,
|
|
@@ -2964,9 +3118,9 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2964
3118
|
itemId: itemDescriptor.id,
|
|
2965
3119
|
language: itemDescriptor.language,
|
|
2966
3120
|
version: itemDescriptor.version,
|
|
2967
|
-
pageItemId: pageViewContextRef.current?.pageItemDescriptor?.id,
|
|
2968
|
-
pageItemLanguage: pageViewContextRef.current?.pageItemDescriptor?.language,
|
|
2969
|
-
pageItemVersion: pageViewContextRef.current?.pageItemDescriptor?.version,
|
|
3121
|
+
pageItemId: pageViewContextRef.current?.getState().pageItemDescriptor?.id,
|
|
3122
|
+
pageItemLanguage: pageViewContextRef.current?.getState().pageItemDescriptor?.language,
|
|
3123
|
+
pageItemVersion: pageViewContextRef.current?.getState().pageItemDescriptor?.version,
|
|
2970
3124
|
};
|
|
2971
3125
|
// Suggestions mode previews every field with pending suggestions. A
|
|
2972
3126
|
// selected suggestion card outside that mode previews only its own
|
|
@@ -2977,7 +3131,12 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
2977
3131
|
showSelectedOnPage: editContext.showSelectedSuggestionOnPage,
|
|
2978
3132
|
}), editContext.suggestedEdits, suggestionField);
|
|
2979
3133
|
const dirtyModifiedField = findModifiedBridgeField({
|
|
2980
|
-
|
|
3134
|
+
// Global React snapshots are intentionally deferred by the store.
|
|
3135
|
+
// An undo refresh can finish before that notification: consult the
|
|
3136
|
+
// live store so a formerly dirty value is not patched over the
|
|
3137
|
+
// authoritative server HTML during this window.
|
|
3138
|
+
modifiedFields: slotContext?.fieldModificationStore.getAllFields() ??
|
|
3139
|
+
fieldsContext?.modifiedFields,
|
|
2981
3140
|
structureField,
|
|
2982
3141
|
field,
|
|
2983
3142
|
itemDescriptor: itemDescriptor,
|
|
@@ -3023,9 +3182,10 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3023
3182
|
editContext.showSelectedSuggestionOnPage,
|
|
3024
3183
|
editContext.suggestedEdits,
|
|
3025
3184
|
fieldsContext?.modifiedFields,
|
|
3185
|
+
slotContext?.fieldModificationStore,
|
|
3026
3186
|
bridgeDomRevision,
|
|
3027
|
-
|
|
3028
|
-
|
|
3187
|
+
bridgeReady,
|
|
3188
|
+
bridgeStructure,
|
|
3029
3189
|
sendBridgeFieldPatch,
|
|
3030
3190
|
]);
|
|
3031
3191
|
useEffect(() => {
|
|
@@ -3067,6 +3227,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3067
3227
|
return (bridgeClientRef.current?.sendCommand("applyRichTextCommand", payload) ??
|
|
3068
3228
|
false);
|
|
3069
3229
|
};
|
|
3230
|
+
const requestBridgeRichTextFieldOptions = (payload) => bridgeClientRef.current?.sendCommand("setRichTextFieldOptions", payload) ??
|
|
3231
|
+
false;
|
|
3070
3232
|
const requestBridgePreviewGap = (payload) => {
|
|
3071
3233
|
return (bridgeClientRef.current?.sendCommand("previewGap", payload) ?? false);
|
|
3072
3234
|
};
|
|
@@ -3101,6 +3263,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3101
3263
|
pageViewContext.requestBridgeScrollBy = requestBridgeScrollBy;
|
|
3102
3264
|
pageViewContext.requestBridgeFieldPatch = sendApplyFieldPatchCommand;
|
|
3103
3265
|
pageViewContext.requestBridgeRichTextCommand = requestBridgeRichTextCommand;
|
|
3266
|
+
pageViewContext.requestBridgeRichTextFieldOptions =
|
|
3267
|
+
requestBridgeRichTextFieldOptions;
|
|
3104
3268
|
pageViewContext.requestBridgePreviewGap = requestBridgePreviewGap;
|
|
3105
3269
|
pageViewContext.requestBridgeCaptureSnapshot = requestBridgeCaptureSnapshot;
|
|
3106
3270
|
pageViewContext.requestBridgeComponentSnapshot =
|
|
@@ -3108,7 +3272,9 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3108
3272
|
pageViewContext.requestBridgePageSnapshot = requestBridgePageSnapshot;
|
|
3109
3273
|
pageViewContext.requestBridgeCancelPointerDrag =
|
|
3110
3274
|
requestBridgeCancelPointerDrag;
|
|
3275
|
+
pageViewContext.setCanvasAttached(true);
|
|
3111
3276
|
return () => {
|
|
3277
|
+
pageViewContext.setCanvasAttached(false);
|
|
3112
3278
|
if (pageViewContext.requestBridgeGeometry === requestBridgeGeometry) {
|
|
3113
3279
|
pageViewContext.requestBridgeGeometry = undefined;
|
|
3114
3280
|
}
|
|
@@ -3140,6 +3306,10 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3140
3306
|
requestBridgeRichTextCommand) {
|
|
3141
3307
|
pageViewContext.requestBridgeRichTextCommand = undefined;
|
|
3142
3308
|
}
|
|
3309
|
+
if (pageViewContext.requestBridgeRichTextFieldOptions ===
|
|
3310
|
+
requestBridgeRichTextFieldOptions) {
|
|
3311
|
+
pageViewContext.requestBridgeRichTextFieldOptions = undefined;
|
|
3312
|
+
}
|
|
3143
3313
|
};
|
|
3144
3314
|
}, [pageViewContext, sendApplyFieldPatchCommand]);
|
|
3145
3315
|
useEffect(() => {
|
|
@@ -3163,8 +3333,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3163
3333
|
if (!iframeRef.current)
|
|
3164
3334
|
return;
|
|
3165
3335
|
const iframe = iframeRef.current;
|
|
3166
|
-
const bridgeGeometry = pageViewContextRef.current?.bridgeGeometry;
|
|
3167
|
-
const bridgeDom = pageViewContextRef.current?.bridgeDom;
|
|
3336
|
+
const bridgeGeometry = pageViewContextRef.current?.getState().bridgeGeometry;
|
|
3337
|
+
const bridgeDom = pageViewContextRef.current?.getState().bridgeDom;
|
|
3168
3338
|
const contentHeight = bridgeDom?.scrollHeight ??
|
|
3169
3339
|
getBridgeGeometryDocumentSize(bridgeGeometry)?.height;
|
|
3170
3340
|
const contentWidth = bridgeDom?.viewport.width ?? bridgeGeometry?.viewport.width;
|
|
@@ -3212,18 +3382,38 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3212
3382
|
? pickVersionAtDate(editContext.itemVersions, editContext.previewDate)
|
|
3213
3383
|
?.version
|
|
3214
3384
|
: undefined;
|
|
3385
|
+
// The page's dynamic renderings, read from the preview canvas, for the strip
|
|
3386
|
+
// that lists them for review and approval (never in compare panes). Client
|
|
3387
|
+
// code that is not approved runs only in the review dialog's sealed frame;
|
|
3388
|
+
// the canvas itself always stays the canvas.
|
|
3389
|
+
const interactivePreviewPage = pageItemDescriptor
|
|
3390
|
+
? {
|
|
3391
|
+
id: pageItemDescriptor.id,
|
|
3392
|
+
language: pageItemDescriptor.language,
|
|
3393
|
+
version: previewDateVersion ?? pageItemDescriptor.version,
|
|
3394
|
+
}
|
|
3395
|
+
: undefined;
|
|
3396
|
+
const interactivePreview = useInteractivePreview({
|
|
3397
|
+
mode: compareView ? undefined : editContext.mode,
|
|
3398
|
+
page: interactivePreviewPage,
|
|
3399
|
+
});
|
|
3400
|
+
const { setHint: setCanvasRenderings } = interactivePreview;
|
|
3401
|
+
// The latest preview canvas URL (without its edit_rev nonce); the review
|
|
3402
|
+
// dialog's sealed frame loads the page with its query.
|
|
3403
|
+
const previewCanvasUrlRef = useRef(undefined);
|
|
3404
|
+
const getPreviewCanvasUrl = useCallback(() => previewCanvasUrlRef.current, []);
|
|
3215
3405
|
useEffect(() => {
|
|
3216
|
-
if (!pageItemDescriptor ||
|
|
3217
|
-
!
|
|
3218
|
-
|
|
3406
|
+
if (!pageItemDescriptor || !editUrl || !previewUrl) {
|
|
3407
|
+
if (!requestedIframeSrcRef.current) {
|
|
3408
|
+
logFieldValueDiagnostic("canvas-load", `frame waiting ctx=${pageViewContext.debugId} compare=${!!compareView} descriptor=${pageItemDescriptor ? `${pageItemDescriptor.id}/v${pageItemDescriptor.version}` : "none"} editUrl=${editUrl ? "yes" : "no"} previewUrl=${previewUrl ? "yes" : "no"}`);
|
|
3409
|
+
}
|
|
3219
3410
|
return;
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
: pageViewContext.editUrl;
|
|
3411
|
+
}
|
|
3412
|
+
const urlPath = editContext.mode === "preview" ? previewUrl : editUrl;
|
|
3223
3413
|
const renderUrl = new URL(urlPath, window.location.origin);
|
|
3224
3414
|
alignLoopbackHostToEditor(renderUrl);
|
|
3225
3415
|
alignXmCloudManagedEditingHostToEditor(renderUrl);
|
|
3226
|
-
applyParheliaRenderContext(renderUrl, pageItemDescriptor, getEditorQueryParam("site") ||
|
|
3416
|
+
applyParheliaRenderContext(renderUrl, pageItemDescriptor, getEditorQueryParam("site") || siteName);
|
|
3227
3417
|
const editRev = uuid();
|
|
3228
3418
|
renderUrl.searchParams.set("edit_rev", editRev);
|
|
3229
3419
|
if (editContext.mode !== "preview" && editContext.sessionId) {
|
|
@@ -3261,7 +3451,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3261
3451
|
}
|
|
3262
3452
|
// Detect if the version in the URL changed - this requires a full reload, not just requestRefresh
|
|
3263
3453
|
// because Next.js router.replace may not properly refetch server data for version changes.
|
|
3264
|
-
const currentIframeUrl = iframeRef.current?.src;
|
|
3454
|
+
const currentIframeUrl = requestedIframeSrcRef.current ?? iframeRef.current?.src;
|
|
3265
3455
|
const currentIframeOrigin = getUrlOrigin(currentIframeUrl);
|
|
3266
3456
|
const renderUrlIsCrossOrigin = renderUrl.origin !== window.location.origin;
|
|
3267
3457
|
const iframeOriginChanged = !!(currentIframeOrigin && currentIframeOrigin !== renderUrl.origin);
|
|
@@ -3282,6 +3472,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3282
3472
|
const initialLoad = currentItemDescriptor?.id !== pageItemDescriptor.id ||
|
|
3283
3473
|
currentItemDescriptor?.language !== pageItemDescriptor.language ||
|
|
3284
3474
|
currentItemDescriptor?.version !== pageItemDescriptor.version;
|
|
3475
|
+
const scrollHandoffKey = getCanvasScrollHandoffKey(pageItemDescriptor);
|
|
3285
3476
|
// A user-requested hard refresh: skip the incremental path entirely. It is
|
|
3286
3477
|
// the escape hatch for the case where the bridge patch is what produced the
|
|
3287
3478
|
// wrong DOM, so routing it through the bridge again would repeat the fault.
|
|
@@ -3295,6 +3486,9 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3295
3486
|
const modeChanged = previousRenderMode !== editContext.mode;
|
|
3296
3487
|
const previewRenderBoundaryChanged = crossesPreviewRenderBoundary(previousRenderMode, editContext.mode);
|
|
3297
3488
|
lastRenderModeRef.current = editContext.mode;
|
|
3489
|
+
if (editContext.mode === "preview") {
|
|
3490
|
+
previewCanvasUrlRef.current = signatureUrl.toString();
|
|
3491
|
+
}
|
|
3298
3492
|
const shouldUseIframeSrcReload = initialLoad ||
|
|
3299
3493
|
iframeOriginChanged ||
|
|
3300
3494
|
fullReloadRequested ||
|
|
@@ -3304,7 +3498,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3304
3498
|
// mode change. Mode is delivered by setEditorMode and cannot change the
|
|
3305
3499
|
// server-rendered URL/revision; reloading during a transient bridge
|
|
3306
3500
|
// disconnect would needlessly reset iframe scroll. Before the first bridge
|
|
3307
|
-
// connection, identical non-mode re-runs still use the recovery path
|
|
3501
|
+
// connection, identical non-mode re-runs still use the recovery path -
|
|
3502
|
+
// deferred while the load they duplicate is settling (see below).
|
|
3308
3503
|
if (!shouldUseIframeSrcReload &&
|
|
3309
3504
|
!versionChanged &&
|
|
3310
3505
|
lastRenderSignatureRef.current === renderSignature &&
|
|
@@ -3320,12 +3515,29 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3320
3515
|
// its own landing position. Restoring the previous page's scroll on
|
|
3321
3516
|
// ready would yank the canvas off that spot.
|
|
3322
3517
|
pendingRefreshScrollRef.current = undefined;
|
|
3518
|
+
pendingScrollAnchorRef.current = undefined;
|
|
3323
3519
|
}
|
|
3324
3520
|
else if (!pendingRefreshScrollRef.current) {
|
|
3521
|
+
// This frame's first load continues where a frame that just unmounted
|
|
3522
|
+
// for the same page (layout switch) left off.
|
|
3523
|
+
const handoff = currentItemDescriptor === undefined
|
|
3524
|
+
? takeCanvasScrollHandoff(scrollHandoffKey)
|
|
3525
|
+
: undefined;
|
|
3526
|
+
if (handoff) {
|
|
3527
|
+
// The page view context outlives the frame: its geometry still
|
|
3528
|
+
// describes the previous layout, and must not position the anchor
|
|
3529
|
+
// (or be projected onto this document's first scroll).
|
|
3530
|
+
pageViewContext.setBridgeGeometry(undefined);
|
|
3531
|
+
}
|
|
3532
|
+
pendingScrollAnchorRef.current = handoff?.anchor;
|
|
3325
3533
|
pendingRefreshScrollRef.current =
|
|
3326
|
-
|
|
3534
|
+
handoff?.scroll ??
|
|
3535
|
+
getIframeWindowScroll(iframeRef.current) ??
|
|
3327
3536
|
latestBridgeScrollRef.current;
|
|
3328
3537
|
pendingRefreshScrollCapturedAtRef.current = Date.now();
|
|
3538
|
+
if (currentItemDescriptor === undefined) {
|
|
3539
|
+
logFieldValueDiagnostic("canvas-load", `frame handoff ctx=${pageViewContext.debugId} taken=${handoff ? `y=${handoff.scroll.y}` : "none"} target=${pendingRefreshScrollRef.current ? `y=${pendingRefreshScrollRef.current.y}` : "none"}`);
|
|
3540
|
+
}
|
|
3329
3541
|
}
|
|
3330
3542
|
canvasRefreshInFlightSinceRef.current = Date.now();
|
|
3331
3543
|
awaitingHostAppRefreshRenderRef.current = false;
|
|
@@ -3340,6 +3552,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3340
3552
|
: fullReloadRequested
|
|
3341
3553
|
? "Hard refresh requested - setting iframe src"
|
|
3342
3554
|
: "Reloading iframe src");
|
|
3555
|
+
logFieldValueDiagnostic("canvas-load", `frame load ctx=${pageViewContext.debugId} compare=${!!compareView} page=${pageItemDescriptor?.id}/v${pageItemDescriptor?.version} initial=${initialLoad}`);
|
|
3343
3556
|
setLoadedIframeSrc(undefined);
|
|
3344
3557
|
// A canvas link navigation may carry a #anchor; the browser scrolls the
|
|
3345
3558
|
// freshly loaded document to it natively.
|
|
@@ -3347,6 +3560,12 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3347
3560
|
renderUrl.hash = pendingCanvasAnchorRef.current;
|
|
3348
3561
|
pendingCanvasAnchorRef.current = undefined;
|
|
3349
3562
|
}
|
|
3563
|
+
requestedIframeSrcRef.current = renderUrl.toString();
|
|
3564
|
+
inFlightCanvasLoadRef.current = {
|
|
3565
|
+
signatureUrl: signatureUrl.toString(),
|
|
3566
|
+
requestedSrc: renderUrl.toString(),
|
|
3567
|
+
startedAt: Date.now(),
|
|
3568
|
+
};
|
|
3350
3569
|
setIframeSrc(renderUrl.toString());
|
|
3351
3570
|
}
|
|
3352
3571
|
function runBridgeRefresh() {
|
|
@@ -3387,11 +3606,52 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3387
3606
|
}
|
|
3388
3607
|
else {
|
|
3389
3608
|
const retryDelayMs = 150;
|
|
3390
|
-
const
|
|
3391
|
-
|
|
3392
|
-
|
|
3609
|
+
const signatureUrlString = signatureUrl.toString();
|
|
3610
|
+
// No bridge yet. When the full load for this same URL is still
|
|
3611
|
+
// settling - the usual page open: the revision arrives or a dependency
|
|
3612
|
+
// changes identity right after src was set, before the bridge
|
|
3613
|
+
// handshake - the recovery path would issue a second full load that
|
|
3614
|
+
// differs only by its edit_rev nonce. Poll until that load settles
|
|
3615
|
+
// instead: a ready bridge either already covers this signature or
|
|
3616
|
+
// applies it incrementally, and a load that never yields a bridge
|
|
3617
|
+
// still gets the recovery reload. Outside that window the single
|
|
3618
|
+
// retry keeps the pre-bridge recovery behaviour unchanged.
|
|
3619
|
+
const deferToInFlightLoad = isCanvasLoadSettling(inFlightCanvasLoadRef.current, signatureUrlString, Date.now());
|
|
3620
|
+
if (deferToInFlightLoad) {
|
|
3621
|
+
console.log("Deferring canvas refresh - initial load in flight");
|
|
3622
|
+
}
|
|
3623
|
+
let retryTimer;
|
|
3624
|
+
const retry = () => {
|
|
3625
|
+
retryTimer = undefined;
|
|
3626
|
+
if (!deferToInFlightLoad) {
|
|
3627
|
+
runBridgeRefresh();
|
|
3628
|
+
return;
|
|
3629
|
+
}
|
|
3630
|
+
const decision = resolveDeferredCanvasRefresh({
|
|
3631
|
+
bridgeSupportsRefresh: !!bridgeClientRef.current?.supportsCapability("refresh"),
|
|
3632
|
+
renderSignature,
|
|
3633
|
+
lastAppliedSignature: lastRenderSignatureRef.current,
|
|
3634
|
+
load: inFlightCanvasLoadRef.current,
|
|
3635
|
+
signatureUrl: signatureUrlString,
|
|
3636
|
+
now: Date.now(),
|
|
3637
|
+
});
|
|
3638
|
+
if (decision === "wait") {
|
|
3639
|
+
retryTimer = setTimeout(retry, retryDelayMs);
|
|
3640
|
+
}
|
|
3641
|
+
else if (decision === "bridge-refresh") {
|
|
3642
|
+
runBridgeRefresh();
|
|
3643
|
+
}
|
|
3644
|
+
else if (decision === "reload") {
|
|
3645
|
+
runFallbackRefresh();
|
|
3646
|
+
}
|
|
3647
|
+
// "skip": the settled load already rendered this signature.
|
|
3648
|
+
};
|
|
3649
|
+
retryTimer = setTimeout(retry, retryDelayMs);
|
|
3393
3650
|
setCurrentItemDescriptor(pageItemDescriptor);
|
|
3394
|
-
return () =>
|
|
3651
|
+
return () => {
|
|
3652
|
+
if (retryTimer !== undefined)
|
|
3653
|
+
clearTimeout(retryTimer);
|
|
3654
|
+
};
|
|
3395
3655
|
}
|
|
3396
3656
|
}
|
|
3397
3657
|
else {
|
|
@@ -3403,16 +3663,42 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3403
3663
|
editContext.revision,
|
|
3404
3664
|
editContext.fullReloadToken,
|
|
3405
3665
|
pageItemDescriptor,
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3666
|
+
editUrl,
|
|
3667
|
+
previewUrl,
|
|
3668
|
+
siteName,
|
|
3669
|
+
fullscreen,
|
|
3410
3670
|
editContext.mode,
|
|
3411
3671
|
editContext.previewDate,
|
|
3412
3672
|
previewDateVersion,
|
|
3413
3673
|
editContext.sessionId,
|
|
3414
3674
|
editContext.layoutMode,
|
|
3415
3675
|
]);
|
|
3676
|
+
// The rendering host wraps every dynamic rendering in the canvas document
|
|
3677
|
+
// (same-origin) and, in preview mode, lists those with client code in a
|
|
3678
|
+
// hint. Read them once the canvas has loaded, and again when the host
|
|
3679
|
+
// reports DOM changes. Declared after the render effect: a load that effect
|
|
3680
|
+
// has just requested means the document is outdated. The primary canvas also
|
|
3681
|
+
// records them, in edit mode too, for the publish dialog's approval warning.
|
|
3682
|
+
useEffect(() => {
|
|
3683
|
+
if (!iframeElement ||
|
|
3684
|
+
!loadedIframeSrc ||
|
|
3685
|
+
requestedIframeSrcRef.current !== loadedIframeSrc) {
|
|
3686
|
+
return;
|
|
3687
|
+
}
|
|
3688
|
+
const renderings = readCanvasRenderings(iframeElement);
|
|
3689
|
+
setCanvasRenderings(renderings);
|
|
3690
|
+
if (!compareView && pageItemDescriptor) {
|
|
3691
|
+
recordPageRenderingIds(pageItemDescriptor, renderings.renderingIds);
|
|
3692
|
+
}
|
|
3693
|
+
}, [
|
|
3694
|
+
bridgeDomRevision,
|
|
3695
|
+
compareView,
|
|
3696
|
+
editContext.mode,
|
|
3697
|
+
iframeElement,
|
|
3698
|
+
loadedIframeSrc,
|
|
3699
|
+
pageItemDescriptor,
|
|
3700
|
+
setCanvasRenderings,
|
|
3701
|
+
]);
|
|
3416
3702
|
useEffect(() => {
|
|
3417
3703
|
if (fieldsContext?.focusedField) {
|
|
3418
3704
|
const focusedField = fieldsContext.focusedField;
|
|
@@ -3445,7 +3731,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3445
3731
|
focusedField.item.id !== currentSelection[0])
|
|
3446
3732
|
return;
|
|
3447
3733
|
lastScrolledFocusedFieldKeyRef.current = focusedFieldKey;
|
|
3448
|
-
const bounds = findBridgeFieldDocumentBounds(pageViewContextRef.current?.bridgeGeometry, focusedField);
|
|
3734
|
+
const bounds = findBridgeFieldDocumentBounds(pageViewContextRef.current?.getState().bridgeGeometry, focusedField);
|
|
3449
3735
|
const activePageViewContext = pageViewContextRef.current;
|
|
3450
3736
|
if (bounds && activePageViewContext) {
|
|
3451
3737
|
scrollBridgeBoundsIntoView(activePageViewContext, bounds, latestBridgeScrollRef.current);
|
|
@@ -3503,15 +3789,33 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3503
3789
|
if (isCanvasRefreshInFlight())
|
|
3504
3790
|
return;
|
|
3505
3791
|
if (!fieldsContext?.focusedField && canvasSelection.length > 0) {
|
|
3506
|
-
const lastSelectedComponent = getComponentById(canvasSelection[canvasSelection.length - 1], pageViewContextRef.current.page);
|
|
3792
|
+
const lastSelectedComponent = getComponentById(canvasSelection[canvasSelection.length - 1], pageViewContextRef.current.getState().page);
|
|
3507
3793
|
if (lastSelectedComponent) {
|
|
3508
3794
|
editContext.setScrollIntoView(lastSelectedComponent.id);
|
|
3509
3795
|
}
|
|
3510
3796
|
}
|
|
3511
3797
|
}, [canvasSelection, fieldsContext?.focusedField, isCanvasRefreshInFlight]);
|
|
3512
3798
|
useEffect(() => {
|
|
3513
|
-
|
|
3799
|
+
// The scroll's text-range query lives only while its request is pending:
|
|
3800
|
+
// once the request is resolved, replaced by a target of another kind or
|
|
3801
|
+
// withdrawn by whoever set it, the range must not stay in the union and
|
|
3802
|
+
// be measured on every geometry, and a later request for the same target
|
|
3803
|
+
// must query afresh.
|
|
3804
|
+
const endScrollIntoViewRequest = () => {
|
|
3805
|
+
const requestState = scrollIntoViewRequestRef.current;
|
|
3806
|
+
requestState.signature = "";
|
|
3807
|
+
requestState.requestedTextRangeGeometry = false;
|
|
3808
|
+
if (bridgeTextRangeSourcesRef.current.has(SCROLL_INTO_VIEW_BRIDGE_SOURCE)) {
|
|
3809
|
+
pageViewContextRef.current?.requestBridgeGeometry?.({
|
|
3810
|
+
source: SCROLL_INTO_VIEW_BRIDGE_SOURCE,
|
|
3811
|
+
textRanges: [],
|
|
3812
|
+
});
|
|
3813
|
+
}
|
|
3814
|
+
};
|
|
3815
|
+
if (!editContext.scrollIntoView) {
|
|
3816
|
+
endScrollIntoViewRequest();
|
|
3514
3817
|
return;
|
|
3818
|
+
}
|
|
3515
3819
|
const activePageViewContext = pageViewContextRef.current;
|
|
3516
3820
|
if (!activePageViewContext)
|
|
3517
3821
|
return;
|
|
@@ -3540,26 +3844,54 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3540
3844
|
return;
|
|
3541
3845
|
}
|
|
3542
3846
|
}
|
|
3543
|
-
const
|
|
3847
|
+
const bridgeGeometry = activePageViewContext.getState().bridgeGeometry;
|
|
3848
|
+
const exactBounds = findScrollIntoViewDocumentBounds(bridgeGeometry, scrollTarget, { includeTextRangeFallback: false });
|
|
3544
3849
|
let bounds = exactBounds;
|
|
3545
|
-
bounds ??= findScrollIntoViewDocumentBounds(
|
|
3850
|
+
bounds ??= findScrollIntoViewDocumentBounds(bridgeGeometry, scrollTarget, {
|
|
3851
|
+
includeTextRangeFallback: true,
|
|
3852
|
+
});
|
|
3546
3853
|
if (bounds) {
|
|
3547
3854
|
scrollBridgeBoundsIntoView(activePageViewContext, bounds, latestBridgeScrollRef.current);
|
|
3548
3855
|
}
|
|
3549
|
-
|
|
3550
|
-
activePageViewContext.requestBridgeGeometry?.({
|
|
3551
|
-
source: SCROLL_INTO_VIEW_BRIDGE_SOURCE,
|
|
3552
|
-
textRanges: [],
|
|
3553
|
-
});
|
|
3554
|
-
}
|
|
3555
|
-
requestState.signature = "";
|
|
3556
|
-
requestState.requestedTextRangeGeometry = false;
|
|
3856
|
+
endScrollIntoViewRequest();
|
|
3557
3857
|
editContext.setScrollIntoView(undefined);
|
|
3558
3858
|
}, [
|
|
3559
3859
|
editContext.scrollIntoView,
|
|
3560
|
-
|
|
3561
|
-
|
|
3860
|
+
page,
|
|
3861
|
+
// Runs again for each geometry the bridge reports (read above).
|
|
3862
|
+
bridgeGeometryRevision,
|
|
3863
|
+
isCanvasRefreshInFlight,
|
|
3864
|
+
]);
|
|
3865
|
+
// A layout switch changes the canvas width, so the page reflows and the
|
|
3866
|
+
// handed-over pixel offset alone no longer shows the same content. The first
|
|
3867
|
+
// geometry of the new document puts the selected component back at its
|
|
3868
|
+
// previous distance from the canvas top; without it (component not
|
|
3869
|
+
// rendered), the plain offset is restored.
|
|
3870
|
+
useEffect(() => {
|
|
3871
|
+
const anchor = pendingScrollAnchorRef.current;
|
|
3872
|
+
const geometry = pageViewContext.getState().bridgeGeometry;
|
|
3873
|
+
if (!anchor || !geometry || isCanvasRefreshInFlight())
|
|
3874
|
+
return;
|
|
3875
|
+
pendingScrollAnchorRef.current = undefined;
|
|
3876
|
+
const bounds = findBridgeComponentDocumentBounds(geometry, anchor.componentId);
|
|
3877
|
+
const targetScroll = bounds
|
|
3878
|
+
? {
|
|
3879
|
+
x: geometry.scroll.x,
|
|
3880
|
+
y: Math.max(0, (bounds.y - anchor.viewportTop) /
|
|
3881
|
+
getBridgeGeometryScrollScale(geometry)),
|
|
3882
|
+
}
|
|
3883
|
+
: pendingRefreshScrollRef.current;
|
|
3884
|
+
logFieldValueDiagnostic("canvas-load", `scroll anchor ctx=${pageViewContext.debugId} component=${anchor.componentId} top=${Math.round(anchor.viewportTop)} bounds=${bounds ? Math.round(bounds.y) : "none"} target=${targetScroll ? `y=${Math.round(targetScroll.y)}` : "none"}`);
|
|
3885
|
+
if (!targetScroll)
|
|
3886
|
+
return;
|
|
3887
|
+
pendingRefreshScrollRef.current = targetScroll;
|
|
3888
|
+
pendingRefreshScrollCapturedAtRef.current = Date.now();
|
|
3889
|
+
restorePendingRefreshScroll(iframeRef.current, targetScroll, geometry.scroll);
|
|
3890
|
+
}, [
|
|
3891
|
+
// Runs again for each geometry the bridge reports (read above).
|
|
3892
|
+
bridgeGeometryRevision,
|
|
3562
3893
|
isCanvasRefreshInFlight,
|
|
3894
|
+
restorePendingRefreshScroll,
|
|
3563
3895
|
]);
|
|
3564
3896
|
useEffect(() => {
|
|
3565
3897
|
const handleMessage = (message) => {
|
|
@@ -3583,7 +3915,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3583
3915
|
return;
|
|
3584
3916
|
const handleLoad = () => {
|
|
3585
3917
|
setShowSpinner(false);
|
|
3586
|
-
applyIframeZoom(iframe, pageViewContextRef.current?.zoom ?? 1, "PageViewerFrame.tsx:handleLoad-zoom");
|
|
3918
|
+
applyIframeZoom(iframe, pageViewContextRef.current?.getState().zoom ?? 1, "PageViewerFrame.tsx:handleLoad-zoom");
|
|
3587
3919
|
};
|
|
3588
3920
|
iframe.addEventListener("load", handleLoad);
|
|
3589
3921
|
return () => {
|
|
@@ -3653,8 +3985,15 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3653
3985
|
mode: editContext.mode,
|
|
3654
3986
|
readOnly: editContext.readonly,
|
|
3655
3987
|
suggestionsCursorActive: !isBridgeInlineEditing && editContext.mode === "suggestions",
|
|
3988
|
+
commentPickerActive: pickingCommentTarget && !compareView,
|
|
3656
3989
|
});
|
|
3657
|
-
}, [
|
|
3990
|
+
}, [
|
|
3991
|
+
editContext.mode,
|
|
3992
|
+
editContext.readonly,
|
|
3993
|
+
isBridgeInlineEditing,
|
|
3994
|
+
pickingCommentTarget,
|
|
3995
|
+
compareView,
|
|
3996
|
+
]);
|
|
3658
3997
|
useEffect(() => {
|
|
3659
3998
|
const previousMode = previousBridgeInlineEditModeRef.current;
|
|
3660
3999
|
previousBridgeInlineEditModeRef.current = editContext.mode;
|
|
@@ -3688,7 +4027,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3688
4027
|
};
|
|
3689
4028
|
}, [zoom]);
|
|
3690
4029
|
useEffect(() => {
|
|
3691
|
-
if (!
|
|
4030
|
+
if (!bridgeReady ||
|
|
3692
4031
|
(!editContext.dragObject &&
|
|
3693
4032
|
!editContext.selectedForInsertion &&
|
|
3694
4033
|
!editContext.insertMode)) {
|
|
@@ -3702,33 +4041,22 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3702
4041
|
editContext.dragObject,
|
|
3703
4042
|
editContext.insertMode,
|
|
3704
4043
|
editContext.selectedForInsertion,
|
|
3705
|
-
|
|
4044
|
+
bridgeReady,
|
|
3706
4045
|
]);
|
|
4046
|
+
// A device or size change reflows the page: tell the bridge the zoom again
|
|
4047
|
+
// and measure once the transition settled.
|
|
3707
4048
|
useEffect(() => {
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
bridgeClientRef.current?.sendCommand("
|
|
3713
|
-
|
|
3714
|
-
});
|
|
3715
|
-
if (geometryTimer != null) {
|
|
3716
|
-
window.clearTimeout(geometryTimer);
|
|
3717
|
-
}
|
|
3718
|
-
geometryTimer = window.setTimeout(() => {
|
|
3719
|
-
geometryTimer = null;
|
|
3720
|
-
bridgeClientRef.current?.sendCommand("queryGeometry", {});
|
|
3721
|
-
}, ZOOM_TRANSITION_MS + 75);
|
|
3722
|
-
};
|
|
3723
|
-
window.addEventListener(DEVICE_CHANGE_EVENT, sendViewportStateToBridge);
|
|
4049
|
+
bridgeClientRef.current?.sendCommand("setZoom", {
|
|
4050
|
+
zoom: pageViewContext.getState().zoom,
|
|
4051
|
+
});
|
|
4052
|
+
const geometryTimer = window.setTimeout(() => {
|
|
4053
|
+
bridgeClientRef.current?.sendCommand("queryGeometry", {});
|
|
4054
|
+
}, ZOOM_TRANSITION_MS + 75);
|
|
3724
4055
|
return () => {
|
|
3725
|
-
|
|
3726
|
-
window.clearTimeout(geometryTimer);
|
|
3727
|
-
}
|
|
3728
|
-
window.removeEventListener(DEVICE_CHANGE_EVENT, sendViewportStateToBridge);
|
|
4056
|
+
window.clearTimeout(geometryTimer);
|
|
3729
4057
|
};
|
|
3730
|
-
}, [
|
|
3731
|
-
const shouldRenderMiniMap = !
|
|
4058
|
+
}, [pageViewContext, device, deviceWidth, deviceHeight]);
|
|
4059
|
+
const shouldRenderMiniMap = !fullscreen &&
|
|
3732
4060
|
showMiniMap &&
|
|
3733
4061
|
editContext.showMinimap &&
|
|
3734
4062
|
!editContext.isMobile &&
|
|
@@ -3746,6 +4074,58 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3746
4074
|
const miniMapColumnWidth = editContext.configuration.outline.width || 100;
|
|
3747
4075
|
const reportCompareFrameWidth = slotContext?.reportCompareFrameWidth;
|
|
3748
4076
|
const miniMapReservedWidth = shouldRenderMiniMap ? miniMapColumnWidth : 0;
|
|
4077
|
+
// The pane's content width decides how wide the comment margin is beside
|
|
4078
|
+
// the canvas. The pane is the splitter panel around this frame, so resizing
|
|
4079
|
+
// the margin inside it does not change the measurement (no flapping).
|
|
4080
|
+
const [frameContainerWidth, setFrameContainerWidth] = useState();
|
|
4081
|
+
useLayoutEffect(() => {
|
|
4082
|
+
const container = frameContainerRef.current;
|
|
4083
|
+
if (!container || typeof ResizeObserver === "undefined")
|
|
4084
|
+
return;
|
|
4085
|
+
const measure = () => {
|
|
4086
|
+
const style = window.getComputedStyle(container);
|
|
4087
|
+
const padding = (parseFloat(style.paddingLeft) || 0) +
|
|
4088
|
+
(parseFloat(style.paddingRight) || 0);
|
|
4089
|
+
const width = container.clientWidth - padding;
|
|
4090
|
+
setFrameContainerWidth((previous) => previous === width ? previous : width);
|
|
4091
|
+
};
|
|
4092
|
+
measure();
|
|
4093
|
+
const observer = new ResizeObserver(measure);
|
|
4094
|
+
observer.observe(container);
|
|
4095
|
+
return () => observer.disconnect();
|
|
4096
|
+
}, []);
|
|
4097
|
+
// The comment margin sits beside the canvas of the primary pane. Compare
|
|
4098
|
+
// panes share one iframe width, so its column counts against the width
|
|
4099
|
+
// this pane reports exactly like the minimap column does.
|
|
4100
|
+
const shouldRenderFeedbackMargin = shouldShowFeedbackMargin({
|
|
4101
|
+
showComments: !!editContext.showComments,
|
|
4102
|
+
compareView,
|
|
4103
|
+
isMobile: !!editContext.isMobile,
|
|
4104
|
+
fullscreen: !!fullscreen,
|
|
4105
|
+
slotActive: slotContext?.isActive ?? true,
|
|
4106
|
+
hasLayout: !!page?.item?.hasLayout,
|
|
4107
|
+
});
|
|
4108
|
+
// Takes the width the user dragged it to (or the rail they dragged it into)
|
|
4109
|
+
// where the pane has room for it; narrows first, then collapses into a
|
|
4110
|
+
// rail; never hidden for lack of room.
|
|
4111
|
+
const feedbackMarginPreferredWidth = useFeedbackMarginPreferredWidth();
|
|
4112
|
+
const feedbackMarginCollapsed = useFeedbackMarginCollapsed();
|
|
4113
|
+
const feedbackMarginRoom = getFeedbackMarginRoom({
|
|
4114
|
+
paneWidth: frameContainerWidth,
|
|
4115
|
+
reservedWidth: miniMapReservedWidth,
|
|
4116
|
+
});
|
|
4117
|
+
const feedbackMarginSize = resolveFeedbackMarginSize({
|
|
4118
|
+
paneWidth: frameContainerWidth,
|
|
4119
|
+
reservedWidth: miniMapReservedWidth,
|
|
4120
|
+
maxWidth: feedbackMarginPreferredWidth,
|
|
4121
|
+
minWidth: FEEDBACK_MARGIN_MIN_WIDTH,
|
|
4122
|
+
railWidth: FEEDBACK_MARGIN_RAIL_WIDTH,
|
|
4123
|
+
collapsed: feedbackMarginCollapsed,
|
|
4124
|
+
});
|
|
4125
|
+
const feedbackMarginReservedWidth = shouldRenderFeedbackMargin
|
|
4126
|
+
? feedbackMarginSize.width
|
|
4127
|
+
: 0;
|
|
4128
|
+
const overlayInvalidationKey = `${zoom}:${bridgeGeometryRevision}:${feedbackMarginReservedWidth}`;
|
|
3749
4129
|
useLayoutEffect(() => {
|
|
3750
4130
|
if (!inCompareMode || !reportCompareFrameWidth)
|
|
3751
4131
|
return;
|
|
@@ -3756,7 +4136,10 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3756
4136
|
const style = window.getComputedStyle(container);
|
|
3757
4137
|
const padding = (parseFloat(style.paddingLeft) || 0) +
|
|
3758
4138
|
(parseFloat(style.paddingRight) || 0);
|
|
3759
|
-
const available = container.clientWidth -
|
|
4139
|
+
const available = container.clientWidth -
|
|
4140
|
+
padding -
|
|
4141
|
+
miniMapReservedWidth -
|
|
4142
|
+
feedbackMarginReservedWidth;
|
|
3760
4143
|
reportCompareFrameWidth(compareFrameView, available > 0 ? available : undefined);
|
|
3761
4144
|
};
|
|
3762
4145
|
report();
|
|
@@ -3768,6 +4151,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3768
4151
|
reportCompareFrameWidth,
|
|
3769
4152
|
compareFrameView,
|
|
3770
4153
|
miniMapReservedWidth,
|
|
4154
|
+
feedbackMarginReservedWidth,
|
|
3771
4155
|
]);
|
|
3772
4156
|
// Withdraw this pane's report only on unmount, so a minimap toggle or a
|
|
3773
4157
|
// resize does not briefly drop the other pane back to full width.
|
|
@@ -3775,34 +4159,42 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3775
4159
|
return () => reportCompareFrameWidth?.(compareFrameView, undefined);
|
|
3776
4160
|
}, [reportCompareFrameWidth, compareFrameView]);
|
|
3777
4161
|
const sharedCompareFrameWidth = useSyncExternalStore(slotContext?.subscribeCompareFrameWidth ?? subscribeToNothing, slotContext?.getCompareFrameWidth ?? getUndefined, getUndefined);
|
|
3778
|
-
if (
|
|
4162
|
+
if (page?.item && !page.item.hasLayout) {
|
|
3779
4163
|
return _jsx(NoLayout, {});
|
|
3780
4164
|
}
|
|
3781
|
-
const isResponsiveDevice =
|
|
3782
|
-
|
|
3783
|
-
const deviceHeight = pageViewContext.device === "desktop" || !pageViewContext.deviceHeight
|
|
3784
|
-
? "100%"
|
|
3785
|
-
: pageViewContext.deviceHeight || 640;
|
|
4165
|
+
const isResponsiveDevice = device === "desktop" || device === "Responsive";
|
|
4166
|
+
const frameHeight = device === "desktop" || !deviceHeight ? "100%" : deviceHeight || 640;
|
|
3786
4167
|
const compareFrameWidth = inCompareMode ? sharedCompareFrameWidth : undefined;
|
|
3787
|
-
const
|
|
4168
|
+
const frameWidth = isResponsiveDevice
|
|
3788
4169
|
? compareFrameWidth !== undefined
|
|
3789
|
-
? compareFrameWidth +
|
|
4170
|
+
? compareFrameWidth +
|
|
4171
|
+
miniMapReservedWidth +
|
|
4172
|
+
feedbackMarginReservedWidth +
|
|
4173
|
+
"px"
|
|
3790
4174
|
: "100%"
|
|
3791
4175
|
: inCompareMode
|
|
3792
|
-
? (
|
|
3793
|
-
|
|
4176
|
+
? (deviceWidth || 640) +
|
|
4177
|
+
miniMapReservedWidth +
|
|
4178
|
+
feedbackMarginReservedWidth +
|
|
4179
|
+
"px"
|
|
4180
|
+
: (deviceWidth || 640) +
|
|
3794
4181
|
editContext.configuration.outline.width +
|
|
4182
|
+
feedbackMarginReservedWidth +
|
|
3795
4183
|
"px";
|
|
3796
4184
|
const showSuggestionsCursor = !isBridgeInlineEditing && editContext.mode === "suggestions";
|
|
3797
|
-
|
|
3798
|
-
|
|
4185
|
+
const showDynamicRenderingsStrip = !compareView &&
|
|
4186
|
+
editContext.mode === "preview" &&
|
|
4187
|
+
interactivePreview.renderingIds.length > 0;
|
|
4188
|
+
return (_jsxs("div", { ref: frameContainerRef, className: cn("relative flex h-full w-full flex-col items-center select-none", className, editContext.showAgentsPanel && !editContext.currentWizardId && "pr-0"), children: [!fullscreen && _jsx(EditorWarnings, { item: page?.item }), slotCloseButton && (_jsx("div", { className: "absolute top-3 right-3 z-50", children: slotCloseButton })), fullscreen && (_jsxs("div", { className: "border-neutral-grey-15 relative z-40 grid h-11 w-full shrink-0 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center border-b bg-white px-3 shadow-sm", "data-testid": "fullscreen-page-title-bar", children: [_jsx("div", { className: "w-full min-w-0 pr-3 text-left", children: _jsx(PageSelector, { itemDescriptor: page?.item, variant: "fullscreen" }) }), _jsx("div", { className: "justify-self-center", children: _jsx(FullscreenControls, { pageViewContext: pageViewContext, canExit: !editContext.configuration.forceFullscreen, onExit: () => editContext.setFullscreen(false) }) }), _jsx("div", { "aria-hidden": "true" })] })), showDynamicRenderingsStrip && (_jsx(DynamicRenderingsStrip, { page: interactivePreviewPage, renderingIds: interactivePreview.renderingIds, getCanvasUrl: getPreviewCanvasUrl })), device !== "desktop" && (_jsx(DeviceToolbar, { pageViewContext: pageViewContext, configuration: editContext.configuration })), _jsxs("div", { className: "relative flex min-h-0 flex-1 transition-[width] duration-300 ease-in-out select-none motion-reduce:transition-none", "data-testid": "page-viewer-viewport", style: {
|
|
4189
|
+
width: frameWidth,
|
|
3799
4190
|
}, children: [_jsxs("div", { className: "relative h-full w-full overflow-visible", onMouseLeave: () => {
|
|
3800
|
-
if (pageViewContext.bridgeInteraction?.kind === "hover") {
|
|
4191
|
+
if (pageViewContext.getState().bridgeInteraction?.kind === "hover") {
|
|
4192
|
+
setPasteCleanupMenu(undefined);
|
|
3801
4193
|
setBridgeInteraction(undefined);
|
|
3802
4194
|
pageViewContext.setBridgeInteraction(undefined);
|
|
3803
4195
|
}
|
|
3804
4196
|
}, children: [_jsx("iframe", { ref: bindIframeRef, className: "page-iframe h-full w-full bg-white transition-[height] duration-300 ease-in-out motion-reduce:transition-none", style: {
|
|
3805
|
-
height:
|
|
4197
|
+
height: frameHeight,
|
|
3806
4198
|
// The iframe element exists before its document has loaded. Keep
|
|
3807
4199
|
// that blank document out of both the UI and accessibility tree;
|
|
3808
4200
|
// consumers can treat a visible canvas as a rendered canvas.
|
|
@@ -3810,7 +4202,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3810
4202
|
cursor: showSuggestionsCursor
|
|
3811
4203
|
? SUGGESTIONS_CURSOR_VALUE
|
|
3812
4204
|
: undefined,
|
|
3813
|
-
},
|
|
4205
|
+
}, "data-testid": "pageEditoriframe", onLoad: () => {
|
|
3814
4206
|
const iframe = iframeRef.current;
|
|
3815
4207
|
if (iframeSrc && iframe) {
|
|
3816
4208
|
parentBridgeInjectionRef.current?.dispose();
|
|
@@ -3823,13 +4215,18 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3823
4215
|
latestParentBridgeInjectionRef.current =
|
|
3824
4216
|
parentBridgeInjectionRef.current.attempt;
|
|
3825
4217
|
}
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
4218
|
+
if (iframeSrc) {
|
|
4219
|
+
const inFlightLoad = inFlightCanvasLoadRef.current;
|
|
4220
|
+
if (inFlightLoad &&
|
|
4221
|
+
inFlightLoad.requestedSrc === iframeSrc &&
|
|
4222
|
+
inFlightLoad.loadedAt === undefined) {
|
|
4223
|
+
inFlightLoad.loadedAt = Date.now();
|
|
4224
|
+
}
|
|
4225
|
+
setLoadedIframeSrc(iframeSrc);
|
|
3829
4226
|
}
|
|
3830
4227
|
const sendZoomToBridge = () => {
|
|
3831
4228
|
bridgeClientRef.current?.sendCommand("setZoom", {
|
|
3832
|
-
zoom: pageViewContextRef.current?.zoom ?? zoom,
|
|
4229
|
+
zoom: pageViewContextRef.current?.getState().zoom ?? zoom,
|
|
3833
4230
|
});
|
|
3834
4231
|
};
|
|
3835
4232
|
sendZoomToBridge();
|
|
@@ -3843,6 +4240,6 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
|
|
|
3843
4240
|
}
|
|
3844
4241
|
completeCanvasRefresh();
|
|
3845
4242
|
}
|
|
3846
|
-
} }), iframeElement && (
|
|
4243
|
+
} }, "canvas"), _jsxs(OverviewRulerContext.Provider, { value: overviewRulerStore, children: [iframeElement && (_jsxs(IframeOverlayProvider, { iframe: iframeElement, mode: "scrolling", scrollScale: 1, visualScale: 1, invalidationKey: overlayInvalidationKey, deferredInvalidationMs: ZOOM_TRANSITION_MS + 50, bleed: { top: 2, right: 150, bottom: 2, left: 2 }, children: [_jsx(PageEditorChrome, { iframe: iframeElement, compareView: compareView, pageViewContext: pageViewContext, bridgeInteraction: bridgeInteraction, onBridgeRichTextCommand: sendApplyRichTextCommand }), pasteCleanupMenu && editContext.mode !== "preview" && (_jsx(BridgePasteCleanupOverlay, { iframe: iframeElement, menu: pasteCleanupMenu, onCommand: sendPasteCleanupCommand }))] })), _jsx(CanvasOverviewRuler, { height: frameHeight })] }), deviceHeight && device && (_jsx("div", { className: "bg-neutral-grey-5 relative z-40 h-full w-full" }))] }), shouldRenderFeedbackMargin && (_jsx(FeedbackMargin, { iframe: iframeElement, pageViewContext: pageViewContext, height: frameHeight, size: feedbackMarginSize, maxResizeWidth: feedbackMarginRoom, invalidationKey: overlayInvalidationKey, deferredInvalidationMs: ZOOM_TRANSITION_MS + 50 })), shouldRenderMiniMap && (_jsx(MiniMap, { compareView: compareView, scroll: scroll, mainViewIframeRef: iframeRef, pageViewContext: pageViewContext })), showSpinner && (_jsxs(_Fragment, { children: [_jsx("div", { className: "bg-neutral-grey-5/50 absolute top-0 left-0 h-full w-full" }), _jsx("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 transform", children: _jsx(Spinner, {}) })] }))] }), _jsx(FieldActionsOverlay, { ref: fieldActionsOverlay, generatorButtons: contextMenuFieldButtons, onActionClick: handleActionClick, onParameterizedActionExecute: handleParameterizedActionExecute, currentOverlay: editContext?.currentOverlay, fieldId: contextMenuField?.fieldId || "", setCurrentOverlay: editContext?.setCurrentOverlay || (() => { }), preSelectedAction: preSelectedAction })] }));
|
|
3847
4244
|
}
|
|
3848
4245
|
//# sourceMappingURL=PageViewerFrame.js.map
|