@parhelia/core 0.1.12882 → 0.1.12884
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents-view/AgentsSidebar.js +1 -1
- package/dist/agents-view/AgentsSidebar.js.map +1 -1
- package/dist/agents-view/AgentsTitlebar.d.ts +1 -1
- package/dist/agents-view/AgentsTitlebar.js +3 -6
- package/dist/agents-view/AgentsTitlebar.js.map +1 -1
- package/dist/agents-view/AgentsView.d.ts +2 -2
- package/dist/agents-view/AgentsView.js +2 -2
- package/dist/agents-view/AgentsView.js.map +1 -1
- package/dist/agents-view/AgentsWorkspaceView.js +1 -12
- package/dist/agents-view/AgentsWorkspaceView.js.map +1 -1
- package/dist/agents-view/CreateAgentView.d.ts +1 -1
- package/dist/agents-view/CreateAgentView.js +1 -1
- package/dist/agents-view/DateAgentsGroup.js +12 -1
- package/dist/agents-view/DateAgentsGroup.js.map +1 -1
- package/dist/agents-view/ProfileAgentsGroup.js +16 -4
- package/dist/agents-view/ProfileAgentsGroup.js.map +1 -1
- package/dist/components/ui/card.d.ts +3 -1
- package/dist/components/ui/card.js +2 -2
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +2 -1
- package/dist/components/ui/context-menu.js +6 -3
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/input.js +2 -2
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/config/config.js +107 -12
- package/dist/config/config.js.map +1 -1
- package/dist/editor/ContextMenu.d.ts +1 -0
- package/dist/editor/ContextMenu.js +4 -4
- package/dist/editor/ContextMenu.js.map +1 -1
- package/dist/editor/FieldActionsOverlay.d.ts +0 -1
- package/dist/editor/FieldActionsOverlay.js +1 -45
- package/dist/editor/FieldActionsOverlay.js.map +1 -1
- package/dist/editor/FieldHistory.d.ts +2 -1
- package/dist/editor/FieldHistory.js +13 -12
- package/dist/editor/FieldHistory.js.map +1 -1
- package/dist/editor/FieldListField.d.ts +1 -1
- package/dist/editor/FieldListField.js +24 -36
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/ImageEditor.d.ts +6 -1
- package/dist/editor/ImageEditor.js +19 -3
- package/dist/editor/ImageEditor.js.map +1 -1
- package/dist/editor/LinkEditorDialog.d.ts +9 -2
- package/dist/editor/LinkEditorDialog.js +174 -70
- package/dist/editor/LinkEditorDialog.js.map +1 -1
- package/dist/editor/MainLayout.js +49 -6
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/MobileLayout.js +33 -1
- package/dist/editor/MobileLayout.js.map +1 -1
- package/dist/editor/PictureCropper.js +45 -28
- package/dist/editor/PictureCropper.js.map +1 -1
- package/dist/editor/PictureEditor.d.ts +2 -1
- package/dist/editor/PictureEditor.js +5 -14
- package/dist/editor/PictureEditor.js.map +1 -1
- package/dist/editor/ai/AgentProfileSelector.js +7 -7
- package/dist/editor/ai/AgentProfileSelector.js.map +1 -1
- package/dist/editor/ai/Agents.js +20 -6
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/GuidanceOverlay.js +1 -11
- package/dist/editor/ai/GuidanceOverlay.js.map +1 -1
- package/dist/editor/ai/InlineAiDialog.d.ts +1 -0
- package/dist/editor/ai/InlineAiDialog.js +254 -202
- package/dist/editor/ai/InlineAiDialog.js.map +1 -1
- package/dist/editor/ai/InlineAiTextEditTooltip.d.ts +8 -0
- package/dist/editor/ai/InlineAiTextEditTooltip.js +10 -0
- package/dist/editor/ai/InlineAiTextEditTooltip.js.map +1 -0
- package/dist/editor/ai/InlineAiTrigger.js +158 -31
- package/dist/editor/ai/InlineAiTrigger.js.map +1 -1
- package/dist/editor/ai/dialogs/capturePageDom.js +66 -36
- package/dist/editor/ai/dialogs/capturePageDom.js.map +1 -1
- package/dist/editor/ai/dialogs/capturePageScreenshot.js +281 -162
- package/dist/editor/ai/dialogs/capturePageScreenshot.js.map +1 -1
- package/dist/editor/ai/inlineAiTextEditLabels.d.ts +2 -0
- package/dist/editor/ai/inlineAiTextEditLabels.js +8 -0
- package/dist/editor/ai/inlineAiTextEditLabels.js.map +1 -0
- package/dist/editor/ai/prepareInlineAiTextSelection.d.ts +5 -0
- package/dist/editor/ai/prepareInlineAiTextSelection.js +86 -0
- package/dist/editor/ai/prepareInlineAiTextSelection.js.map +1 -0
- package/dist/editor/ai/terminal/agentSessionState.d.ts +3 -0
- package/dist/editor/ai/terminal/agentSessionState.js +3 -1
- package/dist/editor/ai/terminal/agentSessionState.js.map +1 -1
- package/dist/editor/ai/terminal/agentStartRequest.d.ts +2 -1
- package/dist/editor/ai/terminal/agentStartRequest.js +2 -1
- package/dist/editor/ai/terminal/agentStartRequest.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js +1 -1
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentDocumentList.d.ts +7 -0
- package/dist/editor/ai/terminal/components/AgentDocumentList.js +55 -13
- package/dist/editor/ai/terminal/components/AgentDocumentList.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentEditHistoryButton.d.ts +5 -0
- package/dist/editor/ai/terminal/components/AgentEditHistoryButton.js +12 -0
- package/dist/editor/ai/terminal/components/AgentEditHistoryButton.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentFullPromptControls.d.ts +3 -1
- package/dist/editor/ai/terminal/components/AgentFullPromptControls.js +22 -14
- package/dist/editor/ai/terminal/components/AgentFullPromptControls.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentModeSelector.js +4 -4
- package/dist/editor/ai/terminal/components/AgentModeSelector.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js +4 -4
- package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptComposer.js +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptComposer.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.d.ts +2 -1
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.js +8 -11
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.d.ts +1 -4
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js +31 -14
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentSettingsPopover.js +1 -1
- package/dist/editor/ai/terminal/components/AgentSettingsPopover.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.d.ts +2 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js +2 -4
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalMessageGroups.js +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalMessageGroups.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalView.js +13 -2
- package/dist/editor/ai/terminal/components/AgentTerminalView.js.map +1 -1
- package/dist/editor/ai/terminal/components/AiResponseMessage.js +11 -9
- package/dist/editor/ai/terminal/components/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/ContextInfoBar.js +22 -2
- package/dist/editor/ai/terminal/components/ContextInfoBar.js.map +1 -1
- package/dist/editor/ai/terminal/components/QueuedPromptsPanel.js +37 -26
- package/dist/editor/ai/terminal/components/QueuedPromptsPanel.js.map +1 -1
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js +3 -1
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/UserMessage.d.ts +2 -1
- package/dist/editor/ai/terminal/components/UserMessage.js +144 -8
- package/dist/editor/ai/terminal/components/UserMessage.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentPromptComposerHandlers.js +1 -1
- package/dist/editor/ai/terminal/useAgentPromptComposerHandlers.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSessionSync.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.d.ts +3 -1
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js +9 -3
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js +7 -0
- package/dist/editor/ai/terminal/useAgentTerminalController.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalUiState.js +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalUiState.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentUserMessageSocketHandler.js +3 -1
- package/dist/editor/ai/terminal/useAgentUserMessageSocketHandler.js.map +1 -1
- package/dist/editor/ai/useActiveAgentConversation.d.ts +3 -0
- package/dist/editor/ai/useActiveAgentConversation.js +32 -0
- package/dist/editor/ai/useActiveAgentConversation.js.map +1 -0
- package/dist/editor/ai/useInlineAiPosition.d.ts +10 -2
- package/dist/editor/ai/useInlineAiPosition.js +32 -71
- package/dist/editor/ai/useInlineAiPosition.js.map +1 -1
- package/dist/editor/ai-image-editor/AiImageResultOverlay.js +30 -62
- package/dist/editor/ai-image-editor/AiImageResultOverlay.js.map +1 -1
- package/dist/editor/bridge/BridgeClient.d.ts +80 -0
- package/dist/editor/bridge/BridgeClient.js +417 -0
- package/dist/editor/bridge/BridgeClient.js.map +1 -0
- package/dist/editor/client/EditorShell.d.ts +5 -1
- package/dist/editor/client/EditorShell.js +295 -127
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +58 -5
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/fieldModificationStore.d.ts +1 -0
- package/dist/editor/client/fieldModificationStore.js +7 -2
- package/dist/editor/client/fieldModificationStore.js.map +1 -1
- package/dist/editor/client/hooks/useSocketMessageHandler.js +14 -17
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
- package/dist/editor/client/itemsRepository.d.ts +2 -0
- package/dist/editor/client/itemsRepository.js +18 -9
- package/dist/editor/client/itemsRepository.js.map +1 -1
- package/dist/editor/client/operations.d.ts +1 -1
- package/dist/editor/client/operations.js +67 -21
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/client/pageModelBuilder.js +24 -7
- package/dist/editor/client/pageModelBuilder.js.map +1 -1
- package/dist/editor/client/ui/EditorChrome.js +1 -1
- package/dist/editor/client/ui/EditorChrome.js.map +1 -1
- package/dist/editor/commands/componentCommands.d.ts +3 -1
- package/dist/editor/commands/componentCommands.js +8 -3
- package/dist/editor/commands/componentCommands.js.map +1 -1
- package/dist/editor/field-types/DateFieldEditor.js +1 -1
- package/dist/editor/field-types/DateFieldEditor.js.map +1 -1
- package/dist/editor/field-types/DateTimeFieldEditor.js +1 -1
- package/dist/editor/field-types/DateTimeFieldEditor.js.map +1 -1
- package/dist/editor/field-types/DropLinkEditor.js +1 -1
- package/dist/editor/field-types/DropLinkEditor.js.map +1 -1
- package/dist/editor/field-types/DropListEditor.js +1 -1
- package/dist/editor/field-types/DropListEditor.js.map +1 -1
- package/dist/editor/field-types/ImageFieldEditor.js +1 -1
- package/dist/editor/field-types/ImageFieldEditor.js.map +1 -1
- package/dist/editor/field-types/InternalLinkFieldEditor.js +1 -1
- package/dist/editor/field-types/InternalLinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/LinkFieldEditor.js +15 -3
- package/dist/editor/field-types/LinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +11 -4
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/NameValueListEditor.js +1 -1
- package/dist/editor/field-types/NameValueListEditor.js.map +1 -1
- package/dist/editor/field-types/PictureFieldEditor.js +2 -2
- package/dist/editor/field-types/PictureFieldEditor.js.map +1 -1
- package/dist/editor/field-types/RawEditor.js +9 -2
- package/dist/editor/field-types/RawEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditorComponent.js +170 -77
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +10 -3
- package/dist/editor/field-types/SingleLineText.js.map +1 -1
- package/dist/editor/field-types/TreeListEditor.js +1 -1
- package/dist/editor/field-types/TreeListEditor.js.map +1 -1
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.d.ts +21 -0
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.js +96 -0
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.js.map +1 -0
- package/dist/editor/field-types/richtext/components/ReactSlate.css +44 -6
- package/dist/editor/field-types/richtext/components/ReactSlate.js +191 -36
- package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -1
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.css +5 -2
- package/dist/editor/field-types/richtext/components/SimpleToolbar.js +5 -4
- package/dist/editor/field-types/richtext/components/SimpleToolbar.js.map +1 -1
- package/dist/editor/field-types/richtext/contextMenuFactory.d.ts +2 -15
- package/dist/editor/field-types/richtext/contextMenuFactory.js +4 -435
- package/dist/editor/field-types/richtext/contextMenuFactory.js.map +1 -1
- package/dist/editor/field-types/richtext/richTextToolbarIcons.d.ts +7 -0
- package/dist/editor/field-types/richtext/richTextToolbarIcons.js +49 -0
- package/dist/editor/field-types/richtext/richTextToolbarIcons.js.map +1 -0
- package/dist/editor/field-types/richtext/types.d.ts +2 -0
- package/dist/editor/field-types/richtext/types.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/conversion.js +23 -2
- package/dist/editor/field-types/richtext/utils/conversion.js.map +1 -1
- package/dist/editor/field-types/useFormFieldCaretPresence.d.ts +13 -0
- package/dist/editor/field-types/useFormFieldCaretPresence.js +92 -0
- package/dist/editor/field-types/useFormFieldCaretPresence.js.map +1 -0
- package/dist/editor/fieldTypes.d.ts +2 -0
- package/dist/editor/media-selector/TreeSelector.js +15 -15
- package/dist/editor/media-selector/TreeSelector.js.map +1 -1
- package/dist/editor/menubar/PageSelector.js +8 -2
- package/dist/editor/menubar/PageSelector.js.map +1 -1
- package/dist/editor/menubar/VersionPreviewCard.js +4 -249
- package/dist/editor/menubar/VersionPreviewCard.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.js +2 -2
- package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js +338 -187
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +3 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js +1 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.d.ts +8 -0
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js +407 -0
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js.map +1 -0
- package/dist/editor/page-editor-chrome/CommentHighlightings.d.ts +5 -2
- package/dist/editor/page-editor-chrome/CommentHighlightings.js +340 -215
- package/dist/editor/page-editor-chrome/CommentHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/FeedbackHighlightBadge.d.ts +5 -1
- package/dist/editor/page-editor-chrome/FeedbackHighlightBadge.js +11 -4
- package/dist/editor/page-editor-chrome/FeedbackHighlightBadge.js.map +1 -1
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js +21 -13
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js +23 -29
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js +110 -19
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.d.ts +3 -2
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js +148 -45
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.d.ts +2 -0
- package/dist/editor/page-editor-chrome/PageEditorChrome.js +25 -21
- package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -1
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js +163 -128
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.d.ts +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +6 -3
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.d.ts +1 -2
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js +83 -146
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js.map +1 -1
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.d.ts +5 -2
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js +144 -63
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.d.ts +1 -2
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js +101 -30
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/bridgeInlineFormatToolbarLayout.d.ts +24 -0
- package/dist/editor/page-editor-chrome/bridgeInlineFormatToolbarLayout.js +89 -0
- package/dist/editor/page-editor-chrome/bridgeInlineFormatToolbarLayout.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.d.ts +10 -1
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js +105 -122
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/geometry.d.ts +11 -4
- package/dist/editor/page-editor-chrome/overlay/geometry.js +139 -36
- package/dist/editor/page-editor-chrome/overlay/geometry.js.map +1 -1
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.d.ts +26 -0
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.js +228 -0
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.js.map +1 -0
- package/dist/editor/page-viewer/EditorForm.js +17 -1
- package/dist/editor/page-viewer/EditorForm.js.map +1 -1
- package/dist/editor/page-viewer/MiniMap.d.ts +2 -2
- package/dist/editor/page-viewer/MiniMap.js +176 -364
- package/dist/editor/page-viewer/MiniMap.js.map +1 -1
- package/dist/editor/page-viewer/PageViewer.js +63 -17
- package/dist/editor/page-viewer/PageViewer.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.d.ts +0 -5
- package/dist/editor/page-viewer/PageViewerFrame.js +1685 -1512
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/page-viewer/bridgeFieldPatch.d.ts +20 -0
- package/dist/editor/page-viewer/bridgeFieldPatch.js +33 -0
- package/dist/editor/page-viewer/bridgeFieldPatch.js.map +1 -0
- package/dist/editor/page-viewer/pageViewContext.d.ts +32 -0
- package/dist/editor/page-viewer/pageViewContext.js +37 -6
- package/dist/editor/page-viewer/pageViewContext.js.map +1 -1
- package/dist/editor/reviews/Comment.d.ts +2 -1
- package/dist/editor/reviews/Comment.js +10 -5
- package/dist/editor/reviews/Comment.js.map +1 -1
- package/dist/editor/reviews/CommentDisplayPopover.js +2 -1
- package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/CommentEditor.d.ts +1 -0
- package/dist/editor/reviews/CommentEditor.js +3 -2
- package/dist/editor/reviews/CommentEditor.js.map +1 -1
- package/dist/editor/reviews/CommentPopover.js +69 -10
- package/dist/editor/reviews/CommentPopover.js.map +1 -1
- package/dist/editor/reviews/CommentView.js +24 -4
- package/dist/editor/reviews/CommentView.js.map +1 -1
- package/dist/editor/reviews/Comments.d.ts +0 -2
- package/dist/editor/reviews/Comments.js +31 -31
- package/dist/editor/reviews/Comments.js.map +1 -1
- package/dist/editor/reviews/FeedbackCard.d.ts +4 -2
- package/dist/editor/reviews/FeedbackCard.js +8 -10
- package/dist/editor/reviews/FeedbackCard.js.map +1 -1
- package/dist/editor/reviews/SuggestedEdit.js +4 -6
- package/dist/editor/reviews/SuggestedEdit.js.map +1 -1
- package/dist/editor/reviews/SuggestionCommentThread.js +3 -3
- package/dist/editor/reviews/SuggestionCommentThread.js.map +1 -1
- package/dist/editor/reviews/SuggestionDisplayPopover.js +3 -2
- package/dist/editor/reviews/SuggestionDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/commentAi.js +96 -27
- package/dist/editor/reviews/commentAi.js.map +1 -1
- package/dist/editor/reviews/commentTransientSelection.d.ts +23 -0
- package/dist/editor/reviews/commentTransientSelection.js +7 -0
- package/dist/editor/reviews/commentTransientSelection.js.map +1 -0
- package/dist/editor/reviews/feedbackOrdering.d.ts +5 -0
- package/dist/editor/reviews/feedbackOrdering.js +27 -0
- package/dist/editor/reviews/feedbackOrdering.js.map +1 -0
- package/dist/editor/reviews/feedbackSelection.js +32 -4
- package/dist/editor/reviews/feedbackSelection.js.map +1 -1
- package/dist/editor/reviews/suggestedEditState.d.ts +12 -0
- package/dist/editor/reviews/suggestedEditState.js +90 -0
- package/dist/editor/reviews/suggestedEditState.js.map +1 -0
- package/dist/editor/reviews/suggestionDisplayValue.d.ts +43 -0
- package/dist/editor/reviews/suggestionDisplayValue.js +93 -0
- package/dist/editor/reviews/suggestionDisplayValue.js.map +1 -0
- package/dist/editor/services/agentService.d.ts +15 -0
- package/dist/editor/services/agentService.js +11 -1
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/reviewsService.d.ts +2 -2
- package/dist/editor/services/reviewsService.js.map +1 -1
- package/dist/editor/settings/SettingsView.js +2 -2
- package/dist/editor/settings/SettingsView.js.map +1 -1
- package/dist/editor/settings/panels/ProjectTemplatesPanel.js +1 -1
- package/dist/editor/settings/panels/ProjectTemplatesPanel.js.map +1 -1
- package/dist/editor/settings/panels/ProvidersPanel.js +2 -3
- package/dist/editor/settings/panels/ProvidersPanel.js.map +1 -1
- package/dist/editor/sidebar/MorePanelsButton.js +1 -1
- package/dist/editor/sidebar/MorePanelsButton.js.map +1 -1
- package/dist/editor/sidebar/Validation.js +4 -1
- package/dist/editor/sidebar/Validation.js.map +1 -1
- package/dist/editor/sidebar/Workbox.js +1 -1
- package/dist/editor/sidebar/Workbox.js.map +1 -1
- package/dist/editor/template-wizard/TemplateStructureInlineEditor.js +1 -1
- package/dist/editor/template-wizard/TemplateStructureInlineEditor.js.map +1 -1
- package/dist/editor/ui/IconSelectorDialog.js +1 -1
- package/dist/editor/ui/IconSelectorDialog.js.map +1 -1
- package/dist/editor/ui/SimpleIconButton.d.ts +2 -2
- package/dist/editor/ui/SimpleIconButton.js +7 -1
- package/dist/editor/ui/SimpleIconButton.js.map +1 -1
- package/dist/editor/ui/Splitter.d.ts +1 -0
- package/dist/editor/ui/Splitter.js +12 -2
- package/dist/editor/ui/Splitter.js.map +1 -1
- package/dist/editor/ui/animationSettle.d.ts +32 -0
- package/dist/editor/ui/animationSettle.js +85 -0
- package/dist/editor/ui/animationSettle.js.map +1 -0
- package/dist/editor/utils/expandSelectionAtCaret.d.ts +15 -0
- package/dist/editor/utils/expandSelectionAtCaret.js +183 -0
- package/dist/editor/utils/expandSelectionAtCaret.js.map +1 -0
- package/dist/editor/utils.d.ts +1 -17
- package/dist/editor/utils.js +0 -143
- package/dist/editor/utils.js.map +1 -1
- package/dist/editor/version-diff/versionDiffTargets.d.ts +3 -8
- package/dist/editor/version-diff/versionDiffTargets.js +37 -94
- package/dist/editor/version-diff/versionDiffTargets.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/splash-screen/ModernSplashScreen.js +11 -3
- package/dist/splash-screen/ModernSplashScreen.js.map +1 -1
- package/dist/splash-screen/NewPage.js +7 -5
- package/dist/splash-screen/NewPage.js.map +1 -1
- package/dist/splash-screen/OpenPage.js +5 -3
- package/dist/splash-screen/OpenPage.js.map +1 -1
- package/dist/splash-screen/RecentPages.js +3 -3
- package/dist/splash-screen/RecentPages.js.map +1 -1
- package/dist/task-board/components/TaskDetailPanel.js +2 -1
- package/dist/task-board/components/TaskDetailPanel.js.map +1 -1
- package/dist/task-board/views/DependencyGraphView.d.ts +42 -1
- package/dist/task-board/views/DependencyGraphView.js +94 -0
- package/dist/task-board/views/DependencyGraphView.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +2 -1
- package/styles.css +96 -0
- package/dist/editor/page-editor-chrome/InlineEditor.d.ts +0 -7
- package/dist/editor/page-editor-chrome/InlineEditor.js +0 -1719
- package/dist/editor/page-editor-chrome/InlineEditor.js.map +0 -1
- package/dist/editor/page-editor-chrome/overlay/iframeAccess.d.ts +0 -2
- package/dist/editor/page-editor-chrome/overlay/iframeAccess.js +0 -21
- package/dist/editor/page-editor-chrome/overlay/iframeAccess.js.map +0 -1
- package/dist/editor/page-editor-chrome/useInlineAICompletion.d.ts +0 -7
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js +0 -758
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js.map +0 -1
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.d.ts +0 -3
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.js +0 -796
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.js.map +0 -1
|
@@ -11,6 +11,7 @@ import { useEditContext } from "../../client/editContext";
|
|
|
11
11
|
import { cn } from "../../../lib/utils";
|
|
12
12
|
import { sanitizeSvg } from "../../../lib/sanitize";
|
|
13
13
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "../../../components/ui/dropdown-menu";
|
|
14
|
+
import { waitForSelectorAnimations } from "../../ui/animationSettle";
|
|
14
15
|
/** Render a sanitized SVG string at a specific pixel size. */
|
|
15
16
|
function SvgIcon({ svg, size, className, }) {
|
|
16
17
|
const sanitizedSvg = sanitizeSvg(svg).trim();
|
|
@@ -37,15 +38,6 @@ function getEditorFormSlider(elements = []) {
|
|
|
37
38
|
function isEditorFormSliderHidden(slider) {
|
|
38
39
|
return slider?.getAttribute(EDITOR_FORM_HIDDEN_ATTRIBUTE) === "true";
|
|
39
40
|
}
|
|
40
|
-
async function waitForEditorFormSliderOpen(slider, timeoutMs = 1000) {
|
|
41
|
-
const startedAt = Date.now();
|
|
42
|
-
while (Date.now() - startedAt < timeoutMs) {
|
|
43
|
-
if (!isEditorFormSliderHidden(slider ?? getEditorFormSlider())) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
await waitForDelay(50);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
41
|
async function waitForResolvedElements(resolveElements, selector, timeoutMs = 1000) {
|
|
50
42
|
const startedAt = Date.now();
|
|
51
43
|
while (Date.now() - startedAt < timeoutMs) {
|
|
@@ -171,7 +163,8 @@ function parseSelectorToken(selectorToken) {
|
|
|
171
163
|
if (!selectorToken.startsWith("@"))
|
|
172
164
|
return { selector: selectorToken };
|
|
173
165
|
const raw = selectorToken.slice(1);
|
|
174
|
-
// Preserve iframe: selectors
|
|
166
|
+
// Preserve iframe: selectors as unavailable selectors. Page DOM inspection now
|
|
167
|
+
// goes through the editing bridge instead of same-origin iframe probing.
|
|
175
168
|
if (raw.startsWith("iframe:"))
|
|
176
169
|
return { selector: selectorToken };
|
|
177
170
|
// Check for sidebar-only syntax: @sidebar-id-sidebar (e.g., @reviews-sidebar)
|
|
@@ -207,7 +200,6 @@ export function expandSelector(selectorShorthand) {
|
|
|
207
200
|
return selector;
|
|
208
201
|
}
|
|
209
202
|
if (selector.startsWith("iframe:")) {
|
|
210
|
-
// Iframe selector: @iframe:selector → iframe:selector (handled by GuidanceOverlay)
|
|
211
203
|
return selector;
|
|
212
204
|
}
|
|
213
205
|
// Default: data-testid selector: @name → [data-testid="name"]
|
|
@@ -216,12 +208,7 @@ export function expandSelector(selectorShorthand) {
|
|
|
216
208
|
function getElementsForSelector(selector) {
|
|
217
209
|
const cssSelector = expandSelector(selector);
|
|
218
210
|
if (cssSelector.startsWith("iframe:")) {
|
|
219
|
-
|
|
220
|
-
const iframe = document.querySelector("iframe.page-iframe");
|
|
221
|
-
if (!iframe?.contentDocument) {
|
|
222
|
-
return [];
|
|
223
|
-
}
|
|
224
|
-
return Array.from(iframe.contentDocument.querySelectorAll(iframeSelector));
|
|
211
|
+
return [];
|
|
225
212
|
}
|
|
226
213
|
return Array.from(document.querySelectorAll(cssSelector));
|
|
227
214
|
}
|
|
@@ -302,32 +289,6 @@ async function waitForScrollToFinish(element) {
|
|
|
302
289
|
previousRect = currentRect;
|
|
303
290
|
}
|
|
304
291
|
}
|
|
305
|
-
// Wait until an element's box (position and size) stops changing. This avoids
|
|
306
|
-
// drawing the highlight overlay mid-animation (e.g. while a sidebar panel is
|
|
307
|
-
// still expanding from its collapsed width).
|
|
308
|
-
async function waitForStableRect(element, timeoutMs = 1000) {
|
|
309
|
-
let previousRect = element.getBoundingClientRect();
|
|
310
|
-
let stableFrames = 0;
|
|
311
|
-
const startedAt = Date.now();
|
|
312
|
-
while (Date.now() - startedAt < timeoutMs) {
|
|
313
|
-
await waitForNextFrame();
|
|
314
|
-
const currentRect = element.getBoundingClientRect();
|
|
315
|
-
const changed = Math.abs(currentRect.width - previousRect.width) > 0.5 ||
|
|
316
|
-
Math.abs(currentRect.height - previousRect.height) > 0.5 ||
|
|
317
|
-
Math.abs(currentRect.top - previousRect.top) > 0.5 ||
|
|
318
|
-
Math.abs(currentRect.left - previousRect.left) > 0.5;
|
|
319
|
-
if (changed) {
|
|
320
|
-
stableFrames = 0;
|
|
321
|
-
}
|
|
322
|
-
else {
|
|
323
|
-
stableFrames += 1;
|
|
324
|
-
if (stableFrames >= 2) {
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
previousRect = currentRect;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
292
|
async function scrollElementForHighlight(element) {
|
|
332
293
|
if (shouldSkipHighlightScroll(element)) {
|
|
333
294
|
return;
|
|
@@ -347,27 +308,28 @@ export async function highlightElement(selector, duration = HIGHLIGHT_DURATION_M
|
|
|
347
308
|
const elements = getElementsForSelector(selector).filter(isElementVisible);
|
|
348
309
|
if (elements.length === 0)
|
|
349
310
|
return;
|
|
311
|
+
const overlayLifetimes = [];
|
|
350
312
|
if (cssSelector.startsWith("iframe:")) {
|
|
351
313
|
const iframe = document.querySelector("iframe.page-iframe");
|
|
352
314
|
const iframeRect = iframe?.getBoundingClientRect();
|
|
353
315
|
if (elements[0]) {
|
|
354
316
|
await scrollElementForHighlight(elements[0]);
|
|
355
|
-
await waitForStableRect(elements[0]);
|
|
356
317
|
}
|
|
357
318
|
elements.forEach((element) => {
|
|
358
319
|
const elementRect = element.getBoundingClientRect();
|
|
359
|
-
showHighlightOverlay(elementRect.left + (iframeRect?.left ?? 0), elementRect.top + (iframeRect?.top ?? 0), elementRect.width, elementRect.height, duration);
|
|
320
|
+
overlayLifetimes.push(showHighlightOverlay(elementRect.left + (iframeRect?.left ?? 0), elementRect.top + (iframeRect?.top ?? 0), elementRect.width, elementRect.height, duration));
|
|
360
321
|
});
|
|
322
|
+
await Promise.all(overlayLifetimes);
|
|
361
323
|
return;
|
|
362
324
|
}
|
|
363
325
|
if (elements[0]) {
|
|
364
326
|
await scrollElementForHighlight(elements[0]);
|
|
365
|
-
await waitForStableRect(elements[0]);
|
|
366
327
|
}
|
|
367
328
|
elements.forEach((element) => {
|
|
368
329
|
const rect = element.getBoundingClientRect();
|
|
369
|
-
showHighlightOverlay(rect.left, rect.top, rect.width, rect.height, duration);
|
|
330
|
+
overlayLifetimes.push(showHighlightOverlay(rect.left, rect.top, rect.width, rect.height, duration));
|
|
370
331
|
});
|
|
332
|
+
await Promise.all(overlayLifetimes);
|
|
371
333
|
}
|
|
372
334
|
// Check if an element is currently present in the DOM (regardless of visibility)
|
|
373
335
|
function isElementPresent(selector) {
|
|
@@ -393,7 +355,8 @@ export function deriveSelectorState(params) {
|
|
|
393
355
|
}
|
|
394
356
|
return "disabled";
|
|
395
357
|
}
|
|
396
|
-
// Create a temporary highlight overlay
|
|
358
|
+
// Create a temporary highlight overlay. Resolves when its finite "life"
|
|
359
|
+
// animation ends and the overlay has been removed (event-driven, not a timer).
|
|
397
360
|
function showHighlightOverlay(x, y, width, height, duration) {
|
|
398
361
|
const padding = 4;
|
|
399
362
|
const viewportWidth = window.innerWidth;
|
|
@@ -410,9 +373,11 @@ function showHighlightOverlay(x, y, width, height, duration) {
|
|
|
410
373
|
const clampedHeight = bottom - top;
|
|
411
374
|
// Skip if target is fully outside the viewport after clamping.
|
|
412
375
|
if (clampedWidth <= 0 || clampedHeight <= 0)
|
|
413
|
-
return;
|
|
376
|
+
return Promise.resolve();
|
|
414
377
|
const overlay = document.createElement("div");
|
|
415
378
|
overlay.className = "selector-highlight-overlay";
|
|
379
|
+
// Two animations: the infinite pulse for the visual, and a finite "life"
|
|
380
|
+
// animation whose animationend drives removal (single source of duration).
|
|
416
381
|
overlay.style.cssText = `
|
|
417
382
|
position: fixed;
|
|
418
383
|
left: ${left}px;
|
|
@@ -424,7 +389,7 @@ function showHighlightOverlay(x, y, width, height, duration) {
|
|
|
424
389
|
background: color-mix(in srgb, var(--color-component-default) 10%, transparent);
|
|
425
390
|
pointer-events: none;
|
|
426
391
|
z-index: 999999;
|
|
427
|
-
animation: pulse-highlight 1s ease-in-out infinite;
|
|
392
|
+
animation: pulse-highlight 1s ease-in-out infinite, selector-highlight-life ${duration}ms linear forwards;
|
|
428
393
|
box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-component-default) 20%, transparent);
|
|
429
394
|
`;
|
|
430
395
|
// Add animation keyframes if not already added
|
|
@@ -436,22 +401,62 @@ function showHighlightOverlay(x, y, width, height, duration) {
|
|
|
436
401
|
0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-component-default) 20%, transparent); }
|
|
437
402
|
50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--color-component-default) 10%, transparent); }
|
|
438
403
|
}
|
|
404
|
+
@keyframes selector-highlight-life {
|
|
405
|
+
from { opacity: 1; }
|
|
406
|
+
to { opacity: 1; }
|
|
407
|
+
}
|
|
439
408
|
`;
|
|
440
409
|
document.head.appendChild(style);
|
|
441
410
|
}
|
|
442
411
|
document.body.appendChild(overlay);
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
412
|
+
return new Promise((resolve) => {
|
|
413
|
+
let finished = false;
|
|
414
|
+
const finish = () => {
|
|
415
|
+
if (finished)
|
|
416
|
+
return;
|
|
417
|
+
finished = true;
|
|
418
|
+
overlay.removeEventListener("animationend", onAnimationEnd);
|
|
419
|
+
overlay.remove();
|
|
420
|
+
resolve();
|
|
421
|
+
};
|
|
422
|
+
const onAnimationEnd = (event) => {
|
|
423
|
+
// Ignore the infinite pulse; only the finite life animation ends.
|
|
424
|
+
if (event.animationName === "selector-highlight-life") {
|
|
425
|
+
finish();
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
overlay.addEventListener("animationend", onAnimationEnd);
|
|
429
|
+
// Guardrail: if animationend is ever missed, remove shortly after duration.
|
|
430
|
+
window.setTimeout(finish, duration + 500);
|
|
431
|
+
});
|
|
446
432
|
}
|
|
447
433
|
let activeRevealController = null;
|
|
448
434
|
let revealControllerSeq = 0;
|
|
435
|
+
// Serialize Show-me reveal clicks across ALL buttons so overlapping rapid clicks
|
|
436
|
+
// can never interleave. Each click chains behind the previous handler and grabs
|
|
437
|
+
// a monotonic token. This closes the race where, during the
|
|
438
|
+
// `await superseded.close()` teardown window, no global controller is registered:
|
|
439
|
+
// without serialization a faster later click could start, become active, and
|
|
440
|
+
// then be overwritten by this (older, still-awaiting) handler — i.e. NOT
|
|
441
|
+
// "last click wins". With the chain, a newer click waits for this one to fully
|
|
442
|
+
// settle (and is then properly superseded), and an older handler that has been
|
|
443
|
+
// overtaken while waiting discards its work via the token check.
|
|
444
|
+
let revealClickChain = Promise.resolve();
|
|
445
|
+
let revealClickSeq = 0;
|
|
446
|
+
// Store the new active reveal. Superseding the previous one is done explicitly
|
|
447
|
+
// at click start (see supersedeActiveReveal), so this only records state.
|
|
449
448
|
function registerActiveReveal(controller) {
|
|
450
|
-
const previous = activeRevealController;
|
|
451
449
|
activeRevealController = controller;
|
|
452
|
-
|
|
453
|
-
|
|
450
|
+
}
|
|
451
|
+
// Detach and return the currently active reveal unless it belongs to exceptId.
|
|
452
|
+
// The caller is responsible for closing it (and awaiting its teardown).
|
|
453
|
+
function supersedeActiveReveal(exceptId) {
|
|
454
|
+
const current = activeRevealController;
|
|
455
|
+
if (current && current.id !== exceptId) {
|
|
456
|
+
activeRevealController = null;
|
|
457
|
+
return current;
|
|
454
458
|
}
|
|
459
|
+
return null;
|
|
455
460
|
}
|
|
456
461
|
function clearActiveReveal(id) {
|
|
457
462
|
if (activeRevealController?.id === id) {
|
|
@@ -465,6 +470,28 @@ function closeMorePanelsIfOpen() {
|
|
|
465
470
|
const trigger = document.querySelector('[data-testid="more-sidebars-button"]');
|
|
466
471
|
trigger?.click();
|
|
467
472
|
}
|
|
473
|
+
function closeVersionSelectorIfOpen() {
|
|
474
|
+
if (!isElementPresent("@version-selector-list"))
|
|
475
|
+
return;
|
|
476
|
+
const list = document.querySelector('[data-testid="version-selector-list"]');
|
|
477
|
+
if (list) {
|
|
478
|
+
list.dispatchEvent(new KeyboardEvent("keydown", {
|
|
479
|
+
key: "Escape",
|
|
480
|
+
code: "Escape",
|
|
481
|
+
bubbles: true,
|
|
482
|
+
cancelable: true,
|
|
483
|
+
}));
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
const trigger = document.querySelector('[data-testid="version-selector"][aria-expanded="true"]') ??
|
|
487
|
+
document.querySelector('[data-testid="version-selector"]');
|
|
488
|
+
trigger?.click();
|
|
489
|
+
}
|
|
490
|
+
function isAgentsPanelOpen() {
|
|
491
|
+
const trigger = document.querySelector('[data-testid="agents-panel-button"]');
|
|
492
|
+
return (trigger?.getAttribute("aria-pressed") === "true" ||
|
|
493
|
+
isElementVisibleBySelector("@sidebar-panel-agents-panel"));
|
|
494
|
+
}
|
|
468
495
|
// Button component for "Show me" functionality with availability detection
|
|
469
496
|
function SelectorButton({ selectorDef, keyProp, }) {
|
|
470
497
|
const editContext = useEditContext();
|
|
@@ -521,19 +548,21 @@ function SelectorButton({ selectorDef, keyProp, }) {
|
|
|
521
548
|
}, []);
|
|
522
549
|
// Run the undo steps and reset. Used for explicit close (2nd click, auto
|
|
523
550
|
// timer, or being superseded by another reveal via mutual exclusion).
|
|
524
|
-
const runRestore = useCallback(() => {
|
|
551
|
+
const runRestore = useCallback(async () => {
|
|
525
552
|
const reveal = revealRef.current;
|
|
553
|
+
// Reset button state immediately (button turns blue) while the surface
|
|
554
|
+
// teardown animation plays out; the returned promise resolves once settled.
|
|
555
|
+
clearActiveReveal(reveal?.id ?? controllerIdRef.current);
|
|
556
|
+
revealRef.current = null;
|
|
557
|
+
setIsActiveReveal(false);
|
|
526
558
|
if (reveal) {
|
|
527
559
|
try {
|
|
528
|
-
reveal.restore();
|
|
560
|
+
await reveal.restore();
|
|
529
561
|
}
|
|
530
562
|
catch {
|
|
531
563
|
// ignore restore failures
|
|
532
564
|
}
|
|
533
565
|
}
|
|
534
|
-
clearActiveReveal(reveal?.id ?? controllerIdRef.current);
|
|
535
|
-
revealRef.current = null;
|
|
536
|
-
setIsActiveReveal(false);
|
|
537
566
|
}, []);
|
|
538
567
|
const runRestoreRef = useRef(runRestore);
|
|
539
568
|
runRestoreRef.current = runRestore;
|
|
@@ -626,138 +655,260 @@ function SelectorButton({ selectorDef, keyProp, }) {
|
|
|
626
655
|
}
|
|
627
656
|
if (isDisabled)
|
|
628
657
|
return;
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
658
|
+
// Sequence overlapping Show-me clicks across ALL buttons so a rapid
|
|
659
|
+
// second click can't interleave with this one. We chain behind any
|
|
660
|
+
// in-flight reveal and take a monotonic token; if a newer click
|
|
661
|
+
// arrives while we wait our turn, this (now stale) handler bails out
|
|
662
|
+
// instead of overtaking it. This guarantees "last click wins" and
|
|
663
|
+
// closes the teardown-window race where, during
|
|
664
|
+
// `await superseded.close()`, no global controller is registered.
|
|
665
|
+
const clickToken = ++revealClickSeq;
|
|
666
|
+
const previousClick = revealClickChain;
|
|
667
|
+
let releaseClick = () => { };
|
|
668
|
+
revealClickChain = new Promise((resolve) => {
|
|
669
|
+
releaseClick = resolve;
|
|
670
|
+
});
|
|
671
|
+
try {
|
|
672
|
+
await previousClick;
|
|
673
|
+
// A newer click superseded this one while we waited our turn.
|
|
674
|
+
if (clickToken !== revealClickSeq) {
|
|
634
675
|
return;
|
|
635
676
|
}
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
677
|
+
// State-machine semantics: any new Show-me action supersedes the
|
|
678
|
+
// currently active State 3 reveal from another button, restoring
|
|
679
|
+
// its UI first. Await the teardown so this reveal samples fresh
|
|
680
|
+
// DOM and avoids a stale "was this surface open?" read. Because
|
|
681
|
+
// clicks are serialized above, the superseded controller is
|
|
682
|
+
// always the previous fully-settled reveal (no race here).
|
|
683
|
+
const superseded = supersedeActiveReveal(controllerIdRef.current);
|
|
684
|
+
if (superseded) {
|
|
685
|
+
try {
|
|
686
|
+
// Await the close so A's surface finishes its teardown
|
|
687
|
+
// animation before B starts revealing (event-driven, not timed).
|
|
688
|
+
await superseded.close();
|
|
689
|
+
}
|
|
690
|
+
catch {
|
|
691
|
+
// ignore supersede failures
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
const runId = globalThis.crypto?.randomUUID?.() ??
|
|
695
|
+
`manual-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
696
|
+
const resolveElements = (selector = selectorDef.selector) => selector ? getElementsForSelector(selector) : [];
|
|
697
|
+
const runManualAction = async (actionName, elements) => {
|
|
698
|
+
if (!actionName ||
|
|
699
|
+
!editContext ||
|
|
700
|
+
!manualActions?.[actionName]) {
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
const action = manualActions[actionName];
|
|
704
|
+
const actionProps = {
|
|
705
|
+
editContext,
|
|
706
|
+
selectorDef,
|
|
707
|
+
duration: HIGHLIGHT_DURATION_MS,
|
|
708
|
+
runId,
|
|
709
|
+
elements,
|
|
710
|
+
resolveElements,
|
|
711
|
+
};
|
|
712
|
+
await action(actionProps);
|
|
644
713
|
};
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
714
|
+
// Undo steps captured as we reveal, plus predicates telling
|
|
715
|
+
// whether the revealed container is still open.
|
|
716
|
+
const undoSteps = [];
|
|
717
|
+
const openPredicates = [];
|
|
718
|
+
// 1. Sidebar-only: open the sidebar.
|
|
719
|
+
if (isSidebarOnly &&
|
|
720
|
+
editContext?.openSidebar &&
|
|
721
|
+
selectorDef.location) {
|
|
722
|
+
const sidebarId = selectorDef.location;
|
|
723
|
+
const wasOpen = !!editContext.openSidebars?.includes(sidebarId);
|
|
724
|
+
if (!wasOpen) {
|
|
725
|
+
editContext.openSidebar(sidebarId);
|
|
726
|
+
undoSteps.push(async () => {
|
|
727
|
+
editContextRef.current?.toggleSidebar?.(sidebarId, {
|
|
728
|
+
forceClose: true,
|
|
729
|
+
});
|
|
730
|
+
await editContextRef.current?.waitForSurfaceSettled?.(`sidebar:${sidebarId}`);
|
|
731
|
+
});
|
|
732
|
+
// Wait for the sidebar's open animation to finish before querying.
|
|
733
|
+
await editContext.waitForSurfaceSettled?.(`sidebar:${sidebarId}`);
|
|
734
|
+
}
|
|
735
|
+
openPredicates.push(() => !!editContextRef.current?.openSidebars?.includes(sidebarId));
|
|
664
736
|
}
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
if (selectorDef.tab) {
|
|
678
|
-
editContext?.setActiveEditorTab(selectorDef.tab);
|
|
679
|
-
}
|
|
680
|
-
// 2. Editor form slider.
|
|
681
|
-
if (shouldOpenEditorForm && editContext) {
|
|
682
|
-
const slotId = editContext.getActiveSlotId();
|
|
683
|
-
editContext.setEditorFormHiddenForSlot(slotId, false);
|
|
684
|
-
undoSteps.push(() => editContextRef.current?.setEditorFormHiddenForSlot(slotId, true));
|
|
685
|
-
openPredicates.push(() => !isEditorFormSliderHidden(getEditorFormSlider()));
|
|
686
|
-
await waitForEditorFormSliderOpen(formSlider);
|
|
687
|
-
}
|
|
688
|
-
else if (selectorDef.tab) {
|
|
689
|
-
await waitForNextFrame();
|
|
690
|
-
}
|
|
691
|
-
// 3. beforeAction (may open the More-panels flyout, reveal fields, etc.).
|
|
692
|
-
const resolvedElements = !isSidebarOnly
|
|
693
|
-
? await waitForResolvedElements(resolveElements, selectorDef.selector)
|
|
694
|
-
: [];
|
|
695
|
-
const actionElements = resolvedElements.length > 0
|
|
696
|
-
? resolvedElements
|
|
697
|
-
: availabilityElements;
|
|
698
|
-
const morePanelsWasOpen = isElementPresent("@more-sidebars-panel");
|
|
699
|
-
await runManualAction(selectorDef.beforeAction, actionElements);
|
|
700
|
-
if (selectorDef.beforeAction === "open-more-sidebars") {
|
|
701
|
-
const morePanelsNowOpen = isElementPresent("@more-sidebars-panel");
|
|
702
|
-
if (!morePanelsWasOpen && morePanelsNowOpen) {
|
|
703
|
-
undoSteps.push(() => closeMorePanelsIfOpen());
|
|
704
|
-
openPredicates.push(() => isElementPresent("@more-sidebars-panel"));
|
|
737
|
+
const availabilityElements = anchorSelector
|
|
738
|
+
? resolveElements(anchorSelector)
|
|
739
|
+
: [];
|
|
740
|
+
const relevantElements = !isSidebarOnly
|
|
741
|
+
? [...resolveElements(), ...availabilityElements]
|
|
742
|
+
: availabilityElements;
|
|
743
|
+
const formSlider = getEditorFormSlider(relevantElements);
|
|
744
|
+
const shouldOpenEditorForm = !isSidebarOnly &&
|
|
745
|
+
!!formSlider &&
|
|
746
|
+
isEditorFormSliderHidden(formSlider);
|
|
747
|
+
if (selectorDef.tab) {
|
|
748
|
+
editContext?.setActiveEditorTab(selectorDef.tab);
|
|
705
749
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
// present but not yet laid out (highlightElement skips invisible ones).
|
|
717
|
-
const highlightSelector = isSidebarOnly
|
|
718
|
-
? selectorDef.location
|
|
719
|
-
? `@sidebar-panel-${selectorDef.location}`
|
|
720
|
-
: ""
|
|
721
|
-
: selectorDef.selector;
|
|
722
|
-
if (highlightSelector) {
|
|
723
|
-
const highlightTargets = await waitForVisibleElements(highlightSelector, 1500);
|
|
724
|
-
if (highlightTargets.length > 0) {
|
|
725
|
-
await highlightElement(highlightSelector, HIGHLIGHT_DURATION_MS);
|
|
750
|
+
// 2. Editor form slider.
|
|
751
|
+
if (shouldOpenEditorForm && editContext) {
|
|
752
|
+
const slotId = editContext.getActiveSlotId();
|
|
753
|
+
editContext.setEditorFormHiddenForSlot(slotId, false);
|
|
754
|
+
undoSteps.push(async () => {
|
|
755
|
+
editContextRef.current?.setEditorFormHiddenForSlot(slotId, true);
|
|
756
|
+
await editContextRef.current?.waitForSurfaceSettled?.("editor-form");
|
|
757
|
+
});
|
|
758
|
+
openPredicates.push(() => !isEditorFormSliderHidden(getEditorFormSlider()));
|
|
759
|
+
await editContext.waitForSurfaceSettled?.("editor-form");
|
|
726
760
|
}
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
const
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
761
|
+
else if (selectorDef.tab) {
|
|
762
|
+
await waitForNextFrame();
|
|
763
|
+
}
|
|
764
|
+
// 3. beforeAction (may open the More-panels flyout, reveal fields, etc.).
|
|
765
|
+
const resolvedElements = !isSidebarOnly
|
|
766
|
+
? await waitForResolvedElements(resolveElements, selectorDef.selector)
|
|
767
|
+
: [];
|
|
768
|
+
const actionElements = resolvedElements.length > 0
|
|
769
|
+
? resolvedElements
|
|
770
|
+
: availabilityElements;
|
|
771
|
+
const morePanelsWasOpen = isElementPresent("@more-sidebars-panel");
|
|
772
|
+
const versionSelectorWasOpen = isElementPresent("@version-selector-list");
|
|
773
|
+
// Capture pre-reveal state for the AI Assistant reveals so we only
|
|
774
|
+
// restore (close) what THIS button actually opened.
|
|
775
|
+
const agentsPanelWasOpen = isAgentsPanelOpen();
|
|
776
|
+
const agentSettingsWasOpen = !!selectorDef.selector &&
|
|
777
|
+
isElementPresent(selectorDef.selector) &&
|
|
778
|
+
selectorDef.beforeAction === "open-agent-settings";
|
|
779
|
+
await runManualAction(selectorDef.beforeAction, actionElements);
|
|
780
|
+
if (selectorDef.beforeAction === "open-more-sidebars") {
|
|
781
|
+
const morePanelsNowOpen = isElementPresent("@more-sidebars-panel");
|
|
782
|
+
if (!morePanelsWasOpen && morePanelsNowOpen) {
|
|
783
|
+
undoSteps.push(async () => {
|
|
784
|
+
closeMorePanelsIfOpen();
|
|
785
|
+
await waitForSelectorAnimations('[data-testid="more-sidebars-panel"]');
|
|
786
|
+
});
|
|
787
|
+
openPredicates.push(() => isElementPresent("@more-sidebars-panel"));
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
if (selectorDef.beforeAction === "open-version-selector") {
|
|
791
|
+
const versionSelectorNowOpen = isElementPresent("@version-selector-list");
|
|
792
|
+
if (!versionSelectorWasOpen && versionSelectorNowOpen) {
|
|
793
|
+
undoSteps.push(async () => {
|
|
794
|
+
closeVersionSelectorIfOpen();
|
|
795
|
+
await waitForSelectorAnimations('[data-testid="version-selector-list"]');
|
|
796
|
+
});
|
|
797
|
+
openPredicates.push(() => isElementPresent("@version-selector-list"));
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
if (selectorDef.beforeAction === "open-agents-panel" ||
|
|
801
|
+
selectorDef.beforeAction === "open-agent-settings") {
|
|
802
|
+
// The beforeAction already awaited the panel/popover open
|
|
803
|
+
// animation (see config openAgentsPanel/openAgentSettings), so
|
|
804
|
+
// no polling here.
|
|
805
|
+
const agentsPanelNowOpen = isAgentsPanelOpen();
|
|
806
|
+
// Push the panel-close undo first so that, since undo steps run
|
|
807
|
+
// in reverse, the settings popover is closed before the panel.
|
|
808
|
+
if (!agentsPanelWasOpen && agentsPanelNowOpen) {
|
|
809
|
+
undoSteps.push(async () => {
|
|
810
|
+
if (editContextRef.current?.isMobile) {
|
|
811
|
+
editContextRef.current?.toggleSidebar?.("agents-panel", {
|
|
812
|
+
forceClose: true,
|
|
813
|
+
});
|
|
814
|
+
await editContextRef.current?.waitForSurfaceSettled?.("sidebar:agents-panel");
|
|
739
815
|
}
|
|
740
|
-
|
|
741
|
-
|
|
816
|
+
else {
|
|
817
|
+
editContextRef.current?.setShowAgentsPanel?.(false);
|
|
818
|
+
await editContextRef.current?.waitForSurfaceSettled?.("agents-panel");
|
|
742
819
|
}
|
|
820
|
+
});
|
|
821
|
+
openPredicates.push(() => isAgentsPanelOpen());
|
|
822
|
+
}
|
|
823
|
+
if (selectorDef.beforeAction === "open-agent-settings") {
|
|
824
|
+
const settingsTargetNowOpen = !!selectorDef.selector &&
|
|
825
|
+
isElementPresent(selectorDef.selector);
|
|
826
|
+
if (!agentSettingsWasOpen && settingsTargetNowOpen) {
|
|
827
|
+
undoSteps.push(async () => {
|
|
828
|
+
const trigger = document.querySelector('[data-testid="agent-settings-popover-trigger"]');
|
|
829
|
+
if (trigger &&
|
|
830
|
+
selectorDef.selector &&
|
|
831
|
+
isElementPresent(selectorDef.selector)) {
|
|
832
|
+
trigger.click();
|
|
833
|
+
await waitForSelectorAnimations('[data-testid="agent-settings-popover-content"]');
|
|
834
|
+
}
|
|
835
|
+
});
|
|
836
|
+
openPredicates.push(() => selectorDef.selector
|
|
837
|
+
? isElementPresent(selectorDef.selector)
|
|
838
|
+
: false);
|
|
743
839
|
}
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
// afterAction is the declared inverse for custom reveals (e.g. field actions).
|
|
843
|
+
if (selectorDef.afterAction) {
|
|
844
|
+
undoSteps.push(async () => {
|
|
845
|
+
await runManualAction(selectorDef.afterAction, !isSidebarOnly ? resolveElements() : availabilityElements);
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
// Highlight the target. For sidebar-only selectors there is no
|
|
849
|
+
// inner target, so we highlight the opened sidebar panel itself.
|
|
850
|
+
// Wait for it to become visible first, since a just-revealed
|
|
851
|
+
// element may be present but not yet laid out (highlightElement
|
|
852
|
+
// skips invisible ones).
|
|
853
|
+
const highlightSelector = isSidebarOnly
|
|
854
|
+
? selectorDef.location
|
|
855
|
+
? `@sidebar-panel-${selectorDef.location}`
|
|
856
|
+
: ""
|
|
857
|
+
: selectorDef.selector;
|
|
858
|
+
// The highlight runs a finite CSS animation; highlightElement
|
|
859
|
+
// resolves on its animationend. We do NOT await it before
|
|
860
|
+
// registering the reveal (the button must turn green immediately);
|
|
861
|
+
// close=auto instead chains its restore onto this lifetime.
|
|
862
|
+
let highlightLifetime = Promise.resolve();
|
|
863
|
+
if (highlightSelector) {
|
|
864
|
+
const highlightTargets = await waitForVisibleElements(highlightSelector, 1500);
|
|
865
|
+
if (highlightTargets.length > 0) {
|
|
866
|
+
highlightLifetime = highlightElement(highlightSelector, HIGHLIGHT_DURATION_MS);
|
|
867
|
+
}
|
|
760
868
|
}
|
|
869
|
+
// If we opened/undid anything, this was a State-3 reveal: keep the
|
|
870
|
+
// button active (green) and register it for mutual exclusion.
|
|
871
|
+
if (undoSteps.length > 0) {
|
|
872
|
+
const id = ++revealControllerSeq;
|
|
873
|
+
controllerIdRef.current = id;
|
|
874
|
+
revealRef.current = {
|
|
875
|
+
id,
|
|
876
|
+
restore: async () => {
|
|
877
|
+
for (let i = undoSteps.length - 1; i >= 0; i -= 1) {
|
|
878
|
+
try {
|
|
879
|
+
await undoSteps[i]?.();
|
|
880
|
+
}
|
|
881
|
+
catch {
|
|
882
|
+
// ignore individual undo failures
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
},
|
|
886
|
+
isStillOpen: () => openPredicates.length === 0
|
|
887
|
+
? true
|
|
888
|
+
: openPredicates.some((predicate) => predicate()),
|
|
889
|
+
};
|
|
890
|
+
registerActiveReveal({
|
|
891
|
+
id,
|
|
892
|
+
close: () => runRestoreRef.current(),
|
|
893
|
+
isStillOpen: () => revealRef.current?.isStillOpen() ?? false,
|
|
894
|
+
});
|
|
895
|
+
setIsActiveReveal(true);
|
|
896
|
+
if (closeMode === "auto") {
|
|
897
|
+
// Restore right after the highlight animation completes,
|
|
898
|
+
// instead of racing a duration-matched timer.
|
|
899
|
+
void highlightLifetime.then(() => {
|
|
900
|
+
if (controllerIdRef.current === id) {
|
|
901
|
+
void runRestoreRef.current();
|
|
902
|
+
}
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
finally {
|
|
908
|
+
// Release our slot so the next queued click can proceed (and then
|
|
909
|
+
// properly supersede us). Runs even if the reveal threw, so the
|
|
910
|
+
// click chain can never deadlock.
|
|
911
|
+
releaseClick();
|
|
761
912
|
}
|
|
762
913
|
}, disabled: isDisabled && !isActiveReveal, className: cn("inline-flex h-5 w-5 items-center justify-center rounded border transition-colors", isActiveReveal
|
|
763
914
|
? "border-feedback-green bg-feedback-green-light text-feedback-green hover:bg-feedback-green-light cursor-pointer"
|
|
@@ -806,10 +957,10 @@ function renderLineWithSelectors(text, uiSelectors, manualLinkTargets, onManualL
|
|
|
806
957
|
function renderInlineSelectorsAndFormatting(text, uiSelectors) {
|
|
807
958
|
const parts = [];
|
|
808
959
|
let lastIndex = 0;
|
|
809
|
-
// Combined regex for {{namedSelector}}, @selector, and **bold
|
|
810
|
-
//
|
|
811
|
-
//
|
|
812
|
-
//
|
|
960
|
+
// Combined regex for {{namedSelector}}, @selector, and **bold**.
|
|
961
|
+
// @selector can include -sidebar suffix for sidebar-only selectors.
|
|
962
|
+
// The matcher keeps legacy @iframe: tokens parseable, but they are unavailable.
|
|
963
|
+
// Also matches optional parentheses around selectors: ({{name}}) or (@selector).
|
|
813
964
|
const regex = /(\()?(\{\{([\w\-]+)\}\})|(\()?(@(?:iframe:[\w\-\.#\[\]=]*[\w\-#\[\]=]|[\w\-\.#\[\]=]*[\w\-#\[\]=]))|(\*\*(.+?)\*\*)/g;
|
|
814
965
|
let match;
|
|
815
966
|
while ((match = regex.exec(text)) !== null) {
|