fancy-ui-react 0.2.0
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/LICENSE +21 -0
- package/PORTING.md +118 -0
- package/README.md +643 -0
- package/dist/cameleon/FancyProvider.d.ts +11 -0
- package/dist/cameleon/FancyProvider.js +42 -0
- package/dist/cameleon/context.d.ts +22 -0
- package/dist/cameleon/context.js +16 -0
- package/dist/cameleon/index.d.ts +31 -0
- package/dist/cameleon/index.js +39 -0
- package/dist/cameleon/primitives/Badge.d.ts +10 -0
- package/dist/cameleon/primitives/Badge.js +12 -0
- package/dist/cameleon/primitives/Button.d.ts +11 -0
- package/dist/cameleon/primitives/Button.js +43 -0
- package/dist/cameleon/primitives/Checkbox.d.ts +10 -0
- package/dist/cameleon/primitives/Checkbox.js +39 -0
- package/dist/cameleon/primitives/Input.d.ts +10 -0
- package/dist/cameleon/primitives/Input.js +13 -0
- package/dist/cameleon/primitives/Radio.d.ts +12 -0
- package/dist/cameleon/primitives/Radio.js +29 -0
- package/dist/cameleon/primitives/Select.d.ts +10 -0
- package/dist/cameleon/primitives/Select.js +27 -0
- package/dist/cameleon/primitives/Slider.d.ts +7 -0
- package/dist/cameleon/primitives/Slider.js +22 -0
- package/dist/cameleon/primitives/Switch.d.ts +9 -0
- package/dist/cameleon/primitives/Switch.js +33 -0
- package/dist/cameleon/primitives/Textarea.d.ts +9 -0
- package/dist/cameleon/primitives/Textarea.js +13 -0
- package/dist/cameleon/primitives/Tooltip.d.ts +14 -0
- package/dist/cameleon/primitives/Tooltip.js +15 -0
- package/dist/cameleon/primitives/index.d.ts +10 -0
- package/dist/cameleon/skins/aurora/index.d.ts +2 -0
- package/dist/cameleon/skins/aurora/index.js +16 -0
- package/dist/cameleon/skins/aurora/meta.d.ts +3 -0
- package/dist/cameleon/skins/aurora/meta.js +61 -0
- package/dist/cameleon/skins/aurora/recipes.d.ts +24 -0
- package/dist/cameleon/skins/aurora/recipes.js +124 -0
- package/dist/cameleon/skins/aurora/tokens.d.ts +6 -0
- package/dist/cameleon/skins/aurora/tokens.js +18 -0
- package/dist/cameleon/skins/brutal/index.d.ts +2 -0
- package/dist/cameleon/skins/brutal/index.js +35 -0
- package/dist/cameleon/skins/brutal/meta.d.ts +3 -0
- package/dist/cameleon/skins/brutal/meta.js +73 -0
- package/dist/cameleon/skins/brutal/ornaments.d.ts +7 -0
- package/dist/cameleon/skins/brutal/ornaments.js +18 -0
- package/dist/cameleon/skins/brutal/recipes.d.ts +23 -0
- package/dist/cameleon/skins/brutal/recipes.js +113 -0
- package/dist/cameleon/skins/brutal/tokens.d.ts +8 -0
- package/dist/cameleon/skins/brutal/tokens.js +23 -0
- package/dist/cameleon/skins/default.d.ts +2 -0
- package/dist/cameleon/skins/default.js +79 -0
- package/dist/cameleon/skins/glass/index.d.ts +2 -0
- package/dist/cameleon/skins/glass/index.js +16 -0
- package/dist/cameleon/skins/glass/meta.d.ts +3 -0
- package/dist/cameleon/skins/glass/meta.js +63 -0
- package/dist/cameleon/skins/glass/recipes.d.ts +24 -0
- package/dist/cameleon/skins/glass/recipes.js +124 -0
- package/dist/cameleon/skins/glass/tokens.d.ts +5 -0
- package/dist/cameleon/skins/glass/tokens.js +18 -0
- package/dist/cameleon/skins/retro-os/index.d.ts +2 -0
- package/dist/cameleon/skins/retro-os/index.js +24 -0
- package/dist/cameleon/skins/retro-os/meta.d.ts +3 -0
- package/dist/cameleon/skins/retro-os/meta.js +61 -0
- package/dist/cameleon/skins/retro-os/ornaments.d.ts +9 -0
- package/dist/cameleon/skins/retro-os/ornaments.js +28 -0
- package/dist/cameleon/skins/retro-os/recipes.d.ts +35 -0
- package/dist/cameleon/skins/retro-os/recipes.js +126 -0
- package/dist/cameleon/skins/retro-os/tokens.d.ts +16 -0
- package/dist/cameleon/skins/retro-os/tokens.js +23 -0
- package/dist/cameleon/skins/terminal/index.d.ts +2 -0
- package/dist/cameleon/skins/terminal/index.js +24 -0
- package/dist/cameleon/skins/terminal/meta.d.ts +3 -0
- package/dist/cameleon/skins/terminal/meta.js +70 -0
- package/dist/cameleon/skins/terminal/ornaments.d.ts +7 -0
- package/dist/cameleon/skins/terminal/ornaments.js +8 -0
- package/dist/cameleon/skins/terminal/recipes.d.ts +25 -0
- package/dist/cameleon/skins/terminal/recipes.js +125 -0
- package/dist/cameleon/skins/terminal/tokens.d.ts +5 -0
- package/dist/cameleon/skins/terminal/tokens.js +18 -0
- package/dist/cameleon/types.d.ts +133 -0
- package/dist/components/agent-plan/AgentPlan.d.ts +25 -0
- package/dist/components/agent-plan/AgentPlan.js +181 -0
- package/dist/components/agent-plan/index.d.ts +2 -0
- package/dist/components/ai-data-table/AiDataTable.d.ts +54 -0
- package/dist/components/ai-data-table/AiDataTable.js +110 -0
- package/dist/components/ai-data-table/index.d.ts +2 -0
- package/dist/components/alert-dialog/AlertDialog.d.ts +35 -0
- package/dist/components/alert-dialog/AlertDialog.js +109 -0
- package/dist/components/alert-dialog/index.d.ts +2 -0
- package/dist/components/animated-beam/AnimatedBeam.d.ts +39 -0
- package/dist/components/animated-beam/AnimatedBeam.js +192 -0
- package/dist/components/animated-beam/index.d.ts +2 -0
- package/dist/components/animated-testimonials/AnimatedTestimonials.d.ts +32 -0
- package/dist/components/animated-testimonials/AnimatedTestimonials.js +172 -0
- package/dist/components/animated-testimonials/index.d.ts +2 -0
- package/dist/components/animated-tooltip/AnimatedTooltip.d.ts +13 -0
- package/dist/components/animated-tooltip/AnimatedTooltip.js +137 -0
- package/dist/components/animated-tooltip/index.d.ts +2 -0
- package/dist/components/apple-card-carousel/AppleCard.d.ts +30 -0
- package/dist/components/apple-card-carousel/AppleCard.js +219 -0
- package/dist/components/apple-card-carousel/AppleCardCarousel.d.ts +14 -0
- package/dist/components/apple-card-carousel/AppleCardCarousel.js +30 -0
- package/dist/components/apple-card-carousel/index.d.ts +4 -0
- package/dist/components/approval-card/ApprovalCard.d.ts +57 -0
- package/dist/components/approval-card/ApprovalCard.js +153 -0
- package/dist/components/approval-card/index.d.ts +2 -0
- package/dist/components/artifact-card/ArtifactCard.d.ts +44 -0
- package/dist/components/artifact-card/ArtifactCard.js +204 -0
- package/dist/components/artifact-card/index.d.ts +2 -0
- package/dist/components/autocomplete/Autocomplete.d.ts +36 -0
- package/dist/components/autocomplete/Autocomplete.js +186 -0
- package/dist/components/autocomplete/AutocompletePanel.d.ts +12 -0
- package/dist/components/autocomplete/AutocompletePanel.js +123 -0
- package/dist/components/autocomplete/index.d.ts +4 -0
- package/dist/components/autocomplete/match.d.ts +6 -0
- package/dist/components/autocomplete/match.js +10 -0
- package/dist/components/autocomplete/types.d.ts +52 -0
- package/dist/components/autocomplete/types.js +6 -0
- package/dist/components/bento-grid/BentoGrid.d.ts +6 -0
- package/dist/components/bento-grid/BentoGrid.js +19 -0
- package/dist/components/bento-grid/BentoGridCard.d.ts +11 -0
- package/dist/components/bento-grid/BentoGridCard.js +49 -0
- package/dist/components/bento-grid/BentoGridItem.d.ts +9 -0
- package/dist/components/bento-grid/BentoGridItem.js +33 -0
- package/dist/components/bento-grid/index.d.ts +6 -0
- package/dist/components/bg-falling-stars/FallingStarsBg.d.ts +24 -0
- package/dist/components/bg-falling-stars/FallingStarsBg.js +134 -0
- package/dist/components/bg-falling-stars/index.d.ts +2 -0
- package/dist/components/bg-stars/StarsBackground.d.ts +40 -0
- package/dist/components/bg-stars/StarsBackground.js +188 -0
- package/dist/components/bg-stars/index.d.ts +2 -0
- package/dist/components/blur-reveal/BlurReveal.d.ts +19 -0
- package/dist/components/blur-reveal/BlurReveal.js +50 -0
- package/dist/components/blur-reveal/index.d.ts +2 -0
- package/dist/components/book/Book.d.ts +13 -0
- package/dist/components/book/Book.js +94 -0
- package/dist/components/book/BookDescription.d.ts +6 -0
- package/dist/components/book/BookDescription.js +9 -0
- package/dist/components/book/BookHeader.d.ts +6 -0
- package/dist/components/book/BookHeader.js +9 -0
- package/dist/components/book/BookTitle.d.ts +6 -0
- package/dist/components/book/BookTitle.js +9 -0
- package/dist/components/book/index.d.ts +132 -0
- package/dist/components/book/index.js +48 -0
- package/dist/components/border-beam/BorderBeam.d.ts +25 -0
- package/dist/components/border-beam/BorderBeam.js +45 -0
- package/dist/components/border-beam/index.d.ts +2 -0
- package/dist/components/box-reveal/BoxReveal.d.ts +20 -0
- package/dist/components/box-reveal/BoxReveal.js +58 -0
- package/dist/components/box-reveal/index.d.ts +2 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +49 -0
- package/dist/components/breadcrumb/Breadcrumb.js +61 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/button/Button.d.ts +44 -0
- package/dist/components/button/Button.js +120 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/types.d.ts +4 -0
- package/dist/components/button-group/ButtonGroup.d.ts +23 -0
- package/dist/components/button-group/ButtonGroup.js +30 -0
- package/dist/components/button-group/index.d.ts +4 -0
- package/dist/components/button-group/types.d.ts +34 -0
- package/dist/components/button-group/types.js +7 -0
- package/dist/components/card-3d/CardBody.d.ts +8 -0
- package/dist/components/card-3d/CardBody.js +9 -0
- package/dist/components/card-3d/CardContainer.d.ts +19 -0
- package/dist/components/card-3d/CardContainer.js +61 -0
- package/dist/components/card-3d/CardItem.d.ts +22 -0
- package/dist/components/card-3d/CardItem.js +29 -0
- package/dist/components/card-3d/index.d.ts +6 -0
- package/dist/components/card-spotlight/CardSpotlight.d.ts +16 -0
- package/dist/components/card-spotlight/CardSpotlight.js +65 -0
- package/dist/components/card-spotlight/index.d.ts +2 -0
- package/dist/components/chat-error/ChatError.d.ts +32 -0
- package/dist/components/chat-error/ChatError.js +75 -0
- package/dist/components/chat-error/index.d.ts +2 -0
- package/dist/components/chat-message/ChatMessage.d.ts +43 -0
- package/dist/components/chat-message/ChatMessage.js +127 -0
- package/dist/components/chat-message/ChatMessageAction.d.ts +20 -0
- package/dist/components/chat-message/ChatMessageAction.js +58 -0
- package/dist/components/chat-message/ChatMessageActions.d.ts +14 -0
- package/dist/components/chat-message/ChatMessageActions.js +30 -0
- package/dist/components/chat-message/ChatMessageBranches.d.ts +15 -0
- package/dist/components/chat-message/ChatMessageBranches.js +93 -0
- package/dist/components/chat-message/index.d.ts +10 -0
- package/dist/components/chat-message/types.d.ts +38 -0
- package/dist/components/chat-message/types.js +7 -0
- package/dist/components/chat-panel/ChatEmptyState.d.ts +17 -0
- package/dist/components/chat-panel/ChatEmptyState.js +42 -0
- package/dist/components/chat-panel/ChatPanel.d.ts +31 -0
- package/dist/components/chat-panel/ChatPanel.js +163 -0
- package/dist/components/chat-panel/index.d.ts +4 -0
- package/dist/components/checkbox/Checkbox.d.ts +64 -0
- package/dist/components/checkbox/Checkbox.js +123 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/code-diff/CodeDiff.d.ts +39 -0
- package/dist/components/code-diff/CodeDiff.js +213 -0
- package/dist/components/code-diff/index.d.ts +2 -0
- package/dist/components/colourful-text/ColourfulText.d.ts +28 -0
- package/dist/components/colourful-text/ColourfulText.js +73 -0
- package/dist/components/colourful-text/index.d.ts +2 -0
- package/dist/components/combobox/Combobox.d.ts +53 -0
- package/dist/components/combobox/Combobox.js +248 -0
- package/dist/components/combobox/ComboboxPanel.d.ts +28 -0
- package/dist/components/combobox/ComboboxPanel.js +110 -0
- package/dist/components/combobox/index.d.ts +4 -0
- package/dist/components/combobox/match.d.ts +15 -0
- package/dist/components/combobox/match.js +14 -0
- package/dist/components/combobox/types.d.ts +60 -0
- package/dist/components/combobox/types.js +6 -0
- package/dist/components/command-menu/CommandMenu.d.ts +37 -0
- package/dist/components/command-menu/CommandMenu.js +386 -0
- package/dist/components/command-menu/index.d.ts +3 -0
- package/dist/components/command-menu/match.d.ts +19 -0
- package/dist/components/command-menu/match.js +45 -0
- package/dist/components/command-menu/types.d.ts +19 -0
- package/dist/components/compare/Compare.d.ts +31 -0
- package/dist/components/compare/Compare.js +300 -0
- package/dist/components/compare/StarField.d.ts +22 -0
- package/dist/components/compare/StarField.js +66 -0
- package/dist/components/compare/index.d.ts +4 -0
- package/dist/components/composer/Composer.d.ts +56 -0
- package/dist/components/composer/Composer.js +155 -0
- package/dist/components/composer/ComposerAttachment.d.ts +14 -0
- package/dist/components/composer/ComposerAttachment.js +127 -0
- package/dist/components/composer/ComposerAttachments.d.ts +18 -0
- package/dist/components/composer/ComposerAttachments.js +85 -0
- package/dist/components/composer/ComposerCommandMenu.d.ts +37 -0
- package/dist/components/composer/ComposerCommandMenu.js +208 -0
- package/dist/components/composer/ComposerInput.d.ts +22 -0
- package/dist/components/composer/ComposerInput.js +96 -0
- package/dist/components/composer/ComposerModelPicker.d.ts +32 -0
- package/dist/components/composer/ComposerModelPicker.js +223 -0
- package/dist/components/composer/ComposerSubmit.d.ts +16 -0
- package/dist/components/composer/ComposerSubmit.js +52 -0
- package/dist/components/composer/ComposerToolbar.d.ts +38 -0
- package/dist/components/composer/ComposerToolbar.js +9 -0
- package/dist/components/composer/caret.d.ts +69 -0
- package/dist/components/composer/caret.js +112 -0
- package/dist/components/composer/index.d.ts +18 -0
- package/dist/components/composer/types.d.ts +86 -0
- package/dist/components/composer/types.js +7 -0
- package/dist/components/confetti/Confetti.d.ts +37 -0
- package/dist/components/confetti/Confetti.js +45 -0
- package/dist/components/confetti/ConfettiButton.d.ts +23 -0
- package/dist/components/confetti/ConfettiButton.js +29 -0
- package/dist/components/confetti/context.d.ts +21 -0
- package/dist/components/confetti/context.js +6 -0
- package/dist/components/confetti/index.d.ts +4 -0
- package/dist/components/container-scroll/ContainerScroll.d.ts +10 -0
- package/dist/components/container-scroll/ContainerScroll.js +74 -0
- package/dist/components/container-scroll/index.d.ts +2 -0
- package/dist/components/container-text-flip/ContainerTextFlip.d.ts +9 -0
- package/dist/components/container-text-flip/ContainerTextFlip.js +58 -0
- package/dist/components/container-text-flip/index.d.ts +2 -0
- package/dist/components/context-menu/ContextMenu.d.ts +39 -0
- package/dist/components/context-menu/ContextMenu.js +105 -0
- package/dist/components/context-menu/ContextMenuContent.d.ts +27 -0
- package/dist/components/context-menu/ContextMenuContent.js +97 -0
- package/dist/components/context-menu/ContextMenuTrigger.d.ts +26 -0
- package/dist/components/context-menu/ContextMenuTrigger.js +37 -0
- package/dist/components/context-menu/index.d.ts +20 -0
- package/dist/components/context-menu/types.d.ts +52 -0
- package/dist/components/context-menu/types.js +17 -0
- package/dist/components/context-ring/ContextRing.d.ts +33 -0
- package/dist/components/context-ring/ContextRing.js +257 -0
- package/dist/components/context-ring/index.d.ts +2 -0
- package/dist/components/copy-button/CopyButton.d.ts +39 -0
- package/dist/components/copy-button/CopyButton.js +124 -0
- package/dist/components/copy-button/index.d.ts +2 -0
- package/dist/components/date-picker/DatePicker.d.ts +58 -0
- package/dist/components/date-picker/DatePicker.js +331 -0
- package/dist/components/date-picker/date-utils.d.ts +39 -0
- package/dist/components/date-picker/date-utils.js +85 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/dialog/Dialog.d.ts +29 -0
- package/dist/components/dialog/Dialog.js +105 -0
- package/dist/components/dialog/DialogSurface.d.ts +2 -0
- package/dist/components/dialog/DialogSurface.js +98 -0
- package/dist/components/dialog/index.d.ts +2 -0
- package/dist/components/dialog/types.d.ts +61 -0
- package/dist/components/dim-siblings/DimSiblings.d.ts +30 -0
- package/dist/components/dim-siblings/DimSiblings.js +47 -0
- package/dist/components/dim-siblings/index.d.ts +2 -0
- package/dist/components/direction-aware-hover/DirectionAwareHover.d.ts +10 -0
- package/dist/components/direction-aware-hover/DirectionAwareHover.js +185 -0
- package/dist/components/direction-aware-hover/index.d.ts +2 -0
- package/dist/components/displacement-text/DisplacementText.d.ts +26 -0
- package/dist/components/displacement-text/DisplacementText.js +185 -0
- package/dist/components/displacement-text/index.d.ts +2 -0
- package/dist/components/dock/Dock.d.ts +28 -0
- package/dist/components/dock/Dock.js +80 -0
- package/dist/components/dock/DockIcon.d.ts +17 -0
- package/dist/components/dock/DockIcon.js +38 -0
- package/dist/components/dock/DockSeparator.d.ts +6 -0
- package/dist/components/dock/DockSeparator.js +20 -0
- package/dist/components/dock/index.d.ts +7 -0
- package/dist/components/dock/types.d.ts +47 -0
- package/dist/components/dock/types.js +15 -0
- package/dist/components/drawer/Drawer.d.ts +34 -0
- package/dist/components/drawer/Drawer.js +237 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +38 -0
- package/dist/components/dropdown-menu/DropdownMenu.js +99 -0
- package/dist/components/dropdown-menu/DropdownMenuContent.d.ts +15 -0
- package/dist/components/dropdown-menu/DropdownMenuContent.js +111 -0
- package/dist/components/dropdown-menu/DropdownMenuItem.d.ts +26 -0
- package/dist/components/dropdown-menu/DropdownMenuItem.js +74 -0
- package/dist/components/dropdown-menu/DropdownMenuLabel.d.ts +15 -0
- package/dist/components/dropdown-menu/DropdownMenuLabel.js +18 -0
- package/dist/components/dropdown-menu/DropdownMenuSeparator.d.ts +6 -0
- package/dist/components/dropdown-menu/DropdownMenuSeparator.js +15 -0
- package/dist/components/dropdown-menu/DropdownMenuSub.d.ts +10 -0
- package/dist/components/dropdown-menu/DropdownMenuSub.js +110 -0
- package/dist/components/dropdown-menu/DropdownMenuSubContent.d.ts +15 -0
- package/dist/components/dropdown-menu/DropdownMenuSubContent.js +139 -0
- package/dist/components/dropdown-menu/DropdownMenuSubTrigger.d.ts +17 -0
- package/dist/components/dropdown-menu/DropdownMenuSubTrigger.js +104 -0
- package/dist/components/dropdown-menu/DropdownMenuTrigger.d.ts +16 -0
- package/dist/components/dropdown-menu/DropdownMenuTrigger.js +67 -0
- package/dist/components/dropdown-menu/index.d.ts +20 -0
- package/dist/components/dropdown-menu/menu-shared.d.ts +39 -0
- package/dist/components/dropdown-menu/menu-shared.js +48 -0
- package/dist/components/dropdown-menu/types.d.ts +159 -0
- package/dist/components/dropdown-menu/types.js +32 -0
- package/dist/components/editorial-engine/EditorialEngine.d.ts +21 -0
- package/dist/components/editorial-engine/EditorialEngine.js +68 -0
- package/dist/components/editorial-engine/engine.d.ts +7 -0
- package/dist/components/editorial-engine/engine.js +558 -0
- package/dist/components/editorial-engine/index.d.ts +2 -0
- package/dist/components/file-upload/FileUpload.d.ts +63 -0
- package/dist/components/file-upload/FileUpload.js +438 -0
- package/dist/components/file-upload/index.d.ts +2 -0
- package/dist/components/fireworks-hdr/FireworksHdr.d.ts +56 -0
- package/dist/components/fireworks-hdr/FireworksHdr.js +426 -0
- package/dist/components/fireworks-hdr/dev.d.ts +1 -0
- package/dist/components/fireworks-hdr/dev.js +8 -0
- package/dist/components/fireworks-hdr/fireworks-shared.d.ts +444 -0
- package/dist/components/fireworks-hdr/fireworks-shared.js +1205 -0
- package/dist/components/fireworks-hdr/index.d.ts +4 -0
- package/dist/components/fireworks-hdr/webgl2-renderer.d.ts +20 -0
- package/dist/components/fireworks-hdr/webgl2-renderer.js +517 -0
- package/dist/components/fireworks-hdr/webgpu-renderer.d.ts +51 -0
- package/dist/components/fireworks-hdr/webgpu-renderer.js +461 -0
- package/dist/components/fireworks-hdr/webgpu-types.d.ts +159 -0
- package/dist/components/flickering-grid/FlickeringGrid.d.ts +33 -0
- package/dist/components/flickering-grid/FlickeringGrid.js +154 -0
- package/dist/components/flickering-grid/index.d.ts +2 -0
- package/dist/components/flip-card/FlipCard.d.ts +8 -0
- package/dist/components/flip-card/FlipCard.js +35 -0
- package/dist/components/flip-card/index.d.ts +2 -0
- package/dist/components/flip-words/FlipWords.d.ts +16 -0
- package/dist/components/flip-words/FlipWords.js +82 -0
- package/dist/components/flip-words/index.d.ts +2 -0
- package/dist/components/fluid-cursor/FluidCursor.d.ts +61 -0
- package/dist/components/fluid-cursor/FluidCursor.js +1479 -0
- package/dist/components/fluid-cursor/fluid-shared.d.ts +74 -0
- package/dist/components/fluid-cursor/fluid-shared.js +120 -0
- package/dist/components/fluid-cursor/index.d.ts +8 -0
- package/dist/components/fluid-cursor/webgpu-engine.d.ts +36 -0
- package/dist/components/fluid-cursor/webgpu-engine.js +922 -0
- package/dist/components/focus/Focus.d.ts +24 -0
- package/dist/components/focus/Focus.js +103 -0
- package/dist/components/focus/index.d.ts +2 -0
- package/dist/components/form-field/FormField.d.ts +46 -0
- package/dist/components/form-field/FormField.js +151 -0
- package/dist/components/form-field/index.d.ts +2 -0
- package/dist/components/frosted-glass/FrostedGlass.d.ts +48 -0
- package/dist/components/frosted-glass/FrostedGlass.js +89 -0
- package/dist/components/frosted-glass/index.d.ts +2 -0
- package/dist/components/glare-card/GlareCard.d.ts +8 -0
- package/dist/components/glare-card/GlareCard.js +103 -0
- package/dist/components/glare-card/index.d.ts +2 -0
- package/dist/components/glow-border/GlowBorder.d.ts +8 -0
- package/dist/components/glow-border/GlowBorder.js +39 -0
- package/dist/components/glow-border/index.d.ts +2 -0
- package/dist/components/glowing-effect/GlowingEffect.d.ts +23 -0
- package/dist/components/glowing-effect/GlowingEffect.js +157 -0
- package/dist/components/glowing-effect/index.d.ts +2 -0
- package/dist/components/gradient-button/GradientButton.d.ts +28 -0
- package/dist/components/gradient-button/GradientButton.js +66 -0
- package/dist/components/gradient-button/index.d.ts +2 -0
- package/dist/components/hover-card/HoverCard.d.ts +57 -0
- package/dist/components/hover-card/HoverCard.js +139 -0
- package/dist/components/hover-card/index.d.ts +2 -0
- package/dist/components/hyper-text/HyperText.d.ts +25 -0
- package/dist/components/hyper-text/HyperText.js +102 -0
- package/dist/components/hyper-text/index.d.ts +2 -0
- package/dist/components/icon-button/IconButton.d.ts +46 -0
- package/dist/components/icon-button/IconButton.js +62 -0
- package/dist/components/icon-button/index.d.ts +2 -0
- package/dist/components/image-generation/ImageGeneration.d.ts +33 -0
- package/dist/components/image-generation/ImageGeneration.js +131 -0
- package/dist/components/image-generation/index.d.ts +2 -0
- package/dist/components/image-trail-cursor/ImageTrailCursor.d.ts +15 -0
- package/dist/components/image-trail-cursor/ImageTrailCursor.js +75 -0
- package/dist/components/image-trail-cursor/index.d.ts +3 -0
- package/dist/components/image-trail-cursor/trail-variants.d.ts +112 -0
- package/dist/components/image-trail-cursor/trail-variants.js +787 -0
- package/dist/components/inline-citation/InlineCitation.d.ts +23 -0
- package/dist/components/inline-citation/InlineCitation.js +179 -0
- package/dist/components/inline-citation/index.d.ts +2 -0
- package/dist/components/input/Input.d.ts +41 -0
- package/dist/components/input/Input.js +74 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/interactive-grid-pattern/InteractiveGridPattern.d.ts +17 -0
- package/dist/components/interactive-grid-pattern/InteractiveGridPattern.js +89 -0
- package/dist/components/interactive-grid-pattern/index.d.ts +2 -0
- package/dist/components/interactive-hover-button/InteractiveHoverButton.d.ts +18 -0
- package/dist/components/interactive-hover-button/InteractiveHoverButton.js +66 -0
- package/dist/components/interactive-hover-button/index.d.ts +2 -0
- package/dist/components/label/Label.d.ts +18 -0
- package/dist/components/label/Label.js +28 -0
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/letter-pullup/LetterPullup.d.ts +16 -0
- package/dist/components/letter-pullup/LetterPullup.js +27 -0
- package/dist/components/letter-pullup/index.d.ts +2 -0
- package/dist/components/line-hover-link/LineHoverLink.d.ts +33 -0
- package/dist/components/line-hover-link/LineHoverLink.js +69 -0
- package/dist/components/line-hover-link/index.d.ts +2 -0
- package/dist/components/line-reveal/LineReveal.d.ts +31 -0
- package/dist/components/line-reveal/LineReveal.js +117 -0
- package/dist/components/line-reveal/index.d.ts +2 -0
- package/dist/components/line-shadow-text/LineShadowText.d.ts +18 -0
- package/dist/components/line-shadow-text/LineShadowText.js +26 -0
- package/dist/components/line-shadow-text/index.d.ts +2 -0
- package/dist/components/link/Link.d.ts +30 -0
- package/dist/components/link/Link.js +82 -0
- package/dist/components/link/index.d.ts +2 -0
- package/dist/components/liquid-glass/LiquidGlass.d.ts +49 -0
- package/dist/components/liquid-glass/LiquidGlass.js +165 -0
- package/dist/components/liquid-glass/index.d.ts +2 -0
- package/dist/components/liquid-text/LiquidText.d.ts +35 -0
- package/dist/components/liquid-text/LiquidText.js +882 -0
- package/dist/components/liquid-text/index.d.ts +2 -0
- package/dist/components/logo-cloud/AnimatedLogoCloud.d.ts +13 -0
- package/dist/components/logo-cloud/AnimatedLogoCloud.js +38 -0
- package/dist/components/logo-cloud/IconLogoCloud.d.ts +10 -0
- package/dist/components/logo-cloud/IconLogoCloud.js +20 -0
- package/dist/components/logo-cloud/StaticLogoCloud.d.ts +28 -0
- package/dist/components/logo-cloud/StaticLogoCloud.js +45 -0
- package/dist/components/logo-cloud/index.d.ts +6 -0
- package/dist/components/magnetic/Magnetic.d.ts +35 -0
- package/dist/components/magnetic/Magnetic.js +113 -0
- package/dist/components/magnetic/index.d.ts +2 -0
- package/dist/components/marquee/Marquee.d.ts +16 -0
- package/dist/components/marquee/Marquee.js +39 -0
- package/dist/components/marquee/ReviewCard.d.ts +8 -0
- package/dist/components/marquee/ReviewCard.js +17 -0
- package/dist/components/marquee/index.d.ts +4 -0
- package/dist/components/matrix-rain/MatrixRain.d.ts +35 -0
- package/dist/components/matrix-rain/MatrixRain.js +130 -0
- package/dist/components/matrix-rain/index.d.ts +2 -0
- package/dist/components/meteors/Meteors.d.ts +21 -0
- package/dist/components/meteors/Meteors.js +45 -0
- package/dist/components/meteors/index.d.ts +2 -0
- package/dist/components/mosaic-glow/MosaicGlow.d.ts +47 -0
- package/dist/components/mosaic-glow/MosaicGlow.js +438 -0
- package/dist/components/mosaic-glow/index.d.ts +2 -0
- package/dist/components/mosaic-glow/mosaic-glow-core.d.ts +94 -0
- package/dist/components/mosaic-glow/mosaic-glow-core.js +190 -0
- package/dist/components/navbar/Navbar.d.ts +25 -0
- package/dist/components/navbar/Navbar.js +27 -0
- package/dist/components/navbar/NavbarLink.d.ts +37 -0
- package/dist/components/navbar/NavbarLink.js +48 -0
- package/dist/components/navbar/index.d.ts +4 -0
- package/dist/components/navigation-menu/NavigationMenu.d.ts +28 -0
- package/dist/components/navigation-menu/NavigationMenu.js +202 -0
- package/dist/components/navigation-menu/NavigationMenuContent.d.ts +8 -0
- package/dist/components/navigation-menu/NavigationMenuContent.js +77 -0
- package/dist/components/navigation-menu/NavigationMenuItem.d.ts +20 -0
- package/dist/components/navigation-menu/NavigationMenuItem.js +18 -0
- package/dist/components/navigation-menu/NavigationMenuLink.d.ts +31 -0
- package/dist/components/navigation-menu/NavigationMenuLink.js +41 -0
- package/dist/components/navigation-menu/NavigationMenuList.d.ts +8 -0
- package/dist/components/navigation-menu/NavigationMenuList.js +33 -0
- package/dist/components/navigation-menu/NavigationMenuTrigger.d.ts +8 -0
- package/dist/components/navigation-menu/NavigationMenuTrigger.js +90 -0
- package/dist/components/navigation-menu/index.d.ts +14 -0
- package/dist/components/navigation-menu/types.d.ts +107 -0
- package/dist/components/navigation-menu/types.js +32 -0
- package/dist/components/neon-border/NeonBorder.d.ts +22 -0
- package/dist/components/neon-border/NeonBorder.js +50 -0
- package/dist/components/neon-border/index.d.ts +2 -0
- package/dist/components/noise-reveal/NoiseReveal.d.ts +29 -0
- package/dist/components/noise-reveal/NoiseReveal.js +329 -0
- package/dist/components/noise-reveal/index.d.ts +2 -0
- package/dist/components/number-input/NumberInput.d.ts +40 -0
- package/dist/components/number-input/NumberInput.js +207 -0
- package/dist/components/number-input/index.d.ts +2 -0
- package/dist/components/number-ticker/NumberTicker.d.ts +22 -0
- package/dist/components/number-ticker/NumberTicker.js +106 -0
- package/dist/components/number-ticker/index.d.ts +2 -0
- package/dist/components/pagination/Pagination.d.ts +43 -0
- package/dist/components/pagination/Pagination.js +156 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/pagination-range.d.ts +11 -0
- package/dist/components/pagination/pagination-range.js +35 -0
- package/dist/components/password-input/PasswordInput.d.ts +56 -0
- package/dist/components/password-input/PasswordInput.js +246 -0
- package/dist/components/password-input/index.d.ts +2 -0
- package/dist/components/pixel-loader/PixelLoader.d.ts +18 -0
- package/dist/components/pixel-loader/PixelLoader.js +56 -0
- package/dist/components/pixel-loader/index.d.ts +2 -0
- package/dist/components/popover/Popover.d.ts +49 -0
- package/dist/components/popover/Popover.js +81 -0
- package/dist/components/popover/PopoverContent.d.ts +21 -0
- package/dist/components/popover/PopoverContent.js +78 -0
- package/dist/components/popover/index.d.ts +6 -0
- package/dist/components/popover/types.d.ts +64 -0
- package/dist/components/popover/types.js +17 -0
- package/dist/components/presence/Presence.d.ts +40 -0
- package/dist/components/presence/Presence.js +49 -0
- package/dist/components/presence/index.d.ts +2 -0
- package/dist/components/pressable/Pressable.d.ts +27 -0
- package/dist/components/pressable/Pressable.js +86 -0
- package/dist/components/pressable/index.d.ts +2 -0
- package/dist/components/prompt-suggestions/PromptSuggestions.d.ts +25 -0
- package/dist/components/prompt-suggestions/PromptSuggestions.js +68 -0
- package/dist/components/prompt-suggestions/index.d.ts +2 -0
- package/dist/components/pulse-beam/PulseBeam.d.ts +44 -0
- package/dist/components/pulse-beam/PulseBeam.js +197 -0
- package/dist/components/pulse-beam/index.d.ts +2 -0
- package/dist/components/pulse-beam/pulse-beam-data.d.ts +81 -0
- package/dist/components/pulse-beam/pulse-beam-data.js +306 -0
- package/dist/components/pulse-beam/pulse-beam-loop.d.ts +26 -0
- package/dist/components/pulse-beam/pulse-beam-loop.js +58 -0
- package/dist/components/radio-group/RadioGroup.d.ts +56 -0
- package/dist/components/radio-group/RadioGroup.js +82 -0
- package/dist/components/radio-group/RadioGroupItem.d.ts +21 -0
- package/dist/components/radio-group/RadioGroupItem.js +47 -0
- package/dist/components/radio-group/index.d.ts +6 -0
- package/dist/components/radio-group/types.d.ts +50 -0
- package/dist/components/radio-group/types.js +7 -0
- package/dist/components/rainbow-button/RainbowButton.d.ts +21 -0
- package/dist/components/rainbow-button/RainbowButton.js +59 -0
- package/dist/components/rainbow-button/index.d.ts +2 -0
- package/dist/components/reasoning-panel/ReasoningPanel.d.ts +38 -0
- package/dist/components/reasoning-panel/ReasoningPanel.js +172 -0
- package/dist/components/reasoning-panel/index.d.ts +2 -0
- package/dist/components/recommendation-card/RecommendationCard.d.ts +53 -0
- package/dist/components/recommendation-card/RecommendationCard.js +234 -0
- package/dist/components/recommendation-card/index.d.ts +2 -0
- package/dist/components/reveal/Reveal.d.ts +36 -0
- package/dist/components/reveal/Reveal.js +138 -0
- package/dist/components/reveal/index.d.ts +2 -0
- package/dist/components/ripple/Ripple.d.ts +11 -0
- package/dist/components/ripple/Ripple.js +45 -0
- package/dist/components/ripple/index.d.ts +2 -0
- package/dist/components/ripple-button/RippleButton.d.ts +17 -0
- package/dist/components/ripple-button/RippleButton.js +77 -0
- package/dist/components/ripple-button/index.d.ts +2 -0
- package/dist/components/scroll-anchor/ScrollAnchor.d.ts +33 -0
- package/dist/components/scroll-anchor/ScrollAnchor.js +99 -0
- package/dist/components/scroll-anchor/index.d.ts +2 -0
- package/dist/components/scroll-progress/ScrollProgress.d.ts +39 -0
- package/dist/components/scroll-progress/ScrollProgress.js +118 -0
- package/dist/components/scroll-progress/index.d.ts +2 -0
- package/dist/components/search-input/SearchInput.d.ts +56 -0
- package/dist/components/search-input/SearchInput.js +192 -0
- package/dist/components/search-input/index.d.ts +2 -0
- package/dist/components/select/Select.d.ts +44 -0
- package/dist/components/select/Select.js +255 -0
- package/dist/components/select/SelectPanel.d.ts +33 -0
- package/dist/components/select/SelectPanel.js +108 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/types.d.ts +83 -0
- package/dist/components/select/types.js +8 -0
- package/dist/components/sheet/Sheet.d.ts +40 -0
- package/dist/components/sheet/Sheet.js +183 -0
- package/dist/components/sheet/index.d.ts +2 -0
- package/dist/components/shimmer-button/ShimmerButton.d.ts +26 -0
- package/dist/components/shimmer-button/ShimmerButton.js +69 -0
- package/dist/components/shimmer-button/index.d.ts +2 -0
- package/dist/components/sidebar/Sidebar.d.ts +17 -0
- package/dist/components/sidebar/Sidebar.js +27 -0
- package/dist/components/sidebar/SidebarFooter.d.ts +10 -0
- package/dist/components/sidebar/SidebarFooter.js +31 -0
- package/dist/components/sidebar/SidebarGroup.d.ts +10 -0
- package/dist/components/sidebar/SidebarGroup.js +28 -0
- package/dist/components/sidebar/SidebarItem.d.ts +33 -0
- package/dist/components/sidebar/SidebarItem.js +81 -0
- package/dist/components/sidebar/SidebarSeparator.d.ts +5 -0
- package/dist/components/sidebar/SidebarSeparator.js +13 -0
- package/dist/components/sidebar/index.d.ts +12 -0
- package/dist/components/sidebar/types.d.ts +36 -0
- package/dist/components/sidebar/types.js +7 -0
- package/dist/components/skeleton/Skeleton.d.ts +35 -0
- package/dist/components/skeleton/Skeleton.js +106 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/slider/Slider.d.ts +32 -0
- package/dist/components/slider/Slider.js +119 -0
- package/dist/components/slider/index.d.ts +2 -0
- package/dist/components/smooth-cursor/SmoothCursor.d.ts +18 -0
- package/dist/components/smooth-cursor/SmoothCursor.js +186 -0
- package/dist/components/smooth-cursor/index.d.ts +2 -0
- package/dist/components/sources/SourceCard.d.ts +21 -0
- package/dist/components/sources/SourceCard.js +48 -0
- package/dist/components/sources/Sources.d.ts +31 -0
- package/dist/components/sources/Sources.js +39 -0
- package/dist/components/sources/SourcesList.d.ts +13 -0
- package/dist/components/sources/SourcesList.js +42 -0
- package/dist/components/sources/SourcesTrigger.d.ts +11 -0
- package/dist/components/sources/SourcesTrigger.js +50 -0
- package/dist/components/sources/index.d.ts +10 -0
- package/dist/components/sources/types.d.ts +45 -0
- package/dist/components/sources/types.js +7 -0
- package/dist/components/sparkles/Sparkles.d.ts +35 -0
- package/dist/components/sparkles/Sparkles.js +112 -0
- package/dist/components/sparkles/index.d.ts +2 -0
- package/dist/components/sparkles-text/SparklesText.d.ts +28 -0
- package/dist/components/sparkles-text/SparklesText.js +84 -0
- package/dist/components/sparkles-text/index.d.ts +2 -0
- package/dist/components/status-morph/StatusMorph.d.ts +47 -0
- package/dist/components/status-morph/StatusMorph.js +110 -0
- package/dist/components/status-morph/index.d.ts +2 -0
- package/dist/components/stepper/Step.d.ts +24 -0
- package/dist/components/stepper/Step.js +152 -0
- package/dist/components/stepper/Stepper.d.ts +38 -0
- package/dist/components/stepper/Stepper.js +79 -0
- package/dist/components/stepper/index.d.ts +6 -0
- package/dist/components/stepper/types.d.ts +66 -0
- package/dist/components/stepper/types.js +7 -0
- package/dist/components/sticky-scroll/StickyScroll.d.ts +40 -0
- package/dist/components/sticky-scroll/StickyScroll.js +163 -0
- package/dist/components/sticky-scroll/index.d.ts +2 -0
- package/dist/components/streaming-text/StreamingText.d.ts +20 -0
- package/dist/components/streaming-text/StreamingText.js +32 -0
- package/dist/components/streaming-text/index.d.ts +2 -0
- package/dist/components/subagent-list/SubagentList.d.ts +28 -0
- package/dist/components/subagent-list/SubagentList.js +167 -0
- package/dist/components/subagent-list/index.d.ts +2 -0
- package/dist/components/switch/Switch.d.ts +55 -0
- package/dist/components/switch/Switch.js +77 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/tabs/Tabs.d.ts +43 -0
- package/dist/components/tabs/Tabs.js +123 -0
- package/dist/components/tabs/TabsContent.d.ts +26 -0
- package/dist/components/tabs/TabsContent.js +64 -0
- package/dist/components/tabs/TabsList.d.ts +16 -0
- package/dist/components/tabs/TabsList.js +152 -0
- package/dist/components/tabs/TabsTrigger.d.ts +19 -0
- package/dist/components/tabs/TabsTrigger.js +138 -0
- package/dist/components/tabs/index.d.ts +10 -0
- package/dist/components/tabs/types.d.ts +94 -0
- package/dist/components/tabs/types.js +7 -0
- package/dist/components/terminal-block/TerminalBlock.d.ts +27 -0
- package/dist/components/terminal-block/TerminalBlock.js +120 -0
- package/dist/components/terminal-block/ansi.d.ts +30 -0
- package/dist/components/terminal-block/ansi.js +114 -0
- package/dist/components/terminal-block/index.d.ts +2 -0
- package/dist/components/terminal-text/TerminalText.d.ts +11 -0
- package/dist/components/terminal-text/TerminalText.js +140 -0
- package/dist/components/terminal-text/index.d.ts +2 -0
- package/dist/components/text-generate-effect/TextGenerateEffect.d.ts +9 -0
- package/dist/components/text-generate-effect/TextGenerateEffect.js +58 -0
- package/dist/components/text-generate-effect/index.d.ts +2 -0
- package/dist/components/text-reveal-card/TextRevealCard.d.ts +21 -0
- package/dist/components/text-reveal-card/TextRevealCard.js +107 -0
- package/dist/components/text-reveal-card/TextRevealStars.d.ts +25 -0
- package/dist/components/text-reveal-card/TextRevealStars.js +59 -0
- package/dist/components/text-reveal-card/index.d.ts +4 -0
- package/dist/components/text-roll/TextRoll.d.ts +43 -0
- package/dist/components/text-roll/TextRoll.js +242 -0
- package/dist/components/text-roll/index.d.ts +2 -0
- package/dist/components/text-roll/roll-transitions.d.ts +74 -0
- package/dist/components/text-roll/roll-transitions.js +31 -0
- package/dist/components/textarea/Textarea.d.ts +48 -0
- package/dist/components/textarea/Textarea.js +129 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/thinking-indicator/ThinkingIndicator.d.ts +26 -0
- package/dist/components/thinking-indicator/ThinkingIndicator.js +60 -0
- package/dist/components/thinking-indicator/index.d.ts +2 -0
- package/dist/components/thread-list/ThreadList.d.ts +44 -0
- package/dist/components/thread-list/ThreadList.js +178 -0
- package/dist/components/thread-list/index.d.ts +2 -0
- package/dist/components/time-picker/TimePicker.d.ts +44 -0
- package/dist/components/time-picker/TimePicker.js +254 -0
- package/dist/components/time-picker/TimePickerPanel.d.ts +30 -0
- package/dist/components/time-picker/TimePickerPanel.js +94 -0
- package/dist/components/time-picker/index.d.ts +2 -0
- package/dist/components/time-picker/time-utils.d.ts +33 -0
- package/dist/components/time-picker/time-utils.js +65 -0
- package/dist/components/time-picker/types.d.ts +53 -0
- package/dist/components/time-picker/types.js +10 -0
- package/dist/components/timeline/Timeline.d.ts +18 -0
- package/dist/components/timeline/Timeline.js +96 -0
- package/dist/components/timeline/index.d.ts +2 -0
- package/dist/components/toast/Toast.d.ts +16 -0
- package/dist/components/toast/Toast.js +99 -0
- package/dist/components/toast/Toaster.d.ts +19 -0
- package/dist/components/toast/Toaster.js +147 -0
- package/dist/components/toast/index.d.ts +6 -0
- package/dist/components/toast/store.d.ts +102 -0
- package/dist/components/toast/store.js +118 -0
- package/dist/components/toggle/Toggle.d.ts +28 -0
- package/dist/components/toggle/Toggle.js +69 -0
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle-group/ToggleGroup.d.ts +42 -0
- package/dist/components/toggle-group/ToggleGroup.js +150 -0
- package/dist/components/toggle-group/ToggleGroupItem.d.ts +21 -0
- package/dist/components/toggle-group/ToggleGroupItem.js +100 -0
- package/dist/components/toggle-group/index.d.ts +6 -0
- package/dist/components/toggle-group/types.d.ts +75 -0
- package/dist/components/toggle-group/types.js +7 -0
- package/dist/components/tool-call/ToolCall.d.ts +39 -0
- package/dist/components/tool-call/ToolCall.js +195 -0
- package/dist/components/tool-call/index.d.ts +2 -0
- package/dist/components/tool-timeline/ToolTimeline.d.ts +31 -0
- package/dist/components/tool-timeline/ToolTimeline.js +99 -0
- package/dist/components/tool-timeline/index.d.ts +2 -0
- package/dist/components/tooltip/Tooltip.d.ts +36 -0
- package/dist/components/tooltip/Tooltip.js +214 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tracing-beam/TracingBeam.d.ts +11 -0
- package/dist/components/tracing-beam/TracingBeam.js +163 -0
- package/dist/components/tracing-beam/index.d.ts +2 -0
- package/dist/components/typing-indicator/TypingIndicator.d.ts +17 -0
- package/dist/components/typing-indicator/TypingIndicator.js +47 -0
- package/dist/components/typing-indicator/index.d.ts +2 -0
- package/dist/components/voice-input/VoiceInput.d.ts +60 -0
- package/dist/components/voice-input/VoiceInput.js +268 -0
- package/dist/components/voice-input/index.d.ts +2 -0
- package/dist/components/web-search/WebSearch.d.ts +37 -0
- package/dist/components/web-search/WebSearch.js +135 -0
- package/dist/components/web-search/index.d.ts +2 -0
- package/dist/index.d.ts +148 -0
- package/dist/index.js +489 -0
- package/dist/internals/Portal.d.ts +35 -0
- package/dist/internals/Portal.js +37 -0
- package/dist/internals/StreamText.d.ts +20 -0
- package/dist/internals/StreamText.js +25 -0
- package/dist/internals/ai-types.d.ts +117 -0
- package/dist/internals/anchor-position.d.ts +79 -0
- package/dist/internals/anchor-position.js +154 -0
- package/dist/internals/calendar-core.d.ts +26 -0
- package/dist/internals/calendar-core.js +57 -0
- package/dist/internals/diff.d.ts +38 -0
- package/dist/internals/diff.js +176 -0
- package/dist/internals/dismissable.d.ts +76 -0
- package/dist/internals/dismissable.js +105 -0
- package/dist/internals/dom/context.d.ts +16 -0
- package/dist/internals/dom/context.js +20 -0
- package/dist/internals/dom/ssr.d.ts +21 -0
- package/dist/internals/dom/ssr.js +21 -0
- package/dist/internals/dom/types.d.ts +9 -0
- package/dist/internals/dom/use-composed-refs.d.ts +15 -0
- package/dist/internals/dom/use-composed-refs.js +34 -0
- package/dist/internals/dom/use-element-ref.d.ts +11 -0
- package/dist/internals/dom/use-element-ref.js +12 -0
- package/dist/internals/dom/use-event-callback.d.ts +14 -0
- package/dist/internals/dom/use-event-callback.js +12 -0
- package/dist/internals/dom/use-inert-attribute.d.ts +26 -0
- package/dist/internals/dom/use-inert-attribute.js +22 -0
- package/dist/internals/dom/use-live-ref.d.ts +10 -0
- package/dist/internals/dom/use-live-ref.js +12 -0
- package/dist/internals/field.d.ts +136 -0
- package/dist/internals/field.js +33 -0
- package/dist/internals/float.d.ts +47 -0
- package/dist/internals/float.js +31 -0
- package/dist/internals/focus-trap.d.ts +82 -0
- package/dist/internals/focus-trap.js +145 -0
- package/dist/internals/host.d.ts +38 -0
- package/dist/internals/host.js +24 -0
- package/dist/internals/listbox.d.ts +101 -0
- package/dist/internals/listbox.js +171 -0
- package/dist/internals/markdown/Markdown.d.ts +22 -0
- package/dist/internals/markdown/Markdown.js +53 -0
- package/dist/internals/markdown/MarkdownInline.d.ts +5 -0
- package/dist/internals/markdown/MarkdownInline.js +40 -0
- package/dist/internals/markdown.d.ts +66 -0
- package/dist/internals/markdown.js +467 -0
- package/dist/internals/menu.d.ts +121 -0
- package/dist/internals/menu.js +217 -0
- package/dist/internals/motion/anchored.d.ts +104 -0
- package/dist/internals/motion/anchored.js +44 -0
- package/dist/internals/motion/animate.d.ts +92 -0
- package/dist/internals/motion/animate.js +84 -0
- package/dist/internals/motion/easing.d.ts +20 -0
- package/dist/internals/motion/easing.js +13 -0
- package/dist/internals/motion/haptics.d.ts +42 -0
- package/dist/internals/motion/haptics.js +29 -0
- package/dist/internals/motion/in-view.d.ts +67 -0
- package/dist/internals/motion/in-view.js +97 -0
- package/dist/internals/motion/media-query.d.ts +50 -0
- package/dist/internals/motion/media-query.js +54 -0
- package/dist/internals/motion/presence.d.ts +108 -0
- package/dist/internals/motion/presence.js +197 -0
- package/dist/internals/motion/presets.d.ts +34 -0
- package/dist/internals/motion/presets.js +19 -0
- package/dist/internals/motion/raf.d.ts +35 -0
- package/dist/internals/motion/raf.js +27 -0
- package/dist/internals/motion/stagger.d.ts +32 -0
- package/dist/internals/motion/stagger.js +15 -0
- package/dist/internals/motion/tokens.d.ts +97 -0
- package/dist/internals/motion/tokens.js +18 -0
- package/dist/internals/motion/transitions.d.ts +66 -0
- package/dist/internals/motion/transitions.js +41 -0
- package/dist/internals/motion/types.d.ts +17 -0
- package/dist/internals/relative-time.d.ts +25 -0
- package/dist/internals/relative-time.js +46 -0
- package/dist/internals/scroll-lock.d.ts +26 -0
- package/dist/internals/scroll-lock.js +65 -0
- package/dist/internals/use-anchor-position.d.ts +54 -0
- package/dist/internals/use-anchor-position.js +87 -0
- package/dist/internals/use-autoscroll.d.ts +43 -0
- package/dist/internals/use-autoscroll.js +128 -0
- package/dist/internals/use-copy.d.ts +54 -0
- package/dist/internals/use-copy.js +67 -0
- package/dist/internals/use-elapsed.d.ts +96 -0
- package/dist/internals/use-elapsed.js +195 -0
- package/dist/internals/use-float.d.ts +49 -0
- package/dist/internals/use-float.js +150 -0
- package/dist/internals/use-id.d.ts +22 -0
- package/dist/internals/use-id.js +20 -0
- package/dist/internals/use-text-stream.d.ts +94 -0
- package/dist/internals/use-text-stream.js +133 -0
- package/dist/internals/waveform-core.d.ts +33 -0
- package/dist/internals/waveform-core.js +39 -0
- package/dist/sound/SoundToggle.d.ts +23 -0
- package/dist/sound/SoundToggle.js +96 -0
- package/dist/sound/engine.d.ts +67 -0
- package/dist/sound/engine.js +370 -0
- package/dist/sound/index.d.ts +7 -0
- package/dist/sound/sound-feedback.d.ts +77 -0
- package/dist/sound/sound-feedback.js +152 -0
- package/dist/sound/sound.d.ts +98 -0
- package/dist/sound/sound.js +309 -0
- package/dist/sound/themes.d.ts +19 -0
- package/dist/sound/themes.js +355 -0
- package/dist/sound/types.d.ts +125 -0
- package/dist/sound/types.js +54 -0
- package/dist/sound/use-sound.d.ts +53 -0
- package/dist/sound/use-sound.js +82 -0
- package/dist/styles.css +7975 -0
- package/dist/utils.d.ts +3 -0
- package/dist/utils.js +8 -0
- package/package.json +96 -0
- package/tailwind.css +132 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { DataOrientation, Direction } from "./types.js";
|
|
3
|
+
export interface DockProps {
|
|
4
|
+
/** Additional CSS classes */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** Maximum size increase in pixels. */
|
|
7
|
+
magnification?: number;
|
|
8
|
+
/** Pointer distance over which the magnification falls off. */
|
|
9
|
+
distance?: number;
|
|
10
|
+
/** Vertical alignment of the icons. */
|
|
11
|
+
direction?: Direction;
|
|
12
|
+
/** Dock orientation. */
|
|
13
|
+
orientation?: DataOrientation;
|
|
14
|
+
/**
|
|
15
|
+
* Accessible name for the toolbar. The dock spreads no rest props, so this
|
|
16
|
+
* is the only way to name one whose icons carry no label of their own.
|
|
17
|
+
*/
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
/** The `DockIcon`s and `DockSeparator`s. */
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* An icon dock whose items magnify smoothly as the pointer approaches.
|
|
24
|
+
*
|
|
25
|
+
* No `ref` prop: the source exposes no bindable ref, and no rest props either —
|
|
26
|
+
* it reads only these props and spreads nothing.
|
|
27
|
+
*/
|
|
28
|
+
export declare function Dock({ className, magnification, distance, direction, orientation, ariaLabel, children, }: DockProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useRef, useEffect, useCallback, useMemo } from "react";
|
|
4
|
+
import { cn } from "../../utils.js";
|
|
5
|
+
import { useReducedMotion, useMediaQuery } from "../../internals/motion/media-query.js";
|
|
6
|
+
import { DOCK_CONTEXT_KEY } from "./types.js";
|
|
7
|
+
function Dock({
|
|
8
|
+
className = "",
|
|
9
|
+
magnification = 60,
|
|
10
|
+
distance = 140,
|
|
11
|
+
direction = "middle",
|
|
12
|
+
orientation = "horizontal",
|
|
13
|
+
ariaLabel,
|
|
14
|
+
children
|
|
15
|
+
}) {
|
|
16
|
+
const [pointer, setPointer] = useState({
|
|
17
|
+
x: Infinity,
|
|
18
|
+
y: Infinity
|
|
19
|
+
});
|
|
20
|
+
const reduced = useReducedMotion();
|
|
21
|
+
const coarse = useMediaQuery("(any-hover: none)");
|
|
22
|
+
const magnify = !reduced && !coarse;
|
|
23
|
+
const frames = useRef(/* @__PURE__ */ new Set());
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
const pending = frames.current;
|
|
26
|
+
return () => {
|
|
27
|
+
for (const id of pending) cancelAnimationFrame(id);
|
|
28
|
+
pending.clear();
|
|
29
|
+
};
|
|
30
|
+
}, []);
|
|
31
|
+
const schedule = useCallback((x, y) => {
|
|
32
|
+
const id = requestAnimationFrame(() => {
|
|
33
|
+
frames.current.delete(id);
|
|
34
|
+
setPointer({ x, y });
|
|
35
|
+
});
|
|
36
|
+
frames.current.add(id);
|
|
37
|
+
}, []);
|
|
38
|
+
const context = useMemo(
|
|
39
|
+
() => ({
|
|
40
|
+
mouseX: { current: pointer.x },
|
|
41
|
+
mouseY: { current: pointer.y },
|
|
42
|
+
magnification,
|
|
43
|
+
distance,
|
|
44
|
+
orientation,
|
|
45
|
+
magnify
|
|
46
|
+
}),
|
|
47
|
+
[pointer, magnification, distance, orientation, magnify]
|
|
48
|
+
);
|
|
49
|
+
function onPointerMove(e) {
|
|
50
|
+
if (!magnify) return;
|
|
51
|
+
if (e.pointerType === "touch" || !e.isPrimary) return;
|
|
52
|
+
const { clientX, clientY } = e;
|
|
53
|
+
schedule(clientX, clientY);
|
|
54
|
+
}
|
|
55
|
+
function onPointerLeave() {
|
|
56
|
+
schedule(Infinity, Infinity);
|
|
57
|
+
}
|
|
58
|
+
const directionClass = direction === "top" ? "items-start" : direction === "bottom" ? "items-end" : "items-center";
|
|
59
|
+
return /* @__PURE__ */ jsx(DOCK_CONTEXT_KEY.Provider, { value: context, children: /* @__PURE__ */ jsx(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: cn(
|
|
63
|
+
"mx-auto flex h-[58px] w-max gap-4 rounded-2xl border p-2 backdrop-blur-md transition-all supports-backdrop-blur:bg-white/10 supports-backdrop-blur:dark:bg-black/10",
|
|
64
|
+
orientation === "vertical" && "h-max w-[58px] flex-col",
|
|
65
|
+
directionClass,
|
|
66
|
+
className
|
|
67
|
+
),
|
|
68
|
+
onPointerMove,
|
|
69
|
+
onPointerLeave,
|
|
70
|
+
role: "toolbar",
|
|
71
|
+
"aria-orientation": orientation,
|
|
72
|
+
"aria-label": ariaLabel,
|
|
73
|
+
tabIndex: 0,
|
|
74
|
+
children
|
|
75
|
+
}
|
|
76
|
+
) });
|
|
77
|
+
}
|
|
78
|
+
export {
|
|
79
|
+
Dock
|
|
80
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface DockIconProps {
|
|
3
|
+
/** Additional CSS classes */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** The icon's content. */
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* One item in a `Dock`, sized from its distance to the pointer.
|
|
10
|
+
*
|
|
11
|
+
* The node arrives through `useElementRef` rather than a plain `useRef`: the
|
|
12
|
+
* width is computed while rendering, so the component has to re-render once the
|
|
13
|
+
* element actually exists. Before it does, the distance is `Infinity` and the
|
|
14
|
+
* icon renders at its resting 40px — which is also the size it has at mount,
|
|
15
|
+
* with the pointer still at `Infinity`, so nothing moves on that extra render.
|
|
16
|
+
*/
|
|
17
|
+
export declare function DockIcon({ className, children }: DockIconProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useElementRef } from "../../internals/dom/use-element-ref.js";
|
|
4
|
+
import { useDockContext } from "./types.js";
|
|
5
|
+
function DockIcon({ className = "", children }) {
|
|
6
|
+
const context = useDockContext();
|
|
7
|
+
const [node, iconRef] = useElementRef();
|
|
8
|
+
function calculateDistance() {
|
|
9
|
+
if (!node) return Infinity;
|
|
10
|
+
const bounds = node.getBoundingClientRect();
|
|
11
|
+
if (context.orientation === "vertical") {
|
|
12
|
+
return context.mouseY.current - bounds.y - bounds.height / 2;
|
|
13
|
+
}
|
|
14
|
+
return context.mouseX.current - bounds.x - bounds.width / 2;
|
|
15
|
+
}
|
|
16
|
+
function computeIconWidth() {
|
|
17
|
+
if (!context.magnify) return 40;
|
|
18
|
+
const distanceCalc = calculateDistance();
|
|
19
|
+
if (!context.distance || !context.magnification) return 40;
|
|
20
|
+
if (Math.abs(distanceCalc) < context.distance) {
|
|
21
|
+
return (1 - Math.abs(distanceCalc) / context.distance) * context.magnification + 40;
|
|
22
|
+
}
|
|
23
|
+
return 40;
|
|
24
|
+
}
|
|
25
|
+
const iconWidth = computeIconWidth();
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
ref: iconRef,
|
|
30
|
+
className: `flex aspect-square cursor-pointer items-center justify-center rounded-full transition-all duration-200 ease-out ${className}`,
|
|
31
|
+
style: { width: `${iconWidth}px`, height: `${iconWidth}px` },
|
|
32
|
+
children
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
DockIcon
|
|
38
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface DockSeparatorProps {
|
|
2
|
+
/** Additional CSS classes */
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
/** A rule between two groups of dock icons, laid across the dock's own axis. */
|
|
6
|
+
export declare function DockSeparator({ className }: DockSeparatorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../../utils.js";
|
|
4
|
+
import { useDockContext } from "./types.js";
|
|
5
|
+
function DockSeparator({ className = "" }) {
|
|
6
|
+
const context = useDockContext();
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
className: cn(
|
|
11
|
+
"bg-secondary relative block",
|
|
12
|
+
context.orientation === "vertical" ? "h-0.5 w-4/5" : "h-4/5 w-0.5",
|
|
13
|
+
className
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
DockSeparator
|
|
20
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Dock } from "./Dock.js";
|
|
2
|
+
export type { DockProps } from "./Dock.js";
|
|
3
|
+
export { DockIcon } from "./DockIcon.js";
|
|
4
|
+
export type { DockIconProps } from "./DockIcon.js";
|
|
5
|
+
export { DockSeparator } from "./DockSeparator.js";
|
|
6
|
+
export type { DockSeparatorProps } from "./DockSeparator.js";
|
|
7
|
+
export type { DataOrientation, Direction, DockContext } from "./types.js";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type DataOrientation = "vertical" | "horizontal";
|
|
2
|
+
export type Direction = "top" | "middle" | "bottom";
|
|
3
|
+
export interface DockContext {
|
|
4
|
+
/**
|
|
5
|
+
* The pointer's page X, in a box rather than as a bare number — the shape
|
|
6
|
+
* the source publishes, kept verbatim so the exported type is unchanged.
|
|
7
|
+
*
|
|
8
|
+
* There the box exists so children can read a reactive update through a
|
|
9
|
+
* stable object; here the box is REBUILT by `Dock` on every pointer frame,
|
|
10
|
+
* because a mutated object is invisible to React and the new identity is
|
|
11
|
+
* exactly what re-renders the icons. Only `Dock` ever writes it.
|
|
12
|
+
*/
|
|
13
|
+
mouseX: {
|
|
14
|
+
current: number;
|
|
15
|
+
};
|
|
16
|
+
/** The pointer's page Y. Same box treatment as `mouseX`. */
|
|
17
|
+
mouseY: {
|
|
18
|
+
current: number;
|
|
19
|
+
};
|
|
20
|
+
magnification: number;
|
|
21
|
+
distance: number;
|
|
22
|
+
orientation: DataOrientation;
|
|
23
|
+
/**
|
|
24
|
+
* False when the visitor asked for reduced motion, or when the device has no
|
|
25
|
+
* real pointer to track. `Dock` owns the two media queries behind it and
|
|
26
|
+
* `DockIcon` reads it before doing any measuring, so a device that will
|
|
27
|
+
* never magnify also never pays for a `getBoundingClientRect()` per icon per
|
|
28
|
+
* frame. Read-only: only `Dock` may write it.
|
|
29
|
+
*/
|
|
30
|
+
readonly magnify: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The context `DockIcon` and `DockSeparator` read to find their dock. The
|
|
34
|
+
* source publishes it under a `Symbol` context key; React's own context object
|
|
35
|
+
* plays that role here, so the name is kept and the value is a `React.Context`
|
|
36
|
+
* rather than a symbol.
|
|
37
|
+
*
|
|
38
|
+
* Not re-exported from `index.ts`, because the source's barrel does not export
|
|
39
|
+
* its key either.
|
|
40
|
+
*/
|
|
41
|
+
export declare const DOCK_CONTEXT_KEY: import("react").Context<DockContext | undefined>;
|
|
42
|
+
/**
|
|
43
|
+
* Required, not optional: both children read `context.orientation` with no
|
|
44
|
+
* guard, so one rendered outside a `Dock` throws either way. A named error says
|
|
45
|
+
* what went wrong instead of leaving a bare property-of-undefined TypeError.
|
|
46
|
+
*/
|
|
47
|
+
export declare function useDockContext(): DockContext;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
const DOCK_CONTEXT_KEY = createContext(void 0);
|
|
4
|
+
DOCK_CONTEXT_KEY.displayName = "DockContext";
|
|
5
|
+
function useDockContext() {
|
|
6
|
+
const context = useContext(DOCK_CONTEXT_KEY);
|
|
7
|
+
if (context === void 0) {
|
|
8
|
+
throw new Error("DockContext is missing: this component must be rendered inside a <Dock>.");
|
|
9
|
+
}
|
|
10
|
+
return context;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
DOCK_CONTEXT_KEY,
|
|
14
|
+
useDockContext
|
|
15
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface DrawerProps {
|
|
3
|
+
/** Whether the drawer is open. Controlled when given; the component keeps its own copy either way. */
|
|
4
|
+
open?: boolean;
|
|
5
|
+
/** Called with the new value whenever the drawer opens or closes. */
|
|
6
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
|
+
/** Heading rendered in the header and wired to `aria-labelledby`. */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** Supporting text under the title, wired to `aria-describedby`. */
|
|
10
|
+
description?: string;
|
|
11
|
+
/** Whether Escape, the scrim and the close button can close the drawer. */
|
|
12
|
+
dismissible?: boolean;
|
|
13
|
+
/** Whether dragging the handle down past the threshold closes the drawer. */
|
|
14
|
+
swipeToClose?: boolean;
|
|
15
|
+
/** Panel body content. */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
/** Content pinned below the body, e.g. actions. */
|
|
18
|
+
footer?: ReactNode;
|
|
19
|
+
/** Additional CSS classes merged onto the panel. */
|
|
20
|
+
className?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Accessible name for the panel when there is no `title`. A modal dialog
|
|
23
|
+
* must be named, and `aria-labelledby` can only point at a rendered
|
|
24
|
+
* heading — pass this when the header is built from `children` instead.
|
|
25
|
+
*/
|
|
26
|
+
ariaLabel?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Plays the `close` cue through the sound controller when the drawer is
|
|
29
|
+
* dismissed, including a committed swipe. Off by default; only audible
|
|
30
|
+
* once the user has enabled sound.
|
|
31
|
+
*/
|
|
32
|
+
sound?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export declare const Drawer: import("react").ForwardRefExoticComponent<DrawerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useState, useRef, useEffect } from "react";
|
|
4
|
+
import { flushSync } from "react-dom";
|
|
5
|
+
import { cn } from "../../utils.js";
|
|
6
|
+
import { Portal } from "../../internals/Portal.js";
|
|
7
|
+
import { useDismissable } from "../../internals/dismissable.js";
|
|
8
|
+
import { useFocusTrap } from "../../internals/focus-trap.js";
|
|
9
|
+
import { useScrollLock } from "../../internals/scroll-lock.js";
|
|
10
|
+
import { useComposedRefs } from "../../internals/dom/use-composed-refs.js";
|
|
11
|
+
import { useElementRef } from "../../internals/dom/use-element-ref.js";
|
|
12
|
+
import { useIsomorphicLayoutEffect } from "../../internals/dom/ssr.js";
|
|
13
|
+
import { useFancyId } from "../../internals/use-id.js";
|
|
14
|
+
import { anchored, prefersReducedMotion } from "../../internals/motion/anchored.js";
|
|
15
|
+
import { DURATIONS, JS_EASINGS } from "../../internals/motion/tokens.js";
|
|
16
|
+
import { usePresence } from "../../internals/motion/presence.js";
|
|
17
|
+
import { useSoundCue } from "../../sound/use-sound.js";
|
|
18
|
+
/* empty css */
|
|
19
|
+
const DISMISS_THRESHOLD_PX = 96;
|
|
20
|
+
const SPRING_BACK_MS = 200;
|
|
21
|
+
const Drawer = forwardRef(function Drawer2({
|
|
22
|
+
open: openProp,
|
|
23
|
+
onOpenChange,
|
|
24
|
+
title,
|
|
25
|
+
description,
|
|
26
|
+
dismissible = true,
|
|
27
|
+
swipeToClose = true,
|
|
28
|
+
children,
|
|
29
|
+
footer,
|
|
30
|
+
className,
|
|
31
|
+
ariaLabel,
|
|
32
|
+
sound = false
|
|
33
|
+
}, forwardedRef) {
|
|
34
|
+
const [open, setOpenState] = useState(openProp ?? false);
|
|
35
|
+
const [lastOpenProp, setLastOpenProp] = useState(openProp);
|
|
36
|
+
if (lastOpenProp !== openProp) {
|
|
37
|
+
setLastOpenProp(openProp);
|
|
38
|
+
setOpenState(openProp ?? false);
|
|
39
|
+
}
|
|
40
|
+
const playCue = useSoundCue(sound);
|
|
41
|
+
function close() {
|
|
42
|
+
if (!open) return;
|
|
43
|
+
setOpenState(false);
|
|
44
|
+
playCue("close");
|
|
45
|
+
onOpenChange?.(false);
|
|
46
|
+
}
|
|
47
|
+
const canSwipe = dismissible && swipeToClose;
|
|
48
|
+
const dragYRef = useRef(0);
|
|
49
|
+
const draggingRef = useRef(false);
|
|
50
|
+
const [releasing, setReleasing] = useState(false);
|
|
51
|
+
const activePointerIdRef = useRef(null);
|
|
52
|
+
const dragStartYRef = useRef(0);
|
|
53
|
+
const springBackTimerRef = useRef(void 0);
|
|
54
|
+
const uid = useFancyId();
|
|
55
|
+
const titleId = title ? `${uid}-title` : void 0;
|
|
56
|
+
const descriptionId = description ? `${uid}-description` : void 0;
|
|
57
|
+
const [panel, setPanelNode] = useElementRef();
|
|
58
|
+
const trap = useFocusTrap(panel);
|
|
59
|
+
function drawerSlide(_node, params) {
|
|
60
|
+
const reduced = prefersReducedMotion();
|
|
61
|
+
const entering = params?.entering ?? false;
|
|
62
|
+
const from = entering ? 0 : dragYRef.current;
|
|
63
|
+
return {
|
|
64
|
+
delay: 0,
|
|
65
|
+
// Reduced motion collapses this to 0, which makes `runTransition`
|
|
66
|
+
// finish synchronously and never touch `element.animate()` — so
|
|
67
|
+
// the close is exactly as synchronous as it was before the drawer
|
|
68
|
+
// animated out at all.
|
|
69
|
+
duration: reduced ? 0 : entering ? DURATIONS.base : DURATIONS.exit,
|
|
70
|
+
easing: entering ? JS_EASINGS.out : JS_EASINGS.in,
|
|
71
|
+
css: (t, u) => `transform: translateY(calc(${from}px * ${t} + 100% * ${u}))`
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
const presence = usePresence(open, {
|
|
75
|
+
// The two halves of the focus handshake, at the two moments the
|
|
76
|
+
// source puts them: `onintrostart` → rearm, `onoutrostart` →
|
|
77
|
+
// returnFocusNow.
|
|
78
|
+
//
|
|
79
|
+
// `returnFocusNow` at the dismiss instant is the whole point: it is
|
|
80
|
+
// called on EVERY close path (Escape, the scrim, the close button, a
|
|
81
|
+
// past-threshold swipe, a caller's own `open` write). Waiting for the
|
|
82
|
+
// trap's own destroy would leave a keyboard user on `<body>` for the
|
|
83
|
+
// whole length of the slide-out, because the closing panel is made
|
|
84
|
+
// inert the instant the exit starts.
|
|
85
|
+
//
|
|
86
|
+
// `rearm` is the other half. A drawer reopened DURING its exit
|
|
87
|
+
// reverses instead of remounting, so the trap is never re-created:
|
|
88
|
+
// without this the panel would come back `aria-modal` and interactive
|
|
89
|
+
// with focus left on the trigger behind it, and the eager return
|
|
90
|
+
// already spent for the life of the instance.
|
|
91
|
+
onEnterStart: () => trap.rearm(),
|
|
92
|
+
onExitStart: () => trap.returnFocusNow()
|
|
93
|
+
});
|
|
94
|
+
useIsomorphicLayoutEffect(() => {
|
|
95
|
+
if (!open) return;
|
|
96
|
+
dragYRef.current = 0;
|
|
97
|
+
if (panel) panel.style.transform = "translateY(0px)";
|
|
98
|
+
}, [open, panel]);
|
|
99
|
+
useEffect(() => {
|
|
100
|
+
return () => {
|
|
101
|
+
clearTimeout(springBackTimerRef.current);
|
|
102
|
+
};
|
|
103
|
+
}, []);
|
|
104
|
+
useScrollLock(presence.mounted);
|
|
105
|
+
useDismissable(panel, {
|
|
106
|
+
onDismiss: close,
|
|
107
|
+
escape: dismissible,
|
|
108
|
+
outsideClick: dismissible,
|
|
109
|
+
active: open
|
|
110
|
+
});
|
|
111
|
+
const panelRef = useComposedRefs(
|
|
112
|
+
setPanelNode,
|
|
113
|
+
forwardedRef,
|
|
114
|
+
presence.register("panel", drawerSlide, (entering) => ({ entering }))
|
|
115
|
+
);
|
|
116
|
+
const scrimRef = presence.register("scrim", anchored, (entering) => ({
|
|
117
|
+
entering,
|
|
118
|
+
scale: false,
|
|
119
|
+
duration: DURATIONS.base,
|
|
120
|
+
exitDuration: DURATIONS.exit
|
|
121
|
+
}));
|
|
122
|
+
function handlePointerDown(event) {
|
|
123
|
+
if (!canSwipe) return;
|
|
124
|
+
if (event.pointerType === "mouse" && event.button !== 0) return;
|
|
125
|
+
clearTimeout(springBackTimerRef.current);
|
|
126
|
+
activePointerIdRef.current = event.pointerId;
|
|
127
|
+
dragStartYRef.current = event.clientY;
|
|
128
|
+
draggingRef.current = true;
|
|
129
|
+
setReleasing(false);
|
|
130
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
131
|
+
}
|
|
132
|
+
function handlePointerMove(event) {
|
|
133
|
+
if (!draggingRef.current || event.pointerId !== activePointerIdRef.current) return;
|
|
134
|
+
dragYRef.current = Math.max(0, event.clientY - dragStartYRef.current);
|
|
135
|
+
if (panel) panel.style.transform = `translateY(${dragYRef.current}px)`;
|
|
136
|
+
}
|
|
137
|
+
function releaseCapture(event) {
|
|
138
|
+
event.currentTarget.releasePointerCapture?.(event.pointerId);
|
|
139
|
+
}
|
|
140
|
+
function springBack() {
|
|
141
|
+
flushSync(() => {
|
|
142
|
+
setReleasing(true);
|
|
143
|
+
});
|
|
144
|
+
dragYRef.current = 0;
|
|
145
|
+
if (panel) panel.style.transform = "translateY(0px)";
|
|
146
|
+
springBackTimerRef.current = setTimeout(() => {
|
|
147
|
+
setReleasing(false);
|
|
148
|
+
}, SPRING_BACK_MS);
|
|
149
|
+
}
|
|
150
|
+
function handlePointerUp(event) {
|
|
151
|
+
if (!draggingRef.current || event.pointerId !== activePointerIdRef.current) return;
|
|
152
|
+
draggingRef.current = false;
|
|
153
|
+
activePointerIdRef.current = null;
|
|
154
|
+
releaseCapture(event);
|
|
155
|
+
if (dragYRef.current > DISMISS_THRESHOLD_PX) {
|
|
156
|
+
close();
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
springBack();
|
|
160
|
+
}
|
|
161
|
+
function handlePointerCancel(event) {
|
|
162
|
+
if (!draggingRef.current || event.pointerId !== activePointerIdRef.current) return;
|
|
163
|
+
draggingRef.current = false;
|
|
164
|
+
activePointerIdRef.current = null;
|
|
165
|
+
releaseCapture(event);
|
|
166
|
+
springBack();
|
|
167
|
+
}
|
|
168
|
+
const panelClasses = cn(
|
|
169
|
+
"ft-drawer-panel bg-popover text-popover-foreground fixed inset-x-0 bottom-0 z-50 flex max-h-[85vh] flex-col gap-3 rounded-t-[14px] border-t border-r border-l border-border pt-3.5 pr-5 pb-5 pl-5 shadow-2xl",
|
|
170
|
+
releasing && "ft-drawer-panel--releasing",
|
|
171
|
+
className
|
|
172
|
+
);
|
|
173
|
+
return /* @__PURE__ */ jsx(Portal, { children: presence.mounted ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
174
|
+
/* @__PURE__ */ jsx(
|
|
175
|
+
"div",
|
|
176
|
+
{
|
|
177
|
+
ref: scrimRef,
|
|
178
|
+
className: "ft-drawer-scrim fixed inset-0 z-50 bg-black/60",
|
|
179
|
+
"aria-hidden": "true"
|
|
180
|
+
}
|
|
181
|
+
),
|
|
182
|
+
/* @__PURE__ */ jsxs(
|
|
183
|
+
"div",
|
|
184
|
+
{
|
|
185
|
+
ref: panelRef,
|
|
186
|
+
className: panelClasses,
|
|
187
|
+
role: "dialog",
|
|
188
|
+
"aria-modal": "true",
|
|
189
|
+
"aria-label": titleId ? void 0 : ariaLabel,
|
|
190
|
+
"aria-labelledby": titleId,
|
|
191
|
+
"aria-describedby": descriptionId,
|
|
192
|
+
"data-state": presence.surfaceState,
|
|
193
|
+
style: { transform: "translateY(0px)" },
|
|
194
|
+
children: [
|
|
195
|
+
/* @__PURE__ */ jsxs(
|
|
196
|
+
"div",
|
|
197
|
+
{
|
|
198
|
+
className: "ft-drawer-drag-surface flex flex-col items-center gap-2 pb-1",
|
|
199
|
+
onPointerDown: handlePointerDown,
|
|
200
|
+
onPointerMove: handlePointerMove,
|
|
201
|
+
onPointerUp: handlePointerUp,
|
|
202
|
+
onPointerCancel: handlePointerCancel,
|
|
203
|
+
children: [
|
|
204
|
+
/* @__PURE__ */ jsx("span", { className: "ft-drawer-handle", "aria-hidden": "true" }),
|
|
205
|
+
title ? /* @__PURE__ */ jsx("h2", { id: titleId, className: "w-full text-[14px] font-semibold", children: title }) : null,
|
|
206
|
+
description ? /* @__PURE__ */ jsx(
|
|
207
|
+
"p",
|
|
208
|
+
{
|
|
209
|
+
id: descriptionId,
|
|
210
|
+
className: "text-muted-foreground w-full text-[12px] leading-relaxed",
|
|
211
|
+
children: description
|
|
212
|
+
}
|
|
213
|
+
) : null
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
),
|
|
217
|
+
dismissible ? /* @__PURE__ */ jsx(
|
|
218
|
+
"button",
|
|
219
|
+
{
|
|
220
|
+
type: "button",
|
|
221
|
+
className: "ft-drawer-close text-muted-foreground hover:text-foreground absolute top-3.5 right-5 cursor-pointer text-[13px] leading-none",
|
|
222
|
+
"aria-label": "Close",
|
|
223
|
+
onClick: close,
|
|
224
|
+
children: "✕"
|
|
225
|
+
}
|
|
226
|
+
) : null,
|
|
227
|
+
/* @__PURE__ */ jsx("div", { className: "ft-drawer-body flex flex-1 flex-col gap-3 overflow-y-auto", children }),
|
|
228
|
+
footer ? /* @__PURE__ */ jsx("div", { className: "ft-drawer-footer flex justify-end gap-2", children: footer }) : null
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
)
|
|
232
|
+
] }) : null });
|
|
233
|
+
});
|
|
234
|
+
Drawer.displayName = "Drawer";
|
|
235
|
+
export {
|
|
236
|
+
Drawer
|
|
237
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { Side, Align } from "../../internals/anchor-position.js";
|
|
3
|
+
export interface DropdownMenuProps {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the menu is open.
|
|
6
|
+
*
|
|
7
|
+
* The source declares this `$bindable(false)`; React has no two-way
|
|
8
|
+
* channel, so the component keeps its own copy either way — seeded from
|
|
9
|
+
* this prop and re-synced whenever the caller changes it. `onOpenChange`
|
|
10
|
+
* fires with the same value at the same moment in every call shape.
|
|
11
|
+
*/
|
|
12
|
+
open?: boolean;
|
|
13
|
+
/** Called with the new value whenever the menu opens or closes, however the change happened. */
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
/** Side of the trigger to place the menu on. */
|
|
16
|
+
side?: Side;
|
|
17
|
+
/** Alignment along the trigger's cross axis. */
|
|
18
|
+
align?: Align;
|
|
19
|
+
/** Gap in pixels between the trigger and the menu. */
|
|
20
|
+
offset?: number;
|
|
21
|
+
/** Whether arrow-key navigation wraps at the ends. */
|
|
22
|
+
loop?: boolean;
|
|
23
|
+
/** The `DropdownMenuTrigger` and `DropdownMenuContent`. */
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Plays the matching interface cue through the sound controller. Off by
|
|
27
|
+
* default; only audible once the user has enabled sound.
|
|
28
|
+
*/
|
|
29
|
+
sound?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The root of the menu compound. Renders no DOM of its own — exactly as the
|
|
33
|
+
* source does — and publishes the one context its trigger and content read.
|
|
34
|
+
*
|
|
35
|
+
* No `forwardRef`: the source declares no `ref` binding here, and the Svelte
|
|
36
|
+
* API surface is the contract, per-component.
|
|
37
|
+
*/
|
|
38
|
+
export declare function DropdownMenu({ open: openProp, onOpenChange, side, align, offset, loop, children, sound, }: DropdownMenuProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useRef, useState, useCallback, useMemo } from "react";
|
|
4
|
+
import { useEventCallback } from "../../internals/dom/use-event-callback.js";
|
|
5
|
+
import { useLiveRef } from "../../internals/dom/use-live-ref.js";
|
|
6
|
+
import { useFancyId } from "../../internals/use-id.js";
|
|
7
|
+
import { useSoundCue } from "../../sound/use-sound.js";
|
|
8
|
+
import { DROPDOWN_MENU_KEY } from "./types.js";
|
|
9
|
+
function DropdownMenu({
|
|
10
|
+
open: openProp,
|
|
11
|
+
onOpenChange,
|
|
12
|
+
side = "bottom",
|
|
13
|
+
align = "start",
|
|
14
|
+
offset = 4,
|
|
15
|
+
loop = true,
|
|
16
|
+
children,
|
|
17
|
+
sound = false
|
|
18
|
+
}) {
|
|
19
|
+
const uid = useFancyId();
|
|
20
|
+
const contentId = `${uid}-content`;
|
|
21
|
+
const triggerId = `${uid}-trigger`;
|
|
22
|
+
const triggerRef = useRef(null);
|
|
23
|
+
const focusEdgeRef = useRef("first");
|
|
24
|
+
const [open, setOpenState] = useState(openProp ?? false);
|
|
25
|
+
const [lastOpenProp, setLastOpenProp] = useState(openProp);
|
|
26
|
+
if (lastOpenProp !== openProp) {
|
|
27
|
+
setLastOpenProp(openProp);
|
|
28
|
+
setOpenState(openProp ?? false);
|
|
29
|
+
}
|
|
30
|
+
const openRef = useLiveRef(open);
|
|
31
|
+
const handleOpenChange = useEventCallback(onOpenChange);
|
|
32
|
+
const playCue = useSoundCue(sound);
|
|
33
|
+
const setOpen = useCallback(
|
|
34
|
+
(next, options = {}) => {
|
|
35
|
+
if (openRef.current === next) return;
|
|
36
|
+
setOpenState(next);
|
|
37
|
+
handleOpenChange(next);
|
|
38
|
+
if (!options.silent) playCue(next ? "open" : "close");
|
|
39
|
+
if (!next && (options.returnFocus ?? true) && triggerRef.current?.isConnected) {
|
|
40
|
+
triggerRef.current.focus();
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
[openRef, handleOpenChange, playCue]
|
|
44
|
+
);
|
|
45
|
+
const setTriggerRef = useCallback((el) => {
|
|
46
|
+
triggerRef.current = el;
|
|
47
|
+
}, []);
|
|
48
|
+
const openWithFocus = useCallback(
|
|
49
|
+
(edge) => {
|
|
50
|
+
focusEdgeRef.current = edge;
|
|
51
|
+
setOpen(true);
|
|
52
|
+
},
|
|
53
|
+
[setOpen]
|
|
54
|
+
);
|
|
55
|
+
const close = useCallback(
|
|
56
|
+
(options = {}) => {
|
|
57
|
+
setOpen(false, options);
|
|
58
|
+
},
|
|
59
|
+
[setOpen]
|
|
60
|
+
);
|
|
61
|
+
const context = useMemo(
|
|
62
|
+
() => ({
|
|
63
|
+
contentId,
|
|
64
|
+
triggerId,
|
|
65
|
+
side,
|
|
66
|
+
align,
|
|
67
|
+
offset,
|
|
68
|
+
loop,
|
|
69
|
+
open,
|
|
70
|
+
sound,
|
|
71
|
+
get focusEdge() {
|
|
72
|
+
return focusEdgeRef.current;
|
|
73
|
+
},
|
|
74
|
+
get triggerRef() {
|
|
75
|
+
return triggerRef.current;
|
|
76
|
+
},
|
|
77
|
+
setTriggerRef,
|
|
78
|
+
openWithFocus,
|
|
79
|
+
close
|
|
80
|
+
}),
|
|
81
|
+
[
|
|
82
|
+
contentId,
|
|
83
|
+
triggerId,
|
|
84
|
+
side,
|
|
85
|
+
align,
|
|
86
|
+
offset,
|
|
87
|
+
loop,
|
|
88
|
+
open,
|
|
89
|
+
sound,
|
|
90
|
+
setTriggerRef,
|
|
91
|
+
openWithFocus,
|
|
92
|
+
close
|
|
93
|
+
]
|
|
94
|
+
);
|
|
95
|
+
return /* @__PURE__ */ jsx(DROPDOWN_MENU_KEY.Provider, { value: context, children });
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
DropdownMenu
|
|
99
|
+
};
|