@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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Surface } from "../../ui/_shared/useSurfaceAxis";
|
|
1
2
|
declare const _default: typeof __VLS_export;
|
|
2
3
|
export default _default;
|
|
3
4
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
@@ -6,6 +7,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
6
7
|
expandLabel?: string;
|
|
7
8
|
/** Accessible name for the collapse (exit fullscreen) button. */
|
|
8
9
|
collapseLabel?: string;
|
|
10
|
+
/** Surface decoration register for the fullscreen overlay
|
|
11
|
+
* (BA.W-SURFACE-AXIS) — `glass` (default) frosts over the page;
|
|
12
|
+
* `opaque` is the solid-wall opt-out; `veil` the borderless plate. */
|
|
13
|
+
surface?: Surface;
|
|
9
14
|
} & {
|
|
10
15
|
/**
|
|
11
16
|
* Two-way `open` model so consumers can drive fullscreen externally
|
|
@@ -21,6 +26,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
21
26
|
expandLabel?: string;
|
|
22
27
|
/** Accessible name for the collapse (exit fullscreen) button. */
|
|
23
28
|
collapseLabel?: string;
|
|
29
|
+
/** Surface decoration register for the fullscreen overlay
|
|
30
|
+
* (BA.W-SURFACE-AXIS) — `glass` (default) frosts over the page;
|
|
31
|
+
* `opaque` is the solid-wall opt-out; `veil` the borderless plate. */
|
|
32
|
+
surface?: Surface;
|
|
24
33
|
} & {
|
|
25
34
|
/**
|
|
26
35
|
* Two-way `open` model so consumers can drive fullscreen externally
|
|
@@ -31,6 +40,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
31
40
|
}> & Readonly<{
|
|
32
41
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
33
42
|
}>, {
|
|
43
|
+
surface: Surface;
|
|
34
44
|
buttonPosition: "left" | "right";
|
|
35
45
|
expandLabel: string;
|
|
36
46
|
collapseLabel: string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Scroll axis. `"x"` is the horizontal strip, `"y"` the vertical column. Default `"x"`. */
|
|
3
|
+
axis?: "x" | "y";
|
|
4
|
+
/** Feather the start edge once scrolled past the start. Default `true`. */
|
|
5
|
+
fadeStart?: boolean;
|
|
6
|
+
/** Feather the end edge while trailing overflow remains. Default `true`. */
|
|
7
|
+
fadeEnd?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_1: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_1) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
+
axis: "x" | "y";
|
|
15
|
+
fadeStart: boolean;
|
|
16
|
+
fadeEnd: boolean;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { MaybeRef, Ref } from "vue";
|
|
2
|
+
export interface UseFadingScrollOptions {
|
|
3
|
+
/** Scroll axis. `"x"` reads scrollLeft/Width; `"y"` reads scrollTop/Height. Default `"x"`. */
|
|
4
|
+
axis?: "x" | "y";
|
|
5
|
+
/** Feather the start edge once scrolled past the start. Default `true`. */
|
|
6
|
+
fadeStart?: boolean;
|
|
7
|
+
/** Feather the end edge while trailing overflow remains. Default `true`. */
|
|
8
|
+
fadeEnd?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface UseFadingScrollControls {
|
|
11
|
+
/** True when this composable is the ACTIVE writer (the native timeline is absent). */
|
|
12
|
+
readonly active: Readonly<Ref<boolean>>;
|
|
13
|
+
/** Re-measure the scroll state and rewrite the customs. Safe to call manually. */
|
|
14
|
+
measure: () => void;
|
|
15
|
+
/** Detach all listeners/observers. Auto-called on unmount in a component scope. */
|
|
16
|
+
stop: () => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Drive the per-edge `--fade-start` / `--fade-end` mask-width customs off an
|
|
20
|
+
* element's live scroll state, the JS fallback for the native `scroll(self)`
|
|
21
|
+
* timeline. On a supporting engine this attaches NOTHING (the CSS recipe is the
|
|
22
|
+
* sole writer); on a non-supporting engine it measures `scrollLeft/Top`,
|
|
23
|
+
* `scrollWidth/Height − clientWidth/Height`, a `ResizeObserver` (the shared
|
|
24
|
+
* `useResizeObserver` substrate) + a rAF-coalesced `scroll` listener, writing
|
|
25
|
+
* `--fade-start = --fade-scroll-width` only past `scroll > 0` and `--fade-end`
|
|
26
|
+
* only while trailing overflow remains. The customs default to `0px` (no
|
|
27
|
+
* feather) so the at-rest no-overflow edge is SHARP.
|
|
28
|
+
*
|
|
29
|
+
* @param target the scroll-port element (the same element the CSS customs apply to)
|
|
30
|
+
*/
|
|
31
|
+
export declare function useFadingScroll(target: MaybeRef<HTMLElement | null>, options?: UseFadingScrollOptions): UseFadingScrollControls;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The module-scope constants for the FadingScroll family — the colocation home
|
|
3
|
+
* (`proof:colocation`) the dir owes once it carries a complex composable. Both
|
|
4
|
+
* were promoted out of `composables/useFadingScroll.ts` verbatim.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* True when the engine genuinely supports a `scroll()` timeline — the CSS recipe
|
|
8
|
+
* in `utilities/base.css` then owns the visual axis on the compositor and the
|
|
9
|
+
* `useFadingScroll` composable becomes the inert (non-attaching) path. Module-level
|
|
10
|
+
* so the feature gate is computed once. (Mirrors `useScrollProgress`'s twin.)
|
|
11
|
+
*/
|
|
12
|
+
export declare const NATIVE_SCROLL_TIMELINE: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Tolerance (CSS px) absorbing scroll-snap jitter — `snap-mandatory` parks the
|
|
15
|
+
* active card a few px off the true start, so the start edge reads as sharp until
|
|
16
|
+
* the user genuinely scrolls past the first child. Promoted verbatim from the
|
|
17
|
+
* bespoke `PresetPickerRow` SNAP_TOLERANCE.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SNAP_TOLERANCE = 12;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ColorResolver } from "../../../composables/color";
|
|
2
2
|
/**
|
|
3
3
|
* FourierField — a Fourier epicycle field on a Canvas2D surface, a sibling
|
|
4
4
|
* primitive to Aurora and GooBlob. A seeded elliptic spectrum reconstructs a
|
|
@@ -20,6 +20,11 @@ import { type ColorResolver } from "../../../composables/color";
|
|
|
20
20
|
* draws a few big phasors with the epicycles ON and a warm trail feel; `final`
|
|
21
21
|
* draws a denser elliptic spectrum with the epicycles OFF. One engine, two
|
|
22
22
|
* presets. The hue itself always comes from the consumer's `color`.
|
|
23
|
+
*
|
|
24
|
+
* BB.W-CARVE3 — the ~475-line renderer lives in `composables/useFourierField.ts`
|
|
25
|
+
* (the colocation symmetry Aurora/`useAurora.ts`, GooBlob/`useMetaballRenderer.ts`
|
|
26
|
+
* and Constellation/`useConstellation.ts` already carry). The SFC stays thin: the
|
|
27
|
+
* props, the two template refs, and the single `useFourierField(props, …)` call.
|
|
23
28
|
*/
|
|
24
29
|
type __VLS_Props = {
|
|
25
30
|
/** Configuration bundle. `hero` = epicycles on, fewer harmonics; `final` = epicycles off, denser. Default `hero`. */
|
|
@@ -38,7 +43,19 @@ type __VLS_Props = {
|
|
|
38
43
|
* loudness); clamped [0, 2] — the field's ~2 upper bound lets a hero push
|
|
39
44
|
* brighter than the recessed default without runaway. */
|
|
40
45
|
intensity?: number;
|
|
46
|
+
/** OPTIONAL injected clock — a getter returning the loop parameter `t ∈ [0,1)`.
|
|
47
|
+
* When BOUND, the render reads `clock()` (a controllable studio clock: pause,
|
|
48
|
+
* scrub, speed); when ABSENT (the ambient face), the autonomous
|
|
49
|
+
* `(now / durationMs) % 1` frame-time loop is the DEFAULT. `freeze` /
|
|
50
|
+
* `prefers-reduced-motion` still short-circuit to `frozenT` regardless — the
|
|
51
|
+
* ambient bundle is unchanged. The SOLE additive seam (BA.W-FOURIER-STUDIO). */
|
|
52
|
+
clock?: () => number;
|
|
41
53
|
};
|
|
42
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
54
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
55
|
+
variant: "hero" | "final";
|
|
56
|
+
seed: string;
|
|
57
|
+
freeze: boolean;
|
|
58
|
+
intensity: number;
|
|
59
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
43
60
|
declare const _default: typeof __VLS_export;
|
|
44
61
|
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type ShallowRef } from "vue";
|
|
2
|
+
import { type ColorResolver } from "../../../../composables/color";
|
|
3
|
+
/**
|
|
4
|
+
* The renderer of `<FourierField>` — the Fourier-epicycle field on a Canvas2D
|
|
5
|
+
* surface. Lifted out of the SFC into this composable (BB.W-CARVE3) so the
|
|
6
|
+
* component file matches the colocation symmetry its GL/canvas siblings already
|
|
7
|
+
* carry: Aurora→`useAurora.ts`, GooBlob→`useMetaballRenderer.ts`,
|
|
8
|
+
* Constellation→`useConstellation.ts`. The SFC stays thin (props + the two
|
|
9
|
+
* template refs + the single `useFourierField(props, …)` call).
|
|
10
|
+
*
|
|
11
|
+
* It composes the `useCanvas2D` substrate, inheriting the offscreen /
|
|
12
|
+
* tab-hidden / reduced-motion freeze for free (no hand-rolled RAF-park). Color
|
|
13
|
+
* resolves through the INJECTED `colorResolver` seam (the GooBlob model): a
|
|
14
|
+
* `var()`/`light-dark()` token is first resolved to a concrete `rgb()` against
|
|
15
|
+
* the host's inherited color-scheme, then re-resolved on a color change AND on a
|
|
16
|
+
* dark-mode toggle so the field retints with the theme.
|
|
17
|
+
*/
|
|
18
|
+
export interface FourierFieldRenderProps {
|
|
19
|
+
/** Configuration bundle. `hero` = epicycles on, fewer harmonics; `final` = epicycles off, denser. */
|
|
20
|
+
variant: "hero" | "final";
|
|
21
|
+
/** Base CSS color (any form the resolver understands; a `var()`/`light-dark()` token resolves against the host). */
|
|
22
|
+
color: string;
|
|
23
|
+
/** REQUIRED color seam — resolves a concrete color to a gamma-sRGB [r,g,b] triple in [0,1]. */
|
|
24
|
+
colorResolver: ColorResolver;
|
|
25
|
+
/** Extra seed mixed into the spectrum PRNG for a unique-but-reproducible curve. */
|
|
26
|
+
seed: string;
|
|
27
|
+
/** When true, paint ONE static deterministic best-frame and never animate (the capture/export lever). */
|
|
28
|
+
freeze: boolean;
|
|
29
|
+
/** Outer loudness envelope (the Aurora `opacityCeiling` shape). Scales the resolved alphas at the PAINT layer; clamped [0, 2]. */
|
|
30
|
+
intensity: number;
|
|
31
|
+
/** OPTIONAL injected clock — a getter returning the loop parameter `t ∈ [0,1)` (the studio's controllable clock). */
|
|
32
|
+
clock?: () => number;
|
|
33
|
+
}
|
|
34
|
+
/** The template refs the SFC owns; the composable reads them once the host is in the tree. */
|
|
35
|
+
export interface FourierFieldRefs {
|
|
36
|
+
hostRef: Readonly<ShallowRef<HTMLElement | null>>;
|
|
37
|
+
canvasRef: Readonly<ShallowRef<HTMLCanvasElement | null>>;
|
|
38
|
+
}
|
|
39
|
+
export declare function useFourierField(props: FourierFieldRenderProps, { hostRef, canvasRef }: FourierFieldRefs): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Curve-sampling resolution for the stable view-fit bbox pass — the renderer
|
|
3
|
+
* samples the epicycle curve this many times once at mount to size it to the
|
|
4
|
+
* canvas with a fixed margin (so the curve never clips and the scale is constant
|
|
5
|
+
* across the run). 720 = one sample per half-degree of the unit period.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FOURIER_FIT_SAMPLES = 720;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ColorResolver } from "../../../composables/color";
|
|
2
2
|
export { default as FourierField } from "./FourierField.vue";
|
|
3
|
-
export { comp, positionsAt, dftFromPoints, makeEllipticSpectrum, type BasisComponent, type EllipticSpectrumOptions, } from "./math";
|
|
3
|
+
export { comp, positionsAt, partialSumAt, dftFromPoints, makeEllipticSpectrum, type BasisComponent, type EllipticSpectrumOptions, } from "./math";
|
|
4
4
|
/** The configuration-BUNDLE axis — `hero` (epicycles on, fewer harmonics) vs
|
|
5
5
|
* `final` (epicycles off, denser). Not a recolour of one curve; one engine,
|
|
6
6
|
* two presets. */
|
|
@@ -23,6 +23,23 @@ export declare function comp(index: number, re: number, im: number): BasisCompon
|
|
|
23
23
|
* carries).
|
|
24
24
|
*/
|
|
25
25
|
export declare function positionsAt(components: BasisComponent[], t: number, maxCircles?: number): [number, number][];
|
|
26
|
+
/**
|
|
27
|
+
* The PARTIAL-SUM curve point at parameter `t` over the FIRST `maxTerms` phasors
|
|
28
|
+
* — the inverse-DFT truncated summation `Σ_{k<maxTerms} c_k * exp(2*pi*i*k*t)`.
|
|
29
|
+
* It is {@link positionsAt} truncated at `maxTerms` and read at the FINAL tip:
|
|
30
|
+
* the single curve POINT (not the whole chain). The truncation axis is the SAME
|
|
31
|
+
* one `positionsAt`'s `maxCircles` arg drives — `maxCircles` reads the whole
|
|
32
|
+
* chain truncated, `partialSumAt` reads only its endpoint — so the studio's
|
|
33
|
+
* N-harmonics slider can draw the assembling chain (`positionsAt(.., N)`) AND the
|
|
34
|
+
* resolving curve point (`partialSumAt(.., t, N)`) off the ONE axis. Sweeping `t`
|
|
35
|
+
* over `[0,1)` and joining the points traces the partial-sum CURVE: at `maxTerms`
|
|
36
|
+
* = 1 a single ellipse, growing toward the full reconstruction as `maxTerms`
|
|
37
|
+
* climbs to `components.length` (the reference's "watch it sum" beauty).
|
|
38
|
+
*
|
|
39
|
+
* `maxTerms` omitted (or ≥ `components.length`) is the full reconstruction — the
|
|
40
|
+
* same point `positionsAt(components, t)` returns at its final tip.
|
|
41
|
+
*/
|
|
42
|
+
export declare function partialSumAt(components: BasisComponent[], t: number, maxTerms?: number): [number, number];
|
|
26
43
|
/**
|
|
27
44
|
* The forward DFT — the inverse of {@link positionsAt}. Takes a closed sequence
|
|
28
45
|
* of `[x, y]` samples around a curve (treated as the complex signal `x + i·y`,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type GlassTier } from "../../../composables/glass/useGlassRenderer";
|
|
2
|
+
import { type Surface } from "../../ui/_shared/useSurfaceAxis";
|
|
2
3
|
/**
|
|
3
4
|
* Surface-tier vocabulary for the CSS rendering branch. Mirrors the v0.8
|
|
4
5
|
* five-rung ladder declared in `tokens.css §8` and consumed by the
|
|
@@ -18,6 +19,12 @@ export interface GlassPanelProps {
|
|
|
18
19
|
chromaticAberration?: boolean;
|
|
19
20
|
/** Glass surface tier for the CSS rendering branch (v0.8 5-rung ladder). */
|
|
20
21
|
variant?: GlassPanelVariant;
|
|
22
|
+
/** Surface decoration register (BA.W-SURFACE-AXIS) — the SHARED
|
|
23
|
+
* {glass·veil·opaque} axis. `glass` (default) renders the variant's plain
|
|
24
|
+
* glass rung; `veil` overlays the borderless/rimless text-legibility plate;
|
|
25
|
+
* `opaque` sets `--glass-level:0` (the solid-card escape). Orthogonal to
|
|
26
|
+
* `variant`/`tier`, exactly as `surface` is on `<Card>`. */
|
|
27
|
+
surface?: Surface;
|
|
21
28
|
/** Additional classes */
|
|
22
29
|
class?: string;
|
|
23
30
|
}
|
|
@@ -26,8 +33,9 @@ type __VLS_Slots = {} & {
|
|
|
26
33
|
default?: (props: typeof __VLS_1) => any;
|
|
27
34
|
};
|
|
28
35
|
declare const __VLS_base: import("vue").DefineComponent<GlassPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<GlassPanelProps> & Readonly<{}>, {
|
|
29
|
-
variant: GlassPanelVariant;
|
|
30
36
|
blur: number;
|
|
37
|
+
variant: GlassPanelVariant;
|
|
38
|
+
surface: Surface;
|
|
31
39
|
refraction: number;
|
|
32
40
|
chromaticAberration: boolean;
|
|
33
41
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -4,8 +4,10 @@ import type { BlobMood, BlobConfig } from "./types";
|
|
|
4
4
|
*
|
|
5
5
|
* Renders a pulsing SDF body with orbiting satellites that periodically merge in,
|
|
6
6
|
* get absorbed, then re-emerge. Mood, pointer-attraction and a deterministic
|
|
7
|
-
* satellite system drive the motion. The renderer composes the `
|
|
8
|
-
*
|
|
7
|
+
* satellite system drive the motion. The renderer composes the `createGpuSubstrate`
|
|
8
|
+
* picker — the WebGPU-first `metaball.wgsl` primary OR the WebGL2 `metaball.frag`
|
|
9
|
+
* fallback (BB.W-VIZ-SUITE / W-GOOBLOB-WGPU), selected once by `navigator.gpu`
|
|
10
|
+
* feature-detect; it never bootstraps its own context.
|
|
9
11
|
*
|
|
10
12
|
* Color is resolved INTERNALLY through the `/color` leaf (`cssToOklch →
|
|
11
13
|
* oklchToGammaRgb`): the blob paints the GAMMA-sRGB triple of the `color` prop. A
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { BlobConfig } from "../types";
|
|
2
|
+
import type { BlobPointer } from "./useBlobPointer";
|
|
3
|
+
import type { BlobSatelliteSystem } from "./useBlobSatellites";
|
|
4
|
+
import type { BlobFrameState } from "./uploadBlobUniforms";
|
|
5
|
+
/** The total uniform-buffer byte size (16-aligned). */
|
|
6
|
+
export declare const BLOB_WGPU_UNIFORM_BYTES: number;
|
|
7
|
+
/**
|
|
8
|
+
* The packed scratch buffer + the dual ArrayBuffer views. A frame refills this in place
|
|
9
|
+
* (no per-frame allocation) — mirroring the GLSL bridge's per-frame `gl.uniformNf` writes.
|
|
10
|
+
*/
|
|
11
|
+
export interface BlobWGPUUniformScratch {
|
|
12
|
+
buffer: ArrayBuffer;
|
|
13
|
+
f32: Float32Array;
|
|
14
|
+
i32: Int32Array;
|
|
15
|
+
}
|
|
16
|
+
export declare function createBlobWGPUUniformScratch(): BlobWGPUUniformScratch;
|
|
17
|
+
/**
|
|
18
|
+
* Pack the resolved blob frame state into the uniform scratch buffer. The byte layout
|
|
19
|
+
* mirrors the WGSL `Uniforms` struct EXACTLY, and the resolved-value math is the
|
|
20
|
+
* BYTE-IDENTICAL twin of `uploadBlobUniforms.ts` (the same `* 0.5 * POS_SCALE` mapping,
|
|
21
|
+
* the same `reachFactor`/`orbitWiden`/`maxReach` derivations). Returns the same scratch
|
|
22
|
+
* (the caller `queue.writeBuffer`s `scratch.buffer`).
|
|
23
|
+
*/
|
|
24
|
+
export declare function packBlobWGPUUniforms(scratch: BlobWGPUUniformScratch, canvas: HTMLCanvasElement, config: BlobConfig, pointer: BlobPointer, satellites: BlobSatelliteSystem, frame: BlobFrameState): BlobWGPUUniformScratch;
|
|
@@ -24,24 +24,41 @@ export interface UseMetaballRendererOptions {
|
|
|
24
24
|
satellites: BlobSatelliteSystem;
|
|
25
25
|
config: BlobConfig;
|
|
26
26
|
}
|
|
27
|
-
/** The renderer's public control surface — pause/resume the demand loop. */
|
|
27
|
+
/** The renderer's public control surface — pause/resume + wake the demand loop. */
|
|
28
28
|
export interface UseMetaballRendererReturn {
|
|
29
29
|
pause: () => void;
|
|
30
30
|
resume: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* BA.W-GOO-REDRESS — re-arm the demand-parked loop on demand (the public twin
|
|
33
|
+
* of the internal `color`/`paletteStops` wake watchers). The SFC's pointer-wake
|
|
34
|
+
* wire calls this so a first hover over a fully-parked blob (all satellites
|
|
35
|
+
* orbiting → the AX.W16 quiescence gate has parked the rAF) repaints on the
|
|
36
|
+
* SAME frame instead of waiting up to an orbit horizon for the next scheduled
|
|
37
|
+
* satellite wake (root cause 2 / BA-goo-3). It is the EXISTING substrate wake
|
|
38
|
+
* handle — NO new rAF, NO second wake path (the single-substrate-loop invariant).
|
|
39
|
+
*/
|
|
40
|
+
wake: () => void;
|
|
31
41
|
}
|
|
32
42
|
/**
|
|
33
|
-
* The GooBlob
|
|
43
|
+
* The GooBlob renderer — composes the `createGpuSubstrate` picker (BB.W-VIZ-SUITE /
|
|
44
|
+
* W-GOOBLOB-WGPU): the WebGPU-first `metaball.wgsl` primary OR the WebGL2
|
|
45
|
+
* `metaball.frag.ts` fallback, selected ONCE by `navigator.gpu` feature-detect. Both
|
|
46
|
+
* backends compose the SAME `createCanvasLifecycle` leaf (AU.W6), so the demand-driven
|
|
47
|
+
* scheduling + offscreen-park + live-PRM-freeze are byte-identical across backends.
|
|
34
48
|
*
|
|
35
|
-
* This module owns ONLY the metaball-specific concerns: compiling the shader,
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
49
|
+
* This module owns ONLY the metaball-specific concerns: compiling the shader, building
|
|
50
|
+
* the quad + uniform cache (the WebGL2 `buildMetaballProgram` leaf) OR the WGSL pipeline
|
|
51
|
+
* + the typed-struct uniform buffer (the WGSL `createBlobWGPUSetup` leaf), and the
|
|
52
|
+
* per-frame SIMULATION advance + uniform upload derived from the mood / pointer /
|
|
53
|
+
* satellite systems and the resolved base color. The simulation advance is SHARED — the
|
|
54
|
+
* `resolveFrame(timeSec)` closure advances the systems and returns the settled
|
|
55
|
+
* `BlobFrameState`; the WebGL2 `drawFrame` and the WGSL `frame` both call it, so the
|
|
56
|
+
* physics is substrate-agnostic and only the upload+draw leg differs. The generic
|
|
57
|
+
* lifecycle (context creation, the suspend/resume model, the demand-driven rAF loop, the
|
|
58
|
+
* tab-visibility owner, the ResizeObserver, and the context-loss self-heal) lives in the
|
|
59
|
+
* substrate; this renderer threads its behaviour through the substrate's
|
|
60
|
+
* `setupGL`/`setupWGPU`/`frame`/`shouldContinue`/`resize`/`teardown` callbacks. It does
|
|
61
|
+
* NOT call `getContext("webgl2")`/`navigator.gpu` itself (the single-bootstrap contract).
|
|
45
62
|
*
|
|
46
63
|
* Color is resolved INTERNALLY through the `/color` leaf (`cssToOklch →
|
|
47
64
|
* oklchToGammaRgb`) — the GAMMA-sRGB triple fed straight into the base-color uniform
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { WebGPUCanvasFrame } from "../../../../composables/glass/webgpu/useWebGPUCanvas";
|
|
2
|
+
import type { BlobConfig } from "../types";
|
|
3
|
+
import type { BlobPointer } from "./useBlobPointer";
|
|
4
|
+
import type { BlobSatelliteSystem } from "./useBlobSatellites";
|
|
5
|
+
import type { BlobFrameState } from "./uploadBlobUniforms";
|
|
6
|
+
export interface BlobWGPUSetupDeps {
|
|
7
|
+
canvas: HTMLCanvasElement;
|
|
8
|
+
config: BlobConfig;
|
|
9
|
+
pointer: BlobPointer;
|
|
10
|
+
satellites: BlobSatelliteSystem;
|
|
11
|
+
/** Resolve the per-frame state (advances the sim, returns the settled values). */
|
|
12
|
+
resolveFrame: (timeSec: number) => BlobFrameState | null;
|
|
13
|
+
/** Demand-gate (the renderer's quiescence layer — substrate-agnostic). */
|
|
14
|
+
shouldContinue: () => boolean;
|
|
15
|
+
/** Reduced-motion read (the substrate owns the query; the renderer drives tempo). */
|
|
16
|
+
getReducedMotion: () => boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Build the goo-blob `setupWGPU(device, context, format)` callback. Closes over the
|
|
20
|
+
* blob-specific state (config/pointer/satellites + the renderer's resolveFrame) — the
|
|
21
|
+
* same closures the WebGL2 `setup` threads.
|
|
22
|
+
*/
|
|
23
|
+
export declare function createBlobWGPUSetup(deps: BlobWGPUSetupDeps): (device: GPUDevice, context: GPUCanvasContext, format: GPUTextureFormat) => WebGPUCanvasFrame;
|
|
@@ -42,7 +42,12 @@ export declare const PULSE_OMEGA = 18;
|
|
|
42
42
|
export declare const PULSE_ZETA = 0.35;
|
|
43
43
|
/** The at-rest epsilon — velocity/position below this is "settled" (the park gate). */
|
|
44
44
|
export declare const REST_EPS = 0.001;
|
|
45
|
-
|
|
45
|
+
export declare const ORBIT_RANDOM_BASE = 0.85;
|
|
46
|
+
export declare const ORBIT_RANDOM_SPAN = 0.2;
|
|
47
|
+
export declare const SAT_WOBBLE1_BASE = 0.015;
|
|
48
|
+
export declare const SAT_WOBBLE1_SPAN = 0.02;
|
|
49
|
+
export declare const SAT_WOBBLE2_BASE = 0.01;
|
|
50
|
+
export declare const SAT_WOBBLE2_SPAN = 0.015;
|
|
46
51
|
export declare const BASE_OPACITY = 0.75;
|
|
47
52
|
/** Duration (ms) to blend from emerge endpoint into live orbit — eliminates snap. */
|
|
48
53
|
export declare const ORBIT_BLEND_MS = 2000;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const METABALL_WGSL = "\nconst MAX_SATS: i32 = 4;\nconst TRAIL_N: i32 = 15;\nconst MAX_BLOB_STOPS: i32 = 4;\nconst PI: f32 = 3.141592653589793;\nconst FBM_LACUNARITY: f32 = 1.8;\nconst FBM_GAIN: f32 = 0.42;\n\n// \u2500\u2500 Uniforms (the typed-struct source-of-truth \u2014 see uniformBridgeWGPU.ts) \u2500\u2500\n// Scalars packed into vec4 lanes; per-satellite / per-trail / per-palette rows packed\n// into a vec4 so the array stride is the natural 16 bytes (no std140 stride trap \u2014 the\n// parity-blowout suspect the wave's \u00A7Triumvirate names).\nstruct Uniforms {\n // s0: (uTime, uBodyRadius, uPulsePhase, uPulseAmp)\n s0: vec4<f32>,\n // s1: (uNoiseAmp, uNoiseFreq, uNoiseSpeed, uWarpAmp)\n s1: vec4<f32>,\n // s2: (uSmoothK, uMerge, uMaxReach, uLit)\n s2: vec4<f32>,\n // s3: (uSpecStrength, uSpecShininess, uRimPower, uRimStrength)\n s3: vec4<f32>,\n // s4: (uIridescence, uIridHue, uIridSpeed, uSssScale)\n s4: vec4<f32>,\n // s5: (uSssPower, uCoreGlow, uHueRange, uSatShift)\n s5: vec4<f32>,\n // s6: (uBrightnessShift, uColorNoiseFreq, uColorNoiseSpeed, uStretch)\n s6: vec4<f32>,\n // s7: (uPointerActive, uPointerAttraction, uPointerStrength, _pad)\n s7: vec4<f32>,\n // ptr: (uPointer.x, uPointer.y, uVelocity.x, uVelocity.y)\n ptr: vec4<f32>,\n // base: (uBaseColor.rgb, _pad)\n base: vec4<f32>,\n // rim: (uRimColor.rgb, _pad)\n rim: vec4<f32>,\n // light: (uLightDir.xyz, _pad)\n light: vec4<f32>,\n // res: (uResolution.x, uResolution.y, _pad, _pad)\n res: vec4<f32>,\n // ints: (uStopCount, uSatCount, uTrailCount, _pad)\n ints: vec4<i32>,\n palette: array<vec4<f32>, 4>,\n satPos: array<vec4<f32>, 4>, // (pos.x, pos.y, radius, opacity)\n trailPos: array<vec4<f32>, 15>, // (pos.x, pos.y, radius, _pad)\n};\n\n@group(0) @binding(0) var<uniform> u: Uniforms;\n\n// \u2500\u2500 Noise (blob-LOCAL 3D-p3 hash + IQ analytic-derivative gradient noise) \u2500\u2500\nfn hash21(p: vec2<f32>) -> f32 {\n var p3 = fract(vec3<f32>(p.x, p.y, p.x) * 0.1031);\n p3 = p3 + dot(p3, p3.yzx + 33.33);\n return fract((p3.x + p3.y) * p3.z);\n}\n\n// IQ analytic-derivative gradient noise \u2014 value in .x, ANALYTIC gradient (d/dx, d/dy) in\n// .yz, from one eval. The quintic fade has a continuous 2nd derivative.\nfn noised(p: vec2<f32>) -> vec3<f32> {\n let i = floor(p);\n let f = fract(p);\n let uu = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);\n let du = 30.0 * f * f * (f * (f - 2.0) + 1.0);\n\n let ga = -1.0 + 2.0 * vec2<f32>(hash21(i + vec2<f32>(0.0, 0.0)), hash21(i + vec2<f32>(7.3, 0.0)));\n let gb = -1.0 + 2.0 * vec2<f32>(hash21(i + vec2<f32>(1.0, 0.0)), hash21(i + vec2<f32>(8.3, 0.0)));\n let gc = -1.0 + 2.0 * vec2<f32>(hash21(i + vec2<f32>(0.0, 1.0)), hash21(i + vec2<f32>(7.3, 1.0)));\n let gd = -1.0 + 2.0 * vec2<f32>(hash21(i + vec2<f32>(1.0, 1.0)), hash21(i + vec2<f32>(8.3, 1.0)));\n\n let va = dot(ga, f - vec2<f32>(0.0, 0.0));\n let vb = dot(gb, f - vec2<f32>(1.0, 0.0));\n let vc = dot(gc, f - vec2<f32>(0.0, 1.0));\n let vd = dot(gd, f - vec2<f32>(1.0, 1.0));\n\n let n = va + uu.x * (vb - va) + uu.y * (vc - va) + uu.x * uu.y * (va - vb - vc + vd);\n let value = 0.5 + 0.5 * n;\n\n let grad =\n ga + uu.x * (gb - ga) + uu.y * (gc - ga) + uu.x * uu.y * (ga - gb - gc + gd) +\n du * (vec2<f32>(uu.y, uu.x) * (va - vb - vc + vd) + vec2<f32>(vb, vc) - va);\n return vec3<f32>(value, 0.5 * grad);\n}\n\nconst FBM_ROT: mat2x2<f32> = mat2x2<f32>(0.8, 0.6, -0.6, 0.8);\n\nfn fbm(p0: vec2<f32>, octaves: i32) -> f32 {\n var value = 0.0;\n var amp = 0.5;\n var freq = 1.0;\n var p = p0;\n for (var i = 0; i < 4; i = i + 1) {\n if (i >= octaves) { break; }\n value = value + amp * noised(p * freq).x;\n p = FBM_ROT * p;\n freq = freq * FBM_LACUNARITY;\n amp = amp * FBM_GAIN;\n }\n return value;\n}\n\n// FBM with ANALYTIC GRADIENT \u2014 value in .x, \u2202/\u2202x, \u2202/\u2202y in .yz. The gradient accumulates\n// noised()'s analytic gradient per octave, chain-ruled through the per-octave frequency\n// scale AND the FBM_ROT rotation (the keystone feed for the analytic surface normal).\nfn fbmG(p: vec2<f32>, octaves: i32) -> vec3<f32> {\n var value = 0.0;\n var grad = vec2<f32>(0.0, 0.0);\n var amp = 0.5;\n var freq = 1.0;\n var rotAccum = mat2x2<f32>(1.0, 0.0, 0.0, 1.0);\n var pp = p;\n for (var i = 0; i < 4; i = i + 1) {\n if (i >= octaves) { break; }\n let n = noised(pp * freq);\n value = value + amp * n.x;\n grad = grad + amp * freq * (transpose(rotAccum) * n.yz);\n pp = FBM_ROT * pp;\n freq = freq * FBM_LACUNARITY;\n amp = amp * FBM_GAIN;\n rotAccum = FBM_ROT * rotAccum;\n }\n return vec3<f32>(value, grad);\n}\n\n// One domain-warp pass with the ANALYTIC GRADIENT carried (warp-Jacobian approximation).\nfn fbmWarpedG(p: vec2<f32>, octaves: i32, warpAmp: f32) -> vec3<f32> {\n if (warpAmp <= 0.0) { return fbmG(p, octaves); }\n let q = vec2<f32>(fbm(p + vec2<f32>(0.0, 0.0), octaves),\n fbm(p + vec2<f32>(5.2, 1.3), octaves));\n return fbmG(p + warpAmp * (q - 0.5), octaves);\n}\n\n// \u2500\u2500 SDF body (value+gradient circle + the IQ normalized smin, value+gradient form) \u2500\u2500\nfn sdgCircle(p: vec2<f32>, center: vec2<f32>, radius: f32) -> vec3<f32> {\n let d = p - center;\n let len = length(d);\n var grad = vec2<f32>(0.0, 1.0);\n if (len > 1e-6) { grad = d / len; }\n return vec3<f32>(len - radius, grad);\n}\n\nfn sminQuadraticG(a: vec3<f32>, b: vec3<f32>, k0: f32) -> vec3<f32> {\n let k = k0 * 4.0;\n let h = max(k - abs(a.x - b.x), 0.0) / k;\n let m = h * h * k * 0.25;\n var w = 1.0 - 0.5 * h * h;\n if (a.x < b.x) { w = 0.5 * h * h; }\n let dist = min(a.x, b.x) - m;\n let grad = mix(a.yz, b.yz, w);\n return vec3<f32>(dist, grad);\n}\n\nfn sminCircularG(a: vec3<f32>, b: vec3<f32>, k0: f32) -> vec3<f32> {\n let k = k0 * (1.0 / (1.0 - sqrt(0.5)));\n let h = max(k - abs(a.x - b.x), 0.0) / k;\n let m = k * 0.5 * (1.0 + h - sqrt(1.0 - h * (h - 2.0)));\n var w = 1.0 - 0.5 * h;\n if (a.x < b.x) { w = 0.5 * h; }\n let dist = min(a.x, b.x) - m;\n let grad = mix(a.yz, b.yz, w);\n return vec3<f32>(dist, grad);\n}\n\nfn sminG(a: vec3<f32>, b: vec3<f32>, k: f32) -> vec3<f32> {\n if (u.s2.y > 0.5) { return sminCircularG(a, b, k); }\n return sminQuadraticG(a, b, k);\n}\n\n\nfn srgbToLinearCh(c: f32) -> f32 {\n if (c <= 0.04045) { return c / 12.92; }\n return pow((c + 0.055) / 1.055, 2.4);\n}\nfn srgbToLinear(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfn linearToSrgbCh(c: f32) -> f32 {\n if (c <= 0.0031308) { return c * 12.92; }\n return 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nfn linearToSrgb(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}\n\n// value.js LINEAR_SRGB_TO_LMS, row-major \u2192 WGSL columns (= the transpose).\nconst LINEAR_SRGB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 0.4122214708, 0.2119034982, 0.0883024619,\n 0.5363325363, 0.6806995451, 0.2817188376,\n 0.0514459929, 0.1073969566, 0.6299787005\n);\n\n// value.js srgbToOKLab's INLINE LMS\u2192OKLab coefficients, row-major \u2192 WGSL columns.\nconst LMS_TO_OKLAB: mat3x3<f32> = mat3x3<f32>(\n 0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660\n);\n\n// value.js OKLAB_TO_LMS_COEFF, row-major \u2192 WGSL columns.\nconst OKLAB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480\n);\n\n// value.js LMS_TO_LINEAR_SRGB, row-major \u2192 WGSL columns.\nconst LMS_TO_LINEAR_SRGB: mat3x3<f32> = mat3x3<f32>(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\nfn cbrt3(v: vec3<f32>) -> vec3<f32> {\n return sign(v) * pow(abs(v), vec3<f32>(1.0 / 3.0));\n}\n\n// Gamma sRGB \u2192 raw OKLab (L, a, b). Mirrors value.js srgbToOKLab.\nfn srgbToOklab(c: vec3<f32>) -> vec3<f32> {\n let lin = srgbToLinear(c);\n let lms = LINEAR_SRGB_TO_LMS * lin;\n return LMS_TO_OKLAB * cbrt3(lms);\n}\n\n// Raw OKLab (L, a, b) \u2192 linear sRGB. Mirrors value.js oklabToLinearSRGB.\nfn oklabToLinearSrgb(lab: vec3<f32>) -> vec3<f32> {\n let lms_ = OKLAB_TO_LMS * lab;\n let lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\n\n// OKLab \u2192 OKLCh: H in RADIANS, folded to [0, 2pi). Mirrors value.js rawOklabToOklch.\nfn oklabToOklch(lab: vec3<f32>) -> vec3<f32> {\n let C = length(lab.yz);\n var H = atan2(lab.z, lab.y);\n if (H < 0.0) { H = H + 2.0 * PI; }\n return vec3<f32>(lab.x, C, H);\n}\n\n// OKLCh (H radians) \u2192 OKLab. Mirrors value.js rawOklchToOklab.\nfn oklchToOklab(lch: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}\n\n// \u2500\u2500 OKLCh gamut clamp (hue-preserving inward chroma clamp \u2014 blob-local) \u2500\u2500\nfn inGamut(lin: vec3<f32>) -> bool {\n return all(lin >= vec3<f32>(0.0)) && all(lin <= vec3<f32>(1.0));\n}\nfn gamutClampOklch(lch: vec3<f32>) -> vec3<f32> {\n let lin = oklabToLinearSrgb(oklchToOklab(lch));\n if (inGamut(lin)) { return lch; }\n var lo = 0.0;\n var hi = lch.y;\n for (var i = 0; i < 16; i = i + 1) {\n let mid = 0.5 * (lo + hi);\n let test = vec3<f32>(lch.x, mid, lch.z);\n if (inGamut(oklabToLinearSrgb(oklchToOklab(test)))) { lo = mid; } else { hi = mid; }\n }\n return vec3<f32>(lch.x, lo, lch.z);\n}\n\n// AX.W15 \u2014 de-synced breath (three DETUNED sines at irrational ratios).\nfn breath(phase: f32) -> f32 {\n return (sin(phase) + 0.5 * sin(phase * 1.4444 + 1.7) + 0.28 * sin(phase * 0.31 + 4.1)) / 1.78;\n}\n\n// AX.W15 \u2014 the composite SDF field WITH its ANALYTIC GRADIENT vec3(dist, \u2202/\u2202x, \u2202/\u2202y).\nfn sceneDistG(uv: vec2<f32>) -> vec3<f32> {\n let uBodyRadius = u.s0.y;\n let uPulsePhase = u.s0.z;\n let uPulseAmp = u.s0.w;\n let uNoiseAmp = u.s1.x;\n let uNoiseFreq = u.s1.y;\n let uNoiseSpeed = u.s1.z;\n let uWarpAmp = u.s1.w;\n let uSmoothK = u.s2.x;\n let uTime = u.s0.x;\n let uVelocity = u.ptr.zw;\n let uStretch = u.s6.w;\n let uSatCount = u.ints.y;\n let uTrailCount = u.ints.z;\n\n let bodyR = uBodyRadius + breath(uPulsePhase) * uPulseAmp;\n\n // Velocity-driven VOLUME-PRESERVING squash-and-stretch (tanh-saturated).\n var bodyUv = uv;\n var ax = vec2<f32>(1.0, 0.0);\n var perp = vec2<f32>(0.0, 1.0);\n var sa = 1.0;\n let speed = length(uVelocity);\n let squashed = uStretch > 0.0 && speed > 1e-4;\n if (squashed) {\n ax = uVelocity / speed;\n perp = vec2<f32>(-ax.y, ax.x);\n sa = 1.0 + tanh(speed * 1.6) * uStretch;\n bodyUv = vec2<f32>(dot(uv, ax) / sa, dot(uv, perp) * sa);\n }\n\n // Domain-warped FBM displacement WITH its analytic gradient.\n let fbmv = fbmWarpedG(bodyUv * uNoiseFreq + uTime * uNoiseSpeed, 3, uWarpAmp);\n let bodyDisplacement = (fbmv.x - 0.5) * uNoiseAmp;\n let dispGradBody = uNoiseAmp * uNoiseFreq * fbmv.yz;\n\n let bodyG = sdgCircle(bodyUv, vec2<f32>(0.0), bodyR + bodyDisplacement);\n let bodyGradBody = bodyG.yz - dispGradBody;\n\n var bodyGradUv: vec2<f32>;\n if (squashed) {\n let scaled = vec2<f32>(bodyGradBody.x / sa, bodyGradBody.y * sa);\n bodyGradUv = scaled.x * ax + scaled.y * perp;\n } else {\n bodyGradUv = bodyGradBody;\n }\n var d = vec3<f32>(bodyG.x, bodyGradUv);\n\n // Satellites \u2014 smin-merged into the body.\n for (var i = 0; i < MAX_SATS; i = i + 1) {\n if (i >= uSatCount) { break; }\n let s = u.satPos[i];\n var satG = sdgCircle(uv, s.xy, s.z);\n satG.x = satG.x + (1.0 - s.w) * 0.3;\n d = sminG(d, satG, uSmoothK);\n }\n\n // Pointer trail \u2014 a decaying-radius pseudopod.\n for (var i = 0; i < TRAIL_N; i = i + 1) {\n if (i >= uTrailCount) { break; }\n let tp = u.trailPos[i];\n let trailG = sdgCircle(uv, tp.xy, tp.z);\n d = sminG(d, trailG, uSmoothK);\n }\n return d;\n}\n\n// AX.W15 \u2014 the analytic surface normal from the field gradient.\nfn surfaceNormalFromGrad(grad2d: vec2<f32>, d: f32, bodyR: f32) -> vec3<f32> {\n let g = normalize(grad2d + vec2<f32>(1e-6));\n let interior = clamp(-d / max(bodyR, 1e-4), 0.0, 1.0);\n let z = sqrt(max(0.0, 1.0 - (1.0 - interior) * (1.0 - interior)));\n return normalize(vec3<f32>(g * (1.0 - z), z) + vec3<f32>(0.0, 0.0, 1e-6));\n}\n\n// W11.b \u2014 sample the multi-stop palette at t, OKLab mix + midpoint chroma-bump. Returns\n// an OKLCh stop [L, C, h(rad)]. Falls back to uBaseColor when uStopCount <= 1.\nfn samplePaletteOklch(t: f32) -> vec3<f32> {\n let uStopCount = u.ints.x;\n if (uStopCount <= 1) { return oklabToOklch(srgbToOklab(u.base.rgb)); }\n let n = f32(uStopCount);\n let ft = clamp(t, 0.0, 1.0) * (n - 1.0);\n let i0 = i32(floor(ft));\n let i1 = min(i0 + 1, uStopCount - 1);\n let f = ft - f32(i0);\n let labA = srgbToOklab(u.palette[i0].rgb);\n let labB = srgbToOklab(u.palette[i1].rgb);\n let lab = mix(labA, labB, f);\n var lch = oklabToOklch(lab);\n lch.y = lch.y + 0.03 * sin(PI * f);\n return lch;\n}\n\n// \u2500\u2500 Full-screen triangle vertex stage (the pilot idiom \u2014 no vertex buffer) \u2500\u2500\nstruct VSOut {\n @builtin(position) pos: vec4<f32>,\n @location(0) uv: vec2<f32>,\n};\n\n@vertex\nfn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {\n var p = vec2<f32>(-1.0, -1.0);\n if (vi == 1u) { p = vec2<f32>(3.0, -1.0); }\n else if (vi == 2u) { p = vec2<f32>(-1.0, 3.0); }\n var out: VSOut;\n out.pos = vec4<f32>(p, 0.0, 1.0);\n // vUv = aPos * 0.5 + 0.5 (the metaball.vert convention).\n out.uv = p * 0.5 + 0.5;\n return out;\n}\n\n// \u2500\u2500 Fragment stage (the main() transcription) \u2500\u2500\n@fragment\nfn fs_main(in: VSOut) -> @location(0) vec4<f32> {\n let uTime = u.s0.x;\n let uBodyRadius = u.s0.y;\n let uPulsePhase = u.s0.z;\n let uPulseAmp = u.s0.w;\n let uMaxReach = u.s2.z;\n let uLit = u.s2.w;\n let uPointerActive = u.s7.x;\n let uPointerAttraction = u.s7.y;\n let uPointerStrength = u.s7.z;\n let uPointer = u.ptr.xy;\n let uHueRange = u.s5.z;\n let uSatShift = u.s5.w;\n let uBrightnessShift = u.s6.x;\n let uColorNoiseFreq = u.s6.y;\n let uColorNoiseSpeed = u.s6.z;\n let uIridescence = u.s4.x;\n let uIridHue = u.s4.y;\n let uIridSpeed = u.s4.z;\n let uSssScale = u.s4.w;\n let uSssPower = u.s5.x;\n let uCoreGlow = u.s5.y;\n let uSpecStrength = u.s3.x;\n let uSpecShininess = u.s3.y;\n let uRimPower = u.s3.z;\n let uRimStrength = u.s3.w;\n let uLightDir = u.light.xyz;\n let uRimColor = u.rim.rgb;\n\n var uv = in.uv - 0.5;\n\n // PRE-FBM bounding early-out \u2014 transparent WRITE (not a discard).\n if (dot(uv, uv) > uMaxReach * uMaxReach) {\n return vec4<f32>(0.0);\n }\n\n // Pointer deformation \u2014 sign per AY.W-BLOB-CONFIG D2.\n if (uPointerActive > 0.5) {\n let pointerDir = uPointer - uv;\n let pointerDist = length(pointerDir);\n let influence = smoothstep(0.5, 0.0, pointerDist) * uPointerAttraction * uPointerStrength;\n uv = uv + normalize(pointerDir + vec2<f32>(1e-6)) * influence;\n }\n\n let bodyR = uBodyRadius + breath(uPulsePhase) * uPulseAmp;\n\n // Composite domain-warped membrane field WITH its analytic gradient.\n let scene = sceneDistG(uv);\n let d = scene.x;\n let fieldGrad = scene.yz;\n\n // \u2500\u2500 fwidth SITE #1 (metaball.frag.ts line 266) \u2014 AA-edge half-width from the SDF\n // screen-space gradient. The WGSL fragment-stage fwidth() transcription. \u2500\u2500\n let aa = max(fwidth(d), 1e-6);\n let alpha = 1.0 - smoothstep(-aa, aa, d);\n\n if (alpha < 0.001) {\n return vec4<f32>(0.0);\n }\n\n // Edit #4 \u2014 perceptually-uniform OKLCh variation.\n let colorNoise = fbm(uv * uColorNoiseFreq + uTime * uColorNoiseSpeed, 3);\n var oklch = samplePaletteOklch(colorNoise);\n\n oklch.z = oklch.z + (colorNoise - 0.5) * uHueRange * (PI / 180.0);\n oklch.y = max(oklch.y + (colorNoise - 0.5) * uSatShift, 0.0);\n oklch.x = clamp(oklch.x + uBrightnessShift, 0.0, 1.0);\n\n let N = surfaceNormalFromGrad(fieldGrad, d, bodyR);\n let V = vec3<f32>(0.0, 0.0, 1.0);\n let thickness = clamp(-d / max(bodyR, 1e-4), 0.0, 1.0);\n let fres = pow(1.0 - max(dot(N, V), 0.0), 2.5);\n\n // \u2500\u2500 W11.a iridescence \u2014 warm-biased IQ cosine palette driving OKLCh HUE \u2500\u2500\n if (uIridescence > 0.0) {\n let t = fres + 0.3 * colorNoise + uTime * uIridSpeed;\n let iridHue = uIridHue + 0.18 * PI * cos(2.0 * PI * t);\n let w = fres * uIridescence;\n oklch.z = mix(oklch.z, iridHue, w);\n oklch.y = min(oklch.y + 0.04 * w, oklch.y + 0.08);\n oklch.x = min(oklch.x + 0.05 * w, 1.0);\n }\n\n // \u2500\u2500 W11.a fake subsurface translucency \u2014 thickness inner-glow + back-light \u2500\u2500\n if (uCoreGlow > 0.0 || uSssScale > 0.0) {\n oklch.x = min(oklch.x + uCoreGlow * (1.0 - exp(-3.0 * thickness)), 1.0);\n let L = normalize(uLightDir + vec3<f32>(1e-6));\n let back = pow(clamp(dot(V, -(L + N * thickness)), 0.0, 1.0), uSssPower);\n let sss = back * uSssScale * (1.0 - thickness);\n oklch.x = min(oklch.x + sss, 1.0);\n oklch.z = oklch.z + sss * 0.1 * (1.0 - thickness);\n }\n\n oklch = gamutClampOklch(oklch);\n\n var lin = oklabToLinearSrgb(oklchToOklab(oklch));\n\n // \u2500\u2500 W9.b lit glass surface \u2014 Blinn-Phong glint + Fresnel rim, in LINEAR \u2500\u2500\n if (uLit > 0.5) {\n let L = normalize(uLightDir + vec3<f32>(1e-6));\n let H = normalize(L + V);\n\n let warmCream = oklabToLinearSrgb(oklchToOklab(vec3<f32>(0.97, 0.03, radians(85.0))));\n\n // \u2500\u2500 fwidth SITE #2 (metaball.frag.ts line 364) \u2014 Toksvig normal-variance\n // specular clamp. The WGSL fragment-stage fwidth() of the surface normal. \u2500\u2500\n let nVar = length(fwidth(N));\n let shininess = uSpecShininess / (1.0 + 24.0 * nVar);\n let energyNorm = (shininess + 2.0) / 8.0;\n let spec = pow(max(dot(N, H), 0.0), shininess) * uSpecStrength * energyNorm;\n\n var rimOkl = oklabToOklch(srgbToOklab(uRimColor));\n let bodyL = oklch.x;\n let dL = abs(rimOkl.x - bodyL);\n let lack = clamp((0.22 - dL) / 0.22, 0.0, 1.0);\n var target = 0.18;\n if (bodyL < 0.5) { target = 0.92; }\n rimOkl.x = clamp(mix(rimOkl.x, target, lack), 0.0, 1.0);\n rimOkl.y = rimOkl.y * mix(1.0, 0.5, lack);\n let rimLin = oklabToLinearSrgb(oklchToOklab(rimOkl));\n\n let rimFres = pow(1.0 - max(dot(N, V), 0.0), uRimPower);\n let rim = rimFres * uRimStrength * (1.0 - 0.6 * thickness);\n\n var highlight = max(warmCream * spec, rimLin * rim);\n highlight = min(highlight, vec3<f32>(0.85));\n lin = lin + highlight;\n }\n\n var rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));\n\n // IGN dither \u2014 1-LSB triangular dither in DISPLAY space, AFTER linearToSrgb.\n let fragCoord = in.pos.xy;\n let ign = fract(52.9829189 * fract(dot(fragCoord, vec2<f32>(0.06711056, 0.00583715))));\n rgb = clamp(rgb + (ign - 0.5) / 255.0, vec3<f32>(0.0), vec3<f32>(1.0));\n\n // premultiply AFTER the OETF: straight-alpha gamma \u2192 premultiplied.\n return vec4<f32>(rgb * alpha, alpha);\n}\n";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { HandMarkProps } from "./types";
|
|
2
|
+
declare function play(): void;
|
|
3
|
+
declare var __VLS_1: {};
|
|
4
|
+
type __VLS_Slots = {} & {
|
|
5
|
+
default?: (props: typeof __VLS_1) => any;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<HandMarkProps, {
|
|
8
|
+
play: typeof play;
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HandMarkProps> & Readonly<{}>, {
|
|
10
|
+
color: string;
|
|
11
|
+
animation: import("./types").HandAnimation;
|
|
12
|
+
seed: number;
|
|
13
|
+
shape: import("./types").HandShape;
|
|
14
|
+
appear: "mount" | "visible" | "manual";
|
|
15
|
+
jagged: boolean;
|
|
16
|
+
brush: import("./brush").BrushName | Partial<import("./brush").Brush>;
|
|
17
|
+
drawMs: number;
|
|
18
|
+
drawDelayMs: number;
|
|
19
|
+
boilFps: number;
|
|
20
|
+
boilFrames: number;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|