@mkbabb/glass-ui 3.12.0 → 3.13.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-DuArVky-.js → CardAction-Cj2eycQ2.js} +2 -2
- package/dist/{CommandShortcut-CefCj5mt.js → CommandShortcut-RowNEO6i.js} +4 -4
- package/dist/{ContextMenuSubContent-Bhg4f5jX.js → ContextMenuSubContent-BQmxTAdw.js} +4 -4
- package/dist/{DataTable-CUHMukiQ.js → DataTable-BCddn3T3.js} +3 -3
- package/dist/{DialogContent-BRkT1cjP.js → DialogContent-Dl9WkAoS.js} +3 -3
- package/dist/{DialogFooter-Gprw8H_A.js → DialogFooter-Blu4t7tJ.js} +2 -2
- package/dist/{HoverPopover-2LOIW34a.js → HoverPopover-CISOJQuZ.js} +1 -1
- package/dist/{IconTooltip-Cus0fvK0.js → IconTooltip-DPzE09X9.js} +1 -1
- package/dist/MetricBadge-C9QMz1KT.js +79 -0
- package/dist/{Notification-DLMhblXR.js → Notification-DdwNxIrI.js} +2 -2
- package/dist/{NumberFieldContent-BbLOh8RU.js → NumberFieldContent-CqaN-SvN.js} +3 -3
- package/dist/{PopoverContent-BId6ggf_.js → PopoverContent-BYwt2-4x.js} +1 -1
- package/dist/{ScrollingText-BPP84wKo.js → ScrollingText-DfFrwSph.js} +1 -1
- package/dist/{SelectScrollDownButton-T32cVFeM.js → SelectScrollDownButton-CiDUxfEj.js} +6 -6
- package/dist/{Switch-Ch-k3Rv-.js → Switch-CsIuYP_e.js} +1 -1
- package/dist/{TabsList-B8CVOQPC.js → TabsList-Dttss653.js} +9 -5
- package/dist/{Toaster-1rYWrmAm.js → Toaster-D6q4HtXu.js} +50 -47
- package/dist/{ToggleGroupItem-COu_4IW4.js → ToggleGroupItem-D_AHlRw9.js} +18 -22
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +5 -2
- package/dist/api.js +2 -2
- package/dist/aurora.js +69 -69
- package/dist/{badge-CaoFJzRb.js → badge-UILT_3pZ.js} +1 -1
- package/dist/badge.js +1 -1
- package/dist/{button-DN39cGqL.js → button-ChXMfsud.js} +12 -12
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel.js +8 -8
- package/dist/{check-BBKKKSTf.js → check-njhk-vfu.js} +1 -1
- package/dist/{chevron-down-BSkTP2aL.js → chevron-down-DKkxb4VV.js} +1 -1
- package/dist/{chevron-right-sDM0Yvrf.js → chevron-right-CPXbqQQz.js} +1 -1
- package/dist/{chevron-up-CCOD_FTz.js → chevron-up-n_24SqI-.js} +1 -1
- package/dist/coalesceMetric-5qIeZnTx.js +13 -0
- package/dist/{color-C5ls_QF7.js → color-CUYeFbgd.js} +9 -7
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/components/custom/animated-digit/AnimatedDigit.vue.d.ts +8 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +5 -62
- package/dist/components/custom/aurora/constants/shaders/mediums.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/constants/shaders/vangogh-medium.glsl.d.ts +1 -0
- package/dist/components/custom/aurora/index.d.ts +1 -1
- package/dist/components/custom/configurator/ConfiguratorRow.vue.d.ts +16 -0
- package/dist/components/custom/constellation/Constellation.vue.d.ts +74 -6
- package/dist/components/custom/constellation/composables/createConstellationField.d.ts +41 -0
- package/dist/components/custom/constellation/composables/useConstellationPointer.d.ts +35 -0
- package/dist/components/custom/constellation/constants.d.ts +61 -0
- package/dist/components/custom/constellation/constellationDraw.d.ts +30 -0
- package/dist/components/custom/constellation/constellationField.d.ts +116 -149
- package/dist/components/custom/constellation/constellationInteraction.d.ts +132 -0
- package/dist/components/custom/constellation/index.d.ts +5 -2
- package/dist/components/custom/controls/DarkModeToggle.vue.d.ts +11 -0
- package/dist/components/custom/dock/DockRail.vue.d.ts +88 -0
- package/dist/components/custom/dock/DockTabButton.vue.d.ts +3 -4
- package/dist/components/custom/dock/GlassDock.vue.d.ts +5 -118
- package/dist/components/custom/dock/composables/dockMorphContext.d.ts +36 -0
- package/dist/components/custom/dock/composables/index.d.ts +1 -0
- package/dist/components/custom/dock/composables/useDockClickIntegrity.d.ts +23 -0
- package/dist/components/custom/dock/composables/useDockMorphWindow.d.ts +15 -0
- package/dist/components/custom/dock/composables/useDockOrientationMorph.d.ts +44 -0
- package/dist/components/custom/dock/composables/useDockShellProps.d.ts +165 -0
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +44 -0
- package/dist/components/custom/dock/constants.d.ts +48 -0
- package/dist/components/custom/dock/index.d.ts +3 -0
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +5 -37
- package/dist/components/custom/fourier-field/index.d.ts +1 -1
- package/dist/components/custom/fourier-field/math.d.ts +17 -0
- package/dist/components/custom/fourier-field/presets.d.ts +54 -0
- package/dist/components/custom/goo-blob/composables/buildMetaballProgram.d.ts +18 -0
- package/dist/components/custom/goo-blob/composables/uploadBlobUniforms.d.ts +41 -0
- package/dist/components/custom/goo-blob/composables/useBlobPointer.d.ts +4 -3
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +11 -8
- package/dist/components/custom/goo-blob/constants.d.ts +52 -0
- package/dist/components/custom/goo-blob/shaders/metaball-uniforms.glsl.d.ts +1 -0
- package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +2 -2
- package/dist/components/custom/labeled-field/LabeledField.vue.d.ts +37 -0
- package/dist/components/custom/labeled-field/LabeledSelect.vue.d.ts +6 -0
- package/dist/components/custom/labeled-field/LabeledSlider.vue.d.ts +6 -0
- package/dist/components/custom/labeled-field/LabeledSwitch.vue.d.ts +6 -0
- package/dist/components/custom/metric-badge/MetricBadge.vue.d.ts +11 -18
- package/dist/components/custom/metric-badge/index.d.ts +1 -0
- package/dist/components/custom/metric-cell/MetricCell.vue.d.ts +15 -4
- package/dist/components/custom/metric-stack/MetricRow.vue.d.ts +6 -4
- package/dist/components/custom/tabs/constants.d.ts +12 -0
- package/dist/components/custom/underline/GlassUnderline.vue.d.ts +84 -0
- package/dist/components/custom/underline/index.d.ts +2 -0
- package/dist/components/custom/underline/types.d.ts +56 -0
- package/dist/components/ui/card/Card.vue.d.ts +15 -3
- package/dist/components/ui/drawer/Drawer.vue.d.ts +1 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +2 -2
- package/dist/components/ui/metric-pill/MetricPill.vue.d.ts +6 -3
- package/dist/components/ui/slider/index.d.ts +22 -19
- package/dist/components/ui/tabs/TabsIndicator.vue.d.ts +4 -1
- package/dist/components/ui/toast/use-toast.d.ts +2 -2
- package/dist/components/ui/toggle/Toggle.vue.d.ts +1 -1
- package/dist/components/ui/toggle/index.d.ts +1 -1
- package/dist/components/ui/toggle-group/ToggleGroup.vue.d.ts +1 -7
- package/dist/components/ui/toggle-group/ToggleGroupItem.vue.d.ts +1 -3
- package/dist/components/ui/toggle-group/toggleGroupContext.d.ts +0 -13
- package/dist/composables/color/index.d.ts +12 -0
- package/dist/composables/dark/index.d.ts +1 -1
- package/dist/composables/dark/useGlobalDark.d.ts +1 -21
- package/dist/composables/glass/index.d.ts +0 -1
- package/dist/composables/glass/useGlassBackdropLuminance.d.ts +59 -0
- package/dist/composables/glass/useSpecularTracking.d.ts +12 -3
- package/dist/composables/motion/core/index.d.ts +1 -1
- package/dist/composables/motion/curves.d.ts +48 -0
- package/dist/composables/motion/index.d.ts +2 -0
- package/dist/composables/motion/springPresets.d.ts +33 -0
- package/dist/composables/motion/suite.d.ts +2 -0
- package/dist/composables/motion/useLiquidFlex.d.ts +85 -0
- package/dist/composables/motion/useSpringMount.d.ts +1 -1
- package/dist/configurator.js +1 -1
- package/dist/confirm-dialog.js +2 -2
- package/dist/constellation.js +336 -222
- package/dist/context-menu.js +2 -2
- package/dist/controls.js +48 -20
- package/dist/dark.d.ts +1 -1
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dock.js +705 -365
- package/dist/dockContext-BegmJVmx.js +17 -0
- package/dist/dom.js +5 -5
- package/dist/{dropdown-menu-D77jX6Df.js → dropdown-menu-DzkkyBwX.js} +11 -8
- package/dist/dropdown-menu.js +1 -1
- package/dist/expandable-container.js +39 -80
- package/dist/forms.js +5 -5
- package/dist/fourier-field.js +134 -99
- package/dist/fourier-math.js +2 -2
- package/dist/glass-panel.js +86 -20
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +222 -212
- package/dist/goo-blob.js +243 -212
- package/dist/hover-card.js +1 -1
- package/dist/hover-popover.js +1 -1
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/instrument-chassis.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +28 -18
- package/dist/{math-DTpRVC0e.js → math-U6-RrLmV.js} +18 -2
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +25 -21
- package/dist/metric-stack.js +35 -34
- package/dist/{minimize-2-lcXOuc6V.js → minimize-2-BV31Ob_h.js} +1 -1
- package/dist/motion-core.js +32 -137
- package/dist/motion-curves.d.ts +1 -0
- package/dist/motion-curves.js +130 -0
- package/dist/motion.js +38 -37
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/paper-backdrop.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/{presets-BP_ALM0m.js → presets-BKVyQfbt.js} +1 -14
- package/dist/progress.js +1 -1
- package/dist/reactive.js +2 -2
- package/dist/scrolling-text.js +1 -1
- package/dist/{search-nbkvr2dC.js → search-BSGrf2Sk.js} +1 -1
- package/dist/search.js +9 -9
- package/dist/select.js +3 -3
- package/dist/separator.js +1 -1
- package/dist/{sheet-VZEtNFvO.js → sheet-1fChZjtw.js} +3 -3
- package/dist/sheet.js +1 -1
- package/dist/{slider-ClgpP7EB.js → slider-B-JP2JlI.js} +4 -4
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +2 -2
- package/dist/springPresets--YdWTHtm.js +40 -0
- package/dist/stacked-icons.js +6 -6
- package/dist/styles/animations.css +29 -114
- package/dist/styles/cards.css +55 -0
- package/dist/styles/components.css +4 -1
- package/dist/styles/configurator.css +42 -0
- package/dist/styles/dock/layer-group.css +83 -25
- package/dist/styles/dock/layers.css +23 -1
- package/dist/styles/dock/morph-bridge.css +123 -0
- package/dist/styles/dock/morph.css +175 -45
- package/dist/styles/dock/overflow.css +51 -1
- package/dist/styles/dock/rail-extend.css +300 -0
- package/dist/styles/dock/shell.css +63 -105
- package/dist/styles/dock-controls/dark-mode-toggle.css +109 -0
- package/dist/styles/dock-controls/icon-button.css +133 -0
- package/dist/styles/dock-controls/tab-button.css +202 -0
- package/dist/styles/dock-controls/touch-floor.css +94 -0
- package/dist/styles/dock-controls/triggers.css +128 -0
- package/dist/styles/dock-controls.css +30 -595
- package/dist/styles/dock.css +2 -0
- package/dist/styles/drawer.css +2 -0
- package/dist/styles/floating-panel.css +17 -0
- package/dist/styles/glass/a11y-fallback.css +245 -0
- package/dist/styles/glass/ladder.css +337 -0
- package/dist/styles/glass/material.css +238 -0
- package/dist/styles/glass/progress-rail.css +78 -0
- package/dist/styles/glass/squircle.css +66 -0
- package/dist/styles/glass/surfaces.css +306 -0
- package/dist/styles/glass-refract.css +2 -0
- package/dist/styles/glass.css +31 -1188
- package/dist/styles/hover-popover.css +2 -0
- package/dist/styles/index.css +28 -14
- package/dist/styles/instrument-chassis.css +4 -0
- package/dist/styles/paper.css +2 -68
- package/dist/styles/segmented-tabs.css +275 -0
- package/dist/styles/theme/bridges.css +337 -0
- package/dist/styles/theme/dark.css +7 -0
- package/dist/styles/theme/literals.css +94 -0
- package/dist/styles/theme/radius.css +95 -0
- package/dist/styles/theme.css +26 -529
- package/dist/styles/tokens/color-radius.css +260 -0
- package/dist/styles/tokens/dark-arm.css +200 -0
- package/dist/styles/tokens/glass.css +440 -0
- package/dist/styles/tokens/light-dark.css +158 -0
- package/dist/styles/tokens/offsets-sizing.css +500 -0
- package/dist/styles/tokens/property-regs.css +169 -0
- package/dist/styles/tokens/scale-paper.css +366 -0
- package/dist/styles/tokens/scheme-motion.css +334 -0
- package/dist/styles/tokens/shadow.css +166 -0
- package/dist/styles/tokens.css +22 -2360
- package/dist/styles/typography.css +75 -21
- package/dist/styles/utilities/a11y-overrides.css +140 -0
- package/dist/styles/utilities/animate.css +26 -0
- package/dist/styles/utilities/base.css +365 -0
- package/dist/styles/utilities/btn.css +401 -0
- package/dist/styles/utilities/components.css +317 -0
- package/dist/styles/utilities.css +19 -1318
- package/dist/styles/view-transition.css +0 -51
- package/dist/switch.js +1 -1
- package/dist/tabs.js +91 -82
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/underline.d.ts +1 -0
- package/dist/underline.js +85 -0
- package/dist/{useAnimatedNumber-Bcpy5Etf.js → useAnimatedNumber-C5I3wWd8.js} +1 -1
- package/dist/{useConfiguratorState-DxAqksK6.js → useConfiguratorState-DAoeHVue.js} +8 -8
- package/dist/{useGlobalDark-CAhOXNLO.js → useGlobalDark-yhL4Wp-s.js} +3 -22
- package/dist/useLiquidFlex-BL0lLLN2.js +30 -0
- package/dist/useRAFLoop-Bxv0o6L5.js +109 -0
- package/dist/{useScrollProgress-CffFGLa5.js → useScrollProgress-Dlvx-L3v.js} +1 -1
- package/dist/useSpecularTracking-Bo5su68i.js +32 -0
- package/dist/useSpringMount-CI2jOstM.js +108 -0
- package/dist/{useTouchGate-WFyJYsth.js → useTouchGate-Dg7MQI1G.js} +1 -1
- package/dist/utils/coalesceMetric.d.ts +29 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/vReveal-CqaCz_mC.js +44 -0
- package/dist/watercolor-dot.js +11 -9
- package/dist/{x-Dfsegz9Y.js → x-BUwTKe50.js} +1 -1
- package/package.json +78 -58
- package/src/styles/animations.css +29 -114
- package/src/styles/cards.css +53 -0
- package/src/styles/configurator.css +42 -0
- package/src/styles/dock/layer-group.css +83 -25
- package/src/styles/dock/layers.css +23 -1
- package/src/styles/dock/morph-bridge.css +123 -0
- package/src/styles/dock/morph.css +175 -45
- package/src/styles/dock/overflow.css +51 -1
- package/src/styles/dock/rail-extend.css +300 -0
- package/src/styles/dock/shell.css +63 -105
- package/src/styles/dock-controls/dark-mode-toggle.css +109 -0
- package/src/styles/dock-controls/icon-button.css +133 -0
- package/src/styles/dock-controls/tab-button.css +202 -0
- package/src/styles/dock-controls/touch-floor.css +94 -0
- package/src/styles/dock-controls/triggers.css +128 -0
- package/src/styles/dock-controls.css +30 -595
- package/src/styles/dock.css +2 -0
- package/src/styles/floating-panel.css +15 -0
- package/src/styles/glass/a11y-fallback.css +245 -0
- package/src/styles/glass/ladder.css +337 -0
- package/src/styles/glass/material.css +238 -0
- package/src/styles/glass/progress-rail.css +78 -0
- package/src/styles/glass/squircle.css +66 -0
- package/src/styles/glass/surfaces.css +306 -0
- package/src/styles/glass.css +31 -1188
- package/src/styles/index.css +28 -14
- package/src/styles/paper.css +2 -68
- package/src/styles/segmented-tabs.css +271 -0
- package/src/styles/theme/bridges.css +337 -0
- package/src/styles/theme/dark.css +7 -0
- package/src/styles/theme/literals.css +94 -0
- package/src/styles/theme/radius.css +95 -0
- package/src/styles/theme.css +26 -529
- package/src/styles/tokens/color-radius.css +260 -0
- package/src/styles/tokens/dark-arm.css +200 -0
- package/src/styles/tokens/glass.css +440 -0
- package/src/styles/tokens/light-dark.css +158 -0
- package/src/styles/tokens/offsets-sizing.css +500 -0
- package/src/styles/tokens/property-regs.css +169 -0
- package/src/styles/tokens/scale-paper.css +366 -0
- package/src/styles/tokens/scheme-motion.css +334 -0
- package/src/styles/tokens/shadow.css +166 -0
- package/src/styles/tokens.css +22 -2360
- package/src/styles/typography.css +75 -21
- package/src/styles/utilities/a11y-overrides.css +140 -0
- package/src/styles/utilities/animate.css +26 -0
- package/src/styles/utilities/base.css +365 -0
- package/src/styles/utilities/btn.css +401 -0
- package/src/styles/utilities/components.css +317 -0
- package/src/styles/utilities.css +19 -1318
- package/src/styles/view-transition.css +0 -51
- package/dist/DeckProgress-Dmk4_AKN.js +0 -23
- package/dist/InstrumentRail-CUJ05YVG.js +0 -44
- package/dist/MetricBadge-BZVWIxNy.js +0 -80
- package/dist/components/custom/deck-progress/DeckProgress.vue.d.ts +0 -27
- package/dist/components/custom/deck-progress/index.d.ts +0 -2
- package/dist/components/custom/dialog-native/GlassDialogNative.vue.d.ts +0 -57
- package/dist/components/custom/dialog-native/index.d.ts +0 -1
- package/dist/components/custom/handmark/HandMark.vue.d.ts +0 -29
- package/dist/components/custom/handmark/brush.d.ts +0 -242
- package/dist/components/custom/handmark/freehand.d.ts +0 -69
- package/dist/components/custom/handmark/geometry.d.ts +0 -50
- package/dist/components/custom/handmark/index.d.ts +0 -21
- package/dist/components/custom/handmark/ink.d.ts +0 -11
- package/dist/components/custom/handmark/texture.d.ts +0 -39
- package/dist/components/custom/handmark/types.d.ts +0 -53
- package/dist/components/custom/handmark/useHandMark.d.ts +0 -87
- package/dist/components/custom/instrument-rail/InstrumentRail.vue.d.ts +0 -91
- package/dist/components/custom/instrument-rail/index.d.ts +0 -2
- package/dist/composables/motion/useRouteTransition.d.ts +0 -42
- package/dist/deck-progress.d.ts +0 -1
- package/dist/deck-progress.js +0 -2
- package/dist/dockContext-BKeIMmNk.js +0 -9
- package/dist/handmark.d.ts +0 -1
- package/dist/handmark.js +0 -663
- package/dist/instrument-rail.d.ts +0 -1
- package/dist/instrument-rail.js +0 -2
- package/dist/styles/instrument-rail.css +0 -127
- package/dist/useGlassRenderer-D7YGOYiM.js +0 -69
- package/dist/useSpecularTracking-BVRZsRHA.js +0 -26
- package/dist/useSpringMount-BJSHcLl3.js +0 -113
- package/dist/useViewTransition-DaN5Zrox.js +0 -21
- package/dist/vReveal-zUIQk-rJ.js +0 -53
- package/src/styles/instrument-rail.css +0 -127
- /package/dist/{ContextMenuContent-DDa0v27s.js → ContextMenuContent-CT3AS1WX.js} +0 -0
- /package/dist/{HoverCardContent-B6CcQ8He.js → HoverCardContent-Csywg3YF.js} +0 -0
- /package/dist/{Input-xuDwALQR.js → Input-DWQQIOC4.js} +0 -0
- /package/dist/{InstrumentChassis-C2f6cBaQ.js → InstrumentChassis-UUJX0-mW.js} +0 -0
- /package/dist/{Label-zRfbQdCn.js → Label-r3WzWrsj.js} +0 -0
- /package/dist/{ModalOverlay-B1GkAjNb.js → ModalOverlay-DVLI2VRr.js} +0 -0
- /package/dist/{PaperBackdrop-CqwjnfLv.js → PaperBackdrop-DIXTtVq6.js} +0 -0
- /package/dist/{Progress-iEuD9pxG.js → Progress-DwlUKGbr.js} +0 -0
- /package/dist/{SelectGroup-BFiod7X2.js → SelectGroup-aumMgWLs.js} +0 -0
- /package/dist/{SelectSeparator-C4Ql0gzV.js → SelectSeparator-BQ_1Fcbp.js} +0 -0
- /package/dist/{Separator-D7sD7RKj.js → Separator-0JE6LtNu.js} +0 -0
- /package/dist/{TooltipProvider-CmZzCuaG.js → TooltipProvider-B3MkB_8P.js} +0 -0
- /package/dist/{compile-BOXjLUxu.js → compile-B7NGOBcP.js} +0 -0
- /package/dist/{constants-yKeKnE84.js → constants-CS75AWHG.js} +0 -0
- /package/dist/{createContext-B44Sah_H.js → createContext-BM46COQ-.js} +0 -0
- /package/dist/{createLucideIcon-B6uNAU9G.js → createLucideIcon-DydS2qgk.js} +0 -0
- /package/dist/{menuItemVariants-CCoBNkU5.js → menuItemVariants-DPiEarb0.js} +0 -0
- /package/dist/{supportsCssTimeline-C5oe0lnD.js → supportsCssTimeline-BWenxvHU.js} +0 -0
- /package/dist/{useIntersectionPause-Cck5Uxk8.js → useIntersectionPause-Cc-H9ees.js} +0 -0
- /package/dist/{useInterval-Dsmqwi03.js → useInterval-iHludrxk.js} +0 -0
- /package/dist/{useKeyboardShortcuts-CyIYrndH.js → useKeyboardShortcuts-Be3w_Rwk.js} +0 -0
- /package/dist/{useResizeObserver-CWCbk5Px.js → useResizeObserver-BhgdhOIj.js} +0 -0
- /package/dist/{useResolveTokenColor-r9pnNjqK.js → useResolveTokenColor-Dvn2RZJW.js} +0 -0
- /package/dist/{useSortable-C8ReQ50P.js → useSortable-muI29agz.js} +0 -0
- /package/dist/{useTextHighlight-CWEi25hf.js → useTextHighlight-DmRYkOBx.js} +0 -0
- /package/dist/{useTimer-3xqf_54b.js → useTimer-Dzarvzuk.js} +0 -0
- /package/dist/{useUserInvalidAria-DoJKMZ3s.js → useUserInvalidAria-B2h6jAM_.js} +0 -0
- /package/dist/{useViewportReady-RIr5Wgkh.js → useViewportReady-B40FK4Pa.js} +0 -0
package/dist/constellation.js
CHANGED
|
@@ -3,39 +3,34 @@ import { t } from "./useCanvas2D-ClrQuZtp.js";
|
|
|
3
3
|
import { t as n } from "./_plugin-vue_export-helper-ok8pgSl5.js";
|
|
4
4
|
import { n as r, t as i } from "./prng-D27-B3tK.js";
|
|
5
5
|
import { computed as a, createElementBlock as o, createElementVNode as s, defineComponent as c, getCurrentInstance as l, normalizeClass as u, onMounted as d, openBlock as f, ref as p, unref as m, useTemplateRef as h } from "vue";
|
|
6
|
-
//#region src/components/custom/constellation/
|
|
7
|
-
var g = 1280, _ =
|
|
6
|
+
//#region src/components/custom/constellation/constants.ts
|
|
7
|
+
var g = 1280, _ = {
|
|
8
8
|
node: "#b4afa3",
|
|
9
9
|
nodeDim: "#cdc8bd",
|
|
10
10
|
line: "#1c1714",
|
|
11
11
|
edgeAlpha: .22,
|
|
12
12
|
edgeFocusAlpha: .34,
|
|
13
|
-
alpha: .
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
edgeFocusAlpha: r("--constellation-edge-focus-alpha", y.edgeFocusAlpha),
|
|
29
|
-
alpha: r("--constellation-alpha", y.alpha)
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function x(e) {
|
|
13
|
+
alpha: .8,
|
|
14
|
+
accent: "#b35030",
|
|
15
|
+
edgeFloor: 0,
|
|
16
|
+
edgeAccentAlpha: .3
|
|
17
|
+
}, v = .55, y = 1, b = {
|
|
18
|
+
gain: 14e3,
|
|
19
|
+
reach: 340,
|
|
20
|
+
ramp: 4,
|
|
21
|
+
maxSpeed: 4,
|
|
22
|
+
soften: 8,
|
|
23
|
+
holdMs: 140
|
|
24
|
+
}, x = 8e3, S = 8e3, C = .14, w = 2600, T = 6e3, E = 8e3, D = .72;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/custom/constellation/constellationInteraction.ts
|
|
27
|
+
function O(e) {
|
|
33
28
|
let t = {
|
|
34
|
-
response:
|
|
29
|
+
response: v,
|
|
35
30
|
zeta: 1
|
|
36
|
-
}, n = { ...
|
|
37
|
-
minIdle:
|
|
38
|
-
jitter:
|
|
31
|
+
}, n = { ...b }, r = {
|
|
32
|
+
minIdle: x,
|
|
33
|
+
jitter: S
|
|
39
34
|
};
|
|
40
35
|
if (typeof window > "u") return {
|
|
41
36
|
warp: t,
|
|
@@ -48,62 +43,21 @@ function x(e) {
|
|
|
48
43
|
let r = Number.parseFloat(n);
|
|
49
44
|
return Number.isFinite(r) ? r : t;
|
|
50
45
|
};
|
|
51
|
-
return t.response = a("--constellation-warp-response",
|
|
46
|
+
return t.response = a("--constellation-warp-response", v), t.zeta = a("--constellation-warp-zeta", 1), n.gain = a("--constellation-well-gain", b.gain), n.reach = a("--constellation-well-reach", b.reach), n.ramp = a("--constellation-well-ramp", b.ramp), n.maxSpeed = a("--constellation-well-max-speed", b.maxSpeed), n.holdMs = a("--constellation-well-hold-ms", b.holdMs), r.minIdle = a("--constellation-wander-idle", x), r.jitter = a("--constellation-wander-jitter", S), {
|
|
52
47
|
warp: t,
|
|
53
48
|
well: n,
|
|
54
49
|
wander: r
|
|
55
50
|
};
|
|
56
51
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
for (let o = 0; o < t; o++) {
|
|
60
|
-
let t = e() * Math.PI * 2;
|
|
61
|
-
a.push({
|
|
62
|
-
x: e() * n,
|
|
63
|
-
y: e() * r,
|
|
64
|
-
vx: Math.cos(t) * i,
|
|
65
|
-
vy: Math.sin(t) * i,
|
|
66
|
-
r: 1.6 + e() * 1.6,
|
|
67
|
-
dim: e() < .45
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
return a;
|
|
71
|
-
}
|
|
72
|
-
function C(e, t, n) {
|
|
73
|
-
if (!(t > 0) || !(n > 0) || t === e.w && n === e.h) return;
|
|
74
|
-
let r = e.w / t, i = e.h / n;
|
|
75
|
-
for (let t of e.nodes) t.x *= r, t.y *= i;
|
|
76
|
-
e.warp.x *= r, e.warp.y *= i;
|
|
77
|
-
}
|
|
78
|
-
function w(e, t, n, r, i = 0, a = 0, o = Math.random) {
|
|
79
|
-
let { nodes: s, w: c, h: l } = e;
|
|
80
|
-
for (let e = 0; e < s.length; e++) {
|
|
81
|
-
let n = s[e];
|
|
82
|
-
n.x += n.vx * t, n.y += n.vy * t, n.x < 0 ? (n.x = 0, n.vx *= -1) : n.x > c && (n.x = c, n.vx *= -1), n.y < 0 ? (n.y = 0, n.vy *= -1) : n.y > l && (n.y = l, n.vy *= -1);
|
|
83
|
-
}
|
|
84
|
-
if (r && r.x >= 0) {
|
|
85
|
-
let e = 180 * t;
|
|
86
|
-
for (let t = 0; t < s.length; t++) {
|
|
87
|
-
let i = s[t], a = r.x - i.x, o = r.y - i.y, c = Math.hypot(a, o);
|
|
88
|
-
if (c > .5 && c < e) {
|
|
89
|
-
let t = Math.hypot(i.vx, i.vy) || n, r = (1 - c / e) * .08, s = i.vx + a / c * r * t, l = i.vy + o / c * r * t, u = Math.hypot(s, l) || 1;
|
|
90
|
-
i.vx = s / u * t, i.vy = l / u * t;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
if (k(e, t, n, i), F(e, i), e.wander && a > 0) {
|
|
95
|
-
let t = e.wander;
|
|
96
|
-
t.nextAt < 0 ? t.nextAt = a + t.minIdle + o() * t.jitter : a >= t.nextAt && z(e) && (I(e, B(e, o)), t.nextAt = a + t.minIdle + o() * t.jitter);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
var T = .001, E = 1.5, D = 7, O = 22;
|
|
100
|
-
function k(e, t, n, r) {
|
|
52
|
+
var k = .001, A = 1.5, j = 7, M = 22;
|
|
53
|
+
function N(e, t, n, r) {
|
|
101
54
|
let i = e.well;
|
|
102
55
|
if (!i || !(r > 0)) return;
|
|
103
|
-
let a = Math.min(r,
|
|
104
|
-
i.strength += (i.target - i.strength) * c, i.strength <
|
|
105
|
-
let { nodes: l } = e, u = o.reach * t, d = u * u, f = o.maxSpeed * t, p = i.target > 0 ?
|
|
56
|
+
let a = Math.min(r, P), o = i.cfg, s = i.target > 0 ? o.ramp : M, c = Math.min(s * a, 1);
|
|
57
|
+
i.strength += (i.target - i.strength) * c, i.strength < k && (i.strength = i.target <= 0 ? 0 : i.strength);
|
|
58
|
+
let { nodes: l } = e, u = o.reach * t, d = u * u, f = o.maxSpeed * t, p = i.target > 0 ? A : j, m = Math.min(p * a, 1), h = i.strength > k && i.x >= 0, g = e.pinnedIndex;
|
|
106
59
|
for (let e = 0; e < l.length; e++) {
|
|
60
|
+
if (e === g) continue;
|
|
107
61
|
let t = l[e];
|
|
108
62
|
if (h) {
|
|
109
63
|
let e = i.x - t.x, n = i.y - t.y, r = e * e + n * n;
|
|
@@ -119,15 +73,8 @@ function k(e, t, n, r) {
|
|
|
119
73
|
}
|
|
120
74
|
}
|
|
121
75
|
}
|
|
122
|
-
var
|
|
123
|
-
|
|
124
|
-
reach: 340,
|
|
125
|
-
ramp: 4,
|
|
126
|
-
maxSpeed: 4,
|
|
127
|
-
soften: 8,
|
|
128
|
-
holdMs: 140
|
|
129
|
-
};
|
|
130
|
-
function P(e, t, n, r = -1) {
|
|
76
|
+
var P = .05;
|
|
77
|
+
function F(e, t, n, r = -1) {
|
|
131
78
|
let { nodes: i } = e, a = -1, o = Infinity;
|
|
132
79
|
for (let e = 0; e < i.length; e++) {
|
|
133
80
|
if (e === r) continue;
|
|
@@ -136,13 +83,13 @@ function P(e, t, n, r = -1) {
|
|
|
136
83
|
}
|
|
137
84
|
return a;
|
|
138
85
|
}
|
|
139
|
-
function
|
|
86
|
+
function I(e, t) {
|
|
140
87
|
let { warp: n, nodes: r } = e;
|
|
141
88
|
if (!n || n.targetIdx < 0 || n.targetIdx >= r.length || !(t > 0)) return;
|
|
142
|
-
let i = Math.min(t,
|
|
89
|
+
let i = Math.min(t, P), a = e.warpCfg?.response ?? .55, o = e.warpCfg?.zeta ?? 1, s = 2 * Math.PI / a, c = r[n.targetIdx], l = -2 * o * s * n.vx - s * s * (n.x - c.x), u = -2 * o * s * n.vy - s * s * (n.y - c.y);
|
|
143
90
|
n.vx += l * i, n.vy += u * i, n.x += n.vx * i, n.y += n.vy * i;
|
|
144
91
|
}
|
|
145
|
-
function
|
|
92
|
+
function L(e, t) {
|
|
146
93
|
let { warp: n, nodes: r } = e;
|
|
147
94
|
if (t < 0 || t >= r.length) {
|
|
148
95
|
n.targetIdx = -1, e.focalIndex = -1;
|
|
@@ -150,20 +97,20 @@ function I(e, t) {
|
|
|
150
97
|
}
|
|
151
98
|
e.focalIndex = t, n.targetIdx = t;
|
|
152
99
|
}
|
|
153
|
-
function
|
|
154
|
-
let r =
|
|
100
|
+
function R(e, t, n) {
|
|
101
|
+
let r = F(e, t, n, -1);
|
|
155
102
|
if (r >= 0 && r === e.focalIndex) return e.focalIndex;
|
|
156
|
-
let i =
|
|
157
|
-
return i < 0 ? -1 : (
|
|
103
|
+
let i = F(e, t, n, e.focalIndex);
|
|
104
|
+
return i < 0 ? -1 : (L(e, i), i);
|
|
158
105
|
}
|
|
159
|
-
var
|
|
160
|
-
function
|
|
106
|
+
var z = 24;
|
|
107
|
+
function B(e) {
|
|
161
108
|
let { warp: t, nodes: n } = e;
|
|
162
109
|
if (!t || t.targetIdx < 0 || t.targetIdx >= n.length) return !0;
|
|
163
110
|
let r = n[t.targetIdx];
|
|
164
|
-
return Math.hypot(t.x - r.x, t.y - r.y) <
|
|
111
|
+
return Math.hypot(t.x - r.x, t.y - r.y) < z;
|
|
165
112
|
}
|
|
166
|
-
function
|
|
113
|
+
function V(e, t) {
|
|
167
114
|
let n = e.nodes.length;
|
|
168
115
|
if (n <= 1) return e.focalIndex;
|
|
169
116
|
let r = e.focalIndex;
|
|
@@ -171,58 +118,257 @@ function B(e, t) {
|
|
|
171
118
|
let i = Math.floor(t() * (n - 1));
|
|
172
119
|
return i < r ? i : i + 1;
|
|
173
120
|
}
|
|
174
|
-
function
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
121
|
+
function H(e = {}) {
|
|
122
|
+
return {
|
|
123
|
+
anchorX: 0,
|
|
124
|
+
anchorY: 0,
|
|
125
|
+
nextAt: -1,
|
|
126
|
+
legStart: -1,
|
|
127
|
+
fromX: 0,
|
|
128
|
+
fromY: 0,
|
|
129
|
+
toX: 0,
|
|
130
|
+
toY: 0,
|
|
131
|
+
wanderFrac: e.wanderFrac ?? .14,
|
|
132
|
+
durMs: e.durMs ?? 2600,
|
|
133
|
+
minIdle: e.minIdle ?? 6e3,
|
|
134
|
+
jitter: e.jitter ?? 8e3
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
function U(e) {
|
|
138
|
+
return e < .5 ? 2 * e * e : 1 - (-2 * e + 2) ** 2 / 2;
|
|
139
|
+
}
|
|
140
|
+
function W(e, t, n) {
|
|
141
|
+
let r = e.pinnedDrift;
|
|
142
|
+
if (!r || e.pinnedIndex < 0 || e.pinnedIndex >= e.nodes.length || !(t > 0)) return;
|
|
143
|
+
let i = e.nodes[e.pinnedIndex];
|
|
144
|
+
if (r.nextAt < 0) {
|
|
145
|
+
r.anchorX = i.x, r.anchorY = i.y, r.nextAt = t + r.minIdle + n() * r.jitter;
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (r.legStart < 0) {
|
|
149
|
+
if (t < r.nextAt) return;
|
|
150
|
+
r.fromX = i.x, r.fromY = i.y;
|
|
151
|
+
let a = r.wanderFrac, o = r.anchorX + (n() * 2 - 1) * a * e.w, s = r.anchorY + (n() * 2 - 1) * a * e.h;
|
|
152
|
+
r.toX = Math.max(.04 * e.w, Math.min(.96 * e.w, o)), r.toY = Math.max(.04 * e.h, Math.min(.96 * e.h, s)), r.legStart = t;
|
|
153
|
+
}
|
|
154
|
+
let a = Math.min((t - r.legStart) / r.durMs, 1), o = U(a);
|
|
155
|
+
i.x = r.fromX + (r.toX - r.fromX) * o, i.y = r.fromY + (r.toY - r.fromY) * o, a >= 1 && (r.legStart = -1, r.nextAt = t + r.minIdle + n() * r.jitter);
|
|
156
|
+
}
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region src/components/custom/constellation/constellationField.ts
|
|
159
|
+
function G(e, t, n, r, i) {
|
|
160
|
+
let a = [];
|
|
161
|
+
for (let o = 0; o < t; o++) {
|
|
162
|
+
let t = e() * Math.PI * 2;
|
|
163
|
+
a.push({
|
|
164
|
+
x: e() * n,
|
|
165
|
+
y: e() * r,
|
|
166
|
+
vx: Math.cos(t) * i,
|
|
167
|
+
vy: Math.sin(t) * i,
|
|
168
|
+
r: 1.6 + e() * 1.6,
|
|
169
|
+
dim: e() < .45
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
return a;
|
|
173
|
+
}
|
|
174
|
+
function K(e, t, n) {
|
|
175
|
+
if (!(t > 0) || !(n > 0) || t === e.w && n === e.h) return;
|
|
176
|
+
let r = e.w / t, i = e.h / n;
|
|
177
|
+
for (let t of e.nodes) t.x *= r, t.y *= i;
|
|
178
|
+
e.warp.x *= r, e.warp.y *= i;
|
|
179
|
+
}
|
|
180
|
+
function q(e, t, n, r, i = 0, a = 0, o = Math.random) {
|
|
181
|
+
let { nodes: s, w: c, h: l } = e, u = e.pinnedIndex;
|
|
182
|
+
for (let e = 0; e < s.length; e++) {
|
|
183
|
+
if (e === u) continue;
|
|
184
|
+
let n = s[e];
|
|
185
|
+
n.x += n.vx * t, n.y += n.vy * t, n.x < 0 ? (n.x = 0, n.vx *= -1) : n.x > c && (n.x = c, n.vx *= -1), n.y < 0 ? (n.y = 0, n.vy *= -1) : n.y > l && (n.y = l, n.vy *= -1);
|
|
186
|
+
}
|
|
187
|
+
if (r && r.x >= 0) {
|
|
188
|
+
let e = 180 * t;
|
|
189
|
+
for (let t = 0; t < s.length; t++) {
|
|
190
|
+
if (t === u) continue;
|
|
191
|
+
let i = s[t], a = r.x - i.x, o = r.y - i.y, c = Math.hypot(a, o);
|
|
192
|
+
if (c > .5 && c < e) {
|
|
193
|
+
let t = Math.hypot(i.vx, i.vy) || n, r = (1 - c / e) * .08, s = i.vx + a / c * r * t, l = i.vy + o / c * r * t, u = Math.hypot(s, l) || 1;
|
|
194
|
+
i.vx = s / u * t, i.vy = l / u * t;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
if (N(e, t, n, i), W(e, a, o), I(e, i), e.warpAutoRelease && e.warp.targetIdx >= 0 && B(e) && (e.warp.targetIdx = -1), e.wander && a > 0) {
|
|
199
|
+
let t = e.wander;
|
|
200
|
+
t.nextAt < 0 ? t.nextAt = a + t.minIdle + o() * t.jitter : a >= t.nextAt && B(e) && (L(e, V(e, o)), t.nextAt = a + t.minIdle + o() * t.jitter);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region src/components/custom/constellation/constellationDraw.ts
|
|
205
|
+
function J(e) {
|
|
206
|
+
return Math.max(e.k, e.kFloor ?? .72);
|
|
207
|
+
}
|
|
208
|
+
function Y(e) {
|
|
209
|
+
if (typeof window > "u") return { ..._ };
|
|
210
|
+
let t = getComputedStyle(e), n = (e, n) => t.getPropertyValue(e).trim() || n, r = (e, n) => {
|
|
211
|
+
let r = t.getPropertyValue(e).trim();
|
|
212
|
+
if (!r) return n;
|
|
213
|
+
let i = Number.parseFloat(r);
|
|
214
|
+
return Number.isFinite(i) ? i : n;
|
|
215
|
+
};
|
|
216
|
+
return {
|
|
217
|
+
node: n("--constellation-node", _.node),
|
|
218
|
+
nodeDim: n("--constellation-node-dim", _.nodeDim),
|
|
219
|
+
line: n("--constellation-line", _.line),
|
|
220
|
+
edgeAlpha: r("--constellation-edge-alpha", _.edgeAlpha),
|
|
221
|
+
edgeFocusAlpha: r("--constellation-edge-focus-alpha", _.edgeFocusAlpha),
|
|
222
|
+
alpha: r("--constellation-alpha", _.alpha),
|
|
223
|
+
accent: n("--constellation-accent", _.accent),
|
|
224
|
+
edgeFloor: r("--constellation-edge-floor", _.edgeFloor),
|
|
225
|
+
edgeAccentAlpha: r("--constellation-edge-accent-alpha", _.edgeAccentAlpha)
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
function X(e, t, n, r, i = 1, a = -1) {
|
|
229
|
+
let { nodes: o, k: s } = t, c = J(t), l = n * s, u = l * l, d = r.alpha * i, f = r.edgeAccentAlpha * d;
|
|
230
|
+
for (let t = 0; t < o.length; t++) {
|
|
231
|
+
let n = o[t];
|
|
232
|
+
for (let i = t + 1; i < o.length; i++) {
|
|
233
|
+
let s = o[i], l = n.x - s.x, p = n.y - s.y, m = l * l + p * p;
|
|
234
|
+
if (m > u) continue;
|
|
235
|
+
let h = 1 - m / u;
|
|
236
|
+
a >= 0 && (t === a || i === a) ? (e.strokeStyle = r.accent, e.lineWidth = 1.1 * c, e.globalAlpha = f * h) : (e.strokeStyle = r.line, e.lineWidth = 1 * c, e.globalAlpha = (r.edgeAlpha * h + r.edgeFloor) * d), e.beginPath(), e.moveTo(n.x, n.y), e.lineTo(s.x, s.y), e.stroke();
|
|
182
237
|
}
|
|
183
238
|
}
|
|
184
239
|
e.globalAlpha = 1;
|
|
185
240
|
}
|
|
186
|
-
function
|
|
187
|
-
let { nodes:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
241
|
+
function Z(e, t, n, r = 1) {
|
|
242
|
+
let { nodes: i } = t, a = J(t);
|
|
243
|
+
e.globalAlpha = r;
|
|
244
|
+
for (let t = 0; t < i.length; t++) {
|
|
245
|
+
let r = i[t];
|
|
246
|
+
e.fillStyle = r.dim ? n.nodeDim : n.node, e.beginPath(), e.arc(r.x, r.y, r.r * a, 0, Math.PI * 2), e.fill();
|
|
191
247
|
}
|
|
248
|
+
e.globalAlpha = 1;
|
|
192
249
|
}
|
|
193
|
-
function
|
|
250
|
+
function Q(e, t, n, r, i, a = 1) {
|
|
194
251
|
if (!i || i.x < 0) return;
|
|
195
|
-
let { nodes:
|
|
196
|
-
e.strokeStyle = r.line, e.lineWidth = 1 *
|
|
197
|
-
for (let t of
|
|
252
|
+
let { nodes: o, k: s } = t, c = J(t), l = n * s, u = l * l, d = r.edgeFocusAlpha * r.alpha * a;
|
|
253
|
+
e.strokeStyle = r.line, e.lineWidth = 1 * c;
|
|
254
|
+
for (let t of o) {
|
|
198
255
|
let n = t.x - i.x, r = t.y - i.y, a = n * n + r * r;
|
|
199
|
-
a >
|
|
256
|
+
a > u || (e.globalAlpha = (1 - a / u) * d, e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(t.x, t.y), e.stroke());
|
|
200
257
|
}
|
|
201
|
-
e.globalAlpha = .55, e.fillStyle = r.node, e.beginPath(), e.arc(i.x, i.y, 2.6 *
|
|
258
|
+
e.globalAlpha = .55 * a, e.fillStyle = r.node, e.beginPath(), e.arc(i.x, i.y, 2.6 * c, 0, Math.PI * 2), e.fill(), e.globalAlpha = 1;
|
|
202
259
|
}
|
|
203
|
-
function
|
|
204
|
-
let
|
|
260
|
+
function $(e, t, n, r, i, a = 1) {
|
|
261
|
+
let o = J(t);
|
|
205
262
|
e.strokeStyle = i.line;
|
|
206
263
|
for (let t = r.length - 1; t >= 0; t--) {
|
|
207
264
|
let i = r[t];
|
|
208
265
|
i.start < 0 && (i.start = n);
|
|
209
|
-
let
|
|
210
|
-
if (
|
|
266
|
+
let s = (n - i.start) / 900;
|
|
267
|
+
if (s >= 1) {
|
|
211
268
|
r.splice(t, 1);
|
|
212
269
|
continue;
|
|
213
270
|
}
|
|
214
|
-
e.globalAlpha = (1 -
|
|
271
|
+
e.globalAlpha = (1 - s) * .5 * a, e.lineWidth = 1.4 * o, e.beginPath(), e.arc(i.x, i.y, (8 + s * 130) * o, 0, Math.PI * 2), e.stroke();
|
|
215
272
|
}
|
|
216
273
|
e.globalAlpha = 1;
|
|
217
274
|
}
|
|
218
275
|
//#endregion
|
|
276
|
+
//#region src/components/custom/constellation/composables/useConstellationPointer.ts
|
|
277
|
+
function ee(e) {
|
|
278
|
+
let { host: t, canvas: n, field: r, pointer: i, ripples: a, handle: o, toLocalRef: s, pointerReactive: c, warpOnClick: l, gravityWell: u, isFrozen: d } = e, f = (e) => {
|
|
279
|
+
let t = n.getBoundingClientRect();
|
|
280
|
+
if (!t.width || !t.height) return null;
|
|
281
|
+
let i = (e.clientX - t.left) / t.width, a = (e.clientY - t.top) / t.height;
|
|
282
|
+
return i < 0 || a < 0 || i > 1 || a > 1 ? null : {
|
|
283
|
+
x: i * r.w,
|
|
284
|
+
y: a * r.h
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
if (s.value = f, c && t && !d && !o.reducedMotion && (t.addEventListener("pointermove", (e) => {
|
|
288
|
+
let t = f(e);
|
|
289
|
+
t ? (i.x = t.x, i.y = t.y) : (i.x = -1, i.y = -1), o.wake();
|
|
290
|
+
}), t.addEventListener("pointerleave", () => {
|
|
291
|
+
i.x = -1, i.y = -1;
|
|
292
|
+
}), t.addEventListener("pointerdown", (e) => {
|
|
293
|
+
let t = f(e);
|
|
294
|
+
t && a.push({
|
|
295
|
+
x: t.x,
|
|
296
|
+
y: t.y,
|
|
297
|
+
start: -1
|
|
298
|
+
}), o.wake();
|
|
299
|
+
})), l && t && !d && !o.reducedMotion && t.addEventListener("pointerdown", (e) => {
|
|
300
|
+
let t = f(e);
|
|
301
|
+
t && (R(r, t.x, t.y), o.wake());
|
|
302
|
+
}), u && t && r.well && !d && !o.reducedMotion) {
|
|
303
|
+
let e = r.well, n, i = (t) => {
|
|
304
|
+
let r = f(t);
|
|
305
|
+
r && (e.x = r.x, e.y = r.y, n = window.setTimeout(() => {
|
|
306
|
+
e.target = 1, o.wake();
|
|
307
|
+
}, e.cfg.holdMs), o.wake());
|
|
308
|
+
}, a = (t) => {
|
|
309
|
+
if (e.target > 0) {
|
|
310
|
+
let n = f(t);
|
|
311
|
+
n && (e.x = n.x, e.y = n.y);
|
|
312
|
+
}
|
|
313
|
+
}, s = () => {
|
|
314
|
+
n !== void 0 && (clearTimeout(n), n = void 0), e.target = 0, o.wake();
|
|
315
|
+
};
|
|
316
|
+
t.addEventListener("pointerdown", i), t.addEventListener("pointermove", a), t.addEventListener("pointerup", s), t.addEventListener("pointerleave", s), t.addEventListener("pointercancel", s);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
//#endregion
|
|
320
|
+
//#region src/components/custom/constellation/composables/createConstellationField.ts
|
|
321
|
+
function te(e, t, n = !1, r = !1, i = !1) {
|
|
322
|
+
let a = {
|
|
323
|
+
nodes: [],
|
|
324
|
+
canvas: null,
|
|
325
|
+
w: 0,
|
|
326
|
+
h: 0,
|
|
327
|
+
k: 1,
|
|
328
|
+
dpr: 1,
|
|
329
|
+
focalIndex: -1,
|
|
330
|
+
warp: {
|
|
331
|
+
x: 0,
|
|
332
|
+
y: 0,
|
|
333
|
+
vx: 0,
|
|
334
|
+
vy: 0,
|
|
335
|
+
targetIdx: -1
|
|
336
|
+
},
|
|
337
|
+
pinnedIndex: n === !1 ? -1 : n === !0 ? 0 : Math.max(0, Math.trunc(n)),
|
|
338
|
+
warpAutoRelease: !!i
|
|
339
|
+
};
|
|
340
|
+
a.pinnedDrift = r ? H(r === !0 ? {} : r) : void 0;
|
|
341
|
+
let o = e && e !== !0 ? e : {};
|
|
342
|
+
a.wander = e ? {
|
|
343
|
+
nextAt: -1,
|
|
344
|
+
minIdle: o.minIdle ?? 8e3,
|
|
345
|
+
jitter: o.jitter ?? 8e3
|
|
346
|
+
} : void 0;
|
|
347
|
+
let s = t && t !== !0 ? t : {};
|
|
348
|
+
return a.well = t ? {
|
|
349
|
+
x: -1,
|
|
350
|
+
y: -1,
|
|
351
|
+
strength: 0,
|
|
352
|
+
target: 0,
|
|
353
|
+
cfg: {
|
|
354
|
+
...b,
|
|
355
|
+
...s
|
|
356
|
+
}
|
|
357
|
+
} : void 0, {
|
|
358
|
+
field: a,
|
|
359
|
+
wanderOverride: o,
|
|
360
|
+
wellOverride: s
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
//#endregion
|
|
219
364
|
//#region src/components/custom/constellation/Constellation.vue?vue&type=script&setup=true&lang.ts
|
|
220
|
-
var
|
|
365
|
+
var ne = 0, re = /* @__PURE__ */ n(/* @__PURE__ */ c({
|
|
221
366
|
__name: "Constellation",
|
|
222
367
|
props: {
|
|
223
368
|
count: { default: 64 },
|
|
224
369
|
link: { default: 132 },
|
|
225
370
|
speed: { default: .16 },
|
|
371
|
+
opacityCeiling: { default: 1 },
|
|
226
372
|
seed: {},
|
|
227
373
|
pointerReactive: {
|
|
228
374
|
type: Boolean,
|
|
@@ -240,6 +386,22 @@ var G = 0, K = /* @__PURE__ */ n(/* @__PURE__ */ c({
|
|
|
240
386
|
type: [Boolean, Object],
|
|
241
387
|
default: !1
|
|
242
388
|
},
|
|
389
|
+
pinned: {
|
|
390
|
+
type: [Boolean, Number],
|
|
391
|
+
default: !1
|
|
392
|
+
},
|
|
393
|
+
accentEdges: {
|
|
394
|
+
type: Boolean,
|
|
395
|
+
default: !1
|
|
396
|
+
},
|
|
397
|
+
pinnedDrift: {
|
|
398
|
+
type: [Boolean, Object],
|
|
399
|
+
default: !1
|
|
400
|
+
},
|
|
401
|
+
warpAutoRelease: {
|
|
402
|
+
type: Boolean,
|
|
403
|
+
default: !1
|
|
404
|
+
},
|
|
243
405
|
freeze: { type: Boolean },
|
|
244
406
|
class: { type: [
|
|
245
407
|
Boolean,
|
|
@@ -251,141 +413,93 @@ var G = 0, K = /* @__PURE__ */ n(/* @__PURE__ */ c({
|
|
|
251
413
|
drawOverlay: { type: Function }
|
|
252
414
|
},
|
|
253
415
|
setup(n, { expose: c }) {
|
|
254
|
-
let
|
|
255
|
-
nodes: [],
|
|
256
|
-
canvas: null,
|
|
257
|
-
w: 0,
|
|
258
|
-
h: 0,
|
|
259
|
-
k: 1,
|
|
260
|
-
dpr: 1,
|
|
261
|
-
focalIndex: -1,
|
|
262
|
-
warp: {
|
|
263
|
-
x: 0,
|
|
264
|
-
y: 0,
|
|
265
|
-
vx: 0,
|
|
266
|
-
vy: 0,
|
|
267
|
-
targetIdx: -1
|
|
268
|
-
}
|
|
269
|
-
}, A = n.wander && n.wander !== !0 ? n.wander : {};
|
|
270
|
-
k.wander = n.wander ? {
|
|
271
|
-
nextAt: -1,
|
|
272
|
-
minIdle: A.minIdle ?? 8e3,
|
|
273
|
-
jitter: A.jitter ?? 8e3
|
|
274
|
-
} : void 0;
|
|
275
|
-
let j = n.gravityWell && n.gravityWell !== !0 ? n.gravityWell : {};
|
|
276
|
-
k.well = n.gravityWell ? {
|
|
277
|
-
x: -1,
|
|
278
|
-
y: -1,
|
|
279
|
-
strength: 0,
|
|
280
|
-
target: 0,
|
|
281
|
-
cfg: {
|
|
282
|
-
...N,
|
|
283
|
-
...j
|
|
284
|
-
}
|
|
285
|
-
} : void 0;
|
|
286
|
-
let M = {
|
|
416
|
+
let v = h("hostRef"), y = h("canvasRef"), b = a(() => n.seed === void 0 ? Math.random : r(typeof n.seed == "string" ? i(n.seed) : n.seed)), x = () => typeof window < "u" && /[?&](export|print|freeze)\b/.test(window.location.search), S = l()?.vnode.props?.freeze, C = a(() => S === void 0 ? x() : S === !0 || S === ""), { field: w, wanderOverride: T, wellOverride: E } = te(n.wander, n.gravityWell, n.pinned, n.pinnedDrift, n.warpAutoRelease), D = {
|
|
287
417
|
x: -1,
|
|
288
418
|
y: -1
|
|
289
|
-
},
|
|
419
|
+
}, k = [], A = { ..._ }, j = -1, M = !1, N = p(null);
|
|
290
420
|
return d(() => {
|
|
291
|
-
let e =
|
|
421
|
+
let e = y.value;
|
|
292
422
|
if (!e) return;
|
|
293
423
|
let r = t({
|
|
294
|
-
canvas:
|
|
424
|
+
canvas: y,
|
|
295
425
|
setup: (t) => ({ render(t, i) {
|
|
296
426
|
let a = e.clientWidth || e.offsetWidth || 1280, o = e.clientHeight || e.offsetHeight || 720, s = a / g;
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
427
|
+
w.canvas = e;
|
|
428
|
+
let c = parseFloat(getComputedStyle(e).getPropertyValue("--constellation-k-floor"));
|
|
429
|
+
if (w.kFloor = Number.isFinite(c) ? c : void 0, w.dpr = Math.min(typeof window < "u" && window.devicePixelRatio || 1, 2), w.w !== a || w.h !== o) {
|
|
430
|
+
let t = w.w, r = w.h;
|
|
431
|
+
if (w.w = a, w.h = o, w.k = s, w.nodes.length ? K(w, t, r) : (w.nodes = G(b.value, n.count, a, o, n.speed), w.warp.x = a / 2, w.warp.y = o / 2), A = Y(e), !M) {
|
|
432
|
+
M = !0;
|
|
433
|
+
let t = O(e);
|
|
434
|
+
w.warpCfg = t.warp, w.well && (w.well.cfg = {
|
|
303
435
|
...t.well,
|
|
304
|
-
...
|
|
305
|
-
}),
|
|
436
|
+
...E
|
|
437
|
+
}), w.wander && (w.wander.minIdle = T.minIdle ?? t.wander.minIdle, w.wander.jitter = T.jitter ?? t.wander.jitter);
|
|
306
438
|
}
|
|
307
439
|
}
|
|
308
|
-
|
|
309
|
-
let
|
|
310
|
-
|
|
311
|
-
let
|
|
312
|
-
if (
|
|
313
|
-
let e = n.pointerReactive ?
|
|
314
|
-
w
|
|
440
|
+
w.k = s;
|
|
441
|
+
let l = j < 0 ? 0 : (i - j) / 1e3;
|
|
442
|
+
j = i;
|
|
443
|
+
let u = C.value || r.reducedMotion;
|
|
444
|
+
if (u && w.well && (w.well.strength = 0, w.well.target = 0, w.well.x = -1, w.well.y = -1), !u) {
|
|
445
|
+
let e = n.pointerReactive ? D : null;
|
|
446
|
+
q(w, s, n.speed, e, l, i, b.value);
|
|
315
447
|
}
|
|
316
|
-
t.clearRect(0, 0, a, o)
|
|
448
|
+
t.clearRect(0, 0, a, o);
|
|
449
|
+
let d = n.accentEdges ? w.pinnedIndex >= 0 ? w.pinnedIndex : w.focalIndex : -1;
|
|
450
|
+
X(t, w, n.link, A, n.opacityCeiling, d), Z(t, w, A, n.opacityCeiling), n.pointerReactive && !u && (Q(t, w, n.link, A, D, n.opacityCeiling), $(t, w, i, k, A, n.opacityCeiling)), n.drawOverlay?.(t, w, u ? ne : i);
|
|
317
451
|
} })
|
|
318
|
-
})
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
}), i.addEventListener("pointerdown", (e) => {
|
|
333
|
-
let t = a(e);
|
|
334
|
-
t && P.push({
|
|
335
|
-
x: t.x,
|
|
336
|
-
y: t.y,
|
|
337
|
-
start: -1
|
|
338
|
-
}), r.wake();
|
|
339
|
-
})), n.warpOnClick && i && !O.value && !r.reducedMotion && i.addEventListener("pointerdown", (e) => {
|
|
340
|
-
let t = a(e);
|
|
341
|
-
t && (L(k, t.x, t.y), r.wake());
|
|
342
|
-
}), n.gravityWell && i && k.well && !O.value && !r.reducedMotion) {
|
|
343
|
-
let e = k.well, t, n = (n) => {
|
|
344
|
-
let i = a(n);
|
|
345
|
-
i && (e.x = i.x, e.y = i.y, t = window.setTimeout(() => {
|
|
346
|
-
e.target = 1, r.wake();
|
|
347
|
-
}, e.cfg.holdMs), r.wake());
|
|
348
|
-
}, o = (t) => {
|
|
349
|
-
if (e.target > 0) {
|
|
350
|
-
let n = a(t);
|
|
351
|
-
n && (e.x = n.x, e.y = n.y);
|
|
352
|
-
}
|
|
353
|
-
}, s = () => {
|
|
354
|
-
t !== void 0 && (clearTimeout(t), t = void 0), e.target = 0, r.wake();
|
|
355
|
-
};
|
|
356
|
-
i.addEventListener("pointerdown", n), i.addEventListener("pointermove", o), i.addEventListener("pointerup", s), i.addEventListener("pointerleave", s), i.addEventListener("pointercancel", s);
|
|
357
|
-
}
|
|
452
|
+
});
|
|
453
|
+
ee({
|
|
454
|
+
host: v.value,
|
|
455
|
+
canvas: e,
|
|
456
|
+
field: w,
|
|
457
|
+
pointer: D,
|
|
458
|
+
ripples: k,
|
|
459
|
+
handle: r,
|
|
460
|
+
toLocalRef: N,
|
|
461
|
+
pointerReactive: n.pointerReactive,
|
|
462
|
+
warpOnClick: n.warpOnClick,
|
|
463
|
+
gravityWell: !!n.gravityWell,
|
|
464
|
+
isFrozen: C.value
|
|
465
|
+
});
|
|
358
466
|
}), c({
|
|
359
|
-
field:
|
|
360
|
-
isFrozen:
|
|
467
|
+
field: w,
|
|
468
|
+
isFrozen: C,
|
|
361
469
|
warpTo(e, t) {
|
|
362
470
|
if (typeof e == "number" && typeof t == "number") {
|
|
363
|
-
let n =
|
|
471
|
+
let n = N.value?.({
|
|
364
472
|
clientX: e,
|
|
365
473
|
clientY: t
|
|
366
474
|
});
|
|
367
|
-
return n ?
|
|
475
|
+
return n ? R(w, n.x, n.y) : -1;
|
|
368
476
|
}
|
|
369
477
|
let n = e;
|
|
370
|
-
return
|
|
478
|
+
return R(w, n.x, n.y);
|
|
371
479
|
},
|
|
372
480
|
holdWellAt(e, t) {
|
|
373
|
-
return
|
|
481
|
+
return w.well ? (w.well.x = e, w.well.y = t, w.well.target = 1, !0) : !1;
|
|
374
482
|
},
|
|
375
483
|
releaseWell() {
|
|
376
|
-
|
|
484
|
+
w.well && (w.well.target = 0);
|
|
485
|
+
},
|
|
486
|
+
warpSettled() {
|
|
487
|
+
return B(w);
|
|
488
|
+
},
|
|
489
|
+
pinNode(e) {
|
|
490
|
+
w.pinnedIndex = e, w.pinnedDrift && (w.pinnedDrift.nextAt = -1);
|
|
377
491
|
}
|
|
378
492
|
}), (t, r) => (f(), o("div", {
|
|
379
493
|
ref_key: "hostRef",
|
|
380
|
-
ref:
|
|
494
|
+
ref: v,
|
|
381
495
|
class: u(m(e)("constellation", n.class))
|
|
382
496
|
}, [s("canvas", {
|
|
383
497
|
ref_key: "canvasRef",
|
|
384
|
-
ref:
|
|
498
|
+
ref: y,
|
|
385
499
|
class: "constellation-canvas",
|
|
386
500
|
"aria-hidden": "true"
|
|
387
501
|
}, null, 512)], 2));
|
|
388
502
|
}
|
|
389
|
-
}), [["__scopeId", "data-v-
|
|
503
|
+
}), [["__scopeId", "data-v-a4c10474"]]);
|
|
390
504
|
//#endregion
|
|
391
|
-
export { g as BASE_WIDTH,
|
|
505
|
+
export { g as BASE_WIDTH, re as Constellation, D as DEFAULT_K_FLOOR, _ as DEFAULT_PALETTE, w as DEFAULT_PINNED_DRIFT_DUR, C as DEFAULT_PINNED_DRIFT_FRAC, T as DEFAULT_PINNED_DRIFT_IDLE, E as DEFAULT_PINNED_DRIFT_JITTER, x as DEFAULT_WANDER_IDLE, S as DEFAULT_WANDER_JITTER, b as DEFAULT_WELL_CONFIG, v as WARP_RESPONSE, y as WARP_ZETA, X as drawEdges, Z as drawNodes, Q as drawPointerWeb, $ as drawRipples, J as kVisOf, H as makePinnedDrift, F as nearestNode, V as pickWanderTarget, O as readInteractionConfig, Y as readPalette, K as refitField, G as seedField, L as setWarpTarget, q as stepField, W as stepPinnedDrift, N as stepWell, B as warpSettled, I as warpStep, R as warpTo };
|