@mkbabb/glass-ui 4.0.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-DdtWXxOK.js → CommandShortcut-DvZNQ_HF.js} +4 -4
- package/dist/ConfiguratorRow-BR4l-ixA.js +143 -0
- package/dist/{ContextMenuContent-ON3x7cuk.js → ContextMenuContent-uWnVxDab.js} +1 -1
- package/dist/{ContextMenuSubContent-B0Vs6atR.js → ContextMenuSubContent-xol4sD2q.js} +32 -37
- package/dist/{DataTable-C464Zbqd.js → DataTable-CuKwF7wr.js} +4 -4
- package/dist/{DialogContent-DDE6pQBU.js → DialogContent-DcKK8k9i.js} +5 -5
- package/dist/{DialogFooter-8eZbdmPc.js → DialogFooter-BZNX5aVr.js} +3 -3
- package/dist/{FadingScroll-DwNnvKMs.js → FadingScroll-DI6hQhT9.js} +1 -1
- package/dist/{HoverCardContent-DkMaQzH5.js → HoverCardContent-b2uaAMRR.js} +1 -1
- package/dist/{HoverPopover-Dpzwvc4t.js → HoverPopover-CbqbNwgU.js} +2 -2
- package/dist/{IconChip-BDw1j5mu.js → IconChip-BTD-nay5.js} +3 -2
- package/dist/{IconTooltip-DSjasZIt.js → IconTooltip-Bl8gFZ8d.js} +1 -1
- package/dist/{Input-DVG_J0ne.js → Input-h9v5LeXf.js} +1 -1
- package/dist/{MetricBadge-BpC0R_Ec.js → MetricBadge-RHdBP72w.js} +1 -1
- package/dist/Notification-VUwexFUf.js +43 -0
- package/dist/NumberFieldContent-Cq7EzX-U.js +138 -0
- package/dist/{PopoverContent-BTorlp--.js → PopoverContent-DL7E6vJP.js} +4 -4
- package/dist/{Progress-hAT4gqGH.js → Progress-DctG61iZ.js} +4 -4
- package/dist/{ScrollingText-CUVFTWk2.js → ScrollingText-yOpBzFYq.js} +2 -2
- package/dist/{SelectScrollDownButton-C1jb3b3K.js → SelectScrollDownButton-CrA8F0iV.js} +18 -19
- package/dist/Toaster-Bw4xR8xV.js +274 -0
- package/dist/{ToggleGroupItem-Dzk9hWsF.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 +8 -3
- package/dist/api/types-extra.d.ts +6 -0
- package/dist/aurora.js +885 -242
- package/dist/badge.js +1 -1
- package/dist/border-progress.d.ts +1 -0
- package/dist/border-progress.js +106 -0
- package/dist/{button-BNDWhAZb.js → button-DYCUa-tH.js} +71 -26
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -2
- package/dist/card.js +2 -2
- package/dist/carousel.js +93 -110
- package/dist/collapsible.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 +2 -2
- package/dist/components/custom/aurora/constants/renderMode.d.ts +63 -12
- 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 +2 -1
- 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/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/dock/DockIconButton.vue.d.ts +13 -4
- package/dist/components/custom/dock/DockLayerGroup.vue.d.ts +10 -2
- 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/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/fourier-field/FourierField.vue.d.ts +12 -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/glass-panel/GlassPanel.vue.d.ts +1 -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 +18 -11
- package/dist/components/custom/goo-blob/composables/wgpuSetup.d.ts +23 -0
- package/dist/components/custom/goo-blob/shaders/metaball.wgsl.d.ts +1 -0
- package/dist/components/custom/handmark/HandMark.vue.d.ts +1 -1
- package/dist/components/custom/icon-chip/types.d.ts +11 -1
- package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +3 -1
- package/dist/components/custom/metric-stack/MetricStack.vue.d.ts +1 -1
- 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 +10 -0
- package/dist/components/custom/tabs/composables/useTabDragMorph.d.ts +42 -0
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +1 -1
- package/dist/components/ui/_shared/menuItemVariants.d.ts +1 -1
- 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/command/Command.vue.d.ts +1 -1
- package/dist/components/ui/drawer/Drawer.vue.d.ts +46 -33
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +7 -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 -0
- package/dist/components/ui/progress/ProgressDefault.vue.d.ts +3 -2
- package/dist/components/ui/select/SelectContent.vue.d.ts +1 -1
- package/dist/components/ui/sheet/index.d.ts +1 -1
- 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/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/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 +11 -11
- package/dist/context-menu.js +3 -3
- package/dist/controls.js +1 -1
- package/dist/createCanvasLifecycle-CHD5XrDW.js +82 -0
- package/dist/data-table.js +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dock.js +564 -457
- package/dist/{dockContext-Bu1Avy-a.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-BJ7E9js_.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 +7 -4
- package/dist/fading-scroll.js +1 -1
- 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 +128 -116
- package/dist/fourier-math.js +1 -1
- package/dist/glass-panel.js +2 -2
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +149 -341
- package/dist/goo-blob.js +830 -224
- package/dist/handmark.js +2 -2
- 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.js +1 -1
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/instrument-chassis.js +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +6 -6
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +1 -1
- package/dist/metric-stack.js +4 -8
- package/dist/motion-core.js +36 -36
- 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.js +1 -1
- package/dist/paper-backdrop.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/{compile-EXXzEr1q.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 +9 -11
- package/dist/select.js +3 -3
- package/dist/separator.js +1 -1
- package/dist/{sheet-CquRYOAw.js → sheet-tZMg0E0w.js} +5 -5
- package/dist/sheet.js +1 -1
- package/dist/{slider-DQ95MET2.js → slider-DVb4HXU-.js} +3 -3
- 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 +33 -9
- 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/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 +45 -0
- package/dist/styles/dock/layers.css +54 -30
- package/dist/styles/dock/morph.css +124 -7
- package/dist/styles/dock/overflow.css +16 -2
- package/dist/styles/dock/shell.css +54 -16
- package/dist/styles/dock.css +32 -0
- package/dist/styles/drawer.css +81 -35
- package/dist/styles/glass/deep.css +44 -0
- package/dist/styles/glass/ladder.css +87 -31
- 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/surfaces.css +101 -3
- package/dist/styles/glass-refract.css +96 -44
- package/dist/styles/glass-specular-track.css +7 -0
- package/dist/styles/glass.css +3 -0
- package/dist/styles/hover-popover.css +7 -6
- package/dist/styles/icon-chip.css +77 -15
- package/dist/styles/index.css +21 -9
- package/dist/styles/instrument-chassis.css +66 -3
- package/dist/styles/scroll-choreography.css +300 -0
- package/dist/styles/segmented-tabs.css +31 -0
- package/dist/styles/theme/bridges.css +11 -0
- package/dist/styles/theme/literals.css +11 -2
- package/dist/styles/theme/radius.css +6 -1
- package/dist/styles/tokens/dark-arm.css +98 -26
- package/dist/styles/tokens/glass-deep.css +75 -0
- package/dist/styles/tokens/glass-fx.css +333 -0
- package/dist/styles/tokens/glass.css +39 -319
- package/dist/styles/tokens/light-dark.css +15 -2
- 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 +127 -0
- package/dist/styles/tokens/scale-paper.css +117 -89
- package/dist/styles/tokens/scheme-motion.css +70 -32
- package/dist/styles/tokens/scroll-tokens.css +123 -0
- package/dist/styles/tokens/{offsets-sizing.css → sizing.css} +37 -100
- package/dist/styles/tokens.css +9 -3
- package/dist/styles/typography/semantic.css +8 -8
- package/dist/styles/typography/utilities.css +22 -7
- package/dist/styles/utilities/animate.css +27 -24
- package/dist/styles/utilities/base-misc.css +255 -0
- package/dist/styles/utilities/base.css +47 -261
- package/dist/styles/utilities/btn.css +3 -1
- package/dist/styles/utilities/metal.css +189 -0
- package/dist/styles/utilities.css +14 -7
- package/dist/switch.js +1 -1
- package/dist/tabs.js +220 -107
- package/dist/timeline.js +2 -2
- package/dist/toast.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.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/useLiquidPress-kfb4KX79.js +39 -0
- package/dist/usePointerVelocityField-JbRd5CrM.js +137 -0
- package/dist/useSpring-C0jyvEJB.js +40 -0
- package/dist/useSpringMount-q1amq1SJ.js +71 -0
- package/dist/useSpringPress-BsqPr7FJ.js +34 -0
- package/dist/{useTouchGate-28Tk2-t2.js → useTouchGate-CBZTD4SD.js} +1 -1
- package/dist/vSpecular-CQFmLNzA.js +68 -0
- package/dist/vendor-CKmzio-i.js +226 -0
- package/dist/watercolor-dot.js +2 -2
- package/package.json +126 -22
- package/src/styles/animations.css +33 -9
- package/src/styles/border-progress.css +109 -0
- package/src/styles/cards.css +76 -0
- package/src/styles/critical-partition.mjs +140 -0
- package/src/styles/dock/density.css +45 -0
- package/src/styles/dock/layers.css +54 -30
- package/src/styles/dock/morph.css +124 -7
- package/src/styles/dock/overflow.css +16 -2
- package/src/styles/dock/shell.css +54 -16
- package/src/styles/dock.css +32 -0
- package/src/styles/drawer.css +81 -35
- package/src/styles/glass/deep.css +44 -0
- package/src/styles/glass/ladder.css +87 -31
- 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/surfaces.css +101 -3
- package/src/styles/glass-refract.css +96 -44
- package/src/styles/glass-specular-track.css +7 -0
- package/src/styles/glass.css +3 -0
- package/src/styles/hover-popover.css +7 -6
- package/src/styles/icon-chip.css +77 -15
- package/src/styles/index.css +12 -0
- package/src/styles/instrument-chassis.css +66 -3
- package/src/styles/scroll-choreography.css +300 -0
- package/src/styles/segmented-tabs.css +31 -0
- package/src/styles/theme/bridges.css +11 -0
- package/src/styles/theme/literals.css +11 -2
- package/src/styles/theme/radius.css +6 -1
- package/src/styles/tokens/dark-arm.css +98 -26
- package/src/styles/tokens/glass-deep.css +75 -0
- package/src/styles/tokens/glass-fx.css +333 -0
- package/src/styles/tokens/glass.css +39 -319
- package/src/styles/tokens/light-dark.css +15 -2
- 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 +127 -0
- package/src/styles/tokens/scale-paper.css +117 -89
- package/src/styles/tokens/scheme-motion.css +70 -32
- package/src/styles/tokens/scroll-tokens.css +123 -0
- package/src/styles/tokens/{offsets-sizing.css → sizing.css} +37 -100
- package/src/styles/tokens.css +9 -3
- package/src/styles/typography/semantic.css +8 -8
- package/src/styles/typography/utilities.css +22 -7
- package/src/styles/utilities/animate.css +27 -24
- package/src/styles/utilities/base-misc.css +255 -0
- package/src/styles/utilities/base.css +47 -261
- package/src/styles/utilities/btn.css +3 -1
- package/src/styles/utilities/metal.css +189 -0
- package/src/styles/utilities.css +14 -7
- package/dist/CardAction-XH4YBVEK.js +0 -158
- package/dist/Notification-DKjKsQq8.js +0 -100
- package/dist/NumberFieldContent-1VtwDSgf.js +0 -145
- package/dist/Toaster-Bm_HQSpc.js +0 -263
- 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/createLucideIcon-DydS2qgk.js +0 -43
- package/dist/minimize-2-BV31Ob_h.js +0 -38
- package/dist/search-BSGrf2Sk.js +0 -12
- package/dist/useCanvas2D-ClrQuZtp.js +0 -96
- package/dist/useConfiguratorState-kiIlun8I.js +0 -303
- package/dist/useSpecularTracking-Bo5su68i.js +0 -32
- package/dist/useSpringMount-CvopqiFr.js +0 -108
- package/dist/useViewTransition-COsPjQVZ.js +0 -47
- package/dist/x-BUwTKe50.js +0 -10
- /package/dist/{CollapsibleContent-C_s6fG7r.js → CollapsibleContent-68dEXIAl.js} +0 -0
- /package/dist/{InstrumentChassis-UUJX0-mW.js → InstrumentChassis-Bx0F_q5g.js} +0 -0
- /package/dist/{Label-Ck9SWEKM.js → Label-C2ejNWeC.js} +0 -0
- /package/dist/{ModalOverlay-CkPRRgl_.js → ModalOverlay-D1VrWyoi.js} +0 -0
- /package/dist/{PaperBackdrop-nBKe0vkB.js → PaperBackdrop-Vf3tlpvd.js} +0 -0
- /package/dist/{SelectGroup-Dcczq44n.js → SelectGroup-DwwjicPY.js} +0 -0
- /package/dist/{SelectSeparator-DK2y1Bun.js → SelectSeparator-DXswVdRz.js} +0 -0
- /package/dist/{Separator-BArl4OaB.js → Separator-pKF0oA4M.js} +0 -0
- /package/dist/{Switch-Dr--uLGH.js → Switch-CwYNf8bo.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-CBt_VvXa.js → _plugin-vue_export-helper-C1je1s0u.js} +0 -0
- /package/dist/{badge-UILT_3pZ.js → badge-D9XWW4GT.js} +0 -0
- /package/dist/{createContext-B2RaZ-b8.js → createContext-CpBNTRMI.js} +0 -0
- /package/dist/{math-DeuJwLFx.js → math-BINYmg5z.js} +0 -0
- /package/dist/{menuItemVariants-DWRQXBxJ.js → menuItemVariants-D8VNHq22.js} +0 -0
- /package/dist/{prng-Cg22zv8g.js → prng-Za0Rmgag.js} +0 -0
- /package/dist/{resolveCanvasColor-BBiYfp8g.js → resolveCanvasColor-CUyHr5Uu.js} +0 -0
- /package/dist/{springPresets-WXaLbu8u.js → springPresets-CFQGQfdl.js} +0 -0
- /package/dist/{useAnimatedNumber-C_3wZLx4.js → useAnimatedNumber-BfUq2bUM.js} +0 -0
- /package/dist/{useInterval-CNdua40W.js → useInterval-CvK1mL92.js} +0 -0
- /package/dist/{useLiquidFlex-C12hXwOZ.js → useLiquidFlex-mZPMiNXh.js} +0 -0
- /package/dist/{useRAFLoop-CdwJ7284.js → useRAFLoop-UYa4zoiN.js} +0 -0
- /package/dist/{useResizeObserver-V6nq5gJb.js → useResizeObserver-Bpoi7tRE.js} +0 -0
- /package/dist/{useResolveTokenColor-NUG2zYAW.js → useResolveTokenColor-vAylyR0x.js} +0 -0
- /package/dist/{useSortable-BVqlJRBR.js → useSortable-DHjtZSEd.js} +0 -0
- /package/dist/{useSurfaceAxis-CMnF2zHb.js → useSurfaceAxis-g0NloYEF.js} +0 -0
- /package/dist/{useTextHighlight-NmBM5V_4.js → useTextHighlight-CWEi25hf.js} +0 -0
- /package/dist/{useTimer-B_PAasDL.js → useTimer-BHJOKr35.js} +0 -0
- /package/dist/{useUserInvalidAria-CDfJuakL.js → useUserInvalidAria-y5namzeE.js} +0 -0
- /package/dist/{useViewportReady-CvBcCYDf.js → useViewportReady-anbac3m6.js} +0 -0
- /package/dist/{vReveal-D9k0jADx.js → vReveal-Czsb7zQC.js} +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type ComputedRef, type Ref } from "vue";
|
|
2
|
+
import { jumpTerms } from "@mkbabb/value.js";
|
|
3
|
+
/** The two curve-authoring modes — the two donor arms unified. */
|
|
4
|
+
export type EasingPickerMode = "bezier" | "steps";
|
|
5
|
+
/** A `(t: number) => number` easing callable — the value.js family shape. */
|
|
6
|
+
export type EasingFn = (t: number) => number;
|
|
7
|
+
/** The bezier control-point quad `[x1, y1, x2, y2]`. */
|
|
8
|
+
export type BezierPoints = [number, number, number, number];
|
|
9
|
+
/** A value.js step jump-term (`jump-start`/`end`/`both`/`none` + aliases). */
|
|
10
|
+
export type JumpTerm = (typeof jumpTerms)[number];
|
|
11
|
+
/** The picker's v-model payload — the live curve callable + its re-parseable
|
|
12
|
+
* CSS literal + the mode, so a consumer can read back the authored curve. */
|
|
13
|
+
export interface EasingPickerValue {
|
|
14
|
+
readonly mode: EasingPickerMode;
|
|
15
|
+
/** The complete re-parseable CSS literal (`cubic-bezier(…)` / `steps(…)`). */
|
|
16
|
+
readonly css: string;
|
|
17
|
+
/** The live value.js easing callable the literal evaluates to. */
|
|
18
|
+
readonly fn: EasingFn;
|
|
19
|
+
/** The bezier control points (bezier mode). */
|
|
20
|
+
readonly points: BezierPoints;
|
|
21
|
+
/** The step jump count (steps mode). */
|
|
22
|
+
readonly steps: number;
|
|
23
|
+
/** The step jump term (steps mode). */
|
|
24
|
+
readonly term: JumpTerm;
|
|
25
|
+
}
|
|
26
|
+
export interface UseEasingPickerOptions {
|
|
27
|
+
/** The initial mode (default `"bezier"`). */
|
|
28
|
+
initialMode?: EasingPickerMode;
|
|
29
|
+
/** The initial bezier preset key (default `"ease-out-back"`). */
|
|
30
|
+
initialPreset?: string;
|
|
31
|
+
/** The initial step count (default 4). */
|
|
32
|
+
initialSteps?: number;
|
|
33
|
+
/** The initial step term (default `"end"`). */
|
|
34
|
+
initialTerm?: JumpTerm;
|
|
35
|
+
}
|
|
36
|
+
export interface UseEasingPickerReturn {
|
|
37
|
+
mode: Ref<EasingPickerMode>;
|
|
38
|
+
preset: Ref<string>;
|
|
39
|
+
points: Ref<BezierPoints>;
|
|
40
|
+
presetNames: readonly string[];
|
|
41
|
+
selectPreset: (name: string) => void;
|
|
42
|
+
setHandle: (index: 0 | 1, x: number, y: number) => void;
|
|
43
|
+
steps: Ref<number>;
|
|
44
|
+
term: Ref<JumpTerm>;
|
|
45
|
+
terms: readonly JumpTerm[];
|
|
46
|
+
/** The live easing callable for the active mode — re-derived on every edit. */
|
|
47
|
+
easingFn: ComputedRef<EasingFn>;
|
|
48
|
+
/** The complete re-parseable readout literal for the active mode. */
|
|
49
|
+
readout: ComputedRef<string>;
|
|
50
|
+
/** The full v-model payload (mode + css + fn + raw params). */
|
|
51
|
+
value: ComputedRef<EasingPickerValue>;
|
|
52
|
+
/** Two SVG-space handle coords `[{x,y},{x,y}]` (bezier mode). */
|
|
53
|
+
handlesSvg: ComputedRef<{
|
|
54
|
+
x: number;
|
|
55
|
+
y: number;
|
|
56
|
+
}[]>;
|
|
57
|
+
/** The bezier path `d` (`M 0 1 C …`). */
|
|
58
|
+
bezierPathD: ComputedRef<string>;
|
|
59
|
+
/** The sampled staircase path `d` (steps mode). */
|
|
60
|
+
stepPathD: ComputedRef<string>;
|
|
61
|
+
/** The bezier-canvas viewBox `{ minY, height }` clamping overshoot. */
|
|
62
|
+
viewBox: ComputedRef<{
|
|
63
|
+
minY: number;
|
|
64
|
+
height: number;
|
|
65
|
+
}>;
|
|
66
|
+
progress: Ref<number>;
|
|
67
|
+
playTravel: () => void;
|
|
68
|
+
stopTravel: () => void;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The <EasingPicker> shared editor state. Composes the value.js math; owns the
|
|
72
|
+
* chassis (control points, the literal, the rAF travel). Used by the EasingPicker
|
|
73
|
+
* SFC + (composed through it) the EasingConfigurator register — ONE source.
|
|
74
|
+
*/
|
|
75
|
+
export declare function useEasingPicker(options?: UseEasingPickerOptions): UseEasingPickerReturn;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** The bezier-mode catalogue key used for the live-edited custom curve. */
|
|
2
|
+
export declare const CUSTOM_PRESET: "custom";
|
|
3
|
+
/** The default bezier-mode preset (a back-overshoot curve reads expressive). */
|
|
4
|
+
export declare const DEFAULT_BEZIER_PRESET: "ease-out-back";
|
|
5
|
+
/** The default steps-mode jump count + term. */
|
|
6
|
+
export declare const DEFAULT_STEP_COUNT = 4;
|
|
7
|
+
export declare const DEFAULT_STEP_TERM: "end";
|
|
8
|
+
/** The steps-mode slider bounds. */
|
|
9
|
+
export declare const STEP_COUNT_MIN = 1;
|
|
10
|
+
export declare const STEP_COUNT_MAX = 12;
|
|
11
|
+
/** Dense staircase sampling so the riser/tread reads crisp (a sampled staircase,
|
|
12
|
+
* not a smoothed curve). */
|
|
13
|
+
export declare const STEP_PLOT_SAMPLES = 240;
|
|
14
|
+
/** bezier-Y (0 bottom, 1 top) → SVG-Y (0 top, grows down). */
|
|
15
|
+
export declare const SVG_FLIP: (y: number) => number;
|
|
16
|
+
/** The bezier-canvas viewBox overshoot clamp + pad (a back-curve must not blow up
|
|
17
|
+
* the canvas). */
|
|
18
|
+
export declare const VIEW_PAD = 0.1;
|
|
19
|
+
export declare const MAX_OVERSHOOT = 0.6;
|
|
20
|
+
/** The pointer hit-radius for grabbing a handle (touch is forgiving). */
|
|
21
|
+
export declare const HANDLE_HIT_RADIUS = 0.1;
|
|
22
|
+
export declare const HANDLE_HIT_RADIUS_TOUCH = 0.15;
|
|
23
|
+
/** The number of curve samples the viewBox bounds-fit walks. */
|
|
24
|
+
export declare const VIEWBOX_FIT_SAMPLES = 16;
|
|
25
|
+
/** The one-shot rAF travel clock (ms) for the playback dot. */
|
|
26
|
+
export declare const TRAVEL_DURATION_MS = 1200;
|
|
27
|
+
/** The copy-feedback dwell (ms). */
|
|
28
|
+
export declare const COPY_FEEDBACK_MS = 1400;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default as EasingPicker } from "./EasingPicker.vue";
|
|
2
|
+
export { default as EasingConfigurator } from "./EasingConfigurator.vue";
|
|
3
|
+
export { useEasingPicker, type EasingPickerMode, type EasingPickerValue, type EasingFn, type BezierPoints, type JumpTerm, type UseEasingPickerOptions, type UseEasingPickerReturn, } from "./composables/useEasingPicker";
|
|
@@ -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`. */
|
|
@@ -46,6 +51,11 @@ type __VLS_Props = {
|
|
|
46
51
|
* ambient bundle is unchanged. The SOLE additive seam (BA.W-FOURIER-STUDIO). */
|
|
47
52
|
clock?: () => number;
|
|
48
53
|
};
|
|
49
|
-
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>;
|
|
50
60
|
declare const _default: typeof __VLS_export;
|
|
51
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;
|
|
@@ -33,9 +33,9 @@ type __VLS_Slots = {} & {
|
|
|
33
33
|
default?: (props: typeof __VLS_1) => any;
|
|
34
34
|
};
|
|
35
35
|
declare const __VLS_base: import("vue").DefineComponent<GlassPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<GlassPanelProps> & Readonly<{}>, {
|
|
36
|
+
blur: number;
|
|
36
37
|
variant: GlassPanelVariant;
|
|
37
38
|
surface: Surface;
|
|
38
|
-
blur: number;
|
|
39
39
|
refraction: number;
|
|
40
40
|
chromaticAberration: boolean;
|
|
41
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;
|
|
@@ -40,18 +40,25 @@ export interface UseMetaballRendererReturn {
|
|
|
40
40
|
wake: () => void;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
* 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.
|
|
44
48
|
*
|
|
45
|
-
* This module owns ONLY the metaball-specific concerns: compiling the shader,
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
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).
|
|
55
62
|
*
|
|
56
63
|
* Color is resolved INTERNALLY through the `/color` leaf (`cssToOklch →
|
|
57
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;
|
|
@@ -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";
|
|
@@ -8,9 +8,9 @@ declare const __VLS_base: import("vue").DefineComponent<HandMarkProps, {
|
|
|
8
8
|
play: typeof play;
|
|
9
9
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HandMarkProps> & Readonly<{}>, {
|
|
10
10
|
color: string;
|
|
11
|
+
animation: import("./types").HandAnimation;
|
|
11
12
|
seed: number;
|
|
12
13
|
shape: import("./types").HandShape;
|
|
13
|
-
animation: import("./types").HandAnimation;
|
|
14
14
|
appear: "mount" | "visible" | "manual";
|
|
15
15
|
jagged: boolean;
|
|
16
16
|
brush: import("./brush").BrushName | Partial<import("./brush").Brush>;
|
|
@@ -57,10 +57,20 @@ export interface IconChipProps {
|
|
|
57
57
|
duotone?: boolean;
|
|
58
58
|
/**
|
|
59
59
|
* The chip's own smooth-glass hover register (the backplate mix lifts, a soft
|
|
60
|
-
* glow ring appears, the stroke firms) — on the §6 easing doctrine
|
|
60
|
+
* glow ring appears, the stroke firms) — on the §6 easing doctrine (the GROW
|
|
61
|
+
* rides --spring-smooth, the color cross-fade the bezier), PRM-gated,
|
|
61
62
|
* disco-FREE. Default `false`.
|
|
62
63
|
*/
|
|
63
64
|
bloom?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The louder focal-pop vibrancy axis (BB.W-SUFFUSE3) — re-points the
|
|
67
|
+
* backplate `color-mix` strength off the 25% reference stop to ~40% (more
|
|
68
|
+
* chroma) via `--icon-chip-plate-strength`. STILL the ONE color event per
|
|
69
|
+
* surface (the same event, louder — proof:suffuse d3 counts the event family,
|
|
70
|
+
* not the saturation); the `in srgb` space + the chip≤glyph ratio are
|
|
71
|
+
* untouched. Default `false` (byte-identical to the reference register).
|
|
72
|
+
*/
|
|
73
|
+
saturated?: boolean;
|
|
64
74
|
/**
|
|
65
75
|
* Entrance choreography — composes the shipped `vReveal` directive. A numeric
|
|
66
76
|
* value is the `--d` stagger index; `true` is index 0. PRM-gated by `vReveal`'s
|
|
@@ -23,7 +23,9 @@ export type InstrumentChassisPhase = "ready" | "ping" | "download" | "upload" |
|
|
|
23
23
|
* the structural grooves re-point to the `--silver` quad (the gold quad's
|
|
24
24
|
* cool mirror) instead of the warm-cream `--surface-tint-*` default, so the
|
|
25
25
|
* chassis reads as an INDUSTRIAL precision-instrument housing — the cool-metal
|
|
26
|
-
* twin of the gold "complete"-phase affirmation
|
|
26
|
+
* twin of the warm-gold "complete"-phase affirmation the chassis ships by
|
|
27
|
+
* DEFAULT (the `--phase-complete-color` consumer token defaults to gold;
|
|
28
|
+
* BB.W-PHASE-PALETTE — a consumer may re-ink completion). The phase cascade stays
|
|
27
29
|
* orthogonal (a `structure` chassis still retints on `data-phase`); only the
|
|
28
30
|
* structure-metal recipe forks. The silver is the W-NO-GRAY named cool-neutral
|
|
29
31
|
* exception. Consumer #2 of the silver quad (the atlas's structure surface is
|
|
@@ -77,8 +77,8 @@ type __VLS_Slots = {} & {
|
|
|
77
77
|
default?: (props: typeof __VLS_8) => any;
|
|
78
78
|
};
|
|
79
79
|
declare const __VLS_base: import("vue").DefineComponent<MetricStackProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MetricStackProps> & Readonly<{}>, {
|
|
80
|
-
as: string | Component;
|
|
81
80
|
containerName: string;
|
|
81
|
+
as: string | Component;
|
|
82
82
|
rows: number;
|
|
83
83
|
register: "audacious" | "result";
|
|
84
84
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Component } from "vue";
|
|
2
|
+
export interface SpaViewProps {
|
|
3
|
+
/**
|
|
4
|
+
* The active view. Either a component (`<component :is>`) or a string key the
|
|
5
|
+
* default-slot resolves against. When `view`/`is` is set, SpaView renders the
|
|
6
|
+
* dynamic component directly; when unset, the default slot is the active view
|
|
7
|
+
* (the consumer drives `:is` inside the slot themselves).
|
|
8
|
+
*/
|
|
9
|
+
view?: Component | string;
|
|
10
|
+
/** Alias of `view` (the `:is` ergonomics — same dynamic-component target). */
|
|
11
|
+
is?: Component | string;
|
|
12
|
+
/**
|
|
13
|
+
* The LRU cap — the max number of cached inactive view instances. Threaded
|
|
14
|
+
* straight onto `<KeepAlive :max>`; when unset, KeepAlive's default (unbounded)
|
|
15
|
+
* applies. The visual-load-bearing register: a bounded admin shell sets `:max`
|
|
16
|
+
* to its tab count so the cache never grows without bound.
|
|
17
|
+
*/
|
|
18
|
+
max?: number;
|
|
19
|
+
/** KeepAlive include allowlist (component name / RegExp / array — pass-through). */
|
|
20
|
+
include?: string | RegExp | (string | RegExp)[];
|
|
21
|
+
/** KeepAlive exclude denylist (component name / RegExp / array — pass-through). */
|
|
22
|
+
exclude?: string | RegExp | (string | RegExp)[];
|
|
23
|
+
/**
|
|
24
|
+
* The Vue <Transition> recipe name driving the out-in cross-fade. Defaults to
|
|
25
|
+
* `"fade"` — the shared opacity-only compositor recipe (transitions.css). A
|
|
26
|
+
* consumer overrides it with another `mode="out-in"`-safe recipe name.
|
|
27
|
+
*/
|
|
28
|
+
transition?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The stable key the transition keys off (a re-render WITHOUT a key change is
|
|
31
|
+
* not a view swap). Defaults to the resolved `view`/`is` target. A consumer
|
|
32
|
+
* driving the active view from the default slot supplies its own `:view-key`.
|
|
33
|
+
*/
|
|
34
|
+
viewKey?: string | number;
|
|
35
|
+
}
|
|
36
|
+
declare var __VLS_19: {};
|
|
37
|
+
type __VLS_Slots = {} & {
|
|
38
|
+
default?: (props: typeof __VLS_19) => any;
|
|
39
|
+
};
|
|
40
|
+
declare const __VLS_base: import("vue").DefineComponent<SpaViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SpaViewProps> & Readonly<{}>, {
|
|
41
|
+
transition: string;
|
|
42
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
43
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
44
|
+
declare const _default: typeof __VLS_export;
|
|
45
|
+
export default _default;
|
|
46
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
47
|
+
new (): {
|
|
48
|
+
$slots: S;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -49,6 +49,15 @@ export interface SegmentedTabsProps {
|
|
|
49
49
|
* accessible name.
|
|
50
50
|
*/
|
|
51
51
|
responsive?: boolean | SegmentedTabsResponsive;
|
|
52
|
+
/**
|
|
53
|
+
* BB.W-DRAG-MORPH — the LIQUID TAB. When `true` (ADDITIVE, default `false`),
|
|
54
|
+
* the `pill` indicator becomes a physical lozenge you can GRAB and PULL: it
|
|
55
|
+
* follows the finger ~1:1, squishes on drag velocity, and flings to the nearest
|
|
56
|
+
* tab on release (`useDragMorph`). The click-selection path is byte-identical;
|
|
57
|
+
* the drag is opt-in. No-op on `underline` (the ink hairline has no indicator
|
|
58
|
+
* element to deform).
|
|
59
|
+
*/
|
|
60
|
+
draggable?: boolean;
|
|
52
61
|
class?: HTMLAttributes["class"];
|
|
53
62
|
}
|
|
54
63
|
type __VLS_Props = SegmentedTabsProps;
|
|
@@ -75,6 +84,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
75
84
|
}>, {
|
|
76
85
|
orientation: SegmentedTabsOrientation;
|
|
77
86
|
variant: SegmentedTabsVariant;
|
|
87
|
+
draggable: boolean;
|
|
78
88
|
responsive: boolean | SegmentedTabsResponsive;
|
|
79
89
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
80
90
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from "vue";
|
|
2
|
+
import { type UseDragMorphReturn } from "../../../../composables/motion/useDragMorph";
|
|
3
|
+
import type { SegmentedTabOption } from "../SegmentedTabs.vue";
|
|
4
|
+
/**
|
|
5
|
+
* Package-private composable for `SegmentedTabs.vue` — BB.W-DRAG-MORPH, the LIQUID
|
|
6
|
+
* TAB (the `:draggable` axis). Carved out of the SFC at BB.W-CARVE4 to hold the
|
|
7
|
+
* no-god-module bound, mirroring the `useTabIndicator` colocation sibling; the SFC
|
|
8
|
+
* IMPORTS it and binds `drag.dragStyle`/`drag.dragging` in its template.
|
|
9
|
+
*
|
|
10
|
+
* When `:draggable`, the `pill` indicator is wired to `useDragMorph` with the snap
|
|
11
|
+
* targets resolved off the CENTER-ANCHORED button geometry (the SAME measure
|
|
12
|
+
* `useTabIndicator` runs — reused, never re-measured). Dragging the indicator follows
|
|
13
|
+
* the finger, squishes on velocity, and flings to the nearest tab center on release →
|
|
14
|
+
* `onSnap` writes the `model`. The drag is the `pill` material ONLY (the `underline`
|
|
15
|
+
* ink hairline has no `indicatorRef` element to deform). The squish reads the SAME
|
|
16
|
+
* `--tab-indicator-max-stretch` live cap the click squish does (the SOLE cap source);
|
|
17
|
+
* the drag's `--stretch` write composes the existing reciprocal CSS pairing — no
|
|
18
|
+
* second squish recipe.
|
|
19
|
+
*/
|
|
20
|
+
export interface UseTabDragMorphParams {
|
|
21
|
+
/** The active indicator element (the drag follow + squish target). */
|
|
22
|
+
indicatorRef: Ref<HTMLElement | null>;
|
|
23
|
+
/** True for the vertical (block-axis) orientation. */
|
|
24
|
+
isVertical: ComputedRef<boolean>;
|
|
25
|
+
/** True for the underline material (drag is a no-op there). */
|
|
26
|
+
isUnderline: ComputedRef<boolean>;
|
|
27
|
+
/** The `:draggable` prop (ADDITIVE, default false). */
|
|
28
|
+
draggable: () => boolean;
|
|
29
|
+
/** The strip's rendered options (the snap targets + the refresh trigger). */
|
|
30
|
+
stripOptions: ComputedRef<SegmentedTabOption[]>;
|
|
31
|
+
/** Per-option button refs, index-aligned to `stripOptions`. */
|
|
32
|
+
buttonRefs: Ref<HTMLElement[]>;
|
|
33
|
+
/** The single-select model — the fling-to-nearest commits the selection. */
|
|
34
|
+
model: Ref<string | undefined>;
|
|
35
|
+
}
|
|
36
|
+
export interface UseTabDragMorphReturn {
|
|
37
|
+
/** True when the drag is live (the `pill` material + the `:draggable` prop). */
|
|
38
|
+
dragEnabled: ComputedRef<boolean>;
|
|
39
|
+
/** The `useDragMorph` handle (the SFC binds `dragStyle`/`dragging`). */
|
|
40
|
+
drag: UseDragMorphReturn;
|
|
41
|
+
}
|
|
42
|
+
export declare function useTabDragMorph(params: UseTabDragMorphParams): UseTabDragMorphReturn;
|
|
@@ -43,9 +43,9 @@ type __VLS_Slots = {} & {
|
|
|
43
43
|
};
|
|
44
44
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
45
45
|
animate: boolean;
|
|
46
|
+
range: [number, number];
|
|
46
47
|
variant: "solid" | "ghost";
|
|
47
48
|
seed: string;
|
|
48
|
-
range: [number, number];
|
|
49
49
|
tag: "div" | "button";
|
|
50
50
|
cycleDuration: number;
|
|
51
51
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -44,7 +44,7 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
44
44
|
* opts in via `surface="accent"`.
|
|
45
45
|
*/
|
|
46
46
|
export declare const menuItemVariants: (props?: ({
|
|
47
|
-
surface?: "
|
|
47
|
+
surface?: "glass" | "accent" | null | undefined;
|
|
48
48
|
indicator?: "start" | "none" | "start-wide" | null | undefined;
|
|
49
49
|
density?: "comfortable" | "audacious" | null | undefined;
|
|
50
50
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export { default as Badge } from './Badge.vue';
|
|
3
3
|
export declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "outline" | "destructive" | "secondary" | "success" | "warning" | "info" | null | undefined;
|
|
5
5
|
size?: "sm" | "lg" | "md" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export type BadgeVariants = VariantProps<typeof badgeVariants>;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, HTMLAttributes } from 'vue';
|
|
2
2
|
import { type PrimitiveProps } from 'reka-ui';
|
|
3
3
|
import { type ButtonVariants } from '.';
|
|
4
|
+
import type { Surface } from '../_shared/useSurfaceAxis';
|
|
4
5
|
interface Props extends PrimitiveProps {
|
|
5
6
|
variant?: ButtonVariants['variant'];
|
|
6
7
|
size?: ButtonVariants['size'];
|
|
7
8
|
class?: HTMLAttributes['class'];
|
|
9
|
+
surface?: Surface;
|
|
10
|
+
liquid?: boolean;
|
|
8
11
|
type?: ButtonHTMLAttributes['type'];
|
|
9
12
|
disabled?: ButtonHTMLAttributes['disabled'];
|
|
10
13
|
}
|
|
11
|
-
declare var
|
|
14
|
+
declare var __VLS_13: {};
|
|
12
15
|
type __VLS_Slots = {} & {
|
|
13
|
-
default?: (props: typeof
|
|
16
|
+
default?: (props: typeof __VLS_13) => any;
|
|
14
17
|
};
|
|
15
18
|
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
16
19
|
as: import("reka-ui").AsTag | import("vue").Component;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export { default as Button } from './Button.vue';
|
|
3
3
|
export declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "default" | "solid" | "primary-audacious" | "gold-audacious" | "destructive" | "
|
|
5
|
-
size?: "default" | "
|
|
4
|
+
variant?: "link" | "default" | "glass" | "outline" | "solid" | "primary-audacious" | "gold-audacious" | "destructive" | "secondary" | "accent" | "ghost" | "glass-wash" | "ai" | null | undefined;
|
|
5
|
+
size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-sm" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|