@mkbabb/glass-ui 5.0.0 → 6.0.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/README.md +30 -27
- package/dist/DropdownMenuTrigger-BzQtd9lt.js +65 -0
- package/dist/{FadingScroll-BSRLqQCx.js → FadingScroll-C1ZWEjmG.js} +32 -25
- package/dist/{Input-DKf-XwUM.js → Input-B4WQ_CMc.js} +1 -1
- package/dist/{PagerDots-BP6jh7z4.js → PagerDots-BoTQ7g5l.js} +123 -95
- package/dist/{accent-tone-solve-CBw3L0cy.js → accent-tone-solve-Dii9ePhK.js} +1 -1
- package/dist/animated-digit.js +1 -1
- package/dist/aurora.js +324 -314
- package/dist/blob-config.d.ts +0 -4
- package/dist/blob-config.js +1 -1
- package/dist/blob.js +280 -261
- package/dist/{button-BXzhydVB.js → button-32mg6xA8.js} +63 -56
- package/dist/button.js +1 -1
- package/dist/canvas.js +1 -1
- package/dist/{CardAction-2uUvjMQK.js → card-16xmzIr3.js} +29 -11
- package/dist/card.js +1 -1
- package/dist/carousel.d.ts +1 -2
- package/dist/carousel.js +26 -95
- package/dist/chip.d.ts +0 -9
- package/dist/chip.js +1 -1
- package/dist/collapsible.js +1 -1
- package/dist/color-swatch.js +1 -0
- package/dist/color.js +87 -3
- package/dist/{CommandShortcut-fmdbsEJL.js → command-BjPjUU9z.js} +56 -51
- package/dist/command.js +1 -1
- package/dist/completion-seal.js +64 -55
- package/dist/components/_shared/ModalOverlay.vue.d.ts +5 -52
- package/dist/components/_shared/field-surfaces.css +1 -0
- package/dist/components/_shared/menuItemVariants.d.ts +2 -2
- package/dist/components/_shared/useMotionAxis.d.ts +2 -2
- package/dist/components/_shared/valueDomain.d.ts +6 -0
- package/dist/components/alert/index.d.ts +1 -1
- package/dist/components/animated-digit/AnimatedDigit.vue.d.ts +1 -1
- package/dist/components/aurora/Aurora.vue.d.ts +7 -1
- package/dist/components/aurora/composables/runtime.d.ts +5 -3
- package/dist/components/aurora/composables/useAurora.d.ts +4 -2
- package/dist/components/avatar/AvatarImage.vue.d.ts +3 -1
- package/dist/components/badge/index.d.ts +2 -2
- package/dist/components/blob/Blob.vue.d.ts +11 -0
- package/dist/components/blob/composables/useMetaballRenderer.d.ts +2 -0
- package/dist/components/button/Button.vue.d.ts +4 -2
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/card/Card.vue.d.ts +4 -4
- package/dist/components/card/ScrollCard.vue.d.ts +1 -1
- package/dist/components/card/styles.css +1 -0
- package/dist/components/carousel/Carousel.vue.d.ts +2 -2
- package/dist/components/carousel/CarouselNext.vue.d.ts +1 -1
- package/dist/components/carousel/CarouselPrevious.vue.d.ts +1 -1
- package/dist/components/carousel/index.d.ts +0 -1
- package/dist/components/carousel/useCarousel.d.ts +2 -2
- package/dist/components/combobox/ComboboxList.vue.d.ts +1 -1
- package/dist/components/combobox/index.d.ts +1 -3
- package/dist/components/command/Command.vue.d.ts +1 -1
- package/dist/components/command/CommandDialog.vue.d.ts +9 -6
- package/dist/components/completion-seal/styles.css +1 -0
- package/dist/components/constellation/Constellation.vue.d.ts +6 -1
- package/dist/components/constellation/composables/useConstellation.d.ts +3 -16
- package/dist/components/constellation/constants.d.ts +6 -16
- package/dist/components/constellation/constellationField.d.ts +3 -5
- package/dist/components/constellation/constellationInteraction.d.ts +1 -1
- package/dist/components/constellation/constellationRender.d.ts +11 -21
- package/dist/components/constellation/constellationTypes.d.ts +12 -9
- package/dist/components/constellation/index.d.ts +1 -1
- package/dist/components/controls/DarkModeToggle.vue.d.ts +0 -2
- package/dist/components/data-table/DataTable.vue.d.ts +14 -2
- package/dist/components/data-table/index.d.ts +1 -2
- package/dist/components/data-table/types.d.ts +26 -1
- package/dist/components/deck/constants.d.ts +0 -10
- package/dist/components/deck/index.d.ts +0 -1
- package/dist/components/dialog/DialogContent.vue.d.ts +7 -1
- package/dist/components/dialog/index.d.ts +0 -1
- package/dist/components/dock/DockControl.vue.d.ts +4 -4
- package/dist/components/dock/DockStack.vue.d.ts +2 -2
- package/dist/components/dock/GlassDock.vue.d.ts +1 -0
- package/dist/components/dock/composables/dockMorphContext.d.ts +2 -0
- package/dist/components/dock/composables/dockMorphMeasure.d.ts +11 -1
- package/dist/components/dock/composables/useDockClickIntegrity.d.ts +4 -0
- package/dist/components/dock/composables/useDockOverflowFit.d.ts +3 -3
- package/dist/components/dock/composables/useDockPopover.d.ts +2 -0
- package/dist/components/dock/composables/useDockShellProps.d.ts +7 -0
- package/dist/components/dock/composables/useDockState.d.ts +2 -2
- package/dist/components/dock/constants.d.ts +0 -12
- package/dist/components/dock/index.d.ts +1 -0
- package/dist/components/dock/styles/adaptive-legibility.css +1 -0
- package/dist/components/dock/styles/controls/icon-button.css +1 -0
- package/dist/{styles/dock-controls → components/dock/styles/controls}/touch-floor.css +1 -1
- package/dist/components/dock/styles/controls.css +1 -0
- package/dist/{styles/dock → components/dock/styles}/density.css +1 -1
- package/dist/components/dock/styles/dock.css +1 -0
- package/dist/components/dock/styles/index.css +1 -0
- package/dist/components/dock/styles/layer-group.css +1 -0
- package/dist/components/dock/styles/layers.css +1 -0
- package/dist/components/dock/styles/overflow.css +1 -0
- package/dist/components/dock/styles/popover.css +1 -0
- package/dist/components/dock/styles/shape.css +1 -0
- package/dist/components/dock/styles/shell.css +1 -0
- package/dist/components/drawer/Drawer.vue.d.ts +3 -3
- package/dist/components/drawer/composables/drawerSnapContext.d.ts +3 -1
- package/dist/components/drawer/constants.d.ts +6 -6
- package/dist/components/drawer/index.d.ts +4 -6
- package/dist/components/drawer/styles.css +1 -0
- package/dist/components/dropdown-menu/DropdownMenuContent.vue.d.ts +1 -1
- package/dist/components/dropdown-menu/DropdownMenuTrigger.vue.d.ts +9 -3
- package/dist/components/dropdown-menu/index.d.ts +0 -1
- package/dist/components/easing/EasingConfigurator.vue.d.ts +1 -1
- package/dist/components/easing/EasingPicker.vue.d.ts +2 -2
- package/dist/components/easing/composables/useEasingPicker.d.ts +4 -0
- package/dist/components/easing/constants.d.ts +2 -0
- package/dist/components/fading-scroll/composables/useFadingScroll.d.ts +3 -3
- package/dist/components/fourier-field/FourierField.vue.d.ts +7 -1
- package/dist/components/fourier-field/composables/useFourierField.d.ts +2 -1
- package/dist/components/handmark/HandMark.vue.d.ts +1 -1
- package/dist/components/handmark/geometry.d.ts +1 -1
- package/dist/components/handmark/index.d.ts +4 -6
- package/dist/components/icon-chip/styles.css +1 -0
- package/dist/components/index.d.ts +0 -1
- package/dist/components/infinite-scroll/index.d.ts +1 -0
- package/dist/components/instrument-chassis/styles.css +1 -0
- package/dist/components/labeled-field/LabeledField.vue.d.ts +12 -2
- package/dist/components/labeled-field/LabeledInput.vue.d.ts +10 -3
- package/dist/components/liquid-grid/LiquidGrid.vue.d.ts +4 -0
- package/dist/components/liquid-grid/composables/useLiquidGrid.d.ts +2 -1
- package/dist/components/metric-stack/MetricStack.vue.d.ts +1 -1
- package/dist/components/pager-dots/PagerDots.vue.d.ts +1 -1
- package/dist/components/popover/PopoverContent.vue.d.ts +1 -1
- package/dist/components/progress/Progress.vue.d.ts +5 -40
- package/dist/components/progress/ProgressDefault.vue.d.ts +1 -17
- package/dist/components/progress/ProgressGradient.vue.d.ts +1 -0
- package/dist/components/progress/ProgressLiquid.vue.d.ts +1 -0
- package/dist/components/progress/index.d.ts +0 -5
- package/dist/components/progress/valueMarks.css +1 -0
- package/dist/components/pulse/Pulse.vue.d.ts +2 -2
- package/dist/components/scroll-progress-rim/styles.css +1 -0
- package/dist/components/search/FuzzySearch.vue.d.ts +4 -2
- package/dist/components/search/SearchBar.vue.d.ts +2 -2
- package/dist/components/search/searchVariants.d.ts +1 -1
- package/dist/components/select/SelectContent.vue.d.ts +1 -1
- package/dist/components/select/index.d.ts +0 -2
- package/dist/components/skeleton/Skeleton.vue.d.ts +1 -1
- package/dist/components/slider/Slider.vue.d.ts +2 -0
- package/dist/components/split-chars/SplitChars.vue.d.ts +1 -1
- package/dist/components/surface/Surface.vue.d.ts +1 -1
- package/dist/components/table/Table.vue.d.ts +4 -0
- package/dist/components/tabs/SegmentedTabs.vue.d.ts +10 -0
- package/dist/components/tabs/index.d.ts +1 -1
- package/dist/components/tabs/styles/drag.css +1 -0
- package/dist/components/tags-input/TagsInput.vue.d.ts +2 -2
- package/dist/components/timeline/ContinuousTimeline.vue.d.ts +1 -1
- package/dist/components/timeline/GlassTimeline.vue.d.ts +4 -4
- package/dist/components/toast/Toast.vue.d.ts +3 -3
- package/dist/components/toast/use-toast.d.ts +4 -4
- package/dist/components/typewriter/TypewriterText.vue.d.ts +1 -4
- package/dist/components/typewriter/composables/useTypewriter.d.ts +0 -1
- package/dist/components/typewriter/utils/graphemes.d.ts +1 -0
- package/dist/components/watercolor-dot/WatercolorDot.vue.d.ts +2 -2
- package/dist/composables/glass/useGlassBackdropLuminance.d.ts +31 -0
- package/dist/composables/glass/webgpu/rendererStatus.d.ts +13 -0
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +3 -0
- package/dist/composables/glass/webgpu/webgpuCanvasTypes.d.ts +2 -0
- package/dist/composables/motion/springProjection.d.ts +16 -0
- package/dist/composables/motion/useAnimatedNumber.d.ts +1 -6
- package/dist/composables/motion/useCountup.d.ts +1 -6
- package/dist/composables/motion/useDockCtaReceive.d.ts +55 -0
- package/dist/composables/motion/useElementMorph.d.ts +8 -0
- package/dist/composables/motion/useLiquidPress.d.ts +12 -4
- package/dist/composables/motion/useNumericTransition.d.ts +2 -0
- package/dist/composables/motion/useTextHighlight.d.ts +2 -1
- package/dist/configurator-CSENXXSy.js +311 -0
- package/dist/configurator.js +2 -3
- package/dist/constellation.js +235 -571
- package/dist/controls.js +55 -63
- package/dist/{createCanvasLifecycle-DlrcvWbb.js → createCanvasLifecycle-hsFkQVdl.js} +32 -32
- package/dist/dark-DIH-blY1.js +70 -0
- package/dist/dark.d.ts +1 -2
- package/dist/dark.js +2 -20
- package/dist/{DataTable-Bxya8nBn.js → data-table-DveMdgBM.js} +231 -120
- package/dist/data-table.js +2 -2
- package/dist/deck.js +10 -21
- package/dist/dialog-BzQxKrUr.js +281 -0
- package/dist/dialog.js +2 -3
- package/dist/dock.js +561 -428
- package/dist/{dockContext-d-WpJN2Z.js → dockContext-4S9qP0Z4.js} +1 -1
- package/dist/dom.js +196 -7
- package/dist/drawer.js +111 -66
- package/dist/dropdown-menu-DORIA52F.js +378 -0
- package/dist/dropdown-menu.js +3 -2
- package/dist/easing.d.ts +0 -9
- package/dist/easing.js +334 -187
- package/dist/expandable-container.js +12 -4
- package/dist/fading-scroll.js +1 -1
- package/dist/focus-scope.js +1 -1
- package/dist/forms.js +37 -78
- package/dist/fourier-field.js +273 -263
- package/dist/fourier-math.d.ts +0 -6
- package/dist/fourier-math.js +112 -2
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +131 -195
- package/dist/handmark.d.ts +0 -2
- package/dist/handmark.js +82 -82
- package/dist/header-ribbon.js +41 -30
- package/dist/{IconChip-CwLmBJ_K.js → icon-chip-BWuxz1-u.js} +1 -1
- package/dist/icon-chip.js +1 -1
- package/dist/{IconTooltip-D9sbK-Mk.js → icon-tooltip-CO6rw0dZ.js} +1 -1
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/infinite-scroll.d.ts +0 -1
- package/dist/infinite-scroll.js +17 -15
- package/dist/instrument-chassis.js +1 -1
- package/dist/keyboard.js +104 -2
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +95 -69
- package/dist/liquid-grid.js +173 -162
- package/dist/metric-badge.js +3 -3
- package/dist/metric-cell.js +2 -2
- package/dist/metric-stack.js +1 -1
- package/dist/motion-core.js +15 -16
- package/dist/motion-curves.d.ts +0 -20
- package/dist/motion.js +59 -58
- package/dist/{Notification-DQv2cOh9.js → notification-DVs7ODMg.js} +17 -8
- package/dist/notification.js +1 -1
- package/dist/{NumberFieldContent-BkE7xPS9.js → number-field-PvkGedHk.js} +2 -2
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.js +1 -1
- package/dist/paper-backdrop.js +31 -2
- package/dist/{PopoverContent-DOtszFWK.js → popover-WMgyRSyN.js} +7 -2
- package/dist/popover.js +1 -1
- package/dist/procedural-color.wgsl-B9mLK7v0.js +377 -0
- package/dist/progress-C-HHuFZy.js +192 -0
- package/dist/progress.js +2 -2
- package/dist/pulse.js +3 -1
- package/dist/reactive.js +19 -3
- package/dist/rendererStatus-C2-zC2Q-.js +40 -0
- package/dist/{resolveCanvasColor-B3L-akX0.js → resolveCanvasColor-yarP5bdk.js} +1 -1
- package/dist/scroll-progress-rim.js +1 -1
- package/dist/search.js +187 -146
- package/dist/{SelectScrollDownButton-CDtwaWkZ.js → select-BIv4R3Ir.js} +109 -44
- package/dist/select.js +2 -4
- package/dist/separator-CBU94kTM.js +62 -0
- package/dist/separator.js +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/slider-Cc_qw6GA.js +166 -0
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +43 -43
- package/dist/styles/accessibility.css +1 -0
- package/dist/styles/components.css +1 -1
- package/dist/styles/glass/control-surfaces.css +1 -1
- package/dist/styles/glass/glass-capsule.css +1 -1
- package/dist/styles/glass/ladder.css +1 -1
- package/dist/styles/glass/liquid-fill.css +1 -1
- package/dist/styles/glass/material-roles.css +1 -0
- package/dist/styles/glass/material.css +1 -1
- package/dist/styles/glass/surface-axis.css +1 -1
- package/dist/styles/glass/surfaces-pager.css +1 -1
- package/dist/styles/glass/surfaces.css +1 -1
- package/dist/styles/glass.css +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/styles/theme/bridges.css +1 -1
- package/dist/styles/tokens/glass-fx.css +1 -1
- package/dist/styles/tokens/glass.css +1 -1
- package/dist/styles/tokens/offsets.css +1 -1
- package/dist/styles/tokens/scale-paper.css +1 -1
- package/dist/styles/tokens/scheme-spring.css +1 -1
- package/dist/styles/tokens/shadow.css +1 -1
- package/dist/styles/tokens.d.ts +53 -0
- package/dist/styles/tokens.ts +58 -0
- package/dist/styles/typography/scale.css +1 -1
- package/dist/styles/typography/semantic.css +1 -1
- package/dist/styles/typography/utilities.css +1 -1
- package/dist/styles/utilities/base.css +1 -1
- package/dist/styles/utilities/btn.css +1 -1
- package/dist/styles/utilities/components.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/{Switch-BPBfhMU3.js → switch-Boj4Ucn5.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/tabs.js +51 -45
- package/dist/timeline.js +2 -2
- package/dist/toast.js +1 -1
- package/dist/{ToggleGroupItem-DNWx2aSW.js → toggle-group-BPchFsns.js} +10 -7
- package/dist/toggle-group.js +1 -1
- package/dist/tokens.d.ts +1 -53
- package/dist/tokens.js +1 -1
- package/dist/{TooltipProvider-GtfYdSVf.js → tooltip-BmOQJzh0.js} +1 -0
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +151 -166
- package/dist/{useAccentTone-D25DxviG.js → useAccentTone-C-p6WdPe.js} +1 -1
- package/dist/{useAnimatedNumber-2XC4aRB6.js → useAnimatedNumber-BRVVaFFc.js} +1 -1
- package/dist/useDockCtaReceive-CK-RLASa.js +257 -0
- package/dist/{useGooMorph-CU1pwuC6.js → useGooMorph-D1F6QJlH.js} +140 -59
- package/dist/{useIntersectionPause-Cmt5Tnv9.js → useIntersectionPause-B-dbxl9w.js} +1 -1
- package/dist/useLiquidPress-BYcwwGQV.js +68 -0
- package/dist/{useRAFLoop-CvOo_kgb.js → useRAFLoop-BtwQ9DyY.js} +1 -1
- package/dist/{useScrollProgress-C-yImzhU.js → useScrollProgress-DZI4nf4v.js} +1 -1
- package/dist/{useSelectionGroup-Btpf24aY.js → useSelectionGroup-LDzBdR1Y.js} +3 -3
- package/dist/{useTabRovingFocus-CG1H1k1J.js → useTabRovingFocus-DkLYwo4L.js} +1 -1
- package/dist/{useTouchGate-BlegwvwL.js → useTouchGate-Cj5fOkTv.js} +1 -1
- package/dist/valueDomain-B8L04u3U.js +13 -0
- package/dist/watercolor-dot.js +5 -3
- package/package.json +5 -12
- package/src/styles/accessibility.css +48 -0
- package/src/styles/glass/glass-capsule.css +2 -2
- package/src/styles/glass/ladder.css +1 -1
- package/src/styles/glass/material-roles.css +18 -0
- package/src/styles/glass/material.css +18 -12
- package/src/styles/glass.css +5 -5
- package/src/styles/index.css +38 -30
- package/src/styles/theme/bridges.css +0 -6
- package/src/styles/tokens/glass-fx.css +1 -5
- package/src/styles/tokens/glass.css +1 -2
- package/src/styles/tokens/offsets.css +0 -1
- package/src/styles/tokens/property-regs.css +11 -10
- package/src/styles/tokens/scale-paper.css +0 -1
- package/src/styles/tokens/scheme-motion.css +3 -0
- package/src/styles/tokens/scheme-spring.css +0 -10
- package/src/styles/tokens/shadow.css +3 -29
- package/src/styles/tokens.ts +58 -0
- package/src/styles/typography/scale.css +5 -2
- package/src/styles/typography/semantic.css +5 -5
- package/src/styles/typography/utilities.css +5 -5
- package/src/styles/utilities/base.css +5 -5
- package/src/styles/utilities/btn.css +6 -27
- package/src/styles/utilities.css +4 -6
- package/dist/ConfiguratorRow-BV6zPjTM.js +0 -151
- package/dist/DialogContent-Bl4v10AC.js +0 -192
- package/dist/DialogFooter-C0v4Hz2F.js +0 -168
- package/dist/PaperBackdrop-BYwE8_kg.js +0 -31
- package/dist/Progress-uWLyXE7J.js +0 -308
- package/dist/SelectGroup-BuEptUsa.js +0 -31
- package/dist/SelectSeparator-4QGephvr.js +0 -49
- package/dist/Separator-DqJ6PfOd.js +0 -44
- package/dist/color-Bp5jmv4Z.js +0 -86
- package/dist/components/carousel/GlassCarouselPager.vue.d.ts +0 -50
- package/dist/components/combobox/ComboboxSeparator.vue.d.ts +0 -18
- package/dist/components/combobox/ComboboxViewport.vue.d.ts +0 -18
- package/dist/components/constellation/composables/constellationGLSetup.d.ts +0 -10
- package/dist/components/constellation/composables/constellationWGPUSetup.d.ts +0 -19
- package/dist/components/constellation/composables/uniformBridgeWGPU.d.ts +0 -66
- package/dist/components/constellation/shaders/constellation-lines.glsl.d.ts +0 -2
- package/dist/components/constellation/shaders/constellation-lines.wgsl.d.ts +0 -1
- package/dist/components/constellation/shaders/constellation-points.glsl.d.ts +0 -2
- package/dist/components/constellation/shaders/constellation-points.wgsl.d.ts +0 -1
- package/dist/components/deck/composables/useDeckSpring.d.ts +0 -22
- package/dist/components/dialog/DialogScrollContent.vue.d.ts +0 -33
- package/dist/components/progress/ProgressSectioned.vue.d.ts +0 -47
- package/dist/components/progress/useProgressGeometry.d.ts +0 -60
- package/dist/components/section/Section.vue.d.ts +0 -73
- package/dist/components/section/index.d.ts +0 -1
- package/dist/components/stacked-icons/StackedIconGroup.vue.d.ts +0 -30
- package/dist/components/stacked-icons/index.d.ts +0 -2
- package/dist/components/stacked-icons/types.d.ts +0 -19
- package/dist/dropdown-menu-DaGlVdp9.js +0 -421
- package/dist/math-CIEcwsYi.js +0 -112
- package/dist/procedural-color.wgsl-ByduxnzV.js +0 -4
- package/dist/slider-Cxuj_W_H.js +0 -151
- package/dist/stacked-icons.d.ts +0 -1
- package/dist/stacked-icons.js +0 -98
- package/dist/styles/cards.css +0 -1
- package/dist/styles/completion-seal.css +0 -1
- package/dist/styles/dock/adaptive-legibility.css +0 -1
- package/dist/styles/dock/dock.css +0 -1
- package/dist/styles/dock/layer-group.css +0 -1
- package/dist/styles/dock/layers.css +0 -1
- package/dist/styles/dock/overflow.css +0 -1
- package/dist/styles/dock/popover.css +0 -1
- package/dist/styles/dock/shape.css +0 -1
- package/dist/styles/dock/shell.css +0 -1
- package/dist/styles/dock-controls/icon-button.css +0 -1
- package/dist/styles/dock-controls.css +0 -1
- package/dist/styles/dock.css +0 -1
- package/dist/styles/drawer.css +0 -1
- package/dist/styles/icon-chip.css +0 -1
- package/dist/styles/instrument-chassis.css +0 -1
- package/dist/styles/scroll-progress-rim.css +0 -1
- package/dist/styles/select.css +0 -1
- package/dist/styles/tabs/segmented-tabs-drag.css +0 -1
- package/dist/styles/utilities/animate.css +0 -0
- package/dist/useConfiguratorState-Dq35N_7t.js +0 -167
- package/dist/useDockCtaReceive-BgMmeINo.js +0 -161
- package/dist/useGlobalDark-DjKMEQE2.js +0 -53
- package/dist/useGpuSubstrate-DcY584kE.js +0 -347
- package/dist/useInterval-ZATRi-1T.js +0 -18
- package/dist/useKeyboardShortcuts-ynVmNFo3.js +0 -104
- package/dist/useLiquidPress-BXNHydZh.js +0 -40
- package/dist/useTextHighlight-C46Le9u_.js +0 -72
- package/dist/useViewportReady-c0isoKL8.js +0 -191
- package/src/styles/card-scroll.css +0 -189
- package/src/styles/cards.css +0 -485
- package/src/styles/completion-seal.css +0 -205
- package/src/styles/configurator.css +0 -359
- package/src/styles/dialog-placement.css +0 -68
- package/src/styles/dock/adaptive-legibility.css +0 -119
- package/src/styles/dock/crossfade.css +0 -139
- package/src/styles/dock/cta-seat.css +0 -87
- package/src/styles/dock/density.css +0 -458
- package/src/styles/dock/dock.css +0 -199
- package/src/styles/dock/fisheye.css +0 -81
- package/src/styles/dock/layer-group.css +0 -329
- package/src/styles/dock/layers.css +0 -438
- package/src/styles/dock/morph.css +0 -455
- package/src/styles/dock/overflow.css +0 -332
- package/src/styles/dock/popover.css +0 -249
- package/src/styles/dock/search.css +0 -68
- package/src/styles/dock/section.css +0 -59
- package/src/styles/dock/shape.css +0 -188
- package/src/styles/dock/shell-regions.css +0 -73
- package/src/styles/dock/shell.css +0 -500
- package/src/styles/dock-controls/dark-mode-toggle.css +0 -123
- package/src/styles/dock-controls/icon-button.css +0 -221
- package/src/styles/dock-controls/tab-button.css +0 -143
- package/src/styles/dock-controls/touch-floor.css +0 -119
- package/src/styles/dock-controls/triggers.css +0 -157
- package/src/styles/dock-controls.css +0 -92
- package/src/styles/dock.css +0 -219
- package/src/styles/drawer.css +0 -434
- package/src/styles/feedback-tone.css +0 -104
- package/src/styles/icon-chip.css +0 -256
- package/src/styles/instrument-chassis.css +0 -449
- package/src/styles/menu.css +0 -187
- package/src/styles/scroll-progress-rim.css +0 -87
- package/src/styles/segmented-tabs.css +0 -424
- package/src/styles/select.css +0 -201
- package/src/styles/tabs/segmented-tabs-drag.css +0 -200
- package/src/styles/utilities/animate.css +0 -29
- /package/dist/{coalesce-metric-B8o7zT9u.js → coalesce-metric-znAcLzkB.js} +0 -0
- /package/dist/{CollapsibleContent-DiHcB_HH.js → collapsible-bPzS1aQk.js} +0 -0
- /package/dist/{compile-C55K3P9g.js → compile-DK3Fri1B.js} +0 -0
- /package/dist/{styles → components/_shared}/feedback-tone.css +0 -0
- /package/dist/{styles → components/_shared}/menu.css +0 -0
- /package/dist/{styles → components/card}/card-scroll.css +0 -0
- /package/dist/{styles/configurator.css → components/configurator/styles.css} +0 -0
- /package/dist/{styles/dock-controls → components/controls}/dark-mode-toggle.css +0 -0
- /package/dist/{styles/dialog-placement.css → components/dialog/placement.css} +0 -0
- /package/dist/{styles/dock-controls → components/dock/styles/controls}/tab-button.css +0 -0
- /package/dist/{styles/dock-controls → components/dock/styles/controls}/triggers.css +0 -0
- /package/dist/{styles/dock → components/dock/styles}/crossfade.css +0 -0
- /package/dist/{styles/dock → components/dock/styles}/cta-seat.css +0 -0
- /package/dist/{styles/dock → components/dock/styles}/fisheye.css +0 -0
- /package/dist/{styles/dock → components/dock/styles}/morph.css +0 -0
- /package/dist/{styles/dock → components/dock/styles}/search.css +0 -0
- /package/dist/{styles/dock → components/dock/styles}/section.css +0 -0
- /package/dist/{styles/dock → components/dock/styles}/shell-regions.css +0 -0
- /package/dist/{styles/segmented-tabs.css → components/tabs/styles/segmented.css} +0 -0
- /package/dist/{constants-D8lSMkOz.js → constants-DRZmNIY-.js} +0 -0
- /package/dist/{createContext-BQ1Gy_LB.js → createContext-FU0n5MGK.js} +0 -0
- /package/dist/{flow.glsl-CVqPSj8_.js → flow.glsl-DEGFGE11.js} +0 -0
- /package/dist/{FocusScope-BzKwhsBn.js → focus-scope-DUTKveod.js} +0 -0
- /package/dist/{InstrumentChassis-Dss5Tjcm.js → instrument-chassis-Cvstg4_U.js} +0 -0
- /package/dist/{Label-C84TaQiw.js → label-Cj38tJKG.js} +0 -0
- /package/dist/{menuItemVariants-DbO-Fr74.js → menuItemVariants-D6AOzzND.js} +0 -0
- /package/dist/{pointerFieldMappings-4VtmkOWv.js → pointerFieldMappings-CZojkgKj.js} +0 -0
- /package/dist/{presets-B07HzyKd.js → presets-CxeNvxuO.js} +0 -0
- /package/dist/{prng-B0PLRmR6.js → prng-Dz2_9RJu.js} +0 -0
- /package/dist/{scrollReader-DzYqPQ6V.js → scrollReader-C2oK9Hb8.js} +0 -0
- /package/dist/{supportsCssTimeline-Ie4xJFbD.js → supportsCssTimeline-Dz-GVxXM.js} +0 -0
- /package/dist/{Toaster-C_-WeU9W.js → toast-kAbchIN2.js} +0 -0
- /package/dist/{useControlSize-DJwe-7ZQ.js → useControlSize-CFfOk8I-.js} +0 -0
- /package/dist/{useDocumentVisibility-CpJGUgcJ.js → useDocumentVisibility-YeBDGqtI.js} +0 -0
- /package/dist/{useDragMorph-65ihHePq.js → useDragMorph-7ygF9O0m.js} +0 -0
- /package/dist/{useDragVelocity-BWcNMCux.js → useDragVelocity-CbMZEBaC.js} +0 -0
- /package/dist/{useFuzzySearch-KslRxiJY.js → useFuzzySearch-BOgep7RE.js} +0 -0
- /package/dist/{useLeadTrail-DOH4XkL1.js → useLeadTrail-BYu8dq4G.js} +0 -0
- /package/dist/{usePointerVelocityField-CwXyeW0Z.js → usePointerVelocityField-BdvnO0py.js} +0 -0
- /package/dist/{useResizeObserver-DDuoBeBo.js → useResizeObserver-BcUTquV7.js} +0 -0
- /package/dist/{useResolveTokenColor-DVT5kwv6.js → useResolveTokenColor-C07e-qaT.js} +0 -0
- /package/dist/{useRoutePointer-DL7I0gY4.js → useRoutePointer-BDNMFN73.js} +0 -0
- /package/dist/{useSpringMount-CNvvgGiC.js → useSpringMount-C6-DBx4e.js} +0 -0
- /package/dist/{useTimer-CkDV8SC2.js → useTimer-D8koDvJS.js} +0 -0
- /package/dist/{useUserInvalidAria-Bkruei7M.js → useUserInvalidAria-Cr4nR3tu.js} +0 -0
- /package/dist/{vReveal-DUmiEkX_.js → vReveal-DZfWl9XI.js} +0 -0
- /package/dist/{vSpecular-DlYN0UZy.js → vSpecular-CQFmLNzA.js} +0 -0
- /package/dist/{writeVelocityWeight-D1rvdxJu.js → writeVelocityWeight-D_AcvTsE.js} +0 -0
package/dist/liquid-grid.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-C1je1s0u.js";
|
|
2
|
-
import { t } from "./usePointerVelocityField-
|
|
3
|
-
import { n,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { computed as
|
|
2
|
+
import { t } from "./usePointerVelocityField-BdvnO0py.js";
|
|
3
|
+
import { cssToOklch as n, oklchToLinear as r } from "./color.js";
|
|
4
|
+
import { a as i, d as a, l as o, n as s } from "./procedural-color.wgsl-B9mLK7v0.js";
|
|
5
|
+
import { t as c } from "./flow.glsl-DEGFGE11.js";
|
|
6
|
+
import { a as l } from "./rendererStatus-C2-zC2Q-.js";
|
|
7
|
+
import { computed as u, createElementBlock as d, createElementVNode as f, defineComponent as p, normalizeStyle as m, onMounted as h, onScopeDispose as g, openBlock as _, reactive as v, readonly as y, shallowRef as b, useTemplateRef as x, watch as S } from "vue";
|
|
8
8
|
//#region src/composables/glass/wave/waveField.ts
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
let o = ((e.x * n.x + e.y * n.y) * r - t * i) /
|
|
9
|
+
var C = Math.PI * 2;
|
|
10
|
+
function w(e, t, n, r, i, a) {
|
|
11
|
+
let o = ((e.x * n.x + e.y * n.y) * r - t * i) / C;
|
|
12
12
|
o -= Math.floor(o);
|
|
13
13
|
let s = (o - .5) * 2;
|
|
14
14
|
return Math.exp(-(s * s) / Math.max(a, .001));
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return
|
|
16
|
+
function T(e, t, n, r, i, a, o) {
|
|
17
|
+
return w(e, t, n, r, i, a) * o;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
let c = Math.max(t, .001) * .5, l =
|
|
19
|
+
function E(e, t, n, r, i, a, o, s) {
|
|
20
|
+
let c = Math.max(t, .001) * .5, l = T({
|
|
21
21
|
x: e.x + c,
|
|
22
22
|
y: e.y
|
|
23
|
-
}, n, r, i, a, o, s), u =
|
|
23
|
+
}, n, r, i, a, o, s), u = T({
|
|
24
24
|
x: e.x - c,
|
|
25
25
|
y: e.y
|
|
26
|
-
}, n, r, i, a, o, s), d =
|
|
26
|
+
}, n, r, i, a, o, s), d = T({
|
|
27
27
|
x: e.x,
|
|
28
28
|
y: e.y + c
|
|
29
|
-
}, n, r, i, a, o, s), f =
|
|
29
|
+
}, n, r, i, a, o, s), f = T({
|
|
30
30
|
x: e.x,
|
|
31
31
|
y: e.y - c
|
|
32
32
|
}, n, r, i, a, o, s);
|
|
@@ -35,23 +35,23 @@ function C(e, t, n, r, i, a, o, s) {
|
|
|
35
35
|
y: (d - f) / (2 * c)
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function D(e, t, n) {
|
|
39
39
|
let r = 1 - Math.abs((e.x - Math.floor(e.x)) * 2 - 1), i = 1 - Math.abs((e.y - Math.floor(e.y)) * 2 - 1), a = Math.min(r, i), o = Math.max(n.x, n.y) * 1.5, s = t, c = t + 2 * o, l = Math.max(c - s, 1e-6), u = Math.min(Math.max((a - s) / l, 0), 1);
|
|
40
40
|
return u * u * (3 - 2 * u);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function O(e, t, n, r) {
|
|
43
43
|
let i = e.x - t.x, a = e.y - t.y, o = i * i + a * a, s = Math.max(r, 1e-4), c = n * Math.exp(-o / (2 * s * s)), l = Math.cos(c), u = Math.sin(c);
|
|
44
44
|
return {
|
|
45
45
|
x: t.x + (l * i - u * a),
|
|
46
46
|
y: t.y + (u * i + l * a)
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
var
|
|
50
|
-
function
|
|
51
|
-
let u =
|
|
49
|
+
var k = 1.833333;
|
|
50
|
+
function A(e, t, n, r, i, a, o, s, c, l = .6) {
|
|
51
|
+
let u = w(t, n, r, i, a, o) * c, d = e({
|
|
52
52
|
x: t.x * l + n * .05,
|
|
53
53
|
y: t.y * l - n * .04
|
|
54
|
-
}), f = l *
|
|
54
|
+
}), f = l * k, p = e({
|
|
55
55
|
x: t.x * f - n * .03,
|
|
56
56
|
y: t.y * f + n * .035
|
|
57
57
|
}), m = s * u;
|
|
@@ -63,8 +63,8 @@ function D(e, t, n, r, i, a, o, s, c, l = .6) {
|
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region src/components/liquid-grid/composables/liquidGrid.ts
|
|
65
65
|
Math.PI * 2;
|
|
66
|
-
var
|
|
67
|
-
function
|
|
66
|
+
var j = .012, M = .03;
|
|
67
|
+
function N(e, t) {
|
|
68
68
|
let n = e * .1031 % 1, r = t * .1031 % 1, i = e * .1031 % 1;
|
|
69
69
|
n < 0 && (n += 1), r < 0 && (r += 1), i < 0 && (i += 1);
|
|
70
70
|
let a = n * (r + 33.33) + r * (i + 33.33) + i * (n + 33.33);
|
|
@@ -72,90 +72,90 @@ function A(e, t) {
|
|
|
72
72
|
let o = (n + r) * i % 1;
|
|
73
73
|
return o < 0 && (o += 1), o;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function P(e, t, n) {
|
|
76
76
|
return e + (t - e) * n;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
let n = Math.floor(e), r = Math.floor(t), i = e - n, a = t - r, o = i * i * i * (i * (i * 6 - 15) + 10), s = a * a * a * (a * (a * 6 - 15) + 10), c =
|
|
80
|
-
return
|
|
78
|
+
function F(e, t) {
|
|
79
|
+
let n = Math.floor(e), r = Math.floor(t), i = e - n, a = t - r, o = i * i * i * (i * (i * 6 - 15) + 10), s = a * a * a * (a * (a * 6 - 15) + 10), c = N(n, r), l = N(n + 1, r), u = N(n, r + 1), d = N(n + 1, r + 1);
|
|
80
|
+
return P(P(c, l, o), P(u, d, o), s);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function I(e) {
|
|
83
83
|
let t = 0, n = .5, r = 1, i = e.x, a = e.y;
|
|
84
84
|
for (let e = 0; e < 3; e++) {
|
|
85
|
-
t += n *
|
|
85
|
+
t += n * F(i * r, a * r);
|
|
86
86
|
let e = .8 * i - .6 * a, o = .6 * i + .8 * a;
|
|
87
87
|
i = e, a = o, r *= 2, n *= .5;
|
|
88
88
|
}
|
|
89
89
|
return t;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
let t =
|
|
93
|
-
x: e.x +
|
|
91
|
+
function L(e) {
|
|
92
|
+
let t = I({
|
|
93
|
+
x: e.x + j,
|
|
94
94
|
y: e.y
|
|
95
|
-
}) -
|
|
96
|
-
x: e.x -
|
|
95
|
+
}) - I({
|
|
96
|
+
x: e.x - j,
|
|
97
97
|
y: e.y
|
|
98
|
-
}), n =
|
|
98
|
+
}), n = I({
|
|
99
99
|
x: e.x,
|
|
100
|
-
y: e.y +
|
|
101
|
-
}) -
|
|
100
|
+
y: e.y + j
|
|
101
|
+
}) - I({
|
|
102
102
|
x: e.x,
|
|
103
|
-
y: e.y -
|
|
104
|
-
}), r = t / (2 *
|
|
103
|
+
y: e.y - j
|
|
104
|
+
}), r = t / (2 * j);
|
|
105
105
|
return {
|
|
106
|
-
x: n / (2 *
|
|
106
|
+
x: n / (2 * j),
|
|
107
107
|
y: -r
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function R(e, t, n) {
|
|
111
111
|
let r = t - e, i = Math.abs(r) < 1e-9 ? r < 0 ? -1e-9 : 1e-9 : r, a = Math.min(Math.max((n - e) / i, 0), 1);
|
|
112
112
|
return a * a * (3 - 2 * a);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function z(e, t, n) {
|
|
115
115
|
return Math.min(Math.max(e, t), n);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
let r = 1 - Math.abs((e.x - Math.floor(e.x)) * 2 - 1), i = 1 - Math.abs((e.y - Math.floor(e.y)) * 2 - 1), a =
|
|
119
|
-
return l *=
|
|
117
|
+
function B(e, t, n) {
|
|
118
|
+
let r = 1 - Math.abs((e.x - Math.floor(e.x)) * 2 - 1), i = 1 - Math.abs((e.y - Math.floor(e.y)) * 2 - 1), a = z(t, n.x, .5), o = z(t, n.y, .5), s = n.x * 1.5, c = n.y * 1.5, l = R(a + s, a - s, r), u = R(o + c, o - c, i);
|
|
119
|
+
return l *= z(t / Math.max(a, 1e-6), 0, 1), u *= z(t / Math.max(o, 1e-6), 0, 1), l = P(l, t, z(n.x * 2 - 1, 0, 1)), u = P(u, t, z(n.y * 2 - 1, 0, 1)), Math.max(l, u);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
let r =
|
|
121
|
+
function ee(e, t, n) {
|
|
122
|
+
let r = A(L, {
|
|
123
123
|
x: e.x * n.gridScale,
|
|
124
124
|
y: e.y * n.gridScale
|
|
125
|
-
}, t, n.waveDir, n.waveK, n.waveOmega, n.waveSigma, n.twistMax, n.amp,
|
|
126
|
-
n.interactive > .5 && (r =
|
|
127
|
-
let i =
|
|
125
|
+
}, t, n.waveDir, n.waveK, n.waveOmega, n.waveSigma, n.twistMax, n.amp, M);
|
|
126
|
+
n.interactive > .5 && (r = O(r, n.cursor, n.bulgeStrength * n.bulgeMode, n.bulgeRadius));
|
|
127
|
+
let i = B(r, n.targetWidth, n.uvDeriv), a = Math.max(n.majorEvery, 1), o = {
|
|
128
128
|
x: r.x / a,
|
|
129
129
|
y: r.y / a
|
|
130
130
|
}, s = {
|
|
131
131
|
x: n.uvDeriv.x / a,
|
|
132
132
|
y: n.uvDeriv.y / a
|
|
133
|
-
}, c =
|
|
133
|
+
}, c = B(o, n.targetWidthMajor, s), l = Math.max(i * n.minorAlpha, c * n.majorAlpha), u = n.faceAlpha ?? 0, d = n.faceReliefGain ?? 0, f = n.squashK ?? 0, p = n.baseInset ?? 0, m = n.lightDir ?? {
|
|
134
134
|
x: .6,
|
|
135
135
|
y: .8
|
|
136
136
|
}, h = {
|
|
137
137
|
x: Math.floor(r.x) + .5,
|
|
138
138
|
y: Math.floor(r.y) + .5
|
|
139
|
-
}, g =
|
|
139
|
+
}, g = T(h, t, n.waveDir, n.waveK, n.waveOmega, n.waveSigma, n.amp), _ = E(h, 1, t, n.waveDir, n.waveK, n.waveOmega, n.waveSigma, n.amp), v = -_.x * d, y = -_.y * d, b = Math.hypot(v, y, 1), x = Math.hypot(m.x, m.y) || 1, S = z(.5 + (v * m.x + y * m.y) / (b * x) * .5, 0, 1), C = p * (1 - f * g), w = D(r, C, n.uvDeriv), k = w * u * n.fieldAlpha, j = z(S * .5 + g * .5, 0, 1);
|
|
140
140
|
return {
|
|
141
141
|
line: l,
|
|
142
142
|
alpha: l * n.fieldAlpha,
|
|
143
143
|
face: {
|
|
144
144
|
env: g,
|
|
145
145
|
h: g,
|
|
146
|
-
shade:
|
|
147
|
-
faceCov:
|
|
148
|
-
faceA:
|
|
149
|
-
rampT:
|
|
146
|
+
shade: S,
|
|
147
|
+
faceCov: w,
|
|
148
|
+
faceA: k,
|
|
149
|
+
rampT: j
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function V(e, t) {
|
|
154
154
|
return e / Math.max(t, 1);
|
|
155
155
|
}
|
|
156
156
|
//#endregion
|
|
157
157
|
//#region src/components/liquid-grid/shaders/liquid-grid.wgsl.ts
|
|
158
|
-
var
|
|
158
|
+
var H = `
|
|
159
159
|
const TAU: f32 = 6.283185307179586;
|
|
160
160
|
|
|
161
161
|
// ── Paper-grid uniforms (the typed-struct source-of-truth — see uniformBridgeWGPU.ts) ──
|
|
@@ -192,7 +192,7 @@ struct LiquidGridUniforms {
|
|
|
192
192
|
|
|
193
193
|
@group(0) @binding(0) var<uniform> u: LiquidGridUniforms;
|
|
194
194
|
|
|
195
|
-
${
|
|
195
|
+
${s}
|
|
196
196
|
|
|
197
197
|
// ── The host noise basis (transcribes liquidGrid.ts hash21/valueNoise/potentialFBM) ──
|
|
198
198
|
// A quintic-faded 2D value-noise fbm potential — the SAME basis the dot-flow-field carries
|
|
@@ -528,7 +528,7 @@ fn fs_main(in: VSOut) -> @location(0) vec4f {
|
|
|
528
528
|
let a = lineA + faceA * (1.0 - lineA);
|
|
529
529
|
return vec4f(outPremult, a); // premultiplied over transparent
|
|
530
530
|
}
|
|
531
|
-
`,
|
|
531
|
+
`, U = {
|
|
532
532
|
u0: 0,
|
|
533
533
|
face: 4,
|
|
534
534
|
warp2: 8,
|
|
@@ -544,48 +544,48 @@ fn fs_main(in: VSOut) -> @location(0) vec4f {
|
|
|
544
544
|
faceMid: 48,
|
|
545
545
|
faceHi: 52
|
|
546
546
|
};
|
|
547
|
-
function
|
|
547
|
+
function W() {
|
|
548
548
|
let e = /* @__PURE__ */ new ArrayBuffer(224);
|
|
549
549
|
return {
|
|
550
550
|
buffer: e,
|
|
551
551
|
f32: new Float32Array(e)
|
|
552
552
|
};
|
|
553
553
|
}
|
|
554
|
-
function
|
|
555
|
-
let { f32: c } = e, l =
|
|
556
|
-
c[
|
|
554
|
+
function G(e, t, n, i, a, o, s) {
|
|
555
|
+
let { f32: c } = e, l = V(a, t.cellSize);
|
|
556
|
+
c[U.u0 + 0] = n, c[U.u0 + 1] = l, c[U.u0 + 2] = t.cellSize, c[U.u0 + 3] = t.majorEvery, c[U.face + 0] = t.faceAlpha, c[U.face + 1] = t.faceRelief, c[U.face + 2] = t.squashK, c[U.face + 3] = t.baseInset, c[U.warp2 + 0] = 0, c[U.warp2 + 1] = i, c[U.warp2 + 2] = t.lightDir[0], c[U.warp2 + 3] = t.lightDir[1];
|
|
557
557
|
let u = Math.max(t.cellSize, 1), d = t.lineWidth / u, f = t.lineWidth * 1.6 / u;
|
|
558
|
-
c[
|
|
558
|
+
c[U.grid + 0] = d, c[U.grid + 1] = f, c[U.grid + 2] = t.minorAlpha, c[U.grid + 3] = t.majorAlpha;
|
|
559
559
|
let p = t.background === "transparent" ? 0 : 1;
|
|
560
|
-
c[
|
|
561
|
-
let m =
|
|
562
|
-
if (c[
|
|
560
|
+
c[U.field + 0] = t.fieldAlpha, c[U.field + 1] = p, c[U.field + 2] = 0, c[U.field + 3] = 0, c[U.cursor + 0] = o.x, c[U.cursor + 1] = o.y, c[U.cursor + 2] = t.bulgeStrength, c[U.cursor + 3] = t.bulgeRadius, c[U.cursor2 + 0] = t.bulgeMode === "attract" ? -1 : 1, c[U.cursor2 + 1] = +!!t.interactive, c[U.cursor2 + 2] = 0, c[U.cursor2 + 3] = 0;
|
|
561
|
+
let m = r(t.lineColor);
|
|
562
|
+
if (c[U.line + 0] = m[0], c[U.line + 1] = m[1], c[U.line + 2] = m[2], c[U.line + 3] = 0, t.background === "transparent") c[U.bg + 0] = 0, c[U.bg + 1] = 0, c[U.bg + 2] = 0, c[U.bg + 3] = 0;
|
|
563
563
|
else {
|
|
564
|
-
let e =
|
|
565
|
-
c[
|
|
564
|
+
let e = r(t.background);
|
|
565
|
+
c[U.bg + 0] = e[0], c[U.bg + 1] = e[1], c[U.bg + 2] = e[2], c[U.bg + 3] = 0;
|
|
566
566
|
}
|
|
567
|
-
c[
|
|
568
|
-
let h =
|
|
569
|
-
return c[
|
|
567
|
+
c[U.wave + 0] = t.waveDir[0], c[U.wave + 1] = t.waveDir[1], c[U.wave + 2] = t.waveK, c[U.wave + 3] = t.waveOmega, c[U.wave2 + 0] = t.waveSigma, c[U.wave2 + 1] = t.twistMax, c[U.wave2 + 2] = 0, c[U.wave2 + 3] = s;
|
|
568
|
+
let h = r(t.faceWarmLo), g = r(t.faceWarmMid), _ = r(t.faceWarmHi);
|
|
569
|
+
return c[U.faceLo + 0] = h[0], c[U.faceLo + 1] = h[1], c[U.faceLo + 2] = h[2], c[U.faceLo + 3] = 0, c[U.faceMid + 0] = g[0], c[U.faceMid + 1] = g[1], c[U.faceMid + 2] = g[2], c[U.faceMid + 3] = 0, c[U.faceHi + 0] = _[0], c[U.faceHi + 1] = _[1], c[U.faceHi + 2] = _[2], c[U.faceHi + 3] = 0, e;
|
|
570
570
|
}
|
|
571
571
|
//#endregion
|
|
572
572
|
//#region src/components/liquid-grid/composables/liquidGridWGPUSetup.ts
|
|
573
|
-
var
|
|
574
|
-
function
|
|
573
|
+
var K = 64, te = 8, ne = 2;
|
|
574
|
+
function re(e) {
|
|
575
575
|
let { canvas: t, config: n, getCursor: r, getAmp: i, shouldContinue: a, onFrame: o } = e;
|
|
576
576
|
return function(e, s, c) {
|
|
577
577
|
let l = e.createShaderModule({
|
|
578
578
|
label: "[LiquidGrid] liquid-grid.wgsl",
|
|
579
|
-
code:
|
|
580
|
-
}), u =
|
|
579
|
+
code: H
|
|
580
|
+
}), u = W(), d = e.createBuffer({
|
|
581
581
|
label: "[LiquidGrid] uniforms",
|
|
582
582
|
size: u.buffer.byteLength,
|
|
583
|
-
usage:
|
|
583
|
+
usage: K | te
|
|
584
584
|
}), f = e.createBindGroupLayout({
|
|
585
585
|
label: "[LiquidGrid] bgl",
|
|
586
586
|
entries: [{
|
|
587
587
|
binding: 0,
|
|
588
|
-
visibility:
|
|
588
|
+
visibility: ne,
|
|
589
589
|
buffer: { type: "uniform" }
|
|
590
590
|
}]
|
|
591
591
|
}), p = e.createRenderPipeline({
|
|
@@ -625,7 +625,7 @@ function ee(e) {
|
|
|
625
625
|
});
|
|
626
626
|
function h(e) {}
|
|
627
627
|
function g(a) {
|
|
628
|
-
o?.(a),
|
|
628
|
+
o?.(a), G(u, n, a, t.width / Math.max(t.height, 1), t.height || 1, r(), i()), e.queue.writeBuffer(d, 0, u.buffer);
|
|
629
629
|
let c = e.createCommandEncoder({ label: "[LiquidGrid] frame" }), l = s.getCurrentTexture().createView(), f = c.beginRenderPass({ colorAttachments: [{
|
|
630
630
|
view: l,
|
|
631
631
|
clearValue: {
|
|
@@ -651,7 +651,7 @@ function ee(e) {
|
|
|
651
651
|
}
|
|
652
652
|
//#endregion
|
|
653
653
|
//#region src/composables/glass/wave/waveField.glsl.ts
|
|
654
|
-
var
|
|
654
|
+
var ie = "\n#ifndef WAVE_FIELD_TAU\n#define WAVE_FIELD_TAU 6.283185307179586\n#endif\n\n// The traveling-wave envelope — a moving Gaussian crest band sweeping along waveDir.\nfloat travelingEnvelope(vec2 pivot, float t, vec2 waveDir, float waveK, float waveOmega, float waveSigma) {\n float coord = dot(pivot, waveDir) * waveK - t * waveOmega;\n float crest = fract(coord / WAVE_FIELD_TAU);\n float z = (crest - 0.5) * 2.0;\n return exp(-(z * z) / max(waveSigma, 1e-3));\n}\n\n// The curl-direction scalar — the smooth low-freq director the per-cell twist follows.\nfloat curlScalar(vec2 cc, float t) {\n vec2 f = curlFBM(vec2(cc.x * 0.5 + t * 0.08, cc.y * 0.5 - t * 0.06));\n return clamp(f.x, -1.0, 1.0);\n}\n\n// The directed-twist FLOOR (the visibility cure): keep the curl SIGN (adjacent cells lean\n// together) but floor the magnitude so a crest-band cell ALWAYS rotates decisively.\n#ifndef WAVE_FIELD_TWIST_FLOOR\n#define WAVE_FIELD_TWIST_FLOOR 0.62\n#endif\nfloat directedTwist(float s, float floorMag) {\n float mag = max(floorMag, abs(s));\n float sgn = tanh(s * 6.0);\n return sgn * mag;\n}\n\n// ── The FACE leaf (the structurally-absent RE-INVENT — height-lit filled cell interior) ──\n// Defined ABOVE cellTwist: cellTwist rides cellHeight via the driver so twist + face read ONE\n// envelope.\n\n// The sheet displacement at a cell center = the EXACT traveling-wave scalar the twist rides.\nfloat cellHeight(vec2 cc, float t, vec2 waveDir, float waveK, float waveOmega, float waveSigma, float amp) {\n return travelingEnvelope(cc, t, waveDir, waveK, waveOmega, waveSigma) * amp;\n}\n\n// The pre-twist driver (FOLD A): the cell pivot cc + the crest envelope env the twist AND the\n// face both ride. The face samples height/relief at THIS pre-twist cc (floor(twisted_g) at the\n// crest lights a NEIGHBOUR cell). cc in .xy, env in .z.\nvec3 cellDriver(vec2 g, float cellSize, float t, vec2 waveDir, float waveK, float waveOmega,\n float waveSigma, float amp) {\n float cs = max(cellSize, 1e-3);\n vec2 cc = (floor(g / cs) + 0.5) * cs;\n float env = cellHeight(cc, t, waveDir, waveK, waveOmega, waveSigma, amp);\n return vec3(cc, env);\n}\n\n// The central-difference slope of cellHeight across a cell (eps = 0.5·cellSize) — derivative-\n// FREE (NO dFdx on the height) → Safari WebGL2-safe. Returns ∇H.\nvec2 faceRelief(vec2 cc, float cellSize, float t, vec2 waveDir, float waveK, float waveOmega,\n float waveSigma, float amp) {\n float eps = max(cellSize, 1e-3) * 0.5;\n float hxp = cellHeight(cc + vec2(eps, 0.0), t, waveDir, waveK, waveOmega, waveSigma, amp);\n float hxm = cellHeight(cc - vec2(eps, 0.0), t, waveDir, waveK, waveOmega, waveSigma, amp);\n float hyp = cellHeight(cc + vec2(0.0, eps), t, waveDir, waveK, waveOmega, waveSigma, amp);\n float hym = cellHeight(cc - vec2(0.0, eps), t, waveDir, waveK, waveOmega, waveSigma, amp);\n return vec2((hxp - hxm) / (2.0 * eps), (hyp - hym) / (2.0 * eps));\n}\n\n// Soft inset-square coverage inside a (warped) cell — the filled FACE plateau. d is the distance\n// into the cell from the nearest gutter (the Golus triangle-wave); the inset retreats as it grows\n// (the squash). aa = the shader's fwidth(g) (JS passes a fixed uvDeriv).\nfloat facePlateau(vec2 g, float inset, vec2 uvDeriv) {\n vec2 tri = 1.0 - abs(fract(g) * 2.0 - 1.0);\n float d = min(tri.x, tri.y);\n float aa = max(uvDeriv.x, uvDeriv.y) * 1.5;\n return smoothstep(inset, inset + 2.0 * aa, d);\n}\n\n// The cell-local twist about each cell's own center, gated by the traveling wave + directed\n// by the curl flow. amp is the spring-eased envelope amplitude the JS host drives. FOLD C: the\n// TWIST_FLOOR is crest-gated by env so OFF-crest cells relax to flat calm paper (the traveling\n// read, not static foil).\nvec2 cellTwist(vec2 g, float cellSize, float t, vec2 waveDir, float waveK, float waveOmega,\n float waveSigma, float twistMax, float shearMax, float amp) {\n vec3 drv = cellDriver(g, cellSize, t, waveDir, waveK, waveOmega, waveSigma, amp);\n vec2 cc = drv.xy;\n float env = drv.z;\n float floorMag = WAVE_FIELD_TWIST_FLOOR * env; // FOLD C: crest-gated floor\n float theta = twistMax * env * directedTwist(curlScalar(cc, t), floorMag);\n float shear = shearMax * env * directedTwist(curlScalar(cc + vec2(17.3, 9.1), t), floorMag);\n vec2 local = g - cc;\n float ct = cos(theta);\n float st = sin(theta);\n vec2 rot = vec2(ct * local.x - st * local.y, st * local.x + ct * local.y);\n rot.x += shear * rot.y; // a small skew so the box MORPHS, not just rotates\n return cc + rot;\n}\n\n// The CONTINUOUS traveling-wave FLOW warp — the SMOOTH twin of cellTwist (no per-cell seam;\n// for the level-set contours that shatter into a mesh under the cell discontinuity).\n// BG.W-GRID-AFFINE — warpFreq is the HOST-supplied curl-sampling spatial frequency (the caller's\n// own coordinate units): an order of magnitude BELOW its grid frequency so the warp is locally\n// affine (major lines bow as ONE smooth curve, no sub-cell crackle). liquid-grid (cell-scale g0)\n// passes ~0.03; concentric (unit-scale p) passes 0.6. The 1.833333 second-flow ratio transcribes\n// WAVE_FLOW_SECOND_RATIO. Amplitude unchanged — curl magnitude is the intrinsic gradient at the\n// fixed CURL_EPS, independent of warpFreq; the t-drift is host-agnostic.\nvec2 waveFlow(vec2 g, float t, vec2 waveDir, float waveK, float waveOmega, float waveSigma,\n float twistMax, float amp, float warpFreq) {\n float env = travelingEnvelope(g, t, waveDir, waveK, waveOmega, waveSigma) * amp;\n vec2 f = curlFBM(vec2(g.x * warpFreq + t * 0.05, g.y * warpFreq - t * 0.04));\n float wf2 = warpFreq * 1.833333;\n vec2 f2 = curlFBM(vec2(g.x * wf2 - t * 0.03, g.y * wf2 + t * 0.035));\n float k = twistMax * env;\n return g + (f + f2 * 0.5) * k;\n}\n\n// The local cursor swirl — the finger twists the cells around it (re-aimed cursorBulge).\nvec2 cursorSwirl(vec2 g, vec2 cursor, float strength, float radius) {\n vec2 to = g - cursor;\n float d2 = dot(to, to);\n float r = max(radius, 1e-4);\n float theta = strength * exp(-d2 / (2.0 * r * r));\n float ct = cos(theta);\n float st = sin(theta);\n return cursor + vec2(ct * to.x - st * to.y, st * to.x + ct * to.y);\n}\n\n// The LOW-octave value-noise topography — the scalar field concentric extracts contours of.\nfloat heightField(vec2 p, float octavesF, float seed) {\n float v = 0.0;\n float amp = 0.5;\n float freq = 1.0;\n float px = p.x + seed;\n float py = p.y - seed;\n int n = int(clamp(octavesF, 1.0, 6.0));\n for (int i = 0; i < 6; i++) {\n if (i >= n) break;\n v += amp * valueNoise(px * freq, py * freq);\n float rx = 0.8 * px - 0.6 * py;\n float ry = 0.6 * px + 0.8 * py;\n px = rx;\n py = ry;\n freq *= 2.0;\n amp *= 0.5;\n }\n return v;\n}\n\n// The ω=√(g·k) breathing swell — basins inflate/deflate with weight.\nfloat waveSwell(float t, float phase) {\n return sin(t * 0.35 + phase) * 0.5 + sin(t * 0.21 + phase * 1.7) * 0.5;\n}\n", ae = "#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}", oe = `#version 300 es
|
|
655
655
|
precision highp float;
|
|
656
656
|
|
|
657
657
|
#define TAU 6.283185307179586
|
|
@@ -682,7 +682,7 @@ uniform vec3 uFaceLo; // linear-sRGB rose-umber trough (FOLD B, 3-stop)
|
|
|
682
682
|
uniform vec3 uFaceMid; // linear-sRGB ember-amber mid
|
|
683
683
|
uniform vec3 uFaceHi; // linear-sRGB warm-wheat crest
|
|
684
684
|
|
|
685
|
-
${
|
|
685
|
+
${a}
|
|
686
686
|
|
|
687
687
|
// The 3-stop warm-divergent FACE ramp (FOLD B — height-keyed, NOT a 2-point mid-park). All stops
|
|
688
688
|
// warm hue ∈ [20,90]; linear-space (the OETF runs in main, FOLD E).
|
|
@@ -696,7 +696,7 @@ vec3 faceRamp(float rampT) {
|
|
|
696
696
|
|
|
697
697
|
// The shared divergence-free 2D-curl operator (flow.glsl.ts) — the prototype declares
|
|
698
698
|
// potentialFBM; the host defines its BODY below the splice (GLSL forward-declaration).
|
|
699
|
-
${
|
|
699
|
+
${c}
|
|
700
700
|
|
|
701
701
|
// ── The host noise basis (transcribes liquidGrid.ts hash21/valueNoise/potentialFBM) ──
|
|
702
702
|
float hash21(float x, float y) {
|
|
@@ -748,7 +748,7 @@ float potentialFBM(vec2 p) {
|
|
|
748
748
|
// travelingEnvelope + the FACE leaf; spliced AFTER valueNoise + potentialFBM bodies + the curlFBM
|
|
749
749
|
// chunk). liquid-grid + concentric read the SAME waveFlow continuous affine sheet-warp (the DRY
|
|
750
750
|
// coupling — a leaf tune moves both, never the retired per-cell twist / LINE-warp).
|
|
751
|
-
${
|
|
751
|
+
${ie}
|
|
752
752
|
|
|
753
753
|
// ── §1 The Ben Golus derivative-AA grid coverage (transcribes liquidGrid.ts gridCoverage) ──
|
|
754
754
|
float gridCoverage(vec2 g, float targetWidth, vec2 uvDeriv) {
|
|
@@ -836,10 +836,10 @@ function q(e, t, n) {
|
|
|
836
836
|
}
|
|
837
837
|
return r;
|
|
838
838
|
}
|
|
839
|
-
function
|
|
840
|
-
let { canvas: t, config: n, getCursor:
|
|
839
|
+
function se(e) {
|
|
840
|
+
let { canvas: t, config: n, getCursor: i, getAmp: a, shouldContinue: o, onFrame: s } = e;
|
|
841
841
|
return function(e) {
|
|
842
|
-
let c = q(e, e.VERTEX_SHADER,
|
|
842
|
+
let c = q(e, e.VERTEX_SHADER, ae), l = q(e, e.FRAGMENT_SHADER, oe), u = e.createProgram();
|
|
843
843
|
if (e.attachShader(u, c), e.attachShader(u, l), e.linkProgram(u), !e.getProgramParameter(u, e.LINK_STATUS)) throw Error(`[LiquidGrid] link failed: ${e.getProgramInfoLog(u)}`);
|
|
844
844
|
e.deleteShader(c), e.deleteShader(l);
|
|
845
845
|
let d = e.createVertexArray();
|
|
@@ -859,28 +859,28 @@ function ie(e) {
|
|
|
859
859
|
function P(n) {
|
|
860
860
|
e.viewport(0, 0, n?.w ?? t.width, n?.h ?? t.height);
|
|
861
861
|
}
|
|
862
|
-
function F(
|
|
863
|
-
|
|
864
|
-
let c = t.width / Math.max(t.height, 1), l =
|
|
865
|
-
e.useProgram(u), e.bindVertexArray(d), 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(h,
|
|
862
|
+
function F(o) {
|
|
863
|
+
s?.(o);
|
|
864
|
+
let c = t.width / Math.max(t.height, 1), l = V(t.height || 1, n.cellSize);
|
|
865
|
+
e.useProgram(u), e.bindVertexArray(d), 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(h, o), e.uniform1f(g, l), e.uniform1f(_, n.majorEvery), e.uniform1f(v, c), e.uniform4f(T, n.waveDir[0], n.waveDir[1], n.waveK, n.waveOmega), e.uniform4f(E, n.waveSigma, n.twistMax, 0, a()), e.uniform1f(w, +!!n.interactive);
|
|
866
866
|
let f = Math.max(n.cellSize, 1), p = n.lineWidth / f, m = n.lineWidth * 1.6 / f;
|
|
867
867
|
e.uniform4f(y, p, m, n.minorAlpha, n.majorAlpha), e.uniform1f(b, n.fieldAlpha);
|
|
868
|
-
let P =
|
|
868
|
+
let P = i();
|
|
869
869
|
e.uniform4f(S, P.x, P.y, n.bulgeStrength, n.bulgeRadius), e.uniform1f(C, n.bulgeMode === "attract" ? -1 : 1);
|
|
870
|
-
let F =
|
|
870
|
+
let F = r(n.lineColor);
|
|
871
871
|
e.uniform3f(D, F[0], F[1], F[2]), e.uniform4f(k, n.faceAlpha, n.faceRelief, n.squashK, n.baseInset), e.uniform2f(A, n.lightDir[0], n.lightDir[1]);
|
|
872
|
-
let I =
|
|
872
|
+
let I = r(n.faceWarmLo), L = r(n.faceWarmMid), R = r(n.faceWarmHi);
|
|
873
873
|
if (e.uniform3f(j, I[0], I[1], I[2]), e.uniform3f(M, L[0], L[1], L[2]), e.uniform3f(N, R[0], R[1], R[2]), n.background === "transparent") e.uniform1f(x, 0), e.uniform3f(O, 0, 0, 0);
|
|
874
874
|
else {
|
|
875
875
|
e.uniform1f(x, 1);
|
|
876
|
-
let t =
|
|
876
|
+
let t = r(n.background);
|
|
877
877
|
e.uniform3f(O, t[0], t[1], t[2]);
|
|
878
878
|
}
|
|
879
879
|
e.drawArrays(e.TRIANGLES, 0, 3), e.bindVertexArray(null);
|
|
880
880
|
}
|
|
881
881
|
return {
|
|
882
882
|
frame: F,
|
|
883
|
-
shouldContinue:
|
|
883
|
+
shouldContinue: o,
|
|
884
884
|
resize: P,
|
|
885
885
|
teardown: () => {
|
|
886
886
|
e.deleteProgram(u), e.deleteVertexArray(d), e.deleteBuffer(f);
|
|
@@ -891,85 +891,92 @@ function ie(e) {
|
|
|
891
891
|
//#endregion
|
|
892
892
|
//#region src/components/liquid-grid/composables/useLiquidGrid.ts
|
|
893
893
|
function J(e, n) {
|
|
894
|
-
let { config: r } = n,
|
|
894
|
+
let { config: r } = n, a = n.mode ?? "live", s = t({ respectReducedMotion: r.respectReducedMotion }), c = {
|
|
895
895
|
x: 1e6,
|
|
896
896
|
y: 1e6
|
|
897
|
-
},
|
|
898
|
-
function
|
|
899
|
-
let n =
|
|
900
|
-
|
|
897
|
+
}, u = () => c, d = 0, f = () => d, p = 0, m = null, h = b(l("webgpu")), _ = !1;
|
|
898
|
+
function v(t) {
|
|
899
|
+
let n = p > 0 ? (t - p) * 1e3 : 16.7;
|
|
900
|
+
p = t;
|
|
901
|
+
let i = Math.min(Math.max(n, 0), 50);
|
|
902
|
+
if (s.tick(i), m?.reducedMotion ? d = 0 : (d += (1.06 - d) * .04, d > 1 && (d = 1 + (d - 1) * .85)), !r.interactive || !s.active.value) {
|
|
901
903
|
c = {
|
|
902
904
|
x: 1e6,
|
|
903
905
|
y: 1e6
|
|
904
906
|
};
|
|
905
907
|
return;
|
|
906
908
|
}
|
|
907
|
-
let
|
|
909
|
+
let a = e.value, o = (a?.width || 1) / Math.max(a?.height || 1, 1), l = V(a?.height || 320, r.cellSize), u = s.smoothedPosition.value, f = s.velocity.value, h = s.burst.value, g = (u.x * 2 - 1) * o, _ = -(u.y * 2 - 1), v = .12 + Math.min(.4, h);
|
|
908
910
|
c = {
|
|
909
|
-
x: (
|
|
910
|
-
y: (
|
|
911
|
+
x: (g + f.x * v) * l,
|
|
912
|
+
y: (_ - f.y * v) * l
|
|
911
913
|
};
|
|
912
914
|
}
|
|
913
|
-
let
|
|
914
|
-
s.onPointerEnter(), r.interactive &&
|
|
915
|
-
},
|
|
916
|
-
s.onPointerMove(e), r.interactive &&
|
|
917
|
-
},
|
|
918
|
-
function
|
|
919
|
-
let t =
|
|
920
|
-
t.addEventListener("pointermove",
|
|
915
|
+
let x = () => {
|
|
916
|
+
s.onPointerEnter(), r.interactive && m?.wake();
|
|
917
|
+
}, S = (e) => {
|
|
918
|
+
s.onPointerMove(e), r.interactive && m?.wake();
|
|
919
|
+
}, C = (e) => e.parentElement ?? e;
|
|
920
|
+
function w(e) {
|
|
921
|
+
let t = C(e);
|
|
922
|
+
t.addEventListener("pointermove", S), t.addEventListener("pointerenter", x), t.addEventListener("pointerleave", s.onPointerLeave);
|
|
921
923
|
}
|
|
922
|
-
function
|
|
923
|
-
let t =
|
|
924
|
-
t.removeEventListener("pointermove",
|
|
924
|
+
function T(e) {
|
|
925
|
+
let t = C(e);
|
|
926
|
+
t.removeEventListener("pointermove", S), t.removeEventListener("pointerenter", x), t.removeEventListener("pointerleave", s.onPointerLeave);
|
|
925
927
|
}
|
|
926
|
-
let
|
|
928
|
+
let E = () => {
|
|
929
|
+
if (_) return null;
|
|
927
930
|
let t = e.value;
|
|
928
|
-
return t ? (
|
|
929
|
-
mode:
|
|
931
|
+
return t ? (m || (w(t), m = i(t, {
|
|
932
|
+
mode: a,
|
|
930
933
|
respectReducedMotion: r.respectReducedMotion,
|
|
931
|
-
dprPolicy:
|
|
934
|
+
dprPolicy: o,
|
|
932
935
|
revealBloom: !0,
|
|
933
|
-
setupWGPU:
|
|
936
|
+
setupWGPU: re({
|
|
934
937
|
canvas: t,
|
|
935
938
|
config: r,
|
|
936
|
-
getCursor:
|
|
937
|
-
getAmp:
|
|
939
|
+
getCursor: u,
|
|
940
|
+
getAmp: f,
|
|
938
941
|
shouldContinue: () => !0,
|
|
939
|
-
onFrame:
|
|
942
|
+
onFrame: v
|
|
940
943
|
}),
|
|
941
|
-
setupGL:
|
|
944
|
+
setupGL: se({
|
|
942
945
|
canvas: t,
|
|
943
946
|
config: r,
|
|
944
|
-
getCursor:
|
|
945
|
-
getAmp:
|
|
947
|
+
getCursor: u,
|
|
948
|
+
getAmp: f,
|
|
946
949
|
shouldContinue: () => !0,
|
|
947
|
-
onFrame:
|
|
948
|
-
})
|
|
949
|
-
|
|
950
|
+
onFrame: v
|
|
951
|
+
}),
|
|
952
|
+
onStatus: (e) => h.value = e
|
|
953
|
+
}), m.armAsync().catch(() => void 0)), m) : null;
|
|
950
954
|
};
|
|
951
|
-
queueMicrotask(() =>
|
|
952
|
-
let
|
|
955
|
+
queueMicrotask(() => E());
|
|
956
|
+
let D = {
|
|
953
957
|
get backend() {
|
|
954
|
-
return
|
|
958
|
+
return E()?.backend ?? "webgpu";
|
|
955
959
|
},
|
|
956
|
-
pause: () =>
|
|
957
|
-
resume: () =>
|
|
958
|
-
wake: () =>
|
|
959
|
-
renderAt: (e) =>
|
|
960
|
+
pause: () => E()?.suspend("manual"),
|
|
961
|
+
resume: () => E()?.resume("manual"),
|
|
962
|
+
wake: () => E()?.wake(),
|
|
963
|
+
renderAt: (e) => E()?.renderAt(e),
|
|
960
964
|
get reducedMotion() {
|
|
961
|
-
return
|
|
965
|
+
return m?.reducedMotion ?? !1;
|
|
962
966
|
},
|
|
967
|
+
rendererStatus: y(h),
|
|
963
968
|
dispose: () => {
|
|
969
|
+
if (_) return;
|
|
970
|
+
_ = !0;
|
|
964
971
|
let t = e.value;
|
|
965
|
-
t &&
|
|
972
|
+
t && T(t), s.dispose(), m?.dispose();
|
|
966
973
|
}
|
|
967
974
|
};
|
|
968
|
-
return
|
|
975
|
+
return g(() => D.dispose()), D;
|
|
969
976
|
}
|
|
970
977
|
//#endregion
|
|
971
978
|
//#region src/components/liquid-grid/constants.ts
|
|
972
|
-
var
|
|
979
|
+
var ce = 16, Y = {
|
|
973
980
|
L: .62,
|
|
974
981
|
C: .05,
|
|
975
982
|
h: 62
|
|
@@ -1012,7 +1019,7 @@ var ae = 16, Y = {
|
|
|
1012
1019
|
background: "transparent",
|
|
1013
1020
|
interactive: !0,
|
|
1014
1021
|
respectReducedMotion: !0
|
|
1015
|
-
},
|
|
1022
|
+
}, le = /* @__PURE__ */ e(/* @__PURE__ */ p({
|
|
1016
1023
|
__name: "LiquidGrid",
|
|
1017
1024
|
props: {
|
|
1018
1025
|
config: { default: () => $ },
|
|
@@ -1021,44 +1028,48 @@ var ae = 16, Y = {
|
|
|
1021
1028
|
default: !1
|
|
1022
1029
|
}
|
|
1023
1030
|
},
|
|
1024
|
-
emits: ["update:paused"],
|
|
1025
|
-
setup(e, { expose: t }) {
|
|
1026
|
-
let
|
|
1027
|
-
|
|
1031
|
+
emits: ["update:paused", "rendererStatus"],
|
|
1032
|
+
setup(e, { expose: t, emit: r }) {
|
|
1033
|
+
let i = r, a = x("wrapperRef"), o = x("canvasRef"), s = v({ ...e.config });
|
|
1034
|
+
S(() => e.config, (e) => Object.assign(s, e), { deep: !0 }), h(() => {
|
|
1028
1035
|
if (e.config.lineColor === $.lineColor) {
|
|
1029
|
-
let e =
|
|
1036
|
+
let e = a.value;
|
|
1030
1037
|
if (e) {
|
|
1031
1038
|
let t = getComputedStyle(e).getPropertyValue("--foreground").trim();
|
|
1032
1039
|
if (t) try {
|
|
1033
|
-
|
|
1040
|
+
s.lineColor = n(t);
|
|
1034
1041
|
} catch {}
|
|
1035
1042
|
}
|
|
1036
1043
|
}
|
|
1037
1044
|
});
|
|
1038
|
-
let
|
|
1039
|
-
|
|
1040
|
-
|
|
1045
|
+
let c = J(o, { config: s });
|
|
1046
|
+
S(c.rendererStatus, (e) => i("rendererStatus", e), {
|
|
1047
|
+
immediate: !0,
|
|
1048
|
+
flush: "sync"
|
|
1049
|
+
}), S(() => e.paused, (e) => e ? c.pause() : c.resume(), { immediate: !0 });
|
|
1050
|
+
let l = u(() => {
|
|
1041
1051
|
let t = e.config.background;
|
|
1042
1052
|
if (t !== "transparent") return `oklch(${t.L} ${t.C} ${t.h})`;
|
|
1043
1053
|
});
|
|
1044
1054
|
return t({
|
|
1045
|
-
pause:
|
|
1046
|
-
resume:
|
|
1047
|
-
wake:
|
|
1048
|
-
renderAt:
|
|
1049
|
-
|
|
1055
|
+
pause: c.pause,
|
|
1056
|
+
resume: c.resume,
|
|
1057
|
+
wake: c.wake,
|
|
1058
|
+
renderAt: c.renderAt,
|
|
1059
|
+
rendererStatus: c.rendererStatus
|
|
1060
|
+
}), (e, t) => (_(), d("div", {
|
|
1050
1061
|
ref_key: "wrapperRef",
|
|
1051
|
-
ref:
|
|
1062
|
+
ref: a,
|
|
1052
1063
|
class: "liquid-grid-wrapper",
|
|
1053
|
-
style:
|
|
1054
|
-
}, [
|
|
1064
|
+
style: m(l.value ? { background: l.value } : void 0)
|
|
1065
|
+
}, [f("canvas", {
|
|
1055
1066
|
ref_key: "canvasRef",
|
|
1056
|
-
ref:
|
|
1067
|
+
ref: o,
|
|
1057
1068
|
class: "liquid-grid-canvas",
|
|
1058
1069
|
"aria-hidden": "true",
|
|
1059
1070
|
"data-testid": "liquid-grid-canvas"
|
|
1060
1071
|
}, null, 512)], 4));
|
|
1061
1072
|
}
|
|
1062
|
-
}), [["__scopeId", "data-v-
|
|
1073
|
+
}), [["__scopeId", "data-v-b7537b22"]]);
|
|
1063
1074
|
//#endregion
|
|
1064
|
-
export {
|
|
1075
|
+
export { j as CURL_EPS, $ as DEFAULT_LIQUID_GRID_CONFIG, Q as FACE_WARM_HI, X as FACE_WARM_LO, Z as FACE_WARM_MID, ce as LIQUID_GRID_MAX_MAJOR_EVERY, le as LiquidGrid, Y as WARM_IDENTITY_INK, L as curlFBM, B as gridCoverage, V as gridScaleFor, I as potentialFBM, ee as sampleLiquidGrid, J as useLiquidGrid };
|