@parhelia/core 0.4.12825 → 0.4.12872
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 +43 -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/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/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/agentSessionState.js +8 -1
- package/dist/editor/ai/terminal/agentSessionState.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentActivityOverviewPanel.js +2 -2
- 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 +22 -15
- 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/AgentReadOnlyNotice.js +1 -1
- package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.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 +32 -15
- 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/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 +3 -1
- 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/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/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.js +11 -2
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js +3 -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 +63 -0
- package/dist/editor/bridge/protocol.js +8 -1
- package/dist/editor/bridge/protocol.js.map +1 -1
- package/dist/editor/client/EditorShell.js +331 -122
- 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 +66 -3
- 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 +100 -29
- 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/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 +120 -34
- 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 +365 -172
- 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 +8 -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/findReplaceTargets.d.ts +2 -0
- package/dist/editor/find-replace/findReplaceTargets.js +2 -2
- package/dist/editor/find-replace/findReplaceTargets.js.map +1 -1
- 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 +5 -3
- 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 +8 -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/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/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 +1 -1
- package/dist/editor/menubar/toolbar-sections/index.js +1 -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 +6 -3
- 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 +1 -1
- package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js +7 -4
- package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js.map +1 -1
- 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 +29 -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 -388
- 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 +133 -10
- 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 +9 -3
- package/dist/editor/page-viewer/MiniMap.js +50 -60
- 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 +625 -228
- 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/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/canvasScrollRestore.d.ts +28 -0
- package/dist/editor/page-viewer/canvasScrollRestore.js +31 -0
- package/dist/editor/page-viewer/canvasScrollRestore.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.js +5 -2
- package/dist/editor/page-viewer/minimapViewport.js.map +1 -1
- 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 +130 -24
- package/dist/editor/reviews/CommentEditor.js.map +1 -1
- 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/SuggestionDisplayPopover.d.ts +1 -3
- package/dist/editor/reviews/SuggestionDisplayPopover.js +2 -7
- package/dist/editor/reviews/SuggestionDisplayPopover.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/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 +9 -1
- package/dist/editor/reviews/useCommentImagePaste.js +68 -4
- 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/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/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/JavaScriptToolConfigPanel.js +1 -1
- package/dist/editor/settings/panels/JavaScriptToolConfigPanel.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 +32 -56
- 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 +2 -0
- 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 +1 -1
- package/dist/editor/sidebar/liveComponentThumbnails.js +19 -14
- 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/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/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 +38 -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 -6
- package/dist/index.js +9 -5
- package/dist/index.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 +4 -3
- package/dist/splash-screen/ModernSplashScreen.js.map +1 -1
- package/dist/splash-screen/RecentPages.js +5 -2
- package/dist/splash-screen/RecentPages.js.map +1 -1
- package/dist/task-board/TaskBoardWorkspace.js +49 -12
- package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
- package/dist/task-board/components/GoalsMatrix.js +1 -1
- package/dist/task-board/components/GoalsMatrix.js.map +1 -1
- package/dist/task-board/components/IssuePanel.js +4 -4
- package/dist/task-board/components/IssuePanel.js.map +1 -1
- 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 +1 -1
- package/dist/task-board/components/ProjectGoalsPanel.js.map +1 -1
- package/dist/task-board/components/TaskDetailPanel.js +18 -8
- 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/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 +0 -7
- package/dist/task-board/utils/projectDashboardModel.js +7 -1
- 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 +17 -0
- package/dist/editor/page-editor-chrome/bridgeLinkValue.d.ts +0 -10
- package/dist/editor/page-editor-chrome/bridgeLinkValue.js +0 -55
- package/dist/editor/page-editor-chrome/bridgeLinkValue.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emojiData.generated.js","sourceRoot":"","sources":["../../../src/components/emoji/emojiData.generated.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,yEAAyE;AACzE,2EAA2E;AAC3E,4DAA4D;AAC5D,oBAAoB;AAEpB,MAAM,CAAC,MAAM,iBAAiB,GAAG,wCAAwC,CAAC;AAE1E,kBAAkB;AAClB,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA60DzB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface EmojiEntry {
|
|
2
|
+
emoji: string;
|
|
3
|
+
/** CLDR name, e.g. "thumbs up". */
|
|
4
|
+
label: string;
|
|
5
|
+
/** The `:shortcode:` the autocomplete offers, e.g. "+1". */
|
|
6
|
+
shortcode: string;
|
|
7
|
+
/** Other shortcodes and CLDR keywords, lower case. */
|
|
8
|
+
keywords: string[];
|
|
9
|
+
/** emojibase group id; see `EMOJI_GROUPS`. */
|
|
10
|
+
group: number;
|
|
11
|
+
/** The five skin-tone variants, light to dark, when Twemoji has them all. */
|
|
12
|
+
skins: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface EmojiGroup {
|
|
15
|
+
id: number;
|
|
16
|
+
label: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const EMOJI_GROUPS: EmojiGroup[];
|
|
19
|
+
/** Parses the table written by `scripts/generate-emoji-data.mjs`. */
|
|
20
|
+
export declare function parseEmojiData(data: string): EmojiEntry[];
|
|
21
|
+
/** The emoji table, loaded on first use so it stays out of the main bundle. */
|
|
22
|
+
export declare function loadEmojiIndex(): Promise<EmojiEntry[]>;
|
|
23
|
+
export declare function getLoadedEmojiIndex(): EmojiEntry[] | null;
|
|
24
|
+
export declare function useEmojiIndex(): EmojiEntry[] | null;
|
|
25
|
+
/** Ranks emoji for a search box or `:shortcode:` query; empty query → none. */
|
|
26
|
+
export declare function searchEmoji(entries: EmojiEntry[], query: string, limit?: number): EmojiEntry[];
|
|
27
|
+
export interface ActiveEmojiShortcode {
|
|
28
|
+
/** Index of the opening colon. */
|
|
29
|
+
start: number;
|
|
30
|
+
/** The caret position the query runs up to. */
|
|
31
|
+
end: number;
|
|
32
|
+
query: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The `:query` under the caret, when the colon starts a word: `:thu|` yields
|
|
36
|
+
* "thu"; `10:30` and `http://` do not count, and neither does a query shorter
|
|
37
|
+
* than two characters (so `:D` and `:)` stay emoticons).
|
|
38
|
+
*/
|
|
39
|
+
export declare function getActiveEmojiShortcode(text: string, selectionStart: number | null): ActiveEmojiShortcode | null;
|
|
40
|
+
export declare const SKIN_TONE_LABELS: string[];
|
|
41
|
+
/** `tone` 0 is the yellow default; 1–5 pick a variant when the emoji has one. */
|
|
42
|
+
export declare function withSkinTone(entry: EmojiEntry, tone: number): string;
|
|
43
|
+
export declare function getRecentEmoji(): string[];
|
|
44
|
+
export declare function rememberRecentEmoji(emoji: string): string[];
|
|
45
|
+
export declare function getSkinTonePreference(): number;
|
|
46
|
+
export declare function setSkinTonePreference(tone: number): void;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { localStorageService } from "../../editor/services/localStorageService";
|
|
3
|
+
export const EMOJI_GROUPS = [
|
|
4
|
+
{ id: 0, label: "Smileys & Emotion" },
|
|
5
|
+
{ id: 1, label: "People & Body" },
|
|
6
|
+
{ id: 3, label: "Animals & Nature" },
|
|
7
|
+
{ id: 4, label: "Food & Drink" },
|
|
8
|
+
{ id: 5, label: "Travel & Places" },
|
|
9
|
+
{ id: 6, label: "Activities" },
|
|
10
|
+
{ id: 7, label: "Objects" },
|
|
11
|
+
{ id: 8, label: "Symbols" },
|
|
12
|
+
{ id: 9, label: "Flags" },
|
|
13
|
+
];
|
|
14
|
+
/** Parses the table written by `scripts/generate-emoji-data.mjs`. */
|
|
15
|
+
export function parseEmojiData(data) {
|
|
16
|
+
const entries = [];
|
|
17
|
+
for (const line of data.split("\n")) {
|
|
18
|
+
if (!line)
|
|
19
|
+
continue;
|
|
20
|
+
const [emoji, label, shortcode, keywords, group, skins] = line.split("\t");
|
|
21
|
+
if (!emoji || !label || !shortcode || group === undefined)
|
|
22
|
+
continue;
|
|
23
|
+
entries.push({
|
|
24
|
+
emoji,
|
|
25
|
+
label,
|
|
26
|
+
shortcode,
|
|
27
|
+
keywords: keywords ? keywords.split(",") : [],
|
|
28
|
+
group: Number(group),
|
|
29
|
+
skins: skins ? skins.split(",") : [],
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return entries;
|
|
33
|
+
}
|
|
34
|
+
let loadedIndex = null;
|
|
35
|
+
let indexPromise = null;
|
|
36
|
+
/** The emoji table, loaded on first use so it stays out of the main bundle. */
|
|
37
|
+
export function loadEmojiIndex() {
|
|
38
|
+
if (!indexPromise) {
|
|
39
|
+
indexPromise = import("./emojiData.generated").then((module) => {
|
|
40
|
+
loadedIndex = parseEmojiData(module.EMOJI_DATA);
|
|
41
|
+
return loadedIndex;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return indexPromise;
|
|
45
|
+
}
|
|
46
|
+
export function getLoadedEmojiIndex() {
|
|
47
|
+
return loadedIndex;
|
|
48
|
+
}
|
|
49
|
+
export function useEmojiIndex() {
|
|
50
|
+
const [index, setIndex] = React.useState(loadedIndex);
|
|
51
|
+
React.useEffect(() => {
|
|
52
|
+
if (index)
|
|
53
|
+
return;
|
|
54
|
+
let cancelled = false;
|
|
55
|
+
loadEmojiIndex().then((entries) => {
|
|
56
|
+
if (!cancelled)
|
|
57
|
+
setIndex(entries);
|
|
58
|
+
});
|
|
59
|
+
return () => {
|
|
60
|
+
cancelled = true;
|
|
61
|
+
};
|
|
62
|
+
}, [index]);
|
|
63
|
+
return index;
|
|
64
|
+
}
|
|
65
|
+
function normalizeQuery(query) {
|
|
66
|
+
return query
|
|
67
|
+
.toLowerCase()
|
|
68
|
+
.split(/[\s_-]+/)
|
|
69
|
+
.map((token) => token.trim())
|
|
70
|
+
.filter(Boolean);
|
|
71
|
+
}
|
|
72
|
+
function scoreEntry(entry, query, tokens) {
|
|
73
|
+
const label = entry.label.toLowerCase();
|
|
74
|
+
if (entry.shortcode === query)
|
|
75
|
+
return 100;
|
|
76
|
+
if (label === query)
|
|
77
|
+
return 90;
|
|
78
|
+
if (entry.shortcode.startsWith(query))
|
|
79
|
+
return 80;
|
|
80
|
+
if (label.startsWith(query))
|
|
81
|
+
return 70;
|
|
82
|
+
const labelWords = label.split(/[\s:,()-]+/);
|
|
83
|
+
let score = 0;
|
|
84
|
+
for (const token of tokens) {
|
|
85
|
+
let best = 0;
|
|
86
|
+
if (labelWords.some((word) => word.startsWith(token)))
|
|
87
|
+
best = 40;
|
|
88
|
+
else if (entry.keywords.some((keyword) => keyword.startsWith(token)))
|
|
89
|
+
best = 30;
|
|
90
|
+
else if (label.includes(token))
|
|
91
|
+
best = 20;
|
|
92
|
+
else if (entry.keywords.some((keyword) => keyword.includes(token)))
|
|
93
|
+
best = 10;
|
|
94
|
+
if (best === 0)
|
|
95
|
+
return 0;
|
|
96
|
+
score += best;
|
|
97
|
+
}
|
|
98
|
+
return score;
|
|
99
|
+
}
|
|
100
|
+
/** Ranks emoji for a search box or `:shortcode:` query; empty query → none. */
|
|
101
|
+
export function searchEmoji(entries, query, limit = 50) {
|
|
102
|
+
const normalized = query.trim().toLowerCase();
|
|
103
|
+
const tokens = normalizeQuery(normalized);
|
|
104
|
+
if (tokens.length === 0)
|
|
105
|
+
return [];
|
|
106
|
+
const scored = [];
|
|
107
|
+
entries.forEach((entry, index) => {
|
|
108
|
+
const score = scoreEntry(entry, normalized, tokens);
|
|
109
|
+
if (score > 0)
|
|
110
|
+
scored.push({ entry, score, index });
|
|
111
|
+
});
|
|
112
|
+
scored.sort((a, b) => b.score - a.score || a.index - b.index);
|
|
113
|
+
return scored.slice(0, limit).map((item) => item.entry);
|
|
114
|
+
}
|
|
115
|
+
const SHORTCODE_CHARACTER = /[a-z0-9_+-]/i;
|
|
116
|
+
/**
|
|
117
|
+
* The `:query` under the caret, when the colon starts a word: `:thu|` yields
|
|
118
|
+
* "thu"; `10:30` and `http://` do not count, and neither does a query shorter
|
|
119
|
+
* than two characters (so `:D` and `:)` stay emoticons).
|
|
120
|
+
*/
|
|
121
|
+
export function getActiveEmojiShortcode(text, selectionStart) {
|
|
122
|
+
if (selectionStart == null || selectionStart < 3)
|
|
123
|
+
return null;
|
|
124
|
+
let start = selectionStart;
|
|
125
|
+
while (start > 0 && SHORTCODE_CHARACTER.test(text[start - 1] ?? "")) {
|
|
126
|
+
start--;
|
|
127
|
+
}
|
|
128
|
+
if (text[start - 1] !== ":")
|
|
129
|
+
return null;
|
|
130
|
+
const before = text[start - 2];
|
|
131
|
+
if (before !== undefined && !/[\s(]/.test(before))
|
|
132
|
+
return null;
|
|
133
|
+
const query = text.slice(start, selectionStart);
|
|
134
|
+
if (query.length < 2)
|
|
135
|
+
return null;
|
|
136
|
+
return { start: start - 1, end: selectionStart, query };
|
|
137
|
+
}
|
|
138
|
+
export const SKIN_TONE_LABELS = [
|
|
139
|
+
"Default skin tone",
|
|
140
|
+
"Light skin tone",
|
|
141
|
+
"Medium-light skin tone",
|
|
142
|
+
"Medium skin tone",
|
|
143
|
+
"Medium-dark skin tone",
|
|
144
|
+
"Dark skin tone",
|
|
145
|
+
];
|
|
146
|
+
/** `tone` 0 is the yellow default; 1–5 pick a variant when the emoji has one. */
|
|
147
|
+
export function withSkinTone(entry, tone) {
|
|
148
|
+
if (tone <= 0)
|
|
149
|
+
return entry.emoji;
|
|
150
|
+
return entry.skins[tone - 1] ?? entry.emoji;
|
|
151
|
+
}
|
|
152
|
+
const RECENT_KEY = "emoji.recent";
|
|
153
|
+
const RECENT_LIMIT = 24;
|
|
154
|
+
const SKIN_TONE_KEY = "emoji.skinTone";
|
|
155
|
+
export function getRecentEmoji() {
|
|
156
|
+
const stored = localStorageService.getItem(RECENT_KEY);
|
|
157
|
+
if (!Array.isArray(stored))
|
|
158
|
+
return [];
|
|
159
|
+
return stored.filter((value) => typeof value === "string");
|
|
160
|
+
}
|
|
161
|
+
export function rememberRecentEmoji(emoji) {
|
|
162
|
+
const next = [emoji, ...getRecentEmoji().filter((e) => e !== emoji)].slice(0, RECENT_LIMIT);
|
|
163
|
+
localStorageService.setItem(RECENT_KEY, next);
|
|
164
|
+
return next;
|
|
165
|
+
}
|
|
166
|
+
export function getSkinTonePreference() {
|
|
167
|
+
const stored = localStorageService.getItem(SKIN_TONE_KEY);
|
|
168
|
+
return typeof stored === "number" && stored >= 0 && stored <= 5 ? stored : 0;
|
|
169
|
+
}
|
|
170
|
+
export function setSkinTonePreference(tone) {
|
|
171
|
+
localStorageService.setItem(SKIN_TONE_KEY, tone);
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=emojiIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emojiIndex.js","sourceRoot":"","sources":["../../../src/components/emoji/emojiIndex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAqBhF,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,mBAAmB,EAAE;IACrC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE;IACjC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAE;IACpC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE;IAChC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,iBAAiB,EAAE;IACnC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE;IAC9B,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE;IAC3B,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE;IAC3B,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE;CAC1B,CAAC;AAEF,qEAAqE;AACrE,MAAM,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,UAAU,qBAAqB;IACnC,MAAM,MAAM,GAAG,mBAAmB,CAAC,OAAO,CAAU,aAAa,CAAC,CAAC;IACnE,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,mBAAmB,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TextInsertion } from "./textareaInsert";
|
|
2
|
+
/**
|
|
3
|
+
* ASCII emoticons that become emoji while typing, Slack-style: the emoticon
|
|
4
|
+
* has to start a word and is replaced the moment a space or line break is
|
|
5
|
+
* typed after it (or when the comment is sent with it at the very end), so
|
|
6
|
+
* `:)` mid-word, `http://`, `C:\` and `(x:)` stay as typed. Longer forms
|
|
7
|
+
* come before their prefixes so `:-)` and `:'(` win over `:)` and `:(`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const EMOTICONS: ReadonlyArray<readonly [string, string]>;
|
|
10
|
+
/** The emoticon that ends at `end` and starts a word, if any. */
|
|
11
|
+
export declare function emoticonEndingAt(text: string, end: number): {
|
|
12
|
+
start: number;
|
|
13
|
+
emoji: string;
|
|
14
|
+
} | null;
|
|
15
|
+
/**
|
|
16
|
+
* After whitespace was typed at `caret`, turns an emoticon right before it
|
|
17
|
+
* into its emoji. Returns null when there is nothing to replace.
|
|
18
|
+
*/
|
|
19
|
+
export declare function replaceTypedEmoticon(text: string, caret: number, typed: string | null | undefined): TextInsertion | null;
|
|
20
|
+
/** Converts an emoticon the text ends with, for a comment sent without a trailing space. */
|
|
21
|
+
export declare function replaceTrailingEmoticon(text: string): string;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
const BS = String.fromCharCode(92); // backslash, kept out of string literals
|
|
2
|
+
const SLIGHT_SMILE = "\u{1F642}";
|
|
3
|
+
const GRIN = "\u{1F603}";
|
|
4
|
+
const LAUGH = "\u{1F606}";
|
|
5
|
+
const WINK = "\u{1F609}";
|
|
6
|
+
const FROWN = "\u{1F641}";
|
|
7
|
+
const CRY = "\u{1F622}";
|
|
8
|
+
const SOB = "\u{1F62D}";
|
|
9
|
+
const JOY = "\u{1F602}";
|
|
10
|
+
const TONGUE = "\u{1F61B}";
|
|
11
|
+
const TONGUE_WINK = "\u{1F61C}";
|
|
12
|
+
const SURPRISED = "\u{1F62E}";
|
|
13
|
+
const KISS = "\u{1F618}";
|
|
14
|
+
const CONFUSED = "\u{1F615}";
|
|
15
|
+
const NEUTRAL = "\u{1F610}";
|
|
16
|
+
const EXPRESSIONLESS = "\u{1F611}";
|
|
17
|
+
const FLUSHED = "\u{1F633}";
|
|
18
|
+
const ZIPPER = "\u{1F910}";
|
|
19
|
+
const CONFOUNDED = "\u{1F616}";
|
|
20
|
+
const ANGRY = "\u{1F620}";
|
|
21
|
+
const RAGE = "\u{1F621}";
|
|
22
|
+
const COOL = "\u{1F60E}";
|
|
23
|
+
const ANGEL = "\u{1F607}";
|
|
24
|
+
const DEVIL = "\u{1F608}";
|
|
25
|
+
const BLUSH = "\u{1F60A}";
|
|
26
|
+
const HEART = "\u2764\uFE0F";
|
|
27
|
+
const BROKEN_HEART = "\u{1F494}";
|
|
28
|
+
const THUMBS_UP = "\u{1F44D}";
|
|
29
|
+
const THUMBS_DOWN = "\u{1F44E}";
|
|
30
|
+
const RAISED_HANDS = "\u{1F64C}";
|
|
31
|
+
/**
|
|
32
|
+
* ASCII emoticons that become emoji while typing, Slack-style: the emoticon
|
|
33
|
+
* has to start a word and is replaced the moment a space or line break is
|
|
34
|
+
* typed after it (or when the comment is sent with it at the very end), so
|
|
35
|
+
* `:)` mid-word, `http://`, `C:\` and `(x:)` stay as typed. Longer forms
|
|
36
|
+
* come before their prefixes so `:-)` and `:'(` win over `:)` and `:(`.
|
|
37
|
+
*/
|
|
38
|
+
export const EMOTICONS = [
|
|
39
|
+
// Three and four characters
|
|
40
|
+
[":'-(", CRY],
|
|
41
|
+
[":'-)", JOY],
|
|
42
|
+
[">:-(", ANGRY],
|
|
43
|
+
[">:-)", DEVIL],
|
|
44
|
+
["O:-)", ANGEL],
|
|
45
|
+
["0:-)", ANGEL],
|
|
46
|
+
[":-))", LAUGH],
|
|
47
|
+
[":'(", CRY],
|
|
48
|
+
[":')", JOY],
|
|
49
|
+
[":'D", JOY],
|
|
50
|
+
["</3", BROKEN_HEART],
|
|
51
|
+
[">:(", ANGRY],
|
|
52
|
+
[">:)", DEVIL],
|
|
53
|
+
["3:)", DEVIL],
|
|
54
|
+
["O:)", ANGEL],
|
|
55
|
+
["0:)", ANGEL],
|
|
56
|
+
["B-)", COOL],
|
|
57
|
+
["8-)", COOL],
|
|
58
|
+
[":-)", SLIGHT_SMILE],
|
|
59
|
+
[":-]", SLIGHT_SMILE],
|
|
60
|
+
[":-(", FROWN],
|
|
61
|
+
[":-[", FROWN],
|
|
62
|
+
[";-)", WINK],
|
|
63
|
+
[";-D", WINK],
|
|
64
|
+
[":-D", GRIN],
|
|
65
|
+
[":-P", TONGUE],
|
|
66
|
+
[":-p", TONGUE],
|
|
67
|
+
[";-P", TONGUE_WINK],
|
|
68
|
+
[";-p", TONGUE_WINK],
|
|
69
|
+
[":-O", SURPRISED],
|
|
70
|
+
[":-o", SURPRISED],
|
|
71
|
+
[":-*", KISS],
|
|
72
|
+
[":-/", CONFUSED],
|
|
73
|
+
[`:-${BS}`, CONFUSED],
|
|
74
|
+
[":-|", NEUTRAL],
|
|
75
|
+
[":-$", FLUSHED],
|
|
76
|
+
[":-X", ZIPPER],
|
|
77
|
+
[":-x", ZIPPER],
|
|
78
|
+
[":-S", CONFOUNDED],
|
|
79
|
+
[":-s", CONFOUNDED],
|
|
80
|
+
[":-@", RAGE],
|
|
81
|
+
["^_^", BLUSH],
|
|
82
|
+
["-_-", EXPRESSIONLESS],
|
|
83
|
+
["o_O", FLUSHED],
|
|
84
|
+
["O_o", FLUSHED],
|
|
85
|
+
["T_T", SOB],
|
|
86
|
+
[";_;", SOB],
|
|
87
|
+
[`${BS}o/`, RAISED_HANDS],
|
|
88
|
+
["(y)", THUMBS_UP],
|
|
89
|
+
["(Y)", THUMBS_UP],
|
|
90
|
+
["(n)", THUMBS_DOWN],
|
|
91
|
+
["(N)", THUMBS_DOWN],
|
|
92
|
+
// Two characters
|
|
93
|
+
[":)", SLIGHT_SMILE],
|
|
94
|
+
["=)", SLIGHT_SMILE],
|
|
95
|
+
["(:", SLIGHT_SMILE],
|
|
96
|
+
[":]", SLIGHT_SMILE],
|
|
97
|
+
[":(", FROWN],
|
|
98
|
+
["=(", FROWN],
|
|
99
|
+
["):", FROWN],
|
|
100
|
+
[":[", FROWN],
|
|
101
|
+
[";)", WINK],
|
|
102
|
+
[";D", WINK],
|
|
103
|
+
[":D", GRIN],
|
|
104
|
+
["=D", GRIN],
|
|
105
|
+
["xD", LAUGH],
|
|
106
|
+
["XD", LAUGH],
|
|
107
|
+
[":P", TONGUE],
|
|
108
|
+
[":p", TONGUE],
|
|
109
|
+
["=P", TONGUE],
|
|
110
|
+
[";P", TONGUE_WINK],
|
|
111
|
+
[";p", TONGUE_WINK],
|
|
112
|
+
["xP", TONGUE_WINK],
|
|
113
|
+
[":O", SURPRISED],
|
|
114
|
+
[":o", SURPRISED],
|
|
115
|
+
[":*", KISS],
|
|
116
|
+
[":/", CONFUSED],
|
|
117
|
+
[`:${BS}`, CONFUSED],
|
|
118
|
+
["=/", CONFUSED],
|
|
119
|
+
[":|", NEUTRAL],
|
|
120
|
+
[":$", FLUSHED],
|
|
121
|
+
[":X", ZIPPER],
|
|
122
|
+
[":x", ZIPPER],
|
|
123
|
+
[":S", CONFOUNDED],
|
|
124
|
+
[":s", CONFOUNDED],
|
|
125
|
+
[":@", RAGE],
|
|
126
|
+
["^^", BLUSH],
|
|
127
|
+
["<3", HEART],
|
|
128
|
+
["B)", COOL],
|
|
129
|
+
["8)", COOL],
|
|
130
|
+
];
|
|
131
|
+
/** The emoticon that ends at `end` and starts a word, if any. */
|
|
132
|
+
export function emoticonEndingAt(text, end) {
|
|
133
|
+
for (const [emoticon, emoji] of EMOTICONS) {
|
|
134
|
+
const start = end - emoticon.length;
|
|
135
|
+
if (start < 0 || text.slice(start, end) !== emoticon)
|
|
136
|
+
continue;
|
|
137
|
+
const before = text[start - 1];
|
|
138
|
+
if (before !== undefined && !/\s/.test(before))
|
|
139
|
+
return null;
|
|
140
|
+
return { start, emoji };
|
|
141
|
+
}
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* After whitespace was typed at `caret`, turns an emoticon right before it
|
|
146
|
+
* into its emoji. Returns null when there is nothing to replace.
|
|
147
|
+
*/
|
|
148
|
+
export function replaceTypedEmoticon(text, caret, typed) {
|
|
149
|
+
if (!typed || !/^\s$/.test(typed))
|
|
150
|
+
return null;
|
|
151
|
+
const match = emoticonEndingAt(text, caret - 1);
|
|
152
|
+
if (!match)
|
|
153
|
+
return null;
|
|
154
|
+
const value = text.slice(0, match.start) + match.emoji + text.slice(caret - 1);
|
|
155
|
+
return { value, caret: match.start + match.emoji.length + 1 };
|
|
156
|
+
}
|
|
157
|
+
/** Converts an emoticon the text ends with, for a comment sent without a trailing space. */
|
|
158
|
+
export function replaceTrailingEmoticon(text) {
|
|
159
|
+
const trimmedEnd = text.replace(/\s+$/, "");
|
|
160
|
+
const match = emoticonEndingAt(trimmedEnd, trimmedEnd.length);
|
|
161
|
+
if (!match)
|
|
162
|
+
return text;
|
|
163
|
+
return (trimmedEnd.slice(0, match.start) +
|
|
164
|
+
match.emoji +
|
|
165
|
+
text.slice(trimmedEnd.length));
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=emoticons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emoticons.js","sourceRoot":"","sources":["../../../src/components/emoji/emoticons.ts"],"names":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|
+
/** Caret position after the insertion. */
|
|
4
|
+
caret: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Replaces `[start, end)` of `value` with `text`. With `spacer`, a space
|
|
8
|
+
* follows the text unless the next character already separates it (used when
|
|
9
|
+
* a `:shortcode:` or `@mention` is completed while typing).
|
|
10
|
+
*/
|
|
11
|
+
export declare function replaceTextRange(value: string, start: number, end: number, text: string, options?: {
|
|
12
|
+
spacer?: boolean;
|
|
13
|
+
}): TextInsertion;
|
|
14
|
+
/**
|
|
15
|
+
* Inserts `text` at the textarea's selection, replacing any selected text,
|
|
16
|
+
* writes the value into the element and moves the caret behind the insertion.
|
|
17
|
+
* The caller still owns the React state and must adopt the returned value.
|
|
18
|
+
*/
|
|
19
|
+
export declare function insertTextAtSelection(textarea: HTMLTextAreaElement, text: string): TextInsertion;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const wordCharacter = /[^\s,;:.!?\])}'"]/;
|
|
2
|
+
/**
|
|
3
|
+
* Replaces `[start, end)` of `value` with `text`. With `spacer`, a space
|
|
4
|
+
* follows the text unless the next character already separates it (used when
|
|
5
|
+
* a `:shortcode:` or `@mention` is completed while typing).
|
|
6
|
+
*/
|
|
7
|
+
export function replaceTextRange(value, start, end, text, options = {}) {
|
|
8
|
+
const next = value[end] ?? "";
|
|
9
|
+
const spacer = options.spacer && (!next || wordCharacter.test(next)) ? " " : "";
|
|
10
|
+
const inserted = text + spacer;
|
|
11
|
+
return {
|
|
12
|
+
value: value.slice(0, start) + inserted + value.slice(end),
|
|
13
|
+
caret: start + inserted.length,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Inserts `text` at the textarea's selection, replacing any selected text,
|
|
18
|
+
* writes the value into the element and moves the caret behind the insertion.
|
|
19
|
+
* The caller still owns the React state and must adopt the returned value.
|
|
20
|
+
*/
|
|
21
|
+
export function insertTextAtSelection(textarea, text) {
|
|
22
|
+
const start = textarea.selectionStart ?? textarea.value.length;
|
|
23
|
+
const end = textarea.selectionEnd ?? start;
|
|
24
|
+
const insertion = replaceTextRange(textarea.value, start, end, text);
|
|
25
|
+
textarea.value = insertion.value;
|
|
26
|
+
textarea.setSelectionRange(insertion.caret, insertion.caret);
|
|
27
|
+
return insertion;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=textareaInsert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textareaInsert.js","sourceRoot":"","sources":["../../../src/components/emoji/textareaInsert.ts"],"names":[],"mappings":"AAMA,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAE1C;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAa,EACb,KAAa,EACb,GAAW,EACX,IAAY,EACZ,OAAO,GAAyB,EAAE;IAElC,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IAC9B,MAAM,MAAM,GACV,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IACnE,MAAM,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC;IAC/B,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;QAC1D,KAAK,EAAE,KAAK,GAAG,QAAQ,CAAC,MAAM;KAC/B,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACnC,QAA6B,EAC7B,IAAY;IAEZ,MAAM,KAAK,GAAG,QAAQ,CAAC,cAAc,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;IAC/D,MAAM,GAAG,GAAG,QAAQ,CAAC,YAAY,IAAI,KAAK,CAAC;IAC3C,MAAM,SAAS,GAAG,gBAAgB,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACrE,QAAQ,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;IACjC,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;IAC7D,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Emoji render as Twemoji SVG images so a comment looks the same on every
|
|
3
|
+
* platform. The images ship with the package (`@discordapp/twemoji/dist/svg`,
|
|
4
|
+
* the same release whose matcher runs here) and the host serves that folder as
|
|
5
|
+
* `<app base>/emoji/`: the Parhelia editor at `/parhelia/emoji/` (the Vite
|
|
6
|
+
* build copies the folder next to its chunks, the Next apps route to it).
|
|
7
|
+
* Another host calls `configureEmojiAssets` with its own location. Nothing is
|
|
8
|
+
* loaded from a CDN. The `Emoji` component falls back to the native glyph
|
|
9
|
+
* when an image does not load.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEFAULT_EMOJI_ASSET_BASE = "/parhelia/emoji/";
|
|
12
|
+
export declare function configureEmojiAssets(base: string): void;
|
|
13
|
+
export declare function getEmojiAssetBase(): string;
|
|
14
|
+
export declare function emojiCodePoints(emoji: string): string;
|
|
15
|
+
export declare function emojiImageUrl(emoji: string): string;
|
|
16
|
+
export type EmojiRun = {
|
|
17
|
+
type: "text";
|
|
18
|
+
value: string;
|
|
19
|
+
} | {
|
|
20
|
+
type: "emoji";
|
|
21
|
+
value: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Twemoji's matcher also returns symbols a browser shows as plain text (❤, ✔,
|
|
25
|
+
* 🅰 without a variation selector) and stray U+FE0F selectors. Only matches a
|
|
26
|
+
* browser would show as a colour emoji become images; the rest stays text.
|
|
27
|
+
*/
|
|
28
|
+
export declare function isEmojiPresentation(match: string): boolean;
|
|
29
|
+
/** Splits text into plain runs and the emoji Twemoji has an image for. */
|
|
30
|
+
export declare function splitEmojiRuns(text: string): EmojiRun[];
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import twemoji from "@discordapp/twemoji";
|
|
2
|
+
/**
|
|
3
|
+
* Emoji render as Twemoji SVG images so a comment looks the same on every
|
|
4
|
+
* platform. The images ship with the package (`@discordapp/twemoji/dist/svg`,
|
|
5
|
+
* the same release whose matcher runs here) and the host serves that folder as
|
|
6
|
+
* `<app base>/emoji/`: the Parhelia editor at `/parhelia/emoji/` (the Vite
|
|
7
|
+
* build copies the folder next to its chunks, the Next apps route to it).
|
|
8
|
+
* Another host calls `configureEmojiAssets` with its own location. Nothing is
|
|
9
|
+
* loaded from a CDN. The `Emoji` component falls back to the native glyph
|
|
10
|
+
* when an image does not load.
|
|
11
|
+
*/
|
|
12
|
+
export const DEFAULT_EMOJI_ASSET_BASE = "/parhelia/emoji/";
|
|
13
|
+
let assetBase = DEFAULT_EMOJI_ASSET_BASE;
|
|
14
|
+
export function configureEmojiAssets(base) {
|
|
15
|
+
assetBase = base.endsWith("/") ? base : `${base}/`;
|
|
16
|
+
}
|
|
17
|
+
export function getEmojiAssetBase() {
|
|
18
|
+
return assetBase;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The Twemoji file stem of an emoji: its code points joined by `-`, without
|
|
22
|
+
* variation selectors unless the sequence is joined with ZWJ (Twemoji names
|
|
23
|
+
* those with the selector kept, e.g. `1f468-200d-2695-fe0f`).
|
|
24
|
+
*/
|
|
25
|
+
const ZERO_WIDTH_JOINER = String.fromCodePoint(0x200d);
|
|
26
|
+
const VARIATION_SELECTOR_16 = String.fromCodePoint(0xfe0f);
|
|
27
|
+
const COMBINING_ENCLOSING_KEYCAP = String.fromCodePoint(0x20e3);
|
|
28
|
+
const VARIATION_SELECTORS = new RegExp(VARIATION_SELECTOR_16, "g");
|
|
29
|
+
export function emojiCodePoints(emoji) {
|
|
30
|
+
const normalized = emoji.includes(ZERO_WIDTH_JOINER)
|
|
31
|
+
? emoji
|
|
32
|
+
: emoji.replace(VARIATION_SELECTORS, "");
|
|
33
|
+
return twemoji.convert.toCodePoint(normalized);
|
|
34
|
+
}
|
|
35
|
+
export function emojiImageUrl(emoji) {
|
|
36
|
+
return `${assetBase}${emojiCodePoints(emoji)}.svg`;
|
|
37
|
+
}
|
|
38
|
+
const EMOJI_PRESENTATION = /\p{Emoji_Presentation}/u;
|
|
39
|
+
const EMOJI_PROPERTY = /\p{Emoji}/u;
|
|
40
|
+
const PRESENTATION_MARKERS = new RegExp(`[${VARIATION_SELECTOR_16}${COMBINING_ENCLOSING_KEYCAP}]`);
|
|
41
|
+
/**
|
|
42
|
+
* Twemoji's matcher also returns symbols a browser shows as plain text (❤, ✔,
|
|
43
|
+
* 🅰 without a variation selector) and stray U+FE0F selectors. Only matches a
|
|
44
|
+
* browser would show as a colour emoji become images; the rest stays text.
|
|
45
|
+
*/
|
|
46
|
+
export function isEmojiPresentation(match) {
|
|
47
|
+
if (EMOJI_PRESENTATION.test(match))
|
|
48
|
+
return true;
|
|
49
|
+
return PRESENTATION_MARKERS.test(match) && EMOJI_PROPERTY.test(match);
|
|
50
|
+
}
|
|
51
|
+
function matchOffset(args) {
|
|
52
|
+
// String.replace passes (match, ...groups, offset, string[, groups]); the
|
|
53
|
+
// offset is the last numeric argument whatever the regex's group count.
|
|
54
|
+
for (let index = args.length - 1; index >= 0; index--) {
|
|
55
|
+
const value = args[index];
|
|
56
|
+
if (typeof value === "number")
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
return 0;
|
|
60
|
+
}
|
|
61
|
+
/** Splits text into plain runs and the emoji Twemoji has an image for. */
|
|
62
|
+
export function splitEmojiRuns(text) {
|
|
63
|
+
if (!text)
|
|
64
|
+
return [];
|
|
65
|
+
const runs = [];
|
|
66
|
+
let cursor = 0;
|
|
67
|
+
twemoji.replace(text, (...args) => {
|
|
68
|
+
const match = args[0];
|
|
69
|
+
if (isEmojiPresentation(match)) {
|
|
70
|
+
const offset = matchOffset(args);
|
|
71
|
+
if (offset > cursor) {
|
|
72
|
+
runs.push({ type: "text", value: text.slice(cursor, offset) });
|
|
73
|
+
}
|
|
74
|
+
runs.push({ type: "emoji", value: match });
|
|
75
|
+
cursor = offset + match.length;
|
|
76
|
+
}
|
|
77
|
+
return match;
|
|
78
|
+
});
|
|
79
|
+
if (cursor < text.length) {
|
|
80
|
+
runs.push({ type: "text", value: text.slice(cursor) });
|
|
81
|
+
}
|
|
82
|
+
return runs;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=twemoji.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twemoji.js","sourceRoot":"","sources":["../../../src/components/emoji/twemoji.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAE1C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,kBAAkB,CAAC;AAE3D,IAAI,SAAS,GAAG,wBAAwB,CAAC;AAEzC,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;GAIG;AACH,MAAM,iBAAiB,GAAG,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AACvD,MAAM,qBAAqB,GAAG,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AAC3D,MAAM,0BAA0B,GAAG,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AAChE,MAAM,mBAAmB,GAAG,IAAI,MAAM,CAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC;AAEnE,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,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5B,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,IAAe,EAAE,EAAE;QAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAW,CAAC;QAChC,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,MAAM,GAAG,MAAM,EAAE,CAAC;gBACpB,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;YACjE,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YAC3C,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QACjC,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;IACH,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -5,4 +5,9 @@ declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDi
|
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
7
7
|
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Link-style action inside an alert ("Open Settings Status Page →"). Takes
|
|
10
|
+
* the alert's text color, so it reads as part of the message.
|
|
11
|
+
*/
|
|
12
|
+
declare const AlertAction: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
export { Alert, AlertAction, AlertDescription, AlertTitle };
|