@mkbabb/glass-ui 4.1.0 → 4.2.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/dist/{CardAction-8whJrLWt.js → CardAction-DlVP2evz.js} +58 -54
- package/dist/{CommandShortcut-D3yxgHNn.js → CommandShortcut-By-VQcLO.js} +3 -3
- package/dist/{ConfiguratorRow-CaP7U3ZA.js → ConfiguratorRow-YMXdINHx.js} +3 -3
- package/dist/{ContextMenuContent-B3ZsheLV.js → ContextMenuContent-CMWn6huB.js} +1 -1
- package/dist/{ContextMenuSubContent-DDRID3qC.js → ContextMenuSubContent-DvwWCUc0.js} +1 -1
- package/dist/{DataTable-Bc9kUtu_.js → DataTable-C4tG3eIJ.js} +4 -4
- package/dist/DialogContent-D8U9ZfWS.js +121 -0
- package/dist/{DialogScrollContent-TTuovQst.js → DialogScrollContent-BMekN7gq.js} +1 -1
- package/dist/{FadingScroll-DLRbH5Xr.js → FadingScroll-P8B30rAD.js} +1 -1
- package/dist/{HoverCardContent-Bel1gdLZ.js → HoverCardContent-DAmGYglo.js} +1 -1
- package/dist/{HoverPopover-BcIxvyqZ.js → HoverPopover-DYpBOzzF.js} +1 -1
- package/dist/{IconChip-DhbdGdFQ.js → IconChip-CQa7XZYc.js} +7 -5
- package/dist/{IconTooltip-B0zimd2H.js → IconTooltip-_df8M3xm.js} +1 -1
- package/dist/{Input-Cg9DF62r.js → Input-CyU4_hIC.js} +2 -2
- package/dist/{MetricBadge-RHdBP72w.js → MetricBadge-DQt_dGah.js} +1 -1
- package/dist/{Notification-CphK7AAm.js → Notification-BlSPJhtZ.js} +1 -1
- package/dist/{NumberFieldContent-D8cXeyO4.js → NumberFieldContent-Z3VxGu_6.js} +3 -3
- package/dist/PagerDots-CYlqVFd4.js +196 -0
- package/dist/PaperBackdrop-DYWgrnh8.js +42 -0
- package/dist/{PopoverContent-DL7E6vJP.js → PopoverContent-BuKyHZSz.js} +2 -2
- package/dist/{Progress-CnqB7gLm.js → Progress-C9SsdwIZ.js} +1 -1
- package/dist/{ScrollingText-CTZbA_cG.js → ScrollingText-DY3W1Jfh.js} +2 -2
- package/dist/{SelectScrollDownButton-DAKCBEdW.js → SelectScrollDownButton-3mFHX_R-.js} +15 -12
- package/dist/{Switch-B8RscmRu.js → Switch-uf-UKPA2.js} +1 -1
- package/dist/{Toaster-D9qIHjBI.js → Toaster-ozrsR4mP.js} +1 -1
- package/dist/{ToggleGroupItem-BLtr3TJq.js → ToggleGroupItem-BpzaVzNm.js} +4 -4
- package/dist/{TooltipProvider-BJ_Y5EGX.js → TooltipProvider-QQVM_80r.js} +1 -1
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +1 -0
- package/dist/api/types-extra.d.ts +3 -1
- package/dist/api.js +2 -2
- package/dist/aurora.js +163 -131
- package/dist/badge-Bt14yURi.js +72 -0
- package/dist/badge.js +1 -1
- package/dist/border-progress.js +1 -1
- package/dist/button-D1W9PrzI.js +130 -0
- package/dist/button.js +1 -1
- package/dist/canvas.js +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel.js +227 -98
- package/dist/chipVariants-BJQ0I2kB.js +18 -0
- package/dist/collapsible.js +1 -1
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/components/custom/aurora/composables/glSetup.d.ts +1 -1
- package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +1 -1
- package/dist/components/custom/aurora/constants/presets.d.ts +29 -0
- package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +1 -1
- package/dist/components/custom/aurora/index.d.ts +1 -1
- package/dist/components/custom/concentric/Concentric.vue.d.ts +15 -12
- package/dist/components/custom/concentric/composables/concentricGLSetup.d.ts +8 -3
- package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +8 -4
- package/dist/components/custom/concentric/composables/levelField.d.ts +50 -0
- package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +7 -4
- package/dist/components/custom/concentric/composables/useConcentric.d.ts +3 -3
- package/dist/components/custom/concentric/constants.d.ts +62 -41
- package/dist/components/custom/concentric/index.d.ts +2 -2
- package/dist/components/custom/concentric/shaders/concentric.glsl.d.ts +2 -2
- package/dist/components/custom/concentric/shaders/concentric.wgsl.d.ts +1 -1
- package/dist/components/custom/configurator/Configurator.vue.d.ts +23 -2
- package/dist/components/custom/configurator/index.d.ts +1 -1
- package/dist/components/custom/dock/DockDropdownTrigger.vue.d.ts +4 -3
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +10 -0
- package/dist/components/custom/dock/DockPopoverTrigger.vue.d.ts +19 -0
- package/dist/components/custom/dock/DockStack.vue.d.ts +35 -22
- package/dist/components/custom/dock/GlassDock.vue.d.ts +19 -3
- package/dist/components/custom/dock/composables/dockMorphContext.d.ts +18 -32
- package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +76 -145
- package/dist/components/custom/dock/composables/index.d.ts +1 -0
- package/dist/components/custom/dock/composables/railProjection.d.ts +45 -0
- package/dist/components/custom/dock/composables/useDockContextSilhouette.d.ts +192 -0
- package/dist/components/custom/dock/composables/useDockFission.d.ts +158 -0
- package/dist/components/custom/dock/composables/useDockItemDrag.d.ts +18 -0
- package/dist/components/custom/dock/composables/useDockShellProps.d.ts +38 -0
- package/dist/components/custom/dock/constants.d.ts +14 -3
- package/dist/components/custom/dock/index.d.ts +3 -0
- package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +21 -0
- package/dist/components/custom/dot-flow-field/composables/flowGLProgram.d.ts +8 -0
- package/dist/components/custom/dot-flow-field/composables/flowSetupGL.d.ts +9 -0
- package/dist/components/custom/dot-flow-field/composables/flowSetupGLFlow.d.ts +12 -0
- package/dist/components/custom/dot-flow-field/composables/flowSetupWGPU.d.ts +7 -0
- package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +28 -2
- package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +18 -17
- package/dist/components/custom/dot-flow-field/constants.d.ts +51 -0
- package/dist/components/custom/dot-flow-field/index.d.ts +1 -1
- package/dist/components/custom/dot-flow-field/shaders/flow-field.compute.wgsl.d.ts +1 -1
- package/dist/components/custom/dot-flow-field/shaders/flow-field.glsl.d.ts +29 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +2 -1
- package/dist/components/custom/dot-matrix/composables/uniformBridgeWGPU.d.ts +10 -1
- package/dist/components/custom/dot-matrix/composables/useDotSphere.d.ts +7 -0
- package/dist/components/custom/dot-matrix/constants.d.ts +14 -0
- package/dist/components/custom/dot-matrix/index.d.ts +1 -1
- package/dist/components/custom/dot-matrix/shaders/dot-matrix.glsl.d.ts +2 -2
- package/dist/components/custom/dot-matrix/shaders/dot-matrix.wgsl.d.ts +1 -1
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +4 -0
- package/dist/components/custom/fourier-field/composables/fourierFieldGLSetup.d.ts +9 -0
- package/dist/components/custom/fourier-field/composables/fourierFieldWGPUSetup.d.ts +11 -0
- package/dist/components/custom/fourier-field/composables/uniformBridgeWGPU.d.ts +16 -1
- package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +22 -1
- package/dist/components/custom/fourier-field/constants.d.ts +53 -0
- package/dist/components/custom/fourier-field/shaders/fourier-field.glsl.d.ts +1 -1
- package/dist/components/custom/fourier-field/shaders/fourier-field.render.wgsl.d.ts +1 -1
- package/dist/components/custom/goo-blob/composables/easing.d.ts +1 -0
- package/dist/components/custom/goo-blob/composables/useBlobSatellites.d.ts +1 -0
- package/dist/components/custom/goo-blob/constants.d.ts +26 -1
- 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 -1
- package/dist/components/custom/goo-blob/types.d.ts +50 -1
- package/dist/components/custom/goo-dot-matrix/composables/gooDotSetup.d.ts +32 -3
- package/dist/components/custom/goo-dot-matrix/composables/uniformBridgeWGPU.d.ts +14 -4
- package/dist/components/custom/goo-dot-matrix/constants.d.ts +55 -16
- package/dist/components/custom/goo-dot-matrix/index.d.ts +1 -1
- package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.frag.d.ts +2 -0
- package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.wgsl.d.ts +1 -0
- package/dist/components/custom/goo-filter/GooFilter.vue.d.ts +22 -0
- package/dist/components/custom/goo-filter/index.d.ts +1 -0
- package/dist/components/custom/handmark/brush.d.ts +17 -17
- package/dist/components/custom/handmark/constants.d.ts +28 -8
- package/dist/components/custom/handmark/geometry.d.ts +34 -1
- package/dist/components/custom/handmark/index.d.ts +1 -1
- package/dist/components/custom/icon-chip/types.d.ts +10 -0
- package/dist/components/custom/paper-backdrop/PaperBackdrop.vue.d.ts +18 -0
- package/dist/components/custom/paper-grid/composables/paperGrid.d.ts +44 -29
- package/dist/components/custom/paper-grid/composables/paperGridGLSetup.d.ts +2 -0
- package/dist/components/custom/paper-grid/composables/paperGridWGPUSetup.d.ts +3 -1
- package/dist/components/custom/paper-grid/composables/uniformBridgeWGPU.d.ts +2 -2
- package/dist/components/custom/paper-grid/constants.d.ts +44 -6
- package/dist/components/custom/paper-grid/index.d.ts +2 -2
- package/dist/components/custom/paper-grid/shaders/paper-grid.glsl.d.ts +1 -1
- package/dist/components/custom/paper-grid/shaders/paper-grid.wgsl.d.ts +1 -1
- package/dist/components/custom/selectable-chip/chipVariants.d.ts +39 -0
- package/dist/components/custom/selectable-chip/selectableChipVariants.d.ts +12 -20
- package/dist/components/custom/tabs/constants.d.ts +16 -8
- package/dist/components/custom/timeline/ScrubberTimeline.vue.d.ts +16 -0
- package/dist/components/custom/timeline/geometry.d.ts +0 -8
- package/dist/components/custom/toggle-chip/index.d.ts +15 -4
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +12 -10
- package/dist/components/ui/_shared/useSurfaceAxis.d.ts +17 -3
- package/dist/components/ui/badge/Badge.vue.d.ts +14 -0
- package/dist/components/ui/badge/index.d.ts +1 -0
- package/dist/components/ui/button/Button.vue.d.ts +1 -0
- package/dist/components/ui/card/Card.vue.d.ts +1 -1
- package/dist/components/ui/card/ScrollCard.vue.d.ts +1 -1
- package/dist/components/ui/carousel/CarouselContent.vue.d.ts +2 -4
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +9 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts +33 -14
- package/dist/components/ui/drawer/constants.d.ts +8 -6
- package/dist/components/ui/drawer/index.d.ts +12 -2
- package/dist/components/ui/select/SelectContent.vue.d.ts +9 -0
- package/dist/components/ui/slider/Slider.vue.d.ts +9 -0
- package/dist/composables/dom/index.d.ts +1 -0
- package/dist/composables/dom/useDragVelocity.d.ts +46 -0
- package/dist/composables/glass/wave/index.d.ts +4 -0
- package/dist/composables/glass/wave/waveField.d.ts +115 -0
- package/dist/composables/glass/wave/waveField.glsl.d.ts +1 -0
- package/dist/composables/glass/wave/waveField.wgsl.d.ts +1 -0
- package/dist/composables/glass/webgl/createCanvasLifecycle.d.ts +95 -2
- package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +40 -2
- package/dist/composables/glass/webgpu/index.d.ts +1 -0
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +37 -0
- package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +49 -2
- package/dist/composables/glass/webgpu/webgpuDevice.d.ts +1 -1
- package/dist/composables/motion/core/index.d.ts +4 -0
- package/dist/composables/motion/core/useHaptic.d.ts +48 -0
- package/dist/composables/motion/core/writeVelocityWeight.d.ts +31 -0
- package/dist/composables/motion/index.d.ts +2 -0
- package/dist/composables/motion/springPresets.d.ts +16 -17
- package/dist/composables/motion/suite.d.ts +2 -2
- package/dist/composables/motion/useBloomUp.d.ts +97 -0
- package/dist/composables/motion/useCelebrationBurst.d.ts +50 -0
- package/dist/composables/motion/useDockCtaReceive.d.ts +10 -28
- package/dist/composables/motion/useGooMorph.d.ts +72 -0
- package/dist/composables/motion/useLiquidFlex.d.ts +18 -0
- package/dist/composables/motion/useLiquidMorph.d.ts +108 -0
- package/dist/composables/motion/useLiquidPress.d.ts +12 -0
- package/dist/composables/motion/useLiquidReveal.d.ts +7 -4
- package/dist/composables/motion/useMorphField.d.ts +157 -0
- package/dist/composables/motion/useScrollPin.d.ts +49 -0
- package/dist/composables/motion/useScrollScene.d.ts +67 -0
- package/dist/concentric.js +532 -563
- package/dist/configurator.js +2 -2
- package/dist/confirm-dialog.js +3 -3
- package/dist/constellation.js +4 -4
- package/dist/context-menu.js +2 -2
- package/dist/controls.js +2 -2
- package/dist/createCanvasLifecycle-CuCrGRfq.js +173 -0
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/deck.js +1 -1
- package/dist/dialog.js +3 -3
- package/dist/dock.js +1163 -618
- package/dist/dockContext-gFVS2gMg.js +18 -0
- package/dist/dom.js +7 -6
- package/dist/dot-flow-field.js +1114 -523
- package/dist/dot-matrix.js +348 -204
- package/dist/drawer.js +106 -96
- package/dist/{dropdown-menu-aJmV5SqE.js → dropdown-menu-CCfcCQ68.js} +3 -3
- package/dist/dropdown-menu.js +1 -1
- package/dist/easing.js +3 -3
- package/dist/expandable-container.js +2 -2
- package/dist/fading-scroll.js +1 -1
- package/dist/forms.js +6 -6
- package/dist/fourier-field.js +441 -197
- 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 +139 -135
- package/dist/goo-blob.js +11 -9
- package/dist/goo-dot-matrix.js +418 -198
- package/dist/handmark.js +137 -94
- 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 -0
- package/dist/instrument-chassis.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +7 -7
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +1 -1
- package/dist/metric-stack.js +1 -1
- package/dist/motion-core.js +42 -39
- package/dist/motion-curves.js +20 -14
- package/dist/motion.js +226 -26
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.js +1 -1
- package/dist/paper-backdrop.js +1 -1
- package/dist/paper-grid.js +315 -342
- package/dist/paperGrid-CXCSMbZ1.js +191 -0
- package/dist/popover.js +1 -1
- package/dist/{presets-CvOUqtdY.js → presets-QvYgnFIZ.js} +13 -12
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +2 -2
- package/dist/{resolveCanvasColor-yPyIpJt9.js → resolveCanvasColor-DsSJk06I.js} +5 -5
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +7 -7
- package/dist/select.js +3 -3
- package/dist/selectable-chip.js +18 -35
- package/dist/separator.js +1 -1
- package/dist/{sheet-B2flBfLH.js → sheet-DUCIoOe0.js} +3 -3
- package/dist/sheet.js +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/slider-CcICPe3u.js +149 -0
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +3 -3
- package/dist/{spectrum-walk-BVzA7Biz.js → spectrum-walk-cBNSx_zm.js} +1 -1
- package/dist/springPresets-DfoQ6XRY.js +64 -0
- package/dist/stacked-icons.js +54 -39
- package/dist/styles/cards.css +202 -2
- package/dist/styles/components.css +1 -3
- package/dist/styles/configurator.css +172 -7
- package/dist/styles/critical-partition.mjs +35 -2
- package/dist/styles/deferred.css +2 -0
- package/dist/styles/dock/adaptive-legibility.css +119 -0
- package/dist/styles/dock/density.css +18 -10
- package/dist/styles/dock/fission-bridge.css +552 -0
- package/dist/styles/dock/layers.css +88 -124
- package/dist/styles/dock/morph-bridge.css +15 -2
- package/dist/styles/dock/morph.css +45 -114
- package/dist/styles/dock/shape.css +137 -11
- package/dist/styles/dock/shell.css +1 -3
- package/dist/styles/dock/stack-rail.css +95 -7
- package/dist/styles/dock-controls/icon-button.css +34 -2
- package/dist/styles/dock-controls/triggers.css +23 -1
- package/dist/styles/dock-controls.css +18 -0
- package/dist/styles/dock.css +16 -1
- package/dist/styles/drawer.css +166 -0
- package/dist/styles/glass/glass-atom.css +244 -0
- package/dist/styles/glass/glass-capsule.css +143 -0
- package/dist/styles/glass/glass-chip.css +215 -0
- package/dist/styles/glass/liquid-enter.css +252 -0
- package/dist/styles/glass/liquid-morph.css +850 -0
- package/dist/styles/glass/material.css +70 -1
- package/dist/styles/glass/reveal.css +22 -2
- package/dist/styles/glass/rim.css +13 -1
- package/dist/styles/glass/surfaces.css +18 -8
- package/dist/styles/glass.css +11 -0
- package/dist/styles/icon-chip.css +45 -0
- package/dist/styles/index.css +11 -0
- package/dist/styles/jubilance.css +65 -0
- package/dist/styles/motion/morph-field.css +229 -0
- package/dist/styles/paper.css +230 -14
- package/dist/styles/scroll-choreography.css +135 -78
- package/dist/styles/segmented-tabs.css +85 -51
- package/dist/styles/select.css +151 -0
- package/dist/styles/tokens/color-radius.css +1 -1
- package/dist/styles/tokens/dark-arm.css +57 -8
- package/dist/styles/tokens/glass-deep.css +8 -4
- package/dist/styles/tokens/glass-fx.css +80 -2
- package/dist/styles/tokens/glass.css +140 -8
- package/dist/styles/tokens/light-dark.css +2 -2
- package/dist/styles/tokens/property-regs.css +144 -0
- package/dist/styles/tokens/scale-paper.css +20 -8
- package/dist/styles/tokens/scheme-motion.css +92 -157
- package/dist/styles/tokens/scheme-spring.css +239 -0
- package/dist/styles/tokens/scroll-tokens.css +15 -15
- package/dist/styles/tokens/shadow.css +73 -13
- package/dist/styles/tokens.css +9 -2
- package/dist/styles/utilities/btn.css +70 -0
- package/dist/switch.js +1 -1
- package/dist/tabs.js +198 -181
- package/dist/timeline.js +241 -206
- package/dist/toast.js +1 -1
- package/dist/toggle-chip.js +14 -41
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{uniformBridgeWGPU-CtAKl45L.js → uniformBridgeWGPU-BCse1SHU.js} +191 -127
- package/dist/{useAnimatedNumber-CLrxicG9.js → useAnimatedNumber-BntskVdQ.js} +1 -1
- package/dist/{useConfiguratorState-4xblKfwd.js → useConfiguratorState-22BcULzF.js} +37 -35
- package/dist/useDockCtaReceive-DX7RDb6_.js +88 -0
- package/dist/{useDragMorph-BUgAC-zK.js → useDragMorph-DGLSewwB.js} +2 -2
- package/dist/useDragVelocity-CjcfX3dA.js +57 -0
- package/dist/useGooMorph-Cs13NgYL.js +104 -0
- package/dist/useGpuSubstrate-Ceet70xq.js +347 -0
- package/dist/{useViewTransition-CUI1nAgn.js → useHaptic-CPz5BT9I.js} +40 -1
- package/dist/{useLiquidFlex-UmA6LMZu.js → useLiquidFlex-Cc6PjVJD.js} +8 -3
- package/dist/useLiquidPress-CtOQ8Z0_.js +43 -0
- package/dist/useMorphField-ogBM7ubT.js +141 -0
- package/dist/{useScrollChrome-D66AVP7C.js → useScrollChrome-JuImi1DM.js} +2 -2
- package/dist/{useSpringMount-BWDnKIwh.js → useSpringMount-DFxtzmkR.js} +1 -1
- package/dist/{useSpringPress-B1-Czp-V.js → useSpringPress-VM9RgVq3.js} +1 -1
- package/dist/{useSurfaceAxis-g0NloYEF.js → useSurfaceAxis-Ci7Dnaw2.js} +1 -1
- package/dist/{useTouchGate-CBZTD4SD.js → useTouchGate-B1Lf9XqN.js} +1 -1
- package/dist/virtual.js +1 -1
- package/dist/watercolor-dot.js +16 -26
- package/dist/writeVelocityWeight-Bh83xZfs.js +19 -0
- package/package.json +14 -3
- package/src/styles/cards.css +202 -2
- package/src/styles/configurator.css +172 -7
- package/src/styles/critical-partition.mjs +35 -2
- package/src/styles/dock/adaptive-legibility.css +119 -0
- package/src/styles/dock/density.css +18 -10
- package/src/styles/dock/fission-bridge.css +552 -0
- package/src/styles/dock/layers.css +88 -124
- package/src/styles/dock/morph-bridge.css +15 -2
- package/src/styles/dock/morph.css +45 -114
- package/src/styles/dock/shape.css +137 -11
- package/src/styles/dock/shell.css +1 -3
- package/src/styles/dock/stack-rail.css +95 -7
- package/src/styles/dock-controls/icon-button.css +34 -2
- package/src/styles/dock-controls/triggers.css +23 -1
- package/src/styles/dock-controls.css +18 -0
- package/src/styles/dock.css +16 -1
- package/src/styles/drawer.css +164 -0
- package/src/styles/glass/glass-atom.css +244 -0
- package/src/styles/glass/glass-capsule.css +143 -0
- package/src/styles/glass/glass-chip.css +215 -0
- package/src/styles/glass/liquid-enter.css +252 -0
- package/src/styles/glass/liquid-morph.css +850 -0
- package/src/styles/glass/material.css +70 -1
- package/src/styles/glass/reveal.css +22 -2
- package/src/styles/glass/rim.css +13 -1
- package/src/styles/glass/surfaces.css +18 -8
- package/src/styles/glass.css +11 -0
- package/src/styles/icon-chip.css +45 -0
- package/src/styles/index.css +11 -0
- package/src/styles/jubilance.css +65 -0
- package/src/styles/motion/morph-field.css +229 -0
- package/src/styles/paper.css +230 -14
- package/src/styles/scroll-choreography.css +135 -78
- package/src/styles/segmented-tabs.css +85 -47
- package/src/styles/select.css +151 -0
- package/src/styles/tokens/color-radius.css +1 -1
- package/src/styles/tokens/dark-arm.css +57 -8
- package/src/styles/tokens/glass-deep.css +8 -4
- package/src/styles/tokens/glass-fx.css +80 -2
- package/src/styles/tokens/glass.css +140 -8
- package/src/styles/tokens/light-dark.css +2 -2
- package/src/styles/tokens/property-regs.css +144 -0
- package/src/styles/tokens/scale-paper.css +20 -8
- package/src/styles/tokens/scheme-motion.css +92 -157
- package/src/styles/tokens/scheme-spring.css +239 -0
- package/src/styles/tokens/scroll-tokens.css +15 -15
- package/src/styles/tokens/shadow.css +73 -13
- package/src/styles/tokens.css +9 -2
- package/src/styles/utilities/btn.css +70 -0
- package/dist/DialogContent-6JtTB5x2.js +0 -106
- package/dist/PagerDots-Cjx96la-.js +0 -98
- package/dist/PaperBackdrop-CqwjnfLv.js +0 -31
- package/dist/badge-D9XWW4GT.js +0 -53
- package/dist/button-5dY1Dvhd.js +0 -125
- package/dist/components/custom/concentric/composables/ringField.d.ts +0 -85
- package/dist/createCanvasLifecycle-Gh45Ce-p.js +0 -93
- package/dist/dockContext-BNfyPLe9.js +0 -17
- package/dist/slider-2A0rPn79.js +0 -142
- package/dist/springPresets-Ce7OYCm9.js +0 -46
- package/dist/useDockCtaReceive-DfFkmgL1.js +0 -82
- package/dist/useGpuSubstrate-4pTcp6mX.js +0 -294
- package/dist/useLiquidPress-BooG97RY.js +0 -39
- /package/dist/{CollapsibleContent-68dEXIAl.js → CollapsibleContent-D7UNsXQr.js} +0 -0
- /package/dist/{DialogFooter-9phqcRIS.js → DialogFooter-DoLy0ewI.js} +0 -0
- /package/dist/{InstrumentChassis-CxsHSyMj.js → InstrumentChassis-UUJX0-mW.js} +0 -0
- /package/dist/{Label-C2ejNWeC.js → Label-B_HPqi_q.js} +0 -0
- /package/dist/{ModalOverlay-D1VrWyoi.js → ModalOverlay-DfAf7o15.js} +0 -0
- /package/dist/{SelectGroup-BFiod7X2.js → SelectGroup-Dcczq44n.js} +0 -0
- /package/dist/{SelectSeparator-C2UGOkXF.js → SelectSeparator-CNRGG7Ew.js} +0 -0
- /package/dist/{Separator-DQcwC2TR.js → Separator-Cf9-JFgi.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-C1je1s0u.js → _plugin-vue_export-helper-gLzyemvl.js} +0 -0
- /package/dist/{color-Cs0-oxYL.js → color-B9jZdhJX.js} +0 -0
- /package/dist/{compile-nZ1xVYTp.js → compile-INR_tPk_.js} +0 -0
- /package/dist/{constants--C2DkLW8.js → constants-BWj7DkMn.js} +0 -0
- /package/dist/{createContext-CpBNTRMI.js → createContext-Cd23P9j0.js} +0 -0
- /package/dist/{dotMatrixField-D_x9_1qq.js → dotMatrixField-CRO0ZFk4.js} +0 -0
- /package/dist/{flow.glsl-B2P7e0MT.js → flow.glsl-DqEGRpl4.js} +0 -0
- /package/dist/{math-Eb0w3LqU.js → math-5RcIgCB4.js} +0 -0
- /package/dist/{menuItemVariants-D8VNHq22.js → menuItemVariants-DAXquKja.js} +0 -0
- /package/dist/{prng-B-d9eYX8.js → prng-B5tIXTtj.js} +0 -0
- /package/dist/{procedural-color.wgsl-m7Zgv35j.js → procedural-color.wgsl-C1Y5PkM6.js} +0 -0
- /package/dist/{scrollReader-DI1NWxUw.js → scrollReader-rc3Ns_NM.js} +0 -0
- /package/dist/{useControlSize-SH1UmJCi.js → useControlSize-DAZ062x7.js} +0 -0
- /package/dist/{useFuzzySearch-DIhcYtcw.js → useFuzzySearch-0fTYOhS4.js} +0 -0
- /package/dist/{useGlobalDark-CmjB9E32.js → useGlobalDark-B4HO9LXG.js} +0 -0
- /package/dist/{useIntersectionPause-Dbozzjgm.js → useIntersectionPause-DO8Vl4gs.js} +0 -0
- /package/dist/{useInterval-CNdua40W.js → useInterval-BVUI-sez.js} +0 -0
- /package/dist/{useKeyboardShortcuts-BPRp33Im.js → useKeyboardShortcuts-BEut54Tk.js} +0 -0
- /package/dist/{usePointerVelocityField-QLsy3_kv.js → usePointerVelocityField-BrkqZFhj.js} +0 -0
- /package/dist/{useResizeObserver-Bpoi7tRE.js → useResizeObserver-DdEn3v2f.js} +0 -0
- /package/dist/{useResolveTokenColor-vAylyR0x.js → useResolveTokenColor-ChOnCckA.js} +0 -0
- /package/dist/{useScrollProgress-c3yxmH6a.js → useScrollProgress-A0M6qRl7.js} +0 -0
- /package/dist/{useSortable-BVqlJRBR.js → useSortable-DQV_UNDw.js} +0 -0
- /package/dist/{useTextHighlight-NmBM5V_4.js → useTextHighlight-Bma3UlKA.js} +0 -0
- /package/dist/{useTimer-BHJOKr35.js → useTimer-BBLGPXR8.js} +0 -0
- /package/dist/{useUserInvalidAria-y5namzeE.js → useUserInvalidAria-EmmwWPOl.js} +0 -0
- /package/dist/{useViewportReady-anbac3m6.js → useViewportReady-C9pYnn7K.js} +0 -0
- /package/dist/{vReveal-D9k0jADx.js → vReveal-CT1KtwZA.js} +0 -0
|
@@ -1,4 +1,41 @@
|
|
|
1
1
|
export type CanvasSuspendReason = "tab-hidden" | "off-screen" | "off-screen-io" | "manual";
|
|
2
|
+
export interface BackingSize {
|
|
3
|
+
w: number;
|
|
4
|
+
h: number;
|
|
5
|
+
dpr: number;
|
|
6
|
+
changed: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The consumer's DPR policy — either a flat multiplier or a box-aware resolver (e.g.
|
|
10
|
+
* aurora's 1.5× wash ceiling vs goo-blob's 2× focal `resolveBudgetDpr`). The leaf owns
|
|
11
|
+
* the MEASUREMENT + the floor; the consumer owns ONLY the DPR number.
|
|
12
|
+
*/
|
|
13
|
+
export type DprPolicy = number | ((box: {
|
|
14
|
+
w: number;
|
|
15
|
+
h: number;
|
|
16
|
+
}) => number);
|
|
17
|
+
/**
|
|
18
|
+
* BD.W-SUBSTRATE-SIZE-UNIFY (G1) — the ONE canonical backing-store sizer.
|
|
19
|
+
*
|
|
20
|
+
* Aurora's PROVEN gBCR-ancestor sizer, lifted into the agnostic leaf so it lives ONCE
|
|
21
|
+
* (DRY) instead of in N drifted consumer `resize()` closures (the three incompatible
|
|
22
|
+
* `clientWidth || 320` / `clientWidth || canvasSize` / one-parent-gBCR conventions the
|
|
23
|
+
* DELTA-ASSAY reproduced as the live 300×150 stuck-canvas).
|
|
24
|
+
*
|
|
25
|
+
* Measures the LAID-OUT border-box via `getBoundingClientRect` — NOT `clientWidth`,
|
|
26
|
+
* which reads 0 under a `content-visibility:auto` skip (the born-skipped trap). Walks
|
|
27
|
+
* ancestors ONLY when our own rect is still zero (truly un-laid-out), and the walk is
|
|
28
|
+
* BOUNDED (H-B): cap depth at 3 AND stop at the first sized / contained / container /
|
|
29
|
+
* positioned ancestor — never an unbounded gBCR storm to `<body>` (O(depth) reflow per
|
|
30
|
+
* tick), never an over-recovered wide flex/grid grandparent that sizes the backing to
|
|
31
|
+
* the viewport. Idempotent: the realloc (which CLEARS the drawing buffer) is skipped
|
|
32
|
+
* when the buffer already matches the box.
|
|
33
|
+
*
|
|
34
|
+
* Pure CSS-geometry — ZERO dependency on which GPU API is live, so it runs SYNCHRONOUSLY
|
|
35
|
+
* at mount before the async WebGPU device resolves (G2). Engine-identical in Chromium +
|
|
36
|
+
* WebKit (gBCR reflects the real box across a CV skip in both).
|
|
37
|
+
*/
|
|
38
|
+
export declare function sizeBacking(canvas: HTMLCanvasElement, dprPolicy: DprPolicy): BackingSize;
|
|
2
39
|
/** The per-frame hooks a backend's `buildContext` returns to the lifecycle core. */
|
|
3
40
|
export interface CanvasFrameHooks {
|
|
4
41
|
/** Draw one frame at `timeSec`. */
|
|
@@ -19,8 +56,26 @@ export interface CanvasLifecycleOptions {
|
|
|
19
56
|
* on a backend context-restore. Throws on backend-unavailable / setup failure.
|
|
20
57
|
*/
|
|
21
58
|
buildContext: () => CanvasFrameHooks;
|
|
22
|
-
/**
|
|
23
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Upload the backing geometry to the viewport/uniforms.
|
|
61
|
+
*
|
|
62
|
+
* BD.W-SUBSTRATE-SIZE-UNIFY (G1): the leaf now MEASURES + sizes the backing store
|
|
63
|
+
* (via `sizeBacking`, the ONE sizer) and passes the freshly-computed `BackingSize`
|
|
64
|
+
* here so the consumer can never re-derive a wrong one. The arg is OPTIONAL only so
|
|
65
|
+
* a legacy consumer that still self-measures keeps compiling during the consumer
|
|
66
|
+
* cut-over; a consumer SHOULD read `s` and skip its own gBCR/DPR block. When the
|
|
67
|
+
* leaf owns sizing (`dprPolicy` provided) the buffer is already correct on entry —
|
|
68
|
+
* the consumer body shrinks to `gl.viewport(0,0,s.w,s.h)` / `uploadResolution`.
|
|
69
|
+
*/
|
|
70
|
+
resize: (s?: BackingSize) => void;
|
|
71
|
+
/**
|
|
72
|
+
* The consumer's DPR policy, handed to the leaf's `sizeBacking`. When PRESENT the
|
|
73
|
+
* leaf owns the backing-store MEASUREMENT + sizing (the G1 inversion) and the live
|
|
74
|
+
* `BackingSize` rides every `resize` call. When ABSENT the leaf falls back to the
|
|
75
|
+
* legacy behaviour (the consumer's `resize()` self-measures) — the migration seam
|
|
76
|
+
* so a consumer can adopt the leaf sizer one viz at a time without a flag-day break.
|
|
77
|
+
*/
|
|
78
|
+
dprPolicy?: DprPolicy;
|
|
24
79
|
/**
|
|
25
80
|
* Bind/unbind backend-specific context-loss/restore listeners. `rebuild` re-runs
|
|
26
81
|
* `buildContext` on a fresh context + resumes the loop (the self-heal); the backend
|
|
@@ -29,9 +84,47 @@ export interface CanvasLifecycleOptions {
|
|
|
29
84
|
*/
|
|
30
85
|
bindContextEvents?: (rebuild: () => void, markContextLost: () => void) => void;
|
|
31
86
|
unbindContextEvents?: () => void;
|
|
87
|
+
/**
|
|
88
|
+
* BD.W-SUBSTRATE-SIZE-UNIFY (G3) — compose the IntersectionObserver park detector
|
|
89
|
+
* at the leaf (DRY) so a consumer inherits the off-screen IO-park ORed with the
|
|
90
|
+
* content-visibility park, with NO per-viz `useIntersectionPause` wiring. The leaf
|
|
91
|
+
* wires a plain (scope-free, reactivity-free) IO observing the canvas, writing the
|
|
92
|
+
* DISTINCT `"off-screen-io"` reason. On `isIntersecting → true` it ALSO re-measures
|
|
93
|
+
* via `sizeBacking` (the reveal belt-and-braces, the load-bearing path on WebKit
|
|
94
|
+
* where `contentvisibilityautostatechange` support is weaker).
|
|
95
|
+
*
|
|
96
|
+
* Default `false` — OPT-IN. Today several consumers (goo-blob, goo-dot-matrix)
|
|
97
|
+
* already write `"off-screen-io"` from their OWN `useIntersectionPause`; a leaf IO
|
|
98
|
+
* defaulting on would DOUBLE-WRITE that reason and breach the one-writer invariant.
|
|
99
|
+
* The atomic retirement of those per-consumer calls (so the leaf IO becomes the sole
|
|
100
|
+
* writer, default-on) lands in the viz lanes. Until then a viz with NO IO wiring
|
|
101
|
+
* (concentric / fourier / dot-flow — the live PARK gap) opts IN to inherit the park.
|
|
102
|
+
*/
|
|
103
|
+
composeIntersectionPark?: boolean;
|
|
104
|
+
/** `rootMargin` for the leaf-composed IO park (G3). Default `"256px"` (pre-warm). */
|
|
105
|
+
intersectionRootMargin?: string;
|
|
106
|
+
/**
|
|
107
|
+
* BD.W-SUBSTRATE-REVEAL-BLOOM (G6) — the cold-first-paint reveal seam. When set, the
|
|
108
|
+
* leaf toggles a `--substrate-reveal-t` 0→1 scalar on the canvas at the cold-arm
|
|
109
|
+
* paint (ONCE, never on an IO/CV re-reveal of an already-seen viz). The shader reads
|
|
110
|
+
* it to ramp luminance/saturation/drift — a FIELD bloom (the canvas rect stays
|
|
111
|
+
* `scale(1)`, no box-zoom gutter). Gated on the Band-0 `--ease-cartoon-punch` +
|
|
112
|
+
* `--motion-weight` tokens (NOT shipped today); absent, this is a no-op so the
|
|
113
|
+
* substrate paints exactly as before. PRM → the scalar is set to its settled `1`
|
|
114
|
+
* immediately (zero ramp).
|
|
115
|
+
*/
|
|
116
|
+
revealBloom?: boolean;
|
|
32
117
|
}
|
|
33
118
|
export interface CanvasLifecycleHandle {
|
|
34
119
|
arm: () => void;
|
|
120
|
+
/**
|
|
121
|
+
* BD.W-SUBSTRATE-SIZE-UNIFY (G2) — size the backing store + start the leaf RO
|
|
122
|
+
* SYNCHRONOUSLY, decoupled from the (async) context acquire. The WebGPU backend
|
|
123
|
+
* calls this BEFORE `armAsync`'s device request so the canvas is sharp from frame 0
|
|
124
|
+
* while the device resolves behind it (the ≤6s blurry-flash close). Idempotent: a
|
|
125
|
+
* no-op once `arm()` has run it. A no-op when no `dprPolicy` was supplied (legacy).
|
|
126
|
+
*/
|
|
127
|
+
presize: () => void;
|
|
35
128
|
suspend: (reason?: CanvasSuspendReason) => void;
|
|
36
129
|
resume: (reason?: CanvasSuspendReason) => void;
|
|
37
130
|
wake: () => void;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type BackingSize, type DprPolicy } from "./createCanvasLifecycle";
|
|
2
|
+
export type { BackingSize, DprPolicy } from "./createCanvasLifecycle";
|
|
1
3
|
/**
|
|
2
4
|
* The ONE `getContext("webgl2")` capability probe (BB.W-CI-GREEN — the
|
|
3
5
|
* single-bootstrap rule). A throwaway WebGL2 context is created here, in the
|
|
@@ -14,6 +16,21 @@
|
|
|
14
16
|
* `document`).
|
|
15
17
|
*/
|
|
16
18
|
export declare function probeWebGL2Renderer(): string | null;
|
|
19
|
+
/**
|
|
20
|
+
* The WebGPU→WebGL2 fall POISON test — can THIS specific canvas still host WebGL2?
|
|
21
|
+
* (BD.W-VIZ-BROKEN-FIX — the single-bootstrap home for the probe.) Once `getContext("webgpu")`
|
|
22
|
+
* has run on a canvas, the HTML one-context-type rule locks it to `webgpu` forever and
|
|
23
|
+
* `getContext("webgl2")` returns `null`. The picker's fall-to-WebGL2 path probes this to
|
|
24
|
+
* decide whether it must clone+swap the canvas (genuinely poisoned) or can keep the original
|
|
25
|
+
* (a fall that ran BEFORE any `getContext("webgpu")` — no-adapter / device-reject / acquire-
|
|
26
|
+
* timeout — never poisoned it; reusing it avoids orphaning the consumer's captured canvas
|
|
27
|
+
* reference). The `getContext("webgl2")` bootstrap stays in THIS substrate (the sole webgl2-
|
|
28
|
+
* creating module per `proof:webgl-substrate-single` clause B); the picker composes this
|
|
29
|
+
* helper rather than calling `getContext("webgl2")` itself. `getContext` is idempotent for
|
|
30
|
+
* the same type, so on a clean canvas the probe returns the very context the net re-acquires
|
|
31
|
+
* (no extra cost). Returns `true` if the canvas can host WebGL2, `false` if poisoned/unable.
|
|
32
|
+
*/
|
|
33
|
+
export declare function canvasCanHostWebGL2(canvas: HTMLCanvasElement): boolean;
|
|
17
34
|
export type WebGLSuspendReason = "tab-hidden" | "off-screen" | "off-screen-io" | "manual";
|
|
18
35
|
/** The per-frame hooks a consumer's `setup(gl)` returns. */
|
|
19
36
|
export interface WebGLCanvasFrame {
|
|
@@ -21,8 +38,14 @@ export interface WebGLCanvasFrame {
|
|
|
21
38
|
frame: (timeSec: number) => void;
|
|
22
39
|
/** Demand-gate: is there live motion to render next frame? `false` → park. */
|
|
23
40
|
shouldContinue: () => boolean;
|
|
24
|
-
/**
|
|
25
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Upload the backing geometry to the viewport/uniforms. BD.W-SUBSTRATE-SIZE-UNIFY:
|
|
43
|
+
* when a `dprPolicy` is supplied the leaf MEASURES + sizes the backing and passes
|
|
44
|
+
* the live `BackingSize` here (the consumer body shrinks to
|
|
45
|
+
* `gl.viewport(0,0,s.w,s.h)`); the arg is optional so a legacy self-measuring
|
|
46
|
+
* consumer keeps compiling until it adopts the leaf sizer.
|
|
47
|
+
*/
|
|
48
|
+
resize: (s?: BackingSize) => void;
|
|
26
49
|
/** Frame time from elapsed seconds — the consumer owns frozen/reduced-motion. */
|
|
27
50
|
time?: (elapsedSec: number) => number;
|
|
28
51
|
/** Delete GL resources (program/buffers/VAO). Runs on dispose + before a restore re-setup. */
|
|
@@ -42,6 +65,19 @@ export interface WebGLCanvasOptions {
|
|
|
42
65
|
* reads the live value via `handle.reducedMotion` (e.g. aurora's frozen-t).
|
|
43
66
|
*/
|
|
44
67
|
respectReducedMotion?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* BD.W-SUBSTRATE-SIZE-UNIFY (G1/G2) — the consumer's DPR policy. When PRESENT the
|
|
70
|
+
* leaf owns the backing-store measurement + sizing (the ONE sizer, sized
|
|
71
|
+
* synchronously at mount before any acquire) and hands the live `BackingSize` to
|
|
72
|
+
* `resize(s)`. When ABSENT the legacy path runs (the consumer self-measures).
|
|
73
|
+
*/
|
|
74
|
+
dprPolicy?: DprPolicy;
|
|
75
|
+
/** Compose the leaf IO park (G3). Default `false` (opt-in; see createCanvasLifecycle). */
|
|
76
|
+
composeIntersectionPark?: boolean;
|
|
77
|
+
/** `rootMargin` for the leaf IO park (G3). */
|
|
78
|
+
intersectionRootMargin?: string;
|
|
79
|
+
/** Fire the cold-first-paint reveal bloom (G6, gated on Band-0 tokens). Default `false`. */
|
|
80
|
+
revealBloom?: boolean;
|
|
45
81
|
/**
|
|
46
82
|
* Build the program + geometry on a fresh context. Called on `arm()` AND on
|
|
47
83
|
* every `webglcontextrestored`. Returns the per-frame hooks.
|
|
@@ -51,6 +87,8 @@ export interface WebGLCanvasOptions {
|
|
|
51
87
|
export interface WebGLCanvasHandle {
|
|
52
88
|
/** Run the expensive init (context + `setup` + arm the loop). Idempotent; no-op post-dispose. */
|
|
53
89
|
arm: () => void;
|
|
90
|
+
/** BD.W-SUBSTRATE-SIZE-UNIFY (G2) — size the backing + start the leaf RO synchronously (pre-acquire). */
|
|
91
|
+
presize: () => void;
|
|
54
92
|
suspend: (reason?: WebGLSuspendReason) => void;
|
|
55
93
|
resume: (reason?: WebGLSuspendReason) => void;
|
|
56
94
|
/** Re-arm a parked loop (a setter that re-introduced motion calls this). */
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { createWebGPUCanvas, supportsWebGPU, WebGPUInitError, type WebGPUCanvasFrame, type WebGPUCanvasHandle, type WebGPUCanvasOptions, type WebGPUSuspendReason, } from "./useWebGPUCanvas";
|
|
2
2
|
export { createGpuSubstrate, type GpuBackend, type GpuSubstrateHandle, type GpuSubstrateOptions, } from "./useGpuSubstrate";
|
|
3
|
+
export { sizeBacking, type BackingSize, type DprPolicy, } from "../webgl/createCanvasLifecycle";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type WebGLCanvasFrame, type WebGLCanvasOptions } from "../webgl/useWebGLCanvas";
|
|
2
|
+
import type { DprPolicy } from "../webgl/createCanvasLifecycle";
|
|
3
|
+
export type { BackingSize, DprPolicy } from "../webgl/createCanvasLifecycle";
|
|
2
4
|
import { supportsWebGPU, type WebGPUCanvasFrame, type WebGPUCanvasOptions } from "./useWebGPUCanvas";
|
|
3
5
|
export { supportsWebGPU };
|
|
4
6
|
/** Which backend the picker resolved. */
|
|
@@ -15,6 +17,32 @@ export interface GpuSubstrateOptions {
|
|
|
15
17
|
setupWGPU?: WebGPUCanvasOptions["setup"];
|
|
16
18
|
/** The GLSL program builder (the WebGL2 fallback path — always required). */
|
|
17
19
|
setupGL: WebGLCanvasOptions["setup"];
|
|
20
|
+
/**
|
|
21
|
+
* BD.W-SUBSTRATE-SIZE-UNIFY (G1/G2) — the consumer's DPR policy (a flat multiplier
|
|
22
|
+
* or a box-aware resolver). When PRESENT the leaf owns the backing-store measurement
|
|
23
|
+
* + sizes it SYNCHRONOUSLY at mount (the ONE sizer; before the async acquire on the
|
|
24
|
+
* WebGPU path), handing the live `BackingSize` to each `setup`'s `resize(s)`. When
|
|
25
|
+
* ABSENT the legacy path runs (the consumer self-measures) — the per-viz adoption
|
|
26
|
+
* seam, identical on both backends.
|
|
27
|
+
*/
|
|
28
|
+
dprPolicy?: DprPolicy;
|
|
29
|
+
/**
|
|
30
|
+
* G3 — compose the leaf IntersectionObserver park (a consumer inherits the
|
|
31
|
+
* off-screen IO-park ORed with content-visibility, no per-viz `useIntersectionPause`
|
|
32
|
+
* wiring). Default `false` (OPT-IN): several consumers already write `"off-screen-io"`
|
|
33
|
+
* from their own `useIntersectionPause` and a leaf IO default-on would double-write
|
|
34
|
+
* that reason. A viz with NO IO wiring (concentric/fourier/dot-flow) opts IN.
|
|
35
|
+
*/
|
|
36
|
+
composeIntersectionPark?: boolean;
|
|
37
|
+
/** `rootMargin` for the leaf IO park (G3). Default `"256px"`. */
|
|
38
|
+
intersectionRootMargin?: string;
|
|
39
|
+
/**
|
|
40
|
+
* G6 — fire the cold-first-paint reveal bloom (a one-shot `--substrate-reveal-t`
|
|
41
|
+
* 0→1 the shader reads to ramp the field from within). Gated on the Band-0
|
|
42
|
+
* `--ease-cartoon-punch` + `--motion-weight` tokens; a no-op until they land.
|
|
43
|
+
* Default `false`.
|
|
44
|
+
*/
|
|
45
|
+
revealBloom?: boolean;
|
|
18
46
|
/** WebGPU `context.configure` alpha mode (default `"premultiplied"`). */
|
|
19
47
|
alphaMode?: WebGPUCanvasOptions["alphaMode"];
|
|
20
48
|
/** WebGPU adapter/device request options. */
|
|
@@ -55,6 +83,15 @@ export interface GpuSubstrateHandle {
|
|
|
55
83
|
armAsync: () => Promise<void>;
|
|
56
84
|
/** Synchronous arm (the WebGL2 net arms immediately; the WebGPU path is a no-op until the device resolves). */
|
|
57
85
|
arm: () => void;
|
|
86
|
+
/**
|
|
87
|
+
* BD.W-SUBSTRATE-SIZE-UNIFY (G2) — size the backing store + start the leaf RO
|
|
88
|
+
* SYNCHRONOUSLY, decoupled from the (async) backend acquire. Call it the instant the
|
|
89
|
+
* canvas is in the DOM so the field is sharp from frame 0 while the device resolves
|
|
90
|
+
* (the ≤6s blurry-flash close). `armAsync` already calls it internally on both legs;
|
|
91
|
+
* exposed so a consumer can presize even earlier (e.g. immediately on mount, before
|
|
92
|
+
* the awaited `armAsync`). A no-op when no `dprPolicy` was supplied (legacy).
|
|
93
|
+
*/
|
|
94
|
+
presize: () => void;
|
|
58
95
|
suspend: (reason?: "tab-hidden" | "off-screen" | "off-screen-io" | "manual") => void;
|
|
59
96
|
resume: (reason?: "tab-hidden" | "off-screen" | "off-screen-io" | "manual") => void;
|
|
60
97
|
wake: () => void;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type BackingSize, type DprPolicy } from "../webgl/createCanvasLifecycle";
|
|
2
|
+
export type { BackingSize, DprPolicy } from "../webgl/createCanvasLifecycle";
|
|
1
3
|
export { WebGPUInitError } from "./webgpuDevice";
|
|
2
4
|
/**
|
|
3
5
|
* The ONE `navigator.gpu` capability probe (the single-bootstrap rule — mirrors
|
|
@@ -7,6 +9,31 @@ export { WebGPUInitError } from "./webgpuDevice";
|
|
|
7
9
|
* clause A reds a direct call).
|
|
8
10
|
*/
|
|
9
11
|
export declare function supportsWebGPU(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The bound on the adapter/device acquisition (ms). `requestAdapter()` /
|
|
14
|
+
* `requestDevice()` can resolve NEITHER way on a hanging host (a headless / virtualized-
|
|
15
|
+
* Metal + some-Chrome class). A REAL cold acquire on a healthy Metal-3 host was live-
|
|
16
|
+
* measured at ~3478ms (the FIRST `requestDevice` on a cold GPU process) — well over the
|
|
17
|
+
* prior tight 2500ms ceiling, which converted a slow-but-fine cold acquire into a FALSE
|
|
18
|
+
* hang so the WGSL primary was never exercised (every viz silently downgraded to WebGL2
|
|
19
|
+
* forever — the Safari-primary surface the "broken TOTALLY" reports live on, masked by the
|
|
20
|
+
* always-winning fallback). 6000ms lets the real cold acquire through while a genuine wedge
|
|
21
|
+
* (a device that never settles) still falls to the WebGL2 net before the user perceives a
|
|
22
|
+
* permanent blank. With the SHARED device warm (`acquireSharedDevice`) the ceiling is hit
|
|
23
|
+
* at most ONCE per page, not N-times-per-canvas — a single ≤6s race, never N.
|
|
24
|
+
*/
|
|
25
|
+
export declare const WEBGPU_ACQUIRE_TIMEOUT_MS = 6000;
|
|
26
|
+
/**
|
|
27
|
+
* Reset the PROCESS-SHARED device memo. The shared-device warm (D3a) is a module-level
|
|
28
|
+
* singleton — the first canvas on a page pays the cold `requestAdapter` → `requestDevice`
|
|
29
|
+
* and every later canvas reuses it. That is correct in production (one device per page),
|
|
30
|
+
* but it makes the memo leak ACROSS isolated unit tests in the same file (a prior test's
|
|
31
|
+
* resolved device satisfies a later test's `armAsync`, so `requestAdapter` is never called
|
|
32
|
+
* + the no-adapter path never runs). A test calls this in `beforeEach` to restore a clean
|
|
33
|
+
* per-test acquire. NOT part of the runtime API surface — exported only for the substrate's
|
|
34
|
+
* own test isolation (no consumer reaches for it).
|
|
35
|
+
*/
|
|
36
|
+
export declare function __resetSharedGpuDeviceForTest(): void;
|
|
10
37
|
export type WebGPUSuspendReason = "tab-hidden" | "off-screen" | "off-screen-io" | "manual";
|
|
11
38
|
/**
|
|
12
39
|
* The per-frame hooks a consumer's `setup(device, context, format)` returns. The
|
|
@@ -22,8 +49,13 @@ export interface WebGPUCanvasFrame {
|
|
|
22
49
|
frame: (timeSec: number) => void;
|
|
23
50
|
/** Demand-gate: is there live motion to render next frame? `false` → park. */
|
|
24
51
|
shouldContinue: () => boolean;
|
|
25
|
-
/**
|
|
26
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Upload the backing geometry. BD.W-SUBSTRATE-SIZE-UNIFY: when a `dprPolicy` is
|
|
54
|
+
* supplied the leaf sizes the backing + passes the live `BackingSize` here (the
|
|
55
|
+
* WGSL swap chain auto-tracks the backing, so the consumer body shrinks to an aspect
|
|
56
|
+
* upload). The arg is optional so a legacy self-measuring consumer keeps compiling.
|
|
57
|
+
*/
|
|
58
|
+
resize: (s?: BackingSize) => void;
|
|
27
59
|
/** Frame time from elapsed seconds — the consumer owns frozen/reduced-motion. */
|
|
28
60
|
time?: (elapsedSec: number) => number;
|
|
29
61
|
/** Release per-instance GPU resources (pipelines/buffers/bind groups). Runs on dispose + before a restore re-setup. */
|
|
@@ -45,6 +77,19 @@ export interface WebGPUCanvasOptions {
|
|
|
45
77
|
* Default `true` for live mode, `false` for capture mode.
|
|
46
78
|
*/
|
|
47
79
|
respectReducedMotion?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* BD.W-SUBSTRATE-SIZE-UNIFY (G1/G2) — the consumer's DPR policy. When PRESENT the
|
|
82
|
+
* leaf sizes the backing SYNCHRONOUSLY at mount (via `presize`, BEFORE the async
|
|
83
|
+
* device acquire — the ≤6s blurry-flash close) and hands the live `BackingSize` to
|
|
84
|
+
* `resize(s)`. When ABSENT the legacy path runs (the consumer self-measures).
|
|
85
|
+
*/
|
|
86
|
+
dprPolicy?: DprPolicy;
|
|
87
|
+
/** Compose the leaf IO park (G3). Default `false` (opt-in; see createCanvasLifecycle). */
|
|
88
|
+
composeIntersectionPark?: boolean;
|
|
89
|
+
/** `rootMargin` for the leaf IO park (G3). */
|
|
90
|
+
intersectionRootMargin?: string;
|
|
91
|
+
/** Fire the cold-first-paint reveal bloom (G6, gated on Band-0 tokens). Default `false`. */
|
|
92
|
+
revealBloom?: boolean;
|
|
48
93
|
/**
|
|
49
94
|
* Build the WGSL pipeline + bind groups on the resolved device. Called on the
|
|
50
95
|
* async arm AND on every device-restore. Returns the per-frame hooks.
|
|
@@ -66,6 +111,8 @@ export interface WebGPUCanvasHandle {
|
|
|
66
111
|
* `armAsync` for the WebGPU path). Idempotent.
|
|
67
112
|
*/
|
|
68
113
|
arm: () => void;
|
|
114
|
+
/** BD.W-SUBSTRATE-SIZE-UNIFY (G2) — size the backing + start the leaf RO synchronously, before the async acquire. */
|
|
115
|
+
presize: () => void;
|
|
69
116
|
suspend: (reason?: WebGPUSuspendReason) => void;
|
|
70
117
|
resume: (reason?: WebGPUSuspendReason) => void;
|
|
71
118
|
/** Re-arm a parked loop (a setter that re-introduced motion calls this). */
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* `try`/`catch` recognizes it; a consumer never sees a `no GPU adapter` PAGEERROR.
|
|
10
10
|
*/
|
|
11
11
|
export declare class WebGPUInitError extends Error {
|
|
12
|
-
readonly kind: "no-adapter" | "device-request" | "no-navigator-gpu" | "software-adapter" | "pipeline-validation";
|
|
12
|
+
readonly kind: "no-adapter" | "device-request" | "no-navigator-gpu" | "software-adapter" | "pipeline-validation" | "acquire-timeout";
|
|
13
13
|
constructor(kind: WebGPUInitError["kind"], message: string, cause?: unknown);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
@@ -10,7 +10,11 @@ export * from "../useViewTransition";
|
|
|
10
10
|
export * from "../vReveal";
|
|
11
11
|
export * from "../useTextHighlight";
|
|
12
12
|
export * from "../useLiquidFlex";
|
|
13
|
+
export * from "../useGooMorph";
|
|
14
|
+
export * from "../useMorphField";
|
|
13
15
|
export * from "../usePointerVelocityField";
|
|
14
16
|
export * from "../useCharStagger";
|
|
15
17
|
export * from "../useScrollTrigger";
|
|
16
18
|
export * from "../useScrollChrome";
|
|
19
|
+
export * from "./useHaptic";
|
|
20
|
+
export * from "./writeVelocityWeight";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* The named haptic register — each maps to a small, bounded `navigator.vibrate` ms
|
|
4
|
+
* vocabulary (all sub-100ms total, never a buzz). The standard short-pattern set:
|
|
5
|
+
* · `tap` — a single crisp tick (a button press confirm).
|
|
6
|
+
* · `snap` — a fling/drag landing into a slot.
|
|
7
|
+
* · `detent` — a tiny double-tick (a piece seating into a detent).
|
|
8
|
+
* · `completion` — the earned-moment confirm (a download done, a personal-best).
|
|
9
|
+
* · `error` — a short three-pulse warn.
|
|
10
|
+
*/
|
|
11
|
+
export type HapticPattern = "tap" | "snap" | "detent" | "completion" | "error";
|
|
12
|
+
export interface UseHapticOptions {
|
|
13
|
+
/**
|
|
14
|
+
* The consumer opt-out (the suppression axis — NOT PRM). When falsy, `pulse()` is a
|
|
15
|
+
* clean no-op. A `MaybeRefOrGetter` so a live reactive flag is honored per-call.
|
|
16
|
+
* Default `true`.
|
|
17
|
+
*/
|
|
18
|
+
enabled?: MaybeRefOrGetter<boolean>;
|
|
19
|
+
}
|
|
20
|
+
export interface UseHapticReturn {
|
|
21
|
+
/**
|
|
22
|
+
* The feature-detect — `true` iff `navigator.vibrate` is a callable function (false on
|
|
23
|
+
* iOS Safari + SSR + any non-vibrate engine). A consumer reads it to branch a visual
|
|
24
|
+
* fallback if it wants one.
|
|
25
|
+
*/
|
|
26
|
+
readonly supported: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Fire a haptic pulse — a named `HapticPattern`, a single duration (ms), or a raw
|
|
29
|
+
* `number[]` vibrate pattern. A NO-OP when unsupported or `enabled` is falsy (so iOS
|
|
30
|
+
* Safari + SSR + an opted-out consumer get a clean no-op, never a throw). Pure
|
|
31
|
+
* imperative — fire it from inside an existing snap callback.
|
|
32
|
+
*/
|
|
33
|
+
pulse: (pattern: HapticPattern | number | number[]) => void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The library's ONE haptic primitive — a thin, feature-detected `navigator.vibrate`
|
|
37
|
+
* wrapper with a bounded named-pattern register. Feature-detects to a clean no-op on iOS
|
|
38
|
+
* Safari + SSR; never throws. See the module header for the no-engine / no-PRM-suppress /
|
|
39
|
+
* no-buzz rationale.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const haptic = useHaptic({ enabled: () => props.enableHaptic })
|
|
44
|
+
* // inside an existing snap callback:
|
|
45
|
+
* onSnap(() => haptic.pulse("snap"))
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare function useHaptic(options?: UseHapticOptions): UseHapticReturn;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** The rest weight (1/φ ≈ 0.618) — the centroid of the iOS-27 register triangle. */
|
|
2
|
+
export declare const MOTION_WEIGHT_REST = 0.618;
|
|
3
|
+
/**
|
|
4
|
+
* Fold the live velocity term into a transient `--motion-weight` boost on the
|
|
5
|
+
* driving element, and mirror the term onto `--flex-vel` (the non-inheriting live
|
|
6
|
+
* channel). Call it at an EXISTING `--stretch` write-site with the morphing element
|
|
7
|
+
* + the saturating velocity term `useLiquidFlex` already computed.
|
|
8
|
+
*
|
|
9
|
+
* @param el the driving element (the same element the cap getter reads weight off)
|
|
10
|
+
* @param flexVel the saturating velocity term `tanh(|ṫ|·k) ∈ [0,1]` (the `--flex-vel` value)
|
|
11
|
+
*/
|
|
12
|
+
export declare function writeVelocityWeight(el: HTMLElement | null | undefined, flexVel: number): void;
|
|
13
|
+
/**
|
|
14
|
+
* The SITE-LOCAL effective-cap derivation (the spike-corrected mechanism). Reads
|
|
15
|
+
* BOTH the live `--motion-weight` AND the per-velocity boost off the consuming
|
|
16
|
+
* element, scaling the EXISTING cap token toward 1.0 as weight→0 and toward its
|
|
17
|
+
* shipped rest value at weight 0.618. NO `--*-stretch-k` coefficient cohort — the
|
|
18
|
+
* cap token IS the single source, read directly with a `(weight/0.618)` factor:
|
|
19
|
+
*
|
|
20
|
+
* `cap_eff = 1 + (cap_token − 1) · (weight + (1 − weight)·flexVel) / 0.618`
|
|
21
|
+
*
|
|
22
|
+
* so `cap_eff == cap_token` at rest weight 0.618 + zero velocity (the UNION fence,
|
|
23
|
+
* feel byte-identical) AND `cap_eff == 1.0` at weight 0 (the PRM/observer fence).
|
|
24
|
+
* The `(1 − weight)·flexVel` term lets a fast travel transiently deepen the cap
|
|
25
|
+
* even before the weight write has propagated (the morph-more-on-move read).
|
|
26
|
+
*
|
|
27
|
+
* @param el the consuming element (live `--motion-weight`/`--flex-vel`)
|
|
28
|
+
* @param capToken the resolved `--*-max-stretch` cap value (≥1; the shipped rest cap)
|
|
29
|
+
* @returns the effective cap to hand `useLiquidFlex` (≥1)
|
|
30
|
+
*/
|
|
31
|
+
export declare function effectiveCap(el: HTMLElement | null | undefined, capToken: number): number;
|
|
@@ -6,6 +6,8 @@ export * from "./useLiquidPress";
|
|
|
6
6
|
export * from "./useDragMorph";
|
|
7
7
|
export * from "./useLiquidReveal";
|
|
8
8
|
export * from "./useDockCtaReceive";
|
|
9
|
+
export * from "./useBloomUp";
|
|
10
|
+
export * from "./useCelebrationBurst";
|
|
9
11
|
export * from "./useNumericTransition";
|
|
10
12
|
export * from "./useAnimatedNumber";
|
|
11
13
|
export * from "./useAnimatedNumberMap";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** A glass-ui named-spring preset name. */
|
|
2
|
-
export type SpringPresetName = "smooth" | "snappy" | "bouncy" | "gentle" | "dock" | "press";
|
|
2
|
+
export type SpringPresetName = "smooth" | "snappy" | "bouncy" | "gentle" | "dock" | "press" | "timeline-head" | "timeline-fill" | "timeline-press";
|
|
3
3
|
/** One named-spring row: the analytic (response, dampingFraction) pair + its register doc. */
|
|
4
4
|
export interface SpringPresetRow {
|
|
5
5
|
/** The token suffix — `--spring-<name>` (CSS) and the `MOTION_CURVES` key. */
|
|
@@ -30,22 +30,21 @@ export interface SpringPresetRow {
|
|
|
30
30
|
* PRESS → press — the iOS interactive tap-press: sub-100ms answer, a tiny alive
|
|
31
31
|
* rebound. `useSpringPress` reads this row's (response, ζ).
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* ·
|
|
47
|
-
*
|
|
48
|
-
* sub-perceptual alive rebound (~+0.5%). `useSpringPress` defaults re-point onto it.
|
|
33
|
+
* BD.W-ANIM-IOS27-TUNE — the GLOBAL re-calibration toward the iOS-27
|
|
34
|
+
* weighty-gooey-inertial pole (USER law: "SMOOTH, CONTROLLED, INERTIA, AUDACIOUS;
|
|
35
|
+
* NO overly tight and springy; MORPH MORE on move"). ALL SIX rows are re-tuned in
|
|
36
|
+
* lockstep toward lower stiffness (longer `response` → inertia/weight) + higher
|
|
37
|
+
* through-body damping toward critically-damped-with-a-TOUCH-of-overshoot (kill the
|
|
38
|
+
* pointed flick) + longer settle (the flowing arrival) — WHILE keeping the perceptual
|
|
39
|
+
* arrival AUDACIOUS (t90 mid-clock for smooth/snappy/press; bouncy/dock arrive earlier
|
|
40
|
+
* via the overshoot carry = the FLOWING-mass read). There are NO byte-frozen KEEPS any
|
|
41
|
+
* more (the BC.W-SPRING-EASE surgical KEEP fence is RETIRED). The invariant fences:
|
|
42
|
+
* · every overshoot ∈ [0%,10%] — the "touch of overshoot" band; the OLD pointed
|
|
43
|
+
* bouncy 12.6% / dock 10.7% are RETIRED (>10% is the "too springy" defect).
|
|
44
|
+
* · every NON-gentle settle LENGTHENS vs the pre-BD baseline (the inertia floor);
|
|
45
|
+
* nothing gets faster (faster = the mechanical-snap defect).
|
|
46
|
+
* · t90 ∈ [50%,61%] of clock for smooth/snappy/press (the audacious-arrival floor).
|
|
47
|
+
* · gentle ζ stays EXACTLY 1.0 (the --ease-convergence alias depends on overshoot==0).
|
|
49
48
|
*/
|
|
50
49
|
export declare const SPRING_PRESETS: readonly SpringPresetRow[];
|
|
51
50
|
/** Lookup one preset row by name (used by `MOTION_CURVES` spring rows). */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { NumericAnimation, SpringProgress, SmoothProgress, Sequence, Timeline, ManualTimeline, RAFPlayback,
|
|
2
|
-
export type { Easing, TimingFunction, TimingFunctionNames, SpringProgressOptions, SpringFrameCallback, SpringSubscriber, SpringLinearStopsOptions, SpringTimingFunctionOptions, SmoothProgressOptions, NumericAnimationOptions, NumericFrameCallback, SequenceEntry, SequenceOptions, SequencePosition, TimelineOptions, NativeTimelineSpec, RAFPlaybackOptions, Tickable, FlipOptions, ElementMorphOptions, MorphRect, DragOptions, DragAxis, DragSubscriber, DecayOptions, DecaySample, StaggerFn, StaggerOptions, StaggerOrigin, AnimationEngine, AnimationOptions, AnimationFrame,
|
|
1
|
+
export { NumericAnimation, SpringProgress, SmoothProgress, Oscillator, Sequence, Timeline, ManualTimeline, RAFPlayback, KeyframesScrollTimeline, createNativeTimeline, flip, flipShared, ElementMorph, drag, drag2D, Draggable, decay, decayRest, reseatToSpring, probeVelocity, reducedMotionScale, waveformValue, warmEngine, stagger, springTimingFunction, springLinearStops, toEasing, resolveEasing, AnimationOptionError, UnknownEasingError, loadAnimationEngine, } from "@mkbabb/keyframes.js";
|
|
2
|
+
export type { Easing, TimingFunction, TimingFunctionNames, SpringProgressOptions, SpringFrameCallback, SpringSubscriber, SpringLinearStopsOptions, SpringTimingFunctionOptions, SmoothProgressOptions, NumericAnimationOptions, NumericFrameCallback, SequenceEntry, SequenceOptions, SequencePosition, TimelineOptions, NativeTimelineSpec, RAFPlaybackOptions, Tickable, FlipOptions, ElementMorphOptions, MorphRect, DragOptions, DragAxis, DragSubscriber, DecayOptions, DecaySample, StaggerFn, StaggerOptions, StaggerOrigin, AnimationEngine, AnimationOptions, AnimationFrame, InputAnimationOptions, ResolvedKeyframes, Vars, } from "@mkbabb/keyframes.js";
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
import { type SpringPresetName } from "./springPresets";
|
|
3
|
+
/** The bloom spring register — `snappy` (the quick shared-element default) or `bouncy`
|
|
4
|
+
* (the emphatic large-surface bloom). A subset of the named `SPRING_PRESETS` rows,
|
|
5
|
+
* matching `useLiquidReveal`/`useDockCtaReceive` so the bloom family reads as ONE. */
|
|
6
|
+
export type BloomUpPreset = Extract<SpringPresetName, "snappy" | "bouncy">;
|
|
7
|
+
export interface UseBloomUpOptions {
|
|
8
|
+
/** The spring register (default `snappy`). */
|
|
9
|
+
preset?: BloomUpPreset;
|
|
10
|
+
/** The starting filter-blur radius in px on the destination (the decongest start). Default 4. */
|
|
11
|
+
blur?: number;
|
|
12
|
+
/**
|
|
13
|
+
* The dominant source hue the FIELD warms toward — a complete `<color>` (an
|
|
14
|
+
* `oklch()`/`#hex`/named). When omitted, the leaf reads `--glass-ambient-hue` off
|
|
15
|
+
* the SOURCE element's computed style (the BE.W-AMBIENT-TINT convergence — the
|
|
16
|
+
* album card carries its own dominant hue). A `transparent`/empty read is the
|
|
17
|
+
* neutral no-op (the field tints nothing — a gray source warms nothing).
|
|
18
|
+
*/
|
|
19
|
+
fieldHue?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The FIELD CONTAINER the 4th color channel writes onto — the destination's
|
|
22
|
+
* ancestor field (the DockStage / now-playing field). When omitted, the leaf walks
|
|
23
|
+
* up from `destRef` to the nearest ancestor carrying `[data-glass-field]` (the
|
|
24
|
+
* field-marker contract), falling back to `destRef.parentElement`. The hue + the
|
|
25
|
+
* ramped strength are written HERE, never on the blooming surface (the
|
|
26
|
+
* compositor-only floor de-risk).
|
|
27
|
+
*/
|
|
28
|
+
field?: Ref<HTMLElement | null>;
|
|
29
|
+
/**
|
|
30
|
+
* The bounded ambient-strength target the field ramps to (a percentage, `0..8`).
|
|
31
|
+
* Default 8 (the AMBIENT-TINT ceiling — the loudest sub-perceptual warm). Clamped
|
|
32
|
+
* to `[0, 8]` so a consumer can never flood the field past the warm-cream identity.
|
|
33
|
+
*/
|
|
34
|
+
fieldStrength?: number;
|
|
35
|
+
/** Honor `prefers-reduced-motion: reduce` (snap surface to settled, land hue instantly). Default true. */
|
|
36
|
+
respectReducedMotion?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Auto-prime the destination the moment it mounts — seat it at the collapsed/hidden
|
|
39
|
+
* initial state (opacity 0 + the source-FLIP transform) BEFORE the browser paints,
|
|
40
|
+
* so a freshly-`v-if`-mounted dest never flashes its full-size frame before `bloom()`
|
|
41
|
+
* fires. A `watch(dest, …, { flush: "pre" })` runs in the SAME tick the element
|
|
42
|
+
* mounts. Default `true` — the no-flash floor; pass `false` to opt a consumer that
|
|
43
|
+
* owns its own initial-state seating out. `prime()` is the explicit imperative twin.
|
|
44
|
+
*/
|
|
45
|
+
autoPrime?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Fired ONCE when the bloom has settled (the hand-off — the consumer marks the
|
|
48
|
+
* bloom complete: hides the source, owns the destination). Fires on the animation
|
|
49
|
+
* settle AND on the PRM/no-rAF snap (the bloom always completes).
|
|
50
|
+
*/
|
|
51
|
+
onBloomed?: () => void;
|
|
52
|
+
}
|
|
53
|
+
export interface UseBloomUpReturn {
|
|
54
|
+
/**
|
|
55
|
+
* Bloom the destination up from the source's rect. Idempotent per call — measures
|
|
56
|
+
* the source + destination rects fresh, drives the FLIP inversion spring 1→0 on the
|
|
57
|
+
* surface AND ramps the field hue 0→target. A no-op if the destination element is
|
|
58
|
+
* not yet mounted (no `onBloomed`).
|
|
59
|
+
*/
|
|
60
|
+
bloom: () => void;
|
|
61
|
+
/**
|
|
62
|
+
* Clear the bloom transform (restore the destination to its settled identity,
|
|
63
|
+
* opacity 1) AND release the field hue (strength → 0). The abort/reset seam —
|
|
64
|
+
* cancels any in-flight bloom; does NOT fire `onBloomed`.
|
|
65
|
+
*/
|
|
66
|
+
reset: () => void;
|
|
67
|
+
/**
|
|
68
|
+
* Seat the destination at its collapsed/hidden initial state (opacity 0 + the
|
|
69
|
+
* source-FLIP transform) WITHOUT animating — so a freshly-mounted dest shows
|
|
70
|
+
* NOTHING until `bloom()` fires (the no-mount-flash seam). Idempotent; a no-op if
|
|
71
|
+
* the dest is not yet mounted. The auto-prime (`autoPrime`, default on) calls this
|
|
72
|
+
* for the consumer; `prime()` is the explicit imperative twin.
|
|
73
|
+
*/
|
|
74
|
+
prime: () => void;
|
|
75
|
+
/** The reactive bloom state — `true` while a bloom is in flight, `false` at rest. */
|
|
76
|
+
blooming: Readonly<Ref<boolean>>;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The iOS-27 shared-element bloom with the 4th color channel. Composes the kf
|
|
80
|
+
* `ElementMorph` + `springTimingFunction` into the three-channel geometry bloom on the
|
|
81
|
+
* DESTINATION surface (scale+fade+blur-decongest from the SOURCE's origin) PLUS a 4th
|
|
82
|
+
* color channel on the destination FIELD (the field warms to the source's hue on the
|
|
83
|
+
* SAME spring curve). Compositor-only on the surface + Safari-safe + PRM-snap. See the
|
|
84
|
+
* module header for the REUSE + the FLIP inversion + the channel split.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* const { bloom, reset, blooming } = useBloomUp(albumCardRef, fullscreenRef, {
|
|
89
|
+
* preset: "bouncy",
|
|
90
|
+
* fieldHue: albumDominantHue, // or omit to read --glass-ambient-hue off the card
|
|
91
|
+
* field: nowPlayingFieldRef,
|
|
92
|
+
* onBloomed: () => (fullscreenOpen.value = true),
|
|
93
|
+
* })
|
|
94
|
+
* function onTapAlbum() { bloom() }
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export declare function useBloomUp(source: Ref<HTMLElement | null>, dest: Ref<HTMLElement | null>, options?: UseBloomUpOptions): UseBloomUpReturn;
|