@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React, { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState, } from "react";
|
|
2
|
+
import React, { forwardRef, Fragment, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState, } from "react";
|
|
3
3
|
import { Link2Off } from "lucide-react";
|
|
4
4
|
import { createEditor, Editor, Element, Text, Transforms, Range, } from "slate";
|
|
5
5
|
import { withHistory } from "slate-history";
|
|
@@ -15,9 +15,13 @@ import { htmlToSlate, slateToHtml } from "../utils/conversion";
|
|
|
15
15
|
import { createKeyboardHandler, generateInternalLinkUrl, isHotkey, } from "../utils/plugins";
|
|
16
16
|
import { cn } from "../../../../lib/utils";
|
|
17
17
|
import { agentAddedTextClass, agentWholeFieldClass, computeTextHighlight, } from "../../../agent-changes/agentChangeTextHighlight";
|
|
18
|
-
import { CHANGED_TEXT_LEAF, collectTextNodeStarts, decorateChangedText, getNodesText, } from "../utils/changeHighlight";
|
|
18
|
+
import { CHANGED_TEXT_LEAF, MISSPELLED_LEAF, collectTextNodeStarts, decorateChangedText, decorateRanges, getNodesText, } from "../utils/changeHighlight";
|
|
19
|
+
import { buildSpellCheckText, commonPrefixLength, pointAtSpellTextOffset, } from "../utils/spellCheckText";
|
|
20
|
+
import { useSpellCheck } from "../../../spellcheck/useSpellCheck";
|
|
21
|
+
import { misspelledTextClass } from "../../../spellcheck/spellCheckStyles";
|
|
19
22
|
import { useCachedSimplifiedProfile } from "../hooks/useProfileCache";
|
|
20
23
|
import { getRichTextAlignmentIcon, getRichTextHorizontalRuleIcon, getRichTextLinkIcon, getRichTextListIcon, getRichTextMarkIcon, getRichTextStripFormattingIcon, } from "../richTextToolbarIcons";
|
|
24
|
+
import { fieldBoxClassName, fieldFocusWithinClassName, } from "../../fieldStyles";
|
|
21
25
|
// Dashed whole-field outline for an agent change that has no added text to
|
|
22
26
|
// mark (deletion-only, or no baseline captured). Lives inside <Slate> and
|
|
23
27
|
// subscribes to the editor so it follows external value updates, which never
|
|
@@ -55,15 +59,24 @@ const ToolbarButtonWrapper = memo(({ option, icon, onMouseDown }) => {
|
|
|
55
59
|
return false;
|
|
56
60
|
return !editor.selection || Range.isCollapsed(editor.selection);
|
|
57
61
|
});
|
|
62
|
+
// Adding and removing a link both act on the selected text
|
|
63
|
+
const disabledTooltip = option.type !== "link"
|
|
64
|
+
? undefined
|
|
65
|
+
: isActive
|
|
66
|
+
? "Select the link text to remove the link"
|
|
67
|
+
: "Select text to add a link";
|
|
58
68
|
const renderedIcon = option.type === "link" && isActive ? (_jsx(Link2Off, { className: "text-neutral-grey-100 h-4 w-4", strokeWidth: 1, "aria-hidden": "true" })) : (icon);
|
|
59
|
-
return (_jsx(ToolbarButton, { icon: renderedIcon, active: isActive, disabled: isDisabled, onMouseDown: onMouseDown, type: `${option.type}-${option.id}` }));
|
|
69
|
+
return (_jsx(ToolbarButton, { icon: renderedIcon, active: isActive, disabled: isDisabled, disabledTooltip: disabledTooltip, onMouseDown: onMouseDown, type: `${option.type}-${option.id}` }));
|
|
60
70
|
});
|
|
61
71
|
ToolbarButtonWrapper.displayName = "ToolbarButtonWrapper";
|
|
62
72
|
// Memoized dropdown component to prevent unnecessary re-renders
|
|
63
|
-
const MemoizedEditorDropdown = memo(({ options, editor, label, buttonStyle }) => {
|
|
64
|
-
return (_jsx(EditorDropdown, { options: options, editor: editor, label: label, buttonStyle: buttonStyle }));
|
|
73
|
+
const MemoizedEditorDropdown = memo(({ options, editor, label, buttonStyle, iconOnly }) => {
|
|
74
|
+
return (_jsx(EditorDropdown, { options: options, editor: editor, label: label, buttonStyle: buttonStyle, iconOnly: iconOnly }));
|
|
65
75
|
});
|
|
66
76
|
MemoizedEditorDropdown.displayName = "MemoizedEditorDropdown";
|
|
77
|
+
// Handler keys for the "Style" (ApplyClass) dropdown entries
|
|
78
|
+
const CSS_CLASS_NONE_KEY = "css-class-none";
|
|
79
|
+
const CSS_CLASS_KEY_PREFIX = "css-class-";
|
|
67
80
|
function getPointAtTextOffset(editor, requestedOffset) {
|
|
68
81
|
const offset = Math.max(0, requestedOffset);
|
|
69
82
|
let traversed = 0;
|
|
@@ -142,7 +155,7 @@ function resolveSnapshotSelection(editor, selection, snapshot) {
|
|
|
142
155
|
}
|
|
143
156
|
}
|
|
144
157
|
export const ReactSlate = forwardRef((props, ref) => {
|
|
145
|
-
const { value = "", onChange, onFocus, onBlur, onMouseUp, onKeyUp, onContextMenu, readOnly = false, placeholder = "Enter some text...", profile,
|
|
158
|
+
const { value = "", onChange, onFocus, onBlur, onMouseUp, onKeyUp, onContextMenu, readOnly = false, placeholder = "Enter some text...", profile, changeBaseline, spellCheck, } = props;
|
|
146
159
|
const editorProfile = profile || {
|
|
147
160
|
toolbar: {
|
|
148
161
|
groups: [],
|
|
@@ -193,12 +206,58 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
193
206
|
changeHighlightCacheRef.current = next;
|
|
194
207
|
return next;
|
|
195
208
|
}, [baselineText, editor]);
|
|
209
|
+
// Spell checking: the document's spell text (block-separated, see
|
|
210
|
+
// spellCheckText.ts) is tracked per content change and checked through
|
|
211
|
+
// the shared client. Misspelling offsets are mapped onto text nodes via
|
|
212
|
+
// the `starts` of the current children; while a re-check is pending after
|
|
213
|
+
// typing, only the ranges before the first changed character are kept.
|
|
214
|
+
const [spellText, setSpellText] = useState(() => buildSpellCheckText(editor.children).text);
|
|
215
|
+
const lastSpellChildrenRef = useRef(editor.children);
|
|
216
|
+
const spell = useSpellCheck({
|
|
217
|
+
key: spellCheck?.key ?? "",
|
|
218
|
+
language: spellCheck?.language,
|
|
219
|
+
text: spellText,
|
|
220
|
+
enabled: !!spellCheck?.enabled && !!spellCheck?.key && !readOnly,
|
|
221
|
+
});
|
|
222
|
+
const spellRangesCacheRef = useRef(null);
|
|
223
|
+
const getSpellRanges = useCallback(() => {
|
|
224
|
+
if (spell.misspellings.length === 0)
|
|
225
|
+
return null;
|
|
226
|
+
const cached = spellRangesCacheRef.current;
|
|
227
|
+
if (cached &&
|
|
228
|
+
cached.children === editor.children &&
|
|
229
|
+
cached.misspellings === spell.misspellings &&
|
|
230
|
+
cached.checkedText === spell.checkedText) {
|
|
231
|
+
return cached;
|
|
232
|
+
}
|
|
233
|
+
const current = buildSpellCheckText(editor.children);
|
|
234
|
+
const checkedText = spell.checkedText ?? "";
|
|
235
|
+
const stable = commonPrefixLength(checkedText, current.text);
|
|
236
|
+
const ranges = current.text === checkedText
|
|
237
|
+
? spell.misspellings
|
|
238
|
+
: spell.misspellings.filter((m) => m.end <= stable);
|
|
239
|
+
const next = {
|
|
240
|
+
children: editor.children,
|
|
241
|
+
misspellings: spell.misspellings,
|
|
242
|
+
checkedText: spell.checkedText,
|
|
243
|
+
starts: current.starts,
|
|
244
|
+
ranges,
|
|
245
|
+
};
|
|
246
|
+
spellRangesCacheRef.current = next;
|
|
247
|
+
return next;
|
|
248
|
+
}, [editor, spell.misspellings, spell.checkedText]);
|
|
196
249
|
const decorate = useCallback((entry) => {
|
|
250
|
+
const decorations = [];
|
|
197
251
|
const state = getChangeHighlight();
|
|
198
|
-
if (
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
252
|
+
if (state?.highlight) {
|
|
253
|
+
decorations.push(...decorateChangedText(entry, state.starts, state.highlight.ranges));
|
|
254
|
+
}
|
|
255
|
+
const spellState = getSpellRanges();
|
|
256
|
+
if (spellState) {
|
|
257
|
+
decorations.push(...decorateRanges(entry, spellState.starts, spellState.ranges, MISSPELLED_LEAF));
|
|
258
|
+
}
|
|
259
|
+
return decorations;
|
|
260
|
+
}, [getChangeHighlight, getSpellRanges]);
|
|
202
261
|
// Track previous value to detect external changes
|
|
203
262
|
const previousValueRef = useRef(value);
|
|
204
263
|
const isInternalChangeRef = useRef(false);
|
|
@@ -269,7 +328,65 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
269
328
|
},
|
|
270
329
|
});
|
|
271
330
|
},
|
|
272
|
-
|
|
331
|
+
getSpellText: () => buildSpellCheckText(editor.children).text,
|
|
332
|
+
getTextOffsetAtPoint: (clientX, clientY) => {
|
|
333
|
+
let domRange = null;
|
|
334
|
+
try {
|
|
335
|
+
const doc = ReactEditor.toDOMNode(editor, editor).ownerDocument;
|
|
336
|
+
const caretDocument = doc;
|
|
337
|
+
if (caretDocument.caretPositionFromPoint) {
|
|
338
|
+
const position = caretDocument.caretPositionFromPoint(clientX, clientY);
|
|
339
|
+
if (position) {
|
|
340
|
+
domRange = doc.createRange();
|
|
341
|
+
domRange.setStart(position.offsetNode, position.offset);
|
|
342
|
+
domRange.collapse(true);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
else if (caretDocument.caretRangeFromPoint) {
|
|
346
|
+
domRange = caretDocument.caretRangeFromPoint(clientX, clientY);
|
|
347
|
+
}
|
|
348
|
+
if (!domRange)
|
|
349
|
+
return null;
|
|
350
|
+
const slateRange = ReactEditor.toSlateRange(editor, domRange, {
|
|
351
|
+
exactMatch: false,
|
|
352
|
+
suppressThrow: true,
|
|
353
|
+
});
|
|
354
|
+
if (!slateRange)
|
|
355
|
+
return null;
|
|
356
|
+
const { starts } = buildSpellCheckText(editor.children);
|
|
357
|
+
const start = starts.get(slateRange.anchor.path.join("."));
|
|
358
|
+
return start === undefined ? null : start + slateRange.anchor.offset;
|
|
359
|
+
}
|
|
360
|
+
catch {
|
|
361
|
+
return null;
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
getMisspellingAtOffset: (offset) => getSpellRanges()?.ranges.find((m) => m.start <= offset && offset <= m.end),
|
|
365
|
+
replaceTextAtOffsets: (start, end, newText) => {
|
|
366
|
+
const { starts } = buildSpellCheckText(editor.children);
|
|
367
|
+
const anchor = pointAtSpellTextOffset(editor, starts, start);
|
|
368
|
+
const focus = pointAtSpellTextOffset(editor, starts, end);
|
|
369
|
+
Transforms.select(editor, { anchor, focus });
|
|
370
|
+
if (editor.selection &&
|
|
371
|
+
Range.isRange(editor.selection) &&
|
|
372
|
+
!Range.isCollapsed(editor.selection)) {
|
|
373
|
+
Transforms.delete(editor);
|
|
374
|
+
}
|
|
375
|
+
Transforms.insertText(editor, newText);
|
|
376
|
+
if (onChange) {
|
|
377
|
+
try {
|
|
378
|
+
const html = slateToHtml(editor.children, simplifiedProfile);
|
|
379
|
+
if (html !== value) {
|
|
380
|
+
isInternalChangeRef.current = true;
|
|
381
|
+
onChange(html);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
catch (error) {
|
|
385
|
+
console.warn("Failed to convert Slate to HTML in replaceTextAtOffsets:", error);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
}), [editor, getSpellRanges, onChange, simplifiedProfile, value]);
|
|
273
390
|
// Initial value for Slate - capture initial props at mount time
|
|
274
391
|
const initialSlateValue = useMemo(() => {
|
|
275
392
|
try {
|
|
@@ -291,17 +408,14 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
291
408
|
return [{ type: "paragraph", children: [{ text: "" }] }];
|
|
292
409
|
}
|
|
293
410
|
}, [value, simplifiedProfile]);
|
|
294
|
-
// Track if user-initiated focus should be restored after toolbar renders
|
|
295
|
-
const pendingFocusRestoreRef = useRef(false);
|
|
296
|
-
const previousShowControlsRef = useRef(showControls);
|
|
297
411
|
// The caret position the user clicked, captured at mousedown as a *logical*
|
|
298
|
-
// Slate range. When an unfocused field is clicked,
|
|
299
|
-
//
|
|
300
|
-
//
|
|
301
|
-
//
|
|
302
|
-
// source. A logical range also survives the layout shift when the toolbar
|
|
303
|
-
// pushes the content down.
|
|
412
|
+
// Slate range. When an unfocused field is clicked, Slate still holds its
|
|
413
|
+
// pre-blur selection at focus time and the renders triggered by focusing
|
|
414
|
+
// can re-apply it, so the click coordinates captured up front are the only
|
|
415
|
+
// reliable source for where the caret belongs.
|
|
304
416
|
const pendingClickRangeRef = useRef(null);
|
|
417
|
+
const pendingCharacterDragRef = useRef(null);
|
|
418
|
+
const pendingSelectionCollapseRef = useRef(null);
|
|
305
419
|
// Keep the last deliberate expanded selection in Slate coordinates. A
|
|
306
420
|
// toolbar interaction can make the browser collapse or discard its DOM
|
|
307
421
|
// selection before React handles the button event; the logical range is the
|
|
@@ -343,6 +457,16 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
343
457
|
}, [editor]);
|
|
344
458
|
// Capture the click target before focus/toolbar can disrupt the selection.
|
|
345
459
|
const handleMouseDown = useCallback((event) => {
|
|
460
|
+
pendingCharacterDragRef.current =
|
|
461
|
+
event.button === 0 &&
|
|
462
|
+
event.detail === 1 &&
|
|
463
|
+
!event.shiftKey &&
|
|
464
|
+
!event.ctrlKey &&
|
|
465
|
+
!event.metaKey &&
|
|
466
|
+
!event.altKey
|
|
467
|
+
? { x: event.clientX, y: event.clientY, moved: false }
|
|
468
|
+
: null;
|
|
469
|
+
pendingSelectionCollapseRef.current = null;
|
|
346
470
|
// Multi-clicks (double = word, triple = paragraph) expand the selection
|
|
347
471
|
// natively. Capturing a collapsed point here would let the delayed
|
|
348
472
|
// caret-restore logic collapse that expansion again.
|
|
@@ -352,7 +476,30 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
352
476
|
}
|
|
353
477
|
lastExpandedSelectionRef.current = null;
|
|
354
478
|
pendingClickRangeRef.current = slateRangeFromPoint(event.clientX, event.clientY);
|
|
355
|
-
|
|
479
|
+
const clickedRange = pendingClickRangeRef.current;
|
|
480
|
+
const domSelection = window.getSelection();
|
|
481
|
+
if (event.button === 0 &&
|
|
482
|
+
!event.shiftKey &&
|
|
483
|
+
!event.ctrlKey &&
|
|
484
|
+
!event.metaKey &&
|
|
485
|
+
!event.altKey &&
|
|
486
|
+
clickedRange &&
|
|
487
|
+
domSelection &&
|
|
488
|
+
!domSelection.isCollapsed) {
|
|
489
|
+
const selectedRange = ReactEditor.toSlateRange(editor, domSelection, {
|
|
490
|
+
exactMatch: false,
|
|
491
|
+
suppressThrow: true,
|
|
492
|
+
});
|
|
493
|
+
if (selectedRange &&
|
|
494
|
+
Range.includes(selectedRange, clickedRange.anchor)) {
|
|
495
|
+
pendingSelectionCollapseRef.current = {
|
|
496
|
+
range: clickedRange,
|
|
497
|
+
x: event.clientX,
|
|
498
|
+
y: event.clientY,
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}, [editor, slateRangeFromPoint]);
|
|
356
503
|
const selectPendingClickRangeIfStaleCollapsed = useCallback(() => {
|
|
357
504
|
const clickedRange = pendingClickRangeRef.current;
|
|
358
505
|
const currentSelection = editor.selection;
|
|
@@ -383,60 +530,6 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
383
530
|
return false;
|
|
384
531
|
}
|
|
385
532
|
}, [editor]);
|
|
386
|
-
// Re-focus the editor after the toolbar mounts and put the caret back where
|
|
387
|
-
// the user clicked. If Slate kept a selection (e.g. a drag-select), trust it
|
|
388
|
-
// and leave it alone; only fall back to the captured click point - or the end
|
|
389
|
-
// of the content - when the selection was lost.
|
|
390
|
-
const restoreClickedCaret = useCallback(() => {
|
|
391
|
-
if (selectPendingClickRangeIfStaleCollapsed()) {
|
|
392
|
-
return;
|
|
393
|
-
}
|
|
394
|
-
// An expanded DOM selection (double-click word selection, drag-select)
|
|
395
|
-
// is newer than Slate's internal state — don't replace it with a caret.
|
|
396
|
-
const domSelection = window.getSelection();
|
|
397
|
-
if (domSelection && !domSelection.isCollapsed) {
|
|
398
|
-
return;
|
|
399
|
-
}
|
|
400
|
-
if (editor.selection) {
|
|
401
|
-
try {
|
|
402
|
-
ReactEditor.focus(editor);
|
|
403
|
-
}
|
|
404
|
-
catch {
|
|
405
|
-
// Silently fail if editor is not ready
|
|
406
|
-
}
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
const clickedRange = pendingClickRangeRef.current;
|
|
410
|
-
pendingClickRangeRef.current = null;
|
|
411
|
-
try {
|
|
412
|
-
ReactEditor.focus(editor);
|
|
413
|
-
if (clickedRange) {
|
|
414
|
-
Transforms.select(editor, clickedRange);
|
|
415
|
-
}
|
|
416
|
-
else if (editor.children.length > 0) {
|
|
417
|
-
Transforms.select(editor, Editor.end(editor, []));
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
catch {
|
|
421
|
-
// Silently fail - focus is set, Slate will place the caret on keystroke
|
|
422
|
-
}
|
|
423
|
-
}, [editor, selectPendingClickRangeIfStaleCollapsed]);
|
|
424
|
-
// Restore focus after toolbar appears (only when user-initiated via pendingFocusRestoreRef)
|
|
425
|
-
useEffect(() => {
|
|
426
|
-
const wasShowingControls = previousShowControlsRef.current;
|
|
427
|
-
previousShowControlsRef.current = showControls;
|
|
428
|
-
// If showControls just became true and we have a pending focus restore
|
|
429
|
-
if (showControls &&
|
|
430
|
-
!wasShowingControls &&
|
|
431
|
-
pendingFocusRestoreRef.current) {
|
|
432
|
-
pendingFocusRestoreRef.current = false;
|
|
433
|
-
// Use a short timeout to let the toolbar render complete
|
|
434
|
-
const timeoutId = setTimeout(() => {
|
|
435
|
-
restoreClickedCaret();
|
|
436
|
-
}, 50);
|
|
437
|
-
return () => clearTimeout(timeoutId);
|
|
438
|
-
}
|
|
439
|
-
}, [showControls, editor, restoreClickedCaret]);
|
|
440
533
|
// Update editor when value changes from outside
|
|
441
534
|
useEffect(() => {
|
|
442
535
|
// Skip if this is an internal change (from our own onChange)
|
|
@@ -460,6 +553,8 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
460
553
|
editor.children = newChildren;
|
|
461
554
|
// Normalize the editor to ensure consistency
|
|
462
555
|
Editor.normalize(editor, { force: true });
|
|
556
|
+
lastSpellChildrenRef.current = editor.children;
|
|
557
|
+
setSpellText(buildSpellCheckText(editor.children).text);
|
|
463
558
|
// Restore selection if it was valid, otherwise set to end
|
|
464
559
|
if (currentSelection &&
|
|
465
560
|
Editor.hasPath(editor, currentSelection.anchor.path)) {
|
|
@@ -485,6 +580,12 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
485
580
|
}, [editor, slateValue, value]);
|
|
486
581
|
// Handle value changes with proper Slate patterns
|
|
487
582
|
const handleChange = useCallback((newValue) => {
|
|
583
|
+
// Slate calls onChange for selection changes too; only rebuild the
|
|
584
|
+
// spell text when the content actually changed.
|
|
585
|
+
if (newValue !== lastSpellChildrenRef.current) {
|
|
586
|
+
lastSpellChildrenRef.current = newValue;
|
|
587
|
+
setSpellText(buildSpellCheckText(newValue).text);
|
|
588
|
+
}
|
|
488
589
|
// If this change was caused by applying an external `value` prop (and normalization),
|
|
489
590
|
// do not echo it back to the parent.
|
|
490
591
|
if (isApplyingExternalValueRef.current) {
|
|
@@ -539,7 +640,9 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
539
640
|
const domRange = domSelection.getRangeAt(0);
|
|
540
641
|
if (!editableEl.contains(domRange.commonAncestorContainer))
|
|
541
642
|
return null;
|
|
542
|
-
|
|
643
|
+
// A DOM Range is always ordered start-to-end. Pass the Selection so
|
|
644
|
+
// backwards drags retain their anchor/focus when extended by keyboard.
|
|
645
|
+
const slateRange = ReactEditor.toSlateRange(editor, domSelection, {
|
|
543
646
|
exactMatch: false,
|
|
544
647
|
suppressThrow: true,
|
|
545
648
|
});
|
|
@@ -603,7 +706,9 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
603
706
|
// Memoize option handlers to prevent creating new functions on every render
|
|
604
707
|
const optionHandlers = useMemo(() => {
|
|
605
708
|
const handlers = {};
|
|
606
|
-
|
|
709
|
+
// Shared toolbar click handling: restore the selection, run the command,
|
|
710
|
+
// remember an expanded selection for the next toolbar click.
|
|
711
|
+
const runToolbarCommand = (editor, event, command) => {
|
|
607
712
|
event.preventDefault();
|
|
608
713
|
// A toolbar click is an explicit user edit. It can arrive immediately
|
|
609
714
|
// after a new value is synchronized into Slate, before the deferred
|
|
@@ -616,9 +721,21 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
616
721
|
if (!editor.selection && editor.children.length > 0) {
|
|
617
722
|
Transforms.select(editor, Editor.end(editor, []));
|
|
618
723
|
}
|
|
724
|
+
if (command() === false) {
|
|
725
|
+
return;
|
|
726
|
+
}
|
|
727
|
+
if (editor.selection && !Range.isCollapsed(editor.selection)) {
|
|
728
|
+
lastExpandedSelectionRef.current = {
|
|
729
|
+
anchor: { ...editor.selection.anchor },
|
|
730
|
+
focus: { ...editor.selection.focus },
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
// Returns false when the option cannot run on the current selection
|
|
735
|
+
const applyOption = (editor, option) => {
|
|
619
736
|
if (option.type === "link" &&
|
|
620
737
|
(!editor.selection || Range.isCollapsed(editor.selection))) {
|
|
621
|
-
return;
|
|
738
|
+
return false;
|
|
622
739
|
}
|
|
623
740
|
switch (option.type) {
|
|
624
741
|
case "mark":
|
|
@@ -643,16 +760,16 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
643
760
|
editor.insertHorizontalRule();
|
|
644
761
|
}
|
|
645
762
|
break;
|
|
763
|
+
case "class":
|
|
764
|
+
// Applied through the per-class handlers below
|
|
765
|
+
break;
|
|
646
766
|
default:
|
|
647
767
|
console.warn(`Unhandled option type: ${option.type}`);
|
|
648
768
|
}
|
|
649
|
-
if (editor.selection && !Range.isCollapsed(editor.selection)) {
|
|
650
|
-
lastExpandedSelectionRef.current = {
|
|
651
|
-
anchor: { ...editor.selection.anchor },
|
|
652
|
-
focus: { ...editor.selection.focus },
|
|
653
|
-
};
|
|
654
|
-
}
|
|
655
769
|
};
|
|
770
|
+
const handleOptionSelect = (option) => (editor, event) => runToolbarCommand(editor, event, () => applyOption(editor, option));
|
|
771
|
+
// Classes from the profile's Classes folder (ApplyClass dropdown)
|
|
772
|
+
const handleCssClassSelect = (cssClass) => (editor, event) => runToolbarCommand(editor, event, () => editor.applyCssClass(cssClass, editorProfile.classes ?? []));
|
|
656
773
|
// Pre-create handlers for all possible options
|
|
657
774
|
editorProfile.toolbar.groups.forEach((group) => {
|
|
658
775
|
group.options.forEach((option) => {
|
|
@@ -660,10 +777,16 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
660
777
|
handlers[key] = handleOptionSelect(option);
|
|
661
778
|
});
|
|
662
779
|
});
|
|
780
|
+
handlers[CSS_CLASS_NONE_KEY] = handleCssClassSelect(null);
|
|
781
|
+
(editorProfile.classes ?? []).forEach((cssClass, index) => {
|
|
782
|
+
handlers[`${CSS_CLASS_KEY_PREFIX}${index}`] =
|
|
783
|
+
handleCssClassSelect(cssClass);
|
|
784
|
+
});
|
|
663
785
|
return handlers;
|
|
664
786
|
}, [
|
|
665
787
|
editor,
|
|
666
788
|
editorProfile.toolbar.groups,
|
|
789
|
+
editorProfile.classes,
|
|
667
790
|
handleLinkButtonClick,
|
|
668
791
|
restoreLastExpandedSelection,
|
|
669
792
|
syncDomSelectionToEditor,
|
|
@@ -694,7 +817,7 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
694
817
|
const blockConfig = SLATE_BLOCKS[option.id];
|
|
695
818
|
return {
|
|
696
819
|
id: option.id,
|
|
697
|
-
label: blockConfig.label,
|
|
820
|
+
label: option.label || blockConfig.label,
|
|
698
821
|
icon: blockConfig.icon,
|
|
699
822
|
isActive: (editor) => editor.isBlockActive(option.id),
|
|
700
823
|
toggle: optionHandlers[handlerKey],
|
|
@@ -798,76 +921,102 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
798
921
|
}
|
|
799
922
|
return subGroups;
|
|
800
923
|
}, []);
|
|
801
|
-
//
|
|
924
|
+
// "Style" dropdown: "No style" plus the profile's Classes folder entries
|
|
925
|
+
const cssClassDropdownOptions = useMemo(() => {
|
|
926
|
+
const classes = editorProfile.classes ?? [];
|
|
927
|
+
const noneHandler = optionHandlers[CSS_CLASS_NONE_KEY];
|
|
928
|
+
if (classes.length === 0 || !noneHandler)
|
|
929
|
+
return [];
|
|
930
|
+
const options = [
|
|
931
|
+
{
|
|
932
|
+
value: null,
|
|
933
|
+
label: "No style",
|
|
934
|
+
isActive: (editor) => !editor.getActiveCssClass(classes),
|
|
935
|
+
onSelect: noneHandler,
|
|
936
|
+
},
|
|
937
|
+
];
|
|
938
|
+
classes.forEach((cssClass, index) => {
|
|
939
|
+
const handler = optionHandlers[`${CSS_CLASS_KEY_PREFIX}${index}`];
|
|
940
|
+
if (!handler)
|
|
941
|
+
return;
|
|
942
|
+
options.push({
|
|
943
|
+
value: cssClass,
|
|
944
|
+
label: cssClass.label,
|
|
945
|
+
isActive: (editor) => editor.getActiveCssClass(classes) === cssClass,
|
|
946
|
+
onSelect: handler,
|
|
947
|
+
});
|
|
948
|
+
});
|
|
949
|
+
return options;
|
|
950
|
+
}, [editorProfile.classes, optionHandlers]);
|
|
951
|
+
// Render a profile group as toolbar segments: one per run of buttons
|
|
952
|
+
// between dividers, or a single dropdown. The toolbar separates segments.
|
|
802
953
|
const renderToolbarGroup = useCallback((group, index) => {
|
|
954
|
+
if (group.options.some((option) => option.type === "class")) {
|
|
955
|
+
if (cssClassDropdownOptions.length === 0)
|
|
956
|
+
return [];
|
|
957
|
+
return [
|
|
958
|
+
_jsx("div", { className: "toolbar-dropdown-container", title: "Apply CSS class", children: _jsx(MemoizedEditorDropdown, { options: cssClassDropdownOptions, editor: editor, buttonStyle: {
|
|
959
|
+
padding: "4px 8px",
|
|
960
|
+
margin: "0",
|
|
961
|
+
background: "transparent",
|
|
962
|
+
border: "none",
|
|
963
|
+
borderRadius: "3px",
|
|
964
|
+
cursor: "pointer",
|
|
965
|
+
} }) }, `group-${group.id || index}`),
|
|
966
|
+
];
|
|
967
|
+
}
|
|
803
968
|
const validOptions = group.options.filter((option) => getOption(option) || option.type === "divider");
|
|
804
969
|
if (validOptions.length === 0)
|
|
805
|
-
return
|
|
970
|
+
return [];
|
|
806
971
|
// Skip rendering dropdown groups with only one option
|
|
807
972
|
if (group.display === "dropdown" && validOptions.length === 1)
|
|
808
|
-
return
|
|
809
|
-
const
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
973
|
+
return [];
|
|
974
|
+
const groupKey = `group-${group.id || index}`;
|
|
975
|
+
if (group.display === "buttons") {
|
|
976
|
+
return splitOptionsByDividers(validOptions).map((subGroup, subGroupIndex) => (_jsx("div", { className: "toolbar-button-group", children: subGroup.map((option) => {
|
|
977
|
+
const optionObj = getOption(option);
|
|
978
|
+
const handler = buttonHandlers[`${option.type}-${option.id}`];
|
|
979
|
+
if (!optionObj || !handler)
|
|
980
|
+
return null;
|
|
981
|
+
return (_jsx(ToolbarButtonWrapper, { option: option, icon: optionObj.icon, onMouseDown: handler }, `${option.type}-${option.id}`));
|
|
982
|
+
}) }, `${groupKey}-${subGroupIndex}`)));
|
|
983
|
+
}
|
|
984
|
+
const dropdownOptions = createDropdownOptions(validOptions);
|
|
985
|
+
const blockOptions = validOptions.filter((option) => option.type === "block");
|
|
986
|
+
// If there's only one block option, render it as a disabled-style button
|
|
987
|
+
if (blockOptions.length === 1) {
|
|
988
|
+
const singleOption = dropdownOptions.find((opt) => blockOptions.some((blockOpt) => blockOpt.type === "block" && getOption(blockOpt) === opt.value));
|
|
989
|
+
return [
|
|
990
|
+
_jsx("div", { className: "toolbar-dropdown-container", children: _jsx("button", { className: "toolbar-dropdown-button", disabled: true, children: group.label ? (_jsxs(_Fragment, { children: [_jsxs("span", { className: "toolbar-dropdown-content", children: [group.label, ": ", singleOption?.label] }), _jsx("span", { className: "toolbar-dropdown-arrow", children: "\u25BC" })] })) : group.showIconsOnly ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "toolbar-dropdown-icon", children: singleOption?.icon }), _jsx("span", { className: "toolbar-dropdown-arrow", children: "\u25BC" })] })) : (_jsxs(_Fragment, { children: [_jsxs("span", { className: "toolbar-dropdown-icon", children: [singleOption?.icon && (_jsx("span", { className: "toolbar-dropdown-icon", children: singleOption.icon })), _jsx("span", { className: "toolbar-dropdown-content", children: singleOption?.label })] }), _jsx("span", { className: "toolbar-dropdown-arrow", children: "\u25BC" })] })) }) }, groupKey),
|
|
991
|
+
];
|
|
992
|
+
}
|
|
993
|
+
const isActive = dropdownOptions.some((option) => option.isActive(editor));
|
|
994
|
+
const buttonStyle = {
|
|
995
|
+
padding: group.showIconsOnly ? "4px" : "4px 8px",
|
|
996
|
+
margin: "0",
|
|
997
|
+
background: isActive ? "var(--color-neutral-grey-10)" : "transparent",
|
|
998
|
+
border: "none",
|
|
999
|
+
borderRadius: "3px",
|
|
1000
|
+
cursor: "pointer",
|
|
814
1001
|
};
|
|
815
|
-
return
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
return subGroups.map((subGroup, subGroupIndex) => (_jsx("div", { className: "toolbar-button-group", children: subGroup.map((option) => {
|
|
819
|
-
const optionObj = getOption(option);
|
|
820
|
-
const handler = buttonHandlers[`${option.type}-${option.id}`];
|
|
821
|
-
if (!optionObj || !handler)
|
|
822
|
-
return null;
|
|
823
|
-
return (_jsx(ToolbarButtonWrapper, { option: option, icon: optionObj.icon, onMouseDown: handler }, `${option.type}-${option.id}`));
|
|
824
|
-
}) }, `subgroup-${subGroupIndex}`)));
|
|
825
|
-
})()
|
|
826
|
-
: (() => {
|
|
827
|
-
const dropdownOptions = createDropdownOptions(validOptions);
|
|
828
|
-
const blockOptions = validOptions.filter((option) => option.type === "block");
|
|
829
|
-
// If there's only one block option, render it as a disabled-style button
|
|
830
|
-
if (blockOptions.length === 1) {
|
|
831
|
-
const singleOption = dropdownOptions.find((opt) => blockOptions.some((blockOpt) => blockOpt.type === "block" &&
|
|
832
|
-
getOption(blockOpt) === opt.value));
|
|
833
|
-
return (_jsx("div", { className: "toolbar-dropdown-container", children: _jsx("button", { className: "toolbar-dropdown-button", disabled: true, children: group.label ? (_jsxs(_Fragment, { children: [_jsxs("span", { className: "toolbar-dropdown-content", children: [group.label, ": ", singleOption?.label] }), _jsx("span", { className: "toolbar-dropdown-arrow", children: "\u25BC" })] })) : group.showIconsOnly ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "toolbar-dropdown-icon", children: singleOption?.icon }), _jsx("span", { className: "toolbar-dropdown-arrow", children: "\u25BC" })] })) : (_jsxs(_Fragment, { children: [_jsxs("span", { className: "toolbar-dropdown-icon", children: [singleOption?.icon && (_jsx("span", { className: "toolbar-dropdown-icon", children: singleOption.icon })), _jsx("span", { className: "toolbar-dropdown-content", children: singleOption?.label })] }), _jsx("span", { className: "toolbar-dropdown-arrow", children: "\u25BC" })] })) }) }));
|
|
834
|
-
}
|
|
835
|
-
// Multiple options - render normally wrapped in grey container
|
|
836
|
-
const isActive = dropdownOptions.some((option) => option.isActive(editor));
|
|
837
|
-
const buttonStyle = {
|
|
838
|
-
padding: "5px 10px",
|
|
839
|
-
margin: "0",
|
|
840
|
-
background: isActive ? "var(--color-white)" : "transparent",
|
|
841
|
-
border: "none",
|
|
842
|
-
borderRadius: "3px",
|
|
843
|
-
cursor: "pointer",
|
|
844
|
-
boxShadow: isActive
|
|
845
|
-
? "0 1px 2px color-mix(in srgb, var(--color-neutral-grey-100) 10%, transparent)"
|
|
846
|
-
: "none",
|
|
847
|
-
};
|
|
848
|
-
return (_jsx("div", { className: "toolbar-dropdown-container", children: _jsx(MemoizedEditorDropdown, { options: dropdownOptions, editor: editor, label: group.label, buttonStyle: buttonStyle }) }));
|
|
849
|
-
})() }, `group-${group.id || index}`));
|
|
1002
|
+
return [
|
|
1003
|
+
_jsx("div", { className: "toolbar-dropdown-container", children: _jsx(MemoizedEditorDropdown, { options: dropdownOptions, editor: editor, label: group.label, buttonStyle: buttonStyle, iconOnly: group.showIconsOnly }) }, groupKey),
|
|
1004
|
+
];
|
|
850
1005
|
}, [
|
|
851
1006
|
getOption,
|
|
852
1007
|
splitOptionsByDividers,
|
|
853
1008
|
createDropdownOptions,
|
|
1009
|
+
cssClassDropdownOptions,
|
|
854
1010
|
optionHandlers,
|
|
855
1011
|
buttonHandlers,
|
|
856
1012
|
editor,
|
|
857
1013
|
]);
|
|
858
|
-
//
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
acc[row] = [];
|
|
865
|
-
acc[row].push(group);
|
|
866
|
-
return acc;
|
|
867
|
-
}, {});
|
|
868
|
-
// Return sorted entries for consistent rendering
|
|
869
|
-
return Object.entries(groupsByRow).sort(([a], [b]) => parseInt(a) - parseInt(b));
|
|
870
|
-
}, [editorProfile.toolbar.groups]);
|
|
1014
|
+
// Profile rows (Sitecore's toolbars) only order the groups; the toolbar
|
|
1015
|
+
// itself is one line that wraps when the field is too narrow.
|
|
1016
|
+
const orderedToolbarGroups = useMemo(() => editorProfile.toolbar.groups
|
|
1017
|
+
.map((group, index) => ({ group, row: group.row ?? index }))
|
|
1018
|
+
.sort((a, b) => a.row - b.row)
|
|
1019
|
+
.map(({ group }) => group), [editorProfile.toolbar.groups]);
|
|
871
1020
|
const editLink = useCallback((element) => {
|
|
872
1021
|
const linkType = element.link?.type || "external";
|
|
873
1022
|
let linkData;
|
|
@@ -960,43 +1109,77 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
960
1109
|
}
|
|
961
1110
|
baseKeyboardHandler(event);
|
|
962
1111
|
}, [baseKeyboardHandler, handleLinkButtonClick]);
|
|
963
|
-
// Handle focus - restore focus if toolbar just appeared and stole it
|
|
964
1112
|
const handleFocus = useCallback(() => {
|
|
965
|
-
// If controls are not showing yet, mark that we need to restore focus after they appear
|
|
966
|
-
if (!showControls && !readOnly) {
|
|
967
|
-
pendingFocusRestoreRef.current = true;
|
|
968
|
-
}
|
|
969
|
-
else if (showControls && !readOnly) {
|
|
970
|
-
// Controls are already showing - user clicked but toolbar render may have stolen focus
|
|
971
|
-
// Use setTimeout to allow editor to fully initialize after re-render
|
|
972
|
-
setTimeout(() => {
|
|
973
|
-
restoreClickedCaret();
|
|
974
|
-
}, 100);
|
|
975
|
-
}
|
|
976
1113
|
selectPendingClickRangeIfStaleCollapsed();
|
|
977
|
-
// Call the original onFocus handler
|
|
978
1114
|
onFocus?.();
|
|
979
|
-
}, [
|
|
980
|
-
showControls,
|
|
981
|
-
readOnly,
|
|
982
|
-
onFocus,
|
|
983
|
-
restoreClickedCaret,
|
|
984
|
-
selectPendingClickRangeIfStaleCollapsed,
|
|
985
|
-
]);
|
|
1115
|
+
}, [onFocus, selectPendingClickRangeIfStaleCollapsed]);
|
|
986
1116
|
// Handle blur
|
|
987
1117
|
const handleBlur = useCallback(() => {
|
|
988
1118
|
onBlur?.();
|
|
989
1119
|
}, [onBlur]);
|
|
990
|
-
const handleMouseUp = useCallback(() => {
|
|
991
|
-
syncDomSelectionToEditor();
|
|
1120
|
+
const handleMouseUp = useCallback((event) => {
|
|
1121
|
+
const nativeRange = syncDomSelectionToEditor();
|
|
992
1122
|
onMouseUp?.();
|
|
993
|
-
|
|
1123
|
+
const drag = pendingCharacterDragRef.current;
|
|
1124
|
+
pendingCharacterDragRef.current = null;
|
|
1125
|
+
if (drag?.moved && nativeRange) {
|
|
1126
|
+
// Slate's throttled selection update can render between the final
|
|
1127
|
+
// mousemove and mouseup, restoring the penultimate native endpoint.
|
|
1128
|
+
// At gesture end the pointer is authoritative for character drags;
|
|
1129
|
+
// keep the native anchor (including backwards drags) and commit its
|
|
1130
|
+
// final focus after the parent's selection publication.
|
|
1131
|
+
const endpoint = slateRangeFromPoint(event.clientX, event.clientY);
|
|
1132
|
+
if (endpoint) {
|
|
1133
|
+
const finalRange = {
|
|
1134
|
+
anchor: nativeRange.anchor,
|
|
1135
|
+
focus: endpoint.focus,
|
|
1136
|
+
};
|
|
1137
|
+
Transforms.select(editor, finalRange);
|
|
1138
|
+
pendingClickRangeRef.current = null;
|
|
1139
|
+
lastExpandedSelectionRef.current = Range.isCollapsed(finalRange)
|
|
1140
|
+
? null
|
|
1141
|
+
: finalRange;
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
}, [editor, onMouseUp, slateRangeFromPoint, syncDomSelectionToEditor]);
|
|
1145
|
+
const handleMouseMove = useCallback((event) => {
|
|
1146
|
+
const drag = pendingCharacterDragRef.current;
|
|
1147
|
+
if (drag && (event.clientX !== drag.x || event.clientY !== drag.y)) {
|
|
1148
|
+
drag.moved = true;
|
|
1149
|
+
}
|
|
1150
|
+
const collapse = pendingSelectionCollapseRef.current;
|
|
1151
|
+
if (collapse &&
|
|
1152
|
+
(event.clientX !== collapse.x || event.clientY !== collapse.y)) {
|
|
1153
|
+
pendingSelectionCollapseRef.current = null;
|
|
1154
|
+
}
|
|
1155
|
+
}, []);
|
|
1156
|
+
const handleClick = useCallback((event) => {
|
|
1157
|
+
const collapse = pendingSelectionCollapseRef.current;
|
|
1158
|
+
pendingSelectionCollapseRef.current = null;
|
|
1159
|
+
// Chromium collapses a click inside highlighted text after mouseup.
|
|
1160
|
+
// A render caused by mouseup/focus can restore Slate's expanded range
|
|
1161
|
+
// before its throttled selection listener sees that native collapse.
|
|
1162
|
+
// Commit the captured point at click, after the gesture is complete.
|
|
1163
|
+
// Movement and multi-clicks retain their native expanded selection.
|
|
1164
|
+
if (collapse &&
|
|
1165
|
+
event.detail === 1 &&
|
|
1166
|
+
event.clientX === collapse.x &&
|
|
1167
|
+
event.clientY === collapse.y) {
|
|
1168
|
+
Transforms.select(editor, collapse.range);
|
|
1169
|
+
pendingClickRangeRef.current = null;
|
|
1170
|
+
lastExpandedSelectionRef.current = null;
|
|
1171
|
+
}
|
|
1172
|
+
}, [editor]);
|
|
994
1173
|
const handleDoubleClick = useCallback(() => {
|
|
995
1174
|
syncDomSelectionToEditor();
|
|
996
1175
|
}, [syncDomSelectionToEditor]);
|
|
997
1176
|
const handleKeyUp = useCallback(() => {
|
|
1177
|
+
// The parent publishes the range synchronously and may re-render us.
|
|
1178
|
+
// Commit native Shift+Arrow changes before that render can restore the
|
|
1179
|
+
// previous Slate selection over the new DOM selection.
|
|
1180
|
+
syncDomSelectionToEditor();
|
|
998
1181
|
onKeyUp?.();
|
|
999
|
-
}, [onKeyUp]);
|
|
1182
|
+
}, [onKeyUp, syncDomSelectionToEditor]);
|
|
1000
1183
|
// Calculate proper list numbering for ordered lists
|
|
1001
1184
|
const calculateListNumbers = useCallback((elements) => {
|
|
1002
1185
|
const numberMap = new Map();
|
|
@@ -1043,6 +1226,11 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
1043
1226
|
const style = {
|
|
1044
1227
|
textAlign: element.align || "left",
|
|
1045
1228
|
};
|
|
1229
|
+
// Content classes are styled by the site frontend; in the editor they
|
|
1230
|
+
// are only marked (applying them could clash with editor classes).
|
|
1231
|
+
const classAttributes = element.className
|
|
1232
|
+
? { "data-rte-class": element.className, title: element.className }
|
|
1233
|
+
: {};
|
|
1046
1234
|
if (element.type === "link") {
|
|
1047
1235
|
const isInternal = element.link?.type === "internal";
|
|
1048
1236
|
const url = isInternal
|
|
@@ -1066,7 +1254,7 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
1066
1254
|
// Find the element's index in the editor children to get the correct number
|
|
1067
1255
|
const elementIndex = editor.children.findIndex((child) => child === element);
|
|
1068
1256
|
const listNumber = listNumbers.get(`${elementIndex}`) || "";
|
|
1069
|
-
return (_jsxs("div", { ...attributes, style: listStyle, className: `slate-list-item slate-list-${listType}`, "data-indent": indent, "data-list-number": listNumber, children: [_jsx("span", { className: "slate-list-bullet" }), _jsx("div", { className: "slate-list-content", children: children })] }));
|
|
1257
|
+
return (_jsxs("div", { ...attributes, style: listStyle, className: `slate-list-item slate-list-${listType}`, ...classAttributes, "data-indent": indent, "data-list-number": listNumber, children: [_jsx("span", { className: "slate-list-bullet" }), _jsx("div", { className: "slate-list-content", children: children })] }));
|
|
1070
1258
|
}
|
|
1071
1259
|
if (element.type === "horizontal-rule") {
|
|
1072
1260
|
return (_jsxs("div", { ...attributes, contentEditable: false, style: { ...style, userSelect: "none" }, children: [children, _jsx("hr", { style: {
|
|
@@ -1091,15 +1279,17 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
1091
1279
|
// For standard blocks, use the appropriate HTML tag
|
|
1092
1280
|
if (blockConfig) {
|
|
1093
1281
|
const tagName = blockConfig.htmlTag;
|
|
1094
|
-
return React.createElement(tagName, { ...attributes, style }, children);
|
|
1282
|
+
return React.createElement(tagName, { ...attributes, ...classAttributes, style }, children);
|
|
1095
1283
|
}
|
|
1096
1284
|
// Default fallback to paragraph
|
|
1097
|
-
return (_jsx("p", { ...attributes, style: style, children: children }));
|
|
1285
|
+
return (_jsx("p", { ...attributes, ...classAttributes, style: style, children: children }));
|
|
1098
1286
|
}, [readOnly, editLink, editor.children, listNumbers]);
|
|
1099
1287
|
// Memoize renderLeaf to prevent unnecessary re-renders as per Slate performance docs
|
|
1100
1288
|
const renderLeaf = useCallback(({ attributes, children, leaf }) => {
|
|
1101
1289
|
const changed = !!leaf[CHANGED_TEXT_LEAF];
|
|
1102
|
-
|
|
1290
|
+
const misspelled = !!leaf[MISSPELLED_LEAF];
|
|
1291
|
+
let el = (_jsx("span", { ...attributes, className: cn(changed && agentAddedTextClass, misspelled && misspelledTextClass) ||
|
|
1292
|
+
undefined, "data-changed-text": changed ? "true" : undefined, "data-misspelled": misspelled ? "true" : undefined, "data-rte-class": leaf.className || undefined, title: leaf.className || undefined, children: children }));
|
|
1103
1293
|
// Apply marks using the built-in SLATE_MARKS configuration
|
|
1104
1294
|
// Iterate over all possible marks to preserve existing formatting
|
|
1105
1295
|
Object.keys(SLATE_MARKS).forEach((markId) => {
|
|
@@ -1122,11 +1312,20 @@ export const ReactSlate = forwardRef((props, ref) => {
|
|
|
1122
1312
|
}, []);
|
|
1123
1313
|
// Memoize renderPlaceholder for consistency
|
|
1124
1314
|
const renderPlaceholder = useCallback(({ attributes, children }) => (_jsx("span", { ...attributes, className: "text-neutral-grey-50 p-2", children: children })), []);
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1315
|
+
const toolbarSegments = [
|
|
1316
|
+
...orderedToolbarGroups.flatMap((group, index) => renderToolbarGroup(group, index)),
|
|
1317
|
+
_jsx("div", { className: "toolbar-button-group", children: _jsx(ToolbarButton, { icon: getRichTextStripFormattingIcon(), active: false, onMouseDown: handleStripFormattingClick, type: "strip-formatting" }) }, "strip-formatting"),
|
|
1318
|
+
];
|
|
1319
|
+
return (_jsxs("div", { className: `slate-editor ${props.className && props.className}`, children: [_jsx(Slate, { editor: editor, initialValue: initialSlateValue, onChange: handleChange, children: _jsxs("div", { className: cn("relative", fieldBoxClassName, fieldFocusWithinClassName, "focus-shadow"), children: [!readOnly && (_jsx("div", { role: "toolbar", "aria-label": "Formatting", "data-testid": "rte-toolbar", className: "rte-toolbar border-neutral-grey-15 bg-neutral-grey-5 flex flex-wrap items-center gap-1 rounded-t-[5px] border-b p-1", children: toolbarSegments.map((segment, index) => (_jsxs(Fragment, { children: [index > 0 && (_jsx("span", { "aria-hidden": "true", className: "toolbar-separator" })), segment] }, segment.key))) })), _jsx(Editable, { "aria-label": props.ariaLabel || "Rich text", "data-testid": "rte-editable", className: cn("min-h-10 px-3 py-2.5 focus:outline-none", "slate-editable",
|
|
1320
|
+
// MainLayout disables text selection app-wide (select-none);
|
|
1321
|
+
// contenteditable content must re-enable it for mouse selection
|
|
1322
|
+
// (double-click word select, drag select) to work.
|
|
1323
|
+
"select-text"), decorate: decorate, readOnly: readOnly, spellCheck: false, renderPlaceholder: renderPlaceholder, onFocus: handleFocus, onBlur: handleBlur, onBeforeInputCapture: markUserInput, onInputCapture: markUserInput, onPasteCapture: markUserInput, onMouseDown: handleMouseDown, onClick: handleClick, onMouseMove: handleMouseMove, onDragStart: () => {
|
|
1324
|
+
// Moving selected content is a native drag-and-drop operation,
|
|
1325
|
+
// not a character-selection gesture.
|
|
1326
|
+
pendingCharacterDragRef.current = null;
|
|
1327
|
+
pendingSelectionCollapseRef.current = null;
|
|
1328
|
+
}, onMouseUp: handleMouseUp, onDoubleClick: handleDoubleClick, onKeyUp: handleKeyUp, onContextMenu: onContextMenu, onKeyDown: handleKeyDown, renderElement: renderElement, renderLeaf: renderLeaf }), _jsx(ChangedTextOutline, { getChangeHighlight: getChangeHighlight })] }) }), showLinkDialog && selectedLink && (_jsx(LinkEditorDialog, { linkValue: selectedLink, onOk: handleLinkUpdate, onCancel: () => {
|
|
1130
1329
|
setShowLinkDialog(false);
|
|
1131
1330
|
setSelectedLink(null);
|
|
1132
1331
|
setLinkDialogCallback(null);
|