@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,159 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { EditorContent, useEditor } from "@tiptap/react";
|
|
3
|
+
import { useEffect, useMemo, useRef } from "react";
|
|
4
|
+
import { cn } from "../utils.js";
|
|
5
|
+
import { BubbleToolbar } from "./BubbleToolbar.js";
|
|
6
|
+
import { DragHandle } from "./DragHandle.js";
|
|
7
|
+
import { createSharedEditorExtensions, } from "./extensions.js";
|
|
8
|
+
import { DEFAULT_SLASH_COMMANDS, filterSlashCommandItems, SlashCommandMenu, } from "./SlashCommandMenu.js";
|
|
9
|
+
import { useCollabReconcile, getEditorMarkdown, } from "./useCollabReconcile.js";
|
|
10
|
+
/**
|
|
11
|
+
* The single shared rich markdown editor surface. Combines
|
|
12
|
+
* {@link createSharedEditorExtensions} (schema + dialect-keyed markdown +
|
|
13
|
+
* optional collab + app extras), {@link useCollabReconcile} (seed / reconcile /
|
|
14
|
+
* lead-client logic), and the shared {@link SlashCommandMenu} +
|
|
15
|
+
* {@link BubbleToolbar}.
|
|
16
|
+
*
|
|
17
|
+
* With no `ydoc` it is a controlled `value`/`onChange` single-user editor.
|
|
18
|
+
* With a `ydoc` it binds the framework collaboration stack; markdown stays the
|
|
19
|
+
* canonical saved representation while the Y.Doc is transient live state.
|
|
20
|
+
*/
|
|
21
|
+
export function SharedRichEditor({ value, onChange, onBlur, contentUpdatedAt, editable = true, dialect = "gfm", preset = "plan", features, dragHandle = true, onImageUpload = null, extraExtensions, placeholder = "Type '/' for commands...", className, editorClassName, ariaLabel, interactive = editable, ydoc = null, collabSynced = true, awareness = null, user = null, disableHistory = false, slashItems, buildBubbleItems, getMarkdown, setContent, parseValue, normalizeValue, shouldSeed, initialAppliedUpdatedAt, wrapperClassName, onEditorReady, }) {
|
|
22
|
+
const readMarkdown = getMarkdown ?? getEditorMarkdown;
|
|
23
|
+
const onChangeRef = useRef(onChange);
|
|
24
|
+
const onBlurRef = useRef(onBlur);
|
|
25
|
+
onChangeRef.current = onChange;
|
|
26
|
+
onBlurRef.current = onBlur;
|
|
27
|
+
const effectiveExtraExtensions = useMemo(() => {
|
|
28
|
+
const extras = extraExtensions ?? [];
|
|
29
|
+
if (!dragHandle ||
|
|
30
|
+
extras.some((extension) => extension.name === "dragHandle")) {
|
|
31
|
+
return extras;
|
|
32
|
+
}
|
|
33
|
+
return [
|
|
34
|
+
DragHandle.configure({
|
|
35
|
+
wrapperSelector: ".an-rich-md-wrapper",
|
|
36
|
+
}),
|
|
37
|
+
...extras,
|
|
38
|
+
];
|
|
39
|
+
}, [dragHandle, extraExtensions]);
|
|
40
|
+
const extensions = useMemo(() => createSharedEditorExtensions({
|
|
41
|
+
dialect,
|
|
42
|
+
preset,
|
|
43
|
+
placeholder,
|
|
44
|
+
features,
|
|
45
|
+
extraExtensions: effectiveExtraExtensions,
|
|
46
|
+
onImageUpload,
|
|
47
|
+
collab: ydoc ? { ydoc, awareness, user } : null,
|
|
48
|
+
disableHistory,
|
|
49
|
+
}),
|
|
50
|
+
// `preset` is retained in the dependency list so future preset-specific
|
|
51
|
+
// schema branches re-create the editor; it is currently schema-neutral. The
|
|
52
|
+
// collab inputs are identity-stable per block (one Y.Doc per docId), so they
|
|
53
|
+
// only change on a genuine doc switch — exactly when the editor must
|
|
54
|
+
// re-create to rebind Collaboration.
|
|
55
|
+
[
|
|
56
|
+
dialect,
|
|
57
|
+
placeholder,
|
|
58
|
+
preset,
|
|
59
|
+
features,
|
|
60
|
+
effectiveExtraExtensions,
|
|
61
|
+
onImageUpload,
|
|
62
|
+
ydoc,
|
|
63
|
+
awareness,
|
|
64
|
+
user?.name,
|
|
65
|
+
user?.email,
|
|
66
|
+
user?.color,
|
|
67
|
+
disableHistory,
|
|
68
|
+
]);
|
|
69
|
+
const collab = !!ydoc;
|
|
70
|
+
const effectiveSlashItems = useMemo(() => filterSlashCommandItems(slashItems ?? DEFAULT_SLASH_COMMANDS, features), [features, slashItems]);
|
|
71
|
+
// The collab hook needs the editor, but useEditor's `onUpdate` needs the
|
|
72
|
+
// hook's guards. Break the cycle with a ref: `onUpdate` reads the guards
|
|
73
|
+
// through `guardsRef`, which is populated right after the hook runs below.
|
|
74
|
+
// `onUpdate` only ever fires after the editor exists, by which point the ref
|
|
75
|
+
// holds the real guards.
|
|
76
|
+
const guardsRef = useRef(null);
|
|
77
|
+
const editor = useEditor({
|
|
78
|
+
extensions,
|
|
79
|
+
// With Collaboration active the prose is owned by the shared Y.XmlFragment.
|
|
80
|
+
// Seeding `content` here too would make the editor initialize from BOTH the
|
|
81
|
+
// prop and the Y.Doc, firing a spurious initial update that could autosave a
|
|
82
|
+
// stale value over newer SQL. The lead-client seed effect populates an empty
|
|
83
|
+
// doc instead. Non-collab editors keep initializing from `value`.
|
|
84
|
+
// With Collaboration the Y.Doc owns the prose (seeded by the lead client).
|
|
85
|
+
// With a custom `setContent` the reconcile seeds the editor too (the raw
|
|
86
|
+
// `value` is not directly settable content — e.g. the plan's blocks JSON),
|
|
87
|
+
// so only the plain markdown path seeds from `value` here.
|
|
88
|
+
content: collab || setContent ? null : value,
|
|
89
|
+
editable,
|
|
90
|
+
editorProps: {
|
|
91
|
+
attributes: {
|
|
92
|
+
class: cn("an-rich-md-prose", editorClassName),
|
|
93
|
+
...(ariaLabel ? { role: "textbox", "aria-label": ariaLabel } : {}),
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
onUpdate: ({ editor, transaction }) => {
|
|
97
|
+
const guards = guardsRef.current;
|
|
98
|
+
if (!guards || guards.shouldIgnoreUpdate(transaction))
|
|
99
|
+
return;
|
|
100
|
+
try {
|
|
101
|
+
const markdown = readMarkdown(editor);
|
|
102
|
+
if (!guards.registerEmitted(markdown))
|
|
103
|
+
return;
|
|
104
|
+
queueMicrotask(() => onChangeRef.current(markdown));
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
console.error("Markdown serialization error:", error);
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
onBlur: () => {
|
|
111
|
+
onBlurRef.current?.();
|
|
112
|
+
},
|
|
113
|
+
// Recreate the editor when the shared Y.Doc identity changes — including
|
|
114
|
+
// null → doc. Extensions are baked in at creation, so a ydoc that arrives
|
|
115
|
+
// AFTER the first mount (fresh page load: the session/user resolves after
|
|
116
|
+
// the editor mounts) would otherwise never bind Collaboration: the editor
|
|
117
|
+
// looks fine but produces no Yjs updates and never receives peers' edits.
|
|
118
|
+
}, [ydoc]);
|
|
119
|
+
const collabState = useCollabReconcile({
|
|
120
|
+
editor,
|
|
121
|
+
ydoc,
|
|
122
|
+
collabSynced,
|
|
123
|
+
awareness,
|
|
124
|
+
value,
|
|
125
|
+
contentUpdatedAt,
|
|
126
|
+
editable,
|
|
127
|
+
getMarkdown: readMarkdown,
|
|
128
|
+
setContent,
|
|
129
|
+
parseValue,
|
|
130
|
+
normalizeValue,
|
|
131
|
+
shouldSeed,
|
|
132
|
+
initialAppliedUpdatedAt,
|
|
133
|
+
});
|
|
134
|
+
guardsRef.current = collabState;
|
|
135
|
+
useEffect(() => {
|
|
136
|
+
if (!editor || editor.isDestroyed)
|
|
137
|
+
return;
|
|
138
|
+
editor.setEditable(editable);
|
|
139
|
+
}, [editable, editor]);
|
|
140
|
+
useEffect(() => {
|
|
141
|
+
if (editor)
|
|
142
|
+
onEditorReady?.(editor);
|
|
143
|
+
}, [editor, onEditorReady]);
|
|
144
|
+
useEffect(() => () => editor?.destroy(), [editor]);
|
|
145
|
+
const handleWrapperClick = (event) => {
|
|
146
|
+
if (!editable || !editor || editor.isDestroyed)
|
|
147
|
+
return;
|
|
148
|
+
const target = event.target;
|
|
149
|
+
if (target.classList.contains("an-rich-md-wrapper") ||
|
|
150
|
+
target.classList.contains("an-rich-md-clickable")) {
|
|
151
|
+
editor.chain().focus("end").run();
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
if (!editor) {
|
|
155
|
+
return (_jsx("div", { className: cn("an-rich-md-wrapper an-rich-md-loading", className), "data-plan-interactive": interactive ? true : undefined }));
|
|
156
|
+
}
|
|
157
|
+
return (_jsxs("div", { className: cn("an-rich-md-wrapper an-rich-md-clickable", !editable && "an-rich-md-wrapper--readonly", wrapperClassName, className), onClick: handleWrapperClick, "data-plan-interactive": interactive ? true : undefined, children: [editable ? (_jsx(BubbleToolbar, { editor: editor, buildItems: buildBubbleItems })) : null, editable ? (_jsx(SlashCommandMenu, { editor: editor, items: effectiveSlashItems })) : null, _jsx(EditorContent, { editor: editor })] }));
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=SharedRichEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharedRichEditor.js","sourceRoot":"","sources":["../../src/editor/SharedRichEditor.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAInD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,aAAa,EAA0B,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,4BAA4B,GAK7B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,GAEjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,iBAAiB,GAGlB,MAAM,yBAAyB,CAAC;AAkGjC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,M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C,aAAa,IAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,GAAI,CAChE,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,CAAC,CAAC,CAAC,CACV,KAAC,gBAAgB,IAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,GAAI,CACjE,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,aAAa,IAAC,MAAM,EAAE,MAAM,GAAI,IAC7B,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharedRichEditor.spec.d.ts","sourceRoot":"","sources":["../../src/editor/SharedRichEditor.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// @vitest-environment happy-dom
|
|
3
|
+
import { act } from "react";
|
|
4
|
+
import { createRoot } from "react-dom/client";
|
|
5
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
6
|
+
import { SharedRichEditor } from "./SharedRichEditor.js";
|
|
7
|
+
describe("SharedRichEditor block controls", () => {
|
|
8
|
+
let container;
|
|
9
|
+
let root;
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
vi.stubGlobal("IS_REACT_ACT_ENVIRONMENT", true);
|
|
12
|
+
container = document.createElement("div");
|
|
13
|
+
document.body.appendChild(container);
|
|
14
|
+
root = createRoot(container);
|
|
15
|
+
});
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
act(() => root.unmount());
|
|
18
|
+
container.remove();
|
|
19
|
+
vi.restoreAllMocks();
|
|
20
|
+
vi.unstubAllGlobals();
|
|
21
|
+
});
|
|
22
|
+
it("mounts the shared Notion-style block grip by default", async () => {
|
|
23
|
+
await act(async () => {
|
|
24
|
+
root.render(_jsx(SharedRichEditor, { value: "<p>First</p><p>Second</p>", onChange: () => undefined }));
|
|
25
|
+
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
26
|
+
});
|
|
27
|
+
const prose = container.querySelector(".an-rich-md-prose");
|
|
28
|
+
const firstBlock = prose?.firstElementChild;
|
|
29
|
+
for (const [element, rect] of [
|
|
30
|
+
[prose, { left: 0, top: 0, right: 640, bottom: 100 }],
|
|
31
|
+
[firstBlock, { left: 0, top: 0, right: 640, bottom: 24 }],
|
|
32
|
+
]) {
|
|
33
|
+
if (!element)
|
|
34
|
+
continue;
|
|
35
|
+
Object.defineProperty(element, "getBoundingClientRect", {
|
|
36
|
+
configurable: true,
|
|
37
|
+
value: () => ({
|
|
38
|
+
...rect,
|
|
39
|
+
x: rect.left,
|
|
40
|
+
y: rect.top,
|
|
41
|
+
width: rect.right - rect.left,
|
|
42
|
+
height: rect.bottom - rect.top,
|
|
43
|
+
toJSON: () => ({}),
|
|
44
|
+
}),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
document.dispatchEvent(new MouseEvent("mousemove", {
|
|
48
|
+
bubbles: true,
|
|
49
|
+
clientX: 8,
|
|
50
|
+
clientY: 8,
|
|
51
|
+
}));
|
|
52
|
+
expect(container.querySelector(".an-rich-md-wrapper")).not.toBeNull();
|
|
53
|
+
expect(container.querySelector(".drag-handle")).not.toBeNull();
|
|
54
|
+
});
|
|
55
|
+
it("allows hosts to opt out when they own block controls", async () => {
|
|
56
|
+
await act(async () => {
|
|
57
|
+
root.render(_jsx(SharedRichEditor, { value: "First", onChange: () => undefined, dragHandle: false }));
|
|
58
|
+
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
59
|
+
});
|
|
60
|
+
expect(container.querySelector(".drag-handle")).toBeNull();
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=SharedRichEditor.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharedRichEditor.spec.js","sourceRoot":"","sources":["../../src/editor/SharedRichEditor.spec.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAEhC,OAAO,EAAE,GA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C,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACjE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sDAAsD,EAAE,KAAK,IAAI,EAAE;QACpE,MAAM,GAAG,CAAC,KAAK,IAAI,EAAE;YACnB,IAAI,CAAC,MAAM,CACT,KAAC,gBAAgB,IACf,KAAK,EAAC,OAAO,EACb,QAAQ,EAAE,GAAG,EAAE,CAAC,SAAS,EACzB,UAAU,EAAE,KAAK,GACjB,CACH,CAAC;YACF,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/react";
|
|
2
|
+
import { type ImageUploadFn } from "./ImageExtension.js";
|
|
3
|
+
/** A single slash-menu block command. Apps can extend the default list. */
|
|
4
|
+
export interface SlashCommandItem {
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
/**
|
|
8
|
+
* Optional hidden search text. Use this for raw block types and aliases that
|
|
9
|
+
* should match slash queries without making the visible description verbose.
|
|
10
|
+
*/
|
|
11
|
+
searchText?: string;
|
|
12
|
+
/** Short text glyph shown in the menu (T, H1, tbl, …). */
|
|
13
|
+
icon: string;
|
|
14
|
+
/** Hide this command when the shared editor feature is disabled. */
|
|
15
|
+
requires?: "tables" | "tasks" | "codeBlock";
|
|
16
|
+
action: (editor: Editor) => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Put the caret inside the block a slash command just created or transformed.
|
|
20
|
+
*
|
|
21
|
+
* Tiptap commands usually preserve a text selection, but commands that replace
|
|
22
|
+
* the current paragraph (notably code blocks and horizontal rules) can leave a
|
|
23
|
+
* node selection or a caret at the following block. Resolving from the slash
|
|
24
|
+
* range keeps the behavior consistent for built-in and app-provided block
|
|
25
|
+
* commands: after selecting a block, typing starts in that block immediately.
|
|
26
|
+
*/
|
|
27
|
+
export declare function focusEditorInInsertedBlock(editor: Editor, anchorPosition?: number): void;
|
|
28
|
+
export interface SlashCommandFeatureFlags {
|
|
29
|
+
tables?: boolean;
|
|
30
|
+
tasks?: boolean;
|
|
31
|
+
codeBlock?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function filterSlashCommandItems(items: readonly SlashCommandItem[], features?: SlashCommandFeatureFlags): SlashCommandItem[];
|
|
34
|
+
/**
|
|
35
|
+
* The default block commands — Plan's current set. Apps pass their own `items`
|
|
36
|
+
* (typically `[...DEFAULT_SLASH_COMMANDS, ...extra]`) to extend it.
|
|
37
|
+
*/
|
|
38
|
+
export declare const DEFAULT_SLASH_COMMANDS: SlashCommandItem[];
|
|
39
|
+
/**
|
|
40
|
+
* Build the `/image` slash command for the shared image block. Requires the
|
|
41
|
+
* editor to mount the shared image extension (`features.image`) and an
|
|
42
|
+
* {@link ImageUploadFn}; the command opens a native file picker and uploads +
|
|
43
|
+
* inserts the chosen image(s). Add it to the list an app passes to
|
|
44
|
+
* {@link SlashCommandMenu} (e.g. `[...DEFAULT_SLASH_COMMANDS, createImageSlashCommand(upload)]`).
|
|
45
|
+
*/
|
|
46
|
+
export declare function createImageSlashCommand(upload: ImageUploadFn): SlashCommandItem;
|
|
47
|
+
export interface SlashCommandMenuProps {
|
|
48
|
+
editor: Editor;
|
|
49
|
+
/** Block command list. Defaults to {@link DEFAULT_SLASH_COMMANDS}. */
|
|
50
|
+
items?: SlashCommandItem[];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The shared "/" block-insert menu. Detects a `/query` at the caret, filters the
|
|
54
|
+
* provided command list, and renders a fixed-position picker with keyboard
|
|
55
|
+
* navigation. Extracted from the inline plan menu so apps share one
|
|
56
|
+
* implementation and only swap the command list.
|
|
57
|
+
*/
|
|
58
|
+
export declare function SlashCommandMenu({ editor, items, }: SlashCommandMenuProps): import("react").JSX.Element | null;
|
|
59
|
+
//# sourceMappingURL=SlashCommandMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlashCommandMenu.d.ts","sourceRoot":"","sources":["../../src/editor/SlashCommandMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAW5C,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE7E,2EAA2E;AAC3E,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,WAAW,CAAC;IAC5C,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,MAAM,EACd,cAAc,CAAC,EAAE,MAAM,GACtB,IAAI,CA8CN;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,SAAS,gBAAgB,EAAE,EAClC,QAAQ,CAAC,EAAE,wBAAwB,GAClC,gBAAgB,EAAE,CAIpB;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,gBAAgB,EA8EpD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,aAAa,GACpB,gBAAgB,CAOlB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,KAA8B,GAC/B,EAAE,qBAAqB,sCA6KvB"}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TextSelection } from "@tiptap/pm/state";
|
|
3
|
+
import { useCallback, useEffect, useMemo, useRef, useState, } from "react";
|
|
4
|
+
import { cn } from "../utils.js";
|
|
5
|
+
import { pickAndInsertImage } from "./ImageExtension.js";
|
|
6
|
+
/**
|
|
7
|
+
* Put the caret inside the block a slash command just created or transformed.
|
|
8
|
+
*
|
|
9
|
+
* Tiptap commands usually preserve a text selection, but commands that replace
|
|
10
|
+
* the current paragraph (notably code blocks and horizontal rules) can leave a
|
|
11
|
+
* node selection or a caret at the following block. Resolving from the slash
|
|
12
|
+
* range keeps the behavior consistent for built-in and app-provided block
|
|
13
|
+
* commands: after selecting a block, typing starts in that block immediately.
|
|
14
|
+
*/
|
|
15
|
+
export function focusEditorInInsertedBlock(editor, anchorPosition) {
|
|
16
|
+
if (editor.isDestroyed)
|
|
17
|
+
return;
|
|
18
|
+
const { state } = editor;
|
|
19
|
+
const anchor = Math.max(1, Math.min(anchorPosition ?? state.selection.from, state.doc.content.size));
|
|
20
|
+
let containingTextblock = null;
|
|
21
|
+
let nextTextblock = null;
|
|
22
|
+
let previousTextblock = null;
|
|
23
|
+
state.doc.nodesBetween(0, state.doc.content.size, (node, pos) => {
|
|
24
|
+
if (!node.isTextblock)
|
|
25
|
+
return;
|
|
26
|
+
const start = pos + 1;
|
|
27
|
+
const end = pos + node.nodeSize - 1;
|
|
28
|
+
if (anchor >= start && anchor <= end) {
|
|
29
|
+
containingTextblock ??= anchor;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (start > anchor) {
|
|
33
|
+
if (nextTextblock === null || start < nextTextblock) {
|
|
34
|
+
nextTextblock = start;
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (previousTextblock === null || start > previousTextblock) {
|
|
39
|
+
previousTextblock = Math.min(anchor, end);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const target = containingTextblock ?? nextTextblock ?? previousTextblock;
|
|
43
|
+
if (target === null) {
|
|
44
|
+
editor.commands.focus();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const transaction = state.tr.setSelection(TextSelection.create(state.doc, Math.max(1, Math.min(target, state.doc.content.size))));
|
|
48
|
+
editor.view.dispatch(transaction.scrollIntoView());
|
|
49
|
+
editor.view.focus();
|
|
50
|
+
}
|
|
51
|
+
export function filterSlashCommandItems(items, features) {
|
|
52
|
+
return items.filter((item) => !item.requires || features?.[item.requires] !== false);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The default block commands — Plan's current set. Apps pass their own `items`
|
|
56
|
+
* (typically `[...DEFAULT_SLASH_COMMANDS, ...extra]`) to extend it.
|
|
57
|
+
*/
|
|
58
|
+
export const DEFAULT_SLASH_COMMANDS = [
|
|
59
|
+
{
|
|
60
|
+
title: "Text",
|
|
61
|
+
description: "Plain text block",
|
|
62
|
+
icon: "T",
|
|
63
|
+
action: (editor) => editor.chain().focus().setParagraph().run(),
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
title: "Heading 1",
|
|
67
|
+
description: "Large heading",
|
|
68
|
+
icon: "H1",
|
|
69
|
+
action: (editor) => editor.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
title: "Heading 2",
|
|
73
|
+
description: "Section heading",
|
|
74
|
+
icon: "H2",
|
|
75
|
+
action: (editor) => editor.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
title: "Heading 3",
|
|
79
|
+
description: "Subheading",
|
|
80
|
+
icon: "H3",
|
|
81
|
+
action: (editor) => editor.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
title: "Bulleted list",
|
|
85
|
+
description: "Unordered list",
|
|
86
|
+
icon: "-",
|
|
87
|
+
action: (editor) => editor.chain().focus().toggleBulletList().run(),
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
title: "Numbered list",
|
|
91
|
+
description: "Ordered list",
|
|
92
|
+
icon: "1.",
|
|
93
|
+
action: (editor) => editor.chain().focus().toggleOrderedList().run(),
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
title: "To-do list",
|
|
97
|
+
description: "Checklist items",
|
|
98
|
+
icon: "[]",
|
|
99
|
+
requires: "tasks",
|
|
100
|
+
action: (editor) => editor.chain().focus().toggleTaskList().run(),
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
title: "Quote",
|
|
104
|
+
description: "Block quote",
|
|
105
|
+
icon: '"',
|
|
106
|
+
action: (editor) => editor.chain().focus().toggleBlockquote().run(),
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
title: "Code block",
|
|
110
|
+
description: "Code snippet",
|
|
111
|
+
icon: "<>",
|
|
112
|
+
requires: "codeBlock",
|
|
113
|
+
action: (editor) => editor.chain().focus().toggleCodeBlock().run(),
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
title: "Divider",
|
|
117
|
+
description: "Horizontal rule",
|
|
118
|
+
icon: "-",
|
|
119
|
+
action: (editor) => editor.chain().focus().setHorizontalRule().run(),
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
title: "Table",
|
|
123
|
+
description: "Three by three table",
|
|
124
|
+
icon: "tbl",
|
|
125
|
+
requires: "tables",
|
|
126
|
+
action: (editor) => editor
|
|
127
|
+
.chain()
|
|
128
|
+
.focus()
|
|
129
|
+
.insertTable({ rows: 3, cols: 3, withHeaderRow: true })
|
|
130
|
+
.run(),
|
|
131
|
+
},
|
|
132
|
+
];
|
|
133
|
+
/**
|
|
134
|
+
* Build the `/image` slash command for the shared image block. Requires the
|
|
135
|
+
* editor to mount the shared image extension (`features.image`) and an
|
|
136
|
+
* {@link ImageUploadFn}; the command opens a native file picker and uploads +
|
|
137
|
+
* inserts the chosen image(s). Add it to the list an app passes to
|
|
138
|
+
* {@link SlashCommandMenu} (e.g. `[...DEFAULT_SLASH_COMMANDS, createImageSlashCommand(upload)]`).
|
|
139
|
+
*/
|
|
140
|
+
export function createImageSlashCommand(upload) {
|
|
141
|
+
return {
|
|
142
|
+
title: "Image",
|
|
143
|
+
description: "Upload an image",
|
|
144
|
+
icon: "img",
|
|
145
|
+
action: (editor) => pickAndInsertImage(editor.view, upload),
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* The shared "/" block-insert menu. Detects a `/query` at the caret, filters the
|
|
150
|
+
* provided command list, and renders a fixed-position picker with keyboard
|
|
151
|
+
* navigation. Extracted from the inline plan menu so apps share one
|
|
152
|
+
* implementation and only swap the command list.
|
|
153
|
+
*/
|
|
154
|
+
export function SlashCommandMenu({ editor, items = DEFAULT_SLASH_COMMANDS, }) {
|
|
155
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
156
|
+
const [query, setQuery] = useState("");
|
|
157
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
158
|
+
const [position, setPosition] = useState(null);
|
|
159
|
+
const menuRef = useRef(null);
|
|
160
|
+
const selectedItemRef = useRef(null);
|
|
161
|
+
const slashPosRef = useRef(null);
|
|
162
|
+
const filteredCommands = useMemo(() => {
|
|
163
|
+
const normalizedQuery = query.toLowerCase();
|
|
164
|
+
return items.filter((cmd) => cmd.title.toLowerCase().includes(normalizedQuery) ||
|
|
165
|
+
cmd.description.toLowerCase().includes(normalizedQuery) ||
|
|
166
|
+
cmd.searchText?.toLowerCase().includes(normalizedQuery));
|
|
167
|
+
}, [items, query]);
|
|
168
|
+
const close = useCallback(() => {
|
|
169
|
+
setIsOpen(false);
|
|
170
|
+
setQuery("");
|
|
171
|
+
slashPosRef.current = null;
|
|
172
|
+
}, []);
|
|
173
|
+
const executeCommand = useCallback((command) => {
|
|
174
|
+
if (slashPosRef.current !== null) {
|
|
175
|
+
const { from } = editor.state.selection;
|
|
176
|
+
const anchorPosition = slashPosRef.current;
|
|
177
|
+
editor
|
|
178
|
+
.chain()
|
|
179
|
+
.focus()
|
|
180
|
+
.deleteRange({ from: anchorPosition, to: from })
|
|
181
|
+
.run();
|
|
182
|
+
command.action(editor);
|
|
183
|
+
focusEditorInInsertedBlock(editor, anchorPosition);
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
command.action(editor);
|
|
187
|
+
focusEditorInInsertedBlock(editor);
|
|
188
|
+
}
|
|
189
|
+
close();
|
|
190
|
+
}, [close, editor]);
|
|
191
|
+
useEffect(() => {
|
|
192
|
+
const handleKeyDown = (event) => {
|
|
193
|
+
if (!isOpen)
|
|
194
|
+
return;
|
|
195
|
+
if (event.key === "ArrowDown") {
|
|
196
|
+
event.preventDefault();
|
|
197
|
+
if (filteredCommands.length === 0)
|
|
198
|
+
return;
|
|
199
|
+
setSelectedIndex((index) => (index + 1) % filteredCommands.length);
|
|
200
|
+
}
|
|
201
|
+
else if (event.key === "ArrowUp") {
|
|
202
|
+
event.preventDefault();
|
|
203
|
+
if (filteredCommands.length === 0)
|
|
204
|
+
return;
|
|
205
|
+
setSelectedIndex((index) => (index - 1 + filteredCommands.length) % filteredCommands.length);
|
|
206
|
+
}
|
|
207
|
+
else if (event.key === "Enter") {
|
|
208
|
+
event.preventDefault();
|
|
209
|
+
const command = filteredCommands[selectedIndex];
|
|
210
|
+
if (command)
|
|
211
|
+
executeCommand(command);
|
|
212
|
+
}
|
|
213
|
+
else if (event.key === "Escape") {
|
|
214
|
+
close();
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
document.addEventListener("keydown", handleKeyDown, true);
|
|
218
|
+
return () => document.removeEventListener("keydown", handleKeyDown, true);
|
|
219
|
+
}, [close, executeCommand, filteredCommands, isOpen, selectedIndex]);
|
|
220
|
+
useEffect(() => {
|
|
221
|
+
if (!isOpen)
|
|
222
|
+
return;
|
|
223
|
+
const menu = menuRef.current;
|
|
224
|
+
const item = selectedItemRef.current;
|
|
225
|
+
if (!menu || !item)
|
|
226
|
+
return;
|
|
227
|
+
const itemTop = item.offsetTop;
|
|
228
|
+
const itemBottom = itemTop + item.offsetHeight;
|
|
229
|
+
const visibleTop = menu.scrollTop;
|
|
230
|
+
const visibleBottom = visibleTop + menu.clientHeight;
|
|
231
|
+
if (itemTop < visibleTop) {
|
|
232
|
+
menu.scrollTop = itemTop;
|
|
233
|
+
}
|
|
234
|
+
else if (itemBottom > visibleBottom) {
|
|
235
|
+
menu.scrollTop = itemBottom - menu.clientHeight;
|
|
236
|
+
}
|
|
237
|
+
}, [filteredCommands.length, isOpen, selectedIndex]);
|
|
238
|
+
useEffect(() => {
|
|
239
|
+
const handleTransaction = () => {
|
|
240
|
+
const { state } = editor;
|
|
241
|
+
const { from } = state.selection;
|
|
242
|
+
const textBefore = state.doc.textBetween(Math.max(0, from - 32), from, "\n");
|
|
243
|
+
const slashMatch = textBefore.match(/\/([a-zA-Z0-9 ]*)$/);
|
|
244
|
+
if (!slashMatch) {
|
|
245
|
+
if (isOpen)
|
|
246
|
+
close();
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
const slashStart = from - slashMatch[0].length;
|
|
250
|
+
slashPosRef.current = slashStart;
|
|
251
|
+
setQuery(slashMatch[1]);
|
|
252
|
+
setSelectedIndex(0);
|
|
253
|
+
const coords = editor.view.coordsAtPos(from);
|
|
254
|
+
const menuHeight = 320;
|
|
255
|
+
const spaceBelow = window.innerHeight - coords.bottom;
|
|
256
|
+
const flipUp = spaceBelow < menuHeight && coords.top > menuHeight;
|
|
257
|
+
setPosition({
|
|
258
|
+
top: flipUp ? coords.top : coords.bottom + 4,
|
|
259
|
+
left: Math.min(coords.left, window.innerWidth - 250),
|
|
260
|
+
flipUp,
|
|
261
|
+
});
|
|
262
|
+
setIsOpen(true);
|
|
263
|
+
};
|
|
264
|
+
editor.on("transaction", handleTransaction);
|
|
265
|
+
return () => {
|
|
266
|
+
editor.off("transaction", handleTransaction);
|
|
267
|
+
};
|
|
268
|
+
}, [close, editor, isOpen]);
|
|
269
|
+
if (!isOpen || !position || filteredCommands.length === 0)
|
|
270
|
+
return null;
|
|
271
|
+
return (_jsxs("div", { ref: menuRef, className: "an-rich-md-slash-menu", style: {
|
|
272
|
+
position: "fixed",
|
|
273
|
+
...(position.flipUp
|
|
274
|
+
? { bottom: window.innerHeight - position.top + 4 }
|
|
275
|
+
: { top: position.top }),
|
|
276
|
+
left: position.left,
|
|
277
|
+
}, "data-plan-interactive": true, children: [_jsx("div", { className: "an-rich-md-slash-heading", children: "Blocks" }), filteredCommands.map((command, index) => (_jsxs("button", { ref: index === selectedIndex ? selectedItemRef : undefined, type: "button", className: cn("an-rich-md-slash-item", index === selectedIndex && "an-rich-md-slash-item--active"), onMouseEnter: () => setSelectedIndex(index), onMouseDown: (event) => event.preventDefault(), onClick: () => executeCommand(command), children: [_jsx("span", { className: "an-rich-md-slash-icon", children: command.icon }), _jsxs("span", { className: "an-rich-md-slash-copy", children: [_jsx("span", { className: "an-rich-md-slash-title", children: command.title }), _jsx("span", { className: "an-rich-md-slash-description", children: command.description })] })] }, command.title)))] }));
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=SlashCommandMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlashCommandMenu.js","sourceRoot":"","sources":["../../src/editor/SlashCommandMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EACL,WAAW,EACX,SAAS,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