@mkbabb/glass-ui 3.13.0 → 4.0.1
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/README.md +3 -1
- package/dist/CardAction-CW7a0m8M.js +253 -0
- package/dist/{CommandShortcut-RowNEO6i.js → CommandShortcut-DvZNQ_HF.js} +58 -53
- package/dist/ConfiguratorRow-BR4l-ixA.js +143 -0
- package/dist/{ContextMenuContent-CT3AS1WX.js → ContextMenuContent-uWnVxDab.js} +1 -1
- package/dist/{ContextMenuSubContent-BQmxTAdw.js → ContextMenuSubContent-xol4sD2q.js} +32 -37
- package/dist/{DataTable-BCddn3T3.js → DataTable-CuKwF7wr.js} +99 -97
- package/dist/DialogContent-DcKK8k9i.js +103 -0
- package/dist/{DialogFooter-Blu4t7tJ.js → DialogFooter-BZNX5aVr.js} +3 -3
- package/dist/FadingScroll-DI6hQhT9.js +76 -0
- package/dist/{HoverCardContent-Csywg3YF.js → HoverCardContent-b2uaAMRR.js} +1 -1
- package/dist/{HoverPopover-CISOJQuZ.js → HoverPopover-CbqbNwgU.js} +2 -2
- package/dist/IconChip-BTD-nay5.js +55 -0
- package/dist/{IconTooltip-DPzE09X9.js → IconTooltip-Bl8gFZ8d.js} +1 -1
- package/dist/{Input-DWQQIOC4.js → Input-h9v5LeXf.js} +1 -1
- package/dist/{MetricBadge-C9QMz1KT.js → MetricBadge-RHdBP72w.js} +1 -1
- package/dist/Notification-VUwexFUf.js +43 -0
- package/dist/NumberFieldContent-Cq7EzX-U.js +138 -0
- package/dist/PopoverContent-DL7E6vJP.js +127 -0
- package/dist/{Progress-DwlUKGbr.js → Progress-DctG61iZ.js} +98 -78
- package/dist/{ScrollingText-DfFrwSph.js → ScrollingText-yOpBzFYq.js} +2 -2
- package/dist/{SelectScrollDownButton-CiDUxfEj.js → SelectScrollDownButton-CrA8F0iV.js} +35 -20
- package/dist/{Switch-CsIuYP_e.js → Switch-CwYNf8bo.js} +1 -1
- package/dist/Toaster-Bw4xR8xV.js +274 -0
- package/dist/{ToggleGroupItem-D_AHlRw9.js → ToggleGroupItem-pEM9vIhs.js} +50 -37
- package/dist/{TooltipProvider-B3MkB_8P.js → TooltipProvider-rzvnXz60.js} +1 -1
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +16 -8
- package/dist/api/types-extra.d.ts +6 -0
- package/dist/api.js +2 -2
- package/dist/aurora.js +888 -230
- package/dist/badge.js +1 -1
- package/dist/border-progress.d.ts +1 -0
- package/dist/border-progress.js +106 -0
- package/dist/button-DYCUa-tH.js +126 -0
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -2
- package/dist/card.js +2 -2
- package/dist/carousel.d.ts +1 -1
- package/dist/carousel.js +90 -151
- package/dist/collapsible.js +1 -1
- package/dist/color-swatch.d.ts +1 -0
- package/dist/color-swatch.js +47 -0
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/compile-CQEFRTmx.js +19 -0
- package/dist/components/custom/aurora/composables/atoms-fields.d.ts +39 -0
- package/dist/components/custom/aurora/composables/auroraFallbackGround.d.ts +108 -0
- package/dist/components/custom/aurora/composables/runtime.d.ts +19 -0
- package/dist/components/custom/aurora/composables/uniformBridge.d.ts +5 -1
- package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +51 -0
- package/dist/components/custom/aurora/composables/wgpuSetup.d.ts +29 -0
- package/dist/components/custom/aurora/constants/budget.d.ts +21 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +30 -2
- package/dist/components/custom/aurora/constants/renderMode.d.ts +63 -10
- package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/oil-modes.glsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/procedural-color.wgsl.d.ts +4 -0
- package/dist/components/custom/aurora/index.d.ts +3 -2
- package/dist/components/custom/border-progress/BorderProgress.vue.d.ts +46 -0
- package/dist/components/custom/border-progress/composables/useBorderSpectrum.d.ts +22 -0
- package/dist/components/custom/border-progress/constants.d.ts +59 -0
- package/dist/components/custom/border-progress/index.d.ts +4 -0
- package/dist/components/custom/color-swatch/ColorSwatch.vue.d.ts +22 -0
- package/dist/components/custom/color-swatch/index.d.ts +1 -0
- package/dist/components/custom/concentric/Concentric.vue.d.ts +39 -0
- package/dist/components/custom/concentric/composables/concentricGLSetup.d.ts +11 -0
- package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +13 -0
- package/dist/components/custom/concentric/composables/ringField.d.ts +44 -0
- package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +13 -0
- package/dist/components/custom/concentric/composables/useConcentric.d.ts +35 -0
- package/dist/components/custom/concentric/constants.d.ts +43 -0
- package/dist/components/custom/concentric/index.d.ts +5 -0
- package/dist/components/custom/concentric/shaders/concentric.glsl.d.ts +4 -0
- package/dist/components/custom/concentric/shaders/concentric.wgsl.d.ts +1 -0
- package/dist/components/custom/configurator/Configurator.vue.d.ts +19 -8
- package/dist/components/custom/constellation/Constellation.vue.d.ts +18 -206
- package/dist/components/custom/constellation/composables/useConstellation.d.ts +26 -0
- package/dist/components/custom/constellation/constellationField.d.ts +2 -369
- package/dist/components/custom/constellation/constellationTypes.d.ts +369 -0
- package/dist/components/custom/constellation/index.d.ts +1 -1
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +13 -4
- package/dist/components/custom/dock/DockLayerGroup.vue.d.ts +10 -2
- package/dist/components/custom/dock/DockRail.vue.d.ts +17 -16
- package/dist/components/custom/dock/DockSection.vue.d.ts +69 -0
- package/dist/components/custom/dock/DockSeparator.vue.d.ts +49 -1
- package/dist/components/custom/dock/DockTabButton.vue.d.ts +5 -5
- package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +75 -0
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +13 -0
- package/dist/components/custom/dock/constants.d.ts +35 -0
- package/dist/components/custom/dock/index.d.ts +2 -0
- package/dist/components/custom/dot-flow-field/DotFlowField.vue.d.ts +38 -0
- package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +41 -0
- package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +24 -0
- package/dist/components/custom/dot-flow-field/composables/useDotFlowField.d.ts +34 -0
- package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +18 -0
- package/dist/components/custom/dot-flow-field/constants.d.ts +48 -0
- package/dist/components/custom/dot-flow-field/index.d.ts +5 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.compute.wgsl.d.ts +1 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.glsl.d.ts +20 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +1 -0
- package/dist/components/custom/easing/EasingConfigurator.vue.d.ts +33 -0
- package/dist/components/custom/easing/EasingPicker.vue.d.ts +49 -0
- package/dist/components/custom/easing/composables/useEasingPicker.d.ts +75 -0
- package/dist/components/custom/easing/constants.d.ts +28 -0
- package/dist/components/custom/easing/index.d.ts +3 -0
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +10 -0
- package/dist/components/custom/fading-scroll/FadingScroll.vue.d.ts +25 -0
- package/dist/components/custom/fading-scroll/composables/useFadingScroll.d.ts +31 -0
- package/dist/components/custom/fading-scroll/constants.d.ts +19 -0
- package/dist/components/custom/fading-scroll/index.d.ts +2 -0
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +19 -2
- package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +39 -0
- package/dist/components/custom/fourier-field/constants.d.ts +7 -0
- package/dist/components/custom/fourier-field/index.d.ts +1 -1
- package/dist/components/custom/fourier-field/math.d.ts +17 -0
- package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +9 -1
- package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +4 -2
- package/dist/components/custom/goo-blob/composables/uniformBridgeWGPU.d.ts +24 -0
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +29 -12
- package/dist/components/custom/goo-blob/composables/wgpuSetup.d.ts +23 -0
- package/dist/components/custom/goo-blob/constants.d.ts +6 -1
- package/dist/components/custom/goo-blob/shaders/metaball.wgsl.d.ts +1 -0
- package/dist/components/custom/handmark/HandMark.vue.d.ts +29 -0
- package/dist/components/custom/handmark/brush.d.ts +269 -0
- package/dist/components/custom/handmark/composables/useHandMark.d.ts +89 -0
- package/dist/components/custom/handmark/constants.d.ts +39 -0
- package/dist/components/custom/handmark/freehand.d.ts +69 -0
- package/dist/components/custom/handmark/geometry.d.ts +52 -0
- package/dist/components/custom/handmark/index.d.ts +27 -0
- package/dist/components/custom/handmark/ink.d.ts +11 -0
- package/dist/components/custom/handmark/texture.d.ts +39 -0
- package/dist/components/custom/handmark/types.d.ts +62 -0
- package/dist/components/custom/icon-chip/IconChip.vue.d.ts +4 -0
- package/dist/components/custom/icon-chip/index.d.ts +2 -0
- package/dist/components/custom/icon-chip/types.d.ts +82 -0
- package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +17 -2
- package/dist/components/custom/metric-stack/MetricStack.vue.d.ts +1 -1
- package/dist/components/custom/pager-dots/PagerDots.vue.d.ts +39 -0
- package/dist/components/custom/pager-dots/index.d.ts +2 -0
- package/dist/components/custom/spa-view/SpaView.vue.d.ts +50 -0
- package/dist/components/custom/spa-view/index.d.ts +2 -0
- package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +29 -24
- package/dist/components/custom/tabs/composables/useTabDragMorph.d.ts +42 -0
- package/dist/components/custom/tabs/composables/useTabIndicator.d.ts +30 -21
- package/dist/components/custom/tabs/constants.d.ts +9 -3
- package/dist/components/custom/tabs/index.d.ts +1 -1
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +15 -1
- package/dist/components/ui/_shared/index.d.ts +2 -0
- package/dist/components/ui/_shared/menuItemVariants.d.ts +19 -0
- package/dist/components/ui/_shared/useSurfaceAxis.d.ts +41 -0
- package/dist/components/ui/badge/index.d.ts +1 -1
- package/dist/components/ui/button/Button.vue.d.ts +5 -2
- package/dist/components/ui/button/index.d.ts +2 -2
- package/dist/components/ui/card/Card.vue.d.ts +34 -4
- package/dist/components/ui/card/CardHeader.vue.d.ts +42 -16
- package/dist/components/ui/card/ScrollCard.vue.d.ts +33 -0
- package/dist/components/ui/card/ScrollCardHeader.vue.d.ts +17 -0
- package/dist/components/ui/card/index.d.ts +2 -0
- package/dist/components/ui/carousel/CarouselNext.vue.d.ts +2 -2
- package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +2 -2
- package/dist/components/ui/carousel/GlassCarouselPager.vue.d.ts +2 -2
- package/dist/components/ui/carousel/index.d.ts +0 -1
- package/dist/components/ui/command/Command.vue.d.ts +4 -1
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +8 -3
- package/dist/components/ui/drawer/Drawer.vue.d.ts +46 -33
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +12 -8
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +2 -2
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +1 -1
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +2 -2
- package/dist/components/ui/drawer/composables/drawerSnapContext.d.ts +26 -0
- package/dist/components/ui/drawer/composables/useDrawerSnap.d.ts +17 -0
- package/dist/components/ui/drawer/constants.d.ts +45 -0
- package/dist/components/ui/drawer/index.d.ts +23 -15
- package/dist/components/ui/focus-scope/FocusScope.vue.d.ts +20 -0
- package/dist/components/ui/focus-scope/index.d.ts +2 -0
- package/dist/components/ui/index.d.ts +1 -1
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +3 -0
- package/dist/components/ui/progress/ProgressDefault.vue.d.ts +3 -2
- package/dist/components/ui/progress/ProgressSectioned.vue.d.ts +14 -3
- package/dist/components/ui/select/SelectContent.vue.d.ts +1 -1
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +27 -4
- package/dist/components/ui/sheet/SheetContent.vue.d.ts +6 -0
- package/dist/components/ui/sheet/index.d.ts +1 -1
- package/dist/components/ui/skeleton/Skeleton.vue.d.ts +3 -0
- package/dist/components/ui/tags-input/TagsInput.vue.d.ts +2 -2
- package/dist/components/ui/toast/Toast.vue.d.ts +5 -2
- package/dist/components/ui/toast/use-toast.d.ts +14 -0
- package/dist/components/ui/toggle/Toggle.vue.d.ts +1 -1
- package/dist/composables/dark/index.d.ts +1 -1
- package/dist/composables/dark/useGlobalDark.d.ts +23 -1
- package/dist/composables/glass/canvas2d/useCanvas2D.d.ts +13 -6
- package/dist/composables/glass/index.d.ts +5 -2
- package/dist/composables/glass/useSpecularPointer.d.ts +33 -0
- package/dist/composables/glass/useSpecularTracking.d.ts +20 -0
- package/dist/composables/glass/vSpecular.d.ts +2 -0
- package/dist/composables/glass/webgl/shaders/flow.glsl.d.ts +1 -0
- package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +16 -0
- package/dist/composables/glass/webgpu/index.d.ts +2 -0
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +54 -0
- package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +84 -0
- package/dist/composables/motion/core/index.d.ts +1 -0
- package/dist/composables/motion/index.d.ts +4 -0
- package/dist/composables/motion/useDockCtaReceive.d.ts +59 -0
- package/dist/composables/motion/useDragMorph.d.ts +77 -0
- package/dist/composables/motion/useLiquidFlex.d.ts +11 -0
- package/dist/composables/motion/useLiquidPress.d.ts +71 -0
- package/dist/composables/motion/useLiquidReveal.d.ts +51 -0
- package/dist/composables/motion/useNumericTransition.d.ts +3 -3
- package/dist/composables/motion/usePointerVelocityField.d.ts +98 -0
- package/dist/composables/motion/useViewTransition.d.ts +36 -1
- package/dist/concentric.d.ts +1 -0
- package/dist/concentric.js +562 -0
- package/dist/configurator.js +3 -2
- package/dist/confirm-dialog.js +22 -24
- package/dist/constellation.js +93 -95
- package/dist/context-menu.js +3 -3
- package/dist/controls.js +10 -4
- package/dist/createCanvasLifecycle-CHD5XrDW.js +82 -0
- package/dist/dark.d.ts +1 -1
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dock.js +738 -442
- package/dist/{dockContext-BegmJVmx.js → dockContext-BNfyPLe9.js} +1 -1
- package/dist/dom.js +5 -5
- package/dist/dot-flow-field.d.ts +1 -0
- package/dist/dot-flow-field.js +604 -0
- package/dist/drawer.d.ts +1 -0
- package/dist/drawer.js +380 -0
- package/dist/{dropdown-menu-DzkkyBwX.js → dropdown-menu-CofSZuk8.js} +14 -15
- package/dist/dropdown-menu.js +1 -1
- package/dist/easing.d.ts +1 -0
- package/dist/easing.js +463 -0
- package/dist/expandable-container.js +45 -38
- package/dist/fading-scroll.d.ts +1 -0
- package/dist/fading-scroll.js +2 -0
- package/dist/focus-scope.d.ts +1 -0
- package/dist/focus-scope.js +23 -0
- package/dist/forms.js +7 -7
- package/dist/fourier-field.js +135 -122
- package/dist/fourier-math.js +2 -2
- package/dist/glass-panel.js +39 -36
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +154 -362
- package/dist/goo-blob.js +838 -227
- package/dist/handmark.d.ts +1 -0
- package/dist/handmark.js +707 -0
- package/dist/header-ribbon.js +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/hover-popover.js +1 -1
- package/dist/icon-chip.d.ts +1 -0
- package/dist/icon-chip.js +2 -0
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/instrument-chassis.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +6 -6
- package/dist/{math-U6-RrLmV.js → math-BINYmg5z.js} +11 -3
- package/dist/{menuItemVariants-DPiEarb0.js → menuItemVariants-D8VNHq22.js} +10 -4
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +25 -22
- package/dist/metric-stack.js +4 -8
- package/dist/motion-core.js +36 -35
- package/dist/motion-curves.js +1 -1
- package/dist/motion.js +157 -55
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.d.ts +1 -0
- package/dist/pager-dots.js +91 -0
- package/dist/paper-backdrop.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/{presets-BKVyQfbt.js → presets-BW2b-fr1.js} +14 -1
- package/dist/{compile-B7NGOBcP.js → procedural-color.glsl-CIFsJhwI.js} +1 -155
- package/dist/procedural-color.wgsl-CToRHugY.js +224 -0
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +2 -2
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +10 -12
- package/dist/select.js +3 -3
- package/dist/separator.js +1 -1
- package/dist/sheet-tZMg0E0w.js +218 -0
- package/dist/sheet.js +1 -1
- package/dist/{slider-B-JP2JlI.js → slider-DVb4HXU-.js} +7 -7
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +3 -3
- package/dist/spa-view.d.ts +1 -0
- package/dist/spa-view.js +46 -0
- package/dist/styles/animations.css +40 -31
- package/dist/styles/border-progress.css +109 -0
- package/dist/styles/cards.css +76 -0
- package/dist/styles/components.css +1 -1
- package/dist/styles/configurator.css +35 -0
- package/dist/styles/critical-partition.mjs +140 -0
- package/dist/styles/critical.css +12 -0
- package/dist/styles/deferred.css +31 -0
- package/dist/styles/dock/density.css +64 -0
- package/dist/styles/dock/layers.css +54 -30
- package/dist/styles/dock/morph.css +124 -7
- package/dist/styles/dock/overflow.css +31 -2
- package/dist/styles/dock/rail-extend.css +168 -71
- package/dist/styles/dock/section.css +59 -0
- package/dist/styles/dock/shell.css +83 -16
- package/dist/styles/dock-controls/icon-button.css +11 -1
- package/dist/styles/dock-controls/tab-button.css +24 -83
- package/dist/styles/dock-controls/triggers.css +7 -0
- package/dist/styles/dock.css +38 -3
- package/dist/styles/drawer.css +127 -35
- package/dist/styles/feedback-tone.css +104 -0
- package/dist/styles/glass/deep.css +44 -0
- package/dist/styles/glass/ladder.css +154 -52
- package/dist/styles/glass/material.css +78 -15
- package/dist/styles/glass/reveal.css +136 -0
- package/dist/styles/glass/rim.css +100 -0
- package/dist/styles/glass/surface-axis.css +113 -0
- package/dist/styles/glass/surfaces.css +189 -15
- package/dist/styles/glass-refract.css +96 -44
- package/dist/styles/glass-specular-track.css +7 -0
- package/dist/styles/glass.css +8 -2
- package/dist/styles/hover-popover.css +7 -6
- package/dist/styles/icon-chip.css +211 -0
- package/dist/styles/index.css +78 -4
- package/dist/styles/instrument-chassis.css +107 -2
- package/dist/styles/menu.css +127 -0
- package/dist/styles/scroll-choreography.css +300 -0
- package/dist/styles/segmented-tabs.css +188 -86
- package/dist/styles/select.css +50 -0
- package/dist/styles/theme/bridges.css +22 -1
- package/dist/styles/theme/literals.css +11 -2
- package/dist/styles/theme/radius.css +6 -1
- package/dist/styles/tokens/color-radius.css +40 -13
- package/dist/styles/tokens/dark-arm.css +200 -20
- package/dist/styles/tokens/glass-deep.css +75 -0
- package/dist/styles/tokens/glass-fx.css +333 -0
- package/dist/styles/tokens/glass.css +95 -315
- package/dist/styles/tokens/light-dark.css +64 -22
- package/dist/styles/tokens/offsets.css +116 -0
- package/dist/styles/tokens/on-glass-fg.css +39 -0
- package/dist/styles/tokens/property-regs.css +130 -10
- package/dist/styles/tokens/scale-paper.css +155 -84
- package/dist/styles/tokens/scheme-motion.css +102 -46
- package/dist/styles/tokens/scroll-tokens.css +123 -0
- package/dist/styles/tokens/{offsets-sizing.css → sizing.css} +88 -89
- package/dist/styles/tokens.css +9 -3
- package/dist/styles/transitions.css +7 -7
- package/dist/styles/typography/scale.css +153 -0
- package/dist/styles/typography/semantic.css +220 -0
- package/dist/styles/typography/utilities.css +174 -0
- package/dist/styles/typography.css +23 -507
- package/dist/styles/utilities/a11y-overrides.css +33 -4
- package/dist/styles/utilities/animate.css +27 -24
- package/dist/styles/utilities/base-misc.css +255 -0
- package/dist/styles/utilities/base.css +100 -138
- package/dist/styles/utilities/btn.css +21 -202
- package/dist/styles/utilities/metal.css +189 -0
- package/dist/styles/utilities.css +14 -7
- package/dist/styles/view-transition.css +4 -1
- package/dist/switch.js +1 -1
- package/dist/tabs.js +275 -191
- package/dist/timeline.js +2 -2
- package/dist/toast.js +1 -1
- package/dist/toggle-chip.js +3 -1
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{useAnimatedNumber-C5I3wWd8.js → useAnimatedNumber-BfUq2bUM.js} +1 -1
- package/dist/useCanvas2D-B8w_E3Rr.js +83 -0
- package/dist/useConfiguratorState-DNlOh6c8.js +161 -0
- package/dist/useDragMorph-DgxnsVJz.js +102 -0
- package/dist/{useGlobalDark-yhL4Wp-s.js → useGlobalDark-C28t0VWJ.js} +22 -3
- package/dist/useLiquidPress-kfb4KX79.js +39 -0
- package/dist/usePointerVelocityField-JbRd5CrM.js +137 -0
- package/dist/{useRAFLoop-Bxv0o6L5.js → useRAFLoop-UYa4zoiN.js} +1 -1
- package/dist/useSpring-C0jyvEJB.js +40 -0
- package/dist/useSpringMount-q1amq1SJ.js +71 -0
- package/dist/useSpringPress-BsqPr7FJ.js +34 -0
- package/dist/useSurfaceAxis-g0NloYEF.js +7 -0
- package/dist/{useTouchGate-Dg7MQI1G.js → useTouchGate-CBZTD4SD.js} +1 -1
- package/dist/vReveal-Czsb7zQC.js +10 -0
- package/dist/vSpecular-CQFmLNzA.js +68 -0
- package/dist/vendor-CKmzio-i.js +226 -0
- package/dist/watercolor-dot.js +12 -5
- package/package.json +193 -25
- package/src/styles/animations.css +40 -31
- package/src/styles/border-progress.css +109 -0
- package/src/styles/cards.css +76 -0
- package/src/styles/configurator.css +35 -0
- package/src/styles/critical-partition.mjs +140 -0
- package/src/styles/dock/density.css +64 -0
- package/src/styles/dock/layers.css +54 -30
- package/src/styles/dock/morph.css +124 -7
- package/src/styles/dock/overflow.css +31 -2
- package/src/styles/dock/rail-extend.css +168 -71
- package/src/styles/dock/section.css +59 -0
- package/src/styles/dock/shell.css +83 -16
- package/src/styles/dock-controls/icon-button.css +11 -1
- package/src/styles/dock-controls/tab-button.css +24 -83
- package/src/styles/dock-controls/triggers.css +7 -0
- package/src/styles/dock.css +38 -3
- package/src/styles/drawer.css +123 -35
- package/src/styles/feedback-tone.css +104 -0
- package/src/styles/glass/deep.css +44 -0
- package/src/styles/glass/ladder.css +154 -52
- package/src/styles/glass/material.css +78 -15
- package/src/styles/glass/reveal.css +136 -0
- package/src/styles/glass/rim.css +100 -0
- package/src/styles/glass/surface-axis.css +113 -0
- package/src/styles/glass/surfaces.css +189 -15
- package/src/styles/glass-refract.css +96 -44
- package/src/styles/glass-specular-track.css +7 -0
- package/src/styles/glass.css +8 -2
- package/src/styles/hover-popover.css +7 -6
- package/src/styles/icon-chip.css +211 -0
- package/src/styles/index.css +78 -4
- package/src/styles/instrument-chassis.css +107 -2
- package/src/styles/menu.css +127 -0
- package/src/styles/scroll-choreography.css +300 -0
- package/src/styles/segmented-tabs.css +184 -84
- package/src/styles/select.css +50 -0
- package/src/styles/theme/bridges.css +22 -1
- package/src/styles/theme/literals.css +11 -2
- package/src/styles/theme/radius.css +6 -1
- package/src/styles/tokens/color-radius.css +40 -13
- package/src/styles/tokens/dark-arm.css +200 -20
- package/src/styles/tokens/glass-deep.css +75 -0
- package/src/styles/tokens/glass-fx.css +333 -0
- package/src/styles/tokens/glass.css +95 -315
- package/src/styles/tokens/light-dark.css +64 -22
- package/src/styles/tokens/offsets.css +116 -0
- package/src/styles/tokens/on-glass-fg.css +39 -0
- package/src/styles/tokens/property-regs.css +130 -10
- package/src/styles/tokens/scale-paper.css +155 -84
- package/src/styles/tokens/scheme-motion.css +102 -46
- package/src/styles/tokens/scroll-tokens.css +123 -0
- package/src/styles/tokens/{offsets-sizing.css → sizing.css} +88 -89
- package/src/styles/tokens.css +9 -3
- package/src/styles/transitions.css +7 -7
- package/src/styles/typography/scale.css +153 -0
- package/src/styles/typography/semantic.css +220 -0
- package/src/styles/typography/utilities.css +174 -0
- package/src/styles/typography.css +23 -507
- package/src/styles/utilities/a11y-overrides.css +33 -4
- package/src/styles/utilities/animate.css +27 -24
- package/src/styles/utilities/base-misc.css +255 -0
- package/src/styles/utilities/base.css +100 -138
- package/src/styles/utilities/btn.css +21 -202
- package/src/styles/utilities/metal.css +189 -0
- package/src/styles/utilities.css +14 -7
- package/src/styles/view-transition.css +4 -1
- package/dist/CardAction-Cj2eycQ2.js +0 -157
- package/dist/DialogContent-Dl9WkAoS.js +0 -100
- package/dist/Notification-DdwNxIrI.js +0 -100
- package/dist/NumberFieldContent-CqaN-SvN.js +0 -145
- package/dist/PopoverContent-BYwt2-4x.js +0 -121
- package/dist/TabsList-Dttss653.js +0 -105
- package/dist/Toaster-D6q4HtXu.js +0 -263
- package/dist/button-ChXMfsud.js +0 -81
- package/dist/check-njhk-vfu.js +0 -7
- package/dist/chevron-down-DKkxb4VV.js +0 -7
- package/dist/chevron-right-CPXbqQQz.js +0 -7
- package/dist/chevron-up-n_24SqI-.js +0 -7
- package/dist/components/custom/underline/GlassUnderline.vue.d.ts +0 -84
- package/dist/components/custom/underline/index.d.ts +0 -2
- package/dist/components/custom/underline/types.d.ts +0 -56
- package/dist/components/ui/carousel/CarouselDots.vue.d.ts +0 -4
- package/dist/createLucideIcon-DydS2qgk.js +0 -43
- package/dist/minimize-2-BV31Ob_h.js +0 -38
- package/dist/search-BSGrf2Sk.js +0 -12
- package/dist/sheet-1fChZjtw.js +0 -214
- package/dist/underline.d.ts +0 -1
- package/dist/underline.js +0 -85
- package/dist/useCanvas2D-ClrQuZtp.js +0 -96
- package/dist/useConfiguratorState-DAoeHVue.js +0 -287
- package/dist/useSpecularTracking-Bo5su68i.js +0 -32
- package/dist/useSpringMount-CI2jOstM.js +0 -108
- package/dist/vReveal-CqaCz_mC.js +0 -44
- package/dist/x-BUwTKe50.js +0 -10
- /package/dist/{CollapsibleContent-CP9qF1v4.js → CollapsibleContent-68dEXIAl.js} +0 -0
- /package/dist/{InstrumentChassis-UUJX0-mW.js → InstrumentChassis-Bx0F_q5g.js} +0 -0
- /package/dist/{Label-r3WzWrsj.js → Label-C2ejNWeC.js} +0 -0
- /package/dist/{ModalOverlay-DVLI2VRr.js → ModalOverlay-D1VrWyoi.js} +0 -0
- /package/dist/{PaperBackdrop-DIXTtVq6.js → PaperBackdrop-Vf3tlpvd.js} +0 -0
- /package/dist/{SelectGroup-aumMgWLs.js → SelectGroup-DwwjicPY.js} +0 -0
- /package/dist/{SelectSeparator-BQ_1Fcbp.js → SelectSeparator-DXswVdRz.js} +0 -0
- /package/dist/{Separator-0JE6LtNu.js → Separator-pKF0oA4M.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-ok8pgSl5.js → _plugin-vue_export-helper-C1je1s0u.js} +0 -0
- /package/dist/{badge-UILT_3pZ.js → badge-D9XWW4GT.js} +0 -0
- /package/dist/{color-CUYeFbgd.js → color-DweYl7pE.js} +0 -0
- /package/dist/{constants-CS75AWHG.js → constants-BPOqYJAm.js} +0 -0
- /package/dist/{createContext-BM46COQ-.js → createContext-CpBNTRMI.js} +0 -0
- /package/dist/{prng-D27-B3tK.js → prng-Za0Rmgag.js} +0 -0
- /package/dist/{resolveCanvasColor-BBiYfp8g.js → resolveCanvasColor-CUyHr5Uu.js} +0 -0
- /package/dist/{springPresets--YdWTHtm.js → springPresets-CFQGQfdl.js} +0 -0
- /package/dist/{useIntersectionPause-Cc-H9ees.js → useIntersectionPause-Bj4sPkMh.js} +0 -0
- /package/dist/{useInterval-iHludrxk.js → useInterval-CvK1mL92.js} +0 -0
- /package/dist/{useKeyboardShortcuts-Be3w_Rwk.js → useKeyboardShortcuts-BXWXOZ-9.js} +0 -0
- /package/dist/{useLiquidFlex-BL0lLLN2.js → useLiquidFlex-mZPMiNXh.js} +0 -0
- /package/dist/{useResizeObserver-BhgdhOIj.js → useResizeObserver-Bpoi7tRE.js} +0 -0
- /package/dist/{useResolveTokenColor-Dvn2RZJW.js → useResolveTokenColor-vAylyR0x.js} +0 -0
- /package/dist/{useScrollProgress-Dlvx-L3v.js → useScrollProgress-D7bYU2RK.js} +0 -0
- /package/dist/{useSortable-muI29agz.js → useSortable-DHjtZSEd.js} +0 -0
- /package/dist/{useTextHighlight-DmRYkOBx.js → useTextHighlight-CWEi25hf.js} +0 -0
- /package/dist/{useTimer-Dzarvzuk.js → useTimer-BHJOKr35.js} +0 -0
- /package/dist/{useUserInvalidAria-B2h6jAM_.js → useUserInvalidAria-y5namzeE.js} +0 -0
- /package/dist/{useViewportReady-B40FK4Pa.js → useViewportReady-anbac3m6.js} +0 -0
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-C1je1s0u.js";
|
|
2
|
+
import { n as t, r as n } from "./procedural-color.glsl-CIFsJhwI.js";
|
|
3
|
+
import { a as r, n as i, r as a, u as o } from "./procedural-color.wgsl-CToRHugY.js";
|
|
4
|
+
import { c as s } from "./color-DweYl7pE.js";
|
|
5
|
+
import { computed as c, createElementBlock as l, createElementVNode as u, defineComponent as d, normalizeStyle as f, onScopeDispose as p, openBlock as m, useTemplateRef as h, watch as g } from "vue";
|
|
6
|
+
//#region src/components/custom/concentric/shaders/concentric.wgsl.ts
|
|
7
|
+
var _ = `
|
|
8
|
+
const PI: f32 = 3.141592653589793;
|
|
9
|
+
const TAU: f32 = 6.283185307179586;
|
|
10
|
+
const RING_GRAVITY: f32 = 9.81;
|
|
11
|
+
const MAX_RINGS: i32 = 8;
|
|
12
|
+
const MAX_CENTERS: i32 = 4;
|
|
13
|
+
const MAX_RING_STOPS: i32 = 4;
|
|
14
|
+
|
|
15
|
+
// ── Concentric uniforms (the typed-struct source-of-truth — see uniformBridgeWGPU.ts) ──
|
|
16
|
+
struct ConcentricUniforms {
|
|
17
|
+
// u0: (uTime, uSpeed, uAxisA, uAxisB)
|
|
18
|
+
u0: vec4<f32>,
|
|
19
|
+
// ints: (uCenterCount, uRingCount, uStopCount, _pad)
|
|
20
|
+
ints: vec4<i32>,
|
|
21
|
+
// bg: (background.rgb (linear), hasBackground)
|
|
22
|
+
bg: vec4<f32>,
|
|
23
|
+
// norm: (uFieldNorm, uAspect, _pad, _pad) — field → [0,1] scale
|
|
24
|
+
norm: vec4<f32>,
|
|
25
|
+
// each ring row: (amplitude, wavelength, phase, _pad)
|
|
26
|
+
rings: array<vec4<f32>, 8>,
|
|
27
|
+
// each center row: (x, y, weight, _pad)
|
|
28
|
+
centers: array<vec4<f32>, 4>,
|
|
29
|
+
// each palette stop: linear-sRGB rgb + _pad
|
|
30
|
+
palette: array<vec4<f32>, 4>,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
@group(0) @binding(0) var<uniform> u: ConcentricUniforms;
|
|
34
|
+
|
|
35
|
+
${i}
|
|
36
|
+
${a}
|
|
37
|
+
|
|
38
|
+
// Full-screen-triangle (the pilot idiom): NDC corners (-1,-1),(3,-1),(-1,3) cover the
|
|
39
|
+
// viewport from a single 3-vertex draw — no vertex buffer.
|
|
40
|
+
struct VSOut {
|
|
41
|
+
@builtin(position) pos: vec4<f32>,
|
|
42
|
+
@location(0) uv: vec2<f32>, // domain [-1,1]², aspect-corrected x
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
@vertex
|
|
46
|
+
fn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {
|
|
47
|
+
var corners = array<vec2<f32>, 3>(
|
|
48
|
+
vec2<f32>(-1.0, -1.0), vec2<f32>(3.0, -1.0), vec2<f32>(-1.0, 3.0),
|
|
49
|
+
);
|
|
50
|
+
let c = corners[vi];
|
|
51
|
+
var out: VSOut;
|
|
52
|
+
out.pos = vec4<f32>(c, 0.0, 1.0);
|
|
53
|
+
// aspect-correct so the rings stay circular under the ellipsoidal norm (NOT squashed
|
|
54
|
+
// by the canvas aspect): widen the domain x by the aspect ratio.
|
|
55
|
+
out.uv = vec2<f32>(c.x, c.y);
|
|
56
|
+
return out;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// The ellipsoidal radial distance ‖p − c‖_e = sqrt((dx/a)² + (dy/b)²). The single radial
|
|
60
|
+
// metric (transcribes ringField.ts ellipsoidalRadius).
|
|
61
|
+
fn ellipsoidalRadius(p: vec2<f32>, center: vec2<f32>, axisA: f32, axisB: f32) -> f32 {
|
|
62
|
+
let dx = (p.x - center.x) / max(axisA, 1e-4);
|
|
63
|
+
let dy = (p.y - center.y) / max(axisB, 1e-4);
|
|
64
|
+
return sqrt(dx * dx + dy * dy);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// The radial-Fourier ring-interference value f(p,t) — the multi-center weighted sum of
|
|
68
|
+
// radial sinusoids (transcribes ringField.ts sampleRingField line-for-line).
|
|
69
|
+
fn sampleRingField(p: vec2<f32>, t: f32) -> f32 {
|
|
70
|
+
var acc = 0.0;
|
|
71
|
+
let speed = u.u0.y;
|
|
72
|
+
let axisA = u.u0.z;
|
|
73
|
+
let axisB = u.u0.w;
|
|
74
|
+
let centerCount = u.ints.x;
|
|
75
|
+
let ringCount = u.ints.y;
|
|
76
|
+
for (var j = 0; j < MAX_CENTERS; j = j + 1) {
|
|
77
|
+
if (j >= centerCount) { break; }
|
|
78
|
+
let cj = u.centers[j];
|
|
79
|
+
let radius = ellipsoidalRadius(p, cj.xy, axisA, axisB);
|
|
80
|
+
var centerSum = 0.0;
|
|
81
|
+
for (var i = 0; i < MAX_RINGS; i = i + 1) {
|
|
82
|
+
if (i >= ringCount) { break; }
|
|
83
|
+
let r = u.rings[i];
|
|
84
|
+
let k = TAU / max(r.y, 1e-4);
|
|
85
|
+
// ω = √(g·k); speed scales the travel (the shared dispersion law).
|
|
86
|
+
let omega = sqrt(RING_GRAVITY * k) * speed;
|
|
87
|
+
let theta = k * radius - omega * t + r.z;
|
|
88
|
+
centerSum = centerSum + r.x * sin(theta);
|
|
89
|
+
}
|
|
90
|
+
acc = acc + centerSum * cj.z;
|
|
91
|
+
}
|
|
92
|
+
return acc;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].
|
|
96
|
+
fn samplePaletteLin(t: f32) -> vec3<f32> {
|
|
97
|
+
let stopCount = u.ints.z;
|
|
98
|
+
if (stopCount <= 1) { return u.palette[0].rgb; }
|
|
99
|
+
let n = f32(stopCount);
|
|
100
|
+
let ft = clamp(t, 0.0, 1.0) * (n - 1.0);
|
|
101
|
+
let i0 = i32(floor(ft));
|
|
102
|
+
let i1 = min(i0 + 1, stopCount - 1);
|
|
103
|
+
let f = ft - f32(i0);
|
|
104
|
+
let labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * u.palette[i0].rgb);
|
|
105
|
+
let labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * u.palette[i1].rgb);
|
|
106
|
+
return oklabToLinearSrgb(mix(labA, labB, f));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@fragment
|
|
110
|
+
fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
|
|
111
|
+
// aspect-correct the domain x so the rings read circular under the ellipsoidal norm.
|
|
112
|
+
let aspect = max(u.norm.y, 1e-4);
|
|
113
|
+
let p = vec2<f32>(in.uv.x * aspect, in.uv.y);
|
|
114
|
+
let t = u.u0.x;
|
|
115
|
+
|
|
116
|
+
let raw = sampleRingField(p, t);
|
|
117
|
+
// Normalize the field → [0,1] for the palette ramp (uFieldNorm is the amplitude scale).
|
|
118
|
+
let v = clamp(0.5 + raw * u.norm.x, 0.0, 1.0);
|
|
119
|
+
|
|
120
|
+
let lin = samplePaletteLin(v);
|
|
121
|
+
let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));
|
|
122
|
+
|
|
123
|
+
// Premultiplied-alpha output over the (transparent / themed) ground.
|
|
124
|
+
let hasBg = u.bg.w;
|
|
125
|
+
if (hasBg > 0.5) {
|
|
126
|
+
// opaque themed ground: the field paints fully opaque.
|
|
127
|
+
return vec4<f32>(rgb, 1.0);
|
|
128
|
+
}
|
|
129
|
+
// transparent ground: the field's alpha rides its own brightness so the page reads
|
|
130
|
+
// through the troughs (the ring crests carry the ink; the calm field is faint).
|
|
131
|
+
let alpha = clamp(v * 0.92 + 0.08, 0.0, 1.0);
|
|
132
|
+
return vec4<f32>(rgb * alpha, alpha);
|
|
133
|
+
}
|
|
134
|
+
`, v = 9.81, y = Math.PI * 2;
|
|
135
|
+
function b(e, t, n, r) {
|
|
136
|
+
let i = (e.x - t.x) / Math.max(n, 1e-4), a = (e.y - t.y) / Math.max(r, 1e-4);
|
|
137
|
+
return Math.sqrt(i * i + a * a);
|
|
138
|
+
}
|
|
139
|
+
function x(e, t, n, r, i, a, o) {
|
|
140
|
+
let s = 0;
|
|
141
|
+
for (let c of n) {
|
|
142
|
+
let n = b(e, c, i, a), l = 0;
|
|
143
|
+
for (let e of r) {
|
|
144
|
+
let r = y / Math.max(e.wavelength, 1e-4), i = Math.sqrt(v * r) * o, a = r * n - i * t + e.phase;
|
|
145
|
+
l += e.amplitude * Math.sin(a);
|
|
146
|
+
}
|
|
147
|
+
s += l * c.weight;
|
|
148
|
+
}
|
|
149
|
+
return s;
|
|
150
|
+
}
|
|
151
|
+
function S(e = 5) {
|
|
152
|
+
let t = [], n = .7;
|
|
153
|
+
for (let r = 0; r < e; r++) {
|
|
154
|
+
let e = y / n, i = Math.exp(-1 / (e * 1.4) ** 2) / (e * e);
|
|
155
|
+
t.push({
|
|
156
|
+
amplitude: i * .9,
|
|
157
|
+
wavelength: n,
|
|
158
|
+
phase: r * 1.618033 % y
|
|
159
|
+
}), n *= .62;
|
|
160
|
+
}
|
|
161
|
+
return t;
|
|
162
|
+
}
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region src/components/custom/concentric/constants.ts
|
|
165
|
+
var C = 8, w = 4, T = 4, E = [
|
|
166
|
+
{
|
|
167
|
+
L: .94,
|
|
168
|
+
C: .025,
|
|
169
|
+
h: 80
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
L: .82,
|
|
173
|
+
C: .075,
|
|
174
|
+
h: 62
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
L: .66,
|
|
178
|
+
C: .105,
|
|
179
|
+
h: 44
|
|
180
|
+
}
|
|
181
|
+
], D = S(5), O = [{
|
|
182
|
+
x: -.22,
|
|
183
|
+
y: -.14,
|
|
184
|
+
weight: 1
|
|
185
|
+
}, {
|
|
186
|
+
x: .28,
|
|
187
|
+
y: .2,
|
|
188
|
+
weight: .7
|
|
189
|
+
}], k = {
|
|
190
|
+
centers: O,
|
|
191
|
+
ringComponents: D,
|
|
192
|
+
axisRatio: [1, .62],
|
|
193
|
+
speed: .5,
|
|
194
|
+
palette: E,
|
|
195
|
+
background: "transparent",
|
|
196
|
+
interactive: !1,
|
|
197
|
+
respectReducedMotion: !0
|
|
198
|
+
}, A = 320, j = {
|
|
199
|
+
u0: 0,
|
|
200
|
+
ints: 4,
|
|
201
|
+
bg: 8,
|
|
202
|
+
norm: 12,
|
|
203
|
+
rings: 16,
|
|
204
|
+
centers: 48,
|
|
205
|
+
palette: 64
|
|
206
|
+
}, M = .55;
|
|
207
|
+
function N() {
|
|
208
|
+
let e = new ArrayBuffer(A);
|
|
209
|
+
return {
|
|
210
|
+
buffer: e,
|
|
211
|
+
f32: new Float32Array(e),
|
|
212
|
+
i32: new Int32Array(e)
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
function P(e, t, n, r, i) {
|
|
216
|
+
let { f32: a, i32: o } = e, [c, l] = t.axisRatio;
|
|
217
|
+
a[j.u0 + 0] = n, a[j.u0 + 1] = t.speed, a[j.u0 + 2] = c, a[j.u0 + 3] = l;
|
|
218
|
+
let u = Math.min(t.centers.length, 4), d = Math.min(t.ringComponents.length, 8), f = Math.min(i.length, 4);
|
|
219
|
+
if (o[j.ints + 0] = u, o[j.ints + 1] = d, o[j.ints + 2] = f, o[j.ints + 3] = 0, t.background === "transparent") a[j.bg + 0] = 0, a[j.bg + 1] = 0, a[j.bg + 2] = 0, a[j.bg + 3] = 0;
|
|
220
|
+
else {
|
|
221
|
+
let e = s(t.background);
|
|
222
|
+
a[j.bg + 0] = e[0], a[j.bg + 1] = e[1], a[j.bg + 2] = e[2], a[j.bg + 3] = 1;
|
|
223
|
+
}
|
|
224
|
+
a[j.norm + 0] = M, a[j.norm + 1] = r, a[j.norm + 2] = 0, a[j.norm + 3] = 0, F(a, j.rings, t.ringComponents), I(a, j.centers, t.centers);
|
|
225
|
+
for (let e = 0; e < 4; e++) {
|
|
226
|
+
let t = j.palette + e * 4, n = s(i[Math.min(e, f - 1)] ?? i[0]);
|
|
227
|
+
a[t + 0] = n[0], a[t + 1] = n[1], a[t + 2] = n[2], a[t + 3] = 0;
|
|
228
|
+
}
|
|
229
|
+
return e;
|
|
230
|
+
}
|
|
231
|
+
function F(e, t, n) {
|
|
232
|
+
for (let r = 0; r < 8; r++) {
|
|
233
|
+
let i = t + r * 4, a = n[r];
|
|
234
|
+
a ? (e[i + 0] = a.amplitude, e[i + 1] = a.wavelength, e[i + 2] = a.phase, e[i + 3] = 0) : (e[i + 0] = 0, e[i + 1] = 1, e[i + 2] = 0, e[i + 3] = 0);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
function I(e, t, n) {
|
|
238
|
+
for (let r = 0; r < 4; r++) {
|
|
239
|
+
let i = t + r * 4, a = n[r];
|
|
240
|
+
a ? (e[i + 0] = a.x, e[i + 1] = a.y, e[i + 2] = a.weight, e[i + 3] = 0) : (e[i + 0] = 0, e[i + 1] = 0, e[i + 2] = 0, e[i + 3] = 0);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region src/components/custom/concentric/composables/concentricWGPUSetup.ts
|
|
245
|
+
var L = 64, R = 8, z = 2;
|
|
246
|
+
function B(e) {
|
|
247
|
+
let { canvas: t, config: n, getPalette: r, shouldContinue: i } = e;
|
|
248
|
+
return function(e, a, s) {
|
|
249
|
+
let c = e.createShaderModule({
|
|
250
|
+
label: "[Concentric] concentric.wgsl",
|
|
251
|
+
code: _
|
|
252
|
+
}), l = N(), u = e.createBuffer({
|
|
253
|
+
label: "[Concentric] uniforms",
|
|
254
|
+
size: l.buffer.byteLength,
|
|
255
|
+
usage: L | R
|
|
256
|
+
}), d = e.createBindGroupLayout({
|
|
257
|
+
label: "[Concentric] bgl",
|
|
258
|
+
entries: [{
|
|
259
|
+
binding: 0,
|
|
260
|
+
visibility: z,
|
|
261
|
+
buffer: { type: "uniform" }
|
|
262
|
+
}]
|
|
263
|
+
}), f = e.createRenderPipeline({
|
|
264
|
+
label: "[Concentric] pipeline",
|
|
265
|
+
layout: e.createPipelineLayout({ bindGroupLayouts: [d] }),
|
|
266
|
+
vertex: {
|
|
267
|
+
module: c,
|
|
268
|
+
entryPoint: "vs_main"
|
|
269
|
+
},
|
|
270
|
+
fragment: {
|
|
271
|
+
module: c,
|
|
272
|
+
entryPoint: "fs_main",
|
|
273
|
+
targets: [{
|
|
274
|
+
format: s,
|
|
275
|
+
blend: {
|
|
276
|
+
color: {
|
|
277
|
+
srcFactor: "one",
|
|
278
|
+
dstFactor: "one-minus-src-alpha",
|
|
279
|
+
operation: "add"
|
|
280
|
+
},
|
|
281
|
+
alpha: {
|
|
282
|
+
srcFactor: "one",
|
|
283
|
+
dstFactor: "one-minus-src-alpha",
|
|
284
|
+
operation: "add"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}]
|
|
288
|
+
},
|
|
289
|
+
primitive: { topology: "triangle-list" }
|
|
290
|
+
}), p = e.createBindGroup({
|
|
291
|
+
label: "[Concentric] bg",
|
|
292
|
+
layout: d,
|
|
293
|
+
entries: [{
|
|
294
|
+
binding: 0,
|
|
295
|
+
resource: { buffer: u }
|
|
296
|
+
}]
|
|
297
|
+
});
|
|
298
|
+
function m() {
|
|
299
|
+
let e = o(), n = t.clientWidth || 320, r = t.clientHeight || 320, i = Math.max(1, Math.round(n * e)), a = Math.max(1, Math.round(r * e));
|
|
300
|
+
(t.width !== i || t.height !== a) && (t.width = i, t.height = a);
|
|
301
|
+
}
|
|
302
|
+
function h(i) {
|
|
303
|
+
P(l, n, i, (t.clientWidth || 320) / Math.max(t.clientHeight || 320, 1), r()), e.queue.writeBuffer(u, 0, l.buffer);
|
|
304
|
+
let o = e.createCommandEncoder({ label: "[Concentric] frame" }), s = a.getCurrentTexture().createView(), c = o.beginRenderPass({ colorAttachments: [{
|
|
305
|
+
view: s,
|
|
306
|
+
clearValue: {
|
|
307
|
+
r: 0,
|
|
308
|
+
g: 0,
|
|
309
|
+
b: 0,
|
|
310
|
+
a: 0
|
|
311
|
+
},
|
|
312
|
+
loadOp: "clear",
|
|
313
|
+
storeOp: "store"
|
|
314
|
+
}] });
|
|
315
|
+
c.setPipeline(f), c.setBindGroup(0, p), c.draw(3, 1, 0, 0), c.end(), e.queue.submit([o.finish()]);
|
|
316
|
+
}
|
|
317
|
+
return {
|
|
318
|
+
frame: h,
|
|
319
|
+
shouldContinue: i,
|
|
320
|
+
resize: m,
|
|
321
|
+
teardown: () => {
|
|
322
|
+
u.destroy();
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region src/components/custom/concentric/shaders/concentric.glsl.ts
|
|
329
|
+
var V = "#version 300 es\nprecision highp float;\nin vec2 aPosition;\nout vec2 vUv;\nvoid main() {\n vUv = aPosition; // [-1,1]² domain\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", H = `#version 300 es
|
|
330
|
+
precision highp float;
|
|
331
|
+
|
|
332
|
+
#define PI 3.141592653589793
|
|
333
|
+
#define TAU 6.283185307179586
|
|
334
|
+
#define RING_GRAVITY 9.81
|
|
335
|
+
#define MAX_RINGS 8
|
|
336
|
+
#define MAX_CENTERS 4
|
|
337
|
+
#define MAX_RING_STOPS 4
|
|
338
|
+
|
|
339
|
+
in vec2 vUv;
|
|
340
|
+
out vec4 fragColor;
|
|
341
|
+
|
|
342
|
+
uniform float uTime;
|
|
343
|
+
uniform float uSpeed;
|
|
344
|
+
uniform vec2 uAxis; // (a, b) ellipsoidal-norm axis ratio
|
|
345
|
+
uniform float uFieldNorm; // field → [0,1] amplitude scale
|
|
346
|
+
uniform float uAspect;
|
|
347
|
+
uniform int uCenterCount;
|
|
348
|
+
uniform int uRingCount;
|
|
349
|
+
uniform int uStopCount;
|
|
350
|
+
uniform float uHasBackground;
|
|
351
|
+
uniform vec3 uRings[MAX_RINGS]; // (amplitude, wavelength, phase)
|
|
352
|
+
uniform vec3 uCenters[MAX_CENTERS]; // (x, y, weight)
|
|
353
|
+
uniform vec3 uPalette[MAX_RING_STOPS]; // linear-sRGB stops
|
|
354
|
+
|
|
355
|
+
${t}
|
|
356
|
+
${n}
|
|
357
|
+
|
|
358
|
+
// ‖p − c‖_e = sqrt((dx/a)² + (dy/b)²) — transcribes ringField.ts ellipsoidalRadius.
|
|
359
|
+
float ellipsoidalRadius(vec2 p, vec2 center, float axisA, float axisB) {
|
|
360
|
+
float dx = (p.x - center.x) / max(axisA, 1e-4);
|
|
361
|
+
float dy = (p.y - center.y) / max(axisB, 1e-4);
|
|
362
|
+
return sqrt(dx * dx + dy * dy);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// f(p,t) — the multi-center weighted radial sum (transcribes ringField.ts sampleRingField).
|
|
366
|
+
float sampleRingField(vec2 p, float t) {
|
|
367
|
+
float acc = 0.0;
|
|
368
|
+
for (int j = 0; j < MAX_CENTERS; j++) {
|
|
369
|
+
if (j >= uCenterCount) break;
|
|
370
|
+
vec3 cj = uCenters[j];
|
|
371
|
+
float radius = ellipsoidalRadius(p, cj.xy, uAxis.x, uAxis.y);
|
|
372
|
+
float centerSum = 0.0;
|
|
373
|
+
for (int i = 0; i < MAX_RINGS; i++) {
|
|
374
|
+
if (i >= uRingCount) break;
|
|
375
|
+
vec3 r = uRings[i];
|
|
376
|
+
float k = TAU / max(r.y, 1e-4);
|
|
377
|
+
float omega = sqrt(RING_GRAVITY * k) * uSpeed;
|
|
378
|
+
float theta = k * radius - omega * t + r.z;
|
|
379
|
+
centerSum += r.x * sin(theta);
|
|
380
|
+
}
|
|
381
|
+
acc += centerSum * cj.z;
|
|
382
|
+
}
|
|
383
|
+
return acc;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].
|
|
387
|
+
vec3 samplePaletteLin(float t) {
|
|
388
|
+
if (uStopCount <= 1) return uPalette[0];
|
|
389
|
+
float n = float(uStopCount);
|
|
390
|
+
float ft = clamp(t, 0.0, 1.0) * (n - 1.0);
|
|
391
|
+
int i0 = int(floor(ft));
|
|
392
|
+
int i1 = min(i0 + 1, uStopCount - 1);
|
|
393
|
+
float f = ft - float(i0);
|
|
394
|
+
// cube-root LMS (the GLSL chunk inlines cbrt as sign(x)·pow(|x|,1/3) — no cbrt3 fn).
|
|
395
|
+
vec3 lmsA = LINEAR_SRGB_TO_LMS * uPalette[i0];
|
|
396
|
+
vec3 lmsB = LINEAR_SRGB_TO_LMS * uPalette[i1];
|
|
397
|
+
vec3 labA = LMS_TO_OKLAB * (sign(lmsA) * pow(abs(lmsA), vec3(1.0 / 3.0)));
|
|
398
|
+
vec3 labB = LMS_TO_OKLAB * (sign(lmsB) * pow(abs(lmsB), vec3(1.0 / 3.0)));
|
|
399
|
+
return oklabToLinearSrgb(mix(labA, labB, f));
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
void main() {
|
|
403
|
+
float aspect = max(uAspect, 1e-4);
|
|
404
|
+
vec2 p = vec2(vUv.x * aspect, vUv.y);
|
|
405
|
+
float raw = sampleRingField(p, uTime);
|
|
406
|
+
float v = clamp(0.5 + raw * uFieldNorm, 0.0, 1.0);
|
|
407
|
+
vec3 lin = samplePaletteLin(v);
|
|
408
|
+
vec3 rgb = clamp(linearToSrgb(lin), vec3(0.0), vec3(1.0));
|
|
409
|
+
if (uHasBackground > 0.5) {
|
|
410
|
+
fragColor = vec4(rgb, 1.0);
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
float alpha = clamp(v * 0.92 + 0.08, 0.0, 1.0);
|
|
414
|
+
fragColor = vec4(rgb * alpha, alpha);
|
|
415
|
+
}`;
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region src/components/custom/concentric/composables/concentricGLSetup.ts
|
|
418
|
+
function U(e, t, n) {
|
|
419
|
+
let r = e.createShader(t);
|
|
420
|
+
if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
|
|
421
|
+
let t = e.getShaderInfoLog(r);
|
|
422
|
+
throw e.deleteShader(r), Error(`[Concentric] shader compile failed: ${t}`);
|
|
423
|
+
}
|
|
424
|
+
return r;
|
|
425
|
+
}
|
|
426
|
+
function W(e) {
|
|
427
|
+
let { canvas: t, config: n, getPalette: r, shouldContinue: i } = e;
|
|
428
|
+
return function(e) {
|
|
429
|
+
let a = U(e, e.VERTEX_SHADER, V), c = U(e, e.FRAGMENT_SHADER, H), l = e.createProgram();
|
|
430
|
+
if (e.attachShader(l, a), e.attachShader(l, c), e.linkProgram(l), !e.getProgramParameter(l, e.LINK_STATUS)) throw Error(`[Concentric] link failed: ${e.getProgramInfoLog(l)}`);
|
|
431
|
+
e.deleteShader(a), e.deleteShader(c);
|
|
432
|
+
let u = e.createVertexArray();
|
|
433
|
+
e.bindVertexArray(u);
|
|
434
|
+
let d = e.createBuffer();
|
|
435
|
+
e.bindBuffer(e.ARRAY_BUFFER, d), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
|
|
436
|
+
-1,
|
|
437
|
+
-1,
|
|
438
|
+
3,
|
|
439
|
+
-1,
|
|
440
|
+
-1,
|
|
441
|
+
3
|
|
442
|
+
]), e.STATIC_DRAW);
|
|
443
|
+
let f = e.getAttribLocation(l, "aPosition");
|
|
444
|
+
e.enableVertexAttribArray(f), e.vertexAttribPointer(f, 2, e.FLOAT, !1, 0, 0), e.bindVertexArray(null);
|
|
445
|
+
let p = (t) => e.getUniformLocation(l, t), m = p("uTime"), h = p("uSpeed"), g = p("uAxis"), _ = p("uFieldNorm"), v = p("uAspect"), y = p("uCenterCount"), b = p("uRingCount"), x = p("uStopCount"), S = p("uHasBackground"), C = p("uRings[0]"), w = p("uCenters[0]"), T = p("uPalette[0]");
|
|
446
|
+
function E() {
|
|
447
|
+
let n = o(), r = t.clientWidth || 320, i = t.clientHeight || 320, a = Math.max(1, Math.round(r * n)), s = Math.max(1, Math.round(i * n));
|
|
448
|
+
(t.width !== a || t.height !== s) && (t.width = a, t.height = s), e.viewport(0, 0, t.width, t.height);
|
|
449
|
+
}
|
|
450
|
+
function D(i) {
|
|
451
|
+
let a = t.clientWidth || 320, o = t.clientHeight || 320, c = a / Math.max(o, 1);
|
|
452
|
+
e.useProgram(l), e.bindVertexArray(u), e.enable(e.BLEND), e.blendFunc(e.ONE, e.ONE_MINUS_SRC_ALPHA), e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.uniform1f(m, i), e.uniform1f(h, n.speed), e.uniform2f(g, n.axisRatio[0], n.axisRatio[1]), e.uniform1f(_, M), e.uniform1f(v, c);
|
|
453
|
+
let d = Math.min(n.centers.length, 4), f = Math.min(n.ringComponents.length, 8), p = r(), E = Math.min(p.length, 4);
|
|
454
|
+
e.uniform1i(y, d), e.uniform1i(b, f), e.uniform1i(x, E), n.background === "transparent" ? e.uniform1f(S, 0) : e.uniform1f(S, 1);
|
|
455
|
+
let D = new Float32Array(24);
|
|
456
|
+
for (let e = 0; e < 8; e++) {
|
|
457
|
+
let t = n.ringComponents[e];
|
|
458
|
+
D[e * 3 + 0] = t?.amplitude ?? 0, D[e * 3 + 1] = t?.wavelength ?? 1, D[e * 3 + 2] = t?.phase ?? 0;
|
|
459
|
+
}
|
|
460
|
+
e.uniform3fv(C, D);
|
|
461
|
+
let O = new Float32Array(12);
|
|
462
|
+
for (let e = 0; e < 4; e++) {
|
|
463
|
+
let t = n.centers[e];
|
|
464
|
+
O[e * 3 + 0] = t?.x ?? 0, O[e * 3 + 1] = t?.y ?? 0, O[e * 3 + 2] = t?.weight ?? 0;
|
|
465
|
+
}
|
|
466
|
+
e.uniform3fv(w, O);
|
|
467
|
+
let k = new Float32Array(12);
|
|
468
|
+
for (let e = 0; e < 4; e++) {
|
|
469
|
+
let t = s(p[Math.min(e, E - 1)] ?? p[0]);
|
|
470
|
+
k[e * 3 + 0] = t[0], k[e * 3 + 1] = t[1], k[e * 3 + 2] = t[2];
|
|
471
|
+
}
|
|
472
|
+
e.uniform3fv(T, k), e.drawArrays(e.TRIANGLES, 0, 3), e.bindVertexArray(null);
|
|
473
|
+
}
|
|
474
|
+
return {
|
|
475
|
+
frame: D,
|
|
476
|
+
shouldContinue: i,
|
|
477
|
+
resize: E,
|
|
478
|
+
teardown: () => {
|
|
479
|
+
e.deleteProgram(l), e.deleteVertexArray(u), e.deleteBuffer(d);
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
//#endregion
|
|
485
|
+
//#region src/components/custom/concentric/composables/useConcentric.ts
|
|
486
|
+
function G(e, t) {
|
|
487
|
+
let { config: n, getPalette: i } = t, a = t.mode ?? "live", o = null, s = () => {
|
|
488
|
+
let t = e.value;
|
|
489
|
+
return t ? (o || (o = r(t, {
|
|
490
|
+
mode: a,
|
|
491
|
+
respectReducedMotion: n.respectReducedMotion,
|
|
492
|
+
setupWGPU: B({
|
|
493
|
+
canvas: t,
|
|
494
|
+
config: n,
|
|
495
|
+
getPalette: i,
|
|
496
|
+
shouldContinue: () => !0
|
|
497
|
+
}),
|
|
498
|
+
setupGL: W({
|
|
499
|
+
canvas: t,
|
|
500
|
+
config: n,
|
|
501
|
+
getPalette: i,
|
|
502
|
+
shouldContinue: () => !0
|
|
503
|
+
})
|
|
504
|
+
}), o.armAsync()), o) : null;
|
|
505
|
+
};
|
|
506
|
+
queueMicrotask(() => s());
|
|
507
|
+
let c = {
|
|
508
|
+
get backend() {
|
|
509
|
+
return s()?.backend ?? "webgpu";
|
|
510
|
+
},
|
|
511
|
+
pause: () => s()?.suspend("manual"),
|
|
512
|
+
resume: () => s()?.resume("manual"),
|
|
513
|
+
wake: () => s()?.wake(),
|
|
514
|
+
renderAt: (e) => s()?.renderAt(e),
|
|
515
|
+
get reducedMotion() {
|
|
516
|
+
return o?.reducedMotion ?? !1;
|
|
517
|
+
},
|
|
518
|
+
dispose: () => o?.dispose()
|
|
519
|
+
};
|
|
520
|
+
return p(() => c.dispose()), c;
|
|
521
|
+
}
|
|
522
|
+
//#endregion
|
|
523
|
+
//#region src/components/custom/concentric/Concentric.vue
|
|
524
|
+
var K = /* @__PURE__ */ e(/* @__PURE__ */ d({
|
|
525
|
+
__name: "Concentric",
|
|
526
|
+
props: {
|
|
527
|
+
config: { default: () => k },
|
|
528
|
+
paused: {
|
|
529
|
+
type: Boolean,
|
|
530
|
+
default: !1
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
emits: ["update:paused"],
|
|
534
|
+
setup(e, { expose: t }) {
|
|
535
|
+
let n = h("canvasRef"), r = G(n, {
|
|
536
|
+
config: e.config,
|
|
537
|
+
getPalette: () => e.config.palette
|
|
538
|
+
});
|
|
539
|
+
g(() => e.paused, (e) => e ? r.pause() : r.resume(), { immediate: !0 });
|
|
540
|
+
let i = c(() => {
|
|
541
|
+
let t = e.config.background;
|
|
542
|
+
if (t !== "transparent") return `oklch(${t.L} ${t.C} ${t.h})`;
|
|
543
|
+
});
|
|
544
|
+
return t({
|
|
545
|
+
pause: r.pause,
|
|
546
|
+
resume: r.resume,
|
|
547
|
+
wake: r.wake,
|
|
548
|
+
renderAt: r.renderAt
|
|
549
|
+
}), (e, t) => (m(), l("div", {
|
|
550
|
+
class: "concentric-wrapper",
|
|
551
|
+
style: f(i.value ? { background: i.value } : void 0)
|
|
552
|
+
}, [u("canvas", {
|
|
553
|
+
ref_key: "canvasRef",
|
|
554
|
+
ref: n,
|
|
555
|
+
class: "concentric-canvas",
|
|
556
|
+
"aria-hidden": "true",
|
|
557
|
+
"data-testid": "concentric-canvas"
|
|
558
|
+
}, null, 512)], 4));
|
|
559
|
+
}
|
|
560
|
+
}), [["__scopeId", "data-v-f8bbc88a"]]);
|
|
561
|
+
//#endregion
|
|
562
|
+
export { K as Concentric, O as DEFAULT_CENTERS, k as DEFAULT_CONCENTRIC_CONFIG, D as DEFAULT_RING_COMPONENTS, w as MAX_CENTERS, C as MAX_RINGS, T as MAX_RING_STOPS, v as RING_GRAVITY, E as WARM_IDENTITY_PALETTE, S as buildRingLadder, b as ellipsoidalRadius, x as sampleRingField, G as useConcentric };
|
package/dist/configurator.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { a as e, i as t, n,
|
|
2
|
-
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./ConfiguratorRow-BR4l-ixA.js";
|
|
2
|
+
import { n as a, t as o } from "./useConfiguratorState-DNlOh6c8.js";
|
|
3
|
+
export { r as CONFIGURATOR_DENSITY_KEY, a as Configurator, n as ConfiguratorLayer, i as ConfiguratorRow, t as provideConfiguratorDensity, o as useConfiguratorState, e as useOptionalConfiguratorDensity };
|
package/dist/confirm-dialog.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as t } from "./button-
|
|
3
|
-
import { t as n } from "./_plugin-vue_export-helper-
|
|
1
|
+
import { u as e } from "./vendor-CKmzio-i.js";
|
|
2
|
+
import { n as t } from "./button-DYCUa-tH.js";
|
|
3
|
+
import { t as n } from "./_plugin-vue_export-helper-C1je1s0u.js";
|
|
4
4
|
import { Transition as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, mergeModels as d, openBlock as f, renderSlot as p, toDisplayString as m, unref as h, useModel as g, withCtx as _, withKeys as v, withModifiers as y } from "vue";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
key: "13zald"
|
|
8
|
-
}]]), x = {
|
|
5
|
+
//#region src/components/custom/confirm-dialog/ConfirmDialog.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var b = {
|
|
9
7
|
key: 0,
|
|
10
8
|
class: "w-[calc(100%-2rem)] sm:max-w-sm bg-card text-card-foreground border border-border rounded-dialog shadow-lg"
|
|
11
|
-
},
|
|
9
|
+
}, x = { class: "p-6 grid gap-4" }, S = { class: "grid gap-2" }, C = { class: "font-display text-lg font-semibold leading-none tracking-tight" }, w = { class: "fira-code text-sm text-muted-foreground" }, T = { class: "flex justify-end gap-2" }, E = /* @__PURE__ */ n(/* @__PURE__ */ u({
|
|
12
10
|
__name: "ConfirmDialog",
|
|
13
11
|
props: /* @__PURE__ */ d({
|
|
14
12
|
title: {},
|
|
@@ -24,39 +22,39 @@ var b = e("loader-circle", [["path", {
|
|
|
24
22
|
openModifiers: {}
|
|
25
23
|
}),
|
|
26
24
|
emits: /* @__PURE__ */ d(["confirm"], ["update:open"]),
|
|
27
|
-
setup(
|
|
28
|
-
let
|
|
25
|
+
setup(n, { emit: u }) {
|
|
26
|
+
let d = n, E = g(n, "open"), D = u;
|
|
29
27
|
function O() {
|
|
30
|
-
|
|
28
|
+
d.loading || (D("confirm"), E.value = !1);
|
|
31
29
|
}
|
|
32
|
-
return (
|
|
33
|
-
default: _(() => [
|
|
30
|
+
return (u, d) => (f(), i(r, { name: "fade" }, {
|
|
31
|
+
default: _(() => [E.value ? (f(), o("div", {
|
|
34
32
|
key: 0,
|
|
35
33
|
class: "absolute inset-0 z-popover grid place-items-center bg-overlay-scrim rounded-dialog",
|
|
36
|
-
onClick:
|
|
37
|
-
onKeydown:
|
|
34
|
+
onClick: d[1] ||= y((e) => !n.loading && (E.value = !1), ["self"]),
|
|
35
|
+
onKeydown: d[2] ||= v((e) => !n.loading && (E.value = !1), ["escape"])
|
|
38
36
|
}, [l(r, {
|
|
39
37
|
name: "confirm-panel",
|
|
40
38
|
appear: ""
|
|
41
39
|
}, {
|
|
42
|
-
default: _(() => [
|
|
40
|
+
default: _(() => [E.value ? (f(), o("div", b, [s("div", x, [s("div", S, [s("h2", C, m(n.title), 1), s("div", w, [p(u.$slots, "default", {}, () => [c(m(n.description), 1)], !0)])]), s("div", T, [l(h(t), {
|
|
43
41
|
variant: "outline",
|
|
44
42
|
class: "cursor-pointer rounded-pill",
|
|
45
|
-
disabled:
|
|
46
|
-
onClick:
|
|
43
|
+
disabled: n.loading,
|
|
44
|
+
onClick: d[0] ||= (e) => E.value = !1
|
|
47
45
|
}, {
|
|
48
|
-
default: _(() => [...
|
|
46
|
+
default: _(() => [...d[3] ||= [c(" Cancel ", -1)]]),
|
|
49
47
|
_: 1
|
|
50
48
|
}, 8, ["disabled"]), l(h(t), {
|
|
51
|
-
variant:
|
|
49
|
+
variant: n.destructive ? "destructive" : "default",
|
|
52
50
|
class: "cursor-pointer gap-1.5 rounded-pill",
|
|
53
|
-
disabled:
|
|
51
|
+
disabled: n.loading,
|
|
54
52
|
onClick: O
|
|
55
53
|
}, {
|
|
56
|
-
default: _(() => [
|
|
54
|
+
default: _(() => [n.loading ? (f(), i(h(e), {
|
|
57
55
|
key: 0,
|
|
58
56
|
class: "size-4 animate-spin"
|
|
59
|
-
})) : a("", !0), p(
|
|
57
|
+
})) : a("", !0), p(u.$slots, "action", {}, () => [c(m(n.confirmLabel), 1)], !0)]),
|
|
60
58
|
_: 3
|
|
61
59
|
}, 8, ["variant", "disabled"])])])])) : a("", !0)]),
|
|
62
60
|
_: 3
|
|
@@ -66,4 +64,4 @@ var b = e("loader-circle", [["path", {
|
|
|
66
64
|
}
|
|
67
65
|
}), [["__scopeId", "data-v-01b48b6e"]]);
|
|
68
66
|
//#endregion
|
|
69
|
-
export {
|
|
67
|
+
export { E as ConfirmDialog };
|