@mkbabb/glass-ui 3.13.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/CardAction-CW7a0m8M.js +253 -0
- package/dist/{CommandShortcut-RowNEO6i.js → CommandShortcut-DvZNQ_HF.js} +58 -53
- package/dist/ConfiguratorRow-BR4l-ixA.js +143 -0
- package/dist/{ContextMenuContent-CT3AS1WX.js → ContextMenuContent-uWnVxDab.js} +1 -1
- package/dist/{ContextMenuSubContent-BQmxTAdw.js → ContextMenuSubContent-xol4sD2q.js} +32 -37
- package/dist/{DataTable-BCddn3T3.js → DataTable-CuKwF7wr.js} +99 -97
- package/dist/DialogContent-DcKK8k9i.js +103 -0
- package/dist/{DialogFooter-Blu4t7tJ.js → DialogFooter-BZNX5aVr.js} +3 -3
- package/dist/FadingScroll-DI6hQhT9.js +76 -0
- package/dist/{HoverCardContent-Csywg3YF.js → HoverCardContent-b2uaAMRR.js} +1 -1
- package/dist/{HoverPopover-CISOJQuZ.js → HoverPopover-CbqbNwgU.js} +2 -2
- package/dist/IconChip-BTD-nay5.js +55 -0
- package/dist/{IconTooltip-DPzE09X9.js → IconTooltip-Bl8gFZ8d.js} +1 -1
- package/dist/{Input-DWQQIOC4.js → Input-h9v5LeXf.js} +1 -1
- package/dist/{MetricBadge-C9QMz1KT.js → MetricBadge-RHdBP72w.js} +1 -1
- package/dist/Notification-VUwexFUf.js +43 -0
- package/dist/NumberFieldContent-Cq7EzX-U.js +138 -0
- package/dist/PopoverContent-DL7E6vJP.js +127 -0
- package/dist/{Progress-DwlUKGbr.js → Progress-DctG61iZ.js} +98 -78
- package/dist/{ScrollingText-DfFrwSph.js → ScrollingText-yOpBzFYq.js} +2 -2
- package/dist/{SelectScrollDownButton-CiDUxfEj.js → SelectScrollDownButton-CrA8F0iV.js} +35 -20
- package/dist/{Switch-CsIuYP_e.js → Switch-CwYNf8bo.js} +1 -1
- package/dist/Toaster-Bw4xR8xV.js +274 -0
- package/dist/{ToggleGroupItem-D_AHlRw9.js → ToggleGroupItem-pEM9vIhs.js} +50 -37
- package/dist/{TooltipProvider-B3MkB_8P.js → TooltipProvider-rzvnXz60.js} +1 -1
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +16 -8
- package/dist/api/types-extra.d.ts +6 -0
- package/dist/api.js +2 -2
- package/dist/aurora.js +888 -230
- package/dist/badge.js +1 -1
- package/dist/border-progress.d.ts +1 -0
- package/dist/border-progress.js +106 -0
- package/dist/button-DYCUa-tH.js +126 -0
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -2
- package/dist/card.js +2 -2
- package/dist/carousel.d.ts +1 -1
- package/dist/carousel.js +90 -151
- package/dist/collapsible.js +1 -1
- package/dist/color-swatch.d.ts +1 -0
- package/dist/color-swatch.js +47 -0
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/compile-CQEFRTmx.js +19 -0
- package/dist/components/custom/aurora/composables/atoms-fields.d.ts +39 -0
- package/dist/components/custom/aurora/composables/auroraFallbackGround.d.ts +108 -0
- package/dist/components/custom/aurora/composables/runtime.d.ts +19 -0
- package/dist/components/custom/aurora/composables/uniformBridge.d.ts +5 -1
- package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +51 -0
- package/dist/components/custom/aurora/composables/wgpuSetup.d.ts +29 -0
- package/dist/components/custom/aurora/constants/budget.d.ts +21 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +30 -2
- package/dist/components/custom/aurora/constants/renderMode.d.ts +63 -10
- package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/oil-modes.glsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/procedural-color.wgsl.d.ts +4 -0
- package/dist/components/custom/aurora/index.d.ts +3 -2
- package/dist/components/custom/border-progress/BorderProgress.vue.d.ts +46 -0
- package/dist/components/custom/border-progress/composables/useBorderSpectrum.d.ts +22 -0
- package/dist/components/custom/border-progress/constants.d.ts +59 -0
- package/dist/components/custom/border-progress/index.d.ts +4 -0
- package/dist/components/custom/color-swatch/ColorSwatch.vue.d.ts +22 -0
- package/dist/components/custom/color-swatch/index.d.ts +1 -0
- package/dist/components/custom/concentric/Concentric.vue.d.ts +39 -0
- package/dist/components/custom/concentric/composables/concentricGLSetup.d.ts +11 -0
- package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +13 -0
- package/dist/components/custom/concentric/composables/ringField.d.ts +44 -0
- package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +13 -0
- package/dist/components/custom/concentric/composables/useConcentric.d.ts +35 -0
- package/dist/components/custom/concentric/constants.d.ts +43 -0
- package/dist/components/custom/concentric/index.d.ts +5 -0
- package/dist/components/custom/concentric/shaders/concentric.glsl.d.ts +4 -0
- package/dist/components/custom/concentric/shaders/concentric.wgsl.d.ts +1 -0
- package/dist/components/custom/configurator/Configurator.vue.d.ts +19 -8
- package/dist/components/custom/constellation/Constellation.vue.d.ts +18 -206
- package/dist/components/custom/constellation/composables/useConstellation.d.ts +26 -0
- package/dist/components/custom/constellation/constellationField.d.ts +2 -369
- package/dist/components/custom/constellation/constellationTypes.d.ts +369 -0
- package/dist/components/custom/constellation/index.d.ts +1 -1
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +13 -4
- package/dist/components/custom/dock/DockLayerGroup.vue.d.ts +10 -2
- package/dist/components/custom/dock/DockRail.vue.d.ts +17 -16
- package/dist/components/custom/dock/DockSection.vue.d.ts +69 -0
- package/dist/components/custom/dock/DockSeparator.vue.d.ts +49 -1
- package/dist/components/custom/dock/DockTabButton.vue.d.ts +5 -5
- package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +75 -0
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +13 -0
- package/dist/components/custom/dock/constants.d.ts +35 -0
- package/dist/components/custom/dock/index.d.ts +2 -0
- package/dist/components/custom/dot-flow-field/DotFlowField.vue.d.ts +38 -0
- package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +41 -0
- package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +24 -0
- package/dist/components/custom/dot-flow-field/composables/useDotFlowField.d.ts +34 -0
- package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +18 -0
- package/dist/components/custom/dot-flow-field/constants.d.ts +48 -0
- package/dist/components/custom/dot-flow-field/index.d.ts +5 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.compute.wgsl.d.ts +1 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.glsl.d.ts +20 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +1 -0
- package/dist/components/custom/easing/EasingConfigurator.vue.d.ts +33 -0
- package/dist/components/custom/easing/EasingPicker.vue.d.ts +49 -0
- package/dist/components/custom/easing/composables/useEasingPicker.d.ts +75 -0
- package/dist/components/custom/easing/constants.d.ts +28 -0
- package/dist/components/custom/easing/index.d.ts +3 -0
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +10 -0
- package/dist/components/custom/fading-scroll/FadingScroll.vue.d.ts +25 -0
- package/dist/components/custom/fading-scroll/composables/useFadingScroll.d.ts +31 -0
- package/dist/components/custom/fading-scroll/constants.d.ts +19 -0
- package/dist/components/custom/fading-scroll/index.d.ts +2 -0
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +19 -2
- package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +39 -0
- package/dist/components/custom/fourier-field/constants.d.ts +7 -0
- package/dist/components/custom/fourier-field/index.d.ts +1 -1
- package/dist/components/custom/fourier-field/math.d.ts +17 -0
- package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +9 -1
- package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +4 -2
- package/dist/components/custom/goo-blob/composables/uniformBridgeWGPU.d.ts +24 -0
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +29 -12
- package/dist/components/custom/goo-blob/composables/wgpuSetup.d.ts +23 -0
- package/dist/components/custom/goo-blob/constants.d.ts +6 -1
- package/dist/components/custom/goo-blob/shaders/metaball.wgsl.d.ts +1 -0
- package/dist/components/custom/handmark/HandMark.vue.d.ts +29 -0
- package/dist/components/custom/handmark/brush.d.ts +269 -0
- package/dist/components/custom/handmark/composables/useHandMark.d.ts +89 -0
- package/dist/components/custom/handmark/constants.d.ts +39 -0
- package/dist/components/custom/handmark/freehand.d.ts +69 -0
- package/dist/components/custom/handmark/geometry.d.ts +52 -0
- package/dist/components/custom/handmark/index.d.ts +27 -0
- package/dist/components/custom/handmark/ink.d.ts +11 -0
- package/dist/components/custom/handmark/texture.d.ts +39 -0
- package/dist/components/custom/handmark/types.d.ts +62 -0
- package/dist/components/custom/icon-chip/IconChip.vue.d.ts +4 -0
- package/dist/components/custom/icon-chip/index.d.ts +2 -0
- package/dist/components/custom/icon-chip/types.d.ts +82 -0
- package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +17 -2
- package/dist/components/custom/metric-stack/MetricStack.vue.d.ts +1 -1
- package/dist/components/custom/pager-dots/PagerDots.vue.d.ts +39 -0
- package/dist/components/custom/pager-dots/index.d.ts +2 -0
- package/dist/components/custom/spa-view/SpaView.vue.d.ts +50 -0
- package/dist/components/custom/spa-view/index.d.ts +2 -0
- package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +29 -24
- package/dist/components/custom/tabs/composables/useTabDragMorph.d.ts +42 -0
- package/dist/components/custom/tabs/composables/useTabIndicator.d.ts +30 -21
- package/dist/components/custom/tabs/constants.d.ts +9 -3
- package/dist/components/custom/tabs/index.d.ts +1 -1
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +15 -1
- package/dist/components/ui/_shared/index.d.ts +2 -0
- package/dist/components/ui/_shared/menuItemVariants.d.ts +19 -0
- package/dist/components/ui/_shared/useSurfaceAxis.d.ts +41 -0
- package/dist/components/ui/badge/index.d.ts +1 -1
- package/dist/components/ui/button/Button.vue.d.ts +5 -2
- package/dist/components/ui/button/index.d.ts +2 -2
- package/dist/components/ui/card/Card.vue.d.ts +34 -4
- package/dist/components/ui/card/CardHeader.vue.d.ts +42 -16
- package/dist/components/ui/card/ScrollCard.vue.d.ts +33 -0
- package/dist/components/ui/card/ScrollCardHeader.vue.d.ts +17 -0
- package/dist/components/ui/card/index.d.ts +2 -0
- package/dist/components/ui/carousel/CarouselNext.vue.d.ts +2 -2
- package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +2 -2
- package/dist/components/ui/carousel/GlassCarouselPager.vue.d.ts +2 -2
- package/dist/components/ui/carousel/index.d.ts +0 -1
- package/dist/components/ui/command/Command.vue.d.ts +4 -1
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +8 -3
- package/dist/components/ui/drawer/Drawer.vue.d.ts +46 -33
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +12 -8
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +2 -2
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +1 -1
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +2 -2
- package/dist/components/ui/drawer/composables/drawerSnapContext.d.ts +26 -0
- package/dist/components/ui/drawer/composables/useDrawerSnap.d.ts +17 -0
- package/dist/components/ui/drawer/constants.d.ts +45 -0
- package/dist/components/ui/drawer/index.d.ts +23 -15
- package/dist/components/ui/focus-scope/FocusScope.vue.d.ts +20 -0
- package/dist/components/ui/focus-scope/index.d.ts +2 -0
- package/dist/components/ui/index.d.ts +1 -1
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +3 -0
- package/dist/components/ui/progress/ProgressDefault.vue.d.ts +3 -2
- package/dist/components/ui/progress/ProgressSectioned.vue.d.ts +14 -3
- package/dist/components/ui/select/SelectContent.vue.d.ts +1 -1
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +27 -4
- package/dist/components/ui/sheet/SheetContent.vue.d.ts +6 -0
- package/dist/components/ui/sheet/index.d.ts +1 -1
- package/dist/components/ui/skeleton/Skeleton.vue.d.ts +3 -0
- package/dist/components/ui/tags-input/TagsInput.vue.d.ts +2 -2
- package/dist/components/ui/toast/Toast.vue.d.ts +5 -2
- package/dist/components/ui/toast/use-toast.d.ts +14 -0
- package/dist/components/ui/toggle/Toggle.vue.d.ts +1 -1
- package/dist/composables/dark/index.d.ts +1 -1
- package/dist/composables/dark/useGlobalDark.d.ts +23 -1
- package/dist/composables/glass/canvas2d/useCanvas2D.d.ts +13 -6
- package/dist/composables/glass/index.d.ts +5 -2
- package/dist/composables/glass/useSpecularPointer.d.ts +33 -0
- package/dist/composables/glass/useSpecularTracking.d.ts +20 -0
- package/dist/composables/glass/vSpecular.d.ts +2 -0
- package/dist/composables/glass/webgl/shaders/flow.glsl.d.ts +1 -0
- package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +16 -0
- package/dist/composables/glass/webgpu/index.d.ts +2 -0
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +54 -0
- package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +84 -0
- package/dist/composables/motion/core/index.d.ts +1 -0
- package/dist/composables/motion/index.d.ts +4 -0
- package/dist/composables/motion/useDockCtaReceive.d.ts +59 -0
- package/dist/composables/motion/useDragMorph.d.ts +77 -0
- package/dist/composables/motion/useLiquidFlex.d.ts +11 -0
- package/dist/composables/motion/useLiquidPress.d.ts +71 -0
- package/dist/composables/motion/useLiquidReveal.d.ts +51 -0
- package/dist/composables/motion/useNumericTransition.d.ts +3 -3
- package/dist/composables/motion/usePointerVelocityField.d.ts +98 -0
- package/dist/composables/motion/useViewTransition.d.ts +36 -1
- package/dist/concentric.d.ts +1 -0
- package/dist/concentric.js +562 -0
- package/dist/configurator.js +3 -2
- package/dist/confirm-dialog.js +22 -24
- package/dist/constellation.js +93 -95
- package/dist/context-menu.js +3 -3
- package/dist/controls.js +10 -4
- package/dist/createCanvasLifecycle-CHD5XrDW.js +82 -0
- package/dist/dark.d.ts +1 -1
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dock.js +738 -442
- package/dist/{dockContext-BegmJVmx.js → dockContext-BNfyPLe9.js} +1 -1
- package/dist/dom.js +5 -5
- package/dist/dot-flow-field.d.ts +1 -0
- package/dist/dot-flow-field.js +604 -0
- package/dist/drawer.d.ts +1 -0
- package/dist/drawer.js +380 -0
- package/dist/{dropdown-menu-DzkkyBwX.js → dropdown-menu-CofSZuk8.js} +14 -15
- package/dist/dropdown-menu.js +1 -1
- package/dist/easing.d.ts +1 -0
- package/dist/easing.js +463 -0
- package/dist/expandable-container.js +45 -38
- package/dist/fading-scroll.d.ts +1 -0
- package/dist/fading-scroll.js +2 -0
- package/dist/focus-scope.d.ts +1 -0
- package/dist/focus-scope.js +23 -0
- package/dist/forms.js +7 -7
- package/dist/fourier-field.js +135 -122
- package/dist/fourier-math.js +2 -2
- package/dist/glass-panel.js +39 -36
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +154 -362
- package/dist/goo-blob.js +838 -227
- package/dist/handmark.d.ts +1 -0
- package/dist/handmark.js +707 -0
- package/dist/header-ribbon.js +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/hover-popover.js +1 -1
- package/dist/icon-chip.d.ts +1 -0
- package/dist/icon-chip.js +2 -0
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/instrument-chassis.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +6 -6
- package/dist/{math-U6-RrLmV.js → math-BINYmg5z.js} +11 -3
- package/dist/{menuItemVariants-DPiEarb0.js → menuItemVariants-D8VNHq22.js} +10 -4
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +25 -22
- package/dist/metric-stack.js +4 -8
- package/dist/motion-core.js +36 -35
- package/dist/motion-curves.js +1 -1
- package/dist/motion.js +157 -55
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.d.ts +1 -0
- package/dist/pager-dots.js +91 -0
- package/dist/paper-backdrop.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/{presets-BKVyQfbt.js → presets-BW2b-fr1.js} +14 -1
- package/dist/{compile-B7NGOBcP.js → procedural-color.glsl-CIFsJhwI.js} +1 -155
- package/dist/procedural-color.wgsl-CToRHugY.js +224 -0
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +2 -2
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +10 -12
- package/dist/select.js +3 -3
- package/dist/separator.js +1 -1
- package/dist/sheet-tZMg0E0w.js +218 -0
- package/dist/sheet.js +1 -1
- package/dist/{slider-B-JP2JlI.js → slider-DVb4HXU-.js} +7 -7
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +3 -3
- package/dist/spa-view.d.ts +1 -0
- package/dist/spa-view.js +46 -0
- package/dist/styles/animations.css +40 -31
- package/dist/styles/border-progress.css +109 -0
- package/dist/styles/cards.css +76 -0
- package/dist/styles/components.css +1 -1
- package/dist/styles/configurator.css +35 -0
- package/dist/styles/critical-partition.mjs +140 -0
- package/dist/styles/critical.css +12 -0
- package/dist/styles/deferred.css +31 -0
- package/dist/styles/dock/density.css +64 -0
- package/dist/styles/dock/layers.css +54 -30
- package/dist/styles/dock/morph.css +124 -7
- package/dist/styles/dock/overflow.css +31 -2
- package/dist/styles/dock/rail-extend.css +168 -71
- package/dist/styles/dock/section.css +59 -0
- package/dist/styles/dock/shell.css +83 -16
- package/dist/styles/dock-controls/icon-button.css +11 -1
- package/dist/styles/dock-controls/tab-button.css +24 -83
- package/dist/styles/dock-controls/triggers.css +7 -0
- package/dist/styles/dock.css +38 -3
- package/dist/styles/drawer.css +127 -35
- package/dist/styles/feedback-tone.css +104 -0
- package/dist/styles/glass/deep.css +44 -0
- package/dist/styles/glass/ladder.css +154 -52
- package/dist/styles/glass/material.css +78 -15
- package/dist/styles/glass/reveal.css +136 -0
- package/dist/styles/glass/rim.css +100 -0
- package/dist/styles/glass/surface-axis.css +113 -0
- package/dist/styles/glass/surfaces.css +189 -15
- package/dist/styles/glass-refract.css +96 -44
- package/dist/styles/glass-specular-track.css +7 -0
- package/dist/styles/glass.css +8 -2
- package/dist/styles/hover-popover.css +7 -6
- package/dist/styles/icon-chip.css +211 -0
- package/dist/styles/index.css +78 -4
- package/dist/styles/instrument-chassis.css +107 -2
- package/dist/styles/menu.css +127 -0
- package/dist/styles/scroll-choreography.css +300 -0
- package/dist/styles/segmented-tabs.css +188 -86
- package/dist/styles/select.css +50 -0
- package/dist/styles/theme/bridges.css +22 -1
- package/dist/styles/theme/literals.css +11 -2
- package/dist/styles/theme/radius.css +6 -1
- package/dist/styles/tokens/color-radius.css +40 -13
- package/dist/styles/tokens/dark-arm.css +200 -20
- package/dist/styles/tokens/glass-deep.css +75 -0
- package/dist/styles/tokens/glass-fx.css +333 -0
- package/dist/styles/tokens/glass.css +95 -315
- package/dist/styles/tokens/light-dark.css +64 -22
- package/dist/styles/tokens/offsets.css +116 -0
- package/dist/styles/tokens/on-glass-fg.css +39 -0
- package/dist/styles/tokens/property-regs.css +130 -10
- package/dist/styles/tokens/scale-paper.css +155 -84
- package/dist/styles/tokens/scheme-motion.css +102 -46
- package/dist/styles/tokens/scroll-tokens.css +123 -0
- package/dist/styles/tokens/{offsets-sizing.css → sizing.css} +88 -89
- package/dist/styles/tokens.css +9 -3
- package/dist/styles/transitions.css +7 -7
- package/dist/styles/typography/scale.css +153 -0
- package/dist/styles/typography/semantic.css +220 -0
- package/dist/styles/typography/utilities.css +174 -0
- package/dist/styles/typography.css +23 -507
- package/dist/styles/utilities/a11y-overrides.css +33 -4
- package/dist/styles/utilities/animate.css +27 -24
- package/dist/styles/utilities/base-misc.css +255 -0
- package/dist/styles/utilities/base.css +100 -138
- package/dist/styles/utilities/btn.css +21 -202
- package/dist/styles/utilities/metal.css +189 -0
- package/dist/styles/utilities.css +14 -7
- package/dist/styles/view-transition.css +4 -1
- package/dist/switch.js +1 -1
- package/dist/tabs.js +275 -191
- package/dist/timeline.js +2 -2
- package/dist/toast.js +1 -1
- package/dist/toggle-chip.js +3 -1
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{useAnimatedNumber-C5I3wWd8.js → useAnimatedNumber-BfUq2bUM.js} +1 -1
- package/dist/useCanvas2D-B8w_E3Rr.js +83 -0
- package/dist/useConfiguratorState-DNlOh6c8.js +161 -0
- package/dist/useDragMorph-DgxnsVJz.js +102 -0
- package/dist/{useGlobalDark-yhL4Wp-s.js → useGlobalDark-C28t0VWJ.js} +22 -3
- package/dist/useLiquidPress-kfb4KX79.js +39 -0
- package/dist/usePointerVelocityField-JbRd5CrM.js +137 -0
- package/dist/{useRAFLoop-Bxv0o6L5.js → useRAFLoop-UYa4zoiN.js} +1 -1
- package/dist/useSpring-C0jyvEJB.js +40 -0
- package/dist/useSpringMount-q1amq1SJ.js +71 -0
- package/dist/useSpringPress-BsqPr7FJ.js +34 -0
- package/dist/useSurfaceAxis-g0NloYEF.js +7 -0
- package/dist/{useTouchGate-Dg7MQI1G.js → useTouchGate-CBZTD4SD.js} +1 -1
- package/dist/vReveal-Czsb7zQC.js +10 -0
- package/dist/vSpecular-CQFmLNzA.js +68 -0
- package/dist/vendor-CKmzio-i.js +226 -0
- package/dist/watercolor-dot.js +12 -5
- package/package.json +193 -25
- package/src/styles/animations.css +40 -31
- package/src/styles/border-progress.css +109 -0
- package/src/styles/cards.css +76 -0
- package/src/styles/configurator.css +35 -0
- package/src/styles/critical-partition.mjs +140 -0
- package/src/styles/dock/density.css +64 -0
- package/src/styles/dock/layers.css +54 -30
- package/src/styles/dock/morph.css +124 -7
- package/src/styles/dock/overflow.css +31 -2
- package/src/styles/dock/rail-extend.css +168 -71
- package/src/styles/dock/section.css +59 -0
- package/src/styles/dock/shell.css +83 -16
- package/src/styles/dock-controls/icon-button.css +11 -1
- package/src/styles/dock-controls/tab-button.css +24 -83
- package/src/styles/dock-controls/triggers.css +7 -0
- package/src/styles/dock.css +38 -3
- package/src/styles/drawer.css +123 -35
- package/src/styles/feedback-tone.css +104 -0
- package/src/styles/glass/deep.css +44 -0
- package/src/styles/glass/ladder.css +154 -52
- package/src/styles/glass/material.css +78 -15
- package/src/styles/glass/reveal.css +136 -0
- package/src/styles/glass/rim.css +100 -0
- package/src/styles/glass/surface-axis.css +113 -0
- package/src/styles/glass/surfaces.css +189 -15
- package/src/styles/glass-refract.css +96 -44
- package/src/styles/glass-specular-track.css +7 -0
- package/src/styles/glass.css +8 -2
- package/src/styles/hover-popover.css +7 -6
- package/src/styles/icon-chip.css +211 -0
- package/src/styles/index.css +78 -4
- package/src/styles/instrument-chassis.css +107 -2
- package/src/styles/menu.css +127 -0
- package/src/styles/scroll-choreography.css +300 -0
- package/src/styles/segmented-tabs.css +184 -84
- package/src/styles/select.css +50 -0
- package/src/styles/theme/bridges.css +22 -1
- package/src/styles/theme/literals.css +11 -2
- package/src/styles/theme/radius.css +6 -1
- package/src/styles/tokens/color-radius.css +40 -13
- package/src/styles/tokens/dark-arm.css +200 -20
- package/src/styles/tokens/glass-deep.css +75 -0
- package/src/styles/tokens/glass-fx.css +333 -0
- package/src/styles/tokens/glass.css +95 -315
- package/src/styles/tokens/light-dark.css +64 -22
- package/src/styles/tokens/offsets.css +116 -0
- package/src/styles/tokens/on-glass-fg.css +39 -0
- package/src/styles/tokens/property-regs.css +130 -10
- package/src/styles/tokens/scale-paper.css +155 -84
- package/src/styles/tokens/scheme-motion.css +102 -46
- package/src/styles/tokens/scroll-tokens.css +123 -0
- package/src/styles/tokens/{offsets-sizing.css → sizing.css} +88 -89
- package/src/styles/tokens.css +9 -3
- package/src/styles/transitions.css +7 -7
- package/src/styles/typography/scale.css +153 -0
- package/src/styles/typography/semantic.css +220 -0
- package/src/styles/typography/utilities.css +174 -0
- package/src/styles/typography.css +23 -507
- package/src/styles/utilities/a11y-overrides.css +33 -4
- package/src/styles/utilities/animate.css +27 -24
- package/src/styles/utilities/base-misc.css +255 -0
- package/src/styles/utilities/base.css +100 -138
- package/src/styles/utilities/btn.css +21 -202
- package/src/styles/utilities/metal.css +189 -0
- package/src/styles/utilities.css +14 -7
- package/src/styles/view-transition.css +4 -1
- package/dist/CardAction-Cj2eycQ2.js +0 -157
- package/dist/DialogContent-Dl9WkAoS.js +0 -100
- package/dist/Notification-DdwNxIrI.js +0 -100
- package/dist/NumberFieldContent-CqaN-SvN.js +0 -145
- package/dist/PopoverContent-BYwt2-4x.js +0 -121
- package/dist/TabsList-Dttss653.js +0 -105
- package/dist/Toaster-D6q4HtXu.js +0 -263
- package/dist/button-ChXMfsud.js +0 -81
- package/dist/check-njhk-vfu.js +0 -7
- package/dist/chevron-down-DKkxb4VV.js +0 -7
- package/dist/chevron-right-CPXbqQQz.js +0 -7
- package/dist/chevron-up-n_24SqI-.js +0 -7
- package/dist/components/custom/underline/GlassUnderline.vue.d.ts +0 -84
- package/dist/components/custom/underline/index.d.ts +0 -2
- package/dist/components/custom/underline/types.d.ts +0 -56
- package/dist/components/ui/carousel/CarouselDots.vue.d.ts +0 -4
- package/dist/createLucideIcon-DydS2qgk.js +0 -43
- package/dist/minimize-2-BV31Ob_h.js +0 -38
- package/dist/search-BSGrf2Sk.js +0 -12
- package/dist/sheet-1fChZjtw.js +0 -214
- package/dist/underline.d.ts +0 -1
- package/dist/underline.js +0 -85
- package/dist/useCanvas2D-ClrQuZtp.js +0 -96
- package/dist/useConfiguratorState-DAoeHVue.js +0 -287
- package/dist/useSpecularTracking-Bo5su68i.js +0 -32
- package/dist/useSpringMount-CI2jOstM.js +0 -108
- package/dist/vReveal-CqaCz_mC.js +0 -44
- package/dist/x-BUwTKe50.js +0 -10
- /package/dist/{CollapsibleContent-CP9qF1v4.js → CollapsibleContent-68dEXIAl.js} +0 -0
- /package/dist/{InstrumentChassis-UUJX0-mW.js → InstrumentChassis-Bx0F_q5g.js} +0 -0
- /package/dist/{Label-r3WzWrsj.js → Label-C2ejNWeC.js} +0 -0
- /package/dist/{ModalOverlay-DVLI2VRr.js → ModalOverlay-D1VrWyoi.js} +0 -0
- /package/dist/{PaperBackdrop-DIXTtVq6.js → PaperBackdrop-Vf3tlpvd.js} +0 -0
- /package/dist/{SelectGroup-aumMgWLs.js → SelectGroup-DwwjicPY.js} +0 -0
- /package/dist/{SelectSeparator-BQ_1Fcbp.js → SelectSeparator-DXswVdRz.js} +0 -0
- /package/dist/{Separator-0JE6LtNu.js → Separator-pKF0oA4M.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-ok8pgSl5.js → _plugin-vue_export-helper-C1je1s0u.js} +0 -0
- /package/dist/{badge-UILT_3pZ.js → badge-D9XWW4GT.js} +0 -0
- /package/dist/{color-CUYeFbgd.js → color-DweYl7pE.js} +0 -0
- /package/dist/{constants-CS75AWHG.js → constants-BPOqYJAm.js} +0 -0
- /package/dist/{createContext-BM46COQ-.js → createContext-CpBNTRMI.js} +0 -0
- /package/dist/{prng-D27-B3tK.js → prng-Za0Rmgag.js} +0 -0
- /package/dist/{resolveCanvasColor-BBiYfp8g.js → resolveCanvasColor-CUyHr5Uu.js} +0 -0
- /package/dist/{springPresets--YdWTHtm.js → springPresets-CFQGQfdl.js} +0 -0
- /package/dist/{useIntersectionPause-Cc-H9ees.js → useIntersectionPause-Bj4sPkMh.js} +0 -0
- /package/dist/{useInterval-iHludrxk.js → useInterval-CvK1mL92.js} +0 -0
- /package/dist/{useKeyboardShortcuts-Be3w_Rwk.js → useKeyboardShortcuts-BXWXOZ-9.js} +0 -0
- /package/dist/{useLiquidFlex-BL0lLLN2.js → useLiquidFlex-mZPMiNXh.js} +0 -0
- /package/dist/{useResizeObserver-BhgdhOIj.js → useResizeObserver-Bpoi7tRE.js} +0 -0
- /package/dist/{useResolveTokenColor-Dvn2RZJW.js → useResolveTokenColor-vAylyR0x.js} +0 -0
- /package/dist/{useScrollProgress-Dlvx-L3v.js → useScrollProgress-D7bYU2RK.js} +0 -0
- /package/dist/{useSortable-muI29agz.js → useSortable-DHjtZSEd.js} +0 -0
- /package/dist/{useTextHighlight-DmRYkOBx.js → useTextHighlight-CWEi25hf.js} +0 -0
- /package/dist/{useTimer-Dzarvzuk.js → useTimer-BHJOKr35.js} +0 -0
- /package/dist/{useUserInvalidAria-B2h6jAM_.js → useUserInvalidAria-y5namzeE.js} +0 -0
- /package/dist/{useViewportReady-B40FK4Pa.js → useViewportReady-anbac3m6.js} +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* BB.W-CARVE4 — the dock morph MEASURE/SEAT helpers, carved out of
|
|
4
|
+
* `dockMorphContext.ts` to hold the no-god-module bound (the aurora→useAurora /
|
|
5
|
+
* goo-blob→useMetaballRenderer / fourier-field→useFourierField colocation pattern).
|
|
6
|
+
* The orchestrator stays the morph DRIVER (it owns the `SpringProgress`, the targets
|
|
7
|
+
* Set, the per-frame `--dock-morph-t` write); these are the PURE geometry + the
|
|
8
|
+
* reserved-footprint measure + the SYNCHRONOUS PRM seat it composes. `DOCK_SPRING` is
|
|
9
|
+
* byte-fenced — it lives in `../constants`, never touched here.
|
|
10
|
+
*
|
|
11
|
+
* The functions take their element/axis/target dependencies as explicit params (the
|
|
12
|
+
* orchestrator's closures collapse onto this seam) — no module-level state, so the
|
|
13
|
+
* extraction is behaviour-identical to the prior inline closures.
|
|
14
|
+
*/
|
|
15
|
+
/** The minimal morph-target shape the measure/seat helpers read (the orchestrator's
|
|
16
|
+
* full `MorphTarget` structurally satisfies it). */
|
|
17
|
+
export interface MorphMeasureTarget {
|
|
18
|
+
containerEl: Ref<HTMLElement | null>;
|
|
19
|
+
axis: Ref<"horizontal" | "vertical">;
|
|
20
|
+
/** PER-TARGET swap generation — the seat gates its pipeline on its own id. */
|
|
21
|
+
txId: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function dimOf(axis: "horizontal" | "vertical"): "width" | "height";
|
|
24
|
+
export declare function morphAxisProp(axis: "horizontal" | "vertical"): "inline-size" | "block-size";
|
|
25
|
+
export declare function getSize(el: HTMLElement, axis: "horizontal" | "vertical"): number;
|
|
26
|
+
export declare function clearMorphVars(el: HTMLElement): void;
|
|
27
|
+
/**
|
|
28
|
+
* BA-VJS-1 (valuejs-fold A-1) — the OTHER registered targets whose container is a
|
|
29
|
+
* DOM DESCENDANT of `outerEl` (a nested `<DockLayerGroup>` stack inside the outer
|
|
30
|
+
* `.dock-layers`). These are the pinned inner spans the outer measure must see at
|
|
31
|
+
* their OWN intrinsic `max-content`, not their collapsed pin, or the outer
|
|
32
|
+
* shrink-wraps to ~0.
|
|
33
|
+
*/
|
|
34
|
+
export declare function nestedTargetsWithin(outer: MorphMeasureTarget, outerEl: HTMLElement, targets: Iterable<MorphMeasureTarget>): MorphMeasureTarget[];
|
|
35
|
+
/**
|
|
36
|
+
* BA-VJS-1 — force ONE nested target to its own-axis `max-content` (clearing its
|
|
37
|
+
* reserved `--dock-morph-to` footprint so it sizes to content), and return a closure
|
|
38
|
+
* that RESTORES its exact prior inline state. The restore re-writes the precise
|
|
39
|
+
* prior `inline-size`/`block-size` inline value (or removes it if there was none),
|
|
40
|
+
* so the inner's in-flight pin is byte-identical after the outer's measurement —
|
|
41
|
+
* the inner target's own spring/pin pipeline is never disturbed.
|
|
42
|
+
*/
|
|
43
|
+
export declare function forceNestedMaxContent(n: MorphMeasureTarget): () => void;
|
|
44
|
+
/**
|
|
45
|
+
* BB.W-DOCK-MORPH-FAMILY (c) — measure the true `to` for ONE target with the
|
|
46
|
+
* morph axis forced to `max-content` (the same circular-measure escape the rAF
|
|
47
|
+
* path uses), composing the BA-VJS-1 nested-descendant `max-content` ordering so
|
|
48
|
+
* a nested group reads its TRUE intrinsic span (never `to:0`). The element is at
|
|
49
|
+
* the live painted geometry on entry; this forces+reads+restores the axis. PURE
|
|
50
|
+
* measure — no spring, no pin write.
|
|
51
|
+
*/
|
|
52
|
+
export declare function measureTo(t: MorphMeasureTarget, el: HTMLElement, targets: Iterable<MorphMeasureTarget>): number;
|
|
53
|
+
/** The orchestrator settle callbacks the synchronous seat composes (it clears the
|
|
54
|
+
* morph vars + nulls the leaving layer, then parks the root/spring once no target
|
|
55
|
+
* is morphing). */
|
|
56
|
+
export interface MorphSeatCallbacks {
|
|
57
|
+
/** Settle ONE target (clear its morph vars + null its leavingLayer). */
|
|
58
|
+
settleTarget(t: MorphMeasureTarget): void;
|
|
59
|
+
/** Park the shared scalar + spring once NO target is morphing. */
|
|
60
|
+
maybeSettleRoot(): void;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* BB.W-DOCK-MORPH-FAMILY (c) — the SYNCHRONOUS PRM seat. Under
|
|
64
|
+
* `prefers-reduced-motion: reduce` there is NO morph to play, so the geometry +
|
|
65
|
+
* the scalar seat at the target in ONE step (the `useDockOrientationMorph.pin()`
|
|
66
|
+
* precedent transplanted onto the collapse/expand path): measure the true `to`
|
|
67
|
+
* (composing the BA-VJS-1 nested ordering), write the box at `to` (the
|
|
68
|
+
* reserved-footprint reads at scale 1), and set `--dock-morph-t` to the endpoint
|
|
69
|
+
* for THIS swap — then clear the morph state immediately (no rAF measure-defer,
|
|
70
|
+
* no spring, no morph window). The box NEVER paints the collapsed `from` sliver
|
|
71
|
+
* with the scalar at 1 (the P0 terminal failure). Endpoint is the per-swap
|
|
72
|
+
* incoming-ness `1` (the new pane is fully in; the directional `--dock-expand-t`
|
|
73
|
+
* resolves to the class endpoint with `[data-morphing]` cleared).
|
|
74
|
+
*/
|
|
75
|
+
export declare function seatTargetSync(t: MorphMeasureTarget, id: number, root: HTMLElement | null, targets: Iterable<MorphMeasureTarget>, cb: MorphSeatCallbacks): void;
|
|
@@ -68,6 +68,19 @@ export interface UseLayerTransitionReturn {
|
|
|
68
68
|
currentLayer: Ref<string>;
|
|
69
69
|
/** The layer id currently fading out, or null. */
|
|
70
70
|
leavingLayer: Ref<string | null>;
|
|
71
|
+
/**
|
|
72
|
+
* BB.W-PERF-PRODUCER A′-4 — `true` while the size morph is in flight (the
|
|
73
|
+
* reactive twin of the `data-morphing` attr). A floating dock consumer reads
|
|
74
|
+
* this to hold a reka Popper re-position off the morph's critical frames.
|
|
75
|
+
*/
|
|
76
|
+
morphing: Ref<boolean>;
|
|
77
|
+
/**
|
|
78
|
+
* BB.W-PERF-PRODUCER A′-4 — schedule a reka Popper re-position OFF the
|
|
79
|
+
* synchronous morph flush. Queued while a morph is live (flushed ONCE on
|
|
80
|
+
* settle, against the final box), else run on the next rAF. Defers the floating
|
|
81
|
+
* re-position only — NOT the FLIP measure.
|
|
82
|
+
*/
|
|
83
|
+
deferReposition(cb: () => void): void;
|
|
71
84
|
}
|
|
72
85
|
/**
|
|
73
86
|
* Coordinates the size morph + crossfade between grid-stacked dock layer panes.
|
|
@@ -14,6 +14,41 @@ export interface DockRailItem {
|
|
|
14
14
|
/** The chip glyph (a `@lucide/vue` icon or any component). */
|
|
15
15
|
icon?: Component;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* BA.W-DOCK-SECTIONS — the three named zone kinds the declarative `<DockSection>`
|
|
19
|
+
* descriptor renders (the R8-9 "rail core + sections + nav" three-zone gestalt):
|
|
20
|
+
* - `"rail-core"` — the leading home/brand region (the ℱ wordmark / category trigger).
|
|
21
|
+
* - `"section"` — a named, divider-demarcated group of controls; a section
|
|
22
|
+
* carrying `layers` composes the existing `DockLayerGroup`/`DockLayer`
|
|
23
|
+
* registry (NOT a parallel layer machine).
|
|
24
|
+
* - `"nav"` — the trailing nav arrows / utility group.
|
|
25
|
+
*/
|
|
26
|
+
export type DockSectionKind = "rail-core" | "section" | "nav";
|
|
27
|
+
/**
|
|
28
|
+
* BA.W-DOCK-SECTIONS — one declarative section descriptor. A consumer passes
|
|
29
|
+
* `sections: readonly DockSectionDescriptor[]` to `<DockSection>` and the dock body
|
|
30
|
+
* renders the tripartite silhouette (rail-core | divided named sections | nav)
|
|
31
|
+
* demarcated by `<DockSeparator>` — the IG-A3 / R8-9 "abstract this into a re-usable
|
|
32
|
+
* component for layering" library gap. A `<script setup>` SFC cannot re-export a named
|
|
33
|
+
* type through its default barrel, so the descriptor lives here (the colocated types
|
|
34
|
+
* home, beside `DockRailItem`) and `DockSection.vue` imports it; the barrel re-exports
|
|
35
|
+
* it for consumers typing their `sections` array.
|
|
36
|
+
*/
|
|
37
|
+
export interface DockSectionDescriptor {
|
|
38
|
+
/** Which of the three zone kinds this descriptor renders. */
|
|
39
|
+
kind: DockSectionKind;
|
|
40
|
+
/** Stable identifier — the `v-for` key + the layer-context id for a `section`. */
|
|
41
|
+
id: string;
|
|
42
|
+
/** Optional accessible label for the grouped zone. */
|
|
43
|
+
label?: string;
|
|
44
|
+
/**
|
|
45
|
+
* For a `section` kind: the contextual facets this section carries. When present
|
|
46
|
+
* (length > 1) the section's facets are the rail's chips (the W-RAIL3 move OUT of
|
|
47
|
+
* the dock body — the facets ride the seam rail, never re-inflate the box). The
|
|
48
|
+
* descriptor names them; `<DockRail :items>` renders them.
|
|
49
|
+
*/
|
|
50
|
+
layers?: readonly DockRailItem[];
|
|
51
|
+
}
|
|
17
52
|
/**
|
|
18
53
|
* The ONE dock-morph spring authority — the iOS-26 interruptible-physics tuning the
|
|
19
54
|
* dock's single `SpringProgress` orchestrator (`dockMorphContext.ts`) AND the
|
|
@@ -9,6 +9,8 @@ export { default as DockDropdownTrigger } from "./DockDropdownTrigger.vue";
|
|
|
9
9
|
export { default as DockSeparator } from "./DockSeparator.vue";
|
|
10
10
|
export { default as DockRail } from "./DockRail.vue";
|
|
11
11
|
export type { DockRailItem } from "./constants";
|
|
12
|
+
export { default as DockSection } from "./DockSection.vue";
|
|
13
|
+
export type { DockSectionDescriptor, DockSectionKind } from "./constants";
|
|
12
14
|
export type { UseDockStateOptions, UseDockStateReturn, DockState } from "./composables";
|
|
13
15
|
export { useLayerTransition } from "./composables";
|
|
14
16
|
export type { UseLayerTransitionOptions, UseLayerTransitionReturn, } from "./composables";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { FlowFieldConfig } from "./constants";
|
|
2
|
+
/**
|
|
3
|
+
* DotFlowField — small dots seeded along undulating streamlines, rippling in waves.
|
|
4
|
+
*
|
|
5
|
+
* A curl-noise flow field traced by advected particles, where the scalar potential
|
|
6
|
+
* undulates as a Gerstner/Tessendorf sum-of-sines water-wave field (the cited SOTA
|
|
7
|
+
* math — `composables/flowField.ts`). WebGPU-FIRST: the compute pass advects N
|
|
8
|
+
* particles through the analytic ∇⊥ψ velocity, the render pass draws instanced
|
|
9
|
+
* billboard quads; a Canvas2D point-cloud fallback steps the SAME evaluator where
|
|
10
|
+
* WebGPU is absent (the ~5-10% tail). It composes `useDotFlowField` → the
|
|
11
|
+
* `createGpuSubstrate` picker over the ONE canvas lifecycle leaf (offscreen-pause,
|
|
12
|
+
* live-PRM freeze, consumer-owned DPR) — it never bootstraps its own context.
|
|
13
|
+
*
|
|
14
|
+
* The DEFAULT palette is the warm-cream library identity; the reference teal-on-navy
|
|
15
|
+
* is a DEMO preset (presets-in-consumers — never a library token).
|
|
16
|
+
*/
|
|
17
|
+
type __VLS_Props = {
|
|
18
|
+
/** The full author schema (the studio's `useConfiguratorState` model). */
|
|
19
|
+
config?: FlowFieldConfig;
|
|
20
|
+
/**
|
|
21
|
+
* The declarative WCAG-2.2.2 pause seam. `v-model:paused` parks the render loop
|
|
22
|
+
* (the substrate's `manual` suspend) when `true`. Wire `<DockBackgroundToggle>`'s
|
|
23
|
+
* `@update:paused` to this `v-model`.
|
|
24
|
+
*/
|
|
25
|
+
paused?: boolean;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
28
|
+
pause: () => void;
|
|
29
|
+
resume: () => void;
|
|
30
|
+
wake: () => void;
|
|
31
|
+
renderAt: (timeSec: number) => void;
|
|
32
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
|
+
"update:paused": (value: boolean) => any;
|
|
34
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
35
|
+
"onUpdate:paused"?: ((value: boolean) => any) | undefined;
|
|
36
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** A 2-vector. */
|
|
2
|
+
export interface Vec2 {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* One Gerstner / Tessendorf wave component. `amplitude` A_i, `wavelength` λ_i (so
|
|
8
|
+
* k_i = 2π/λ_i), `direction` in DEGREES (the unit travel direction), `phase` φ_i.
|
|
9
|
+
* `ω_i = √(g·k_i)` is derived from the dispersion relation, not stored.
|
|
10
|
+
*/
|
|
11
|
+
export interface WaveComponent {
|
|
12
|
+
amplitude: number;
|
|
13
|
+
wavelength: number;
|
|
14
|
+
/** Travel direction in degrees (0 = +x). */
|
|
15
|
+
direction: number;
|
|
16
|
+
phase: number;
|
|
17
|
+
}
|
|
18
|
+
/** Deep-water gravity constant (normalized; scales the dispersion ω). */
|
|
19
|
+
export declare const FLOW_GRAVITY = 9.81;
|
|
20
|
+
/**
|
|
21
|
+
* The Gerstner-sum velocity v(p,t) = ∇⊥h = (∂h/∂y, −∂h/∂x), ANALYTIC. The single
|
|
22
|
+
* math source the WGSL kernel transcribes. `windSpeed` scales the dispersion ω;
|
|
23
|
+
* `windDirection` (deg) is folded into each component's direction by the caller (the
|
|
24
|
+
* components carry their own absolute direction). Returns the un-normalized flow vector.
|
|
25
|
+
*/
|
|
26
|
+
export declare function gerstnerVelocity(p: Vec2, timeSec: number, waves: readonly WaveComponent[], windSpeed: number): Vec2;
|
|
27
|
+
/** The 2D curl of the scalar fbm potential (the JS twin of `curlFBM`). */
|
|
28
|
+
export declare function curlFBM(p: Vec2): Vec2;
|
|
29
|
+
/**
|
|
30
|
+
* The COMPOSITE flow velocity v(p,t): the Gerstner sum-of-sines analytic ∇⊥h PLUS the
|
|
31
|
+
* `curlStrength`-weighted fbm curl-noise braiding term. The SINGLE math source the WGSL
|
|
32
|
+
* compute kernel transcribes; `proof:flow-field` clause 3 round-trips the two paths.
|
|
33
|
+
*/
|
|
34
|
+
export declare function sampleVelocity(p: Vec2, timeSec: number, waves: readonly WaveComponent[], windSpeed: number, curlStrength: number): Vec2;
|
|
35
|
+
/**
|
|
36
|
+
* Build the default 6-octave Phillips-spectrum wave ladder about a dominant wind
|
|
37
|
+
* direction. Amplitudes follow `A_i ∝ exp(−1/(k_i·L)²) / k_i²` (Tessendorf §4), so the
|
|
38
|
+
* field is energy-realistic. The directions spread about `windDirection` so the
|
|
39
|
+
* streamlines braid like a river delta (not a flat band).
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildWaveLadder(windDirection: number, octaves?: number): WaveComponent[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { OklchStop } from "../../../../composables/color";
|
|
2
|
+
import { type FlowFieldConfig } from "../constants";
|
|
3
|
+
export declare const FLOW_COMPUTE_UNIFORM_BYTES: number;
|
|
4
|
+
export interface FlowUniformScratch {
|
|
5
|
+
buffer: ArrayBuffer;
|
|
6
|
+
f32: Float32Array;
|
|
7
|
+
i32: Int32Array;
|
|
8
|
+
}
|
|
9
|
+
export declare function createFlowComputeScratch(): FlowUniformScratch;
|
|
10
|
+
/** The domain half-extent (mirrors the WGSL `uDomainHalf`). */
|
|
11
|
+
export declare const FLOW_DOMAIN_HALF = 0.85;
|
|
12
|
+
/** Pack the compute uniforms in place. */
|
|
13
|
+
export declare function packFlowComputeUniforms(scratch: FlowUniformScratch, config: FlowFieldConfig, timeSec: number, dt: number, particleCount: number): FlowUniformScratch;
|
|
14
|
+
export declare const FLOW_RENDER_UNIFORM_BYTES: number;
|
|
15
|
+
export declare function createFlowRenderScratch(): FlowUniformScratch;
|
|
16
|
+
/** Pack the render uniforms in place. */
|
|
17
|
+
export declare function packFlowRenderUniforms(scratch: FlowUniformScratch, config: FlowFieldConfig, timeSec: number, aspect: number, canvasCssMin: number, palette: OklchStop[]): FlowUniformScratch;
|
|
18
|
+
/** The byte size of one particle in the storage buffer (vec4<f32>). */
|
|
19
|
+
export declare const FLOW_PARTICLE_BYTES = 16;
|
|
20
|
+
/**
|
|
21
|
+
* Seed the particle storage buffer: each particle is (pos.x, pos.y, age, seed) in the
|
|
22
|
+
* domain [-half, half]. The seed is deterministic per index so a re-mount is reproducible.
|
|
23
|
+
*/
|
|
24
|
+
export declare function seedParticleBuffer(particleCount: number): Float32Array;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
import { type GpuBackend } from "../../../../composables/glass/webgpu/useGpuSubstrate";
|
|
3
|
+
import { type OklchStop } from "../../../../composables/color";
|
|
4
|
+
import type { FlowFieldConfig } from "../constants";
|
|
5
|
+
export interface UseDotFlowFieldOptions {
|
|
6
|
+
config: FlowFieldConfig;
|
|
7
|
+
/** Resolve the dot-color palette as OKLCh (the demo themes it; default warm-identity). */
|
|
8
|
+
getPalette: () => OklchStop[];
|
|
9
|
+
/** `"capture"` → renderAt-only (the deterministic π capture path). Default `"live"`. */
|
|
10
|
+
mode?: "live" | "capture";
|
|
11
|
+
}
|
|
12
|
+
/** The uniform handle a consumer wires its lifecycle against (backend-agnostic). */
|
|
13
|
+
export interface DotFlowFieldHandle {
|
|
14
|
+
/** The resolved backend (`"webgpu"` where supported, else the Canvas2D fallback as `"webgl2"`). */
|
|
15
|
+
readonly backend: GpuBackend;
|
|
16
|
+
/** Park the loop (the WCAG-2.2.2 pause seam — `DockBackgroundToggle` wires this). */
|
|
17
|
+
pause: () => void;
|
|
18
|
+
/** Re-arm the loop. */
|
|
19
|
+
resume: () => void;
|
|
20
|
+
/** Re-arm a parked loop on demand (a pointer/setter that re-introduced motion). */
|
|
21
|
+
wake: () => void;
|
|
22
|
+
/** Draw one frame out-of-loop (capture / thumbnail). */
|
|
23
|
+
renderAt: (timeSec: number) => void;
|
|
24
|
+
/** The live `prefers-reduced-motion: reduce` state. */
|
|
25
|
+
readonly reducedMotion: boolean;
|
|
26
|
+
/** Tear down the renderer + release GPU/2D resources. */
|
|
27
|
+
dispose: () => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Mount the dot-flow-field renderer on `canvasRef`. The WebGPU primary runs the
|
|
31
|
+
* compute+render two-pass; the Canvas2D fallback steps the SAME `flowField.ts` evaluator
|
|
32
|
+
* (the ONE math source). Returns the uniform lifecycle handle.
|
|
33
|
+
*/
|
|
34
|
+
export declare function useDotFlowField(canvasRef: Ref<HTMLCanvasElement | null>, options: UseDotFlowFieldOptions): DotFlowFieldHandle;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WebGPUCanvasFrame } from "../../../../composables/glass/webgpu/useWebGPUCanvas";
|
|
2
|
+
import type { OklchStop } from "../../../../composables/color";
|
|
3
|
+
import type { FlowFieldConfig } from "../constants";
|
|
4
|
+
export interface FlowWGPUSetupDeps {
|
|
5
|
+
canvas: HTMLCanvasElement;
|
|
6
|
+
config: FlowFieldConfig;
|
|
7
|
+
/** The resolved (ColorResolver) palette stops as OKLCh — re-read each frame so a live palette edit reaches the buffer. */
|
|
8
|
+
getPalette: () => OklchStop[];
|
|
9
|
+
/** Demand-gate (the renderer's quiescence layer — substrate-agnostic). */
|
|
10
|
+
shouldContinue: () => boolean;
|
|
11
|
+
/** Reduced-motion read (the substrate owns the query; the renderer maps the clock). */
|
|
12
|
+
getReducedMotion: () => boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Build the dot-flow-field `setupWGPU(device, context, format)` callback. Closes over the
|
|
16
|
+
* config/palette getters + the renderer's demand gate.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createFlowWGPUSetup(deps: FlowWGPUSetupDeps): (device: GPUDevice, context: GPUCanvasContext, format: GPUTextureFormat) => WebGPUCanvasFrame;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { WaveComponent } from "./composables/flowField";
|
|
2
|
+
import type { OklchStop } from "../../../composables/color";
|
|
3
|
+
/** Compile-time particle cap — mirrors the WGSL storage-buffer array bound. */
|
|
4
|
+
export declare const MAX_PARTICLES = 16384;
|
|
5
|
+
/** Compile-time wave-component cap — mirrors the WGSL `MAX_WAVE_COMPONENTS` #define. */
|
|
6
|
+
export declare const MAX_WAVE_COMPONENTS = 8;
|
|
7
|
+
/** Compile-time palette cap — mirrors the WGSL `MAX_FLOW_STOPS` #define. */
|
|
8
|
+
export declare const MAX_FLOW_STOPS = 4;
|
|
9
|
+
/** The default advected-dot count (coarse-pointer/mobile clamps lower). */
|
|
10
|
+
export declare const DEFAULT_PARTICLE_COUNT = 4000;
|
|
11
|
+
/**
|
|
12
|
+
* The full author schema — the studio's `useConfiguratorState` model. Every field is a
|
|
13
|
+
* tunable the demo configurator drives; the SFC resolves it into the uniform table.
|
|
14
|
+
*/
|
|
15
|
+
export interface FlowFieldConfig {
|
|
16
|
+
/** The advected-dot count (500..MAX_PARTICLES). */
|
|
17
|
+
particleCount: number;
|
|
18
|
+
/** The Gerstner sum-of-sines table (1..MAX_WAVE_COMPONENTS). */
|
|
19
|
+
waveComponents: WaveComponent[];
|
|
20
|
+
/** The dominant wave-travel direction in degrees (the field's overall lean). */
|
|
21
|
+
windDirection: number;
|
|
22
|
+
/** The dispersion-driven travel speed (scales ω). */
|
|
23
|
+
windSpeed: number;
|
|
24
|
+
/** The fbm curl-noise braiding term weight over the pure Gerstner field (0..1). */
|
|
25
|
+
curlStrength: number;
|
|
26
|
+
/** The billboard base radius in px @ 1×. */
|
|
27
|
+
dotSize: number;
|
|
28
|
+
/** How much |v| thins the dot (denser-where-calm — the reference's varying size). */
|
|
29
|
+
dotSizeVelocity: number;
|
|
30
|
+
/** The dot-color ramp (the demo themes it teal); resolved via the ColorResolver. */
|
|
31
|
+
palette: OklchStop[];
|
|
32
|
+
/** The ground color (the demo sets dark navy; default transparent). */
|
|
33
|
+
background: OklchStop | "transparent";
|
|
34
|
+
/** Pointer-warp the field (a local velocity perturbation about the cursor). */
|
|
35
|
+
interactive: boolean;
|
|
36
|
+
/** ONE static frame then park under `prefers-reduced-motion: reduce`. */
|
|
37
|
+
respectReducedMotion: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The warm-cream identity palette (the library default — NOT teal). A two-stop
|
|
41
|
+
* warm-amber ramp over the warm-cream foreground family, resolved via the ColorResolver.
|
|
42
|
+
* A consumer (the demo) themes it teal-on-navy through a PRESET, never a token edit.
|
|
43
|
+
*/
|
|
44
|
+
export declare const WARM_IDENTITY_PALETTE: OklchStop[];
|
|
45
|
+
/** The default 6-octave Phillips wave ladder about a 35° diagonal wind. */
|
|
46
|
+
export declare const DEFAULT_WAVE_COMPONENTS: WaveComponent[];
|
|
47
|
+
/** The shipped warm-identity default config. */
|
|
48
|
+
export declare const DEFAULT_FLOW_CONFIG: FlowFieldConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as DotFlowField } from "./DotFlowField.vue";
|
|
2
|
+
export { useDotFlowField, type DotFlowFieldHandle, type UseDotFlowFieldOptions, } from "./composables/useDotFlowField";
|
|
3
|
+
export { type FlowFieldConfig, DEFAULT_FLOW_CONFIG, DEFAULT_WAVE_COMPONENTS, WARM_IDENTITY_PALETTE, MAX_PARTICLES, MAX_WAVE_COMPONENTS, MAX_FLOW_STOPS, DEFAULT_PARTICLE_COUNT, } from "./constants";
|
|
4
|
+
export { type WaveComponent, type Vec2, sampleVelocity, gerstnerVelocity, curlFBM, buildWaveLadder, FLOW_GRAVITY, } from "./composables/flowField";
|
|
5
|
+
export type { OklchStop } from "../../../composables/color";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FLOW_FIELD_COMPUTE_WGSL = "\nconst MAX_WAVE_COMPONENTS: i32 = 8;\nconst PI: f32 = 3.141592653589793;\nconst TAU: f32 = 6.283185307179586;\nconst FLOW_GRAVITY: f32 = 9.81;\nconst CURL_EPS: f32 = 0.012;\nconst FBM_ROT: mat2x2<f32> = mat2x2<f32>(0.8, 0.6, -0.6, 0.8);\n\nstruct Particle {\n // (pos.x, pos.y, age, seed)\n data: vec4<f32>,\n};\n\n// \u2500\u2500 Uniforms (the typed-struct source-of-truth \u2014 see uniformBridgeWGPU.ts) \u2500\u2500\nstruct FlowUniforms {\n // p0: (uTime, uDt, uWindSpeed, uCurlStrength)\n p0: vec4<f32>,\n // p1: (uDomainHalf, uReseedJitter, _pad, _pad)\n p1: vec4<f32>,\n // ints: (uWaveCount, uParticleCount, _pad, _pad)\n ints: vec4<i32>,\n // each wave row: (amplitude, wavelength, directionDeg, phase)\n waves: array<vec4<f32>, 8>,\n};\n\n@group(0) @binding(0) var<uniform> u: FlowUniforms;\n@group(0) @binding(1) var<storage, read_write> particles: array<Particle>;\n\n// \u2500\u2500 The Gerstner-sum analytic \u2207\u22A5h velocity (transcribes flowField.ts gerstnerVelocity) \u2500\u2500\nfn gerstnerVelocity(p: vec2<f32>, t: f32) -> vec2<f32> {\n var dhdx = 0.0;\n var dhdy = 0.0;\n let windSpeed = u.p0.z;\n let waveCount = u.ints.x;\n for (var i = 0; i < MAX_WAVE_COMPONENTS; i = i + 1) {\n if (i >= waveCount) { break; }\n let w = u.waves[i];\n let amplitude = w.x;\n let wavelength = max(w.y, 1e-4);\n let dirRad = w.z * PI / 180.0;\n let phase = w.w;\n let k = TAU / wavelength;\n let d = vec2<f32>(cos(dirRad), sin(dirRad));\n let omega = sqrt(FLOW_GRAVITY * k) * windSpeed;\n let theta = k * (d.x * p.x + d.y * p.y) - omega * t + phase;\n let akc = amplitude * k * cos(theta);\n dhdx = dhdx + akc * d.x;\n dhdy = dhdy + akc * d.y;\n }\n // v = \u2207\u22A5h = (\u2202h/\u2202y, \u2212\u2202h/\u2202x).\n return vec2<f32>(dhdy, -dhdx);\n}\n\n// \u2500\u2500 Shared curl-noise basis (the WGSL twin of flow.glsl.ts curlFBM) \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\nfn valueNoise(p: vec2<f32>) -> f32 {\n let i = floor(p);\n let f = fract(p);\n let u2 = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);\n let a = hash21(i + vec2<f32>(0.0, 0.0));\n let b = hash21(i + vec2<f32>(1.0, 0.0));\n let c = hash21(i + vec2<f32>(0.0, 1.0));\n let d = hash21(i + vec2<f32>(1.0, 1.0));\n return mix(mix(a, b, u2.x), mix(c, d, u2.x), u2.y);\n}\n\nfn potentialFBM(p0: vec2<f32>) -> f32 {\n var v = 0.0;\n var amp = 0.5;\n var freq = 1.0;\n var p = p0;\n for (var i = 0; i < 3; i = i + 1) {\n v = v + amp * valueNoise(p * freq);\n p = FBM_ROT * p;\n freq = freq * 2.0;\n amp = amp * 0.5;\n }\n return v;\n}\n\nfn curlFBM(p: vec2<f32>) -> vec2<f32> {\n let dx = potentialFBM(p + vec2<f32>(CURL_EPS, 0.0)) - potentialFBM(p - vec2<f32>(CURL_EPS, 0.0));\n let dy = potentialFBM(p + vec2<f32>(0.0, CURL_EPS)) - potentialFBM(p - vec2<f32>(0.0, CURL_EPS));\n let g = vec2<f32>(dx, dy) / (2.0 * CURL_EPS);\n return vec2<f32>(g.y, -g.x);\n}\n\n// The composite flow velocity (transcribes flowField.ts sampleVelocity EXACTLY).\nfn sampleVelocity(p: vec2<f32>, t: f32) -> vec2<f32> {\n let curlStrength = u.p0.w;\n var v = gerstnerVelocity(p, t);\n if (curlStrength > 0.0) {\n let c = curlFBM(vec2<f32>(p.x * 1.7 + t * 0.15, p.y * 1.7));\n v = v + c * curlStrength;\n }\n return v;\n}\n\n// A particle that leaves the bounds re-spawns at a seed-derived position (so coverage\n// stays steady \u2014 the \u00A73 re-seed-at-edge rule). The seed advances each re-spawn so a\n// re-seeded particle does not pile on the previous spawn.\nfn reseed(seed: f32, age: f32) -> vec2<f32> {\n let half = u.p1.x;\n let r1 = hash21(vec2<f32>(seed * 71.13, age * 13.7));\n let r2 = hash21(vec2<f32>(seed * 19.31 + 4.0, age * 7.3 + 2.0));\n return (vec2<f32>(r1, r2) * 2.0 - 1.0) * half;\n}\n\n@compute @workgroup_size(64)\nfn cs_main(@builtin(global_invocation_id) gid: vec3<u32>) {\n let idx = gid.x;\n let count = u32(u.ints.y);\n if (idx >= count) { return; } // bounds-guard the dispatch tail\n\n let t = u.p0.x;\n let dt = u.p0.y;\n let half = u.p1.x;\n\n var pr = particles[idx];\n var pos = pr.data.xy;\n var age = pr.data.z;\n let seed = pr.data.w;\n\n let v = sampleVelocity(pos, t);\n // Forward Euler \u2014 p_{n+1} = p_n + v\u00B7dt.\n pos = pos + v * dt;\n age = age + dt;\n\n // Wrap / re-seed at the domain edge (re-spawn from the seed at a fresh position).\n if (abs(pos.x) > half || abs(pos.y) > half || age > 6.0) {\n pos = reseed(seed, age);\n age = 0.0;\n }\n\n particles[idx] = Particle(vec4<f32>(pos, age, seed));\n}\n";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { FlowFieldConfig } from "../constants";
|
|
2
|
+
import { type Vec2 } from "../composables/flowField";
|
|
3
|
+
/** A CPU particle (the Canvas2D-stepped twin of the WGSL storage Particle). */
|
|
4
|
+
export interface CpuParticle {
|
|
5
|
+
pos: Vec2;
|
|
6
|
+
age: number;
|
|
7
|
+
seed: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The CPU particle field — alloc + seed + step + paint, over the Canvas2D substrate.
|
|
11
|
+
* `step(dt, timeSec)` advects every particle through the SAME `sampleVelocity` evaluator
|
|
12
|
+
* the WGSL compute kernel transcribes; `paint(ctx)` draws the soft dots. The fallback's
|
|
13
|
+
* `degraded` parity is the CPU step count vs the GPU's per-particle instancing — the same
|
|
14
|
+
* flow, a coarser density.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createCpuFlowField(config: FlowFieldConfig): {
|
|
17
|
+
particles: CpuParticle[];
|
|
18
|
+
step: (dt: number, timeSec: number) => void;
|
|
19
|
+
paint: (ctx: CanvasRenderingContext2D, wCss: number, hCss: number, timeSec: number, dotColor: string) => void;
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FLOW_FIELD_RENDER_WGSL = "\nconst PI: f32 = 3.141592653589793;\nconst TAU: f32 = 6.283185307179586;\nconst FLOW_GRAVITY: f32 = 9.81;\nconst MAX_WAVE_COMPONENTS: i32 = 8;\nconst MAX_FLOW_STOPS: i32 = 4;\n\nstruct Particle {\n // (pos.x, pos.y, age, seed)\n data: vec4<f32>,\n};\n\n// \u2500\u2500 Render uniforms (the typed-struct source-of-truth \u2014 see uniformBridgeWGPU.ts) \u2500\u2500\nstruct RenderUniforms {\n // r0: (uTime, uWindSpeed, uCurlStrength, uDomainHalf)\n r0: vec4<f32>,\n // r1: (uDotSize, uDotSizeVelocity, uAspect, uVMax)\n r1: vec4<f32>,\n // ints: (uWaveCount, uStopCount, uParticleCount, _pad)\n ints: vec4<i32>,\n // bg: (background.rgb, hasBackground)\n bg: vec4<f32>,\n // each wave row: (amplitude, wavelength, directionDeg, phase)\n waves: array<vec4<f32>, 8>,\n // each palette stop: linear-sRGB rgb + _pad\n palette: array<vec4<f32>, 4>,\n};\n\n@group(0) @binding(0) var<uniform> u: RenderUniforms;\n@group(0) @binding(1) var<storage, read> particles: array<Particle>;\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 The Gerstner-sum velocity (the SAME transcription as the compute kernel, read here\n// for the per-particle size + color tint \u2014 denser-where-calm). \u2500\u2500\nfn gerstnerVelocity(p: vec2<f32>, t: f32) -> vec2<f32> {\n var dhdx = 0.0;\n var dhdy = 0.0;\n let windSpeed = u.r0.y;\n let waveCount = u.ints.x;\n for (var i = 0; i < MAX_WAVE_COMPONENTS; i = i + 1) {\n if (i >= waveCount) { break; }\n let w = u.waves[i];\n let k = TAU / max(w.y, 1e-4);\n let dirRad = w.z * PI / 180.0;\n let d = vec2<f32>(cos(dirRad), sin(dirRad));\n let omega = sqrt(FLOW_GRAVITY * k) * windSpeed;\n let theta = k * (d.x * p.x + d.y * p.y) - omega * t + w.w;\n let akc = w.x * k * cos(theta);\n dhdx = dhdx + akc * d.x;\n dhdy = dhdy + akc * d.y;\n }\n return vec2<f32>(dhdy, -dhdx);\n}\n\n// Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].\nfn samplePaletteLin(t: f32) -> vec3<f32> {\n let stopCount = u.ints.y;\n if (stopCount <= 1) { return u.palette[0].rgb; }\n let n = f32(stopCount);\n let ft = clamp(t, 0.0, 1.0) * (n - 1.0);\n let i0 = i32(floor(ft));\n let i1 = min(i0 + 1, stopCount - 1);\n let f = ft - f32(i0);\n let labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * u.palette[i0].rgb);\n let labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * u.palette[i1].rgb);\n return oklabToLinearSrgb(mix(labA, labB, f));\n}\n\nstruct VSOut {\n @builtin(position) pos: vec4<f32>,\n @location(0) local: vec2<f32>, // [-1,1] billboard-local coords for the soft circle\n @location(1) tint: f32, // velocity-derived color/alpha tint [0,1]\n @location(2) alphaScale: f32, // velocity-derived alpha scale (denser-where-calm)\n};\n\n@vertex\nfn vs_main(\n @builtin(vertex_index) vi: u32,\n @builtin(instance_index) ii: u32,\n) -> VSOut {\n // Two-triangle quad corners in billboard-local space.\n var corners = array<vec2<f32>, 6>(\n vec2<f32>(-1.0, -1.0), vec2<f32>(1.0, -1.0), vec2<f32>(-1.0, 1.0),\n vec2<f32>(-1.0, 1.0), vec2<f32>(1.0, -1.0), vec2<f32>(1.0, 1.0),\n );\n let local = corners[vi];\n\n let pr = particles[ii].data;\n let p = pr.xy;\n let t = u.r0.x;\n let half = u.r0.w;\n\n // Per-particle velocity \u2192 size + tint (denser-where-calm: |v| thins the dot).\n let v = gerstnerVelocity(p, t);\n let speed = length(v);\n let vMax = max(u.r1.w, 1e-4);\n let speedNorm = clamp(speed / vMax, 0.0, 1.0);\n let dotSizeVel = u.r1.y;\n // size_i = base \u00B7 (1 \u2212 speedNorm \u00B7 sizeVel) \u2014 calm = larger dot.\n let sizeWorld = u.r1.x * (1.0 - speedNorm * dotSizeVel);\n let alphaScale = 1.0 - speedNorm * 0.35; // calm = denser/brighter\n\n // Position the quad at the particle in clip space. Domain [-half,half] \u2192 NDC [-1,1];\n // the quad half-extent rides sizeWorld (in the same domain units, aspect-corrected x).\n let aspect = u.r1.z;\n let ndc = p / half;\n let off = local * sizeWorld / half;\n let offX = off.x / max(aspect, 1e-4);\n\n var out: VSOut;\n out.pos = vec4<f32>(ndc.x + offX, ndc.y + off.y, 0.0, 1.0);\n out.local = local;\n out.tint = speedNorm;\n out.alphaScale = alphaScale;\n return out;\n}\n\n@fragment\nfn fs_main(in: VSOut) -> @location(0) vec4<f32> {\n // Soft circle \u2014 radial smoothstep over the billboard-local radius.\n let r = length(in.local);\n let feather = 0.35;\n let mask = 1.0 - smoothstep(1.0 - feather, 1.0, r);\n if (mask < 0.002) { return vec4<f32>(0.0); }\n\n let lin = samplePaletteLin(in.tint);\n let alpha = mask * in.alphaScale;\n let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));\n // Premultiplied-alpha output.\n return vec4<f32>(rgb * alpha, alpha);\n}\n";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { EasingPickerMode, EasingPickerValue, JumpTerm } from "./composables/useEasingPicker";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Section label for the configurator layer. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** A token-style sub-label (the mono caption rung). */
|
|
6
|
+
name?: string;
|
|
7
|
+
/** The curve-authoring mode. */
|
|
8
|
+
mode?: EasingPickerMode;
|
|
9
|
+
/** The initial bezier preset key. */
|
|
10
|
+
preset?: string;
|
|
11
|
+
/** The initial step count. */
|
|
12
|
+
steps?: number;
|
|
13
|
+
/** The initial step jump term. */
|
|
14
|
+
term?: JumpTerm;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_ModelProps = {
|
|
17
|
+
modelValue?: EasingPickerValue;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
20
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
"update:modelValue": (value: EasingPickerValue | undefined) => any;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
|
+
"onUpdate:modelValue"?: ((value: EasingPickerValue | undefined) => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
label: string;
|
|
26
|
+
name: string;
|
|
27
|
+
mode: EasingPickerMode;
|
|
28
|
+
steps: number;
|
|
29
|
+
preset: string;
|
|
30
|
+
term: JumpTerm;
|
|
31
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type EasingPickerMode, type EasingPickerValue, type JumpTerm } from "./composables/useEasingPicker";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** The curve-authoring mode — `"bezier"` (draggable cubic-bezier) or
|
|
4
|
+
* `"steps"` (the steppedEase staircase). */
|
|
5
|
+
mode?: EasingPickerMode;
|
|
6
|
+
/** The initial bezier preset key. */
|
|
7
|
+
preset?: string;
|
|
8
|
+
/** The initial step count. */
|
|
9
|
+
steps?: number;
|
|
10
|
+
/** The initial step jump term. */
|
|
11
|
+
term?: JumpTerm;
|
|
12
|
+
/** Show the copy-the-literal readout affordance (default true). */
|
|
13
|
+
readout?: boolean;
|
|
14
|
+
/** Show the playback travel-dot control (default true). */
|
|
15
|
+
playback?: boolean;
|
|
16
|
+
/** A11y label for the canvas. */
|
|
17
|
+
label?: string;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_ModelProps = {
|
|
20
|
+
modelValue?: EasingPickerValue;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
23
|
+
declare var __VLS_73: {
|
|
24
|
+
value: EasingPickerValue;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_Slots = {} & {
|
|
27
|
+
footer?: (props: typeof __VLS_73) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
"update:modelValue": (value: EasingPickerValue | undefined) => any;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
32
|
+
"onUpdate:modelValue"?: ((value: EasingPickerValue | undefined) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
label: string;
|
|
35
|
+
mode: EasingPickerMode;
|
|
36
|
+
steps: number;
|
|
37
|
+
preset: string;
|
|
38
|
+
term: JumpTerm;
|
|
39
|
+
readout: boolean;
|
|
40
|
+
playback: boolean;
|
|
41
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
43
|
+
declare const _default: typeof __VLS_export;
|
|
44
|
+
export default _default;
|
|
45
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -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";
|