fancy-ui-vue 0.2.0 → 0.4.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/PORTING.md +123 -2
- package/README.md +20 -15
- package/dist/components/accordion/Accordion.vue.d.ts +44 -0
- package/dist/components/accordion/Accordion.vue.js +88 -0
- package/dist/components/accordion/Accordion.vue2.js +4 -0
- package/dist/components/accordion/AccordionContent.vue.d.ts +25 -0
- package/dist/components/accordion/AccordionContent.vue.js +42 -0
- package/dist/components/accordion/AccordionContent.vue2.js +4 -0
- package/dist/components/accordion/AccordionItem.vue.d.ts +21 -0
- package/dist/components/accordion/AccordionItem.vue.js +66 -0
- package/dist/components/accordion/AccordionItem.vue2.js +4 -0
- package/dist/components/accordion/AccordionTrigger.vue.d.ts +24 -0
- package/dist/components/accordion/AccordionTrigger.vue.js +83 -0
- package/dist/components/accordion/AccordionTrigger.vue2.js +4 -0
- package/dist/components/accordion/accordion-core.d.ts +35 -0
- package/dist/components/accordion/accordion-core.js +44 -0
- package/dist/components/accordion/index.d.ts +11 -0
- package/dist/components/accordion/types.d.ts +45 -0
- package/dist/components/accordion/types.js +7 -0
- package/dist/components/alert-dialog/AlertDialog.vue.js +22 -3
- package/dist/components/animated-testimonials/AnimatedTestimonials.vue.js +3 -3
- package/dist/components/apple-card-carousel/AppleCard.vue.js +1 -1
- package/dist/components/autocomplete/Autocomplete.vue.js +1 -1
- package/dist/components/autocomplete/Autocomplete.vue2.js +22 -15
- package/dist/components/avatar/Avatar.vue.d.ts +27 -0
- package/dist/components/avatar/Avatar.vue.js +119 -0
- package/dist/components/avatar/Avatar.vue2.js +4 -0
- package/dist/components/avatar/avatar-core.d.ts +40 -0
- package/dist/components/avatar/avatar-core.js +57 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/badge/Badge.vue.d.ts +21 -0
- package/dist/components/badge/Badge.vue.js +46 -0
- package/dist/components/badge/Badge.vue2.js +4 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/bento-grid/BentoFrame.vue.js +1 -1
- package/dist/components/bento-grid/BentoFrame.vue2.js +6 -5
- package/dist/components/bento-grid/BentoGrid.vue.js +1 -1
- package/dist/components/bento-grid/BentoGrid.vue2.js +12 -12
- package/dist/components/bento-grid/BentoGridCard.vue.js +6 -5
- package/dist/components/bento-grid/BentoGridItem.vue.js +6 -5
- package/dist/components/bg-falling-stars/FallingStarsBg.vue.d.ts +1 -1
- package/dist/components/bg-falling-stars/FallingStarsBg.vue.js +1 -1
- package/dist/components/bg-falling-stars/bg-falling-stars-core.d.ts +1 -1
- package/dist/components/bg-falling-stars/bg-falling-stars-core.js +47 -12
- package/dist/components/book/Book.vue.js +8 -9
- package/dist/components/book/BookDescription.vue.js +6 -5
- package/dist/components/book/BookHeader.vue.js +6 -5
- package/dist/components/book/BookTitle.vue.js +6 -5
- package/dist/components/box-reveal/BoxReveal.vue.js +6 -5
- package/dist/components/button/Button.vue.d.ts +6 -4
- package/dist/components/button/Button.vue.js +1 -1
- package/dist/components/button/Button.vue2.js +50 -22
- package/dist/components/card-3d/CardContainer.vue.js +1 -1
- package/dist/components/card-3d/CardItem.vue.js +1 -1
- package/dist/components/card-spotlight/CardSpotlight.vue.js +1 -1
- package/dist/components/chat-message/ChatMessageAction.vue.d.ts +4 -2
- package/dist/components/chat-message/ChatMessageAction.vue.js +4 -2
- package/dist/components/checkbox/Checkbox.vue.d.ts +2 -0
- package/dist/components/checkbox/Checkbox.vue.js +1 -1
- package/dist/components/checkbox/Checkbox.vue2.js +17 -7
- package/dist/components/collapsible/Collapsible.vue.d.ts +31 -0
- package/dist/components/collapsible/Collapsible.vue.js +60 -0
- package/dist/components/collapsible/Collapsible.vue2.js +4 -0
- package/dist/components/collapsible/CollapsibleContent.vue.d.ts +26 -0
- package/dist/components/collapsible/CollapsibleContent.vue.js +81 -0
- package/dist/components/collapsible/CollapsibleContent.vue2.js +4 -0
- package/dist/components/collapsible/CollapsibleTrigger.vue.d.ts +21 -0
- package/dist/components/collapsible/CollapsibleTrigger.vue.js +57 -0
- package/dist/components/collapsible/CollapsibleTrigger.vue2.js +4 -0
- package/dist/components/collapsible/collapsible-core.d.ts +47 -0
- package/dist/components/collapsible/collapsible-core.js +40 -0
- package/dist/components/collapsible/index.d.ts +8 -0
- package/dist/components/collapsible/types.d.ts +24 -0
- package/dist/components/collapsible/types.js +5 -0
- package/dist/components/combobox/Combobox.vue.js +1 -1
- package/dist/components/combobox/Combobox.vue2.js +24 -16
- package/dist/components/command-menu/CommandMenu.vue.d.ts +5 -0
- package/dist/components/command-menu/CommandMenu.vue.js +1 -1
- package/dist/components/command-menu/CommandMenu.vue2.js +5 -2
- package/dist/components/compare/Compare.vue.d.ts +15 -5
- package/dist/components/compare/Compare.vue.js +1 -1
- package/dist/components/compare/Compare.vue2.js +28 -13
- package/dist/components/composer/ComposerInput.vue.js +1 -1
- package/dist/components/composer/ComposerInput.vue2.js +11 -11
- package/dist/components/composer/ComposerModelPicker.vue.d.ts +4 -0
- package/dist/components/composer/ComposerModelPicker.vue.js +1 -1
- package/dist/components/composer/ComposerModelPicker.vue2.js +29 -15
- package/dist/components/composer/ComposerSubmit.vue.d.ts +2 -0
- package/dist/components/composer/ComposerSubmit.vue.js +16 -15
- package/dist/components/confetti/ConfettiButton.vue.d.ts +9 -2
- package/dist/components/confetti/ConfettiButton.vue.js +24 -6
- package/dist/components/container-text-flip/ContainerTextFlip.vue.js +1 -1
- package/dist/components/container-text-flip/ContainerTextFlip.vue2.js +12 -13
- package/dist/components/copy-button/CopyButton.vue.d.ts +5 -0
- package/dist/components/copy-button/CopyButton.vue.js +1 -1
- package/dist/components/copy-button/CopyButton.vue2.js +72 -11
- package/dist/components/datamosh-transition/DatamoshTransition.vue.d.ts +6 -2
- package/dist/components/datamosh-transition/DatamoshTransition.vue.js +7 -4
- package/dist/components/date-picker/DatePicker.vue.js +1 -1
- package/dist/components/date-picker/DatePicker.vue2.js +27 -21
- package/dist/components/dialog/Dialog.vue.js +20 -1
- package/dist/components/dialog/DialogSurface.vue.js +1 -1
- package/dist/components/dialog/DialogSurface.vue2.js +5 -2
- package/dist/components/dialog/types.d.ts +2 -0
- package/dist/components/direction-aware-hover/DirectionAwareHover.vue.js +1 -1
- package/dist/components/direction-aware-hover/DirectionAwareHover.vue2.js +9 -7
- package/dist/components/displacement-text/DisplacementText.vue.d.ts +4 -1
- package/dist/components/displacement-text/DisplacementText.vue.js +38 -11
- package/dist/components/displacement-text/displacement-text-core.d.ts +94 -4
- package/dist/components/displacement-text/displacement-text-core.js +287 -97
- package/dist/components/drawer/Drawer.vue.d.ts +5 -0
- package/dist/components/drawer/Drawer.vue.js +1 -1
- package/dist/components/drawer/Drawer.vue2.js +5 -2
- package/dist/components/dropdown-menu/DropdownMenuContent.vue.js +2 -1
- package/dist/components/dropdown-menu/DropdownMenuItem.vue.d.ts +4 -0
- package/dist/components/dropdown-menu/DropdownMenuItem.vue.js +17 -10
- package/dist/components/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +8 -0
- package/dist/components/dropdown-menu/DropdownMenuSubTrigger.vue.js +28 -13
- package/dist/components/dropdown-menu/DropdownMenuTrigger.vue.d.ts +4 -0
- package/dist/components/dropdown-menu/DropdownMenuTrigger.vue.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuTrigger.vue2.js +20 -10
- package/dist/components/editorial-engine/EditorialEngine.vue.js +1 -1
- package/dist/components/editorial-engine/engine.js +13 -0
- package/dist/components/file-upload/FileUpload.vue.d.ts +2 -0
- package/dist/components/file-upload/FileUpload.vue.js +1 -1
- package/dist/components/file-upload/FileUpload.vue2.js +20 -10
- package/dist/components/fireworks-hdr/FireworksHdr.vue.js +2 -2
- package/dist/components/flickering-grid/FlickeringGrid.vue.d.ts +1 -1
- package/dist/components/flickering-grid/FlickeringGrid.vue.js +1 -1
- package/dist/components/flickering-grid/flickering-grid-core.d.ts +1 -1
- package/dist/components/flickering-grid/flickering-grid-core.js +51 -9
- package/dist/components/flip-card/FlipCard.vue.d.ts +3 -1
- package/dist/components/flip-card/FlipCard.vue.js +1 -1
- package/dist/components/flip-card/FlipCard.vue2.js +5 -3
- package/dist/components/fluid-cursor/FluidCursor.vue.js +37 -9
- package/dist/components/fluid-cursor/fluid-cursor-core.js +3 -3
- package/dist/components/fluid-cursor/webgpu-engine.js +3 -3
- package/dist/components/focus/Focus.vue.js +1 -1
- package/dist/components/focus/Focus.vue2.js +2 -2
- package/dist/components/follow-button/FollowButton.vue.d.ts +69 -0
- package/dist/components/follow-button/FollowButton.vue.js +7 -0
- package/dist/components/follow-button/FollowButton.vue2.js +239 -0
- package/dist/components/follow-button/follow-core.d.ts +83 -0
- package/dist/components/follow-button/follow-core.js +92 -0
- package/dist/components/follow-button/index.d.ts +2 -0
- package/dist/components/frosted-glass/FrostedGlass.vue.js +1 -1
- package/dist/components/glare-card/GlareCard.vue.js +1 -1
- package/dist/components/glare-card/GlareCard.vue2.js +4 -4
- package/dist/components/glowing-effect/GlowingEffect.vue.js +3 -3
- package/dist/components/glowing-effect/glowing-effect-core.js +4 -1
- package/dist/components/gradient-button/GradientButton.vue.d.ts +6 -4
- package/dist/components/gradient-button/GradientButton.vue.js +1 -1
- package/dist/components/gradient-button/GradientButton.vue2.js +13 -3
- package/dist/components/icon-button/IconButton.vue.d.ts +6 -4
- package/dist/components/icon-button/IconButton.vue.js +11 -8
- package/dist/components/image-trail-cursor/ImageTrailCursor.vue.js +17 -7
- package/dist/components/image-trail-cursor/trail-variants.js +3 -6
- package/dist/components/inline-citation/InlineCitation.vue.js +1 -1
- package/dist/components/inline-citation/InlineCitation.vue2.js +20 -14
- package/dist/components/input/Input.vue.js +1 -1
- package/dist/components/input/Input.vue2.js +18 -8
- package/dist/components/interactive-grid-pattern/InteractiveGridPattern.vue.js +1 -1
- package/dist/components/interactive-grid-pattern/InteractiveGridPattern.vue2.js +1 -1
- package/dist/components/interactive-hover-button/InteractiveHoverButton.vue.d.ts +6 -3
- package/dist/components/interactive-hover-button/InteractiveHoverButton.vue.js +1 -1
- package/dist/components/interactive-hover-button/InteractiveHoverButton.vue2.js +12 -2
- package/dist/components/letter-pullup/LetterPullup.vue.js +4 -4
- package/dist/components/line-hover-link/LineHoverLink.vue.js +1 -1
- package/dist/components/line-hover-link/LineHoverLink.vue2.js +5 -6
- package/dist/components/link/Link.vue.d.ts +4 -2
- package/dist/components/link/Link.vue.js +1 -1
- package/dist/components/link/Link.vue2.js +11 -8
- package/dist/components/magnetic-field/MagnetPuck.vue.d.ts +51 -0
- package/dist/components/magnetic-field/MagnetPuck.vue.js +7 -0
- package/dist/components/magnetic-field/MagnetPuck.vue2.js +191 -0
- package/dist/components/magnetic-field/MagneticField.vue.d.ts +39 -0
- package/dist/components/magnetic-field/MagneticField.vue.js +7 -0
- package/dist/components/magnetic-field/MagneticField.vue2.js +157 -0
- package/dist/components/magnetic-field/MagneticItem.vue.d.ts +28 -0
- package/dist/components/magnetic-field/MagneticItem.vue.js +7 -0
- package/dist/components/magnetic-field/MagneticItem.vue2.js +72 -0
- package/dist/components/magnetic-field/index.d.ts +10 -0
- package/dist/components/magnetic-field/magnetic-field-core.d.ts +163 -0
- package/dist/components/magnetic-field/magnetic-field-core.js +534 -0
- package/dist/components/magnetic-field/magnetic-field-source.d.ts +58 -0
- package/dist/components/magnetic-field/magnetic-field-source.js +58 -0
- package/dist/components/magnetic-field/types.d.ts +14 -0
- package/dist/components/magnetic-field/types.js +5 -0
- package/dist/components/mosaic-glow/MosaicGlow.vue.d.ts +6 -0
- package/dist/components/mosaic-glow/MosaicGlow.vue.js +53 -9
- package/dist/components/mosaic-glow/mosaic-glow-core.d.ts +30 -0
- package/dist/components/mosaic-glow/mosaic-glow-core.js +27 -0
- package/dist/components/mosaic-glow/mosaic-glow-hdr.d.ts +24 -0
- package/dist/components/mosaic-glow/mosaic-glow-hdr.js +200 -0
- package/dist/components/navbar/NavbarLink.vue.d.ts +4 -2
- package/dist/components/navbar/NavbarLink.vue.js +1 -1
- package/dist/components/navbar/NavbarLink.vue2.js +16 -13
- package/dist/components/navigation-menu/NavigationMenu.vue.js +6 -3
- package/dist/components/navigation-menu/NavigationMenuLink.vue.js +1 -1
- package/dist/components/navigation-menu/NavigationMenuLink.vue2.js +8 -8
- package/dist/components/navigation-menu/NavigationMenuTrigger.vue.d.ts +15 -0
- package/dist/components/navigation-menu/NavigationMenuTrigger.vue.js +1 -1
- package/dist/components/navigation-menu/NavigationMenuTrigger.vue2.js +36 -15
- package/dist/components/neon-border/NeonBorder.vue.js +1 -1
- package/dist/components/neon-border/NeonBorder.vue2.js +10 -11
- package/dist/components/number-input/NumberInput.vue.js +1 -1
- package/dist/components/number-input/NumberInput.vue2.js +22 -12
- package/dist/components/password-input/PasswordInput.vue.js +1 -1
- package/dist/components/password-input/PasswordInput.vue2.js +18 -11
- package/dist/components/pixel-loader/PixelLoader.vue.js +1 -1
- package/dist/components/pixel-loader/PixelLoader.vue2.js +6 -6
- package/dist/components/pixel-scene/PixelScene.vue.d.ts +60 -0
- package/dist/components/pixel-scene/PixelScene.vue.js +184 -0
- package/dist/components/pixel-scene/PixelScene.vue2.js +4 -0
- package/dist/components/pixel-scene/index.d.ts +4 -0
- package/dist/components/pixel-scene/pixel-scene-core.d.ts +256 -0
- package/dist/components/pixel-scene/pixel-scene-core.js +878 -0
- package/dist/components/pixel-scene/pixel-scene-hdr.d.ts +68 -0
- package/dist/components/pixel-scene/pixel-scene-hdr.js +312 -0
- package/dist/components/pixel-scene/pixel-scene-scenes.d.ts +31 -0
- package/dist/components/pixel-scene/pixel-scene-scenes.js +1074 -0
- package/dist/components/popover/Popover.vue.d.ts +4 -0
- package/dist/components/popover/Popover.vue.js +1 -1
- package/dist/components/popover/Popover.vue2.js +8 -6
- package/dist/components/popover/PopoverContent.vue.js +6 -2
- package/dist/components/pulse-beam/PulseBeam.vue.d.ts +6 -2
- package/dist/components/pulse-beam/PulseBeam.vue.js +1 -1
- package/dist/components/pulse-beam/PulseBeam.vue2.js +7 -4
- package/dist/components/radio-group/RadioGroup.vue.js +12 -11
- package/dist/components/radio-group/RadioGroupItem.vue.d.ts +2 -0
- package/dist/components/radio-group/RadioGroupItem.vue.js +1 -1
- package/dist/components/radio-group/RadioGroupItem.vue2.js +20 -7
- package/dist/components/rainbow-button/RainbowButton.vue.d.ts +11 -2
- package/dist/components/rainbow-button/RainbowButton.vue.js +1 -1
- package/dist/components/rainbow-button/RainbowButton.vue2.js +35 -18
- package/dist/components/ripple-button/RippleButton.vue.d.ts +6 -4
- package/dist/components/ripple-button/RippleButton.vue.js +1 -1
- package/dist/components/ripple-button/RippleButton.vue2.js +10 -5
- package/dist/components/search-input/SearchInput.vue.js +1 -1
- package/dist/components/search-input/SearchInput.vue2.js +19 -9
- package/dist/components/select/Select.vue.d.ts +1 -1
- package/dist/components/select/Select.vue.js +1 -1
- package/dist/components/select/Select.vue2.js +25 -17
- package/dist/components/sheet/Sheet.vue.d.ts +5 -0
- package/dist/components/sheet/Sheet.vue.js +5 -2
- package/dist/components/shimmer-button/ShimmerButton.vue.d.ts +2 -2
- package/dist/components/shimmer-button/ShimmerButton.vue.js +1 -1
- package/dist/components/shimmer-button/ShimmerButton.vue2.js +14 -6
- package/dist/components/sidebar/SidebarItem.vue.d.ts +4 -2
- package/dist/components/sidebar/SidebarItem.vue.js +1 -1
- package/dist/components/sidebar/SidebarItem.vue2.js +4 -2
- package/dist/components/slider/Slider.vue.d.ts +4 -0
- package/dist/components/slider/Slider.vue.js +1 -1
- package/dist/components/slider/Slider.vue2.js +20 -8
- package/dist/components/sources/SourcesTrigger.vue.js +1 -1
- package/dist/components/sources/SourcesTrigger.vue2.js +11 -11
- package/dist/components/sparkles/sparkles-core.d.ts +1 -1
- package/dist/components/sparkles/sparkles-core.js +36 -2
- package/dist/components/story-thread/StoryNode.vue.d.ts +11 -0
- package/dist/components/story-thread/StoryNode.vue.js +7 -0
- package/dist/components/story-thread/StoryNode.vue2.js +23 -0
- package/dist/components/story-thread/StoryThread.vue.d.ts +56 -0
- package/dist/components/story-thread/StoryThread.vue.js +7 -0
- package/dist/components/story-thread/StoryThread.vue2.js +103 -0
- package/dist/components/story-thread/index.d.ts +5 -0
- package/dist/components/story-thread/story-thread-core.d.ts +119 -0
- package/dist/components/story-thread/story-thread-core.js +491 -0
- package/dist/components/story-thread/types.d.ts +1 -0
- package/dist/components/sun-switch/SunSwitch.vue.d.ts +61 -0
- package/dist/components/sun-switch/SunSwitch.vue.js +7 -0
- package/dist/components/sun-switch/SunSwitch.vue2.js +559 -0
- package/dist/components/sun-switch/index.d.ts +4 -0
- package/dist/components/sun-switch/pixel-wave-core.d.ts +82 -0
- package/dist/components/sun-switch/pixel-wave-core.js +508 -0
- package/dist/components/sun-switch/sun-switch-core.d.ts +251 -0
- package/dist/components/sun-switch/sun-switch-core.js +546 -0
- package/dist/components/sun-switch/sun-switch-hdr.d.ts +70 -0
- package/dist/components/sun-switch/sun-switch-hdr.js +311 -0
- package/dist/components/switch/Switch.vue.d.ts +2 -0
- package/dist/components/switch/Switch.vue.js +1 -1
- package/dist/components/switch/Switch.vue2.js +16 -6
- package/dist/components/tabs/TabsTrigger.vue.d.ts +6 -0
- package/dist/components/tabs/TabsTrigger.vue.js +1 -1
- package/dist/components/tabs/TabsTrigger.vue2.js +28 -15
- package/dist/components/terminal-block/TerminalBlock.vue.js +1 -1
- package/dist/components/terminal-block/TerminalBlock.vue2.js +10 -9
- package/dist/components/text-reveal-card/TextRevealCard.vue.js +1 -2
- package/dist/components/textarea/Textarea.vue.js +1 -1
- package/dist/components/textarea/Textarea.vue2.js +19 -12
- package/dist/components/tick-nav/TickNav.vue.d.ts +71 -0
- package/dist/components/tick-nav/TickNav.vue.js +7 -0
- package/dist/components/tick-nav/TickNav.vue2.js +285 -0
- package/dist/components/tick-nav/index.d.ts +3 -0
- package/dist/components/tick-nav/tick-nav-core.d.ts +102 -0
- package/dist/components/tick-nav/tick-nav-core.js +398 -0
- package/dist/components/tick-nav/tick-nav-hdr.d.ts +60 -0
- package/dist/components/tick-nav/tick-nav-hdr.js +284 -0
- package/dist/components/tick-nav/types.d.ts +13 -0
- package/dist/components/time-picker/TimePicker.vue.js +1 -1
- package/dist/components/time-picker/TimePicker.vue2.js +25 -17
- package/dist/components/toast/Toast.vue.js +1 -1
- package/dist/components/toast/Toast.vue2.js +16 -4
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/store.d.ts +23 -0
- package/dist/components/toast/store.js +35 -7
- package/dist/components/toggle/Toggle.vue.d.ts +12 -0
- package/dist/components/toggle/Toggle.vue.js +1 -1
- package/dist/components/toggle/Toggle.vue2.js +27 -11
- package/dist/components/toggle-group/ToggleGroup.vue.d.ts +11 -0
- package/dist/components/toggle-group/ToggleGroup.vue.js +1 -1
- package/dist/components/toggle-group/ToggleGroup.vue2.js +16 -3
- package/dist/components/toggle-group/ToggleGroupItem.vue.d.ts +6 -0
- package/dist/components/toggle-group/ToggleGroupItem.vue.js +1 -1
- package/dist/components/toggle-group/ToggleGroupItem.vue2.js +27 -14
- package/dist/components/tooltip/Tooltip.vue.js +13 -0
- package/dist/components/tracing-beam/TracingBeam.vue.d.ts +20 -1
- package/dist/components/tracing-beam/TracingBeam.vue.js +5 -164
- package/dist/components/tracing-beam/TracingBeam.vue2.js +168 -1
- package/dist/components/typing-indicator/TypingIndicator.vue.js +1 -1
- package/dist/components/typing-indicator/TypingIndicator.vue2.js +7 -6
- package/dist/index.d.ts +10 -0
- package/dist/index.js +466 -413
- package/dist/internals/anchor-position.js +3 -0
- package/dist/internals/call-listener.d.ts +11 -0
- package/dist/internals/call-listener.js +31 -0
- package/dist/internals/dismissable.d.ts +17 -0
- package/dist/internals/dismissable.js +44 -1
- package/dist/internals/env.d.ts +1 -0
- package/dist/internals/env.js +11 -0
- package/dist/internals/focus-trap.js +29 -4
- package/dist/internals/merge-ids.d.ts +6 -0
- package/dist/internals/merge-ids.js +11 -0
- package/dist/internals/motion/presence-core.d.ts +1 -1
- package/dist/sound/engine.js +23 -9
- package/dist/sound/themes.d.ts +4 -3
- package/dist/sound/themes.js +49 -211
- package/dist/sound/types.d.ts +9 -1
- package/dist/sound/types.js +2 -2
- package/dist/styles.css +1473 -571
- package/package.json +2 -2
- package/tailwind.css +9 -9
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const AVATAR_TONES = [
|
|
2
|
+
"bg-rose-500/15 text-rose-800 dark:text-rose-300",
|
|
3
|
+
"bg-orange-500/15 text-orange-800 dark:text-orange-300",
|
|
4
|
+
"bg-amber-500/15 text-amber-800 dark:text-amber-300",
|
|
5
|
+
"bg-emerald-500/15 text-emerald-800 dark:text-emerald-300",
|
|
6
|
+
"bg-teal-500/15 text-teal-800 dark:text-teal-300",
|
|
7
|
+
"bg-sky-500/15 text-sky-800 dark:text-sky-300",
|
|
8
|
+
"bg-violet-500/15 text-violet-800 dark:text-violet-300",
|
|
9
|
+
"bg-fuchsia-500/15 text-fuchsia-800 dark:text-fuchsia-300"
|
|
10
|
+
];
|
|
11
|
+
const AVATAR_NEUTRAL_TONE = "bg-muted text-muted-foreground";
|
|
12
|
+
const WORD_START = /[\p{L}\p{N}]/u;
|
|
13
|
+
function initialsOf(name) {
|
|
14
|
+
if (!name) return "";
|
|
15
|
+
const firsts = [];
|
|
16
|
+
for (const word of name.normalize("NFC").trim().split(/\s+/)) {
|
|
17
|
+
const first2 = WORD_START.exec(word)?.[0];
|
|
18
|
+
if (first2) firsts.push(first2);
|
|
19
|
+
}
|
|
20
|
+
const first = firsts[0];
|
|
21
|
+
const last = firsts[firsts.length - 1];
|
|
22
|
+
if (first === void 0 || last === void 0) return "";
|
|
23
|
+
return (firsts.length === 1 ? first : first + last).toUpperCase();
|
|
24
|
+
}
|
|
25
|
+
function keyOf(name) {
|
|
26
|
+
return name.normalize("NFC").trim().replace(/\s+/g, " ").toLowerCase();
|
|
27
|
+
}
|
|
28
|
+
function toneIndexOf(name, count = AVATAR_TONES.length) {
|
|
29
|
+
let hash = 5381;
|
|
30
|
+
for (const char of keyOf(name)) {
|
|
31
|
+
hash = (Math.imul(hash, 33) ^ (char.codePointAt(0) ?? 0)) >>> 0;
|
|
32
|
+
}
|
|
33
|
+
return hash % count;
|
|
34
|
+
}
|
|
35
|
+
function avatarToneClass(name) {
|
|
36
|
+
if (!name || initialsOf(name) === "") return AVATAR_NEUTRAL_TONE;
|
|
37
|
+
return AVATAR_TONES[toneIndexOf(name)] ?? AVATAR_NEUTRAL_TONE;
|
|
38
|
+
}
|
|
39
|
+
function resolveAvatarStatus(src, loadedSrc, failedSrc) {
|
|
40
|
+
if (!src) return "fallback";
|
|
41
|
+
if (failedSrc === src) return "fallback";
|
|
42
|
+
if (loadedSrc === src) return "loaded";
|
|
43
|
+
return "loading";
|
|
44
|
+
}
|
|
45
|
+
function accessibleName(alt, name) {
|
|
46
|
+
const label = (alt ?? name)?.trim();
|
|
47
|
+
return label ? label : void 0;
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
AVATAR_NEUTRAL_TONE,
|
|
51
|
+
AVATAR_TONES,
|
|
52
|
+
accessibleName,
|
|
53
|
+
avatarToneClass,
|
|
54
|
+
initialsOf,
|
|
55
|
+
resolveAvatarStatus,
|
|
56
|
+
toneIndexOf
|
|
57
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
2
|
+
export type BadgeVariant = "default" | "secondary" | "outline" | "destructive" | "success";
|
|
3
|
+
export type BadgeSize = "sm" | "md";
|
|
4
|
+
export interface BadgeProps {
|
|
5
|
+
/** Visual treatment. Always pair it with a visible word: colour is never the message. */
|
|
6
|
+
variant?: BadgeVariant;
|
|
7
|
+
/** Compact (`sm`) or regular (`md`). */
|
|
8
|
+
size?: BadgeSize;
|
|
9
|
+
/** Additional CSS classes. */
|
|
10
|
+
class?: HTMLAttributes["class"];
|
|
11
|
+
}
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<BadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
15
|
+
default?: () => unknown;
|
|
16
|
+
}>;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineComponent, useAttrs, computed, createElementBlock, openBlock, mergeProps, unref, renderSlot } from "vue";
|
|
2
|
+
import { cn } from "../../utils.js";
|
|
3
|
+
const _hoisted_1 = ["data-variant", "data-size"];
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
...{ name: "Badge", inheritAttrs: false },
|
|
6
|
+
__name: "Badge",
|
|
7
|
+
props: {
|
|
8
|
+
variant: { default: "default" },
|
|
9
|
+
size: { default: "md" },
|
|
10
|
+
class: { type: [Boolean, null, String, Object, Array] }
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const attrs = useAttrs();
|
|
14
|
+
const VARIANT_CLASSES = {
|
|
15
|
+
default: "border-transparent bg-primary text-primary-foreground",
|
|
16
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
17
|
+
outline: "border-border text-foreground",
|
|
18
|
+
destructive: "border-destructive/35 bg-destructive/10 text-destructive",
|
|
19
|
+
success: "border-emerald-500/30 bg-emerald-500/10 text-emerald-800 dark:text-emerald-300"
|
|
20
|
+
};
|
|
21
|
+
const SIZE_CLASSES = {
|
|
22
|
+
sm: "px-1.5 py-px text-[0.6875rem] leading-4",
|
|
23
|
+
md: "px-2 py-0.5 text-xs leading-4"
|
|
24
|
+
};
|
|
25
|
+
const classes = computed(
|
|
26
|
+
() => cn(
|
|
27
|
+
"inline-flex items-center gap-1 rounded-full border font-medium whitespace-nowrap",
|
|
28
|
+
SIZE_CLASSES[__props.size],
|
|
29
|
+
VARIANT_CLASSES[__props.variant],
|
|
30
|
+
__props.class
|
|
31
|
+
)
|
|
32
|
+
);
|
|
33
|
+
return (_ctx, _cache) => {
|
|
34
|
+
return openBlock(), createElementBlock("span", mergeProps(unref(attrs), {
|
|
35
|
+
class: classes.value,
|
|
36
|
+
"data-variant": __props.variant,
|
|
37
|
+
"data-size": __props.size
|
|
38
|
+
}), [
|
|
39
|
+
renderSlot(_ctx.$slots, "default")
|
|
40
|
+
], 16, _hoisted_1);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
_sfc_main as default
|
|
46
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./BentoFrame.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const BentoFrame = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const BentoFrame = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bb0b3596"]]);
|
|
5
5
|
export {
|
|
6
6
|
BentoFrame as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, createElementBlock, openBlock, mergeProps, unref, createElementVNode, normalizeClass, renderSlot, createCommentVNode } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
...{ name: "BentoFrame", inheritAttrs: false },
|
|
@@ -8,10 +8,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8
8
|
panelClass: { default: "" }
|
|
9
9
|
},
|
|
10
10
|
setup(__props) {
|
|
11
|
+
const attrs = useAttrs();
|
|
11
12
|
return (_ctx, _cache) => {
|
|
12
|
-
return openBlock(), createElementBlock("div", {
|
|
13
|
-
class:
|
|
14
|
-
}, [
|
|
13
|
+
return openBlock(), createElementBlock("div", mergeProps(unref(attrs), {
|
|
14
|
+
class: unref(cn)("bento-tile relative flex rounded-2xl p-1.5", __props.class)
|
|
15
|
+
}), [
|
|
15
16
|
createElementVNode("div", {
|
|
16
17
|
class: normalizeClass(
|
|
17
18
|
unref(cn)(
|
|
@@ -30,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30
31
|
}, null, -1)),
|
|
31
32
|
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", {}, void 0, true, 0) : createCommentVNode("", true)
|
|
32
33
|
], 2)
|
|
33
|
-
],
|
|
34
|
+
], 16);
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
37
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./BentoGrid.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const BentoGrid = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const BentoGrid = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a74ffc86"]]);
|
|
5
5
|
export {
|
|
6
6
|
BentoGrid as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, ref, computed, watch, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, useTemplateRef, ref, computed, watch, createElementBlock, openBlock, mergeProps, unref, renderSlot, createCommentVNode } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { inView } from "../../internals/motion/in-view.js";
|
|
4
4
|
import { staggerDelay } from "../../internals/motion/stagger.js";
|
|
@@ -13,6 +13,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
13
|
accent: {}
|
|
14
14
|
},
|
|
15
15
|
setup(__props) {
|
|
16
|
+
const attrs = useAttrs();
|
|
16
17
|
const STEP = 70;
|
|
17
18
|
const CAP = 420;
|
|
18
19
|
const el = useTemplateRef("el");
|
|
@@ -72,22 +73,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
73
|
{ flush: "post" }
|
|
73
74
|
);
|
|
74
75
|
return (_ctx, _cache) => {
|
|
75
|
-
return openBlock(), createElementBlock("div", {
|
|
76
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
76
77
|
ref_key: "el",
|
|
77
78
|
ref: el,
|
|
78
|
-
class:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
__props.class
|
|
83
|
-
)
|
|
79
|
+
class: unref(cn)(
|
|
80
|
+
"fancy-bento mx-auto grid max-w-7xl grid-cols-1 gap-4 md:auto-rows-[18rem] md:grid-cols-3",
|
|
81
|
+
revealing.value && "bento-reveal",
|
|
82
|
+
__props.class
|
|
84
83
|
),
|
|
85
|
-
"data-state": revealing.value ? shown.value ? "shown" : "armed" : void 0,
|
|
86
|
-
style: normalizeStyle(accentStyle.value),
|
|
87
84
|
onFocusin: _cache[0] || (_cache[0] = ($event) => shown.value = true)
|
|
88
|
-
},
|
|
85
|
+
}, unref(attrs), {
|
|
86
|
+
style: accentStyle.value,
|
|
87
|
+
"data-state": revealing.value ? shown.value ? "shown" : "armed" : unref(attrs)["data-state"]
|
|
88
|
+
}), [
|
|
89
89
|
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", {}, void 0, true, 0) : createCommentVNode("", true)
|
|
90
|
-
],
|
|
90
|
+
], 16, _hoisted_1);
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, createBlock, openBlock, mergeProps, unref, withCtx, createElementBlock, createCommentVNode, createElementVNode, renderSlot, toDisplayString, createTextVNode } from "vue";
|
|
2
2
|
import BentoFrame from "./BentoFrame.vue.js";
|
|
3
3
|
const _hoisted_1 = {
|
|
4
4
|
key: 0,
|
|
@@ -23,11 +23,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
class: { type: [Boolean, null, String, Object, Array], default: "" }
|
|
24
24
|
},
|
|
25
25
|
setup(__props) {
|
|
26
|
+
const attrs = useAttrs();
|
|
26
27
|
return (_ctx, _cache) => {
|
|
27
|
-
return openBlock(), createBlock(BentoFrame, {
|
|
28
|
-
class:
|
|
28
|
+
return openBlock(), createBlock(BentoFrame, mergeProps(unref(attrs), {
|
|
29
|
+
class: ["group col-span-3", __props.class],
|
|
29
30
|
"panel-class": "justify-end"
|
|
30
|
-
}, {
|
|
31
|
+
}), {
|
|
31
32
|
default: withCtx(() => [
|
|
32
33
|
_ctx.$slots.background ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
33
34
|
renderSlot(_ctx.$slots, "background")
|
|
@@ -59,7 +60,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
59
60
|
])
|
|
60
61
|
]),
|
|
61
62
|
_: 3
|
|
62
|
-
},
|
|
63
|
+
}, 16, ["class"]);
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
66
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, createBlock, openBlock, mergeProps, unref, withCtx, renderSlot, createCommentVNode, createElementVNode, createElementBlock } from "vue";
|
|
2
2
|
import BentoFrame from "./BentoFrame.vue.js";
|
|
3
3
|
const _hoisted_1 = { class: "bento-lift relative" };
|
|
4
4
|
const _hoisted_2 = {
|
|
@@ -24,11 +24,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
class: { type: [Boolean, null, String, Object, Array], default: "" }
|
|
25
25
|
},
|
|
26
26
|
setup(__props) {
|
|
27
|
+
const attrs = useAttrs();
|
|
27
28
|
return (_ctx, _cache) => {
|
|
28
|
-
return openBlock(), createBlock(BentoFrame, {
|
|
29
|
-
class:
|
|
29
|
+
return openBlock(), createBlock(BentoFrame, mergeProps(unref(attrs), {
|
|
30
|
+
class: ["group/bento row-span-1", __props.class],
|
|
30
31
|
"panel-class": "justify-between gap-4 p-4"
|
|
31
|
-
}, {
|
|
32
|
+
}), {
|
|
32
33
|
default: withCtx(() => [
|
|
33
34
|
_ctx.$slots.header ? renderSlot(_ctx.$slots, "header", {}, void 0, void 0, 0) : createCommentVNode("", true),
|
|
34
35
|
createElementVNode("div", _hoisted_1, [
|
|
@@ -46,7 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
46
47
|
])
|
|
47
48
|
]),
|
|
48
49
|
_: 3
|
|
49
|
-
},
|
|
50
|
+
}, 16, ["class"]);
|
|
50
51
|
};
|
|
51
52
|
}
|
|
52
53
|
});
|
|
@@ -5,7 +5,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5
5
|
...{ name: "FallingStarsBg", inheritAttrs: false },
|
|
6
6
|
__name: "FallingStarsBg",
|
|
7
7
|
props: {
|
|
8
|
-
color: { default: "
|
|
8
|
+
color: { default: "currentColor" },
|
|
9
9
|
count: { default: 200 },
|
|
10
10
|
class: { type: [Boolean, null, String, Object, Array] }
|
|
11
11
|
},
|
|
@@ -9,7 +9,7 @@ export interface FallingStarsInitOptions {
|
|
|
9
9
|
}
|
|
10
10
|
/** Props the Svelte wrapper reacts to after mount today. */
|
|
11
11
|
export interface FallingStarsLiveOptions {
|
|
12
|
-
/** Star color
|
|
12
|
+
/** Star color: a hex string, or `currentColor` (default) to follow the text colour. */
|
|
13
13
|
color?: string;
|
|
14
14
|
}
|
|
15
15
|
export interface FallingStarsEngine {
|
|
@@ -1,13 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const CURRENT_COLOR = /^\s*currentcolor\s*$/i;
|
|
2
|
+
function parseHex(hex) {
|
|
3
|
+
let h = (hex || "#000").trim().replace(/^#/, "");
|
|
3
4
|
if (h.length === 3) {
|
|
4
5
|
h = h.split("").map((c) => c + c).join("");
|
|
5
6
|
}
|
|
6
7
|
const bigint = parseInt(h, 16) || 0;
|
|
7
|
-
return {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
return { r: bigint >> 16 & 255, g: bigint >> 8 & 255, b: bigint & 255 };
|
|
9
|
+
}
|
|
10
|
+
function computedToRgb(computed) {
|
|
11
|
+
const m = /^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/i.exec(computed);
|
|
12
|
+
if (m) return { r: Math.round(+m[1]), g: Math.round(+m[2]), b: Math.round(+m[3]) };
|
|
13
|
+
if (!computed) return { r: 0, g: 0, b: 0 };
|
|
14
|
+
try {
|
|
15
|
+
const probe = document.createElement("canvas");
|
|
16
|
+
probe.width = probe.height = 1;
|
|
17
|
+
const pctx = probe.getContext("2d", { willReadFrequently: true });
|
|
18
|
+
if (pctx) {
|
|
19
|
+
pctx.fillStyle = computed;
|
|
20
|
+
pctx.fillRect(0, 0, 1, 1);
|
|
21
|
+
const [r = 0, g = 0, b = 0] = pctx.getImageData(0, 0, 1, 1).data;
|
|
22
|
+
return { r, g, b };
|
|
23
|
+
}
|
|
24
|
+
} catch {
|
|
25
|
+
}
|
|
26
|
+
return { r: 0, g: 0, b: 0 };
|
|
27
|
+
}
|
|
28
|
+
function createColorResolver(el) {
|
|
29
|
+
let lastComputed = "";
|
|
30
|
+
let lastRgb = { r: 0, g: 0, b: 0 };
|
|
31
|
+
let lastHex = "";
|
|
32
|
+
let lastHexRgb = { r: 0, g: 0, b: 0 };
|
|
33
|
+
return (color) => {
|
|
34
|
+
if (CURRENT_COLOR.test(color)) {
|
|
35
|
+
const computed = getComputedStyle(el).color;
|
|
36
|
+
if (computed !== lastComputed) {
|
|
37
|
+
lastComputed = computed;
|
|
38
|
+
lastRgb = computedToRgb(computed);
|
|
39
|
+
}
|
|
40
|
+
return lastRgb;
|
|
41
|
+
}
|
|
42
|
+
if (color !== lastHex) {
|
|
43
|
+
lastHex = color;
|
|
44
|
+
lastHexRgb = parseHex(color);
|
|
45
|
+
}
|
|
46
|
+
return lastHexRgb;
|
|
11
47
|
};
|
|
12
48
|
}
|
|
13
49
|
function createFallingStars(el, options, random = Math.random) {
|
|
@@ -15,8 +51,8 @@ function createFallingStars(el, options, random = Math.random) {
|
|
|
15
51
|
let ctx = canvas.getContext("2d");
|
|
16
52
|
if (!ctx) return null;
|
|
17
53
|
const count = options.count ?? 200;
|
|
18
|
-
let color = options.color ?? "
|
|
19
|
-
|
|
54
|
+
let color = options.color ?? "currentColor";
|
|
55
|
+
const resolveColor = createColorResolver(canvas);
|
|
20
56
|
let dpr = 1;
|
|
21
57
|
let perspective = 0;
|
|
22
58
|
let stars = [];
|
|
@@ -37,7 +73,7 @@ function createFallingStars(el, options, random = Math.random) {
|
|
|
37
73
|
}
|
|
38
74
|
perspective = width / 2;
|
|
39
75
|
}
|
|
40
|
-
function drawStar(star, width, height) {
|
|
76
|
+
function drawStar(star, width, height, rgb) {
|
|
41
77
|
if (!ctx) return;
|
|
42
78
|
const scale = perspective / (perspective + star.z);
|
|
43
79
|
const x2d = width / 2 + star.x * scale;
|
|
@@ -46,7 +82,6 @@ function createFallingStars(el, options, random = Math.random) {
|
|
|
46
82
|
const prevScale = perspective / (perspective + star.z + star.speed * 15);
|
|
47
83
|
const xPrev = width / 2 + star.x * prevScale;
|
|
48
84
|
const yPrev = height / 2 + star.y * prevScale;
|
|
49
|
-
const rgb = cachedRgb;
|
|
50
85
|
const layerAlphas = [0.08, 0.14, 0.22];
|
|
51
86
|
for (let i = 0; i < layerAlphas.length; i++) {
|
|
52
87
|
ctx.beginPath();
|
|
@@ -74,10 +109,11 @@ function createFallingStars(el, options, random = Math.random) {
|
|
|
74
109
|
const width = canvas.clientWidth;
|
|
75
110
|
const height = canvas.clientHeight;
|
|
76
111
|
ctx.clearRect(0, 0, width, height);
|
|
112
|
+
const rgb = resolveColor(color);
|
|
77
113
|
for (let i = 0; i < stars.length; i++) {
|
|
78
114
|
const star = stars[i];
|
|
79
115
|
if (!star) continue;
|
|
80
|
-
drawStar(star, width, height);
|
|
116
|
+
drawStar(star, width, height, rgb);
|
|
81
117
|
star.z -= star.speed;
|
|
82
118
|
if (star.z <= 0) {
|
|
83
119
|
star.z = width || 1;
|
|
@@ -104,7 +140,6 @@ function createFallingStars(el, options, random = Math.random) {
|
|
|
104
140
|
setOptions(next) {
|
|
105
141
|
if (next.color !== void 0) {
|
|
106
142
|
color = next.color;
|
|
107
|
-
cachedRgb = hexToRgb(color);
|
|
108
143
|
}
|
|
109
144
|
},
|
|
110
145
|
resize,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, computed, createElementBlock, openBlock, mergeProps, unref, createElementVNode, normalizeClass, normalizeStyle, renderSlot } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { BOOK_COLOR_MAP, BOOK_RADIUS_MAP, BOOK_SIZE_MAP, BOOK_SHADOW_SIZE_MAP } from "./index.js";
|
|
4
4
|
const _hoisted_1 = { class: "pl-1" };
|
|
@@ -16,16 +16,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
},
|
|
17
17
|
setup(__props) {
|
|
18
18
|
const props = __props;
|
|
19
|
+
const attrs = useAttrs();
|
|
19
20
|
const computedGradient = computed(() => BOOK_COLOR_MAP[props.color] || BOOK_COLOR_MAP.zinc);
|
|
20
21
|
return (_ctx, _cache) => {
|
|
21
|
-
return openBlock(), createElementBlock("div", {
|
|
22
|
-
class:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
props.class
|
|
26
|
-
)
|
|
22
|
+
return openBlock(), createElementBlock("div", mergeProps(unref(attrs), {
|
|
23
|
+
class: unref(cn)(
|
|
24
|
+
"group z-10 w-min [--shadowColor:#bbb] [perspective:800px] dark:[--shadowColor:#111]",
|
|
25
|
+
props.class
|
|
27
26
|
)
|
|
28
|
-
}, [
|
|
27
|
+
}), [
|
|
29
28
|
createElementVNode("div", {
|
|
30
29
|
style: normalizeStyle({ width: unref(BOOK_SIZE_MAP)[__props.size].width, transition: `transform ${__props.duration}ms ease` }),
|
|
31
30
|
class: normalizeClass(
|
|
@@ -77,7 +76,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
76
|
style: normalizeStyle({ transform: "translateZ(-25px)", boxShadow: unref(BOOK_SHADOW_SIZE_MAP)[__props.shadowSize] })
|
|
78
77
|
}, null, 6)
|
|
79
78
|
], 6)
|
|
80
|
-
],
|
|
79
|
+
], 16);
|
|
81
80
|
};
|
|
82
81
|
}
|
|
83
82
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, createElementBlock, openBlock, mergeProps, unref, renderSlot } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
...{ name: "BookDescription", inheritAttrs: false },
|
|
@@ -8,12 +8,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8
8
|
},
|
|
9
9
|
setup(__props) {
|
|
10
10
|
const props = __props;
|
|
11
|
+
const attrs = useAttrs();
|
|
11
12
|
return (_ctx, _cache) => {
|
|
12
|
-
return openBlock(), createElementBlock("p", {
|
|
13
|
-
class:
|
|
14
|
-
}, [
|
|
13
|
+
return openBlock(), createElementBlock("p", mergeProps(unref(attrs), {
|
|
14
|
+
class: unref(cn)("text-xs/relaxed select-none", props.class)
|
|
15
|
+
}), [
|
|
15
16
|
renderSlot(_ctx.$slots, "default")
|
|
16
|
-
],
|
|
17
|
+
], 16);
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, createElementBlock, openBlock, mergeProps, unref, renderSlot } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
...{ name: "BookHeader", inheritAttrs: false },
|
|
@@ -8,12 +8,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8
8
|
},
|
|
9
9
|
setup(__props) {
|
|
10
10
|
const props = __props;
|
|
11
|
+
const attrs = useAttrs();
|
|
11
12
|
return (_ctx, _cache) => {
|
|
12
|
-
return openBlock(), createElementBlock("div", {
|
|
13
|
-
class:
|
|
14
|
-
}, [
|
|
13
|
+
return openBlock(), createElementBlock("div", mergeProps(unref(attrs), {
|
|
14
|
+
class: unref(cn)("flex flex-wrap gap-2", props.class)
|
|
15
|
+
}), [
|
|
15
16
|
renderSlot(_ctx.$slots, "default")
|
|
16
|
-
],
|
|
17
|
+
], 16);
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, createElementBlock, openBlock, mergeProps, unref, renderSlot } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
...{ name: "BookTitle", inheritAttrs: false },
|
|
@@ -8,12 +8,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8
8
|
},
|
|
9
9
|
setup(__props) {
|
|
10
10
|
const props = __props;
|
|
11
|
+
const attrs = useAttrs();
|
|
11
12
|
return (_ctx, _cache) => {
|
|
12
|
-
return openBlock(), createElementBlock("h1", {
|
|
13
|
-
class:
|
|
14
|
-
}, [
|
|
13
|
+
return openBlock(), createElementBlock("h1", mergeProps(unref(attrs), {
|
|
14
|
+
class: unref(cn)("mt-3 mb-1 font-bold text-balance select-none", props.class)
|
|
15
|
+
}), [
|
|
15
16
|
renderSlot(_ctx.$slots, "default")
|
|
16
|
-
],
|
|
17
|
+
], 16);
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, computed, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, useTemplateRef, computed, createElementBlock, openBlock, mergeProps, unref, createElementVNode, normalizeStyle, renderSlot } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { useInView } from "../../internals/motion/use-in-view.js";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -11,6 +11,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11
11
|
class: { type: [Boolean, null, String, Object, Array] }
|
|
12
12
|
},
|
|
13
13
|
setup(__props) {
|
|
14
|
+
const attrs = useAttrs();
|
|
14
15
|
const containerRef = useTemplateRef("containerRef");
|
|
15
16
|
const isInView = useInView(containerRef, () => ({ threshold: 0.1, once: true }));
|
|
16
17
|
const contentStyle = computed(() => ({
|
|
@@ -24,11 +25,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
25
|
transition: `left ${__props.duration}s ease-in ${__props.delay}s`
|
|
25
26
|
}));
|
|
26
27
|
return (_ctx, _cache) => {
|
|
27
|
-
return openBlock(), createElementBlock("div", {
|
|
28
|
+
return openBlock(), createElementBlock("div", mergeProps(unref(attrs), {
|
|
28
29
|
ref_key: "containerRef",
|
|
29
30
|
ref: containerRef,
|
|
30
|
-
class:
|
|
31
|
-
}, [
|
|
31
|
+
class: unref(cn)("box-reveal relative overflow-hidden", __props.class)
|
|
32
|
+
}), [
|
|
32
33
|
createElementVNode("div", {
|
|
33
34
|
class: "box-reveal-content",
|
|
34
35
|
style: normalizeStyle(contentStyle.value)
|
|
@@ -39,7 +40,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
39
40
|
class: "box-reveal-overlay absolute inset-0 z-20",
|
|
40
41
|
style: normalizeStyle(overlayStyle.value)
|
|
41
42
|
}, null, 4)
|
|
42
|
-
],
|
|
43
|
+
], 16);
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
46
|
});
|
|
@@ -25,13 +25,15 @@ export interface ButtonProps {
|
|
|
25
25
|
fullWidth?: boolean;
|
|
26
26
|
/** Accessible name for a button whose content is icon-only. */
|
|
27
27
|
label?: string;
|
|
28
|
-
/** Fires on activation. Never called while `disabled` or `loading`. */
|
|
29
|
-
|
|
28
|
+
/** Fires on activation. Never called while `disabled` or `loading`. `@click` reaches it. */
|
|
29
|
+
onClick?: ((event: MouseEvent) => void) | ((event: MouseEvent) => void)[];
|
|
30
|
+
/** @deprecated Use `@click` / `onClick`. Only called when `onClick` is absent. */
|
|
31
|
+
onclick?: ((event: MouseEvent) => void) | ((event: MouseEvent) => void)[];
|
|
30
32
|
/** Additional CSS classes. */
|
|
31
33
|
class?: HTMLAttributes["class"];
|
|
32
34
|
/**
|
|
33
|
-
* Plays the
|
|
34
|
-
* default; only audible once the user has enabled sound.
|
|
35
|
+
* Plays the `hover` cue on mouse/pen pointer enter and the `press` cue on
|
|
36
|
+
* click. Off by default; only audible once the user has enabled sound.
|
|
35
37
|
*/
|
|
36
38
|
sound?: boolean;
|
|
37
39
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Button.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const Button = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Button = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f007c078"]]);
|
|
5
5
|
export {
|
|
6
6
|
Button as default
|
|
7
7
|
};
|