@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,761 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-gLzyemvl.js";
|
|
2
|
+
import { t } from "./usePointerVelocityField-BrkqZFhj.js";
|
|
3
|
+
import { n, o as r } from "./procedural-color.wgsl-C1Y5PkM6.js";
|
|
4
|
+
import { t as i } from "./flow.glsl-DqEGRpl4.js";
|
|
5
|
+
import { a, t as o } from "./useGpuSubstrate-Ceet70xq.js";
|
|
6
|
+
import { c as s, t as c } from "./color-B9jZdhJX.js";
|
|
7
|
+
import { a as l, d as u, f as d, i as f, n as p, o as m, p as h, r as g, t as _ } from "./paperGrid-CXCSMbZ1.js";
|
|
8
|
+
import { computed as v, createElementBlock as y, createElementVNode as b, defineComponent as x, normalizeStyle as S, onMounted as C, onScopeDispose as w, openBlock as T, reactive as E, useTemplateRef as D, watch as O } from "vue";
|
|
9
|
+
//#region src/components/custom/paper-grid/shaders/paper-grid.wgsl.ts
|
|
10
|
+
var k = `
|
|
11
|
+
const TAU: f32 = 6.283185307179586;
|
|
12
|
+
|
|
13
|
+
// ── Paper-grid uniforms (the typed-struct source-of-truth — see uniformBridgeWGPU.ts) ──
|
|
14
|
+
struct PaperGridUniforms {
|
|
15
|
+
// u0: (uTime, uGridScale, uMinorPitch, uMajorEvery)
|
|
16
|
+
u0: vec4<f32>,
|
|
17
|
+
// face: (uFaceAlpha, uFaceRelief, uSquashK, uBaseInset) — the height-lit FACE (re-points the retired warp lane)
|
|
18
|
+
face: vec4<f32>,
|
|
19
|
+
// warp2: (uAmplitude, uAspect, uLightDirX, uLightDirY) — aspect + the cel key-light
|
|
20
|
+
warp2: vec4<f32>,
|
|
21
|
+
// grid: (uTargetWidth, uTargetWidthMajor, uMinorAlpha, uMajorAlpha)
|
|
22
|
+
grid: vec4<f32>,
|
|
23
|
+
// field: (uFieldAlpha, uHasBackground, _pad, _pad)
|
|
24
|
+
field: vec4<f32>,
|
|
25
|
+
// cursor: (uCursorX, uCursorY, uSwirlStrength, uSwirlRadius)
|
|
26
|
+
cursor: vec4<f32>,
|
|
27
|
+
// cursor2: (uBulgeMode, uInteractive, _pad, _pad)
|
|
28
|
+
cursor2: vec4<f32>,
|
|
29
|
+
// line: (uLineColor.rgb (linear), _pad)
|
|
30
|
+
line: vec4<f32>,
|
|
31
|
+
// bg: (uBg.rgb (linear), _pad)
|
|
32
|
+
bg: vec4<f32>,
|
|
33
|
+
// wave: (waveDirX, waveDirY, waveK, waveOmega) — the traveling-wave crest
|
|
34
|
+
wave: vec4<f32>,
|
|
35
|
+
// wave2: (waveSigma, twistMax, shearMax, amp) — the cell-twist envelope (amp: spring-eased)
|
|
36
|
+
wave2: vec4<f32>,
|
|
37
|
+
// faceLo: (rose-umber trough .rgb (linear), _pad) — the warm-divergent ramp (FOLD B, 3-stop)
|
|
38
|
+
faceLo: vec4<f32>,
|
|
39
|
+
// faceMid: (ember-amber mid .rgb (linear), _pad)
|
|
40
|
+
faceMid: vec4<f32>,
|
|
41
|
+
// faceHi: (warm-wheat crest .rgb (linear), _pad)
|
|
42
|
+
faceHi: vec4<f32>,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
@group(0) @binding(0) var<uniform> u: PaperGridUniforms;
|
|
46
|
+
|
|
47
|
+
${n}
|
|
48
|
+
|
|
49
|
+
// ── The host noise basis (transcribes paperGrid.ts hash21/valueNoise/potentialFBM) ──
|
|
50
|
+
// A quintic-faded 2D value-noise fbm potential — the SAME basis the dot-flow-field carries
|
|
51
|
+
// (so the suite speaks ONE noise basis). DECLARED ABOVE the curl splice (WGSL has no forward
|
|
52
|
+
// declaration — a function may only call one declared earlier).
|
|
53
|
+
fn hash21(x: f32, y: f32) -> f32 {
|
|
54
|
+
var px = fract(x * 0.1031);
|
|
55
|
+
var py = fract(y * 0.1031);
|
|
56
|
+
var pz = fract(x * 0.1031);
|
|
57
|
+
let d = px * (py + 33.33) + py * (pz + 33.33) + pz * (px + 33.33);
|
|
58
|
+
px = px + d;
|
|
59
|
+
py = py + d;
|
|
60
|
+
pz = pz + d;
|
|
61
|
+
return fract((px + py) * pz);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
fn valueNoise(x: f32, y: f32) -> f32 {
|
|
65
|
+
let ix = floor(x);
|
|
66
|
+
let iy = floor(y);
|
|
67
|
+
let fx = x - ix;
|
|
68
|
+
let fy = y - iy;
|
|
69
|
+
let ux = fx * fx * fx * (fx * (fx * 6.0 - 15.0) + 10.0);
|
|
70
|
+
let uy = fy * fy * fy * (fy * (fy * 6.0 - 15.0) + 10.0);
|
|
71
|
+
let a = hash21(ix, iy);
|
|
72
|
+
let b = hash21(ix + 1.0, iy);
|
|
73
|
+
let c = hash21(ix, iy + 1.0);
|
|
74
|
+
let d2 = hash21(ix + 1.0, iy + 1.0);
|
|
75
|
+
return mix(mix(a, b, ux), mix(c, d2, ux), uy);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// The 3-octave scalar fbm potential — the host noise basis the curl operator wraps.
|
|
79
|
+
fn potentialFBM(p: vec2f) -> f32 {
|
|
80
|
+
var v = 0.0;
|
|
81
|
+
var amp = 0.5;
|
|
82
|
+
var freq = 1.0;
|
|
83
|
+
var px = p.x;
|
|
84
|
+
var py = p.y;
|
|
85
|
+
for (var i = 0; i < 3; i = i + 1) {
|
|
86
|
+
v = v + amp * valueNoise(px * freq, py * freq);
|
|
87
|
+
// FBM_ROT mat2(0.8, 0.6, -0.6, 0.8) — same rotation as the shared chunk.
|
|
88
|
+
let rx = 0.8 * px - 0.6 * py;
|
|
89
|
+
let ry = 0.6 * px + 0.8 * py;
|
|
90
|
+
px = rx;
|
|
91
|
+
py = ry;
|
|
92
|
+
freq = freq * 2.0;
|
|
93
|
+
amp = amp * 0.5;
|
|
94
|
+
}
|
|
95
|
+
return v;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// The shared divergence-free 2D-curl operator (flow.wgsl.ts — the FIRST WGSL curl consumer).
|
|
99
|
+
${h}
|
|
100
|
+
|
|
101
|
+
// The shared traveling-wave CELL-WARP chunk (waveField.wgsl.ts — cellTwist/cursorSwirl/
|
|
102
|
+
// travelingEnvelope; splices AFTER valueNoise + curlFBM are declared). paper-grid + concentric
|
|
103
|
+
// share this EXACTLY — the cell-local twist replaces the retired LINE-warp (the C3 cure: the
|
|
104
|
+
// boxes twist about their own center, the lines stay locally straight).
|
|
105
|
+
${d}
|
|
106
|
+
|
|
107
|
+
// ── §1 The crisp line: Ben Golus derivative-AA grid coverage (transcribes gridCoverage) ──
|
|
108
|
+
// targetWidth is the line half-width in GRID UNITS (lineWidthPx / minorPitchPx); uvDeriv is
|
|
109
|
+
// the per-axis screen-space derivative of g (length(vec2(dpdx, dpdy)) per axis). Returns
|
|
110
|
+
// line coverage [0..1] — exactly N device-pixels wide at ANY DPR/zoom (the blur-kill).
|
|
111
|
+
fn gridCoverage(g: vec2f, targetWidth: f32, uvDeriv: vec2f) -> f32 {
|
|
112
|
+
// triangle wave per axis: 0 at a line, 1 at the cell center.
|
|
113
|
+
let gridUV = 1.0 - abs(fract(g) * 2.0 - 1.0);
|
|
114
|
+
let drawWidth = clamp(vec2f(targetWidth), uvDeriv, vec2f(0.5));
|
|
115
|
+
let lineAA = uvDeriv * 1.5;
|
|
116
|
+
// smoothstep with edge0 > edge1 (Golus) → a falling edge.
|
|
117
|
+
var grid2 = smoothstep(drawWidth + lineAA, drawWidth - lineAA, gridUV);
|
|
118
|
+
// preserve thin-line intensity where the line is sub-drawWidth.
|
|
119
|
+
grid2 = grid2 * clamp(vec2f(targetWidth) / max(drawWidth, vec2f(1e-6)), vec2f(0.0), vec2f(1.0));
|
|
120
|
+
// Moiré suppression: fade toward the average where the cell packs tighter than a pixel.
|
|
121
|
+
grid2 = mix(grid2, vec2f(targetWidth), clamp(uvDeriv * 2.0 - 1.0, vec2f(0.0), vec2f(1.0)));
|
|
122
|
+
return max(grid2.x, grid2.y);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// ── The 3-stop warm-divergent FACE ramp (FOLD B — height-keyed, NOT a 2-point mid-park) ──
|
|
126
|
+
// trough (faceLo) → mid (faceMid) → crest (faceHi), keyed on rampT = mix(shade, h). All stops
|
|
127
|
+
// are warm hue ∈ [20,90] (the teal-navy purge clear by construction). Linear-space stops; the
|
|
128
|
+
// fs_main routes the result through the production OETF (FOLD E).
|
|
129
|
+
fn faceRamp(rampT: f32) -> vec3f {
|
|
130
|
+
let s = clamp(rampT, 0.0, 1.0);
|
|
131
|
+
if (s < 0.5) {
|
|
132
|
+
return mix(u.faceLo.rgb, u.faceMid.rgb, s * 2.0);
|
|
133
|
+
}
|
|
134
|
+
return mix(u.faceMid.rgb, u.faceHi.rgb, (s - 0.5) * 2.0);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Full-screen-triangle (the pilot idiom): NDC corners (-1,-1),(3,-1),(-1,3) cover the
|
|
138
|
+
// viewport from a single 3-vertex draw — no vertex buffer.
|
|
139
|
+
struct VSOut {
|
|
140
|
+
@builtin(position) pos: vec4f,
|
|
141
|
+
@location(0) uv: vec2f, // domain [-1,1]², aspect-corrected x
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
@vertex
|
|
145
|
+
fn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {
|
|
146
|
+
var corners = array<vec2f, 3>(
|
|
147
|
+
vec2f(-1.0, -1.0), vec2f(3.0, -1.0), vec2f(-1.0, 3.0),
|
|
148
|
+
);
|
|
149
|
+
let c = corners[vi];
|
|
150
|
+
var out: VSOut;
|
|
151
|
+
out.pos = vec4f(c, 0.0, 1.0);
|
|
152
|
+
out.uv = vec2f(c.x, c.y);
|
|
153
|
+
return out;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@fragment
|
|
157
|
+
fn fs_main(in: VSOut) -> @location(0) vec4f {
|
|
158
|
+
let aspect = max(u.warp2.y, 1e-4);
|
|
159
|
+
// aspect-correct the domain x so the cells read square.
|
|
160
|
+
let uv = vec2f(in.uv.x * aspect, in.uv.y);
|
|
161
|
+
let t = u.u0.x;
|
|
162
|
+
let gridScale = u.u0.y;
|
|
163
|
+
|
|
164
|
+
// §5 the per-pixel kernel: CELL-TWIST + cursor-swirl the grid coordinate, then two-tier Golus.
|
|
165
|
+
// cellTwist rotates each cell about its OWN center (the boxes twist, the lines stay locally
|
|
166
|
+
// straight — the C3 cure) gated by a traveling Gaussian crest; cursorSwirl twists the cells
|
|
167
|
+
// about the finger. The Golus dv reads the FINAL twisted coord (the crisp-line fence survives).
|
|
168
|
+
let g0 = uv * gridScale;
|
|
169
|
+
// FOLD A — the PRE-twist driver: the face samples height/relief at THIS cc (floor(twisted_g)
|
|
170
|
+
// at the crest lights a NEIGHBOUR cell). cellTwist rides the SAME driver, so twist + face fuse.
|
|
171
|
+
let drv = cellDriver(g0, 1.0, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.w);
|
|
172
|
+
let cc = drv.xy;
|
|
173
|
+
var g = cellTwist(g0, 1.0, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.y, u.wave2.z, u.wave2.w);
|
|
174
|
+
if (u.cursor2.y > 0.5) {
|
|
175
|
+
// bulgeMode (cursor2.x: +repel / −attract) signs the swirl direction.
|
|
176
|
+
g = cursorSwirl(g, u.cursor.xy, u.cursor.z * u.cursor2.x, u.cursor.w);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// The screen-space derivative of g (Golus): length(vec2(dpdx, dpdy)) per axis. fwidth-class
|
|
180
|
+
// derivative reads the ACTUAL backing-store pixel (NOT fwidthFine — Compatibility-Mode safe).
|
|
181
|
+
let dv = vec2f(
|
|
182
|
+
length(vec2f(dpdx(g.x), dpdy(g.x))),
|
|
183
|
+
length(vec2f(dpdx(g.y), dpdy(g.y))),
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
let minor = gridCoverage(g, u.grid.x, dv);
|
|
187
|
+
// The major tier evals at g / majorEvery with its own derivative scaling.
|
|
188
|
+
let me = max(u.u0.w, 1.0);
|
|
189
|
+
let major = gridCoverage(g / me, u.grid.y, dv / me);
|
|
190
|
+
let line = max(minor * u.grid.z, major * u.grid.w);
|
|
191
|
+
|
|
192
|
+
// ── The FACE (BD.W-PAPERGRID-FACE) — height-lit filled cell interior ──────────────────
|
|
193
|
+
// Sample height/relief at the pre-twist driver cc (FOLD A); Lambert the ∇H slope against the
|
|
194
|
+
// fixed cel key-light; squash the inset so the crest face inflates; multi-stop warm-divergent
|
|
195
|
+
// ramp keyed on mix(shade, h) (FOLD B); the ink through the production OETF (FOLD E).
|
|
196
|
+
let h = cellHeight(cc, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.w);
|
|
197
|
+
let grad = faceRelief(cc, 1.0, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.w);
|
|
198
|
+
let n = normalize(vec3f(-grad * u.face.y, 1.0));
|
|
199
|
+
let shade = clamp(0.5 + dot(n, normalize(vec3f(u.warp2.zw, 1.0))) * 0.5, 0.0, 1.0);
|
|
200
|
+
let inset = u.face.w * (1.0 - u.face.z * h); // squash & stretch
|
|
201
|
+
let face = facePlateau(g, inset, dv);
|
|
202
|
+
let rampT = clamp(shade * 0.5 + h * 0.5, 0.0, 1.0); // FOLD B — height-keyed crest
|
|
203
|
+
let faceInk = clamp(linearToSrgb(faceRamp(rampT)), vec3f(0.0), vec3f(1.0));
|
|
204
|
+
let faceA = face * u.face.x * u.field.x; // FOLD D — one field-blend scalar
|
|
205
|
+
|
|
206
|
+
let col = clamp(linearToSrgb(u.line.rgb), vec3f(0.0), vec3f(1.0));
|
|
207
|
+
let hasBg = u.field.y;
|
|
208
|
+
if (hasBg > 0.5) {
|
|
209
|
+
// opaque ground: the face fills the cell, the ink over the themed bg, the line on top.
|
|
210
|
+
let bg = clamp(linearToSrgb(u.bg.rgb), vec3f(0.0), vec3f(1.0));
|
|
211
|
+
let base = mix(bg, faceInk, faceA);
|
|
212
|
+
let a = line * u.field.x;
|
|
213
|
+
let outRgb = mix(base, col, a);
|
|
214
|
+
return vec4f(outRgb, 1.0);
|
|
215
|
+
}
|
|
216
|
+
// transparent ground: the FACE composites UNDER the line, the SOURCE-OVER operator in
|
|
217
|
+
// PREMULTIPLIED space (the page reads through the gutters). faceAlpha:0 → faceA=0 → the face
|
|
218
|
+
// term vanishes → vec4f(col·line, line) = byte-identical to the HEAD line-only render.
|
|
219
|
+
let linePremult = (col * line) * u.field.x; // line layer (the FieldAlpha global subtlety)
|
|
220
|
+
let lineA = line * u.field.x;
|
|
221
|
+
let facePremult = faceInk * faceA; // face layer premultiplied (faceA folds field.x)
|
|
222
|
+
let outPremult = linePremult + facePremult * (1.0 - lineA);
|
|
223
|
+
let a = lineA + faceA * (1.0 - lineA);
|
|
224
|
+
return vec4f(outPremult, a); // premultiplied over transparent
|
|
225
|
+
}
|
|
226
|
+
`, A = {
|
|
227
|
+
u0: 0,
|
|
228
|
+
face: 4,
|
|
229
|
+
warp2: 8,
|
|
230
|
+
grid: 12,
|
|
231
|
+
field: 16,
|
|
232
|
+
cursor: 20,
|
|
233
|
+
cursor2: 24,
|
|
234
|
+
line: 28,
|
|
235
|
+
bg: 32,
|
|
236
|
+
wave: 36,
|
|
237
|
+
wave2: 40,
|
|
238
|
+
faceLo: 44,
|
|
239
|
+
faceMid: 48,
|
|
240
|
+
faceHi: 52
|
|
241
|
+
};
|
|
242
|
+
function j() {
|
|
243
|
+
let e = /* @__PURE__ */ new ArrayBuffer(224);
|
|
244
|
+
return {
|
|
245
|
+
buffer: e,
|
|
246
|
+
f32: new Float32Array(e)
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
function M(e, t, n, r, i, a, o) {
|
|
250
|
+
let { f32: c } = e, l = f(i, t.cellSize);
|
|
251
|
+
c[A.u0 + 0] = n, c[A.u0 + 1] = l, c[A.u0 + 2] = t.cellSize, c[A.u0 + 3] = t.majorEvery, c[A.face + 0] = t.faceAlpha, c[A.face + 1] = t.faceRelief, c[A.face + 2] = t.squashK, c[A.face + 3] = t.baseInset, c[A.warp2 + 0] = 0, c[A.warp2 + 1] = r, c[A.warp2 + 2] = t.lightDir[0], c[A.warp2 + 3] = t.lightDir[1];
|
|
252
|
+
let u = Math.max(t.cellSize, 1), d = t.lineWidth / u, p = t.lineWidth * 1.6 / u;
|
|
253
|
+
c[A.grid + 0] = d, c[A.grid + 1] = p, c[A.grid + 2] = t.minorAlpha, c[A.grid + 3] = t.majorAlpha;
|
|
254
|
+
let m = t.background === "transparent" ? 0 : 1;
|
|
255
|
+
c[A.field + 0] = t.fieldAlpha, c[A.field + 1] = m, c[A.field + 2] = 0, c[A.field + 3] = 0, c[A.cursor + 0] = a.x, c[A.cursor + 1] = a.y, c[A.cursor + 2] = t.bulgeStrength, c[A.cursor + 3] = t.bulgeRadius, c[A.cursor2 + 0] = t.bulgeMode === "attract" ? -1 : 1, c[A.cursor2 + 1] = +!!t.interactive, c[A.cursor2 + 2] = 0, c[A.cursor2 + 3] = 0;
|
|
256
|
+
let h = s(t.lineColor);
|
|
257
|
+
if (c[A.line + 0] = h[0], c[A.line + 1] = h[1], c[A.line + 2] = h[2], c[A.line + 3] = 0, t.background === "transparent") c[A.bg + 0] = 0, c[A.bg + 1] = 0, c[A.bg + 2] = 0, c[A.bg + 3] = 0;
|
|
258
|
+
else {
|
|
259
|
+
let e = s(t.background);
|
|
260
|
+
c[A.bg + 0] = e[0], c[A.bg + 1] = e[1], c[A.bg + 2] = e[2], c[A.bg + 3] = 0;
|
|
261
|
+
}
|
|
262
|
+
c[A.wave + 0] = t.waveDir[0], c[A.wave + 1] = t.waveDir[1], c[A.wave + 2] = t.waveK, c[A.wave + 3] = t.waveOmega, c[A.wave2 + 0] = t.waveSigma, c[A.wave2 + 1] = t.twistMax, c[A.wave2 + 2] = t.shearMax, c[A.wave2 + 3] = o;
|
|
263
|
+
let g = s(t.faceWarmLo), _ = s(t.faceWarmMid), v = s(t.faceWarmHi);
|
|
264
|
+
return c[A.faceLo + 0] = g[0], c[A.faceLo + 1] = g[1], c[A.faceLo + 2] = g[2], c[A.faceLo + 3] = 0, c[A.faceMid + 0] = _[0], c[A.faceMid + 1] = _[1], c[A.faceMid + 2] = _[2], c[A.faceMid + 3] = 0, c[A.faceHi + 0] = v[0], c[A.faceHi + 1] = v[1], c[A.faceHi + 2] = v[2], c[A.faceHi + 3] = 0, e;
|
|
265
|
+
}
|
|
266
|
+
//#endregion
|
|
267
|
+
//#region src/components/custom/paper-grid/composables/paperGridWGPUSetup.ts
|
|
268
|
+
var N = 64, P = 8, F = 2;
|
|
269
|
+
function I(e) {
|
|
270
|
+
let { canvas: t, config: n, getCursor: r, getAmp: i, shouldContinue: o, onFrame: s } = e;
|
|
271
|
+
return function(e, c, l) {
|
|
272
|
+
let u = e.createShaderModule({
|
|
273
|
+
label: "[PaperGrid] paper-grid.wgsl",
|
|
274
|
+
code: k
|
|
275
|
+
}), d = j(), f = e.createBuffer({
|
|
276
|
+
label: "[PaperGrid] uniforms",
|
|
277
|
+
size: d.buffer.byteLength,
|
|
278
|
+
usage: N | P
|
|
279
|
+
}), p = e.createBindGroupLayout({
|
|
280
|
+
label: "[PaperGrid] bgl",
|
|
281
|
+
entries: [{
|
|
282
|
+
binding: 0,
|
|
283
|
+
visibility: F,
|
|
284
|
+
buffer: { type: "uniform" }
|
|
285
|
+
}]
|
|
286
|
+
}), m = e.createRenderPipeline({
|
|
287
|
+
label: "[PaperGrid] pipeline",
|
|
288
|
+
layout: e.createPipelineLayout({ bindGroupLayouts: [p] }),
|
|
289
|
+
vertex: {
|
|
290
|
+
module: u,
|
|
291
|
+
entryPoint: "vs_main"
|
|
292
|
+
},
|
|
293
|
+
fragment: {
|
|
294
|
+
module: u,
|
|
295
|
+
entryPoint: "fs_main",
|
|
296
|
+
targets: [{
|
|
297
|
+
format: l,
|
|
298
|
+
blend: {
|
|
299
|
+
color: {
|
|
300
|
+
srcFactor: "one",
|
|
301
|
+
dstFactor: "one-minus-src-alpha",
|
|
302
|
+
operation: "add"
|
|
303
|
+
},
|
|
304
|
+
alpha: {
|
|
305
|
+
srcFactor: "one",
|
|
306
|
+
dstFactor: "one-minus-src-alpha",
|
|
307
|
+
operation: "add"
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}]
|
|
311
|
+
},
|
|
312
|
+
primitive: { topology: "triangle-list" }
|
|
313
|
+
}), h = e.createBindGroup({
|
|
314
|
+
label: "[PaperGrid] bg",
|
|
315
|
+
layout: p,
|
|
316
|
+
entries: [{
|
|
317
|
+
binding: 0,
|
|
318
|
+
resource: { buffer: f }
|
|
319
|
+
}]
|
|
320
|
+
});
|
|
321
|
+
function g() {
|
|
322
|
+
let e = a(), n = t.clientWidth || 320, r = t.clientHeight || 320, i = Math.max(1, Math.round(n * e)), o = Math.max(1, Math.round(r * e));
|
|
323
|
+
(t.width !== i || t.height !== o) && (t.width = i, t.height = o);
|
|
324
|
+
}
|
|
325
|
+
function _(o) {
|
|
326
|
+
s?.(o);
|
|
327
|
+
let l = t.clientWidth || 320, u = t.clientHeight || 320;
|
|
328
|
+
M(d, n, o, l / Math.max(u, 1), t.height || Math.round(u * a()), r(), i()), e.queue.writeBuffer(f, 0, d.buffer);
|
|
329
|
+
let p = e.createCommandEncoder({ label: "[PaperGrid] frame" }), g = c.getCurrentTexture().createView(), _ = p.beginRenderPass({ colorAttachments: [{
|
|
330
|
+
view: g,
|
|
331
|
+
clearValue: {
|
|
332
|
+
r: 0,
|
|
333
|
+
g: 0,
|
|
334
|
+
b: 0,
|
|
335
|
+
a: 0
|
|
336
|
+
},
|
|
337
|
+
loadOp: "clear",
|
|
338
|
+
storeOp: "store"
|
|
339
|
+
}] });
|
|
340
|
+
_.setPipeline(m), _.setBindGroup(0, h), _.draw(3, 1, 0, 0), _.end(), e.queue.submit([p.finish()]);
|
|
341
|
+
}
|
|
342
|
+
return {
|
|
343
|
+
frame: _,
|
|
344
|
+
shouldContinue: o,
|
|
345
|
+
resize: g,
|
|
346
|
+
teardown: () => {
|
|
347
|
+
f.destroy();
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region src/components/custom/paper-grid/shaders/paper-grid.glsl.ts
|
|
354
|
+
var L = "#version 300 es\nprecision highp float;\nin vec2 aPosition;\nout vec2 vUv;\nvoid main() {\n vUv = aPosition; // [-1,1]² domain\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", R = `#version 300 es
|
|
355
|
+
precision highp float;
|
|
356
|
+
|
|
357
|
+
#define TAU 6.283185307179586
|
|
358
|
+
|
|
359
|
+
in vec2 vUv;
|
|
360
|
+
out vec4 fragColor;
|
|
361
|
+
|
|
362
|
+
uniform float uTime;
|
|
363
|
+
uniform float uGridScale;
|
|
364
|
+
uniform float uMajorEvery;
|
|
365
|
+
uniform float uAspect;
|
|
366
|
+
uniform vec4 uWarp; // (warpScale, warpSpeed, warpScale2, warpSpeed2)
|
|
367
|
+
uniform float uAmplitude;
|
|
368
|
+
uniform vec4 uGrid; // (targetWidth, targetWidthMajor, minorAlpha, majorAlpha)
|
|
369
|
+
uniform float uFieldAlpha;
|
|
370
|
+
uniform float uHasBackground;
|
|
371
|
+
uniform vec4 uCursor; // (cursorX, cursorY, swirlStrength, swirlRadius)
|
|
372
|
+
uniform float uBulgeMode; // +1 repel / −1 attract (signs the swirl)
|
|
373
|
+
uniform float uInteractive; // 1 = cursor swirl on
|
|
374
|
+
uniform vec4 uWave; // (waveDirX, waveDirY, waveK, waveOmega)
|
|
375
|
+
uniform vec4 uWave2; // (waveSigma, twistMax, shearMax, amp)
|
|
376
|
+
uniform vec3 uLineColor; // linear-sRGB ink
|
|
377
|
+
uniform vec3 uBg; // linear-sRGB themed bg
|
|
378
|
+
// ── The FACE (BD.W-PAPERGRID-FACE) — the height-lit filled cell interior ──
|
|
379
|
+
uniform vec4 uFace; // (faceAlpha, faceRelief, squashK, baseInset)
|
|
380
|
+
uniform vec2 uLightDir; // the cel key-light direction
|
|
381
|
+
uniform vec3 uFaceLo; // linear-sRGB rose-umber trough (FOLD B, 3-stop)
|
|
382
|
+
uniform vec3 uFaceMid; // linear-sRGB ember-amber mid
|
|
383
|
+
uniform vec3 uFaceHi; // linear-sRGB warm-wheat crest
|
|
384
|
+
|
|
385
|
+
${r}
|
|
386
|
+
|
|
387
|
+
// The 3-stop warm-divergent FACE ramp (FOLD B — height-keyed, NOT a 2-point mid-park). All stops
|
|
388
|
+
// warm hue ∈ [20,90]; linear-space (the OETF runs in main, FOLD E).
|
|
389
|
+
vec3 faceRamp(float rampT) {
|
|
390
|
+
float s = clamp(rampT, 0.0, 1.0);
|
|
391
|
+
if (s < 0.5) {
|
|
392
|
+
return mix(uFaceLo, uFaceMid, s * 2.0);
|
|
393
|
+
}
|
|
394
|
+
return mix(uFaceMid, uFaceHi, (s - 0.5) * 2.0);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// The shared divergence-free 2D-curl operator (flow.glsl.ts) — the prototype declares
|
|
398
|
+
// potentialFBM; the host defines its BODY below the splice (GLSL forward-declaration).
|
|
399
|
+
${i}
|
|
400
|
+
|
|
401
|
+
// ── The host noise basis (transcribes paperGrid.ts hash21/valueNoise/potentialFBM) ──
|
|
402
|
+
float hash21(float x, float y) {
|
|
403
|
+
float px = fract(x * 0.1031);
|
|
404
|
+
float py = fract(y * 0.1031);
|
|
405
|
+
float pz = fract(x * 0.1031);
|
|
406
|
+
float d = px * (py + 33.33) + py * (pz + 33.33) + pz * (px + 33.33);
|
|
407
|
+
px += d;
|
|
408
|
+
py += d;
|
|
409
|
+
pz += d;
|
|
410
|
+
return fract((px + py) * pz);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
float valueNoise(float x, float y) {
|
|
414
|
+
float ix = floor(x);
|
|
415
|
+
float iy = floor(y);
|
|
416
|
+
float fx = x - ix;
|
|
417
|
+
float fy = y - iy;
|
|
418
|
+
float ux = fx * fx * fx * (fx * (fx * 6.0 - 15.0) + 10.0);
|
|
419
|
+
float uy = fy * fy * fy * (fy * (fy * 6.0 - 15.0) + 10.0);
|
|
420
|
+
float a = hash21(ix, iy);
|
|
421
|
+
float b = hash21(ix + 1.0, iy);
|
|
422
|
+
float c = hash21(ix, iy + 1.0);
|
|
423
|
+
float d2 = hash21(ix + 1.0, iy + 1.0);
|
|
424
|
+
return mix(mix(a, b, ux), mix(c, d2, ux), uy);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// The 3-octave scalar fbm potential — the curl chunk's forward-declared potentialFBM body.
|
|
428
|
+
float potentialFBM(vec2 p) {
|
|
429
|
+
float v = 0.0;
|
|
430
|
+
float amp = 0.5;
|
|
431
|
+
float freq = 1.0;
|
|
432
|
+
float px = p.x;
|
|
433
|
+
float py = p.y;
|
|
434
|
+
for (int i = 0; i < 3; i++) {
|
|
435
|
+
v += amp * valueNoise(px * freq, py * freq);
|
|
436
|
+
// FBM_ROT mat2(0.8, 0.6, -0.6, 0.8) — same rotation as the shared chunk.
|
|
437
|
+
float rx = 0.8 * px - 0.6 * py;
|
|
438
|
+
float ry = 0.6 * px + 0.8 * py;
|
|
439
|
+
px = rx;
|
|
440
|
+
py = ry;
|
|
441
|
+
freq *= 2.0;
|
|
442
|
+
amp *= 0.5;
|
|
443
|
+
}
|
|
444
|
+
return v;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
// The shared traveling-wave CELL-WARP chunk (waveField.glsl.ts — cellTwist/cursorSwirl/
|
|
448
|
+
// travelingEnvelope; spliced AFTER valueNoise + potentialFBM bodies + the curlFBM chunk).
|
|
449
|
+
// paper-grid + concentric share this EXACTLY (the C3 cure: the boxes twist about their own
|
|
450
|
+
// center, the lines stay locally straight — never the retired LINE-warp).
|
|
451
|
+
${u}
|
|
452
|
+
|
|
453
|
+
// ── §1 The Ben Golus derivative-AA grid coverage (transcribes paperGrid.ts gridCoverage) ──
|
|
454
|
+
float gridCoverage(vec2 g, float targetWidth, vec2 uvDeriv) {
|
|
455
|
+
vec2 gridUV = 1.0 - abs(fract(g) * 2.0 - 1.0);
|
|
456
|
+
vec2 drawWidth = clamp(vec2(targetWidth), uvDeriv, vec2(0.5));
|
|
457
|
+
vec2 lineAA = uvDeriv * 1.5;
|
|
458
|
+
vec2 grid2 = smoothstep(drawWidth + lineAA, drawWidth - lineAA, gridUV);
|
|
459
|
+
grid2 *= clamp(vec2(targetWidth) / max(drawWidth, vec2(1e-6)), vec2(0.0), vec2(1.0));
|
|
460
|
+
grid2 = mix(grid2, vec2(targetWidth), clamp(uvDeriv * 2.0 - 1.0, vec2(0.0), vec2(1.0)));
|
|
461
|
+
return max(grid2.x, grid2.y);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
void main() {
|
|
465
|
+
float aspect = max(uAspect, 1e-4);
|
|
466
|
+
vec2 uv = vec2(vUv.x * aspect, vUv.y);
|
|
467
|
+
|
|
468
|
+
// §5 the per-pixel kernel: CELL-TWIST + cursor-swirl the grid coordinate, then two-tier Golus.
|
|
469
|
+
// cellTwist rotates each cell about its OWN center (the boxes twist, the lines stay locally
|
|
470
|
+
// straight — the C3 cure) gated by a traveling Gaussian crest; cursorSwirl twists the cells
|
|
471
|
+
// about the finger. The Golus dv reads the FINAL twisted coord (the crisp-line fence survives).
|
|
472
|
+
vec2 g0 = uv * uGridScale;
|
|
473
|
+
// FOLD A — the PRE-twist driver: the face samples height/relief at THIS cc (floor(twisted_g)
|
|
474
|
+
// at the crest lights a NEIGHBOUR cell). cellTwist rides the SAME driver, so twist + face fuse.
|
|
475
|
+
vec3 drv = cellDriver(g0, 1.0, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.w);
|
|
476
|
+
vec2 cc = drv.xy;
|
|
477
|
+
vec2 g = cellTwist(g0, 1.0, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.y, uWave2.z, uWave2.w);
|
|
478
|
+
if (uInteractive > 0.5) {
|
|
479
|
+
g = cursorSwirl(g, uCursor.xy, uCursor.z * uBulgeMode, uCursor.w);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
// The screen-space derivative of g (Golus): length(vec2(dFdx, dFdy)) per axis (the actual
|
|
483
|
+
// backing-store pixel — NOT a CSS sub-pixel, the blur-kill).
|
|
484
|
+
vec2 dv = vec2(
|
|
485
|
+
length(vec2(dFdx(g.x), dFdy(g.x))),
|
|
486
|
+
length(vec2(dFdx(g.y), dFdy(g.y)))
|
|
487
|
+
);
|
|
488
|
+
|
|
489
|
+
float minor = gridCoverage(g, uGrid.x, dv);
|
|
490
|
+
float me = max(uMajorEvery, 1.0);
|
|
491
|
+
float major = gridCoverage(g / me, uGrid.y, dv / me);
|
|
492
|
+
float line = max(minor * uGrid.z, major * uGrid.w);
|
|
493
|
+
|
|
494
|
+
// ── The FACE (BD.W-PAPERGRID-FACE) — height-lit filled cell interior ──────────────────
|
|
495
|
+
// Sample height/relief at the pre-twist driver cc (FOLD A); Lambert the ∇H slope against the
|
|
496
|
+
// fixed cel key-light; squash the inset so the crest face inflates; multi-stop warm-divergent
|
|
497
|
+
// ramp keyed on mix(shade, h) (FOLD B); the ink through the production OETF (FOLD E).
|
|
498
|
+
float h = cellHeight(cc, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.w);
|
|
499
|
+
vec2 grad = faceRelief(cc, 1.0, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.w);
|
|
500
|
+
vec3 n = normalize(vec3(-grad * uFace.y, 1.0));
|
|
501
|
+
float shade = clamp(0.5 + dot(n, normalize(vec3(uLightDir, 1.0))) * 0.5, 0.0, 1.0);
|
|
502
|
+
float inset = uFace.w * (1.0 - uFace.z * h); // squash & stretch
|
|
503
|
+
float face = facePlateau(g, inset, dv);
|
|
504
|
+
float rampT = clamp(shade * 0.5 + h * 0.5, 0.0, 1.0); // FOLD B — height-keyed crest
|
|
505
|
+
vec3 faceInk = clamp(linearToSrgb(faceRamp(rampT)), vec3(0.0), vec3(1.0));
|
|
506
|
+
float faceA = face * uFace.x * uFieldAlpha; // FOLD D — one field-blend scalar
|
|
507
|
+
|
|
508
|
+
vec3 col = clamp(linearToSrgb(uLineColor), vec3(0.0), vec3(1.0));
|
|
509
|
+
if (uHasBackground > 0.5) {
|
|
510
|
+
vec3 bg = clamp(linearToSrgb(uBg), vec3(0.0), vec3(1.0));
|
|
511
|
+
vec3 base = mix(bg, faceInk, faceA);
|
|
512
|
+
float a = line * uFieldAlpha;
|
|
513
|
+
fragColor = vec4(mix(base, col, a), 1.0);
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
// transparent ground: the FACE composites UNDER the line, the SOURCE-OVER operator in
|
|
517
|
+
// PREMULTIPLIED space. faceAlpha:0 → faceA=0 → the face term vanishes → vec4(col·line, line) =
|
|
518
|
+
// byte-identical to the HEAD line-only render.
|
|
519
|
+
vec3 linePremult = (col * line) * uFieldAlpha; // line layer (the FieldAlpha subtlety)
|
|
520
|
+
float lineA = line * uFieldAlpha;
|
|
521
|
+
vec3 facePremult = faceInk * faceA; // face layer premultiplied (faceA folds field)
|
|
522
|
+
vec3 outPremult = linePremult + facePremult * (1.0 - lineA);
|
|
523
|
+
float a = lineA + faceA * (1.0 - lineA);
|
|
524
|
+
fragColor = vec4(outPremult, a); // premultiplied over transparent
|
|
525
|
+
}`;
|
|
526
|
+
//#endregion
|
|
527
|
+
//#region src/components/custom/paper-grid/composables/paperGridGLSetup.ts
|
|
528
|
+
function z(e, t, n) {
|
|
529
|
+
let r = e.createShader(t);
|
|
530
|
+
if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
|
|
531
|
+
let t = e.getShaderInfoLog(r);
|
|
532
|
+
throw e.deleteShader(r), Error(`[PaperGrid] shader compile failed: ${t}`);
|
|
533
|
+
}
|
|
534
|
+
return r;
|
|
535
|
+
}
|
|
536
|
+
function B(e) {
|
|
537
|
+
let { canvas: t, config: n, getCursor: r, getAmp: i, shouldContinue: o, onFrame: c } = e;
|
|
538
|
+
return function(e) {
|
|
539
|
+
let l = z(e, e.VERTEX_SHADER, L), u = z(e, e.FRAGMENT_SHADER, R), d = e.createProgram();
|
|
540
|
+
if (e.attachShader(d, l), e.attachShader(d, u), e.linkProgram(d), !e.getProgramParameter(d, e.LINK_STATUS)) throw Error(`[PaperGrid] link failed: ${e.getProgramInfoLog(d)}`);
|
|
541
|
+
e.deleteShader(l), e.deleteShader(u);
|
|
542
|
+
let p = e.createVertexArray();
|
|
543
|
+
e.bindVertexArray(p);
|
|
544
|
+
let m = e.createBuffer();
|
|
545
|
+
e.bindBuffer(e.ARRAY_BUFFER, m), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
|
|
546
|
+
-1,
|
|
547
|
+
-1,
|
|
548
|
+
3,
|
|
549
|
+
-1,
|
|
550
|
+
-1,
|
|
551
|
+
3
|
|
552
|
+
]), e.STATIC_DRAW);
|
|
553
|
+
let h = e.getAttribLocation(d, "aPosition");
|
|
554
|
+
e.enableVertexAttribArray(h), e.vertexAttribPointer(h, 2, e.FLOAT, !1, 0, 0), e.bindVertexArray(null);
|
|
555
|
+
let g = (t) => e.getUniformLocation(d, t), _ = g("uTime"), v = g("uGridScale"), y = g("uMajorEvery"), b = g("uAspect"), x = g("uGrid"), S = g("uFieldAlpha"), C = g("uHasBackground"), w = g("uCursor"), T = g("uBulgeMode"), E = g("uInteractive"), D = g("uWave"), O = g("uWave2"), k = g("uLineColor"), A = g("uBg"), j = g("uFace"), M = g("uLightDir"), N = g("uFaceLo"), P = g("uFaceMid"), F = g("uFaceHi");
|
|
556
|
+
function I() {
|
|
557
|
+
let n = a(), r = t.clientWidth || 320, i = t.clientHeight || 320, o = Math.max(1, Math.round(r * n)), s = Math.max(1, Math.round(i * n));
|
|
558
|
+
(t.width !== o || t.height !== s) && (t.width = o, t.height = s), e.viewport(0, 0, t.width, t.height);
|
|
559
|
+
}
|
|
560
|
+
function B(o) {
|
|
561
|
+
c?.(o);
|
|
562
|
+
let l = t.clientWidth || 320, u = t.clientHeight || 320, m = l / Math.max(u, 1), h = f(t.height || Math.round(u * a()), n.cellSize);
|
|
563
|
+
e.useProgram(d), e.bindVertexArray(p), e.enable(e.BLEND), e.blendFunc(e.ONE, e.ONE_MINUS_SRC_ALPHA), e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.uniform1f(_, o), e.uniform1f(v, h), e.uniform1f(y, n.majorEvery), e.uniform1f(b, m), e.uniform4f(D, n.waveDir[0], n.waveDir[1], n.waveK, n.waveOmega), e.uniform4f(O, n.waveSigma, n.twistMax, n.shearMax, i()), e.uniform1f(E, +!!n.interactive);
|
|
564
|
+
let g = Math.max(n.cellSize, 1), I = n.lineWidth / g, L = n.lineWidth * 1.6 / g;
|
|
565
|
+
e.uniform4f(x, I, L, n.minorAlpha, n.majorAlpha), e.uniform1f(S, n.fieldAlpha);
|
|
566
|
+
let R = r();
|
|
567
|
+
e.uniform4f(w, R.x, R.y, n.bulgeStrength, n.bulgeRadius), e.uniform1f(T, n.bulgeMode === "attract" ? -1 : 1);
|
|
568
|
+
let z = s(n.lineColor);
|
|
569
|
+
e.uniform3f(k, z[0], z[1], z[2]), e.uniform4f(j, n.faceAlpha, n.faceRelief, n.squashK, n.baseInset), e.uniform2f(M, n.lightDir[0], n.lightDir[1]);
|
|
570
|
+
let B = s(n.faceWarmLo), V = s(n.faceWarmMid), H = s(n.faceWarmHi);
|
|
571
|
+
if (e.uniform3f(N, B[0], B[1], B[2]), e.uniform3f(P, V[0], V[1], V[2]), e.uniform3f(F, H[0], H[1], H[2]), n.background === "transparent") e.uniform1f(C, 0), e.uniform3f(A, 0, 0, 0);
|
|
572
|
+
else {
|
|
573
|
+
e.uniform1f(C, 1);
|
|
574
|
+
let t = s(n.background);
|
|
575
|
+
e.uniform3f(A, t[0], t[1], t[2]);
|
|
576
|
+
}
|
|
577
|
+
e.drawArrays(e.TRIANGLES, 0, 3), e.bindVertexArray(null);
|
|
578
|
+
}
|
|
579
|
+
return {
|
|
580
|
+
frame: B,
|
|
581
|
+
shouldContinue: o,
|
|
582
|
+
resize: I,
|
|
583
|
+
teardown: () => {
|
|
584
|
+
e.deleteProgram(d), e.deleteVertexArray(p), e.deleteBuffer(m);
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
//#endregion
|
|
590
|
+
//#region src/components/custom/paper-grid/composables/usePaperGrid.ts
|
|
591
|
+
function V(e, n) {
|
|
592
|
+
let { config: r } = n, i = n.mode ?? "live", s = t({ respectReducedMotion: r.respectReducedMotion }), c = {
|
|
593
|
+
x: 1e6,
|
|
594
|
+
y: 1e6
|
|
595
|
+
}, l = () => c, u = 0, d = () => u, p = 0, m = null;
|
|
596
|
+
function h(t) {
|
|
597
|
+
let n = p > 0 ? (t - p) * 1e3 : 16.7;
|
|
598
|
+
if (p = t, s.tick(n), m?.reducedMotion ? u = 0 : (u += (1.06 - u) * .04, u > 1 && (u = 1 + (u - 1) * .85)), !r.interactive || !s.active.value) {
|
|
599
|
+
c = {
|
|
600
|
+
x: 1e6,
|
|
601
|
+
y: 1e6
|
|
602
|
+
};
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
605
|
+
let i = e.value, o = i?.clientHeight || 320, l = (i?.clientWidth || 320) / Math.max(o, 1), d = f(i?.height || Math.round(o * a()) || 320, r.cellSize), h = s.smoothedPosition.value, g = s.velocity.value, _ = s.burst.value, v = (h.x * 2 - 1) * l, y = -(h.y * 2 - 1), b = .12 + Math.min(.4, _);
|
|
606
|
+
c = {
|
|
607
|
+
x: (v + g.x * b) * d,
|
|
608
|
+
y: (y - g.y * b) * d
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
let g = () => {
|
|
612
|
+
s.onPointerEnter(), r.interactive && m?.wake();
|
|
613
|
+
}, _ = (e) => {
|
|
614
|
+
s.onPointerMove(e), r.interactive && m?.wake();
|
|
615
|
+
}, v = (e) => e.parentElement ?? e;
|
|
616
|
+
function y(e) {
|
|
617
|
+
let t = v(e);
|
|
618
|
+
t.addEventListener("pointermove", _), t.addEventListener("pointerenter", g), t.addEventListener("pointerleave", s.onPointerLeave);
|
|
619
|
+
}
|
|
620
|
+
function b(e) {
|
|
621
|
+
let t = v(e);
|
|
622
|
+
t.removeEventListener("pointermove", _), t.removeEventListener("pointerenter", g), t.removeEventListener("pointerleave", s.onPointerLeave);
|
|
623
|
+
}
|
|
624
|
+
let x = () => {
|
|
625
|
+
let t = e.value;
|
|
626
|
+
return t ? (m || (y(t), m = o(t, {
|
|
627
|
+
mode: i,
|
|
628
|
+
respectReducedMotion: r.respectReducedMotion,
|
|
629
|
+
setupWGPU: I({
|
|
630
|
+
canvas: t,
|
|
631
|
+
config: r,
|
|
632
|
+
getCursor: l,
|
|
633
|
+
getAmp: d,
|
|
634
|
+
shouldContinue: () => !0,
|
|
635
|
+
onFrame: h
|
|
636
|
+
}),
|
|
637
|
+
setupGL: B({
|
|
638
|
+
canvas: t,
|
|
639
|
+
config: r,
|
|
640
|
+
getCursor: l,
|
|
641
|
+
getAmp: d,
|
|
642
|
+
shouldContinue: () => !0,
|
|
643
|
+
onFrame: h
|
|
644
|
+
})
|
|
645
|
+
}), m.armAsync()), m) : null;
|
|
646
|
+
};
|
|
647
|
+
queueMicrotask(() => x());
|
|
648
|
+
let S = {
|
|
649
|
+
get backend() {
|
|
650
|
+
return x()?.backend ?? "webgpu";
|
|
651
|
+
},
|
|
652
|
+
pause: () => x()?.suspend("manual"),
|
|
653
|
+
resume: () => x()?.resume("manual"),
|
|
654
|
+
wake: () => x()?.wake(),
|
|
655
|
+
renderAt: (e) => x()?.renderAt(e),
|
|
656
|
+
get reducedMotion() {
|
|
657
|
+
return m?.reducedMotion ?? !1;
|
|
658
|
+
},
|
|
659
|
+
dispose: () => {
|
|
660
|
+
let t = e.value;
|
|
661
|
+
t && b(t), s.dispose(), m?.dispose();
|
|
662
|
+
}
|
|
663
|
+
};
|
|
664
|
+
return w(() => S.dispose()), S;
|
|
665
|
+
}
|
|
666
|
+
//#endregion
|
|
667
|
+
//#region src/components/custom/paper-grid/constants.ts
|
|
668
|
+
var H = 16, U = {
|
|
669
|
+
L: .62,
|
|
670
|
+
C: .05,
|
|
671
|
+
h: 62
|
|
672
|
+
}, W = {
|
|
673
|
+
L: .44,
|
|
674
|
+
C: .07,
|
|
675
|
+
h: 32
|
|
676
|
+
}, G = {
|
|
677
|
+
L: .66,
|
|
678
|
+
C: .12,
|
|
679
|
+
h: 58
|
|
680
|
+
}, K = {
|
|
681
|
+
L: .9,
|
|
682
|
+
C: .1,
|
|
683
|
+
h: 84
|
|
684
|
+
}, q = {
|
|
685
|
+
cellSize: 64,
|
|
686
|
+
majorEvery: 5,
|
|
687
|
+
minorAlpha: .12,
|
|
688
|
+
majorAlpha: .22,
|
|
689
|
+
lineWidth: 1,
|
|
690
|
+
twistMax: .62,
|
|
691
|
+
shearMax: .26,
|
|
692
|
+
waveDir: [.92, .39],
|
|
693
|
+
waveK: .62,
|
|
694
|
+
waveOmega: 1.05,
|
|
695
|
+
waveSigma: .42,
|
|
696
|
+
fieldAlpha: 1,
|
|
697
|
+
bulgeStrength: .9,
|
|
698
|
+
bulgeRadius: 2.5,
|
|
699
|
+
bulgeMode: "repel",
|
|
700
|
+
lineColor: U,
|
|
701
|
+
faceAlpha: 0,
|
|
702
|
+
faceRelief: 2.6,
|
|
703
|
+
squashK: .42,
|
|
704
|
+
baseInset: .14,
|
|
705
|
+
faceWarmLo: W,
|
|
706
|
+
faceWarmMid: G,
|
|
707
|
+
faceWarmHi: K,
|
|
708
|
+
lightDir: [.6, .8],
|
|
709
|
+
background: "transparent",
|
|
710
|
+
interactive: !0,
|
|
711
|
+
respectReducedMotion: !0
|
|
712
|
+
}, J = /* @__PURE__ */ e(/* @__PURE__ */ x({
|
|
713
|
+
__name: "PaperGrid",
|
|
714
|
+
props: {
|
|
715
|
+
config: { default: () => q },
|
|
716
|
+
paused: {
|
|
717
|
+
type: Boolean,
|
|
718
|
+
default: !1
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
emits: ["update:paused"],
|
|
722
|
+
setup(e, { expose: t }) {
|
|
723
|
+
let n = D("wrapperRef"), r = D("canvasRef"), i = E({ ...e.config });
|
|
724
|
+
O(() => e.config, (e) => Object.assign(i, e), { deep: !0 }), C(() => {
|
|
725
|
+
if (e.config.lineColor === q.lineColor) {
|
|
726
|
+
let e = n.value;
|
|
727
|
+
if (e) {
|
|
728
|
+
let t = getComputedStyle(e).getPropertyValue("--foreground").trim();
|
|
729
|
+
if (t) try {
|
|
730
|
+
i.lineColor = c(t);
|
|
731
|
+
} catch {}
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
});
|
|
735
|
+
let a = V(r, { config: i });
|
|
736
|
+
O(() => e.paused, (e) => e ? a.pause() : a.resume(), { immediate: !0 });
|
|
737
|
+
let o = v(() => {
|
|
738
|
+
let t = e.config.background;
|
|
739
|
+
if (t !== "transparent") return `oklch(${t.L} ${t.C} ${t.h})`;
|
|
740
|
+
});
|
|
741
|
+
return t({
|
|
742
|
+
pause: a.pause,
|
|
743
|
+
resume: a.resume,
|
|
744
|
+
wake: a.wake,
|
|
745
|
+
renderAt: a.renderAt
|
|
746
|
+
}), (e, t) => (T(), y("div", {
|
|
747
|
+
ref_key: "wrapperRef",
|
|
748
|
+
ref: n,
|
|
749
|
+
class: "paper-grid-wrapper",
|
|
750
|
+
style: S(o.value ? { background: o.value } : void 0)
|
|
751
|
+
}, [b("canvas", {
|
|
752
|
+
ref_key: "canvasRef",
|
|
753
|
+
ref: r,
|
|
754
|
+
class: "paper-grid-canvas",
|
|
755
|
+
"aria-hidden": "true",
|
|
756
|
+
"data-testid": "paper-grid-canvas"
|
|
757
|
+
}, null, 512)], 4));
|
|
758
|
+
}
|
|
759
|
+
}), [["__scopeId", "data-v-fc108d7d"]]);
|
|
760
|
+
//#endregion
|
|
761
|
+
export { _ as CURL_EPS, q as DEFAULT_PAPER_GRID_CONFIG, K as FACE_WARM_HI, W as FACE_WARM_LO, G as FACE_WARM_MID, H as PAPER_GRID_MAX_MAJOR_EVERY, J as PaperGrid, U as WARM_IDENTITY_INK, p as curlFBM, g as gridCoverage, f as gridScaleFor, l as potentialFBM, m as samplePaperGrid, V as usePaperGrid };
|