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,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Floating element positioning — geometry only.
|
|
3
|
+
*
|
|
4
|
+
* A pure geometry helper that pins a floating box (menu, popover, completion
|
|
5
|
+
* list) to an anchor. The anchor can be a real element's rect or a virtual
|
|
6
|
+
* rect, which is how a caret-following menu is placed.
|
|
7
|
+
*
|
|
8
|
+
* `attachFloat` / `useFloat` (the DOM-observing half) are a separate,
|
|
9
|
+
* hook-carrying unit and are not ported here.
|
|
10
|
+
*/
|
|
11
|
+
export type FloatPlacement = "top" | "bottom" | "top-start" | "bottom-start" | "top-end" | "bottom-end";
|
|
12
|
+
export interface FloatRect {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}
|
|
18
|
+
export interface FloatSize {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
}
|
|
22
|
+
export interface FloatOptions {
|
|
23
|
+
/** Real element, a fixed rect, or a getter returning the current rect (caret anchoring). */
|
|
24
|
+
anchor: HTMLElement | FloatRect | (() => FloatRect | null);
|
|
25
|
+
placement?: FloatPlacement;
|
|
26
|
+
offset?: number;
|
|
27
|
+
padding?: number;
|
|
28
|
+
/** Force the float to the anchor's width before measuring. */
|
|
29
|
+
matchWidth?: boolean;
|
|
30
|
+
enabled?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Resolve the viewport-space position of a floating box against its anchor.
|
|
34
|
+
*
|
|
35
|
+
* Flips to the opposite side only when the requested side cannot hold the float
|
|
36
|
+
* *and* the opposite side has strictly more room. If neither side fits, the
|
|
37
|
+
* larger one is kept — overflowing where the least content is hidden.
|
|
38
|
+
*/
|
|
39
|
+
export declare function computeFloatPosition(anchor: FloatRect, float: FloatSize, viewport: FloatSize, opts: {
|
|
40
|
+
placement: FloatPlacement;
|
|
41
|
+
offset: number;
|
|
42
|
+
padding: number;
|
|
43
|
+
}): {
|
|
44
|
+
top: number;
|
|
45
|
+
left: number;
|
|
46
|
+
placement: FloatPlacement;
|
|
47
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function clamp(value, min, max) {
|
|
3
|
+
return Math.max(min, Math.min(value, max));
|
|
4
|
+
}
|
|
5
|
+
function splitPlacement(placement) {
|
|
6
|
+
const [side, align] = placement.split("-");
|
|
7
|
+
return { side, align: align ?? "center" };
|
|
8
|
+
}
|
|
9
|
+
function joinPlacement(side, align) {
|
|
10
|
+
return align === "center" ? side : `${side}-${align}`;
|
|
11
|
+
}
|
|
12
|
+
function computeFloatPosition(anchor, float, viewport, opts) {
|
|
13
|
+
const { offset, padding } = opts;
|
|
14
|
+
const { side, align } = splitPlacement(opts.placement);
|
|
15
|
+
const roomBelow = viewport.height - (anchor.y + anchor.height) - offset - padding;
|
|
16
|
+
const roomAbove = anchor.y - offset - padding;
|
|
17
|
+
const wanted = side === "bottom" ? roomBelow : roomAbove;
|
|
18
|
+
const opposite = side === "bottom" ? roomAbove : roomBelow;
|
|
19
|
+
const flipped = float.height > wanted && opposite > wanted;
|
|
20
|
+
const finalSide = flipped ? side === "bottom" ? "top" : "bottom" : side;
|
|
21
|
+
const top = finalSide === "bottom" ? anchor.y + anchor.height + offset : anchor.y - float.height - offset;
|
|
22
|
+
const left = align === "start" ? anchor.x : align === "end" ? anchor.x + anchor.width - float.width : anchor.x + anchor.width / 2 - float.width / 2;
|
|
23
|
+
return {
|
|
24
|
+
top: clamp(top, padding, viewport.height - float.height - padding),
|
|
25
|
+
left: clamp(left, padding, viewport.width - float.width - padding),
|
|
26
|
+
placement: joinPlacement(finalSide, align)
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
computeFloatPosition
|
|
31
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { ElementRef } from "./dom/types.js";
|
|
2
|
+
export interface FocusTrapOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Element to focus when the trap activates. Defaults to the first focusable
|
|
5
|
+
* descendant of node. A ref is resolved at every use rather than at attach
|
|
6
|
+
* time, so a target that appears later still wins.
|
|
7
|
+
*/
|
|
8
|
+
initialFocus?: ElementRef<HTMLElement> | HTMLElement | null;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to restore focus to the previously active element on destroy.
|
|
11
|
+
* Defaults to true. It does NOT govern `returnFocusNow()`: a caller that
|
|
12
|
+
* passes `returnFocus: false` and then calls the handle is contradicting
|
|
13
|
+
* itself, and the handle wins — asking for the eager return IS asking for
|
|
14
|
+
* the return. `returnFocus: false` governs the *unmount* path only.
|
|
15
|
+
*/
|
|
16
|
+
returnFocus?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Called on destroy, but only when the element that had focus before the
|
|
19
|
+
* trap activated is no longer in the document — removed by a re-render,
|
|
20
|
+
* a list row disappearing, a trigger inside a reordering list. Should
|
|
21
|
+
* return a still-connected element to focus instead, typically the
|
|
22
|
+
* overlay's own trigger, or `null`/`undefined` to fall through to the last
|
|
23
|
+
* resort. Never called while the original element is still connected —
|
|
24
|
+
* that element always wins first, unconditionally.
|
|
25
|
+
*/
|
|
26
|
+
fallbackFocus?: () => HTMLElement | null | undefined;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The two functions the Svelte side hands out through `onActivate`. Here they
|
|
30
|
+
* are simply RETURNED: a hook can return a value, an action cannot.
|
|
31
|
+
*
|
|
32
|
+
* 1. `returnFocusNow` exists because an animated exit delays the unmount by the
|
|
33
|
+
* length of the fade. Without it a keyboard user pressing Escape waits
|
|
34
|
+
* 200 ms for focus to come back — and worse, the panel is marked `inert` the
|
|
35
|
+
* instant the exit starts, which drops focus to `<body>` for that whole
|
|
36
|
+
* window. It is called at the dismiss instant, from `usePresence`'s
|
|
37
|
+
* `onExitStart`, which fires on every close path (Escape, outside click,
|
|
38
|
+
* close button, a caller's own `open` write) and fires before the node goes.
|
|
39
|
+
*
|
|
40
|
+
* 2. `rearm` exists because a surface reopened DURING its exit is not a new
|
|
41
|
+
* mount: `usePresence` keeps it mounted through the whole exit, so the
|
|
42
|
+
* effect never re-ran, the initial focus move never re-ran, and the
|
|
43
|
+
* `returned` latch is still set. Without it the reopened `aria-modal` panel
|
|
44
|
+
* would be interactive again with focus sitting on the trigger *behind* it
|
|
45
|
+
* — untrapped, because the Tab handler is bound to the panel — and its next
|
|
46
|
+
* dismiss would return focus nowhere at all, the handle and the unmount path
|
|
47
|
+
* both being permanently disarmed for the life of the instance.
|
|
48
|
+
*/
|
|
49
|
+
export interface FocusTrapHandle {
|
|
50
|
+
/**
|
|
51
|
+
* Runs the three-step return chain IMMEDIATELY and disarms the unmount
|
|
52
|
+
* return. Idempotent: calling it twice, or letting the unmount follow it,
|
|
53
|
+
* returns focus exactly once.
|
|
54
|
+
*/
|
|
55
|
+
returnFocusNow(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Undoes that latch and pulls focus back inside, recapturing the element it
|
|
58
|
+
* displaced. Called at `onEnterStart` when a surface is reopened mid-exit.
|
|
59
|
+
*/
|
|
60
|
+
rearm(): void;
|
|
61
|
+
}
|
|
62
|
+
export interface FocusTrapCoreHandle extends FocusTrapHandle {
|
|
63
|
+
update(options?: FocusTrapOptions): void;
|
|
64
|
+
destroy(): void;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The framework-free core. Activates the trap on `node` synchronously and
|
|
68
|
+
* returns the handle plus `update`/`destroy`.
|
|
69
|
+
*
|
|
70
|
+
* SSR-safe: does nothing when `document` is unavailable.
|
|
71
|
+
*/
|
|
72
|
+
export declare function attachFocusTrap(node: HTMLElement, opts?: FocusTrapOptions): FocusTrapCoreHandle;
|
|
73
|
+
/**
|
|
74
|
+
* React binding. Pass the node (convention C-1), get back an identity-stable
|
|
75
|
+
* handle that is safe in a dependency array.
|
|
76
|
+
*
|
|
77
|
+
* The trap attaches in a layout effect keyed on `[node]` so focus lands before
|
|
78
|
+
* paint; option changes flow through the core's `update()` instead of
|
|
79
|
+
* re-attaching, so retargeting `initialFocus` between form steps never
|
|
80
|
+
* re-runs the initial focus move.
|
|
81
|
+
*/
|
|
82
|
+
export declare function useFocusTrap(node: HTMLElement | null, options?: FocusTrapOptions): FocusTrapHandle;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRef } from "react";
|
|
3
|
+
import { useConstant, useIsomorphicLayoutEffect } from "./dom/ssr.js";
|
|
4
|
+
import { useEventCallback } from "./dom/use-event-callback.js";
|
|
5
|
+
import { useLiveRef } from "./dom/use-live-ref.js";
|
|
6
|
+
const FOCUSABLE_SELECTOR = [
|
|
7
|
+
"button:not([disabled])",
|
|
8
|
+
"[href]:not([disabled])",
|
|
9
|
+
"input:not([disabled])",
|
|
10
|
+
"select:not([disabled])",
|
|
11
|
+
"textarea:not([disabled])",
|
|
12
|
+
'[tabindex]:not([tabindex="-1"]):not([disabled])'
|
|
13
|
+
].join(", ");
|
|
14
|
+
function isVisible(el) {
|
|
15
|
+
if (el.hidden || el.closest("[hidden]") !== null) return false;
|
|
16
|
+
if (getComputedStyle(el).visibility === "hidden") return false;
|
|
17
|
+
for (let node = el; node; node = node.parentElement) {
|
|
18
|
+
if (getComputedStyle(node).display === "none") return false;
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
function getFocusableElements(node) {
|
|
23
|
+
return Array.from(node.querySelectorAll(FOCUSABLE_SELECTOR)).filter(isVisible);
|
|
24
|
+
}
|
|
25
|
+
function resolveElement(target) {
|
|
26
|
+
if (!target) return null;
|
|
27
|
+
return "current" in target ? target.current : target;
|
|
28
|
+
}
|
|
29
|
+
function attachFocusTrap(node, opts = {}) {
|
|
30
|
+
if (typeof document === "undefined") {
|
|
31
|
+
return { returnFocusNow() {
|
|
32
|
+
}, rearm() {
|
|
33
|
+
}, update() {
|
|
34
|
+
}, destroy() {
|
|
35
|
+
} };
|
|
36
|
+
}
|
|
37
|
+
let returnFocus = opts.returnFocus ?? true;
|
|
38
|
+
let fallbackFocus = opts.fallbackFocus;
|
|
39
|
+
let initialFocus = opts.initialFocus;
|
|
40
|
+
let previouslyFocused = document.activeElement;
|
|
41
|
+
function focusContainerFallback() {
|
|
42
|
+
if (!node.hasAttribute("tabindex")) node.setAttribute("tabindex", "-1");
|
|
43
|
+
node.focus();
|
|
44
|
+
}
|
|
45
|
+
function focusInitial(initialFocus2) {
|
|
46
|
+
const target = resolveElement(initialFocus2) ?? getFocusableElements(node)[0] ?? null;
|
|
47
|
+
if (target) target.focus();
|
|
48
|
+
else focusContainerFallback();
|
|
49
|
+
}
|
|
50
|
+
let returned = false;
|
|
51
|
+
function returnFocus_() {
|
|
52
|
+
if (returned) return;
|
|
53
|
+
returned = true;
|
|
54
|
+
if (previouslyFocused?.isConnected) {
|
|
55
|
+
previouslyFocused.focus();
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const fallback = fallbackFocus?.();
|
|
59
|
+
if (fallback?.isConnected) {
|
|
60
|
+
fallback.focus();
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (!document.body.hasAttribute("tabindex")) {
|
|
64
|
+
document.body.setAttribute("tabindex", "-1");
|
|
65
|
+
}
|
|
66
|
+
document.body.focus();
|
|
67
|
+
}
|
|
68
|
+
function rearm() {
|
|
69
|
+
returned = false;
|
|
70
|
+
const active = document.activeElement;
|
|
71
|
+
if (node.contains(active)) return;
|
|
72
|
+
if (active && active !== document.body && active.isConnected) {
|
|
73
|
+
previouslyFocused = active;
|
|
74
|
+
}
|
|
75
|
+
focusInitial(initialFocus);
|
|
76
|
+
}
|
|
77
|
+
function handleKeydown(event) {
|
|
78
|
+
if (event.key !== "Tab") return;
|
|
79
|
+
const focusable = getFocusableElements(node);
|
|
80
|
+
if (focusable.length === 0) {
|
|
81
|
+
event.preventDefault();
|
|
82
|
+
focusContainerFallback();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const first = focusable[0];
|
|
86
|
+
const last = focusable[focusable.length - 1];
|
|
87
|
+
const active = document.activeElement;
|
|
88
|
+
if (event.shiftKey) {
|
|
89
|
+
if (active === first || !node.contains(active)) {
|
|
90
|
+
event.preventDefault();
|
|
91
|
+
last.focus();
|
|
92
|
+
}
|
|
93
|
+
} else if (active === last || !node.contains(active)) {
|
|
94
|
+
event.preventDefault();
|
|
95
|
+
first.focus();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
focusInitial(initialFocus);
|
|
99
|
+
node.addEventListener("keydown", handleKeydown);
|
|
100
|
+
return {
|
|
101
|
+
returnFocusNow: returnFocus_,
|
|
102
|
+
rearm,
|
|
103
|
+
update(newOpts = {}) {
|
|
104
|
+
returnFocus = newOpts.returnFocus ?? true;
|
|
105
|
+
fallbackFocus = newOpts.fallbackFocus;
|
|
106
|
+
initialFocus = newOpts.initialFocus;
|
|
107
|
+
},
|
|
108
|
+
destroy() {
|
|
109
|
+
node.removeEventListener("keydown", handleKeydown);
|
|
110
|
+
if (!returnFocus || returned) return;
|
|
111
|
+
returnFocus_();
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function useFocusTrap(node, options = {}) {
|
|
116
|
+
const { initialFocus = null, returnFocus = true } = options;
|
|
117
|
+
const fallbackFocus = useEventCallback(options.fallbackFocus);
|
|
118
|
+
const coreRef = useRef(null);
|
|
119
|
+
const latest = useLiveRef({ initialFocus, returnFocus, fallbackFocus });
|
|
120
|
+
const handle = useConstant(() => ({
|
|
121
|
+
returnFocusNow() {
|
|
122
|
+
coreRef.current?.returnFocusNow();
|
|
123
|
+
},
|
|
124
|
+
rearm() {
|
|
125
|
+
coreRef.current?.rearm();
|
|
126
|
+
}
|
|
127
|
+
}));
|
|
128
|
+
useIsomorphicLayoutEffect(() => {
|
|
129
|
+
if (!node) return;
|
|
130
|
+
const core = attachFocusTrap(node, latest.current);
|
|
131
|
+
coreRef.current = core;
|
|
132
|
+
return () => {
|
|
133
|
+
coreRef.current = null;
|
|
134
|
+
core.destroy();
|
|
135
|
+
};
|
|
136
|
+
}, [node, latest]);
|
|
137
|
+
useIsomorphicLayoutEffect(() => {
|
|
138
|
+
coreRef.current?.update({ initialFocus, returnFocus, fallbackFocus });
|
|
139
|
+
}, [initialFocus, returnFocus, fallbackFocus]);
|
|
140
|
+
return handle;
|
|
141
|
+
}
|
|
142
|
+
export {
|
|
143
|
+
attachFocusTrap,
|
|
144
|
+
useFocusTrap
|
|
145
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two scraps of text that identify a cited document on screen: the host it
|
|
3
|
+
* came from, and the single character that stands in for a favicon.
|
|
4
|
+
*
|
|
5
|
+
* Loading a real favicon would mean a request to the cited site from every
|
|
6
|
+
* reader's browser, which is a tracking beacon nobody asked for and a broken
|
|
7
|
+
* image the moment the site is gone. A letter drawn from the host says the same
|
|
8
|
+
* thing, costs nothing, and cannot fail.
|
|
9
|
+
*
|
|
10
|
+
* Every citation surface — source cards, the collapsed sources pill, search
|
|
11
|
+
* result rows — reads hosts through here, so a `www.` is stripped and a
|
|
12
|
+
* scheme-less fixture is parsed the same way everywhere. Internal: not exported
|
|
13
|
+
* from the package.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* The host of a URL with any `www.` prefix removed, or an empty string when
|
|
17
|
+
* there is no host to show.
|
|
18
|
+
*
|
|
19
|
+
* `new URL` is the parser of record; the regex behind it only exists for the
|
|
20
|
+
* protocol-relative and scheme-less strings it rejects (`//docs.example.dev/x`,
|
|
21
|
+
* `docs.example.dev/x`), which turn up constantly in hand-written fixtures and
|
|
22
|
+
* in model output.
|
|
23
|
+
*
|
|
24
|
+
* `undefined` is accepted rather than merely typed away: the data reaching these
|
|
25
|
+
* components comes off the wire, where an optional field is a real possibility
|
|
26
|
+
* whatever the interface says.
|
|
27
|
+
*/
|
|
28
|
+
export declare function hostOf(url: string | undefined): string;
|
|
29
|
+
/**
|
|
30
|
+
* The character in a monogram circle: the first letter or digit of the text,
|
|
31
|
+
* upper-cased, falling back to a question mark so the circle is never empty.
|
|
32
|
+
*
|
|
33
|
+
* First letter or digit rather than first character, because a title that opens
|
|
34
|
+
* with a quote or a bullet would otherwise put punctuation in the circle. The
|
|
35
|
+
* `u` flag is what keeps a character outside the BMP whole instead of matching
|
|
36
|
+
* half a surrogate pair.
|
|
37
|
+
*/
|
|
38
|
+
export declare function monogram(text: string | undefined): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function hostOf(url) {
|
|
3
|
+
if (typeof url !== "string" || url === "") return "";
|
|
4
|
+
try {
|
|
5
|
+
return stripWww(new URL(url).hostname);
|
|
6
|
+
} catch {
|
|
7
|
+
const match = /^(?:[a-z][a-z0-9+.-]*:)?(?:\/\/)?([^/?#\s]+)/i.exec(url);
|
|
8
|
+
if (!match) return "";
|
|
9
|
+
const host = match[1].split("@").pop();
|
|
10
|
+
return host.includes(".") ? stripWww(host) : "";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function monogram(text) {
|
|
14
|
+
const match = /[\p{L}\p{N}]/u.exec(text ?? "");
|
|
15
|
+
const upper = (match?.[0] ?? "?").toUpperCase();
|
|
16
|
+
return [...upper].length > 1 ? match?.[0] ?? "?" : upper;
|
|
17
|
+
}
|
|
18
|
+
function stripWww(host) {
|
|
19
|
+
return host.replace(/^www\./i, "");
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
hostOf,
|
|
23
|
+
monogram
|
|
24
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Listbox keyboard-navigation core: which option is "active" (highlighted,
|
|
3
|
+
* `aria-activedescendant`-pointed-at) as arrow keys, Home/End and typeahead
|
|
4
|
+
* move through a flat list of options, some of which may be disabled.
|
|
5
|
+
*
|
|
6
|
+
* This is the frozen surface `Select`, `Combobox`, `Autocomplete` and
|
|
7
|
+
* `TimePicker` all consume, so every one of them gets the same two behaviours
|
|
8
|
+
* right once instead of four times:
|
|
9
|
+
*
|
|
10
|
+
* - A run of consecutive disabled options is skipped as a block, not one
|
|
11
|
+
* step into a dead end — `move`/`moveToEdge` keep stepping past them. If
|
|
12
|
+
* *every* option is disabled, stepping terminates after at most `count()`
|
|
13
|
+
* attempts rather than looping forever hunting for an enabled option that
|
|
14
|
+
* does not exist.
|
|
15
|
+
* - Typeahead accumulates characters typed within a short window and resets
|
|
16
|
+
* after it, so "ne" lands on "Netherlands" rather than re-matching "e"
|
|
17
|
+
* against everything. Repeating the same character cycles through the
|
|
18
|
+
* matches for that character, one per press, the way a native `<select>`
|
|
19
|
+
* does.
|
|
20
|
+
*
|
|
21
|
+
* Pure state + behaviour, no DOM: a caller wires `count`/`enabled` off
|
|
22
|
+
* whatever it renders (a data array for `Select`, live DOM children for a
|
|
23
|
+
* `Combobox` built on real elements) and reacts to `onActiveChange` to keep
|
|
24
|
+
* the active row in view.
|
|
25
|
+
*
|
|
26
|
+
* `createListbox` is framework-free and stays the tested surface. `useListbox`
|
|
27
|
+
* is the thin React binding on top: one store per mount, `destroy()` on
|
|
28
|
+
* unmount, and `activeIndex` read through `useSyncExternalStore` because this
|
|
29
|
+
* is the one index in the internals that genuinely has to drive rendering
|
|
30
|
+
* (`aria-activedescendant` on the listbox, `isActive(index)` on every row).
|
|
31
|
+
*/
|
|
32
|
+
export interface ListboxOptions {
|
|
33
|
+
/** Number of options currently rendered. */
|
|
34
|
+
count: () => number;
|
|
35
|
+
/** Whether the option at this index can be activated. */
|
|
36
|
+
enabled?: (index: number) => boolean;
|
|
37
|
+
/** Called when the active option changes, so the caller can scroll it into view. */
|
|
38
|
+
onActiveChange?: (index: number) => void;
|
|
39
|
+
/** Whether arrow navigation wraps at the ends. Defaults to true. */
|
|
40
|
+
loop?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface ListboxState {
|
|
43
|
+
/** Index of the active option, or -1 when nothing is active. */
|
|
44
|
+
readonly activeIndex: number;
|
|
45
|
+
/** Moves by delta, skipping disabled options, wrapping when `loop`. `delta === 0` is a no-op. */
|
|
46
|
+
move(delta: number): void;
|
|
47
|
+
/** Jumps to the first or last enabled option. */
|
|
48
|
+
moveToEdge(edge: "first" | "last"): void;
|
|
49
|
+
/** Sets the active option directly; -1 clears it. A disabled index is left alone (no-op), never activated. */
|
|
50
|
+
setActive(index: number): void;
|
|
51
|
+
/** Advances typeahead with a printable character and activates the match. */
|
|
52
|
+
typeahead(char: string, labelAt: (index: number) => string): void;
|
|
53
|
+
/** Clears the typeahead buffer and any pending timer. Call from teardown. */
|
|
54
|
+
destroy(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Added for React, standing in for the Svelte `$state` rune: notifies on
|
|
57
|
+
* every `activeIndex` change. Returns the unsubscribe.
|
|
58
|
+
*/
|
|
59
|
+
subscribe(listener: () => void): () => void;
|
|
60
|
+
}
|
|
61
|
+
export declare function createListbox(options: ListboxOptions): ListboxState;
|
|
62
|
+
export interface UseListboxOptions {
|
|
63
|
+
/**
|
|
64
|
+
* A plain number. The hook wraps it in a live ref and hands the factory the
|
|
65
|
+
* getter it expects, so a virtualised list that changes `count` between
|
|
66
|
+
* renders is honoured at call time exactly as in Svelte.
|
|
67
|
+
*/
|
|
68
|
+
count: number;
|
|
69
|
+
/** Whether the option at this index can be activated. Read on every call, so an inline literal is fine. */
|
|
70
|
+
enabled?: (index: number) => boolean;
|
|
71
|
+
/** Called when the active option changes, so the caller can scroll it into view. */
|
|
72
|
+
onActiveChange?: (index: number) => void;
|
|
73
|
+
/** Whether arrow navigation wraps at the ends. Defaults to true. */
|
|
74
|
+
loop?: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface ListboxHandle {
|
|
77
|
+
/** The active option for THIS render, or -1. */
|
|
78
|
+
readonly activeIndex: number;
|
|
79
|
+
/** Moves by delta, skipping disabled options, wrapping when `loop`. `delta === 0` is a no-op. */
|
|
80
|
+
move(delta: number): void;
|
|
81
|
+
/** Jumps to the first or last enabled option. */
|
|
82
|
+
moveToEdge(edge: "first" | "last"): void;
|
|
83
|
+
/** Sets the active option directly; -1 clears it. A disabled index is left alone (no-op), never activated. */
|
|
84
|
+
setActive(index: number): void;
|
|
85
|
+
/** Advances typeahead with a printable character and activates the match. */
|
|
86
|
+
typeahead(char: string, labelAt: (index: number) => string): void;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* One store per mount, `destroy()` on unmount — the consumer cannot forget the
|
|
90
|
+
* teardown the way a component wiring the factory by hand could.
|
|
91
|
+
*
|
|
92
|
+
* `count`, `enabled`, `onActiveChange` and `loop` are all read at call time
|
|
93
|
+
* from live refs, so passing them as plain values (or as inline literals that
|
|
94
|
+
* change identity every render) behaves exactly like the Svelte call sites'
|
|
95
|
+
* getter objects. The store is never rebuilt, so the buffered typeahead and
|
|
96
|
+
* the active index survive every re-render.
|
|
97
|
+
*
|
|
98
|
+
* Only the returned object's identity changes, and only when `activeIndex`
|
|
99
|
+
* does; the four methods are stable for the life of the component.
|
|
100
|
+
*/
|
|
101
|
+
export declare function useListbox(options: UseListboxOptions): ListboxHandle;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useCallback, useSyncExternalStore, useMemo } from "react";
|
|
3
|
+
import { useConstant } from "./dom/ssr.js";
|
|
4
|
+
import { useEventCallback } from "./dom/use-event-callback.js";
|
|
5
|
+
import { useLiveRef } from "./dom/use-live-ref.js";
|
|
6
|
+
const NONE = null;
|
|
7
|
+
const TYPEAHEAD_TIMEOUT_MS = 500;
|
|
8
|
+
function findNext(from, direction, count, loop, isEnabled) {
|
|
9
|
+
let idx = from;
|
|
10
|
+
for (let attempts = 0; attempts < count; attempts++) {
|
|
11
|
+
idx += direction;
|
|
12
|
+
if (loop) {
|
|
13
|
+
idx = (idx % count + count) % count;
|
|
14
|
+
} else if (idx < 0 || idx >= count) {
|
|
15
|
+
return NONE;
|
|
16
|
+
}
|
|
17
|
+
if (isEnabled(idx)) return idx;
|
|
18
|
+
}
|
|
19
|
+
return NONE;
|
|
20
|
+
}
|
|
21
|
+
function createListbox(options) {
|
|
22
|
+
let activeIndex = -1;
|
|
23
|
+
let buffer = "";
|
|
24
|
+
let timer = null;
|
|
25
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
26
|
+
function notify() {
|
|
27
|
+
for (const listener of listeners) listener();
|
|
28
|
+
}
|
|
29
|
+
function subscribe(listener) {
|
|
30
|
+
listeners.add(listener);
|
|
31
|
+
return () => {
|
|
32
|
+
listeners.delete(listener);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function isEnabled(index) {
|
|
36
|
+
return options.enabled?.(index) ?? true;
|
|
37
|
+
}
|
|
38
|
+
function commitActive(index) {
|
|
39
|
+
if (index === activeIndex) return;
|
|
40
|
+
activeIndex = index;
|
|
41
|
+
notify();
|
|
42
|
+
options.onActiveChange?.(index);
|
|
43
|
+
}
|
|
44
|
+
function setActive(index) {
|
|
45
|
+
if (index !== -1) {
|
|
46
|
+
const count = options.count();
|
|
47
|
+
if (index < 0 || index >= count) return;
|
|
48
|
+
if (!isEnabled(index)) return;
|
|
49
|
+
}
|
|
50
|
+
commitActive(index);
|
|
51
|
+
}
|
|
52
|
+
function move(delta) {
|
|
53
|
+
if (delta === 0) return;
|
|
54
|
+
const count = options.count();
|
|
55
|
+
if (count <= 0) return;
|
|
56
|
+
const loop = options.loop ?? true;
|
|
57
|
+
const direction = delta >= 0 ? 1 : -1;
|
|
58
|
+
const steps = Math.abs(delta);
|
|
59
|
+
let from = activeIndex === -1 ? direction === 1 ? -1 : count : activeIndex;
|
|
60
|
+
let found = NONE;
|
|
61
|
+
for (let i = 0; i < steps; i++) {
|
|
62
|
+
const next = findNext(found ?? from, direction, count, loop, isEnabled);
|
|
63
|
+
if (next === NONE) break;
|
|
64
|
+
found = next;
|
|
65
|
+
}
|
|
66
|
+
if (found !== NONE) commitActive(found);
|
|
67
|
+
}
|
|
68
|
+
function moveToEdge(edge) {
|
|
69
|
+
const count = options.count();
|
|
70
|
+
if (count <= 0) return;
|
|
71
|
+
if (edge === "first") {
|
|
72
|
+
for (let i = 0; i < count; i++) {
|
|
73
|
+
if (isEnabled(i)) {
|
|
74
|
+
commitActive(i);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
for (let i = count - 1; i >= 0; i--) {
|
|
81
|
+
if (isEnabled(i)) {
|
|
82
|
+
commitActive(i);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function clearBuffer() {
|
|
88
|
+
buffer = "";
|
|
89
|
+
if (timer !== null) {
|
|
90
|
+
clearTimeout(timer);
|
|
91
|
+
timer = null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function typeahead(char, labelAt) {
|
|
95
|
+
const count = options.count();
|
|
96
|
+
if (count <= 0) return;
|
|
97
|
+
const lower = char.toLowerCase();
|
|
98
|
+
const isRepeatChar = buffer.length > 0 && [...buffer].every((c) => c === lower);
|
|
99
|
+
if (timer !== null) clearTimeout(timer);
|
|
100
|
+
timer = setTimeout(clearBuffer, TYPEAHEAD_TIMEOUT_MS);
|
|
101
|
+
if (isRepeatChar) {
|
|
102
|
+
buffer = lower;
|
|
103
|
+
for (let i = 1; i <= count; i++) {
|
|
104
|
+
const candidate = (activeIndex + i + count) % count;
|
|
105
|
+
if (!isEnabled(candidate)) continue;
|
|
106
|
+
if (labelAt(candidate).toLowerCase().startsWith(lower)) {
|
|
107
|
+
commitActive(candidate);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
buffer += lower;
|
|
114
|
+
const query = buffer;
|
|
115
|
+
for (let i = 0; i < count; i++) {
|
|
116
|
+
if (!isEnabled(i)) continue;
|
|
117
|
+
if (labelAt(i).toLowerCase().startsWith(query)) {
|
|
118
|
+
commitActive(i);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function destroy() {
|
|
124
|
+
clearBuffer();
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
get activeIndex() {
|
|
128
|
+
return activeIndex;
|
|
129
|
+
},
|
|
130
|
+
move,
|
|
131
|
+
moveToEdge,
|
|
132
|
+
setActive,
|
|
133
|
+
typeahead,
|
|
134
|
+
destroy,
|
|
135
|
+
subscribe
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
const getServerSnapshot = () => -1;
|
|
139
|
+
function useListbox(options) {
|
|
140
|
+
const countRef = useLiveRef(options.count);
|
|
141
|
+
const enabledRef = useLiveRef(options.enabled);
|
|
142
|
+
const loopRef = useLiveRef(options.loop);
|
|
143
|
+
const onActiveChange = useEventCallback(options.onActiveChange);
|
|
144
|
+
const store = useConstant(
|
|
145
|
+
() => createListbox({
|
|
146
|
+
count: () => countRef.current,
|
|
147
|
+
enabled: (index) => enabledRef.current?.(index) ?? true,
|
|
148
|
+
onActiveChange,
|
|
149
|
+
get loop() {
|
|
150
|
+
return loopRef.current;
|
|
151
|
+
}
|
|
152
|
+
})
|
|
153
|
+
);
|
|
154
|
+
useEffect(() => () => store.destroy(), [store]);
|
|
155
|
+
const getSnapshot = useCallback(() => store.activeIndex, [store]);
|
|
156
|
+
const activeIndex = useSyncExternalStore(store.subscribe, getSnapshot, getServerSnapshot);
|
|
157
|
+
return useMemo(
|
|
158
|
+
() => ({
|
|
159
|
+
activeIndex,
|
|
160
|
+
move: store.move,
|
|
161
|
+
moveToEdge: store.moveToEdge,
|
|
162
|
+
setActive: store.setActive,
|
|
163
|
+
typeahead: store.typeahead
|
|
164
|
+
}),
|
|
165
|
+
[activeIndex, store]
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
export {
|
|
169
|
+
createListbox,
|
|
170
|
+
useListbox
|
|
171
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type BlockToken } from "../markdown.js";
|
|
3
|
+
export interface MarkdownProps {
|
|
4
|
+
/** Markdown source. Safe to update on every streamed chunk. */
|
|
5
|
+
text?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Already-parsed blocks, used when the component renders itself for a
|
|
9
|
+
* blockquote. Consumers pass `text`.
|
|
10
|
+
*/
|
|
11
|
+
blocks?: BlockToken[];
|
|
12
|
+
/**
|
|
13
|
+
* Rendered inline at the very end of the document — a streaming caret, say.
|
|
14
|
+
* Every block here is block-level, so a caret placed after the component
|
|
15
|
+
* would sit on its own line instead of trailing the last character; this
|
|
16
|
+
* puts it inside the last paragraph, heading or list item instead. A
|
|
17
|
+
* document ending in code, a table, a rule, or nothing at all has no inline
|
|
18
|
+
* tail to hold it, and drops it.
|
|
19
|
+
*/
|
|
20
|
+
trailingCursor?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export declare function Markdown({ text, className, blocks, trailingCursor }: MarkdownProps): import("react").JSX.Element;
|