@mkbabb/glass-ui 4.0.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CardAction-CW7a0m8M.js → CardAction-8whJrLWt.js} +23 -8
- package/dist/{CommandShortcut-DvZNQ_HF.js → CommandShortcut-D3yxgHNn.js} +23 -12
- package/dist/{ConfiguratorRow-BR4l-ixA.js → ConfiguratorRow-CaP7U3ZA.js} +11 -11
- package/dist/ContextMenuContent-B3ZsheLV.js +90 -0
- package/dist/{ContextMenuSubContent-xol4sD2q.js → ContextMenuSubContent-DDRID3qC.js} +15 -15
- package/dist/{DataTable-CuKwF7wr.js → DataTable-Bc9kUtu_.js} +2 -2
- package/dist/{DialogContent-DcKK8k9i.js → DialogContent-6JtTB5x2.js} +8 -5
- package/dist/DialogFooter-9phqcRIS.js +80 -0
- package/dist/DialogScrollContent-TTuovQst.js +93 -0
- package/dist/HoverCardContent-Bel1gdLZ.js +88 -0
- package/dist/{IconChip-BTD-nay5.js → IconChip-DhbdGdFQ.js} +1 -1
- package/dist/{IconTooltip-Bl8gFZ8d.js → IconTooltip-B0zimd2H.js} +1 -1
- package/dist/Input-Cg9DF62r.js +57 -0
- package/dist/{Notification-VUwexFUf.js → Notification-CphK7AAm.js} +3 -3
- package/dist/NumberFieldContent-D8cXeyO4.js +140 -0
- package/dist/PagerDots-Cjx96la-.js +98 -0
- package/dist/{SelectScrollDownButton-CrA8F0iV.js → SelectScrollDownButton-DAKCBEdW.js} +62 -57
- package/dist/{SelectSeparator-DXswVdRz.js → SelectSeparator-C2UGOkXF.js} +1 -1
- package/dist/Separator-DQcwC2TR.js +44 -0
- package/dist/Switch-B8RscmRu.js +49 -0
- package/dist/{Toaster-Bw4xR8xV.js → Toaster-D9qIHjBI.js} +1 -1
- package/dist/{ToggleGroupItem-pEM9vIhs.js → ToggleGroupItem-BLtr3TJq.js} +2 -2
- package/dist/TooltipProvider-BJ_Y5EGX.js +109 -0
- package/dist/animated-digit.js +1 -1
- package/dist/api/index.d.ts +15 -32
- package/dist/api/types-extra.d.ts +31 -0
- package/dist/api.js +1 -1
- package/dist/aurora.js +579 -251
- package/dist/border-progress.js +49 -57
- package/dist/{button-DYCUa-tH.js → button-5dY1Dvhd.js} +13 -14
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -3
- package/dist/card.js +1 -1
- package/dist/carousel.js +20 -20
- package/dist/color-Cs0-oxYL.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/runtime.d.ts +12 -0
- package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +11 -2
- package/dist/components/custom/aurora/composables/wgpuSetup.d.ts +8 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +18 -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/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/composables/concentricGLSetup.d.ts +7 -0
- package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +9 -0
- package/dist/components/custom/concentric/composables/ringField.d.ts +57 -16
- package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +2 -1
- package/dist/components/custom/concentric/composables/useConcentric.d.ts +4 -4
- package/dist/components/custom/concentric/constants.d.ts +30 -6
- 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/confirm-dialog/ConfirmDialog.vue.d.ts +3 -3
- package/dist/components/custom/constellation/Constellation.vue.d.ts +5 -4
- package/dist/components/custom/constellation/composables/constellationGLSetup.d.ts +10 -0
- package/dist/components/custom/constellation/composables/constellationWGPUSetup.d.ts +19 -0
- package/dist/components/custom/constellation/composables/uniformBridgeWGPU.d.ts +66 -0
- package/dist/components/custom/constellation/composables/useConstellation.d.ts +3 -10
- package/dist/components/custom/constellation/constants.d.ts +33 -0
- package/dist/components/custom/constellation/constellationField.d.ts +31 -1
- package/dist/components/custom/constellation/constellationInteraction.d.ts +23 -14
- package/dist/components/custom/constellation/constellationRender.d.ts +25 -0
- package/dist/components/custom/constellation/constellationTypes.d.ts +38 -0
- package/dist/components/custom/constellation/constellationWell.d.ts +15 -0
- package/dist/components/custom/constellation/index.d.ts +5 -5
- package/dist/components/custom/constellation/shaders/constellation-lines.glsl.d.ts +2 -0
- package/dist/components/custom/constellation/shaders/constellation-lines.wgsl.d.ts +1 -0
- package/dist/components/custom/constellation/shaders/constellation-points.glsl.d.ts +2 -0
- package/dist/components/custom/constellation/shaders/constellation-points.wgsl.d.ts +1 -0
- package/dist/components/custom/deck/DeckPager.vue.d.ts +29 -0
- package/dist/components/custom/deck/composables/useDeck.d.ts +27 -0
- package/dist/components/custom/deck/composables/useDeckKeyboard.d.ts +25 -0
- package/dist/components/custom/deck/composables/useDeckSpring.d.ts +22 -0
- package/dist/components/custom/deck/constants.d.ts +14 -0
- package/dist/components/custom/deck/index.d.ts +8 -0
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +12 -0
- package/dist/components/custom/dock/DockStack.vue.d.ts +65 -0
- package/dist/components/custom/dock/GlassDock.vue.d.ts +4 -2
- package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +80 -0
- package/dist/components/custom/dock/composables/index.d.ts +2 -0
- package/dist/components/custom/dock/composables/useDockSearch.d.ts +85 -0
- package/dist/components/custom/dock/composables/useDockShellProps.d.ts +11 -0
- package/dist/components/custom/dock/constants.d.ts +18 -14
- package/dist/components/custom/dock/index.d.ts +5 -2
- package/dist/components/custom/dot-flow-field/DotFlowField.vue.d.ts +15 -11
- package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +48 -6
- package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +23 -8
- package/dist/components/custom/dot-flow-field/composables/useDotFlowField.d.ts +6 -5
- package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +18 -5
- package/dist/components/custom/dot-flow-field/constants.d.ts +42 -21
- 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 +4 -20
- package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +1 -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 +52 -0
- package/dist/components/custom/dot-matrix/composables/useDotMatrix.d.ts +34 -0
- package/dist/components/custom/dot-matrix/composables/useDotSphere.d.ts +27 -0
- package/dist/components/custom/dot-matrix/constants.d.ts +58 -0
- package/dist/components/custom/dot-matrix/index.d.ts +5 -0
- package/dist/components/custom/dot-matrix/shaders/dot-matrix.glsl.d.ts +4 -0
- package/dist/components/custom/dot-matrix/shaders/dot-matrix.wgsl.d.ts +1 -0
- package/dist/components/custom/easing/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 +40 -47
- package/dist/components/custom/fourier-field/composables/fourierFieldGLSetup.d.ts +15 -0
- package/dist/components/custom/fourier-field/composables/fourierFieldWGPUSetup.d.ts +20 -0
- package/dist/components/custom/fourier-field/composables/uniformBridgeWGPU.d.ts +41 -0
- package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +40 -37
- package/dist/components/custom/fourier-field/constants.d.ts +61 -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/constants.d.ts +1 -1
- package/dist/components/custom/goo-blob/index.d.ts +1 -1
- package/dist/components/custom/goo-blob/shaders/metaball-noise.wgsl.d.ts +1 -0
- package/dist/components/custom/goo-blob/shaders/metaball-palette.wgsl.d.ts +1 -0
- package/dist/components/custom/goo-blob/shaders/metaball-uniforms.glsl.d.ts +1 -1
- package/dist/components/custom/goo-blob/shaders/metaball.wgsl.d.ts +1 -1
- package/dist/components/custom/goo-blob/types.d.ts +36 -0
- package/dist/components/custom/goo-dot-matrix/GooDotMatrix.vue.d.ts +49 -0
- package/dist/components/custom/goo-dot-matrix/composables/gooDotLattice.d.ts +24 -0
- package/dist/components/custom/goo-dot-matrix/composables/gooDotSetup.d.ts +50 -0
- package/dist/components/custom/goo-dot-matrix/composables/uniformBridgeWGPU.d.ts +35 -0
- package/dist/components/custom/goo-dot-matrix/composables/useGooDotMatrix.d.ts +31 -0
- package/dist/components/custom/goo-dot-matrix/constants.d.ts +76 -0
- package/dist/components/custom/goo-dot-matrix/index.d.ts +5 -0
- package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.frag.d.ts +11 -0
- package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.wgsl.d.ts +3 -0
- package/dist/components/custom/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-grid/PaperGrid.vue.d.ts +42 -0
- package/dist/components/custom/paper-grid/composables/paperGrid.d.ts +90 -0
- package/dist/components/custom/paper-grid/composables/paperGridGLSetup.d.ts +16 -0
- package/dist/components/custom/paper-grid/composables/paperGridWGPUSetup.d.ts +19 -0
- package/dist/components/custom/paper-grid/composables/uniformBridgeWGPU.d.ts +16 -0
- package/dist/components/custom/paper-grid/composables/usePaperGrid.d.ts +31 -0
- package/dist/components/custom/paper-grid/constants.d.ts +57 -0
- package/dist/components/custom/paper-grid/index.d.ts +5 -0
- package/dist/components/custom/paper-grid/shaders/paper-grid.glsl.d.ts +4 -0
- package/dist/components/custom/paper-grid/shaders/paper-grid.wgsl.d.ts +1 -0
- package/dist/components/custom/search/FuzzySearch.vue.d.ts +8 -2
- package/dist/components/custom/search/SearchBar.vue.d.ts +8 -0
- package/dist/components/custom/search/index.d.ts +2 -0
- package/dist/components/custom/search/searchVariants.d.ts +19 -0
- package/dist/components/custom/selectable-chip/SelectableChip.vue.d.ts +50 -0
- package/dist/components/custom/selectable-chip/index.d.ts +2 -0
- package/dist/components/custom/selectable-chip/selectableChipVariants.d.ts +23 -0
- package/dist/components/custom/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 +20 -2
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +29 -16
- 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/button/index.d.ts +1 -1
- package/dist/components/ui/card/Card.vue.d.ts +45 -0
- package/dist/components/ui/card/index.d.ts +1 -1
- 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/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 +3 -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/glass/useVizChoreography.d.ts +123 -0
- package/dist/composables/glass/webgl/createCanvasLifecycle.d.ts +10 -0
- package/dist/composables/glass/webgl/shaders/flow.wgsl.d.ts +1 -0
- package/dist/composables/glass/webgpu/index.d.ts +1 -1
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +28 -7
- package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +1 -0
- package/dist/composables/glass/webgpu/webgpuDevice.d.ts +42 -0
- package/dist/composables/motion/core/index.d.ts +3 -0
- package/dist/composables/motion/scrollReader.d.ts +25 -0
- package/dist/composables/motion/springPresets.d.ts +20 -1
- package/dist/composables/motion/useCharStagger.d.ts +44 -0
- package/dist/composables/motion/useDockCtaReceive.d.ts +31 -6
- package/dist/composables/motion/useScrollChrome.d.ts +58 -0
- package/dist/composables/motion/useScrollTrigger.d.ts +67 -0
- package/dist/composables/motion/useSpringPress.d.ts +5 -5
- package/dist/composables/motion/useStaggerReveal.d.ts +24 -0
- package/dist/composables/sidebar/index.d.ts +4 -1
- package/dist/composables/sidebar/types.d.ts +68 -3
- package/dist/composables/sidebar/useClickDelegate.d.ts +4 -0
- package/dist/composables/sidebar/useLazyLoader.d.ts +5 -0
- package/dist/composables/sidebar/useScrollTo.d.ts +5 -0
- package/dist/composables/virtual/index.d.ts +4 -0
- package/dist/composables/virtual/useVirtualSectionWindow.d.ts +72 -0
- package/dist/composables/virtual/useWindowedStore.d.ts +43 -0
- package/dist/composables/virtual/virtualSectionLayout.d.ts +103 -0
- package/dist/concentric.js +495 -221
- 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 +1 -1
- package/dist/createCanvasLifecycle-Gh45Ce-p.js +93 -0
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/deck.d.ts +1 -0
- package/dist/deck.js +105 -0
- package/dist/dialog.js +4 -3
- package/dist/dock.js +602 -458
- package/dist/dot-flow-field.js +580 -290
- package/dist/dot-matrix.d.ts +1 -0
- package/dist/dot-matrix.js +630 -0
- package/dist/dotMatrixField-D_x9_1qq.js +48 -0
- package/dist/{dropdown-menu-CofSZuk8.js → dropdown-menu-aJmV5SqE.js} +83 -79
- package/dist/dropdown-menu.js +1 -1
- package/dist/easing.js +188 -176
- package/dist/expandable-container.js +42 -20
- package/dist/fading-scroll.js +1 -1
- package/dist/flow.glsl-B2P7e0MT.js +4 -0
- package/dist/forms.js +62 -60
- package/dist/fourier-field.js +825 -178
- package/dist/fourier-math.js +1 -1
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +145 -104
- package/dist/goo-blob.js +171 -1228
- package/dist/goo-dot-matrix.d.ts +1 -0
- package/dist/goo-dot-matrix.js +591 -0
- package/dist/handmark.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 +2 -0
- package/dist/instrument-chassis.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/labeled-field.js +70 -60
- package/dist/metric-cell.js +1 -1
- package/dist/metric-stack.js +11 -2
- package/dist/motion-core.js +54 -32
- package/dist/motion-curves.js +11 -1
- package/dist/motion.js +46 -111
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.js +2 -91
- package/dist/paper-backdrop.js +1 -1
- package/dist/paper-grid.d.ts +1 -0
- package/dist/paper-grid.js +788 -0
- package/dist/{presets-BW2b-fr1.js → presets-CvOUqtdY.js} +3 -3
- package/dist/{procedural-color.glsl-CIFsJhwI.js → procedural-color.wgsl-m7Zgv35j.js} +2 -2
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +1 -1
- package/dist/{useCanvas2D-B8w_E3Rr.js → resolveCanvasColor-yPyIpJt9.js} +12 -2
- package/dist/scrollReader-DI1NWxUw.js +42 -0
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +160 -304
- package/dist/select.js +3 -3
- package/dist/selectable-chip.d.ts +1 -0
- package/dist/selectable-chip.js +65 -0
- package/dist/separator.js +1 -1
- package/dist/{sheet-tZMg0E0w.js → sheet-B2flBfLH.js} +2 -2
- package/dist/sheet.js +1 -1
- package/dist/sidebar.js +216 -114
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +1 -1
- package/dist/spectrum-walk-BVzA7Biz.js +33 -0
- package/dist/{springPresets-CFQGQfdl.js → springPresets-Ce7OYCm9.js} +12 -6
- package/dist/styles/animations.css +13 -3
- package/dist/styles/cards.css +69 -0
- package/dist/styles/completion-seal.css +131 -0
- package/dist/styles/components.css +2 -3
- package/dist/styles/configurator.css +55 -0
- package/dist/styles/critical-partition.mjs +33 -11
- package/dist/styles/deferred.css +2 -0
- package/dist/styles/dock/cta-seat.css +87 -0
- package/dist/styles/dock/density.css +153 -0
- package/dist/styles/dock/layers.css +55 -7
- package/dist/styles/dock/morph-bridge.css +54 -18
- package/dist/styles/dock/morph.css +41 -33
- package/dist/styles/dock/overflow.css +12 -0
- package/dist/styles/dock/search.css +68 -0
- package/dist/styles/dock/shape.css +124 -0
- package/dist/styles/dock/shell.css +23 -5
- package/dist/styles/dock/stack-rail.css +264 -0
- package/dist/styles/dock-controls/dark-mode-toggle.css +17 -4
- package/dist/styles/dock-controls/icon-button.css +14 -0
- package/dist/styles/dock.css +11 -1
- package/dist/styles/glass/accent-tone.css +66 -0
- package/dist/styles/glass/control-surfaces.css +167 -0
- package/dist/styles/glass/ladder.css +67 -17
- package/dist/styles/glass/rim.css +19 -9
- package/dist/styles/glass/surfaces.css +69 -148
- package/dist/styles/glass.css +10 -0
- package/dist/styles/index.css +15 -0
- package/dist/styles/scroll-chrome.css +123 -0
- package/dist/styles/scroll-driven.css +38 -0
- package/dist/styles/segmented-tabs.css +50 -14
- package/dist/styles/theme/bridges.css +22 -0
- package/dist/styles/theme/radius.css +18 -1
- package/dist/styles/tokens/color-radius.css +13 -3
- package/dist/styles/tokens/dark-arm.css +39 -6
- package/dist/styles/tokens/glass-deep.css +28 -3
- package/dist/styles/tokens/glass-fx.css +44 -1
- package/dist/styles/tokens/glass.css +91 -31
- package/dist/styles/tokens/light-dark.css +1 -1
- package/dist/styles/tokens/offsets.css +27 -0
- package/dist/styles/tokens/property-regs.css +133 -0
- package/dist/styles/tokens/scale-paper.css +73 -29
- package/dist/styles/tokens/scheme-motion.css +44 -6
- package/dist/styles/tokens/sizing-config.css +110 -0
- package/dist/styles/tokens/sizing.css +55 -104
- package/dist/styles/tokens.css +5 -0
- 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 +14 -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 +8 -8
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle-chip.js +10 -10
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/uniformBridgeWGPU-CtAKl45L.js +1204 -0
- package/dist/{useAnimatedNumber-BfUq2bUM.js → useAnimatedNumber-CLrxicG9.js} +1 -1
- package/dist/{useConfiguratorState-DNlOh6c8.js → useConfiguratorState-4xblKfwd.js} +25 -24
- package/dist/useControlSize-SH1UmJCi.js +9 -0
- package/dist/useDockCtaReceive-DfFkmgL1.js +82 -0
- package/dist/{useDragMorph-DgxnsVJz.js → useDragMorph-BUgAC-zK.js} +4 -4
- package/dist/useFuzzySearch-DIhcYtcw.js +177 -0
- package/dist/useGpuSubstrate-4pTcp6mX.js +294 -0
- package/dist/{useLiquidPress-kfb4KX79.js → useLiquidPress-BooG97RY.js} +2 -2
- package/dist/usePointerVelocityField-QLsy3_kv.js +91 -0
- package/dist/useScrollChrome-D66AVP7C.js +258 -0
- package/dist/{useSpringMount-q1amq1SJ.js → useSpringMount-BWDnKIwh.js} +1 -1
- package/dist/useSpringPress-B1-Czp-V.js +36 -0
- package/dist/useViewTransition-CUI1nAgn.js +95 -0
- 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 +116 -73
- package/package.json +127 -7
- package/src/styles/animations.css +13 -3
- package/src/styles/cards.css +69 -0
- package/src/styles/completion-seal.css +131 -0
- package/src/styles/configurator.css +55 -0
- package/src/styles/critical-partition.mjs +33 -11
- package/src/styles/dock/cta-seat.css +87 -0
- package/src/styles/dock/density.css +153 -0
- package/src/styles/dock/layers.css +55 -7
- package/src/styles/dock/morph-bridge.css +54 -18
- package/src/styles/dock/morph.css +41 -33
- package/src/styles/dock/overflow.css +12 -0
- package/src/styles/dock/search.css +68 -0
- package/src/styles/dock/shape.css +124 -0
- package/src/styles/dock/shell.css +23 -5
- package/src/styles/dock/stack-rail.css +264 -0
- package/src/styles/dock-controls/dark-mode-toggle.css +17 -4
- package/src/styles/dock-controls/icon-button.css +14 -0
- package/src/styles/dock.css +11 -1
- package/src/styles/glass/accent-tone.css +66 -0
- package/src/styles/glass/control-surfaces.css +167 -0
- package/src/styles/glass/ladder.css +67 -17
- package/src/styles/glass/rim.css +19 -9
- package/src/styles/glass/surfaces.css +69 -148
- package/src/styles/glass.css +10 -0
- package/src/styles/index.css +15 -0
- package/src/styles/scroll-chrome.css +123 -0
- package/src/styles/scroll-driven.css +38 -0
- package/src/styles/segmented-tabs.css +50 -14
- package/src/styles/theme/bridges.css +22 -0
- package/src/styles/theme/radius.css +18 -1
- package/src/styles/tokens/color-radius.css +13 -3
- package/src/styles/tokens/dark-arm.css +39 -6
- package/src/styles/tokens/glass-deep.css +28 -3
- package/src/styles/tokens/glass-fx.css +44 -1
- package/src/styles/tokens/glass.css +91 -31
- package/src/styles/tokens/light-dark.css +1 -1
- package/src/styles/tokens/offsets.css +27 -0
- package/src/styles/tokens/property-regs.css +133 -0
- package/src/styles/tokens/scale-paper.css +73 -29
- package/src/styles/tokens/scheme-motion.css +44 -6
- package/src/styles/tokens/sizing-config.css +110 -0
- package/src/styles/tokens/sizing.css +55 -104
- package/src/styles/tokens.css +5 -0
- 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 +14 -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/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/Separator-pKF0oA4M.js +0 -37
- package/dist/Switch-CwYNf8bo.js +0 -47
- package/dist/TooltipProvider-rzvnXz60.js +0 -104
- package/dist/color-DweYl7pE.js +0 -86
- package/dist/components/custom/constellation/composables/useConstellationPointer.d.ts +0 -35
- package/dist/components/custom/constellation/constellationDraw.d.ts +0 -30
- package/dist/components/custom/dock/DockRail.vue.d.ts +0 -89
- package/dist/createCanvasLifecycle-CHD5XrDW.js +0 -82
- package/dist/procedural-color.wgsl-CToRHugY.js +0 -224
- package/dist/resolveCanvasColor-CUyHr5Uu.js +0 -11
- package/dist/styles/dock/rail-extend.css +0 -397
- 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/{FadingScroll-DI6hQhT9.js → FadingScroll-DLRbH5Xr.js} +0 -0
- /package/dist/{HoverPopover-CbqbNwgU.js → HoverPopover-BcIxvyqZ.js} +0 -0
- /package/dist/{InstrumentChassis-Bx0F_q5g.js → InstrumentChassis-CxsHSyMj.js} +0 -0
- /package/dist/{PaperBackdrop-Vf3tlpvd.js → PaperBackdrop-CqwjnfLv.js} +0 -0
- /package/dist/{Progress-DctG61iZ.js → Progress-CnqB7gLm.js} +0 -0
- /package/dist/{ScrollingText-yOpBzFYq.js → ScrollingText-CTZbA_cG.js} +0 -0
- /package/dist/{SelectGroup-DwwjicPY.js → SelectGroup-BFiod7X2.js} +0 -0
- /package/dist/{compile-CQEFRTmx.js → compile-nZ1xVYTp.js} +0 -0
- /package/dist/{constants-BPOqYJAm.js → constants--C2DkLW8.js} +0 -0
- /package/dist/{math-BINYmg5z.js → math-Eb0w3LqU.js} +0 -0
- /package/dist/{prng-Za0Rmgag.js → prng-B-d9eYX8.js} +0 -0
- /package/dist/{slider-DVb4HXU-.js → slider-2A0rPn79.js} +0 -0
- /package/dist/{useGlobalDark-C28t0VWJ.js → useGlobalDark-CmjB9E32.js} +0 -0
- /package/dist/{useIntersectionPause-Bj4sPkMh.js → useIntersectionPause-Dbozzjgm.js} +0 -0
- /package/dist/{useInterval-CvK1mL92.js → useInterval-CNdua40W.js} +0 -0
- /package/dist/{useKeyboardShortcuts-BXWXOZ-9.js → useKeyboardShortcuts-BPRp33Im.js} +0 -0
- /package/dist/{useLiquidFlex-mZPMiNXh.js → useLiquidFlex-UmA6LMZu.js} +0 -0
- /package/dist/{useScrollProgress-D7bYU2RK.js → useScrollProgress-c3yxmH6a.js} +0 -0
- /package/dist/{useSortable-DHjtZSEd.js → useSortable-BVqlJRBR.js} +0 -0
- /package/dist/{useTextHighlight-CWEi25hf.js → useTextHighlight-NmBM5V_4.js} +0 -0
- /package/dist/{vReveal-Czsb7zQC.js → vReveal-D9k0jADx.js} +0 -0
- /package/dist/{vSpecular-CQFmLNzA.js → vSpecular-EX7loENl.js} +0 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { type Easing } from "@mkbabb/keyframes.js";
|
|
2
|
+
import { type Ref } from "vue";
|
|
3
|
+
import { type SpringPresetName } from "../motion/springPresets";
|
|
4
|
+
/**
|
|
5
|
+
* The reveal spring register. `bouncy` is the playful bloom (the dots spring out, the
|
|
6
|
+
* aurora blooms — the largest overshoot), `smooth` the calm settle, `snappy` the crisp
|
|
7
|
+
* control build, `gentle`/`dock` the patient/control ends. A named SPRING_PRESETS row —
|
|
8
|
+
* never a hand (response, ζ).
|
|
9
|
+
*/
|
|
10
|
+
export type VizChoreographyPreset = SpringPresetName;
|
|
11
|
+
export interface UseVizChoreographyOptions {
|
|
12
|
+
/**
|
|
13
|
+
* The ENTER spring register (default `bouncy` — the playful liquid bloom the user
|
|
14
|
+
* named). The per-viz wave picks: `smooth` for a calm field settle, `bouncy` for the
|
|
15
|
+
* dot-scatter bloom.
|
|
16
|
+
*/
|
|
17
|
+
preset?: VizChoreographyPreset;
|
|
18
|
+
/**
|
|
19
|
+
* The config-TRANSITION lerp duration in seconds. Default the ENTER preset's response
|
|
20
|
+
* (the spring-timed glide — never a hand wall clock). The cross-fade timing is the
|
|
21
|
+
* `springTimingFunction` of the SAME preset row.
|
|
22
|
+
*/
|
|
23
|
+
transitionResponse?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Honor `prefers-reduced-motion: reduce` → snap the reveal (zero spring frames, the
|
|
26
|
+
* fade survives, the scatter/transform leg is the viz's to drop). Default true. (A
|
|
27
|
+
* deterministic viz capture that ACCEPTS the live build-in opts out.)
|
|
28
|
+
*/
|
|
29
|
+
respectReducedMotion?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Start ALREADY revealed (revealT = 1) — for a viz mounted on a route that is already
|
|
32
|
+
* the active page (no enter beat owed). Default false (the page-enter starts collapsed
|
|
33
|
+
* and blooms). `enter()` always re-seats from the current value, so this is only the
|
|
34
|
+
* INITIAL seed.
|
|
35
|
+
*/
|
|
36
|
+
initiallyRevealed?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface UseVizChoreographyReturn {
|
|
39
|
+
/**
|
|
40
|
+
* The coupled reveal scalar ∈ [0,1] (may briefly overshoot >1 on a bouncy enter — the
|
|
41
|
+
* iOS bloom). The viz reads this for BOTH legs: the build-in uniform (settle-from-
|
|
42
|
+
* scatter) AND the canvas opacity (clamped via `opacity`). 0 = collapsed/scattered,
|
|
43
|
+
* 1 = fully materialized.
|
|
44
|
+
*/
|
|
45
|
+
readonly revealT: Readonly<Ref<number>>;
|
|
46
|
+
/**
|
|
47
|
+
* The canvas opacity ∈ [0,1] — the coupled fade leg, `revealT` clamped to [0,1] (the
|
|
48
|
+
* fade does not overshoot; only the spatial build-in overshoots). The viz binds this
|
|
49
|
+
* to its canvas `style.opacity`.
|
|
50
|
+
*/
|
|
51
|
+
readonly opacity: Readonly<Ref<number>>;
|
|
52
|
+
/**
|
|
53
|
+
* The config-transition progress ∈ [0,1] — the SmoothProgress glide a preset/variant
|
|
54
|
+
* morph reads to lerp its config uniforms (0 = the outgoing config, 1 = the incoming).
|
|
55
|
+
* Idle (settled at 1) when no transition is in flight.
|
|
56
|
+
*/
|
|
57
|
+
readonly transitionT: Readonly<Ref<number>>;
|
|
58
|
+
/**
|
|
59
|
+
* True while the spatial build-in (the settle-from-scatter / the bloom transform) is
|
|
60
|
+
* ACTIVE — false under PRM (the viz drops the scatter, keeps the fade) and false once
|
|
61
|
+
* settled. The viz gates its scatter/transform leg on this (the P6 keeps-fade-drops-
|
|
62
|
+
* transform split).
|
|
63
|
+
*/
|
|
64
|
+
readonly transformActive: Readonly<Ref<boolean>>;
|
|
65
|
+
/** True once the reveal has fully settled at its target (the loop can quiesce). */
|
|
66
|
+
readonly settled: Readonly<Ref<boolean>>;
|
|
67
|
+
/**
|
|
68
|
+
* A — START: bloom the viz in (revealT → 1) on the page-enter, on the ENTER spring
|
|
69
|
+
* register. Idempotent; a re-call mid-build re-seats velocity-continuously (the
|
|
70
|
+
* restart contract). PRM snaps to revealed (the fade survives, the scatter drops).
|
|
71
|
+
*/
|
|
72
|
+
enter: () => void;
|
|
73
|
+
/**
|
|
74
|
+
* C — END: settle the viz out (revealT → 0) on the no-overshoot exit register, then
|
|
75
|
+
* the loop parks (the viz reads `settled`/`revealT === 0` to stop). PRM snaps to
|
|
76
|
+
* collapsed. A closing surface must not overshoot past gone (P2).
|
|
77
|
+
*/
|
|
78
|
+
leave: () => void;
|
|
79
|
+
/**
|
|
80
|
+
* B — TRANSITION: glide a config/variant morph. Re-seats `transitionT` 0→1 on the
|
|
81
|
+
* SmoothProgress lerp; the viz reads `transitionT` to lerp its config uniforms each
|
|
82
|
+
* frame. `onComplete` (optional) fires once the glide settles. PRM snaps the glide.
|
|
83
|
+
*/
|
|
84
|
+
transitionTo: (onComplete?: () => void) => void;
|
|
85
|
+
/**
|
|
86
|
+
* D — RESTART: re-seat the reveal from the CURRENT (value, velocity) so a restart mid-
|
|
87
|
+
* build inherits the live trajectory (the iOS interruptible contract — never a jump-
|
|
88
|
+
* to-zero). Snaps revealT back to 0 then blooms 1 velocity-continuously.
|
|
89
|
+
*/
|
|
90
|
+
restart: () => void;
|
|
91
|
+
/**
|
|
92
|
+
* Advance the choreography ONE renderer frame. The viz calls this from INSIDE its
|
|
93
|
+
* existing `createCanvasLifecycle` frame callback with the frame `dtMs` (milliseconds).
|
|
94
|
+
* NO own rAF — the renderer owns the loop. Steps the reveal spring + the transition
|
|
95
|
+
* lerp analytically (O(1), zero allocation). Returns the live `revealT` (so a renderer
|
|
96
|
+
* can read inline). A zero/negative `dtMs` is a no-op step (a paused/first frame).
|
|
97
|
+
*/
|
|
98
|
+
tick: (dtMs: number) => number;
|
|
99
|
+
/** The transition cross-fade easing (the typed {fn,css} pair) — for a viz that wants
|
|
100
|
+
* the spring curve directly (e.g. to time a CSS-side companion). */
|
|
101
|
+
readonly transitionEasing: Easing;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The procedural-viz choreography clock. Composes the published-4.3.0 kf
|
|
105
|
+
* `SpringProgress` (the reveal scalar) + `SmoothProgress` (the config lerp) +
|
|
106
|
+
* `springTimingFunction` (the cross-fade timing), FED `tick(dt)` from the consuming
|
|
107
|
+
* viz's frame callback. Owns NO rAF (the one-loop discipline; the viz feed it). See the
|
|
108
|
+
* module header for the four beats, the coupled-fade drive, the one-loop fence, and the
|
|
109
|
+
* Oscillator book.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* const choreo = useVizChoreography({ preset: "bouncy" });
|
|
114
|
+
* // inside createCanvasLifecycle's frame(timeSec):
|
|
115
|
+
* const dtMs = (timeSec - lastSec) * 1000;
|
|
116
|
+
* choreo.tick(dtMs);
|
|
117
|
+
* canvas.style.opacity = String(choreo.opacity.value);
|
|
118
|
+
* gl.uniform1f(uReveal, choreo.revealT.value); // the settle-from-scatter build-in
|
|
119
|
+
* // page-enter / route-leave:
|
|
120
|
+
* watch(active, (on) => (on ? choreo.enter() : choreo.leave()));
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
export declare function useVizChoreography(options?: UseVizChoreographyOptions): UseVizChoreographyReturn;
|
|
@@ -41,5 +41,15 @@ export interface CanvasLifecycleHandle {
|
|
|
41
41
|
readonly disposed: boolean;
|
|
42
42
|
readonly running: boolean;
|
|
43
43
|
readonly reducedMotion: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* BC.W-SAFARI-WEBGL — the circuit-breaker has tripped: the surface lost-and-restored
|
|
46
|
+
* its context more than N times within T ms (a real eviction storm), so the lifecycle
|
|
47
|
+
* is HOLDING the parked state without re-arming (no throw). Resets once the loss window
|
|
48
|
+
* passes quiet; a healthy single loss never trips it.
|
|
49
|
+
*/
|
|
50
|
+
readonly contextHeld: boolean;
|
|
44
51
|
}
|
|
52
|
+
export declare const N_RESTORE_STORM = 3;
|
|
53
|
+
export declare const T_RESTORE_STORM_MS = 2000;
|
|
54
|
+
export declare const RESTORE_DEBOUNCE_MS = 100;
|
|
45
55
|
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,2 +1,2 @@
|
|
|
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";
|
|
@@ -24,19 +24,36 @@ export interface GpuSubstrateOptions {
|
|
|
24
24
|
contextAttrs?: WebGLCanvasOptions["contextAttrs"];
|
|
25
25
|
/** Surface a device-init / validation failure (the WebGPU path). */
|
|
26
26
|
onInitError?: WebGPUCanvasOptions["onInitError"];
|
|
27
|
+
/**
|
|
28
|
+
* Notified when the picker FALLS from WebGPU to the WebGL2 net (the invisible
|
|
29
|
+
* insurance fired). The user never sees a "downgrade" — this is a diagnostic hook
|
|
30
|
+
* (e.g. record the tier-readout for the substrate DELTA), NOT an error. The error
|
|
31
|
+
* (if any) that triggered the fall is passed for telemetry.
|
|
32
|
+
*/
|
|
33
|
+
onBackendFallback?: (info: {
|
|
34
|
+
from: "webgpu";
|
|
35
|
+
to: "webgl2";
|
|
36
|
+
error: unknown;
|
|
37
|
+
}) => void;
|
|
27
38
|
}
|
|
28
39
|
/**
|
|
29
40
|
* The uniform substrate handle. A viz consumer wires its lifecycle (offscreen pause,
|
|
30
41
|
* pause/resume, pointer-`wake`, capture-`renderAt`) against THIS — identical across the
|
|
31
|
-
* WebGPU and WebGL2 backends. `armAsync` is the start seam (
|
|
32
|
-
*
|
|
42
|
+
* WebGPU and WebGL2 backends. `armAsync` is the start seam (it tries WebGPU then falls
|
|
43
|
+
* to the WebGL2 net on a no-adapter/init failure); `arm` is the synchronous twin (it
|
|
44
|
+
* arms the WebGL2 net immediately so a consumer that does not await still paints).
|
|
33
45
|
*/
|
|
34
46
|
export interface GpuSubstrateHandle {
|
|
35
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* The resolved backend. Starts at the OPTIMISTIC choice (`"webgpu"` where the
|
|
49
|
+
* platform allows it + a WGSL path is provided, else `"webgl2"`); after
|
|
50
|
+
* `armAsync()` it reflects the ACTUAL backend (it falls to `"webgl2"` if the
|
|
51
|
+
* WebGPU init failed — the no-adapter/device-lost-at-birth tail).
|
|
52
|
+
*/
|
|
36
53
|
readonly backend: GpuBackend;
|
|
37
|
-
/** Acquire the device/context + `setup` + arm the loop. Resolves once armed. */
|
|
54
|
+
/** Acquire the device/context + `setup` + arm the loop (try WebGPU, fall to the WebGL2 net). Resolves once armed. */
|
|
38
55
|
armAsync: () => Promise<void>;
|
|
39
|
-
/** Synchronous arm (the WebGL2
|
|
56
|
+
/** Synchronous arm (the WebGL2 net arms immediately; the WebGPU path is a no-op until the device resolves). */
|
|
40
57
|
arm: () => void;
|
|
41
58
|
suspend: (reason?: "tab-hidden" | "off-screen" | "off-screen-io" | "manual") => void;
|
|
42
59
|
resume: (reason?: "tab-hidden" | "off-screen" | "off-screen-io" | "manual") => void;
|
|
@@ -47,8 +64,12 @@ export interface GpuSubstrateHandle {
|
|
|
47
64
|
}
|
|
48
65
|
/**
|
|
49
66
|
* Pick the backend + return the uniform handle. WebGPU-first (`supportsWebGPU()` AND a
|
|
50
|
-
* `setupWGPU` callback is provided); otherwise the WebGL2
|
|
51
|
-
*
|
|
67
|
+
* `setupWGPU` callback is provided); otherwise the WebGL2 net. The decision is NO
|
|
68
|
+
* LONGER committed at construction off a presence check — `armAsync()` ATTEMPTS the
|
|
69
|
+
* WebGPU init and FALLS to the WebGL2 net on ANY failure (no adapter, device reject,
|
|
70
|
+
* device-lost-at-birth, validation throw). The WebGL2 leaf is built lazily — only if
|
|
71
|
+
* the WebGPU path fails OR no WGSL path was provided — so a Baseline host pays no
|
|
72
|
+
* WebGL2-context cost.
|
|
52
73
|
*/
|
|
53
74
|
export declare function createGpuSubstrate(canvas: HTMLCanvasElement, options: GpuSubstrateOptions): GpuSubstrateHandle;
|
|
54
75
|
export type { WebGPUCanvasFrame, WebGLCanvasFrame };
|
|
@@ -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";
|
|
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;
|
|
@@ -11,3 +11,6 @@ export * from "../vReveal";
|
|
|
11
11
|
export * from "../useTextHighlight";
|
|
12
12
|
export * from "../useLiquidFlex";
|
|
13
13
|
export * from "../usePointerVelocityField";
|
|
14
|
+
export * from "../useCharStagger";
|
|
15
|
+
export * from "../useScrollTrigger";
|
|
16
|
+
export * from "../useScrollChrome";
|
|
@@ -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";
|
|
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,25 @@ 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
|
+
* BC.W-SPRING-EASE — the retune that eases the two abrupt curves + mints the press
|
|
34
|
+
* register (USER-DEFECTS §B/§D, the "squishy/quick/coupled" mandate). The retune is
|
|
35
|
+
* SURGICAL — `smooth`/`dock`/`gentle` are byte-frozen KEEPS:
|
|
36
|
+
* · snappy: response 0.35 / ζ 0.65 → 0.42 / 0.78. The old pair front-loaded — its
|
|
37
|
+
* 2%-band travel collapsed into the first ~16% of the clock then sat dead-flat.
|
|
38
|
+
* The eased pair spreads the travel so the 90%-point lands mid-clock (the analytic
|
|
39
|
+
* 90%-travel fraction t₉₀/t_settle ≈ 0.57, in the [0.55,0.70] target band), keeping
|
|
40
|
+
* it QUICK (0.34s clock) with a whisper of life (overshoot ~+2.0%, ≤ the +7% bar).
|
|
41
|
+
* · bouncy: ζ 0.45 → 0.55. Overshoot drops +20.5% → +12.6%, into the Apple 12-18%
|
|
42
|
+
* band (apple-ios27.md §5 "ease toward ζ0.55-0.60 if abrupt"; ζ=1−bounce ⇒ bounce
|
|
43
|
+
* 0.45, more playful than Apple's 0.30 but controlled). response stays 0.5. ζ 0.55
|
|
44
|
+
* is the band floor — the +14% prose target maps here once the overshoot is solved
|
|
45
|
+
* analytically (ζ 0.60 lands +9.5%, BELOW the band; the proof's S2 floor is ζ≥0.55).
|
|
46
|
+
* · press: MINTED at response 0.15 / ζ 0.86 — the Apple `interactiveSpring`
|
|
47
|
+
* (apple-ios27.md §2.2/§2.5). The press answers in the sub-100ms iOS window with a
|
|
48
|
+
* sub-perceptual alive rebound (~+0.5%). `useSpringPress` defaults re-point onto it.
|
|
30
49
|
*/
|
|
31
50
|
export declare const SPRING_PRESETS: readonly SpringPresetRow[];
|
|
32
51
|
/** Lookup one preset row by name (used by `MOTION_CURVES` spring rows). */
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter, Ref } from "vue";
|
|
2
|
+
/** The per-step delay floor matches the shipped `.char-stagger` recipe — the
|
|
3
|
+
* glyph spans are mounted via `requestAnimationFrame`-free DOM writes; the CSS
|
|
4
|
+
* owns the timing. No magic timing lives here. */
|
|
5
|
+
export interface UseCharStaggerOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Split unit. `"char"` (default) splits per UTF-16 code-unit-safe scalar;
|
|
8
|
+
* `"word"` splits on whitespace and keeps each word as ONE `.char` unit;
|
|
9
|
+
* `"grapheme"` uses `Intl.Segmenter` so emoji / combining-mark / ZWJ
|
|
10
|
+
* sequences (a 👨👩👧 family) are ONE glyph, never split into pieces.
|
|
11
|
+
*/
|
|
12
|
+
by?: "char" | "word" | "grapheme";
|
|
13
|
+
/**
|
|
14
|
+
* Preserve whitespace as non-animating spacer spans so the word spacing
|
|
15
|
+
* survives the `inline-block` split. Default `true`.
|
|
16
|
+
*/
|
|
17
|
+
preserveWhitespace?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Write `--char-total` (the glyph count) on the wrapper, for a length-
|
|
20
|
+
* proportional / center-out / reverse stagger. Default `true`.
|
|
21
|
+
*/
|
|
22
|
+
writeTotal?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface UseCharStaggerReturn {
|
|
25
|
+
/** Re-run the split (after a `textContent` change). Idempotent — it restores
|
|
26
|
+
* the original text from the cached label and re-mints, so spans never
|
|
27
|
+
* accrete across re-splits. */
|
|
28
|
+
split: () => void;
|
|
29
|
+
/** The resolved glyph (`.char` unit) count. */
|
|
30
|
+
count: Ref<number>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Split a target element's text into per-glyph `.char` spans + the
|
|
34
|
+
* `--char-index`/`--char-total` customs the shipped `.char-stagger` CSS reads —
|
|
35
|
+
* accessible by construction (the wrapper keeps the full text as its
|
|
36
|
+
* `aria-label`, every glyph span is `aria-hidden`).
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* const el = ref<HTMLElement | null>(null);
|
|
40
|
+
* const { count } = useCharStagger(el, { by: "grapheme" });
|
|
41
|
+
* // <span ref="el" class="char-stagger" aria-label="Fourier" style="--char-total:7">
|
|
42
|
+
* // <span class="char" style="--char-index:0" aria-hidden>F</span> …
|
|
43
|
+
*/
|
|
44
|
+
export declare function useCharStagger(target: MaybeRefOrGetter<HTMLElement | null>, opts?: UseCharStaggerOptions): UseCharStaggerReturn;
|
|
@@ -36,6 +36,25 @@ export interface UseDockCtaReceiveReturn {
|
|
|
36
36
|
* abort/reset seam. Cancels any in-flight morph; does NOT fire `onReceived`.
|
|
37
37
|
*/
|
|
38
38
|
reset: () => void;
|
|
39
|
+
/**
|
|
40
|
+
* ARM the landing SEAT (BC.W-AX-DOCK-CTA-SEAT). Writes `data-cta-pending` on the
|
|
41
|
+
* `dockControl` element so the seat partial (`src/styles/dock/cta-seat.css`) paints
|
|
42
|
+
* a dim ghost AND reserves the resting control footprint (a STATIC `min-inline-size`
|
|
43
|
+
* /`min-block-size` off `--dock-control-size`/`--dock-layer-height`) — the dock box
|
|
44
|
+
* is already at the seated width, so it does NOT jump when the CTA lands. Idempotent.
|
|
45
|
+
* A no-op when the `dockControl` is not yet mounted. Sets `pending.value = true`.
|
|
46
|
+
*/
|
|
47
|
+
setPending: () => void;
|
|
48
|
+
/**
|
|
49
|
+
* CLEAR the seat. Removes `data-cta-pending` from the `dockControl`, so the seat
|
|
50
|
+
* reveals its real content with the FLIP `transition: opacity` (the partial owns the
|
|
51
|
+
* paint — a calm content fade, NOT the dock morph-stagger). Idempotent. The default
|
|
52
|
+
* `onReceived` flow calls this on hand-off (the seat reveals as the CTA lands) unless
|
|
53
|
+
* the consumer drives it manually. Sets `pending.value = false`.
|
|
54
|
+
*/
|
|
55
|
+
clearPending: () => void;
|
|
56
|
+
/** The reactive seat state — the consumer binds `:class`/`v-if` off it. */
|
|
57
|
+
pending: Readonly<Ref<boolean>>;
|
|
39
58
|
}
|
|
40
59
|
/**
|
|
41
60
|
* The external-CTA-into-dock-control morph. Composes the SAME kf `ElementMorph` +
|
|
@@ -47,12 +66,18 @@ export interface UseDockCtaReceiveReturn {
|
|
|
47
66
|
*
|
|
48
67
|
* @example
|
|
49
68
|
* ```ts
|
|
50
|
-
* const { receive, reset } = useDockCtaReceive(
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
69
|
+
* const { receive, setPending, clearPending, pending, reset } = useDockCtaReceive(
|
|
70
|
+
* ctaRef,
|
|
71
|
+
* {
|
|
72
|
+
* dockControl: dockTargetRef,
|
|
73
|
+
* preset: "snappy",
|
|
74
|
+
* onReceived: () => (ctaConsumed.value = true),
|
|
75
|
+
* },
|
|
76
|
+
* )
|
|
77
|
+
* // ARM the seat (the dock control shows the dim ghost + reserves its footprint).
|
|
78
|
+
* setPending()
|
|
79
|
+
* // on the CTA click: morph it into the dock (the default hand-off clearPending()s,
|
|
80
|
+
* // revealing the seated content with the opacity FLIP — no box jump).
|
|
56
81
|
* function onCta() { receive() }
|
|
57
82
|
* ```
|
|
58
83
|
*/
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter, type Ref } from "vue";
|
|
2
|
+
export interface UseScrollChromeOptions {
|
|
3
|
+
/** Opt-in: collapse on scroll. DEFAULT FALSE — persistent-by-default (the iOS-27 lesson). */
|
|
4
|
+
collapseOnScroll?: boolean;
|
|
5
|
+
/** The flip-delta debounce (px) before a direction flip commits. Default 8 (the reader's). */
|
|
6
|
+
flipDeltaPx?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Optional velocity gate (px/s): a flick over this collapses/expands IMMEDIATELY,
|
|
9
|
+
* a slow drag respects the threshold. Default off (undefined).
|
|
10
|
+
*/
|
|
11
|
+
velocityGate?: number;
|
|
12
|
+
/** Snap-to-nearest commits past this fraction of the collapse range on scroll-STOP. Default 0.5. */
|
|
13
|
+
snapMidpoint?: number;
|
|
14
|
+
/**
|
|
15
|
+
* The scroll distance over which the chrome travels 0→1 collapsed (px). Default 116
|
|
16
|
+
* (the citymall headerHeight×2 reference) — the trigger-point span.
|
|
17
|
+
*/
|
|
18
|
+
collapseRangePx?: number;
|
|
19
|
+
/**
|
|
20
|
+
* The chrome element (a dock, a header). When provided, the composable WRITES
|
|
21
|
+
* `--chrome-collapse-t` onto it directly (the JS leg of the dual-path single-writer)
|
|
22
|
+
* so the `.scroll-chrome` recipe reads it with no consumer `:style` plumbing. When
|
|
23
|
+
* absent, the consumer reads the `collapseT` ref and applies it itself.
|
|
24
|
+
*/
|
|
25
|
+
chromeRef?: MaybeRefOrGetter<HTMLElement | null>;
|
|
26
|
+
/** Honor `prefers-reduced-motion: reduce` (drop the ramp to a discrete snap). Default true. */
|
|
27
|
+
respectReducedMotion?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The scroll-STOP debounce window (ms) — the no-tick window after which the snap
|
|
30
|
+
* commits (the `onMomentumScrollEnd` analogue). Default 140 (a calm post-scroll beat).
|
|
31
|
+
*/
|
|
32
|
+
scrollStopMs?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface UseScrollChromeReturn {
|
|
35
|
+
/** 0..1 collapse fraction (drives the consumer's transform/opacity ramp). */
|
|
36
|
+
collapseT: Ref<number>;
|
|
37
|
+
/** True once collapseT past snapMidpoint (the discrete state). */
|
|
38
|
+
collapsed: Ref<boolean>;
|
|
39
|
+
/** Committed scroll direction (from the reader). */
|
|
40
|
+
direction: Ref<"down" | "up" | null>;
|
|
41
|
+
/** Force a re-read + re-evaluate (post-resize). */
|
|
42
|
+
recalculate: () => void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The floating-chrome collapse-state machine. COMPOSES `useScrollTrigger` (the ONE
|
|
46
|
+
* scroll reader); ramps `collapseT` on direction + `collapseRangePx`; the optional
|
|
47
|
+
* `velocityGate` short-circuits on a flick; snaps to the nearest endpoint on scroll-stop.
|
|
48
|
+
* Writes `--chrome-collapse-t` onto `chromeRef` (when given). PERSISTENT by default
|
|
49
|
+
* (`collapseOnScroll: false`).
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* const header = ref<HTMLElement | null>(null)
|
|
54
|
+
* useScrollChrome(() => window, { collapseOnScroll: true, chromeRef: header })
|
|
55
|
+
* // header.style sets --chrome-collapse-t; the .scroll-chrome recipe reads it.
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare function useScrollChrome(scrollContainer: MaybeRefOrGetter<HTMLElement | Window | null>, opts?: UseScrollChromeOptions): UseScrollChromeReturn;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter, type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* A declared trigger-point on the scroll source: a pixel offset, a 0..1 progress
|
|
4
|
+
* fraction (resolved against the source's scrollable extent), or a named element
|
|
5
|
+
* whose top crosses the source.
|
|
6
|
+
*/
|
|
7
|
+
export interface TriggerPoint {
|
|
8
|
+
/**
|
|
9
|
+
* A pixel offset on the scroll source, OR a 0..1 progress fraction (resolved
|
|
10
|
+
* against the source's scrollable extent), OR a named element whose top crosses
|
|
11
|
+
* the source.
|
|
12
|
+
*/
|
|
13
|
+
at: number | {
|
|
14
|
+
fraction: number;
|
|
15
|
+
} | {
|
|
16
|
+
element: MaybeRefOrGetter<HTMLElement | null>;
|
|
17
|
+
};
|
|
18
|
+
/** Fire on which crossing direction. Default "both". */
|
|
19
|
+
direction?: "down" | "up" | "both";
|
|
20
|
+
/** Stable id for the event payload + de-dup. */
|
|
21
|
+
id?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface UseScrollTriggerOptions {
|
|
24
|
+
triggers?: TriggerPoint[];
|
|
25
|
+
/**
|
|
26
|
+
* The flip-delta debounce (px) before a DIRECTION flip commits — the anti-thrash,
|
|
27
|
+
* mirroring the dock's HOVER_INTENT_MS=60ms hysteresis. Default 8 (the RN
|
|
28
|
+
* reference).
|
|
29
|
+
*/
|
|
30
|
+
flipDeltaPx?: number;
|
|
31
|
+
/** Resolve the continuous `progress` ref against the source (0..1). Default true. */
|
|
32
|
+
trackProgress?: boolean;
|
|
33
|
+
/** Honor `prefers-reduced-motion: reduce` (snap `progress` to discrete endpoints). Default true. */
|
|
34
|
+
respectReducedMotion?: boolean;
|
|
35
|
+
/** Crossed a trigger in the committed direction (fires ONCE per crossing). */
|
|
36
|
+
onCross?: (id: string, dir: "down" | "up", scrollPos: number) => void;
|
|
37
|
+
/** Crossed a trigger scrolling INTO its region (past it, in `down`). */
|
|
38
|
+
onEnter?: (id: string) => void;
|
|
39
|
+
/** Crossed OUT of a trigger's region (back before it, in `up`). */
|
|
40
|
+
onLeave?: (id: string) => void;
|
|
41
|
+
}
|
|
42
|
+
export interface UseScrollTriggerReturn {
|
|
43
|
+
/** Continuous 0..1 scroll progress off the SAME rAF read (native-timeline-gated). */
|
|
44
|
+
progress: Ref<number>;
|
|
45
|
+
/** Current scroll direction (committed past flipDeltaPx). */
|
|
46
|
+
direction: Ref<"down" | "up" | null>;
|
|
47
|
+
/** Current scroll velocity (px/s, framerate-independent — Δpos / Δt). */
|
|
48
|
+
velocity: Ref<number>;
|
|
49
|
+
/** Force a re-read + re-evaluate every trigger (post-resize/layout). */
|
|
50
|
+
recalculate: () => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The ONE scroll reader. Composes `createScrollReader` (the shared rAF-coalesced
|
|
54
|
+
* core); resolves triggers to px; emits direction/velocity/crossing; native-timeline-
|
|
55
|
+
* gated continuous ramp.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const { progress, direction, velocity } = useScrollTrigger(() => window, {
|
|
60
|
+
* triggers: [{ at: 120, id: "shrink", direction: "down" }],
|
|
61
|
+
* onCross(id, dir, pos) { // fires once when crossing 120px scrolling down
|
|
62
|
+
* if (id === "shrink" && dir === "down") collapseChrome()
|
|
63
|
+
* },
|
|
64
|
+
* })
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export declare function useScrollTrigger(scrollSource: MaybeRefOrGetter<HTMLElement | Window | null>, opts?: UseScrollTriggerOptions): UseScrollTriggerReturn;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type UseSpringOptions, type SpringRef } from "./useSpring";
|
|
2
2
|
export interface UseSpringPressOptions extends UseSpringOptions {
|
|
3
3
|
/**
|
|
4
|
-
* Spring `response`. Default 0.
|
|
5
|
-
*
|
|
6
|
-
* 100ms
|
|
4
|
+
* Spring `response`. Default `0.15s` — the `press` SPRING_PRESETS row (the
|
|
5
|
+
* Apple `interactiveSpring`): the sub-100ms iOS tap-press window, faster than
|
|
6
|
+
* the generic `useSpring` 0.5s so the feedback lands under the 100ms threshold.
|
|
7
7
|
*/
|
|
8
8
|
response?: number;
|
|
9
9
|
/**
|
|
10
|
-
* Spring `dampingFraction`. Default 0.
|
|
11
|
-
* springy
|
|
10
|
+
* Spring `dampingFraction`. Default `0.86` — the `press` row's ζ: a tiny
|
|
11
|
+
* sub-perceptual rebound (springy/alive) that does NOT ring.
|
|
12
12
|
*/
|
|
13
13
|
dampingFraction?: number;
|
|
14
14
|
}
|
|
@@ -25,4 +25,28 @@ export declare function useStaggerReveal(options?: StaggerRevealConfig): {
|
|
|
25
25
|
register: (el: HTMLElement | null, index?: number) => void;
|
|
26
26
|
revealed: Record<number, boolean>;
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* The `[data-scroll-reveal-once]` latch — BC.W-MOTION-PRESETS.
|
|
30
|
+
*
|
|
31
|
+
* The `scroll-driven.css` `[data-scroll-reveal]` recipe rides a native `view()`
|
|
32
|
+
* timeline that RE-FIRES its entrance every time a child re-enters the entry range
|
|
33
|
+
* — wrong for a virtualized/teleporting list (a row scrolls out + back and re-plays
|
|
34
|
+
* the fade-lift). A `view()` timeline cannot latch "play once" (the CSS limit), so
|
|
35
|
+
* the `[data-scroll-reveal-once]` opt-in plays the entrance ONCE: this directive
|
|
36
|
+
* adds `data-revealed=""` to each child on its FIRST cross and `unobserve`s it (the
|
|
37
|
+
* SAME `once: true` discipline `useStaggerReveal` runs above — `if (once)
|
|
38
|
+
* observer?.unobserve(el)`); the CSS plays the one-shot `gl-reveal-once` keyframe
|
|
39
|
+
* keyed off `[data-revealed]`, NOT the live `view()` range. NO second observer
|
|
40
|
+
* engine — the same `IntersectionObserver` the composable speaks for the `once`
|
|
41
|
+
* case, packaged as a Vue directive a consumer binds on the scroller.
|
|
42
|
+
*
|
|
43
|
+
* On an engine without `IntersectionObserver` (SSR/old) it reveals immediately so
|
|
44
|
+
* the terminal state is correct (the CSS animation simply never plays). Under PRM
|
|
45
|
+
* the scroll-driven.css `@media` outer gate drops the entrance and the row paints
|
|
46
|
+
* in-place (a flourish — the reveal carve, not a legibility cue).
|
|
47
|
+
*/
|
|
48
|
+
export declare const vScrollRevealOnce: {
|
|
49
|
+
mounted(scroller: HTMLElement): void;
|
|
50
|
+
unmounted(scroller: HTMLElement): void;
|
|
51
|
+
};
|
|
28
52
|
export {};
|
|
@@ -4,4 +4,7 @@ export type { SidebarFollowOptions } from "./useSidebarFollow";
|
|
|
4
4
|
export { useSidebarState } from "./useSidebarState";
|
|
5
5
|
export type { UseSidebarStateOptions, GenericSidebarState } from "./useSidebarState";
|
|
6
6
|
export { useTreeIndex, buildTreeIndex, isActive, isInActiveChain } from "./useTreeIndex";
|
|
7
|
-
export
|
|
7
|
+
export { useScrollTo } from "./useScrollTo";
|
|
8
|
+
export { useClickDelegate } from "./useClickDelegate";
|
|
9
|
+
export { useLazyLoader } from "./useLazyLoader";
|
|
10
|
+
export type { TreeNode, TreeIndexEntry, SidebarSection, SidebarIndexEntry, SidebarState, ScrollTrackerOptions, ScrollToOptions, ClickDelegateOptions, LazyLoaderOptions, } from "./types";
|