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,355 @@
|
|
|
1
|
+
import { SOUND_CUES, SOUND_LIMITS } from "./types.js";
|
|
2
|
+
function env(attack, decay, sustain, release) {
|
|
3
|
+
return { attack, decay, sustain, release };
|
|
4
|
+
}
|
|
5
|
+
function deepFreeze(value) {
|
|
6
|
+
if (value && typeof value === "object" && !Object.isFrozen(value)) {
|
|
7
|
+
for (const key of Object.keys(value)) {
|
|
8
|
+
deepFreeze(value[key]);
|
|
9
|
+
}
|
|
10
|
+
Object.freeze(value);
|
|
11
|
+
}
|
|
12
|
+
return value;
|
|
13
|
+
}
|
|
14
|
+
const FANCY_CUES = {
|
|
15
|
+
hover: {
|
|
16
|
+
layers: [
|
|
17
|
+
{
|
|
18
|
+
kind: "oscillator",
|
|
19
|
+
wave: "sine",
|
|
20
|
+
frequency: 1760,
|
|
21
|
+
frequencyEnd: 1975,
|
|
22
|
+
gain: 0.12,
|
|
23
|
+
envelope: env(2, 20, 0, 20),
|
|
24
|
+
duration: 45,
|
|
25
|
+
filter: { type: "highpass", frequency: 800 }
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
press: {
|
|
30
|
+
layers: [
|
|
31
|
+
{
|
|
32
|
+
kind: "oscillator",
|
|
33
|
+
wave: "triangle",
|
|
34
|
+
frequency: 520,
|
|
35
|
+
frequencyEnd: 440,
|
|
36
|
+
gain: 0.5,
|
|
37
|
+
envelope: env(2, 35, 0, 25),
|
|
38
|
+
duration: 70
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
kind: "noise",
|
|
42
|
+
gain: 0.18,
|
|
43
|
+
envelope: env(1, 18, 0, 8),
|
|
44
|
+
duration: 30,
|
|
45
|
+
filter: { type: "bandpass", frequency: 2400, q: 1.2 }
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"toggle-on": {
|
|
50
|
+
layers: [
|
|
51
|
+
{
|
|
52
|
+
kind: "oscillator",
|
|
53
|
+
wave: "sine",
|
|
54
|
+
frequency: 660,
|
|
55
|
+
gain: 0.4,
|
|
56
|
+
envelope: env(3, 30, 0.2, 20),
|
|
57
|
+
duration: 55
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
kind: "oscillator",
|
|
61
|
+
wave: "sine",
|
|
62
|
+
frequency: 880,
|
|
63
|
+
gain: 0.4,
|
|
64
|
+
envelope: env(3, 40, 0, 25),
|
|
65
|
+
duration: 70,
|
|
66
|
+
delay: 45,
|
|
67
|
+
filter: { type: "lowpass", frequency: 4e3 }
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"toggle-off": {
|
|
72
|
+
layers: [
|
|
73
|
+
{
|
|
74
|
+
kind: "oscillator",
|
|
75
|
+
wave: "sine",
|
|
76
|
+
frequency: 880,
|
|
77
|
+
gain: 0.35,
|
|
78
|
+
envelope: env(3, 30, 0.2, 20),
|
|
79
|
+
duration: 55
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
kind: "oscillator",
|
|
83
|
+
wave: "sine",
|
|
84
|
+
frequency: 660,
|
|
85
|
+
gain: 0.32,
|
|
86
|
+
envelope: env(3, 35, 0, 20),
|
|
87
|
+
duration: 60,
|
|
88
|
+
delay: 45,
|
|
89
|
+
filter: { type: "lowpass", frequency: 3500 }
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
open: {
|
|
94
|
+
layers: [
|
|
95
|
+
{
|
|
96
|
+
kind: "oscillator",
|
|
97
|
+
wave: "triangle",
|
|
98
|
+
frequency: 392,
|
|
99
|
+
frequencyEnd: 784,
|
|
100
|
+
gain: 0.35,
|
|
101
|
+
envelope: env(5, 60, 0.3, 30),
|
|
102
|
+
duration: 110
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
kind: "noise",
|
|
106
|
+
gain: 0.08,
|
|
107
|
+
envelope: env(10, 50, 0, 30),
|
|
108
|
+
duration: 90,
|
|
109
|
+
filter: { type: "highpass", frequency: 3e3, frequencyEnd: 6e3 }
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
close: {
|
|
114
|
+
layers: [
|
|
115
|
+
{
|
|
116
|
+
kind: "oscillator",
|
|
117
|
+
wave: "triangle",
|
|
118
|
+
frequency: 784,
|
|
119
|
+
frequencyEnd: 392,
|
|
120
|
+
gain: 0.3,
|
|
121
|
+
envelope: env(4, 50, 0.2, 30),
|
|
122
|
+
duration: 100
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
kind: "noise",
|
|
126
|
+
gain: 0.06,
|
|
127
|
+
envelope: env(5, 40, 0, 30),
|
|
128
|
+
duration: 80,
|
|
129
|
+
filter: { type: "lowpass", frequency: 1500, frequencyEnd: 600 }
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
select: {
|
|
134
|
+
layers: [
|
|
135
|
+
{
|
|
136
|
+
kind: "oscillator",
|
|
137
|
+
wave: "sine",
|
|
138
|
+
frequency: 1046.5,
|
|
139
|
+
gain: 0.35,
|
|
140
|
+
envelope: env(2, 40, 0, 25),
|
|
141
|
+
duration: 70
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
kind: "oscillator",
|
|
145
|
+
wave: "sine",
|
|
146
|
+
frequency: 1568,
|
|
147
|
+
gain: 0.12,
|
|
148
|
+
envelope: env(2, 30, 0, 18),
|
|
149
|
+
duration: 50,
|
|
150
|
+
delay: 10
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
success: {
|
|
155
|
+
layers: [
|
|
156
|
+
{
|
|
157
|
+
kind: "oscillator",
|
|
158
|
+
wave: "sine",
|
|
159
|
+
frequency: 523.25,
|
|
160
|
+
gain: 0.35,
|
|
161
|
+
envelope: env(4, 60, 0.3, 40),
|
|
162
|
+
duration: 110,
|
|
163
|
+
filter: { type: "lowpass", frequency: 5e3 }
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
kind: "oscillator",
|
|
167
|
+
wave: "sine",
|
|
168
|
+
frequency: 659.25,
|
|
169
|
+
gain: 0.35,
|
|
170
|
+
envelope: env(4, 60, 0.3, 40),
|
|
171
|
+
duration: 110,
|
|
172
|
+
delay: 70,
|
|
173
|
+
filter: { type: "lowpass", frequency: 5e3 }
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
kind: "oscillator",
|
|
177
|
+
wave: "sine",
|
|
178
|
+
frequency: 783.99,
|
|
179
|
+
gain: 0.4,
|
|
180
|
+
envelope: env(4, 60, 0.3, 40),
|
|
181
|
+
duration: 150,
|
|
182
|
+
delay: 140,
|
|
183
|
+
filter: { type: "lowpass", frequency: 5e3 }
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
error: {
|
|
188
|
+
layers: [
|
|
189
|
+
{
|
|
190
|
+
kind: "oscillator",
|
|
191
|
+
wave: "sawtooth",
|
|
192
|
+
frequency: 220,
|
|
193
|
+
detune: -8,
|
|
194
|
+
gain: 0.3,
|
|
195
|
+
envelope: env(5, 70, 0.4, 40),
|
|
196
|
+
duration: 130,
|
|
197
|
+
filter: { type: "lowpass", frequency: 900 }
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
kind: "oscillator",
|
|
201
|
+
wave: "sawtooth",
|
|
202
|
+
frequency: 233,
|
|
203
|
+
detune: 8,
|
|
204
|
+
gain: 0.3,
|
|
205
|
+
envelope: env(5, 70, 0.4, 40),
|
|
206
|
+
duration: 130,
|
|
207
|
+
delay: 110,
|
|
208
|
+
filter: { type: "lowpass", frequency: 900 }
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
tick: {
|
|
213
|
+
layers: [
|
|
214
|
+
{
|
|
215
|
+
kind: "noise",
|
|
216
|
+
gain: 0.2,
|
|
217
|
+
envelope: env(1, 12, 0, 8),
|
|
218
|
+
duration: 22,
|
|
219
|
+
filter: { type: "bandpass", frequency: 3500, q: 2 }
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
kind: "oscillator",
|
|
223
|
+
wave: "sine",
|
|
224
|
+
frequency: 2093,
|
|
225
|
+
gain: 0.08,
|
|
226
|
+
envelope: env(1, 15, 0, 8),
|
|
227
|
+
duration: 25
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
copy: {
|
|
232
|
+
layers: [
|
|
233
|
+
{
|
|
234
|
+
kind: "noise",
|
|
235
|
+
gain: 0.15,
|
|
236
|
+
envelope: env(1, 10, 0, 8),
|
|
237
|
+
duration: 20,
|
|
238
|
+
filter: { type: "bandpass", frequency: 5e3, q: 1 }
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
kind: "oscillator",
|
|
242
|
+
wave: "sine",
|
|
243
|
+
frequency: 1318.5,
|
|
244
|
+
frequencyEnd: 1760,
|
|
245
|
+
gain: 0.3,
|
|
246
|
+
envelope: env(2, 50, 0, 25),
|
|
247
|
+
duration: 80,
|
|
248
|
+
delay: 8
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
const FANCY_SOUND_THEME = deepFreeze({
|
|
254
|
+
name: "fancy",
|
|
255
|
+
cues: FANCY_CUES
|
|
256
|
+
});
|
|
257
|
+
const SOUND_THEMES = Object.freeze({
|
|
258
|
+
fancy: FANCY_SOUND_THEME
|
|
259
|
+
});
|
|
260
|
+
function getSoundTheme(name) {
|
|
261
|
+
return SOUND_THEMES[name] ?? FANCY_SOUND_THEME;
|
|
262
|
+
}
|
|
263
|
+
const VALID_WAVES = /* @__PURE__ */ new Set(["sine", "triangle", "square", "sawtooth"]);
|
|
264
|
+
const VALID_FILTERS = /* @__PURE__ */ new Set(["lowpass", "highpass", "bandpass", "notch", "peaking"]);
|
|
265
|
+
function validateSoundTheme(theme) {
|
|
266
|
+
const problems = [];
|
|
267
|
+
for (const cue of SOUND_CUES) {
|
|
268
|
+
const recipe = theme.cues[cue];
|
|
269
|
+
if (!recipe || !recipe.layers || recipe.layers.length === 0) {
|
|
270
|
+
problems.push(`${cue}: missing recipe or no layers`);
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
if (recipe.gain != null) {
|
|
274
|
+
if (!Number.isFinite(recipe.gain) || recipe.gain < 0) {
|
|
275
|
+
problems.push(`${cue}: recipe gain must be a finite number >= 0`);
|
|
276
|
+
} else if (recipe.gain > 1) {
|
|
277
|
+
problems.push(`${cue}: recipe gain must be <= 1`);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
let maxSpan = 0;
|
|
281
|
+
recipe.layers.forEach((layer, index) => {
|
|
282
|
+
const label = `${cue}[${index}]`;
|
|
283
|
+
const delay = layer.delay ?? 0;
|
|
284
|
+
const numericFields = [
|
|
285
|
+
["gain", layer.gain],
|
|
286
|
+
["duration", layer.duration],
|
|
287
|
+
["delay", delay],
|
|
288
|
+
["envelope.attack", layer.envelope.attack],
|
|
289
|
+
["envelope.decay", layer.envelope.decay],
|
|
290
|
+
["envelope.sustain", layer.envelope.sustain],
|
|
291
|
+
["envelope.release", layer.envelope.release]
|
|
292
|
+
];
|
|
293
|
+
for (const [field, value] of numericFields) {
|
|
294
|
+
if (!Number.isFinite(value) || value < 0) {
|
|
295
|
+
problems.push(`${label}: ${field} must be a finite number >= 0`);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
if (Number.isFinite(layer.gain) && layer.gain > 1) {
|
|
299
|
+
problems.push(`${label}: gain must be <= 1`);
|
|
300
|
+
}
|
|
301
|
+
if (Number.isFinite(layer.envelope.sustain) && (layer.envelope.sustain < 0 || layer.envelope.sustain > 1)) {
|
|
302
|
+
problems.push(`${label}: envelope.sustain must be between 0 and 1`);
|
|
303
|
+
}
|
|
304
|
+
const requiredSpan = layer.envelope.attack + layer.envelope.decay + layer.envelope.release;
|
|
305
|
+
if (Number.isFinite(layer.duration) && layer.duration < requiredSpan) {
|
|
306
|
+
problems.push(`${label}: duration must be >= attack + decay + release`);
|
|
307
|
+
}
|
|
308
|
+
if (Number.isFinite(layer.duration) && layer.duration > SOUND_LIMITS.MAX_LAYER_MS) {
|
|
309
|
+
problems.push(`${label}: duration must be <= ${SOUND_LIMITS.MAX_LAYER_MS}ms`);
|
|
310
|
+
}
|
|
311
|
+
if (layer.kind === "oscillator") {
|
|
312
|
+
if (!VALID_WAVES.has(layer.wave)) {
|
|
313
|
+
problems.push(`${label}: invalid wave "${layer.wave}"`);
|
|
314
|
+
}
|
|
315
|
+
if (!Number.isFinite(layer.frequency) || layer.frequency <= 0) {
|
|
316
|
+
problems.push(`${label}: frequency must be a finite number > 0`);
|
|
317
|
+
}
|
|
318
|
+
if (layer.frequencyEnd != null && (!Number.isFinite(layer.frequencyEnd) || layer.frequencyEnd <= 0)) {
|
|
319
|
+
problems.push(`${label}: frequencyEnd must be a finite number > 0`);
|
|
320
|
+
}
|
|
321
|
+
if (layer.detune != null && !Number.isFinite(layer.detune)) {
|
|
322
|
+
problems.push(`${label}: detune must be a finite number`);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
if (layer.filter) {
|
|
326
|
+
if (!VALID_FILTERS.has(layer.filter.type)) {
|
|
327
|
+
problems.push(`${label}: invalid filter type "${layer.filter.type}"`);
|
|
328
|
+
}
|
|
329
|
+
if (!Number.isFinite(layer.filter.frequency) || layer.filter.frequency <= 0) {
|
|
330
|
+
problems.push(`${label}: filter frequency must be a finite number > 0`);
|
|
331
|
+
}
|
|
332
|
+
if (layer.filter.frequencyEnd != null && (!Number.isFinite(layer.filter.frequencyEnd) || layer.filter.frequencyEnd <= 0)) {
|
|
333
|
+
problems.push(`${label}: filter frequencyEnd must be a finite number > 0`);
|
|
334
|
+
}
|
|
335
|
+
if (layer.filter.q != null && !Number.isFinite(layer.filter.q)) {
|
|
336
|
+
problems.push(`${label}: filter q must be a finite number`);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
if (Number.isFinite(delay) && Number.isFinite(layer.duration)) {
|
|
340
|
+
maxSpan = Math.max(maxSpan, delay + layer.duration);
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
const spanLimit = cue === "success" || cue === "error" ? 300 : 120;
|
|
344
|
+
if (maxSpan > spanLimit) {
|
|
345
|
+
problems.push(`${cue}: total span ${maxSpan}ms exceeds ${spanLimit}ms limit`);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return problems;
|
|
349
|
+
}
|
|
350
|
+
export {
|
|
351
|
+
FANCY_SOUND_THEME,
|
|
352
|
+
SOUND_THEMES,
|
|
353
|
+
getSoundTheme,
|
|
354
|
+
validateSoundTheme
|
|
355
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sound design — shared types and constants.
|
|
3
|
+
*
|
|
4
|
+
* Themes are DATA (a map from semantic cue to a synthesis recipe) and the
|
|
5
|
+
* engine is the interpreter. Components only ever name a cue; they never
|
|
6
|
+
* know how it sounds, which is what lets a future sound theme follow a visual
|
|
7
|
+
* skin without coupling audio code to it.
|
|
8
|
+
*
|
|
9
|
+
* This module has no runtime side effects and touches no browser global.
|
|
10
|
+
*/
|
|
11
|
+
/** Semantic UI cues. Every theme defines a recipe for each one. */
|
|
12
|
+
export declare const SOUND_CUES: readonly ["hover", "press", "toggle-on", "toggle-off", "open", "close", "select", "success", "error", "tick", "copy"];
|
|
13
|
+
export type SoundCue = (typeof SOUND_CUES)[number];
|
|
14
|
+
export declare const SOUND_THEME_NAMES: readonly ["fancy"];
|
|
15
|
+
export type SoundThemeName = (typeof SOUND_THEME_NAMES)[number];
|
|
16
|
+
export interface SoundPlayOptions {
|
|
17
|
+
/** Multiplier on the cue's own gain, clamped to [0, 1]. Default 1. */
|
|
18
|
+
volume?: number;
|
|
19
|
+
/** Semitone offset applied to every oscillator layer, clamped to [-24, 24]. Noise layers are unaffected. Default 0. */
|
|
20
|
+
pitch?: number;
|
|
21
|
+
/** Time-stretch divisor on every envelope, duration and delay, clamped to [0.25, 4]. 2 = twice as fast. Default 1. */
|
|
22
|
+
playbackRate?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface SoundPreferences {
|
|
25
|
+
/** Master switch. Default false — sound is strictly opt-in. */
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
/** 0..1, default 0.5. The engine multiplies it again by SOUND_LIMITS.MASTER_CEILING. */
|
|
28
|
+
volume: number;
|
|
29
|
+
theme: SoundThemeName;
|
|
30
|
+
}
|
|
31
|
+
export declare const DEFAULT_SOUND_PREFERENCES: Readonly<SoundPreferences>;
|
|
32
|
+
/** What `localStorage["fancy-ui-sound"]` holds: `{ v: 1, ...SoundPreferences }`. */
|
|
33
|
+
export interface SoundPreferencesV1 extends SoundPreferences {
|
|
34
|
+
v: 1;
|
|
35
|
+
}
|
|
36
|
+
export declare const SOUND_STORAGE_KEY = "fancy-ui-sound";
|
|
37
|
+
export type SoundWave = "sine" | "triangle" | "square" | "sawtooth";
|
|
38
|
+
/** All times in milliseconds (before `playbackRate`). `sustain` is a level 0..1. */
|
|
39
|
+
export interface SoundEnvelope {
|
|
40
|
+
attack: number;
|
|
41
|
+
decay: number;
|
|
42
|
+
sustain: number;
|
|
43
|
+
release: number;
|
|
44
|
+
}
|
|
45
|
+
export interface SoundFilter {
|
|
46
|
+
type: "lowpass" | "highpass" | "bandpass" | "notch" | "peaking";
|
|
47
|
+
/** Hz at the layer's start. */
|
|
48
|
+
frequency: number;
|
|
49
|
+
/** Hz at the layer's end; exponential glide over the layer's `duration` when set. */
|
|
50
|
+
frequencyEnd?: number;
|
|
51
|
+
q?: number;
|
|
52
|
+
}
|
|
53
|
+
interface SoundLayerBase {
|
|
54
|
+
/** Peak linear gain 0..1 (engine clamps to SOUND_LIMITS.LAYER_PEAK_CEILING). */
|
|
55
|
+
gain: number;
|
|
56
|
+
envelope: SoundEnvelope;
|
|
57
|
+
filter?: SoundFilter;
|
|
58
|
+
/** Ms after the cue's start before this layer begins. Default 0. */
|
|
59
|
+
delay?: number;
|
|
60
|
+
/** Total ms from this layer's start to the end of its release. Release begins at `duration - envelope.release`. */
|
|
61
|
+
duration: number;
|
|
62
|
+
}
|
|
63
|
+
export interface SoundOscillatorLayer extends SoundLayerBase {
|
|
64
|
+
kind: "oscillator";
|
|
65
|
+
wave: SoundWave;
|
|
66
|
+
/** Hz at start. */
|
|
67
|
+
frequency: number;
|
|
68
|
+
/** Hz at end; exponential glide over `duration` when set. */
|
|
69
|
+
frequencyEnd?: number;
|
|
70
|
+
/** Cents. Default 0. */
|
|
71
|
+
detune?: number;
|
|
72
|
+
}
|
|
73
|
+
export interface SoundNoiseLayer extends SoundLayerBase {
|
|
74
|
+
kind: "noise";
|
|
75
|
+
}
|
|
76
|
+
export type SoundLayer = SoundOscillatorLayer | SoundNoiseLayer;
|
|
77
|
+
export interface CueRecipe {
|
|
78
|
+
layers: SoundLayer[];
|
|
79
|
+
/** Trim applied to every layer, 0..1. Default 1. */
|
|
80
|
+
gain?: number;
|
|
81
|
+
}
|
|
82
|
+
export interface SoundThemeDefinition {
|
|
83
|
+
name: SoundThemeName;
|
|
84
|
+
cues: Record<SoundCue, CueRecipe>;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* idle — no AudioContext yet (nothing attempted, or attempted outside a user gesture)
|
|
88
|
+
* ready — context running
|
|
89
|
+
* suspended — context exists but is suspended/interrupted; resume pending or awaiting next gesture
|
|
90
|
+
* unsupported — no AudioContext constructor, or construction threw (also SSR)
|
|
91
|
+
* blocked — resume() rejected, or the context is closed
|
|
92
|
+
*/
|
|
93
|
+
export type SoundEngineState = "idle" | "ready" | "suspended" | "unsupported" | "blocked";
|
|
94
|
+
/** Default same-cue minimum interval, ms. Engine-enforced, independent of the action's own guards. */
|
|
95
|
+
export declare const SOUND_MIN_INTERVAL_MS: Readonly<Record<SoundCue, number>>;
|
|
96
|
+
/** Hard safety limits. Not configurable. */
|
|
97
|
+
export declare const SOUND_LIMITS: Readonly<{
|
|
98
|
+
/** Master gain = prefs.volume * MASTER_CEILING. */
|
|
99
|
+
MASTER_CEILING: 0.8;
|
|
100
|
+
/** Per-layer peak gain clamp. */
|
|
101
|
+
LAYER_PEAK_CEILING: 0.9;
|
|
102
|
+
/** Concurrent voices; extra `play()` calls are dropped, never steal. */
|
|
103
|
+
MAX_VOICES: 8;
|
|
104
|
+
/** Minimum attack / release enforced for click-free edges. */
|
|
105
|
+
MIN_ATTACK_MS: 2;
|
|
106
|
+
MIN_RELEASE_MS: 8;
|
|
107
|
+
/** Longest any single layer may run (guards a malformed theme). */
|
|
108
|
+
MAX_LAYER_MS: 400;
|
|
109
|
+
}>;
|
|
110
|
+
export interface SoundStatus {
|
|
111
|
+
/** `true` once an AudioContext constructor was found in this environment. `false` on the server and until first probe. */
|
|
112
|
+
supported: boolean;
|
|
113
|
+
enabled: boolean;
|
|
114
|
+
volume: number;
|
|
115
|
+
theme: SoundThemeName;
|
|
116
|
+
engine: SoundEngineState;
|
|
117
|
+
/** Outcome of the most recent storage read/write. */
|
|
118
|
+
storage: "untouched" | "ok" | "unavailable" | "error";
|
|
119
|
+
lastCue: SoundCue | null;
|
|
120
|
+
/** `performance.now()` of the last cue actually scheduled, or null. */
|
|
121
|
+
lastPlayedAt: number | null;
|
|
122
|
+
/** Last swallowed Web Audio / storage error message, for the Sound Lab status line. */
|
|
123
|
+
lastError: string | null;
|
|
124
|
+
}
|
|
125
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const SOUND_CUES = [
|
|
2
|
+
"hover",
|
|
3
|
+
"press",
|
|
4
|
+
"toggle-on",
|
|
5
|
+
"toggle-off",
|
|
6
|
+
"open",
|
|
7
|
+
"close",
|
|
8
|
+
"select",
|
|
9
|
+
"success",
|
|
10
|
+
"error",
|
|
11
|
+
"tick",
|
|
12
|
+
"copy"
|
|
13
|
+
];
|
|
14
|
+
const SOUND_THEME_NAMES = ["fancy"];
|
|
15
|
+
const DEFAULT_SOUND_PREFERENCES = Object.freeze({
|
|
16
|
+
enabled: false,
|
|
17
|
+
volume: 0.5,
|
|
18
|
+
theme: "fancy"
|
|
19
|
+
});
|
|
20
|
+
const SOUND_STORAGE_KEY = "fancy-ui-sound";
|
|
21
|
+
const SOUND_MIN_INTERVAL_MS = Object.freeze({
|
|
22
|
+
hover: 60,
|
|
23
|
+
tick: 40,
|
|
24
|
+
select: 40,
|
|
25
|
+
press: 15,
|
|
26
|
+
"toggle-on": 15,
|
|
27
|
+
"toggle-off": 15,
|
|
28
|
+
open: 15,
|
|
29
|
+
close: 15,
|
|
30
|
+
success: 15,
|
|
31
|
+
error: 15,
|
|
32
|
+
copy: 15
|
|
33
|
+
});
|
|
34
|
+
const SOUND_LIMITS = Object.freeze({
|
|
35
|
+
/** Master gain = prefs.volume * MASTER_CEILING. */
|
|
36
|
+
MASTER_CEILING: 0.8,
|
|
37
|
+
/** Per-layer peak gain clamp. */
|
|
38
|
+
LAYER_PEAK_CEILING: 0.9,
|
|
39
|
+
/** Concurrent voices; extra `play()` calls are dropped, never steal. */
|
|
40
|
+
MAX_VOICES: 8,
|
|
41
|
+
/** Minimum attack / release enforced for click-free edges. */
|
|
42
|
+
MIN_ATTACK_MS: 2,
|
|
43
|
+
MIN_RELEASE_MS: 8,
|
|
44
|
+
/** Longest any single layer may run (guards a malformed theme). */
|
|
45
|
+
MAX_LAYER_MS: 400
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
DEFAULT_SOUND_PREFERENCES,
|
|
49
|
+
SOUND_CUES,
|
|
50
|
+
SOUND_LIMITS,
|
|
51
|
+
SOUND_MIN_INTERVAL_MS,
|
|
52
|
+
SOUND_STORAGE_KEY,
|
|
53
|
+
SOUND_THEME_NAMES
|
|
54
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The React bindings over the sound singleton.
|
|
3
|
+
*
|
|
4
|
+
* Two audiences, two hooks. A component with a `sound` PROP only ever plays a
|
|
5
|
+
* cue, so it uses `useSoundCue` and never subscribes. A control that RENDERS
|
|
6
|
+
* the preference — SoundToggle, the docs' Sound Lab — reads the store through
|
|
7
|
+
* `useSound` / `useSoundEnabled` / `useSoundStatus`, which subscribe and which
|
|
8
|
+
* trigger the one lazy `localStorage` read from an effect.
|
|
9
|
+
*/
|
|
10
|
+
import { type SoundController, type SoundSnapshot } from "./sound.js";
|
|
11
|
+
import type { SoundCue, SoundEngineState, SoundPlayOptions, SoundStatus } from "./types.js";
|
|
12
|
+
/** The imperative half of `useSound()`'s return value. */
|
|
13
|
+
export type SoundControls = Pick<SoundController, "play" | "unlock" | "enable" | "disable" | "toggle" | "setEnabled" | "setVolume" | "setTheme">;
|
|
14
|
+
/**
|
|
15
|
+
* A cue player for a component's own `sound` prop. Permanently identity-stable;
|
|
16
|
+
* a no-op while `enabled` is falsy.
|
|
17
|
+
*
|
|
18
|
+
* DELIBERATELY DOES NOT SUBSCRIBE — a Button must not re-render because the
|
|
19
|
+
* user changed the volume in a settings panel elsewhere on the page. Whether a
|
|
20
|
+
* cue is audible is decided inside `sound.play()` at call time, which is also
|
|
21
|
+
* where the lazy hydration happens for this path.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useSoundCue(enabled: boolean | undefined): (cue: SoundCue, options?: SoundPlayOptions) => void;
|
|
24
|
+
/**
|
|
25
|
+
* The full store plus the imperative controls. Subscribes, and runs
|
|
26
|
+
* `hydrateSound()` in an effect. For controls that RENDER the preference.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useSound(): SoundSnapshot & SoundControls;
|
|
29
|
+
/**
|
|
30
|
+
* Just the master switch. Selecting the scalar rather than the snapshot is what
|
|
31
|
+
* keeps a toggle from re-rendering on every cue: `status.lastPlayedAt` moves on
|
|
32
|
+
* each `play()`, and `useSyncExternalStore` bails out when the selected value
|
|
33
|
+
* is `Object.is`-equal.
|
|
34
|
+
*/
|
|
35
|
+
export declare function useSoundEnabled(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The live status object (identity-cached by the store).
|
|
38
|
+
*
|
|
39
|
+
* A reader of the WHOLE object wakes for every field, `lastCue` and
|
|
40
|
+
* `lastPlayedAt` included — so a component using this re-renders on every cue
|
|
41
|
+
* played anywhere on the page. Read a single field through a selector hook
|
|
42
|
+
* (`useSoundEnabled`, `useSoundEngineState`) unless you genuinely render more
|
|
43
|
+
* than one.
|
|
44
|
+
*/
|
|
45
|
+
export declare function useSoundStatus(): SoundStatus;
|
|
46
|
+
/**
|
|
47
|
+
* Just the engine's state. Internal to the family — SoundToggle renders this
|
|
48
|
+
* one field of `status`, and `markPlayed()` rewrites the whole status object on
|
|
49
|
+
* every cue, so selecting the scalar is what keeps a toggle from re-rendering
|
|
50
|
+
* because a button elsewhere on the page made a sound. Same `Object.is`
|
|
51
|
+
* bail-out `useSoundEnabled` relies on.
|
|
52
|
+
*/
|
|
53
|
+
export declare function useSoundEngineState(): SoundEngineState;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useSyncExternalStore, useMemo, useCallback, useEffect } from "react";
|
|
3
|
+
import { useLiveRef } from "../internals/dom/use-live-ref.js";
|
|
4
|
+
import { subscribeSound, getSoundSnapshot, getSoundServerSnapshot, sound, hydrateSound } from "./sound.js";
|
|
5
|
+
const CONTROLS = Object.freeze({
|
|
6
|
+
play(cue, options) {
|
|
7
|
+
sound.play(cue, options);
|
|
8
|
+
},
|
|
9
|
+
unlock() {
|
|
10
|
+
return sound.unlock();
|
|
11
|
+
},
|
|
12
|
+
enable() {
|
|
13
|
+
sound.enable();
|
|
14
|
+
},
|
|
15
|
+
disable() {
|
|
16
|
+
sound.disable();
|
|
17
|
+
},
|
|
18
|
+
toggle() {
|
|
19
|
+
return sound.toggle();
|
|
20
|
+
},
|
|
21
|
+
setEnabled(enabled) {
|
|
22
|
+
sound.setEnabled(enabled);
|
|
23
|
+
},
|
|
24
|
+
setVolume(volume) {
|
|
25
|
+
sound.setVolume(volume);
|
|
26
|
+
},
|
|
27
|
+
setTheme(theme) {
|
|
28
|
+
sound.setTheme(theme);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const getEnabled = () => getSoundSnapshot().enabled;
|
|
32
|
+
const getServerEnabled = () => getSoundServerSnapshot().enabled;
|
|
33
|
+
const getStatus = () => getSoundSnapshot().status;
|
|
34
|
+
const getServerStatus = () => getSoundServerSnapshot().status;
|
|
35
|
+
const getEngineState = () => getSoundSnapshot().status.engine;
|
|
36
|
+
const getServerEngineState = () => getSoundServerSnapshot().status.engine;
|
|
37
|
+
function useHydrateSound() {
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
hydrateSound();
|
|
40
|
+
}, []);
|
|
41
|
+
}
|
|
42
|
+
function useSoundCue(enabled) {
|
|
43
|
+
const enabledRef = useLiveRef(enabled);
|
|
44
|
+
return useCallback(
|
|
45
|
+
(cue, options) => {
|
|
46
|
+
if (!enabledRef.current) return;
|
|
47
|
+
sound.play(cue, options);
|
|
48
|
+
},
|
|
49
|
+
[enabledRef]
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
function useSound() {
|
|
53
|
+
const snapshot = useSyncExternalStore(
|
|
54
|
+
subscribeSound,
|
|
55
|
+
getSoundSnapshot,
|
|
56
|
+
getSoundServerSnapshot
|
|
57
|
+
);
|
|
58
|
+
useHydrateSound();
|
|
59
|
+
return useMemo(() => ({ ...snapshot, ...CONTROLS }), [snapshot]);
|
|
60
|
+
}
|
|
61
|
+
function useSoundEnabled() {
|
|
62
|
+
const enabled = useSyncExternalStore(subscribeSound, getEnabled, getServerEnabled);
|
|
63
|
+
useHydrateSound();
|
|
64
|
+
return enabled;
|
|
65
|
+
}
|
|
66
|
+
function useSoundStatus() {
|
|
67
|
+
const status = useSyncExternalStore(subscribeSound, getStatus, getServerStatus);
|
|
68
|
+
useHydrateSound();
|
|
69
|
+
return status;
|
|
70
|
+
}
|
|
71
|
+
function useSoundEngineState() {
|
|
72
|
+
const engineState = useSyncExternalStore(subscribeSound, getEngineState, getServerEngineState);
|
|
73
|
+
useHydrateSound();
|
|
74
|
+
return engineState;
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
useSound,
|
|
78
|
+
useSoundCue,
|
|
79
|
+
useSoundEnabled,
|
|
80
|
+
useSoundEngineState,
|
|
81
|
+
useSoundStatus
|
|
82
|
+
};
|