@mkbabb/glass-ui 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/CardAction-8whJrLWt.js +268 -0
- package/dist/{CommandShortcut-DdtWXxOK.js → CommandShortcut-D3yxgHNn.js} +25 -14
- package/dist/ConfiguratorRow-CaP7U3ZA.js +143 -0
- package/dist/ContextMenuContent-B3ZsheLV.js +90 -0
- package/dist/{ContextMenuSubContent-B0Vs6atR.js → ContextMenuSubContent-DDRID3qC.js} +28 -33
- package/dist/{DataTable-C464Zbqd.js → DataTable-Bc9kUtu_.js} +4 -4
- package/dist/{DialogContent-DDE6pQBU.js → DialogContent-6JtTB5x2.js} +11 -8
- package/dist/DialogFooter-9phqcRIS.js +80 -0
- package/dist/DialogScrollContent-TTuovQst.js +93 -0
- package/dist/{FadingScroll-DwNnvKMs.js → FadingScroll-DLRbH5Xr.js} +1 -1
- package/dist/HoverCardContent-Bel1gdLZ.js +88 -0
- package/dist/{HoverPopover-Dpzwvc4t.js → HoverPopover-BcIxvyqZ.js} +2 -2
- package/dist/{IconChip-BDw1j5mu.js → IconChip-DhbdGdFQ.js} +2 -1
- package/dist/{IconTooltip-DSjasZIt.js → IconTooltip-B0zimd2H.js} +1 -1
- package/dist/Input-Cg9DF62r.js +57 -0
- package/dist/{MetricBadge-BpC0R_Ec.js → MetricBadge-RHdBP72w.js} +1 -1
- package/dist/Notification-CphK7AAm.js +43 -0
- package/dist/NumberFieldContent-D8cXeyO4.js +140 -0
- package/dist/PagerDots-Cjx96la-.js +98 -0
- package/dist/{PopoverContent-BTorlp--.js → PopoverContent-DL7E6vJP.js} +4 -4
- package/dist/{Progress-hAT4gqGH.js → Progress-CnqB7gLm.js} +4 -4
- package/dist/{ScrollingText-CUVFTWk2.js → ScrollingText-CTZbA_cG.js} +2 -2
- package/dist/{SelectScrollDownButton-C1jb3b3K.js → SelectScrollDownButton-DAKCBEdW.js} +65 -61
- package/dist/{SelectSeparator-DK2y1Bun.js → SelectSeparator-C2UGOkXF.js} +1 -1
- package/dist/Separator-DQcwC2TR.js +44 -0
- package/dist/Switch-B8RscmRu.js +49 -0
- package/dist/Toaster-D9qIHjBI.js +274 -0
- package/dist/ToggleGroupItem-BLtr3TJq.js +170 -0
- package/dist/TooltipProvider-BJ_Y5EGX.js +109 -0
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +21 -33
- package/dist/api/types-extra.d.ts +37 -0
- package/dist/api.js +1 -1
- package/dist/aurora.js +1231 -260
- package/dist/badge.js +1 -1
- package/dist/border-progress.d.ts +1 -0
- package/dist/border-progress.js +98 -0
- package/dist/button-5dY1Dvhd.js +125 -0
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -3
- package/dist/card.js +2 -2
- package/dist/carousel.js +93 -110
- package/dist/collapsible.js +1 -1
- package/dist/color-Cs0-oxYL.js +116 -0
- package/dist/color.js +2 -2
- package/dist/command.js +1 -1
- package/dist/compile-nZ1xVYTp.js +19 -0
- package/dist/completion-seal.d.ts +1 -0
- package/dist/completion-seal.js +89 -0
- package/dist/components/custom/aurora/Aurora.vue.d.ts +10 -5
- 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/color.d.ts +13 -0
- package/dist/components/custom/aurora/composables/frameLoop.d.ts +9 -0
- package/dist/components/custom/aurora/composables/runtime.d.ts +31 -0
- package/dist/components/custom/aurora/composables/uniformBridge.d.ts +5 -1
- package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +60 -0
- package/dist/components/custom/aurora/composables/wgpuSetup.d.ts +37 -0
- package/dist/components/custom/aurora/constants/budget.d.ts +21 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +20 -2
- package/dist/components/custom/aurora/constants/renderMode.d.ts +77 -18
- package/dist/components/custom/aurora/constants/shaders/aurora-mediums.wgsl.d.ts +1 -0
- 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/spectrum-walk.d.ts +25 -0
- package/dist/components/custom/border-progress/composables/useBorderSpectrum.d.ts +18 -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/completion-seal/CompletionSeal.vue.d.ts +21 -0
- package/dist/components/custom/completion-seal/composables/useCompletionSeal.d.ts +37 -0
- package/dist/components/custom/completion-seal/constants.d.ts +46 -0
- package/dist/components/custom/completion-seal/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 +18 -0
- package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +22 -0
- package/dist/components/custom/concentric/composables/ringField.d.ts +85 -0
- package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +14 -0
- package/dist/components/custom/concentric/composables/useConcentric.d.ts +35 -0
- package/dist/components/custom/concentric/constants.d.ts +67 -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/confirm-dialog/ConfirmDialog.vue.d.ts +3 -3
- package/dist/components/custom/constellation/Constellation.vue.d.ts +5 -4
- package/dist/components/custom/constellation/composables/constellationGLSetup.d.ts +10 -0
- package/dist/components/custom/constellation/composables/constellationWGPUSetup.d.ts +19 -0
- package/dist/components/custom/constellation/composables/uniformBridgeWGPU.d.ts +66 -0
- package/dist/components/custom/constellation/composables/useConstellation.d.ts +3 -10
- package/dist/components/custom/constellation/constants.d.ts +33 -0
- package/dist/components/custom/constellation/constellationField.d.ts +31 -1
- package/dist/components/custom/constellation/constellationInteraction.d.ts +23 -14
- package/dist/components/custom/constellation/constellationRender.d.ts +25 -0
- package/dist/components/custom/constellation/constellationTypes.d.ts +38 -0
- package/dist/components/custom/constellation/constellationWell.d.ts +15 -0
- package/dist/components/custom/constellation/index.d.ts +5 -5
- package/dist/components/custom/constellation/shaders/constellation-lines.glsl.d.ts +2 -0
- package/dist/components/custom/constellation/shaders/constellation-lines.wgsl.d.ts +1 -0
- package/dist/components/custom/constellation/shaders/constellation-points.glsl.d.ts +2 -0
- package/dist/components/custom/constellation/shaders/constellation-points.wgsl.d.ts +1 -0
- package/dist/components/custom/deck/DeckPager.vue.d.ts +29 -0
- package/dist/components/custom/deck/composables/useDeck.d.ts +27 -0
- package/dist/components/custom/deck/composables/useDeckKeyboard.d.ts +25 -0
- package/dist/components/custom/deck/composables/useDeckSpring.d.ts +22 -0
- package/dist/components/custom/deck/constants.d.ts +14 -0
- package/dist/components/custom/deck/index.d.ts +8 -0
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +25 -4
- package/dist/components/custom/dock/DockLayerGroup.vue.d.ts +10 -2
- package/dist/components/custom/dock/DockStack.vue.d.ts +65 -0
- package/dist/components/custom/dock/GlassDock.vue.d.ts +4 -2
- package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +155 -0
- package/dist/components/custom/dock/composables/index.d.ts +2 -0
- package/dist/components/custom/dock/composables/useDockSearch.d.ts +85 -0
- package/dist/components/custom/dock/composables/useDockShellProps.d.ts +11 -0
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +13 -0
- package/dist/components/custom/dock/constants.d.ts +18 -14
- package/dist/components/custom/dock/index.d.ts +5 -2
- package/dist/components/custom/dot-flow-field/DotFlowField.vue.d.ts +42 -0
- package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +83 -0
- package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +39 -0
- package/dist/components/custom/dot-flow-field/composables/useDotFlowField.d.ts +35 -0
- package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +31 -0
- package/dist/components/custom/dot-flow-field/constants.d.ts +69 -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 +4 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +1 -0
- package/dist/components/custom/dot-matrix/DotMatrix.vue.d.ts +43 -0
- package/dist/components/custom/dot-matrix/composables/dotMatrixField.d.ts +89 -0
- package/dist/components/custom/dot-matrix/composables/uniformBridgeWGPU.d.ts +52 -0
- package/dist/components/custom/dot-matrix/composables/useDotMatrix.d.ts +34 -0
- package/dist/components/custom/dot-matrix/composables/useDotSphere.d.ts +27 -0
- package/dist/components/custom/dot-matrix/constants.d.ts +58 -0
- package/dist/components/custom/dot-matrix/index.d.ts +5 -0
- package/dist/components/custom/dot-matrix/shaders/dot-matrix.glsl.d.ts +4 -0
- package/dist/components/custom/dot-matrix/shaders/dot-matrix.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 +80 -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 +11 -0
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +43 -40
- package/dist/components/custom/fourier-field/composables/fourierFieldGLSetup.d.ts +15 -0
- package/dist/components/custom/fourier-field/composables/fourierFieldWGPUSetup.d.ts +20 -0
- package/dist/components/custom/fourier-field/composables/uniformBridgeWGPU.d.ts +41 -0
- package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +42 -0
- package/dist/components/custom/fourier-field/constants.d.ts +64 -0
- package/dist/components/custom/fourier-field/index.d.ts +23 -18
- package/dist/components/custom/fourier-field/shaders/fourier-field.compute.wgsl.d.ts +1 -0
- package/dist/components/custom/fourier-field/shaders/fourier-field.glsl.d.ts +4 -0
- package/dist/components/custom/fourier-field/shaders/fourier-field.render.wgsl.d.ts +1 -0
- package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +1 -1
- package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +13 -3
- 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/constants.d.ts +1 -1
- package/dist/components/custom/goo-blob/index.d.ts +1 -1
- package/dist/components/custom/goo-blob/shaders/metaball-noise.wgsl.d.ts +1 -0
- package/dist/components/custom/goo-blob/shaders/metaball-palette.wgsl.d.ts +1 -0
- package/dist/components/custom/goo-blob/shaders/metaball-uniforms.glsl.d.ts +1 -1
- package/dist/components/custom/goo-blob/shaders/metaball.wgsl.d.ts +1 -0
- package/dist/components/custom/goo-blob/types.d.ts +36 -0
- package/dist/components/custom/goo-dot-matrix/GooDotMatrix.vue.d.ts +49 -0
- package/dist/components/custom/goo-dot-matrix/composables/gooDotLattice.d.ts +24 -0
- package/dist/components/custom/goo-dot-matrix/composables/gooDotSetup.d.ts +50 -0
- package/dist/components/custom/goo-dot-matrix/composables/uniformBridgeWGPU.d.ts +35 -0
- package/dist/components/custom/goo-dot-matrix/composables/useGooDotMatrix.d.ts +31 -0
- package/dist/components/custom/goo-dot-matrix/constants.d.ts +76 -0
- package/dist/components/custom/goo-dot-matrix/index.d.ts +5 -0
- package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.frag.d.ts +11 -0
- package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.wgsl.d.ts +3 -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/labeled-field/LabeledField.vue.d.ts +21 -2
- package/dist/components/custom/metric-stack/MetricRow.vue.d.ts +15 -0
- package/dist/components/custom/metric-stack/MetricStack.vue.d.ts +1 -1
- package/dist/components/custom/pager-dots/PagerDots.vue.d.ts +9 -0
- package/dist/components/custom/pager-dots/index.d.ts +2 -0
- package/dist/components/custom/pager-dots/pagerWindow.d.ts +9 -0
- package/dist/components/custom/paper-grid/PaperGrid.vue.d.ts +42 -0
- package/dist/components/custom/paper-grid/composables/paperGrid.d.ts +90 -0
- package/dist/components/custom/paper-grid/composables/paperGridGLSetup.d.ts +16 -0
- package/dist/components/custom/paper-grid/composables/paperGridWGPUSetup.d.ts +19 -0
- package/dist/components/custom/paper-grid/composables/uniformBridgeWGPU.d.ts +16 -0
- package/dist/components/custom/paper-grid/composables/usePaperGrid.d.ts +31 -0
- package/dist/components/custom/paper-grid/constants.d.ts +57 -0
- package/dist/components/custom/paper-grid/index.d.ts +5 -0
- package/dist/components/custom/paper-grid/shaders/paper-grid.glsl.d.ts +4 -0
- package/dist/components/custom/paper-grid/shaders/paper-grid.wgsl.d.ts +1 -0
- package/dist/components/custom/search/FuzzySearch.vue.d.ts +8 -2
- package/dist/components/custom/search/SearchBar.vue.d.ts +8 -0
- package/dist/components/custom/search/index.d.ts +2 -0
- package/dist/components/custom/search/searchVariants.d.ts +19 -0
- package/dist/components/custom/selectable-chip/SelectableChip.vue.d.ts +50 -0
- package/dist/components/custom/selectable-chip/index.d.ts +2 -0
- package/dist/components/custom/selectable-chip/selectableChipVariants.d.ts +23 -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/split-chars/SplitChars.vue.d.ts +39 -0
- package/dist/components/custom/split-chars/index.d.ts +1 -0
- package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +12 -0
- package/dist/components/custom/tabs/composables/useTabDragMorph.d.ts +42 -0
- package/dist/components/custom/tabs/constants.d.ts +20 -2
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +30 -17
- package/dist/components/custom/watercolor-dot/useWatercolorBlob.d.ts +10 -5
- package/dist/components/ui/_shared/index.d.ts +2 -0
- package/dist/components/ui/_shared/menuItemVariants.d.ts +1 -1
- package/dist/components/ui/_shared/useControlSize.d.ts +46 -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 +79 -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 +3 -1
- 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/command/CommandDialog.vue.d.ts +9 -3
- package/dist/components/ui/command/CommandList.vue.d.ts +3 -0
- package/dist/components/ui/context-menu/ContextMenuContent.vue.d.ts +5 -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/dropdown-menu/DropdownMenuContent.vue.d.ts +4 -0
- 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/hover-card/HoverCardContent.vue.d.ts +3 -0
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/input/Input.vue.d.ts +3 -0
- package/dist/components/ui/number-field/NumberFieldInput.vue.d.ts +6 -1
- package/dist/components/ui/progress/ProgressDefault.vue.d.ts +3 -2
- package/dist/components/ui/select/SelectContent.vue.d.ts +4 -1
- package/dist/components/ui/sheet/index.d.ts +1 -1
- package/dist/components/ui/switch/Switch.vue.d.ts +2 -0
- package/dist/components/ui/tags-input/TagsInput.vue.d.ts +2 -2
- package/dist/components/ui/textarea/Textarea.vue.d.ts +3 -0
- 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/components/ui/tooltip/TooltipContent.vue.d.ts +3 -0
- package/dist/composables/color/index.d.ts +2 -0
- package/dist/composables/color/useAccentTone.d.ts +34 -0
- 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/useVizChoreography.d.ts +123 -0
- package/dist/composables/glass/vSpecular.d.ts +2 -0
- package/dist/composables/glass/webgl/createCanvasLifecycle.d.ts +10 -0
- package/dist/composables/glass/webgl/shaders/flow.glsl.d.ts +1 -0
- package/dist/composables/glass/webgl/shaders/flow.wgsl.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 +75 -0
- package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +85 -0
- package/dist/composables/glass/webgpu/webgpuDevice.d.ts +42 -0
- package/dist/composables/motion/core/index.d.ts +4 -0
- package/dist/composables/motion/index.d.ts +4 -0
- package/dist/composables/motion/scrollReader.d.ts +25 -0
- package/dist/composables/motion/springPresets.d.ts +20 -1
- package/dist/composables/motion/useCharStagger.d.ts +44 -0
- package/dist/composables/motion/useDockCtaReceive.d.ts +84 -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/useScrollChrome.d.ts +58 -0
- package/dist/composables/motion/useScrollTrigger.d.ts +67 -0
- package/dist/composables/motion/useSpringPress.d.ts +5 -5
- package/dist/composables/motion/useStaggerReveal.d.ts +24 -0
- package/dist/composables/sidebar/index.d.ts +4 -1
- package/dist/composables/sidebar/types.d.ts +68 -3
- package/dist/composables/sidebar/useClickDelegate.d.ts +4 -0
- package/dist/composables/sidebar/useLazyLoader.d.ts +5 -0
- package/dist/composables/sidebar/useScrollTo.d.ts +5 -0
- package/dist/composables/virtual/index.d.ts +4 -0
- package/dist/composables/virtual/useVirtualSectionWindow.d.ts +72 -0
- package/dist/composables/virtual/useWindowedStore.d.ts +43 -0
- package/dist/composables/virtual/virtualSectionLayout.d.ts +103 -0
- package/dist/concentric.d.ts +1 -0
- package/dist/concentric.js +836 -0
- package/dist/configurator.js +3 -2
- package/dist/confirm-dialog.js +62 -49
- package/dist/constellation.js +635 -235
- package/dist/context-menu.js +3 -3
- package/dist/controls.js +2 -2
- package/dist/createCanvasLifecycle-Gh45Ce-p.js +93 -0
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/deck.d.ts +1 -0
- package/dist/deck.js +105 -0
- package/dist/dialog.js +4 -3
- package/dist/dock.js +819 -568
- 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 +894 -0
- package/dist/dot-matrix.d.ts +1 -0
- package/dist/dot-matrix.js +630 -0
- package/dist/dotMatrixField-D_x9_1qq.js +48 -0
- package/dist/drawer.d.ts +1 -0
- package/dist/drawer.js +380 -0
- package/dist/{dropdown-menu-BJ7E9js_.js → dropdown-menu-aJmV5SqE.js} +82 -79
- package/dist/dropdown-menu.js +1 -1
- package/dist/easing.d.ts +1 -0
- package/dist/easing.js +475 -0
- package/dist/expandable-container.js +46 -21
- package/dist/fading-scroll.js +1 -1
- package/dist/flow.glsl-B2P7e0MT.js +4 -0
- package/dist/focus-scope.d.ts +1 -0
- package/dist/focus-scope.js +23 -0
- package/dist/forms.js +65 -63
- package/dist/fourier-field.js +831 -172
- 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 +187 -338
- package/dist/goo-blob.js +241 -692
- package/dist/goo-dot-matrix.d.ts +1 -0
- package/dist/goo-dot-matrix.js +591 -0
- 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 +3 -1
- package/dist/instrument-chassis.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +70 -60
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +1 -1
- package/dist/metric-stack.js +14 -9
- package/dist/motion-core.js +58 -36
- package/dist/motion-curves.js +11 -1
- package/dist/motion.js +90 -53
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.js +2 -91
- package/dist/paper-backdrop.js +1 -1
- package/dist/paper-grid.d.ts +1 -0
- package/dist/paper-grid.js +788 -0
- package/dist/popover.js +1 -1
- package/dist/{presets-BW2b-fr1.js → presets-CvOUqtdY.js} +3 -3
- package/dist/{compile-EXXzEr1q.js → procedural-color.wgsl-m7Zgv35j.js} +2 -156
- package/dist/progress.js +1 -1
- package/dist/pulse.js +2 -2
- package/dist/reactive.js +1 -1
- package/dist/resolveCanvasColor-yPyIpJt9.js +93 -0
- package/dist/scrollReader-DI1NWxUw.js +42 -0
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +162 -308
- package/dist/select.js +3 -3
- package/dist/selectable-chip.d.ts +1 -0
- package/dist/selectable-chip.js +65 -0
- package/dist/separator.js +1 -1
- package/dist/{sheet-CquRYOAw.js → sheet-B2flBfLH.js} +5 -5
- package/dist/sheet.js +1 -1
- package/dist/sidebar.js +216 -114
- package/dist/{slider-DQ95MET2.js → slider-2A0rPn79.js} +3 -3
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +2 -2
- package/dist/spa-view.d.ts +1 -0
- package/dist/spa-view.js +46 -0
- package/dist/spectrum-walk-BVzA7Biz.js +33 -0
- package/dist/{springPresets-WXaLbu8u.js → springPresets-Ce7OYCm9.js} +12 -6
- package/dist/styles/animations.css +46 -12
- package/dist/styles/border-progress.css +109 -0
- package/dist/styles/cards.css +145 -0
- package/dist/styles/completion-seal.css +131 -0
- package/dist/styles/components.css +2 -3
- package/dist/styles/configurator.css +55 -0
- package/dist/styles/critical-partition.mjs +162 -0
- package/dist/styles/critical.css +12 -0
- package/dist/styles/deferred.css +33 -0
- package/dist/styles/dock/cta-seat.css +87 -0
- package/dist/styles/dock/density.css +198 -0
- package/dist/styles/dock/layers.css +101 -29
- package/dist/styles/dock/morph-bridge.css +54 -18
- package/dist/styles/dock/morph.css +132 -7
- package/dist/styles/dock/overflow.css +28 -2
- package/dist/styles/dock/search.css +68 -0
- package/dist/styles/dock/shape.css +124 -0
- package/dist/styles/dock/shell.css +77 -21
- package/dist/styles/dock/stack-rail.css +264 -0
- package/dist/styles/dock-controls/dark-mode-toggle.css +17 -4
- package/dist/styles/dock-controls/icon-button.css +14 -0
- package/dist/styles/dock.css +43 -1
- package/dist/styles/drawer.css +81 -35
- package/dist/styles/glass/accent-tone.css +66 -0
- package/dist/styles/glass/control-surfaces.css +167 -0
- package/dist/styles/glass/deep.css +44 -0
- package/dist/styles/glass/ladder.css +147 -41
- package/dist/styles/glass/material.css +78 -15
- package/dist/styles/glass/reveal.css +136 -0
- package/dist/styles/glass/rim.css +110 -0
- package/dist/styles/glass/surfaces.css +148 -129
- package/dist/styles/glass-refract.css +96 -44
- package/dist/styles/glass-specular-track.css +7 -0
- package/dist/styles/glass.css +13 -0
- package/dist/styles/hover-popover.css +7 -6
- package/dist/styles/icon-chip.css +77 -15
- package/dist/styles/index.css +36 -9
- package/dist/styles/instrument-chassis.css +66 -3
- package/dist/styles/scroll-choreography.css +300 -0
- package/dist/styles/scroll-chrome.css +123 -0
- package/dist/styles/scroll-driven.css +38 -0
- package/dist/styles/segmented-tabs.css +81 -14
- package/dist/styles/theme/bridges.css +33 -0
- package/dist/styles/theme/literals.css +11 -2
- package/dist/styles/theme/radius.css +24 -2
- package/dist/styles/tokens/color-radius.css +13 -3
- package/dist/styles/tokens/dark-arm.css +137 -32
- package/dist/styles/tokens/glass-deep.css +100 -0
- package/dist/styles/tokens/glass-fx.css +376 -0
- package/dist/styles/tokens/glass.css +131 -351
- package/dist/styles/tokens/light-dark.css +16 -3
- package/dist/styles/tokens/offsets.css +143 -0
- package/dist/styles/tokens/on-glass-fg.css +39 -0
- package/dist/styles/tokens/property-regs.css +260 -0
- package/dist/styles/tokens/scale-paper.css +168 -96
- package/dist/styles/tokens/scheme-motion.css +114 -38
- package/dist/styles/tokens/scroll-tokens.css +123 -0
- package/dist/styles/tokens/sizing-config.css +110 -0
- package/{src/styles/tokens/offsets-sizing.css → dist/styles/tokens/sizing.css} +92 -204
- package/dist/styles/tokens.css +14 -3
- package/dist/styles/typography/semantic.css +26 -13
- package/dist/styles/typography/utilities.css +22 -7
- package/dist/styles/utilities/a11y-overrides.css +20 -5
- package/dist/styles/utilities/animate.css +27 -24
- package/dist/styles/utilities/base-misc.css +307 -0
- package/dist/styles/utilities/base.css +47 -261
- package/dist/styles/utilities/btn.css +17 -4
- package/dist/styles/utilities/components.css +31 -6
- package/dist/styles/utilities/metal.css +215 -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-chip.js +10 -10
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +2 -2
- package/dist/uniformBridgeWGPU-CtAKl45L.js +1204 -0
- package/dist/{useAnimatedNumber-C_3wZLx4.js → useAnimatedNumber-CLrxicG9.js} +1 -1
- package/dist/useConfiguratorState-4xblKfwd.js +162 -0
- package/dist/useControlSize-SH1UmJCi.js +9 -0
- package/dist/useDockCtaReceive-DfFkmgL1.js +82 -0
- package/dist/useDragMorph-BUgAC-zK.js +102 -0
- package/dist/useFuzzySearch-DIhcYtcw.js +177 -0
- package/dist/useGpuSubstrate-4pTcp6mX.js +294 -0
- package/dist/useLiquidPress-BooG97RY.js +39 -0
- package/dist/usePointerVelocityField-QLsy3_kv.js +91 -0
- package/dist/useScrollChrome-D66AVP7C.js +258 -0
- package/dist/useSpring-C0jyvEJB.js +40 -0
- package/dist/useSpringMount-BWDnKIwh.js +71 -0
- package/dist/useSpringPress-B1-Czp-V.js +36 -0
- package/dist/{useTouchGate-28Tk2-t2.js → useTouchGate-CBZTD4SD.js} +1 -1
- package/dist/useViewTransition-CUI1nAgn.js +95 -0
- package/dist/vSpecular-EX7loENl.js +68 -0
- package/dist/vendor-B2qOlYY3.js +239 -0
- package/dist/virtual.d.ts +1 -0
- package/dist/virtual.js +225 -0
- package/dist/watercolor-dot.js +117 -74
- package/package.json +252 -28
- package/src/styles/animations.css +46 -12
- package/src/styles/border-progress.css +109 -0
- package/src/styles/cards.css +145 -0
- package/src/styles/completion-seal.css +131 -0
- package/src/styles/configurator.css +55 -0
- package/src/styles/critical-partition.mjs +162 -0
- package/src/styles/dock/cta-seat.css +87 -0
- package/src/styles/dock/density.css +198 -0
- package/src/styles/dock/layers.css +101 -29
- package/src/styles/dock/morph-bridge.css +54 -18
- package/src/styles/dock/morph.css +132 -7
- package/src/styles/dock/overflow.css +28 -2
- package/src/styles/dock/search.css +68 -0
- package/src/styles/dock/shape.css +124 -0
- package/src/styles/dock/shell.css +77 -21
- package/src/styles/dock/stack-rail.css +264 -0
- package/src/styles/dock-controls/dark-mode-toggle.css +17 -4
- package/src/styles/dock-controls/icon-button.css +14 -0
- package/src/styles/dock.css +43 -1
- package/src/styles/drawer.css +81 -35
- package/src/styles/glass/accent-tone.css +66 -0
- package/src/styles/glass/control-surfaces.css +167 -0
- package/src/styles/glass/deep.css +44 -0
- package/src/styles/glass/ladder.css +147 -41
- package/src/styles/glass/material.css +78 -15
- package/src/styles/glass/reveal.css +136 -0
- package/src/styles/glass/rim.css +110 -0
- package/src/styles/glass/surfaces.css +148 -129
- package/src/styles/glass-refract.css +96 -44
- package/src/styles/glass-specular-track.css +7 -0
- package/src/styles/glass.css +13 -0
- package/src/styles/hover-popover.css +7 -6
- package/src/styles/icon-chip.css +77 -15
- package/src/styles/index.css +27 -0
- package/src/styles/instrument-chassis.css +66 -3
- package/src/styles/scroll-choreography.css +300 -0
- package/src/styles/scroll-chrome.css +123 -0
- package/src/styles/scroll-driven.css +38 -0
- package/src/styles/segmented-tabs.css +81 -14
- package/src/styles/theme/bridges.css +33 -0
- package/src/styles/theme/literals.css +11 -2
- package/src/styles/theme/radius.css +24 -2
- package/src/styles/tokens/color-radius.css +13 -3
- package/src/styles/tokens/dark-arm.css +137 -32
- package/src/styles/tokens/glass-deep.css +100 -0
- package/src/styles/tokens/glass-fx.css +376 -0
- package/src/styles/tokens/glass.css +131 -351
- package/src/styles/tokens/light-dark.css +16 -3
- package/src/styles/tokens/offsets.css +143 -0
- package/src/styles/tokens/on-glass-fg.css +39 -0
- package/src/styles/tokens/property-regs.css +260 -0
- package/src/styles/tokens/scale-paper.css +168 -96
- package/src/styles/tokens/scheme-motion.css +114 -38
- package/src/styles/tokens/scroll-tokens.css +123 -0
- package/src/styles/tokens/sizing-config.css +110 -0
- package/{dist/styles/tokens/offsets-sizing.css → src/styles/tokens/sizing.css} +92 -204
- package/src/styles/tokens.css +14 -3
- package/src/styles/typography/semantic.css +26 -13
- package/src/styles/typography/utilities.css +22 -7
- package/src/styles/utilities/a11y-overrides.css +20 -5
- package/src/styles/utilities/animate.css +27 -24
- package/src/styles/utilities/base-misc.css +307 -0
- package/src/styles/utilities/base.css +47 -261
- package/src/styles/utilities/btn.css +17 -4
- package/src/styles/utilities/components.css +31 -6
- package/src/styles/utilities/metal.css +215 -0
- package/src/styles/utilities.css +14 -7
- package/dist/CardAction-XH4YBVEK.js +0 -158
- package/dist/ContextMenuContent-ON3x7cuk.js +0 -85
- package/dist/DialogFooter-8eZbdmPc.js +0 -165
- package/dist/HoverCardContent-DkMaQzH5.js +0 -83
- package/dist/Input-DVG_J0ne.js +0 -55
- package/dist/Notification-DKjKsQq8.js +0 -100
- package/dist/NumberFieldContent-1VtwDSgf.js +0 -145
- package/dist/Separator-BArl4OaB.js +0 -37
- package/dist/Switch-Dr--uLGH.js +0 -47
- package/dist/Toaster-Bm_HQSpc.js +0 -263
- package/dist/ToggleGroupItem-Dzk9hWsF.js +0 -157
- package/dist/TooltipProvider-B3MkB_8P.js +0 -104
- package/dist/button-BNDWhAZb.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/color-DweYl7pE.js +0 -86
- package/dist/components/custom/constellation/composables/useConstellationPointer.d.ts +0 -35
- package/dist/components/custom/constellation/constellationDraw.d.ts +0 -30
- package/dist/components/custom/dock/DockRail.vue.d.ts +0 -89
- package/dist/createLucideIcon-DydS2qgk.js +0 -43
- package/dist/minimize-2-BV31Ob_h.js +0 -38
- package/dist/resolveCanvasColor-BBiYfp8g.js +0 -11
- package/dist/search-BSGrf2Sk.js +0 -12
- package/dist/styles/dock/rail-extend.css +0 -397
- package/dist/useCanvas2D-ClrQuZtp.js +0 -96
- package/dist/useConfiguratorState-kiIlun8I.js +0 -303
- package/dist/useRAFLoop-CdwJ7284.js +0 -109
- 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/src/styles/dock/rail-extend.css +0 -397
- /package/dist/{CollapsibleContent-C_s6fG7r.js → CollapsibleContent-68dEXIAl.js} +0 -0
- /package/dist/{InstrumentChassis-UUJX0-mW.js → InstrumentChassis-CxsHSyMj.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-CqwjnfLv.js} +0 -0
- /package/dist/{SelectGroup-Dcczq44n.js → SelectGroup-BFiod7X2.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/{constants-BPOqYJAm.js → constants--C2DkLW8.js} +0 -0
- /package/dist/{createContext-B2RaZ-b8.js → createContext-CpBNTRMI.js} +0 -0
- /package/dist/{math-DeuJwLFx.js → math-Eb0w3LqU.js} +0 -0
- /package/dist/{menuItemVariants-DWRQXBxJ.js → menuItemVariants-D8VNHq22.js} +0 -0
- /package/dist/{prng-Cg22zv8g.js → prng-B-d9eYX8.js} +0 -0
- /package/dist/{useGlobalDark-C28t0VWJ.js → useGlobalDark-CmjB9E32.js} +0 -0
- /package/dist/{useIntersectionPause-Bj4sPkMh.js → useIntersectionPause-Dbozzjgm.js} +0 -0
- /package/dist/{useKeyboardShortcuts-BXWXOZ-9.js → useKeyboardShortcuts-BPRp33Im.js} +0 -0
- /package/dist/{useLiquidFlex-C12hXwOZ.js → useLiquidFlex-UmA6LMZu.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/{useScrollProgress-D7bYU2RK.js → useScrollProgress-c3yxmH6a.js} +0 -0
- /package/dist/{useSurfaceAxis-CMnF2zHb.js → useSurfaceAxis-g0NloYEF.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
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
/** Whether the steps-mode readout round-trips through value.js `parseSteps`
|
|
51
|
+
* back to the live (n, term) — the boundary-law proof that the painted
|
|
52
|
+
* staircase IS a re-parseable value.js literal, not a hand-rolled string
|
|
53
|
+
* the catalogue cannot read back. `true` in bezier mode (no steps literal). */
|
|
54
|
+
reparseOk: ComputedRef<boolean>;
|
|
55
|
+
/** The full v-model payload (mode + css + fn + raw params). */
|
|
56
|
+
value: ComputedRef<EasingPickerValue>;
|
|
57
|
+
/** Two SVG-space handle coords `[{x,y},{x,y}]` (bezier mode). */
|
|
58
|
+
handlesSvg: ComputedRef<{
|
|
59
|
+
x: number;
|
|
60
|
+
y: number;
|
|
61
|
+
}[]>;
|
|
62
|
+
/** The bezier path `d` (`M 0 1 C …`). */
|
|
63
|
+
bezierPathD: ComputedRef<string>;
|
|
64
|
+
/** The sampled staircase path `d` (steps mode). */
|
|
65
|
+
stepPathD: ComputedRef<string>;
|
|
66
|
+
/** The bezier-canvas viewBox `{ minY, height }` clamping overshoot. */
|
|
67
|
+
viewBox: ComputedRef<{
|
|
68
|
+
minY: number;
|
|
69
|
+
height: number;
|
|
70
|
+
}>;
|
|
71
|
+
progress: Ref<number>;
|
|
72
|
+
playTravel: () => void;
|
|
73
|
+
stopTravel: () => void;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The <EasingPicker> shared editor state. Composes the value.js math; owns the
|
|
77
|
+
* chassis (control points, the literal, the rAF travel). Used by the EasingPicker
|
|
78
|
+
* SFC + (composed through it) the EasingConfigurator register — ONE source.
|
|
79
|
+
*/
|
|
80
|
+
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";
|
|
@@ -45,9 +45,20 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
45
45
|
expandLabel: string;
|
|
46
46
|
collapseLabel: string;
|
|
47
47
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
48
|
+
'expand-trigger'?: (props: {
|
|
49
|
+
expand: () => void;
|
|
50
|
+
label: string;
|
|
51
|
+
}) => any;
|
|
52
|
+
} & {
|
|
48
53
|
default?: (props: {
|
|
49
54
|
fullscreen: boolean;
|
|
50
55
|
}) => any;
|
|
56
|
+
} & {
|
|
57
|
+
'fullscreen-chrome'?: (props: {
|
|
58
|
+
collapse: () => void;
|
|
59
|
+
label: string;
|
|
60
|
+
fullscreen: boolean;
|
|
61
|
+
}) => any;
|
|
51
62
|
} & {
|
|
52
63
|
default?: (props: {
|
|
53
64
|
fullscreen: boolean;
|
|
@@ -1,51 +1,54 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ColorResolver, OklchStop } from "../../../composables/color";
|
|
2
|
+
import { type BasisComponent } from "./math";
|
|
3
|
+
import type { FourierFieldConfig } from "./constants";
|
|
2
4
|
/**
|
|
3
|
-
* FourierField — a Fourier epicycle field on
|
|
4
|
-
* primitive to Aurora and
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* FourierField — a Fourier epicycle field on the GPU substrate (BC.W-VIZ-FOURIER), a
|
|
6
|
+
* sibling primitive to Aurora, GooBlob, and DotFlowField. A chain of rotating circles
|
|
7
|
+
* stacked tip-to-tail draws the reconstructing partial-sum curve; a glowing comet head
|
|
8
|
+
* leads the fading trail. WebGPU-FIRST: the compute pass writes the partial-sum curve +
|
|
9
|
+
* the epicycle chain tips, the fullscreen-fragment render pass composites the SDF field; a
|
|
10
|
+
* WebGL2 GLSL twin is the genuinely-absent-tail fallback (the §E "WebGPU everywhere"
|
|
11
|
+
* mandate — the Canvas2D renderer is RETIRED). It composes `useFourierField` → the
|
|
12
|
+
* `createGpuSubstrate` picker over the ONE canvas lifecycle leaf (offscreen-pause, live-PRM
|
|
13
|
+
* freeze, consumer-owned DPR) and the SHARED `usePointerVelocityField` (the pointer SCRUBS
|
|
14
|
+
* the reconstruction).
|
|
10
15
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* `defaultBlobColorResolver` from `@mkbabb/glass-ui/color` so a `var()` /
|
|
14
|
-
* `light-dark()` token, an `oklch()` / `hsl()` / hex string all resolve. A
|
|
15
|
-
* `var()` token is first resolved to a concrete `rgb()` against the host's
|
|
16
|
-
* inherited color-scheme, then re-resolved on a color change AND on a dark-mode
|
|
17
|
-
* toggle so the field retints with the theme.
|
|
16
|
+
* The DEFAULT palette is the warm-cream library identity (`--viz-fourier` warm-amber); a
|
|
17
|
+
* demo Teal/cool preset stays demo-LOCAL (presets-in-consumers — never a library token).
|
|
18
18
|
*
|
|
19
|
-
* `variant` is
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
19
|
+
* The `variant: "hero"|"final"` prop is RETIRED (BC.W-VIZ-FOURIER — the bundles fold into
|
|
20
|
+
* config presets, MIGRATION row). An ambient-background consumer passes `color` (+ the
|
|
21
|
+
* `colorResolver`) for a thin warm default preserving the recessive look; the studio passes
|
|
22
|
+
* the full `config` + `spectrum` + `getPalette`.
|
|
23
23
|
*/
|
|
24
24
|
type __VLS_Props = {
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
/**
|
|
25
|
+
/** The full author config (the studio's `useConfiguratorState` model). Defaults to the warm identity. */
|
|
26
|
+
config?: FourierFieldConfig;
|
|
27
|
+
/** An explicit CPU-minted spectrum (a curated shape's DFT). When absent, a seeded elliptic spectrum is generated. */
|
|
28
|
+
spectrum?: readonly BasisComponent[];
|
|
29
|
+
/** Resolve the curve palette as OKLCh (the studio themes it). When absent, `color`/`config.palette` is used. */
|
|
30
|
+
getPalette?: () => OklchStop[];
|
|
31
|
+
/** Ambient-consumer color seam — a `var()`/`light-dark()` token or a literal; derives a warm 2-stop palette. */
|
|
32
|
+
color?: string;
|
|
33
|
+
/** The color resolver (the GooBlob/Aurora seam) — required when `color` is a `var()` token. */
|
|
34
|
+
colorResolver?: ColorResolver;
|
|
35
|
+
/** Extra seed mixed into the generated elliptic spectrum PRNG. Default "". */
|
|
32
36
|
seed?: string;
|
|
33
|
-
/**
|
|
37
|
+
/** Paint ONE static deterministic best-frame and never animate (the capture lever). Default false. */
|
|
34
38
|
freeze?: boolean;
|
|
35
|
-
/** Outer loudness envelope (the
|
|
36
|
-
* resolved `peakAlpha`/`headGlowAlpha` at the PAINT layer (a per-LAYER
|
|
37
|
-
* multiply, not a uniform CSS opacity). Default 1 (the bundle's resting
|
|
38
|
-
* loudness); clamped [0, 2] — the field's ~2 upper bound lets a hero push
|
|
39
|
-
* brighter than the recessed default without runaway. */
|
|
39
|
+
/** Outer loudness envelope (scales the per-layer alpha). When set, overrides `config.intensity`; clamped [0,2]. */
|
|
40
40
|
intensity?: number;
|
|
41
|
-
/** OPTIONAL injected clock — a getter returning the loop parameter `t ∈ [0,1)`.
|
|
42
|
-
* When BOUND, the render reads `clock()` (a controllable studio clock: pause,
|
|
43
|
-
* scrub, speed); when ABSENT (the ambient face), the autonomous
|
|
44
|
-
* `(now / durationMs) % 1` frame-time loop is the DEFAULT. `freeze` /
|
|
45
|
-
* `prefers-reduced-motion` still short-circuit to `frozenT` regardless — the
|
|
46
|
-
* ambient bundle is unchanged. The SOLE additive seam (BA.W-FOURIER-STUDIO). */
|
|
47
|
-
clock?: () => number;
|
|
48
41
|
};
|
|
49
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
42
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
43
|
+
backend: () => import("../../../composables/glass/webgpu").GpuBackend;
|
|
44
|
+
pause: () => void;
|
|
45
|
+
resume: () => void;
|
|
46
|
+
wake: () => void;
|
|
47
|
+
renderAt: (timeSec: number) => void;
|
|
48
|
+
setHeadT: (t: number) => void;
|
|
49
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
50
|
+
seed: string;
|
|
51
|
+
freeze: boolean;
|
|
52
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
50
53
|
declare const _default: typeof __VLS_export;
|
|
51
54
|
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { WebGLCanvasFrame } from "../../../../composables/glass/webgl/useWebGLCanvas";
|
|
2
|
+
import type { OklchStop } from "../../../../composables/color";
|
|
3
|
+
import { type FourierFieldConfig } from "../constants";
|
|
4
|
+
import { type BasisComponent } from "../math";
|
|
5
|
+
export interface FourierGLSetupDeps {
|
|
6
|
+
canvas: HTMLCanvasElement;
|
|
7
|
+
config: FourierFieldConfig;
|
|
8
|
+
getSpectrum: () => readonly BasisComponent[];
|
|
9
|
+
getPalette: () => OklchStop[];
|
|
10
|
+
getHeadT: () => number;
|
|
11
|
+
shouldContinue: () => boolean;
|
|
12
|
+
onFrame?: (timeSec: number) => void;
|
|
13
|
+
}
|
|
14
|
+
/** Build the `setupGL(gl)` callback the `createGpuSubstrate` WebGL2 path invokes. */
|
|
15
|
+
export declare function createFourierGLSetup(deps: FourierGLSetupDeps): (gl: WebGL2RenderingContext) => WebGLCanvasFrame;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WebGPUCanvasFrame } from "../../../../composables/glass/webgpu/useWebGPUCanvas";
|
|
2
|
+
import type { OklchStop } from "../../../../composables/color";
|
|
3
|
+
import { type FourierFieldConfig } from "../constants";
|
|
4
|
+
import type { BasisComponent } from "../math";
|
|
5
|
+
export interface FourierWGPUSetupDeps {
|
|
6
|
+
canvas: HTMLCanvasElement;
|
|
7
|
+
config: FourierFieldConfig;
|
|
8
|
+
/** The CPU-minted spectrum (re-read each frame so a source-swap reaches the buffer). */
|
|
9
|
+
getSpectrum: () => readonly BasisComponent[];
|
|
10
|
+
/** The resolved (ColorResolver) palette stops as OKLCh — re-read each frame so a live edit reaches the buffer. */
|
|
11
|
+
getPalette: () => OklchStop[];
|
|
12
|
+
/** The single loop parameter `head_t ∈ [0,1)` (the ONE keyframes.js clock). */
|
|
13
|
+
getHeadT: () => number;
|
|
14
|
+
/** Demand-gate (the renderer's quiescence layer — substrate-agnostic). */
|
|
15
|
+
shouldContinue: () => boolean;
|
|
16
|
+
/** The per-frame pointer hook — useFourierField advances the shared pointer field here. */
|
|
17
|
+
onFrame?: (timeSec: number) => void;
|
|
18
|
+
}
|
|
19
|
+
/** Build the fourier-field `setupWGPU(device, context, format)` callback. */
|
|
20
|
+
export declare function createFourierWGPUSetup(deps: FourierWGPUSetupDeps): (device: GPUDevice, context: GPUCanvasContext, format: GPUTextureFormat) => WebGPUCanvasFrame;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { OklchStop } from "../../../../composables/color";
|
|
2
|
+
import { type BasisComponent } from "../math";
|
|
3
|
+
/** One phasor lane in the storage buffer: (re, im, index, _pad). */
|
|
4
|
+
export declare const FOURIER_PHASOR_BYTES = 16;
|
|
5
|
+
export declare const FOURIER_COMPUTE_UNIFORM_BYTES = 32;
|
|
6
|
+
export interface FourierUniformScratch {
|
|
7
|
+
buffer: ArrayBuffer;
|
|
8
|
+
f32: Float32Array;
|
|
9
|
+
i32: Int32Array;
|
|
10
|
+
}
|
|
11
|
+
export declare function createFourierComputeScratch(): FourierUniformScratch;
|
|
12
|
+
/** Pack the compute uniforms in place. */
|
|
13
|
+
export declare function packFourierComputeUniforms(scratch: FourierUniformScratch, headT: number, trailArc: number, harmonicN: number, epicycleArmN: number, sampleCount: number, phasorCount: number): FourierUniformScratch;
|
|
14
|
+
export declare const FOURIER_RENDER_UNIFORM_BYTES: number;
|
|
15
|
+
export declare function createFourierRenderScratch(): FourierUniformScratch;
|
|
16
|
+
/** The model→clip fit transform (center + uniform scale) — computed once per spectrum. */
|
|
17
|
+
export interface FourierFit {
|
|
18
|
+
centerX: number;
|
|
19
|
+
centerY: number;
|
|
20
|
+
/** The uniform scale s such that (model − center)·s maps the curve into clip [-1,1] with margin. */
|
|
21
|
+
scale: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Stable view-fit: sample the FULL reconstruction once over the period, bound its bbox,
|
|
25
|
+
* and derive the center + a margin-padded uniform scale. The render's fullscreen pass
|
|
26
|
+
* inverts this transform per fragment so the curve never clips and the scale is fixed.
|
|
27
|
+
*/
|
|
28
|
+
export declare function computeFourierFit(spectrum: readonly BasisComponent[]): FourierFit;
|
|
29
|
+
/**
|
|
30
|
+
* Convert a CSS-px stroke width to MODEL units (the shader's space). The fit `scale` maps
|
|
31
|
+
* model → clip; clip spans [-1,1] over the min CSS dimension → cssPx-per-clip = canvasCssMin/2.
|
|
32
|
+
* model-per-cssPx = (1/scale)·(2/canvasCssMin).
|
|
33
|
+
*/
|
|
34
|
+
export declare function trailWidthToModel(trailWidthPx: number, scale: number, canvasCssMin: number): number;
|
|
35
|
+
/** Pack the render uniforms in place. */
|
|
36
|
+
export declare function packFourierRenderUniforms(scratch: FourierUniformScratch, fit: FourierFit, aspect: number, trailWidthModel: number, peakAlpha: number, headGlowAlpha: number, trailFadeExp: number, trailFloor: number, intensity: number, showEpicycles: boolean, rainbowChain: boolean, sampleCount: number, armCount: number, palette: OklchStop[]): FourierUniformScratch;
|
|
37
|
+
/**
|
|
38
|
+
* Pack the phasor storage table (re, im, index, _pad) from the CPU-minted spectrum. The
|
|
39
|
+
* WGSL SUMS this per frame — it is the ONLY spectrum upload (no WGSL-side mint).
|
|
40
|
+
*/
|
|
41
|
+
export declare function packPhasorTable(spectrum: readonly BasisComponent[]): Float32Array;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { FourierFieldConfig } from "../constants";
|
|
5
|
+
import type { BasisComponent } from "../math";
|
|
6
|
+
export interface UseFourierFieldOptions {
|
|
7
|
+
config: FourierFieldConfig;
|
|
8
|
+
/** The active phasor spectrum (CPU-minted; re-read each frame so a source-swap reaches the buffer). */
|
|
9
|
+
getSpectrum: () => readonly BasisComponent[];
|
|
10
|
+
/** Resolve the curve-color palette as OKLCh (the demo themes it; default warm-identity). */
|
|
11
|
+
getPalette: () => OklchStop[];
|
|
12
|
+
/** When true, hold the deterministic best-frame and never advance (the capture / freeze lever). */
|
|
13
|
+
freeze?: () => boolean;
|
|
14
|
+
/** The static deterministic best-frame parameter under `freeze`/PRM. Default 0.34. */
|
|
15
|
+
frozenT?: number;
|
|
16
|
+
/** Base forward period for one full traversal at 1× speed, in seconds. Default 16. */
|
|
17
|
+
periodS?: number;
|
|
18
|
+
/** `"capture"` → renderAt-only (the deterministic π capture path). Default `"live"`. */
|
|
19
|
+
mode?: "live" | "capture";
|
|
20
|
+
}
|
|
21
|
+
/** The uniform handle a consumer wires its lifecycle against (backend-agnostic). */
|
|
22
|
+
export interface FourierFieldHandle {
|
|
23
|
+
/** The resolved backend (`"webgpu"` where supported, else the WebGL2 GLSL fallback). */
|
|
24
|
+
readonly backend: GpuBackend;
|
|
25
|
+
/** Park the loop (the WCAG-2.2.2 pause seam — `DockBackgroundToggle` wires this). */
|
|
26
|
+
pause: () => void;
|
|
27
|
+
/** Re-arm the loop. */
|
|
28
|
+
resume: () => void;
|
|
29
|
+
/** Re-arm a parked loop on demand. */
|
|
30
|
+
wake: () => void;
|
|
31
|
+
/** Draw one frame out-of-loop (capture / thumbnail). */
|
|
32
|
+
renderAt: (timeSec: number) => void;
|
|
33
|
+
/** The live `prefers-reduced-motion: reduce` state. */
|
|
34
|
+
readonly reducedMotion: boolean;
|
|
35
|
+
/** The current loop parameter `head_t ∈ [0,1)` (the scrubber reads/writes it). */
|
|
36
|
+
readonly headT: number;
|
|
37
|
+
/** Scrub the clock directly (the transport scrubber / a pointer drag). */
|
|
38
|
+
setHeadT: (t: number) => void;
|
|
39
|
+
/** Tear down the renderer + release GPU/GL resources. */
|
|
40
|
+
dispose: () => void;
|
|
41
|
+
}
|
|
42
|
+
export declare function useFourierField(canvasRef: Ref<HTMLCanvasElement | null>, options: UseFourierFieldOptions): FourierFieldHandle;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { OklchStop } from "../../../composables/color";
|
|
2
|
+
/**
|
|
3
|
+
* Curve-sampling resolution for the stable view-fit bbox pass — the renderer samples the
|
|
4
|
+
* epicycle curve this many times once at mount to size it to the canvas with a fixed
|
|
5
|
+
* margin (so the curve never clips and the scale is constant across the run). 720 = one
|
|
6
|
+
* sample per half-degree of the unit period.
|
|
7
|
+
*/
|
|
8
|
+
export declare const FOURIER_FIT_SAMPLES = 720;
|
|
9
|
+
/**
|
|
10
|
+
* The phasor-table uniform ceiling — the WGSL `MAX_PHASORS` #define. The configurator's
|
|
11
|
+
* harmonic count maxes here; a >64-term custom trace books a storage-buffer widen (cheap —
|
|
12
|
+
* the flow-field already uses a storage buffer). The curated ℱ/heart/star set + the
|
|
13
|
+
* generated elliptic spectrum all sit under it.
|
|
14
|
+
*/
|
|
15
|
+
export declare const MAX_PHASORS = 64;
|
|
16
|
+
/**
|
|
17
|
+
* The comet-curve sample ceiling — the storage-buffer array bound. The compute pass
|
|
18
|
+
* writes the partial-sum curve point at `M` samples back along the period from the head;
|
|
19
|
+
* the render pass reads them as the comet polyline. 384 gives a smooth bold stroke.
|
|
20
|
+
*/
|
|
21
|
+
export declare const MAX_CURVE_SAMPLES = 384;
|
|
22
|
+
/** The palette-stop ceiling — the WGSL `MAX_FOURIER_STOPS` #define. */
|
|
23
|
+
export declare const MAX_FOURIER_STOPS = 4;
|
|
24
|
+
/**
|
|
25
|
+
* The full author schema — the studio's `useConfiguratorState` model. Every field is a
|
|
26
|
+
* tunable the demo configurator drives; the composable resolves it into the uniform table.
|
|
27
|
+
*/
|
|
28
|
+
export interface FourierFieldConfig {
|
|
29
|
+
/** The active phasor spectrum source key — `"elliptic"` (generated) or a curated shape key. */
|
|
30
|
+
source: string;
|
|
31
|
+
/** TRUNCATE the partial sum — the harmonic count N (1..min(spectrum.length, MAX_PHASORS)). */
|
|
32
|
+
harmonics: number;
|
|
33
|
+
/** Draw the rotating epicycle chain (orthogonal to N). */
|
|
34
|
+
showEpicycles: boolean;
|
|
35
|
+
/** How many chain arms to draw (1..N; ≤ the harmonic count). */
|
|
36
|
+
epicycleArms: number;
|
|
37
|
+
/** Paint the chain as a warm-anchored hue sweep vs one analogous hue. */
|
|
38
|
+
rainbowChain: boolean;
|
|
39
|
+
/** Comet-body length as a fraction of the period (0.15..1.0). */
|
|
40
|
+
trailArc: number;
|
|
41
|
+
/** Comet stroke weight in CSS px (1..6). */
|
|
42
|
+
trailWidth: number;
|
|
43
|
+
/** Outer loudness envelope (per-layer alpha multiply, 0..2). */
|
|
44
|
+
intensity: number;
|
|
45
|
+
/** Character of the generated elliptic spectrum (0.05..0.4 — smooth ellipse → crinkled). */
|
|
46
|
+
harmonicScale: number;
|
|
47
|
+
/** Clock speed multiplier (0.25/0.5/1/2). */
|
|
48
|
+
speed: number;
|
|
49
|
+
/** The curve-color ramp (the library viz palette; warm default). Resolved via the ColorResolver. */
|
|
50
|
+
palette: OklchStop[];
|
|
51
|
+
/** ONE static frame then park under `prefers-reduced-motion: reduce`. */
|
|
52
|
+
respectReducedMotion: boolean;
|
|
53
|
+
/** Pointer scrubs `head_t` + a flick injects clock momentum (the W-VIZ-INTERACTION consume). */
|
|
54
|
+
interactive: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The warm-cream identity palette (the library default — NOT teal). A two-stop warm-amber
|
|
58
|
+
* ramp over the warm-cream foreground family, resolved via the ColorResolver. The chain's
|
|
59
|
+
* rainbow sweep is warm-anchored over THIS base; a consumer (the demo) themes it through a
|
|
60
|
+
* preset, never a token edit.
|
|
61
|
+
*/
|
|
62
|
+
export declare const WARM_IDENTITY_PALETTE: OklchStop[];
|
|
63
|
+
/** The shipped warm-identity default config. */
|
|
64
|
+
export declare const DEFAULT_FOURIER_CONFIG: FourierFieldConfig;
|
|
@@ -1,26 +1,31 @@
|
|
|
1
|
-
import type { ColorResolver } from "../../../composables/color";
|
|
1
|
+
import type { ColorResolver, OklchStop } from "../../../composables/color";
|
|
2
|
+
import type { FourierFieldConfig } from "./constants";
|
|
3
|
+
import type { BasisComponent } from "./math";
|
|
2
4
|
export { default as FourierField } from "./FourierField.vue";
|
|
3
5
|
export { comp, positionsAt, partialSumAt, dftFromPoints, makeEllipticSpectrum, type BasisComponent, type EllipticSpectrumOptions, } from "./math";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
|
|
6
|
+
export { DEFAULT_FOURIER_CONFIG, WARM_IDENTITY_PALETTE, MAX_PHASORS, MAX_CURVE_SAMPLES, type FourierFieldConfig, } from "./constants";
|
|
7
|
+
export { useFourierField, type FourierFieldHandle, type UseFourierFieldOptions, } from "./composables/useFourierField";
|
|
8
|
+
/**
|
|
9
|
+
* The props a consumer forwards when wrapping `<FourierField>` (the GPU-substrate epicycle
|
|
10
|
+
* field; ships via `/fourier-field`). Mirrors the component's inline `defineProps` shape (an
|
|
11
|
+
* SFC cannot export its inline props type). BC.W-VIZ-FOURIER — the `variant: "hero"|"final"`
|
|
12
|
+
* enum is RETIRED (folds into config presets); the renderer is the WGSL-primary GPU substrate.
|
|
13
|
+
*/
|
|
12
14
|
export interface FourierFieldProps {
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
/**
|
|
15
|
+
/** The full author config (the studio's `useConfiguratorState` model). Defaults to the warm identity. */
|
|
16
|
+
config?: FourierFieldConfig;
|
|
17
|
+
/** An explicit CPU-minted spectrum (a curated shape's DFT). When absent, a seeded elliptic spectrum is generated. */
|
|
18
|
+
spectrum?: readonly BasisComponent[];
|
|
19
|
+
/** Resolve the curve palette as OKLCh (the studio themes it). */
|
|
20
|
+
getPalette?: () => OklchStop[];
|
|
21
|
+
/** Ambient-consumer color seam — a `var()`/`light-dark()` token or a literal; derives a warm palette. */
|
|
22
|
+
color?: string;
|
|
23
|
+
/** The color resolver (the GooBlob/Aurora seam) — required when `color` is a `var()` token. */
|
|
24
|
+
colorResolver?: ColorResolver;
|
|
25
|
+
/** Extra seed mixed into the generated elliptic spectrum PRNG. Default "". */
|
|
20
26
|
seed?: string;
|
|
21
27
|
/** Paint ONE static deterministic best-frame and never animate (the capture lever). Default false. */
|
|
22
28
|
freeze?: boolean;
|
|
23
|
-
/** Outer loudness envelope (the
|
|
24
|
-
* resolved `peakAlpha`/`headGlowAlpha` at the paint layer. Default 1; clamped [0, 2]. */
|
|
29
|
+
/** Outer loudness envelope (scales the per-layer alpha). Overrides `config.intensity` when set; clamped [0, 2]. */
|
|
25
30
|
intensity?: number;
|
|
26
31
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FOURIER_FIELD_COMPUTE_WGSL = "\nconst MAX_PHASORS: i32 = 64;\nconst TAU: f32 = 6.283185307179586;\n\nstruct Phasor {\n // (re, im, index, _pad)\n data: vec4<f32>,\n};\n\n// \u2500\u2500 Compute uniforms (the typed-struct source-of-truth \u2014 see uniformBridgeWGPU.ts) \u2500\u2500\nstruct ComputeUniforms {\n // c0: (headT, trailArc, _pad, _pad)\n c0: vec4<f32>,\n // ints: (harmonicN, epicycleArmN, sampleCount, phasorCount)\n ints: vec4<i32>,\n};\n\n@group(0) @binding(0) var<uniform> u: ComputeUniforms;\n@group(0) @binding(1) var<storage, read> phasors: array<Phasor>;\n// curveSamples[i] = (x, y, age, _pad)\n@group(0) @binding(2) var<storage, read_write> curveSamples: array<vec4<f32>>;\n// chainTips[k] = (x, y, _pad, _pad) \u2014 the running tip after stacking phasor k\n@group(0) @binding(3) var<storage, read_write> chainTips: array<vec4<f32>>;\n\n// The PARTIAL-SUM curve point at parameter t over the first n phasors \u2014 the WGSL\n// transcription of math.ts:78-95 (partialSumAt). EXACTLY:\n// c += vec2(re\u00B7cos \u2212 im\u00B7sin, re\u00B7sin + im\u00B7cos) with angle = TAU\u00B7index\u00B7t.\nfn partialSumAt(t: f32, n: i32) -> vec2<f32> {\n var c = vec2<f32>(0.0, 0.0);\n let phasorCount = u.ints.w;\n let lim = min(n, phasorCount);\n for (var i = 0; i < MAX_PHASORS; i = i + 1) {\n if (i >= lim) { break; }\n let p = phasors[i].data;\n let re = p.x;\n let im = p.y;\n let index = p.z;\n let angle = TAU * index * t;\n let cs = cos(angle);\n let sn = sin(angle);\n c = c + vec2<f32>(re * cs - im * sn, re * sn + im * cs);\n }\n return c;\n}\n\n// The epicycle chain tip after stacking the first k phasors at head_t \u2014 the WGSL\n// transcription of math.ts:41-60 (positionsAt, read at the running tip). The running tip\n// after phasor (k\u22121) is exactly the partial sum over the first k terms.\nfn epicycleChainTip(t: f32, k: i32) -> vec2<f32> {\n return partialSumAt(t, k);\n}\n\n@compute @workgroup_size(64)\nfn cs_main(@builtin(global_invocation_id) gid: vec3<u32>) {\n let i = i32(gid.x);\n let headT = u.c0.x;\n let trailArc = u.c0.y;\n let harmonicN = u.ints.x;\n let armN = u.ints.y;\n let sampleCount = u.ints.z;\n\n // \u2500\u2500 The comet body samples \u2500\u2500\n if (i < sampleCount) {\n // age: 0 at the oldest tail (i = sampleCount\u22121), 1 at the head (i = 0).\n let denom = max(f32(sampleCount - 1), 1.0);\n let frac = f32(i) / denom; // 0 = head, 1 = tail\n let age = 1.0 - frac; // 1 = head, 0 = tail\n // sample back along the period from the head by trailArc.\n var t = headT - trailArc * frac;\n t = t - floor(t); // fract \u2192 [0,1)\n let pt = partialSumAt(t, harmonicN);\n curveSamples[i] = vec4<f32>(pt.x, pt.y, age, 0.0);\n }\n\n // \u2500\u2500 The epicycle chain tips (k = 0..armN, capped to harmonicN) \u2500\u2500\n // chainTips[0] is the origin; chainTips[k] is the tip after phasor (k\u22121).\n let armLim = min(armN, harmonicN);\n if (i <= armLim && i <= MAX_PHASORS) {\n let tip = epicycleChainTip(headT, i);\n chainTips[i] = vec4<f32>(tip.x, tip.y, 0.0, 0.0);\n }\n}\n";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** The full-screen-triangle vertex shader (the aurora/concentric pattern). */
|
|
2
|
+
export declare const FOURIER_FIELD_VERT_GLSL = "#version 300 es\nin vec2 aPosition;\nout vec2 vClip;\nvoid main() {\n vClip = aPosition;\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}\n";
|
|
3
|
+
/** The fragment SDF — the GLSL twin of fourier-field.render.wgsl.ts's fs_main. */
|
|
4
|
+
export declare const FOURIER_FIELD_FRAG_GLSL = "#version 300 es\nprecision highp float;\n\n#define MAX_CURVE_SAMPLES 256\n#define MAX_PHASORS 64\n\nin vec2 vClip;\nout vec4 fragColor;\n\nuniform vec4 uFit; // (centerX, centerY, scale, aspect)\nuniform vec4 uTrail; // (trailWidth, peakAlpha, headGlowAlpha, trailFadeExp)\nuniform vec4 uEnv; // (trailFloor, intensity, showEpicycles, rainbowChain)\nuniform int uSampleCount;\nuniform int uArmCount;\nuniform int uStopCount;\nuniform vec3 uPalette[4]; // linear-sRGB stops\n// curveSamples[i] = (x, y, age) in MODEL space; chainTips[k] = (x, y) in MODEL space.\nuniform vec3 uCurve[MAX_CURVE_SAMPLES];\nuniform vec2 uChain[MAX_PHASORS];\n\nconst float PI = 3.141592653589793;\n\n\nfloat srgbToLinearCh(float c) {\n return c <= 0.04045 ? c / 12.92 : pow((c + 0.055) / 1.055, 2.4);\n}\nvec3 srgbToLinear(vec3 c) {\n return vec3(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfloat linearToSrgbCh(float c) {\n return c <= 0.0031308 ? c * 12.92 : 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nvec3 linearToSrgb(vec3 c) {\n return vec3(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}\n\n// value.js LINEAR_SRGB_TO_LMS (constants.ts), row-major; written here as GLSL\n// columns (= the transpose) so mat3 * vec3 evaluates the row-major M\u00B7v.\nconst mat3 LINEAR_SRGB_TO_LMS = mat3(\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 (gamut.ts lines 295-297 \u2014\n// these differ at the ~1e-9 digit from LMS_TO_OKLAB_MATRIX; use the inline ones to\n// mirror the exact value.js path), row-major \u2192 GLSL columns.\nconst mat3 LMS_TO_OKLAB = mat3(\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 (constants.ts), row-major \u2192 GLSL columns. Rows:\n// l = [1, 0.3963377774, 0.2158037573], m = [1, -0.1055613458, -0.0638541728],\n// s = [1, -0.0894841775, -1.2914855480].\nconst mat3 OKLAB_TO_LMS = mat3(\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 (constants.ts), row-major \u2192 GLSL columns.\nconst mat3 LMS_TO_LINEAR_SRGB = mat3(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\n// Gamma sRGB \u2192 raw OKLab (L, a, b). Mirrors value.js srgbToOKLab.\nvec3 srgbToOklab(vec3 c) {\n vec3 lin = srgbToLinear(c);\n vec3 lms = LINEAR_SRGB_TO_LMS * lin;\n vec3 lmsCbrt = sign(lms) * pow(abs(lms), vec3(1.0 / 3.0));\n return LMS_TO_OKLAB * lmsCbrt;\n}\n\n// Raw OKLab (L, a, b) \u2192 linear sRGB. Mirrors value.js oklabToLinearSRGB.\nvec3 oklabToLinearSrgb(vec3 lab) {\n vec3 lms_ = OKLAB_TO_LMS * lab;\n vec3 lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\n\n// OKLab \u2192 OKLCh: H in RADIANS. Mirrors value.js rawOklabToOklch (which returns\n// degrees; we stay in radians and only fold to [0, 2pi)).\nvec3 oklabToOklch(vec3 lab) {\n float C = length(lab.yz);\n float H = atan(lab.z, lab.y);\n if (H < 0.0) H += 2.0 * PI;\n return vec3(lab.x, C, H);\n}\n\n// OKLCh (H radians) \u2192 OKLab. Mirrors value.js rawOklchToOklab.\nvec3 oklchToOklab(vec3 lch) {\n return vec3(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}\n\n// Negative-safe cube root (the WGSL chunk's cbrt3 twin; the GLSL chunk inlines it).\nvec3 cbrt3(vec3 v) { return sign(v) * pow(abs(v), vec3(1.0 / 3.0)); }\n\nvec3 samplePaletteLin(float t) {\n if (uStopCount <= 1) return uPalette[0];\n float n = float(uStopCount);\n float ft = clamp(t, 0.0, 1.0) * (n - 1.0);\n int i0 = int(floor(ft));\n int i1 = min(i0 + 1, uStopCount - 1);\n float f = ft - float(i0);\n vec3 labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * uPalette[i0]);\n vec3 labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * uPalette[i1]);\n return oklabToLinearSrgb(mix(labA, labB, f));\n}\n\nvec3 chainColorLin(float seg, bool rainbow) {\n vec3 baseLin = uPalette[0];\n if (!rainbow) return baseLin;\n vec3 lab = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * baseLin);\n vec3 lch = oklabToOklch(lab);\n float hueShift = mix(-0.45, 1.15, clamp(seg, 0.0, 1.0));\n vec3 lifted = vec3(0.66, max(lch.y, 0.14), lch.z + hueShift);\n return oklabToLinearSrgb(oklchToOklab(lifted));\n}\n\nfloat segDist(vec2 p, vec2 a, vec2 b) {\n vec2 pa = p - a;\n vec2 ba = b - a;\n float h = clamp(dot(pa, ba) / max(dot(ba, ba), 1e-8), 0.0, 1.0);\n return length(pa - ba * h);\n}\n\nvoid main() {\n vec2 center = uFit.xy;\n float scale = max(uFit.z, 1e-6);\n float aspect = max(uFit.w, 1e-4);\n // clip \u2192 model (the inverse of model\u2192clip fit).\n vec2 p = center + vec2(vClip.x * aspect, vClip.y) / scale;\n\n float aa = max(fwidth(p.x) + fwidth(p.y), 1e-5) * 0.75;\n float trailWidth = uTrail.x; // already in model units (packed CPU-side)\n float peak = uTrail.y * uEnv.y;\n float headGlow = uTrail.z * uEnv.y;\n float fadeExp = uTrail.w;\n float trailFloor = uEnv.x;\n bool showEpicycles = uEnv.z > 0.5;\n bool rainbow = uEnv.w > 0.5;\n float halfW = trailWidth * 0.5;\n\n vec4 accum = vec4(0.0);\n\n if (showEpicycles && uArmCount >= 1) {\n for (int k = 0; k < MAX_PHASORS; k++) {\n if (k >= uArmCount) break;\n vec2 a = uChain[k];\n vec2 b = uChain[k + 1];\n float seg = float(k) / max(float(uArmCount - 1), 1.0);\n vec3 lin = chainColorLin(seg, rainbow);\n float radius = length(b - a);\n float dRing = abs(length(p - a) - radius);\n float ringW = max(halfW * 0.45, aa);\n float ringMask = (1.0 - smoothstep(ringW, ringW + aa, dRing)) * 0.5;\n float dArm = segDist(p, a, b);\n float armMask = 1.0 - smoothstep(halfW * 0.55, halfW * 0.55 + aa, dArm);\n float dotR = max(halfW * 0.7, aa * 2.0);\n float dDot = length(p - a);\n float dotMask = 1.0 - smoothstep(dotR, dotR + aa, dDot);\n float m = clamp(max(max(ringMask, armMask), dotMask), 0.0, 1.0) * peak * 0.7;\n vec3 rgb = clamp(linearToSrgb(lin), vec3(0.0), vec3(1.0));\n accum = vec4(rgb * m, m) + accum * (1.0 - m);\n }\n }\n\n for (int i = 0; i < MAX_CURVE_SAMPLES; i++) {\n if (i >= uSampleCount - 1) break;\n vec3 sa = uCurve[i];\n vec3 sb = uCurve[i + 1];\n float d = segDist(p, sa.xy, sb.xy);\n float cover = 1.0 - smoothstep(halfW, halfW + aa, d);\n if (cover < 0.002) continue;\n float age = max(sa.z, sb.z);\n float a = peak * pow(age, fadeExp);\n a = max(a, peak * trailFloor) * cover;\n vec3 lin = samplePaletteLin(1.0 - age * 0.4);\n vec3 rgb = clamp(linearToSrgb(lin), vec3(0.0), vec3(1.0));\n accum = vec4(rgb * a, a) + accum * (1.0 - a);\n }\n\n if (uSampleCount >= 1) {\n vec2 head = uCurve[0].xy;\n float dHead = length(p - head);\n float coreR = halfW * 1.5;\n float haloR = coreR * 3.0;\n vec3 headRgb = clamp(linearToSrgb(samplePaletteLin(0.0)), vec3(0.0), vec3(1.0));\n float halo = (1.0 - smoothstep(0.0, haloR, dHead)) * headGlow * 0.35;\n accum = vec4(headRgb * halo, halo) + accum * (1.0 - halo);\n float core = (1.0 - smoothstep(coreR, coreR + aa, dHead)) * headGlow;\n accum = vec4(headRgb * core, core) + accum * (1.0 - core);\n float spec = (1.0 - smoothstep(coreR * 0.4, coreR * 0.4 + aa, dHead)) * headGlow * 0.9;\n accum = vec4(vec3(1.0) * spec, spec) + accum * (1.0 - spec);\n }\n\n fragColor = accum;\n}\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FOURIER_FIELD_RENDER_WGSL = "\nconst PI: f32 = 3.141592653589793;\nconst TAU: f32 = 6.283185307179586;\nconst MAX_CURVE_SAMPLES: i32 = 384;\nconst MAX_PHASORS: i32 = 64;\nconst MAX_FOURIER_STOPS: i32 = 4;\n\n// \u2500\u2500 Render uniforms (the typed-struct source-of-truth \u2014 see uniformBridgeWGPU.ts) \u2500\u2500\nstruct RenderUniforms {\n // r0: (centerX, centerY, scale, aspect) \u2014 model\u2192clip fit transform\n r0: vec4<f32>,\n // r1: (trailWidth, peakAlpha, headGlowAlpha, trailFadeExp)\n r1: vec4<f32>,\n // r2: (trailFloor, intensity, showEpicycles, rainbowChain)\n r2: vec4<f32>,\n // ints: (sampleCount, armCount, stopCount, _pad)\n ints: vec4<i32>,\n // palette stops: linear-sRGB rgb + _pad\n palette: array<vec4<f32>, 4>,\n};\n\n@group(0) @binding(0) var<uniform> u: RenderUniforms;\n// curveSamples[i] = (x, y, age, _pad) in MODEL space\n@group(0) @binding(1) var<storage, read> curveSamples: array<vec4<f32>>;\n// chainTips[k] = (x, y, _pad, _pad) in MODEL space\n@group(0) @binding(2) var<storage, read> chainTips: array<vec4<f32>>;\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// 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.z;\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\n// A warm-anchored chain hue sweep over the palette base \u2014 the rainbow chain register.\n// Tilts the base hue by a tight warm-ward band so the chain stays colourful but warm.\nfn chainColorLin(seg: f32, rainbow: bool) -> vec3<f32> {\n let baseLin = u.palette[0].rgb;\n if (!rainbow) { return baseLin; }\n let lab = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * baseLin);\n let lch = oklabToOklch(lab);\n // warm-anchored: a touch cool at the root climbing warm toward the tips.\n let hueShift = mix(-0.45, 1.15, clamp(seg, 0.0, 1.0)); // radians (~ -26\u00B0..+66\u00B0)\n let h = lch.z + hueShift;\n let lifted = vec3<f32>(0.66, max(lch.y, 0.14), h);\n return oklabToLinearSrgb(oklchToOklab(lifted));\n}\n\n// Distance from point p to segment ab (model space).\nfn segDist(p: vec2<f32>, a: vec2<f32>, b: vec2<f32>) -> f32 {\n let pa = p - a;\n let ba = b - a;\n let h = clamp(dot(pa, ba) / max(dot(ba, ba), 1e-8), 0.0, 1.0);\n return length(pa - ba * h);\n}\n\nstruct VSOut {\n @builtin(position) pos: vec4<f32>,\n @location(0) model: vec2<f32>, // model-space coordinate of this fragment\n};\n\n@vertex\nfn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {\n // Full-screen triangle (covers the viewport with 3 verts).\n var p = array<vec2<f32>, 3>(\n vec2<f32>(-1.0, -3.0), vec2<f32>(-1.0, 1.0), vec2<f32>(3.0, 1.0),\n );\n let clip = p[vi];\n // Inverse of the model\u2192clip fit: clip = (model \u2212 center)\u00B7scale, aspect-corrected x.\n // \u2192 model = center + clip\u00B7(1/scale), x un-aspect-corrected.\n let center = u.r0.xy;\n let scale = max(u.r0.z, 1e-6);\n let aspect = max(u.r0.w, 1e-4);\n let model = center + vec2<f32>(clip.x * aspect, clip.y) / scale;\n\n var out: VSOut;\n out.pos = vec4<f32>(clip, 0.0, 1.0);\n out.model = model;\n return out;\n}\n\n@fragment\nfn fs_main(in: VSOut) -> @location(0) vec4<f32> {\n let p = in.model;\n // AA feather: one device pixel in model units (fwidth of the model coord).\n let aa = max(fwidth(p.x) + fwidth(p.y), 1e-5) * 0.75;\n\n let trailWidth = u.r1.x; // already in model units (packed CPU-side)\n let peak = u.r1.y * u.r2.y; // peakAlpha \u00B7 intensity\n let headGlow = u.r1.z * u.r2.y;\n let fadeExp = u.r1.w;\n let trailFloor = u.r2.x;\n let sampleCount = u.ints.x;\n let armCount = u.ints.y;\n let showEpicycles = u.r2.z > 0.5;\n let rainbow = u.r2.w > 0.5;\n let halfW = trailWidth * 0.5;\n\n var accum = vec4<f32>(0.0); // premultiplied accumulation\n\n // \u2500\u2500 Epicycle scaffolding (orbit rings + arms + joint dots) UNDER the curve \u2500\u2500\n if (showEpicycles && armCount >= 1) {\n for (var k = 0; k < MAX_PHASORS; k = k + 1) {\n if (k >= armCount) { break; }\n let a = chainTips[k].xy;\n let b = chainTips[k + 1].xy;\n let seg = f32(k) / max(f32(armCount - 1), 1.0);\n let lin = chainColorLin(seg, rainbow);\n // orbit RING around a (radius = arm length).\n let radius = length(b - a);\n let dRing = abs(length(p - a) - radius);\n let ringW = max(halfW * 0.45, aa);\n let ringMask = (1.0 - smoothstep(ringW, ringW + aa, dRing)) * 0.5;\n // ARM segment a\u2192b.\n let dArm = segDist(p, a, b);\n let armMask = 1.0 - smoothstep(halfW * 0.55, halfW * 0.55 + aa, dArm);\n // joint DOT at a.\n let dotR = max(halfW * 0.7, aa * 2.0);\n let dDot = length(p - a);\n let dotMask = 1.0 - smoothstep(dotR, dotR + aa, dDot);\n let m = clamp(max(max(ringMask, armMask), dotMask), 0.0, 1.0) * peak * 0.7;\n let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));\n // over-composite (premultiplied).\n accum = vec4<f32>(rgb * m, m) + accum * (1.0 - m);\n }\n }\n\n // \u2500\u2500 The comet TRAIL \u2014 min-distance to the curve polyline, per-segment age fade \u2500\u2500\n for (var i = 0; i < MAX_CURVE_SAMPLES; i = i + 1) {\n if (i >= sampleCount - 1) { break; }\n let sa = curveSamples[i];\n let sb = curveSamples[i + 1];\n let d = segDist(p, sa.xy, sb.xy);\n let cover = 1.0 - smoothstep(halfW, halfW + aa, d);\n if (cover < 0.002) { continue; }\n let age = max(sa.z, sb.z); // 1 at head, 0 at tail\n var a = peak * pow(age, fadeExp);\n a = max(a, peak * trailFloor);\n a = a * cover;\n let lin = samplePaletteLin(1.0 - age * 0.4); // warm core, lighter tail\n let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));\n accum = vec4<f32>(rgb * a, a) + accum * (1.0 - a);\n }\n\n // \u2500\u2500 The comet HEAD \u2014 halo + saturated core + white specular at curveSamples[0] \u2500\u2500\n if (sampleCount >= 1) {\n let head = curveSamples[0].xy;\n let dHead = length(p - head);\n let coreR = halfW * 1.5;\n let haloR = coreR * 3.0;\n let headLin = samplePaletteLin(0.0);\n let headRgb = clamp(linearToSrgb(headLin), vec3<f32>(0.0), vec3<f32>(1.0));\n // soft halo\n let halo = (1.0 - smoothstep(0.0, haloR, dHead)) * headGlow * 0.35;\n accum = vec4<f32>(headRgb * halo, halo) + accum * (1.0 - halo);\n // saturated core\n let core = (1.0 - smoothstep(coreR, coreR + aa, dHead)) * headGlow;\n accum = vec4<f32>(headRgb * core, core) + accum * (1.0 - core);\n // white specular\n let spec = (1.0 - smoothstep(coreR * 0.4, coreR * 0.4 + aa, dHead)) * headGlow * 0.9;\n accum = vec4<f32>(vec3<f32>(1.0) * spec, spec) + accum * (1.0 - spec);\n }\n\n return accum;\n}\n";
|
|
@@ -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>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type { BlobMood, BlobConfig } from "./types";
|
|
1
|
+
import type { BlobMood, BlobConfig, BlobVariant } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* GooBlob — a gooey metaball creature on a WebGL2 canvas.
|
|
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
|
|
@@ -28,6 +30,14 @@ type __VLS_Props = {
|
|
|
28
30
|
* The metaball tuning. Pass `BLOB_CONFIG_DEFAULTS` for the stock look.
|
|
29
31
|
*/
|
|
30
32
|
config?: BlobConfig;
|
|
33
|
+
/**
|
|
34
|
+
* BC.W-GOOBLOB-PLAIN — the render-variant axis. `"blob"` is the STAGE-1
|
|
35
|
+
* shadowless lightless fill-only floor; `"meatball"` (default) is the full lit
|
|
36
|
+
* register. When set it WINS the resolved config's `variant` (the per-instance
|
|
37
|
+
* override); unset, the config's own `variant` rules. STAGE 1's `uStage` gate
|
|
38
|
+
* strips the lit/shadow blocks for the `"blob"` register.
|
|
39
|
+
*/
|
|
40
|
+
variant?: BlobVariant;
|
|
31
41
|
/** Extra seed string mixed into the satellite PRNG for a unique-but-reproducible system. */
|
|
32
42
|
seed?: string;
|
|
33
43
|
/**
|
|
@@ -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;
|