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,311 @@
|
|
|
1
|
+
const SUN_HDR_PEAK = 4.9;
|
|
2
|
+
const SUN_HDR_RESTARTS = 3;
|
|
3
|
+
const SUN_HDR_RESTART_MS = 600;
|
|
4
|
+
const FPI = 8;
|
|
5
|
+
const START_CAPACITY = 1024;
|
|
6
|
+
const FORMAT = "rgba16float";
|
|
7
|
+
const WGSL = (
|
|
8
|
+
/* wgsl */
|
|
9
|
+
`
|
|
10
|
+
struct Frame { size: vec2f, dot: f32, pad: f32 };
|
|
11
|
+
@group(0) @binding(0) var<uniform> frame: Frame;
|
|
12
|
+
struct In { @location(0) cell: vec4f, @location(1) colour: vec4f };
|
|
13
|
+
struct Out { @builtin(position) pos: vec4f, @location(0) colour: vec4f };
|
|
14
|
+
@vertex fn vs(@builtin(vertex_index) vi: u32, inst: In) -> Out {
|
|
15
|
+
let corners = array<vec2f, 6>(vec2f(0, 0), vec2f(1, 0), vec2f(0, 1), vec2f(0, 1), vec2f(1, 0), vec2f(1, 1));
|
|
16
|
+
let p = inst.cell.xy + corners[vi] * frame.dot;
|
|
17
|
+
var o: Out;
|
|
18
|
+
o.pos = vec4f(p.x / frame.size.x * 2.0 - 1.0, 1.0 - p.y / frame.size.y * 2.0, 0.0, 1.0);
|
|
19
|
+
o.colour = inst.colour;
|
|
20
|
+
return o;
|
|
21
|
+
}
|
|
22
|
+
// a hard square at the pre-encoded colour; nothing else
|
|
23
|
+
@fragment fn fs(o: Out) -> @location(0) vec4f { return vec4f(o.colour.rgb, 1.0); }
|
|
24
|
+
`
|
|
25
|
+
);
|
|
26
|
+
const LINEAR = new Float32Array(256);
|
|
27
|
+
for (let i = 0; i < 256; i++) {
|
|
28
|
+
const c = i / 255;
|
|
29
|
+
LINEAR[i] = c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
30
|
+
}
|
|
31
|
+
function srgbToLinear(c8) {
|
|
32
|
+
return LINEAR[Math.min(255, Math.max(0, Math.round(c8)))];
|
|
33
|
+
}
|
|
34
|
+
function encodeExt(v) {
|
|
35
|
+
return v <= 31308e-7 ? 12.92 * v : 1.055 * Math.pow(v, 1 / 2.4) - 0.055;
|
|
36
|
+
}
|
|
37
|
+
function encodeGlowChannel(c8, glow) {
|
|
38
|
+
const g = Math.min(SUN_HDR_PEAK, Math.max(0, glow));
|
|
39
|
+
return encodeExt(srgbToLinear(c8) * g);
|
|
40
|
+
}
|
|
41
|
+
function sunHdrAvailable() {
|
|
42
|
+
try {
|
|
43
|
+
if (typeof navigator === "undefined" || typeof window === "undefined") return false;
|
|
44
|
+
if (!navigator.gpu) return false;
|
|
45
|
+
return typeof window.matchMedia === "function" && window.matchMedia("(dynamic-range: high)").matches;
|
|
46
|
+
} catch {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function hdrCapacityFor(n) {
|
|
51
|
+
let c = START_CAPACITY;
|
|
52
|
+
while (c < n) c *= 2;
|
|
53
|
+
return c;
|
|
54
|
+
}
|
|
55
|
+
function createSunHdrSquares() {
|
|
56
|
+
let data = new Float32Array(START_CAPACITY * FPI);
|
|
57
|
+
let n = 0;
|
|
58
|
+
return {
|
|
59
|
+
get n() {
|
|
60
|
+
return n;
|
|
61
|
+
},
|
|
62
|
+
get data() {
|
|
63
|
+
return data;
|
|
64
|
+
},
|
|
65
|
+
clear() {
|
|
66
|
+
n = 0;
|
|
67
|
+
},
|
|
68
|
+
push(px, py, rgb, glow) {
|
|
69
|
+
if (!(glow > 0) || rgb < 0) return;
|
|
70
|
+
if ((n + 1) * FPI > data.length) {
|
|
71
|
+
const next = new Float32Array(hdrCapacityFor(n + 1) * FPI);
|
|
72
|
+
next.set(data);
|
|
73
|
+
data = next;
|
|
74
|
+
}
|
|
75
|
+
const o = n * FPI;
|
|
76
|
+
data[o] = px;
|
|
77
|
+
data[o + 1] = py;
|
|
78
|
+
data[o + 2] = 0;
|
|
79
|
+
data[o + 3] = 0;
|
|
80
|
+
data[o + 4] = encodeGlowChannel(rgb >> 16 & 255, glow);
|
|
81
|
+
data[o + 5] = encodeGlowChannel(rgb >> 8 & 255, glow);
|
|
82
|
+
data[o + 6] = encodeGlowChannel(rgb & 255, glow);
|
|
83
|
+
data[o + 7] = 1;
|
|
84
|
+
n++;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
let shared = null;
|
|
89
|
+
const PIPELINES = /* @__PURE__ */ new WeakMap();
|
|
90
|
+
function acquire(gpu) {
|
|
91
|
+
if (!shared) {
|
|
92
|
+
const s = { device: Promise.resolve(null), refs: 0, onLost: /* @__PURE__ */ new Set() };
|
|
93
|
+
s.device = (async () => {
|
|
94
|
+
const adapter = await gpu.requestAdapter();
|
|
95
|
+
if (!adapter) return null;
|
|
96
|
+
const device = await adapter.requestDevice();
|
|
97
|
+
void device.lost.then(() => {
|
|
98
|
+
if (shared === s) shared = null;
|
|
99
|
+
for (const fn of [...s.onLost]) fn();
|
|
100
|
+
s.onLost.clear();
|
|
101
|
+
});
|
|
102
|
+
return device;
|
|
103
|
+
})().catch(() => null);
|
|
104
|
+
shared = s;
|
|
105
|
+
}
|
|
106
|
+
shared.refs++;
|
|
107
|
+
return shared;
|
|
108
|
+
}
|
|
109
|
+
function release(s) {
|
|
110
|
+
s.refs--;
|
|
111
|
+
if (s.refs > 0) return;
|
|
112
|
+
if (shared === s) shared = null;
|
|
113
|
+
s.onLost.clear();
|
|
114
|
+
void s.device.then((d) => d?.destroy());
|
|
115
|
+
}
|
|
116
|
+
function pipelineFor(device) {
|
|
117
|
+
let p = PIPELINES.get(device);
|
|
118
|
+
if (p) return p;
|
|
119
|
+
const module = device.createShaderModule({ code: WGSL });
|
|
120
|
+
p = device.createRenderPipeline({
|
|
121
|
+
layout: "auto",
|
|
122
|
+
vertex: {
|
|
123
|
+
module,
|
|
124
|
+
entryPoint: "vs",
|
|
125
|
+
buffers: [
|
|
126
|
+
{
|
|
127
|
+
arrayStride: FPI * 4,
|
|
128
|
+
stepMode: "instance",
|
|
129
|
+
attributes: [
|
|
130
|
+
{ shaderLocation: 0, offset: 0, format: "float32x4" },
|
|
131
|
+
{ shaderLocation: 1, offset: 16, format: "float32x4" }
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
fragment: {
|
|
137
|
+
module,
|
|
138
|
+
entryPoint: "fs",
|
|
139
|
+
targets: [
|
|
140
|
+
{
|
|
141
|
+
format: FORMAT,
|
|
142
|
+
blend: {
|
|
143
|
+
color: { srcFactor: "one", dstFactor: "one", operation: "max" },
|
|
144
|
+
alpha: { srcFactor: "one", dstFactor: "one", operation: "max" }
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
primitive: { topology: "triangle-list" }
|
|
150
|
+
});
|
|
151
|
+
PIPELINES.set(device, p);
|
|
152
|
+
return p;
|
|
153
|
+
}
|
|
154
|
+
async function startSunHdr(canvas) {
|
|
155
|
+
if (!sunHdrAvailable()) return null;
|
|
156
|
+
const gpu = navigator.gpu;
|
|
157
|
+
if (!gpu) return null;
|
|
158
|
+
const s = acquire(gpu);
|
|
159
|
+
let held = true;
|
|
160
|
+
const drop = () => {
|
|
161
|
+
if (held) {
|
|
162
|
+
held = false;
|
|
163
|
+
release(s);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
try {
|
|
167
|
+
const device = await s.device;
|
|
168
|
+
if (!device) {
|
|
169
|
+
drop();
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
const context = canvas.getContext("webgpu");
|
|
173
|
+
if (!context) {
|
|
174
|
+
drop();
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
context.configure({
|
|
178
|
+
device,
|
|
179
|
+
format: FORMAT,
|
|
180
|
+
alphaMode: "premultiplied",
|
|
181
|
+
colorSpace: "srgb",
|
|
182
|
+
toneMapping: { mode: "extended" }
|
|
183
|
+
});
|
|
184
|
+
let extended = false;
|
|
185
|
+
try {
|
|
186
|
+
const applied = context.getConfiguration?.();
|
|
187
|
+
extended = applied?.toneMapping?.mode === "extended";
|
|
188
|
+
} catch {
|
|
189
|
+
extended = false;
|
|
190
|
+
}
|
|
191
|
+
if (!extended) {
|
|
192
|
+
try {
|
|
193
|
+
context.unconfigure();
|
|
194
|
+
} catch {
|
|
195
|
+
}
|
|
196
|
+
drop();
|
|
197
|
+
return null;
|
|
198
|
+
}
|
|
199
|
+
const pipeline = pipelineFor(device);
|
|
200
|
+
const uniform = device.createBuffer({
|
|
201
|
+
size: 16,
|
|
202
|
+
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST
|
|
203
|
+
});
|
|
204
|
+
const uniformData = new Float32Array(4);
|
|
205
|
+
const bindGroup = device.createBindGroup({
|
|
206
|
+
layout: pipeline.getBindGroupLayout(0),
|
|
207
|
+
entries: [{ binding: 0, resource: { buffer: uniform } }]
|
|
208
|
+
});
|
|
209
|
+
const sink = createSunHdrSquares();
|
|
210
|
+
let capacity = START_CAPACITY;
|
|
211
|
+
let instances = device.createBuffer({
|
|
212
|
+
size: capacity * FPI * 4,
|
|
213
|
+
usage: GPUBufferUsage.VERTEX | GPUBufferUsage.COPY_DST
|
|
214
|
+
});
|
|
215
|
+
let destroyed = false;
|
|
216
|
+
let count = 0;
|
|
217
|
+
let resolveLost = () => {
|
|
218
|
+
};
|
|
219
|
+
const lost = new Promise((r) => {
|
|
220
|
+
resolveLost = r;
|
|
221
|
+
});
|
|
222
|
+
const onLost = () => {
|
|
223
|
+
destroyed = true;
|
|
224
|
+
resolveLost();
|
|
225
|
+
};
|
|
226
|
+
s.onLost.add(onLost);
|
|
227
|
+
const layer = {
|
|
228
|
+
sink,
|
|
229
|
+
get lost() {
|
|
230
|
+
return lost;
|
|
231
|
+
},
|
|
232
|
+
get count() {
|
|
233
|
+
return count;
|
|
234
|
+
},
|
|
235
|
+
render(width, height, size) {
|
|
236
|
+
if (destroyed || width <= 0 || height <= 0) return;
|
|
237
|
+
if (canvas.width !== width) canvas.width = width;
|
|
238
|
+
if (canvas.height !== height) canvas.height = height;
|
|
239
|
+
const k = sink.n;
|
|
240
|
+
if (k > capacity) {
|
|
241
|
+
capacity = hdrCapacityFor(k);
|
|
242
|
+
instances.destroy();
|
|
243
|
+
instances = device.createBuffer({
|
|
244
|
+
size: capacity * FPI * 4,
|
|
245
|
+
usage: GPUBufferUsage.VERTEX | GPUBufferUsage.COPY_DST
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
count = k;
|
|
249
|
+
uniformData[0] = width;
|
|
250
|
+
uniformData[1] = height;
|
|
251
|
+
uniformData[2] = size;
|
|
252
|
+
uniformData[3] = 0;
|
|
253
|
+
try {
|
|
254
|
+
device.queue.writeBuffer(uniform, 0, uniformData);
|
|
255
|
+
if (k) device.queue.writeBuffer(instances, 0, sink.data, 0, k * FPI);
|
|
256
|
+
const encoder = device.createCommandEncoder();
|
|
257
|
+
const pass = encoder.beginRenderPass({
|
|
258
|
+
colorAttachments: [
|
|
259
|
+
{
|
|
260
|
+
view: context.getCurrentTexture().createView(),
|
|
261
|
+
clearValue: { r: 0, g: 0, b: 0, a: 0 },
|
|
262
|
+
loadOp: "clear",
|
|
263
|
+
storeOp: "store"
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
});
|
|
267
|
+
if (k) {
|
|
268
|
+
pass.setPipeline(pipeline);
|
|
269
|
+
pass.setBindGroup(0, bindGroup);
|
|
270
|
+
pass.setVertexBuffer(0, instances);
|
|
271
|
+
pass.draw(6, k);
|
|
272
|
+
}
|
|
273
|
+
pass.end();
|
|
274
|
+
device.queue.submit([encoder.finish()]);
|
|
275
|
+
} catch {
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
destroy() {
|
|
279
|
+
if (destroyed && !held) return;
|
|
280
|
+
destroyed = true;
|
|
281
|
+
s.onLost.delete(onLost);
|
|
282
|
+
try {
|
|
283
|
+
context.unconfigure();
|
|
284
|
+
} catch {
|
|
285
|
+
}
|
|
286
|
+
try {
|
|
287
|
+
uniform.destroy();
|
|
288
|
+
instances.destroy();
|
|
289
|
+
} catch {
|
|
290
|
+
}
|
|
291
|
+
drop();
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
return layer;
|
|
295
|
+
} catch {
|
|
296
|
+
drop();
|
|
297
|
+
return null;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
export {
|
|
301
|
+
SUN_HDR_PEAK,
|
|
302
|
+
SUN_HDR_RESTARTS,
|
|
303
|
+
SUN_HDR_RESTART_MS,
|
|
304
|
+
createSunHdrSquares,
|
|
305
|
+
encodeExt,
|
|
306
|
+
encodeGlowChannel,
|
|
307
|
+
hdrCapacityFor,
|
|
308
|
+
srgbToLinear,
|
|
309
|
+
startSunHdr,
|
|
310
|
+
sunHdrAvailable
|
|
311
|
+
};
|
|
@@ -3,6 +3,8 @@ export type SwitchSize = "sm" | "md" | "lg";
|
|
|
3
3
|
export interface SwitchProps {
|
|
4
4
|
/** Called with the new value whenever the switch is activated. */
|
|
5
5
|
onCheckedChange?: (checked: boolean) => void;
|
|
6
|
+
/** A consumer `@change`, run once after the internal toggle. */
|
|
7
|
+
onChange?: (event: Event) => void;
|
|
6
8
|
/** Blocks interaction; excluded from form submission. Overridden by a surrounding FormField. */
|
|
7
9
|
disabled?: boolean;
|
|
8
10
|
/** Native `required`. Overridden by a surrounding FormField. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Switch.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const Switch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Switch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d5a3b899"]]);
|
|
5
5
|
export {
|
|
6
6
|
Switch as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, useTemplateRef, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, unref, nextTick } from "vue";
|
|
1
|
+
import { defineComponent, mergeModels, useAttrs, useModel, useTemplateRef, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, mergeProps, unref, nextTick } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { useField } from "../../internals/field.js";
|
|
4
4
|
import { sound } from "../../sound/sound.js";
|
|
@@ -8,6 +8,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8
8
|
__name: "Switch",
|
|
9
9
|
props: /* @__PURE__ */ mergeModels({
|
|
10
10
|
onCheckedChange: { type: Function },
|
|
11
|
+
onChange: { type: Function },
|
|
11
12
|
disabled: { type: Boolean, default: false },
|
|
12
13
|
required: { type: Boolean, default: false },
|
|
13
14
|
id: {},
|
|
@@ -23,6 +24,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
24
|
}),
|
|
24
25
|
emits: ["update:checked"],
|
|
25
26
|
setup(__props, { expose: __expose }) {
|
|
27
|
+
const attrs = useAttrs();
|
|
26
28
|
const checked = useModel(__props, "checked");
|
|
27
29
|
const el = useTemplateRef("ref");
|
|
28
30
|
__expose({ ref: el });
|
|
@@ -31,6 +33,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
33
|
const effectiveDisabled = computed(() => field?.disabled ?? __props.disabled);
|
|
32
34
|
const effectiveRequired = computed(() => field?.required ?? __props.required);
|
|
33
35
|
const effectiveInvalid = computed(() => field?.invalid ?? false);
|
|
36
|
+
function callListener(listener, ...args) {
|
|
37
|
+
if (Array.isArray(listener)) {
|
|
38
|
+
for (const fn of listener) if (typeof fn === "function") fn(...args);
|
|
39
|
+
} else if (typeof listener === "function") {
|
|
40
|
+
listener(...args);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
34
43
|
function handleChange(event) {
|
|
35
44
|
const input = event.currentTarget;
|
|
36
45
|
if (effectiveDisabled.value) {
|
|
@@ -41,6 +50,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
50
|
checked.value = next;
|
|
42
51
|
if (__props.sound) sound.play(next ? "toggle-on" : "toggle-off");
|
|
43
52
|
__props.onCheckedChange?.(next);
|
|
53
|
+
callListener(__props.onChange, event);
|
|
44
54
|
nextTick().then(() => {
|
|
45
55
|
input.checked = checked.value;
|
|
46
56
|
});
|
|
@@ -56,7 +66,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
66
|
return openBlock(), createElementBlock("label", {
|
|
57
67
|
class: normalizeClass(wrapperClasses.value)
|
|
58
68
|
}, [
|
|
59
|
-
createElementVNode("input", {
|
|
69
|
+
createElementVNode("input", mergeProps(unref(attrs), {
|
|
60
70
|
ref: "ref",
|
|
61
71
|
type: "checkbox",
|
|
62
72
|
role: "switch",
|
|
@@ -69,11 +79,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
79
|
disabled: effectiveDisabled.value,
|
|
70
80
|
required: effectiveRequired.value,
|
|
71
81
|
"aria-checked": checked.value,
|
|
72
|
-
"aria-invalid": effectiveInvalid.value ? "true" :
|
|
73
|
-
"aria-describedby": unref(field)?.describedBy,
|
|
74
|
-
"aria-label": __props.label,
|
|
82
|
+
"aria-invalid": effectiveInvalid.value ? "true" : unref(attrs)["aria-invalid"],
|
|
83
|
+
"aria-describedby": [unref(field)?.describedBy, unref(attrs)["aria-describedby"]].filter(Boolean).join(" ") || void 0,
|
|
84
|
+
"aria-label": __props.label ?? unref(attrs)["aria-label"],
|
|
75
85
|
onChange: handleChange
|
|
76
|
-
}, null,
|
|
86
|
+
}), null, 16, _hoisted_1),
|
|
77
87
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
78
88
|
], 2);
|
|
79
89
|
};
|
|
@@ -6,6 +6,12 @@ export interface TabsTriggerProps {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
/** Additional CSS classes. */
|
|
8
8
|
class?: HTMLAttributes["class"];
|
|
9
|
+
/** Called after the component's own handling, never while disabled. */
|
|
10
|
+
onClick?: ((event: MouseEvent) => void) | ((event: MouseEvent) => void)[];
|
|
11
|
+
/** Called after the component's own handling, never while disabled. */
|
|
12
|
+
onFocus?: ((event: FocusEvent) => void) | ((event: FocusEvent) => void)[];
|
|
13
|
+
/** Called after the component's own handling, never while disabled. */
|
|
14
|
+
onKeydown?: ((event: KeyboardEvent) => void) | ((event: KeyboardEvent) => void)[];
|
|
9
15
|
}
|
|
10
16
|
declare const _default: typeof __VLS_export;
|
|
11
17
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./TabsTrigger.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const TabsTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const TabsTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bea30724"]]);
|
|
5
5
|
export {
|
|
6
6
|
TabsTrigger as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, computed, onMounted, onBeforeUnmount, watch, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, useTemplateRef, computed, onMounted, onBeforeUnmount, watch, createElementBlock, openBlock, mergeProps, unref, renderSlot } from "vue";
|
|
2
|
+
import { callListener } from "../../internals/call-listener.js";
|
|
2
3
|
import { cn } from "../../utils.js";
|
|
3
4
|
import { TABS_KEY } from "./types.js";
|
|
4
5
|
const _hoisted_1 = ["data-value", "data-orientation", "data-variant", "id", "disabled", "aria-selected", "aria-controls", "tabindex"];
|
|
@@ -8,9 +9,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8
9
|
props: {
|
|
9
10
|
value: {},
|
|
10
11
|
disabled: { type: Boolean, default: false },
|
|
11
|
-
class: { type: [Boolean, null, String, Object, Array] }
|
|
12
|
+
class: { type: [Boolean, null, String, Object, Array] },
|
|
13
|
+
onClick: { type: [Function, Array] },
|
|
14
|
+
onFocus: { type: [Function, Array] },
|
|
15
|
+
onKeydown: { type: [Function, Array] }
|
|
12
16
|
},
|
|
13
17
|
setup(__props, { expose: __expose }) {
|
|
18
|
+
const attrs = useAttrs();
|
|
14
19
|
const el = useTemplateRef("el");
|
|
15
20
|
__expose({ ref: el });
|
|
16
21
|
const context = TABS_KEY.useOptional();
|
|
@@ -77,18 +82,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
82
|
},
|
|
78
83
|
{ flush: "post" }
|
|
79
84
|
);
|
|
80
|
-
function handleClick() {
|
|
85
|
+
function handleClick(event) {
|
|
81
86
|
if (isDisabled.value) return;
|
|
82
87
|
context?.select(__props.value);
|
|
83
88
|
context?.focus(__props.value);
|
|
84
89
|
el.value?.focus();
|
|
90
|
+
callListener(__props.onClick, event);
|
|
85
91
|
}
|
|
86
|
-
function handleFocus() {
|
|
92
|
+
function handleFocus(event) {
|
|
87
93
|
if (isDisabled.value) return;
|
|
88
94
|
context?.focus(__props.value);
|
|
95
|
+
callListener(__props.onFocus, event);
|
|
89
96
|
}
|
|
90
97
|
function handleKeydown(event) {
|
|
91
|
-
if (
|
|
98
|
+
if (isDisabled.value) return;
|
|
99
|
+
handleNavigationKey(event);
|
|
100
|
+
callListener(__props.onKeydown, event);
|
|
101
|
+
}
|
|
102
|
+
function handleNavigationKey(event) {
|
|
103
|
+
if (!context) return;
|
|
92
104
|
const horizontal = context.orientation === "horizontal";
|
|
93
105
|
switch (event.key) {
|
|
94
106
|
case "ArrowRight":
|
|
@@ -122,27 +134,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
122
134
|
}
|
|
123
135
|
}
|
|
124
136
|
return (_ctx, _cache) => {
|
|
125
|
-
return openBlock(), createElementBlock("button", {
|
|
137
|
+
return openBlock(), createElementBlock("button", mergeProps({
|
|
126
138
|
ref_key: "el",
|
|
127
139
|
ref: el,
|
|
140
|
+
onClick: handleClick,
|
|
141
|
+
onFocus: handleFocus,
|
|
142
|
+
onKeydown: handleKeydown
|
|
143
|
+
}, unref(attrs), {
|
|
128
144
|
type: "button",
|
|
129
145
|
role: "tab",
|
|
130
146
|
"data-ft-tabs-trigger": "",
|
|
131
147
|
"data-value": __props.value,
|
|
132
148
|
"data-orientation": orientation.value,
|
|
133
149
|
"data-variant": variant.value,
|
|
134
|
-
id: unref(context)?.triggerId(__props.value),
|
|
135
|
-
class:
|
|
150
|
+
id: unref(context)?.triggerId(__props.value) ?? unref(attrs).id,
|
|
151
|
+
class: classes.value,
|
|
136
152
|
disabled: isDisabled.value,
|
|
137
153
|
"aria-selected": isSelected.value,
|
|
138
|
-
"aria-controls": unref(context)?.panelId(__props.value),
|
|
139
|
-
tabindex: tabIndexAttr.value
|
|
140
|
-
|
|
141
|
-
onFocus: handleFocus,
|
|
142
|
-
onKeydown: handleKeydown
|
|
143
|
-
}, [
|
|
154
|
+
"aria-controls": unref(context)?.panelId(__props.value) ?? unref(attrs)["aria-controls"],
|
|
155
|
+
tabindex: tabIndexAttr.value ?? unref(attrs).tabindex
|
|
156
|
+
}), [
|
|
144
157
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
145
|
-
],
|
|
158
|
+
], 16, _hoisted_1);
|
|
146
159
|
};
|
|
147
160
|
}
|
|
148
161
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./TerminalBlock.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const TerminalBlock = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const TerminalBlock = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7c2a6f2a"]]);
|
|
5
5
|
export {
|
|
6
6
|
TerminalBlock as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, computed, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, useAttrs, useTemplateRef, computed, createElementBlock, openBlock, mergeProps, unref, createCommentVNode, createElementVNode, renderSlot, normalizeStyle, toDisplayString, Fragment, renderList, normalizeClass } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { useAutoscroll } from "../../internals/use-autoscroll.js";
|
|
4
4
|
import { parseAnsi } from "./ansi.js";
|
|
@@ -40,6 +40,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
40
|
class: { type: [Boolean, null, String, Object, Array] }
|
|
41
41
|
},
|
|
42
42
|
setup(__props, { expose: __expose }) {
|
|
43
|
+
const attrs = useAttrs();
|
|
43
44
|
const el = useTemplateRef("el");
|
|
44
45
|
__expose({ ref: el });
|
|
45
46
|
const log = useTemplateRef("log");
|
|
@@ -87,10 +88,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
87
88
|
return lines;
|
|
88
89
|
}
|
|
89
90
|
function segmentAttrs(segment) {
|
|
90
|
-
const
|
|
91
|
-
if (segment.bold)
|
|
92
|
-
if (segment.fg !== null)
|
|
93
|
-
return
|
|
91
|
+
const out = {};
|
|
92
|
+
if (segment.bold) out.class = "ft-bold";
|
|
93
|
+
if (segment.fg !== null) out.style = { color: colour(segment.fg) };
|
|
94
|
+
return out;
|
|
94
95
|
}
|
|
95
96
|
function colour(fg) {
|
|
96
97
|
if (fg === null) return void 0;
|
|
@@ -109,11 +110,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
109
110
|
return `${minutes}m ${seconds < 10 ? "0" : ""}${seconds}s`;
|
|
110
111
|
}
|
|
111
112
|
return (_ctx, _cache) => {
|
|
112
|
-
return openBlock(), createElementBlock("div", {
|
|
113
|
+
return openBlock(), createElementBlock("div", mergeProps(unref(attrs), {
|
|
113
114
|
ref_key: "el",
|
|
114
115
|
ref: el,
|
|
115
|
-
class:
|
|
116
|
-
}, [
|
|
116
|
+
class: unref(cn)("ft-terminal overflow-hidden rounded-lg font-mono text-sm", __props.class)
|
|
117
|
+
}), [
|
|
117
118
|
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
118
119
|
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
119
120
|
])) : createCommentVNode("", true),
|
|
@@ -149,7 +150,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
149
150
|
createElementVNode("span", null, "exited " + toDisplayString(__props.exitCode), 1),
|
|
150
151
|
duration.value ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(duration.value), 1)) : createCommentVNode("", true)
|
|
151
152
|
], 2)) : createCommentVNode("", true)
|
|
152
|
-
],
|
|
153
|
+
], 16);
|
|
153
154
|
};
|
|
154
155
|
}
|
|
155
156
|
});
|
|
@@ -38,7 +38,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38
38
|
isMouseOver.value = true;
|
|
39
39
|
}
|
|
40
40
|
function touchMoveHandler(event) {
|
|
41
|
-
event.preventDefault();
|
|
42
41
|
const card = cardRef.value;
|
|
43
42
|
if (card) {
|
|
44
43
|
const rect = card.getBoundingClientRect();
|
|
@@ -52,7 +51,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
51
|
ref: cardRef,
|
|
53
52
|
class: normalizeClass(
|
|
54
53
|
unref(cn)(
|
|
55
|
-
"relative w-full max-w-[40rem] overflow-hidden rounded-lg border border-white/[0.08] bg-[#1d1c20] p-4 sm:p-6 md:p-8",
|
|
54
|
+
"relative w-full max-w-[40rem] touch-pan-y touch-pinch-zoom overflow-hidden rounded-lg border border-white/[0.08] bg-[#1d1c20] p-4 sm:p-6 md:p-8",
|
|
56
55
|
__props.class
|
|
57
56
|
)
|
|
58
57
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Textarea.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const Textarea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Textarea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8739af06"]]);
|
|
5
5
|
export {
|
|
6
6
|
Textarea as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, computed, useTemplateRef, onMounted, watch, createElementBlock, openBlock, createElementVNode, createCommentVNode,
|
|
1
|
+
import { defineComponent, mergeModels, useModel, computed, useAttrs, useTemplateRef, onMounted, watch, createElementBlock, openBlock, createElementVNode, createCommentVNode, mergeProps, unref, toDisplayString } from "vue";
|
|
2
2
|
import { cn } from "../../utils.js";
|
|
3
3
|
import { useField } from "../../internals/field.js";
|
|
4
|
+
import { mergeIds } from "../../internals/merge-ids.js";
|
|
4
5
|
import { useFancyId } from "../../internals/use-id.js";
|
|
5
6
|
const _hoisted_1 = { class: "ft-textarea-wrapper flex w-full flex-col gap-1.5" };
|
|
6
7
|
const _hoisted_2 = ["id", "placeholder", "name", "autocomplete", "rows", "maxlength", "disabled", "readonly", "required", "aria-invalid", "aria-describedby", "aria-label", "value"];
|
|
@@ -37,13 +38,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
37
38
|
const effectiveDisabled = computed(() => field?.disabled ?? __props.disabled);
|
|
38
39
|
const effectiveRequired = computed(() => field?.required ?? __props.required);
|
|
39
40
|
const effectiveInvalid = computed(() => field?.invalid ?? __props.invalid);
|
|
41
|
+
const attrs = useAttrs();
|
|
42
|
+
const ariaLabelResolved = () => {
|
|
43
|
+
const own = __props.label;
|
|
44
|
+
return own ?? attrs["aria-label"];
|
|
45
|
+
};
|
|
46
|
+
const ariaInvalidResolved = () => effectiveInvalid.value ? "true" : attrs["aria-invalid"];
|
|
47
|
+
const consumerDescribedBy = () => attrs["aria-describedby"];
|
|
40
48
|
const uid = useFancyId();
|
|
41
49
|
const countId = `${uid}-count`;
|
|
42
50
|
const count = computed(() => value.value.length);
|
|
43
51
|
const atLimit = computed(() => __props.maxlength != null && count.value >= __props.maxlength);
|
|
44
|
-
const describedBy =
|
|
45
|
-
() => [field?.describedBy, __props.showCount ? countId : void 0].filter(Boolean).join(" ") || void 0
|
|
46
|
-
);
|
|
52
|
+
const describedBy = () => mergeIds(field?.describedBy, consumerDescribedBy(), __props.showCount ? countId : void 0);
|
|
47
53
|
const classes = computed(
|
|
48
54
|
() => cn(
|
|
49
55
|
"ft-textarea w-full rounded-[8px] border border-input bg-background px-[12px] py-[10px] text-[13px] leading-[1.5] text-foreground transition-colors",
|
|
@@ -102,9 +108,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
102
108
|
);
|
|
103
109
|
return (_ctx, _cache) => {
|
|
104
110
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
105
|
-
createElementVNode("textarea", {
|
|
111
|
+
createElementVNode("textarea", mergeProps({
|
|
106
112
|
ref_key: "el",
|
|
107
113
|
ref: el,
|
|
114
|
+
onInput: handleInput
|
|
115
|
+
}, unref(attrs), {
|
|
108
116
|
id: effectiveId.value,
|
|
109
117
|
placeholder: __props.placeholder,
|
|
110
118
|
name: __props.name,
|
|
@@ -114,13 +122,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
114
122
|
disabled: effectiveDisabled.value,
|
|
115
123
|
readonly: __props.readonly,
|
|
116
124
|
required: effectiveRequired.value,
|
|
117
|
-
"aria-invalid":
|
|
118
|
-
"aria-describedby": describedBy
|
|
119
|
-
"aria-label":
|
|
120
|
-
class:
|
|
121
|
-
value: value.value
|
|
122
|
-
|
|
123
|
-
}, null, 42, _hoisted_2),
|
|
125
|
+
"aria-invalid": ariaInvalidResolved(),
|
|
126
|
+
"aria-describedby": describedBy(),
|
|
127
|
+
"aria-label": ariaLabelResolved(),
|
|
128
|
+
class: classes.value,
|
|
129
|
+
value: value.value
|
|
130
|
+
}), null, 16, _hoisted_2),
|
|
124
131
|
__props.showCount ? (openBlock(), createElementBlock("span", {
|
|
125
132
|
key: 0,
|
|
126
133
|
id: countId,
|