@parhelia/core 0.4.12818 → 0.4.12871
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 +46 -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/AgentStatusBadge.js +11 -9
- package/dist/editor/ai/AgentStatusBadge.js.map +1 -1
- package/dist/editor/ai/Agents.js +2 -2
- package/dist/editor/ai/Agents.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/agentDiagnostics.d.ts +1 -1
- package/dist/editor/ai/agentDiagnostics.js +8 -0
- package/dist/editor/ai/agentDiagnostics.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/agentSessionSnapshot.d.ts +15 -0
- package/dist/editor/ai/terminal/agentSessionSnapshot.js +103 -3
- package/dist/editor/ai/terminal/agentSessionSnapshot.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionState.js +13 -2
- package/dist/editor/ai/terminal/agentSessionState.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentActivityOverviewPanel.js +7 -7
- 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 +1 -1
- 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/AgentPromptTrayPopovers.js +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.js +1 -1
- package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentSkillSettingsSection.js +2 -2
- package/dist/editor/ai/terminal/components/AgentSkillSettingsSection.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 +40 -22
- 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/ContextInfoBar.js +1 -1
- package/dist/editor/ai/terminal/components/ContextInfoBar.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 +16 -4
- 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/useAgentOperationHistoryLoader.js +5 -1
- package/dist/editor/ai/terminal/useAgentOperationHistoryLoader.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentOperationSocketHandler.js +33 -1
- package/dist/editor/ai/terminal/useAgentOperationSocketHandler.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/useAgentServerReconciler.js +11 -0
- package/dist/editor/ai/terminal/useAgentServerReconciler.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.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js +17 -4
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js +7 -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 +61 -0
- package/dist/editor/bridge/protocol.js +3 -0
- package/dist/editor/bridge/protocol.js.map +1 -1
- package/dist/editor/client/EditorShell.js +335 -125
- 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 +69 -4
- 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 +134 -31
- 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/commands.d.ts +6 -0
- package/dist/editor/commands/commands.js.map +1 -1
- 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 +121 -26
- 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 +373 -174
- 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 +9 -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/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.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 +6 -4
- 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 +16 -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/VersionSelector.js +2 -2
- package/dist/editor/menubar/VersionSelector.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/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/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 +2 -1
- package/dist/editor/menubar/toolbar-sections/index.js +2 -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 +14 -7
- 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 +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/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 +30 -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 -381
- 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 +63 -5
- 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 +15 -5
- package/dist/editor/page-viewer/MiniMap.js +175 -67
- 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 +631 -229
- 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/bridgeKeyboardShortcuts.d.ts +6 -0
- package/dist/editor/page-viewer/bridgeKeyboardShortcuts.js +19 -1
- package/dist/editor/page-viewer/bridgeKeyboardShortcuts.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/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/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 +158 -47
- package/dist/editor/reviews/CommentEditor.js.map +1 -1
- 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/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/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/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/commentAi.d.ts +4 -2
- package/dist/editor/reviews/commentAi.js +19 -12
- package/dist/editor/reviews/commentAi.js.map +1 -1
- 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 +49 -14
- package/dist/editor/reviews/useCommentImagePaste.js +165 -62
- 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/agentStatus.d.ts +1 -0
- package/dist/editor/services/agentStatus.js +14 -0
- package/dist/editor/services/agentStatus.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/index/RecentBatchesList.js +2 -1
- package/dist/editor/settings/index/RecentBatchesList.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/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 +37 -58
- 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 +4 -1
- 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 +7 -3
- package/dist/editor/sidebar/liveComponentThumbnails.js +26 -16
- 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/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/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/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/itemConverters.js +9 -0
- package/dist/editor/utils/itemConverters.js.map +1 -1
- package/dist/editor/utils/keyboardNavigation.js +54 -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 -5
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +7 -0
- package/dist/lib/utils.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 +8 -6
- package/dist/splash-screen/ModernSplashScreen.js.map +1 -1
- package/dist/splash-screen/RecentPages.js +8 -5
- package/dist/splash-screen/RecentPages.js.map +1 -1
- package/dist/task-board/TaskBoardWorkspace.js +218 -35
- package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
- 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/GoalDataView.d.ts +22 -1
- package/dist/task-board/components/GoalDataView.js +63 -17
- package/dist/task-board/components/GoalDataView.js.map +1 -1
- 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/GoalsMatrix.js +33 -6
- package/dist/task-board/components/GoalsMatrix.js.map +1 -1
- 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/ProjectBudgetBanner.js +1 -1
- package/dist/task-board/components/ProjectBudgetBanner.js.map +1 -1
- package/dist/task-board/components/ProjectGoalsPanel.js +66 -13
- package/dist/task-board/components/ProjectGoalsPanel.js.map +1 -1
- 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/TaskAgentPanel.d.ts +2 -0
- package/dist/task-board/components/TaskAgentPanel.js +5 -4
- package/dist/task-board/components/TaskAgentPanel.js.map +1 -1
- package/dist/task-board/components/TaskDetailPanel.js +22 -16
- 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/components/WizardCommunicationCenter.d.ts +2 -0
- package/dist/task-board/components/WizardCommunicationCenter.js +5 -3
- package/dist/task-board/components/WizardCommunicationCenter.js.map +1 -1
- package/dist/task-board/components/WizardCommunicationShared.js +2 -1
- package/dist/task-board/components/WizardCommunicationShared.js.map +1 -1
- package/dist/task-board/components/WizardTask.d.ts +2 -0
- package/dist/task-board/components/WizardTask.js +2 -2
- package/dist/task-board/components/WizardTask.js.map +1 -1
- package/dist/task-board/components/WizardTaskDetailsPanel.d.ts +4 -0
- package/dist/task-board/components/WizardTaskDetailsPanel.js +16 -3
- package/dist/task-board/components/WizardTaskDetailsPanel.js.map +1 -1
- 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/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 +24 -7
- package/dist/task-board/utils/projectDashboardModel.js +14 -0
- 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 +74 -3
- 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,344 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interactive preview: running the client code of dynamic renderings safely,
|
|
3
|
+
* and finding the page's dynamic renderings for the preview strip.
|
|
4
|
+
*
|
|
5
|
+
* The client code of a rendering runs in the edit and preview canvas only once
|
|
6
|
+
* an administrator approved it: the canvas lives on the CM origin with the
|
|
7
|
+
* user's session. The rendering host wraps every
|
|
8
|
+
* dynamic rendering in `<div data-parhelia-rendering="<renderingId>">` and, in
|
|
9
|
+
* preview mode, marks a page that has client code with
|
|
10
|
+
* `<script data-parhelia-has-client-code="<renderingId>,...">`. To try client
|
|
11
|
+
* code that is not approved, the review dialog mints a short-lived preview
|
|
12
|
+
* token and shows a fresh iframe with `sandbox="allow-scripts"` only (an opaque
|
|
13
|
+
* origin: no cookies, no access to the editor) that loads the page through the
|
|
14
|
+
* token's capability URL, where all client code runs. The canvas itself is
|
|
15
|
+
* never replaced.
|
|
16
|
+
*
|
|
17
|
+
* This module holds the pure parts: reading the canvas, building the URLs, the
|
|
18
|
+
* token refresh rule and the session state.
|
|
19
|
+
*/
|
|
20
|
+
export const CLIENT_CODE_HINT_ATTRIBUTE = "data-parhelia-has-client-code";
|
|
21
|
+
export const CLIENT_CODE_HINT_SELECTOR = `script[${CLIENT_CODE_HINT_ATTRIBUTE}]`;
|
|
22
|
+
/** The wrapper the rendering host puts around every dynamic rendering. */
|
|
23
|
+
export const DYNAMIC_RENDERING_ATTRIBUTE = "data-parhelia-rendering";
|
|
24
|
+
export const DYNAMIC_RENDERING_SELECTOR = `[${DYNAMIC_RENDERING_ATTRIBUTE}]`;
|
|
25
|
+
/** The only sandbox flags the interactive frame gets. */
|
|
26
|
+
export const INTERACTIVE_PREVIEW_SANDBOX = "allow-scripts";
|
|
27
|
+
export const PREVIEW_TOKEN_ENDPOINT = "/parhelia/renderings/previewToken";
|
|
28
|
+
export const INTERACTIVE_PREVIEW_PATH_PREFIX = "/parhelia/preview/";
|
|
29
|
+
/** A token is renewed before a reload once it is this close to expiring. */
|
|
30
|
+
export const PREVIEW_TOKEN_REFRESH_MARGIN_SECONDS = 120;
|
|
31
|
+
// At most this many rendering ids are read from a page and sent to the server.
|
|
32
|
+
const MAX_RENDERING_IDS = 100;
|
|
33
|
+
const RENDERING_ID_PATTERN = /^\{?([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})\}?$/i;
|
|
34
|
+
/** A GUID in lower-case "D" format, or undefined when the value is none. */
|
|
35
|
+
export function normalizeRenderingId(value) {
|
|
36
|
+
const match = RENDERING_ID_PATTERN.exec((value ?? "").trim());
|
|
37
|
+
return match ? match.slice(1, 6).join("-").toLowerCase() : undefined;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Rendering ids from one or more attribute values: comma-separated, limited to
|
|
41
|
+
* well-formed GUIDs, normalized and de-duplicated in order of appearance.
|
|
42
|
+
*/
|
|
43
|
+
export function parseRenderingIds(values) {
|
|
44
|
+
const ids = [];
|
|
45
|
+
const seen = new Set();
|
|
46
|
+
for (const value of values) {
|
|
47
|
+
for (const raw of (value ?? "").split(",")) {
|
|
48
|
+
const id = normalizeRenderingId(raw);
|
|
49
|
+
if (!id || seen.has(id))
|
|
50
|
+
continue;
|
|
51
|
+
seen.add(id);
|
|
52
|
+
ids.push(id);
|
|
53
|
+
if (ids.length >= MAX_RENDERING_IDS)
|
|
54
|
+
return ids;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return ids;
|
|
58
|
+
}
|
|
59
|
+
const NO_RENDERING_IDS = [];
|
|
60
|
+
export const NO_CANVAS_RENDERINGS = {
|
|
61
|
+
renderingIds: NO_RENDERING_IDS,
|
|
62
|
+
clientCodeIds: NO_RENDERING_IDS,
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* The dynamic renderings in the canvas document. The canvas is normally
|
|
66
|
+
* same-origin with the editor; any other frame (cross-origin, opaque,
|
|
67
|
+
* detached) yields none.
|
|
68
|
+
*/
|
|
69
|
+
export function readCanvasRenderings(iframe) {
|
|
70
|
+
try {
|
|
71
|
+
const doc = iframe?.contentDocument;
|
|
72
|
+
if (!doc)
|
|
73
|
+
return NO_CANVAS_RENDERINGS;
|
|
74
|
+
const clientCodeIds = parseRenderingIds(Array.from(doc.querySelectorAll(CLIENT_CODE_HINT_SELECTOR), (script) => script.getAttribute(CLIENT_CODE_HINT_ATTRIBUTE)));
|
|
75
|
+
const renderingIds = parseRenderingIds([
|
|
76
|
+
...Array.from(doc.querySelectorAll(DYNAMIC_RENDERING_SELECTOR), (node) => node.getAttribute(DYNAMIC_RENDERING_ATTRIBUTE)),
|
|
77
|
+
...clientCodeIds,
|
|
78
|
+
]);
|
|
79
|
+
if (renderingIds.length === 0)
|
|
80
|
+
return NO_CANVAS_RENDERINGS;
|
|
81
|
+
return { renderingIds, clientCodeIds };
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
return NO_CANVAS_RENDERINGS;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
export function sameRenderingIds(left, right) {
|
|
88
|
+
return (left.length === right.length &&
|
|
89
|
+
left.every((id, index) => id === right[index]));
|
|
90
|
+
}
|
|
91
|
+
export function buildPreviewTokenUrl(page) {
|
|
92
|
+
const params = new URLSearchParams({
|
|
93
|
+
item: page.id,
|
|
94
|
+
language: page.language,
|
|
95
|
+
version: String(page.version),
|
|
96
|
+
});
|
|
97
|
+
return `${PREVIEW_TOKEN_ENDPOINT}?${params.toString()}`;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The token's prefix as a same-origin preview path without a trailing slash,
|
|
101
|
+
* or undefined for anything else.
|
|
102
|
+
*/
|
|
103
|
+
export function normalizePreviewPrefix(prefix, origin = window.location.origin) {
|
|
104
|
+
if (typeof prefix !== "string" ||
|
|
105
|
+
!prefix.startsWith(INTERACTIVE_PREVIEW_PATH_PREFIX) ||
|
|
106
|
+
/[?#\\]/.test(prefix) ||
|
|
107
|
+
prefix.split("/").some((segment) => segment === "." || segment === "..")) {
|
|
108
|
+
return undefined;
|
|
109
|
+
}
|
|
110
|
+
let url;
|
|
111
|
+
try {
|
|
112
|
+
url = new URL(`${prefix.replace(/\/+$/, "")}/`, origin);
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
// Encoded dot segments are resolved by the URL parser; what is left must
|
|
118
|
+
// still be a preview path on the editor's origin.
|
|
119
|
+
if (url.origin !== new URL(origin).origin ||
|
|
120
|
+
!url.pathname.startsWith(INTERACTIVE_PREVIEW_PATH_PREFIX)) {
|
|
121
|
+
return undefined;
|
|
122
|
+
}
|
|
123
|
+
return url.pathname.replace(/\/+$/, "");
|
|
124
|
+
}
|
|
125
|
+
// Editor-only parameters of the canvas URL: the sealed frame gets no editing
|
|
126
|
+
// bridge, no editing session and no Sitecore site switch.
|
|
127
|
+
const CANVAS_ONLY_PARAMS = new Set([
|
|
128
|
+
"edit_rev",
|
|
129
|
+
"parhelia",
|
|
130
|
+
"parhelia_session",
|
|
131
|
+
"parhelia_layout",
|
|
132
|
+
"sc_site",
|
|
133
|
+
]);
|
|
134
|
+
// The preview proxy runs through Sitecore's request pipeline like the canvas
|
|
135
|
+
// proxy, so the page context travels in the plain parameters the host reads
|
|
136
|
+
// (see applyParheliaRenderContext).
|
|
137
|
+
const PLAIN_CONTEXT_PARAMS = new Map([
|
|
138
|
+
["sc_itemid", "itemid"],
|
|
139
|
+
["sc_lang", "lang"],
|
|
140
|
+
["sc_version", "version"],
|
|
141
|
+
]);
|
|
142
|
+
function getSearchParams(url, origin) {
|
|
143
|
+
try {
|
|
144
|
+
return url ? new URL(url, origin).searchParams : new URLSearchParams();
|
|
145
|
+
}
|
|
146
|
+
catch {
|
|
147
|
+
return new URLSearchParams();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The interactive frame's URL: the token prefix, then exactly "/" and the
|
|
152
|
+
* query the preview canvas uses, without the editor's own markers. IIS
|
|
153
|
+
* rejects paths longer than 260 characters and the token alone takes about
|
|
154
|
+
* half of that, so the page's route path is never appended: the host resolves
|
|
155
|
+
* the page by its item id (the `route` parameter rides along when the canvas
|
|
156
|
+
* has one). The page context always names the version the token was minted
|
|
157
|
+
* for. Returns undefined for a prefix that is not a same-origin preview path.
|
|
158
|
+
*/
|
|
159
|
+
export function buildInteractivePreviewFrameUrl(prefix, page, canvasUrl, origin = window.location.origin) {
|
|
160
|
+
const path = normalizePreviewPrefix(prefix, origin);
|
|
161
|
+
if (!path)
|
|
162
|
+
return undefined;
|
|
163
|
+
const url = new URL(`${path}/`, origin);
|
|
164
|
+
const canvasParams = getSearchParams(canvasUrl, origin);
|
|
165
|
+
canvasParams.forEach((value, name) => {
|
|
166
|
+
const key = name.toLowerCase();
|
|
167
|
+
if (CANVAS_ONLY_PARAMS.has(key))
|
|
168
|
+
return;
|
|
169
|
+
const target = PLAIN_CONTEXT_PARAMS.get(key);
|
|
170
|
+
if (target && canvasParams.has(target))
|
|
171
|
+
return;
|
|
172
|
+
url.searchParams.append(target ?? name, value);
|
|
173
|
+
});
|
|
174
|
+
url.searchParams.set("itemid", page.id);
|
|
175
|
+
url.searchParams.set("lang", page.language);
|
|
176
|
+
url.searchParams.set("version", String(page.version));
|
|
177
|
+
return url.toString();
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Whether a token must be renewed before the frame is (re)loaded: once it is
|
|
181
|
+
* older than its lifetime minus the refresh margin. Time alone never reloads
|
|
182
|
+
* the frame; this is only consulted when the editor reloads it anyway.
|
|
183
|
+
*/
|
|
184
|
+
export function isPreviewTokenDue(session, now) {
|
|
185
|
+
const renewAfterMs = (session.expiresInSeconds - PREVIEW_TOKEN_REFRESH_MARGIN_SECONDS) * 1000;
|
|
186
|
+
return now - session.mintedAt >= renewAfterMs;
|
|
187
|
+
}
|
|
188
|
+
export function isPreviewTokenResponse(value) {
|
|
189
|
+
if (!value || typeof value !== "object")
|
|
190
|
+
return false;
|
|
191
|
+
const candidate = value;
|
|
192
|
+
return (typeof candidate.token === "string" &&
|
|
193
|
+
candidate.token.length > 0 &&
|
|
194
|
+
typeof candidate.prefix === "string" &&
|
|
195
|
+
typeof candidate.expiresInSeconds === "number" &&
|
|
196
|
+
Number.isFinite(candidate.expiresInSeconds) &&
|
|
197
|
+
candidate.expiresInSeconds > 0);
|
|
198
|
+
}
|
|
199
|
+
export function createInteractivePreviewSession(response, mintedAt, origin = window.location.origin) {
|
|
200
|
+
const prefix = normalizePreviewPrefix(response.prefix, origin);
|
|
201
|
+
if (!prefix)
|
|
202
|
+
return undefined;
|
|
203
|
+
return {
|
|
204
|
+
prefix,
|
|
205
|
+
expiresInSeconds: response.expiresInSeconds,
|
|
206
|
+
mintedAt,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
export function getInteractivePreviewPageKey(page) {
|
|
210
|
+
if (!page?.id || !page.language)
|
|
211
|
+
return undefined;
|
|
212
|
+
return [
|
|
213
|
+
page.id.replace(/[{}-]/g, "").toLowerCase(),
|
|
214
|
+
page.language.toLowerCase(),
|
|
215
|
+
page.version,
|
|
216
|
+
].join("|");
|
|
217
|
+
}
|
|
218
|
+
const NO_HINT = NO_CANVAS_RENDERINGS;
|
|
219
|
+
export const INITIAL_INTERACTIVE_PREVIEW_STATE = {
|
|
220
|
+
status: "off",
|
|
221
|
+
frameKey: 0,
|
|
222
|
+
hint: NO_HINT,
|
|
223
|
+
};
|
|
224
|
+
function offState(state) {
|
|
225
|
+
if (state.status === "off" && !state.session && !state.pendingRequestId) {
|
|
226
|
+
return state;
|
|
227
|
+
}
|
|
228
|
+
return {
|
|
229
|
+
...INITIAL_INTERACTIVE_PREVIEW_STATE,
|
|
230
|
+
frameKey: state.frameKey,
|
|
231
|
+
hint: state.hint,
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
export function interactivePreviewReducer(state, action) {
|
|
235
|
+
switch (action.type) {
|
|
236
|
+
case "hint": {
|
|
237
|
+
const pageKey = action.renderings.renderingIds.length
|
|
238
|
+
? action.pageKey
|
|
239
|
+
: undefined;
|
|
240
|
+
if (state.hint.pageKey === pageKey &&
|
|
241
|
+
sameRenderingIds(state.hint.renderingIds, action.renderings.renderingIds) &&
|
|
242
|
+
sameRenderingIds(state.hint.clientCodeIds, action.renderings.clientCodeIds)) {
|
|
243
|
+
return state;
|
|
244
|
+
}
|
|
245
|
+
return {
|
|
246
|
+
...state,
|
|
247
|
+
hint: pageKey
|
|
248
|
+
? {
|
|
249
|
+
pageKey,
|
|
250
|
+
renderingIds: [...action.renderings.renderingIds],
|
|
251
|
+
clientCodeIds: [...action.renderings.clientCodeIds],
|
|
252
|
+
}
|
|
253
|
+
: NO_HINT,
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
case "start":
|
|
257
|
+
// Only a page whose canvas has client code can run it.
|
|
258
|
+
if (state.status !== "off" ||
|
|
259
|
+
state.hint.pageKey !== action.pageKey ||
|
|
260
|
+
state.hint.clientCodeIds.length === 0) {
|
|
261
|
+
return state;
|
|
262
|
+
}
|
|
263
|
+
return {
|
|
264
|
+
status: "starting",
|
|
265
|
+
pageKey: action.pageKey,
|
|
266
|
+
frameKey: state.frameKey,
|
|
267
|
+
pendingRequestId: action.requestId,
|
|
268
|
+
hint: state.hint,
|
|
269
|
+
};
|
|
270
|
+
case "refreshStarted":
|
|
271
|
+
if (state.status !== "on")
|
|
272
|
+
return state;
|
|
273
|
+
return { ...state, pendingRequestId: action.requestId };
|
|
274
|
+
case "minted":
|
|
275
|
+
if (state.status === "off" ||
|
|
276
|
+
state.pendingRequestId !== action.requestId) {
|
|
277
|
+
return state;
|
|
278
|
+
}
|
|
279
|
+
return {
|
|
280
|
+
...state,
|
|
281
|
+
status: "on",
|
|
282
|
+
session: action.session,
|
|
283
|
+
canvasUrl: action.canvasUrl ?? state.canvasUrl,
|
|
284
|
+
pendingRequestId: undefined,
|
|
285
|
+
frameKey: state.frameKey + 1,
|
|
286
|
+
};
|
|
287
|
+
case "mintFailed":
|
|
288
|
+
if (state.pendingRequestId !== action.requestId)
|
|
289
|
+
return state;
|
|
290
|
+
return offState(state);
|
|
291
|
+
case "remount":
|
|
292
|
+
if (state.status !== "on")
|
|
293
|
+
return state;
|
|
294
|
+
return {
|
|
295
|
+
...state,
|
|
296
|
+
canvasUrl: action.canvasUrl ?? state.canvasUrl,
|
|
297
|
+
frameKey: state.frameKey + 1,
|
|
298
|
+
};
|
|
299
|
+
case "stop":
|
|
300
|
+
return offState(state);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Whether the interactive frame replaces the canvas right now. Derived rather
|
|
305
|
+
* than stored so that leaving preview mode or opening another page returns to
|
|
306
|
+
* the normal canvas in the same render, before any cleanup has run.
|
|
307
|
+
*/
|
|
308
|
+
export function isInteractivePreviewActive(state, context) {
|
|
309
|
+
return (state.status === "on" &&
|
|
310
|
+
!!state.session &&
|
|
311
|
+
context.mode === "preview" &&
|
|
312
|
+
!!context.pageKey &&
|
|
313
|
+
state.pageKey === context.pageKey);
|
|
314
|
+
}
|
|
315
|
+
/** A running or starting session that no longer matches the canvas ends. */
|
|
316
|
+
export function shouldStopInteractivePreview(state, context) {
|
|
317
|
+
return (state.status !== "off" &&
|
|
318
|
+
(context.mode !== "preview" ||
|
|
319
|
+
!context.pageKey ||
|
|
320
|
+
state.pageKey !== context.pageKey));
|
|
321
|
+
}
|
|
322
|
+
function getHintForContext(state, context) {
|
|
323
|
+
if (context.mode !== "preview" ||
|
|
324
|
+
!context.pageKey ||
|
|
325
|
+
state.hint.pageKey !== context.pageKey) {
|
|
326
|
+
return NO_CANVAS_RENDERINGS;
|
|
327
|
+
}
|
|
328
|
+
return state.hint;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* The rendering ids "Run client code" is offered for: only in preview mode,
|
|
332
|
+
* and only those read from the canvas of the page that is open now.
|
|
333
|
+
*/
|
|
334
|
+
export function getOfferedClientCodeRenderings(state, context) {
|
|
335
|
+
return getHintForContext(state, context).clientCodeIds;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* The page's dynamic renderings the preview strip lists, under the same
|
|
339
|
+
* conditions as getOfferedClientCodeRenderings.
|
|
340
|
+
*/
|
|
341
|
+
export function getPreviewRenderingIds(state, context) {
|
|
342
|
+
return getHintForContext(state, context).renderingIds;
|
|
343
|
+
}
|
|
344
|
+
//# sourceMappingURL=interactivePreview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactivePreview.js","sourceRoot":"","sources":["../../../src/editor/page-viewer/interactivePreview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,+BAA+B,CAAC;AAC1E,MAAM,CAAC,MAAM,yBAAyB,GAAG,UAAU,0BAA0B,GAAG,CAAC;AACjF,0EAA0E;AAC1E,MAAM,CAAC,MAAM,2BAA2B,GAAG,yBAAyB,CAAC;AACrE,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,2BAA2B,GAAG,CAAC;AAE7E,yDAAyD;AACzD,MAAM,CAAC,MAAM,2BAA2B,GAAG,eAAe,CAAC;AAE3D,MAAM,CAAC,MAAM,sBAAsB,GAAG,mCAAmC,CAAC;AAC1E,MAAM,CAAC,MAAM,+BAA+B,GAAG,oBAAoB,CAAC;AAEpE,4EAA4E;AAC5E,MAAM,CAAC,MAAM,oCAAoC,GAAG,GAAG,CAAC;AAExD,+EAA+E;AAC/E,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,oBAAoB,GACxB,qFAAqF,CAAC;AAsBxF,4EAA4E;AAC5E,MAAM,UAAU,oBAAoB,CAClC,KAAgC;IAEhC,MAAM,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9D,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAA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CAAC;QACD,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,8BAA8B,CAC5C,KAA8B,EAC9B,OAAkC;IAElC,OAAO,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,aAAa,CAAC;AACzD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAA8B,EAC9B,OAAkC;IAElC,OAAO,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,YAAY,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// A minimap iframe is as tall as the whole page. Resolve viewport units before
|
|
2
|
+
// loading it so nested cards, spacing and backgrounds retain the live layout.
|
|
3
|
+
export function resolveMinimapViewportUnits(css, width, height) {
|
|
4
|
+
// Consume strings, comments, URLs and identifiers intact, including escaped
|
|
5
|
+
// Tailwind selectors. Only CSS dimension tokens should be rewritten.
|
|
6
|
+
return css.replace(/\/\*[\s\S]*?\*\/|"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|url\((?:\\[\s\S]|[^)\\])*\)|[+-]?(?:\d*\.\d+|\d+\.?\d*)(?:e[+-]?\d+)?(?:[a-zA-Z_\u0080-\uFFFF]|\\[^\r\n])(?:[\w\u0080-\uFFFF-]|\\[^\r\n])*|(?:[a-zA-Z_\u0080-\uFFFF-]|\\[^\r\n])(?:[\w\u0080-\uFFFF-]|\\[^\r\n])*/gi, (token) => {
|
|
7
|
+
const dimension = token.match(/^([+-]?(?:\d*\.\d+|\d+\.?\d*)(?:e[+-]?\d+)?)([dls]?v[wh]|[dls]?vmin|[dls]?vmax)$/i);
|
|
8
|
+
if (!dimension)
|
|
9
|
+
return token;
|
|
10
|
+
const [, amount, unitToken] = dimension;
|
|
11
|
+
if (amount === undefined || unitToken === undefined)
|
|
12
|
+
return token;
|
|
13
|
+
const unit = unitToken.toLowerCase();
|
|
14
|
+
const size = unit.endsWith("min")
|
|
15
|
+
? Math.min(width, height)
|
|
16
|
+
: unit.endsWith("max")
|
|
17
|
+
? Math.max(width, height)
|
|
18
|
+
: unit.endsWith("h")
|
|
19
|
+
? height
|
|
20
|
+
: width;
|
|
21
|
+
if (!Number.isFinite(size) || size <= 0)
|
|
22
|
+
return token;
|
|
23
|
+
return `${Math.round(((Number(amount) * size) / 100) * 1000) / 1000}px`;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export function preserveMinimapViewport(doc, width, height) {
|
|
27
|
+
doc.querySelectorAll("style").forEach((style) => {
|
|
28
|
+
style.textContent = resolveMinimapViewportUnits(style.textContent || "", width, height);
|
|
29
|
+
});
|
|
30
|
+
doc.querySelectorAll("[style]").forEach((element) => {
|
|
31
|
+
element.setAttribute("style", resolveMinimapViewportUnits(element.getAttribute("style") || "", width, height));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=minimapViewport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minimapViewport.js","sourceRoot":"","sources":["../../../src/editor/page-viewer/minimapViewport.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8EAA8E;AAC9E,MAAM,UAAU,2BAA2B,CACzC,GAAW,EACX,KAAa,EACb,MAAc;IAEd,4EAA4E;IAC5E,qEAAqE;IACrE,OAAO,GAAG,CAAC,OAAO,CAChB,oRAAoR,EACpR,CAAC,KAAK,EAAE,EAAE;QACR,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAC3B,mFAAmF,CACpF,CAAC;QACF,IAAI,CAAC,SAAS;YAAE,OAAO,KAAK,CAAC;QAC7B,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,GAAG,SAAS,CAAC;QACxC,IAAI,MAAM,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC;QAClE,MAAM,IAAI,GAAG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}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ItemDescriptor, Page } from "../pageModel";
|
|
2
|
+
/**
|
|
3
|
+
* Which items belong to the page the editor has open, according to the
|
|
4
|
+
* editor's own loaded page model: the page item itself plus every datasource
|
|
5
|
+
* and rendered item of its components. Bridge payloads name the item they
|
|
6
|
+
* write to; anything outside this set is not part of the open page and must
|
|
7
|
+
* not be edited through the canvas.
|
|
8
|
+
*/
|
|
9
|
+
export type OpenPageModel = {
|
|
10
|
+
page?: Page;
|
|
11
|
+
pageItemDescriptor?: ItemDescriptor;
|
|
12
|
+
};
|
|
13
|
+
type ItemIdentity = {
|
|
14
|
+
id?: string | null;
|
|
15
|
+
language?: string | null;
|
|
16
|
+
version?: number | null;
|
|
17
|
+
};
|
|
18
|
+
type OpenPageItemEntry = {
|
|
19
|
+
language: string;
|
|
20
|
+
version: number;
|
|
21
|
+
};
|
|
22
|
+
export declare function collectOpenPageItems(page: Page): ReadonlyMap<string, readonly OpenPageItemEntry[]>;
|
|
23
|
+
/**
|
|
24
|
+
* True when the item (id, language and version) belongs to the open page: it
|
|
25
|
+
* is the page item or an item the loaded page model knows as part of the page.
|
|
26
|
+
* Without a loaded page nothing but the page item itself qualifies.
|
|
27
|
+
*/
|
|
28
|
+
export declare function isItemPartOfOpenPage(item: ItemIdentity | null | undefined, model: OpenPageModel | null | undefined): boolean;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
function normalizeItemId(id) {
|
|
2
|
+
return (id ?? "").replace(/[{}-]/g, "").trim().toLowerCase();
|
|
3
|
+
}
|
|
4
|
+
function normalizeLanguage(language) {
|
|
5
|
+
return (language ?? "").trim().toLowerCase();
|
|
6
|
+
}
|
|
7
|
+
function addItem(items, item) {
|
|
8
|
+
const id = normalizeItemId(item?.id);
|
|
9
|
+
if (!id)
|
|
10
|
+
return;
|
|
11
|
+
const version = typeof item?.version === "number" && Number.isFinite(item.version)
|
|
12
|
+
? item.version
|
|
13
|
+
: 0;
|
|
14
|
+
const entries = items.get(id) ?? [];
|
|
15
|
+
entries.push({ language: normalizeLanguage(item?.language), version });
|
|
16
|
+
items.set(id, entries);
|
|
17
|
+
}
|
|
18
|
+
// Not cached: the model is small and this runs once per canvas edit event.
|
|
19
|
+
export function collectOpenPageItems(page) {
|
|
20
|
+
const items = new Map();
|
|
21
|
+
addItem(items, page.item);
|
|
22
|
+
const visited = new Set();
|
|
23
|
+
const visit = (component) => {
|
|
24
|
+
if (!component || visited.has(component))
|
|
25
|
+
return;
|
|
26
|
+
visited.add(component);
|
|
27
|
+
addItem(items, component.datasourceItem);
|
|
28
|
+
component.items?.forEach((item) => addItem(items, item));
|
|
29
|
+
component.placeholders?.forEach((placeholder) => placeholder.components?.forEach(visit));
|
|
30
|
+
};
|
|
31
|
+
visit(page.rootComponent);
|
|
32
|
+
return items;
|
|
33
|
+
}
|
|
34
|
+
function entryMatches(entry, language, version) {
|
|
35
|
+
if (entry.language && entry.language !== language)
|
|
36
|
+
return false;
|
|
37
|
+
// Version 0 stands for "latest" on either side, as everywhere else in the
|
|
38
|
+
// editor's item matching.
|
|
39
|
+
return entry.version === 0 || version === 0 || entry.version === version;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* True when the item (id, language and version) belongs to the open page: it
|
|
43
|
+
* is the page item or an item the loaded page model knows as part of the page.
|
|
44
|
+
* Without a loaded page nothing but the page item itself qualifies.
|
|
45
|
+
*/
|
|
46
|
+
export function isItemPartOfOpenPage(item, model) {
|
|
47
|
+
const id = normalizeItemId(item?.id);
|
|
48
|
+
const language = normalizeLanguage(item?.language);
|
|
49
|
+
const version = item?.version;
|
|
50
|
+
if (!id ||
|
|
51
|
+
!language ||
|
|
52
|
+
typeof version !== "number" ||
|
|
53
|
+
!Number.isFinite(version) ||
|
|
54
|
+
version < 0) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
const pageItem = model?.pageItemDescriptor;
|
|
58
|
+
if (pageItem &&
|
|
59
|
+
normalizeItemId(pageItem.id) === id &&
|
|
60
|
+
entryMatches({
|
|
61
|
+
language: normalizeLanguage(pageItem.language),
|
|
62
|
+
version: pageItem.version ?? 0,
|
|
63
|
+
}, language, version)) {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
const page = model?.page;
|
|
67
|
+
if (!page)
|
|
68
|
+
return false;
|
|
69
|
+
return (collectOpenPageItems(page)
|
|
70
|
+
.get(id)
|
|
71
|
+
?.some((entry) => entryMatches(entry, language, version)) ?? false);
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=openPageItems.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openPageItems.js","sourceRoot":"","sources":["../../../src/editor/page-viewer/openPageItems.ts"],"names":[],"mappings":"AAyBA,SAAS,eAAe,CAAC,EAA6B;IACpD,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAC/D,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAmC;IAC5D,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAC/C,CAAC;AAED,SAAS,OAAO,CACd,KAAuC,EACvC,IAAqC;IAErC,MAAM,EAAE,GAAG,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACrC,IAAI,CAAC,EAAE;QAAE,OAAO;IAChB,MAAM,OAAO,GACX,OAAO,IAAI,EAAE,OAAO,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;QAChE,CAAC,CAAC,IAAI,CAAC,OAAO;QACd,CAAC,CAAC,CAAC,CAAC;IACR,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;IACpC,OAAO,CAAC,IAAI,CAAC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as overview ruler: one narrow strip on the canvas's right edge that
|
|
4
|
+
* maps the whole page onto the visible height, like an editor's scrollbar
|
|
5
|
+
* map. Comments, suggestions, an agent's changes, spelling mistakes and
|
|
6
|
+
* validation issues share the strip and differ by colour. Each highlighting publishes its marks as a source, in overlay
|
|
7
|
+
* (document) pixels; the page's extent in the same pixels scales them. A
|
|
8
|
+
* click on a mark scrolls the canvas to it, unless its source takes the click
|
|
9
|
+
* itself (e.g. to open the comment thread).
|
|
10
|
+
*/
|
|
11
|
+
export type OverviewRulerSource = "comments" | "suggestions" | "agent-changes" | "spelling" | "validation";
|
|
12
|
+
export type OverviewRulerTone = "comment" | "comment-resolved" | "suggestion" | "added" | "removed" | "spelling" | "validation-error" | "validation-warning" | "validation-suggestion";
|
|
13
|
+
export type OverviewRulerMark = {
|
|
14
|
+
top: number;
|
|
15
|
+
height: number;
|
|
16
|
+
tone: OverviewRulerTone;
|
|
17
|
+
/** What the dash stands for (e.g. thread ids), topmost first. */
|
|
18
|
+
ids?: readonly string[];
|
|
19
|
+
/** Tooltip lines (e.g. validation messages), topmost first. */
|
|
20
|
+
details?: readonly string[];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Paint order where marks overlap: later tones draw over earlier ones, so an
|
|
24
|
+
* open comment or a validation error stays visible on top of the text it is
|
|
25
|
+
* about, and the many small spelling marks never hide anything.
|
|
26
|
+
*/
|
|
27
|
+
export declare const OVERVIEW_RULER_TONE_PAINT_ORDER: readonly OverviewRulerTone[];
|
|
28
|
+
export declare const OVERVIEW_RULER_WIDTH = 10;
|
|
29
|
+
/**
|
|
30
|
+
* Every mark is a line of this height in ruler pixels, at the top of what it
|
|
31
|
+
* marks, however long the marked text is: the ruler shows where, not how much.
|
|
32
|
+
*/
|
|
33
|
+
export declare const OVERVIEW_RULER_MARK_HEIGHT = 3;
|
|
34
|
+
/**
|
|
35
|
+
* Collapses highlight rects into ruler dashes: one dash per run of marks, so a
|
|
36
|
+
* paragraph of highlights reads as a single mark instead of a stack of
|
|
37
|
+
* overlapping slivers. Each tone is merged on its own, in paint order; a
|
|
38
|
+
* merged dash keeps the ids and details of everything it covers.
|
|
39
|
+
*/
|
|
40
|
+
export declare function buildOverviewRulerMarks(highlights: ReadonlyArray<{
|
|
41
|
+
tone: OverviewRulerTone;
|
|
42
|
+
rects: OverlayRect[];
|
|
43
|
+
ids?: readonly string[];
|
|
44
|
+
details?: readonly string[];
|
|
45
|
+
}>): OverviewRulerMark[];
|
|
46
|
+
export type OverviewRulerSources = Partial<Record<OverviewRulerSource, OverviewRulerMark[]>>;
|
|
47
|
+
export type OverviewRulerSnapshot = {
|
|
48
|
+
sources: OverviewRulerSources;
|
|
49
|
+
/** Page height in the marks' pixels; 0 while unknown. */
|
|
50
|
+
extent: number;
|
|
51
|
+
};
|
|
52
|
+
/** A mark placed on the ruler, as a fraction (0–1) of the ruler's height. */
|
|
53
|
+
export type OverviewRulerPlacedMark = {
|
|
54
|
+
top: number;
|
|
55
|
+
tone: OverviewRulerTone;
|
|
56
|
+
source: OverviewRulerSource;
|
|
57
|
+
/** The published mark, handed back to its source on a click. */
|
|
58
|
+
mark: OverviewRulerMark;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Every published mark in paint order, scaled from page pixels to fractions of
|
|
62
|
+
* the ruler. Null while no source is published or the page extent is unknown.
|
|
63
|
+
*/
|
|
64
|
+
export declare function layoutOverviewRuler({ sources, extent, }: OverviewRulerSnapshot): OverviewRulerPlacedMark[] | null;
|
|
65
|
+
/** For measurements producing marks: `null` means "no marks to publish". */
|
|
66
|
+
export declare function overviewRulerMarksEqual(a: OverviewRulerMark[] | null, b: OverviewRulerMark[] | null): boolean;
|
|
67
|
+
/** `scrollToMark` is the ruler's own click action, for handlers adding to it. */
|
|
68
|
+
export type OverviewRulerActivate = (mark: OverviewRulerMark, scrollToMark: () => void) => void;
|
|
69
|
+
/** How the canvas scrolls a mark into view. */
|
|
70
|
+
export type OverviewRulerScroller = (mark: OverviewRulerMark) => void;
|
|
71
|
+
export type OverviewRulerStore = ReturnType<typeof createOverviewRulerStore>;
|
|
72
|
+
export declare function createOverviewRulerStore(): {
|
|
73
|
+
getSnapshot: () => OverviewRulerSnapshot;
|
|
74
|
+
subscribe(listener: () => void): () => void;
|
|
75
|
+
/**
|
|
76
|
+
* `null` withdraws the source; an empty array keeps the source published
|
|
77
|
+
* with nothing marked.
|
|
78
|
+
*/
|
|
79
|
+
publish(source: OverviewRulerSource, marks: OverviewRulerMark[] | null): void;
|
|
80
|
+
setExtent(extent: number): void;
|
|
81
|
+
/** Scrolls the canvas to a mark: what a click does by default. */
|
|
82
|
+
setScroller(next: OverviewRulerScroller | null): void;
|
|
83
|
+
/** What a click on the source's marks does; not part of the snapshot. */
|
|
84
|
+
setActivateHandler(source: OverviewRulerSource, handler: OverviewRulerActivate | null): void;
|
|
85
|
+
activate(source: OverviewRulerSource, mark: OverviewRulerMark): void;
|
|
86
|
+
};
|
|
87
|
+
export declare const OverviewRulerContext: import("react").Context<{
|
|
88
|
+
getSnapshot: () => OverviewRulerSnapshot;
|
|
89
|
+
subscribe(listener: () => void): () => void;
|
|
90
|
+
/**
|
|
91
|
+
* `null` withdraws the source; an empty array keeps the source published
|
|
92
|
+
* with nothing marked.
|
|
93
|
+
*/
|
|
94
|
+
publish(source: OverviewRulerSource, marks: OverviewRulerMark[] | null): void;
|
|
95
|
+
setExtent(extent: number): void;
|
|
96
|
+
/** Scrolls the canvas to a mark: what a click does by default. */
|
|
97
|
+
setScroller(next: OverviewRulerScroller | null): void;
|
|
98
|
+
/** What a click on the source's marks does; not part of the snapshot. */
|
|
99
|
+
setActivateHandler(source: OverviewRulerSource, handler: OverviewRulerActivate | null): void;
|
|
100
|
+
activate(source: OverviewRulerSource, mark: OverviewRulerMark): void;
|
|
101
|
+
} | null>;
|
|
102
|
+
export declare function useOverviewRulerStore(): {
|
|
103
|
+
getSnapshot: () => OverviewRulerSnapshot;
|
|
104
|
+
subscribe(listener: () => void): () => void;
|
|
105
|
+
/**
|
|
106
|
+
* `null` withdraws the source; an empty array keeps the source published
|
|
107
|
+
* with nothing marked.
|
|
108
|
+
*/
|
|
109
|
+
publish(source: OverviewRulerSource, marks: OverviewRulerMark[] | null): void;
|
|
110
|
+
setExtent(extent: number): void;
|
|
111
|
+
/** Scrolls the canvas to a mark: what a click does by default. */
|
|
112
|
+
setScroller(next: OverviewRulerScroller | null): void;
|
|
113
|
+
/** What a click on the source's marks does; not part of the snapshot. */
|
|
114
|
+
setActivateHandler(source: OverviewRulerSource, handler: OverviewRulerActivate | null): void;
|
|
115
|
+
activate(source: OverviewRulerSource, mark: OverviewRulerMark): void;
|
|
116
|
+
} | null;
|
|
117
|
+
export declare function useOverviewRulerSnapshot(): OverviewRulerSnapshot;
|
|
118
|
+
/**
|
|
119
|
+
* Publishes marks into the surrounding ruler (a no-op outside one, e.g. on
|
|
120
|
+
* the minimap, or without a `source`). Pass memoized marks; `null` keeps the
|
|
121
|
+
* source out of the ruler. `onActivate` replaces scrolling to a clicked mark.
|
|
122
|
+
*/
|
|
123
|
+
export declare function usePublishOverviewRulerMarks(source: OverviewRulerSource | undefined, marks: OverviewRulerMark[] | null, onActivate?: OverviewRulerActivate): void;
|
|
124
|
+
/**
|
|
125
|
+
* Connects the ruler to its canvas: the page height the marks are scaled
|
|
126
|
+
* against (0 = unknown) and how to scroll the canvas to a mark.
|
|
127
|
+
*/
|
|
128
|
+
export declare function usePublishOverviewRulerCanvas(extent: number, scrollToMark: OverviewRulerScroller): void;
|