@mkbabb/glass-ui 4.0.1 → 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-CW7a0m8M.js → CardAction-DlVP2evz.js} +72 -53
- package/dist/{CommandShortcut-DvZNQ_HF.js → CommandShortcut-By-VQcLO.js} +25 -14
- package/dist/{ConfiguratorRow-BR4l-ixA.js → ConfiguratorRow-YMXdINHx.js} +14 -14
- package/dist/ContextMenuContent-CMWn6huB.js +90 -0
- package/dist/{ContextMenuSubContent-xol4sD2q.js → ContextMenuSubContent-DvwWCUc0.js} +16 -16
- package/dist/{DataTable-CuKwF7wr.js → DataTable-C4tG3eIJ.js} +4 -4
- package/dist/DialogContent-D8U9ZfWS.js +121 -0
- package/dist/DialogFooter-DoLy0ewI.js +80 -0
- package/dist/DialogScrollContent-BMekN7gq.js +93 -0
- package/dist/{FadingScroll-DI6hQhT9.js → FadingScroll-P8B30rAD.js} +1 -1
- package/dist/HoverCardContent-DAmGYglo.js +88 -0
- package/dist/{HoverPopover-CbqbNwgU.js → HoverPopover-DYpBOzzF.js} +1 -1
- package/dist/{IconChip-BTD-nay5.js → IconChip-CQa7XZYc.js} +7 -5
- package/dist/{IconTooltip-Bl8gFZ8d.js → IconTooltip-_df8M3xm.js} +1 -1
- package/dist/Input-CyU4_hIC.js +57 -0
- package/dist/{MetricBadge-RHdBP72w.js → MetricBadge-DQt_dGah.js} +1 -1
- package/dist/{Notification-VUwexFUf.js → Notification-BlSPJhtZ.js} +4 -4
- package/dist/NumberFieldContent-Z3VxGu_6.js +140 -0
- 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-DctG61iZ.js → Progress-C9SsdwIZ.js} +1 -1
- package/dist/{ScrollingText-yOpBzFYq.js → ScrollingText-DY3W1Jfh.js} +2 -2
- package/dist/SelectScrollDownButton-3mFHX_R-.js +260 -0
- package/dist/{SelectSeparator-DXswVdRz.js → SelectSeparator-CNRGG7Ew.js} +1 -1
- package/dist/Separator-Cf9-JFgi.js +44 -0
- package/dist/Switch-uf-UKPA2.js +49 -0
- package/dist/{Toaster-Bw4xR8xV.js → Toaster-ozrsR4mP.js} +2 -2
- package/dist/{ToggleGroupItem-pEM9vIhs.js → ToggleGroupItem-BpzaVzNm.js} +6 -6
- package/dist/TooltipProvider-QQVM_80r.js +109 -0
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +16 -32
- package/dist/api/types-extra.d.ts +33 -0
- package/dist/api.js +2 -2
- package/dist/aurora.js +629 -269
- package/dist/badge-Bt14yURi.js +72 -0
- package/dist/badge.js +1 -1
- package/dist/border-progress.js +49 -57
- package/dist/button-D1W9PrzI.js +130 -0
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -3
- package/dist/card.js +1 -1
- package/dist/carousel.js +235 -106
- package/dist/chipVariants-BJQ0I2kB.js +18 -0
- package/dist/collapsible.js +1 -1
- package/dist/color-B9jZdhJX.js +116 -0
- package/dist/color.js +2 -2
- package/dist/command.js +1 -1
- 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/color.d.ts +13 -0
- package/dist/components/custom/aurora/composables/frameLoop.d.ts +9 -0
- package/dist/components/custom/aurora/composables/glSetup.d.ts +1 -1
- package/dist/components/custom/aurora/composables/runtime.d.ts +12 -0
- package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +12 -3
- package/dist/components/custom/aurora/composables/wgpuSetup.d.ts +8 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +47 -0
- package/dist/components/custom/aurora/constants/renderMode.d.ts +16 -8
- 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 -1
- package/dist/components/custom/aurora/index.d.ts +1 -1
- package/dist/components/custom/border-progress/composables/spectrum-walk.d.ts +25 -0
- package/dist/components/custom/border-progress/composables/useBorderSpectrum.d.ts +14 -18
- package/dist/components/custom/border-progress/index.d.ts +1 -1
- 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 +15 -12
- package/dist/components/custom/concentric/composables/concentricGLSetup.d.ts +12 -0
- package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +13 -0
- package/dist/components/custom/concentric/composables/levelField.d.ts +50 -0
- package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +7 -3
- package/dist/components/custom/concentric/composables/useConcentric.d.ts +3 -3
- package/dist/components/custom/concentric/constants.d.ts +69 -24
- 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/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/DockDropdownTrigger.vue.d.ts +4 -3
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +22 -0
- package/dist/components/custom/dock/DockPopoverTrigger.vue.d.ts +19 -0
- package/dist/components/custom/dock/DockStack.vue.d.ts +78 -0
- package/dist/components/custom/dock/GlassDock.vue.d.ts +21 -3
- package/dist/components/custom/dock/composables/dockMorphContext.d.ts +18 -32
- package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +78 -67
- package/dist/components/custom/dock/composables/index.d.ts +3 -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/useDockSearch.d.ts +85 -0
- package/dist/components/custom/dock/composables/useDockShellProps.d.ts +49 -0
- package/dist/components/custom/dock/constants.d.ts +32 -17
- package/dist/components/custom/dock/index.d.ts +8 -2
- package/dist/components/custom/dot-flow-field/DotFlowField.vue.d.ts +15 -11
- package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +69 -6
- 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 +50 -9
- package/dist/components/custom/dot-flow-field/composables/useDotFlowField.d.ts +6 -5
- package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +23 -9
- package/dist/components/custom/dot-flow-field/constants.d.ts +92 -20
- package/dist/components/custom/dot-flow-field/index.d.ts +2 -2
- 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 +31 -18
- package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +2 -1
- 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 +61 -0
- package/dist/components/custom/dot-matrix/composables/useDotMatrix.d.ts +34 -0
- package/dist/components/custom/dot-matrix/composables/useDotSphere.d.ts +34 -0
- package/dist/components/custom/dot-matrix/constants.d.ts +72 -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/EasingPicker.vue.d.ts +2 -2
- package/dist/components/custom/easing/composables/useEasingPicker.d.ts +5 -0
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +11 -0
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +44 -47
- package/dist/components/custom/fourier-field/composables/fourierFieldGLSetup.d.ts +24 -0
- package/dist/components/custom/fourier-field/composables/fourierFieldWGPUSetup.d.ts +31 -0
- package/dist/components/custom/fourier-field/composables/uniformBridgeWGPU.d.ts +56 -0
- package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +61 -37
- package/dist/components/custom/fourier-field/constants.d.ts +114 -4
- 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/goo-blob/GooBlob.vue.d.ts +9 -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/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 -1
- package/dist/components/custom/goo-blob/types.d.ts +86 -1
- 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 +79 -0
- package/dist/components/custom/goo-dot-matrix/composables/uniformBridgeWGPU.d.ts +45 -0
- package/dist/components/custom/goo-dot-matrix/composables/useGooDotMatrix.d.ts +31 -0
- package/dist/components/custom/goo-dot-matrix/constants.d.ts +115 -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 +13 -0
- package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.wgsl.d.ts +4 -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/labeled-field/LabeledField.vue.d.ts +21 -2
- package/dist/components/custom/metric-stack/MetricRow.vue.d.ts +15 -0
- 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-backdrop/PaperBackdrop.vue.d.ts +18 -0
- package/dist/components/custom/paper-grid/PaperGrid.vue.d.ts +42 -0
- package/dist/components/custom/paper-grid/composables/paperGrid.d.ts +105 -0
- package/dist/components/custom/paper-grid/composables/paperGridGLSetup.d.ts +18 -0
- package/dist/components/custom/paper-grid/composables/paperGridWGPUSetup.d.ts +21 -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 +95 -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/chipVariants.d.ts +39 -0
- package/dist/components/custom/selectable-chip/index.d.ts +2 -0
- package/dist/components/custom/selectable-chip/selectableChipVariants.d.ts +15 -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 +8 -6
- package/dist/components/custom/tabs/constants.d.ts +28 -2
- 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 +32 -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/useControlSize.d.ts +46 -0
- 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/button/index.d.ts +1 -1
- package/dist/components/ui/card/Card.vue.d.ts +46 -1
- package/dist/components/ui/card/ScrollCard.vue.d.ts +1 -1
- package/dist/components/ui/card/index.d.ts +1 -1
- package/dist/components/ui/carousel/CarouselContent.vue.d.ts +2 -4
- package/dist/components/ui/carousel/CarouselNext.vue.d.ts +1 -1
- package/dist/components/ui/carousel/CarouselPrevious.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/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/dropdown-menu/DropdownMenuContent.vue.d.ts +4 -0
- package/dist/components/ui/hover-card/HoverCardContent.vue.d.ts +3 -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/select/SelectContent.vue.d.ts +12 -0
- package/dist/components/ui/slider/Slider.vue.d.ts +9 -0
- package/dist/components/ui/switch/Switch.vue.d.ts +2 -0
- package/dist/components/ui/textarea/Textarea.vue.d.ts +3 -0
- 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/dom/index.d.ts +1 -0
- package/dist/composables/dom/useDragVelocity.d.ts +46 -0
- package/dist/composables/glass/useVizChoreography.d.ts +123 -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 +105 -2
- package/dist/composables/glass/webgl/shaders/flow.wgsl.d.ts +1 -0
- package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +40 -2
- package/dist/composables/glass/webgpu/index.d.ts +2 -1
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +65 -7
- package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +50 -2
- package/dist/composables/glass/webgpu/webgpuDevice.d.ts +42 -0
- package/dist/composables/motion/core/index.d.ts +7 -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/scrollReader.d.ts +25 -0
- package/dist/composables/motion/springPresets.d.ts +19 -1
- 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/useCharStagger.d.ts +44 -0
- package/dist/composables/motion/useDockCtaReceive.d.ts +29 -22
- 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/useScrollChrome.d.ts +58 -0
- package/dist/composables/motion/useScrollPin.d.ts +49 -0
- package/dist/composables/motion/useScrollScene.d.ts +67 -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.js +552 -309
- package/dist/configurator.js +2 -2
- package/dist/confirm-dialog.js +62 -47
- package/dist/constellation.js +635 -235
- 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.d.ts +1 -0
- package/dist/deck.js +105 -0
- package/dist/dialog.js +4 -3
- package/dist/dock.js +1320 -631
- package/dist/dockContext-gFVS2gMg.js +18 -0
- package/dist/dom.js +7 -6
- package/dist/dot-flow-field.js +1268 -387
- package/dist/dot-matrix.d.ts +1 -0
- package/dist/dot-matrix.js +774 -0
- package/dist/dotMatrixField-CRO0ZFk4.js +48 -0
- package/dist/drawer.js +106 -96
- package/dist/{dropdown-menu-CofSZuk8.js → dropdown-menu-CCfcCQ68.js} +83 -79
- package/dist/dropdown-menu.js +1 -1
- package/dist/easing.js +188 -176
- package/dist/expandable-container.js +43 -21
- package/dist/fading-scroll.js +1 -1
- package/dist/flow.glsl-DqEGRpl4.js +4 -0
- package/dist/forms.js +64 -62
- package/dist/fourier-field.js +1069 -178
- 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 +164 -119
- package/dist/goo-blob.js +175 -1230
- package/dist/goo-dot-matrix.d.ts +1 -0
- package/dist/goo-dot-matrix.js +811 -0
- 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 +5 -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 +70 -60
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +1 -1
- package/dist/metric-stack.js +12 -3
- package/dist/motion-core.js +59 -34
- package/dist/motion-curves.js +30 -14
- package/dist/motion.js +231 -96
- 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 +761 -0
- package/dist/paperGrid-CXCSMbZ1.js +191 -0
- package/dist/popover.js +1 -1
- package/dist/{presets-BW2b-fr1.js → presets-QvYgnFIZ.js} +14 -13
- package/dist/{procedural-color.glsl-CIFsJhwI.js → procedural-color.wgsl-C1Y5PkM6.js} +2 -2
- package/dist/progress.js +1 -1
- package/dist/pulse.js +2 -2
- package/dist/reactive.js +2 -2
- package/dist/{useCanvas2D-B8w_E3Rr.js → resolveCanvasColor-DsSJk06I.js} +16 -6
- package/dist/scrollReader-rc3Ns_NM.js +42 -0
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +162 -306
- package/dist/select.js +3 -3
- package/dist/selectable-chip.d.ts +1 -0
- package/dist/selectable-chip.js +48 -0
- package/dist/separator.js +1 -1
- package/dist/{sheet-tZMg0E0w.js → sheet-DUCIoOe0.js} +4 -4
- package/dist/sheet.js +1 -1
- package/dist/sidebar.js +216 -114
- package/dist/slider-CcICPe3u.js +149 -0
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +3 -3
- package/dist/spectrum-walk-cBNSx_zm.js +33 -0
- package/dist/springPresets-DfoQ6XRY.js +64 -0
- package/dist/stacked-icons.js +54 -39
- package/dist/styles/animations.css +13 -3
- package/dist/styles/cards.css +271 -2
- package/dist/styles/completion-seal.css +131 -0
- package/dist/styles/components.css +1 -4
- package/dist/styles/configurator.css +221 -1
- package/dist/styles/critical-partition.mjs +66 -11
- package/dist/styles/deferred.css +4 -0
- package/dist/styles/dock/adaptive-legibility.css +119 -0
- package/dist/styles/dock/cta-seat.css +87 -0
- package/dist/styles/dock/density.css +167 -6
- package/dist/styles/dock/fission-bridge.css +552 -0
- package/dist/styles/dock/layers.css +90 -78
- package/dist/styles/dock/morph-bridge.css +67 -18
- package/dist/styles/dock/morph.css +57 -118
- package/dist/styles/dock/overflow.css +12 -0
- package/dist/styles/dock/search.css +68 -0
- package/dist/styles/dock/shape.css +250 -0
- package/dist/styles/dock/shell.css +24 -8
- package/dist/styles/dock/stack-rail.css +352 -0
- package/dist/styles/dock-controls/dark-mode-toggle.css +17 -4
- package/dist/styles/dock-controls/icon-button.css +46 -0
- package/dist/styles/dock-controls/triggers.css +23 -1
- package/dist/styles/dock-controls.css +18 -0
- package/dist/styles/dock.css +27 -2
- package/dist/styles/drawer.css +166 -0
- package/dist/styles/glass/accent-tone.css +66 -0
- package/dist/styles/glass/control-surfaces.css +167 -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/ladder.css +67 -17
- 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 +31 -9
- package/dist/styles/glass/surfaces.css +81 -150
- package/dist/styles/glass.css +21 -0
- package/dist/styles/icon-chip.css +45 -0
- package/dist/styles/index.css +26 -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/scroll-chrome.css +123 -0
- package/dist/styles/scroll-driven.css +38 -0
- package/dist/styles/segmented-tabs.css +110 -40
- package/dist/styles/select.css +151 -0
- package/dist/styles/theme/bridges.css +22 -0
- package/dist/styles/theme/radius.css +18 -1
- package/dist/styles/tokens/color-radius.css +14 -4
- package/dist/styles/tokens/dark-arm.css +94 -12
- package/dist/styles/tokens/glass-deep.css +33 -4
- package/dist/styles/tokens/glass-fx.css +122 -1
- package/dist/styles/tokens/glass.css +226 -34
- package/dist/styles/tokens/light-dark.css +3 -3
- package/dist/styles/tokens/offsets.css +27 -0
- package/dist/styles/tokens/property-regs.css +277 -0
- package/dist/styles/tokens/scale-paper.css +86 -30
- package/dist/styles/tokens/scheme-motion.css +106 -133
- 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/sizing-config.css +110 -0
- package/dist/styles/tokens/sizing.css +55 -104
- package/dist/styles/tokens.css +14 -2
- package/dist/styles/typography/semantic.css +18 -5
- package/dist/styles/utilities/a11y-overrides.css +20 -5
- package/dist/styles/utilities/base-misc.css +52 -0
- package/dist/styles/utilities/btn.css +84 -3
- package/dist/styles/utilities/components.css +31 -6
- package/dist/styles/utilities/metal.css +26 -0
- package/dist/switch.js +1 -1
- package/dist/tabs.js +199 -182
- 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 +2 -2
- package/dist/uniformBridgeWGPU-BCse1SHU.js +1268 -0
- package/dist/{useAnimatedNumber-BfUq2bUM.js → useAnimatedNumber-BntskVdQ.js} +1 -1
- package/dist/{useConfiguratorState-DNlOh6c8.js → useConfiguratorState-22BcULzF.js} +41 -38
- package/dist/useControlSize-DAZ062x7.js +9 -0
- package/dist/useDockCtaReceive-DX7RDb6_.js +88 -0
- package/dist/{useDragMorph-DgxnsVJz.js → useDragMorph-DGLSewwB.js} +4 -4
- package/dist/useDragVelocity-CjcfX3dA.js +57 -0
- package/dist/useFuzzySearch-0fTYOhS4.js +177 -0
- package/dist/useGooMorph-Cs13NgYL.js +104 -0
- package/dist/useGpuSubstrate-Ceet70xq.js +347 -0
- package/dist/useHaptic-CPz5BT9I.js +134 -0
- package/dist/{useLiquidFlex-mZPMiNXh.js → useLiquidFlex-Cc6PjVJD.js} +8 -3
- package/dist/useLiquidPress-CtOQ8Z0_.js +43 -0
- package/dist/useMorphField-ogBM7ubT.js +141 -0
- package/dist/usePointerVelocityField-BrkqZFhj.js +91 -0
- package/dist/useScrollChrome-JuImi1DM.js +258 -0
- package/dist/{useSpringMount-q1amq1SJ.js → useSpringMount-DFxtzmkR.js} +1 -1
- package/dist/useSpringPress-VM9RgVq3.js +36 -0
- package/dist/{useSurfaceAxis-g0NloYEF.js → useSurfaceAxis-Ci7Dnaw2.js} +1 -1
- package/dist/{useTouchGate-CBZTD4SD.js → useTouchGate-B1Lf9XqN.js} +1 -1
- package/dist/{vendor-CKmzio-i.js → vendor-B2qOlYY3.js} +24 -11
- package/dist/virtual.d.ts +1 -0
- package/dist/virtual.js +225 -0
- package/dist/watercolor-dot.js +107 -74
- package/dist/writeVelocityWeight-Bh83xZfs.js +19 -0
- package/package.json +140 -9
- package/src/styles/animations.css +13 -3
- package/src/styles/cards.css +271 -2
- package/src/styles/completion-seal.css +131 -0
- package/src/styles/configurator.css +221 -1
- package/src/styles/critical-partition.mjs +66 -11
- package/src/styles/dock/adaptive-legibility.css +119 -0
- package/src/styles/dock/cta-seat.css +87 -0
- package/src/styles/dock/density.css +167 -6
- package/src/styles/dock/fission-bridge.css +552 -0
- package/src/styles/dock/layers.css +90 -78
- package/src/styles/dock/morph-bridge.css +67 -18
- package/src/styles/dock/morph.css +57 -118
- package/src/styles/dock/overflow.css +12 -0
- package/src/styles/dock/search.css +68 -0
- package/src/styles/dock/shape.css +250 -0
- package/src/styles/dock/shell.css +24 -8
- package/src/styles/dock/stack-rail.css +352 -0
- package/src/styles/dock-controls/dark-mode-toggle.css +17 -4
- package/src/styles/dock-controls/icon-button.css +46 -0
- package/src/styles/dock-controls/triggers.css +23 -1
- package/src/styles/dock-controls.css +18 -0
- package/src/styles/dock.css +27 -2
- package/src/styles/drawer.css +164 -0
- package/src/styles/glass/accent-tone.css +66 -0
- package/src/styles/glass/control-surfaces.css +167 -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/ladder.css +67 -17
- 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 +31 -9
- package/src/styles/glass/surfaces.css +81 -150
- package/src/styles/glass.css +21 -0
- package/src/styles/icon-chip.css +45 -0
- package/src/styles/index.css +26 -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/scroll-chrome.css +123 -0
- package/src/styles/scroll-driven.css +38 -0
- package/src/styles/segmented-tabs.css +110 -36
- package/src/styles/select.css +151 -0
- package/src/styles/theme/bridges.css +22 -0
- package/src/styles/theme/radius.css +18 -1
- package/src/styles/tokens/color-radius.css +14 -4
- package/src/styles/tokens/dark-arm.css +94 -12
- package/src/styles/tokens/glass-deep.css +33 -4
- package/src/styles/tokens/glass-fx.css +122 -1
- package/src/styles/tokens/glass.css +226 -34
- package/src/styles/tokens/light-dark.css +3 -3
- package/src/styles/tokens/offsets.css +27 -0
- package/src/styles/tokens/property-regs.css +277 -0
- package/src/styles/tokens/scale-paper.css +86 -30
- package/src/styles/tokens/scheme-motion.css +106 -133
- 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/sizing-config.css +110 -0
- package/src/styles/tokens/sizing.css +55 -104
- package/src/styles/tokens.css +14 -2
- package/src/styles/typography/semantic.css +18 -5
- package/src/styles/utilities/a11y-overrides.css +20 -5
- package/src/styles/utilities/base-misc.css +52 -0
- package/src/styles/utilities/btn.css +84 -3
- package/src/styles/utilities/components.css +31 -6
- package/src/styles/utilities/metal.css +26 -0
- package/dist/ContextMenuContent-uWnVxDab.js +0 -85
- package/dist/DialogContent-DcKK8k9i.js +0 -103
- package/dist/DialogFooter-BZNX5aVr.js +0 -165
- package/dist/HoverCardContent-b2uaAMRR.js +0 -83
- package/dist/Input-h9v5LeXf.js +0 -55
- package/dist/NumberFieldContent-Cq7EzX-U.js +0 -138
- package/dist/PaperBackdrop-Vf3tlpvd.js +0 -31
- package/dist/SelectScrollDownButton-CrA8F0iV.js +0 -252
- package/dist/Separator-pKF0oA4M.js +0 -37
- package/dist/Switch-CwYNf8bo.js +0 -47
- package/dist/TooltipProvider-rzvnXz60.js +0 -104
- package/dist/badge-D9XWW4GT.js +0 -53
- package/dist/button-DYCUa-tH.js +0 -126
- package/dist/color-DweYl7pE.js +0 -86
- package/dist/components/custom/concentric/composables/ringField.d.ts +0 -44
- 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/createCanvasLifecycle-CHD5XrDW.js +0 -82
- package/dist/dockContext-BNfyPLe9.js +0 -17
- package/dist/procedural-color.wgsl-CToRHugY.js +0 -224
- package/dist/resolveCanvasColor-CUyHr5Uu.js +0 -11
- package/dist/slider-DVb4HXU-.js +0 -142
- package/dist/springPresets-CFQGQfdl.js +0 -40
- package/dist/styles/dock/rail-extend.css +0 -397
- package/dist/useLiquidPress-kfb4KX79.js +0 -39
- package/dist/usePointerVelocityField-JbRd5CrM.js +0 -137
- package/dist/useRAFLoop-UYa4zoiN.js +0 -109
- package/dist/useSpringPress-BsqPr7FJ.js +0 -34
- package/src/styles/dock/rail-extend.css +0 -397
- /package/dist/{CollapsibleContent-68dEXIAl.js → CollapsibleContent-D7UNsXQr.js} +0 -0
- /package/dist/{InstrumentChassis-Bx0F_q5g.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-DwwjicPY.js → SelectGroup-Dcczq44n.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-C1je1s0u.js → _plugin-vue_export-helper-gLzyemvl.js} +0 -0
- /package/dist/{compile-CQEFRTmx.js → compile-INR_tPk_.js} +0 -0
- /package/dist/{constants-BPOqYJAm.js → constants-BWj7DkMn.js} +0 -0
- /package/dist/{createContext-CpBNTRMI.js → createContext-Cd23P9j0.js} +0 -0
- /package/dist/{math-BINYmg5z.js → math-5RcIgCB4.js} +0 -0
- /package/dist/{menuItemVariants-D8VNHq22.js → menuItemVariants-DAXquKja.js} +0 -0
- /package/dist/{prng-Za0Rmgag.js → prng-B5tIXTtj.js} +0 -0
- /package/dist/{useGlobalDark-C28t0VWJ.js → useGlobalDark-B4HO9LXG.js} +0 -0
- /package/dist/{useIntersectionPause-Bj4sPkMh.js → useIntersectionPause-DO8Vl4gs.js} +0 -0
- /package/dist/{useInterval-CvK1mL92.js → useInterval-BVUI-sez.js} +0 -0
- /package/dist/{useKeyboardShortcuts-BXWXOZ-9.js → useKeyboardShortcuts-BEut54Tk.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-D7bYU2RK.js → useScrollProgress-A0M6qRl7.js} +0 -0
- /package/dist/{useSortable-DHjtZSEd.js → useSortable-DQV_UNDw.js} +0 -0
- /package/dist/{useTextHighlight-CWEi25hf.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-Czsb7zQC.js → vReveal-CT1KtwZA.js} +0 -0
- /package/dist/{vSpecular-CQFmLNzA.js → vSpecular-EX7loENl.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;
|
|
@@ -41,5 +134,15 @@ export interface CanvasLifecycleHandle {
|
|
|
41
134
|
readonly disposed: boolean;
|
|
42
135
|
readonly running: boolean;
|
|
43
136
|
readonly reducedMotion: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* BC.W-SAFARI-WEBGL — the circuit-breaker has tripped: the surface lost-and-restored
|
|
139
|
+
* its context more than N times within T ms (a real eviction storm), so the lifecycle
|
|
140
|
+
* is HOLDING the parked state without re-arming (no throw). Resets once the loss window
|
|
141
|
+
* passes quiet; a healthy single loss never trips it.
|
|
142
|
+
*/
|
|
143
|
+
readonly contextHeld: boolean;
|
|
44
144
|
}
|
|
145
|
+
export declare const N_RESTORE_STORM = 3;
|
|
146
|
+
export declare const T_RESTORE_STORM_MS = 2000;
|
|
147
|
+
export declare const RESTORE_DEBOUNCE_MS = 100;
|
|
45
148
|
export declare function createCanvasLifecycle(options: CanvasLifecycleOptions): CanvasLifecycleHandle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CURL_FBM_WGSL = "\nconst CURL_EPS: f32 = 0.012;\n\n// \u2207\u00D7\u03C8 in 2D \u2014 the divergence-free flow direction. Central finite differences of the\n// scalar potential give the partials; the cross-pairing (\u2202y, \u2212\u2202x) is the 2D curl.\nfn curlFBM(p: vec2f) -> vec2f {\n let dx = potentialFBM(p + vec2f(CURL_EPS, 0.0)) - potentialFBM(p - vec2f(CURL_EPS, 0.0));\n let dy = potentialFBM(p + vec2f(0.0, CURL_EPS)) - potentialFBM(p - vec2f(0.0, CURL_EPS));\n // \u03C8-gradient is (dx, dy)/(2\u00B7eps); the curl rotates it 90\u00B0: (\u2202\u03C8/\u2202y, \u2212\u2202\u03C8/\u2202x).\n let g = vec2f(dx, dy) / (2.0 * CURL_EPS);\n return vec2f(g.y, -g.x);\n}\n";
|
|
@@ -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
|
-
export { createWebGPUCanvas, supportsWebGPU, type WebGPUCanvasFrame, type WebGPUCanvasHandle, type WebGPUCanvasOptions, type WebGPUSuspendReason, } from "./useWebGPUCanvas";
|
|
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. */
|
|
@@ -24,20 +52,46 @@ export interface GpuSubstrateOptions {
|
|
|
24
52
|
contextAttrs?: WebGLCanvasOptions["contextAttrs"];
|
|
25
53
|
/** Surface a device-init / validation failure (the WebGPU path). */
|
|
26
54
|
onInitError?: WebGPUCanvasOptions["onInitError"];
|
|
55
|
+
/**
|
|
56
|
+
* Notified when the picker FALLS from WebGPU to the WebGL2 net (the invisible
|
|
57
|
+
* insurance fired). The user never sees a "downgrade" — this is a diagnostic hook
|
|
58
|
+
* (e.g. record the tier-readout for the substrate DELTA), NOT an error. The error
|
|
59
|
+
* (if any) that triggered the fall is passed for telemetry.
|
|
60
|
+
*/
|
|
61
|
+
onBackendFallback?: (info: {
|
|
62
|
+
from: "webgpu";
|
|
63
|
+
to: "webgl2";
|
|
64
|
+
error: unknown;
|
|
65
|
+
}) => void;
|
|
27
66
|
}
|
|
28
67
|
/**
|
|
29
68
|
* The uniform substrate handle. A viz consumer wires its lifecycle (offscreen pause,
|
|
30
69
|
* pause/resume, pointer-`wake`, capture-`renderAt`) against THIS — identical across the
|
|
31
|
-
* WebGPU and WebGL2 backends. `armAsync` is the start seam (
|
|
32
|
-
*
|
|
70
|
+
* WebGPU and WebGL2 backends. `armAsync` is the start seam (it tries WebGPU then falls
|
|
71
|
+
* to the WebGL2 net on a no-adapter/init failure); `arm` is the synchronous twin (it
|
|
72
|
+
* arms the WebGL2 net immediately so a consumer that does not await still paints).
|
|
33
73
|
*/
|
|
34
74
|
export interface GpuSubstrateHandle {
|
|
35
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* The resolved backend. Starts at the OPTIMISTIC choice (`"webgpu"` where the
|
|
77
|
+
* platform allows it + a WGSL path is provided, else `"webgl2"`); after
|
|
78
|
+
* `armAsync()` it reflects the ACTUAL backend (it falls to `"webgl2"` if the
|
|
79
|
+
* WebGPU init failed — the no-adapter/device-lost-at-birth tail).
|
|
80
|
+
*/
|
|
36
81
|
readonly backend: GpuBackend;
|
|
37
|
-
/** Acquire the device/context + `setup` + arm the loop. Resolves once armed. */
|
|
82
|
+
/** Acquire the device/context + `setup` + arm the loop (try WebGPU, fall to the WebGL2 net). Resolves once armed. */
|
|
38
83
|
armAsync: () => Promise<void>;
|
|
39
|
-
/** Synchronous arm (the WebGL2
|
|
84
|
+
/** Synchronous arm (the WebGL2 net arms immediately; the WebGPU path is a no-op until the device resolves). */
|
|
40
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;
|
|
41
95
|
suspend: (reason?: "tab-hidden" | "off-screen" | "off-screen-io" | "manual") => void;
|
|
42
96
|
resume: (reason?: "tab-hidden" | "off-screen" | "off-screen-io" | "manual") => void;
|
|
43
97
|
wake: () => void;
|
|
@@ -47,8 +101,12 @@ export interface GpuSubstrateHandle {
|
|
|
47
101
|
}
|
|
48
102
|
/**
|
|
49
103
|
* Pick the backend + return the uniform handle. WebGPU-first (`supportsWebGPU()` AND a
|
|
50
|
-
* `setupWGPU` callback is provided); otherwise the WebGL2
|
|
51
|
-
*
|
|
104
|
+
* `setupWGPU` callback is provided); otherwise the WebGL2 net. The decision is NO
|
|
105
|
+
* LONGER committed at construction off a presence check — `armAsync()` ATTEMPTS the
|
|
106
|
+
* WebGPU init and FALLS to the WebGL2 net on ANY failure (no adapter, device reject,
|
|
107
|
+
* device-lost-at-birth, validation throw). The WebGL2 leaf is built lazily — only if
|
|
108
|
+
* the WebGPU path fails OR no WGSL path was provided — so a Baseline host pays no
|
|
109
|
+
* WebGL2-context cost.
|
|
52
110
|
*/
|
|
53
111
|
export declare function createGpuSubstrate(canvas: HTMLCanvasElement, options: GpuSubstrateOptions): GpuSubstrateHandle;
|
|
54
112
|
export type { WebGPUCanvasFrame, WebGLCanvasFrame };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { type BackingSize, type DprPolicy } from "../webgl/createCanvasLifecycle";
|
|
2
|
+
export type { BackingSize, DprPolicy } from "../webgl/createCanvasLifecycle";
|
|
3
|
+
export { WebGPUInitError } from "./webgpuDevice";
|
|
1
4
|
/**
|
|
2
5
|
* The ONE `navigator.gpu` capability probe (the single-bootstrap rule — mirrors
|
|
3
6
|
* `probeWebGL2Renderer`). SSR-safe (returns `false` with no `navigator`). The picker
|
|
@@ -6,6 +9,31 @@
|
|
|
6
9
|
* clause A reds a direct call).
|
|
7
10
|
*/
|
|
8
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;
|
|
9
37
|
export type WebGPUSuspendReason = "tab-hidden" | "off-screen" | "off-screen-io" | "manual";
|
|
10
38
|
/**
|
|
11
39
|
* The per-frame hooks a consumer's `setup(device, context, format)` returns. The
|
|
@@ -21,8 +49,13 @@ export interface WebGPUCanvasFrame {
|
|
|
21
49
|
frame: (timeSec: number) => void;
|
|
22
50
|
/** Demand-gate: is there live motion to render next frame? `false` → park. */
|
|
23
51
|
shouldContinue: () => boolean;
|
|
24
|
-
/**
|
|
25
|
-
|
|
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;
|
|
26
59
|
/** Frame time from elapsed seconds — the consumer owns frozen/reduced-motion. */
|
|
27
60
|
time?: (elapsedSec: number) => number;
|
|
28
61
|
/** Release per-instance GPU resources (pipelines/buffers/bind groups). Runs on dispose + before a restore re-setup. */
|
|
@@ -44,6 +77,19 @@ export interface WebGPUCanvasOptions {
|
|
|
44
77
|
* Default `true` for live mode, `false` for capture mode.
|
|
45
78
|
*/
|
|
46
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;
|
|
47
93
|
/**
|
|
48
94
|
* Build the WGSL pipeline + bind groups on the resolved device. Called on the
|
|
49
95
|
* async arm AND on every device-restore. Returns the per-frame hooks.
|
|
@@ -65,6 +111,8 @@ export interface WebGPUCanvasHandle {
|
|
|
65
111
|
* `armAsync` for the WebGPU path). Idempotent.
|
|
66
112
|
*/
|
|
67
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;
|
|
68
116
|
suspend: (reason?: WebGPUSuspendReason) => void;
|
|
69
117
|
resume: (reason?: WebGPUSuspendReason) => void;
|
|
70
118
|
/** Re-arm a parked loop (a setter that re-introduced motion calls this). */
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The recognizable WebGPU INIT-FAILURE signal (BC.W-WEBGPU-EVERYWHERE — the D8/D8'
|
|
3
|
+
* close). A no-adapter host (`requestAdapter()` returns null), a `requestDevice()`
|
|
4
|
+
* reject, or a device-lost-at-birth is NOT a contract violation — it is a recognized
|
|
5
|
+
* substrate decision the picker (`createGpuSubstrate`) catches to fall to the WebGL2
|
|
6
|
+
* net. `armAsync()` REJECTS with this typed signal (it does NOT `throw` an uncaught
|
|
7
|
+
* error to the page, and it does NOT fire the consumer's `onInitError` — that contract
|
|
8
|
+
* is reserved for a genuine POST-arm shader/OOM/validation violation). The picker's
|
|
9
|
+
* `try`/`catch` recognizes it; a consumer never sees a `no GPU adapter` PAGEERROR.
|
|
10
|
+
*/
|
|
11
|
+
export declare class WebGPUInitError extends Error {
|
|
12
|
+
readonly kind: "no-adapter" | "device-request" | "no-navigator-gpu" | "software-adapter" | "pipeline-validation" | "acquire-timeout";
|
|
13
|
+
constructor(kind: WebGPUInitError["kind"], message: string, cause?: unknown);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Detect a SOFTWARE / CPU WebGPU adapter (SwiftShader / llvmpipe / the Microsoft
|
|
17
|
+
* Basic Render Driver, or a UA-supplied `isFallbackAdapter` software fallback) — the
|
|
18
|
+
* WebGPU twin of `isSoftwareWebGLRenderer` (the `renderMode.ts` WebGL software-raster
|
|
19
|
+
* guard, BB.W-AURORA-SWRASTER).
|
|
20
|
+
*
|
|
21
|
+
* WHY this forces the WebGL2 net (the BC WebGPU re-home regression this closes): on a
|
|
22
|
+
* headless / GPU-blocklisted / CI host, `navigator.gpu` exists AND `requestAdapter()`
|
|
23
|
+
* SUCCEEDS — it returns a SOFTWARE adapter (SwiftShader). `requestDevice()` succeeds
|
|
24
|
+
* too, so the WebGPU init does NOT reject; `setup()` builds the render pipeline, but the
|
|
25
|
+
* software backend cannot validate/compile it (a metaball `RenderPipeline` is invalid
|
|
26
|
+
* under SwiftShader), so the per-frame `pass.setPipeline(...)` floods
|
|
27
|
+
* `[Invalid RenderPipeline] is invalid due to a previous error` — a never-ending console
|
|
28
|
+
* spew with no fallback (the loop keeps trying to draw the invalid pipeline). A
|
|
29
|
+
* software-rastered WebGPU surface is the same per-composite cost class the WebGL guard
|
|
30
|
+
* forbids. So a software adapter is treated as a recognized INIT FAILURE: the picker's
|
|
31
|
+
* `armAsync` try/catch falls to the WebGL2 net — exactly the silent W-AURORA-SWRASTER
|
|
32
|
+
* degrade, never the invalid-pipeline flood.
|
|
33
|
+
*
|
|
34
|
+
* The signal is the `isFallbackAdapter` spec flag (a UA sets it on a software fallback —
|
|
35
|
+
* the spec moved it from `GPUAdapter` to `GPUAdapterInfo`, so it is read off BOTH the
|
|
36
|
+
* adapter AND its `info` for cross-UA coverage) OR a software/SwiftShader/llvmpipe/
|
|
37
|
+
* basic-render string in `adapter.info` (vendor/architecture/description). On a real
|
|
38
|
+
* Metal/Vulkan/D3D adapter both are false/empty, so the WebGPU path is BYTE-UNTOUCHED
|
|
39
|
+
* (the cardinal ba-gestalt capture holds). The read is defensive (the fields are optional
|
|
40
|
+
* across UAs); a throwing read is morally "cannot prove software" → keep WebGPU.
|
|
41
|
+
*/
|
|
42
|
+
export declare function isSoftwareWebGPUAdapter(adapter: GPUAdapter): boolean;
|
|
@@ -10,4 +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";
|
|
16
|
+
export * from "../useCharStagger";
|
|
17
|
+
export * from "../useScrollTrigger";
|
|
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";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** The scroll source: an element with its own scroll-port, the Window, or null. */
|
|
2
|
+
export type ScrollSource = HTMLElement | Window | null;
|
|
3
|
+
export interface ScrollReader {
|
|
4
|
+
/** The resolved scroll-listener TARGET (the element, or `document` for the window). */
|
|
5
|
+
readonly target: EventTarget | null;
|
|
6
|
+
/** The current scroll position on the source (px) — `scrollTop` / `scrollY`. */
|
|
7
|
+
position: () => number;
|
|
8
|
+
/** The scrollable extent on the source (px) — `scrollHeight - clientHeight` / doc. */
|
|
9
|
+
extent: () => number;
|
|
10
|
+
/** Force a coalesced tick now (post-resize/layout re-read). */
|
|
11
|
+
schedule: () => void;
|
|
12
|
+
/** Detach the listener + cancel any in-flight frame. */
|
|
13
|
+
stop: () => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Attach ONE rAF-coalesced scroll listener to the source and call `onTick(reader)`
|
|
17
|
+
* once per scroll burst (a single in-flight frame). The `onTick` callback reads the
|
|
18
|
+
* live `position()`/`extent()` off the returned reader. The listener is the SAME
|
|
19
|
+
* `{ passive: true }` scroll listener `useScrollTracker` and `useFadingScroll`
|
|
20
|
+
* already used — factored to ONE site.
|
|
21
|
+
*
|
|
22
|
+
* @param source the scroll source (element / Window / null)
|
|
23
|
+
* @param onTick called once per coalesced scroll frame with the live reader
|
|
24
|
+
*/
|
|
25
|
+
export declare function createScrollReader(source: ScrollSource, onTick: (reader: ScrollReader) => void): ScrollReader;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** A glass-ui named-spring preset name. */
|
|
2
|
-
export type SpringPresetName = "smooth" | "snappy" | "bouncy" | "gentle" | "dock";
|
|
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. */
|
|
@@ -27,6 +27,24 @@ export interface SpringPresetRow {
|
|
|
27
27
|
* dialog/success entrances, the VT default. Largest overshoot.
|
|
28
28
|
* GENTLE → gentle — critically-damped slow settles (the patient end of the ladder).
|
|
29
29
|
* DOCK → dock — the dock expand/collapse morph AND everything inside it.
|
|
30
|
+
* PRESS → press — the iOS interactive tap-press: sub-100ms answer, a tiny alive
|
|
31
|
+
* rebound. `useSpringPress` reads this row's (response, ζ).
|
|
32
|
+
*
|
|
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).
|
|
30
48
|
*/
|
|
31
49
|
export declare const SPRING_PRESETS: readonly SpringPresetRow[];
|
|
32
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";
|