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,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single source of preset GEOMETRY for the motion family — what moves,
|
|
3
|
+
* and how far, for each named look. Two consumers read this table for two
|
|
4
|
+
* different purposes: Reveal's CSS (hand-written rules keyed on
|
|
5
|
+
* `data-preset`, built to match this table by hand) and `transitions.ts`'s
|
|
6
|
+
* `preset()` (which reads this table directly at runtime to build a
|
|
7
|
+
* `TransitionSpec`). Keeping the numbers in exactly one place is the
|
|
8
|
+
* whole point of this file existing separately from `transitions.ts` — a
|
|
9
|
+
* geometry change here is the one edit that keeps both in sync in theory,
|
|
10
|
+
* even though Reveal's CSS side still has to be updated by hand (this
|
|
11
|
+
* package ships no shared runtime stylesheet for motion; see `tokens.ts`'s
|
|
12
|
+
* header comment for the same caveat applied to durations/easings).
|
|
13
|
+
*/
|
|
14
|
+
export type PresetName = "fade" | "fade-up" | "fade-down" | "fade-left" | "fade-right" | "scale" | "blur" | "zoom";
|
|
15
|
+
/** Reveal never offers `blur`/`zoom` — a per-child `filter` is expensive
|
|
16
|
+
* enough (forces paint, not just compositing) that the contract keeps it
|
|
17
|
+
* opt-in to a single root (Presence), not something an arbitrary-length
|
|
18
|
+
* list of children can each carry. */
|
|
19
|
+
export type RevealPresetName = Exclude<PresetName, "blur" | "zoom">;
|
|
20
|
+
export declare const PRESET_NAMES: readonly PresetName[];
|
|
21
|
+
/**
|
|
22
|
+
* `x`/`y`: the SIGN of the travel axis, multiplied by a caller-supplied
|
|
23
|
+
* `distance` (px) at the consuming site — `1` and `-1`, never a raw pixel
|
|
24
|
+
* value, so one `distance` prop scales every directional preset the same
|
|
25
|
+
* way. `scale`/`blur`: the value at the HIDDEN end of the transition (t=0);
|
|
26
|
+
* the visible end (t=1) is always the resting `scale(1)` / `blur(0)`.
|
|
27
|
+
*/
|
|
28
|
+
export interface PresetGeometry {
|
|
29
|
+
x?: -1 | 1;
|
|
30
|
+
y?: -1 | 1;
|
|
31
|
+
scale?: number;
|
|
32
|
+
blur?: number;
|
|
33
|
+
}
|
|
34
|
+
export declare const PRESETS: Record<PresetName, PresetGeometry>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const PRESETS = {
|
|
3
|
+
fade: {},
|
|
4
|
+
"fade-up": { y: 1 },
|
|
5
|
+
// hidden state sits BELOW rest (+y), travels up into place
|
|
6
|
+
"fade-down": { y: -1 },
|
|
7
|
+
// hidden state sits ABOVE rest (-y), travels down into place
|
|
8
|
+
"fade-left": { x: 1 },
|
|
9
|
+
"fade-right": { x: -1 },
|
|
10
|
+
scale: { scale: 0.92 },
|
|
11
|
+
// floor per the creative direction — never smaller
|
|
12
|
+
blur: { blur: 8 },
|
|
13
|
+
// px; the one Reveal-excluded preset that is opacity+filter only
|
|
14
|
+
zoom: { scale: 0.85, blur: 12 }
|
|
15
|
+
// Presence's deepest preset — scale floor + filter combined
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
PRESETS
|
|
19
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trailing-edge rAF throttle, generalized from the hand-rolled
|
|
3
|
+
* `if (id) cancelAnimationFrame(id); id = requestAnimationFrame(...)` pattern
|
|
4
|
+
* already duplicated in this library (GlowingEffect's pointer sampling). Magnetic
|
|
5
|
+
* (pointermove) and ScrollProgress (scroll/resize) both need "run at most
|
|
6
|
+
* once per frame, with the freshest data" — this is that primitive, pulled
|
|
7
|
+
* out once instead of re-hand-rolled a third and fourth time.
|
|
8
|
+
*/
|
|
9
|
+
export interface RafThrottled<A extends unknown[]> {
|
|
10
|
+
(...args: A): void;
|
|
11
|
+
/** Cancel a pending (not-yet-run) frame. A safe no-op if none is pending. */
|
|
12
|
+
cancel(): void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Wraps `fn` so a burst of synchronous calls collapses into ONE
|
|
16
|
+
* `requestAnimationFrame` callback, called with the LATEST call's
|
|
17
|
+
* arguments — never the first.
|
|
18
|
+
*
|
|
19
|
+
* Deliberately does NOT cancel-and-reschedule on every call (the
|
|
20
|
+
* `cancelAnimationFrame(frame); frame = requestAnimationFrame(...)` shape
|
|
21
|
+
* some throttles use). That pattern resets the wait on every single call,
|
|
22
|
+
* so a continuous stream faster than one call per frame — the ENTIRE
|
|
23
|
+
* reason to throttle in the first place — would push the scheduled frame
|
|
24
|
+
* back forever and `fn` would never run until the stream paused. Storing
|
|
25
|
+
* the latest args and letting the frame ALREADY in flight pick them up
|
|
26
|
+
* guarantees `fn` runs at most once per frame no matter the input rate,
|
|
27
|
+
* and the one frame that does run always reflects where things ended up.
|
|
28
|
+
*
|
|
29
|
+
* Falls back to a synchronous call when `requestAnimationFrame` itself is
|
|
30
|
+
* unavailable (checked per call, not once at creation, since every real
|
|
31
|
+
* call site is browser-only by construction and this only matters for a
|
|
32
|
+
* pathological/non-browser caller) — failing to run at all would be worse
|
|
33
|
+
* than running un-throttled.
|
|
34
|
+
*/
|
|
35
|
+
export declare function rafThrottle<A extends unknown[]>(fn: (...args: A) => void): RafThrottled<A>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function rafThrottle(fn) {
|
|
3
|
+
let frame;
|
|
4
|
+
let lastArgs;
|
|
5
|
+
function throttled(...args) {
|
|
6
|
+
lastArgs = args;
|
|
7
|
+
if (typeof requestAnimationFrame !== "function") {
|
|
8
|
+
fn(...args);
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (frame !== void 0) return;
|
|
12
|
+
frame = requestAnimationFrame(() => {
|
|
13
|
+
frame = void 0;
|
|
14
|
+
fn(...lastArgs);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
throttled.cancel = () => {
|
|
18
|
+
if (frame !== void 0) {
|
|
19
|
+
if (typeof cancelAnimationFrame === "function") cancelAnimationFrame(frame);
|
|
20
|
+
frame = void 0;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return throttled;
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
rafThrottle
|
|
27
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-item delay arithmetic for a staggered entrance — the one formula
|
|
3
|
+
* Reveal's per-child stagger and TextRoll's per-grapheme roll both build on,
|
|
4
|
+
* so "stagger from the center" or "stagger from the last item" means the
|
|
5
|
+
* same thing everywhere in this family.
|
|
6
|
+
*
|
|
7
|
+
* Deliberately pure: no DOM, no timers, no side effects, no hook. A caller
|
|
8
|
+
* is expected to call this once per item straight from the render path and
|
|
9
|
+
* write the result into a CSS custom property or a transition `delay` param
|
|
10
|
+
* — this file never schedules anything itself.
|
|
11
|
+
*/
|
|
12
|
+
export type StaggerFrom = "first" | "last" | "center" | number;
|
|
13
|
+
/**
|
|
14
|
+
* The delay (ms) item `index` of `count` should wait before starting its
|
|
15
|
+
* own entrance, staggered by `step` ms per item away from `from`.
|
|
16
|
+
*
|
|
17
|
+
* `cap`, when given, is a TOTAL-delay ceiling reached by COMPRESSING the
|
|
18
|
+
* step, never by clipping individual delays: `effStep = min(step, cap /
|
|
19
|
+
* max(1, count - 1))`. A 40-item list at the usual 50ms/item step would
|
|
20
|
+
* otherwise finish its LAST item's entrance 1950ms after the first one —
|
|
21
|
+
* long enough to read as "the list is still loading", not "staggered".
|
|
22
|
+
* Compressing the step instead keeps every item's delay proportional to
|
|
23
|
+
* its distance from the origin (the ordering and relative spacing survive
|
|
24
|
+
* intact), just packed into a shorter total window. The cap is computed
|
|
25
|
+
* against `count - 1` regardless of `from` — exact for `"first"`/`"last"`
|
|
26
|
+
* (whose maximum distance IS `count - 1`), and a safe (non-tight) bound
|
|
27
|
+
* for `"center"` or a numeric origin inside the list, whose maximum
|
|
28
|
+
* distance is smaller. An origin far outside the list can still exceed
|
|
29
|
+
* the cap in absolute ms — a deliberate consequence of not clamping
|
|
30
|
+
* `from` above, not a bug in the cap.
|
|
31
|
+
*/
|
|
32
|
+
export declare function staggerDelay(index: number, count: number, step: number, from?: StaggerFrom, cap?: number): number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function distanceFromOrigin(index, count, from) {
|
|
3
|
+
if (from === "first") return index;
|
|
4
|
+
if (from === "last") return count - 1 - index;
|
|
5
|
+
if (from === "center") return Math.abs(index - (count - 1) / 2);
|
|
6
|
+
return Math.abs(index - from);
|
|
7
|
+
}
|
|
8
|
+
function staggerDelay(index, count, step, from = "first", cap) {
|
|
9
|
+
if (count <= 1) return 0;
|
|
10
|
+
const effStep = cap === void 0 ? step : Math.min(step, cap / Math.max(1, count - 1));
|
|
11
|
+
return distanceFromOrigin(index, count, from) * effStep;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
staggerDelay
|
|
15
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared motion vocabulary for the micro-interaction family: durations,
|
|
3
|
+
* curves, and stagger steps every one of the ten components draws from
|
|
4
|
+
* instead of re-typing its own numbers.
|
|
5
|
+
*
|
|
6
|
+
* This file has zero side effects and touches nothing browser-specific — it
|
|
7
|
+
* is pure data, safe to import at module scope from anywhere, including
|
|
8
|
+
* during SSR. It is also the ONLY place these numbers live as JS values:
|
|
9
|
+
* every component that wants `--ft-ease-out` (or any other `--ft-*` var)
|
|
10
|
+
* still has to type the identical literal into its own colocated `.css` as
|
|
11
|
+
* that CSS custom property's fallback (this package ships no shared runtime
|
|
12
|
+
* stylesheet for motion — see `tailwind.css`, which carries only the semantic
|
|
13
|
+
* colour vocabulary). Nothing enforces that a component's CSS fallback
|
|
14
|
+
* matches the value here; this file is the source of truth a component author
|
|
15
|
+
* copies FROM, not a value CSS reads at runtime. Keep the two in sync by hand.
|
|
16
|
+
*
|
|
17
|
+
* The four curves intentionally read as this collection's own voice, not as
|
|
18
|
+
* "the house curve" borrowed from anywhere else — `out`/`in` are chosen to
|
|
19
|
+
* have exact JS equivalents in `./easing.js` (`expoOut`/`expoIn`, see
|
|
20
|
+
* `JS_EASINGS` below) so a component that needs the SAME curve as both a CSS
|
|
21
|
+
* string (`transition-timing-function`) and a JS easing function (a
|
|
22
|
+
* transition spec's `easing` field) never has two numbers to keep in sync.
|
|
23
|
+
*
|
|
24
|
+
* One rule about WHERE a consumer may spend these numbers, written down here
|
|
25
|
+
* rather than left as tribal knowledge held by whichever component happened
|
|
26
|
+
* to get it right first: colour-only transitions (`color`,
|
|
27
|
+
* `background-color`, `border-color`) are exempt from
|
|
28
|
+
* `prefers-reduced-motion` gating — a colour change is not motion, and gating
|
|
29
|
+
* it only makes a theme flip look broken for the users who asked for less
|
|
30
|
+
* movement. `transform` / `opacity` / `filter` are NOT exempt and are always
|
|
31
|
+
* declared inside `@media (prefers-reduced-motion: no-preference)`, with the
|
|
32
|
+
* resting state as the ungated fallback.
|
|
33
|
+
*/
|
|
34
|
+
import { expoIn, expoOut } from "./easing.js";
|
|
35
|
+
/** Milliseconds. `micro` = a glyph-scale beat that only reads as a beat (a
|
|
36
|
+
* stroke draw's lead-in, an icon cross-fade). `fast` = a reversible state
|
|
37
|
+
* flip (press, dim). `base` = the default entrance. `exit` = the default
|
|
38
|
+
* exit (shorter than an entrance — leaving reads faster than arriving).
|
|
39
|
+
* `entrance` = a slower, deliberate reveal (Reveal's default).
|
|
40
|
+
*
|
|
41
|
+
* `micro` is deliberately the one rung with no JS consumer: its consumer is
|
|
42
|
+
* the CSS mirror `--ft-duration-micro: 80ms`, spent by StatusMorph's check
|
|
43
|
+
* and cross-stroke delays. It is listed here anyway because this file is the
|
|
44
|
+
* source of truth a component author copies FROM — a rung that exists only
|
|
45
|
+
* in CSS fallbacks would be exactly the drift this table is meant to stop.
|
|
46
|
+
* There is one rung at this scale, not two: StatusMorph's paired `160ms` is
|
|
47
|
+
* written as a literal on purpose rather than tokenised as a second rung. */
|
|
48
|
+
export declare const DURATIONS: {
|
|
49
|
+
readonly micro: 80;
|
|
50
|
+
readonly fast: 150;
|
|
51
|
+
readonly base: 300;
|
|
52
|
+
readonly exit: 200;
|
|
53
|
+
readonly entrance: 600;
|
|
54
|
+
};
|
|
55
|
+
export type DurationToken = keyof typeof DURATIONS;
|
|
56
|
+
/** CSS `cubic-bezier()` strings — for a component's own `.css` file,
|
|
57
|
+
* never injected by this file. */
|
|
58
|
+
export declare const EASINGS: {
|
|
59
|
+
readonly out: "cubic-bezier(0.16, 1, 0.3, 1)";
|
|
60
|
+
readonly in: "cubic-bezier(0.7, 0, 0.84, 0)";
|
|
61
|
+
readonly inout: "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
62
|
+
readonly overshoot: "cubic-bezier(0.34, 1.56, 0.64, 1)";
|
|
63
|
+
};
|
|
64
|
+
export type EasingToken = keyof typeof EASINGS;
|
|
65
|
+
/** The same two arrival/departure curves as real JS functions, for
|
|
66
|
+
* `transitions.ts`'s `preset()` — a `TransitionSpec.easing` field wants a
|
|
67
|
+
* `(t: number) => number`, not a CSS string. Only `out`/`in` exist here:
|
|
68
|
+
* `inout` never drives a JS-timed transition (it is CSS-only, for
|
|
69
|
+
* hover/press states that have no discrete start/end), and `overshoot` has
|
|
70
|
+
* exactly one consumer (StatusMorph's success check, which computes its own
|
|
71
|
+
* `scale` pop rather than going through `preset()`). */
|
|
72
|
+
export declare const JS_EASINGS: {
|
|
73
|
+
readonly out: typeof expoOut;
|
|
74
|
+
readonly in: typeof expoIn;
|
|
75
|
+
};
|
|
76
|
+
/** Milliseconds per stagger step, before any compression cap is applied.
|
|
77
|
+
* `char`/`charBlur` are TextRoll's per-grapheme step (plain vs. its
|
|
78
|
+
* heavier blur variant); `word`/`line` are illustrative rungs for
|
|
79
|
+
* pretext-driven text layout elsewhere in the library, kept here so a
|
|
80
|
+
* future consumer doesn't invent a fifth number; `item` is Reveal's
|
|
81
|
+
* per-child step. */
|
|
82
|
+
export declare const STAGGERS: {
|
|
83
|
+
readonly char: 15;
|
|
84
|
+
readonly charBlur: 20;
|
|
85
|
+
readonly word: 40;
|
|
86
|
+
readonly line: 150;
|
|
87
|
+
readonly item: 50;
|
|
88
|
+
};
|
|
89
|
+
/** Total-delay compression caps (ms) — see `stagger.ts`'s `staggerDelay`.
|
|
90
|
+
* `text` bounds TextRoll's per-grapheme roll; `item` bounds Reveal's
|
|
91
|
+
* per-child stagger. A list long enough to blow past its step × count
|
|
92
|
+
* without one of these would stop reading as "staggered" and start reading
|
|
93
|
+
* as "the last item is stuck". */
|
|
94
|
+
export declare const STAGGER_CAPS: {
|
|
95
|
+
readonly text: 200;
|
|
96
|
+
readonly item: 600;
|
|
97
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { expoIn, expoOut } from "./easing.js";
|
|
3
|
+
const DURATIONS = {
|
|
4
|
+
micro: 80,
|
|
5
|
+
fast: 150,
|
|
6
|
+
base: 300,
|
|
7
|
+
exit: 200,
|
|
8
|
+
entrance: 600
|
|
9
|
+
};
|
|
10
|
+
const JS_EASINGS = { out: expoOut, in: expoIn };
|
|
11
|
+
const STAGGERS = { char: 15 };
|
|
12
|
+
const STAGGER_CAPS = { text: 200, item: 600 };
|
|
13
|
+
export {
|
|
14
|
+
DURATIONS,
|
|
15
|
+
JS_EASINGS,
|
|
16
|
+
STAGGERS,
|
|
17
|
+
STAGGER_CAPS
|
|
18
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS-only transition factories built from `presets.ts`'s geometry table.
|
|
3
|
+
* Presence's whole "one transition handles both open and close" trick, and
|
|
4
|
+
* StickyScroll's panel crossfade, are both built on this file.
|
|
5
|
+
*
|
|
6
|
+
* How the `easing` param actually reaches the screen is worth spelling out,
|
|
7
|
+
* because it is easy to assume `css(t, u)` needs to apply the curve itself:
|
|
8
|
+
* it does not. The sampler in `animate.ts` (`runTransition`) samples every
|
|
9
|
+
* keyframe as `t = t1 + delta * easing(i / n)` BEFORE `css(t, 1 - t)` is
|
|
10
|
+
* ever called — so the `t`/`u` a `css()` function receives are ALREADY
|
|
11
|
+
* eased, and the curve lives entirely in the sample POSITIONS rather than in
|
|
12
|
+
* a WAAPI `easing` option. `preset()` below does the same as the framework
|
|
13
|
+
* built-ins it mirrors: `easing` is resolved once and returned as-is on the
|
|
14
|
+
* spec; `cssFor` never touches it.
|
|
15
|
+
*/
|
|
16
|
+
import { type PresetName } from "./presets.js";
|
|
17
|
+
/**
|
|
18
|
+
* One transition's timing plus its per-frame CSS. Structurally identical to
|
|
19
|
+
* the framework `TransitionConfig` the Svelte side imports, declared locally
|
|
20
|
+
* so this package takes no runtime dependency on it. The `tick` field is
|
|
21
|
+
* omitted: nothing in this library uses it.
|
|
22
|
+
*/
|
|
23
|
+
export interface TransitionSpec {
|
|
24
|
+
delay: number;
|
|
25
|
+
duration: number;
|
|
26
|
+
easing: (t: number) => number;
|
|
27
|
+
/** `t` runs 0 (hidden) → 1 (visible); `u = 1 - t`. Receives ALREADY-EASED
|
|
28
|
+
* `t` — the sampler applies `easing` before calling this, which is why
|
|
29
|
+
* `cssFor` interpolates linearly in `t`. See the file header. */
|
|
30
|
+
css: (t: number, u: number) => string;
|
|
31
|
+
}
|
|
32
|
+
export type TransitionDirection = "in" | "out" | "both";
|
|
33
|
+
/** A transition function's shape, preserved exactly — including the unused
|
|
34
|
+
* first parameter, so the existing test files transpose 1:1. */
|
|
35
|
+
export type TransitionFn<P = unknown> = (node: Element, params?: P, options?: {
|
|
36
|
+
direction: TransitionDirection;
|
|
37
|
+
}) => TransitionSpec;
|
|
38
|
+
export interface PresetParams {
|
|
39
|
+
duration?: number;
|
|
40
|
+
delay?: number;
|
|
41
|
+
distance?: number;
|
|
42
|
+
/** A JS easing function — `(t: number) => number` — not a CSS string.
|
|
43
|
+
* Handed straight to `TransitionSpec.easing`; see the file header for
|
|
44
|
+
* why `cssFor` never has to apply it itself. */
|
|
45
|
+
easing?: (t: number) => number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns a transition function for the named preset, ready to hand to
|
|
49
|
+
* `usePresence`. Resolution order for every param is caller-supplied
|
|
50
|
+
* `params` → this function's own defaults; `duration` defaults to
|
|
51
|
+
* `DURATIONS.base` and `distance` to 16px regardless of direction (a
|
|
52
|
+
* component that wants a shorter/half-distance EXIT, like Presence, passes
|
|
53
|
+
* those explicitly in its own `out`-side params — this factory does not
|
|
54
|
+
* guess at that asymmetry).
|
|
55
|
+
*
|
|
56
|
+
* `easing` is the one default that DOES read `options.direction`: with no
|
|
57
|
+
* explicit `params.easing`, an `"out"`-direction instance (an exit-only
|
|
58
|
+
* instance used on its own — StickyScroll's panel crossfade builds one
|
|
59
|
+
* `preset("fade")` and uses it as both the enter and the exit spec, two
|
|
60
|
+
* separate instances) defaults to `JS_EASINGS.in` (a departure curve);
|
|
61
|
+
* anything else (`"in"`, or the unified `"both"` a single two-way
|
|
62
|
+
* transition reports — Presence's case) defaults to `JS_EASINGS.out` (an
|
|
63
|
+
* arrival curve, the more common perceived motion of the two when only one
|
|
64
|
+
* curve is in play).
|
|
65
|
+
*/
|
|
66
|
+
export declare function preset(name: PresetName): TransitionFn<PresetParams>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { DURATIONS, JS_EASINGS } from "./tokens.js";
|
|
3
|
+
import { PRESETS } from "./presets.js";
|
|
4
|
+
const DEFAULT_DISTANCE = 16;
|
|
5
|
+
function cssFor(name, t, u, distance) {
|
|
6
|
+
const geometry = PRESETS[name];
|
|
7
|
+
const declarations = [`opacity: ${t}`];
|
|
8
|
+
const transformTerms = [];
|
|
9
|
+
if (geometry.x !== void 0 || geometry.y !== void 0) {
|
|
10
|
+
const dx = (geometry.x ?? 0) * distance * u;
|
|
11
|
+
const dy = (geometry.y ?? 0) * distance * u;
|
|
12
|
+
transformTerms.push(`translate(${dx}px, ${dy}px)`);
|
|
13
|
+
}
|
|
14
|
+
if (geometry.scale !== void 0) {
|
|
15
|
+
transformTerms.push(`scale(${geometry.scale + (1 - geometry.scale) * t})`);
|
|
16
|
+
}
|
|
17
|
+
if (transformTerms.length > 0) {
|
|
18
|
+
declarations.push(`transform: ${transformTerms.join(" ")}`);
|
|
19
|
+
}
|
|
20
|
+
if (geometry.blur !== void 0) {
|
|
21
|
+
declarations.push(`filter: blur(${geometry.blur * u}px)`);
|
|
22
|
+
}
|
|
23
|
+
return declarations.join("; ");
|
|
24
|
+
}
|
|
25
|
+
function preset(name) {
|
|
26
|
+
return (_node, params = {}, options) => {
|
|
27
|
+
const duration = params.duration ?? DURATIONS.base;
|
|
28
|
+
const delay = params.delay ?? 0;
|
|
29
|
+
const distance = params.distance ?? DEFAULT_DISTANCE;
|
|
30
|
+
const easing = params.easing ?? (options?.direction === "out" ? JS_EASINGS.in : JS_EASINGS.out);
|
|
31
|
+
return {
|
|
32
|
+
delay,
|
|
33
|
+
duration,
|
|
34
|
+
easing,
|
|
35
|
+
css: (t, u) => cssFor(name, t, u, distance)
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
preset
|
|
41
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-only aggregate of the shared unions component prop interfaces need to
|
|
3
|
+
* reference. Re-exported from the package barrel as
|
|
4
|
+
* `export type * from "./internals/motion/types.js"` (the barrel's edit, not
|
|
5
|
+
* this file's) so a component's own `<ComponentName>Props` can `import type`
|
|
6
|
+
* these from one place instead of reaching into individual foundation files
|
|
7
|
+
* — and, per the common contract, so a component's `index.ts` barrel never
|
|
8
|
+
* has to re-export a type itself (which would risk a name collision across
|
|
9
|
+
* the ten components' barrels).
|
|
10
|
+
*
|
|
11
|
+
* `verbatimModuleSyntax` (this package's tsconfig) means every line here is
|
|
12
|
+
* `export type` and compiles to nothing at runtime — this module has zero
|
|
13
|
+
* JS output, by design.
|
|
14
|
+
*/
|
|
15
|
+
export type { PresetName, RevealPresetName } from "./presets.js";
|
|
16
|
+
export type { StaggerFrom } from "./stagger.js";
|
|
17
|
+
export type { HapticPattern } from "./haptics.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locale-aware relative timestamps ("5 minutes ago", "in 2 hours") built on
|
|
3
|
+
* `Intl.RelativeTimeFormat`. Pure and dependency-free: pass `now` to make the
|
|
4
|
+
* output deterministic in tests.
|
|
5
|
+
*/
|
|
6
|
+
export interface RelativeTimeOptions {
|
|
7
|
+
/** BCP 47 tag. Defaults to the runtime locale. */
|
|
8
|
+
locale?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Epoch ms to measure against. Defaults to `Date.now()`. A non-finite
|
|
11
|
+
* value (the `useNow` "clock not started" sentinel) yields `""`.
|
|
12
|
+
*/
|
|
13
|
+
now?: number;
|
|
14
|
+
/** Defaults to `"auto"`, which yields idiomatic words ("now", "yesterday"). */
|
|
15
|
+
numeric?: "auto" | "always";
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Format `date` relative to `now`. Past dates read "5 minutes ago", future
|
|
19
|
+
* dates "in 2 hours".
|
|
20
|
+
*
|
|
21
|
+
* Under `numeric: "auto"` anything inside the last (or next) 45 seconds is
|
|
22
|
+
* reported as the locale's zero-word — "now" in English — rather than an exact
|
|
23
|
+
* second count. Pass `numeric: "always"` to get "10 seconds ago" instead.
|
|
24
|
+
*/
|
|
25
|
+
export declare function formatRelativeTime(date: number | Date, opts?: RelativeTimeOptions): string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const SECOND = 1e3;
|
|
3
|
+
const MINUTE = 60 * SECOND;
|
|
4
|
+
const HOUR = 60 * MINUTE;
|
|
5
|
+
const DAY = 24 * HOUR;
|
|
6
|
+
const WEEK = 7 * DAY;
|
|
7
|
+
const MONTH = 30.436875 * DAY;
|
|
8
|
+
const YEAR = 365.2425 * DAY;
|
|
9
|
+
const BUCKETS = [
|
|
10
|
+
[45 * SECOND, SECOND, "second"],
|
|
11
|
+
[45 * MINUTE, MINUTE, "minute"],
|
|
12
|
+
[22 * HOUR, HOUR, "hour"],
|
|
13
|
+
[7 * DAY, DAY, "day"],
|
|
14
|
+
[4 * WEEK, WEEK, "week"],
|
|
15
|
+
[11 * MONTH, MONTH, "month"],
|
|
16
|
+
[Infinity, YEAR, "year"]
|
|
17
|
+
];
|
|
18
|
+
const formatters = /* @__PURE__ */ new Map();
|
|
19
|
+
function formatter(locale, numeric) {
|
|
20
|
+
const key = `${locale ?? ""}|${numeric}`;
|
|
21
|
+
let rtf = formatters.get(key);
|
|
22
|
+
if (!rtf) {
|
|
23
|
+
rtf = new Intl.RelativeTimeFormat(locale, { numeric });
|
|
24
|
+
formatters.set(key, rtf);
|
|
25
|
+
}
|
|
26
|
+
return rtf;
|
|
27
|
+
}
|
|
28
|
+
function formatRelativeTime(date, opts = {}) {
|
|
29
|
+
const target = date instanceof Date ? date.getTime() : date;
|
|
30
|
+
if (!Number.isFinite(target)) return "";
|
|
31
|
+
const now = opts.now ?? Date.now();
|
|
32
|
+
if (!Number.isFinite(now)) return "";
|
|
33
|
+
const numeric = opts.numeric ?? "auto";
|
|
34
|
+
const rtf = formatter(opts.locale, numeric);
|
|
35
|
+
const diff = target - now;
|
|
36
|
+
const abs = Math.abs(diff);
|
|
37
|
+
for (const [limit, step, unit] of BUCKETS) {
|
|
38
|
+
if (abs >= limit) continue;
|
|
39
|
+
const value = unit === "second" && numeric === "auto" ? 0 : Math.round(diff / step);
|
|
40
|
+
return rtf.format(value, unit);
|
|
41
|
+
}
|
|
42
|
+
return "";
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
formatRelativeTime
|
|
46
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Acquires the scroll lock and returns a function that releases this
|
|
3
|
+
* specific acquisition. Safe to call from SSR (returns a no-op release).
|
|
4
|
+
* The returned function is idempotent — calling it more than once only
|
|
5
|
+
* decrements the shared count on its first call.
|
|
6
|
+
*/
|
|
7
|
+
export declare function lockScroll(): () => void;
|
|
8
|
+
/**
|
|
9
|
+
* Acquires the scroll lock while mounted and `enabled` (default true).
|
|
10
|
+
*
|
|
11
|
+
* TIMING RULE FOR PORTS: call it INSIDE the presence-mounted subtree — the
|
|
12
|
+
* panel component that `usePresence` keeps alive through the exit — and do
|
|
13
|
+
* NOT pass `open`. Release timing is the whole point: an effect keyed on
|
|
14
|
+
* `open` releases the instant `open` flips, leaving the page scrollable under
|
|
15
|
+
* a scrim that is still on screen. Mounting scope is what holds the lock for
|
|
16
|
+
* the length of the fade instead. `enabled` exists only for non-animated
|
|
17
|
+
* surfaces (a `duration: 0` drawer, a reduced-motion path).
|
|
18
|
+
*
|
|
19
|
+
* Goes on the PANEL, never the scrim — the panel is the component that
|
|
20
|
+
* already carries the portal, the focus trap and the dismissable layer.
|
|
21
|
+
*
|
|
22
|
+
* Reference-counted through `lockScroll()`, so nesting is unchanged, and a
|
|
23
|
+
* layout effect rather than a passive one: a lock applied after paint is a
|
|
24
|
+
* visible one-frame scroll jump on a long page.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useScrollLock(enabled?: boolean): void;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useIsomorphicLayoutEffect } from "./dom/ssr.js";
|
|
3
|
+
let lockCount = 0;
|
|
4
|
+
let saved = null;
|
|
5
|
+
function lockScroll() {
|
|
6
|
+
if (typeof document === "undefined") {
|
|
7
|
+
return () => {
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
if (lockCount === 0) {
|
|
11
|
+
const body = document.body;
|
|
12
|
+
const root = document.documentElement;
|
|
13
|
+
const scrollbarGutter = window.innerWidth - root.clientWidth;
|
|
14
|
+
const currentPaddingRight = parseFloat(getComputedStyle(body).paddingRight) || 0;
|
|
15
|
+
saved = {
|
|
16
|
+
scrollY: window.scrollY,
|
|
17
|
+
bodyPosition: body.style.position,
|
|
18
|
+
bodyTop: body.style.top,
|
|
19
|
+
bodyLeft: body.style.left,
|
|
20
|
+
bodyRight: body.style.right,
|
|
21
|
+
bodyWidth: body.style.width,
|
|
22
|
+
bodyOverflow: body.style.overflow,
|
|
23
|
+
bodyPaddingRight: body.style.paddingRight
|
|
24
|
+
};
|
|
25
|
+
body.style.position = "fixed";
|
|
26
|
+
body.style.top = `-${saved.scrollY}px`;
|
|
27
|
+
body.style.left = "0";
|
|
28
|
+
body.style.right = "0";
|
|
29
|
+
body.style.width = "100%";
|
|
30
|
+
body.style.overflow = "hidden";
|
|
31
|
+
if (scrollbarGutter > 0) {
|
|
32
|
+
body.style.paddingRight = `${currentPaddingRight + scrollbarGutter}px`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
lockCount += 1;
|
|
36
|
+
let released = false;
|
|
37
|
+
return function release() {
|
|
38
|
+
if (released) return;
|
|
39
|
+
released = true;
|
|
40
|
+
lockCount -= 1;
|
|
41
|
+
if (lockCount > 0) return;
|
|
42
|
+
const body = document.body;
|
|
43
|
+
const state = saved;
|
|
44
|
+
saved = null;
|
|
45
|
+
if (!state) return;
|
|
46
|
+
body.style.position = state.bodyPosition;
|
|
47
|
+
body.style.top = state.bodyTop;
|
|
48
|
+
body.style.left = state.bodyLeft;
|
|
49
|
+
body.style.right = state.bodyRight;
|
|
50
|
+
body.style.width = state.bodyWidth;
|
|
51
|
+
body.style.overflow = state.bodyOverflow;
|
|
52
|
+
body.style.paddingRight = state.bodyPaddingRight;
|
|
53
|
+
window.scrollTo(0, state.scrollY);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function useScrollLock(enabled = true) {
|
|
57
|
+
useIsomorphicLayoutEffect(() => {
|
|
58
|
+
if (!enabled) return;
|
|
59
|
+
return lockScroll();
|
|
60
|
+
}, [enabled]);
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
lockScroll,
|
|
64
|
+
useScrollLock
|
|
65
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Align, Side } from "./anchor-position.js";
|
|
2
|
+
import type { ElementRef } from "./dom/types.js";
|
|
3
|
+
export interface UseAnchorPositionOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The anchor. A node, a ref, or a getter for a moving/virtual target —
|
|
6
|
+
* the getter form is what a context-menu-style caller with no real
|
|
7
|
+
* element to point at reaches for.
|
|
8
|
+
*/
|
|
9
|
+
anchor: ElementRef<HTMLElement> | HTMLElement | null | (() => HTMLElement | null);
|
|
10
|
+
/** Side of the anchor to place the element on. Defaults to "bottom". */
|
|
11
|
+
side?: Side;
|
|
12
|
+
/** Alignment along the cross axis of `side`. Defaults to "center". */
|
|
13
|
+
align?: Align;
|
|
14
|
+
/** Gap in pixels between the anchor and the element. Defaults to the core's 8. */
|
|
15
|
+
offset?: number;
|
|
16
|
+
/** Stop positioning without unmounting. Default true. */
|
|
17
|
+
enabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* An opaque value the caller bumps to force a recompute when something the
|
|
20
|
+
* geometry depends on moved but no option did — a context menu's pointer
|
|
21
|
+
* coordinates, which slide the same virtual anchor element to a new place.
|
|
22
|
+
*/
|
|
23
|
+
recomputeKey?: string | number;
|
|
24
|
+
/**
|
|
25
|
+
* Fires on first placement, then only when the resolved side or align
|
|
26
|
+
* actually changes. Most consumers want the RETURN VALUE instead; this is
|
|
27
|
+
* for the caller that has to publish the placement somewhere other than
|
|
28
|
+
* its own render — a submenu telling its parent context which way it
|
|
29
|
+
* opened.
|
|
30
|
+
*/
|
|
31
|
+
onPlacement?: (side: Side, align: Align) => void;
|
|
32
|
+
}
|
|
33
|
+
export interface ResolvedPlacement {
|
|
34
|
+
readonly side: Side;
|
|
35
|
+
readonly align: Align;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Positions `node` with `position: fixed` against a live anchor, and returns
|
|
39
|
+
* the placement as ACTUALLY resolved — flipped and/or clamped.
|
|
40
|
+
*
|
|
41
|
+
* The element comes in as the NODE, never a ref (convention C-1): every
|
|
42
|
+
* anchored surface is conditionally rendered, so a `useRef` read inside a
|
|
43
|
+
* `[]`-deps effect would still be null when that effect fires and the
|
|
44
|
+
* position would never be applied.
|
|
45
|
+
*
|
|
46
|
+
* The initial value is the REQUESTED side and align, not a hardcoded
|
|
47
|
+
* "bottom"/"center" — seeding with anything else shows as a one-frame
|
|
48
|
+
* transform-origin jump on every open, when only a real flip may move the
|
|
49
|
+
* origin.
|
|
50
|
+
*
|
|
51
|
+
* SSR-safe: nothing runs. The element renders unpositioned, exactly as under
|
|
52
|
+
* an un-run Svelte action.
|
|
53
|
+
*/
|
|
54
|
+
export declare function useAnchorPosition(node: HTMLElement | null, options: UseAnchorPositionOptions): ResolvedPlacement;
|