@mkbabb/glass-ui 3.1.1 → 3.3.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/{CardFooter-CSGcJkqa.js → CardFooter-C390imy7.js} +3 -3
- package/dist/{CollapsibleContent-CVMOcYlV.js → CollapsibleContent-cauTbZEM.js} +1 -1
- package/dist/{CommandShortcut-DWT19a2Y.js → CommandShortcut-BiVyqipe.js} +7 -6
- package/dist/{ContextMenuSubContent-gAFxJ-qi.js → ContextMenuSubContent-DrWkXKQP.js} +4 -4
- package/dist/DataTable-FfkaAg2z.js +465 -0
- package/dist/DialogContent-IQ8_BRrC.js +100 -0
- package/dist/{DialogFooter-ClrNEOVU.js → DialogFooter-Er0wA3K6.js} +2 -2
- package/dist/{DiscoGlyph-C3JfMnRV.js → DiscoGlyph-BaZ8OawK.js} +1 -1
- package/dist/{GlyphFace-BRS8vUb7.js → GlyphFace-B_7vOmYn.js} +1 -1
- package/dist/HoverPopover-DTSYkJtw.js +96 -0
- package/dist/{IconTooltip-BkaA7tZ2.js → IconTooltip-BTyYn4mr.js} +1 -1
- package/dist/Input-CU9CNKmo.js +52 -0
- package/dist/{MetricBadge-DmAihkXd.js → MetricBadge-BlrdbOGN.js} +2 -2
- package/dist/{Notification-OqIpADml.js → Notification-DP_ApJLo.js} +3 -3
- package/dist/{NumberFieldContent-DTH9gb_N.js → NumberFieldContent-iOTQ5rGO.js} +9 -5
- package/dist/{PopoverContent-EiklFrna.js → PopoverContent-B8WtJECb.js} +1 -1
- package/dist/Progress-DjM86vfb.js +254 -0
- package/dist/{ScrollingText-BFd0i2zJ.js → ScrollingText-P9o_DuMn.js} +2 -2
- package/dist/{SelectScrollDownButton-Dth8-wXQ.js → SelectScrollDownButton-BGn3rjs9.js} +12 -11
- package/dist/TabsIndicator-DA0x9gPr.js +97 -0
- package/dist/{Toaster-Bjlunvq4.js → Toaster-DdhMKfus.js} +1 -1
- package/dist/{ToggleGroupItem-OesUouE7.js → ToggleGroupItem-gyXj998A.js} +37 -40
- package/dist/UnderlineTabs-Cq_AD03t.js +39 -0
- package/dist/animated-digit.js +3 -3
- package/dist/api/index.d.ts +2 -0
- package/dist/api.js +1 -1
- package/dist/aurora.js +471 -320
- package/dist/badge.js +1 -1
- package/dist/{button-C0aHmBbt.js → button-Ckn3eDfB.js} +27 -22
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel.js +6 -6
- package/dist/{check-dwgetki8.js → check-CdkxGxXJ.js} +1 -1
- package/dist/{chevron-down-DILQA1t6.js → chevron-down-pBY8sYfV.js} +1 -1
- package/dist/{chevron-right-fS7fal2t.js → chevron-right-BjeKC22V.js} +1 -1
- package/dist/{chevron-up-BtYjYQOS.js → chevron-up-DBeNHUm1.js} +1 -1
- package/dist/collapsible.js +1 -1
- package/dist/color-rkK4RMx2.js +33 -0
- package/dist/color.d.ts +1 -0
- package/dist/color.js +2 -0
- package/dist/command.js +1 -1
- package/dist/compile-DVgAxagk.js +106 -0
- package/dist/components/custom/animated-digit/AnimatedDigit.vue.d.ts +7 -7
- package/dist/components/custom/aurora/Aurora.vue.d.ts +3 -3
- package/dist/components/custom/aurora/composables/color.d.ts +42 -16
- package/dist/components/custom/aurora/composables/cursorModel.d.ts +45 -0
- package/dist/components/custom/aurora/composables/frameLoop.d.ts +30 -0
- package/dist/components/custom/aurora/composables/glSetup.d.ts +29 -0
- package/dist/components/custom/aurora/composables/runtime.d.ts +45 -35
- package/dist/components/custom/aurora/composables/uniformBridge.d.ts +67 -0
- package/dist/components/custom/aurora/composables/useAurora.d.ts +14 -1
- package/dist/components/custom/aurora/composables/useCursorInteraction.d.ts +1 -1
- package/dist/components/custom/aurora/constants/budget.d.ts +50 -0
- package/dist/components/custom/aurora/{presets.d.ts → constants/presets.d.ts} +3 -6
- package/dist/components/custom/aurora/constants/shaders/aurora.frag.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/brush.glsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/composition.glsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/flow.glsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/mediums.glsl.d.ts +2 -0
- package/dist/components/custom/aurora/constants/shaders/tonemap.glsl.d.ts +1 -0
- package/dist/components/custom/aurora/index.d.ts +4 -3
- package/dist/components/custom/configurator/Configurator.vue.d.ts +26 -0
- package/dist/components/custom/configurator/ConfiguratorLayer.vue.d.ts +14 -7
- package/dist/components/custom/configurator/density.d.ts +3 -8
- package/dist/components/custom/configurator/index.d.ts +1 -1
- package/dist/components/custom/dock/DockBackgroundToggle.vue.d.ts +46 -0
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +15 -4
- package/dist/components/custom/dock/DockLayerGroup.vue.d.ts +2 -2
- package/dist/components/custom/dock/GlassDock.vue.d.ts +34 -13
- package/dist/components/custom/dock/composables/dockContext.d.ts +4 -4
- package/dist/components/custom/dock/composables/dockLayerContext.d.ts +13 -6
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +32 -8
- package/dist/components/custom/dock/index.d.ts +1 -0
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +10 -0
- package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +1 -1
- package/dist/components/custom/glyph-face/keys.d.ts +3 -29
- package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +48 -0
- package/dist/components/custom/goo-blob/composables/easing.d.ts +6 -0
- package/dist/components/custom/goo-blob/composables/useBlobMood.d.ts +14 -0
- package/dist/components/custom/goo-blob/composables/useBlobPointer.d.ts +18 -0
- package/dist/components/custom/goo-blob/composables/useBlobSatellites.d.ts +13 -0
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +42 -0
- package/dist/components/custom/goo-blob/index.d.ts +7 -0
- package/dist/components/custom/goo-blob/shaders/metaball.frag.d.ts +1 -0
- package/dist/components/custom/goo-blob/shaders/metaball.vert.d.ts +1 -0
- package/dist/components/custom/goo-blob/shaders/oklch-perturb.glsl.d.ts +1 -0
- package/dist/components/custom/goo-blob/shaders/sdf-body.glsl.d.ts +1 -0
- package/dist/components/custom/goo-blob/shaders/watercolor-edges.glsl.d.ts +2 -0
- package/dist/components/custom/goo-blob/types.d.ts +77 -0
- package/dist/components/custom/hover-popover/HoverPopover.vue.d.ts +48 -9
- package/dist/components/custom/labeled-field/LabeledField.vue.d.ts +2 -0
- package/dist/components/custom/labeled-field/LabeledSelect.vue.d.ts +2 -2
- package/dist/components/custom/metric-stack/MetricRow.vue.d.ts +2 -2
- package/dist/components/custom/responsive-tabs/ResponsiveTabs.vue.d.ts +13 -7
- package/dist/components/custom/search/FuzzySearch.vue.d.ts +1 -1
- package/dist/components/custom/search/SearchBar.vue.d.ts +1 -1
- package/dist/components/custom/sortable-list/SortableHandle.vue.d.ts +7 -1
- package/dist/components/custom/sortable-list/context.d.ts +2 -3
- package/dist/components/custom/tabs/BouncyTabs.vue.d.ts +6 -3
- package/dist/components/custom/tabs/BouncyToggle.vue.d.ts +7 -3
- package/dist/components/custom/tabs/UnderlineTabs.vue.d.ts +6 -3
- package/dist/components/custom/tabs/composables/useBouncySlider.d.ts +39 -0
- package/dist/components/custom/timeline/ContinuousMarkers.vue.d.ts +49 -0
- package/dist/components/custom/timeline/ContinuousRail.vue.d.ts +26 -0
- package/dist/components/custom/timeline/ContinuousTimeline.vue.d.ts +4 -4
- package/dist/components/custom/typewriter/TypewriterText.vue.d.ts +2 -2
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +45 -0
- package/dist/components/custom/watercolor-dot/index.d.ts +3 -0
- package/dist/components/custom/watercolor-dot/prng.d.ts +5 -0
- package/dist/components/custom/watercolor-dot/useWatercolorBlob.d.ts +24 -0
- package/dist/components/ui/_shared/menuItemVariants.d.ts +1 -1
- package/dist/components/ui/avatar/Avatar.vue.d.ts +1 -1
- package/dist/components/ui/avatar/AvatarImage.vue.d.ts +5 -1
- package/dist/components/ui/avatar/index.d.ts +1 -1
- package/dist/components/ui/badge/index.d.ts +2 -2
- package/dist/components/ui/button/Button.vue.d.ts +3 -1
- package/dist/components/ui/button/index.d.ts +2 -2
- package/dist/components/ui/carousel/CarouselNext.vue.d.ts +2 -2
- package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +2 -2
- package/dist/components/ui/combobox/Combobox.vue.d.ts +2 -2
- package/dist/components/ui/combobox/ComboboxInput.vue.d.ts +2 -1
- package/dist/components/ui/command/Command.vue.d.ts +3 -3
- package/dist/components/ui/command/CommandInput.vue.d.ts +2 -1
- package/dist/components/ui/data-table/DataTable.vue.d.ts +5 -4
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +8 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts +4 -4
- package/dist/components/ui/input/Input.vue.d.ts +19 -1
- package/dist/components/ui/multi-select/MultiSelect.vue.d.ts +8 -4
- package/dist/components/ui/progress/Progress.vue.d.ts +26 -88
- package/dist/components/ui/progress/ProgressDefault.vue.d.ts +14 -0
- package/dist/components/ui/progress/ProgressGradient.vue.d.ts +25 -0
- package/dist/components/ui/progress/ProgressSectioned.vue.d.ts +36 -0
- package/dist/components/ui/progress/index.d.ts +5 -2
- package/dist/components/ui/progress/useProgressGeometry.d.ts +60 -0
- package/dist/components/ui/select/Select.vue.d.ts +2 -2
- package/dist/components/ui/select/SelectContent.vue.d.ts +1 -1
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +3 -0
- package/dist/components/ui/sheet/index.d.ts +1 -1
- package/dist/components/ui/slider/index.d.ts +12 -11
- package/dist/components/ui/tags-input/TagsInput.vue.d.ts +2 -2
- package/dist/components/ui/textarea/Textarea.vue.d.ts +5 -1
- package/dist/components/ui/toast/Toast.vue.d.ts +4 -4
- 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/toggleGroupContext.d.ts +2 -3
- package/dist/composables/color/index.d.ts +49 -0
- package/dist/composables/context/createContext.d.ts +56 -0
- package/dist/composables/context/index.d.ts +1 -0
- package/dist/composables/dark/darkModeSyncScript.d.ts +23 -0
- package/dist/composables/dark/index.d.ts +3 -0
- package/dist/composables/dark/useGlobalDark.d.ts +19 -2
- package/dist/composables/dom/index.d.ts +1 -3
- package/dist/composables/dom/useClipboard.d.ts +35 -12
- package/dist/composables/dom/useDocumentVisibility.d.ts +20 -0
- package/dist/composables/dom/useTextHighlight.d.ts +40 -0
- package/dist/composables/glass/webgl/compile.d.ts +15 -0
- package/dist/composables/glass/webgl/shaders/procedural-color.glsl.d.ts +3 -0
- package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +55 -0
- package/dist/composables/motion/core/index.d.ts +2 -1
- package/dist/composables/motion/index.d.ts +1 -1
- package/dist/composables/motion/useCountup.d.ts +29 -0
- package/dist/composables/motion/usePrioritizedTask.d.ts +41 -0
- package/dist/composables/motion/vReveal.d.ts +2 -0
- package/dist/composables/sidebar/useSidebarState.d.ts +2 -2
- package/dist/composables/sortable/dragController.d.ts +44 -0
- package/dist/composables/sortable/dropResolver.d.ts +34 -0
- package/dist/composables/sortable/ghostRenderer.d.ts +44 -0
- package/dist/composables/sortable/index.d.ts +1 -1
- package/dist/composables/sortable/touchGate.d.ts +26 -0
- package/dist/composables/sortable/transitionTiming.d.ts +50 -0
- package/dist/composables/sortable/types.d.ts +133 -0
- package/dist/composables/sortable/useSortable.d.ts +25 -140
- package/dist/configurator.js +1 -1
- package/dist/confirm-dialog.js +3 -3
- package/dist/context-menu.js +2 -2
- package/dist/controls.js +5 -5
- package/dist/createContext-DBMGRlx4.js +25 -0
- package/dist/dark.d.ts +2 -1
- package/dist/dark.js +9 -2
- package/dist/data-table.js +1 -1
- package/dist/dialog.js +2 -2
- package/dist/disco-glyph.js +1 -1
- package/dist/dock.js +410 -254
- package/dist/dockContext-spUj_-E5.js +9 -0
- package/dist/dom.js +6 -5
- package/dist/{dropdown-menu-BvRUamNs.js → dropdown-menu-EFjl5iKo.js} +4 -4
- package/dist/dropdown-menu.js +1 -1
- package/dist/expandable-container.js +28 -22
- package/dist/fonts/README.md +21 -0
- package/dist/fonts/fraunces/fraunces-latin.woff2 +0 -0
- package/dist/forms.js +70 -61
- package/dist/glass-carousel.js +59 -52
- package/dist/glass-panel.js +2 -2
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +159 -254
- package/dist/glyph-face.js +2 -2
- package/dist/goo-blob.d.ts +1 -0
- package/dist/goo-blob.js +538 -0
- package/dist/header-ribbon.js +3 -3
- 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 -0
- package/dist/instrument-chassis.js +1 -1
- package/dist/instrument-rail.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/keys-BFoma9vm.js +9 -0
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +57 -39
- package/dist/metric-badge.js +1 -1
- package/dist/metric-stack.js +1 -1
- package/dist/{minimize-2-LsCJ_eNt.js → minimize-2-BP27-qBY.js} +1 -1
- package/dist/motion-core.js +154 -135
- package/dist/motion.js +63 -15
- 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-a-D93K1S.js → presets-1OhFpaIC.js} +5 -5
- package/dist/prng-Bz_1Tydc.js +15 -0
- package/dist/progress.js +2 -2
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +2 -2
- package/dist/responsive-tabs.js +38 -32
- package/dist/scrolling-text.js +1 -1
- package/dist/{search-DBAiUABx.js → search-DBG8qaRs.js} +1 -1
- package/dist/search.js +153 -149
- package/dist/select.js +3 -3
- package/dist/separator.js +1 -1
- package/dist/{sheet-CukNDezz.js → sheet-CQYYrkr9.js} +3 -3
- package/dist/sheet.js +1 -1
- package/dist/{slider-DJvHkTRe.js → slider-BOh8ycfZ.js} +8 -12
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +37 -39
- package/dist/stacked-icons.js +2 -2
- package/dist/styles/animations.css +1 -1
- package/dist/styles/cards.css +1 -1
- package/dist/styles/components.css +45 -0
- package/dist/styles/dock-controls.css +486 -0
- package/dist/styles/dock.css +325 -431
- package/dist/styles/fonts.css +25 -0
- package/dist/styles/glass-specular-track.css +154 -0
- package/dist/styles/glass.css +74 -2
- package/dist/styles/index.css +25 -2
- package/dist/styles/instrument-chassis.css +11 -4
- package/dist/styles/theme.css +73 -21
- package/dist/styles/tokens.css +282 -140
- package/dist/styles/typography.css +14 -8
- package/dist/styles/utilities.css +92 -8
- package/dist/styles/view-transition.css +10 -4
- package/dist/switch.js +1 -1
- package/dist/tabs.js +148 -106
- package/dist/timeline.js +220 -159
- package/dist/toast.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/tokens.d.ts +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{useAnimatedNumber-DKQYVB7s.js → useAnimatedNumber-BF6r64lA.js} +1 -1
- package/dist/useClipboard-D8vFyRCa.js +97 -0
- package/dist/useConfiguratorState-DUtC1jxr.js +276 -0
- package/dist/useGlobalDark-CWiaCoEw.js +34 -0
- package/dist/useIntersectionPause-DAdVPVp4.js +53 -0
- package/dist/useSortable-DnyGXKKY.js +246 -0
- package/dist/useTextHighlight-Dmtofpk2.js +72 -0
- package/dist/{useTouchGate-D9Zvrzyc.js → useTouchGate-CS5Csc2h.js} +1 -1
- package/dist/{useViewTransition-DYIK6Gzb.js → useViewTransition-D4ssvnXZ.js} +5 -3
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/platformSupport.d.ts +8 -0
- package/dist/utils/prng.d.ts +4 -0
- package/dist/vReveal-u2wSG2El.js +35 -0
- package/dist/watercolor-dot.d.ts +1 -0
- package/dist/watercolor-dot.js +129 -0
- package/dist/{x-q7pJa83X.js → x-C4pz9nbD.js} +1 -1
- package/package.json +110 -16
- package/src/fonts/README.md +21 -0
- package/src/fonts/fraunces/fraunces-latin.woff2 +0 -0
- package/src/styles/animations.css +1 -1
- package/src/styles/cards.css +1 -1
- package/src/styles/dock-controls.css +486 -0
- package/src/styles/dock.css +325 -431
- package/src/styles/fonts.css +25 -0
- package/src/styles/glass-specular-track.css +154 -0
- package/src/styles/glass.css +74 -2
- package/src/styles/index.css +21 -2
- package/src/styles/instrument-chassis.css +11 -4
- package/src/styles/theme.css +73 -21
- package/src/styles/tokens.css +282 -140
- package/src/styles/typography.css +14 -8
- package/src/styles/utilities.css +92 -8
- package/src/styles/view-transition.css +10 -4
- package/dist/DataTable-R8-Zidms.js +0 -460
- package/dist/DialogContent-2fALDSvc.js +0 -93
- package/dist/HoverPopover-CWFCfLx3.js +0 -96
- package/dist/Input-DDpFn568.js +0 -30
- package/dist/Progress-FApA9fm_.js +0 -126
- package/dist/UnderlineTabs-DAWMLmJG.js +0 -37
- package/dist/components/custom/aurora/shaders/aurora.frag.d.ts +0 -1
- package/dist/composables/dom/useBreakpoint.d.ts +0 -38
- package/dist/composables/dom/useIdleReady.d.ts +0 -63
- package/dist/composables/dom/useViewportReady.d.ts +0 -87
- package/dist/composables/glass/webgl/frostShader.d.ts +0 -27
- package/dist/composables/motion/useAnimatedNumberMap.d.ts +0 -29
- package/dist/composables/motion/useStagger.d.ts +0 -50
- package/dist/dockContext-D5NZCWJs.js +0 -16
- package/dist/keys-CaTQS-vx.js +0 -11
- package/dist/useConfiguratorState-CtRBE0m_.js +0 -268
- package/dist/useGlobalDark-B0WvLJE3.js +0 -24
- package/dist/useIdleReady-Cmkhm03v.js +0 -162
- package/dist/useIntersectionPause-IY2CwPQb.js +0 -39
- package/dist/useSortable-Cq2Y1JLO.js +0 -175
- /package/dist/{ContextMenuContent-otjFIu8v.js → ContextMenuContent-De01_83g.js} +0 -0
- /package/dist/{HoverCardContent-DaGrgJBO.js → HoverCardContent-ICfIMZX1.js} +0 -0
- /package/dist/{InstrumentChassis-CnHTMxds.js → InstrumentChassis-DaHIZCqy.js} +0 -0
- /package/dist/{InstrumentRail-C6dEbi8E.js → InstrumentRail-B0qqLFN0.js} +0 -0
- /package/dist/{Label-DJty89bp.js → Label-CZk-3nTc.js} +0 -0
- /package/dist/{ModalOverlay-iWiAgbYH.js → ModalOverlay-B_CBtqcE.js} +0 -0
- /package/dist/{PaperBackdrop-CeZ-w0R0.js → PaperBackdrop-D_YZW47j.js} +0 -0
- /package/dist/{SelectGroup-DdR4tdDY.js → SelectGroup-CMdoCjRE.js} +0 -0
- /package/dist/{SelectSeparator-CXm_hlqA.js → SelectSeparator-CaJnPF3_.js} +0 -0
- /package/dist/{Separator-D8AUMhxY.js → Separator-C2XtAXRp.js} +0 -0
- /package/dist/{Switch-Cr1t_F_U.js → Switch-x8n6husW.js} +0 -0
- /package/dist/{TooltipProvider-DE78vbEP.js → TooltipProvider-D-JrSqDu.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-Dq1MygBL.js → _plugin-vue_export-helper-C1je1s0u.js} +0 -0
- /package/dist/{badge-x46my_Fo.js → badge-Cl6JZ1B7.js} +0 -0
- /package/dist/components/custom/aurora/{renderMode.d.ts → constants/renderMode.d.ts} +0 -0
- /package/dist/components/custom/aurora/{shaders → constants/shaders}/aurora.vert.d.ts +0 -0
- /package/dist/{constants-DwBwnG8N.js → constants-DsCdlK9I.js} +0 -0
- /package/dist/{createLucideIcon-Bn9a1b70.js → createLucideIcon-DuDoe_ra.js} +0 -0
- /package/dist/{menuItemVariants-BsbGNq9C.js → menuItemVariants-C2QlXqT3.js} +0 -0
- /package/dist/{useGlassRenderer-Ds-nmrGz.js → useGlassRenderer-Dn3WpfG-.js} +0 -0
- /package/dist/{useInterval-DVgGUf_y.js → useInterval-CHVYFpXV.js} +0 -0
- /package/dist/{useKeyboardShortcuts-Dpw_RUcB.js → useKeyboardShortcuts-BQfnAHHW.js} +0 -0
- /package/dist/{useResizeObserver-Cg9npuM3.js → useResizeObserver-DX-STszm.js} +0 -0
- /package/dist/{useSpringMount-Cfk1XK1R.js → useSpringMount-CnizvZGm.js} +0 -0
- /package/dist/{useTimer-NAaj9zNq.js → useTimer-DGgoxTXL.js} +0 -0
- /package/dist/{useUserInvalidAria-DVu1eTXG.js → useUserInvalidAria-DmvZ_6Dx.js} +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { getCurrentScope as e, onMounted as t, onScopeDispose as n, ref as r, toValue as i, watch as a } from "vue";
|
|
2
|
+
//#region src/composables/dom/useTokenColor.ts
|
|
3
|
+
function o(o, s = {}) {
|
|
4
|
+
let c = s.fallback ?? "", l = r(c);
|
|
5
|
+
function u() {
|
|
6
|
+
if (typeof document > "u") return c;
|
|
7
|
+
let e = i(o);
|
|
8
|
+
if (!e) return c;
|
|
9
|
+
let t = (s.element ? i(s.element) : null) ?? document.documentElement;
|
|
10
|
+
return t && getComputedStyle(t).getPropertyValue(e).trim() || c;
|
|
11
|
+
}
|
|
12
|
+
function d() {
|
|
13
|
+
l.value = u();
|
|
14
|
+
}
|
|
15
|
+
if (d(), t(d), typeof document < "u") {
|
|
16
|
+
let t = new MutationObserver(d);
|
|
17
|
+
t.observe(document.documentElement, {
|
|
18
|
+
attributes: !0,
|
|
19
|
+
attributeFilter: ["class"]
|
|
20
|
+
});
|
|
21
|
+
let r = typeof window < "u" && window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null;
|
|
22
|
+
r?.addEventListener?.("change", d), e() && n(() => {
|
|
23
|
+
t.disconnect(), r?.removeEventListener?.("change", d);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return a(() => i(o), d), s.element !== void 0 && a(() => i(s.element), d), {
|
|
27
|
+
value: l,
|
|
28
|
+
refresh: d
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/composables/dom/useClipboard.ts
|
|
33
|
+
async function s(e) {
|
|
34
|
+
if (typeof navigator > "u" || !navigator.clipboard?.writeText) return {
|
|
35
|
+
ok: !1,
|
|
36
|
+
reason: "no-api"
|
|
37
|
+
};
|
|
38
|
+
try {
|
|
39
|
+
return await navigator.clipboard.writeText(e), { ok: !0 };
|
|
40
|
+
} catch {
|
|
41
|
+
return {
|
|
42
|
+
ok: !1,
|
|
43
|
+
reason: "clipboard-api"
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function c(e) {
|
|
48
|
+
if (typeof document > "u") return {
|
|
49
|
+
ok: !1,
|
|
50
|
+
reason: "no-api"
|
|
51
|
+
};
|
|
52
|
+
let t = document.createElement("textarea");
|
|
53
|
+
t.value = e, t.setAttribute("readonly", ""), t.style.position = "fixed", t.style.top = "-9999px", document.body.appendChild(t), t.select();
|
|
54
|
+
let n = !1;
|
|
55
|
+
try {
|
|
56
|
+
n = document.execCommand("copy");
|
|
57
|
+
} catch {
|
|
58
|
+
n = !1;
|
|
59
|
+
}
|
|
60
|
+
return document.body.removeChild(t), n ? { ok: !0 } : {
|
|
61
|
+
ok: !1,
|
|
62
|
+
reason: "exec-command"
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
async function l(e, t) {
|
|
66
|
+
let n = await s(e);
|
|
67
|
+
if (n.ok) return n;
|
|
68
|
+
let r = c(e);
|
|
69
|
+
if (r.ok) return r;
|
|
70
|
+
let i = r.reason ?? n.reason ?? "no-api";
|
|
71
|
+
return t?.(i), {
|
|
72
|
+
ok: !1,
|
|
73
|
+
reason: i
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
async function u(e, t = {}) {
|
|
77
|
+
let { ok: n } = await l(e, t.onCopyError);
|
|
78
|
+
return n;
|
|
79
|
+
}
|
|
80
|
+
function d(e = {}) {
|
|
81
|
+
let t = e.resetMs ?? 1500, i = r(!1), a = null;
|
|
82
|
+
function o() {
|
|
83
|
+
a != null && (clearTimeout(a), a = null);
|
|
84
|
+
}
|
|
85
|
+
async function s(n) {
|
|
86
|
+
let r = await l(n, e.onCopyError);
|
|
87
|
+
return r.ok && (i.value = !0, o(), a = setTimeout(() => {
|
|
88
|
+
i.value = !1, a = null;
|
|
89
|
+
}, t)), r;
|
|
90
|
+
}
|
|
91
|
+
return n(o), {
|
|
92
|
+
copied: i,
|
|
93
|
+
copy: s
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
export { d as n, o as r, u as t };
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { t as e } from "./cn-DJXf4yaB.js";
|
|
2
|
+
import { t } from "./createLucideIcon-DuDoe_ra.js";
|
|
3
|
+
import { t as n } from "./chevron-down-pBY8sYfV.js";
|
|
4
|
+
import { t as r } from "./_plugin-vue_export-helper-C1je1s0u.js";
|
|
5
|
+
import { t as i } from "./createContext-DBMGRlx4.js";
|
|
6
|
+
import { t as a } from "./Label-CZk-3nTc.js";
|
|
7
|
+
import { Fragment as o, computed as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, mergeModels as m, normalizeClass as h, normalizeStyle as g, openBlock as _, reactive as v, ref as y, renderList as b, renderSlot as x, toDisplayString as S, toRaw as C, unref as w, useId as T, useModel as E, withCtx as D } from "vue";
|
|
8
|
+
var O = t("rotate-ccw", [["path", {
|
|
9
|
+
d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
|
|
10
|
+
key: "1357e3"
|
|
11
|
+
}], ["path", {
|
|
12
|
+
d: "M3 3v5h5",
|
|
13
|
+
key: "1xhq8a"
|
|
14
|
+
}]]), k = i("configuratorDensity"), A = k.KEY;
|
|
15
|
+
function j(e) {
|
|
16
|
+
k.provide(e);
|
|
17
|
+
}
|
|
18
|
+
var M = k.use, N = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "configurator-presets shrink-0 border-b border-border/40 px-3 py-2"
|
|
21
|
+
}, P = {
|
|
22
|
+
class: "flex gap-2 overflow-x-auto scroll-fade-mask scrollbar-hidden",
|
|
23
|
+
role: "tablist",
|
|
24
|
+
"aria-label": "Presets"
|
|
25
|
+
}, F = ["aria-selected", "onClick"], I = { class: "flex flex-col" }, L = {
|
|
26
|
+
key: 1,
|
|
27
|
+
class: "configurator-footer shrink-0 border-t border-border/40 px-3 py-2"
|
|
28
|
+
}, R = /* @__PURE__ */ p({
|
|
29
|
+
__name: "Configurator",
|
|
30
|
+
props: {
|
|
31
|
+
presets: {},
|
|
32
|
+
activePreset: {},
|
|
33
|
+
layers: {},
|
|
34
|
+
activeLayer: {},
|
|
35
|
+
scrollMode: { default: "auto" },
|
|
36
|
+
density: { default: "comfortable" },
|
|
37
|
+
asideSide: { default: "right" },
|
|
38
|
+
asideWidth: {},
|
|
39
|
+
class: { type: [
|
|
40
|
+
Boolean,
|
|
41
|
+
null,
|
|
42
|
+
String,
|
|
43
|
+
Object,
|
|
44
|
+
Array
|
|
45
|
+
] }
|
|
46
|
+
},
|
|
47
|
+
emits: [
|
|
48
|
+
"select-preset",
|
|
49
|
+
"select-layer",
|
|
50
|
+
"reset"
|
|
51
|
+
],
|
|
52
|
+
setup(t, { emit: n }) {
|
|
53
|
+
let r = t;
|
|
54
|
+
j(s(() => r.density));
|
|
55
|
+
let i = n, a = s(() => e("configurator glass-floating rounded-panel border border-border/60 overflow-hidden", "grid grid-cols-1", "lg:grid-cols-[minmax(0,1fr)_minmax(var(--configurator-aside-min,280px),var(--configurator-aside-max,360px))]", "min-h-0", r.class)), d = s(() => {
|
|
56
|
+
if (r.asideWidth == null) return;
|
|
57
|
+
let [e, t] = Array.isArray(r.asideWidth) ? r.asideWidth : [r.asideWidth, r.asideWidth];
|
|
58
|
+
return {
|
|
59
|
+
"--configurator-aside-min": e,
|
|
60
|
+
"--configurator-aside-max": t
|
|
61
|
+
};
|
|
62
|
+
}), f = s(() => r.asideSide === "left" ? "lg:col-start-2" : ""), p = s(() => r.asideSide === "left" ? "lg:col-start-1 lg:row-start-1" : ""), m = s(() => r.asideSide === "left" ? "lg:border-r lg:border-l-0" : "lg:border-l"), v = s(() => {
|
|
63
|
+
switch (r.scrollMode) {
|
|
64
|
+
case "always": return "overflow-y-auto scroll-fade-y scrollbar-thin";
|
|
65
|
+
case "never": return "overflow-visible";
|
|
66
|
+
default: return "overflow-y-auto scroll-fade-y scrollbar-thin";
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
return (n, r) => (_(), l("section", {
|
|
70
|
+
class: h(a.value),
|
|
71
|
+
style: g(d.value)
|
|
72
|
+
}, [u("div", { class: h(w(e)("configurator-stage relative min-h-0 min-w-0 overflow-hidden", f.value)) }, [x(n.$slots, "stage")], 2), u("aside", { class: h(w(e)("configurator-aside flex min-h-0 min-w-0 flex-col border-t border-border/40 lg:border-t-0", m.value, p.value)) }, [
|
|
73
|
+
n.$slots.presets || t.presets && t.presets.length > 0 ? (_(), l("div", N, [x(n.$slots, "presets", {
|
|
74
|
+
presets: t.presets,
|
|
75
|
+
activePreset: t.activePreset
|
|
76
|
+
}, () => [u("div", P, [(_(!0), l(o, null, b(t.presets, (n) => (_(), l("button", {
|
|
77
|
+
key: n.key,
|
|
78
|
+
type: "button",
|
|
79
|
+
role: "tab",
|
|
80
|
+
"aria-selected": n.key === t.activePreset,
|
|
81
|
+
class: h(w(e)("focus-ring shrink-0 rounded-pill border px-3 py-1 text-xs font-medium transition-colors", n.key === t.activePreset ? "border-foreground/40 bg-foreground text-background" : "border-border/40 bg-card/40 text-foreground hover:bg-card/70")),
|
|
82
|
+
onClick: (e) => i("select-preset", n.key)
|
|
83
|
+
}, S(n.label), 11, F))), 128))])])])) : c("", !0),
|
|
84
|
+
u("div", { class: h(w(e)("configurator-controls flex-1 min-h-0", v.value)) }, [x(n.$slots, "controls", {
|
|
85
|
+
layers: t.layers,
|
|
86
|
+
activeLayer: t.activeLayer,
|
|
87
|
+
selectLayer: (e) => i("select-layer", e)
|
|
88
|
+
}, () => [u("div", I, [x(n.$slots, "default")])])], 2),
|
|
89
|
+
n.$slots.footer ? (_(), l("div", L, [x(n.$slots, "footer", { reset: () => i("reset") })])) : c("", !0)
|
|
90
|
+
], 2)], 6));
|
|
91
|
+
}
|
|
92
|
+
}), z = ["data-state"], B = [
|
|
93
|
+
"aria-expanded",
|
|
94
|
+
"aria-controls",
|
|
95
|
+
"data-state"
|
|
96
|
+
], V = { class: "flex min-w-0 items-baseline gap-2" }, H = { class: "text-small font-semibold text-foreground" }, U = {
|
|
97
|
+
key: 0,
|
|
98
|
+
class: "truncate text-micro font-mono text-muted-foreground/70"
|
|
99
|
+
}, W = [
|
|
100
|
+
"id",
|
|
101
|
+
"aria-hidden",
|
|
102
|
+
"inert",
|
|
103
|
+
"data-state"
|
|
104
|
+
], G = { class: "min-h-0 overflow-hidden" }, K = /* @__PURE__ */ p({
|
|
105
|
+
__name: "ConfiguratorLayer",
|
|
106
|
+
props: /* @__PURE__ */ m({
|
|
107
|
+
label: {},
|
|
108
|
+
sub: {},
|
|
109
|
+
id: {},
|
|
110
|
+
defaultOpen: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: !0
|
|
113
|
+
},
|
|
114
|
+
dividers: { type: Boolean },
|
|
115
|
+
class: { type: [
|
|
116
|
+
Boolean,
|
|
117
|
+
null,
|
|
118
|
+
String,
|
|
119
|
+
Object,
|
|
120
|
+
Array
|
|
121
|
+
] },
|
|
122
|
+
bodyClass: { type: [
|
|
123
|
+
Boolean,
|
|
124
|
+
null,
|
|
125
|
+
String,
|
|
126
|
+
Object,
|
|
127
|
+
Array
|
|
128
|
+
] }
|
|
129
|
+
}, {
|
|
130
|
+
open: {
|
|
131
|
+
type: Boolean,
|
|
132
|
+
default: void 0
|
|
133
|
+
},
|
|
134
|
+
openModifiers: {}
|
|
135
|
+
}),
|
|
136
|
+
emits: ["update:open"],
|
|
137
|
+
setup(t) {
|
|
138
|
+
let r = t, i = E(t, "open");
|
|
139
|
+
i.value === void 0 && (i.value = r.defaultOpen);
|
|
140
|
+
let a = `configurator-layer-body-${T()}`, o = s(() => r.id ?? a);
|
|
141
|
+
function d() {
|
|
142
|
+
i.value = !i.value;
|
|
143
|
+
}
|
|
144
|
+
let p = s(() => i.value ? "open" : "closed");
|
|
145
|
+
return (a, s) => (_(), l("div", {
|
|
146
|
+
class: h(w(e)("configurator-layer border-b border-border/40 last:border-b-0", r.class)),
|
|
147
|
+
"data-state": p.value
|
|
148
|
+
}, [u("button", {
|
|
149
|
+
type: "button",
|
|
150
|
+
class: h(w(e)("configurator-layer-trigger", "group flex w-full items-center justify-between gap-2 px-3 py-2", "text-left transition-colors hover:bg-foreground/5 focus-ring")),
|
|
151
|
+
"aria-expanded": i.value,
|
|
152
|
+
"aria-controls": o.value,
|
|
153
|
+
"data-state": p.value,
|
|
154
|
+
onClick: d
|
|
155
|
+
}, [u("div", V, [u("span", H, S(t.label), 1), t.sub ? (_(), l("span", U, S(t.sub), 1)) : c("", !0)]), f(w(n), {
|
|
156
|
+
class: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200 group-data-[state=open]:rotate-180",
|
|
157
|
+
"aria-hidden": "true"
|
|
158
|
+
})], 10, B), u("div", {
|
|
159
|
+
id: o.value,
|
|
160
|
+
role: "region",
|
|
161
|
+
"aria-hidden": !i.value,
|
|
162
|
+
inert: !i.value || void 0,
|
|
163
|
+
"data-state": p.value,
|
|
164
|
+
class: "configurator-layer-region grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",
|
|
165
|
+
style: g({ gridTemplateRows: i.value ? "1fr" : "0fr" })
|
|
166
|
+
}, [u("div", G, [u("div", { class: h(w(e)("configurator-layer-body px-3 py-2 space-y-2", r.dividers && "[&>*+*]:border-t [&>*+*]:border-border/30 [&>*+*]:pt-2", r.bodyClass)) }, [x(a.$slots, "default")], 2)])], 12, W)], 10, z));
|
|
167
|
+
}
|
|
168
|
+
}), q = ["data-density"], J = { class: "flex items-baseline justify-between gap-3" }, Y = { class: "flex min-w-0 items-baseline gap-2" }, X = {
|
|
169
|
+
key: 0,
|
|
170
|
+
class: "truncate text-micro font-mono text-muted-foreground/70"
|
|
171
|
+
}, Z = ["aria-label"], Q = { class: "flex items-center" }, $ = {
|
|
172
|
+
key: 0,
|
|
173
|
+
class: "text-micro leading-snug text-muted-foreground/80"
|
|
174
|
+
}, ee = /* @__PURE__ */ r(/* @__PURE__ */ p({
|
|
175
|
+
__name: "ConfiguratorRow",
|
|
176
|
+
props: {
|
|
177
|
+
label: {},
|
|
178
|
+
name: {},
|
|
179
|
+
description: {},
|
|
180
|
+
canReset: { type: Boolean },
|
|
181
|
+
density: {},
|
|
182
|
+
class: { type: [
|
|
183
|
+
Boolean,
|
|
184
|
+
null,
|
|
185
|
+
String,
|
|
186
|
+
Object,
|
|
187
|
+
Array
|
|
188
|
+
] }
|
|
189
|
+
},
|
|
190
|
+
emits: ["reset"],
|
|
191
|
+
setup(t, { emit: n }) {
|
|
192
|
+
let r = t, i = n, o = M(), p = s(() => r.density ?? o?.value ?? void 0);
|
|
193
|
+
return (n, o) => (_(), l("div", {
|
|
194
|
+
class: h(w(e)("configurator-row flex flex-col gap-1.5 py-2", r.class)),
|
|
195
|
+
"data-density": p.value
|
|
196
|
+
}, [
|
|
197
|
+
u("div", J, [u("div", Y, [f(w(a), { class: "truncate text-small font-medium text-foreground" }, {
|
|
198
|
+
default: D(() => [d(S(t.label), 1)]),
|
|
199
|
+
_: 1
|
|
200
|
+
}), t.name ? (_(), l("span", X, S(t.name), 1)) : c("", !0)]), t.canReset ? (_(), l("button", {
|
|
201
|
+
key: 0,
|
|
202
|
+
type: "button",
|
|
203
|
+
class: "focus-ring inline-flex h-6 w-6 items-center justify-center rounded-pill text-muted-foreground/60 transition-colors hover:bg-foreground/5 hover:text-foreground active:scale-[var(--scale-press,0.97)]",
|
|
204
|
+
"aria-label": `Reset ${t.label}`,
|
|
205
|
+
onClick: o[0] ||= (e) => i("reset")
|
|
206
|
+
}, [f(w(O), {
|
|
207
|
+
class: "h-3 w-3",
|
|
208
|
+
"aria-hidden": "true"
|
|
209
|
+
})], 8, Z)) : c("", !0)]),
|
|
210
|
+
u("div", Q, [x(n.$slots, "default", {}, void 0, !0)]),
|
|
211
|
+
t.description ? (_(), l("p", $, S(t.description), 1)) : c("", !0)
|
|
212
|
+
], 10, q));
|
|
213
|
+
}
|
|
214
|
+
}), [["__scopeId", "data-v-1b71284c"]]);
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region src/components/custom/configurator/useConfiguratorState.ts
|
|
217
|
+
function te(e) {
|
|
218
|
+
let t = C(e);
|
|
219
|
+
if (typeof structuredClone != "function") throw Error("[glass-ui:configurator] structuredClone is unavailable in this runtime. Pass a custom clone via ConfiguratorStateOptions.clone for environments without structured-clone support.");
|
|
220
|
+
try {
|
|
221
|
+
return structuredClone(t);
|
|
222
|
+
} catch (e) {
|
|
223
|
+
throw Error("[glass-ui:configurator] structuredClone failed: " + (e instanceof Error ? e.message : String(e)) + ". Preset values must be structured-cloneable (no functions, symbols, DOM nodes, or class instances). Pass a custom clone via ConfiguratorStateOptions.clone if the data shape requires it.");
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
function ne(e, t) {
|
|
227
|
+
return JSON.stringify(e) === JSON.stringify(t);
|
|
228
|
+
}
|
|
229
|
+
function re(e) {
|
|
230
|
+
let t = e.clone ?? te, n = e.equals ?? ne, r = e.presets, i = e.cloneMode ?? "commit-on-write", a = e.initialPreset ?? (r.length > 0 ? r[0].key : void 0), o = a ? r.find((e) => e.key === a) : void 0, c = v(o ? t(o.config) : {}), l = y(a), u = i === "per-preset" ? Object.fromEntries(r.map((e) => [e.key, t(e.config)])) : null, d = s(() => l.value), f = s(() => {
|
|
231
|
+
let e = l.value;
|
|
232
|
+
if (!e) return !1;
|
|
233
|
+
let t = r.find((t) => t.key === e);
|
|
234
|
+
return t ? !n(c, t.config) : !1;
|
|
235
|
+
});
|
|
236
|
+
function p(e) {
|
|
237
|
+
return r.find((t) => t.key === e);
|
|
238
|
+
}
|
|
239
|
+
function m(e) {
|
|
240
|
+
let t = c, n = e;
|
|
241
|
+
for (let e of Object.keys(t)) e in n || delete t[e];
|
|
242
|
+
for (let e of Object.keys(n)) t[e] = n[e];
|
|
243
|
+
}
|
|
244
|
+
function h(e) {
|
|
245
|
+
u && (u[e] = t(c));
|
|
246
|
+
}
|
|
247
|
+
function g(e) {
|
|
248
|
+
let n = p(e);
|
|
249
|
+
if (n) if (i === "per-preset" && u) {
|
|
250
|
+
let t = l.value;
|
|
251
|
+
t && t !== e && t in u && h(t), l.value = e, m(u[e]);
|
|
252
|
+
} else l.value = e, m(t(n.config));
|
|
253
|
+
}
|
|
254
|
+
function _() {
|
|
255
|
+
let e = l.value;
|
|
256
|
+
if (!e) return;
|
|
257
|
+
let n = p(e);
|
|
258
|
+
n && (i === "per-preset" && u ? (u[e] = t(n.config), m(u[e])) : m(t(n.config)));
|
|
259
|
+
}
|
|
260
|
+
function b(e = 1) {
|
|
261
|
+
if (r.length === 0) return;
|
|
262
|
+
let t = l.value, n = t ? r.findIndex((e) => e.key === t) : -1, i = r.length, a = r[(n + e + i) % i];
|
|
263
|
+
g(a.key);
|
|
264
|
+
}
|
|
265
|
+
return {
|
|
266
|
+
config: c,
|
|
267
|
+
activePreset: d,
|
|
268
|
+
isDirty: f,
|
|
269
|
+
selectPreset: g,
|
|
270
|
+
resetCurrent: _,
|
|
271
|
+
cyclePreset: b,
|
|
272
|
+
getPreset: p
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
//#endregion
|
|
276
|
+
export { A as a, R as i, ee as n, j as o, K as r, M as s, re as t };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ref as e, watch as t } from "vue";
|
|
2
|
+
import { createGlobalState as n, useDark as r, useToggle as i } from "@vueuse/core";
|
|
3
|
+
//#region src/composables/dark/useGlobalDark.ts
|
|
4
|
+
var a, o = n(() => {
|
|
5
|
+
let n = r({
|
|
6
|
+
initialValue: a,
|
|
7
|
+
disableTransition: !1
|
|
8
|
+
}), o = i(n), s = e(!1);
|
|
9
|
+
function c() {
|
|
10
|
+
s.value && (document.documentElement.classList.add("no-transition"), document.documentElement.offsetHeight), o(), s.value && requestAnimationFrame(() => {
|
|
11
|
+
document.documentElement.classList.remove("no-transition");
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function l(e) {
|
|
15
|
+
s.value = e;
|
|
16
|
+
}
|
|
17
|
+
return t(n, (e) => {
|
|
18
|
+
document.documentElement.style.colorScheme = e ? "dark" : "light";
|
|
19
|
+
}, { immediate: !0 }), {
|
|
20
|
+
isDark: n,
|
|
21
|
+
toggleDark: c,
|
|
22
|
+
disableTransitions: s,
|
|
23
|
+
setDisableTransitions: l
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
function s(e) {
|
|
27
|
+
if (e?.initialValue !== void 0) {
|
|
28
|
+
if (a === void 0) a = e.initialValue;
|
|
29
|
+
else if (a !== e.initialValue) throw Error(`[glass-ui] useGlobalDark({ initialValue: "${e.initialValue}" }) conflicts: the singleton was already constructed with initialValue "${a}". The seed is ONE-SHOT — set it on the FIRST useGlobalDark() call only.`);
|
|
30
|
+
}
|
|
31
|
+
return o();
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { s as t };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { getCurrentScope as e, onScopeDispose as t, readonly as n, ref as r, toValue as i, watch as a } from "vue";
|
|
2
|
+
//#region src/composables/dom/useDocumentVisibility.ts
|
|
3
|
+
function o() {
|
|
4
|
+
return typeof document > "u" ? null : document;
|
|
5
|
+
}
|
|
6
|
+
function s() {
|
|
7
|
+
let n = o(), i = r(!!n?.hidden);
|
|
8
|
+
if (!n) return { hidden: i };
|
|
9
|
+
let a = () => {
|
|
10
|
+
i.value = !!n.hidden;
|
|
11
|
+
};
|
|
12
|
+
return n.addEventListener("visibilitychange", a), e() && t(() => {
|
|
13
|
+
n.removeEventListener("visibilitychange", a);
|
|
14
|
+
}), { hidden: i };
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/composables/motion/useIntersectionPause.ts
|
|
18
|
+
function c(o, c, l = {}) {
|
|
19
|
+
let { root: u = null, rootMargin: d = "0px", threshold: f = 0, pauseWhenHidden: p = !0 } = l, m = r(!0), h = r(!0), g = r(!1), _ = !1, v = null, y = null, b = null;
|
|
20
|
+
function x() {
|
|
21
|
+
if (_) return;
|
|
22
|
+
let e = !m.value || !h.value;
|
|
23
|
+
g.value = e, y !== e && (y = e, e ? c.pause() : c.resume());
|
|
24
|
+
}
|
|
25
|
+
typeof IntersectionObserver < "u" && (b = new IntersectionObserver((e) => {
|
|
26
|
+
for (let t of e) t.target === v && (m.value = t.isIntersecting || t.intersectionRatio > 0, x());
|
|
27
|
+
}, {
|
|
28
|
+
root: u,
|
|
29
|
+
rootMargin: d,
|
|
30
|
+
threshold: f
|
|
31
|
+
}));
|
|
32
|
+
let S = a(() => i(o), (e, t) => {
|
|
33
|
+
t && b && b.unobserve(t), v = e ?? null, m.value = !0, v && b && b.observe(v), x();
|
|
34
|
+
}, { immediate: !0 });
|
|
35
|
+
if (p) {
|
|
36
|
+
let { hidden: e } = s();
|
|
37
|
+
h.value = !e.value, a(e, (e) => {
|
|
38
|
+
h.value = !e, x();
|
|
39
|
+
}, { flush: "sync" });
|
|
40
|
+
}
|
|
41
|
+
function C() {
|
|
42
|
+
_ || (_ = !0, S(), b?.disconnect(), b = null, v = null);
|
|
43
|
+
}
|
|
44
|
+
return e() && t(C), {
|
|
45
|
+
isIntersecting: n(m),
|
|
46
|
+
isDocumentVisible: n(h),
|
|
47
|
+
isPaused: n(g),
|
|
48
|
+
refresh: x,
|
|
49
|
+
dispose: C
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { s as n, c as t };
|