@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
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { type MaybeRef, type Ref } from "vue";
|
|
2
|
+
/** The five motion VECTORS a signature selects (geometry/motion, never an app name). */
|
|
3
|
+
export type MorphVector = "lateral" | "radial" | "inward" | "axial" | "directed";
|
|
4
|
+
/** The render TIER a morph resolves to (the caps ladder). */
|
|
5
|
+
export type MorphTier = "css" | "svg-goo" | "gpu";
|
|
6
|
+
/** The silhouette a body presents. `capture` = sample its clip-path → SDF (Tier-G, the
|
|
7
|
+
* arbitrary-outline element→element morph — HARD-gated on useElementBloom). */
|
|
8
|
+
export type MorphSilhouette = "circle" | "squircle" | "capture";
|
|
9
|
+
/** A measured rectangle (the body endpoints; left/top/width/height in host-local px). */
|
|
10
|
+
export interface MorphFieldRect {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The motion SIGNATURE — DATA, the only thing that distinguishes the morphs. `vector`
|
|
18
|
+
* picks the geometry; `kRest`/`kPeak` are gap-FRACTIONS (not px) the threshold band
|
|
19
|
+
* scales by; `neckHold` is how long the neck holds before it pinches; `maxStretch` the
|
|
20
|
+
* LOW squish cap (the anti-taffy fence).
|
|
21
|
+
*/
|
|
22
|
+
export interface MorphSignature {
|
|
23
|
+
vector: MorphVector;
|
|
24
|
+
/** The neck-gap fraction at REST (bodies apart) — the threshold band floor. */
|
|
25
|
+
kRest: number;
|
|
26
|
+
/** The neck-gap fraction at the PEAK (bodies near, the gooey waist) — the band ceiling. */
|
|
27
|
+
kPeak: number;
|
|
28
|
+
/** How long (0..1 of t) the neck HOLDS its girth before it pinches (the tense pop). */
|
|
29
|
+
neckHold: number;
|
|
30
|
+
/** The LOW on-axis squish cap (≤~1.14 — the loud register lives in NECK girth, not body taffy). */
|
|
31
|
+
maxStretch: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The canonical, motion-named SIGNATURE map (DATA — F3, the FLOOR). Every consumer
|
|
35
|
+
* passes a `MorphSignatureName`; one weld reads the row; one recipe paints it. NO app
|
|
36
|
+
* names, NO three code paths.
|
|
37
|
+
*/
|
|
38
|
+
export declare const MORPH_SIGNATURES: {
|
|
39
|
+
/** carousel / deck / pager goo: two equal beads bud apart, a concave neck wells, the
|
|
40
|
+
* filter merges them into one barbell with a thin pinched waist, then they coalesce. */
|
|
41
|
+
readonly lateralNeck: {
|
|
42
|
+
readonly vector: "lateral";
|
|
43
|
+
readonly kRest: 0.92;
|
|
44
|
+
readonly kPeak: 0.34;
|
|
45
|
+
readonly neckHold: 0.5;
|
|
46
|
+
readonly maxStretch: 1.12;
|
|
47
|
+
};
|
|
48
|
+
/** dock fission media: the now-playing anchor stays; flanking transport PEELS along
|
|
49
|
+
* the cross axis with a long tapering neck tail. */
|
|
50
|
+
readonly lateralPeel: {
|
|
51
|
+
readonly vector: "lateral";
|
|
52
|
+
readonly kRest: 0.88;
|
|
53
|
+
readonly kPeak: 0.4;
|
|
54
|
+
readonly neckHold: 0.4;
|
|
55
|
+
readonly maxStretch: 1.08;
|
|
56
|
+
};
|
|
57
|
+
/** dock fission search: controls fly outward like a bloom; the neck NECKS LATE (the
|
|
58
|
+
* tense radial pop), innermost-first — an outward ripple, not a simultaneous scatter. */
|
|
59
|
+
readonly radialBurst: {
|
|
60
|
+
readonly vector: "radial";
|
|
61
|
+
readonly kRest: 0.85;
|
|
62
|
+
readonly kPeak: 0.3;
|
|
63
|
+
readonly neckHold: 0.55;
|
|
64
|
+
readonly maxStretch: 1.08;
|
|
65
|
+
};
|
|
66
|
+
/** dock fission nav: the negative radial — N masses collapse INWARD to ONE; the bridge
|
|
67
|
+
* runs backward; --stretch peaks at coalescence. */
|
|
68
|
+
readonly inwardMerge: {
|
|
69
|
+
readonly vector: "inward";
|
|
70
|
+
readonly kRest: 0.8;
|
|
71
|
+
readonly kPeak: 0.28;
|
|
72
|
+
readonly neckHold: 0.35;
|
|
73
|
+
readonly maxStretch: 1.1;
|
|
74
|
+
};
|
|
75
|
+
/** dock V↔H: column-mass + row-mass are two distributions in ONE topology-free field;
|
|
76
|
+
* a gooey teardrop LOBS column→row through the midpoint (no crossfade dodge). */
|
|
77
|
+
readonly axialNeck: {
|
|
78
|
+
readonly vector: "axial";
|
|
79
|
+
readonly kRest: 0.9;
|
|
80
|
+
readonly kPeak: 0.36;
|
|
81
|
+
readonly neckHold: 0.5;
|
|
82
|
+
readonly maxStretch: 1.14;
|
|
83
|
+
};
|
|
84
|
+
/** dock collapse: the DEGENERATE 1-body field — a single mass squishes between two
|
|
85
|
+
* footprints (no waist, Tier-C). The ratio-free convex blend. */
|
|
86
|
+
readonly collapse: {
|
|
87
|
+
readonly vector: "axial";
|
|
88
|
+
readonly kRest: 1;
|
|
89
|
+
readonly kPeak: 1;
|
|
90
|
+
readonly neckHold: 0;
|
|
91
|
+
readonly maxStretch: 1.14;
|
|
92
|
+
};
|
|
93
|
+
/** drag morph: a grabbed rect → drop rect, an optional directed neck. */
|
|
94
|
+
readonly directed: {
|
|
95
|
+
readonly vector: "directed";
|
|
96
|
+
readonly kRest: 0.9;
|
|
97
|
+
readonly kPeak: 0.42;
|
|
98
|
+
readonly neckHold: 0.45;
|
|
99
|
+
readonly maxStretch: 1.1;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export type MorphSignatureName = keyof typeof MORPH_SIGNATURES;
|
|
103
|
+
/** A warm "body" the field welds — a measured endpoint pair + an optional silhouette. */
|
|
104
|
+
export interface BodySpec {
|
|
105
|
+
/** The DOM node this body IS (the weld writes its transform). */
|
|
106
|
+
el: Ref<HTMLElement | null>;
|
|
107
|
+
/** The body's REST rect (t=0), measured ONCE (dock-core: no per-frame measure). */
|
|
108
|
+
at0: () => MorphFieldRect;
|
|
109
|
+
/** The body's TARGET rect (t=1), measured ONCE. */
|
|
110
|
+
at1: () => MorphFieldRect;
|
|
111
|
+
/** The body diameter (px). Default `min(width,height)/φ` — a golden-minor BLOB. */
|
|
112
|
+
radius?: () => number;
|
|
113
|
+
/** circle (default) / squircle / capture (arbitrary outline → Tier-G, HARD-gated). */
|
|
114
|
+
silhouette?: MorphSilhouette;
|
|
115
|
+
}
|
|
116
|
+
export interface MorphFieldOptions {
|
|
117
|
+
/** 1..N warm masses. 1 body = collapse (no weld); 2 = a neck; (1+N) = fission. */
|
|
118
|
+
bodies: MaybeRef<BodySpec[]>;
|
|
119
|
+
/** The motion signature NAME (DATA). The weld reads its row from MORPH_SIGNATURES. */
|
|
120
|
+
signature: MorphSignatureName;
|
|
121
|
+
/**
|
|
122
|
+
* The EXISTING drive scalar this weld READS off the host (NO rename). Default
|
|
123
|
+
* `--goo-t`; dock passes `--dock-morph-t`, fission `--neck-t`. The consumer's
|
|
124
|
+
* spring/rAF writes it; the weld only samples + projects.
|
|
125
|
+
*/
|
|
126
|
+
driveVar?: string;
|
|
127
|
+
/** The host the drive scalar + the dedicated squish channel are read/written on. */
|
|
128
|
+
hostRef: Ref<HTMLElement | null>;
|
|
129
|
+
/** The cartoon-weight scalar source. Read live off the host `--motion-weight` if absent. */
|
|
130
|
+
weight?: MaybeRef<number>;
|
|
131
|
+
/** The render tier. `auto` (default) resolves from caps + body count + signature. */
|
|
132
|
+
tier?: MorphTier | "auto";
|
|
133
|
+
/** Travel axis for the neck span. `false` (default) horizontal, `true` vertical. */
|
|
134
|
+
vertical?: MaybeRef<boolean>;
|
|
135
|
+
}
|
|
136
|
+
export interface MorphFieldHandle {
|
|
137
|
+
/** Mirror of the consumer's drive scalar (last sampled). Read-only. */
|
|
138
|
+
readonly t: Readonly<Ref<number>>;
|
|
139
|
+
/** The neck waist FRACTION (waist/body) at the current frame — for π readback. */
|
|
140
|
+
readonly waist: Readonly<Ref<number>>;
|
|
141
|
+
/** The resolved render tier. */
|
|
142
|
+
readonly tier: Readonly<Ref<MorphTier>>;
|
|
143
|
+
/**
|
|
144
|
+
* PROJECT the field for an explicit drive value `t` (0..1). Reads the masses'
|
|
145
|
+
* measured endpoints + the signature, writes each body's transform + the welling
|
|
146
|
+
* neck + the dedicated squish channel + the live waist. The consumer calls this from
|
|
147
|
+
* its OWN rAF/spring callback (the weld owns no clock).
|
|
148
|
+
*/
|
|
149
|
+
project(t: number): void;
|
|
150
|
+
/**
|
|
151
|
+
* SEAT the endpoint silhouette at `t` with ZERO neck frames (the PRM cut / first
|
|
152
|
+
* paint). One resting mass at the endpoint, neck hidden, --stretch 1. The consumer's
|
|
153
|
+
* PRM branch calls this.
|
|
154
|
+
*/
|
|
155
|
+
seat(t: number): void;
|
|
156
|
+
}
|
|
157
|
+
export declare function useMorphField(opts: MorphFieldOptions): MorphFieldHandle;
|
|
@@ -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,49 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter, type Ref } from "vue";
|
|
2
|
+
import type { ComponentPublicInstance } from "vue";
|
|
3
|
+
import type { ScrollSource } from "./scrollReader";
|
|
4
|
+
export interface UseScrollPinOptions {
|
|
5
|
+
/**
|
|
6
|
+
* The tall `.scroll-pin` container (a templateRef to the element or a component). Its
|
|
7
|
+
* `getBoundingClientRect` gives the pin-slice ratio; `--pin-t` is written onto it (it
|
|
8
|
+
* `inherits: true` so the sticky stage + phase children read it).
|
|
9
|
+
*/
|
|
10
|
+
container: MaybeRefOrGetter<HTMLElement | ComponentPublicInstance | null>;
|
|
11
|
+
/**
|
|
12
|
+
* The scroll source the pin tracks — the demo passes `main.demo-main-scroller`. Passed
|
|
13
|
+
* EXPLICITLY (the reader does not auto-discover). Default: the window/document.
|
|
14
|
+
*/
|
|
15
|
+
source?: MaybeRefOrGetter<ScrollSource>;
|
|
16
|
+
/**
|
|
17
|
+
* The pin scrub ∈ [0, 1] — the pin drifts HEAVIER than a control (a scene, not a knob).
|
|
18
|
+
* Defaults to 1/φ² ≈ 0.382 (the golden heavier-drift rest). PRM → 0.
|
|
19
|
+
*/
|
|
20
|
+
scrub?: number;
|
|
21
|
+
/** The spring damping ratio ζ for the felt reveal. < 1 overshoots. Default 0.85. */
|
|
22
|
+
dampingFraction?: number;
|
|
23
|
+
/** Honor `prefers-reduced-motion: reduce`. Default true. */
|
|
24
|
+
respectReducedMotion?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface UseScrollPinReturn {
|
|
27
|
+
/** The spring-damped 0..1 pin progress (reactive — mirrors `--pin-t`). */
|
|
28
|
+
pinT: Readonly<Ref<number>>;
|
|
29
|
+
/** Force a re-read (post-resize). */
|
|
30
|
+
recalculate: () => void;
|
|
31
|
+
/** Detach. */
|
|
32
|
+
dispose: () => void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Drive `--pin-t` ∈ [0, 1] onto a sticky `.scroll-pin` stage off the real scroll port,
|
|
36
|
+
* spring-damped so the pinned reveal arrives with inertia, overshoots, then settles. The
|
|
37
|
+
* phase recipes (`.scroll-pin-phase-reveal` / `-settle`) read `--pin-t` — no
|
|
38
|
+
* `animation-timeline`, every engine.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const pinContainer = ref<HTMLElement | null>(null)
|
|
43
|
+
* useScrollPin({
|
|
44
|
+
* container: pinContainer,
|
|
45
|
+
* source: () => document.querySelector<HTMLElement>("main.demo-main-scroller"),
|
|
46
|
+
* })
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function useScrollPin(options: UseScrollPinOptions): UseScrollPinReturn;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter, type Ref } from "vue";
|
|
2
|
+
import { type ScrollReader, type ScrollSource } from "./scrollReader";
|
|
3
|
+
/** The smoother register — a pure-lag low-pass (`SmoothProgress`) or an overshooting
|
|
4
|
+
* spring (`SpringProgress`). The FELT reveal wants the spring (it overshoots, then
|
|
5
|
+
* settles — the cartoon slam); the pure-lag legs (a progress number) want the smooth. */
|
|
6
|
+
export type ScrollSceneRegister = "smooth" | "spring";
|
|
7
|
+
export interface UseScrollSceneOptions {
|
|
8
|
+
/**
|
|
9
|
+
* The scroll source — an element with its own scroll port (the demo passes
|
|
10
|
+
* `main.demo-main-scroller`), the Window, or null. Resolved by `createScrollReader`:
|
|
11
|
+
* an HTMLElement listens on itself, else the document/window. Passed EXPLICITLY (the
|
|
12
|
+
* reader does NOT auto-discover a scroller).
|
|
13
|
+
*/
|
|
14
|
+
source: MaybeRefOrGetter<ScrollSource>;
|
|
15
|
+
/**
|
|
16
|
+
* Map a fresh reader read to the raw 0..1 target this scene tracks. Default: the
|
|
17
|
+
* reader's own `position()/extent()` extent-relative progress. A pin passes a custom
|
|
18
|
+
* mapper keyed off a per-tick `getBoundingClientRect` (the pin-slice ratio).
|
|
19
|
+
*/
|
|
20
|
+
map?: (reader: ScrollReader) => number;
|
|
21
|
+
/**
|
|
22
|
+
* The liquid-weight scrub ∈ [0, 1] — how much lag the scroll carries. 0 = a 1:1 snap
|
|
23
|
+
* (no weight); higher = heavier drift. Defaults to 1/φ ≈ 0.618 (the golden
|
|
24
|
+
* liquid-weight rest); a call site overrides per scene. PRM → 0. Mapped to the engine
|
|
25
|
+
* damping by `scrubToDamping` (a STATED function, no magic affine constants).
|
|
26
|
+
*/
|
|
27
|
+
scrub?: number;
|
|
28
|
+
/** The smoother register (default `smooth` — the pure-lag low-pass). */
|
|
29
|
+
register?: ScrollSceneRegister;
|
|
30
|
+
/**
|
|
31
|
+
* For the `spring` register: the damping ratio ζ. < 1 overshoots (the felt slam),
|
|
32
|
+
* 0.85 ≈ the `--spring-gentle` identity. Default 0.85. Ignored for `smooth`.
|
|
33
|
+
*/
|
|
34
|
+
dampingFraction?: number;
|
|
35
|
+
/** The element the damped value is written onto as a custom property (when bound). */
|
|
36
|
+
bindEl?: MaybeRefOrGetter<HTMLElement | null>;
|
|
37
|
+
/** The custom property name to write the damped 0..1 onto (e.g. `--pin-t`). */
|
|
38
|
+
property?: string;
|
|
39
|
+
/** Honor `prefers-reduced-motion: reduce` (scrub → 0, snap 1:1). Default true. */
|
|
40
|
+
respectReducedMotion?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface UseScrollSceneReturn {
|
|
43
|
+
/** The spring-damped 0..1 progress (reactive). The single writer of every felt axis. */
|
|
44
|
+
progress: Readonly<Ref<number>>;
|
|
45
|
+
/** Force a coalesced re-read + re-target now (post-resize / layout shift). */
|
|
46
|
+
recalculate: () => void;
|
|
47
|
+
/** Detach the reader + stop the smoother. */
|
|
48
|
+
dispose: () => void;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The liquid-weight scroll spine. Composes the ONE `createScrollReader` + a keyframes.js
|
|
52
|
+
* smoother (`SmoothProgress` / `SpringProgress`); on each coalesced scroll tick it sets the
|
|
53
|
+
* smoother target to the mapped raw progress; the smoother converges with inertia and keeps
|
|
54
|
+
* moving after scroll stops (the liquid weight). Writes the damped 0..1 to `progress` + the
|
|
55
|
+
* optional `property` on `bindEl`.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const { progress } = useScrollScene({
|
|
60
|
+
* source: () => document.querySelector<HTMLElement>("main.demo-main-scroller"),
|
|
61
|
+
* scrub: 0.618,
|
|
62
|
+
* bindEl: stageRef,
|
|
63
|
+
* property: "--scroll-t",
|
|
64
|
+
* })
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export declare function useScrollScene(options: UseScrollSceneOptions): UseScrollSceneReturn;
|
|
@@ -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";
|
|
@@ -4,9 +4,13 @@ export interface TreeNode {
|
|
|
4
4
|
id: string;
|
|
5
5
|
children?: TreeNode[];
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
/**
|
|
8
|
+
* The flat-hierarchy fields shared by every flattened tree row. Both the
|
|
9
|
+
* sidebar's `TreeIndexEntry` and the virtual-windowing `FlatSection`
|
|
10
|
+
* (`composables/virtual`) extend this — the four fields are declared ONCE,
|
|
11
|
+
* not redeclared independently (BC.W-VIRTUAL-WINDOW type-reconcile).
|
|
12
|
+
*/
|
|
13
|
+
export interface SectionHierarchy {
|
|
10
14
|
depth: number;
|
|
11
15
|
/** ID of the root-level ancestor (self.id when depth === 0). */
|
|
12
16
|
rootId: string;
|
|
@@ -15,6 +19,10 @@ export interface TreeIndexEntry<T extends TreeNode = TreeNode> {
|
|
|
15
19
|
/** Index within root-level nodes. */
|
|
16
20
|
rootIndex: number;
|
|
17
21
|
}
|
|
22
|
+
/** Generic flat index entry for a tree node. */
|
|
23
|
+
export interface TreeIndexEntry<T extends TreeNode = TreeNode> extends SectionHierarchy {
|
|
24
|
+
node: T;
|
|
25
|
+
}
|
|
18
26
|
/** A section in the sidebar tree. */
|
|
19
27
|
export interface SidebarSection extends TreeNode {
|
|
20
28
|
title: string;
|
|
@@ -29,6 +37,63 @@ export interface ScrollTrackerOptions {
|
|
|
29
37
|
rootMargin?: string;
|
|
30
38
|
threshold?: number;
|
|
31
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Options for `useScrollTo` — the rAF-retry scroll-to-id + treeIndex-aware
|
|
42
|
+
* partial-load (the ToC-click → virtual-window warm bridge).
|
|
43
|
+
*
|
|
44
|
+
* GENERIC-count-sourced: `totalCount`/`visibleCount` are plain params, NEVER a
|
|
45
|
+
* consumer type. When a `treeIndex` is passed, `ensureTargetLoaded` loads only
|
|
46
|
+
* up to the target section's `rootIndex + 2` (the partial-load) instead of
|
|
47
|
+
* force-loading everything.
|
|
48
|
+
*/
|
|
49
|
+
export interface ScrollToOptions {
|
|
50
|
+
/** The scroll container element to scroll within. */
|
|
51
|
+
scrollContainer: Ref<HTMLElement | null>;
|
|
52
|
+
/** Total number of items/sections (the generic count ceiling). */
|
|
53
|
+
totalCount: number;
|
|
54
|
+
/** The progressively-rendered count this leaf writes the partial-load into. */
|
|
55
|
+
visibleCount: Ref<number>;
|
|
56
|
+
/** Pixel offset from the container top. Default: 16 */
|
|
57
|
+
scrollOffset?: number;
|
|
58
|
+
/** Max rAF retry attempts before bailing. Default: 60 */
|
|
59
|
+
maxAttempts?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Tree index for resolving a target id to its root section index. When
|
|
62
|
+
* provided, `scrollTo` loads only up to the target's root section + buffer
|
|
63
|
+
* (`rootIndex + 2`) instead of all content. Shares the same `TreeIndexEntry`
|
|
64
|
+
* the windowing `FlatSection` hierarchy fields reconcile with.
|
|
65
|
+
*/
|
|
66
|
+
treeIndex?: Map<string, TreeIndexEntry>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Options for `useClickDelegate` — the ONE delegated `[data-scroll-target]`
|
|
70
|
+
* click→scroll handler for an entire ToC (not N per-link listeners).
|
|
71
|
+
*/
|
|
72
|
+
export interface ClickDelegateOptions {
|
|
73
|
+
/** Container element to attach the single delegated listener to. */
|
|
74
|
+
container: Ref<HTMLElement | null>;
|
|
75
|
+
/** CSS selector for clickable elements. Default: "[data-scroll-target]" */
|
|
76
|
+
selector?: string;
|
|
77
|
+
/** Attribute to read the target id from. Default: "data-scroll-target" */
|
|
78
|
+
attribute?: string;
|
|
79
|
+
/** Maps the attribute value to a scroll-target id. Return null to skip. */
|
|
80
|
+
resolve: (value: string) => string | null;
|
|
81
|
+
/** Called with the resolved id (typically `useScrollTo`'s `scrollTo`). */
|
|
82
|
+
scrollTo: (id: string) => void;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Options for `useLazyLoader` — the progressive batch-render count. Distinct
|
|
86
|
+
* from `useInfiniteScroll` (which fires a data-fetch `onLoadMore` trigger):
|
|
87
|
+
* the lazy-loader grows a RENDER-MOUNT count over an already-loaded list.
|
|
88
|
+
*/
|
|
89
|
+
export interface LazyLoaderOptions {
|
|
90
|
+
/** Sections rendered per batch. Default: 2 */
|
|
91
|
+
batchSize?: number;
|
|
92
|
+
/** IntersectionObserver rootMargin for the bottom sentinel. Default: "0px 0px 600px 0px" */
|
|
93
|
+
rootMargin?: string;
|
|
94
|
+
/** Scroll container for the fast-drag scroll fallback. Falls back to document. */
|
|
95
|
+
scrollContainer?: Ref<HTMLElement | null>;
|
|
96
|
+
}
|
|
32
97
|
/** Reactive state returned by `useSidebarState`. */
|
|
33
98
|
export interface SidebarState {
|
|
34
99
|
sections: SidebarSection[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { LazyLoaderOptions } from "./types";
|
|
2
|
+
export declare function useLazyLoader(totalCount: number, options?: LazyLoaderOptions): {
|
|
3
|
+
visibleCount: import("vue").Ref<number, number>;
|
|
4
|
+
loadSentinel: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
|
|
5
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { useVirtualSectionWindow, clearSessionHeightCache, } from "./useVirtualSectionWindow";
|
|
2
|
+
export { useWindowedStore } from "./useWindowedStore";
|
|
3
|
+
export { buildSectionLayout, findSectionOffset, resolveActiveSection, resolveSectionWindow, } from "./virtualSectionLayout";
|
|
4
|
+
export type { FlatSection, SectionLayout, SectionWindowRange, ForcedSectionWindowRange, } from "./virtualSectionLayout";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter, type Ref } from "vue";
|
|
2
|
+
import type { FlatSection } from "./virtualSectionLayout";
|
|
3
|
+
/**
|
|
4
|
+
* Lineage: a glass-ui primitive at v0.9.4, retired at v1.0 (MIGRATION.md §3.2),
|
|
5
|
+
* carried on as a verbatim transposed copy in the words app, and HOME again at
|
|
6
|
+
* BC (the live words consumer + the dock-search results list overturn the
|
|
7
|
+
* no-consumer retirement verdict). Byte-faithful to the proven words copy save
|
|
8
|
+
* the recorded refinements: the container/content ResizeObservers route through
|
|
9
|
+
* the house `useResizeObserver` leaf (cleanup discipline) instead of raw
|
|
10
|
+
* `new ResizeObserver`, and `findSectionOffset` is the binary-search variant.
|
|
11
|
+
*/
|
|
12
|
+
interface VirtualWindowConfig<T extends FlatSection = FlatSection> {
|
|
13
|
+
/** The flat list of section items to virtualize. */
|
|
14
|
+
items: MaybeRefOrGetter<readonly T[]>;
|
|
15
|
+
/**
|
|
16
|
+
* The element whose scroll position drives the window.
|
|
17
|
+
* `null` = use `window` / document scroll.
|
|
18
|
+
*/
|
|
19
|
+
scrollContainer: Ref<HTMLElement | null>;
|
|
20
|
+
/**
|
|
21
|
+
* The wrapper element around the virtualized content.
|
|
22
|
+
* When provided, scroll offset is computed relative to this element's
|
|
23
|
+
* position in the page, so content above it (headers, images, etc.)
|
|
24
|
+
* is correctly excluded from the layout calculation.
|
|
25
|
+
*/
|
|
26
|
+
contentEl?: Ref<HTMLElement | null>;
|
|
27
|
+
/** Overscan before the viewport in pixels. Default: viewport height. */
|
|
28
|
+
overscanBeforePx?: number;
|
|
29
|
+
/** Overscan after the viewport in pixels. Default: 2x viewport height. */
|
|
30
|
+
overscanAfterPx?: number;
|
|
31
|
+
/** Number of items to warm before a target when using `ensureTargetWindow`. Default: 2. */
|
|
32
|
+
warmTargetBefore?: number;
|
|
33
|
+
/** Number of items to warm after a target when using `ensureTargetWindow`. Default: 3. */
|
|
34
|
+
warmTargetAfter?: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Evict every cached measured section height. The documented escape for a
|
|
38
|
+
* consumer that wants to drop the module-global `SESSION_HEIGHT_CACHE` (a
|
|
39
|
+
* font-size change, a layout reflow that invalidates prior measurements).
|
|
40
|
+
*/
|
|
41
|
+
export declare function clearSessionHeightCache(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Scroll-based virtual windowing composable for section lists.
|
|
44
|
+
*
|
|
45
|
+
* Renders only the items visible in (or near) the scroll viewport,
|
|
46
|
+
* using spacer divs to maintain correct scroll height. Supports:
|
|
47
|
+
*
|
|
48
|
+
* - Measured heights: call `measureSection(id, el)` from a template ref
|
|
49
|
+
* to replace estimated heights with real DOM measurements.
|
|
50
|
+
* - Warm targeting: call `ensureTargetWindow(id)` to force an item into
|
|
51
|
+
* the render window before scrolling to it (auto-releases after 320ms).
|
|
52
|
+
* - Active tracking: `activeId` / `activeRootId` report which section
|
|
53
|
+
* is currently at the 20% viewport mark. NOTE — this is the windowing-LOCAL
|
|
54
|
+
* render-active reader; a ToC/sidebar consumer reads `useScrollTracker`'s
|
|
55
|
+
* `activeId` (the deepest-visible reader) for the binding highlight. The two
|
|
56
|
+
* serve distinct concerns and are deliberately NOT one function
|
|
57
|
+
* (BC.W-VIRTUAL-WINDOW active-section reconcile).
|
|
58
|
+
* - Content offset: provide `contentEl` to correctly handle non-virtualized
|
|
59
|
+
* content (headers, banners) above the virtual list.
|
|
60
|
+
*/
|
|
61
|
+
export declare function useVirtualSectionWindow<T extends FlatSection>(options: VirtualWindowConfig<T>): {
|
|
62
|
+
visibleItems: import("vue").ComputedRef<T[]>;
|
|
63
|
+
topSpacerPx: import("vue").ComputedRef<number>;
|
|
64
|
+
bottomSpacerPx: import("vue").ComputedRef<number>;
|
|
65
|
+
measureSection: (id: string, el: HTMLElement | null) => void;
|
|
66
|
+
ensureTargetWindow: (id: string) => void;
|
|
67
|
+
getOffsetFor: (id: string) => number | null;
|
|
68
|
+
activeId: import("vue").ComputedRef<any>;
|
|
69
|
+
activeRootId: import("vue").ComputedRef<any>;
|
|
70
|
+
recalculate: () => void;
|
|
71
|
+
};
|
|
72
|
+
export {};
|