@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
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aurora uniform bridge — the reactive-config → GL-uniform translation seam.
|
|
3
|
+
*
|
|
4
|
+
* Owns the sealed enum↔shader-int dispatch maps and the per-config uniform upload.
|
|
5
|
+
* Each map is `as const` constrained by a `satisfies Record<Union, number>` so a
|
|
6
|
+
* NEW union member is a COMPILE error until it gets a slot — no silent stale-Record
|
|
7
|
+
* gap where a fresh enum value uploads `undefined`.
|
|
8
|
+
*
|
|
9
|
+
* Crayon is a PEER medium (`uMedium == 4`), NOT a stroke mode: the shader hoists it
|
|
10
|
+
* out of `mediumOil()` (wax-on-tooth, not oil strokes). So `MEDIUM_ID` carries the
|
|
11
|
+
* peer `crayon: 4` slot and `STROKE_MODE_ID` no longer maps `crayon` — a
|
|
12
|
+
* `strokeMode === "crayon"` config resolves to the crayon peer medium via
|
|
13
|
+
* `resolveMediumId` and uploads a benign `uStrokeMode` (oil).
|
|
14
|
+
*
|
|
15
|
+
* The pre-allocated upload buffers live in the bridge: a slider drag refills them
|
|
16
|
+
* in place rather than allocating ~8 Float32Arrays per frame.
|
|
17
|
+
*/
|
|
18
|
+
import type { UniformLocations } from "./glSetup";
|
|
19
|
+
import type { CursorState } from "./cursorModel";
|
|
20
|
+
import { type AuroraConfig } from "../constants/presets";
|
|
21
|
+
export declare const MEDIUM_ID: {
|
|
22
|
+
readonly smooth: 0;
|
|
23
|
+
readonly pastel: 1;
|
|
24
|
+
readonly watercolor: 2;
|
|
25
|
+
readonly oil: 3;
|
|
26
|
+
readonly crayon: 4;
|
|
27
|
+
};
|
|
28
|
+
export declare const FLOW_ID: {
|
|
29
|
+
readonly none: 0;
|
|
30
|
+
readonly radial: 1;
|
|
31
|
+
readonly swirl: 2;
|
|
32
|
+
readonly diagonal: 3;
|
|
33
|
+
readonly multi: 4;
|
|
34
|
+
};
|
|
35
|
+
export declare const WARP_ID: {
|
|
36
|
+
readonly fbm: 0;
|
|
37
|
+
readonly cellular: 1;
|
|
38
|
+
readonly hybrid: 2;
|
|
39
|
+
};
|
|
40
|
+
export declare const STROKE_MODE_ID: {
|
|
41
|
+
readonly oil: 0;
|
|
42
|
+
readonly knife: 1;
|
|
43
|
+
readonly chunky: 3;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* The effective `uMedium` int for a config. The only non-identity case: a
|
|
47
|
+
* `medium: "oil"` + `strokeMode: "crayon"` config selects the crayon PEER
|
|
48
|
+
* (`uMedium == 4`) rather than oil — behavior-preserving with the pre-hoist
|
|
49
|
+
* `mediumOil()` `mode == 2` branch (same pixel output, dispatched one level up).
|
|
50
|
+
*/
|
|
51
|
+
export declare function resolveMediumId(cfg: AuroraConfig): number;
|
|
52
|
+
/**
|
|
53
|
+
* The `uStrokeMode` int for a config. Crayon is not an oil stroke (it routes to
|
|
54
|
+
* the crayon peer medium where `uStrokeMode` is unread), so it uploads the benign
|
|
55
|
+
* oil default; the other modes map directly.
|
|
56
|
+
*/
|
|
57
|
+
export declare function resolveStrokeModeId(cfg: AuroraConfig): number;
|
|
58
|
+
/**
|
|
59
|
+
* Build the per-config uniform uploader bound to a program's uniform location
|
|
60
|
+
* cache + cursor state. Returns `uploadConfig` — call it to push a fresh
|
|
61
|
+
* `AuroraConfig` into the live program. The cursor uniforms are initialised here
|
|
62
|
+
* and re-sent per frame by the frame loop.
|
|
63
|
+
*
|
|
64
|
+
* Y-origin: config authoring is CSS-top-origin (0 = top); the bridge flips Y at
|
|
65
|
+
* the uniform boundary (`flipY`).
|
|
66
|
+
*/
|
|
67
|
+
export declare function createUniformBridge(gl: WebGL2RenderingContext, prog: WebGLProgram, U: UniformLocations, cursor: CursorState): (cfg: AuroraConfig) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Ref } from "vue";
|
|
2
2
|
import { type AuroraRuntimeOptions } from "./runtime";
|
|
3
3
|
import { type ConfigSource } from "./configSource";
|
|
4
|
-
import type { AuroraConfig } from "../presets";
|
|
4
|
+
import type { AuroraConfig } from "../constants/presets";
|
|
5
5
|
/**
|
|
6
6
|
* Adaptive-substrate options threaded down from `Aurora.vue` (AM.W1). The
|
|
7
7
|
* render mode is the RESOLVED concrete substrate (`"auto"` already collapsed
|
|
@@ -63,5 +63,18 @@ export interface UseAuroraReturn {
|
|
|
63
63
|
* placeholder under the canvas so the consumer's first paint is never blocked
|
|
64
64
|
* on the shader. Capture / `initStrategy: "eager"` consumers arm synchronously
|
|
65
65
|
* inside `createAurora` and skip the defer entirely.
|
|
66
|
+
*
|
|
67
|
+
* Init-failure contract (O invariant 24 — "fails explicitly by default"). A
|
|
68
|
+
* WebGL2/shader-compile/link failure is a library-internal contract violation.
|
|
69
|
+
* On the DEFERRED path the failure lands on an idle tick, OUTSIDE any
|
|
70
|
+
* mount-time error boundary, so the consumer MUST handle it through exactly one
|
|
71
|
+
* of three paths:
|
|
72
|
+
* 1. pass an `onInitError(err)` handler in `runtimeOptions` (the explicit
|
|
73
|
+
* opt-in — receives the error directly), OR
|
|
74
|
+
* 2. install a Vue global `app.config.errorHandler` (the re-surfaced
|
|
75
|
+
* microtask rejection reaches it), OR
|
|
76
|
+
* 3. knowingly accept the unhandled rejection (the dev console still gets it).
|
|
77
|
+
* Armed deferred with NO `onInitError`, `useAurora` dev-warns ONCE so the
|
|
78
|
+
* silent-by-omission case is visible. WebGL2-unavailable still throws HARD.
|
|
66
79
|
*/
|
|
67
80
|
export declare function useAurora(canvasRef: Ref<HTMLCanvasElement | null>, configSource: ConfigSource<AuroraConfig>, runtimeOptions?: AuroraRuntimeOptions, adaptiveOptions?: UseAuroraAdaptiveOptions): UseAuroraReturn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Ref } from "vue";
|
|
2
2
|
import { type ConfigSource } from "./configSource";
|
|
3
|
-
import type { AuroraConfig } from "../presets";
|
|
3
|
+
import type { AuroraConfig } from "../constants/presets";
|
|
4
4
|
export interface CursorInteractionOptions {
|
|
5
5
|
/** Fires `setCursor(x,y,strength)` for continuous swirl. */
|
|
6
6
|
setCursor: (x: number, y: number, strength?: number) => void;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AV.W7 F6 — the WebGL-surface perf BUDGET constants (the named ceilings).
|
|
3
|
+
*
|
|
4
|
+
* Promotes the formerly-magic `Math.min(dpr, 2)` literal that lived inline in
|
|
5
|
+
* the aurora + goo-blob `resize()` paths (the `2` was un-named in both) to ONE
|
|
6
|
+
* named ceiling, and adds the consumer-preset budget caps the SOTA crosswalk
|
|
7
|
+
* §2.F F6 calls for. A preset that exceeds a cap is CLAMPED at upload, so a
|
|
8
|
+
* consumer cannot blow the frame/VRAM budget by over-authoring a config.
|
|
9
|
+
*
|
|
10
|
+
* Token-first (the wave precept): these are the CPU-side numeric ceilings.
|
|
11
|
+
* They are NOT magic numbers scattered across runtimes — every WebGL surface
|
|
12
|
+
* reads the same export, so a tuning change lands in one place.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* The device-pixel-ratio clamp. A retina/4K display reports `devicePixelRatio`
|
|
16
|
+
* 2–3+; rendering a full-viewport `backdrop-filter`-adjacent WebGL surface at
|
|
17
|
+
* 3× is ~2.25× the fill of 2× for no perceptible gain on a drift background.
|
|
18
|
+
* Cap the backing-store resolution at 2× — the single biggest VRAM/fill lever
|
|
19
|
+
* after the offscreen-park. Consumed by aurora's + goo-blob's `resize()`.
|
|
20
|
+
*/
|
|
21
|
+
export declare const AV_DPR_MAX = 2;
|
|
22
|
+
/**
|
|
23
|
+
* The maximum animated metaball nuclei (the goo-blob body + its satellites, or
|
|
24
|
+
* an aurora field's count). The goo-blob shader hard-caps satellites at 4; this
|
|
25
|
+
* is the authored-config soft cap (body + ≤2 satellites is the budget-safe
|
|
26
|
+
* register, ≤3 the ceiling). A preset above this is clamped at upload.
|
|
27
|
+
*/
|
|
28
|
+
export declare const AV_MAX_BLOBS = 3;
|
|
29
|
+
/**
|
|
30
|
+
* The maximum palette colors a budget-safe field mixes per frame. Aurora's
|
|
31
|
+
* shader caps palette stops at {@link MAX_STOPS} (8) for authoring range; this
|
|
32
|
+
* is the PERF budget — 3–4 colors is the band where the per-pixel mix stays
|
|
33
|
+
* cheap. Above this the gradient cost grows without perceptible richness.
|
|
34
|
+
*/
|
|
35
|
+
export declare const AV_MAX_COLORS = 4;
|
|
36
|
+
/**
|
|
37
|
+
* The drift-loop duration band, in seconds. An animation that loops faster than
|
|
38
|
+
* {@link AV_LOOP_DURATION_MIN_S} reads as nervous (and never lets the eye rest →
|
|
39
|
+
* no battery reprieve); slower than {@link AV_LOOP_DURATION_MAX_S} reads as
|
|
40
|
+
* static. The 8–15s band is the SOTA-named budget-safe drift window.
|
|
41
|
+
*/
|
|
42
|
+
export declare const AV_LOOP_DURATION_MIN_S = 8;
|
|
43
|
+
export declare const AV_LOOP_DURATION_MAX_S = 15;
|
|
44
|
+
/** Clamp a numeric value into an inclusive `[min, max]` band. */
|
|
45
|
+
export declare function clampBudget(value: number, min: number, max: number): number;
|
|
46
|
+
/**
|
|
47
|
+
* Resolve the budget-clamped backing-store DPR for a surface. SSR-safe (returns
|
|
48
|
+
* `1` when `window` is absent). The single CPU-side reader of {@link AV_DPR_MAX}.
|
|
49
|
+
*/
|
|
50
|
+
export declare function resolveBudgetDpr(): number;
|
|
@@ -10,11 +10,8 @@
|
|
|
10
10
|
* shape + a minimum-viable DEFAULT_AURORA_CONFIG for the component's own
|
|
11
11
|
* type-check ergonomics.
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
C: number;
|
|
16
|
-
h: number;
|
|
17
|
-
}
|
|
13
|
+
import type { OklchStop } from "../../../../composables/color";
|
|
14
|
+
export type { OklchStop };
|
|
18
15
|
export interface AuroraNucleus {
|
|
19
16
|
/** 0..1 in CSS-top-origin space (0 = top, 1 = bottom). Runtime flips Y. */
|
|
20
17
|
x: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FRAGMENT_SRC: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AURORA_BRUSH_GLSL = "// \u2500\u2500 Curved swept brushstroke primitive \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// A stroke is a curved spine from A to B with quadratic bulge K (sideways offset\n// at midpoint). Width varies along length via a shape profile. Edge is ragged\n// (bristle-modulated), ends are rounded blobs, inside has streak modulation.\n//\n// For pixel p, we invert an approximate projection onto the curved spine:\n// 1) project p onto straight AB axis -> along0, cross0\n// 2) at parameter along0, spine offset = 4\u00B7K\u00B7along0\u00B7(1-along0) perpendicular\n// 3) cross = cross0 - spineOffset, refine along one iteration\n// Coverage blends paint atop col based on per-stroke color sampled from the\n// underlying base at spine midpoint \u2014 so overlapping strokes from different\n// palette regions meet at hard, ragged demarcations.\n\nstruct StrokeHit {\n float coverage; // 0..1\n vec3 color;\n float alongT; // 0..1 along spine, for internal modulation\n float crossN; // cross distance / current half-width, signed\n float edgeN; // distance to edge in half-widths (0 = at edge, 1 = at spine)\n};\n\nStrokeHit noHit() { return StrokeHit(0.0, vec3(0.0), 0.0, 0.0, 0.0); }\n\nvec2 rotateDir(vec2 dir, float angle) {\n float ca = cos(angle), sa = sin(angle);\n return vec2(dir.x * ca - dir.y * sa, dir.x * sa + dir.y * ca);\n}\n\nvec2 safeDir(vec2 dir) {\n float len = length(dir);\n return len > 1e-4 ? dir / len : vec2(1.0, 0.0);\n}\n\n// Shape profile along the stroke. type:\n// 0 tapered \u2014 thin-fat-thin (classic brush)\n// 1 load-drag \u2014 fat start, tapers to a point\n// 2 dab \u2014 ellipse-like, round center\n// 3 even \u2014 near-constant, slight end taper\nfloat strokeShape(float t, int type) {\n t = clamp(t, 0.0, 1.0);\n if (type == 1) {\n // loaded at t=0, tapering\n return pow(1.0 - t, 0.55) * smoothstep(0.0, 0.08, t);\n } else if (type == 2) {\n // dab / blob\n float d = t - 0.5;\n return exp(-d * d * 12.0);\n } else if (type == 3) {\n // mostly even, slight end softening\n return smoothstep(0.0, 0.08, t) * smoothstep(1.0, 0.92, t) * 0.95 + 0.05;\n }\n // 0 tapered\n return smoothstep(0.0, 0.22, t) * smoothstep(1.0, 0.78, t);\n}\n\n// A single curved stroke.\n// a, b \u2014 endpoints\n// halfW \u2014 base half-width (world units)\n// bulge \u2014 signed perpendicular midpoint offset, in world units\n// shapeType \u2014 0..3\n// bristleFreq \u2014 spatial frequency of edge raggedness\n// bristleAmp \u2014 0..0.5 fraction of halfW chewed away at edge extrema\n// streakSeed \u2014 uniqueness seed for internal streaks\n// colAtMid \u2014 pre-sampled color at midpoint\nStrokeHit curvedStroke(vec2 p, vec2 a, vec2 b, float halfW,\n float bulge, int shapeType,\n float bristleFreq, float bristleAmp,\n float streakSeed, vec3 colAtMid) {\n vec2 ab = b - a;\n float L = length(ab);\n if (L < 1e-5) return noHit();\n vec2 tang = ab / L;\n vec2 norm = vec2(-tang.y, tang.x);\n\n vec2 rel = p - a;\n float along0 = dot(rel, tang) / L; // straight projection 0..1 along AB\n float cross0 = dot(rel, norm); // signed cross\n\n // Spine sideways offset due to bulge (parabolic)\n float bend = 4.0 * bulge * along0 * (1.0 - along0);\n float cross1 = cross0 - bend;\n\n // One refinement step: as the spine bends, the closest-point along shifts.\n // Spine tangent differs from straight tangent; first-order correction:\n float dBend = 4.0 * bulge * (1.0 - 2.0 * along0); // d(bend)/d(along)\n float along1 = along0 + (cross1 * dBend) / (L * (1.0 + dBend * dBend / (L * L)));\n\n // Bristle-ragged edge: half-width gets chewed by 1D noise along the spine\n float edgeNoise = fbm(vec2(along1 * bristleFreq, streakSeed * 7.3)) - 0.5;\n float edgeNoise2 = fbm(vec2(along1 * bristleFreq * 2.3, streakSeed * 3.1 + 17.0)) - 0.5;\n float edgeMod = 1.0 - bristleAmp * (0.6 + 0.4 * edgeNoise) * (0.5 + edgeNoise2);\n\n // Width profile along the stroke\n float shape = strokeShape(along1, shapeType);\n float halfWNow = halfW * shape * edgeMod;\n\n // Inside-segment coverage\n float cov = 0.0;\n if (along1 >= 0.0 && along1 <= 1.0 && halfWNow > 1e-6) {\n float cn = abs(cross1) / halfWNow;\n // fwidth-derived AA: half-width from the field's screen-space gradient so the\n // edge holds ~1px regardless of zoom/DPR (mirrors metaball.frag.ts:252-255).\n float aaC = max(fwidth(cn), 1e-6);\n cov = 1.0 - smoothstep(1.0 - aaC, 1.0 + aaC, cn);\n }\n\n // End-cap blobs (rounded tips, not perpendicular cuts)\n float capA = 0.0, capB = 0.0;\n {\n vec2 capCenterA = a + norm * (bulge * 0.0); // at a\n vec2 capCenterB = a + tang * L + norm * bend * 0.0 + norm * 0.0; // at b; bend is 0 at endpoints\n capCenterB = b;\n float endShapeA = strokeShape(0.02, shapeType);\n float endShapeB = strokeShape(0.98, shapeType);\n float rA = halfW * endShapeA * (0.9 + 0.2 * fbm(vec2(streakSeed * 13.0)));\n float rB = halfW * endShapeB * (0.9 + 0.2 * fbm(vec2(streakSeed * 19.0 + 5.0)));\n float dA = length(p - capCenterA);\n float dB = length(p - capCenterB);\n // fwidth-derived AA on the clean Euclidean cap distances (mirrors metaball.frag.ts:252-255).\n float aaA = max(fwidth(dA), 1e-6);\n float aaB = max(fwidth(dB), 1e-6);\n capA = 1.0 - smoothstep(rA - aaA, rA + aaA, dA);\n capB = 1.0 - smoothstep(rB - aaB, rB + aaB, dB);\n // Only apply caps if we're BEYOND the segment; otherwise the segment wins.\n capA *= (along1 < 0.05) ? 1.0 : 0.0;\n capB *= (along1 > 0.95) ? 1.0 : 0.0;\n }\n\n float coverage = max(cov, max(capA, capB));\n if (coverage < 0.002) return noHit();\n\n // Edge distance (for impasto later): 0 at edge, 1 at spine\n float edgeDist = halfWNow > 1e-6 ? clamp(1.0 - abs(cross1) / halfWNow, 0.0, 1.0) : 0.0;\n\n return StrokeHit(\n coverage,\n colAtMid,\n clamp(along1, 0.0, 1.0),\n halfWNow > 1e-6 ? cross1 / halfWNow : 0.0,\n edgeDist\n );\n}\n\n// Composite stroke over col with internal streaking + impasto edge highlight.\n// streakAmp \u2014 0..0.2 how much internal streaks darken/lighten\n// impastoAmp \u2014 0..1 edge catch-light strength\n// hardness \u2014 0..1 how crisp the compositing transition is (1 = razor, 0 = creamy)\nvoid paintOver(inout vec3 col, StrokeHit s, float streakFreq, float streakAmp,\n float impastoAmp, float hardness, float streakSeed) {\n if (s.coverage < 0.002) return;\n float strokeOpacity = clamp(uStrokeAmount, 0.0, 1.0);\n if (strokeOpacity <= 0.001) return;\n vec3 c = s.color;\n\n // Internal streaks \u2014 fbm along spine, modulated by cross position. Gives\n // the loaded-brush look: some bristles carry more pigment than others.\n float streakA = fbm(vec2(s.alongT * streakFreq, s.crossN * 2.7 + streakSeed));\n float streakB = fbm(vec2(s.alongT * streakFreq * 0.6 + streakSeed * 3.7, s.crossN * 4.1));\n float streak = 0.6 * (streakA - 0.5) + 0.4 * (streakB - 0.5);\n c *= 1.0 + streak * streakAmp * 2.0;\n\n // Subtle value variance across width (hollow-center catch-light)\n float crossShade = smoothstep(0.0, 0.4, s.edgeN) * (1.0 - smoothstep(0.65, 1.0, s.edgeN));\n c *= 1.0 + crossShade * 0.05;\n\n // Impasto edge highlight \u2014 bright rim on one side of the stroke\n float rim = smoothstep(0.85, 1.0, 1.0 - s.edgeN) * step(0.0, s.crossN);\n c += impastoAmp * rim * vec3(0.18, 0.15, 0.11);\n // Shadow on the other side (darker, cooler)\n float shadow = smoothstep(0.85, 1.0, 1.0 - s.edgeN) * step(0.0, -s.crossN);\n c -= impastoAmp * shadow * 0.25 * vec3(0.10, 0.09, 0.07);\n\n float softLimit = mix(0.35, 0.98, hardness);\n float alpha = smoothstep(0.0, 1.0 - softLimit, s.coverage) * strokeOpacity;\n col = mix(col, c, alpha);\n}\n\n// Best-of-9-neighbor placement: sample 3x3 surrounding cells and take the\n// stroke that covers this pixel most. Breaks the grid by per-cell jitter and\n// sparse density via noise thresholding.\nStrokeHit bestOil(vec2 p, float cellSize, float lenMul, float halfWMul,\n float jitterAmt, float density, int shapeType,\n float bristleAmp, vec2 flow, float t, float seed) {\n vec2 cell = floor(p / cellSize);\n\n StrokeHit best = noHit();\n // 3x3 neighborhood\n for (int dy = -1; dy <= 1; dy++) {\n for (int dx = -1; dx <= 1; dx++) {\n vec2 cc = cell + vec2(float(dx), float(dy));\n vec2 hh = hash22(cc + seed) - 0.5;\n // Density gate \u2014 noise threshold; sparse placement.\n float gate = hash21(cc * 1.7 + seed * 0.3);\n if (gate > density) continue;\n\n vec2 center = (cc + 0.5 + hh * jitterAmt) * cellSize;\n\n // Per-stroke direction: consume the layer-provided flow, then add only\n // deterministic local perturbation so alternate stroke layers stay live.\n vec2 f = safeDir(flow);\n float angJ = (hash21(cc + seed + 11.0) - 0.5) * 0.9; // +/- 0.45 rad\n float localCurl = (fbm(center * (2.6 + seed * 0.11) + seed * 1.9) - 0.5) * 0.55 * uFlowCurl;\n vec2 dir = rotateDir(f, angJ + localCurl);\n\n float lenV = cellSize * lenMul * (0.65 + 0.55 * hash21(cc + seed + 23.0));\n float halfW = cellSize * halfWMul * (0.70 + 0.55 * hash21(cc + seed + 41.0));\n float bulge = (hash21(cc + seed + 53.0) - 0.5) * lenV * 0.35;\n\n vec2 a = center - dir * (lenV * 0.5);\n vec2 b = center + dir * (lenV * 0.5);\n\n vec3 colMid = brokenColorJitter(\n sampleBase(center, t),\n hash21(cc + seed + 89.0),\n hash21(cc * 2.3 + seed + 97.0),\n 1.0\n );\n\n StrokeHit h = curvedStroke(p, a, b, halfW, bulge, shapeType,\n 7.0, bristleAmp,\n hash21(cc + seed + 67.0), colMid);\n if (h.coverage > best.coverage) best = h;\n }\n }\n return best;\n}\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AURORA_COMPOSITION_GLSL = "// \u2500\u2500 Palette LUT \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nvec3 samplePalette(float id) {\n id = clamp(id, 0.0, 1.0);\n float scaled = id * float(uStopCount - 1);\n int i0 = int(floor(scaled));\n int i1 = min(i0 + 1, uStopCount - 1);\n float t = fract(scaled);\n t = smoothstep(0.0, 1.0, t);\n return mix(uPalette[i0], uPalette[i1], t);\n}\n\n// \u2500\u2500 Nuclei field \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nvoid nucleiField(vec2 p, float t, out float paletteId, out float valueMod) {\n float accumBias = 0.0;\n float accumValue = 0.0;\n float accumW = 0.0;\n for (int i = 0; i < MAX_NUCLEI; i++) {\n if (i >= uNucleiCount) break;\n vec2 posI = uNucleiPos[i]\n + uNucleiDriftRadius[i] * vec2(\n cos(t * uNucleiDrift * K_NUCLEI + uNucleiDriftPhase[i]),\n sin(t * uNucleiDrift * K_NUCLEI + uNucleiDriftPhase[i] * 1.13)\n );\n vec2 diff = p - posI;\n // Anisotropic Gaussian: rotate diff into the nucleus's local frame\n // (major axis along uNucleiAngle), then scale the major-axis component by\n // 1/elongation so the squared distance describes an ellipse. Defaults\n // 1.0/0.0 reduce to the isotropic dot(diff, diff).\n float ca = cos(uNucleiAngle[i]);\n float sa = sin(uNucleiAngle[i]);\n vec2 local = vec2( ca * diff.x + sa * diff.y,\n -sa * diff.x + ca * diff.y);\n float along = local.x / max(uNucleiElong[i], 0.01);\n float across = local.y;\n float d2 = along * along + across * across;\n float r = max(uNucleiRadius[i], 0.01);\n float w = exp(-uSoftmaxBeta * d2 / (r * r));\n accumBias += w * uNucleiPaletteBias[i];\n accumValue += w * uNucleiValueBias[i];\n accumW += w;\n }\n paletteId = accumBias / max(accumW, 1e-4);\n valueMod = accumValue / max(accumW, 1e-4);\n\n // Palette drift \u2014 slow global paletteId breathe between adjacent stops. The\n // rate rides K_PAL (perceptible ~30\u201360s hue cycle at the default coefficient);\n // the amplitude lifts the authored coefficient into a 0.03..0.06 paletteId band\n // so the palette visibly travels rather than dithering within one stop.\n float palAmp = clamp(uPaletteDrift * 6.0, 0.0, 0.06);\n paletteId += palAmp * sin(t * uPaletteDrift * K_PAL);\n paletteId = clamp(paletteId, 0.0, 1.0);\n}\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AURORA_FLOW_GLSL = "// \u2500\u2500 Flow field \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nvec2 flowField(vec2 p, float t) {\n vec2 dir = vec2(1.0, 0.0);\n if (uFlowPattern == 1) {\n // radial\n dir = normalize(p - uFlowFocal + 1e-4);\n } else if (uFlowPattern == 2) {\n // swirl \u2014 tangent to radial\n vec2 rad = normalize(p - uFlowFocal + 1e-4);\n dir = vec2(-rad.y, rad.x);\n } else if (uFlowPattern == 3) {\n // diagonal\n float a = radians(uFlowAngle);\n dir = vec2(cos(a), sin(a));\n } else if (uFlowPattern == 4) {\n // multi \u2014 curl-noise driven\n float n = fbm(p * 2.0 + t * 0.02);\n float a = n * 6.2831;\n dir = vec2(cos(a), sin(a));\n }\n // curl \u2014 perturb by noise. Radial gets much less curl so rays stay clean.\n if (uFlowCurl > 0.0) {\n float n = fbm(p * 3.0) - 0.5;\n float curlAmt = uFlowCurl;\n if (uFlowPattern == 1) curlAmt *= 0.25; // radial: preserve ray clarity\n if (uFlowPattern == 2) curlAmt *= 0.55; // swirl: allow moderate curl\n float a = atan(dir.y, dir.x) + n * 3.14159 * curlAmt;\n dir = vec2(cos(a), sin(a));\n }\n // cursor influence \u2014 swirl around the cursor position\n if (uCursorStrength > 0.001) {\n vec2 toCur = uCursor - p;\n float d = length(toCur);\n float r = max(uCursorRadius, 0.01);\n float w = exp(-(d * d) / (r * r * 0.5));\n // swirl tangent\n vec2 tangent = vec2(-toCur.y, toCur.x) / max(d, 1e-4);\n float a0 = atan(dir.y, dir.x);\n float a1 = atan(tangent.y, tangent.x);\n // blend angle\n float da = a1 - a0;\n da = atan(sin(da), cos(da)); // wrap to [-pi, pi]\n float a = a0 + da * w * uCursorStrength;\n dir = vec2(cos(a), sin(a));\n }\n return dir;\n}\n";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const AURORA_MEDIUMS_PRE_BRUSH_GLSL = "// \u2500\u2500 Medium overlays \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n// A quick re-computation of base color for edge-mask sampling\nvec3 sampleBase(vec2 p, float t) {\n vec2 pw = domainWarp(p, t);\n float id; float vm;\n nucleiField(pw, t, id, vm);\n vec3 c = samplePalette(id);\n c *= 1.0 + uValueVariance * vm;\n return c;\n}\n\nvec3 mediumWatercolor(vec3 col, vec2 p, float t) {\n // Wet-edge cauliflowers via luma-gradient magnitude\n float eps = 0.004;\n vec3 cx1 = sampleBase(p + vec2(eps, 0.0), t);\n vec3 cx2 = sampleBase(p - vec2(eps, 0.0), t);\n vec3 cy1 = sampleBase(p + vec2(0.0, eps), t);\n vec3 cy2 = sampleBase(p - vec2(0.0, eps), t);\n float gx = dot(cx1 - cx2, W_LUMA);\n float gy = dot(cy1 - cy2, W_LUMA);\n float edge = sqrt(gx * gx + gy * gy) / (2.0 * eps);\n float mask = smoothstep(0.0, 2.5, edge);\n col *= mix(1.0, 0.78, mask * uWetEdge);\n\n // Granulation \u2014 pigment settles in paper tooth\n float paper = 0.5 * vnoise(p * 160.0) + 0.5 * vnoise(p * 360.0);\n float pigLoad = 1.0 - dot(col, W_LUMA);\n col *= 1.0 - uGranulation * pigLoad * (paper - 0.5);\n\n // Wash banding \u2014 faint horizontal wet gradient\n float band = fbm(vec2(p.x * 1.5, p.y * 0.4));\n col *= 1.0 + 0.04 * (band - 0.5);\n return col;\n}\n\nvec3 mediumPastel(vec3 col, vec2 p, float t) {\n vec2 flow = flowField(p, t);\n vec2 perp = vec2(-flow.y, flow.x);\n float along = dot(p, flow) * uStrokeScale;\n float across = dot(p, perp) * uStrokeScale;\n across += 0.03 * (vnoise(p * 260.0) - 0.5);\n\n float aniso = mix(1.0, 0.18, uStrokeAnisotropy);\n float stroke = fbm(vec2(along * aniso, across));\n col *= mix(1.0, 0.82 + 0.32 * stroke, uStrokeAmount);\n\n // Pastel tooth \u2014 tiny high-frequency grain\n float tooth = vnoise(p * 800.0);\n col *= 1.0 - 0.08 * uStrokeAmount * (tooth - 0.5);\n return col;\n}\n";
|
|
2
|
+
export declare const AURORA_MEDIUMS_POST_BRUSH_GLSL = "// \u2500\u2500 Crayon / oil-pastel \u2014 paper tooth \u00D7 wax pigment (PEER medium) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// Crayon is not strokes. It's pigment crumbs dragged across paper tooth.\n// Model: heavy 2D tooth noise at multiple scales, anisotropically stretched\n// along flow direction, multiplied into the base color. Add a slow \"waxy\n// film\" that slightly unifies hues, and occasional darker \"pressed\" spots\n// where the crayon dug in. NO straight segments. Dispatched at main() level as\n// a peer of pastel/watercolor/oil \u2014 never a branch inside mediumOil().\nvec3 mediumCrayon(vec3 col, vec2 p, float t) {\n vec2 flow = flowField(p, t);\n float ang = atan(flow.y, flow.x);\n float ca = cos(-ang), sa = sin(-ang);\n vec2 pr = vec2(p.x * ca - p.y * sa, p.x * sa + p.y * ca);\n\n // Anisotropic tooth \u2014 squished along flow, coarse cross flow.\n float aniso = mix(0.45, 0.95, uStrokeAnisotropy);\n float scale = max(uStrokeScale * 1.6, 180.0);\n\n float t1 = vnoise(vec2(pr.x * scale * aniso, pr.y * scale));\n float t2 = vnoise(vec2(pr.x * scale * aniso * 0.4, pr.y * scale * 0.4) + 11.0);\n float t3 = vnoise(vec2(pr.x * scale * aniso * 2.1, pr.y * scale * 2.1) + 23.0);\n float tooth = 0.55 * t1 + 0.30 * t2 + 0.15 * t3;\n // Center at 0, amplify\n tooth = (tooth - 0.5) * 1.4;\n\n // Multiplicative darkening where tooth is low (pigment skipped paper valleys)\n float lay = 1.0 + tooth * 0.32 * uStrokeAmount;\n vec3 result = col * lay;\n\n // Occasional pressed-in crumbs \u2014 rare darker crumbs\n float crumbs = smoothstep(0.78, 0.95, vnoise(pr * scale * 3.0));\n result *= 1.0 - crumbs * 0.18 * uStrokeAmount;\n\n // Waxy highlight film \u2014 slight lightening on tooth peaks\n float waxy = smoothstep(0.55, 0.85, t1);\n result += waxy * 0.04 * vec3(1.0);\n\n // Paper tooth overlay (subtler than oil's canvas)\n float paperTooth = vnoise(p * 340.0) - 0.5;\n result *= 1.0 + paperTooth * 0.14 * uCanvasGrain;\n\n // Broken-color pigment: stable wax/pigment patches, not temporal flicker.\n vec2 pigmentCell = floor(pr * max(scale * 0.18, 32.0));\n float pigmentMask = smoothstep(0.28, 0.82, vnoise(pr * scale * 0.21 + 19.0));\n result = brokenColorJitter(\n result,\n hash21(pigmentCell + 17.0),\n hash21(pigmentCell * 2.1 + 31.0),\n 0.45 + 0.55 * pigmentMask\n );\n\n // Crayon is saturation-amplified\n result = saturate3(result, 1.12);\n\n return result;\n}\n\nvec3 mediumOil(vec3 col, vec2 p, float t) {\n // Mode knobs (uStrokeMode) \u2014 oil-stroke modes ONLY (crayon is a peer medium,\n // uMedium==4, dispatched at main()):\n // 0 oil \u2014 balanced modern-abstract/palette-knife hybrid\n // 1 knife \u2014 palette-knife impasto: razor edges, heavy bristle/shadow\n // 3 brushwork \u2014 thick bristle brush\n int mode = uStrokeMode;\n\n // Per-mode parameters\n int shapeType = 0; // tapered\n float bristleAmp = 0.25; // 0..0.5\n float streakFreq = 9.0;\n float streakAmp = 0.09;\n float impastoAmp = 0.9;\n float hardness = 0.80; // edge compositing\n float toothScale = 240.0;\n float toothAmp = 0.09;\n float pigmentSat = 1.03;\n float densityBig = 0.65;\n float densityMed = 0.78;\n float densitySml = 0.90;\n\n if (mode == 1) { // palette knife\n shapeType = 3; // flat, even\n bristleAmp = 0.12;\n streakFreq = 4.0; streakAmp = 0.05;\n impastoAmp = 1.6;\n hardness = 0.95;\n toothAmp = 0.04;\n densityBig = 0.80; densityMed = 0.88; densitySml = 0.70;\n } else if (mode == 3) { // thick brushwork\n shapeType = 0; // tapered\n bristleAmp = 0.32;\n streakFreq = 14.0; streakAmp = 0.14;\n impastoAmp = 1.2;\n hardness = 0.85;\n toothAmp = 0.07;\n }\n\n // Scales & multipliers from uniforms\n float baseScale = max(uStrokeScale * 0.006, 0.008);\n // Three layers: big gestural, medium body, small dabs\n float sBig = baseScale * 2.4;\n float sMed = baseScale * 1.1;\n float sSml = baseScale * 0.45;\n\n float lenMulBig = mix(2.2, 3.8, uStrokeAnisotropy);\n float widMulBig = mix(0.55, 0.32, uStrokeAnisotropy);\n float lenMulMed = mix(2.0, 3.4, uStrokeAnisotropy);\n float widMulMed = mix(0.50, 0.30, uStrokeAnisotropy);\n float lenMulSml = mix(1.6, 2.6, uStrokeAnisotropy);\n float widMulSml = mix(0.45, 0.32, uStrokeAnisotropy);\n\n float jitterAmt = 0.75; // large jitter \u2014 no grid\n vec2 flow = flowField(p, t);\n\n vec3 result = col;\n\n // Layer 1 \u2014 big gestural strokes (sparse, shaping)\n StrokeHit hBig = bestOil(p, sBig, lenMulBig, widMulBig, jitterAmt * 0.55,\n densityBig, shapeType, bristleAmp, flow, t, 1.3);\n paintOver(result, hBig, streakFreq * 0.7, streakAmp,\n uImpasto * impastoAmp * uStrokeAmount, hardness, 1.3);\n\n // Layer 2 \u2014 medium body strokes\n StrokeHit hMed = bestOil(p + vec2(11.3, 3.7), sMed, lenMulMed, widMulMed,\n jitterAmt, densityMed, shapeType, bristleAmp, flow, t, 2.7);\n paintOver(result, hMed, streakFreq, streakAmp,\n uImpasto * impastoAmp * uStrokeAmount, hardness, 2.7);\n\n // Layer 3 \u2014 small dabs (more frequent, smaller)\n int smlShape = (mode == 1) ? 2 : shapeType; // knife uses dabs for sparkle\n StrokeHit hSml = bestOil(p + vec2(-5.1, 8.4), sSml, lenMulSml, widMulSml,\n jitterAmt * 1.3, densitySml, smlShape,\n bristleAmp * 0.85, flow, t, 4.1);\n paintOver(result, hSml, streakFreq * 1.4, streakAmp * 0.8,\n uImpasto * impastoAmp * 0.65 * uStrokeAmount, hardness, 4.1);\n\n // Layer 4 \u2014 fill dabs (very dense, very small) \u2014 covers bald spots\n float sFill = baseScale * 0.22;\n float lenMulFill = mix(1.4, 2.0, uStrokeAnisotropy);\n float widMulFill = mix(0.50, 0.38, uStrokeAnisotropy);\n int fillShape = (mode == 1) ? 3 : 2; // knife=even, others=dab (round fills)\n StrokeHit hFill = bestOil(p + vec2(3.9, -6.2), sFill, lenMulFill, widMulFill,\n jitterAmt * 1.5, 0.95, fillShape,\n bristleAmp * 0.6, flow, t, 8.9);\n paintOver(result, hFill, streakFreq * 1.8, streakAmp * 0.6,\n uImpasto * impastoAmp * 0.4 * uStrokeAmount, hardness * 0.9, 8.9);\n\n // Optional crosshatch layer\n if (uStrokeLayers == 2) {\n vec2 flow2 = vec2(-flow.y, flow.x);\n StrokeHit hX = bestOil(p + vec2(7.3, -2.1), sMed, lenMulMed * 0.9, widMulMed,\n jitterAmt, densityMed * 0.7, shapeType, bristleAmp, flow2, t, 6.5);\n paintOver(result, hX, streakFreq, streakAmp * 0.85,\n uImpasto * impastoAmp * 0.55 * uStrokeAmount, hardness, 6.5);\n }\n\n // Canvas tooth \u2014 linen weave\n float tooth1 = vnoise(p * toothScale);\n float tooth2 = vnoise(p * toothScale * vec2(0.6, 2.4) + 37.0);\n float tooth = (0.6 * tooth1 + 0.4 * tooth2) - 0.5;\n result *= 1.0 + tooth * toothAmp * uCanvasGrain;\n\n // Pigment saturation boost\n result = saturate3(result, pigmentSat);\n\n return result;\n}";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AURORA_TONEMAP_GLSL = "// ACES approximation\nvec3 aces(vec3 x) {\n float a = 2.51;\n float b = 0.03;\n float c = 2.43;\n float d = 0.59;\n float e = 0.14;\n return clamp((x * (a * x + b)) / (x * (c * x + d) + e), 0.0, 1.0);\n}\n";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { default as Aurora } from "./Aurora.vue";
|
|
2
|
-
export { resolveRenderMode, type AuroraRenderMode } from "./renderMode";
|
|
2
|
+
export { resolveRenderMode, type AuroraRenderMode } from "./constants/renderMode";
|
|
3
3
|
export { useAurora } from "./composables/useAurora";
|
|
4
4
|
export type { UseAuroraReturn } from "./composables/useAurora";
|
|
5
5
|
export { useCursorInteraction } from "./composables/useCursorInteraction";
|
|
6
6
|
export { createAurora } from "./composables/runtime";
|
|
7
7
|
export type { AuroraRuntimeMode, AuroraRuntimeOptions } from "./composables/runtime";
|
|
8
|
-
export { DEFAULT_AURORA_CONFIG, MAX_NUCLEI, MAX_STOPS, type AuroraConfig, type AuroraCursorApi, type AuroraFlow, type AuroraInstance, type AuroraMedium, type AuroraNucleus, type FlowPattern, type OklchStop, type StrokeMode, type WarpMode, } from "./presets";
|
|
8
|
+
export { DEFAULT_AURORA_CONFIG, MAX_NUCLEI, MAX_STOPS, type AuroraConfig, type AuroraCursorApi, type AuroraFlow, type AuroraInstance, type AuroraMedium, type AuroraNucleus, type FlowPattern, type OklchStop, type StrokeMode, type WarpMode, } from "./constants/presets";
|
|
9
9
|
export { cssToOklch, deriveAurora, flattenPalette, hexToOklchStop, oklchStopToHex, oklchToLinear, paletteToCssGradient, } from "./composables/color";
|
|
10
10
|
export type { AuroraHarmony, DeriveAuroraOptions } from "./composables/color";
|
|
@@ -38,25 +38,32 @@ type __VLS_Props = {
|
|
|
38
38
|
sub?: string;
|
|
39
39
|
/** Optional id used by external state (e.g., a sibling tab row). */
|
|
40
40
|
id?: string;
|
|
41
|
-
/** Controlled open state. Pair with `@update:open`. */
|
|
42
|
-
open?: boolean;
|
|
43
41
|
/** Uncontrolled initial state. */
|
|
44
42
|
defaultOpen?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Opt-in inter-row hairline. When set, sibling rows inside the body
|
|
45
|
+
* are separated by a `border-border/30` top rule (the first row stays
|
|
46
|
+
* flush). Default `false` keeps the body gap-only (pre-AU.W9 visual).
|
|
47
|
+
*/
|
|
48
|
+
dividers?: boolean;
|
|
45
49
|
class?: HTMLAttributes["class"];
|
|
46
50
|
/** Body wrapper class override. */
|
|
47
51
|
bodyClass?: HTMLAttributes["class"];
|
|
48
52
|
};
|
|
53
|
+
type __VLS_ModelProps = {
|
|
54
|
+
"open"?: boolean | undefined;
|
|
55
|
+
};
|
|
56
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
49
57
|
declare var __VLS_6: {};
|
|
50
58
|
type __VLS_Slots = {} & {
|
|
51
59
|
default?: (props: typeof __VLS_6) => any;
|
|
52
60
|
};
|
|
53
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
54
|
-
"update:open": (value: boolean) => any;
|
|
55
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
56
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
61
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
62
|
+
"update:open": (value: boolean | undefined) => any;
|
|
63
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
64
|
+
"onUpdate:open"?: ((value: boolean | undefined) => any) | undefined;
|
|
57
65
|
}>, {
|
|
58
66
|
defaultOpen: boolean;
|
|
59
|
-
open: boolean;
|
|
60
67
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
61
68
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
62
69
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComputedRef } from "vue";
|
|
2
2
|
/**
|
|
3
3
|
* Density axis for `<Configurator>` + `<ConfiguratorRow>` (N.W2 Lane A).
|
|
4
4
|
*
|
|
@@ -15,16 +15,11 @@ import { type ComputedRef, type InjectionKey } from "vue";
|
|
|
15
15
|
* for-bit preserved.
|
|
16
16
|
*/
|
|
17
17
|
export type ConfiguratorDensity = "mobile" | "compact" | "comfortable" | "spacious";
|
|
18
|
-
|
|
19
|
-
* Provide / inject key for the cascading density value. Carries a
|
|
20
|
-
* `ComputedRef<ConfiguratorDensity>` so descendants stay reactive when
|
|
21
|
-
* the host swaps density (e.g., viewport-driven mobile/desktop branch).
|
|
22
|
-
*/
|
|
23
|
-
export declare const CONFIGURATOR_DENSITY_KEY: InjectionKey<ComputedRef<ConfiguratorDensity>>;
|
|
18
|
+
export declare const CONFIGURATOR_DENSITY_KEY: import("vue").InjectionKey<ComputedRef<ConfiguratorDensity>>;
|
|
24
19
|
export declare function provideConfiguratorDensity(density: ComputedRef<ConfiguratorDensity>): void;
|
|
25
20
|
/**
|
|
26
21
|
* Befitting silent default — returns `null` when there is no ancestor
|
|
27
22
|
* `<Configurator>`. The consumer null-coalesces to `undefined` so the
|
|
28
23
|
* `:data-density` binding emits no attribute (pre-N.W2 visual preserved).
|
|
29
24
|
*/
|
|
30
|
-
export declare
|
|
25
|
+
export declare const useOptionalConfiguratorDensity: () => ComputedRef<ConfiguratorDensity> | null;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <DockBackgroundToggle> — the WCAG 2.2.2 (Pause, Stop, Hide), Level A pause/play
|
|
3
|
+
* control for a continuously-running AV background (Aurora / GooBlob).
|
|
4
|
+
*
|
|
5
|
+
* WCAG 2.2.2 is OBLIGATORY for any auto-starting, >5s, non-essential motion and
|
|
6
|
+
* the control must be available to ALL users — it is NOT gated behind
|
|
7
|
+
* `prefers-reduced-motion` (which the substrate handles separately via the G1
|
|
8
|
+
* freeze). This is the USER-driven stop control any user can reach.
|
|
9
|
+
*
|
|
10
|
+
* Binding contract (KISS — it binds an EXISTING renderer seam, adds no parallel
|
|
11
|
+
* pause path): the consumer holds the paused state and wires it to the renderer's
|
|
12
|
+
* `pause()`/`resume()`. The toggle is a thin `v-model:paused` control over a
|
|
13
|
+
* `<DockIconButton>` host (the dock is the natural home for a background control):
|
|
14
|
+
*
|
|
15
|
+
* ```vue
|
|
16
|
+
* <script setup>
|
|
17
|
+
* const blob = ref<InstanceType<typeof GooBlob>>();
|
|
18
|
+
* const paused = ref(false);
|
|
19
|
+
* watch(paused, (p) => (p ? blob.value?.pause() : blob.value?.resume()));
|
|
20
|
+
* <\/script>
|
|
21
|
+
* <DockBackgroundToggle v-model:paused="paused" />
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* The control reflects state via `aria-pressed` (pressed ⇒ paused) and swaps the
|
|
25
|
+
* Pause↔Play glyph + the accessible label, so a screen reader announces both the
|
|
26
|
+
* action and the current state.
|
|
27
|
+
*/
|
|
28
|
+
type __VLS_Props = {
|
|
29
|
+
/** Whether the background is currently paused (the controlled state). */
|
|
30
|
+
paused?: boolean;
|
|
31
|
+
/** Accessible label when RUNNING (the action: pause). */
|
|
32
|
+
pauseLabel?: string;
|
|
33
|
+
/** Accessible label when PAUSED (the action: play/resume). */
|
|
34
|
+
playLabel?: string;
|
|
35
|
+
};
|
|
36
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
37
|
+
"update:paused": (value: boolean) => any;
|
|
38
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
39
|
+
"onUpdate:paused"?: ((value: boolean) => any) | undefined;
|
|
40
|
+
}>, {
|
|
41
|
+
paused: boolean;
|
|
42
|
+
pauseLabel: string;
|
|
43
|
+
playLabel: string;
|
|
44
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const _default: typeof __VLS_export;
|
|
46
|
+
export default _default;
|
|
@@ -21,12 +21,12 @@ type __VLS_Props = {
|
|
|
21
21
|
asChild?: boolean;
|
|
22
22
|
class?: HTMLAttributes["class"];
|
|
23
23
|
};
|
|
24
|
-
declare var
|
|
24
|
+
declare var __VLS_10: {};
|
|
25
25
|
type __VLS_Slots = {} & {
|
|
26
|
-
default?: (props: typeof
|
|
26
|
+
default?: (props: typeof __VLS_10) => any;
|
|
27
27
|
};
|
|
28
28
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
29
|
-
type: "button" | "
|
|
29
|
+
type: "button" | "submit" | "reset";
|
|
30
30
|
asChild: boolean;
|
|
31
31
|
as: string | Component;
|
|
32
32
|
compact: boolean;
|
|
@@ -21,9 +21,9 @@ type __VLS_ModelProps = {
|
|
|
21
21
|
"active": string;
|
|
22
22
|
};
|
|
23
23
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
24
|
-
declare var
|
|
24
|
+
declare var __VLS_32: {};
|
|
25
25
|
type __VLS_Slots = {} & {
|
|
26
|
-
default?: (props: typeof
|
|
26
|
+
default?: (props: typeof __VLS_32) => any;
|
|
27
27
|
};
|
|
28
28
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
29
|
"update:active": (value: string) => any;
|
|
@@ -5,8 +5,6 @@ type __VLS_Props = {
|
|
|
5
5
|
fitContent?: boolean;
|
|
6
6
|
position?: "fixed" | "inline" | "sticky";
|
|
7
7
|
alwaysExpanded?: boolean;
|
|
8
|
-
/** Allow expanded content to wrap to multiple lines. */
|
|
9
|
-
wrap?: boolean;
|
|
10
8
|
/**
|
|
11
9
|
* Visual/behavioral preset.
|
|
12
10
|
* `dock` — the horizontal floating dock (default).
|
|
@@ -46,10 +44,16 @@ type __VLS_Props = {
|
|
|
46
44
|
/**
|
|
47
45
|
* Overflow strategy when the expanded content exceeds the dock's
|
|
48
46
|
* axis cap (`--dock-max-inline-size` horizontally,
|
|
49
|
-
* `--dock-max-block-size` vertically).
|
|
47
|
+
* `--dock-max-block-size` vertically). The ONE knob governing every
|
|
48
|
+
* overflow behaviour (AT.W7-dock-a clean break — collapsed from the
|
|
49
|
+
* prior `wrap` boolean + `overflow` pair + `containerName` clip-lift,
|
|
50
|
+
* which all touched overflow divergently).
|
|
50
51
|
* `"grow"` — content grows to fit then overflows visibly past
|
|
51
|
-
* the cap (the
|
|
52
|
-
*
|
|
52
|
+
* the cap (the default; nothing clips or scrolls).
|
|
53
|
+
* `"wrap"` — expanded content wraps to multiple lines/rows (the
|
|
54
|
+
* `.dock-overflow-wrap` recipe — a multi-row pill that narrows
|
|
55
|
+
* to the viewport gutter on small screens and snaps
|
|
56
|
+
* back to a single nowrap row past `--dock-overflow-bp`).
|
|
53
57
|
* `"scroll"` — the dock becomes the scroll port. Horizontal docks
|
|
54
58
|
* scroll the active layer on the inline axis
|
|
55
59
|
* (`.dock-scroll-x`); vertical rails scroll on the
|
|
@@ -58,18 +62,19 @@ type __VLS_Props = {
|
|
|
58
62
|
* scroll edge; the scrollbar is hidden. The axis is
|
|
59
63
|
* chosen automatically from `orientation`.
|
|
60
64
|
*/
|
|
61
|
-
overflow?: "grow" | "scroll";
|
|
65
|
+
overflow?: "grow" | "wrap" | "scroll";
|
|
62
66
|
/**
|
|
63
67
|
* When set, the dock root establishes an inline-size container query
|
|
64
|
-
* subject (`container-type: inline-size; container-name: <value>`)
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
+
* subject (`container-type: inline-size; container-name: <value>`) so
|
|
69
|
+
* descendants can query the named container via `@container <value>
|
|
70
|
+
* (...)` rules. ORTHOGONAL to the `overflow` clip: opting into a
|
|
71
|
+
* container subject does NOT silently change the dock's clip shell
|
|
72
|
+
* (AT.W7-dock-a — the prior clip-lift was folded out; use
|
|
73
|
+
* `overflow="wrap"` to allow multi-line content).
|
|
68
74
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* on a descendant whose intrinsic size the dock relies on.
|
|
75
|
+
* T.B audit §1.3 cornerstone: the cluster's container subject must
|
|
76
|
+
* live on the dock primitive, never on a descendant whose intrinsic
|
|
77
|
+
* size the dock relies on.
|
|
73
78
|
*/
|
|
74
79
|
containerName?: string;
|
|
75
80
|
};
|
|
@@ -92,16 +97,15 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
|
92
97
|
release: () => void;
|
|
93
98
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
94
99
|
position: "fixed" | "inline" | "sticky";
|
|
95
|
-
overflow: "grow" | "scroll";
|
|
96
|
-
variant: "dock" | "rail" | "instrument-strip";
|
|
100
|
+
overflow: "grow" | "wrap" | "scroll";
|
|
97
101
|
orientation: "horizontal" | "vertical";
|
|
98
|
-
|
|
102
|
+
variant: "dock" | "rail" | "instrument-strip";
|
|
99
103
|
density: DockDensity;
|
|
104
|
+
shape: "pill" | "rounded";
|
|
100
105
|
collapseDelay: number;
|
|
101
106
|
alwaysExpanded: boolean;
|
|
102
107
|
startCollapsed: boolean;
|
|
103
108
|
fitContent: boolean;
|
|
104
|
-
shape: "pill" | "rounded";
|
|
105
109
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
106
110
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
107
111
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComputedRef } from "vue";
|
|
2
2
|
export type DockOrientation = "horizontal" | "vertical";
|
|
3
3
|
/**
|
|
4
4
|
* Dock context surfaces the dock id + orientation + held-state coordination
|
|
@@ -32,9 +32,9 @@ export interface DockContext {
|
|
|
32
32
|
/** Reactive `keepOpenCount > 0` flag; descendants reflect via `data-held`. */
|
|
33
33
|
held: ComputedRef<boolean>;
|
|
34
34
|
}
|
|
35
|
-
export declare const DOCK_CONTEXT_KEY: InjectionKey<DockContext>;
|
|
35
|
+
export declare const DOCK_CONTEXT_KEY: import("vue").InjectionKey<DockContext>;
|
|
36
36
|
export declare function provideDockContext(context: DockContext): void;
|
|
37
37
|
/** Strict — throws when used outside `<GlassDock>`. */
|
|
38
|
-
export declare
|
|
38
|
+
export declare const useDockContext: () => DockContext;
|
|
39
39
|
/** Befitting silent default for primitives that may render outside a dock. */
|
|
40
|
-
export declare
|
|
40
|
+
export declare const useOptionalDockContext: () => DockContext | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Component, Ref } from "vue";
|
|
2
2
|
/**
|
|
3
3
|
* DockLayerGroup context — DI surface for `<DockLayer>` children registering
|
|
4
4
|
* with their parent `<DockLayerGroup>` for the switcher rail + crossfade
|
|
@@ -18,12 +18,19 @@ export interface DockLayerDescriptor {
|
|
|
18
18
|
export interface DockLayerGroupContext {
|
|
19
19
|
register(desc: DockLayerDescriptor): void;
|
|
20
20
|
unregister(id: string): void;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
/**
|
|
22
|
+
* AU.W8b.6 — group-orchestrated layer state, exposed READ-ONLY. The
|
|
23
|
+
* `<DockLayerGroup>` (via `useLayerTransition`) owns the writable refs and
|
|
24
|
+
* provides `readonly()` projections; a `<DockLayer>` child can read but
|
|
25
|
+
* never write this state. A child `currentLayerId.value = …` is a compile
|
|
26
|
+
* error (see `__tests__/dockLayerContext.readonly.test-d.ts`).
|
|
27
|
+
*/
|
|
28
|
+
currentLayerId: Readonly<Ref<string>>;
|
|
29
|
+
leavingLayerId: Readonly<Ref<string | null>>;
|
|
23
30
|
}
|
|
24
|
-
export declare const DOCK_LAYER_GROUP_KEY: InjectionKey<DockLayerGroupContext>;
|
|
31
|
+
export declare const DOCK_LAYER_GROUP_KEY: import("vue").InjectionKey<DockLayerGroupContext>;
|
|
25
32
|
export declare function provideDockLayerGroupContext(context: DockLayerGroupContext): void;
|
|
26
33
|
/** Strict — throws when used outside `<DockLayerGroup>`. */
|
|
27
|
-
export declare
|
|
34
|
+
export declare const useDockLayerGroupContext: () => DockLayerGroupContext;
|
|
28
35
|
/** Befitting silent default; reserved for future consumers. */
|
|
29
|
-
export declare
|
|
36
|
+
export declare const useOptionalDockLayerGroupContext: () => DockLayerGroupContext | null;
|
|
@@ -31,14 +31,38 @@ export interface UseLayerTransitionReturn {
|
|
|
31
31
|
* the size + crossfades the pane content with ZERO `getBoundingClientRect`
|
|
32
32
|
* reads. No pin/measure/re-pin dance, no inline size, no rAF.
|
|
33
33
|
*
|
|
34
|
-
* - **Fallback path** (no `startViewTransition`): the
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
34
|
+
* - **Fallback path** (no `startViewTransition`): the axis-aware FLIP, KEPT as
|
|
35
|
+
* the sole feature-detected fallback (no alias — one path or the other runs per
|
|
36
|
+
* swap, never both). It is now the ONLY driver that writes inline size on a
|
|
37
|
+
* non-VT engine (AV.W9.0 retired the `interpolate-size`/`calc-size` CSS arm that
|
|
38
|
+
* used to second-drive width on Chrome 129+ and freeze the dock):
|
|
39
|
+
* 1. Capture current container size (or the live spring's pixel value on a
|
|
40
|
+
* retarget)
|
|
38
41
|
* 2. Pin container to that size
|
|
39
|
-
* 3.
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
42
|
+
* 3. nextTick → rAF: swap classes (old → leaving, new → active) AND measure new
|
|
43
|
+
* natural size in ONE frame origin
|
|
44
|
+
* 4. Drive size off ONE `SpringProgress` clock in PIXEL space (its `value` IS
|
|
45
|
+
* the live width/height)
|
|
46
|
+
* 5. On settle, clear inline size + restore the CSS transition
|
|
47
|
+
*
|
|
48
|
+
* AV.W9.2 — velocity-continuity: an interrupted swap (a re-toggle while the
|
|
49
|
+
* spring is still live) RE-SEATS the existing solver's target from its current
|
|
50
|
+
* `(value, velocity)` instead of dispose+reconstruct-from-rest, so the morph is
|
|
51
|
+
* continuous through a retarget (the iOS interruptible-spring contract).
|
|
52
|
+
*
|
|
53
|
+
* AV.W7 perf folds:
|
|
54
|
+
* - F3 — on-demand `will-change`: the morphing box gets `will-change:<dim>`
|
|
55
|
+
* ONLY for the gesture's duration (set just before the spring drives it,
|
|
56
|
+
* cleared to `auto` on settle/`transitionend`). NEVER a standing hint — a
|
|
57
|
+
* permanent `will-change` holds a compositor layer + VRAM for an idle dock.
|
|
58
|
+
* - F5 — inheritance-bomb guard (CONVENTION): this driver animates ONLY the
|
|
59
|
+
* element's own `width`/`height` (the spring's pixel-space `value`) and the
|
|
60
|
+
* pane opacity rides a class-driven CSS transition on the SEPARATE
|
|
61
|
+
* `.dock-layer-item-host`. NO INHERITED custom property (`--phase-color` /
|
|
62
|
+
* `--shadow-color`) is TWEENED per frame here — animating an inherited
|
|
63
|
+
* custom property forces a whole-subtree style recalc every frame (the
|
|
64
|
+
* inheritance bomb). Phase/shadow colors are SET on a discrete state change,
|
|
65
|
+
* never interpolated frame-by-frame. Keep new motion on `transform`/`opacity`
|
|
66
|
+
* /`width`/`height`; route any color shift through a discrete class swap.
|
|
43
67
|
*/
|
|
44
68
|
export declare function useLayerTransition(options: UseLayerTransitionOptions): UseLayerTransitionReturn;
|
|
@@ -2,6 +2,7 @@ export { default as GlassDock } from "./GlassDock.vue";
|
|
|
2
2
|
export { default as DockLayerGroup } from "./DockLayerGroup.vue";
|
|
3
3
|
export { default as DockLayer } from "./DockLayer.vue";
|
|
4
4
|
export { default as DockIconButton } from "./DockIconButton.vue";
|
|
5
|
+
export { default as DockBackgroundToggle } from "./DockBackgroundToggle.vue";
|
|
5
6
|
export { default as DockTabButton } from "./DockTabButton.vue";
|
|
6
7
|
export { default as DockSelectTrigger } from "./DockSelectTrigger.vue";
|
|
7
8
|
export { default as DockDropdownTrigger } from "./DockDropdownTrigger.vue";
|
|
@@ -2,6 +2,10 @@ declare const _default: typeof __VLS_export;
|
|
|
2
2
|
export default _default;
|
|
3
3
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
4
4
|
buttonPosition?: "left" | "right";
|
|
5
|
+
/** Accessible name for the expand (fullscreen) button. */
|
|
6
|
+
expandLabel?: string;
|
|
7
|
+
/** Accessible name for the collapse (exit fullscreen) button. */
|
|
8
|
+
collapseLabel?: string;
|
|
5
9
|
} & {
|
|
6
10
|
/**
|
|
7
11
|
* Two-way `open` model so consumers can drive fullscreen externally
|
|
@@ -13,6 +17,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
13
17
|
"update:open": (value: boolean) => any;
|
|
14
18
|
}, string, import("vue").PublicProps, Readonly<{
|
|
15
19
|
buttonPosition?: "left" | "right";
|
|
20
|
+
/** Accessible name for the expand (fullscreen) button. */
|
|
21
|
+
expandLabel?: string;
|
|
22
|
+
/** Accessible name for the collapse (exit fullscreen) button. */
|
|
23
|
+
collapseLabel?: string;
|
|
16
24
|
} & {
|
|
17
25
|
/**
|
|
18
26
|
* Two-way `open` model so consumers can drive fullscreen externally
|
|
@@ -24,6 +32,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
24
32
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
25
33
|
}>, {
|
|
26
34
|
buttonPosition: "left" | "right";
|
|
35
|
+
expandLabel: string;
|
|
36
|
+
collapseLabel: string;
|
|
27
37
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
28
38
|
default?: (props: {
|
|
29
39
|
fullscreen: boolean;
|