@parhelia/core 0.4.12818 → 0.4.12871
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/emoji/EmojiPicker.d.ts +18 -0
- package/dist/components/emoji/EmojiPicker.js +102 -0
- package/dist/components/emoji/EmojiPicker.js.map +1 -0
- package/dist/components/emoji/EmojiText.d.ts +19 -0
- package/dist/components/emoji/EmojiText.js +30 -0
- package/dist/components/emoji/EmojiText.js.map +1 -0
- package/dist/components/emoji/emojiData.generated.d.ts +2 -0
- package/dist/components/emoji/emojiData.generated.js +1878 -0
- package/dist/components/emoji/emojiData.generated.js.map +1 -0
- package/dist/components/emoji/emojiIndex.d.ts +46 -0
- package/dist/components/emoji/emojiIndex.js +173 -0
- package/dist/components/emoji/emojiIndex.js.map +1 -0
- package/dist/components/emoji/emoticons.d.ts +21 -0
- package/dist/components/emoji/emoticons.js +167 -0
- package/dist/components/emoji/emoticons.js.map +1 -0
- package/dist/components/emoji/textareaInsert.d.ts +19 -0
- package/dist/components/emoji/textareaInsert.js +29 -0
- package/dist/components/emoji/textareaInsert.js.map +1 -0
- package/dist/components/emoji/twemoji.d.ts +30 -0
- package/dist/components/emoji/twemoji.js +84 -0
- package/dist/components/emoji/twemoji.js.map +1 -0
- package/dist/components/ui/alert.d.ts +6 -1
- package/dist/components/ui/alert.js +12 -3
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +25 -0
- package/dist/components/ui/context-menu.js +54 -36
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/copy-button.d.ts +3 -1
- package/dist/components/ui/copy-button.js +13 -2
- package/dist/components/ui/copy-button.js.map +1 -1
- package/dist/components/ui/mention-textarea.d.ts +8 -0
- package/dist/components/ui/mention-textarea.js +98 -46
- package/dist/components/ui/mention-textarea.js.map +1 -1
- package/dist/components/ui/paste-button.js +11 -1
- package/dist/components/ui/paste-button.js.map +1 -1
- package/dist/config/config.js +46 -4
- package/dist/config/config.js.map +1 -1
- package/dist/config/types.d.ts +2 -0
- package/dist/config/types.js.map +1 -1
- package/dist/editor/ConcurrentUserLimitDialog.js +5 -2
- package/dist/editor/ConcurrentUserLimitDialog.js.map +1 -1
- package/dist/editor/ContentTree.js +7 -2
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/ContextMenu.js +11 -36
- package/dist/editor/ContextMenu.js.map +1 -1
- package/dist/editor/EditorWarning.js +8 -4
- package/dist/editor/EditorWarning.js.map +1 -1
- package/dist/editor/FieldList.js +1 -1
- package/dist/editor/FieldList.js.map +1 -1
- package/dist/editor/FieldListField.js +18 -13
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/FieldListFieldWithFallbacks.js +1 -1
- package/dist/editor/GlobalMenuBar.js +2 -1
- package/dist/editor/GlobalMenuBar.js.map +1 -1
- package/dist/editor/ImageEditor.js +3 -1
- package/dist/editor/ImageEditor.js.map +1 -1
- package/dist/editor/MainLayout.js +1 -1
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/MigrationsView.js +3 -2
- package/dist/editor/MigrationsView.js.map +1 -1
- package/dist/editor/MobileLayout.js +43 -20
- package/dist/editor/MobileLayout.js.map +1 -1
- package/dist/editor/PictureEditor.js +4 -2
- package/dist/editor/PictureEditor.js.map +1 -1
- package/dist/editor/QuickItemSwitcher.js +4 -2
- package/dist/editor/QuickItemSwitcher.js.map +1 -1
- package/dist/editor/agent-changes/agentChangeTargets.js +6 -0
- package/dist/editor/agent-changes/agentChangeTargets.js.map +1 -1
- package/dist/editor/agent-changes/agentChangeTextHighlight.d.ts +48 -4
- package/dist/editor/agent-changes/agentChangeTextHighlight.js +67 -9
- package/dist/editor/agent-changes/agentChangeTextHighlight.js.map +1 -1
- package/dist/editor/ai/AgentStatusBadge.js +11 -9
- package/dist/editor/ai/AgentStatusBadge.js.map +1 -1
- package/dist/editor/ai/Agents.js +2 -2
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/HeartbeatDiagnosticsPanel.js +1 -1
- package/dist/editor/ai/InlineAiDialog.js +11 -8
- package/dist/editor/ai/InlineAiDialog.js.map +1 -1
- package/dist/editor/ai/InlineAiTrigger.js +18 -14
- package/dist/editor/ai/InlineAiTrigger.js.map +1 -1
- package/dist/editor/ai/agentActivitySummary.js +5 -0
- package/dist/editor/ai/agentActivitySummary.js.map +1 -1
- package/dist/editor/ai/agentDiagnostics.d.ts +1 -1
- package/dist/editor/ai/agentDiagnostics.js +8 -0
- package/dist/editor/ai/agentDiagnostics.js.map +1 -1
- package/dist/editor/ai/agentMessageConversion.js +1 -0
- package/dist/editor/ai/agentMessageConversion.js.map +1 -1
- package/dist/editor/ai/agentMessageMarkdown.js +4 -4
- package/dist/editor/ai/agentMessageMarkdown.js.map +1 -1
- package/dist/editor/ai/dialogs/capturePageScreenshot.d.ts +4 -1
- package/dist/editor/ai/dialogs/capturePageScreenshot.js +214 -44
- package/dist/editor/ai/dialogs/capturePageScreenshot.js.map +1 -1
- package/dist/editor/ai/dialogs/captureShared.d.ts +8 -1
- package/dist/editor/ai/dialogs/captureShared.js +4 -1
- package/dist/editor/ai/dialogs/captureShared.js.map +1 -1
- package/dist/editor/ai/dialogs/offscreenPageCapture.js +1 -1
- package/dist/editor/ai/dialogs/offscreenPageCapture.js.map +1 -1
- package/dist/editor/ai/prepareInlineAiTextSelection.d.ts +2 -1
- package/dist/editor/ai/prepareInlineAiTextSelection.js +1 -2
- package/dist/editor/ai/prepareInlineAiTextSelection.js.map +1 -1
- package/dist/editor/ai/terminal/agentCost.d.ts +2 -0
- package/dist/editor/ai/terminal/agentCost.js +1 -0
- package/dist/editor/ai/terminal/agentCost.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionLiveTotals.js +3 -0
- package/dist/editor/ai/terminal/agentSessionLiveTotals.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionSelectors.d.ts +5 -2
- package/dist/editor/ai/terminal/agentSessionSelectors.js +5 -2
- package/dist/editor/ai/terminal/agentSessionSelectors.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionSnapshot.d.ts +15 -0
- package/dist/editor/ai/terminal/agentSessionSnapshot.js +103 -3
- package/dist/editor/ai/terminal/agentSessionSnapshot.js.map +1 -1
- package/dist/editor/ai/terminal/agentSessionState.js +13 -2
- package/dist/editor/ai/terminal/agentSessionState.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentActivityOverviewPanel.js +7 -7
- package/dist/editor/ai/terminal/components/AgentActivityOverviewPanel.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentBanners.js +2 -2
- package/dist/editor/ai/terminal/components/AgentBanners.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentCostDisplay.d.ts +2 -0
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js +2 -1
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentFullPromptControls.js +1 -1
- package/dist/editor/ai/terminal/components/AgentFullPromptControls.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentModeSelector.js +7 -3
- package/dist/editor/ai/terminal/components/AgentModeSelector.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js +3 -3
- package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.js +2 -2
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.js +1 -1
- package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentSkillSettingsSection.js +2 -2
- package/dist/editor/ai/terminal/components/AgentSkillSettingsSection.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.d.ts +5 -2
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js +43 -4
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js.map +1 -1
- package/dist/editor/ai/terminal/components/AiResponseMessage.js +40 -22
- package/dist/editor/ai/terminal/components/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/ApprovalCard.d.ts +3 -1
- package/dist/editor/ai/terminal/components/ApprovalCard.js +8 -16
- package/dist/editor/ai/terminal/components/ApprovalCard.js.map +1 -1
- package/dist/editor/ai/terminal/components/ContextInfoBar.js +1 -1
- package/dist/editor/ai/terminal/components/ContextInfoBar.js.map +1 -1
- package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js +1 -1
- package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/EditFieldToolCallContent.d.ts +7 -4
- package/dist/editor/ai/terminal/components/EditFieldToolCallContent.js +57 -32
- package/dist/editor/ai/terminal/components/EditFieldToolCallContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.js +1 -2
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.js.map +1 -1
- package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.d.ts +6 -0
- package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.js +61 -0
- package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.js.map +1 -0
- package/dist/editor/ai/terminal/components/ToolCallDisplay.d.ts +5 -0
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js +19 -8
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/UserMessage.js +4 -2
- package/dist/editor/ai/terminal/components/UserMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/ValueDiff.js +1 -1
- package/dist/editor/ai/terminal/components/ValueDiff.js.map +1 -1
- package/dist/editor/ai/terminal/components/toolCallContentRenderers.js +7 -4
- package/dist/editor/ai/terminal/components/toolCallContentRenderers.js.map +1 -1
- package/dist/editor/ai/terminal/components/useApprovalActions.js +1 -1
- package/dist/editor/ai/terminal/components/useApprovalActions.js.map +1 -1
- package/dist/editor/ai/terminal/toolCallDiagnostics.d.ts +34 -0
- package/dist/editor/ai/terminal/toolCallDiagnostics.js +218 -0
- package/dist/editor/ai/terminal/toolCallDiagnostics.js.map +1 -0
- package/dist/editor/ai/terminal/types.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentEditorContext.js +16 -4
- package/dist/editor/ai/terminal/useAgentEditorContext.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentLoadPipeline.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentLoadPipeline.js +2 -1
- package/dist/editor/ai/terminal/useAgentLoadPipeline.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentLoader.d.ts +2 -0
- package/dist/editor/ai/terminal/useAgentLoader.js +17 -2
- package/dist/editor/ai/terminal/useAgentLoader.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentModeState.d.ts +5 -1
- package/dist/editor/ai/terminal/useAgentModeState.js +11 -3
- package/dist/editor/ai/terminal/useAgentModeState.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentOperationHistoryLoader.js +5 -1
- package/dist/editor/ai/terminal/useAgentOperationHistoryLoader.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentOperationSocketHandler.js +33 -1
- package/dist/editor/ai/terminal/useAgentOperationSocketHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.js +5 -1
- package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentRunRefs.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentRunRefs.js +3 -0
- package/dist/editor/ai/terminal/useAgentRunRefs.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentServerReconciler.js +11 -0
- package/dist/editor/ai/terminal/useAgentServerReconciler.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSessionSync.d.ts +6 -0
- package/dist/editor/ai/terminal/useAgentSessionSync.js +27 -3
- package/dist/editor/ai/terminal/useAgentSessionSync.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsData.d.ts +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js +7 -6
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js +14 -2
- package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentStatusBarContent.js +11 -4
- package/dist/editor/ai/terminal/useAgentStatusBarContent.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentStreamPipeline.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentStreamPipeline.js +2 -1
- package/dist/editor/ai/terminal/useAgentStreamPipeline.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js +17 -4
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js +7 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentToolCallHandler.js +1 -0
- package/dist/editor/ai/terminal/useAgentToolCallHandler.js.map +1 -1
- package/dist/editor/ai/types.d.ts +4 -0
- package/dist/editor/ai-image-editor/AiImageEditorDialog.d.ts +33 -0
- package/dist/editor/ai-image-editor/AiImageEditorDialog.js +372 -127
- package/dist/editor/ai-image-editor/AiImageEditorDialog.js.map +1 -1
- package/dist/editor/ai-image-editor/AiImageResultOverlay.js +4 -2
- package/dist/editor/ai-image-editor/AiImageResultOverlay.js.map +1 -1
- package/dist/editor/bridge/BridgeClient.js +11 -0
- package/dist/editor/bridge/BridgeClient.js.map +1 -1
- package/dist/editor/bridge/protocol.d.ts +61 -0
- package/dist/editor/bridge/protocol.js +3 -0
- package/dist/editor/bridge/protocol.js.map +1 -1
- package/dist/editor/client/EditorShell.js +335 -125
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/SessionExpiredOverlay.js +9 -2
- package/dist/editor/client/SessionExpiredOverlay.js.map +1 -1
- package/dist/editor/client/clipboardStorage.d.ts +10 -0
- package/dist/editor/client/clipboardStorage.js +57 -0
- package/dist/editor/client/clipboardStorage.js.map +1 -0
- package/dist/editor/client/editContext.d.ts +92 -11
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/editHistoryReconciliation.d.ts +2 -1
- package/dist/editor/client/editHistoryReconciliation.js +5 -2
- package/dist/editor/client/editHistoryReconciliation.js.map +1 -1
- package/dist/editor/client/hooks/useRepositoryItemRefresh.d.ts +4 -0
- package/dist/editor/client/hooks/useRepositoryItemRefresh.js +62 -0
- package/dist/editor/client/hooks/useRepositoryItemRefresh.js.map +1 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.d.ts +6 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js +69 -4
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
- package/dist/editor/client/itemsRepository.d.ts +10 -2
- package/dist/editor/client/itemsRepository.js +224 -43
- package/dist/editor/client/itemsRepository.js.map +1 -1
- package/dist/editor/client/liveEditState.d.ts +16 -0
- package/dist/editor/client/liveEditState.js +25 -0
- package/dist/editor/client/liveEditState.js.map +1 -0
- package/dist/editor/client/liveSessionState.d.ts +6 -0
- package/dist/editor/client/liveSessionState.js +20 -0
- package/dist/editor/client/liveSessionState.js.map +1 -0
- package/dist/editor/client/operations.d.ts +13 -2
- package/dist/editor/client/operations.js +134 -31
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/client/pageModelBuilder.d.ts +6 -0
- package/dist/editor/client/pageModelBuilder.js +74 -7
- package/dist/editor/client/pageModelBuilder.js.map +1 -1
- package/dist/editor/client/ui/EditorChrome.d.ts +2 -2
- package/dist/editor/client/ui/EditorChrome.js +12 -8
- package/dist/editor/client/ui/EditorChrome.js.map +1 -1
- package/dist/editor/client/ui/FullscreenControls.d.ts +3 -5
- package/dist/editor/client/ui/FullscreenControls.js +2 -2
- package/dist/editor/client/ui/FullscreenControls.js.map +1 -1
- package/dist/editor/client/valueStore.d.ts +22 -0
- package/dist/editor/client/valueStore.js +29 -0
- package/dist/editor/client/valueStore.js.map +1 -0
- package/dist/editor/commands/commands.d.ts +6 -0
- package/dist/editor/commands/commands.js.map +1 -1
- package/dist/editor/commands/componentClipboardCommands.d.ts +35 -0
- package/dist/editor/commands/componentClipboardCommands.js +271 -0
- package/dist/editor/commands/componentClipboardCommands.js.map +1 -0
- package/dist/editor/commands/componentCommands.js +80 -19
- package/dist/editor/commands/componentCommands.js.map +1 -1
- package/dist/editor/commands/componentMenuGroups.d.ts +2 -0
- package/dist/editor/commands/componentMenuGroups.js +43 -0
- package/dist/editor/commands/componentMenuGroups.js.map +1 -0
- package/dist/editor/commands/itemCommands.d.ts +9 -0
- package/dist/editor/commands/itemCommands.js +76 -9
- package/dist/editor/commands/itemCommands.js.map +1 -1
- package/dist/editor/component-conversion/ComponentTypePickerDialog.d.ts +12 -0
- package/dist/editor/component-conversion/ComponentTypePickerDialog.js +40 -0
- package/dist/editor/component-conversion/ComponentTypePickerDialog.js.map +1 -0
- package/dist/editor/component-conversion/ConversionAiDebugButton.d.ts +17 -0
- package/dist/editor/component-conversion/ConversionAiDebugButton.js +80 -0
- package/dist/editor/component-conversion/ConversionAiDebugButton.js.map +1 -0
- package/dist/editor/component-conversion/ConvertComponentDialog.d.ts +28 -0
- package/dist/editor/component-conversion/ConvertComponentDialog.js +633 -0
- package/dist/editor/component-conversion/ConvertComponentDialog.js.map +1 -0
- package/dist/editor/component-conversion/conversionModel.d.ts +109 -0
- package/dist/editor/component-conversion/conversionModel.js +519 -0
- package/dist/editor/component-conversion/conversionModel.js.map +1 -0
- package/dist/editor/component-conversion/conversionService.d.ts +12 -0
- package/dist/editor/component-conversion/conversionService.js +16 -0
- package/dist/editor/component-conversion/conversionService.js.map +1 -0
- package/dist/editor/component-conversion/conversionTypes.d.ts +214 -0
- package/dist/editor/component-conversion/conversionTypes.js +2 -0
- package/dist/editor/component-conversion/conversionTypes.js.map +1 -0
- package/dist/editor/component-conversion/convertComponentsCommand.d.ts +25 -0
- package/dist/editor/component-conversion/convertComponentsCommand.js +196 -0
- package/dist/editor/component-conversion/convertComponentsCommand.js.map +1 -0
- package/dist/editor/editor-warnings/ValidationErrors.js +4 -4
- package/dist/editor/editor-warnings/ValidationErrors.js.map +1 -1
- package/dist/editor/field-types/AttachmentEditor.js +4 -3
- package/dist/editor/field-types/AttachmentEditor.js.map +1 -1
- package/dist/editor/field-types/DateFieldEditor.js +2 -1
- package/dist/editor/field-types/DateFieldEditor.js.map +1 -1
- package/dist/editor/field-types/DateTimeFieldEditor.js +2 -1
- package/dist/editor/field-types/DateTimeFieldEditor.js.map +1 -1
- package/dist/editor/field-types/DropLinkEditor.js +3 -1
- package/dist/editor/field-types/DropLinkEditor.js.map +1 -1
- package/dist/editor/field-types/DropListEditor.js +3 -1
- package/dist/editor/field-types/DropListEditor.js.map +1 -1
- package/dist/editor/field-types/FieldHistoryBoundary.js +28 -7
- package/dist/editor/field-types/FieldHistoryBoundary.js.map +1 -1
- package/dist/editor/field-types/ImageFieldEditor.js +3 -1
- package/dist/editor/field-types/ImageFieldEditor.js.map +1 -1
- package/dist/editor/field-types/InternalLinkFieldEditor.js +2 -1
- package/dist/editor/field-types/InternalLinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/LinkFieldEditor.js +2 -1
- package/dist/editor/field-types/LinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +68 -22
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/NameValueListEditor.js +3 -1
- package/dist/editor/field-types/NameValueListEditor.js.map +1 -1
- package/dist/editor/field-types/PictureFieldEditor.js +4 -2
- package/dist/editor/field-types/PictureFieldEditor.js.map +1 -1
- package/dist/editor/field-types/RawEditor.js +7 -4
- package/dist/editor/field-types/RawEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditor.d.ts +1 -2
- package/dist/editor/field-types/RichTextEditor.js +5 -26
- package/dist/editor/field-types/RichTextEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditorComponent.d.ts +1 -2
- package/dist/editor/field-types/RichTextEditorComponent.js +121 -26
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +68 -22
- package/dist/editor/field-types/SingleLineText.js.map +1 -1
- package/dist/editor/field-types/TreeListEditor.js +4 -2
- package/dist/editor/field-types/TreeListEditor.js.map +1 -1
- package/dist/editor/field-types/fieldStyles.d.ts +21 -0
- package/dist/editor/field-types/fieldStyles.js +22 -0
- package/dist/editor/field-types/fieldStyles.js.map +1 -0
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.d.ts +15 -1
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.js +27 -0
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.js.map +1 -1
- package/dist/editor/field-types/richtext/components/EditorDropdown.css +14 -0
- package/dist/editor/field-types/richtext/components/EditorDropdown.d.ts +3 -1
- package/dist/editor/field-types/richtext/components/EditorDropdown.js +33 -8
- package/dist/editor/field-types/richtext/components/EditorDropdown.js.map +1 -1
- package/dist/editor/field-types/richtext/components/ReactSlate.css +23 -54
- package/dist/editor/field-types/richtext/components/ReactSlate.d.ts +10 -1
- package/dist/editor/field-types/richtext/components/ReactSlate.js +373 -174
- package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -1
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js +1 -1
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js.map +1 -1
- package/dist/editor/field-types/richtext/components/ToolbarButton.js +13 -5
- package/dist/editor/field-types/richtext/components/ToolbarButton.js.map +1 -1
- package/dist/editor/field-types/richtext/config/pluginFactory.d.ts +2 -0
- package/dist/editor/field-types/richtext/config/pluginFactory.js +2 -1
- package/dist/editor/field-types/richtext/config/pluginFactory.js.map +1 -1
- package/dist/editor/field-types/richtext/hooks/useProfileCache.js +1 -0
- package/dist/editor/field-types/richtext/hooks/useProfileCache.js.map +1 -1
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.d.ts +0 -2
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js +2 -5
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js.map +1 -1
- package/dist/editor/field-types/richtext/types.d.ts +47 -2
- package/dist/editor/field-types/richtext/types.js +19 -0
- package/dist/editor/field-types/richtext/types.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/changeHighlight.d.ts +14 -0
- package/dist/editor/field-types/richtext/utils/changeHighlight.js +12 -1
- package/dist/editor/field-types/richtext/utils/changeHighlight.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/conversion.js +108 -32
- package/dist/editor/field-types/richtext/utils/conversion.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/cssClasses.d.ts +27 -0
- package/dist/editor/field-types/richtext/utils/cssClasses.js +98 -0
- package/dist/editor/field-types/richtext/utils/cssClasses.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/plugins.d.ts +40 -1
- package/dist/editor/field-types/richtext/utils/plugins.js +178 -4
- package/dist/editor/field-types/richtext/utils/plugins.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/profileMapper.d.ts +17 -1
- package/dist/editor/field-types/richtext/utils/profileMapper.js +153 -55
- package/dist/editor/field-types/richtext/utils/profileMapper.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/spellCheckText.d.ts +31 -0
- package/dist/editor/field-types/richtext/utils/spellCheckText.js +82 -0
- package/dist/editor/field-types/richtext/utils/spellCheckText.js.map +1 -0
- package/dist/editor/field-types/useFocusedFieldInput.d.ts +13 -0
- package/dist/editor/field-types/useFocusedFieldInput.js +50 -0
- package/dist/editor/field-types/useFocusedFieldInput.js.map +1 -0
- package/dist/editor/field-types/useFormFieldCaretPresence.js +9 -1
- package/dist/editor/field-types/useFormFieldCaretPresence.js.map +1 -1
- package/dist/editor/field-types/useFormFieldSelectionRange.d.ts +20 -13
- package/dist/editor/field-types/useFormFieldSelectionRange.js +40 -14
- package/dist/editor/field-types/useFormFieldSelectionRange.js.map +1 -1
- package/dist/editor/find-replace/FindReplacePanel.d.ts +11 -0
- package/dist/editor/find-replace/FindReplacePanel.js +311 -0
- package/dist/editor/find-replace/FindReplacePanel.js.map +1 -0
- package/dist/editor/find-replace/findReplaceCommand.d.ts +8 -0
- package/dist/editor/find-replace/findReplaceCommand.js +25 -0
- package/dist/editor/find-replace/findReplaceCommand.js.map +1 -0
- package/dist/editor/find-replace/findReplaceMatches.d.ts +42 -0
- package/dist/editor/find-replace/findReplaceMatches.js +66 -0
- package/dist/editor/find-replace/findReplaceMatches.js.map +1 -0
- package/dist/editor/find-replace/findReplaceStore.d.ts +30 -0
- package/dist/editor/find-replace/findReplaceStore.js +61 -0
- package/dist/editor/find-replace/findReplaceStore.js.map +1 -0
- package/dist/editor/find-replace/findReplaceTargets.d.ts +51 -0
- package/dist/editor/find-replace/findReplaceTargets.js +110 -0
- package/dist/editor/find-replace/findReplaceTargets.js.map +1 -0
- package/dist/editor/find-replace/findReplaceText.d.ts +50 -0
- package/dist/editor/find-replace/findReplaceText.js +189 -0
- package/dist/editor/find-replace/findReplaceText.js.map +1 -0
- package/dist/editor/itemContextMenuGroups.js +10 -1
- package/dist/editor/itemContextMenuGroups.js.map +1 -1
- package/dist/editor/media-selector/AiImageSearch.js +1 -163
- package/dist/editor/media-selector/AiImageSearch.js.map +1 -1
- package/dist/editor/media-selector/MediaDetailsView.d.ts +14 -0
- package/dist/editor/media-selector/MediaDetailsView.js +152 -0
- package/dist/editor/media-selector/MediaDetailsView.js.map +1 -0
- package/dist/editor/media-selector/MediaFolderBrowser.js +326 -106
- package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -1
- package/dist/editor/media-selector/TreeSelector.js +40 -2
- package/dist/editor/media-selector/TreeSelector.js.map +1 -1
- package/dist/editor/media-selector/UploadZone.js +1 -1
- package/dist/editor/media-selector/UploadZone.js.map +1 -1
- package/dist/editor/media-selector/useMediaFolderDrag.d.ts +26 -0
- package/dist/editor/media-selector/useMediaFolderDrag.js +153 -0
- package/dist/editor/media-selector/useMediaFolderDrag.js.map +1 -0
- package/dist/editor/menubar/ActiveUsers.js +6 -4
- package/dist/editor/menubar/ActiveUsers.js.map +1 -1
- package/dist/editor/menubar/PageSelector.js +21 -22
- package/dist/editor/menubar/PageSelector.js.map +1 -1
- package/dist/editor/menubar/ToolbarFactory.js +16 -2
- package/dist/editor/menubar/ToolbarFactory.js.map +1 -1
- package/dist/editor/menubar/VersionPreviewCard.js +4 -2
- package/dist/editor/menubar/VersionPreviewCard.js.map +1 -1
- package/dist/editor/menubar/VersionSelector.js +2 -2
- package/dist/editor/menubar/VersionSelector.js.map +1 -1
- package/dist/editor/menubar/WorkflowButton.js +10 -10
- package/dist/editor/menubar/WorkflowButton.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.d.ts +13 -0
- package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js +88 -0
- package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.d.ts +3 -4
- package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.js +15 -13
- package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.d.ts +9 -0
- package/dist/editor/menubar/toolbar-sections/EditControls.js +24 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/FindReplaceControls.d.ts +6 -0
- package/dist/editor/menubar/toolbar-sections/FindReplaceControls.js +31 -0
- package/dist/editor/menubar/toolbar-sections/FindReplaceControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/FullscreenControl.js +3 -2
- package/dist/editor/menubar/toolbar-sections/FullscreenControl.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/InsertControls.js +4 -2
- package/dist/editor/menubar/toolbar-sections/InsertControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/LayoutModeControls.js +3 -2
- package/dist/editor/menubar/toolbar-sections/LayoutModeControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.js +2 -2
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.d.ts +5 -0
- package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.js +16 -0
- package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/UndoRedoControls.js +2 -2
- package/dist/editor/menubar/toolbar-sections/UndoRedoControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +7 -7
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ViewportControls.d.ts +3 -4
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js +19 -31
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/index.d.ts +2 -1
- package/dist/editor/menubar/toolbar-sections/index.js +2 -1
- package/dist/editor/menubar/toolbar-sections/index.js.map +1 -1
- package/dist/editor/mobileBottomPanel.d.ts +40 -0
- package/dist/editor/mobileBottomPanel.js +63 -0
- package/dist/editor/mobileBottomPanel.js.map +1 -0
- package/dist/editor/notifications/useNotifications.js +12 -17
- package/dist/editor/notifications/useNotifications.js.map +1 -1
- package/dist/editor/page-editor-chrome/AgentChangeHighlightings.d.ts +3 -6
- package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js +8 -6
- package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.d.ts +5 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js +60 -10
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.d.ts +6 -0
- package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.js +100 -0
- package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.js.map +1 -0
- package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.d.ts +16 -0
- package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.js +23 -0
- package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.js.map +1 -0
- package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.d.ts +9 -0
- package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.js +32 -0
- package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.js.map +1 -0
- package/dist/editor/page-editor-chrome/CommentHighlightings.d.ts +4 -1
- package/dist/editor/page-editor-chrome/CommentHighlightings.js +195 -388
- package/dist/editor/page-editor-chrome/CommentHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.d.ts +14 -0
- package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.js +110 -0
- package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.js.map +1 -0
- package/dist/editor/page-editor-chrome/ConversionIndicators.d.ts +8 -0
- package/dist/editor/page-editor-chrome/ConversionIndicators.js +75 -0
- package/dist/editor/page-editor-chrome/ConversionIndicators.js.map +1 -0
- package/dist/editor/page-editor-chrome/DiffHighlightOverlay.d.ts +9 -13
- package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js +25 -20
- package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/DragInsertionOverlay.js +21 -17
- package/dist/editor/page-editor-chrome/DragInsertionOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.d.ts +1 -1
- package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.js +9 -6
- package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.js.map +1 -1
- package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.d.ts +15 -0
- package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.js +31 -0
- package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicator.d.ts +1 -1
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js +14 -7
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js +10 -6
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/FindReplaceHighlightings.d.ts +11 -0
- package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js +120 -0
- package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js.map +1 -0
- package/dist/editor/page-editor-chrome/FrameMenu.d.ts +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js +13 -11
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenus.d.ts +1 -1
- package/dist/editor/page-editor-chrome/FrameMenus.js +7 -5
- package/dist/editor/page-editor-chrome/FrameMenus.js.map +1 -1
- package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.d.ts +2 -2
- package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.js +20 -39
- package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.js.map +1 -1
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.d.ts +1 -1
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js +27 -21
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/NoLayout.js +5 -3
- package/dist/editor/page-editor-chrome/NoLayout.js.map +1 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.d.ts +1 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.js +30 -23
- package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -1
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.d.ts +1 -1
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js +24 -21
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +10 -4
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.d.ts +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js +11 -10
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js.map +1 -1
- package/dist/editor/page-editor-chrome/SpellCheckHighlightings.d.ts +12 -0
- package/dist/editor/page-editor-chrome/SpellCheckHighlightings.js +197 -0
- package/dist/editor/page-editor-chrome/SpellCheckHighlightings.js.map +1 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.d.ts +1 -1
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js +226 -381
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/ValidationRulerMarks.d.ts +11 -0
- package/dist/editor/page-editor-chrome/ValidationRulerMarks.js +56 -0
- package/dist/editor/page-editor-chrome/ValidationRulerMarks.js.map +1 -0
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.d.ts +1 -1
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js +11 -8
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.d.ts +15 -2
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js +70 -9
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.d.ts +44 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.js +89 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.d.ts +17 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.js +53 -0
- package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/geometry.d.ts +15 -0
- package/dist/editor/page-editor-chrome/overlay/geometry.js +40 -0
- package/dist/editor/page-editor-chrome/overlay/geometry.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.d.ts +11 -0
- package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.js +84 -0
- package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.d.ts +34 -0
- package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.js +229 -0
- package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.d.ts +9 -0
- package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.js +34 -0
- package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.js.map +1 -0
- package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.d.ts +49 -0
- package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.js +241 -0
- package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.js.map +1 -0
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.d.ts +7 -0
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.js +63 -5
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.js.map +1 -1
- package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.d.ts +12 -0
- package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.js +79 -0
- package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.js.map +1 -0
- package/dist/editor/page-editor-chrome/useComponentDragHandle.js +1 -1
- package/dist/editor/page-editor-chrome/useComponentDragHandle.js.map +1 -1
- package/dist/editor/page-editor-chrome/useDragInsertionGesture.js +1 -1
- package/dist/editor/page-editor-chrome/useDragInsertionGesture.js.map +1 -1
- package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.d.ts +1 -1
- package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.js +4 -2
- package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.js.map +1 -1
- package/dist/editor/page-viewer/CanvasOverviewRuler.d.ts +11 -0
- package/dist/editor/page-viewer/CanvasOverviewRuler.js +65 -0
- package/dist/editor/page-viewer/CanvasOverviewRuler.js.map +1 -0
- package/dist/editor/page-viewer/DeviceToolbar.d.ts +1 -1
- package/dist/editor/page-viewer/DeviceToolbar.js +8 -3
- package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -1
- package/dist/editor/page-viewer/DynamicRenderingsBar.d.ts +23 -0
- package/dist/editor/page-viewer/DynamicRenderingsBar.js +28 -0
- package/dist/editor/page-viewer/DynamicRenderingsBar.js.map +1 -0
- package/dist/editor/page-viewer/DynamicRenderingsStrip.d.ts +18 -0
- package/dist/editor/page-viewer/DynamicRenderingsStrip.js +29 -0
- package/dist/editor/page-viewer/DynamicRenderingsStrip.js.map +1 -0
- package/dist/editor/page-viewer/EditorForm.js +29 -24
- package/dist/editor/page-viewer/EditorForm.js.map +1 -1
- package/dist/editor/page-viewer/FeedbackMargin.d.ts +57 -0
- package/dist/editor/page-viewer/FeedbackMargin.js +378 -0
- package/dist/editor/page-viewer/FeedbackMargin.js.map +1 -0
- package/dist/editor/page-viewer/FeedbackMarginController.d.ts +76 -0
- package/dist/editor/page-viewer/FeedbackMarginController.js +241 -0
- package/dist/editor/page-viewer/FeedbackMarginController.js.map +1 -0
- package/dist/editor/page-viewer/FeedbackMarginMarker.d.ts +16 -0
- package/dist/editor/page-viewer/FeedbackMarginMarker.js +24 -0
- package/dist/editor/page-viewer/FeedbackMarginMarker.js.map +1 -0
- package/dist/editor/page-viewer/FeedbackMarginResizeHandle.d.ts +23 -0
- package/dist/editor/page-viewer/FeedbackMarginResizeHandle.js +105 -0
- package/dist/editor/page-viewer/FeedbackMarginResizeHandle.js.map +1 -0
- package/dist/editor/page-viewer/InteractivePreviewBar.d.ts +24 -0
- package/dist/editor/page-viewer/InteractivePreviewBar.js +31 -0
- package/dist/editor/page-viewer/InteractivePreviewBar.js.map +1 -0
- package/dist/editor/page-viewer/MiniMap.d.ts +15 -5
- package/dist/editor/page-viewer/MiniMap.js +175 -67
- package/dist/editor/page-viewer/MiniMap.js.map +1 -1
- package/dist/editor/page-viewer/MinimapDropTargets.d.ts +1 -1
- package/dist/editor/page-viewer/MinimapDropTargets.js +9 -7
- package/dist/editor/page-viewer/MinimapDropTargets.js.map +1 -1
- package/dist/editor/page-viewer/MobileCommentsPanel.d.ts +16 -0
- package/dist/editor/page-viewer/MobileCommentsPanel.js +112 -0
- package/dist/editor/page-viewer/MobileCommentsPanel.js.map +1 -0
- package/dist/editor/page-viewer/PageViewer.js +22 -67
- package/dist/editor/page-viewer/PageViewer.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.d.ts +1 -0
- package/dist/editor/page-viewer/PageViewerFrame.js +631 -229
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/page-viewer/RenderingAiCheck.d.ts +18 -0
- package/dist/editor/page-viewer/RenderingAiCheck.js +45 -0
- package/dist/editor/page-viewer/RenderingAiCheck.js.map +1 -0
- package/dist/editor/page-viewer/RenderingApprovalDialog.d.ts +32 -0
- package/dist/editor/page-viewer/RenderingApprovalDialog.js +191 -0
- package/dist/editor/page-viewer/RenderingApprovalDialog.js.map +1 -0
- package/dist/editor/page-viewer/SealedClientCodePreview.d.ts +17 -0
- package/dist/editor/page-viewer/SealedClientCodePreview.js +38 -0
- package/dist/editor/page-viewer/SealedClientCodePreview.js.map +1 -0
- package/dist/editor/page-viewer/bridgeFieldPatch.d.ts +9 -0
- package/dist/editor/page-viewer/bridgeFieldPatch.js +21 -0
- package/dist/editor/page-viewer/bridgeFieldPatch.js.map +1 -1
- package/dist/editor/page-viewer/bridgeInlineEditSession.js +8 -0
- package/dist/editor/page-viewer/bridgeInlineEditSession.js.map +1 -1
- package/dist/editor/page-viewer/bridgeKeyboardShortcuts.d.ts +6 -0
- package/dist/editor/page-viewer/bridgeKeyboardShortcuts.js +19 -1
- package/dist/editor/page-viewer/bridgeKeyboardShortcuts.js.map +1 -1
- package/dist/editor/page-viewer/canvasFrameNavigation.d.ts +18 -0
- package/dist/editor/page-viewer/canvasFrameNavigation.js +36 -0
- package/dist/editor/page-viewer/canvasFrameNavigation.js.map +1 -0
- package/dist/editor/page-viewer/canvasLoadSettling.d.ts +42 -0
- package/dist/editor/page-viewer/canvasLoadSettling.js +46 -0
- package/dist/editor/page-viewer/canvasLoadSettling.js.map +1 -0
- package/dist/editor/page-viewer/canvasScrollHandoff.d.ts +34 -0
- package/dist/editor/page-viewer/canvasScrollHandoff.js +55 -0
- package/dist/editor/page-viewer/canvasScrollHandoff.js.map +1 -0
- package/dist/editor/page-viewer/feedbackMarginLayout.d.ts +119 -0
- package/dist/editor/page-viewer/feedbackMarginLayout.js +155 -0
- package/dist/editor/page-viewer/feedbackMarginLayout.js.map +1 -0
- package/dist/editor/page-viewer/feedbackMarginSources.d.ts +36 -0
- package/dist/editor/page-viewer/feedbackMarginSources.js +196 -0
- package/dist/editor/page-viewer/feedbackMarginSources.js.map +1 -0
- package/dist/editor/page-viewer/feedbackMarginWidth.d.ts +43 -0
- package/dist/editor/page-viewer/feedbackMarginWidth.js +107 -0
- package/dist/editor/page-viewer/feedbackMarginWidth.js.map +1 -0
- package/dist/editor/page-viewer/interactivePreview.d.ts +168 -0
- package/dist/editor/page-viewer/interactivePreview.js +344 -0
- package/dist/editor/page-viewer/interactivePreview.js.map +1 -0
- package/dist/editor/page-viewer/minimapViewport.d.ts +2 -0
- package/dist/editor/page-viewer/minimapViewport.js +34 -0
- package/dist/editor/page-viewer/minimapViewport.js.map +1 -0
- package/dist/editor/page-viewer/openPageItems.d.ts +29 -0
- package/dist/editor/page-viewer/openPageItems.js +73 -0
- package/dist/editor/page-viewer/openPageItems.js.map +1 -0
- package/dist/editor/page-viewer/overviewRuler.d.ts +128 -0
- package/dist/editor/page-viewer/overviewRuler.js +226 -0
- package/dist/editor/page-viewer/overviewRuler.js.map +1 -0
- package/dist/editor/page-viewer/pageViewContext.d.ts +99 -37
- package/dist/editor/page-viewer/pageViewContext.js +207 -238
- package/dist/editor/page-viewer/pageViewContext.js.map +1 -1
- package/dist/editor/page-viewer/renderingApproval.d.ts +59 -0
- package/dist/editor/page-viewer/renderingApproval.js +186 -0
- package/dist/editor/page-viewer/renderingApproval.js.map +1 -0
- package/dist/editor/page-viewer/renderingChanges.d.ts +29 -0
- package/dist/editor/page-viewer/renderingChanges.js +40 -0
- package/dist/editor/page-viewer/renderingChanges.js.map +1 -0
- package/dist/editor/page-viewer/scrollIntoViewTextRanges.d.ts +23 -0
- package/dist/editor/page-viewer/scrollIntoViewTextRanges.js +26 -0
- package/dist/editor/page-viewer/scrollIntoViewTextRanges.js.map +1 -0
- package/dist/editor/page-viewer/useInteractivePreview.d.ts +77 -0
- package/dist/editor/page-viewer/useInteractivePreview.js +210 -0
- package/dist/editor/page-viewer/useInteractivePreview.js.map +1 -0
- package/dist/editor/pageModel.d.ts +12 -0
- package/dist/editor/personalization/ConditionTreeEditor.js +1 -1
- package/dist/editor/personalization/ConditionTreeEditor.js.map +1 -1
- package/dist/editor/personalization/PersonalizationPanel.js +1 -1
- package/dist/editor/personalization/PersonalizationPanel.js.map +1 -1
- package/dist/editor/reviews/CollapsibleText.d.ts +13 -0
- package/dist/editor/reviews/CollapsibleText.js +41 -0
- package/dist/editor/reviews/CollapsibleText.js.map +1 -0
- package/dist/editor/reviews/Comment.d.ts +10 -1
- package/dist/editor/reviews/Comment.js +47 -26
- package/dist/editor/reviews/Comment.js.map +1 -1
- package/dist/editor/reviews/CommentDisplayPopover.js +29 -25
- package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/CommentEditor.d.ts +25 -1
- package/dist/editor/reviews/CommentEditor.js +158 -47
- package/dist/editor/reviews/CommentEditor.js.map +1 -1
- package/dist/editor/reviews/CommentImageAttachments.d.ts +12 -0
- package/dist/editor/reviews/CommentImageAttachments.js +19 -0
- package/dist/editor/reviews/CommentImageAttachments.js.map +1 -0
- package/dist/editor/reviews/CommentPopover.d.ts +0 -4
- package/dist/editor/reviews/CommentPopover.js +4 -8
- package/dist/editor/reviews/CommentPopover.js.map +1 -1
- package/dist/editor/reviews/CommentQuote.d.ts +10 -1
- package/dist/editor/reviews/CommentQuote.js +15 -10
- package/dist/editor/reviews/CommentQuote.js.map +1 -1
- package/dist/editor/reviews/CommentTargetOutline.d.ts +13 -0
- package/dist/editor/reviews/CommentTargetOutline.js +21 -0
- package/dist/editor/reviews/CommentTargetOutline.js.map +1 -0
- package/dist/editor/reviews/CommentTargetPickerDomLayer.d.ts +7 -0
- package/dist/editor/reviews/CommentTargetPickerDomLayer.js +117 -0
- package/dist/editor/reviews/CommentTargetPickerDomLayer.js.map +1 -0
- package/dist/editor/reviews/CommentThreadAgentLink.d.ts +6 -1
- package/dist/editor/reviews/CommentThreadAgentLink.js +4 -4
- package/dist/editor/reviews/CommentThreadAgentLink.js.map +1 -1
- package/dist/editor/reviews/CommentThreadCard.d.ts +34 -0
- package/dist/editor/reviews/CommentThreadCard.js +156 -0
- package/dist/editor/reviews/CommentThreadCard.js.map +1 -0
- package/dist/editor/reviews/CommentView.d.ts +7 -1
- package/dist/editor/reviews/CommentView.js +24 -6
- package/dist/editor/reviews/CommentView.js.map +1 -1
- package/dist/editor/reviews/Comments.js +5 -14
- package/dist/editor/reviews/Comments.js.map +1 -1
- package/dist/editor/reviews/CreateReviewDialog.js +36 -9
- package/dist/editor/reviews/CreateReviewDialog.js.map +1 -1
- package/dist/editor/reviews/EditReviewSettingsDialog.js +1 -1
- package/dist/editor/reviews/EditReviewSettingsDialog.js.map +1 -1
- package/dist/editor/reviews/FeedbackCard.d.ts +16 -1
- package/dist/editor/reviews/FeedbackCard.js +14 -3
- package/dist/editor/reviews/FeedbackCard.js.map +1 -1
- package/dist/editor/reviews/FeedbackFilters.d.ts +9 -5
- package/dist/editor/reviews/FeedbackFilters.js +15 -36
- package/dist/editor/reviews/FeedbackFilters.js.map +1 -1
- package/dist/editor/reviews/FeedbackModeIntro.d.ts +7 -1
- package/dist/editor/reviews/FeedbackModeIntro.js +11 -6
- package/dist/editor/reviews/FeedbackModeIntro.js.map +1 -1
- package/dist/editor/reviews/MentionText.d.ts +2 -1
- package/dist/editor/reviews/MentionText.js +5 -3
- package/dist/editor/reviews/MentionText.js.map +1 -1
- package/dist/editor/reviews/MultiReviewManager.js +18 -3
- package/dist/editor/reviews/MultiReviewManager.js.map +1 -1
- package/dist/editor/reviews/ReviewItemsPanel.js +4 -0
- package/dist/editor/reviews/ReviewItemsPanel.js.map +1 -1
- package/dist/editor/reviews/SuggestedEdit.d.ts +10 -1
- package/dist/editor/reviews/SuggestedEdit.js +77 -10
- package/dist/editor/reviews/SuggestedEdit.js.map +1 -1
- package/dist/editor/reviews/SuggestionCommentThread.d.ts +5 -1
- package/dist/editor/reviews/SuggestionCommentThread.js +48 -17
- package/dist/editor/reviews/SuggestionCommentThread.js.map +1 -1
- package/dist/editor/reviews/SuggestionThreadCard.d.ts +19 -0
- package/dist/editor/reviews/SuggestionThreadCard.js +25 -0
- package/dist/editor/reviews/SuggestionThreadCard.js.map +1 -0
- package/dist/editor/reviews/addCommentOnTarget.d.ts +22 -0
- package/dist/editor/reviews/addCommentOnTarget.js +32 -0
- package/dist/editor/reviews/addCommentOnTarget.js.map +1 -0
- package/dist/editor/reviews/applySuggestedEditActions.js +7 -1
- package/dist/editor/reviews/applySuggestedEditActions.js.map +1 -1
- package/dist/editor/reviews/balloonLayout.d.ts +51 -0
- package/dist/editor/reviews/balloonLayout.js +101 -0
- package/dist/editor/reviews/balloonLayout.js.map +1 -0
- package/dist/editor/reviews/commentAgentAttachments.d.ts +5 -0
- package/dist/editor/reviews/commentAgentAttachments.js +51 -0
- package/dist/editor/reviews/commentAgentAttachments.js.map +1 -0
- package/dist/editor/reviews/commentAi.d.ts +4 -2
- package/dist/editor/reviews/commentAi.js +19 -12
- package/dist/editor/reviews/commentAi.js.map +1 -1
- package/dist/editor/reviews/commentImages.d.ts +1 -2
- package/dist/editor/reviews/commentImages.js +1 -37
- package/dist/editor/reviews/commentImages.js.map +1 -1
- package/dist/editor/reviews/commentTargetPicker.d.ts +114 -0
- package/dist/editor/reviews/commentTargetPicker.js +153 -0
- package/dist/editor/reviews/commentTargetPicker.js.map +1 -0
- package/dist/editor/reviews/feedbackAvatar.js +2 -1
- package/dist/editor/reviews/feedbackAvatar.js.map +1 -1
- package/dist/editor/reviews/feedbackBalloonDate.d.ts +8 -0
- package/dist/editor/reviews/feedbackBalloonDate.js +22 -0
- package/dist/editor/reviews/feedbackBalloonDate.js.map +1 -0
- package/dist/editor/reviews/feedbackDrafts.d.ts +49 -0
- package/dist/editor/reviews/feedbackDrafts.js +74 -0
- package/dist/editor/reviews/feedbackDrafts.js.map +1 -0
- package/dist/editor/reviews/feedbackHoverState.d.ts +18 -0
- package/dist/editor/reviews/feedbackHoverState.js +35 -0
- package/dist/editor/reviews/feedbackHoverState.js.map +1 -0
- package/dist/editor/reviews/feedbackPersonFilter.d.ts +3 -0
- package/dist/editor/reviews/feedbackPersonFilter.js +32 -0
- package/dist/editor/reviews/feedbackPersonFilter.js.map +1 -0
- package/dist/editor/reviews/feedbackSelection.js +7 -3
- package/dist/editor/reviews/feedbackSelection.js.map +1 -1
- package/dist/editor/reviews/feedbackThreadSelection.d.ts +10 -0
- package/dist/editor/reviews/feedbackThreadSelection.js +31 -0
- package/dist/editor/reviews/feedbackThreadSelection.js.map +1 -0
- package/dist/editor/reviews/feedbackThreads.d.ts +50 -0
- package/dist/editor/reviews/feedbackThreads.js +135 -0
- package/dist/editor/reviews/feedbackThreads.js.map +1 -0
- package/dist/editor/reviews/feedbackWheelForwarding.d.ts +34 -0
- package/dist/editor/reviews/feedbackWheelForwarding.js +108 -0
- package/dist/editor/reviews/feedbackWheelForwarding.js.map +1 -0
- package/dist/editor/reviews/openCommentsFeedback.d.ts +1 -1
- package/dist/editor/reviews/openCommentsFeedback.js +2 -1
- package/dist/editor/reviews/openCommentsFeedback.js.map +1 -1
- package/dist/editor/reviews/pendingReviewSelection.d.ts +13 -0
- package/dist/editor/reviews/pendingReviewSelection.js +29 -0
- package/dist/editor/reviews/pendingReviewSelection.js.map +1 -0
- package/dist/editor/reviews/requestReview.d.ts +27 -0
- package/dist/editor/reviews/requestReview.js +36 -0
- package/dist/editor/reviews/requestReview.js.map +1 -0
- package/dist/editor/reviews/reviewUrlScope.d.ts +23 -0
- package/dist/editor/reviews/reviewUrlScope.js +86 -0
- package/dist/editor/reviews/reviewUrlScope.js.map +1 -0
- package/dist/editor/reviews/scrollWithin.d.ts +29 -0
- package/dist/editor/reviews/scrollWithin.js +87 -0
- package/dist/editor/reviews/scrollWithin.js.map +1 -0
- package/dist/editor/reviews/subtreeFeedback.d.ts +57 -0
- package/dist/editor/reviews/subtreeFeedback.js +137 -0
- package/dist/editor/reviews/subtreeFeedback.js.map +1 -0
- package/dist/editor/reviews/useCommentImagePaste.d.ts +49 -14
- package/dist/editor/reviews/useCommentImagePaste.js +165 -62
- package/dist/editor/reviews/useCommentImagePaste.js.map +1 -1
- package/dist/editor/reviews/useFeedbackThreads.d.ts +35 -0
- package/dist/editor/reviews/useFeedbackThreads.js +137 -0
- package/dist/editor/reviews/useFeedbackThreads.js.map +1 -0
- package/dist/editor/reviews/useMeasuredHeights.d.ts +25 -0
- package/dist/editor/reviews/useMeasuredHeights.js +176 -0
- package/dist/editor/reviews/useMeasuredHeights.js.map +1 -0
- package/dist/editor/reviews/usePendingFeedbackFocus.d.ts +7 -0
- package/dist/editor/reviews/usePendingFeedbackFocus.js +42 -0
- package/dist/editor/reviews/usePendingFeedbackFocus.js.map +1 -0
- package/dist/editor/services/agentService.d.ts +101 -5
- package/dist/editor/services/agentService.js +16 -0
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/agentStatus.d.ts +1 -0
- package/dist/editor/services/agentStatus.js +14 -0
- package/dist/editor/services/agentStatus.js.map +1 -1
- package/dist/editor/services/aiService.d.ts +2 -0
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/editor/services/contentService.d.ts +11 -1
- package/dist/editor/services/contentService.js +2 -1
- package/dist/editor/services/contentService.js.map +1 -1
- package/dist/editor/services/editService.d.ts +2 -0
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/services/indexService.d.ts +1 -0
- package/dist/editor/services/indexService.js +4 -0
- package/dist/editor/services/indexService.js.map +1 -1
- package/dist/editor/services/mcpAccessService.d.ts +93 -0
- package/dist/editor/services/mcpAccessService.js +41 -0
- package/dist/editor/services/mcpAccessService.js.map +1 -0
- package/dist/editor/services/previewTokenService.d.ts +14 -0
- package/dist/editor/services/previewTokenService.js +34 -0
- package/dist/editor/services/previewTokenService.js.map +1 -0
- package/dist/editor/services/renderingsService.d.ts +117 -0
- package/dist/editor/services/renderingsService.js +245 -0
- package/dist/editor/services/renderingsService.js.map +1 -0
- package/dist/editor/services/reviewsService.d.ts +6 -1
- package/dist/editor/services/reviewsService.js +14 -6
- package/dist/editor/services/reviewsService.js.map +1 -1
- package/dist/editor/services/serviceHelper.d.ts +17 -1
- package/dist/editor/services/serviceHelper.js +67 -12
- package/dist/editor/services/serviceHelper.js.map +1 -1
- package/dist/editor/services/spellCheckService.d.ts +13 -0
- package/dist/editor/services/spellCheckService.js +33 -0
- package/dist/editor/services/spellCheckService.js.map +1 -0
- package/dist/editor/services/suggestedEditsService.d.ts +1 -0
- package/dist/editor/services/suggestedEditsService.js +7 -0
- package/dist/editor/services/suggestedEditsService.js.map +1 -1
- package/dist/editor/settings/MigrationJournalCard.js +2 -2
- package/dist/editor/settings/MigrationJournalCard.js.map +1 -1
- package/dist/editor/settings/StatusSummary.js +5 -2
- package/dist/editor/settings/StatusSummary.js.map +1 -1
- package/dist/editor/settings/index/CollectionWarningsDisplay.js +1 -1
- package/dist/editor/settings/index/CollectionWarningsDisplay.js.map +1 -1
- package/dist/editor/settings/index/IndexGenerationsSection.d.ts +4 -5
- package/dist/editor/settings/index/IndexGenerationsSection.js +83 -33
- package/dist/editor/settings/index/IndexGenerationsSection.js.map +1 -1
- package/dist/editor/settings/index/RecentBatchesList.js +2 -1
- package/dist/editor/settings/index/RecentBatchesList.js.map +1 -1
- package/dist/editor/settings/panels/AgentProfileConfigPanel.js +1 -1
- package/dist/editor/settings/panels/AgentProfileConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/AgentToolsPanel.js +1 -1
- package/dist/editor/settings/panels/AgentToolsPanel.js.map +1 -1
- package/dist/editor/settings/panels/JavaScriptToolAgentPanel.js +1 -1
- package/dist/editor/settings/panels/JavaScriptToolAgentPanel.js.map +1 -1
- package/dist/editor/settings/panels/McpAccessPanel.d.ts +7 -0
- package/dist/editor/settings/panels/McpAccessPanel.js +96 -0
- package/dist/editor/settings/panels/McpAccessPanel.js.map +1 -0
- package/dist/editor/settings/panels/McpAccessSettingsView.d.ts +8 -0
- package/dist/editor/settings/panels/McpAccessSettingsView.js +221 -0
- package/dist/editor/settings/panels/McpAccessSettingsView.js.map +1 -0
- package/dist/editor/settings/panels/ModelConfigPanel.js +1 -0
- package/dist/editor/settings/panels/ModelConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/ModelsPanel.js +60 -6
- package/dist/editor/settings/panels/ModelsPanel.js.map +1 -1
- package/dist/editor/settings/panels/PersistentLogsPanel.js +2 -1
- package/dist/editor/settings/panels/PersistentLogsPanel.js.map +1 -1
- package/dist/editor/settings/panels/ProjectTemplateAgentPanel.js +1 -1
- package/dist/editor/settings/panels/ProjectTemplateAgentPanel.js.map +1 -1
- package/dist/editor/settings/panels/ProvidersPanel.js +2 -1
- package/dist/editor/settings/panels/ProvidersPanel.js.map +1 -1
- package/dist/editor/settings/panels/SearchConfigPanel.js +6 -5
- package/dist/editor/settings/panels/SearchConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/SpellCheckPanel.d.ts +8 -0
- package/dist/editor/settings/panels/SpellCheckPanel.js +253 -0
- package/dist/editor/settings/panels/SpellCheckPanel.js.map +1 -0
- package/dist/editor/settings/panels/StatusPanel.js +5 -6
- package/dist/editor/settings/panels/StatusPanel.js.map +1 -1
- package/dist/editor/settings/panels/UserPreferencesPanel.js +5 -2
- package/dist/editor/settings/panels/UserPreferencesPanel.js.map +1 -1
- package/dist/editor/settings/panels/index.d.ts +2 -0
- package/dist/editor/settings/panels/index.js +2 -0
- package/dist/editor/settings/panels/index.js.map +1 -1
- package/dist/editor/sidebar/ComponentPalette.js +7 -3
- package/dist/editor/sidebar/ComponentPalette.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.d.ts +1 -1
- package/dist/editor/sidebar/ComponentTree.js +37 -58
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/sidebar/DictionaryEditor.js +2 -1
- package/dist/editor/sidebar/DictionaryEditor.js.map +1 -1
- package/dist/editor/sidebar/EditHistory.js +5 -4
- package/dist/editor/sidebar/EditHistory.js.map +1 -1
- package/dist/editor/sidebar/FeedbackSidebar.d.ts +7 -0
- package/dist/editor/sidebar/FeedbackSidebar.js +300 -0
- package/dist/editor/sidebar/FeedbackSidebar.js.map +1 -0
- package/dist/editor/sidebar/OperationDetailsContent.js +50 -0
- package/dist/editor/sidebar/OperationDetailsContent.js.map +1 -1
- package/dist/editor/sidebar/OperationItem.js +4 -1
- package/dist/editor/sidebar/OperationItem.js.map +1 -1
- package/dist/editor/sidebar/Sessions.js +3 -1
- package/dist/editor/sidebar/Sessions.js.map +1 -1
- package/dist/editor/sidebar/Validation.js +1 -1
- package/dist/editor/sidebar/Validation.js.map +1 -1
- package/dist/editor/sidebar/Workbox.js +3 -108
- package/dist/editor/sidebar/Workbox.js.map +1 -1
- package/dist/editor/sidebar/liveComponentThumbnails.d.ts +7 -3
- package/dist/editor/sidebar/liveComponentThumbnails.js +26 -16
- package/dist/editor/sidebar/liveComponentThumbnails.js.map +1 -1
- package/dist/editor/spellcheck/canvasSpellCheckContextMenu.d.ts +30 -0
- package/dist/editor/spellcheck/canvasSpellCheckContextMenu.js +69 -0
- package/dist/editor/spellcheck/canvasSpellCheckContextMenu.js.map +1 -0
- package/dist/editor/spellcheck/htmlSpellDocument.d.ts +60 -0
- package/dist/editor/spellcheck/htmlSpellDocument.js +181 -0
- package/dist/editor/spellcheck/htmlSpellDocument.js.map +1 -0
- package/dist/editor/spellcheck/htmlSpellTokenizer.d.ts +45 -0
- package/dist/editor/spellcheck/htmlSpellTokenizer.js +277 -0
- package/dist/editor/spellcheck/htmlSpellTokenizer.js.map +1 -0
- package/dist/editor/spellcheck/replacementGuard.d.ts +27 -0
- package/dist/editor/spellcheck/replacementGuard.js +29 -0
- package/dist/editor/spellcheck/replacementGuard.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckCanvasStore.d.ts +17 -0
- package/dist/editor/spellcheck/spellCheckCanvasStore.js +37 -0
- package/dist/editor/spellcheck/spellCheckCanvasStore.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckCanvasTargets.d.ts +71 -0
- package/dist/editor/spellcheck/spellCheckCanvasTargets.js +126 -0
- package/dist/editor/spellcheck/spellCheckCanvasTargets.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckClient.d.ts +66 -0
- package/dist/editor/spellcheck/spellCheckClient.js +0 -0
- package/dist/editor/spellcheck/spellCheckClient.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckContextMenu.d.ts +52 -0
- package/dist/editor/spellcheck/spellCheckContextMenu.js +120 -0
- package/dist/editor/spellcheck/spellCheckContextMenu.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckReplace.d.ts +8 -0
- package/dist/editor/spellcheck/spellCheckReplace.js +20 -0
- package/dist/editor/spellcheck/spellCheckReplace.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckStyles.d.ts +11 -0
- package/dist/editor/spellcheck/spellCheckStyles.js +12 -0
- package/dist/editor/spellcheck/spellCheckStyles.js.map +1 -0
- package/dist/editor/spellcheck/spellCheckTypes.d.ts +94 -0
- package/dist/editor/spellcheck/spellCheckTypes.js +2 -0
- package/dist/editor/spellcheck/spellCheckTypes.js.map +1 -0
- package/dist/editor/spellcheck/textMarkHitTest.d.ts +14 -0
- package/dist/editor/spellcheck/textMarkHitTest.js +39 -0
- package/dist/editor/spellcheck/textMarkHitTest.js.map +1 -0
- package/dist/editor/spellcheck/useSpellCheck.d.ts +16 -0
- package/dist/editor/spellcheck/useSpellCheck.js +57 -0
- package/dist/editor/spellcheck/useSpellCheck.js.map +1 -0
- package/dist/editor/ui/DynamicRenderingsPublishWarning.d.ts +14 -0
- package/dist/editor/ui/DynamicRenderingsPublishWarning.js +40 -0
- package/dist/editor/ui/DynamicRenderingsPublishWarning.js.map +1 -0
- package/dist/editor/ui/ItemNameDialogNew.js +11 -2
- package/dist/editor/ui/ItemNameDialogNew.js.map +1 -1
- package/dist/editor/ui/ItemSearch.d.ts +2 -0
- package/dist/editor/ui/ItemSearch.js +2 -2
- package/dist/editor/ui/ItemSearch.js.map +1 -1
- package/dist/editor/ui/ParheliaMark.d.ts +15 -0
- package/dist/editor/ui/ParheliaMark.js +12 -0
- package/dist/editor/ui/ParheliaMark.js.map +1 -0
- package/dist/editor/ui/PublishDialog.d.ts +2 -0
- package/dist/editor/ui/PublishDialog.js +4 -1
- package/dist/editor/ui/PublishDialog.js.map +1 -1
- package/dist/editor/ui/PublishItemDialog.js +3 -2
- package/dist/editor/ui/PublishItemDialog.js.map +1 -1
- package/dist/editor/ui/PublishReadinessSummary.js +1 -1
- package/dist/editor/ui/PublishReadinessSummary.js.map +1 -1
- package/dist/editor/ui/PublishRestrictionsDialog.d.ts +33 -0
- package/dist/editor/ui/PublishRestrictionsDialog.js +208 -38
- package/dist/editor/ui/PublishRestrictionsDialog.js.map +1 -1
- package/dist/editor/ui/RootItemPicker.d.ts +18 -0
- package/dist/editor/ui/RootItemPicker.js +112 -0
- package/dist/editor/ui/RootItemPicker.js.map +1 -0
- package/dist/editor/ui/WorkboxItemsTable.js +1 -1
- package/dist/editor/ui/WorkboxItemsTable.js.map +1 -1
- package/dist/editor/undoEligibility.d.ts +2 -0
- package/dist/editor/undoEligibility.js +8 -0
- package/dist/editor/undoEligibility.js.map +1 -0
- package/dist/editor/utils/dataTransferImages.d.ts +7 -0
- package/dist/editor/utils/dataTransferImages.js +43 -0
- package/dist/editor/utils/dataTransferImages.js.map +1 -0
- package/dist/editor/utils/itemConverters.js +9 -0
- package/dist/editor/utils/itemConverters.js.map +1 -1
- package/dist/editor/utils/keyboardNavigation.js +54 -4
- package/dist/editor/utils/keyboardNavigation.js.map +1 -1
- package/dist/editor/utils.d.ts +4 -4
- package/dist/editor/utils.js +9 -8
- package/dist/editor/utils.js.map +1 -1
- package/dist/editor/validation/navigateToValidationIssue.d.ts +2 -2
- package/dist/editor/validation/navigateToValidationIssue.js +1 -1
- package/dist/editor/validation/navigateToValidationIssue.js.map +1 -1
- package/dist/editor/validation/validationRulerIssues.d.ts +17 -0
- package/dist/editor/validation/validationRulerIssues.js +44 -0
- package/dist/editor/validation/validationRulerIssues.js.map +1 -0
- package/dist/editor/views/CompareView.js +3 -4
- package/dist/editor/views/CompareView.js.map +1 -1
- package/dist/editor/views/EditorSlot.js +10 -4
- package/dist/editor/views/EditorSlot.js.map +1 -1
- package/dist/editor/views/ItemEditor.d.ts +3 -1
- package/dist/editor/views/ItemEditor.js +43 -38
- package/dist/editor/views/ItemEditor.js.map +1 -1
- package/dist/editor/views/ItemEditorPane.js +3 -3
- package/dist/editor/views/ItemEditorPane.js.map +1 -1
- package/dist/editor/views/SingleEditView.js +10 -32
- package/dist/editor/views/SingleEditView.js.map +1 -1
- package/dist/editor/views/editorSlotContext.js +62 -90
- package/dist/editor/views/editorSlotContext.js.map +1 -1
- package/dist/index.d.ts +11 -5
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +7 -0
- package/dist/lib/utils.js.map +1 -1
- package/dist/licensing/FeatureGate.js +1 -1
- package/dist/licensing/FeatureGate.js.map +1 -1
- package/dist/licensing/LicenseContext.js +31 -17
- package/dist/licensing/LicenseContext.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/setup/services/setupWizardService.d.ts +6 -2
- package/dist/setup/services/setupWizardService.js +10 -0
- package/dist/setup/services/setupWizardService.js.map +1 -1
- package/dist/setup/wizard/steps/AddModelDialog.js +1 -0
- package/dist/setup/wizard/steps/AddModelDialog.js.map +1 -1
- package/dist/setup/wizard/steps/ImportModelDialog.js +2 -1
- package/dist/setup/wizard/steps/ImportModelDialog.js.map +1 -1
- package/dist/splash-screen/ModernSplashScreen.js +8 -6
- package/dist/splash-screen/ModernSplashScreen.js.map +1 -1
- package/dist/splash-screen/RecentPages.js +8 -5
- package/dist/splash-screen/RecentPages.js.map +1 -1
- package/dist/task-board/TaskBoardWorkspace.js +218 -35
- package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
- package/dist/task-board/components/AttentionPromptDialog.d.ts +13 -0
- package/dist/task-board/components/AttentionPromptDialog.js +45 -0
- package/dist/task-board/components/AttentionPromptDialog.js.map +1 -0
- package/dist/task-board/components/GoalDataView.d.ts +22 -1
- package/dist/task-board/components/GoalDataView.js +63 -17
- package/dist/task-board/components/GoalDataView.js.map +1 -1
- package/dist/task-board/components/GoalFindingsTable.d.ts +43 -0
- package/dist/task-board/components/GoalFindingsTable.js +160 -0
- package/dist/task-board/components/GoalFindingsTable.js.map +1 -0
- package/dist/task-board/components/GoalsMatrix.js +33 -6
- package/dist/task-board/components/GoalsMatrix.js.map +1 -1
- package/dist/task-board/components/IssuePanel.d.ts +31 -0
- package/dist/task-board/components/IssuePanel.js +268 -0
- package/dist/task-board/components/IssuePanel.js.map +1 -0
- package/dist/task-board/components/ProjectBudgetBanner.js +1 -1
- package/dist/task-board/components/ProjectBudgetBanner.js.map +1 -1
- package/dist/task-board/components/ProjectGoalsPanel.js +66 -13
- package/dist/task-board/components/ProjectGoalsPanel.js.map +1 -1
- package/dist/task-board/components/SubgoalFindings.d.ts +40 -0
- package/dist/task-board/components/SubgoalFindings.js +88 -0
- package/dist/task-board/components/SubgoalFindings.js.map +1 -0
- package/dist/task-board/components/TaskAgentPanel.d.ts +2 -0
- package/dist/task-board/components/TaskAgentPanel.js +5 -4
- package/dist/task-board/components/TaskAgentPanel.js.map +1 -1
- package/dist/task-board/components/TaskDetailPanel.js +22 -16
- package/dist/task-board/components/TaskDetailPanel.js.map +1 -1
- package/dist/task-board/components/WizardCommunicationCards.js +1 -1
- package/dist/task-board/components/WizardCommunicationCards.js.map +1 -1
- package/dist/task-board/components/WizardCommunicationCenter.d.ts +2 -0
- package/dist/task-board/components/WizardCommunicationCenter.js +5 -3
- package/dist/task-board/components/WizardCommunicationCenter.js.map +1 -1
- package/dist/task-board/components/WizardCommunicationShared.js +2 -1
- package/dist/task-board/components/WizardCommunicationShared.js.map +1 -1
- package/dist/task-board/components/WizardTask.d.ts +2 -0
- package/dist/task-board/components/WizardTask.js +2 -2
- package/dist/task-board/components/WizardTask.js.map +1 -1
- package/dist/task-board/components/WizardTaskDetailsPanel.d.ts +4 -0
- package/dist/task-board/components/WizardTaskDetailsPanel.js +16 -3
- package/dist/task-board/components/WizardTaskDetailsPanel.js.map +1 -1
- package/dist/task-board/services/issueService.d.ts +193 -0
- package/dist/task-board/services/issueService.js +97 -0
- package/dist/task-board/services/issueService.js.map +1 -0
- package/dist/task-board/services/taskService.d.ts +1 -2
- package/dist/task-board/services/taskService.js +0 -3
- package/dist/task-board/services/taskService.js.map +1 -1
- package/dist/task-board/taskBlockers.d.ts +10 -0
- package/dist/task-board/taskBlockers.js +66 -0
- package/dist/task-board/taskBlockers.js.map +1 -0
- package/dist/task-board/types.d.ts +24 -7
- package/dist/task-board/utils/projectDashboardModel.js +14 -0
- package/dist/task-board/utils/projectDashboardModel.js.map +1 -1
- package/dist/task-board/views/DependencyGraphView.d.ts +22 -0
- package/dist/task-board/views/DependencyGraphView.js +111 -14
- package/dist/task-board/views/DependencyGraphView.js.map +1 -1
- package/dist/task-board/views/KanbanView.js +8 -10
- package/dist/task-board/views/KanbanView.js.map +1 -1
- package/dist/task-board/views/ProjectDashboardView.js +5 -13
- package/dist/task-board/views/ProjectDashboardView.js.map +1 -1
- package/dist/tour/Tour.js +4 -1
- package/dist/tour/Tour.js.map +1 -1
- package/dist/tour/sandbox-tour-copy.d.ts +8 -0
- package/dist/tour/sandbox-tour-copy.js +8 -0
- package/dist/tour/sandbox-tour-copy.js.map +1 -1
- package/dist/tour/sandbox-tour.d.ts +3 -0
- package/dist/tour/sandbox-tour.js +107 -3
- package/dist/tour/sandbox-tour.js.map +1 -1
- package/dist/types.d.ts +85 -1
- package/package.json +6 -2
- package/styles.css +74 -3
- package/dist/editor/page-editor-chrome/bridgeLinkValue.d.ts +0 -10
- package/dist/editor/page-editor-chrome/bridgeLinkValue.js +0 -55
- package/dist/editor/page-editor-chrome/bridgeLinkValue.js.map +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { type ExecutionResult } from "./serviceHelper";
|
|
2
|
+
/**
|
|
3
|
+
* Approval of dynamic renderings (agent-written components and the tenant's
|
|
4
|
+
* theme). Published pages show a rendering only once an administrator approved
|
|
5
|
+
* its exact current code; the CM answers these endpoints for the signed-in
|
|
6
|
+
* editor.
|
|
7
|
+
*/
|
|
8
|
+
export declare const RENDERINGS_ENDPOINT = "/parhelia/renderings";
|
|
9
|
+
export type RenderingState = {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
kind: "component" | "theme";
|
|
13
|
+
path: string;
|
|
14
|
+
hasClientCode: boolean;
|
|
15
|
+
hash: string;
|
|
16
|
+
approved: boolean;
|
|
17
|
+
changedSinceApproval: boolean;
|
|
18
|
+
approvedBy?: string | null;
|
|
19
|
+
/** ISO 8601, UTC. */
|
|
20
|
+
approvedAt?: string | null;
|
|
21
|
+
sandbox: boolean;
|
|
22
|
+
};
|
|
23
|
+
export type RenderingPageState = {
|
|
24
|
+
/**
|
|
25
|
+
* An administrator, or on a sandbox page its owner: may open the review
|
|
26
|
+
* (code, AI check, client code in a sealed frame). Everyone else sees client
|
|
27
|
+
* code run only once approved.
|
|
28
|
+
*/
|
|
29
|
+
canReview: boolean;
|
|
30
|
+
/** An administrator on a page outside a sandbox. */
|
|
31
|
+
canApprove: boolean;
|
|
32
|
+
/** The listed renderings plus the page tenant's theme. */
|
|
33
|
+
renderings: RenderingState[];
|
|
34
|
+
};
|
|
35
|
+
export type RenderingSource = RenderingState & {
|
|
36
|
+
code: string;
|
|
37
|
+
clientCode: string | null;
|
|
38
|
+
};
|
|
39
|
+
export type PageVersion = {
|
|
40
|
+
id: string;
|
|
41
|
+
language: string;
|
|
42
|
+
version: number;
|
|
43
|
+
};
|
|
44
|
+
export type RenderingsResult<T> = {
|
|
45
|
+
ok: true;
|
|
46
|
+
data: T;
|
|
47
|
+
} | {
|
|
48
|
+
ok: false;
|
|
49
|
+
status?: number;
|
|
50
|
+
message: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* The server's own message for a failed request. Parhelia errors are JSON
|
|
54
|
+
* `{ summary, details }`; some statuses reach the helper's generic branch with
|
|
55
|
+
* that JSON as raw text, so it is parsed here rather than shown verbatim.
|
|
56
|
+
*/
|
|
57
|
+
export declare function getServerMessage(result: ExecutionResult<unknown>, fallback: string): string;
|
|
58
|
+
/** A rendering state from the server, or undefined when it is not one. */
|
|
59
|
+
export declare function toRenderingState(value: unknown): RenderingState | undefined;
|
|
60
|
+
export declare function buildPageStateUrl(page: PageVersion, renderingIds: readonly string[]): string;
|
|
61
|
+
/** Approval state of the listed renderings and the page tenant's theme. */
|
|
62
|
+
export declare function fetchRenderingPageState(page: PageVersion, renderingIds: readonly string[], signal?: AbortSignal): Promise<RenderingsResult<RenderingPageState>>;
|
|
63
|
+
/** A rendering's code and client code with its approval state. */
|
|
64
|
+
export declare function fetchRenderingSource(id: string, signal?: AbortSignal): Promise<RenderingsResult<RenderingSource>>;
|
|
65
|
+
/**
|
|
66
|
+
* Approves exactly the code the administrator looked at: the CM refuses (409)
|
|
67
|
+
* when `hash` is no longer the rendering's current one, and (422) while the AI
|
|
68
|
+
* check reports a high finding and no `overrideReason` is given. The reason is
|
|
69
|
+
* recorded with the findings it overrides.
|
|
70
|
+
*/
|
|
71
|
+
export declare function approveRendering(id: string, hash: string, overrideReason?: string): Promise<RenderingsResult<RenderingState | undefined>>;
|
|
72
|
+
export type RenderingCheckSeverity = "high" | "medium" | "low";
|
|
73
|
+
export type RenderingCheckFinding = {
|
|
74
|
+
severity: RenderingCheckSeverity;
|
|
75
|
+
title: string;
|
|
76
|
+
detail: string | null;
|
|
77
|
+
/** Which code the finding is about; null for the rendering as a whole. */
|
|
78
|
+
source: "code" | "clientCode" | null;
|
|
79
|
+
line: number | null;
|
|
80
|
+
excerpt: string | null;
|
|
81
|
+
};
|
|
82
|
+
export type RenderingCheckOverride = {
|
|
83
|
+
by: string;
|
|
84
|
+
/** ISO 8601, UTC. */
|
|
85
|
+
at: string;
|
|
86
|
+
reason: string;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* The AI check of a rendering's current code. `blocks` is set while it
|
|
90
|
+
* reports a high finding, and when the code could not be checked (`failed`:
|
|
91
|
+
* a content filter, an unreadable answer, a timeout, code too large).
|
|
92
|
+
*/
|
|
93
|
+
export type RenderingCheck = {
|
|
94
|
+
status: "checked" | "unavailable" | "failed";
|
|
95
|
+
/** The approval hash the check is about. */
|
|
96
|
+
hash: string;
|
|
97
|
+
blocks: boolean;
|
|
98
|
+
/** Why there is no result (unavailable, failed). */
|
|
99
|
+
message: string | null;
|
|
100
|
+
summary: string | null;
|
|
101
|
+
findings: RenderingCheckFinding[];
|
|
102
|
+
model: string | null;
|
|
103
|
+
checkedAt: string | null;
|
|
104
|
+
overrides: RenderingCheckOverride[];
|
|
105
|
+
};
|
|
106
|
+
/** An AI check from the server, or undefined when it is not one. */
|
|
107
|
+
export declare function toRenderingCheck(value: unknown): RenderingCheck | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* The AI check of the rendering's current code: the cached one, or a new one
|
|
110
|
+
* (which can take a minute). `rerun` checks again (administrators only).
|
|
111
|
+
*/
|
|
112
|
+
export declare function checkRendering(id: string, options?: {
|
|
113
|
+
rerun?: boolean;
|
|
114
|
+
signal?: AbortSignal;
|
|
115
|
+
}): Promise<RenderingsResult<RenderingCheck>>;
|
|
116
|
+
/** Ends the approval; published pages stop showing the rendering at once. */
|
|
117
|
+
export declare function revokeRendering(id: string): Promise<RenderingsResult<RenderingState | undefined>>;
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { get, post, PARHELIA_REQUEST_HEADER, PARHELIA_REQUEST_HEADER_VALUE, } from "./serviceHelper";
|
|
2
|
+
/**
|
|
3
|
+
* Approval of dynamic renderings (agent-written components and the tenant's
|
|
4
|
+
* theme). Published pages show a rendering only once an administrator approved
|
|
5
|
+
* its exact current code; the CM answers these endpoints for the signed-in
|
|
6
|
+
* editor.
|
|
7
|
+
*/
|
|
8
|
+
export const RENDERINGS_ENDPOINT = "/parhelia/renderings";
|
|
9
|
+
/**
|
|
10
|
+
* The server's own message for a failed request. Parhelia errors are JSON
|
|
11
|
+
* `{ summary, details }`; some statuses reach the helper's generic branch with
|
|
12
|
+
* that JSON as raw text, so it is parsed here rather than shown verbatim.
|
|
13
|
+
*/
|
|
14
|
+
export function getServerMessage(result, fallback) {
|
|
15
|
+
const raw = result.rawDetails ?? result.details;
|
|
16
|
+
if (raw) {
|
|
17
|
+
try {
|
|
18
|
+
const parsed = JSON.parse(raw);
|
|
19
|
+
const parts = [parsed.summary, parsed.details, parsed.error].filter((part) => typeof part === "string" && !!part.trim());
|
|
20
|
+
if (parts.length > 0)
|
|
21
|
+
return parts.join(": ");
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
// Not JSON: fall through to the helper's own summary/details.
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return ([result.summary, result.details]
|
|
28
|
+
.filter((part) => typeof part === "string" && !!part)
|
|
29
|
+
.join(": ") || fallback);
|
|
30
|
+
}
|
|
31
|
+
function optionalString(value) {
|
|
32
|
+
return typeof value === "string" && value.trim() ? value : null;
|
|
33
|
+
}
|
|
34
|
+
/** A rendering state from the server, or undefined when it is not one. */
|
|
35
|
+
export function toRenderingState(value) {
|
|
36
|
+
if (!value || typeof value !== "object")
|
|
37
|
+
return undefined;
|
|
38
|
+
const candidate = value;
|
|
39
|
+
if (typeof candidate.id !== "string" || !candidate.id)
|
|
40
|
+
return undefined;
|
|
41
|
+
return {
|
|
42
|
+
id: candidate.id,
|
|
43
|
+
name: typeof candidate.name === "string" ? candidate.name : "",
|
|
44
|
+
kind: candidate.kind === "theme" ? "theme" : "component",
|
|
45
|
+
path: typeof candidate.path === "string" ? candidate.path : "",
|
|
46
|
+
hasClientCode: candidate.hasClientCode === true,
|
|
47
|
+
hash: typeof candidate.hash === "string" ? candidate.hash : "",
|
|
48
|
+
approved: candidate.approved === true,
|
|
49
|
+
changedSinceApproval: candidate.changedSinceApproval === true,
|
|
50
|
+
approvedBy: optionalString(candidate.approvedBy),
|
|
51
|
+
approvedAt: optionalString(candidate.approvedAt),
|
|
52
|
+
sandbox: candidate.sandbox === true,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function toRenderingSource(value) {
|
|
56
|
+
const state = toRenderingState(value);
|
|
57
|
+
if (!state)
|
|
58
|
+
return undefined;
|
|
59
|
+
const candidate = value;
|
|
60
|
+
if (typeof candidate.code !== "string")
|
|
61
|
+
return undefined;
|
|
62
|
+
return {
|
|
63
|
+
...state,
|
|
64
|
+
code: candidate.code,
|
|
65
|
+
clientCode: typeof candidate.clientCode === "string" ? candidate.clientCode : null,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function toPageState(value) {
|
|
69
|
+
if (!value || typeof value !== "object")
|
|
70
|
+
return undefined;
|
|
71
|
+
const candidate = value;
|
|
72
|
+
if (!Array.isArray(candidate.renderings))
|
|
73
|
+
return undefined;
|
|
74
|
+
return {
|
|
75
|
+
canReview: candidate.canReview === true,
|
|
76
|
+
canApprove: candidate.canApprove === true,
|
|
77
|
+
renderings: candidate.renderings
|
|
78
|
+
.map(toRenderingState)
|
|
79
|
+
.filter((state) => !!state),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
const requestHeaders = {
|
|
83
|
+
[PARHELIA_REQUEST_HEADER]: PARHELIA_REQUEST_HEADER_VALUE,
|
|
84
|
+
};
|
|
85
|
+
function failure(result, fallback) {
|
|
86
|
+
return {
|
|
87
|
+
ok: false,
|
|
88
|
+
status: result.response?.status,
|
|
89
|
+
message: getServerMessage(result, fallback),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function thrown(error, fallback) {
|
|
93
|
+
return {
|
|
94
|
+
ok: false,
|
|
95
|
+
message: error instanceof Error ? error.message : fallback,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
export function buildPageStateUrl(page, renderingIds) {
|
|
99
|
+
const params = new URLSearchParams({
|
|
100
|
+
item: page.id,
|
|
101
|
+
language: page.language,
|
|
102
|
+
version: String(page.version),
|
|
103
|
+
renderings: renderingIds.join(","),
|
|
104
|
+
});
|
|
105
|
+
return `${RENDERINGS_ENDPOINT}/pageState?${params.toString()}`;
|
|
106
|
+
}
|
|
107
|
+
/** Approval state of the listed renderings and the page tenant's theme. */
|
|
108
|
+
export async function fetchRenderingPageState(page, renderingIds, signal) {
|
|
109
|
+
const fallback = "The approval state of the renderings could not be loaded.";
|
|
110
|
+
try {
|
|
111
|
+
const result = await get(buildPageStateUrl(page, renderingIds), undefined, signal, requestHeaders);
|
|
112
|
+
if (result.type !== "success")
|
|
113
|
+
return failure(result, fallback);
|
|
114
|
+
const state = toPageState(result.data);
|
|
115
|
+
return state
|
|
116
|
+
? { ok: true, data: state }
|
|
117
|
+
: { ok: false, message: "The server returned an unexpected answer." };
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
return thrown(error, fallback);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/** A rendering's code and client code with its approval state. */
|
|
124
|
+
export async function fetchRenderingSource(id, signal) {
|
|
125
|
+
const fallback = "The code of the rendering could not be loaded.";
|
|
126
|
+
try {
|
|
127
|
+
const result = await get(`${RENDERINGS_ENDPOINT}/source?${new URLSearchParams({ id }).toString()}`, undefined, signal, requestHeaders);
|
|
128
|
+
if (result.type !== "success")
|
|
129
|
+
return failure(result, fallback);
|
|
130
|
+
const source = toRenderingSource(result.data);
|
|
131
|
+
return source
|
|
132
|
+
? { ok: true, data: source }
|
|
133
|
+
: { ok: false, message: "The server returned an unexpected answer." };
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
return thrown(error, fallback);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
async function postApproval(action, body, fallback) {
|
|
140
|
+
try {
|
|
141
|
+
// post() sends the Parhelia request header; the installed fetch wrapper
|
|
142
|
+
// adds the CSRF token.
|
|
143
|
+
const result = await post(`${RENDERINGS_ENDPOINT}/${action}`, body);
|
|
144
|
+
if (result.type !== "success")
|
|
145
|
+
return failure(result, fallback);
|
|
146
|
+
const data = result.data;
|
|
147
|
+
return { ok: true, data: toRenderingState(data?.state) };
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
return thrown(error, fallback);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Approves exactly the code the administrator looked at: the CM refuses (409)
|
|
155
|
+
* when `hash` is no longer the rendering's current one, and (422) while the AI
|
|
156
|
+
* check reports a high finding and no `overrideReason` is given. The reason is
|
|
157
|
+
* recorded with the findings it overrides.
|
|
158
|
+
*/
|
|
159
|
+
export function approveRendering(id, hash, overrideReason) {
|
|
160
|
+
return postApproval("approve", overrideReason ? { id, hash, overrideReason } : { id, hash }, "The rendering could not be approved.");
|
|
161
|
+
}
|
|
162
|
+
function toFinding(value) {
|
|
163
|
+
if (!value || typeof value !== "object")
|
|
164
|
+
return undefined;
|
|
165
|
+
const candidate = value;
|
|
166
|
+
const title = optionalString(candidate.title);
|
|
167
|
+
if (!title)
|
|
168
|
+
return undefined;
|
|
169
|
+
return {
|
|
170
|
+
severity: candidate.severity === "high" || candidate.severity === "low"
|
|
171
|
+
? candidate.severity
|
|
172
|
+
: "medium",
|
|
173
|
+
title,
|
|
174
|
+
detail: optionalString(candidate.detail),
|
|
175
|
+
source: candidate.source === "code" || candidate.source === "clientCode"
|
|
176
|
+
? candidate.source
|
|
177
|
+
: null,
|
|
178
|
+
line: typeof candidate.line === "number" && candidate.line > 0
|
|
179
|
+
? candidate.line
|
|
180
|
+
: null,
|
|
181
|
+
excerpt: optionalString(candidate.excerpt),
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
function toOverride(value) {
|
|
185
|
+
if (!value || typeof value !== "object")
|
|
186
|
+
return undefined;
|
|
187
|
+
const candidate = value;
|
|
188
|
+
const by = optionalString(candidate.by);
|
|
189
|
+
const at = optionalString(candidate.at);
|
|
190
|
+
const reason = optionalString(candidate.reason);
|
|
191
|
+
return by && at && reason ? { by, at, reason } : undefined;
|
|
192
|
+
}
|
|
193
|
+
/** An AI check from the server, or undefined when it is not one. */
|
|
194
|
+
export function toRenderingCheck(value) {
|
|
195
|
+
if (!value || typeof value !== "object")
|
|
196
|
+
return undefined;
|
|
197
|
+
const candidate = value;
|
|
198
|
+
const status = candidate.status;
|
|
199
|
+
if (status !== "checked" && status !== "unavailable" && status !== "failed")
|
|
200
|
+
return undefined;
|
|
201
|
+
return {
|
|
202
|
+
status,
|
|
203
|
+
hash: typeof candidate.hash === "string" ? candidate.hash : "",
|
|
204
|
+
// "unavailable" (no Reviewer Model) never blocks; a failed check does.
|
|
205
|
+
blocks: status !== "unavailable" && candidate.blocks === true,
|
|
206
|
+
message: optionalString(candidate.message),
|
|
207
|
+
summary: optionalString(candidate.summary),
|
|
208
|
+
findings: Array.isArray(candidate.findings)
|
|
209
|
+
? candidate.findings
|
|
210
|
+
.map(toFinding)
|
|
211
|
+
.filter((finding) => !!finding)
|
|
212
|
+
: [],
|
|
213
|
+
model: optionalString(candidate.model),
|
|
214
|
+
checkedAt: optionalString(candidate.checkedAt),
|
|
215
|
+
overrides: Array.isArray(candidate.overrides)
|
|
216
|
+
? candidate.overrides
|
|
217
|
+
.map(toOverride)
|
|
218
|
+
.filter((entry) => !!entry)
|
|
219
|
+
: [],
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* The AI check of the rendering's current code: the cached one, or a new one
|
|
224
|
+
* (which can take a minute). `rerun` checks again (administrators only).
|
|
225
|
+
*/
|
|
226
|
+
export async function checkRendering(id, options = {}) {
|
|
227
|
+
const fallback = "The AI check could not be run.";
|
|
228
|
+
try {
|
|
229
|
+
const result = await post(`${RENDERINGS_ENDPOINT}/check`, options.rerun ? { id, rerun: true } : { id }, undefined, options.signal);
|
|
230
|
+
if (result.type !== "success")
|
|
231
|
+
return failure(result, fallback);
|
|
232
|
+
const check = toRenderingCheck(result.data);
|
|
233
|
+
return check
|
|
234
|
+
? { ok: true, data: check }
|
|
235
|
+
: { ok: false, message: "The server returned an unexpected answer." };
|
|
236
|
+
}
|
|
237
|
+
catch (error) {
|
|
238
|
+
return thrown(error, fallback);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
/** Ends the approval; published pages stop showing the rendering at once. */
|
|
242
|
+
export function revokeRendering(id) {
|
|
243
|
+
return postApproval("revoke", { id }, "The approval could not be revoked.");
|
|
244
|
+
}
|
|
245
|
+
//# sourceMappingURL=renderingsService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderingsService.js","sourceRoot":"","sources":["../../../src/editor/services/renderingsService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EACH,IAAI,EACJ,uBAAuB,EACvB,6BAA6B,GAE9B,MAAM,iBAAiB,CAAC;AAEzB;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AA4C1D;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAgC,EAChC,QAAgB;IAEhB,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,OAAO,CAAC;IAChD,IAAI,GAAG,EAAE,CAAC;QACR,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAI5B,CAAC;YACF,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CACjE,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CACpE,CAAC;YACF,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,CAAC;QAAC,MAAM,CAAC;YACP,8DAA8D;QAChE,CAAC;IACH,CAAC;IACD,OAAO,CACL,CAAC,MAAM,CA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,MAAM,CACf,CAAC;QACF,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS;YAAE,OAAO,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAChE,MAAM,KAAK,GAAG,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC5C,OAAO,KAAK;YACV,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE;YAC3B,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,2CAA2C,EAAE,CAAC;IAC1E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACjC,CAAC;AACH,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,eAAe,CAAC,EAAU;IACxC,OAAO,YAAY,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,oCAAoC,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Comment, CommentTag, CreateReviewRequest, ReviewListItem, ReviewWithPages, ReviewAssignment, ReviewerInfo, ItemWithSubtree, ReviewWithAssignments, SendInvitationsResponse } from "../../types";
|
|
2
2
|
import { ItemDescriptor } from "../pageModel";
|
|
3
|
-
export declare function createOrUpdateComment(comment: Comment
|
|
3
|
+
export declare function createOrUpdateComment(comment: Comment): Promise<import("./serviceHelper").ExecutionResult<unknown>>;
|
|
4
4
|
export declare function getComments(itemId: string, language: string, version: number, reviewId?: string): Promise<import("./serviceHelper").ExecutionResult<Comment[]>>;
|
|
5
5
|
export declare function getLatestComments(take?: number, language?: string): Promise<import("./serviceHelper").ExecutionResult<Comment[]>>;
|
|
6
|
+
export declare function getSubtreeComments(rootItemId: string, language: string): Promise<import("./serviceHelper").ExecutionResult<Comment[]>>;
|
|
6
7
|
export declare function resolveComment(comment: Comment): Promise<import("./serviceHelper").ExecutionResult<Comment>>;
|
|
7
8
|
export declare function unresolveComment(comment: Comment): Promise<import("./serviceHelper").ExecutionResult<Comment>>;
|
|
8
9
|
export declare function deleteComment(comment: Comment): Promise<import("./serviceHelper").ExecutionResult<unknown>>;
|
|
@@ -12,6 +13,10 @@ export declare function rejectReview(itemDescriptor: ItemDescriptor): Promise<im
|
|
|
12
13
|
export declare function createReview(request: CreateReviewRequest): Promise<import("./serviceHelper").ExecutionResult<{
|
|
13
14
|
reviewId: string;
|
|
14
15
|
}>>;
|
|
16
|
+
export declare function getInvitationSenderStatus(): Promise<import("./serviceHelper").ExecutionResult<{
|
|
17
|
+
configured: boolean;
|
|
18
|
+
message?: string;
|
|
19
|
+
}>>;
|
|
15
20
|
export declare function suggestReviewName(req: {
|
|
16
21
|
itemIds: string[];
|
|
17
22
|
languages: string[];
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { get, post } from "./serviceHelper";
|
|
2
|
-
export function createOrUpdateComment(comment
|
|
3
|
-
|
|
4
|
-
if (reviewId)
|
|
5
|
-
params.set("reviewId", reviewId);
|
|
6
|
-
const query = params.toString();
|
|
7
|
-
return post(`/parhelia/comments/save${query ? `?${query}` : ""}`, comment);
|
|
2
|
+
export function createOrUpdateComment(comment) {
|
|
3
|
+
return post(`/parhelia/comments/save`, comment);
|
|
8
4
|
}
|
|
9
5
|
export function getComments(itemId, language, version, reviewId) {
|
|
10
6
|
const params = new URLSearchParams({
|
|
@@ -27,6 +23,13 @@ export function getLatestComments(take, language) {
|
|
|
27
23
|
const query = params.toString();
|
|
28
24
|
return get(`/parhelia/comments/latest${query ? `?${query}` : ""}`);
|
|
29
25
|
}
|
|
26
|
+
// Comments on an item and every item beneath it (latest version per item, one
|
|
27
|
+
// language), already filtered by the backend for user access. Backs the
|
|
28
|
+
// feedback sidebar.
|
|
29
|
+
export function getSubtreeComments(rootItemId, language) {
|
|
30
|
+
const params = new URLSearchParams({ rootItemId, language });
|
|
31
|
+
return get(`/parhelia/comments/subtree?${params.toString()}`);
|
|
32
|
+
}
|
|
30
33
|
export function resolveComment(comment) {
|
|
31
34
|
return post(`/parhelia/comments/resolve?commentId=${comment.id}`, {});
|
|
32
35
|
}
|
|
@@ -49,6 +52,11 @@ export function rejectReview(itemDescriptor) {
|
|
|
49
52
|
export function createReview(request) {
|
|
50
53
|
return post(`/parhelia/reviews/create`, request);
|
|
51
54
|
}
|
|
55
|
+
// Whether invitation emails can be sent (a valid sender address is configured).
|
|
56
|
+
// The create-review wizard checks this up front instead of failing on submit.
|
|
57
|
+
export function getInvitationSenderStatus() {
|
|
58
|
+
return get(`/parhelia/reviews/invitationSenderStatus`);
|
|
59
|
+
}
|
|
52
60
|
// Ask the backend to generate a short, descriptive review name from the
|
|
53
61
|
// selected items and languages. Returns null on any failure so callers can
|
|
54
62
|
// silently fall back to an empty/placeholder name.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewsService.js","sourceRoot":"","sources":["../../../src/editor/services/reviewsService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAe5C,MAAM,UAAU,qBAAqB,CAAC,OAAgB
|
|
1
|
+
{"version":3,"file":"reviewsService.js","sourceRoot":"","sources":["../../../src/editor/services/reviewsService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAe5C,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,OAAO,IAAI,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,MAAc,EACd,QAAgB,EAChB,OAAe,EACf,QAAiB;IAEjB,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;QACjC,UAAU,EAAE,MAAM;QAClB,QAAQ;QACR,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE;KAC5B,CAAC,CAAC;IACH,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,C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,MAAM,UAAU,4BAA4B,CAC1C,SAAiB,EACjB,MAAc;IAEd,OAAO,IAAI,CACT,kDAAkD,SAAS,WAAW,MAAM,EAAE,EAC9E,EAAE,CACH,CAAC;AACJ,CAAC;AAED,OAAO;AACP,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,UAA0B;IACtE,MAAM,MAAM,GAAG,MAAM,IAAI,CACvB,qCAAqC,EACrC,UAAU,CACX,CAAC;IACF,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAiB,CAAC;AAC7C,CAAC"}
|
|
@@ -17,6 +17,22 @@ declare global {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
export declare function withParheliaRequestHeader(headers?: HeadersInit): Headers;
|
|
20
|
+
/** Plain-text body of the server's CSRF rejection for a stale or foreign token pair. */
|
|
21
|
+
export declare const ANTI_FORGERY_REJECTION = "Invalid anti-forgery token";
|
|
22
|
+
/**
|
|
23
|
+
* Any GET to a Parhelia controller replaces an invalid anti-forgery pair
|
|
24
|
+
* (see BaseController.IssueAntiForgeryTokens); the health check is the
|
|
25
|
+
* cheapest one and needs no session.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ANTI_FORGERY_REFRESH_URL = "/parhelia/health";
|
|
28
|
+
/**
|
|
29
|
+
* Wraps fetch so unsafe same-origin Parhelia requests carry the CSRF headers.
|
|
30
|
+
* A tab that outlives its token pair (app pool recycle, deploy, re-login as
|
|
31
|
+
* the same or another user) gets "Invalid anti-forgery token" on every POST
|
|
32
|
+
* until something refreshes the cookies, so such a rejection triggers one
|
|
33
|
+
* token refresh and a single retry.
|
|
34
|
+
*/
|
|
35
|
+
export declare function createParheliaFetch(baseFetch: typeof fetch): typeof fetch;
|
|
20
36
|
export declare function post<T>(url: string, body: any, session?: string, signal?: AbortSignal): Promise<ExecutionResult<T>>;
|
|
21
|
-
export declare function get<T>(url: string, session?: string, signal?: AbortSignal): Promise<ExecutionResult<T>>;
|
|
37
|
+
export declare function get<T>(url: string, session?: string, signal?: AbortSignal, headers?: Record<string, string>): Promise<ExecutionResult<T>>;
|
|
22
38
|
export declare function del<T>(url: string, session?: string, signal?: AbortSignal): Promise<ExecutionResult<T>>;
|
|
@@ -61,25 +61,79 @@ function isSameOriginParheliaUrl(input) {
|
|
|
61
61
|
return false;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
/** Plain-text body of the server's CSRF rejection for a stale or foreign token pair. */
|
|
65
|
+
export const ANTI_FORGERY_REJECTION = "Invalid anti-forgery token";
|
|
66
|
+
/**
|
|
67
|
+
* Any GET to a Parhelia controller replaces an invalid anti-forgery pair
|
|
68
|
+
* (see BaseController.IssueAntiForgeryTokens); the health check is the
|
|
69
|
+
* cheapest one and needs no session.
|
|
70
|
+
*/
|
|
71
|
+
export const ANTI_FORGERY_REFRESH_URL = "/parhelia/health";
|
|
72
|
+
async function isAntiForgeryRejection(response) {
|
|
73
|
+
if (response.status !== 403)
|
|
74
|
+
return false;
|
|
75
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
76
|
+
if (!contentType.toLowerCase().startsWith("text/plain"))
|
|
77
|
+
return false;
|
|
78
|
+
try {
|
|
79
|
+
return (await response.clone().text()).trim() === ANTI_FORGERY_REJECTION;
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return false;
|
|
67
83
|
}
|
|
68
|
-
|
|
69
|
-
|
|
84
|
+
}
|
|
85
|
+
function canReplayBody(body) {
|
|
86
|
+
return (typeof ReadableStream === "undefined" || !(body instanceof ReadableStream));
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Wraps fetch so unsafe same-origin Parhelia requests carry the CSRF headers.
|
|
90
|
+
* A tab that outlives its token pair (app pool recycle, deploy, re-login as
|
|
91
|
+
* the same or another user) gets "Invalid anti-forgery token" on every POST
|
|
92
|
+
* until something refreshes the cookies, so such a rejection triggers one
|
|
93
|
+
* token refresh and a single retry.
|
|
94
|
+
*/
|
|
95
|
+
export function createParheliaFetch(baseFetch) {
|
|
96
|
+
let tokenRefresh = null;
|
|
97
|
+
const refreshTokens = () => {
|
|
98
|
+
tokenRefresh ??= baseFetch(ANTI_FORGERY_REFRESH_URL, {
|
|
99
|
+
method: "GET",
|
|
100
|
+
credentials: "include",
|
|
101
|
+
cache: "no-store",
|
|
102
|
+
})
|
|
103
|
+
.then(() => undefined, () => undefined)
|
|
104
|
+
.finally(() => {
|
|
105
|
+
tokenRefresh = null;
|
|
106
|
+
});
|
|
107
|
+
return tokenRefresh;
|
|
108
|
+
};
|
|
109
|
+
return async (input, init) => {
|
|
70
110
|
const method = getRequestMethod(input, init);
|
|
71
111
|
if (!isUnsafeMethod(method) || !isSameOriginParheliaUrl(input)) {
|
|
72
|
-
return
|
|
112
|
+
return baseFetch(input, init);
|
|
73
113
|
}
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
114
|
+
const isRequestInput = typeof Request !== "undefined" && input instanceof Request;
|
|
115
|
+
const requestHeaders = init?.headers ?? (isRequestInput ? input.headers : undefined);
|
|
116
|
+
// A Request's body can be read only once; keep a copy for the retry.
|
|
117
|
+
const retryInput = isRequestInput && !input.bodyUsed ? input.clone() : input;
|
|
118
|
+
const send = (target) => baseFetch(target, {
|
|
79
119
|
...init,
|
|
80
120
|
headers: withParheliaRequestHeader(requestHeaders),
|
|
81
121
|
});
|
|
122
|
+
const response = await send(input);
|
|
123
|
+
if (init?.signal?.aborted ||
|
|
124
|
+
!canReplayBody(init?.body) ||
|
|
125
|
+
!(await isAntiForgeryRejection(response))) {
|
|
126
|
+
return response;
|
|
127
|
+
}
|
|
128
|
+
await refreshTokens();
|
|
129
|
+
return send(retryInput);
|
|
82
130
|
};
|
|
131
|
+
}
|
|
132
|
+
function installParheliaFetchHeader() {
|
|
133
|
+
if (typeof window === "undefined" || window.__parheliaFetchHeaderInstalled) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
window.fetch = createParheliaFetch(window.fetch.bind(window));
|
|
83
137
|
window.__parheliaFetchHeaderInstalled = true;
|
|
84
138
|
}
|
|
85
139
|
installParheliaFetchHeader();
|
|
@@ -193,7 +247,7 @@ export async function post(url, body, session, signal) {
|
|
|
193
247
|
}
|
|
194
248
|
return handleResponse(response);
|
|
195
249
|
}
|
|
196
|
-
export async function get(url, session, signal) {
|
|
250
|
+
export async function get(url, session, signal, headers) {
|
|
197
251
|
if (session)
|
|
198
252
|
url += "?sessionId=" + session;
|
|
199
253
|
let response;
|
|
@@ -204,6 +258,7 @@ export async function get(url, session, signal) {
|
|
|
204
258
|
headers: {
|
|
205
259
|
"Content-Type": "application/json",
|
|
206
260
|
"Cache-Control": "no-cache",
|
|
261
|
+
...headers,
|
|
207
262
|
},
|
|
208
263
|
signal,
|
|
209
264
|
});
|