@parhelia/core 0.1.12888 → 0.1.12890
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/AgentCard.d.ts +2 -1
- package/dist/agents-view/AgentCard.js +14 -38
- package/dist/agents-view/AgentCard.js.map +1 -1
- package/dist/agents-view/AgentGalleryCard.d.ts +12 -0
- package/dist/agents-view/AgentGalleryCard.js +12 -0
- package/dist/agents-view/AgentGalleryCard.js.map +1 -0
- package/dist/agents-view/AgentGalleryView.d.ts +18 -0
- package/dist/agents-view/AgentGalleryView.js +88 -0
- package/dist/agents-view/AgentGalleryView.js.map +1 -0
- package/dist/agents-view/AgentProfileIcon.d.ts +9 -0
- package/dist/agents-view/AgentProfileIcon.js +28 -0
- package/dist/agents-view/AgentProfileIcon.js.map +1 -0
- package/dist/agents-view/AgentsView.d.ts +6 -1
- package/dist/agents-view/AgentsView.js +40 -12
- package/dist/agents-view/AgentsView.js.map +1 -1
- package/dist/agents-view/AgentsWorkspaceView.js +40 -21
- package/dist/agents-view/AgentsWorkspaceView.js.map +1 -1
- package/dist/agents-view/DateAgentsGroup.d.ts +2 -1
- package/dist/agents-view/DateAgentsGroup.js +2 -2
- package/dist/agents-view/DateAgentsGroup.js.map +1 -1
- package/dist/agents-view/ProfileAgentsGroup.d.ts +2 -1
- package/dist/agents-view/ProfileAgentsGroup.js +5 -8
- package/dist/agents-view/ProfileAgentsGroup.js.map +1 -1
- package/dist/agents-view/RenameAgentDialog.d.ts +12 -0
- package/dist/agents-view/RenameAgentDialog.js +40 -0
- package/dist/agents-view/RenameAgentDialog.js.map +1 -0
- package/dist/components/FilterInput.d.ts +2 -0
- package/dist/components/FilterInput.js +4 -2
- package/dist/components/FilterInput.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +1 -1
- package/dist/components/ui/alert-dialog.js +5 -5
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts +3 -2
- package/dist/components/ui/alert.js +9 -4
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/button.d.ts +9 -4
- package/dist/components/ui/button.js +16 -9
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +1 -1
- package/dist/components/ui/dialog.js +4 -3
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/styled-dialog-title.js +1 -1
- package/dist/components/ui/styled-dialog-title.js.map +1 -1
- package/dist/config/config.js +4 -3
- package/dist/config/config.js.map +1 -1
- package/dist/editor/FieldListField.js +6 -2
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/GlobalMenuBar.js +3 -1
- package/dist/editor/GlobalMenuBar.js.map +1 -1
- package/dist/editor/LinkEditorDialog.js +3 -3
- package/dist/editor/LinkEditorDialog.js.map +1 -1
- package/dist/editor/MainLayout.js +11 -9
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/WorkspaceTitleSwitcher.d.ts +5 -0
- package/dist/editor/WorkspaceTitleSwitcher.js +86 -0
- package/dist/editor/WorkspaceTitleSwitcher.js.map +1 -0
- package/dist/editor/ai/AgentInlineDialogContent.js +1 -1
- package/dist/editor/ai/AgentInlineDialogContent.js.map +1 -1
- package/dist/editor/ai/Agents.js +155 -43
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/InlineAiDialog.js +1 -1
- package/dist/editor/ai/InlineAiDialog.js.map +1 -1
- package/dist/editor/ai/dialogs/QuestionnaireInline.js +52 -82
- package/dist/editor/ai/dialogs/QuestionnaireInline.js.map +1 -1
- package/dist/editor/ai/terminal/agentQuestionnaireRecap.d.ts +82 -0
- package/dist/editor/ai/terminal/agentQuestionnaireRecap.js +277 -0
- package/dist/editor/ai/terminal/agentQuestionnaireRecap.js.map +1 -0
- package/dist/editor/ai/terminal/agentQuestionnaireTranscriptRecovery.d.ts +3 -0
- package/dist/editor/ai/terminal/agentQuestionnaireTranscriptRecovery.js +3 -3
- package/dist/editor/ai/terminal/agentQuestionnaireTranscriptRecovery.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionLiveTotals.d.ts +5 -0
- package/dist/editor/ai/terminal/agentSessionLiveTotals.js +14 -0
- package/dist/editor/ai/terminal/agentSessionLiveTotals.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionSnapshot.js +2 -0
- package/dist/editor/ai/terminal/agentSessionSnapshot.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/AgentGreeting.js +5 -2
- package/dist/editor/ai/terminal/components/AgentGreeting.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentProjectProgress.d.ts +12 -0
- package/dist/editor/ai/terminal/components/AgentProjectProgress.js +207 -0
- package/dist/editor/ai/terminal/components/AgentProjectProgress.js.map +1 -0
- 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/AgentPromptComposer.d.ts +2 -1
- package/dist/editor/ai/terminal/components/AgentPromptComposer.js +5 -2
- 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 +5 -3
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.d.ts +4 -3
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js +6 -19
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.d.ts +5 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.js +33 -2
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.d.ts +2 -0
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js +20 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js +2 -1
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalView.d.ts +3 -2
- package/dist/editor/ai/terminal/components/AgentTerminalView.js +11 -2
- package/dist/editor/ai/terminal/components/AgentTerminalView.js.map +1 -1
- package/dist/editor/ai/terminal/components/AiResponseMessage.js +59 -7
- package/dist/editor/ai/terminal/components/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/QuestionnaireRecap.d.ts +9 -0
- package/dist/editor/ai/terminal/components/QuestionnaireRecap.js +56 -0
- package/dist/editor/ai/terminal/components/QuestionnaireRecap.js.map +1 -0
- package/dist/editor/ai/terminal/contextBreakdown.d.ts +17 -0
- package/dist/editor/ai/terminal/contextBreakdown.js +58 -0
- package/dist/editor/ai/terminal/contextBreakdown.js.map +1 -0
- package/dist/editor/ai/terminal/types.d.ts +2 -0
- package/dist/editor/ai/terminal/useAgentAutoStartOnCreate.d.ts +29 -0
- package/dist/editor/ai/terminal/useAgentAutoStartOnCreate.js +68 -0
- package/dist/editor/ai/terminal/useAgentAutoStartOnCreate.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentInlineDialogEvents.js +8 -3
- package/dist/editor/ai/terminal/useAgentInlineDialogEvents.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentInlineDialogState.d.ts +10 -3
- package/dist/editor/ai/terminal/useAgentInlineDialogState.js +33 -4
- package/dist/editor/ai/terminal/useAgentInlineDialogState.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentRunResyncSocketHandler.js +16 -2
- package/dist/editor/ai/terminal/useAgentRunResyncSocketHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentRunStatusSocketHandler.js +3 -1
- package/dist/editor/ai/terminal/useAgentRunStatusSocketHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSession.js +12 -1
- package/dist/editor/ai/terminal/useAgentSession.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSubmitLifecycle.d.ts +3 -0
- package/dist/editor/ai/terminal/useAgentSubmitLifecycle.js +6 -1
- package/dist/editor/ai/terminal/useAgentSubmitLifecycle.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js +48 -4
- package/dist/editor/ai/terminal/useAgentTerminalController.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalViewProps.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalViewProps.js +2 -1
- package/dist/editor/ai/terminal/useAgentTerminalViewProps.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentToolCallHandler.js +13 -1
- package/dist/editor/ai/terminal/useAgentToolCallHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentToolResultHandler.js +31 -7
- package/dist/editor/ai/terminal/useAgentToolResultHandler.js.map +1 -1
- package/dist/editor/bridge/BridgeClient.d.ts +1 -8
- package/dist/editor/bridge/BridgeClient.js +2 -4
- package/dist/editor/bridge/BridgeClient.js.map +1 -1
- package/dist/editor/bridge/protocol.d.ts +512 -0
- package/dist/editor/bridge/protocol.js +188 -0
- package/dist/editor/bridge/protocol.js.map +1 -0
- package/dist/editor/client/AboutDialog.js +15 -4
- package/dist/editor/client/AboutDialog.js.map +1 -1
- package/dist/editor/client/EditorShell.js +50 -13
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +6 -0
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/hooks/useSocketMessageHandler.d.ts +3 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js +57 -25
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
- package/dist/editor/client/hooks/useWorkbox.d.ts +1 -0
- package/dist/editor/client/hooks/useWorkbox.js +14 -1
- package/dist/editor/client/hooks/useWorkbox.js.map +1 -1
- package/dist/editor/client/operationToasts.d.ts +2 -0
- package/dist/editor/client/operationToasts.js +35 -0
- package/dist/editor/client/operationToasts.js.map +1 -0
- package/dist/editor/client/operations.d.ts +4 -0
- package/dist/editor/client/operations.js +134 -74
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/client/pageModelBuilder.d.ts +1 -0
- package/dist/editor/client/pageModelBuilder.js +22 -13
- package/dist/editor/client/pageModelBuilder.js.map +1 -1
- package/dist/editor/client/waitForEditOperationTerminal.d.ts +1 -0
- package/dist/editor/client/waitForEditOperationTerminal.js +1 -1
- package/dist/editor/client/waitForEditOperationTerminal.js.map +1 -1
- package/dist/editor/commands/itemCommands.js +5 -16
- package/dist/editor/commands/itemCommands.js.map +1 -1
- package/dist/editor/content-tree/IndicatorSettings.js +3 -2
- package/dist/editor/content-tree/IndicatorSettings.js.map +1 -1
- package/dist/editor/field-types/CheckboxEditor.js +3 -1
- package/dist/editor/field-types/CheckboxEditor.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +24 -7
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +19 -2
- package/dist/editor/field-types/SingleLineText.js.map +1 -1
- package/dist/editor/field-types/useTextCompletion.d.ts +20 -0
- package/dist/editor/field-types/useTextCompletion.js +166 -0
- package/dist/editor/field-types/useTextCompletion.js.map +1 -0
- package/dist/editor/menubar/ItemLanguageVersion.js +3 -14
- package/dist/editor/menubar/ItemLanguageVersion.js.map +1 -1
- package/dist/editor/menubar/OperationsIndicator.d.ts +7 -0
- package/dist/editor/menubar/OperationsIndicator.js +87 -0
- package/dist/editor/menubar/OperationsIndicator.js.map +1 -0
- package/dist/editor/menubar/ToolbarFactory.js +4 -1
- package/dist/editor/menubar/ToolbarFactory.js.map +1 -1
- package/dist/editor/menubar/VersionSelector.d.ts +3 -2
- package/dist/editor/menubar/VersionSelector.js +28 -12
- package/dist/editor/menubar/VersionSelector.js.map +1 -1
- package/dist/editor/menubar/WorkflowButton.js +7 -4
- package/dist/editor/menubar/WorkflowButton.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.js +7 -3
- package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js +4 -1
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js.map +1 -1
- package/dist/editor/notifications/NotificationCenter.js +28 -27
- package/dist/editor/notifications/NotificationCenter.js.map +1 -1
- package/dist/editor/notifications/NotificationItem.js +100 -15
- package/dist/editor/notifications/NotificationItem.js.map +1 -1
- package/dist/editor/notifications/watchEventOptions.js +3 -2
- package/dist/editor/notifications/watchEventOptions.js.map +1 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.d.ts +1 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js +8 -2
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.d.ts +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +7 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js +3 -10
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/geometry.d.ts +2 -2
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.d.ts +1 -1
- package/dist/editor/page-viewer/MiniMap.d.ts +21 -0
- package/dist/editor/page-viewer/MiniMap.js +113 -11
- package/dist/editor/page-viewer/MiniMap.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +155 -22
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/page-viewer/bridgeFieldPatch.d.ts +1 -2
- package/dist/editor/page-viewer/bridgeFieldPatch.js.map +1 -1
- package/dist/editor/page-viewer/pageViewContext.d.ts +1 -1
- package/dist/editor/reviews/DecisionsMatrix.js +5 -1
- package/dist/editor/reviews/DecisionsMatrix.js.map +1 -1
- package/dist/editor/reviews/SuggestedEdit.js +12 -2
- package/dist/editor/reviews/SuggestedEdit.js.map +1 -1
- package/dist/editor/reviews/latestFeedbackData.js +7 -1
- package/dist/editor/reviews/latestFeedbackData.js.map +1 -1
- package/dist/editor/reviews/suggestedEditState.d.ts +2 -0
- package/dist/editor/reviews/suggestedEditState.js +20 -0
- package/dist/editor/reviews/suggestedEditState.js.map +1 -1
- package/dist/editor/reviews/suggestionContentChange.d.ts +1 -1
- package/dist/editor/reviews/suggestionContentChange.js +23 -3
- package/dist/editor/reviews/suggestionContentChange.js.map +1 -1
- package/dist/editor/services/agentService.d.ts +6 -0
- package/dist/editor/services/agentService.js +14 -0
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/aiService.d.ts +5 -0
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/editor/settings/About.js +1 -1
- package/dist/editor/settings/About.js.map +1 -1
- package/dist/editor/settings/panels/AgentProfileConfigPanel.js +4 -2
- package/dist/editor/settings/panels/AgentProfileConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/AgentToolsPanel.js +61 -33
- package/dist/editor/settings/panels/AgentToolsPanel.js.map +1 -1
- package/dist/editor/settings/panels/ClusterInstancesPanel.js +2 -1
- package/dist/editor/settings/panels/ClusterInstancesPanel.js.map +1 -1
- package/dist/editor/settings/panels/JavaScriptToolAgentPanel.js +3 -2
- package/dist/editor/settings/panels/JavaScriptToolAgentPanel.js.map +1 -1
- package/dist/editor/settings/panels/ProjectTemplateAgentPanel.js +3 -2
- package/dist/editor/settings/panels/ProjectTemplateAgentPanel.js.map +1 -1
- package/dist/editor/settings/panels/StatusPanel.js +10 -7
- package/dist/editor/settings/panels/StatusPanel.js.map +1 -1
- package/dist/editor/sidebar/Completions.js +1 -1
- package/dist/editor/sidebar/Completions.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.js +1 -1
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/sidebar/OperationItem.js +1 -1
- package/dist/editor/sidebar/OperationItem.js.map +1 -1
- package/dist/editor/sidebar/Workbox.js +18 -4
- package/dist/editor/sidebar/Workbox.js.map +1 -1
- package/dist/editor/template-wizard/TemplateStructureInlineEditor.js +3 -2
- package/dist/editor/template-wizard/TemplateStructureInlineEditor.js.map +1 -1
- package/dist/editor/tree-indicators/GutterColumns.js +3 -2
- package/dist/editor/tree-indicators/GutterColumns.js.map +1 -1
- package/dist/editor/ui/DialogButtons.d.ts +3 -1
- package/dist/editor/ui/DialogButtons.js +3 -2
- package/dist/editor/ui/DialogButtons.js.map +1 -1
- package/dist/editor/ui/Icons.js +1 -1
- package/dist/editor/ui/Icons.js.map +1 -1
- package/dist/editor/ui/ItemCollectionEditor.js +2 -2
- package/dist/editor/ui/ItemCollectionEditor.js.map +1 -1
- package/dist/editor/ui/PublishItemDialog.js +4 -6
- package/dist/editor/ui/PublishItemDialog.js.map +1 -1
- package/dist/editor/ui/SimpleTabs.d.ts +2 -1
- package/dist/editor/ui/SimpleTabs.js +23 -5
- package/dist/editor/ui/SimpleTabs.js.map +1 -1
- package/dist/editor/ui/Splitter.js +120 -3
- package/dist/editor/ui/Splitter.js.map +1 -1
- package/dist/editor/ui/splitterResizeEvent.d.ts +7 -0
- package/dist/editor/ui/splitterResizeEvent.js +6 -0
- package/dist/editor/ui/splitterResizeEvent.js.map +1 -1
- package/dist/editor/version-diff/versionDiffTargets.d.ts +1 -1
- package/dist/editor/workflowFields.d.ts +1 -0
- package/dist/editor/workflowFields.js +16 -0
- package/dist/editor/workflowFields.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/splash-screen/ModernSplashScreen.js +20 -11
- package/dist/splash-screen/ModernSplashScreen.js.map +1 -1
- package/dist/splash-screen/NewPage.js +26 -7
- package/dist/splash-screen/NewPage.js.map +1 -1
- package/dist/task-board/TaskBoardWorkspace.js +154 -121
- package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
- package/dist/task-board/components/CreateTaskDialog.js +1 -1
- package/dist/task-board/components/CreateTaskDialog.js.map +1 -1
- package/dist/task-board/components/ProjectDashboard.d.ts +12 -22
- package/dist/task-board/components/ProjectDashboard.js +120 -108
- package/dist/task-board/components/ProjectDashboard.js.map +1 -1
- package/dist/task-board/components/ProjectOverviewContent.js +3 -0
- package/dist/task-board/components/ProjectOverviewContent.js.map +1 -1
- package/dist/task-board/components/ProjectPropertiesPanel.d.ts +2 -0
- package/dist/task-board/components/ProjectPropertiesPanel.js +7 -4
- package/dist/task-board/components/ProjectPropertiesPanel.js.map +1 -1
- package/dist/task-board/components/ProjectSettingsDialog.d.ts +16 -0
- package/dist/task-board/components/ProjectSettingsDialog.js +55 -47
- package/dist/task-board/components/ProjectSettingsDialog.js.map +1 -1
- package/dist/task-board/components/TaskAgentPanel.js +6 -5
- package/dist/task-board/components/TaskAgentPanel.js.map +1 -1
- package/dist/task-board/components/TaskAssigneePicker.js +3 -2
- package/dist/task-board/components/TaskAssigneePicker.js.map +1 -1
- package/dist/task-board/components/TaskAttachmentsSection.js +1 -1
- package/dist/task-board/components/TaskAttachmentsSection.js.map +1 -1
- package/dist/task-board/components/TaskBoardHomeView.d.ts +7 -0
- package/dist/task-board/components/TaskBoardHomeView.js +21 -0
- package/dist/task-board/components/TaskBoardHomeView.js.map +1 -0
- package/dist/task-board/components/TaskBoardProjectListSidebar.js +74 -12
- package/dist/task-board/components/TaskBoardProjectListSidebar.js.map +1 -1
- package/dist/task-board/components/TaskBoardTitlebar.js +9 -52
- package/dist/task-board/components/TaskBoardTitlebar.js.map +1 -1
- package/dist/task-board/components/TaskCard.js +5 -13
- package/dist/task-board/components/TaskCard.js.map +1 -1
- package/dist/task-board/components/TaskRow.js +3 -2
- package/dist/task-board/components/TaskRow.js.map +1 -1
- package/dist/task-board/taskBoardNavStore.d.ts +0 -2
- package/dist/task-board/taskBoardNavStore.js +0 -2
- package/dist/task-board/taskBoardNavStore.js.map +1 -1
- package/dist/task-board/views/DependencyGraphView.js +3 -2
- package/dist/task-board/views/DependencyGraphView.js.map +1 -1
- package/dist/task-board/views/KanbanView.js +161 -38
- package/dist/task-board/views/KanbanView.js.map +1 -1
- package/dist/task-board/views/ListView.js +1 -2
- package/dist/task-board/views/ListView.js.map +1 -1
- package/dist/task-board/views/WizardView.d.ts +2 -0
- package/dist/task-board/views/WizardView.js +7 -4
- package/dist/task-board/views/WizardView.js.map +1 -1
- package/package.json +1 -2
- package/styles.css +4 -3
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
export declare const PARHELIA_EDITING_BRIDGE_FAMILY: "parhelia/editing-bridge";
|
|
2
|
+
export type BridgeFamily = typeof PARHELIA_EDITING_BRIDGE_FAMILY;
|
|
3
|
+
export type ParheliaEditingBridgeConfig = {
|
|
4
|
+
editorOrigin?: string;
|
|
5
|
+
parentOrigin?: string;
|
|
6
|
+
parentOrigins?: string[];
|
|
7
|
+
allowedParentOrigins?: string[];
|
|
8
|
+
mode?: string;
|
|
9
|
+
pageId?: string;
|
|
10
|
+
source?: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Protocol version. `major` is the compatibility boundary — peers must share
|
|
14
|
+
* the same major to interoperate. `minor` is additive: a higher minor only
|
|
15
|
+
* adds optional, backwards-compatible messages/fields and is negotiated down to
|
|
16
|
+
* the lower of the two peers (see `negotiateMinor`).
|
|
17
|
+
*/
|
|
18
|
+
export type BridgeVersion = {
|
|
19
|
+
major: number;
|
|
20
|
+
minor: number;
|
|
21
|
+
};
|
|
22
|
+
export declare const PARHELIA_EDITING_BRIDGE_VERSION: BridgeVersion;
|
|
23
|
+
export type BridgeDirection = "parent-to-host" | "host-to-parent";
|
|
24
|
+
export type BridgeEnvelope<TName extends string = string, TPayload = unknown> = {
|
|
25
|
+
family: BridgeFamily;
|
|
26
|
+
version: BridgeVersion;
|
|
27
|
+
direction: BridgeDirection;
|
|
28
|
+
id: string;
|
|
29
|
+
name: TName;
|
|
30
|
+
timestamp: number;
|
|
31
|
+
requestId?: string;
|
|
32
|
+
payload: TPayload;
|
|
33
|
+
};
|
|
34
|
+
export type BridgeRect = {
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
top: number;
|
|
40
|
+
right: number;
|
|
41
|
+
bottom: number;
|
|
42
|
+
left: number;
|
|
43
|
+
};
|
|
44
|
+
export type BridgeViewport = {
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
};
|
|
48
|
+
export type BridgeScroll = {
|
|
49
|
+
x: number;
|
|
50
|
+
y: number;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Capabilities are an OPEN set of string names. The editor and host each
|
|
54
|
+
* advertise the names they support; the effective session set is the
|
|
55
|
+
* intersection (see `negotiateCapabilities`). Unknown names are ignored by
|
|
56
|
+
* older peers, so adding a capability is always a backwards-compatible (minor)
|
|
57
|
+
* change. `BRIDGE_CAPABILITIES` lists the well-known names for type-safe use.
|
|
58
|
+
*/
|
|
59
|
+
export declare const BRIDGE_CAPABILITIES: {
|
|
60
|
+
readonly structure: "structure";
|
|
61
|
+
readonly geometry: "geometry";
|
|
62
|
+
readonly selection: "selection";
|
|
63
|
+
readonly inlineEditing: "inlineEditing";
|
|
64
|
+
readonly richTextCommands: "richTextCommands";
|
|
65
|
+
readonly captureDom: "captureDom";
|
|
66
|
+
readonly refresh: "refresh";
|
|
67
|
+
readonly zoom: "zoom";
|
|
68
|
+
};
|
|
69
|
+
export type WellKnownBridgeCapability = (typeof BRIDGE_CAPABILITIES)[keyof typeof BRIDGE_CAPABILITIES];
|
|
70
|
+
export type BridgeCapability = WellKnownBridgeCapability | (string & {});
|
|
71
|
+
export type BridgeCapabilitySet = BridgeCapability[];
|
|
72
|
+
export type BridgeRuntimeSource = "alpaca" | "sxa" | "sitecore" | "internal" | (string & {});
|
|
73
|
+
/** Identifying metadata the host attaches to `ready` to aid debugging. */
|
|
74
|
+
export type BridgeRuntimeInfo = {
|
|
75
|
+
source?: BridgeRuntimeSource;
|
|
76
|
+
packageVersion?: string;
|
|
77
|
+
commit?: string;
|
|
78
|
+
builtAt?: string;
|
|
79
|
+
};
|
|
80
|
+
export type BridgeItemDescriptor = {
|
|
81
|
+
id: string;
|
|
82
|
+
language?: string;
|
|
83
|
+
version?: number;
|
|
84
|
+
name?: string;
|
|
85
|
+
displayName?: string;
|
|
86
|
+
path?: string;
|
|
87
|
+
database?: string;
|
|
88
|
+
};
|
|
89
|
+
export type SerializableRenderedItem = BridgeItemDescriptor & {
|
|
90
|
+
renderedFieldIds: string[];
|
|
91
|
+
};
|
|
92
|
+
export type SerializableField = {
|
|
93
|
+
elementKey: string;
|
|
94
|
+
fieldId: string;
|
|
95
|
+
item?: BridgeItemDescriptor;
|
|
96
|
+
componentId?: string;
|
|
97
|
+
textContent?: string;
|
|
98
|
+
isRichText?: boolean;
|
|
99
|
+
editable?: boolean;
|
|
100
|
+
};
|
|
101
|
+
export type SerializablePlaceholder = {
|
|
102
|
+
key: string;
|
|
103
|
+
name?: string;
|
|
104
|
+
elementKey?: string;
|
|
105
|
+
parentComponentId?: string;
|
|
106
|
+
componentIds: string[];
|
|
107
|
+
editable?: boolean;
|
|
108
|
+
};
|
|
109
|
+
export type SerializableComponent = {
|
|
110
|
+
id: string;
|
|
111
|
+
elementKey: string;
|
|
112
|
+
endElementKey?: string;
|
|
113
|
+
name?: string;
|
|
114
|
+
type?: string;
|
|
115
|
+
typeId?: string;
|
|
116
|
+
placeholderKey?: string;
|
|
117
|
+
parentComponentId?: string;
|
|
118
|
+
datasourceItem?: SerializableRenderedItem;
|
|
119
|
+
items: SerializableRenderedItem[];
|
|
120
|
+
placeholders: string[];
|
|
121
|
+
renderedDictionaryKeys: string[];
|
|
122
|
+
editorFields?: Record<string, {
|
|
123
|
+
addFields: string[];
|
|
124
|
+
removeFields: string[];
|
|
125
|
+
}>;
|
|
126
|
+
editable?: boolean;
|
|
127
|
+
visible?: boolean;
|
|
128
|
+
};
|
|
129
|
+
export type SerializablePageStructure = {
|
|
130
|
+
editRevision?: string;
|
|
131
|
+
pageId?: string;
|
|
132
|
+
url: string;
|
|
133
|
+
components: SerializableComponent[];
|
|
134
|
+
placeholders: SerializablePlaceholder[];
|
|
135
|
+
fields: SerializableField[];
|
|
136
|
+
};
|
|
137
|
+
export type SerializableComponentSkeleton = {
|
|
138
|
+
id: string;
|
|
139
|
+
name: string;
|
|
140
|
+
type: string;
|
|
141
|
+
typeId: string;
|
|
142
|
+
parametersTemplateId?: string;
|
|
143
|
+
parameters?: string;
|
|
144
|
+
items: SerializableRenderedItem[];
|
|
145
|
+
placeholders: SerializablePlaceholderSkeleton[];
|
|
146
|
+
datasourceItem?: SerializableRenderedItem;
|
|
147
|
+
isRemovedFromMasterLanguage?: boolean;
|
|
148
|
+
isInheritedFromMasterLanguage?: boolean;
|
|
149
|
+
visible?: boolean;
|
|
150
|
+
renderedDictionaryKeys: string[];
|
|
151
|
+
isShared?: boolean;
|
|
152
|
+
hasPersonalization?: boolean;
|
|
153
|
+
layoutId?: string;
|
|
154
|
+
isSharedLayout?: boolean;
|
|
155
|
+
editorFields: Record<string, {
|
|
156
|
+
addFields: string[];
|
|
157
|
+
removeFields: string[];
|
|
158
|
+
}>;
|
|
159
|
+
editable?: boolean;
|
|
160
|
+
};
|
|
161
|
+
export type SerializablePlaceholderSkeleton = {
|
|
162
|
+
name: string;
|
|
163
|
+
key: string;
|
|
164
|
+
description: string;
|
|
165
|
+
components: SerializableComponentSkeleton[];
|
|
166
|
+
editable?: boolean;
|
|
167
|
+
};
|
|
168
|
+
export type SerializablePageSkeleton = {
|
|
169
|
+
editRevision: string;
|
|
170
|
+
item: SerializableRenderedItem;
|
|
171
|
+
rootComponent: SerializableComponentSkeleton;
|
|
172
|
+
};
|
|
173
|
+
export type BridgeGeometryTargetKind = "component" | "placeholder" | "field" | "textRange" | "dropTarget";
|
|
174
|
+
export type BridgeGeometryTarget = {
|
|
175
|
+
kind: BridgeGeometryTargetKind;
|
|
176
|
+
key: string;
|
|
177
|
+
elementKey?: string;
|
|
178
|
+
componentId?: string;
|
|
179
|
+
placeholderKey?: string;
|
|
180
|
+
fieldId?: string;
|
|
181
|
+
item?: BridgeItemDescriptor;
|
|
182
|
+
orientation?: "horizontal" | "vertical";
|
|
183
|
+
description?: string;
|
|
184
|
+
rect: BridgeRect;
|
|
185
|
+
};
|
|
186
|
+
export type BridgeGeometrySnapshot = {
|
|
187
|
+
viewport: BridgeViewport;
|
|
188
|
+
scroll: BridgeScroll;
|
|
189
|
+
devicePixelRatio: number;
|
|
190
|
+
rectScale?: number;
|
|
191
|
+
scrollScale?: number;
|
|
192
|
+
targets: BridgeGeometryTarget[];
|
|
193
|
+
};
|
|
194
|
+
export type BridgeSelectionSnapshot = {
|
|
195
|
+
activeField?: {
|
|
196
|
+
elementKey: string;
|
|
197
|
+
fieldId: string;
|
|
198
|
+
item?: BridgeItemDescriptor;
|
|
199
|
+
isRichText?: boolean;
|
|
200
|
+
};
|
|
201
|
+
collapsed: boolean;
|
|
202
|
+
rect?: BridgeRect;
|
|
203
|
+
startOffset?: number;
|
|
204
|
+
endOffset?: number;
|
|
205
|
+
text?: string;
|
|
206
|
+
formatting?: BridgeSelectionFormattingState;
|
|
207
|
+
metadata?: Record<string, unknown>;
|
|
208
|
+
};
|
|
209
|
+
export type BridgeSelectionFormattingState = {
|
|
210
|
+
bold?: boolean;
|
|
211
|
+
italic?: boolean;
|
|
212
|
+
underline?: boolean;
|
|
213
|
+
strikethrough?: boolean;
|
|
214
|
+
subscript?: boolean;
|
|
215
|
+
superscript?: boolean;
|
|
216
|
+
link?: boolean;
|
|
217
|
+
orderedList?: boolean;
|
|
218
|
+
unorderedList?: boolean;
|
|
219
|
+
blockTag?: string;
|
|
220
|
+
};
|
|
221
|
+
export type BridgeMediaTarget = {
|
|
222
|
+
elementKey: string;
|
|
223
|
+
tagName: "img" | "picture" | "source" | string;
|
|
224
|
+
variantName?: string;
|
|
225
|
+
};
|
|
226
|
+
export type ReadyEventPayload = {
|
|
227
|
+
version: BridgeVersion;
|
|
228
|
+
hostUrl: string;
|
|
229
|
+
pageId?: string;
|
|
230
|
+
mode?: string;
|
|
231
|
+
viewport: BridgeViewport;
|
|
232
|
+
scroll: BridgeScroll;
|
|
233
|
+
devicePixelRatio: number;
|
|
234
|
+
capabilities: BridgeCapabilitySet;
|
|
235
|
+
runtime?: BridgeRuntimeInfo;
|
|
236
|
+
};
|
|
237
|
+
export type StructureUpdatedEventPayload = {
|
|
238
|
+
structure: SerializablePageStructure;
|
|
239
|
+
};
|
|
240
|
+
export type PageSkeletonUpdatedEventPayload = {
|
|
241
|
+
pageSkeleton: SerializablePageSkeleton;
|
|
242
|
+
};
|
|
243
|
+
export type GeometryUpdatedEventPayload = {
|
|
244
|
+
geometry: BridgeGeometrySnapshot;
|
|
245
|
+
};
|
|
246
|
+
export type ScrollChangedEventPayload = {
|
|
247
|
+
scroll: BridgeScroll;
|
|
248
|
+
};
|
|
249
|
+
export type ResizeChangedEventPayload = {
|
|
250
|
+
viewport: BridgeViewport;
|
|
251
|
+
devicePixelRatio: number;
|
|
252
|
+
};
|
|
253
|
+
export type InteractionEventPayload = {
|
|
254
|
+
kind: "click" | "doubleClick" | "contextMenu" | "hover" | "dragIntent" | "keydown" | "wheel";
|
|
255
|
+
elementKey?: string;
|
|
256
|
+
componentId?: string;
|
|
257
|
+
fieldId?: string;
|
|
258
|
+
item?: BridgeItemDescriptor;
|
|
259
|
+
media?: BridgeMediaTarget;
|
|
260
|
+
placeholderKey?: string;
|
|
261
|
+
clientX?: number;
|
|
262
|
+
clientY?: number;
|
|
263
|
+
selectionRect?: BridgeRect;
|
|
264
|
+
caretRect?: BridgeRect;
|
|
265
|
+
key?: string;
|
|
266
|
+
code?: string;
|
|
267
|
+
button?: number;
|
|
268
|
+
deltaX?: number;
|
|
269
|
+
deltaY?: number;
|
|
270
|
+
ctrlKey?: boolean;
|
|
271
|
+
shiftKey?: boolean;
|
|
272
|
+
altKey?: boolean;
|
|
273
|
+
metaKey?: boolean;
|
|
274
|
+
};
|
|
275
|
+
export type SelectionChangedEventPayload = {
|
|
276
|
+
selection: BridgeSelectionSnapshot;
|
|
277
|
+
};
|
|
278
|
+
export type FieldValueChangedEventPayload = {
|
|
279
|
+
elementKey: string;
|
|
280
|
+
fieldId: string;
|
|
281
|
+
item?: BridgeItemDescriptor;
|
|
282
|
+
value: string;
|
|
283
|
+
isRichText?: boolean;
|
|
284
|
+
};
|
|
285
|
+
export type InlineEditEndedEventPayload = {
|
|
286
|
+
elementKey: string;
|
|
287
|
+
fieldId: string;
|
|
288
|
+
item?: BridgeItemDescriptor;
|
|
289
|
+
value: string;
|
|
290
|
+
isRichText?: boolean;
|
|
291
|
+
reason: "blur" | "commit" | "cancel";
|
|
292
|
+
};
|
|
293
|
+
export type RefreshStartedEventPayload = {
|
|
294
|
+
revision?: string;
|
|
295
|
+
};
|
|
296
|
+
export type RefreshCompletedEventPayload = {
|
|
297
|
+
revision?: string;
|
|
298
|
+
structure?: SerializablePageStructure;
|
|
299
|
+
geometry?: BridgeGeometrySnapshot;
|
|
300
|
+
};
|
|
301
|
+
export type RenderErrorEventPayload = {
|
|
302
|
+
message: string;
|
|
303
|
+
code?: string;
|
|
304
|
+
details?: unknown;
|
|
305
|
+
};
|
|
306
|
+
export type DomUpdatedEventPayload = {
|
|
307
|
+
html: string;
|
|
308
|
+
url: string;
|
|
309
|
+
viewport: BridgeViewport;
|
|
310
|
+
scroll: BridgeScroll;
|
|
311
|
+
scrollWidth: number;
|
|
312
|
+
scrollHeight: number;
|
|
313
|
+
};
|
|
314
|
+
export type CaptureDomResultEventPayload = {
|
|
315
|
+
requestId: string;
|
|
316
|
+
html?: string;
|
|
317
|
+
text?: string;
|
|
318
|
+
error?: string;
|
|
319
|
+
};
|
|
320
|
+
export type BridgeEventPayloadByName = {
|
|
321
|
+
ready: ReadyEventPayload;
|
|
322
|
+
structureUpdated: StructureUpdatedEventPayload;
|
|
323
|
+
pageSkeletonUpdated: PageSkeletonUpdatedEventPayload;
|
|
324
|
+
geometryUpdated: GeometryUpdatedEventPayload;
|
|
325
|
+
scrollChanged: ScrollChangedEventPayload;
|
|
326
|
+
resizeChanged: ResizeChangedEventPayload;
|
|
327
|
+
interaction: InteractionEventPayload;
|
|
328
|
+
selectionChanged: SelectionChangedEventPayload;
|
|
329
|
+
fieldValueChanged: FieldValueChangedEventPayload;
|
|
330
|
+
inlineEditEnded: InlineEditEndedEventPayload;
|
|
331
|
+
refreshStarted: RefreshStartedEventPayload;
|
|
332
|
+
refreshCompleted: RefreshCompletedEventPayload;
|
|
333
|
+
renderError: RenderErrorEventPayload;
|
|
334
|
+
domUpdated: DomUpdatedEventPayload;
|
|
335
|
+
captureDomResult: CaptureDomResultEventPayload;
|
|
336
|
+
};
|
|
337
|
+
export type BridgeEventName = keyof BridgeEventPayloadByName;
|
|
338
|
+
export type BridgeEvent<TName extends BridgeEventName = BridgeEventName> = TName extends BridgeEventName ? BridgeEnvelope<TName, BridgeEventPayloadByName[TName]> & {
|
|
339
|
+
direction: "host-to-parent";
|
|
340
|
+
} : never;
|
|
341
|
+
export type HelloCommandPayload = {
|
|
342
|
+
/** The editor's protocol version, advertised on (re)connect. */
|
|
343
|
+
version?: BridgeVersion;
|
|
344
|
+
};
|
|
345
|
+
export type InitCommandPayload = {
|
|
346
|
+
editorOrigin: string;
|
|
347
|
+
sessionId?: string;
|
|
348
|
+
signedContext?: string;
|
|
349
|
+
mode: "edit" | "preview" | "suggestions" | string;
|
|
350
|
+
selectedComponentIds: string[];
|
|
351
|
+
featureFlags?: Record<string, boolean>;
|
|
352
|
+
/** The editor's protocol version, so the host can record/negotiate. */
|
|
353
|
+
version?: BridgeVersion;
|
|
354
|
+
/**
|
|
355
|
+
* Capabilities the editor acknowledges for this session: the intersection of
|
|
356
|
+
* what the host advertised in `ready` and what the editor supports. The host
|
|
357
|
+
* should only run/advertise behaviors in this set. `init` is the handshake
|
|
358
|
+
* boundary — the host should wait for it before emitting operational events.
|
|
359
|
+
*/
|
|
360
|
+
acknowledgedCapabilities?: BridgeCapabilitySet;
|
|
361
|
+
};
|
|
362
|
+
export type RefreshCommandPayload = {
|
|
363
|
+
url?: string;
|
|
364
|
+
revision?: string;
|
|
365
|
+
route?: string;
|
|
366
|
+
layoutKind?: "final" | "shared" | string;
|
|
367
|
+
};
|
|
368
|
+
export type SetSelectionCommandPayload = {
|
|
369
|
+
componentIds?: string[];
|
|
370
|
+
field?: {
|
|
371
|
+
elementKey?: string;
|
|
372
|
+
fieldId?: string;
|
|
373
|
+
};
|
|
374
|
+
placeholderKey?: string;
|
|
375
|
+
};
|
|
376
|
+
export type ScrollIntoViewCommandPayload = {
|
|
377
|
+
elementKey?: string;
|
|
378
|
+
componentId?: string;
|
|
379
|
+
fieldId?: string;
|
|
380
|
+
placeholderKey?: string;
|
|
381
|
+
block?: "start" | "center" | "end" | "nearest";
|
|
382
|
+
};
|
|
383
|
+
export type ScrollByCommandPayload = {
|
|
384
|
+
x?: number;
|
|
385
|
+
y?: number;
|
|
386
|
+
behavior?: "auto" | "instant" | "smooth";
|
|
387
|
+
};
|
|
388
|
+
export type QueryGeometryCommandPayload = {
|
|
389
|
+
keys?: string[];
|
|
390
|
+
textRanges?: Array<{
|
|
391
|
+
key: string;
|
|
392
|
+
elementKey?: string;
|
|
393
|
+
fieldId?: string;
|
|
394
|
+
item?: BridgeItemDescriptor;
|
|
395
|
+
start: number;
|
|
396
|
+
end: number;
|
|
397
|
+
}>;
|
|
398
|
+
};
|
|
399
|
+
export type BeginInlineEditCommandPayload = {
|
|
400
|
+
elementKey: string;
|
|
401
|
+
fieldId: string;
|
|
402
|
+
clientX?: number;
|
|
403
|
+
clientY?: number;
|
|
404
|
+
};
|
|
405
|
+
export type ApplyFieldPatchCommandPayload = {
|
|
406
|
+
elementKey: string;
|
|
407
|
+
fieldId: string;
|
|
408
|
+
value: string;
|
|
409
|
+
isRichText?: boolean;
|
|
410
|
+
source?: "real" | "suggestion-preview" | "reset" | string;
|
|
411
|
+
};
|
|
412
|
+
export type ApplyRichTextCommandPayload = {
|
|
413
|
+
elementKey: string;
|
|
414
|
+
fieldId: string;
|
|
415
|
+
command: string;
|
|
416
|
+
value?: string;
|
|
417
|
+
selectedText?: string;
|
|
418
|
+
selectionStartOffset?: number;
|
|
419
|
+
selectionEndOffset?: number;
|
|
420
|
+
};
|
|
421
|
+
export type CommitInlineEditCommandPayload = {
|
|
422
|
+
elementKey: string;
|
|
423
|
+
fieldId: string;
|
|
424
|
+
};
|
|
425
|
+
export type CancelInlineEditCommandPayload = {
|
|
426
|
+
elementKey: string;
|
|
427
|
+
fieldId: string;
|
|
428
|
+
};
|
|
429
|
+
export type SetPreviewModeCommandPayload = {
|
|
430
|
+
enabled: boolean;
|
|
431
|
+
};
|
|
432
|
+
export type SetEditorModeCommandPayload = {
|
|
433
|
+
mode: "edit" | "preview" | "suggestions";
|
|
434
|
+
};
|
|
435
|
+
export type SetLayoutKindCommandPayload = {
|
|
436
|
+
layoutKind: "final" | "shared" | string;
|
|
437
|
+
};
|
|
438
|
+
export type SetChromeVisibilityCommandPayload = {
|
|
439
|
+
visible: boolean;
|
|
440
|
+
};
|
|
441
|
+
export type SetZoomCommandPayload = {
|
|
442
|
+
zoom: number;
|
|
443
|
+
};
|
|
444
|
+
export type CaptureDomCommandPayload = {
|
|
445
|
+
requestId: string;
|
|
446
|
+
selector?: string;
|
|
447
|
+
includeText?: boolean;
|
|
448
|
+
};
|
|
449
|
+
export type BridgeCommandPayloadByName = {
|
|
450
|
+
hello: HelloCommandPayload;
|
|
451
|
+
init: InitCommandPayload;
|
|
452
|
+
refresh: RefreshCommandPayload;
|
|
453
|
+
setSelection: SetSelectionCommandPayload;
|
|
454
|
+
scrollIntoView: ScrollIntoViewCommandPayload;
|
|
455
|
+
scrollBy: ScrollByCommandPayload;
|
|
456
|
+
queryGeometry: QueryGeometryCommandPayload;
|
|
457
|
+
beginInlineEdit: BeginInlineEditCommandPayload;
|
|
458
|
+
applyFieldPatch: ApplyFieldPatchCommandPayload;
|
|
459
|
+
applyRichTextCommand: ApplyRichTextCommandPayload;
|
|
460
|
+
commitInlineEdit: CommitInlineEditCommandPayload;
|
|
461
|
+
cancelInlineEdit: CancelInlineEditCommandPayload;
|
|
462
|
+
setPreviewMode: SetPreviewModeCommandPayload;
|
|
463
|
+
setEditorMode: SetEditorModeCommandPayload;
|
|
464
|
+
setLayoutKind: SetLayoutKindCommandPayload;
|
|
465
|
+
setChromeVisibility: SetChromeVisibilityCommandPayload;
|
|
466
|
+
setZoom: SetZoomCommandPayload;
|
|
467
|
+
captureDom: CaptureDomCommandPayload;
|
|
468
|
+
};
|
|
469
|
+
export type BridgeCommandName = keyof BridgeCommandPayloadByName;
|
|
470
|
+
export type BridgeCommand<TName extends BridgeCommandName = BridgeCommandName> = TName extends BridgeCommandName ? BridgeEnvelope<TName, BridgeCommandPayloadByName[TName]> & {
|
|
471
|
+
direction: "parent-to-host";
|
|
472
|
+
} : never;
|
|
473
|
+
export declare function isKnownBridgeCommandName(value: unknown): value is BridgeCommandName;
|
|
474
|
+
export declare function isKnownBridgeEventName(value: unknown): value is BridgeEventName;
|
|
475
|
+
export declare function createBridgeEnvelope<TName extends BridgeCommandName, TPayload extends BridgeCommandPayloadByName[TName]>(name: TName, payload: TPayload, options?: {
|
|
476
|
+
id?: string;
|
|
477
|
+
timestamp?: number;
|
|
478
|
+
requestId?: string;
|
|
479
|
+
}): BridgeCommand<TName>;
|
|
480
|
+
export declare function createBridgeEnvelope<TName extends BridgeEventName, TPayload extends BridgeEventPayloadByName[TName]>(name: TName, payload: TPayload, options: {
|
|
481
|
+
direction: "host-to-parent";
|
|
482
|
+
id?: string;
|
|
483
|
+
timestamp?: number;
|
|
484
|
+
requestId?: string;
|
|
485
|
+
}): BridgeEvent<TName>;
|
|
486
|
+
export declare function isBridgeEnvelope(value: unknown): value is BridgeEnvelope;
|
|
487
|
+
export declare function isBridgeVersion(value: unknown): value is BridgeVersion;
|
|
488
|
+
/** Compatible when the major version matches; minor differences are additive. */
|
|
489
|
+
export declare function isCompatibleBridgeVersion(peerVersion: unknown): boolean;
|
|
490
|
+
/** The effective minor for a session is the lower of the two peers' minors. */
|
|
491
|
+
export declare function negotiateMinor(peerVersion: BridgeVersion): number;
|
|
492
|
+
export declare function formatBridgeVersion(value: unknown): string;
|
|
493
|
+
/** Intersection of two capability sets, preserving the order of the first. */
|
|
494
|
+
export declare function negotiateCapabilities(editorSupported: readonly BridgeCapability[], hostAdvertised: readonly BridgeCapability[]): BridgeCapability[];
|
|
495
|
+
/**
|
|
496
|
+
* Recognition-only guard: a well-formed bridge envelope from the host,
|
|
497
|
+
* regardless of whether the event name is known. RECOGNIZE messages with this;
|
|
498
|
+
* DISPATCH them with `isKnownBridgeEventName` separately, so that unknown (e.g.
|
|
499
|
+
* newer) events surface in diagnostics instead of being silently dropped.
|
|
500
|
+
*/
|
|
501
|
+
export declare function isBridgeMessageFromHost(value: unknown): value is BridgeEnvelope & {
|
|
502
|
+
direction: "host-to-parent";
|
|
503
|
+
};
|
|
504
|
+
/** Recognition-only guard: a well-formed bridge envelope from the parent. */
|
|
505
|
+
export declare function isBridgeMessageFromParent(value: unknown): value is BridgeEnvelope & {
|
|
506
|
+
direction: "parent-to-host";
|
|
507
|
+
};
|
|
508
|
+
export declare function isBridgeCommandEnvelope(value: unknown): value is BridgeCommand;
|
|
509
|
+
export declare function isBridgeEventEnvelope(value: unknown): value is BridgeEvent;
|
|
510
|
+
export declare function normalizeOrigin(value: string): string | undefined;
|
|
511
|
+
export declare function isAllowedOrigin(origin: string, allowedOrigins: readonly string[]): boolean;
|
|
512
|
+
export declare function assertAllowedOrigin(origin: string, allowedOrigins: readonly string[]): void;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
export const PARHELIA_EDITING_BRIDGE_FAMILY = "parhelia/editing-bridge";
|
|
2
|
+
export const PARHELIA_EDITING_BRIDGE_VERSION = {
|
|
3
|
+
major: 1,
|
|
4
|
+
minor: 0,
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Capabilities are an OPEN set of string names. The editor and host each
|
|
8
|
+
* advertise the names they support; the effective session set is the
|
|
9
|
+
* intersection (see `negotiateCapabilities`). Unknown names are ignored by
|
|
10
|
+
* older peers, so adding a capability is always a backwards-compatible (minor)
|
|
11
|
+
* change. `BRIDGE_CAPABILITIES` lists the well-known names for type-safe use.
|
|
12
|
+
*/
|
|
13
|
+
export const BRIDGE_CAPABILITIES = {
|
|
14
|
+
structure: "structure",
|
|
15
|
+
geometry: "geometry",
|
|
16
|
+
selection: "selection",
|
|
17
|
+
inlineEditing: "inlineEditing",
|
|
18
|
+
richTextCommands: "richTextCommands",
|
|
19
|
+
captureDom: "captureDom",
|
|
20
|
+
refresh: "refresh",
|
|
21
|
+
zoom: "zoom",
|
|
22
|
+
};
|
|
23
|
+
const commandNames = new Set([
|
|
24
|
+
"hello",
|
|
25
|
+
"init",
|
|
26
|
+
"refresh",
|
|
27
|
+
"setSelection",
|
|
28
|
+
"scrollIntoView",
|
|
29
|
+
"scrollBy",
|
|
30
|
+
"queryGeometry",
|
|
31
|
+
"beginInlineEdit",
|
|
32
|
+
"applyFieldPatch",
|
|
33
|
+
"applyRichTextCommand",
|
|
34
|
+
"commitInlineEdit",
|
|
35
|
+
"cancelInlineEdit",
|
|
36
|
+
"setPreviewMode",
|
|
37
|
+
"setEditorMode",
|
|
38
|
+
"setLayoutKind",
|
|
39
|
+
"setChromeVisibility",
|
|
40
|
+
"setZoom",
|
|
41
|
+
"captureDom",
|
|
42
|
+
]);
|
|
43
|
+
const eventNames = new Set([
|
|
44
|
+
"ready",
|
|
45
|
+
"structureUpdated",
|
|
46
|
+
"pageSkeletonUpdated",
|
|
47
|
+
"geometryUpdated",
|
|
48
|
+
"scrollChanged",
|
|
49
|
+
"resizeChanged",
|
|
50
|
+
"interaction",
|
|
51
|
+
"selectionChanged",
|
|
52
|
+
"fieldValueChanged",
|
|
53
|
+
"inlineEditEnded",
|
|
54
|
+
"refreshStarted",
|
|
55
|
+
"refreshCompleted",
|
|
56
|
+
"renderError",
|
|
57
|
+
"domUpdated",
|
|
58
|
+
"captureDomResult",
|
|
59
|
+
]);
|
|
60
|
+
export function isKnownBridgeCommandName(value) {
|
|
61
|
+
return typeof value === "string" && commandNames.has(value);
|
|
62
|
+
}
|
|
63
|
+
export function isKnownBridgeEventName(value) {
|
|
64
|
+
return typeof value === "string" && eventNames.has(value);
|
|
65
|
+
}
|
|
66
|
+
export function createBridgeEnvelope(name, payload, options = {}) {
|
|
67
|
+
const direction = options.direction ??
|
|
68
|
+
(isKnownBridgeCommandName(name) ? "parent-to-host" : "host-to-parent");
|
|
69
|
+
return {
|
|
70
|
+
family: PARHELIA_EDITING_BRIDGE_FAMILY,
|
|
71
|
+
version: PARHELIA_EDITING_BRIDGE_VERSION,
|
|
72
|
+
direction,
|
|
73
|
+
id: options.id ?? createMessageId(),
|
|
74
|
+
name,
|
|
75
|
+
timestamp: options.timestamp ?? Date.now(),
|
|
76
|
+
requestId: options.requestId,
|
|
77
|
+
payload,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export function isBridgeEnvelope(value) {
|
|
81
|
+
if (!isRecord(value))
|
|
82
|
+
return false;
|
|
83
|
+
if (value.family !== PARHELIA_EDITING_BRIDGE_FAMILY)
|
|
84
|
+
return false;
|
|
85
|
+
if (!isBridgeVersion(value.version))
|
|
86
|
+
return false;
|
|
87
|
+
if (value.direction !== "parent-to-host" &&
|
|
88
|
+
value.direction !== "host-to-parent") {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
if (typeof value.id !== "string" || value.id.length === 0)
|
|
92
|
+
return false;
|
|
93
|
+
if (typeof value.name !== "string" || value.name.length === 0)
|
|
94
|
+
return false;
|
|
95
|
+
if (typeof value.timestamp !== "number" ||
|
|
96
|
+
!Number.isFinite(value.timestamp)) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
if ("requestId" in value &&
|
|
100
|
+
value.requestId !== undefined &&
|
|
101
|
+
typeof value.requestId !== "string") {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
return "payload" in value;
|
|
105
|
+
}
|
|
106
|
+
export function isBridgeVersion(value) {
|
|
107
|
+
return (isRecord(value) &&
|
|
108
|
+
typeof value.major === "number" &&
|
|
109
|
+
Number.isFinite(value.major) &&
|
|
110
|
+
typeof value.minor === "number" &&
|
|
111
|
+
Number.isFinite(value.minor));
|
|
112
|
+
}
|
|
113
|
+
/** Compatible when the major version matches; minor differences are additive. */
|
|
114
|
+
export function isCompatibleBridgeVersion(peerVersion) {
|
|
115
|
+
return (isBridgeVersion(peerVersion) &&
|
|
116
|
+
peerVersion.major === PARHELIA_EDITING_BRIDGE_VERSION.major);
|
|
117
|
+
}
|
|
118
|
+
/** The effective minor for a session is the lower of the two peers' minors. */
|
|
119
|
+
export function negotiateMinor(peerVersion) {
|
|
120
|
+
return Math.min(peerVersion.minor, PARHELIA_EDITING_BRIDGE_VERSION.minor);
|
|
121
|
+
}
|
|
122
|
+
export function formatBridgeVersion(value) {
|
|
123
|
+
return isBridgeVersion(value) ? `${value.major}.${value.minor}` : "unknown";
|
|
124
|
+
}
|
|
125
|
+
/** Intersection of two capability sets, preserving the order of the first. */
|
|
126
|
+
export function negotiateCapabilities(editorSupported, hostAdvertised) {
|
|
127
|
+
const advertised = new Set(hostAdvertised);
|
|
128
|
+
return editorSupported.filter((capability) => advertised.has(capability));
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Recognition-only guard: a well-formed bridge envelope from the host,
|
|
132
|
+
* regardless of whether the event name is known. RECOGNIZE messages with this;
|
|
133
|
+
* DISPATCH them with `isKnownBridgeEventName` separately, so that unknown (e.g.
|
|
134
|
+
* newer) events surface in diagnostics instead of being silently dropped.
|
|
135
|
+
*/
|
|
136
|
+
export function isBridgeMessageFromHost(value) {
|
|
137
|
+
return isBridgeEnvelope(value) && value.direction === "host-to-parent";
|
|
138
|
+
}
|
|
139
|
+
/** Recognition-only guard: a well-formed bridge envelope from the parent. */
|
|
140
|
+
export function isBridgeMessageFromParent(value) {
|
|
141
|
+
return isBridgeEnvelope(value) && value.direction === "parent-to-host";
|
|
142
|
+
}
|
|
143
|
+
export function isBridgeCommandEnvelope(value) {
|
|
144
|
+
return (isBridgeMessageFromParent(value) && isKnownBridgeCommandName(value.name));
|
|
145
|
+
}
|
|
146
|
+
export function isBridgeEventEnvelope(value) {
|
|
147
|
+
return isBridgeMessageFromHost(value) && isKnownBridgeEventName(value.name);
|
|
148
|
+
}
|
|
149
|
+
export function normalizeOrigin(value) {
|
|
150
|
+
try {
|
|
151
|
+
return new URL(value).origin;
|
|
152
|
+
}
|
|
153
|
+
catch {
|
|
154
|
+
try {
|
|
155
|
+
return new URL(value, "http://placeholder.local").origin;
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
return undefined;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
export function isAllowedOrigin(origin, allowedOrigins) {
|
|
163
|
+
const normalizedOrigin = normalizeOrigin(origin);
|
|
164
|
+
if (!normalizedOrigin)
|
|
165
|
+
return false;
|
|
166
|
+
return allowedOrigins.some((allowedOrigin) => {
|
|
167
|
+
const normalizedAllowed = normalizeOrigin(allowedOrigin);
|
|
168
|
+
return normalizedAllowed === normalizedOrigin;
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
export function assertAllowedOrigin(origin, allowedOrigins) {
|
|
172
|
+
if (!isAllowedOrigin(origin, allowedOrigins)) {
|
|
173
|
+
throw new Error(`Rejected Parhelia bridge message from origin: ${origin}`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function createMessageId() {
|
|
177
|
+
const cryptoObject = globalThis.crypto;
|
|
178
|
+
if (cryptoObject?.randomUUID) {
|
|
179
|
+
return cryptoObject.randomUUID();
|
|
180
|
+
}
|
|
181
|
+
return `bridge-${Date.now().toString(36)}-${Math.random()
|
|
182
|
+
.toString(36)
|
|
183
|
+
.slice(2)}`;
|
|
184
|
+
}
|
|
185
|
+
function isRecord(value) {
|
|
186
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=protocol.js.map
|