@parhelia/core 0.3.12831 → 0.3.12833
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/editor/agent-changes/agentChangeTargets.d.ts +58 -0
- package/dist/editor/agent-changes/agentChangeTargets.js +180 -0
- package/dist/editor/agent-changes/agentChangeTargets.js.map +1 -0
- package/dist/editor/agent-changes/agentChangeTextHighlight.d.ts +101 -0
- package/dist/editor/agent-changes/agentChangeTextHighlight.js +167 -0
- package/dist/editor/agent-changes/agentChangeTextHighlight.js.map +1 -0
- package/dist/editor/ai/AgentImagePreview.d.ts +13 -0
- package/dist/editor/ai/AgentImagePreview.js +41 -0
- package/dist/editor/ai/AgentImagePreview.js.map +1 -0
- package/dist/editor/ai/activityRowNavigation.d.ts +28 -0
- package/dist/editor/ai/activityRowNavigation.js +53 -0
- package/dist/editor/ai/activityRowNavigation.js.map +1 -0
- package/dist/editor/ai/terminal/activeReasoningModel.d.ts +9 -0
- package/dist/editor/ai/terminal/activeReasoningModel.js +20 -0
- package/dist/editor/ai/terminal/activeReasoningModel.js.map +1 -0
- package/dist/editor/ai/terminal/agentDurations.d.ts +27 -0
- package/dist/editor/ai/terminal/agentDurations.js +89 -0
- package/dist/editor/ai/terminal/agentDurations.js.map +1 -0
- package/dist/editor/ai/terminal/agentTurnTiming.d.ts +35 -0
- package/dist/editor/ai/terminal/agentTurnTiming.js +128 -0
- package/dist/editor/ai/terminal/agentTurnTiming.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentMemorySettingsSection.d.ts +9 -0
- package/dist/editor/ai/terminal/components/AgentMemorySettingsSection.js +75 -0
- package/dist/editor/ai/terminal/components/AgentMemorySettingsSection.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentProfileRecovery.d.ts +10 -0
- package/dist/editor/ai/terminal/components/AgentProfileRecovery.js +12 -0
- package/dist/editor/ai/terminal/components/AgentProfileRecovery.js.map +1 -0
- package/dist/editor/ai/terminal/components/CreateItemToolCallContent.d.ts +3 -0
- package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js +47 -0
- package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js.map +1 -0
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.d.ts +15 -0
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.js +62 -0
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.js.map +1 -0
- 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/toolCallResultJson.d.ts +1 -0
- package/dist/editor/ai/terminal/components/toolCallResultJson.js +46 -0
- package/dist/editor/ai/terminal/components/toolCallResultJson.js.map +1 -0
- package/dist/editor/ai/terminal/reasoningEffortLevels.d.ts +8 -0
- package/dist/editor/ai/terminal/reasoningEffortLevels.js +54 -0
- package/dist/editor/ai/terminal/reasoningEffortLevels.js.map +1 -0
- package/dist/editor/ai/terminal/requestUsage.d.ts +3 -0
- package/dist/editor/ai/terminal/requestUsage.js +22 -0
- package/dist/editor/ai/terminal/requestUsage.js.map +1 -0
- 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/useAgentProviderWait.d.ts +18 -0
- package/dist/editor/ai/terminal/useAgentProviderWait.js +23 -0
- package/dist/editor/ai/terminal/useAgentProviderWait.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentReasoningEffortState.d.ts +5 -0
- package/dist/editor/ai/terminal/useAgentReasoningEffortState.js +10 -0
- package/dist/editor/ai/terminal/useAgentReasoningEffortState.js.map +1 -0
- package/dist/editor/bridge/bridgeKeys.d.ts +5 -0
- package/dist/editor/bridge/bridgeKeys.js +8 -0
- package/dist/editor/bridge/bridgeKeys.js.map +1 -0
- package/dist/editor/bridge/linkDownload.d.ts +3 -0
- package/dist/editor/bridge/linkDownload.js +52 -0
- package/dist/editor/bridge/linkDownload.js.map +1 -0
- package/dist/editor/client/SessionsDialog.d.ts +2 -0
- package/dist/editor/client/SessionsDialog.js +27 -0
- package/dist/editor/client/SessionsDialog.js.map +1 -0
- package/dist/editor/client/agentLoadItemPolicy.d.ts +22 -0
- package/dist/editor/client/agentLoadItemPolicy.js +60 -0
- package/dist/editor/client/agentLoadItemPolicy.js.map +1 -0
- 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/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/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/localUserEditActivity.d.ts +3 -0
- package/dist/editor/client/localUserEditActivity.js +12 -0
- package/dist/editor/client/localUserEditActivity.js.map +1 -0
- 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/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/mediaCommands.d.ts +5 -0
- package/dist/editor/commands/mediaCommands.js +59 -0
- package/dist/editor/commands/mediaCommands.js.map +1 -0
- 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/componentVisualMode.d.ts +14 -0
- package/dist/editor/componentVisualMode.js +43 -0
- package/dist/editor/componentVisualMode.js.map +1 -0
- package/dist/editor/field-types/FieldHistoryBoundary.d.ts +7 -0
- package/dist/editor/field-types/FieldHistoryBoundary.js +40 -0
- package/dist/editor/field-types/FieldHistoryBoundary.js.map +1 -0
- 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/utils/changeHighlight.d.ts +32 -0
- package/dist/editor/field-types/richtext/utils/changeHighlight.js +68 -0
- package/dist/editor/field-types/richtext/utils/changeHighlight.js.map +1 -0
- 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/useFormFieldSelectionRange.d.ts +43 -0
- package/dist/editor/field-types/useFormFieldSelectionRange.js +149 -0
- package/dist/editor/field-types/useFormFieldSelectionRange.js.map +1 -0
- package/dist/editor/find-replace/FindReplacePanel.d.ts +11 -0
- package/dist/editor/find-replace/FindReplacePanel.js +311 -0
- package/dist/editor/find-replace/FindReplacePanel.js.map +1 -0
- package/dist/editor/find-replace/findReplaceCommand.d.ts +8 -0
- package/dist/editor/find-replace/findReplaceCommand.js +25 -0
- package/dist/editor/find-replace/findReplaceCommand.js.map +1 -0
- package/dist/editor/find-replace/findReplaceMatches.d.ts +42 -0
- package/dist/editor/find-replace/findReplaceMatches.js +66 -0
- package/dist/editor/find-replace/findReplaceMatches.js.map +1 -0
- package/dist/editor/find-replace/findReplaceStore.d.ts +30 -0
- package/dist/editor/find-replace/findReplaceStore.js +61 -0
- package/dist/editor/find-replace/findReplaceStore.js.map +1 -0
- package/dist/editor/find-replace/findReplaceTargets.d.ts +51 -0
- package/dist/editor/find-replace/findReplaceTargets.js +110 -0
- package/dist/editor/find-replace/findReplaceTargets.js.map +1 -0
- package/dist/editor/find-replace/findReplaceText.d.ts +50 -0
- package/dist/editor/find-replace/findReplaceText.js +189 -0
- package/dist/editor/find-replace/findReplaceText.js.map +1 -0
- package/dist/editor/itemContextMenuGroups.d.ts +16 -0
- package/dist/editor/itemContextMenuGroups.js +57 -0
- package/dist/editor/itemContextMenuGroups.js.map +1 -0
- 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/UploadMediaFileDialog.d.ts +5 -0
- package/dist/editor/media-selector/UploadMediaFileDialog.js +14 -0
- package/dist/editor/media-selector/UploadMediaFileDialog.js.map +1 -0
- 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/OpenPublishedPageButton.d.ts +1 -0
- package/dist/editor/menubar/OpenPublishedPageButton.js +22 -0
- package/dist/editor/menubar/OpenPublishedPageButton.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.d.ts +11 -0
- package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js +65 -0
- package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/FindReplaceControls.d.ts +6 -0
- package/dist/editor/menubar/toolbar-sections/FindReplaceControls.js +31 -0
- package/dist/editor/menubar/toolbar-sections/FindReplaceControls.js.map +1 -0
- 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/mobileBottomPanel.d.ts +40 -0
- package/dist/editor/mobileBottomPanel.js +63 -0
- package/dist/editor/mobileBottomPanel.js.map +1 -0
- package/dist/editor/page-editor-chrome/AgentChangeHighlightings.d.ts +17 -0
- package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js +33 -0
- package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js.map +1 -0
- 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/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/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 +29 -0
- package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js +295 -0
- package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js.map +1 -0
- 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/FindReplaceHighlightings.d.ts +11 -0
- package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js +120 -0
- package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js.map +1 -0
- 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/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/diffRulerSegments.d.ts +18 -0
- package/dist/editor/page-editor-chrome/diffRulerSegments.js +37 -0
- package/dist/editor/page-editor-chrome/diffRulerSegments.js.map +1 -0
- 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/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-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/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/FeedbackMargin.d.ts +57 -0
- package/dist/editor/page-viewer/FeedbackMargin.js +377 -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/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/PreviewModeNotice.d.ts +7 -0
- package/dist/editor/page-viewer/PreviewModeNotice.js +19 -0
- package/dist/editor/page-viewer/PreviewModeNotice.js.map +1 -0
- 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/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/compareFrameWidth.d.ts +8 -0
- package/dist/editor/page-viewer/compareFrameWidth.js +25 -0
- package/dist/editor/page-viewer/compareFrameWidth.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.d.ts +2 -0
- package/dist/editor/page-viewer/minimapViewport.js +34 -0
- package/dist/editor/page-viewer/minimapViewport.js.map +1 -0
- 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/previewEditAttempt.d.ts +31 -0
- package/dist/editor/page-viewer/previewEditAttempt.js +68 -0
- package/dist/editor/page-viewer/previewEditAttempt.js.map +1 -0
- 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/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/CommentImageAttachments.d.ts +12 -0
- package/dist/editor/reviews/CommentImageAttachments.js +19 -0
- package/dist/editor/reviews/CommentImageAttachments.js.map +1 -0
- package/dist/editor/reviews/CommentQuote.d.ts +13 -0
- package/dist/editor/reviews/CommentQuote.js +35 -0
- package/dist/editor/reviews/CommentQuote.js.map +1 -0
- 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 +28 -0
- package/dist/editor/reviews/CommentThreadAgentLink.js +37 -0
- package/dist/editor/reviews/CommentThreadAgentLink.js.map +1 -0
- 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/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/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/commentAgentAttachments.d.ts +5 -0
- package/dist/editor/reviews/commentAgentAttachments.js +51 -0
- package/dist/editor/reviews/commentAgentAttachments.js.map +1 -0
- package/dist/editor/reviews/commentImages.d.ts +48 -0
- package/dist/editor/reviews/commentImages.js +128 -0
- package/dist/editor/reviews/commentImages.js.map +1 -0
- 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/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/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/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 +80 -0
- package/dist/editor/reviews/useCommentImagePaste.js +252 -0
- package/dist/editor/reviews/useCommentImagePaste.js.map +1 -0
- 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/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/migrationService.d.ts +31 -0
- package/dist/editor/services/migrationService.js +22 -0
- package/dist/editor/services/migrationService.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/publicSiteService.d.ts +40 -0
- package/dist/editor/services/publicSiteService.js +5 -0
- package/dist/editor/services/publicSiteService.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/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/settings/MigrationJournalCard.d.ts +12 -0
- package/dist/editor/settings/MigrationJournalCard.js +114 -0
- package/dist/editor/settings/MigrationJournalCard.js.map +1 -0
- package/dist/editor/settings/panels/McpAccessPanel.d.ts +7 -0
- package/dist/editor/settings/panels/McpAccessPanel.js +95 -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/PublicSiteEntryDialog.d.ts +8 -0
- package/dist/editor/settings/panels/PublicSiteEntryDialog.js +113 -0
- package/dist/editor/settings/panels/PublicSiteEntryDialog.js.map +1 -0
- package/dist/editor/settings/panels/PublicSitesPanel.d.ts +1 -0
- package/dist/editor/settings/panels/PublicSitesPanel.js +153 -0
- package/dist/editor/settings/panels/PublicSitesPanel.js.map +1 -0
- 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/publicSiteHelpers.d.ts +6 -0
- package/dist/editor/settings/panels/publicSiteHelpers.js +30 -0
- package/dist/editor/settings/panels/publicSiteHelpers.js.map +1 -0
- 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.d.ts +14 -0
- package/dist/editor/sidebar/OperationDetailsContent.js +571 -0
- package/dist/editor/sidebar/OperationDetailsContent.js.map +1 -0
- package/dist/editor/sidebar/liveComponentThumbnails.d.ts +66 -0
- package/dist/editor/sidebar/liveComponentThumbnails.js +225 -0
- package/dist/editor/sidebar/liveComponentThumbnails.js.map +1 -0
- 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/ParheliaMark.d.ts +15 -0
- package/dist/editor/ui/ParheliaMark.js +12 -0
- package/dist/editor/ui/ParheliaMark.js.map +1 -0
- package/dist/editor/ui/PublishReadinessSummary.d.ts +12 -0
- package/dist/editor/ui/PublishReadinessSummary.js +34 -0
- package/dist/editor/ui/PublishReadinessSummary.js.map +1 -0
- 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/publishReadiness.d.ts +98 -0
- package/dist/editor/ui/publishReadiness.js +307 -0
- package/dist/editor/ui/publishReadiness.js.map +1 -0
- package/dist/editor/ui/usePublishingItem.d.ts +8 -0
- package/dist/editor/ui/usePublishingItem.js +47 -0
- package/dist/editor/ui/usePublishingItem.js.map +1 -0
- package/dist/editor/undoEligibility.d.ts +2 -0
- package/dist/editor/undoEligibility.js +8 -0
- package/dist/editor/undoEligibility.js.map +1 -0
- 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/linkDisplay.d.ts +12 -0
- package/dist/editor/utils/linkDisplay.js +23 -0
- package/dist/editor/utils/linkDisplay.js.map +1 -0
- package/dist/editor/validation/ValidationIssuesPopover.d.ts +39 -0
- package/dist/editor/validation/ValidationIssuesPopover.js +51 -0
- package/dist/editor/validation/ValidationIssuesPopover.js.map +1 -0
- package/dist/editor/validation/navigateToValidationIssue.d.ts +13 -0
- package/dist/editor/validation/navigateToValidationIssue.js +43 -0
- package/dist/editor/validation/navigateToValidationIssue.js.map +1 -0
- package/dist/editor/validation/validationFixAgent.d.ts +26 -0
- package/dist/editor/validation/validationFixAgent.js +124 -0
- package/dist/editor/validation/validationFixAgent.js.map +1 -0
- 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/validation/validationSeverity.d.ts +15 -0
- package/dist/editor/validation/validationSeverity.js +47 -0
- package/dist/editor/validation/validationSeverity.js.map +1 -0
- package/dist/lib/viewportClip.d.ts +18 -0
- package/dist/lib/viewportClip.js +22 -0
- package/dist/lib/viewportClip.js.map +1 -0
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/task-board/components/AttentionPromptDialog.d.ts +13 -0
- package/dist/task-board/components/AttentionPromptDialog.js +45 -0
- package/dist/task-board/components/AttentionPromptDialog.js.map +1 -0
- package/dist/task-board/components/GoalFindingsTable.d.ts +43 -0
- package/dist/task-board/components/GoalFindingsTable.js +160 -0
- package/dist/task-board/components/GoalFindingsTable.js.map +1 -0
- package/dist/task-board/components/IssuePanel.d.ts +31 -0
- package/dist/task-board/components/IssuePanel.js +268 -0
- package/dist/task-board/components/IssuePanel.js.map +1 -0
- package/dist/task-board/components/ProjectProgressIndicator.d.ts +8 -0
- package/dist/task-board/components/ProjectProgressIndicator.js +17 -0
- package/dist/task-board/components/ProjectProgressIndicator.js.map +1 -0
- package/dist/task-board/components/SubgoalFindings.d.ts +40 -0
- package/dist/task-board/components/SubgoalFindings.js +88 -0
- package/dist/task-board/components/SubgoalFindings.js.map +1 -0
- package/dist/task-board/components/commentAuthor.d.ts +14 -0
- package/dist/task-board/components/commentAuthor.js +25 -0
- package/dist/task-board/components/commentAuthor.js.map +1 -0
- package/dist/task-board/services/issueService.d.ts +193 -0
- package/dist/task-board/services/issueService.js +97 -0
- package/dist/task-board/services/issueService.js.map +1 -0
- 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/utils/projectDashboardModel.d.ts +68 -0
- package/dist/task-board/utils/projectDashboardModel.js +369 -0
- package/dist/task-board/utils/projectDashboardModel.js.map +1 -0
- package/dist/task-board/views/ProjectDashboardView.d.ts +28 -0
- package/dist/task-board/views/ProjectDashboardView.js +308 -0
- package/dist/task-board/views/ProjectDashboardView.js.map +1 -0
- package/dist/tour/TourInputBoundary.d.ts +6 -0
- package/dist/tour/TourInputBoundary.js +82 -0
- package/dist/tour/TourInputBoundary.js.map +1 -0
- 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 +112 -6
- package/dist/tour/sandbox-tour.js.map +1 -1
- package/dist/tour/tour-utils.d.ts +6 -0
- package/dist/tour/tour-utils.js +10 -0
- package/dist/tour/tour-utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/editor/page-editor-chrome/bridgeLinkValue.d.ts +0 -10
- package/dist/editor/page-editor-chrome/bridgeLinkValue.js +0 -55
- package/dist/editor/page-editor-chrome/bridgeLinkValue.js.map +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Navigates the canvas iframe to `url` without adding a browser history entry.
|
|
3
|
+
*
|
|
4
|
+
* Browsers record every iframe navigation after the first as an entry in the
|
|
5
|
+
* page's joint session history. The canvas reloads its frame on version
|
|
6
|
+
* switches, hard refreshes and pre-bridge fallbacks, so driving those loads
|
|
7
|
+
* through the `src` attribute made the browser Back button step back through
|
|
8
|
+
* canvas reloads (re-rendering a stale `edit_rev`) before it ever left the
|
|
9
|
+
* page - and the editor's popstate handler never saw a URL change. Traversing
|
|
10
|
+
* such an entry only navigates the iframe: the top-level URL stays put.
|
|
11
|
+
*
|
|
12
|
+
* `location.replace()` swaps the frame's current entry in place instead, and
|
|
13
|
+
* is callable on cross-origin frames. The first load still goes through `src`:
|
|
14
|
+
* navigating away from the initial about:blank document replaces its entry,
|
|
15
|
+
* and consumers that fall back to reading the attribute keep a meaningful
|
|
16
|
+
* value.
|
|
17
|
+
*/
|
|
18
|
+
export function navigateCanvasFrame(iframe, url) {
|
|
19
|
+
if (!iframe.getAttribute("src")) {
|
|
20
|
+
iframe.src = url;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
const frameWindow = iframe.contentWindow;
|
|
25
|
+
if (frameWindow) {
|
|
26
|
+
frameWindow.location.replace(url);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
// A detached or otherwise inaccessible frame window: fall through to the
|
|
32
|
+
// attribute so the canvas still loads, even at the cost of a history entry.
|
|
33
|
+
}
|
|
34
|
+
iframe.src = url;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=canvasFrameNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvasFrameNavigation.js","sourceRoot":"","sources":["../../../src/editor/page-viewer/canvasFrameNavigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAyB,EACzB,GAAW;IAEX,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;QACjB,OAAO;IACT,CAAC;IAED,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC;QACzC,IAAI,WAAW,EAAE,CAAC;YAChB,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAClC,OAAO;QACT,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,yEAAyE;QACzE,4EAA4E;IAC9E,CAAC;IAED,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decides what a pre-bridge re-run of the canvas render effect should do while
|
|
3
|
+
* a full iframe load is still settling.
|
|
4
|
+
*
|
|
5
|
+
* Opening a page sets the iframe src ("initial load"). The effect usually
|
|
6
|
+
* re-runs shortly afterwards with an otherwise identical URL - the edit
|
|
7
|
+
* revision becomes defined once the page model lands, or a dependency changes
|
|
8
|
+
* identity - while the bridge has not connected yet. Routing that re-run
|
|
9
|
+
* through the pre-bridge recovery path issued a second full load that differed
|
|
10
|
+
* only by the edit_rev nonce: a wasted host render and a visible canvas flash.
|
|
11
|
+
*
|
|
12
|
+
* A load is "settling" from the moment its src is set until the bridge is
|
|
13
|
+
* ready, with two bounds: a grace period after the document's load event for
|
|
14
|
+
* the bridge handshake, and an overall cap for loads that never fire it. Inside
|
|
15
|
+
* that window the re-run waits; once it closes the outcome is decided by the
|
|
16
|
+
* bridge: ready and signature unchanged means the load already covered the
|
|
17
|
+
* re-run, ready and signature changed means an incremental bridge refresh, and
|
|
18
|
+
* no bridge means the documented recovery reload for a genuinely failed load.
|
|
19
|
+
*/
|
|
20
|
+
export type InFlightCanvasLoad = {
|
|
21
|
+
/** Render URL without the per-request edit_rev nonce. */
|
|
22
|
+
signatureUrl: string;
|
|
23
|
+
/** The exact src requested, so a stale load event cannot settle a newer load. */
|
|
24
|
+
requestedSrc: string;
|
|
25
|
+
startedAt: number;
|
|
26
|
+
/** Set when the iframe fired `load` for `requestedSrc`. */
|
|
27
|
+
loadedAt?: number;
|
|
28
|
+
};
|
|
29
|
+
/** How long after the iframe load event the bridge handshake may still land. */
|
|
30
|
+
export declare const CANVAS_LOAD_BRIDGE_GRACE_MS = 2000;
|
|
31
|
+
/** Upper bound for a load that never fires its load event. */
|
|
32
|
+
export declare const CANVAS_LOAD_SETTLE_MAX_MS = 15000;
|
|
33
|
+
export declare function isCanvasLoadSettling(load: InFlightCanvasLoad | null | undefined, signatureUrl: string, now: number): boolean;
|
|
34
|
+
export type DeferredCanvasRefreshDecision = "wait" | "skip" | "bridge-refresh" | "reload";
|
|
35
|
+
export declare function resolveDeferredCanvasRefresh(input: {
|
|
36
|
+
bridgeSupportsRefresh: boolean;
|
|
37
|
+
renderSignature: string;
|
|
38
|
+
lastAppliedSignature: string | undefined;
|
|
39
|
+
load: InFlightCanvasLoad | null | undefined;
|
|
40
|
+
signatureUrl: string;
|
|
41
|
+
now: number;
|
|
42
|
+
}): DeferredCanvasRefreshDecision;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decides what a pre-bridge re-run of the canvas render effect should do while
|
|
3
|
+
* a full iframe load is still settling.
|
|
4
|
+
*
|
|
5
|
+
* Opening a page sets the iframe src ("initial load"). The effect usually
|
|
6
|
+
* re-runs shortly afterwards with an otherwise identical URL - the edit
|
|
7
|
+
* revision becomes defined once the page model lands, or a dependency changes
|
|
8
|
+
* identity - while the bridge has not connected yet. Routing that re-run
|
|
9
|
+
* through the pre-bridge recovery path issued a second full load that differed
|
|
10
|
+
* only by the edit_rev nonce: a wasted host render and a visible canvas flash.
|
|
11
|
+
*
|
|
12
|
+
* A load is "settling" from the moment its src is set until the bridge is
|
|
13
|
+
* ready, with two bounds: a grace period after the document's load event for
|
|
14
|
+
* the bridge handshake, and an overall cap for loads that never fire it. Inside
|
|
15
|
+
* that window the re-run waits; once it closes the outcome is decided by the
|
|
16
|
+
* bridge: ready and signature unchanged means the load already covered the
|
|
17
|
+
* re-run, ready and signature changed means an incremental bridge refresh, and
|
|
18
|
+
* no bridge means the documented recovery reload for a genuinely failed load.
|
|
19
|
+
*/
|
|
20
|
+
/** How long after the iframe load event the bridge handshake may still land. */
|
|
21
|
+
export const CANVAS_LOAD_BRIDGE_GRACE_MS = 2000;
|
|
22
|
+
/** Upper bound for a load that never fires its load event. */
|
|
23
|
+
export const CANVAS_LOAD_SETTLE_MAX_MS = 15000;
|
|
24
|
+
export function isCanvasLoadSettling(load, signatureUrl, now) {
|
|
25
|
+
if (!load || load.signatureUrl !== signatureUrl)
|
|
26
|
+
return false;
|
|
27
|
+
if (now - load.startedAt >= CANVAS_LOAD_SETTLE_MAX_MS)
|
|
28
|
+
return false;
|
|
29
|
+
if (load.loadedAt !== undefined &&
|
|
30
|
+
now - load.loadedAt >= CANVAS_LOAD_BRIDGE_GRACE_MS) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
export function resolveDeferredCanvasRefresh(input) {
|
|
36
|
+
if (input.bridgeSupportsRefresh) {
|
|
37
|
+
return input.lastAppliedSignature === input.renderSignature
|
|
38
|
+
? "skip"
|
|
39
|
+
: "bridge-refresh";
|
|
40
|
+
}
|
|
41
|
+
if (isCanvasLoadSettling(input.load, input.signatureUrl, input.now)) {
|
|
42
|
+
return "wait";
|
|
43
|
+
}
|
|
44
|
+
return "reload";
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=canvasLoadSettling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvasLoadSettling.js","sourceRoot":"","sources":["../../../src/editor/page-viewer/canvasLoadSettling.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAYH,gFAAgF;AAChF,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,CAAC;AAChD,8DAA8D;AAC9D,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,CAAC;AAE/C,MAAM,UAAU,oBAAoB,CAClC,IAA2C,EAC3C,YAAoB,EACpB,GAAW;IAEX,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,KAAK,YAAY;QAAE,OAAO,KAAK,CAAC;IAC9D,IAAI,GAAG,GAAG,IAAI,CAAC,SAAS,IAAI,yBAAyB;QAAE,OAAO,KAAK,CAAC;IACpE,IACE,IAAI,CAAC,QAAQ,KAAK,SAAS;QAC3B,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,2BAA2B,EAClD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAQD,MAAM,UAAU,4BAA4B,CAAC,KAO5C;IACC,IAAI,KAAK,CAAC,qBAAqB,EAAE,CAAC;QAChC,OAAO,KAAK,CAAC,oBAAoB,KAAK,KAAK,CAAC,eAAe;YACzD,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,gBAAgB,CAAC;IACvB,CAAC;IACD,IAAI,oBAAoB,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACpE,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Carries the canvas scroll position from a page frame that unmounts to the
|
|
3
|
+
* frame that mounts for the same page right after it.
|
|
4
|
+
*
|
|
5
|
+
* Switching layouts - entering or leaving fullscreen - renders the page in a
|
|
6
|
+
* different part of the React tree, so the old iframe is destroyed and the new
|
|
7
|
+
* one loads the page from scratch at the top. The unmounting frame stashes its
|
|
8
|
+
* scroll here and the new frame uses it as the initial restore target, through
|
|
9
|
+
* the same path that keeps the scroll across canvas reloads.
|
|
10
|
+
*
|
|
11
|
+
* The new canvas usually has a different width (fullscreen vs. sidebars), so
|
|
12
|
+
* the page reflows and the same pixel offset shows different content. When the
|
|
13
|
+
* selected component was in view it is stashed as an anchor, and the new frame
|
|
14
|
+
* puts it back at the same distance from the canvas top.
|
|
15
|
+
*
|
|
16
|
+
* Entries are one-shot and short-lived: they bridge an unmount and a remount
|
|
17
|
+
* that happen together, and must never land a later, unrelated page open at an
|
|
18
|
+
* old offset.
|
|
19
|
+
*/
|
|
20
|
+
import type { BridgeScroll } from "../bridge/protocol";
|
|
21
|
+
import type { ItemDescriptor } from "../pageModel";
|
|
22
|
+
export declare const CANVAS_SCROLL_HANDOFF_TTL_MS = 5000;
|
|
23
|
+
export type CanvasScrollAnchor = {
|
|
24
|
+
componentId: string;
|
|
25
|
+
/** Distance of the component's top from the canvas top, in geometry units. */
|
|
26
|
+
viewportTop: number;
|
|
27
|
+
};
|
|
28
|
+
export type CanvasScrollHandoff = {
|
|
29
|
+
scroll: BridgeScroll;
|
|
30
|
+
anchor?: CanvasScrollAnchor;
|
|
31
|
+
};
|
|
32
|
+
export declare function getCanvasScrollHandoffKey(page: Pick<ItemDescriptor, "id" | "language" | "version">): string;
|
|
33
|
+
export declare function stashCanvasScrollHandoff(key: string, handoff: CanvasScrollHandoff | undefined, now?: number): void;
|
|
34
|
+
export declare function takeCanvasScrollHandoff(key: string, now?: number): CanvasScrollHandoff | undefined;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Carries the canvas scroll position from a page frame that unmounts to the
|
|
3
|
+
* frame that mounts for the same page right after it.
|
|
4
|
+
*
|
|
5
|
+
* Switching layouts - entering or leaving fullscreen - renders the page in a
|
|
6
|
+
* different part of the React tree, so the old iframe is destroyed and the new
|
|
7
|
+
* one loads the page from scratch at the top. The unmounting frame stashes its
|
|
8
|
+
* scroll here and the new frame uses it as the initial restore target, through
|
|
9
|
+
* the same path that keeps the scroll across canvas reloads.
|
|
10
|
+
*
|
|
11
|
+
* The new canvas usually has a different width (fullscreen vs. sidebars), so
|
|
12
|
+
* the page reflows and the same pixel offset shows different content. When the
|
|
13
|
+
* selected component was in view it is stashed as an anchor, and the new frame
|
|
14
|
+
* puts it back at the same distance from the canvas top.
|
|
15
|
+
*
|
|
16
|
+
* Entries are one-shot and short-lived: they bridge an unmount and a remount
|
|
17
|
+
* that happen together, and must never land a later, unrelated page open at an
|
|
18
|
+
* old offset.
|
|
19
|
+
*/
|
|
20
|
+
export const CANVAS_SCROLL_HANDOFF_TTL_MS = 5000;
|
|
21
|
+
const handoffs = new Map();
|
|
22
|
+
export function getCanvasScrollHandoffKey(page) {
|
|
23
|
+
return [page.id, page.language, page.version].join("|");
|
|
24
|
+
}
|
|
25
|
+
export function stashCanvasScrollHandoff(key, handoff, now = Date.now()) {
|
|
26
|
+
for (const [storedKey, stored] of handoffs) {
|
|
27
|
+
if (now - stored.storedAt > CANVAS_SCROLL_HANDOFF_TTL_MS) {
|
|
28
|
+
handoffs.delete(storedKey);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
// A frame at the top with nothing selected in view has nothing to hand
|
|
32
|
+
// over, and must not leave an older offset behind for the next frame.
|
|
33
|
+
const { scroll, anchor } = handoff ?? {};
|
|
34
|
+
if (!scroll || (scroll.x <= 0 && scroll.y <= 0 && !anchor)) {
|
|
35
|
+
handoffs.delete(key);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
handoffs.set(key, {
|
|
39
|
+
handoff: {
|
|
40
|
+
scroll: { x: scroll.x, y: scroll.y },
|
|
41
|
+
...(anchor ? { anchor: { ...anchor } } : {}),
|
|
42
|
+
},
|
|
43
|
+
storedAt: now,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
export function takeCanvasScrollHandoff(key, now = Date.now()) {
|
|
47
|
+
const stored = handoffs.get(key);
|
|
48
|
+
if (!stored)
|
|
49
|
+
return undefined;
|
|
50
|
+
handoffs.delete(key);
|
|
51
|
+
return now - stored.storedAt <= CANVAS_SCROLL_HANDOFF_TTL_MS
|
|
52
|
+
? stored.handoff
|
|
53
|
+
: undefined;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=canvasScrollHandoff.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvasScrollHandoff.js","sourceRoot":"","sources":["../../../src/editor/page-viewer/canvasScrollHandoff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAC;AAajD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAGrB,CAAC;AAEJ,MAAM,UAAU,yBAAyB,CACvC,IAAyD;IAEzD,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,GAAW,EACX,OAAwC,EACxC,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;IAEhB,KAAK,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;QAC3C,IAAI,GAAG,GAAG,MAAM,CAAC,QAAQ,GAAG,4BAA4B,EAAE,CAAC;YACzD,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,uEAAuE;IACvE,sEAAsE;IACtE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IACzC,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3D,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACrB,OAAO;IACT,CAAC;IACD,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE;QAChB,OAAO,EAAE;YACP,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE;YACpC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC7C;QACD,QAAQ,EAAE,GAAG;KACd,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,GAAW,EACX,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;IAEhB,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACrB,OAAO,GAAG,GAAG,MAAM,CAAC,QAAQ,IAAI,4BAA4B;QAC1D,CAAC,CAAC,MAAM,CAAC,OAAO;QAChB,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type CompareFrameView = "primary" | "compare";
|
|
2
|
+
export type CompareFrameWidths = Partial<Record<CompareFrameView, number>>;
|
|
3
|
+
/**
|
|
4
|
+
* The width both compare-view iframes render at, or undefined while either
|
|
5
|
+
* pane has not reported a usable width yet (the panes then keep filling their
|
|
6
|
+
* own space, as outside compare mode).
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveSharedCompareFrameWidth(widths: CompareFrameWidths): number | undefined;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Shared page-iframe width for the compare view.
|
|
2
|
+
//
|
|
3
|
+
// In compare mode the two panes sit in a user-resizable splitter and each pane
|
|
4
|
+
// decides on its own whether the minimap column is visible. Left to itself,
|
|
5
|
+
// each page iframe fills whatever is left in its pane, so the two versions are
|
|
6
|
+
// rendered at different viewport widths and text reflows differently — a
|
|
7
|
+
// changed paragraph then looks different even where the words are identical.
|
|
8
|
+
// Both panes therefore report the width their iframe could take, and both
|
|
9
|
+
// render the iframe at the narrower of the two so the layouts line up.
|
|
10
|
+
/**
|
|
11
|
+
* The width both compare-view iframes render at, or undefined while either
|
|
12
|
+
* pane has not reported a usable width yet (the panes then keep filling their
|
|
13
|
+
* own space, as outside compare mode).
|
|
14
|
+
*/
|
|
15
|
+
export function resolveSharedCompareFrameWidth(widths) {
|
|
16
|
+
const primary = widths.primary;
|
|
17
|
+
const compare = widths.compare;
|
|
18
|
+
if (!isUsableWidth(primary) || !isUsableWidth(compare))
|
|
19
|
+
return undefined;
|
|
20
|
+
return Math.floor(Math.min(primary, compare));
|
|
21
|
+
}
|
|
22
|
+
function isUsableWidth(width) {
|
|
23
|
+
return typeof width === "number" && Number.isFinite(width) && width > 0;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=compareFrameWidth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareFrameWidth.js","sourceRoot":"","sources":["../../../src/editor/page-viewer/compareFrameWidth.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,+EAA+E;AAC/E,yEAAyE;AACzE,6EAA6E;AAC7E,0EAA0E;AAC1E,uEAAuE;AAMvE;;;;GAIG;AACH,MAAM,UAAU,8BAA8B,CAC5C,MAA0B;IAE1B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAC/B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAC/B,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAC;IACzE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,aAAa,CAAC,KAAyB;IAC9C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { FeedbackAnchor } from "../page-editor-chrome/overlay/feedbackAnchorMeasurements";
|
|
2
|
+
import type { FeedbackThread } from "../reviews/feedbackThreads";
|
|
3
|
+
export type MarginMode = "anchored" | "stacked";
|
|
4
|
+
export type AnchoredMarginThread = {
|
|
5
|
+
id: string;
|
|
6
|
+
anchorY: number;
|
|
7
|
+
created: number;
|
|
8
|
+
};
|
|
9
|
+
export type MarginThreadOrder = {
|
|
10
|
+
/** Threads with a position on the page, top to bottom. */
|
|
11
|
+
anchored: AnchoredMarginThread[];
|
|
12
|
+
/** Threads whose anchor is not rendered on this page. */
|
|
13
|
+
unplaced: string[];
|
|
14
|
+
};
|
|
15
|
+
export type RememberedAnchor = {
|
|
16
|
+
anchor: FeedbackAnchor;
|
|
17
|
+
/** When the measurement went away; unset while the thread is measured. */
|
|
18
|
+
lostAt?: number;
|
|
19
|
+
};
|
|
20
|
+
/** How long a thread keeps its last anchor after its measurement went away. */
|
|
21
|
+
export declare const REMEMBERED_ANCHOR_MS = 8000;
|
|
22
|
+
/**
|
|
23
|
+
* The anchor of every thread: its current measurement, or for a short while
|
|
24
|
+
* the last one it had. A canvas reload or re-render drops the measurements
|
|
25
|
+
* for a moment and the cards must not jump into the "content not shown" footer
|
|
26
|
+
* and back; but a thread whose text is really gone (component deleted or
|
|
27
|
+
* hidden) has to end up there, so the memory expires. `remembered` is updated
|
|
28
|
+
* in place; `nextExpiry` is when the result has to be recomputed.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveMarginAnchors(threads: readonly FeedbackThread[], measure: (thread: FeedbackThread) => FeedbackAnchor | undefined, remembered: Map<string, RememberedAnchor>, now: number): {
|
|
31
|
+
anchors: Record<string, FeedbackAnchor | undefined>;
|
|
32
|
+
nextExpiry: number | undefined;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Splits threads into the ones that can sit beside their text and the ones
|
|
36
|
+
* that cannot, and orders the former by anchor. A freshly drafted comment
|
|
37
|
+
* without a measurable anchor is still shown, at `draftFallbackY` (the top of
|
|
38
|
+
* the visible column), so the composer is never hidden in the footer.
|
|
39
|
+
*/
|
|
40
|
+
export declare function orderMarginThreads(threads: readonly FeedbackThread[], anchors: Readonly<Record<string, FeedbackAnchor | undefined>>, draftFallbackY: number): MarginThreadOrder;
|
|
41
|
+
/**
|
|
42
|
+
* Anchored is the normal presentation. The column falls back to a scrolling
|
|
43
|
+
* stack when the cards cannot fit, and only returns once they fit with some
|
|
44
|
+
* slack, so a card growing by a few pixels does not flip the column back and
|
|
45
|
+
* forth.
|
|
46
|
+
*/
|
|
47
|
+
export declare function decideMarginMode(current: MarginMode, fits: boolean, fitsWithSlack: boolean): MarginMode;
|
|
48
|
+
/** Height cap for one card body so a single long thread never exceeds the page. */
|
|
49
|
+
export declare function getCardBodyMaxHeight(columnHeight: number): number;
|
|
50
|
+
/**
|
|
51
|
+
* The narrowest canvas the full margin may leave beside itself. Matches the
|
|
52
|
+
* canvas pane's own minimum splitter width, so the margin never squeezes the
|
|
53
|
+
* canvas below what the pane guarantees on its own.
|
|
54
|
+
*/
|
|
55
|
+
export declare const FEEDBACK_MARGIN_MIN_CANVAS_WIDTH = 320;
|
|
56
|
+
/**
|
|
57
|
+
* `full`: cards beside their text. `rail`: a narrow strip of markers beside
|
|
58
|
+
* their text; the selected thread's card floats over the canvas edge.
|
|
59
|
+
*/
|
|
60
|
+
export type FeedbackMarginPresentation = "full" | "rail";
|
|
61
|
+
export type FeedbackMarginSize = {
|
|
62
|
+
presentation: FeedbackMarginPresentation;
|
|
63
|
+
width: number;
|
|
64
|
+
/**
|
|
65
|
+
* The rail is there because the user collapsed a column the pane has room
|
|
66
|
+
* for: its edge drags the column open again and expanding it docks the
|
|
67
|
+
* column instead of floating it over the canvas.
|
|
68
|
+
*/
|
|
69
|
+
collapsed?: boolean;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* The widest the margin column may be while the canvas keeps
|
|
73
|
+
* `minCanvasWidth`; undefined before the pane has been measured. Also the
|
|
74
|
+
* limit for resizing the column by hand.
|
|
75
|
+
*/
|
|
76
|
+
export declare function getFeedbackMarginRoom({ paneWidth, reservedWidth, minCanvasWidth, }: {
|
|
77
|
+
paneWidth: number | undefined;
|
|
78
|
+
reservedWidth: number;
|
|
79
|
+
minCanvasWidth?: number;
|
|
80
|
+
}): number | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* How wide the margin column is beside the canvas. `paneWidth` is the content
|
|
83
|
+
* width of the canvas pane; before the first measurement it is undefined and
|
|
84
|
+
* the column takes its full width, so it does not flash narrow on mount.
|
|
85
|
+
* `reservedWidth` is what other columns in the pane (the minimap) already take.
|
|
86
|
+
*
|
|
87
|
+
* The column gives up width before the canvas does: it shrinks from `maxWidth`
|
|
88
|
+
* to `minWidth` while the canvas keeps `minCanvasWidth`, and below that
|
|
89
|
+
* collapses into the marker rail. The rail is always shown, even when the
|
|
90
|
+
* canvas then gets less than its minimum: comments never silently disappear
|
|
91
|
+
* while they are switched on. The pane width does not depend on the column,
|
|
92
|
+
* so the result cannot flap. A column the user `collapsed` is the rail even
|
|
93
|
+
* where the pane has room for it.
|
|
94
|
+
*/
|
|
95
|
+
export declare function resolveFeedbackMarginSize({ paneWidth, reservedWidth, maxWidth, minWidth, railWidth, collapsed, minCanvasWidth, }: {
|
|
96
|
+
paneWidth: number | undefined;
|
|
97
|
+
reservedWidth: number;
|
|
98
|
+
maxWidth: number;
|
|
99
|
+
minWidth: number;
|
|
100
|
+
railWidth: number;
|
|
101
|
+
collapsed?: boolean;
|
|
102
|
+
minCanvasWidth?: number;
|
|
103
|
+
}): FeedbackMarginSize;
|
|
104
|
+
export type FeedbackMarginGate = {
|
|
105
|
+
showComments: boolean;
|
|
106
|
+
compareView: boolean;
|
|
107
|
+
isMobile: boolean;
|
|
108
|
+
fullscreen: boolean;
|
|
109
|
+
slotActive: boolean;
|
|
110
|
+
hasLayout: boolean;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* The margin belongs to the primary, active canvas pane of the desktop editor.
|
|
114
|
+
* Compare panes, fullscreen presentation, items without a layout and mobile
|
|
115
|
+
* (which lists comments in a panel below the canvas instead, see
|
|
116
|
+
* MobileCommentsPanel) never show it. A narrow pane does not hide it; it
|
|
117
|
+
* narrows or collapses into a rail (resolveFeedbackMarginSize).
|
|
118
|
+
*/
|
|
119
|
+
export declare function shouldShowFeedbackMargin({ showComments, compareView, isMobile, fullscreen, slotActive, hasLayout, }: FeedbackMarginGate): boolean;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { compareBalloonAnchors } from "../reviews/balloonLayout";
|
|
2
|
+
/** How long a thread keeps its last anchor after its measurement went away. */
|
|
3
|
+
export const REMEMBERED_ANCHOR_MS = 8000;
|
|
4
|
+
/**
|
|
5
|
+
* The anchor of every thread: its current measurement, or for a short while
|
|
6
|
+
* the last one it had. A canvas reload or re-render drops the measurements
|
|
7
|
+
* for a moment and the cards must not jump into the "content not shown" footer
|
|
8
|
+
* and back; but a thread whose text is really gone (component deleted or
|
|
9
|
+
* hidden) has to end up there, so the memory expires. `remembered` is updated
|
|
10
|
+
* in place; `nextExpiry` is when the result has to be recomputed.
|
|
11
|
+
*/
|
|
12
|
+
export function resolveMarginAnchors(threads, measure, remembered, now) {
|
|
13
|
+
const anchors = {};
|
|
14
|
+
const measuredIds = new Set();
|
|
15
|
+
for (const thread of threads) {
|
|
16
|
+
const measured = measure(thread);
|
|
17
|
+
if (!measured)
|
|
18
|
+
continue;
|
|
19
|
+
measuredIds.add(thread.id);
|
|
20
|
+
remembered.set(thread.id, { anchor: measured });
|
|
21
|
+
anchors[thread.id] = measured;
|
|
22
|
+
}
|
|
23
|
+
// Everything else (unmeasured threads, threads of other pages) runs on the
|
|
24
|
+
// clock that started when its measurement was first found missing.
|
|
25
|
+
const listedIds = new Set(threads.map((thread) => thread.id));
|
|
26
|
+
let nextExpiry;
|
|
27
|
+
remembered.forEach((entry, id) => {
|
|
28
|
+
if (measuredIds.has(id))
|
|
29
|
+
return;
|
|
30
|
+
entry.lostAt ??= now;
|
|
31
|
+
const expiry = entry.lostAt + REMEMBERED_ANCHOR_MS;
|
|
32
|
+
if (now >= expiry) {
|
|
33
|
+
remembered.delete(id);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (!listedIds.has(id))
|
|
37
|
+
return;
|
|
38
|
+
anchors[id] = entry.anchor;
|
|
39
|
+
nextExpiry =
|
|
40
|
+
nextExpiry === undefined ? expiry : Math.min(nextExpiry, expiry);
|
|
41
|
+
});
|
|
42
|
+
return { anchors, nextExpiry };
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Splits threads into the ones that can sit beside their text and the ones
|
|
46
|
+
* that cannot, and orders the former by anchor. A freshly drafted comment
|
|
47
|
+
* without a measurable anchor is still shown, at `draftFallbackY` (the top of
|
|
48
|
+
* the visible column), so the composer is never hidden in the footer.
|
|
49
|
+
*/
|
|
50
|
+
export function orderMarginThreads(threads, anchors, draftFallbackY) {
|
|
51
|
+
const anchored = [];
|
|
52
|
+
const unplaced = [];
|
|
53
|
+
for (const thread of threads) {
|
|
54
|
+
const anchor = anchors[thread.id];
|
|
55
|
+
if (anchor) {
|
|
56
|
+
anchored.push({
|
|
57
|
+
id: thread.id,
|
|
58
|
+
anchorY: anchor.y,
|
|
59
|
+
created: thread.created,
|
|
60
|
+
});
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (thread.kind === "comment" && thread.root.isNew) {
|
|
64
|
+
anchored.push({
|
|
65
|
+
id: thread.id,
|
|
66
|
+
anchorY: draftFallbackY,
|
|
67
|
+
created: thread.created,
|
|
68
|
+
});
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
unplaced.push(thread.id);
|
|
72
|
+
}
|
|
73
|
+
anchored.sort(compareBalloonAnchors);
|
|
74
|
+
return { anchored, unplaced };
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Anchored is the normal presentation. The column falls back to a scrolling
|
|
78
|
+
* stack when the cards cannot fit, and only returns once they fit with some
|
|
79
|
+
* slack, so a card growing by a few pixels does not flip the column back and
|
|
80
|
+
* forth.
|
|
81
|
+
*/
|
|
82
|
+
export function decideMarginMode(current, fits, fitsWithSlack) {
|
|
83
|
+
if (current === "anchored")
|
|
84
|
+
return fits ? "anchored" : "stacked";
|
|
85
|
+
return fitsWithSlack ? "anchored" : "stacked";
|
|
86
|
+
}
|
|
87
|
+
/** Height cap for one card body so a single long thread never exceeds the page. */
|
|
88
|
+
export function getCardBodyMaxHeight(columnHeight) {
|
|
89
|
+
if (!Number.isFinite(columnHeight) || columnHeight <= 0)
|
|
90
|
+
return 480;
|
|
91
|
+
return Math.round(Math.min(480, Math.max(240, columnHeight * 0.45)));
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The narrowest canvas the full margin may leave beside itself. Matches the
|
|
95
|
+
* canvas pane's own minimum splitter width, so the margin never squeezes the
|
|
96
|
+
* canvas below what the pane guarantees on its own.
|
|
97
|
+
*/
|
|
98
|
+
export const FEEDBACK_MARGIN_MIN_CANVAS_WIDTH = 320;
|
|
99
|
+
/**
|
|
100
|
+
* The widest the margin column may be while the canvas keeps
|
|
101
|
+
* `minCanvasWidth`; undefined before the pane has been measured. Also the
|
|
102
|
+
* limit for resizing the column by hand.
|
|
103
|
+
*/
|
|
104
|
+
export function getFeedbackMarginRoom({ paneWidth, reservedWidth, minCanvasWidth = FEEDBACK_MARGIN_MIN_CANVAS_WIDTH, }) {
|
|
105
|
+
if (paneWidth === undefined || !Number.isFinite(paneWidth))
|
|
106
|
+
return undefined;
|
|
107
|
+
return Math.floor(paneWidth - reservedWidth - minCanvasWidth);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* How wide the margin column is beside the canvas. `paneWidth` is the content
|
|
111
|
+
* width of the canvas pane; before the first measurement it is undefined and
|
|
112
|
+
* the column takes its full width, so it does not flash narrow on mount.
|
|
113
|
+
* `reservedWidth` is what other columns in the pane (the minimap) already take.
|
|
114
|
+
*
|
|
115
|
+
* The column gives up width before the canvas does: it shrinks from `maxWidth`
|
|
116
|
+
* to `minWidth` while the canvas keeps `minCanvasWidth`, and below that
|
|
117
|
+
* collapses into the marker rail. The rail is always shown, even when the
|
|
118
|
+
* canvas then gets less than its minimum: comments never silently disappear
|
|
119
|
+
* while they are switched on. The pane width does not depend on the column,
|
|
120
|
+
* so the result cannot flap. A column the user `collapsed` is the rail even
|
|
121
|
+
* where the pane has room for it.
|
|
122
|
+
*/
|
|
123
|
+
export function resolveFeedbackMarginSize({ paneWidth, reservedWidth, maxWidth, minWidth, railWidth, collapsed = false, minCanvasWidth = FEEDBACK_MARGIN_MIN_CANVAS_WIDTH, }) {
|
|
124
|
+
const available = getFeedbackMarginRoom({
|
|
125
|
+
paneWidth,
|
|
126
|
+
reservedWidth,
|
|
127
|
+
minCanvasWidth,
|
|
128
|
+
});
|
|
129
|
+
if (available === undefined || available >= minWidth) {
|
|
130
|
+
if (collapsed) {
|
|
131
|
+
return { presentation: "rail", width: railWidth, collapsed: true };
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
presentation: "full",
|
|
135
|
+
width: available === undefined ? maxWidth : Math.min(maxWidth, available),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
return { presentation: "rail", width: railWidth };
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The margin belongs to the primary, active canvas pane of the desktop editor.
|
|
142
|
+
* Compare panes, fullscreen presentation, items without a layout and mobile
|
|
143
|
+
* (which lists comments in a panel below the canvas instead, see
|
|
144
|
+
* MobileCommentsPanel) never show it. A narrow pane does not hide it; it
|
|
145
|
+
* narrows or collapses into a rail (resolveFeedbackMarginSize).
|
|
146
|
+
*/
|
|
147
|
+
export function shouldShowFeedbackMargin({ showComments, compareView, isMobile, fullscreen, slotActive, hasLayout, }) {
|
|
148
|
+
return (showComments &&
|
|
149
|
+
!compareView &&
|
|
150
|
+
!isMobile &&
|
|
151
|
+
!fullscreen &&
|
|
152
|
+
slotActive &&
|
|
153
|
+
hasLayout);
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=feedbackMarginLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedbackMarginLayout.js","sourceRoot":"","sources":["../../../src/editor/page-viewer/feedbackMarginLayout.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type FeedbackAnchor } from "../page-editor-chrome/overlay/feedbackAnchorMeasurements";
|
|
2
|
+
import type { FeedbackThread } from "../reviews/feedbackThreads";
|
|
3
|
+
import type { FeedbackMarginSource } from "./FeedbackMarginController";
|
|
4
|
+
import { type PageViewContext } from "./pageViewContext";
|
|
5
|
+
/**
|
|
6
|
+
* The anchor of every listed thread, with a short memory: a thread that
|
|
7
|
+
* loses its canvas measurement while it is still listed (a suggestion that
|
|
8
|
+
* was just applied or rejected no longer marks the canvas, a page re-render
|
|
9
|
+
* briefly drops a target) keeps its last known anchor, so its card stays
|
|
10
|
+
* beside its text instead of jumping into the "content not shown" footer.
|
|
11
|
+
* Only for a moment, though: text that is really gone (component deleted or
|
|
12
|
+
* hidden) sends its card to the footer once the memory expires.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useRememberedMarginAnchors(threads: readonly FeedbackThread[], measure: (thread: FeedbackThread) => FeedbackAnchor | undefined): Record<string, FeedbackAnchor | undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* The canvas as the margin's surface. Anchors come from the canvas overlay's
|
|
17
|
+
* own measurements (published by the highlight components), so a card can
|
|
18
|
+
* only ever sit where its highlight is; the margin does not measure on its
|
|
19
|
+
* own. Must run inside the margin's `IframeOverlayProvider`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useCanvasMarginSource(pageViewContext: PageViewContext): FeedbackMarginSource;
|
|
22
|
+
/**
|
|
23
|
+
* Anchors every thread to its field in the item form (`[data-field-id]`
|
|
24
|
+
* elements under `form`), in coordinates relative to the form's top. A thread
|
|
25
|
+
* without a field is about the item itself and anchors to the top of the
|
|
26
|
+
* form. Threads whose field is not rendered (a field of another item, a
|
|
27
|
+
* collapsed or hidden section) get no anchor and end up in the margin's
|
|
28
|
+
* footer.
|
|
29
|
+
*/
|
|
30
|
+
export declare function measureFormAnchors(form: HTMLElement, threads: readonly FeedbackThread[]): Record<string, FeedbackAnchor>;
|
|
31
|
+
/**
|
|
32
|
+
* The item form as the margin's surface. The column scrolls natively with the
|
|
33
|
+
* form (both live in `scroller`), so anchors are plain offsets from the top
|
|
34
|
+
* of `form`, re-measured whenever the form changes size or structure.
|
|
35
|
+
*/
|
|
36
|
+
export declare function useFormMarginSource(scroller: HTMLElement | null, form: HTMLElement | null, threads: readonly FeedbackThread[]): FeedbackMarginSource;
|