@mkbabb/glass-ui 3.2.0 → 3.4.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-3-VGho1J.js → CardFooter-C390imy7.js} +2 -2
- package/dist/{CollapsibleContent-wlmlDujU.js → CollapsibleContent-cauTbZEM.js} +1 -1
- package/dist/{CommandShortcut-C6lsz3pG.js → CommandShortcut-BiVyqipe.js} +5 -4
- package/dist/DataTable-FfkaAg2z.js +465 -0
- package/dist/DialogContent-IQ8_BRrC.js +100 -0
- package/dist/{DiscoGlyph-B7YooI2-.js → DiscoGlyph-BaZ8OawK.js} +1 -1
- package/dist/{GlyphFace-Bvk6OIas.js → GlyphFace-B_7vOmYn.js} +1 -1
- package/dist/HoverPopover-DTSYkJtw.js +96 -0
- package/dist/{IconTooltip-DXveGjx7.js → IconTooltip-BTyYn4mr.js} +1 -1
- package/dist/Input-CU9CNKmo.js +52 -0
- package/dist/{MetricBadge-J_GBCb8e.js → MetricBadge-BlrdbOGN.js} +1 -1
- package/dist/{NumberFieldContent-B6L6YrQz.js → NumberFieldContent-iOTQ5rGO.js} +8 -4
- package/dist/{PopoverContent-CxEEUL7Y.js → PopoverContent-B8WtJECb.js} +1 -1
- package/dist/Progress-DjM86vfb.js +254 -0
- package/dist/{ScrollingText-1Qjnwz6H.js → ScrollingText-P9o_DuMn.js} +1 -1
- package/dist/{SelectScrollDownButton-BvvvAbuh.js → SelectScrollDownButton-BGn3rjs9.js} +9 -8
- package/dist/TabsIndicator-DA0x9gPr.js +97 -0
- package/dist/{ToggleGroupItem-Cy7xHFEo.js → ToggleGroupItem-gyXj998A.js} +37 -40
- package/dist/UnderlineTabs-Cq_AD03t.js +39 -0
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +2 -0
- package/dist/api.js +1 -1
- package/dist/aurora.js +454 -271
- package/dist/{button-DS3ULf5i.js → button-Ckn3eDfB.js} +27 -22
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel.js +2 -2
- 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 +3 -25
- 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} +2 -5
- 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 +2 -2
- 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/dock/DockBackgroundToggle.vue.d.ts +46 -0
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +3 -3
- package/dist/components/custom/dock/DockLayerGroup.vue.d.ts +2 -2
- package/dist/components/custom/dock/GlassDock.vue.d.ts +22 -18
- 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 +0 -3
- package/dist/composables/dom/useClipboard.d.ts +35 -12
- package/dist/composables/dom/useDocumentVisibility.d.ts +20 -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 +1 -1
- package/dist/composables/motion/index.d.ts +1 -1
- package/dist/composables/motion/useCountup.d.ts +29 -0
- package/dist/composables/motion/useNumericTransition.d.ts +14 -3
- 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 -153
- package/dist/configurator.js +1 -1
- package/dist/confirm-dialog.js +1 -1
- package/dist/controls.js +4 -4
- 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 +1 -1
- package/dist/disco-glyph.js +1 -1
- package/dist/dock.js +400 -261
- package/dist/dockContext-spUj_-E5.js +9 -0
- package/dist/dom.js +6 -6
- package/dist/{dropdown-menu-naE0skDg.js → dropdown-menu-EFjl5iKo.js} +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/expandable-container.js +26 -20
- package/dist/fonts/README.md +21 -0
- package/dist/fonts/fraunces/fraunces-latin.woff2 +0 -0
- package/dist/forms.js +68 -59
- package/dist/glass-panel.js +1 -1
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +226 -328
- 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 +2 -2
- 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/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/motion-core.js +82 -123
- package/dist/motion.js +62 -14
- package/dist/number-field.js +1 -1
- package/dist/paper-backdrop.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/{presets-BpTf63Hp.js → presets-1OhFpaIC.js} +1 -1
- package/dist/prng-Bz_1Tydc.js +15 -0
- package/dist/progress.js +2 -2
- package/dist/reactive.js +2 -2
- package/dist/responsive-tabs.js +38 -32
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +8 -8
- package/dist/select.js +3 -3
- package/dist/separator.js +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-wx8ifVFB.js → slider-BOh8ycfZ.js} +7 -11
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +36 -38
- 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 +1 -1
- package/dist/styles/dock-controls.css +486 -0
- package/dist/styles/dock.css +284 -450
- 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 +21 -2
- package/dist/styles/instrument-chassis.css +11 -4
- package/dist/styles/theme.css +73 -21
- package/dist/styles/tokens.css +271 -140
- package/dist/styles/typography.css +14 -8
- package/dist/styles/utilities.css +36 -8
- package/dist/styles/view-transition.css +10 -4
- package/dist/switch.js +1 -1
- package/dist/tabs.js +139 -112
- package/dist/timeline.js +219 -158
- 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/{useAnimatedNumber-BOxrS3a6.js → useAnimatedNumber-BF6r64lA.js} +1 -1
- package/dist/useClipboard-D8vFyRCa.js +97 -0
- package/dist/{useConfiguratorState-Dq2gNv4A.js → useConfiguratorState-DUtC1jxr.js} +82 -86
- package/dist/useGlobalDark-CWiaCoEw.js +34 -0
- package/dist/useIntersectionPause-DAdVPVp4.js +53 -0
- package/dist/useSortable-DnyGXKKY.js +246 -0
- package/dist/{useTouchGate-XX8gHfay.js → useTouchGate-CS5Csc2h.js} +1 -1
- 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/package.json +101 -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 +284 -450
- 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 +271 -140
- package/src/styles/typography.css +14 -8
- package/src/styles/utilities.css +36 -8
- package/src/styles/view-transition.css +10 -4
- package/dist/DataTable-BsrDYdoE.js +0 -460
- package/dist/DialogContent-B61rP8lj.js +0 -93
- package/dist/HoverPopover-BlEwqG7S.js +0 -96
- package/dist/Input-IFsIzId2.js +0 -30
- package/dist/Progress-Bs44qWEM.js +0 -126
- package/dist/UnderlineTabs-B4FV2zi_.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-DM58L1Jt.js +0 -16
- package/dist/keys-SIKQYNx1.js +0 -11
- package/dist/supportsCssTimeline-IQY3gfKD.js +0 -12
- package/dist/useGlobalDark-BUUTZvkU.js +0 -24
- package/dist/useIdleReady-sLhGo6CL.js +0 -162
- package/dist/useIntersectionPause-CUmANkoc.js +0 -39
- package/dist/useSortable-DLK9kwZp.js +0 -189
- /package/dist/{HoverCardContent-DGUhpRVt.js → HoverCardContent-ICfIMZX1.js} +0 -0
- /package/dist/{InstrumentChassis-CqKPBNqp.js → InstrumentChassis-DaHIZCqy.js} +0 -0
- /package/dist/{InstrumentRail-CCjvKkpB.js → InstrumentRail-B0qqLFN0.js} +0 -0
- /package/dist/{Label-D53EOwLE.js → Label-CZk-3nTc.js} +0 -0
- /package/dist/{PaperBackdrop-Ds-wDsKf.js → PaperBackdrop-D_YZW47j.js} +0 -0
- /package/dist/{SelectGroup-DAgcsfFw.js → SelectGroup-CMdoCjRE.js} +0 -0
- /package/dist/{SelectSeparator-DN1jzLaI.js → SelectSeparator-CaJnPF3_.js} +0 -0
- /package/dist/{Separator-DXxac0j8.js → Separator-C2XtAXRp.js} +0 -0
- /package/dist/{Switch-imA0Hdjs.js → Switch-x8n6husW.js} +0 -0
- /package/dist/{Toaster-Brs6QjBU.js → Toaster-DdhMKfus.js} +0 -0
- /package/dist/{TooltipProvider-MZFRxOvT.js → TooltipProvider-D-JrSqDu.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-DfWPi8kh.js → constants-DsCdlK9I.js} +0 -0
- /package/dist/{sheet-BnvZRXPq.js → sheet-CQYYrkr9.js} +0 -0
- /package/dist/{useGlassRenderer-C98tZnJ7.js → useGlassRenderer-Dn3WpfG-.js} +0 -0
- /package/dist/{useInterval-B58LmYth.js → useInterval-CHVYFpXV.js} +0 -0
- /package/dist/{useResizeObserver-C_7GjpRn.js → useResizeObserver-DX-STszm.js} +0 -0
- /package/dist/{useTextHighlight-CLST6an0.js → useTextHighlight-Dmtofpk2.js} +0 -0
- /package/dist/{useTimer-6FoosoDY.js → useTimer-DGgoxTXL.js} +0 -0
- /package/dist/{useUserInvalidAria-BW5iyqWR.js → useUserInvalidAria-DmvZ_6Dx.js} +0 -0
- /package/dist/{useViewTransition-CUJM7fXT.js → useViewTransition-D4ssvnXZ.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./cn-DJXf4yaB.js";
|
|
2
|
-
import {
|
|
3
|
-
import { Primitive as
|
|
4
|
-
import { cva as
|
|
2
|
+
import { computed as t, createBlock as n, defineComponent as r, mergeProps as i, openBlock as a, renderSlot as o, unref as s, withCtx as c } from "vue";
|
|
3
|
+
import { Primitive as l } from "reka-ui";
|
|
4
|
+
import { cva as u } from "class-variance-authority";
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region src/components/ui/button/Button.vue
|
|
7
|
-
var
|
|
7
|
+
var d = /* @__PURE__ */ r({
|
|
8
8
|
__name: "Button",
|
|
9
9
|
props: {
|
|
10
10
|
variant: {},
|
|
@@ -16,30 +16,34 @@ var u = /* @__PURE__ */ n({
|
|
|
16
16
|
Object,
|
|
17
17
|
Array
|
|
18
18
|
] },
|
|
19
|
+
type: {},
|
|
20
|
+
disabled: { type: [Boolean, String] },
|
|
19
21
|
asChild: { type: Boolean },
|
|
20
22
|
as: { default: "button" }
|
|
21
23
|
},
|
|
22
|
-
setup(
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
setup(r) {
|
|
25
|
+
let u = r, d = t(() => ({
|
|
26
|
+
type: u.type,
|
|
27
|
+
disabled: u.disabled
|
|
28
|
+
}));
|
|
29
|
+
return (t, p) => (a(), n(s(l), i({
|
|
30
|
+
as: r.as,
|
|
31
|
+
"as-child": r.asChild,
|
|
32
|
+
"data-size": r.size
|
|
33
|
+
}, d.value, { class: s(e)(s(f)({
|
|
34
|
+
variant: r.variant,
|
|
35
|
+
size: r.size
|
|
36
|
+
}), u.class) }), {
|
|
37
|
+
default: c(() => [o(t.$slots, "default")]),
|
|
34
38
|
_: 3
|
|
35
|
-
},
|
|
39
|
+
}, 16, [
|
|
36
40
|
"as",
|
|
37
41
|
"as-child",
|
|
38
42
|
"data-size",
|
|
39
43
|
"class"
|
|
40
44
|
]));
|
|
41
45
|
}
|
|
42
|
-
}),
|
|
46
|
+
}), f = u("btn-pill focus-ring whitespace-nowrap text-sm font-medium cursor-pointer active:scale-[var(--scale-press-btn)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-disabled", {
|
|
43
47
|
variants: {
|
|
44
48
|
variant: {
|
|
45
49
|
default: "bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80 aria-pressed:bg-primary/85",
|
|
@@ -50,8 +54,8 @@ var u = /* @__PURE__ */ n({
|
|
|
50
54
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 active:bg-secondary/70 aria-pressed:bg-secondary/60",
|
|
51
55
|
accent: "bg-accent text-accent-foreground border border-border/40 hover:bg-accent/80 active:bg-accent/70 aria-pressed:bg-accent/60",
|
|
52
56
|
ghost: "bg-transparent text-foreground/70 hover:bg-foreground/8 hover:text-foreground active:bg-foreground/12 aria-pressed:bg-foreground/10 aria-pressed:text-foreground",
|
|
53
|
-
glass: "glass-wash text-foreground hover:bg-[var(--glass-bg-resting)] hover:border-[var(--glass-border-resting)] active:bg-[var(--glass-bg-floating)] active:border-[var(--glass-border-floating)] aria-pressed:bg-[color-mix(in_srgb,var(--foreground)_10%,var(--glass-bg-resting))]",
|
|
54
|
-
"glass-wash": "glass-wash text-foreground/70 hover:bg-foreground/[0.04] hover:border-[var(--surface-tint-22)] hover:text-foreground active:bg-foreground/[0.08] aria-pressed:bg-foreground/[0.1] aria-pressed:text-foreground",
|
|
57
|
+
glass: "glass-wash glass-specular-track text-foreground hover:bg-[var(--glass-bg-resting)] hover:border-[var(--glass-border-resting)] active:bg-[var(--glass-bg-floating)] active:border-[var(--glass-border-floating)] aria-pressed:bg-[color-mix(in_srgb,var(--foreground)_10%,var(--glass-bg-resting))]",
|
|
58
|
+
"glass-wash": "glass-wash glass-specular-track text-foreground/70 hover:bg-foreground/[0.04] hover:border-[var(--surface-tint-22)] hover:text-foreground active:bg-foreground/[0.08] aria-pressed:bg-foreground/[0.1] aria-pressed:text-foreground",
|
|
55
59
|
ai: "bg-amber-500/15 text-amber-700 hover:bg-amber-500/25 active:bg-amber-500/35 dark:text-amber-400 aria-pressed:bg-amber-500/30",
|
|
56
60
|
link: "text-primary underline-offset-4 hover:underline active:opacity-80 active:scale-100"
|
|
57
61
|
},
|
|
@@ -60,7 +64,8 @@ var u = /* @__PURE__ */ n({
|
|
|
60
64
|
xs: "h-7 rounded-pill px-2 text-xs",
|
|
61
65
|
sm: "h-9 rounded-pill px-3",
|
|
62
66
|
lg: "h-11 rounded-pill px-8",
|
|
63
|
-
icon: "h-10 w-10 p-0"
|
|
67
|
+
icon: "h-10 w-10 p-0",
|
|
68
|
+
"icon-sm": "h-7 w-7 p-0"
|
|
64
69
|
}
|
|
65
70
|
},
|
|
66
71
|
defaultVariants: {
|
|
@@ -69,4 +74,4 @@ var u = /* @__PURE__ */ n({
|
|
|
69
74
|
}
|
|
70
75
|
});
|
|
71
76
|
//#endregion
|
|
72
|
-
export {
|
|
77
|
+
export { d as n, f as t };
|
package/dist/button.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./button-
|
|
1
|
+
import { n as e, t } from "./button-Ckn3eDfB.js";
|
|
2
2
|
export { e as Button, t as buttonVariants };
|
package/dist/card.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "./CardFooter-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./CardFooter-C390imy7.js";
|
|
2
2
|
export { r as Card, n as CardContent, i as CardDescription, a as CardFooter, e as CardHeader, t as CardTitle };
|
package/dist/carousel.js
CHANGED
|
@@ -3,7 +3,7 @@ import { t } from "./createLucideIcon-DuDoe_ra.js";
|
|
|
3
3
|
import { t as n } from "./chevron-down-pBY8sYfV.js";
|
|
4
4
|
import { t as r } from "./chevron-right-BjeKC22V.js";
|
|
5
5
|
import { t as i } from "./chevron-up-DBeNHUm1.js";
|
|
6
|
-
import { n as a } from "./button-
|
|
6
|
+
import { n as a } from "./button-Ckn3eDfB.js";
|
|
7
7
|
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createVNode as f, defineComponent as p, mergeProps as m, normalizeClass as h, onMounted as g, openBlock as _, ref as v, renderList as y, renderSlot as b, resolveDynamicComponent as x, toDisplayString as S, unref as C, watch as w, withCtx as T } from "vue";
|
|
8
8
|
import { createInjectionState as E } from "@vueuse/core";
|
|
9
9
|
import D from "embla-carousel-vue";
|
|
@@ -165,7 +165,7 @@ var P = /* @__PURE__ */ p({
|
|
|
165
165
|
"aria-label": `Go to slide ${t}`,
|
|
166
166
|
"data-active": t - 1 === a.value ? "" : void 0,
|
|
167
167
|
"data-slot": "carousel-dot",
|
|
168
|
-
class: h(["focus-ring rounded-pill cursor-pointer transition-[background-color,transform,width,height,box-shadow] duration-
|
|
168
|
+
class: h(["focus-ring rounded-pill cursor-pointer transition-[background-color,transform,width,height,box-shadow] duration-fast", C(e)(C(i) === "vertical" ? "w-1.5" : "h-1.5", t - 1 === a.value ? C(i) === "vertical" ? "h-6 bg-foreground scale-[var(--scale-hover)]" : "w-6 bg-foreground scale-[var(--scale-hover)]" : C(i) === "vertical" ? "h-1.5 bg-muted-medium hover:bg-foreground/50" : "w-1.5 bg-muted-medium hover:bg-foreground/50")]),
|
|
169
169
|
onClick: (e) => d(t - 1)
|
|
170
170
|
}, null, 10, L))), 128))], 10, I)) : l("", !0);
|
|
171
171
|
}
|
package/dist/collapsible.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./CollapsibleContent-
|
|
1
|
+
import { n as e, r as t, t as n } from "./CollapsibleContent-cauTbZEM.js";
|
|
2
2
|
export { t as Collapsible, n as CollapsibleContent, e as CollapsibleTrigger };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { colorUnit2 as e, oklabToLinearSRGB as t, oklabToRgb255 as n, parseCSSColor as r, rawOklabToOklch as i, rawOklchToOklab as a, srgbToOKLab as o } from "@mkbabb/value.js";
|
|
2
|
+
//#region src/composables/color/index.ts
|
|
3
|
+
function s(e) {
|
|
4
|
+
let [n, r, i] = a(e.L, e.C, e.h), [o, s, c] = t(n, r, i);
|
|
5
|
+
return [
|
|
6
|
+
Math.max(0, o),
|
|
7
|
+
Math.max(0, s),
|
|
8
|
+
Math.max(0, c)
|
|
9
|
+
];
|
|
10
|
+
}
|
|
11
|
+
function c(e) {
|
|
12
|
+
let [t, r, i] = a(e.L, e.C, e.h), [o, s, c] = n(t, r, i), l = (e) => Math.min(1, Math.max(0, e / 255));
|
|
13
|
+
return [
|
|
14
|
+
l(o),
|
|
15
|
+
l(s),
|
|
16
|
+
l(c)
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
function l(t) {
|
|
20
|
+
let n = e(r(t), "rgb").value, [a, s, c] = o(Number(n.r), Number(n.g), Number(n.b)), [l, u, d] = i(a, s, c);
|
|
21
|
+
return {
|
|
22
|
+
L: l,
|
|
23
|
+
C: u,
|
|
24
|
+
h: d
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function u(e) {
|
|
28
|
+
let [t, r, i] = a(e.L, e.C, e.h), [o, s, c] = n(t, r, i), l = (e) => Math.round(e).toString(16).padStart(2, "0");
|
|
29
|
+
return `#${l(o)}${l(s)}${l(c)}`;
|
|
30
|
+
}
|
|
31
|
+
var d = (e) => c(l(e));
|
|
32
|
+
//#endregion
|
|
33
|
+
export { s as a, c as i, d as n, u as r, l as t };
|
package/dist/color.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./composables/color";
|
package/dist/color.js
ADDED
package/dist/command.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./CommandShortcut-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./CommandShortcut-BiVyqipe.js";
|
|
2
2
|
export { r as Command, t as CommandDialog, s as CommandEmpty, a as CommandGroup, e as CommandInput, n as CommandItem, o as CommandList, i as CommandSeparator, c as CommandShortcut };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
//#region src/composables/glass/webgl/shaders/procedural-color.glsl.ts
|
|
2
|
+
var e = "\nfloat srgbToLinearCh(float c) {\n return c <= 0.04045 ? c / 12.92 : pow((c + 0.055) / 1.055, 2.4);\n}\nvec3 srgbToLinear(vec3 c) {\n return vec3(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfloat linearToSrgbCh(float c) {\n return c <= 0.0031308 ? c * 12.92 : 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nvec3 linearToSrgb(vec3 c) {\n return vec3(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}", t = "const mat2 FBM_ROT = mat2(0.8, 0.6, -0.6, 0.8);", n = "\n// value.js LINEAR_SRGB_TO_LMS (constants.ts), row-major; written here as GLSL\n// columns (= the transpose) so mat3 * vec3 evaluates the row-major M·v.\nconst mat3 LINEAR_SRGB_TO_LMS = mat3(\n 0.4122214708, 0.2119034982, 0.0883024619,\n 0.5363325363, 0.6806995451, 0.2817188376,\n 0.0514459929, 0.1073969566, 0.6299787005\n);\n\n// value.js srgbToOKLab's INLINE LMS→OKLab coefficients (gamut.ts lines 295-297 —\n// these differ at the ~1e-9 digit from LMS_TO_OKLAB_MATRIX; use the inline ones to\n// mirror the exact value.js path), row-major → GLSL columns.\nconst mat3 LMS_TO_OKLAB = mat3(\n 0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660\n);\n\n// value.js OKLAB_TO_LMS_COEFF (constants.ts), row-major → GLSL columns. Rows:\n// l = [1, 0.3963377774, 0.2158037573], m = [1, -0.1055613458, -0.0638541728],\n// s = [1, -0.0894841775, -1.2914855480].\nconst mat3 OKLAB_TO_LMS = mat3(\n 1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480\n);\n\n// value.js LMS_TO_LINEAR_SRGB (constants.ts), row-major → GLSL columns.\nconst mat3 LMS_TO_LINEAR_SRGB = mat3(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\n// Gamma sRGB → raw OKLab (L, a, b). Mirrors value.js srgbToOKLab.\nvec3 srgbToOklab(vec3 c) {\n vec3 lin = srgbToLinear(c);\n vec3 lms = LINEAR_SRGB_TO_LMS * lin;\n vec3 lmsCbrt = sign(lms) * pow(abs(lms), vec3(1.0 / 3.0));\n return LMS_TO_OKLAB * lmsCbrt;\n}\n\n// Raw OKLab (L, a, b) → linear sRGB. Mirrors value.js oklabToLinearSRGB.\nvec3 oklabToLinearSrgb(vec3 lab) {\n vec3 lms_ = OKLAB_TO_LMS * lab;\n vec3 lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\n\n// OKLab → OKLCh: H in RADIANS. Mirrors value.js rawOklabToOklch (which returns\n// degrees; we stay in radians and only fold to [0, 2pi)).\nvec3 oklabToOklch(vec3 lab) {\n float C = length(lab.yz);\n float H = atan(lab.z, lab.y);\n if (H < 0.0) H += 2.0 * PI;\n return vec3(lab.x, C, H);\n}\n\n// OKLCh (H radians) → OKLab. Mirrors value.js rawOklchToOklab.\nvec3 oklchToOklab(vec3 lch) {\n return vec3(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}";
|
|
3
|
+
function r() {
|
|
4
|
+
let e = typeof window < "u" && window.devicePixelRatio || 1;
|
|
5
|
+
return Math.min(e, 2);
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/composables/glass/webgl/useWebGLCanvas.ts
|
|
9
|
+
function i(e, t) {
|
|
10
|
+
let { setup: n, contextAttrs: r } = t, i = t.respectReducedMotion ?? t.mode !== "capture", a = /* @__PURE__ */ new Set();
|
|
11
|
+
t.mode === "capture" && a.add("manual");
|
|
12
|
+
let o = () => a.size === 0, s = 0, c = typeof performance < "u" ? performance.now() : 0, l = null, u = null, d = !1, f = !1, p = i && typeof window < "u" && window.matchMedia ? window.matchMedia("(prefers-reduced-motion: reduce)") : null, m = p?.matches ?? !1;
|
|
13
|
+
function h() {
|
|
14
|
+
if (!o() || !u) return;
|
|
15
|
+
let e = (performance.now() - c) / 1e3, t = u.time ? u.time(e) : e;
|
|
16
|
+
u.frame(t), s = !m && u.shouldContinue() ? requestAnimationFrame(h) : 0;
|
|
17
|
+
}
|
|
18
|
+
function g() {
|
|
19
|
+
d && o() && !s && u && (s = requestAnimationFrame(h));
|
|
20
|
+
}
|
|
21
|
+
function _() {
|
|
22
|
+
let e = p?.matches ?? !1;
|
|
23
|
+
e !== m && (m = e, e || (c = performance.now()), g());
|
|
24
|
+
}
|
|
25
|
+
p?.addEventListener("change", _);
|
|
26
|
+
function v(e = "manual") {
|
|
27
|
+
let t = o();
|
|
28
|
+
a.add(e), t && !o() && (cancelAnimationFrame(s), s = 0);
|
|
29
|
+
}
|
|
30
|
+
function y(e = "manual") {
|
|
31
|
+
let t = !o();
|
|
32
|
+
a.delete(e), t && o() && d && u && (c = performance.now() - 1e3, h());
|
|
33
|
+
}
|
|
34
|
+
let b = typeof document < "u";
|
|
35
|
+
function x() {
|
|
36
|
+
document.hidden ? v("tab-hidden") : y("tab-hidden");
|
|
37
|
+
}
|
|
38
|
+
b && document.addEventListener("visibilitychange", x), b && document.hidden && a.add("tab-hidden");
|
|
39
|
+
let S = null;
|
|
40
|
+
function C(e) {
|
|
41
|
+
e.skipped ? v("off-screen") : y("off-screen");
|
|
42
|
+
}
|
|
43
|
+
function w() {
|
|
44
|
+
if (S) return;
|
|
45
|
+
let t = e.parentElement;
|
|
46
|
+
t && (S = t, t.addEventListener("contentvisibilityautostatechange", C));
|
|
47
|
+
}
|
|
48
|
+
function T() {
|
|
49
|
+
S?.removeEventListener("contentvisibilityautostatechange", C), S = null;
|
|
50
|
+
}
|
|
51
|
+
let E = null;
|
|
52
|
+
function D(e) {
|
|
53
|
+
e.preventDefault(), cancelAnimationFrame(s), s = 0, u = null, l = null;
|
|
54
|
+
}
|
|
55
|
+
function O() {
|
|
56
|
+
f || (k(), o() && g());
|
|
57
|
+
}
|
|
58
|
+
function k() {
|
|
59
|
+
let t = e.getContext("webgl2", r ?? void 0);
|
|
60
|
+
if (!t) throw Error("[useWebGLCanvas] WebGL2 unavailable");
|
|
61
|
+
l = t, u = n(l), u.resize(), E || (E = new ResizeObserver(() => u?.resize()), E.observe(e));
|
|
62
|
+
}
|
|
63
|
+
function A() {
|
|
64
|
+
d || f || (e.addEventListener("webglcontextlost", D, !1), e.addEventListener("webglcontextrestored", O, !1), k(), w(), d = !0, c = performance.now(), o() && (s = requestAnimationFrame(h)));
|
|
65
|
+
}
|
|
66
|
+
function j(e) {
|
|
67
|
+
d || A(), u?.frame(e);
|
|
68
|
+
}
|
|
69
|
+
function M() {
|
|
70
|
+
f = !0, cancelAnimationFrame(s), s = 0, b && document.removeEventListener("visibilitychange", x), p?.removeEventListener("change", _), T(), e.removeEventListener("webglcontextlost", D, !1), e.removeEventListener("webglcontextrestored", O, !1), E?.disconnect(), E = null, u?.teardown?.(), u = null, l?.getExtension("WEBGL_lose_context")?.loseContext(), l = null, a.clear();
|
|
71
|
+
}
|
|
72
|
+
return t.mode === "capture" && A(), {
|
|
73
|
+
arm: A,
|
|
74
|
+
suspend: v,
|
|
75
|
+
resume: y,
|
|
76
|
+
wake: g,
|
|
77
|
+
renderAt: j,
|
|
78
|
+
dispose: M,
|
|
79
|
+
get gl() {
|
|
80
|
+
return l;
|
|
81
|
+
},
|
|
82
|
+
get reducedMotion() {
|
|
83
|
+
return m;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/composables/glass/webgl/compile.ts
|
|
89
|
+
function a(e, t, n, r = "[glass-ui:webgl]") {
|
|
90
|
+
let i = e.createShader(t);
|
|
91
|
+
if (e.shaderSource(i, n), e.compileShader(i), !e.getShaderParameter(i, e.COMPILE_STATUS)) {
|
|
92
|
+
let t = e.getShaderInfoLog(i) ?? "unknown";
|
|
93
|
+
throw e.deleteShader(i), Error(`${r} shader compile failed:\n${t}`);
|
|
94
|
+
}
|
|
95
|
+
return i;
|
|
96
|
+
}
|
|
97
|
+
function o(e, t, n, r = "[glass-ui:webgl]") {
|
|
98
|
+
let i = e.createProgram();
|
|
99
|
+
if (e.attachShader(i, t), e.attachShader(i, n), e.linkProgram(i), !e.getProgramParameter(i, e.LINK_STATUS)) {
|
|
100
|
+
let t = e.getProgramInfoLog(i) ?? "unknown";
|
|
101
|
+
throw e.deleteProgram(i), Error(`${r} program link failed:\n${t}`);
|
|
102
|
+
}
|
|
103
|
+
return i;
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
export { t as a, r as i, o as n, e as o, i as r, n as s, a as t };
|
|
@@ -16,10 +16,10 @@ import type { HTMLAttributes } from "vue";
|
|
|
16
16
|
* `String(Math.round(v))`.
|
|
17
17
|
* - `placeholder`: glyph for null/empty (default "—").
|
|
18
18
|
* - `digitCount`: optional knob exposed to the consumer via the
|
|
19
|
-
* `--digit-count` CSS custom property on the host.
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
19
|
+
* `--digit-count` CSS custom property on the host. A consumer's
|
|
20
|
+
* width-clamp can read this so the value cell shrinks proportionally
|
|
21
|
+
* as the rendered digits widen. When omitted the primitive computes
|
|
22
|
+
* it from the formatted string length.
|
|
23
23
|
* - `mode`: `"absolute"` (default) or `"progress"` — passes through to
|
|
24
24
|
* `useAnimatedNumber`.
|
|
25
25
|
*/
|
|
@@ -30,8 +30,8 @@ export interface AnimatedDigitProps {
|
|
|
30
30
|
placeholder?: string;
|
|
31
31
|
/**
|
|
32
32
|
* Override the auto-derived digit-count. When unset the primitive
|
|
33
|
-
* publishes the formatted-string length to `--digit-count` so
|
|
34
|
-
*
|
|
33
|
+
* publishes the formatted-string length to `--digit-count` so a
|
|
34
|
+
* consumer's width-clamp reads from a single source of truth.
|
|
35
35
|
*/
|
|
36
36
|
digitCount?: number;
|
|
37
37
|
/** Tag forwarded to `useAnimatedNumber`. */
|
|
@@ -41,8 +41,8 @@ export interface AnimatedDigitProps {
|
|
|
41
41
|
class?: HTMLAttributes["class"];
|
|
42
42
|
}
|
|
43
43
|
declare const __VLS_export: import("vue").DefineComponent<AnimatedDigitProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AnimatedDigitProps> & Readonly<{}>, {
|
|
44
|
-
placeholder: string;
|
|
45
44
|
mode: AnimatedDigitMode;
|
|
45
|
+
placeholder: string;
|
|
46
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
47
47
|
declare const _default: typeof __VLS_export;
|
|
48
48
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AuroraRuntimeOptions } from "./composables/runtime";
|
|
2
|
-
import { type AuroraConfig } from "./presets";
|
|
3
|
-
import { type AuroraRenderMode } from "./renderMode";
|
|
2
|
+
import { type AuroraConfig } from "./constants/presets";
|
|
3
|
+
import { type AuroraRenderMode } from "./constants/renderMode";
|
|
4
4
|
/**
|
|
5
5
|
* Aurora — a painterly WebGL2 background.
|
|
6
6
|
*
|
|
@@ -37,7 +37,7 @@ type __VLS_Props = {
|
|
|
37
37
|
* Aurora field configuration (palette, nuclei, warp, media). Optional —
|
|
38
38
|
* omit it and the canonical `DEFAULT_AURORA_CONFIG` painterly look
|
|
39
39
|
* renders (gap 11, AM.W1). Pass a full config to author a custom field,
|
|
40
|
-
* or a preset object from `./presets`. The default is supplied via a
|
|
40
|
+
* or a preset object from `./constants/presets`. The default is supplied via a
|
|
41
41
|
* `withDefaults` factory so each mount gets its own (un-shared) object.
|
|
42
42
|
*/
|
|
43
43
|
config?: AuroraConfig;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* The shader ACES-tonemaps in linear, so the LUT must stay linear.
|
|
5
|
-
*
|
|
6
|
-
* The OKLCh→linear math is value.js's canonical Ottosson path
|
|
7
|
-
* (`rawOklchToOklab` → `oklabToLinearSRGB`, inv-K-2). The `Math.max(0, ·)` wrap
|
|
8
|
-
* is aurora's OWN ACES-in-linear contract — value.js's `oklabToLinearSRGB` does
|
|
9
|
-
* not clamp negative linear (an out-of-gamut stop yields negatives; the wrap
|
|
10
|
-
* keeps them off the GPU). The equivalence test asserts the COMPOSED path.
|
|
11
|
-
*/
|
|
12
|
-
export declare function oklchToLinear(stop: OklchStop): [number, number, number];
|
|
1
|
+
import { type OklchStop } from "../../../../composables/color";
|
|
2
|
+
export { cssToOklch, oklchStopToHex, oklchToLinear, } from "../../../../composables/color";
|
|
3
|
+
export type { OklchStop } from "../../../../composables/color";
|
|
13
4
|
/**
|
|
14
5
|
* Pack up to `maxStops` OklchStops into linear-sRGB triples. When `out` is
|
|
15
6
|
* provided the buffer is filled in place (no allocation) — the runtime owns a
|
|
@@ -32,20 +23,7 @@ export declare function flattenPalette(stops: OklchStop[], maxStops?: number, ou
|
|
|
32
23
|
* fades in over it once armed).
|
|
33
24
|
*/
|
|
34
25
|
export declare function paletteToCssGradient(stops: OklchStop[]): string;
|
|
35
|
-
export declare function oklchStopToHex(s: OklchStop): string;
|
|
36
26
|
export declare function hexToOklchStop(hex: string): OklchStop;
|
|
37
|
-
/**
|
|
38
|
-
* Resolve any CSS color string to an OKLCh stop via value.js's parser — the
|
|
39
|
-
* single canonical core (inv-K-2). Replaces the former 1×1-canvas `cssToRgb`
|
|
40
|
-
* DOM trick, so this now works in SSR / happy-dom (no `document` required).
|
|
41
|
-
*
|
|
42
|
-
* Semantics differ from the old canvas path (which masked them): an INVALID
|
|
43
|
-
* string THROWS (the canvas silently returned gray); ALPHA is dropped (OklchStop
|
|
44
|
-
* has no alpha; the canvas blended against a gray pre-fill); out-of-gamut inputs
|
|
45
|
-
* are NOT byte-clamped. Callers feeding user-supplied / possibly-transparent
|
|
46
|
-
* strings should wrap in try/catch and decide an alpha policy.
|
|
47
|
-
*/
|
|
48
|
-
export declare function cssToOklch(css: string): OklchStop;
|
|
49
27
|
/**
|
|
50
28
|
* Harmony schemes for {@link deriveAurora}. Each maps the seed hue onto the
|
|
51
29
|
* derived stops differently:
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aurora cursor model — the eased pointer-attraction state.
|
|
3
|
+
*
|
|
4
|
+
* The cursor x/y in 0..1 ease toward their targets; `strength` ramps in while the
|
|
5
|
+
* pointer is active and decays per-frame once it lifts. Exported ONCE here so any
|
|
6
|
+
* CPU mirror (a consumer reproducing the cursor model) imports these constants
|
|
7
|
+
* rather than re-declaring them — the shader and the CPU side stay in lockstep.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Cursor easing constants. Authored to feel "snappy on entry, gentle decay";
|
|
11
|
+
* documented in DESIGN.md §4. Higher lerp = faster ramp; smaller decay = longer
|
|
12
|
+
* tail.
|
|
13
|
+
*/
|
|
14
|
+
export declare const CURSOR_POS_LERP = 0.22;
|
|
15
|
+
export declare const CURSOR_STRENGTH_LERP = 0.18;
|
|
16
|
+
export declare const CURSOR_DECAY_PER_FRAME = 0.992;
|
|
17
|
+
/**
|
|
18
|
+
* At-rest epsilon for the demand-driven loop. The cursor is "settled" once its
|
|
19
|
+
* eased position is within ε of its target AND its strength has decayed below ε —
|
|
20
|
+
* below this the next frame is visually identical, so the loop may park.
|
|
21
|
+
*/
|
|
22
|
+
export declare const CURSOR_REST_EPSILON = 0.001;
|
|
23
|
+
/** The mutable eased-cursor state. `strength` ramps in; `targetStrength` decays. */
|
|
24
|
+
export interface CursorState {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
targetX: number;
|
|
28
|
+
targetY: number;
|
|
29
|
+
strength: number;
|
|
30
|
+
targetStrength: number;
|
|
31
|
+
radius: number;
|
|
32
|
+
}
|
|
33
|
+
/** A fresh at-rest cursor (centred, no attraction, default radius). */
|
|
34
|
+
export declare function createCursorState(): CursorState;
|
|
35
|
+
/**
|
|
36
|
+
* Advance the cursor easing one frame — snappy approach toward the target
|
|
37
|
+
* position, gentle decay of the attraction strength when idle.
|
|
38
|
+
*/
|
|
39
|
+
export declare function advanceCursor(cursor: CursorState): void;
|
|
40
|
+
/**
|
|
41
|
+
* True while the cursor is still easing (position not yet at target, or strength
|
|
42
|
+
* not yet decayed below ε). The render-demand gate ORs this with the config drift
|
|
43
|
+
* check — when both are false the next frame is pixel-identical, so the loop parks.
|
|
44
|
+
*/
|
|
45
|
+
export declare function cursorIsLive(cursor: CursorState): boolean;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aurora frame loop — the per-frame draw + the render-demand gate.
|
|
3
|
+
*
|
|
4
|
+
* `drawFrame` re-sends the per-frame cursor + time uniforms and issues the single
|
|
5
|
+
* full-screen-triangle draw. `needsAnimation` is the demand gate: it returns
|
|
6
|
+
* `false` under reduced-motion (the static frame draws once, then the loop parks),
|
|
7
|
+
* `false` at steady-state (all four drift uniforms 0 AND the cursor settled within
|
|
8
|
+
* ε — the next frame would be pixel-identical), and `true` while drift is live or
|
|
9
|
+
* the cursor is still easing.
|
|
10
|
+
*/
|
|
11
|
+
import type { UniformLocations } from "./glSetup";
|
|
12
|
+
import { type CursorState } from "./cursorModel";
|
|
13
|
+
import type { AuroraConfig } from "../constants/presets";
|
|
14
|
+
export interface FrameLoopDeps {
|
|
15
|
+
gl: WebGL2RenderingContext;
|
|
16
|
+
prog: WebGLProgram;
|
|
17
|
+
uniforms: UniformLocations;
|
|
18
|
+
cursor: CursorState;
|
|
19
|
+
/** The live config (drift uniforms gate the demand loop). */
|
|
20
|
+
getConfig: () => AuroraConfig;
|
|
21
|
+
/** Reduced-motion intent — parks the loop after one static frame. */
|
|
22
|
+
getReducedMotion: () => boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface FrameLoop {
|
|
25
|
+
/** Advance the cursor easing THEN draw — the per-frame step. */
|
|
26
|
+
frame: (timeSec: number) => void;
|
|
27
|
+
/** Demand gate — is there live motion to render on the next frame? */
|
|
28
|
+
needsAnimation: () => boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare function createFrameLoop(deps: FrameLoopDeps): FrameLoop;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aurora GL setup seam — shader compile/link + geometry + the uniform location
|
|
3
|
+
* cache. The GL-lifecycle orchestrator (`runtime.ts`) calls `createGlProgram` on a
|
|
4
|
+
* fresh context (on arm AND on every webglcontextrestored), so a GPU context loss
|
|
5
|
+
* self-heals: each call rebuilds the program + the full-screen triangle + the
|
|
6
|
+
* `UNIFORM_NAMES` location cache against the fresh `gl`.
|
|
7
|
+
*
|
|
8
|
+
* The `UNIFORM_NAMES` const-assertion is the single source of truth for the
|
|
9
|
+
* shader-uniform boundary: a NEW uniform name must be added here, and the cache is
|
|
10
|
+
* keyed off it, so a fresh uniform always gets a location slot.
|
|
11
|
+
*/
|
|
12
|
+
export declare const UNIFORM_NAMES: readonly ["uTime", "uPalette", "uStopCount", "uNucleiCount", "uNucleiPos", "uNucleiRadius", "uNucleiPaletteBias", "uNucleiValueBias", "uNucleiDriftRadius", "uNucleiDriftPhase", "uNucleiElong", "uNucleiAngle", "uSoftmaxBeta", "uValueVariance", "uWarpAmount", "uWarpScale", "uWarpDrift", "uWarpMode", "uNoiseOctaves", "uMedium", "uFlowPattern", "uFlowFocal", "uFlowAngle", "uFlowCurl", "uCursor", "uCursorStrength", "uCursorRadius", "uStrokeAmount", "uStrokeScale", "uStrokeAnisotropy", "uStrokeLayers", "uStrokeMode", "uWetEdge", "uGranulation", "uImpasto", "uBrokenColor", "uCanvasGrain", "uNucleiDrift", "uPaletteDrift", "uBreathDepth", "uBreathPeriod", "uSaturation", "uPaperGrain", "uAlpha"];
|
|
13
|
+
export type UniformName = (typeof UNIFORM_NAMES)[number];
|
|
14
|
+
export type UniformLocations = Record<UniformName, WebGLUniformLocation | null>;
|
|
15
|
+
export interface GlProgram {
|
|
16
|
+
program: WebGLProgram;
|
|
17
|
+
vs: WebGLShader;
|
|
18
|
+
fs: WebGLShader;
|
|
19
|
+
uniforms: UniformLocations;
|
|
20
|
+
geometry: {
|
|
21
|
+
vao: WebGLVertexArrayObject;
|
|
22
|
+
buf: WebGLBuffer;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Compile + link the shader pair, build the full-screen triangle (one draw covers
|
|
27
|
+
* the viewport), and resolve the uniform location cache. Leaves the program bound.
|
|
28
|
+
*/
|
|
29
|
+
export declare function createGlProgram(gl: WebGL2RenderingContext, vertexSrc: string, fragmentSrc: string): GlProgram;
|
|
@@ -1,23 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Aurora v4.1 runtime —
|
|
2
|
+
* Aurora v4.1 runtime — the GL-lifecycle orchestrator over the `useWebGLCanvas`
|
|
3
|
+
* substrate (AU.W6, the DEC-AT-1 transposition).
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* This module composes four cohesive seams atop the substrate:
|
|
6
|
+
* - glSetup — compile/link + geometry + the uniform location cache
|
|
7
|
+
* - uniformBridge — the reactive-config → GL-uniform translation + enum dispatch
|
|
8
|
+
* - cursorModel — the eased pointer-attraction state + advance
|
|
9
|
+
* - frameLoop — the per-frame draw + the render-demand gate
|
|
7
10
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
11
|
+
* It owns ONLY the aurora-specific glue: threading the seams through the
|
|
12
|
+
* substrate's `setup`/`frame`/`shouldContinue`/`resize`/`time`/`teardown`
|
|
13
|
+
* callbacks, the reduced-motion frozen-t, the DPR policy, and the imperative
|
|
14
|
+
* setters/pause/resume. The generic WebGL2 lifecycle — context creation, the
|
|
15
|
+
* three-reason suspend/resume model, the demand-driven rAF loop, the tab-visibility
|
|
16
|
+
* owner, the ResizeObserver, and the webglcontextlost/restored robustness — lives
|
|
17
|
+
* in the substrate.
|
|
18
|
+
*
|
|
19
|
+
* Y-origin convention: config authoring is CSS-top-origin (0 = top). The seams
|
|
20
|
+
* flip Y at the uniform boundary (`flipY` in uniformBridge/frameLoop).
|
|
10
21
|
*/
|
|
11
|
-
import {
|
|
22
|
+
import type { AuroraConfig, AuroraInstance } from "../constants/presets";
|
|
12
23
|
export type AuroraRuntimeMode = "live" | "capture";
|
|
13
24
|
/**
|
|
14
|
-
* The three independent reasons the
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
25
|
+
* The three independent reasons the rAF loop may be suspended. Owned by the
|
|
26
|
+
* `useWebGLCanvas` substrate as a `Set<reason>`: the loop runs IFF the set is
|
|
27
|
+
* empty and each reason is cleared ONLY by the source that set it. This makes
|
|
28
|
+
* resume-while-still-suspended structurally unreachable — a `resume("tab-hidden")`
|
|
29
|
+
* cannot lift an `"off-screen"` suspension.
|
|
19
30
|
*
|
|
20
|
-
* - `"tab-hidden"` — the
|
|
31
|
+
* - `"tab-hidden"` — the substrate's `document.visibilitychange` owner.
|
|
21
32
|
* - `"off-screen"` — viewport-intersection, driven by `useIntersectionPause`.
|
|
22
33
|
* - `"manual"` — the public `pause()`/`resume()` API (and capture-mode seed).
|
|
23
34
|
*/
|
|
@@ -26,15 +37,14 @@ export type SuspendReason = "tab-hidden" | "off-screen" | "manual";
|
|
|
26
37
|
* When the expensive WebGL path (context creation, shader compile + GPU link,
|
|
27
38
|
* first uniform upload, rAF arm) actually runs.
|
|
28
39
|
*
|
|
29
|
-
* - `"deferred"` (default) — `createAurora` constructs a cheap, un-armed
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* - `"eager"` — `createAurora` arms synchronously before returning
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* returns. `mode: "capture"` forces eager regardless of this field.
|
|
40
|
+
* - `"deferred"` (default) — `createAurora` constructs a cheap, un-armed instance
|
|
41
|
+
* and returns immediately; the GL work is invoked later via `instance.arm()`.
|
|
42
|
+
* The Vue wrapper `useAurora` schedules `arm()` past first paint on an idle
|
|
43
|
+
* tick, gated on canvas visibility — so the shader compile-link never lands on
|
|
44
|
+
* the consumer's first-paint critical path.
|
|
45
|
+
* - `"eager"` — `createAurora` arms synchronously before returning. Capture /
|
|
46
|
+
* thumbnail-baking consumers need this: `renderAt` must draw a real frame the
|
|
47
|
+
* instant `createAurora` returns. `mode: "capture"` forces eager regardless.
|
|
38
48
|
*/
|
|
39
49
|
export type AuroraInitStrategy = "eager" | "deferred";
|
|
40
50
|
export interface AuroraRuntimeOptions {
|
|
@@ -49,25 +59,25 @@ export interface AuroraRuntimeOptions {
|
|
|
49
59
|
/**
|
|
50
60
|
* Init-failure handler. A WebGL2/shader-compile/link failure is a
|
|
51
61
|
* library-internal contract violation (O invariant 24). On the EAGER path
|
|
52
|
-
* `createAurora` throws synchronously and `useAurora` rethrows by default
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
62
|
+
* `createAurora` throws synchronously and `useAurora` rethrows by default so
|
|
63
|
+
* the signal reaches the consumer's error boundary / dev console. On the
|
|
64
|
+
* DEFERRED path the failure happens on an idle tick — outside any mount-time
|
|
65
|
+
* boundary — so the runtime routes it here, and `useAurora` re-surfaces it on
|
|
66
|
+
* the microtask queue (so it still reaches the dev console /
|
|
67
|
+
* `app.config.errorHandler`) when no handler is supplied. Provide this
|
|
68
|
+
* callback to opt into silent handling on either path.
|
|
59
69
|
*
|
|
60
|
-
* NOTE: this is the `useAurora` Vue-wrapper contract surface. The
|
|
61
|
-
*
|
|
62
|
-
*
|
|
70
|
+
* NOTE: this is the `useAurora` Vue-wrapper contract surface. The imperative
|
|
71
|
+
* `createAurora(...)` runtime throws on eager init failure and — for
|
|
72
|
+
* `instance.arm()` on the deferred path — rethrows from `arm()`.
|
|
63
73
|
*/
|
|
64
74
|
onInitError?: (err: Error) => void;
|
|
65
75
|
}
|
|
66
76
|
/**
|
|
67
77
|
* The concrete `createAurora` return shape. It IS an {@link AuroraInstance}
|
|
68
|
-
* (structurally assignable — every member matches) but widens `pause`/`resume`
|
|
69
|
-
*
|
|
70
|
-
*
|
|
78
|
+
* (structurally assignable — every member matches) but widens `pause`/`resume` to
|
|
79
|
+
* carry an optional {@link SuspendReason}, defaulting to `"manual"`. The Vue
|
|
80
|
+
* wrapper passes `"off-screen"` for the intersection seam; a bare
|
|
71
81
|
* `pause()`/`resume()` reads identically to the `AuroraInstance` contract.
|
|
72
82
|
*/
|
|
73
83
|
export interface AuroraRuntime extends Omit<AuroraInstance, "pause" | "resume"> {
|