@agent-native/toolkit 0.0.0-beta-20260819143124
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/README.md +151 -0
- package/agent-native.eject.json +588 -0
- package/dist/app-shell/header-actions.d.ts +18 -0
- package/dist/app-shell/header-actions.d.ts.map +1 -0
- package/dist/app-shell/header-actions.js +52 -0
- package/dist/app-shell/header-actions.js.map +1 -0
- package/dist/app-shell/index.d.ts +3 -0
- package/dist/app-shell/index.d.ts.map +1 -0
- package/dist/app-shell/index.js +3 -0
- package/dist/app-shell/index.js.map +1 -0
- package/dist/app-shell/sidebar-footer-actions.d.ts +14 -0
- package/dist/app-shell/sidebar-footer-actions.d.ts.map +1 -0
- package/dist/app-shell/sidebar-footer-actions.js +10 -0
- package/dist/app-shell/sidebar-footer-actions.js.map +1 -0
- package/dist/app-shell/sidebar-footer-actions.spec.d.ts +2 -0
- package/dist/app-shell/sidebar-footer-actions.spec.d.ts.map +1 -0
- package/dist/app-shell/sidebar-footer-actions.spec.js +43 -0
- package/dist/app-shell/sidebar-footer-actions.spec.js.map +1 -0
- package/dist/canvas-annotations/CanvasCommentPins.d.ts +68 -0
- package/dist/canvas-annotations/CanvasCommentPins.d.ts.map +1 -0
- package/dist/canvas-annotations/CanvasCommentPins.js +513 -0
- package/dist/canvas-annotations/CanvasCommentPins.js.map +1 -0
- package/dist/canvas-annotations/DrawOverlay.d.ts +108 -0
- package/dist/canvas-annotations/DrawOverlay.d.ts.map +1 -0
- package/dist/canvas-annotations/DrawOverlay.js +746 -0
- package/dist/canvas-annotations/DrawOverlay.js.map +1 -0
- package/dist/canvas-annotations/DrawOverlay.spec.d.ts +2 -0
- package/dist/canvas-annotations/DrawOverlay.spec.d.ts.map +1 -0
- package/dist/canvas-annotations/DrawOverlay.spec.js +111 -0
- package/dist/canvas-annotations/DrawOverlay.spec.js.map +1 -0
- package/dist/canvas-annotations/index.d.ts +4 -0
- package/dist/canvas-annotations/index.d.ts.map +1 -0
- package/dist/canvas-annotations/index.js +3 -0
- package/dist/canvas-annotations/index.js.map +1 -0
- package/dist/canvas-annotations/types.d.ts +8 -0
- package/dist/canvas-annotations/types.d.ts.map +1 -0
- package/dist/canvas-annotations/types.js +2 -0
- package/dist/canvas-annotations/types.js.map +1 -0
- package/dist/canvas-interactions/canvas-interactions.d.ts +334 -0
- package/dist/canvas-interactions/canvas-interactions.d.ts.map +1 -0
- package/dist/canvas-interactions/canvas-interactions.js +486 -0
- package/dist/canvas-interactions/canvas-interactions.js.map +1 -0
- package/dist/canvas-interactions/canvas-interactions.spec.d.ts +2 -0
- package/dist/canvas-interactions/canvas-interactions.spec.d.ts.map +1 -0
- package/dist/canvas-interactions/canvas-interactions.spec.js +593 -0
- package/dist/canvas-interactions/canvas-interactions.spec.js.map +1 -0
- package/dist/canvas-interactions/index.d.ts +2 -0
- package/dist/canvas-interactions/index.d.ts.map +1 -0
- package/dist/canvas-interactions/index.js +2 -0
- package/dist/canvas-interactions/index.js.map +1 -0
- package/dist/chat-history/ChatHistoryList.d.ts +103 -0
- package/dist/chat-history/ChatHistoryList.d.ts.map +1 -0
- package/dist/chat-history/ChatHistoryList.js +102 -0
- package/dist/chat-history/ChatHistoryList.js.map +1 -0
- package/dist/chat-history/ChatHistoryList.spec.d.ts +2 -0
- package/dist/chat-history/ChatHistoryList.spec.d.ts.map +1 -0
- package/dist/chat-history/ChatHistoryList.spec.js +293 -0
- package/dist/chat-history/ChatHistoryList.spec.js.map +1 -0
- package/dist/chat-history/ChatHistoryRail.d.ts +33 -0
- package/dist/chat-history/ChatHistoryRail.d.ts.map +1 -0
- package/dist/chat-history/ChatHistoryRail.js +35 -0
- package/dist/chat-history/ChatHistoryRail.js.map +1 -0
- package/dist/chat-history/ChatHistoryRail.spec.d.ts +2 -0
- package/dist/chat-history/ChatHistoryRail.spec.d.ts.map +1 -0
- package/dist/chat-history/ChatHistoryRail.spec.js +157 -0
- package/dist/chat-history/ChatHistoryRail.spec.js.map +1 -0
- package/dist/chat-history/index.d.ts +4 -0
- package/dist/chat-history/index.d.ts.map +1 -0
- package/dist/chat-history/index.js +4 -0
- package/dist/chat-history/index.js.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.d.ts +26 -0
- package/dist/chat-history/useChatHistoryRailController.d.ts.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.js +36 -0
- package/dist/chat-history/useChatHistoryRailController.js.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.spec.d.ts +2 -0
- package/dist/chat-history/useChatHistoryRailController.spec.d.ts.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.spec.js +101 -0
- package/dist/chat-history/useChatHistoryRailController.spec.js.map +1 -0
- package/dist/chat-history.css +469 -0
- package/dist/collab-ui/AgentPresenceChip.d.ts +12 -0
- package/dist/collab-ui/AgentPresenceChip.d.ts.map +1 -0
- package/dist/collab-ui/AgentPresenceChip.js +42 -0
- package/dist/collab-ui/AgentPresenceChip.js.map +1 -0
- package/dist/collab-ui/LiveCursorOverlay.d.ts +46 -0
- package/dist/collab-ui/LiveCursorOverlay.d.ts.map +1 -0
- package/dist/collab-ui/LiveCursorOverlay.js +125 -0
- package/dist/collab-ui/LiveCursorOverlay.js.map +1 -0
- package/dist/collab-ui/PresenceBar.d.ts +30 -0
- package/dist/collab-ui/PresenceBar.d.ts.map +1 -0
- package/dist/collab-ui/PresenceBar.js +172 -0
- package/dist/collab-ui/PresenceBar.js.map +1 -0
- package/dist/collab-ui/PresenceBar.spec.d.ts +2 -0
- package/dist/collab-ui/PresenceBar.spec.d.ts.map +1 -0
- package/dist/collab-ui/PresenceBar.spec.js +30 -0
- package/dist/collab-ui/PresenceBar.spec.js.map +1 -0
- package/dist/collab-ui/RecentEditHighlights.d.ts +46 -0
- package/dist/collab-ui/RecentEditHighlights.d.ts.map +1 -0
- package/dist/collab-ui/RecentEditHighlights.js +154 -0
- package/dist/collab-ui/RecentEditHighlights.js.map +1 -0
- package/dist/collab-ui/RemoteSelectionRings.d.ts +53 -0
- package/dist/collab-ui/RemoteSelectionRings.d.ts.map +1 -0
- package/dist/collab-ui/RemoteSelectionRings.js +130 -0
- package/dist/collab-ui/RemoteSelectionRings.js.map +1 -0
- package/dist/collab-ui/agent-identity.d.ts +9 -0
- package/dist/collab-ui/agent-identity.d.ts.map +1 -0
- package/dist/collab-ui/agent-identity.js +9 -0
- package/dist/collab-ui/agent-identity.js.map +1 -0
- package/dist/collab-ui/index.d.ts +9 -0
- package/dist/collab-ui/index.d.ts.map +1 -0
- package/dist/collab-ui/index.js +9 -0
- package/dist/collab-ui/index.js.map +1 -0
- package/dist/collab-ui/lead-client.d.ts +3 -0
- package/dist/collab-ui/lead-client.d.ts.map +1 -0
- package/dist/collab-ui/lead-client.js +29 -0
- package/dist/collab-ui/lead-client.js.map +1 -0
- package/dist/collab-ui/types.d.ts +48 -0
- package/dist/collab-ui/types.d.ts.map +1 -0
- package/dist/collab-ui/types.js +52 -0
- package/dist/collab-ui/types.js.map +1 -0
- package/dist/collab-ui/types.spec.d.ts +2 -0
- package/dist/collab-ui/types.spec.d.ts.map +1 -0
- package/dist/collab-ui/types.spec.js +15 -0
- package/dist/collab-ui/types.spec.js.map +1 -0
- package/dist/composer/AgentComposerFrame.d.ts +19 -0
- package/dist/composer/AgentComposerFrame.d.ts.map +1 -0
- package/dist/composer/AgentComposerFrame.js +17 -0
- package/dist/composer/AgentComposerFrame.js.map +1 -0
- package/dist/composer/ComposerPlusMenu.d.ts +30 -0
- package/dist/composer/ComposerPlusMenu.d.ts.map +1 -0
- package/dist/composer/ComposerPlusMenu.js +635 -0
- package/dist/composer/ComposerPlusMenu.js.map +1 -0
- package/dist/composer/ComposerPlusMenu.spec.d.ts +2 -0
- package/dist/composer/ComposerPlusMenu.spec.d.ts.map +1 -0
- package/dist/composer/ComposerPlusMenu.spec.js +12 -0
- package/dist/composer/ComposerPlusMenu.spec.js.map +1 -0
- package/dist/composer/MentionPopover.d.ts +29 -0
- package/dist/composer/MentionPopover.d.ts.map +1 -0
- package/dist/composer/MentionPopover.js +221 -0
- package/dist/composer/MentionPopover.js.map +1 -0
- package/dist/composer/PastedTextChip.d.ts +9 -0
- package/dist/composer/PastedTextChip.d.ts.map +1 -0
- package/dist/composer/PastedTextChip.js +71 -0
- package/dist/composer/PastedTextChip.js.map +1 -0
- package/dist/composer/PastedTextChip.spec.d.ts +2 -0
- package/dist/composer/PastedTextChip.spec.d.ts.map +1 -0
- package/dist/composer/PastedTextChip.spec.js +42 -0
- package/dist/composer/PastedTextChip.spec.js.map +1 -0
- package/dist/composer/PromptComposer.d.ts +151 -0
- package/dist/composer/PromptComposer.d.ts.map +1 -0
- package/dist/composer/PromptComposer.js +322 -0
- package/dist/composer/PromptComposer.js.map +1 -0
- package/dist/composer/PromptComposer.spec.d.ts +2 -0
- package/dist/composer/PromptComposer.spec.d.ts.map +1 -0
- package/dist/composer/PromptComposer.spec.js +87 -0
- package/dist/composer/PromptComposer.spec.js.map +1 -0
- package/dist/composer/RealtimeVoiceMode.d.ts +108 -0
- package/dist/composer/RealtimeVoiceMode.d.ts.map +1 -0
- package/dist/composer/RealtimeVoiceMode.js +312 -0
- package/dist/composer/RealtimeVoiceMode.js.map +1 -0
- package/dist/composer/RealtimeVoiceMode.spec.d.ts +2 -0
- package/dist/composer/RealtimeVoiceMode.spec.d.ts.map +1 -0
- package/dist/composer/RealtimeVoiceMode.spec.js +540 -0
- package/dist/composer/RealtimeVoiceMode.spec.js.map +1 -0
- package/dist/composer/TiptapComposer.d.ts +288 -0
- package/dist/composer/TiptapComposer.d.ts.map +1 -0
- package/dist/composer/TiptapComposer.js +2233 -0
- package/dist/composer/TiptapComposer.js.map +1 -0
- package/dist/composer/TiptapComposer.spec.d.ts +2 -0
- package/dist/composer/TiptapComposer.spec.d.ts.map +1 -0
- package/dist/composer/TiptapComposer.spec.js +415 -0
- package/dist/composer/TiptapComposer.spec.js.map +1 -0
- package/dist/composer/VoiceButton.d.ts +27 -0
- package/dist/composer/VoiceButton.d.ts.map +1 -0
- package/dist/composer/VoiceButton.js +151 -0
- package/dist/composer/VoiceButton.js.map +1 -0
- package/dist/composer/VoiceButton.spec.d.ts +2 -0
- package/dist/composer/VoiceButton.spec.d.ts.map +1 -0
- package/dist/composer/VoiceButton.spec.js +27 -0
- package/dist/composer/VoiceButton.spec.js.map +1 -0
- package/dist/composer/asset-picker-url.d.ts +16 -0
- package/dist/composer/asset-picker-url.d.ts.map +1 -0
- package/dist/composer/asset-picker-url.js +64 -0
- package/dist/composer/asset-picker-url.js.map +1 -0
- package/dist/composer/asset-picker-url.spec.d.ts +2 -0
- package/dist/composer/asset-picker-url.spec.d.ts.map +1 -0
- package/dist/composer/asset-picker-url.spec.js +23 -0
- package/dist/composer/asset-picker-url.spec.js.map +1 -0
- package/dist/composer/attachment-accept.d.ts +9 -0
- package/dist/composer/attachment-accept.d.ts.map +1 -0
- package/dist/composer/attachment-accept.js +69 -0
- package/dist/composer/attachment-accept.js.map +1 -0
- package/dist/composer/attachment-accept.spec.d.ts +2 -0
- package/dist/composer/attachment-accept.spec.d.ts.map +1 -0
- package/dist/composer/attachment-accept.spec.js +24 -0
- package/dist/composer/attachment-accept.spec.js.map +1 -0
- package/dist/composer/draft-key.d.ts +2 -0
- package/dist/composer/draft-key.d.ts.map +1 -0
- package/dist/composer/draft-key.js +8 -0
- package/dist/composer/draft-key.js.map +1 -0
- package/dist/composer/draft-key.spec.d.ts +2 -0
- package/dist/composer/draft-key.spec.d.ts.map +1 -0
- package/dist/composer/draft-key.spec.js +13 -0
- package/dist/composer/draft-key.spec.js.map +1 -0
- package/dist/composer/extensions/FileReference.d.ts +3 -0
- package/dist/composer/extensions/FileReference.d.ts.map +1 -0
- package/dist/composer/extensions/FileReference.js +36 -0
- package/dist/composer/extensions/FileReference.js.map +1 -0
- package/dist/composer/extensions/MentionReference.d.ts +3 -0
- package/dist/composer/extensions/MentionReference.d.ts.map +1 -0
- package/dist/composer/extensions/MentionReference.js +66 -0
- package/dist/composer/extensions/MentionReference.js.map +1 -0
- package/dist/composer/extensions/SkillReference.d.ts +3 -0
- package/dist/composer/extensions/SkillReference.d.ts.map +1 -0
- package/dist/composer/extensions/SkillReference.js +40 -0
- package/dist/composer/extensions/SkillReference.js.map +1 -0
- package/dist/composer/index.d.ts +16 -0
- package/dist/composer/index.d.ts.map +1 -0
- package/dist/composer/index.js +14 -0
- package/dist/composer/index.js.map +1 -0
- package/dist/composer/model-selection.d.ts +12 -0
- package/dist/composer/model-selection.d.ts.map +1 -0
- package/dist/composer/model-selection.js +31 -0
- package/dist/composer/model-selection.js.map +1 -0
- package/dist/composer/model-selection.spec.d.ts +2 -0
- package/dist/composer/model-selection.spec.d.ts.map +1 -0
- package/dist/composer/model-selection.spec.js +38 -0
- package/dist/composer/model-selection.spec.js.map +1 -0
- package/dist/composer/pasted-text.d.ts +31 -0
- package/dist/composer/pasted-text.d.ts.map +1 -0
- package/dist/composer/pasted-text.js +130 -0
- package/dist/composer/pasted-text.js.map +1 -0
- package/dist/composer/pasted-text.spec.d.ts +2 -0
- package/dist/composer/pasted-text.spec.d.ts.map +1 -0
- package/dist/composer/pasted-text.spec.js +107 -0
- package/dist/composer/pasted-text.spec.js.map +1 -0
- package/dist/composer/prompt-attachments.d.ts +18 -0
- package/dist/composer/prompt-attachments.d.ts.map +1 -0
- package/dist/composer/prompt-attachments.js +65 -0
- package/dist/composer/prompt-attachments.js.map +1 -0
- package/dist/composer/prompt-attachments.spec.d.ts +2 -0
- package/dist/composer/prompt-attachments.spec.d.ts.map +1 -0
- package/dist/composer/prompt-attachments.spec.js +63 -0
- package/dist/composer/prompt-attachments.spec.js.map +1 -0
- package/dist/composer/realtime-voice-audio-level.d.ts +14 -0
- package/dist/composer/realtime-voice-audio-level.d.ts.map +1 -0
- package/dist/composer/realtime-voice-audio-level.js +48 -0
- package/dist/composer/realtime-voice-audio-level.js.map +1 -0
- package/dist/composer/realtime-voice-audio-level.spec.d.ts +2 -0
- package/dist/composer/realtime-voice-audio-level.spec.d.ts.map +1 -0
- package/dist/composer/realtime-voice-audio-level.spec.js +32 -0
- package/dist/composer/realtime-voice-audio-level.spec.js.map +1 -0
- package/dist/composer/realtime-voice-transcript.d.ts +26 -0
- package/dist/composer/realtime-voice-transcript.d.ts.map +1 -0
- package/dist/composer/realtime-voice-transcript.js +103 -0
- package/dist/composer/realtime-voice-transcript.js.map +1 -0
- package/dist/composer/realtime-voice-transcript.spec.d.ts +2 -0
- package/dist/composer/realtime-voice-transcript.spec.d.ts.map +1 -0
- package/dist/composer/realtime-voice-transcript.spec.js +76 -0
- package/dist/composer/realtime-voice-transcript.spec.js.map +1 -0
- package/dist/composer/runtime-adapters.d.ts +169 -0
- package/dist/composer/runtime-adapters.d.ts.map +1 -0
- package/dist/composer/runtime-adapters.js +141 -0
- package/dist/composer/runtime-adapters.js.map +1 -0
- package/dist/composer/runtime-adapters.spec.d.ts +2 -0
- package/dist/composer/runtime-adapters.spec.d.ts.map +1 -0
- package/dist/composer/runtime-adapters.spec.js +69 -0
- package/dist/composer/runtime-adapters.spec.js.map +1 -0
- package/dist/composer/types.d.ts +60 -0
- package/dist/composer/types.d.ts.map +1 -0
- package/dist/composer/types.js +2 -0
- package/dist/composer/types.js.map +1 -0
- package/dist/composer/use-file-search.d.ts +6 -0
- package/dist/composer/use-file-search.d.ts.map +1 -0
- package/dist/composer/use-file-search.js +53 -0
- package/dist/composer/use-file-search.js.map +1 -0
- package/dist/composer/use-mention-search.d.ts +6 -0
- package/dist/composer/use-mention-search.d.ts.map +1 -0
- package/dist/composer/use-mention-search.js +75 -0
- package/dist/composer/use-mention-search.js.map +1 -0
- package/dist/composer/use-skills.d.ts +7 -0
- package/dist/composer/use-skills.d.ts.map +1 -0
- package/dist/composer/use-skills.js +40 -0
- package/dist/composer/use-skills.js.map +1 -0
- package/dist/composer/useRealtimeVoiceMode.d.ts +189 -0
- package/dist/composer/useRealtimeVoiceMode.d.ts.map +1 -0
- package/dist/composer/useRealtimeVoiceMode.js +1899 -0
- package/dist/composer/useRealtimeVoiceMode.js.map +1 -0
- package/dist/composer/useRealtimeVoiceMode.spec.d.ts +2 -0
- package/dist/composer/useRealtimeVoiceMode.spec.d.ts.map +1 -0
- package/dist/composer/useRealtimeVoiceMode.spec.js +716 -0
- package/dist/composer/useRealtimeVoiceMode.spec.js.map +1 -0
- package/dist/composer/useVoiceDictation.browser.spec.d.ts +2 -0
- package/dist/composer/useVoiceDictation.browser.spec.d.ts.map +1 -0
- package/dist/composer/useVoiceDictation.browser.spec.js +220 -0
- package/dist/composer/useVoiceDictation.browser.spec.js.map +1 -0
- package/dist/composer/useVoiceDictation.d.ts +58 -0
- package/dist/composer/useVoiceDictation.d.ts.map +1 -0
- package/dist/composer/useVoiceDictation.js +1058 -0
- package/dist/composer/useVoiceDictation.js.map +1 -0
- package/dist/composer/useVoiceDictation.spec.d.ts +2 -0
- package/dist/composer/useVoiceDictation.spec.d.ts.map +1 -0
- package/dist/composer/useVoiceDictation.spec.js +32 -0
- package/dist/composer/useVoiceDictation.spec.js.map +1 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.d.ts +7 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.d.ts.map +1 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.js +84 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.js.map +1 -0
- package/dist/conformance/conformance.spec.d.ts +2 -0
- package/dist/conformance/conformance.spec.d.ts.map +1 -0
- package/dist/conformance/conformance.spec.js +87 -0
- package/dist/conformance/conformance.spec.js.map +1 -0
- package/dist/conformance/index.d.ts +4 -0
- package/dist/conformance/index.d.ts.map +1 -0
- package/dist/conformance/index.js +4 -0
- package/dist/conformance/index.js.map +1 -0
- package/dist/conformance/runner.d.ts +12 -0
- package/dist/conformance/runner.d.ts.map +1 -0
- package/dist/conformance/runner.js +515 -0
- package/dist/conformance/runner.js.map +1 -0
- package/dist/conformance/types.d.ts +26 -0
- package/dist/conformance/types.d.ts.map +1 -0
- package/dist/conformance/types.js +13 -0
- package/dist/conformance/types.js.map +1 -0
- package/dist/conformance/version.d.ts +6 -0
- package/dist/conformance/version.d.ts.map +1 -0
- package/dist/conformance/version.js +14 -0
- package/dist/conformance/version.js.map +1 -0
- package/dist/context-ui/ContextMeter.d.ts +11 -0
- package/dist/context-ui/ContextMeter.d.ts.map +1 -0
- package/dist/context-ui/ContextMeter.js +40 -0
- package/dist/context-ui/ContextMeter.js.map +1 -0
- package/dist/context-ui/ContextMeter.spec.d.ts +2 -0
- package/dist/context-ui/ContextMeter.spec.d.ts.map +1 -0
- package/dist/context-ui/ContextMeter.spec.js +52 -0
- package/dist/context-ui/ContextMeter.spec.js.map +1 -0
- package/dist/context-ui/ContextSegmentRow.d.ts +16 -0
- package/dist/context-ui/ContextSegmentRow.d.ts.map +1 -0
- package/dist/context-ui/ContextSegmentRow.js +92 -0
- package/dist/context-ui/ContextSegmentRow.js.map +1 -0
- package/dist/context-ui/ContextTreemap.d.ts +8 -0
- package/dist/context-ui/ContextTreemap.d.ts.map +1 -0
- package/dist/context-ui/ContextTreemap.js +58 -0
- package/dist/context-ui/ContextTreemap.js.map +1 -0
- package/dist/context-ui/ContextXRayPanel.d.ts +14 -0
- package/dist/context-ui/ContextXRayPanel.d.ts.map +1 -0
- package/dist/context-ui/ContextXRayPanel.js +209 -0
- package/dist/context-ui/ContextXRayPanel.js.map +1 -0
- package/dist/context-ui/format.d.ts +6 -0
- package/dist/context-ui/format.d.ts.map +1 -0
- package/dist/context-ui/format.js +58 -0
- package/dist/context-ui/format.js.map +1 -0
- package/dist/context-ui/index.d.ts +7 -0
- package/dist/context-ui/index.d.ts.map +1 -0
- package/dist/context-ui/index.js +6 -0
- package/dist/context-ui/index.js.map +1 -0
- package/dist/context-ui/types.d.ts +41 -0
- package/dist/context-ui/types.d.ts.map +1 -0
- package/dist/context-ui/types.js +8 -0
- package/dist/context-ui/types.js.map +1 -0
- package/dist/dashboard/DataTable.d.ts +20 -0
- package/dist/dashboard/DataTable.d.ts.map +1 -0
- package/dist/dashboard/DataTable.js +87 -0
- package/dist/dashboard/DataTable.js.map +1 -0
- package/dist/dashboard/DateRangePicker.d.ts +15 -0
- package/dist/dashboard/DateRangePicker.d.ts.map +1 -0
- package/dist/dashboard/DateRangePicker.js +15 -0
- package/dist/dashboard/DateRangePicker.js.map +1 -0
- package/dist/dashboard/GenericChartPanel.d.ts +57 -0
- package/dist/dashboard/GenericChartPanel.d.ts.map +1 -0
- package/dist/dashboard/GenericChartPanel.js +119 -0
- package/dist/dashboard/GenericChartPanel.js.map +1 -0
- package/dist/dashboard/GenericChartPanel.spec.d.ts +2 -0
- package/dist/dashboard/GenericChartPanel.spec.d.ts.map +1 -0
- package/dist/dashboard/GenericChartPanel.spec.js +41 -0
- package/dist/dashboard/GenericChartPanel.spec.js.map +1 -0
- package/dist/dashboard/MetricCard.d.ts +14 -0
- package/dist/dashboard/MetricCard.d.ts.map +1 -0
- package/dist/dashboard/MetricCard.js +10 -0
- package/dist/dashboard/MetricCard.js.map +1 -0
- package/dist/dashboard/StatsCard.d.ts +16 -0
- package/dist/dashboard/StatsCard.d.ts.map +1 -0
- package/dist/dashboard/StatsCard.js +8 -0
- package/dist/dashboard/StatsCard.js.map +1 -0
- package/dist/dashboard/dashboard-layout.d.ts +49 -0
- package/dist/dashboard/dashboard-layout.d.ts.map +1 -0
- package/dist/dashboard/dashboard-layout.js +231 -0
- package/dist/dashboard/dashboard-layout.js.map +1 -0
- package/dist/dashboard/dashboard-layout.spec.d.ts +2 -0
- package/dist/dashboard/dashboard-layout.spec.d.ts.map +1 -0
- package/dist/dashboard/dashboard-layout.spec.js +52 -0
- package/dist/dashboard/dashboard-layout.spec.js.map +1 -0
- package/dist/dashboard/index.d.ts +7 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +7 -0
- package/dist/dashboard/index.js.map +1 -0
- package/dist/data-grid/DataGrid.d.ts +92 -0
- package/dist/data-grid/DataGrid.d.ts.map +1 -0
- package/dist/data-grid/DataGrid.js +315 -0
- package/dist/data-grid/DataGrid.js.map +1 -0
- package/dist/data-grid/DataGrid.spec.d.ts +2 -0
- package/dist/data-grid/DataGrid.spec.d.ts.map +1 -0
- package/dist/data-grid/DataGrid.spec.js +134 -0
- package/dist/data-grid/DataGrid.spec.js.map +1 -0
- package/dist/data-grid/index.d.ts +2 -0
- package/dist/data-grid/index.d.ts.map +1 -0
- package/dist/data-grid/index.js +2 -0
- package/dist/data-grid/index.js.map +1 -0
- package/dist/design-system/components.d.ts +58 -0
- package/dist/design-system/components.d.ts.map +1 -0
- package/dist/design-system/components.js +88 -0
- package/dist/design-system/components.js.map +1 -0
- package/dist/design-system/context.d.ts +11 -0
- package/dist/design-system/context.d.ts.map +1 -0
- package/dist/design-system/context.js +17 -0
- package/dist/design-system/context.js.map +1 -0
- package/dist/design-system/default-adapter.d.ts +3 -0
- package/dist/design-system/default-adapter.d.ts.map +1 -0
- package/dist/design-system/default-adapter.js +172 -0
- package/dist/design-system/default-adapter.js.map +1 -0
- package/dist/design-system/default-adapter.spec.d.ts +2 -0
- package/dist/design-system/default-adapter.spec.d.ts.map +1 -0
- package/dist/design-system/default-adapter.spec.js +108 -0
- package/dist/design-system/default-adapter.spec.js.map +1 -0
- package/dist/design-system/definition.d.ts +9 -0
- package/dist/design-system/definition.d.ts.map +1 -0
- package/dist/design-system/definition.js +4 -0
- package/dist/design-system/definition.js.map +1 -0
- package/dist/design-system/design-system.spec.d.ts +2 -0
- package/dist/design-system/design-system.spec.d.ts.map +1 -0
- package/dist/design-system/design-system.spec.js +208 -0
- package/dist/design-system/design-system.spec.js.map +1 -0
- package/dist/design-system/error-boundary.d.ts +18 -0
- package/dist/design-system/error-boundary.d.ts.map +1 -0
- package/dist/design-system/error-boundary.js +16 -0
- package/dist/design-system/error-boundary.js.map +1 -0
- package/dist/design-system/index.d.ts +8 -0
- package/dist/design-system/index.d.ts.map +1 -0
- package/dist/design-system/index.js +8 -0
- package/dist/design-system/index.js.map +1 -0
- package/dist/design-system/theme.d.ts +30 -0
- package/dist/design-system/theme.d.ts.map +1 -0
- package/dist/design-system/theme.js +95 -0
- package/dist/design-system/theme.js.map +1 -0
- package/dist/design-system/theme.spec.d.ts +2 -0
- package/dist/design-system/theme.spec.d.ts.map +1 -0
- package/dist/design-system/theme.spec.js +43 -0
- package/dist/design-system/theme.spec.js.map +1 -0
- package/dist/design-system/types.d.ts +292 -0
- package/dist/design-system/types.d.ts.map +1 -0
- package/dist/design-system/types.js +2 -0
- package/dist/design-system/types.js.map +1 -0
- package/dist/design-tweaks/index.d.ts +2 -0
- package/dist/design-tweaks/index.d.ts.map +1 -0
- package/dist/design-tweaks/index.js +2 -0
- package/dist/design-tweaks/index.js.map +1 -0
- package/dist/design-tweaks/scrub-input-utils.d.ts +61 -0
- package/dist/design-tweaks/scrub-input-utils.d.ts.map +1 -0
- package/dist/design-tweaks/scrub-input-utils.js +235 -0
- package/dist/design-tweaks/scrub-input-utils.js.map +1 -0
- package/dist/design-tweaks/scrub-input.d.ts +70 -0
- package/dist/design-tweaks/scrub-input.d.ts.map +1 -0
- package/dist/design-tweaks/scrub-input.js +319 -0
- package/dist/design-tweaks/scrub-input.js.map +1 -0
- package/dist/design-tweaks/visual-style-controls.d.ts +90 -0
- package/dist/design-tweaks/visual-style-controls.d.ts.map +1 -0
- package/dist/design-tweaks/visual-style-controls.js +423 -0
- package/dist/design-tweaks/visual-style-controls.js.map +1 -0
- package/dist/design-tweaks/visual-style-controls.spec.d.ts +2 -0
- package/dist/design-tweaks/visual-style-controls.spec.d.ts.map +1 -0
- package/dist/design-tweaks/visual-style-controls.spec.js +84 -0
- package/dist/design-tweaks/visual-style-controls.spec.js.map +1 -0
- package/dist/editor/BubbleToolbar.d.ts +37 -0
- package/dist/editor/BubbleToolbar.d.ts.map +1 -0
- package/dist/editor/BubbleToolbar.js +171 -0
- package/dist/editor/BubbleToolbar.js.map +1 -0
- package/dist/editor/CodeBlockNode.d.ts +49 -0
- package/dist/editor/CodeBlockNode.d.ts.map +1 -0
- package/dist/editor/CodeBlockNode.js +127 -0
- package/dist/editor/CodeBlockNode.js.map +1 -0
- package/dist/editor/DragHandle.d.ts +103 -0
- package/dist/editor/DragHandle.d.ts.map +1 -0
- package/dist/editor/DragHandle.js +1101 -0
- package/dist/editor/DragHandle.js.map +1 -0
- package/dist/editor/DragHandle.spec.d.ts +2 -0
- package/dist/editor/DragHandle.spec.d.ts.map +1 -0
- package/dist/editor/DragHandle.spec.js +495 -0
- package/dist/editor/DragHandle.spec.js.map +1 -0
- package/dist/editor/ImageExtension.d.ts +63 -0
- package/dist/editor/ImageExtension.d.ts.map +1 -0
- package/dist/editor/ImageExtension.js +243 -0
- package/dist/editor/ImageExtension.js.map +1 -0
- package/dist/editor/ImageExtension.roundtrip.spec.d.ts +2 -0
- package/dist/editor/ImageExtension.roundtrip.spec.d.ts.map +1 -0
- package/dist/editor/ImageExtension.roundtrip.spec.js +103 -0
- package/dist/editor/ImageExtension.roundtrip.spec.js.map +1 -0
- package/dist/editor/RegistryBlockContext.d.ts +68 -0
- package/dist/editor/RegistryBlockContext.d.ts.map +1 -0
- package/dist/editor/RegistryBlockContext.js +10 -0
- package/dist/editor/RegistryBlockContext.js.map +1 -0
- package/dist/editor/RegistryBlockNode.d.ts +66 -0
- package/dist/editor/RegistryBlockNode.d.ts.map +1 -0
- package/dist/editor/RegistryBlockNode.js +406 -0
- package/dist/editor/RegistryBlockNode.js.map +1 -0
- package/dist/editor/RegistryBlockNode.spec.d.ts +2 -0
- package/dist/editor/RegistryBlockNode.spec.d.ts.map +1 -0
- package/dist/editor/RegistryBlockNode.spec.js +215 -0
- package/dist/editor/RegistryBlockNode.spec.js.map +1 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.d.ts +2 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.d.ts.map +1 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.js +65 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.js.map +1 -0
- package/dist/editor/RichMarkdownEditor.d.ts +52 -0
- package/dist/editor/RichMarkdownEditor.d.ts.map +1 -0
- package/dist/editor/RichMarkdownEditor.js +38 -0
- package/dist/editor/RichMarkdownEditor.js.map +1 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.d.ts +2 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.d.ts.map +1 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.js +186 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.js.map +1 -0
- package/dist/editor/RunId.d.ts +28 -0
- package/dist/editor/RunId.d.ts.map +1 -0
- package/dist/editor/RunId.js +60 -0
- package/dist/editor/RunId.js.map +1 -0
- package/dist/editor/SharedRichEditor.d.ts +112 -0
- package/dist/editor/SharedRichEditor.d.ts.map +1 -0
- package/dist/editor/SharedRichEditor.js +159 -0
- package/dist/editor/SharedRichEditor.js.map +1 -0
- package/dist/editor/SharedRichEditor.spec.d.ts +2 -0
- package/dist/editor/SharedRichEditor.spec.d.ts.map +1 -0
- package/dist/editor/SharedRichEditor.spec.js +63 -0
- package/dist/editor/SharedRichEditor.spec.js.map +1 -0
- package/dist/editor/SlashCommandMenu.d.ts +59 -0
- package/dist/editor/SlashCommandMenu.d.ts.map +1 -0
- package/dist/editor/SlashCommandMenu.js +279 -0
- package/dist/editor/SlashCommandMenu.js.map +1 -0
- package/dist/editor/SlashCommandMenu.spec.d.ts +2 -0
- package/dist/editor/SlashCommandMenu.spec.d.ts.map +1 -0
- package/dist/editor/SlashCommandMenu.spec.js +67 -0
- package/dist/editor/SlashCommandMenu.spec.js.map +1 -0
- package/dist/editor/disableHistory.spec.d.ts +2 -0
- package/dist/editor/disableHistory.spec.d.ts.map +1 -0
- package/dist/editor/disableHistory.spec.js +73 -0
- package/dist/editor/disableHistory.spec.js.map +1 -0
- package/dist/editor/extensions.d.ts +178 -0
- package/dist/editor/extensions.d.ts.map +1 -0
- package/dist/editor/extensions.js +264 -0
- package/dist/editor/extensions.js.map +1 -0
- package/dist/editor/gfmDoc.d.ts +24 -0
- package/dist/editor/gfmDoc.d.ts.map +1 -0
- package/dist/editor/gfmDoc.js +83 -0
- package/dist/editor/gfmDoc.js.map +1 -0
- package/dist/editor/gfmDoc.spec.d.ts +2 -0
- package/dist/editor/gfmDoc.spec.d.ts.map +1 -0
- package/dist/editor/gfmDoc.spec.js +194 -0
- package/dist/editor/gfmDoc.spec.js.map +1 -0
- package/dist/editor/index.d.ts +16 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/index.js +15 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/editor/registrySlashCommands.d.ts +68 -0
- package/dist/editor/registrySlashCommands.d.ts.map +1 -0
- package/dist/editor/registrySlashCommands.js +51 -0
- package/dist/editor/registrySlashCommands.js.map +1 -0
- package/dist/editor/structuralReorderUndo.spec.d.ts +2 -0
- package/dist/editor/structuralReorderUndo.spec.d.ts.map +1 -0
- package/dist/editor/structuralReorderUndo.spec.js +120 -0
- package/dist/editor/structuralReorderUndo.spec.js.map +1 -0
- package/dist/editor/surgical-apply.d.ts +66 -0
- package/dist/editor/surgical-apply.d.ts.map +1 -0
- package/dist/editor/surgical-apply.js +147 -0
- package/dist/editor/surgical-apply.js.map +1 -0
- package/dist/editor/surgical-apply.spec.d.ts +2 -0
- package/dist/editor/surgical-apply.spec.d.ts.map +1 -0
- package/dist/editor/surgical-apply.spec.js +257 -0
- package/dist/editor/surgical-apply.spec.js.map +1 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.d.ts +2 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.d.ts.map +1 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.js +641 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.js.map +1 -0
- package/dist/editor/useCollabReconcile.d.ts +117 -0
- package/dist/editor/useCollabReconcile.d.ts.map +1 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.d.ts +2 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.d.ts.map +1 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.js +248 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.js.map +1 -0
- package/dist/editor/useCollabReconcile.js +521 -0
- package/dist/editor/useCollabReconcile.js.map +1 -0
- package/dist/editor.css +587 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-toast.d.ts +45 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/use-toast.js +127 -0
- package/dist/hooks/use-toast.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/onboarding/index.d.ts +2 -0
- package/dist/onboarding/index.d.ts.map +1 -0
- package/dist/onboarding/index.js +2 -0
- package/dist/onboarding/index.js.map +1 -0
- package/dist/provider.d.ts +15 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +60 -0
- package/dist/provider.js.map +1 -0
- package/dist/sharing/SharePrimitives.d.ts +42 -0
- package/dist/sharing/SharePrimitives.d.ts.map +1 -0
- package/dist/sharing/SharePrimitives.js +53 -0
- package/dist/sharing/SharePrimitives.js.map +1 -0
- package/dist/sharing/VisibilityBadge.d.ts +11 -0
- package/dist/sharing/VisibilityBadge.d.ts.map +1 -0
- package/dist/sharing/VisibilityBadge.js +19 -0
- package/dist/sharing/VisibilityBadge.js.map +1 -0
- package/dist/sharing/VisibilityBadge.spec.d.ts +2 -0
- package/dist/sharing/VisibilityBadge.spec.d.ts.map +1 -0
- package/dist/sharing/VisibilityBadge.spec.js +60 -0
- package/dist/sharing/VisibilityBadge.spec.js.map +1 -0
- package/dist/sharing/index.d.ts +3 -0
- package/dist/sharing/index.d.ts.map +1 -0
- package/dist/sharing/index.js +3 -0
- package/dist/sharing/index.js.map +1 -0
- package/dist/styles.css +232 -0
- package/dist/ui/accordion.d.ts +8 -0
- package/dist/ui/accordion.d.ts.map +1 -0
- package/dist/ui/accordion.js +14 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert-dialog.d.ts +21 -0
- package/dist/ui/alert-dialog.d.ts.map +1 -0
- package/dist/ui/alert-dialog.js +27 -0
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/alert.d.ts +9 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/alert.js +23 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/aspect-ratio.d.ts +4 -0
- package/dist/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/ui/aspect-ratio.js +4 -0
- package/dist/ui/aspect-ratio.js.map +1 -0
- package/dist/ui/avatar.d.ts +7 -0
- package/dist/ui/avatar.d.ts.map +1 -0
- package/dist/ui/avatar.js +12 -0
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge.d.ts +10 -0
- package/dist/ui/badge.d.ts.map +1 -0
- package/dist/ui/badge.js +21 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/breadcrumb.d.ts +20 -0
- package/dist/ui/breadcrumb.d.ts.map +1 -0
- package/dist/ui/breadcrumb.js +24 -0
- package/dist/ui/breadcrumb.js.map +1 -0
- package/dist/ui/button.d.ts +18 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +67 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/calendar.d.ts +9 -0
- package/dist/ui/calendar.d.ts.map +1 -0
- package/dist/ui/calendar.js +74 -0
- package/dist/ui/calendar.js.map +1 -0
- package/dist/ui/card.d.ts +9 -0
- package/dist/ui/card.d.ts.map +1 -0
- package/dist/ui/card.js +17 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/carousel.d.ts +19 -0
- package/dist/ui/carousel.d.ts.map +1 -0
- package/dist/ui/carousel.js +99 -0
- package/dist/ui/carousel.js.map +1 -0
- package/dist/ui/chart.d.ts +80 -0
- package/dist/ui/chart.d.ts.map +1 -0
- package/dist/ui/chart.js +131 -0
- package/dist/ui/chart.js.map +1 -0
- package/dist/ui/checkbox.d.ts +5 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.js +9 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/collapsible.d.ts +6 -0
- package/dist/ui/collapsible.d.ts.map +1 -0
- package/dist/ui/collapsible.js +6 -0
- package/dist/ui/collapsible.js.map +1 -0
- package/dist/ui/command.d.ts +85 -0
- package/dist/ui/command.d.ts.map +1 -0
- package/dist/ui/command.js +29 -0
- package/dist/ui/command.js.map +1 -0
- package/dist/ui/command.spec.d.ts +2 -0
- package/dist/ui/command.spec.d.ts.map +1 -0
- package/dist/ui/command.spec.js +29 -0
- package/dist/ui/command.spec.js.map +1 -0
- package/dist/ui/context-menu.d.ts +28 -0
- package/dist/ui/context-menu.d.ts.map +1 -0
- package/dist/ui/context-menu.js +34 -0
- package/dist/ui/context-menu.js.map +1 -0
- package/dist/ui/date-picker.d.ts +10 -0
- package/dist/ui/date-picker.d.ts.map +1 -0
- package/dist/ui/date-picker.js +20 -0
- package/dist/ui/date-picker.js.map +1 -0
- package/dist/ui/dialog.d.ts +32 -0
- package/dist/ui/dialog.d.ts.map +1 -0
- package/dist/ui/dialog.js +26 -0
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/dialog.spec.d.ts +2 -0
- package/dist/ui/dialog.spec.d.ts.map +1 -0
- package/dist/ui/dialog.spec.js +21 -0
- package/dist/ui/dialog.spec.js.map +1 -0
- package/dist/ui/drawer.d.ts +35 -0
- package/dist/ui/drawer.d.ts.map +1 -0
- package/dist/ui/drawer.js +25 -0
- package/dist/ui/drawer.js.map +1 -0
- package/dist/ui/dropdown-menu.d.ts +32 -0
- package/dist/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/dropdown-menu.js +42 -0
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/form.d.ts +26 -0
- package/dist/ui/form.d.ts.map +1 -0
- package/dist/ui/form.js +63 -0
- package/dist/ui/form.js.map +1 -0
- package/dist/ui/hover-card.d.ts +7 -0
- package/dist/ui/hover-card.d.ts.map +1 -0
- package/dist/ui/hover-card.js +10 -0
- package/dist/ui/hover-card.js.map +1 -0
- package/dist/ui/index.d.ts +53 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +53 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/input-otp.d.ts +35 -0
- package/dist/ui/input-otp.d.ts.map +1 -0
- package/dist/ui/input-otp.js +19 -0
- package/dist/ui/input-otp.js.map +1 -0
- package/dist/ui/input.d.ts +4 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.js +9 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/label.d.ts +6 -0
- package/dist/ui/label.d.ts.map +1 -0
- package/dist/ui/label.js +10 -0
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/logo.d.ts +7 -0
- package/dist/ui/logo.d.ts.map +1 -0
- package/dist/ui/logo.js +10 -0
- package/dist/ui/logo.js.map +1 -0
- package/dist/ui/menubar.d.ts +29 -0
- package/dist/ui/menubar.d.ts.map +1 -0
- package/dist/ui/menubar.js +36 -0
- package/dist/ui/menubar.js.map +1 -0
- package/dist/ui/navigation-menu.d.ts +13 -0
- package/dist/ui/navigation-menu.d.ts.map +1 -0
- package/dist/ui/navigation-menu.js +25 -0
- package/dist/ui/navigation-menu.js.map +1 -0
- package/dist/ui/pagination.d.ts +29 -0
- package/dist/ui/pagination.d.ts.map +1 -0
- package/dist/ui/pagination.js +24 -0
- package/dist/ui/pagination.js.map +1 -0
- package/dist/ui/popover.d.ts +11 -0
- package/dist/ui/popover.d.ts.map +1 -0
- package/dist/ui/popover.js +16 -0
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/progress.d.ts +5 -0
- package/dist/ui/progress.d.ts.map +1 -0
- package/dist/ui/progress.js +8 -0
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/radio-group.d.ts +6 -0
- package/dist/ui/radio-group.d.ts.map +1 -0
- package/dist/ui/radio-group.js +15 -0
- package/dist/ui/radio-group.js.map +1 -0
- package/dist/ui/resizable.d.ts +8 -0
- package/dist/ui/resizable.d.ts.map +1 -0
- package/dist/ui/resizable.js +9 -0
- package/dist/ui/resizable.js.map +1 -0
- package/dist/ui/scroll-area.d.ts +6 -0
- package/dist/ui/scroll-area.d.ts.map +1 -0
- package/dist/ui/scroll-area.js +12 -0
- package/dist/ui/scroll-area.js.map +1 -0
- package/dist/ui/select.d.ts +16 -0
- package/dist/ui/select.d.ts.map +1 -0
- package/dist/ui/select.js +27 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.d.ts +5 -0
- package/dist/ui/separator.d.ts.map +1 -0
- package/dist/ui/separator.js +8 -0
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/sheet.d.ts +29 -0
- package/dist/ui/sheet.d.ts.map +1 -0
- package/dist/ui/sheet.js +37 -0
- package/dist/ui/sheet.js.map +1 -0
- package/dist/ui/sidebar.d.ts +71 -0
- package/dist/ui/sidebar.d.ts.map +1 -0
- package/dist/ui/sidebar.js +230 -0
- package/dist/ui/sidebar.js.map +1 -0
- package/dist/ui/skeleton.d.ts +3 -0
- package/dist/ui/skeleton.d.ts.map +1 -0
- package/dist/ui/skeleton.js +7 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/slider.d.ts +5 -0
- package/dist/ui/slider.d.ts.map +1 -0
- package/dist/ui/slider.js +8 -0
- package/dist/ui/slider.js.map +1 -0
- package/dist/ui/sonner.d.ts +5 -0
- package/dist/ui/sonner.d.ts.map +1 -0
- package/dist/ui/sonner.js +25 -0
- package/dist/ui/sonner.js.map +1 -0
- package/dist/ui/spinner.d.ts +3 -0
- package/dist/ui/spinner.d.ts.map +1 -0
- package/dist/ui/spinner.js +7 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/switch.d.ts +5 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/ui/switch.js +8 -0
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.d.ts +11 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.js +21 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.d.ts +8 -0
- package/dist/ui/tabs.d.ts.map +1 -0
- package/dist/ui/tabs.js +13 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/textarea.d.ts +6 -0
- package/dist/ui/textarea.d.ts.map +1 -0
- package/dist/ui/textarea.js +9 -0
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/toast.d.ts +16 -0
- package/dist/ui/toast.d.ts.map +1 -0
- package/dist/ui/toast.js +34 -0
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/toaster.d.ts +2 -0
- package/dist/ui/toaster.d.ts.map +1 -0
- package/dist/ui/toaster.js +10 -0
- package/dist/ui/toaster.js.map +1 -0
- package/dist/ui/toggle-group.d.ts +13 -0
- package/dist/ui/toggle-group.d.ts.map +1 -0
- package/dist/ui/toggle-group.js +21 -0
- package/dist/ui/toggle-group.js.map +1 -0
- package/dist/ui/toggle.d.ts +13 -0
- package/dist/ui/toggle.d.ts.map +1 -0
- package/dist/ui/toggle.js +26 -0
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.d.ts +11 -0
- package/dist/ui/tooltip.d.ts.map +1 -0
- package/dist/ui/tooltip.js +18 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/ui/use-toast.d.ts +3 -0
- package/dist/ui/use-toast.d.ts.map +1 -0
- package/dist/ui/use-toast.js +3 -0
- package/dist/ui/use-toast.js.map +1 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +7 -0
- package/dist/utils.js.map +1 -0
- package/migration-manifest.json +4 -0
- package/package.json +369 -0
- package/src/app-shell/header-actions.tsx +84 -0
- package/src/app-shell/index.ts +2 -0
- package/src/app-shell/sidebar-footer-actions.spec.tsx +81 -0
- package/src/app-shell/sidebar-footer-actions.tsx +45 -0
- package/src/canvas-annotations/CanvasCommentPins.tsx +861 -0
- package/src/canvas-annotations/DrawOverlay.spec.tsx +145 -0
- package/src/canvas-annotations/DrawOverlay.tsx +1233 -0
- package/src/canvas-annotations/index.ts +15 -0
- package/src/canvas-annotations/types.ts +14 -0
- package/src/canvas-interactions/canvas-interactions.spec.ts +765 -0
- package/src/canvas-interactions/canvas-interactions.ts +965 -0
- package/src/canvas-interactions/index.ts +67 -0
- package/src/chat-history/ChatHistoryList.spec.tsx +485 -0
- package/src/chat-history/ChatHistoryList.tsx +481 -0
- package/src/chat-history/ChatHistoryRail.spec.tsx +312 -0
- package/src/chat-history/ChatHistoryRail.tsx +150 -0
- package/src/chat-history/index.ts +21 -0
- package/src/chat-history/useChatHistoryRailController.spec.tsx +131 -0
- package/src/chat-history/useChatHistoryRailController.ts +76 -0
- package/src/chat-history.css +469 -0
- package/src/collab-ui/AgentPresenceChip.tsx +69 -0
- package/src/collab-ui/LiveCursorOverlay.tsx +241 -0
- package/src/collab-ui/PresenceBar.spec.tsx +44 -0
- package/src/collab-ui/PresenceBar.tsx +373 -0
- package/src/collab-ui/RecentEditHighlights.tsx +239 -0
- package/src/collab-ui/RemoteSelectionRings.tsx +227 -0
- package/src/collab-ui/agent-identity.ts +16 -0
- package/src/collab-ui/index.ts +39 -0
- package/src/collab-ui/lead-client.ts +32 -0
- package/src/collab-ui/types.spec.ts +18 -0
- package/src/collab-ui/types.ts +96 -0
- package/src/composer/AgentComposerFrame.tsx +62 -0
- package/src/composer/ComposerPlusMenu.spec.ts +14 -0
- package/src/composer/ComposerPlusMenu.tsx +1266 -0
- package/src/composer/MentionPopover.tsx +483 -0
- package/src/composer/PastedTextChip.spec.tsx +58 -0
- package/src/composer/PastedTextChip.tsx +178 -0
- package/src/composer/PromptComposer.spec.ts +110 -0
- package/src/composer/PromptComposer.tsx +796 -0
- package/src/composer/RealtimeVoiceMode.spec.tsx +998 -0
- package/src/composer/RealtimeVoiceMode.tsx +1019 -0
- package/src/composer/TiptapComposer.spec.ts +592 -0
- package/src/composer/TiptapComposer.tsx +3746 -0
- package/src/composer/VoiceButton.spec.ts +49 -0
- package/src/composer/VoiceButton.tsx +329 -0
- package/src/composer/asset-picker-url.spec.ts +56 -0
- package/src/composer/asset-picker-url.ts +80 -0
- package/src/composer/attachment-accept.spec.ts +32 -0
- package/src/composer/attachment-accept.ts +75 -0
- package/src/composer/draft-key.spec.ts +19 -0
- package/src/composer/draft-key.ts +7 -0
- package/src/composer/extensions/FileReference.tsx +55 -0
- package/src/composer/extensions/MentionReference.tsx +93 -0
- package/src/composer/extensions/SkillReference.tsx +56 -0
- package/src/composer/index.ts +86 -0
- package/src/composer/model-selection.spec.ts +45 -0
- package/src/composer/model-selection.ts +51 -0
- package/src/composer/pasted-text.spec.ts +162 -0
- package/src/composer/pasted-text.ts +160 -0
- package/src/composer/prompt-attachments.spec.ts +80 -0
- package/src/composer/prompt-attachments.ts +93 -0
- package/src/composer/realtime-voice-audio-level.spec.ts +47 -0
- package/src/composer/realtime-voice-audio-level.ts +65 -0
- package/src/composer/realtime-voice-transcript.spec.ts +95 -0
- package/src/composer/realtime-voice-transcript.ts +134 -0
- package/src/composer/runtime-adapters.spec.tsx +102 -0
- package/src/composer/runtime-adapters.tsx +364 -0
- package/src/composer/types.ts +66 -0
- package/src/composer/use-file-search.ts +64 -0
- package/src/composer/use-mention-search.ts +90 -0
- package/src/composer/use-skills.ts +45 -0
- package/src/composer/useRealtimeVoiceMode.spec.ts +952 -0
- package/src/composer/useRealtimeVoiceMode.tsx +2388 -0
- package/src/composer/useVoiceDictation.browser.spec.tsx +265 -0
- package/src/composer/useVoiceDictation.spec.ts +45 -0
- package/src/composer/useVoiceDictation.ts +1256 -0
- package/src/conformance/__fixtures__/css-in-js-adapter.tsx +401 -0
- package/src/conformance/conformance.spec.tsx +143 -0
- package/src/conformance/index.ts +3 -0
- package/src/conformance/runner.tsx +862 -0
- package/src/conformance/types.ts +45 -0
- package/src/conformance/version.ts +22 -0
- package/src/context-ui/ContextMeter.spec.tsx +73 -0
- package/src/context-ui/ContextMeter.tsx +131 -0
- package/src/context-ui/ContextSegmentRow.tsx +273 -0
- package/src/context-ui/ContextTreemap.tsx +131 -0
- package/src/context-ui/ContextXRayPanel.tsx +491 -0
- package/src/context-ui/format.ts +42 -0
- package/src/context-ui/index.ts +15 -0
- package/src/context-ui/types.ts +57 -0
- package/src/dashboard/DataTable.tsx +273 -0
- package/src/dashboard/DateRangePicker.tsx +57 -0
- package/src/dashboard/GenericChartPanel.spec.tsx +53 -0
- package/src/dashboard/GenericChartPanel.tsx +461 -0
- package/src/dashboard/MetricCard.tsx +54 -0
- package/src/dashboard/StatsCard.tsx +49 -0
- package/src/dashboard/dashboard-layout.spec.ts +79 -0
- package/src/dashboard/dashboard-layout.ts +329 -0
- package/src/dashboard/index.ts +6 -0
- package/src/data-grid/DataGrid.spec.tsx +243 -0
- package/src/data-grid/DataGrid.tsx +754 -0
- package/src/data-grid/index.ts +15 -0
- package/src/design-system/components.tsx +196 -0
- package/src/design-system/context.tsx +31 -0
- package/src/design-system/default-adapter.spec.tsx +158 -0
- package/src/design-system/default-adapter.tsx +923 -0
- package/src/design-system/definition.ts +14 -0
- package/src/design-system/design-system.spec.tsx +356 -0
- package/src/design-system/error-boundary.tsx +37 -0
- package/src/design-system/index.ts +7 -0
- package/src/design-system/theme.spec.ts +61 -0
- package/src/design-system/theme.ts +145 -0
- package/src/design-system/types.ts +367 -0
- package/src/design-tweaks/index.ts +1 -0
- package/src/design-tweaks/scrub-input-utils.ts +311 -0
- package/src/design-tweaks/scrub-input.tsx +525 -0
- package/src/design-tweaks/visual-style-controls.spec.tsx +172 -0
- package/src/design-tweaks/visual-style-controls.tsx +1043 -0
- package/src/editor/BubbleToolbar.tsx +253 -0
- package/src/editor/CodeBlockNode.tsx +254 -0
- package/src/editor/DragHandle.spec.ts +694 -0
- package/src/editor/DragHandle.ts +1491 -0
- package/src/editor/ImageExtension.roundtrip.spec.ts +117 -0
- package/src/editor/ImageExtension.ts +306 -0
- package/src/editor/RegistryBlockContext.tsx +107 -0
- package/src/editor/RegistryBlockNode.spec.ts +279 -0
- package/src/editor/RegistryBlockNode.tsx +652 -0
- package/src/editor/RichMarkdownEditor.collab.spec.ts +79 -0
- package/src/editor/RichMarkdownEditor.roundtrip.spec.ts +226 -0
- package/src/editor/RichMarkdownEditor.tsx +81 -0
- package/src/editor/RunId.ts +61 -0
- package/src/editor/SharedRichEditor.spec.tsx +82 -0
- package/src/editor/SharedRichEditor.tsx +353 -0
- package/src/editor/SlashCommandMenu.spec.ts +90 -0
- package/src/editor/SlashCommandMenu.tsx +396 -0
- package/src/editor/disableHistory.spec.ts +85 -0
- package/src/editor/extensions.ts +454 -0
- package/src/editor/gfmDoc.spec.ts +230 -0
- package/src/editor/gfmDoc.ts +92 -0
- package/src/editor/index.ts +96 -0
- package/src/editor/registrySlashCommands.ts +131 -0
- package/src/editor/structuralReorderUndo.spec.ts +144 -0
- package/src/editor/surgical-apply.spec.ts +279 -0
- package/src/editor/surgical-apply.ts +192 -0
- package/src/editor/useCollabReconcile.concurrent.spec.ts +781 -0
- package/src/editor/useCollabReconcile.idempotent.spec.ts +324 -0
- package/src/editor/useCollabReconcile.ts +684 -0
- package/src/editor.css +587 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/use-mobile.tsx +21 -0
- package/src/hooks/use-toast.ts +188 -0
- package/src/index.ts +10 -0
- package/src/onboarding/index.ts +1 -0
- package/src/provider.tsx +148 -0
- package/src/sharing/SharePrimitives.tsx +224 -0
- package/src/sharing/VisibilityBadge.spec.ts +96 -0
- package/src/sharing/VisibilityBadge.tsx +37 -0
- package/src/sharing/index.ts +16 -0
- package/src/styles.css +232 -0
- package/src/ui/accordion.tsx +56 -0
- package/src/ui/alert-dialog.tsx +141 -0
- package/src/ui/alert.tsx +59 -0
- package/src/ui/aspect-ratio.tsx +5 -0
- package/src/ui/avatar.tsx +48 -0
- package/src/ui/badge.tsx +37 -0
- package/src/ui/breadcrumb.tsx +115 -0
- package/src/ui/button.tsx +167 -0
- package/src/ui/calendar.tsx +214 -0
- package/src/ui/card.tsx +86 -0
- package/src/ui/carousel.tsx +260 -0
- package/src/ui/chart.tsx +375 -0
- package/src/ui/checkbox.tsx +28 -0
- package/src/ui/collapsible.tsx +9 -0
- package/src/ui/command.spec.tsx +51 -0
- package/src/ui/command.tsx +174 -0
- package/src/ui/context-menu.tsx +202 -0
- package/src/ui/date-picker.tsx +67 -0
- package/src/ui/dialog.spec.tsx +43 -0
- package/src/ui/dialog.tsx +171 -0
- package/src/ui/drawer.tsx +126 -0
- package/src/ui/dropdown-menu.tsx +222 -0
- package/src/ui/form.tsx +177 -0
- package/src/ui/hover-card.tsx +27 -0
- package/src/ui/index.ts +52 -0
- package/src/ui/input-otp.tsx +69 -0
- package/src/ui/input.tsx +22 -0
- package/src/ui/label.tsx +24 -0
- package/src/ui/logo.tsx +36 -0
- package/src/ui/menubar.tsx +235 -0
- package/src/ui/navigation-menu.tsx +128 -0
- package/src/ui/pagination.tsx +121 -0
- package/src/ui/popover.tsx +58 -0
- package/src/ui/progress.tsx +27 -0
- package/src/ui/radio-group.tsx +42 -0
- package/src/ui/resizable.tsx +43 -0
- package/src/ui/scroll-area.tsx +46 -0
- package/src/ui/select.tsx +162 -0
- package/src/ui/separator.tsx +29 -0
- package/src/ui/sheet.tsx +160 -0
- package/src/ui/sidebar.tsx +776 -0
- package/src/ui/skeleton.tsx +18 -0
- package/src/ui/slider.tsx +26 -0
- package/src/ui/sonner.tsx +58 -0
- package/src/ui/spinner.tsx +17 -0
- package/src/ui/switch.tsx +27 -0
- package/src/ui/table.tsx +110 -0
- package/src/ui/tabs.tsx +53 -0
- package/src/ui/textarea.tsx +23 -0
- package/src/ui/toast.tsx +127 -0
- package/src/ui/toaster.tsx +33 -0
- package/src/ui/toggle-group.tsx +59 -0
- package/src/ui/toggle.tsx +43 -0
- package/src/ui/tooltip.tsx +57 -0
- package/src/ui/use-toast.ts +3 -0
- package/src/utils.ts +8 -0
|
@@ -0,0 +1,694 @@
|
|
|
1
|
+
// @vitest-environment happy-dom
|
|
2
|
+
|
|
3
|
+
import { Editor } from "@tiptap/core";
|
|
4
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
5
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
DragHandle,
|
|
9
|
+
dragPreviewTransform,
|
|
10
|
+
type DragHandleOptions,
|
|
11
|
+
} from "./DragHandle.js";
|
|
12
|
+
|
|
13
|
+
describe("dragPreviewTransform", () => {
|
|
14
|
+
it("keeps the grabbed point under the pointer", () => {
|
|
15
|
+
expect(
|
|
16
|
+
dragPreviewTransform({
|
|
17
|
+
clientX: 180,
|
|
18
|
+
clientY: 240,
|
|
19
|
+
pointerOffsetX: 32,
|
|
20
|
+
pointerOffsetY: 9,
|
|
21
|
+
}),
|
|
22
|
+
).toBe("translate3d(148px, 231px, 0)");
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
function makeRect({
|
|
27
|
+
left,
|
|
28
|
+
top,
|
|
29
|
+
width,
|
|
30
|
+
height,
|
|
31
|
+
}: {
|
|
32
|
+
left: number;
|
|
33
|
+
top: number;
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
}): DOMRect {
|
|
37
|
+
return {
|
|
38
|
+
x: left,
|
|
39
|
+
y: top,
|
|
40
|
+
left,
|
|
41
|
+
top,
|
|
42
|
+
width,
|
|
43
|
+
height,
|
|
44
|
+
right: left + width,
|
|
45
|
+
bottom: top + height,
|
|
46
|
+
toJSON: () => ({}),
|
|
47
|
+
} as DOMRect;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function setRect(element: Element, rect: DOMRect): void {
|
|
51
|
+
Object.defineProperty(element, "getBoundingClientRect", {
|
|
52
|
+
configurable: true,
|
|
53
|
+
value: () => rect,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function mountEditor(
|
|
58
|
+
content: string,
|
|
59
|
+
options: Partial<DragHandleOptions> = {},
|
|
60
|
+
rect: DOMRect = makeRect({ left: 24, top: 0, width: 640, height: 400 }),
|
|
61
|
+
parent: HTMLElement = document.body,
|
|
62
|
+
hoverPoint: { x: number; y: number } = { x: 32, y: rect.top + 12 },
|
|
63
|
+
): {
|
|
64
|
+
editor: Editor;
|
|
65
|
+
wrapper: HTMLElement;
|
|
66
|
+
handle: HTMLElement;
|
|
67
|
+
} {
|
|
68
|
+
const wrapper = document.createElement("div");
|
|
69
|
+
wrapper.className = "visual-editor-wrapper";
|
|
70
|
+
setRect(wrapper, rect);
|
|
71
|
+
parent.appendChild(wrapper);
|
|
72
|
+
|
|
73
|
+
const element = document.createElement("div");
|
|
74
|
+
wrapper.appendChild(element);
|
|
75
|
+
|
|
76
|
+
const editor = new Editor({
|
|
77
|
+
element,
|
|
78
|
+
extensions: [StarterKit, DragHandle.configure(options)],
|
|
79
|
+
content,
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
setRect(editor.view.dom, rect);
|
|
83
|
+
|
|
84
|
+
let index = 0;
|
|
85
|
+
editor.state.doc.forEach((_node, offset) => {
|
|
86
|
+
const dom = editor.view.nodeDOM(offset);
|
|
87
|
+
if (dom instanceof HTMLElement) {
|
|
88
|
+
setRect(
|
|
89
|
+
dom,
|
|
90
|
+
makeRect({
|
|
91
|
+
left: 24,
|
|
92
|
+
top: rect.top + index * 40,
|
|
93
|
+
width: 640,
|
|
94
|
+
height: 24,
|
|
95
|
+
}),
|
|
96
|
+
);
|
|
97
|
+
index += 1;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
document.dispatchEvent(
|
|
102
|
+
new MouseEvent("mousemove", {
|
|
103
|
+
bubbles: true,
|
|
104
|
+
clientX: hoverPoint.x,
|
|
105
|
+
clientY: hoverPoint.y,
|
|
106
|
+
}),
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
const handle = wrapper.querySelector<HTMLElement>(".drag-handle");
|
|
110
|
+
if (!handle) throw new Error("Expected drag handle to mount");
|
|
111
|
+
setRect(
|
|
112
|
+
handle,
|
|
113
|
+
makeRect({ left: 0, top: rect.top + 2, width: 24, height: 24 }),
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
return { editor, wrapper, handle };
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function hoverAt(x: number, y: number): void {
|
|
120
|
+
document.dispatchEvent(
|
|
121
|
+
new MouseEvent("mousemove", {
|
|
122
|
+
bubbles: true,
|
|
123
|
+
clientX: x,
|
|
124
|
+
clientY: y,
|
|
125
|
+
}),
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function clickHandle(handle: HTMLElement): void {
|
|
130
|
+
handle.dispatchEvent(
|
|
131
|
+
new MouseEvent("mousedown", {
|
|
132
|
+
bubbles: true,
|
|
133
|
+
button: 0,
|
|
134
|
+
clientX: 12,
|
|
135
|
+
clientY: 12,
|
|
136
|
+
}),
|
|
137
|
+
);
|
|
138
|
+
document.dispatchEvent(
|
|
139
|
+
new MouseEvent("mouseup", {
|
|
140
|
+
bubbles: true,
|
|
141
|
+
button: 0,
|
|
142
|
+
clientX: 12,
|
|
143
|
+
clientY: 12,
|
|
144
|
+
}),
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function getMenuItems(): HTMLButtonElement[] {
|
|
149
|
+
return Array.from(
|
|
150
|
+
document.querySelectorAll<HTMLButtonElement>(".an-rich-md-drag-menu__item"),
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function clickMenuItem(label: string): void {
|
|
155
|
+
const item = getMenuItems().find((button) =>
|
|
156
|
+
button.textContent?.includes(label),
|
|
157
|
+
);
|
|
158
|
+
if (!item) throw new Error(`Expected menu item "${label}"`);
|
|
159
|
+
item.dispatchEvent(new MouseEvent("click", { bubbles: true }));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function childText(editor: Editor, index: number): string {
|
|
163
|
+
return editor.state.doc.child(index).textContent;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function focusEditorWithNativeSelection(editor: Editor): void {
|
|
167
|
+
editor.view.dom.focus();
|
|
168
|
+
editor.commands.setTextSelection({ from: 1, to: 3 });
|
|
169
|
+
const textNode = editor.view.dom.querySelector("p")?.firstChild;
|
|
170
|
+
if (!(textNode instanceof Text)) {
|
|
171
|
+
throw new Error("Expected a paragraph text node");
|
|
172
|
+
}
|
|
173
|
+
const range = document.createRange();
|
|
174
|
+
range.setStart(textNode, 0);
|
|
175
|
+
range.setEnd(textNode, Math.min(2, textNode.length));
|
|
176
|
+
const selection = window.getSelection();
|
|
177
|
+
selection?.removeAllRanges();
|
|
178
|
+
selection?.addRange(range);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
afterEach(() => {
|
|
182
|
+
document.body.innerHTML = "";
|
|
183
|
+
document
|
|
184
|
+
.querySelectorAll("#an-rich-md-drag-menu-styles")
|
|
185
|
+
.forEach((node) => node.remove());
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
describe("DragHandle menu", () => {
|
|
189
|
+
it("opens the block menu on a single click", () => {
|
|
190
|
+
const { editor, handle } = mountEditor("<p>First</p><p>Second</p>");
|
|
191
|
+
|
|
192
|
+
try {
|
|
193
|
+
clickHandle(handle);
|
|
194
|
+
|
|
195
|
+
const items = getMenuItems();
|
|
196
|
+
expect(items.map((item) => item.textContent)).toEqual([
|
|
197
|
+
"Duplicate",
|
|
198
|
+
"Delete",
|
|
199
|
+
"Insert block below",
|
|
200
|
+
]);
|
|
201
|
+
expect(document.activeElement).toBe(items[0]);
|
|
202
|
+
} finally {
|
|
203
|
+
editor.destroy();
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
it("inserts an empty focused paragraph below the current block", () => {
|
|
208
|
+
const { editor, handle } = mountEditor("<p>First</p><p>Second</p>");
|
|
209
|
+
|
|
210
|
+
try {
|
|
211
|
+
clickHandle(handle);
|
|
212
|
+
clickMenuItem("Insert block below");
|
|
213
|
+
|
|
214
|
+
expect(editor.state.doc.childCount).toBe(3);
|
|
215
|
+
expect(childText(editor, 0)).toBe("First");
|
|
216
|
+
expect(childText(editor, 1)).toBe("");
|
|
217
|
+
expect(childText(editor, 2)).toBe("Second");
|
|
218
|
+
expect(editor.state.selection.$from.parent.type.name).toBe("paragraph");
|
|
219
|
+
expect(editor.state.selection.$from.parent.textContent).toBe("");
|
|
220
|
+
} finally {
|
|
221
|
+
editor.destroy();
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
it("duplicates and deletes the current block from the menu", () => {
|
|
226
|
+
const { editor, handle } = mountEditor("<p>First</p><p>Second</p>");
|
|
227
|
+
|
|
228
|
+
try {
|
|
229
|
+
clickHandle(handle);
|
|
230
|
+
clickMenuItem("Duplicate");
|
|
231
|
+
|
|
232
|
+
expect(editor.state.doc.childCount).toBe(3);
|
|
233
|
+
expect(childText(editor, 0)).toBe("First");
|
|
234
|
+
expect(childText(editor, 1)).toBe("First");
|
|
235
|
+
expect(childText(editor, 2)).toBe("Second");
|
|
236
|
+
|
|
237
|
+
document.dispatchEvent(
|
|
238
|
+
new MouseEvent("mousemove", {
|
|
239
|
+
bubbles: true,
|
|
240
|
+
clientX: 32,
|
|
241
|
+
clientY: 12,
|
|
242
|
+
}),
|
|
243
|
+
);
|
|
244
|
+
clickHandle(handle);
|
|
245
|
+
clickMenuItem("Delete");
|
|
246
|
+
|
|
247
|
+
expect(editor.state.doc.childCount).toBe(2);
|
|
248
|
+
expect(childText(editor, 0)).toBe("First");
|
|
249
|
+
expect(childText(editor, 1)).toBe("Second");
|
|
250
|
+
} finally {
|
|
251
|
+
editor.destroy();
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
it("keeps drag-to-reorder behavior when the handle is moved", () => {
|
|
256
|
+
const { editor, handle } = mountEditor("<p>First</p><p>Second</p>");
|
|
257
|
+
|
|
258
|
+
try {
|
|
259
|
+
focusEditorWithNativeSelection(editor);
|
|
260
|
+
expect(document.activeElement).toBe(editor.view.dom);
|
|
261
|
+
expect(window.getSelection()?.toString()).toBe("Fi");
|
|
262
|
+
handle.dispatchEvent(
|
|
263
|
+
new MouseEvent("mousedown", {
|
|
264
|
+
bubbles: true,
|
|
265
|
+
button: 0,
|
|
266
|
+
clientX: 12,
|
|
267
|
+
clientY: 12,
|
|
268
|
+
}),
|
|
269
|
+
);
|
|
270
|
+
document.dispatchEvent(
|
|
271
|
+
new MouseEvent("mousemove", {
|
|
272
|
+
bubbles: true,
|
|
273
|
+
clientX: 12,
|
|
274
|
+
clientY: 56,
|
|
275
|
+
}),
|
|
276
|
+
);
|
|
277
|
+
document.dispatchEvent(
|
|
278
|
+
new MouseEvent("mouseup", {
|
|
279
|
+
bubbles: true,
|
|
280
|
+
button: 0,
|
|
281
|
+
clientX: 12,
|
|
282
|
+
clientY: 56,
|
|
283
|
+
}),
|
|
284
|
+
);
|
|
285
|
+
|
|
286
|
+
expect(document.querySelector(".an-rich-md-drag-menu")).toBeNull();
|
|
287
|
+
expect(editor.state.doc.childCount).toBe(2);
|
|
288
|
+
expect(childText(editor, 0)).toBe("Second");
|
|
289
|
+
expect(childText(editor, 1)).toBe("First");
|
|
290
|
+
expect(editor.state.selection.empty).toBe(true);
|
|
291
|
+
expect(editor.isFocused).toBe(false);
|
|
292
|
+
expect(window.getSelection()?.toString()).toBe("");
|
|
293
|
+
|
|
294
|
+
expect(editor.commands.undo()).toBe(true);
|
|
295
|
+
expect(childText(editor, 0)).toBe("First");
|
|
296
|
+
expect(childText(editor, 1)).toBe("Second");
|
|
297
|
+
} finally {
|
|
298
|
+
editor.destroy();
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
it("preserves native selections outside the editor after a drop", () => {
|
|
303
|
+
const outside = document.createElement("p");
|
|
304
|
+
outside.textContent = "Keep this selection";
|
|
305
|
+
document.body.append(outside);
|
|
306
|
+
const { editor, handle } = mountEditor("<p>First</p><p>Second</p>");
|
|
307
|
+
|
|
308
|
+
try {
|
|
309
|
+
const textNode = outside.firstChild;
|
|
310
|
+
if (!(textNode instanceof Text)) {
|
|
311
|
+
throw new Error("Expected outside text");
|
|
312
|
+
}
|
|
313
|
+
const range = document.createRange();
|
|
314
|
+
range.setStart(textNode, 0);
|
|
315
|
+
range.setEnd(textNode, 4);
|
|
316
|
+
const selection = window.getSelection();
|
|
317
|
+
selection?.removeAllRanges();
|
|
318
|
+
selection?.addRange(range);
|
|
319
|
+
|
|
320
|
+
handle.dispatchEvent(
|
|
321
|
+
new MouseEvent("mousedown", {
|
|
322
|
+
bubbles: true,
|
|
323
|
+
button: 0,
|
|
324
|
+
clientX: 12,
|
|
325
|
+
clientY: 12,
|
|
326
|
+
}),
|
|
327
|
+
);
|
|
328
|
+
document.dispatchEvent(
|
|
329
|
+
new MouseEvent("mousemove", {
|
|
330
|
+
bubbles: true,
|
|
331
|
+
clientX: 12,
|
|
332
|
+
clientY: 56,
|
|
333
|
+
}),
|
|
334
|
+
);
|
|
335
|
+
document.dispatchEvent(
|
|
336
|
+
new MouseEvent("mouseup", {
|
|
337
|
+
bubbles: true,
|
|
338
|
+
button: 0,
|
|
339
|
+
clientX: 12,
|
|
340
|
+
clientY: 56,
|
|
341
|
+
}),
|
|
342
|
+
);
|
|
343
|
+
|
|
344
|
+
expect(childText(editor, 0)).toBe("Second");
|
|
345
|
+
expect(childText(editor, 1)).toBe("First");
|
|
346
|
+
expect(window.getSelection()?.toString()).toBe("Keep");
|
|
347
|
+
} finally {
|
|
348
|
+
editor.destroy();
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
it("moves a block across registered editor regions and passes transfer payloads", () => {
|
|
353
|
+
const transferData = { blockId: "source-block-1", extra: "side-map data" };
|
|
354
|
+
const getDragTransferData = vi.fn(() => transferData);
|
|
355
|
+
const receiveDragTransferData = vi.fn();
|
|
356
|
+
const source = mountEditor(
|
|
357
|
+
"<p>Move me</p><p>Keep source</p>",
|
|
358
|
+
{ getDragTransferData },
|
|
359
|
+
makeRect({ left: 24, top: 0, width: 640, height: 120 }),
|
|
360
|
+
);
|
|
361
|
+
const target = mountEditor(
|
|
362
|
+
"<p>Target first</p><p>Target second</p>",
|
|
363
|
+
{ receiveDragTransferData },
|
|
364
|
+
makeRect({ left: 24, top: 160, width: 640, height: 120 }),
|
|
365
|
+
);
|
|
366
|
+
|
|
367
|
+
try {
|
|
368
|
+
focusEditorWithNativeSelection(source.editor);
|
|
369
|
+
hoverAt(32, 12);
|
|
370
|
+
source.handle.dispatchEvent(
|
|
371
|
+
new MouseEvent("mousedown", {
|
|
372
|
+
bubbles: true,
|
|
373
|
+
button: 0,
|
|
374
|
+
clientX: 12,
|
|
375
|
+
clientY: 12,
|
|
376
|
+
}),
|
|
377
|
+
);
|
|
378
|
+
document.dispatchEvent(
|
|
379
|
+
new MouseEvent("mousemove", {
|
|
380
|
+
bubbles: true,
|
|
381
|
+
clientX: 32,
|
|
382
|
+
clientY: 164,
|
|
383
|
+
}),
|
|
384
|
+
);
|
|
385
|
+
document.dispatchEvent(
|
|
386
|
+
new MouseEvent("mouseup", {
|
|
387
|
+
bubbles: true,
|
|
388
|
+
button: 0,
|
|
389
|
+
clientX: 32,
|
|
390
|
+
clientY: 164,
|
|
391
|
+
}),
|
|
392
|
+
);
|
|
393
|
+
|
|
394
|
+
expect(getDragTransferData).toHaveBeenCalledTimes(1);
|
|
395
|
+
expect(getDragTransferData).toHaveBeenCalledWith({
|
|
396
|
+
view: source.editor.view,
|
|
397
|
+
node: expect.objectContaining({ textContent: "Move me" }),
|
|
398
|
+
pos: 0,
|
|
399
|
+
});
|
|
400
|
+
expect(receiveDragTransferData).toHaveBeenCalledTimes(1);
|
|
401
|
+
expect(receiveDragTransferData).toHaveBeenCalledWith(transferData, {
|
|
402
|
+
view: target.editor.view,
|
|
403
|
+
node: expect.objectContaining({ textContent: "Move me" }),
|
|
404
|
+
pos: 0,
|
|
405
|
+
sourceView: source.editor.view,
|
|
406
|
+
});
|
|
407
|
+
expect(source.editor.state.doc.childCount).toBe(1);
|
|
408
|
+
expect(childText(source.editor, 0)).toBe("Keep source");
|
|
409
|
+
expect(target.editor.state.doc.childCount).toBe(3);
|
|
410
|
+
expect(childText(target.editor, 0)).toBe("Move me");
|
|
411
|
+
expect(childText(target.editor, 1)).toBe("Target first");
|
|
412
|
+
expect(childText(target.editor, 2)).toBe("Target second");
|
|
413
|
+
expect(source.editor.state.selection.empty).toBe(true);
|
|
414
|
+
expect(target.editor.state.selection.empty).toBe(true);
|
|
415
|
+
expect(source.editor.isFocused).toBe(false);
|
|
416
|
+
expect(target.editor.isFocused).toBe(false);
|
|
417
|
+
expect(window.getSelection()?.toString()).toBe("");
|
|
418
|
+
} finally {
|
|
419
|
+
source.editor.destroy();
|
|
420
|
+
target.editor.destroy();
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
it("lets a host handle left/right side drops without ProseMirror moving the node", () => {
|
|
425
|
+
const transferData = { blockId: "source-block-1", extra: "side-map data" };
|
|
426
|
+
const getDragTransferData = vi.fn(() => transferData);
|
|
427
|
+
const handleDrop = vi.fn(() => true);
|
|
428
|
+
const source = mountEditor(
|
|
429
|
+
"<p>Move me</p><p>Keep source</p>",
|
|
430
|
+
{ getDragTransferData },
|
|
431
|
+
makeRect({ left: 24, top: 0, width: 640, height: 120 }),
|
|
432
|
+
);
|
|
433
|
+
const target = mountEditor(
|
|
434
|
+
"<p>Target first</p><p>Target second</p>",
|
|
435
|
+
{ handleDrop },
|
|
436
|
+
makeRect({ left: 24, top: 160, width: 640, height: 120 }),
|
|
437
|
+
);
|
|
438
|
+
|
|
439
|
+
try {
|
|
440
|
+
focusEditorWithNativeSelection(source.editor);
|
|
441
|
+
hoverAt(32, 12);
|
|
442
|
+
source.handle.dispatchEvent(
|
|
443
|
+
new MouseEvent("mousedown", {
|
|
444
|
+
bubbles: true,
|
|
445
|
+
button: 0,
|
|
446
|
+
clientX: 12,
|
|
447
|
+
clientY: 12,
|
|
448
|
+
}),
|
|
449
|
+
);
|
|
450
|
+
document.dispatchEvent(
|
|
451
|
+
new MouseEvent("mousemove", {
|
|
452
|
+
bubbles: true,
|
|
453
|
+
clientX: 660,
|
|
454
|
+
clientY: 172,
|
|
455
|
+
}),
|
|
456
|
+
);
|
|
457
|
+
document.dispatchEvent(
|
|
458
|
+
new MouseEvent("mouseup", {
|
|
459
|
+
bubbles: true,
|
|
460
|
+
button: 0,
|
|
461
|
+
clientX: 660,
|
|
462
|
+
clientY: 172,
|
|
463
|
+
}),
|
|
464
|
+
);
|
|
465
|
+
|
|
466
|
+
expect(getDragTransferData).toHaveBeenCalledTimes(1);
|
|
467
|
+
expect(handleDrop).toHaveBeenCalledTimes(1);
|
|
468
|
+
expect(handleDrop).toHaveBeenCalledWith(
|
|
469
|
+
transferData,
|
|
470
|
+
expect.objectContaining({
|
|
471
|
+
view: target.editor.view,
|
|
472
|
+
sourceView: source.editor.view,
|
|
473
|
+
sourceNode: expect.objectContaining({ textContent: "Move me" }),
|
|
474
|
+
targetNode: expect.objectContaining({ textContent: "Target first" }),
|
|
475
|
+
placement: "right",
|
|
476
|
+
targetPos: 0,
|
|
477
|
+
}),
|
|
478
|
+
);
|
|
479
|
+
expect(source.editor.state.doc.childCount).toBe(2);
|
|
480
|
+
expect(childText(source.editor, 0)).toBe("Move me");
|
|
481
|
+
expect(childText(source.editor, 1)).toBe("Keep source");
|
|
482
|
+
expect(target.editor.state.doc.childCount).toBe(2);
|
|
483
|
+
expect(childText(target.editor, 0)).toBe("Target first");
|
|
484
|
+
expect(childText(target.editor, 1)).toBe("Target second");
|
|
485
|
+
expect(source.editor.state.selection.empty).toBe(true);
|
|
486
|
+
expect(target.editor.state.selection.empty).toBe(true);
|
|
487
|
+
expect(source.editor.isFocused).toBe(false);
|
|
488
|
+
expect(target.editor.isFocused).toBe(false);
|
|
489
|
+
expect(window.getSelection()?.toString()).toBe("");
|
|
490
|
+
} finally {
|
|
491
|
+
source.editor.destroy();
|
|
492
|
+
target.editor.destroy();
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
it("shows only the innermost drag grip when editor regions overlap", () => {
|
|
497
|
+
const outer = mountEditor(
|
|
498
|
+
"<p>Outer container</p>",
|
|
499
|
+
{},
|
|
500
|
+
makeRect({ left: 24, top: 0, width: 640, height: 320 }),
|
|
501
|
+
);
|
|
502
|
+
const outerBlock = outer.editor.view.nodeDOM(0);
|
|
503
|
+
if (outerBlock instanceof HTMLElement) {
|
|
504
|
+
setRect(
|
|
505
|
+
outerBlock,
|
|
506
|
+
makeRect({ left: 24, top: 0, width: 640, height: 280 }),
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
const inner = mountEditor(
|
|
510
|
+
"<p>Inner block</p>",
|
|
511
|
+
{},
|
|
512
|
+
makeRect({ left: 48, top: 160, width: 300, height: 90 }),
|
|
513
|
+
outer.wrapper,
|
|
514
|
+
{ x: 60, y: 172 },
|
|
515
|
+
);
|
|
516
|
+
|
|
517
|
+
try {
|
|
518
|
+
hoverAt(60, 172);
|
|
519
|
+
|
|
520
|
+
expect(inner.handle.style.display).toBe("flex");
|
|
521
|
+
expect(outer.handle.style.display).toBe("none");
|
|
522
|
+
} finally {
|
|
523
|
+
inner.editor.destroy();
|
|
524
|
+
outer.editor.destroy();
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
|
|
528
|
+
it("shows the outer container grip when hovering the shared left gutter", () => {
|
|
529
|
+
// A flush-left nested region (like the first column of a `columns` block)
|
|
530
|
+
// shares its container's left-margin gutter. Hovering that gutter — where the
|
|
531
|
+
// grip lives — must select the CONTAINER so it can be dragged to reorder,
|
|
532
|
+
// even though the nested editor is the smaller area. (Regression: nested
|
|
533
|
+
// column editors used to win everywhere, leaving the columns block ungrabbable.)
|
|
534
|
+
const outer = mountEditor(
|
|
535
|
+
"<p>Outer container</p>",
|
|
536
|
+
{},
|
|
537
|
+
makeRect({ left: 24, top: 0, width: 640, height: 320 }),
|
|
538
|
+
);
|
|
539
|
+
const outerBlock = outer.editor.view.nodeDOM(0);
|
|
540
|
+
if (outerBlock instanceof HTMLElement) {
|
|
541
|
+
setRect(
|
|
542
|
+
outerBlock,
|
|
543
|
+
makeRect({ left: 24, top: 0, width: 640, height: 280 }),
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
// Inner region mounted flush-left (block left === container left), mirroring a
|
|
547
|
+
// column that starts at the container's left edge.
|
|
548
|
+
const inner = mountEditor(
|
|
549
|
+
"<p>Inner block</p>",
|
|
550
|
+
{},
|
|
551
|
+
makeRect({ left: 24, top: 160, width: 300, height: 90 }),
|
|
552
|
+
outer.wrapper,
|
|
553
|
+
{ x: 60, y: 172 },
|
|
554
|
+
);
|
|
555
|
+
|
|
556
|
+
try {
|
|
557
|
+
// Over the inner body, the innermost (smallest) editor still wins.
|
|
558
|
+
hoverAt(60, 172);
|
|
559
|
+
expect(inner.handle.style.display).toBe("flex");
|
|
560
|
+
expect(outer.handle.style.display).toBe("none");
|
|
561
|
+
|
|
562
|
+
// In the shared left-margin gutter AT THE NESTED BLOCK'S ROW, the inner
|
|
563
|
+
// block owns the grip band — so a block inside a flush-left column stays
|
|
564
|
+
// grabbable there to drag OUT of / BETWEEN columns. Its grip glyph renders
|
|
565
|
+
// in this exact gutter, so flipping to the container here would make the
|
|
566
|
+
// block's own grip unclickable (the whole point of column drag handles).
|
|
567
|
+
hoverAt(10, 172);
|
|
568
|
+
expect(inner.handle.style.display).toBe("flex");
|
|
569
|
+
expect(outer.handle.style.display).toBe("none");
|
|
570
|
+
|
|
571
|
+
// In the gutter ABOVE the nested region (a row the container alone
|
|
572
|
+
// occupies), the container still wins, so the columns block itself remains
|
|
573
|
+
// grabbable — it just yields the rows where a nested block's grip lives.
|
|
574
|
+
hoverAt(10, 40);
|
|
575
|
+
expect(outer.handle.style.display).toBe("flex");
|
|
576
|
+
expect(inner.handle.style.display).toBe("none");
|
|
577
|
+
} finally {
|
|
578
|
+
inner.editor.destroy();
|
|
579
|
+
outer.editor.destroy();
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
|
|
583
|
+
it("moves a block from a nested editor region out to the parent editor", () => {
|
|
584
|
+
const target = mountEditor(
|
|
585
|
+
"<p>Outer target</p>",
|
|
586
|
+
{},
|
|
587
|
+
makeRect({ left: 24, top: 0, width: 640, height: 320 }),
|
|
588
|
+
);
|
|
589
|
+
const targetBlock = target.editor.view.nodeDOM(0);
|
|
590
|
+
if (targetBlock instanceof HTMLElement) {
|
|
591
|
+
setRect(
|
|
592
|
+
targetBlock,
|
|
593
|
+
makeRect({ left: 24, top: 0, width: 640, height: 280 }),
|
|
594
|
+
);
|
|
595
|
+
}
|
|
596
|
+
const source = mountEditor(
|
|
597
|
+
"<p>Nested move</p><p>Nested keep</p>",
|
|
598
|
+
{},
|
|
599
|
+
makeRect({ left: 48, top: 160, width: 300, height: 120 }),
|
|
600
|
+
target.wrapper,
|
|
601
|
+
{ x: 60, y: 172 },
|
|
602
|
+
);
|
|
603
|
+
|
|
604
|
+
try {
|
|
605
|
+
hoverAt(60, 172);
|
|
606
|
+
source.handle.dispatchEvent(
|
|
607
|
+
new MouseEvent("mousedown", {
|
|
608
|
+
bubbles: true,
|
|
609
|
+
button: 0,
|
|
610
|
+
clientX: 60,
|
|
611
|
+
clientY: 172,
|
|
612
|
+
}),
|
|
613
|
+
);
|
|
614
|
+
document.dispatchEvent(
|
|
615
|
+
new MouseEvent("mousemove", {
|
|
616
|
+
bubbles: true,
|
|
617
|
+
clientX: 32,
|
|
618
|
+
clientY: 12,
|
|
619
|
+
}),
|
|
620
|
+
);
|
|
621
|
+
document.dispatchEvent(
|
|
622
|
+
new MouseEvent("mouseup", {
|
|
623
|
+
bubbles: true,
|
|
624
|
+
button: 0,
|
|
625
|
+
clientX: 32,
|
|
626
|
+
clientY: 12,
|
|
627
|
+
}),
|
|
628
|
+
);
|
|
629
|
+
|
|
630
|
+
expect(source.editor.state.doc.childCount).toBe(1);
|
|
631
|
+
expect(childText(source.editor, 0)).toBe("Nested keep");
|
|
632
|
+
expect(target.editor.state.doc.childCount).toBe(2);
|
|
633
|
+
expect(childText(target.editor, 0)).toBe("Nested move");
|
|
634
|
+
expect(childText(target.editor, 1)).toBe("Outer target");
|
|
635
|
+
} finally {
|
|
636
|
+
source.editor.destroy();
|
|
637
|
+
target.editor.destroy();
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
|
|
641
|
+
it("keeps a non-left-aligned block's grip alive while the cursor approaches it", () => {
|
|
642
|
+
// A right column / tab body renders its grip in a gap, NOT the page-left
|
|
643
|
+
// gutter. Moving the cursor from that block's body toward its grip crosses
|
|
644
|
+
// into the neighbour's wide forgiving zone (and even its content), so the
|
|
645
|
+
// plain picker flips hover to the neighbour and the grip vanishes before the
|
|
646
|
+
// cursor reaches it. The keepalive must hold the grip across that approach.
|
|
647
|
+
// Here the right grip glyph sits at x:320–344 — LEFT of the 28px gutter band
|
|
648
|
+
// and inside the left region's content [24,336], so without keepalive the
|
|
649
|
+
// left region wins at x=330 and the right grip disappears.
|
|
650
|
+
const left = mountEditor(
|
|
651
|
+
"<p>Left region</p>",
|
|
652
|
+
{},
|
|
653
|
+
makeRect({ left: 24, top: 160, width: 312, height: 90 }),
|
|
654
|
+
document.body,
|
|
655
|
+
{ x: 100, y: 172 },
|
|
656
|
+
);
|
|
657
|
+
setRect(
|
|
658
|
+
left.editor.view.nodeDOM(0) as HTMLElement,
|
|
659
|
+
makeRect({ left: 24, top: 160, width: 312, height: 24 }),
|
|
660
|
+
);
|
|
661
|
+
const right = mountEditor(
|
|
662
|
+
"<p>Right region</p>",
|
|
663
|
+
{},
|
|
664
|
+
makeRect({ left: 360, top: 160, width: 300, height: 90 }),
|
|
665
|
+
document.body,
|
|
666
|
+
{ x: 500, y: 172 },
|
|
667
|
+
);
|
|
668
|
+
setRect(
|
|
669
|
+
right.editor.view.nodeDOM(0) as HTMLElement,
|
|
670
|
+
makeRect({ left: 360, top: 160, width: 300, height: 24 }),
|
|
671
|
+
);
|
|
672
|
+
// The right block's grip glyph, rendered in the inter-region gap.
|
|
673
|
+
setRect(
|
|
674
|
+
right.handle,
|
|
675
|
+
makeRect({ left: 320, top: 162, width: 24, height: 24 }),
|
|
676
|
+
);
|
|
677
|
+
|
|
678
|
+
try {
|
|
679
|
+
// Over the right block's body → its grip shows.
|
|
680
|
+
hoverAt(500, 172);
|
|
681
|
+
expect(right.handle.style.display).toBe("flex");
|
|
682
|
+
|
|
683
|
+
// Cursor moved left onto the right block's grip glyph (x=330). This is
|
|
684
|
+
// inside the LEFT region's content, so the plain picker would hand hover to
|
|
685
|
+
// the left region — the keepalive must keep the RIGHT grip visible.
|
|
686
|
+
hoverAt(330, 172);
|
|
687
|
+
expect(right.handle.style.display).toBe("flex");
|
|
688
|
+
expect(left.handle.style.display).toBe("none");
|
|
689
|
+
} finally {
|
|
690
|
+
right.editor.destroy();
|
|
691
|
+
left.editor.destroy();
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
});
|