@mkbabb/glass-ui 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CardAction-q2qHCJFG.js +157 -0
- package/dist/{CommandShortcut-CY0aQTz5.js → CommandShortcut-SzWRhROC.js} +2 -2
- package/dist/{ContextMenuSubContent-BeDz7G6f.js → ContextMenuSubContent-Do977Cbf.js} +1 -1
- package/dist/{DataTable-gtPOLZvl.js → DataTable-CvlWXz65.js} +3 -3
- package/dist/DeckProgress-AVgbIULY.js +23 -0
- package/dist/{DialogContent-DG1YMR-P.js → DialogContent-DjZWT3lK.js} +2 -2
- package/dist/{DialogFooter-BCIaDP15.js → DialogFooter-Gprw8H_A.js} +1 -1
- package/dist/{DiscoGlyph-ZoBYpoxI.js → DiscoGlyph-CG0F410s.js} +1 -1
- package/dist/{GlyphFace-Ce_oe3tM.js → GlyphFace-DRjDkB0s.js} +1 -1
- package/dist/{HoverPopover-DXpOEw1P.js → HoverPopover-D56O6Ylp.js} +1 -1
- package/dist/{IconTooltip-Cu86JR4e.js → IconTooltip-D2T5nYOM.js} +1 -1
- package/dist/{MetricBadge-D-bRaQUD.js → MetricBadge-lTc002u2.js} +1 -1
- package/dist/{Notification-B5WHP3_1.js → Notification-BxK8LZMw.js} +1 -1
- package/dist/{PopoverContent-F1bWnYoh.js → PopoverContent-BId6ggf_.js} +1 -1
- package/dist/{Progress-c4vo4ALi.js → Progress-iEuD9pxG.js} +4 -4
- package/dist/{ScrollingText-BEp377U5.js → ScrollingText-CVyqxvfv.js} +2 -2
- package/dist/{SelectScrollDownButton-DAo5NmY_.js → SelectScrollDownButton-C7TRe-ep.js} +2 -2
- package/dist/{ToggleGroupItem-C-AIkBUw.js → ToggleGroupItem-CkXUcBlt.js} +1 -1
- package/dist/{UnderlineTabs-D_c1iYo-.js → UnderlineTabs-Uxn-R3MT.js} +2 -2
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +4 -2
- package/dist/api.js +1 -1
- package/dist/aurora.js +336 -405
- package/dist/canvas.d.ts +1 -0
- package/dist/canvas.js +3 -0
- package/dist/card.js +1 -1
- package/dist/carousel.js +105 -104
- package/dist/collapsible.js +1 -1
- package/dist/{color-DjJCAQ6f.js → color-DMLTunJK.js} +22 -14
- package/dist/color.js +2 -2
- package/dist/command.js +1 -1
- package/dist/compile-BBTRjvQS.js +158 -0
- package/dist/components/custom/aurora/composables/atoms.d.ts +90 -25
- package/dist/components/custom/aurora/composables/color.d.ts +0 -12
- package/dist/components/custom/aurora/composables/uniformBridge.d.ts +34 -23
- package/dist/components/custom/aurora/constants/presets.d.ts +10 -7
- package/dist/components/custom/aurora/constants/renderMode.d.ts +22 -0
- package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +1 -1
- package/dist/components/custom/aurora/constants/shaders/brush.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/constants/shaders/composition.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/constants/shaders/mediums.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/index.d.ts +3 -3
- package/dist/components/custom/constellation/Constellation.vue.d.ts +40 -5
- package/dist/components/custom/constellation/constellationField.d.ts +110 -5
- package/dist/components/custom/constellation/index.d.ts +2 -2
- package/dist/components/custom/dock/GlassDock.vue.d.ts +12 -4
- package/dist/components/custom/dock/composables/dockMorphContext.d.ts +57 -0
- package/dist/components/custom/dock/composables/index.d.ts +3 -0
- package/dist/components/custom/dock/composables/useDockHold.d.ts +61 -0
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +13 -59
- package/dist/components/custom/dock/index.d.ts +2 -0
- package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +13 -0
- package/dist/components/custom/goo-blob/composables/useBlobMood.d.ts +4 -0
- package/dist/components/custom/goo-blob/composables/useBlobPointer.d.ts +2 -0
- package/dist/components/custom/goo-blob/composables/useBlobSatellites.d.ts +2 -0
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +20 -5
- package/dist/components/custom/goo-blob/index.d.ts +1 -1
- package/dist/components/custom/goo-blob/shaders/sdf-body.glsl.d.ts +1 -1
- package/dist/components/custom/goo-blob/shaders/watercolor-edges.glsl.d.ts +2 -2
- package/dist/components/custom/goo-blob/types.d.ts +8 -0
- package/dist/components/ui/card/Card.vue.d.ts +23 -7
- package/dist/components/ui/card/index.d.ts +1 -1
- package/dist/components/ui/progress/ProgressDefault.vue.d.ts +14 -4
- package/dist/components/ui/slider/Slider.vue.d.ts +3 -1
- package/dist/composables/color/index.d.ts +19 -0
- package/dist/composables/dom/index.d.ts +1 -1
- package/dist/composables/dom/useResolveTokenColor.d.ts +27 -0
- package/dist/composables/glass/canvas2d/index.d.ts +2 -1
- package/dist/composables/glass/canvas2d/resolveCanvasColor.d.ts +20 -0
- package/dist/composables/glass/canvas2d/useCanvas2D.d.ts +15 -1
- package/dist/composables/glass/index.d.ts +3 -1
- package/dist/composables/glass/useSpecularTracking.d.ts +33 -0
- package/dist/composables/glass/webgl/createCanvasLifecycle.d.ts +1 -1
- package/dist/composables/glass/webgl/shaders/procedural-color.glsl.d.ts +4 -0
- package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +1 -1
- package/dist/composables/motion/core/index.d.ts +1 -0
- package/dist/configurator.js +1 -1
- package/dist/confirm-dialog.js +1 -1
- package/dist/constellation.js +144 -75
- package/dist/context-menu.js +2 -2
- package/dist/controls.js +2 -2
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/deck-progress.d.ts +1 -0
- package/dist/deck-progress.js +2 -0
- package/dist/dialog.js +2 -2
- package/dist/disco-glyph.js +1 -1
- package/dist/dock.js +386 -285
- package/dist/{dockContext-DLgrVWsU.js → dockContext-BKeIMmNk.js} +1 -1
- package/dist/dom.js +6 -6
- package/dist/{dropdown-menu-BWpwutt0.js → dropdown-menu-B_4bWyyG.js} +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/expandable-container.js +1 -1
- package/dist/fonts/README.md +26 -18
- package/dist/forms.js +3 -3
- package/dist/fourier-field.js +37 -37
- package/dist/glass-carousel.js +12 -7
- package/dist/glass-panel.js +7 -7
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +150 -162
- package/dist/glyph-face.js +2 -2
- package/dist/goo-blob.js +353 -270
- package/dist/header-ribbon.js +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/hover-popover.js +1 -1
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/instrument-chassis.js +1 -1
- package/dist/instrument-rail.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/{keys-Dyf_uTs5.js → keys-BsYjEFOW.js} +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +6 -6
- package/dist/metric-badge.js +1 -1
- package/dist/metric-stack.js +1 -1
- package/dist/motion-core.js +65 -65
- package/dist/motion.js +3 -3
- package/dist/notification.js +1 -1
- package/dist/paper-backdrop.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +2 -2
- package/dist/resolveCanvasColor-BBiYfp8g.js +11 -0
- package/dist/responsive-tabs.js +2 -2
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +7 -7
- package/dist/select.js +3 -3
- package/dist/separator.js +1 -1
- package/dist/{sheet-Cv1uO-Gq.js → sheet-VZEtNFvO.js} +2 -2
- package/dist/sheet.js +1 -1
- package/dist/slider-D9puf-Ko.js +142 -0
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +3 -3
- package/dist/styles/components.css +1 -1
- package/dist/styles/dock-controls.css +21 -18
- package/dist/styles/dock.css +415 -224
- package/dist/styles/fonts.css +0 -25
- package/dist/styles/glass.css +100 -41
- package/dist/styles/theme.css +9 -2
- package/dist/styles/tokens.css +139 -32
- package/dist/styles/typography.css +52 -69
- package/dist/styles/utilities.css +2 -1
- package/dist/styles/view-transition.css +12 -40
- package/dist/switch.js +1 -1
- package/dist/tabs.js +5 -5
- package/dist/timeline.js +3 -3
- package/dist/toast.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{useAnimatedNumber-C5I3wWd8.js → useAnimatedNumber-C_3wZLx4.js} +1 -1
- package/dist/{useCanvas2D-C31yfUGY.js → useCanvas2D-ClrQuZtp.js} +2 -1
- package/dist/{useConfiguratorState-B24TcgIn.js → useConfiguratorState-CMff4GzH.js} +3 -3
- package/dist/useResolveTokenColor-r9pnNjqK.js +24 -0
- package/dist/useSpecularTracking-BVRZsRHA.js +26 -0
- package/dist/{useTextHighlight-aMPdEpkq.js → useTextHighlight-9nMW23Qb.js} +1 -1
- package/dist/{useTouchGate-YQRwyUGU.js → useTouchGate-WFyJYsth.js} +1 -1
- package/dist/vReveal-CqaCz_mC.js +44 -0
- package/dist/watercolor-dot.js +2 -2
- package/package.json +36 -4
- package/src/fonts/README.md +26 -18
- package/src/styles/dock-controls.css +21 -18
- package/src/styles/dock.css +415 -224
- package/src/styles/fonts.css +0 -25
- package/src/styles/glass.css +100 -41
- package/src/styles/theme.css +9 -2
- package/src/styles/tokens.css +139 -32
- package/src/styles/typography.css +52 -69
- package/src/styles/utilities.css +2 -1
- package/src/styles/view-transition.css +12 -40
- package/dist/CardAction-D8nSE62a.js +0 -163
- package/dist/compile-iM4IUB66.js +0 -158
- package/dist/fonts/fraunces/fraunces-latin.woff2 +0 -0
- package/dist/slider-BA9wIs5e.js +0 -130
- package/dist/useViewTransition-DaN5Zrox.js +0 -21
- package/dist/vReveal-BE2TsPoR.js +0 -24
- package/src/fonts/fraunces/fraunces-latin.woff2 +0 -0
- /package/dist/{CollapsibleContent-D7UNsXQr.js → CollapsibleContent-CP9qF1v4.js} +0 -0
- /package/dist/{ContextMenuContent-DGKZX1Du.js → ContextMenuContent-DDa0v27s.js} +0 -0
- /package/dist/{HoverCardContent-Bn0UBMY9.js → HoverCardContent-B6CcQ8He.js} +0 -0
- /package/dist/{Input-DWQQIOC4.js → Input-DVG_J0ne.js} +0 -0
- /package/dist/{InstrumentChassis-BLJBl1BW.js → InstrumentChassis-C2f6cBaQ.js} +0 -0
- /package/dist/{InstrumentRail-BElFwKyt.js → InstrumentRail-CUJ05YVG.js} +0 -0
- /package/dist/{Label-DBc7bKzZ.js → Label-zRfbQdCn.js} +0 -0
- /package/dist/{ModalOverlay-D1VrWyoi.js → ModalOverlay-B1GkAjNb.js} +0 -0
- /package/dist/{PaperBackdrop-DCGoGatv.js → PaperBackdrop-CqwjnfLv.js} +0 -0
- /package/dist/{SelectGroup-BcaFjvP4.js → SelectGroup-BFiod7X2.js} +0 -0
- /package/dist/{SelectSeparator-COFMJGng.js → SelectSeparator-L8pPEn4L.js} +0 -0
- /package/dist/{Separator-DZyqsCum.js → Separator-D7sD7RKj.js} +0 -0
- /package/dist/{Switch-2rsAtDfA.js → Switch-LDKLmmgx.js} +0 -0
- /package/dist/{TabsList-COqIdW7i.js → TabsList-qyHZ2lKY.js} +0 -0
- /package/dist/{Toaster-BMaeziJJ.js → Toaster-CabYEEF_.js} +0 -0
- /package/dist/{TooltipProvider-CD2IXfRv.js → TooltipProvider-CmZzCuaG.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-gLzyemvl.js → _plugin-vue_export-helper-ok8pgSl5.js} +0 -0
- /package/dist/composables/{dom → motion}/useTextHighlight.d.ts +0 -0
- /package/dist/{constants-CS75AWHG.js → constants-BPOqYJAm.js} +0 -0
- /package/dist/{createContext-CvNyBk4o.js → createContext-B44Sah_H.js} +0 -0
- /package/dist/{menuItemVariants-B4eFR5Ix.js → menuItemVariants-DKM85SNE.js} +0 -0
- /package/dist/{presets-BKVyQfbt.js → presets-D1XPuTj-.js} +0 -0
- /package/dist/{prng-wHuHlNHE.js → prng-COGhh02-.js} +0 -0
- /package/dist/{useGlassRenderer-HebgSEgN.js → useGlassRenderer-5I0YkI4t.js} +0 -0
- /package/dist/{useGlobalDark-yhL4Wp-s.js → useGlobalDark-D3EBWzXK.js} +0 -0
- /package/dist/{useIntersectionPause-Cc-H9ees.js → useIntersectionPause-Bj4sPkMh.js} +0 -0
- /package/dist/{useInterval-D3USn0yc.js → useInterval-CcLfq2WU.js} +0 -0
- /package/dist/{useKeyboardShortcuts-Be3w_Rwk.js → useKeyboardShortcuts-BXWXOZ-9.js} +0 -0
- /package/dist/{useResizeObserver-CSyxGxIX.js → useResizeObserver-CWCbk5Px.js} +0 -0
- /package/dist/{useScrollProgress-CAH8Ofwt.js → useScrollProgress-C9ysDic5.js} +0 -0
- /package/dist/{useSortable-C8ReQ50P.js → useSortable-MGAbCGVJ.js} +0 -0
- /package/dist/{useSpringMount-LRZqJTaF.js → useSpringMount-BJSHcLl3.js} +0 -0
- /package/dist/{useTimer-DEJonOZa.js → useTimer-3xqf_54b.js} +0 -0
- /package/dist/{useUserInvalidAria-CQKjEfwP.js → useUserInvalidAria-DoJKMZ3s.js} +0 -0
- /package/dist/{useViewportReady-K96m-Mdv.js → useViewportReady-RIr5Wgkh.js} +0 -0
|
@@ -2,78 +2,32 @@ import type { Ref } from "vue";
|
|
|
2
2
|
export interface UseLayerTransitionOptions {
|
|
3
3
|
/** The container element that owns the stacked layer panes. */
|
|
4
4
|
containerEl: Ref<HTMLElement | null>;
|
|
5
|
-
/** The currently active layer id */
|
|
5
|
+
/** The currently active layer id. */
|
|
6
6
|
activeLayer: Ref<string>;
|
|
7
7
|
/**
|
|
8
|
-
* Animation axis. `"horizontal"`
|
|
9
|
-
*
|
|
8
|
+
* Animation axis. `"horizontal"` morphs the inline axis; `"vertical"` morphs
|
|
9
|
+
* the block axis. Defaults to horizontal when omitted.
|
|
10
10
|
*/
|
|
11
11
|
axis?: Ref<"horizontal" | "vertical">;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* The outer collapsed↔expanded pair resolves `dock-expand` / `dock-collapse`;
|
|
18
|
-
* the inner DockLayerGroup pane swap resolves `layer-forward` / `layer-back`.
|
|
19
|
-
* Omit to run the single symmetric curve. Feature-detected — degrades to the
|
|
20
|
-
* symmetric curve on an engine without the `types` overload (Firefox 144).
|
|
13
|
+
* Retained for API parity with the prior VT-typed signature (consumed by
|
|
14
|
+
* `GlassDock` + `DockLayerGroup`). The single-scalar morph runs ONE symmetric
|
|
15
|
+
* spring on every engine, so the direction hint is no longer a curve fork — it
|
|
16
|
+
* is accepted and ignored. Kept so the call sites need no edit.
|
|
21
17
|
*/
|
|
22
18
|
directionTypes?: (from: string, to: string) => string[];
|
|
23
19
|
}
|
|
24
20
|
export interface UseLayerTransitionReturn {
|
|
25
|
-
/** Attach to
|
|
21
|
+
/** Attach to `@transitionend` on the container (kept for call-site parity). */
|
|
26
22
|
onTransitionEnd(e: TransitionEvent): void;
|
|
27
|
-
/** The currently active layer id (post-swap) */
|
|
23
|
+
/** The currently active layer id (post-swap). */
|
|
28
24
|
currentLayer: Ref<string>;
|
|
29
|
-
/** The layer id currently fading out, or null */
|
|
25
|
+
/** The layer id currently fading out, or null. */
|
|
30
26
|
leavingLayer: Ref<string | null>;
|
|
31
27
|
}
|
|
32
28
|
/**
|
|
33
|
-
* Coordinates the
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* AQ.W6 §Design 7 — the swap FORKS on View-Transitions support:
|
|
38
|
-
*
|
|
39
|
-
* - **Native path** (`document.startViewTransition` present): the layer swap is
|
|
40
|
-
* wrapped in `startViewTransition(() => mutate())`. The browser snapshots the
|
|
41
|
-
* container + panes (tagged `view-transition-name` in `dock.css`) and morphs
|
|
42
|
-
* the size + crossfades the pane content with ZERO `getBoundingClientRect`
|
|
43
|
-
* reads. No pin/measure/re-pin dance, no inline size, no rAF.
|
|
44
|
-
*
|
|
45
|
-
* - **Fallback path** (no `startViewTransition`): the axis-aware FLIP, KEPT as
|
|
46
|
-
* the sole feature-detected fallback (no alias — one path or the other runs per
|
|
47
|
-
* swap, never both). It is now the ONLY driver that writes inline size on a
|
|
48
|
-
* non-VT engine (AV.W9.0 retired the `interpolate-size`/`calc-size` CSS arm that
|
|
49
|
-
* used to second-drive width on Chrome 129+ and freeze the dock):
|
|
50
|
-
* 1. Capture current container size (or the live spring's pixel value on a
|
|
51
|
-
* retarget)
|
|
52
|
-
* 2. Pin container to that size
|
|
53
|
-
* 3. nextTick → rAF: swap classes (old → leaving, new → active) AND measure new
|
|
54
|
-
* natural size in ONE frame origin
|
|
55
|
-
* 4. Drive size off ONE `SpringProgress` clock in PIXEL space (its `value` IS
|
|
56
|
-
* the live width/height)
|
|
57
|
-
* 5. On settle, clear inline size + restore the CSS transition
|
|
58
|
-
*
|
|
59
|
-
* AV.W9.2 — velocity-continuity: an interrupted swap (a re-toggle while the
|
|
60
|
-
* spring is still live) RE-SEATS the existing solver's target from its current
|
|
61
|
-
* `(value, velocity)` instead of dispose+reconstruct-from-rest, so the morph is
|
|
62
|
-
* continuous through a retarget (the iOS interruptible-spring contract).
|
|
63
|
-
*
|
|
64
|
-
* AV.W7 perf folds:
|
|
65
|
-
* - F3 — on-demand `will-change`: the morphing box gets `will-change:<dim>`
|
|
66
|
-
* ONLY for the gesture's duration (set just before the spring drives it,
|
|
67
|
-
* cleared to `auto` on settle/`transitionend`). NEVER a standing hint — a
|
|
68
|
-
* permanent `will-change` holds a compositor layer + VRAM for an idle dock.
|
|
69
|
-
* - F5 — inheritance-bomb guard (CONVENTION): this driver animates ONLY the
|
|
70
|
-
* element's own `width`/`height` (the spring's pixel-space `value`) and the
|
|
71
|
-
* pane opacity rides a class-driven CSS transition on the SEPARATE
|
|
72
|
-
* `.dock-layer-item-host`. NO INHERITED custom property (`--phase-color` /
|
|
73
|
-
* `--shadow-color`) is TWEENED per frame here — animating an inherited
|
|
74
|
-
* custom property forces a whole-subtree style recalc every frame (the
|
|
75
|
-
* inheritance bomb). Phase/shadow colors are SET on a discrete state change,
|
|
76
|
-
* never interpolated frame-by-frame. Keep new motion on `transform`/`opacity`
|
|
77
|
-
* /`width`/`height`; route any color shift through a discrete class swap.
|
|
29
|
+
* Coordinates the size morph + crossfade between grid-stacked dock layer panes.
|
|
30
|
+
* Reusable at any nesting level (the inner `<DockLayerGroup>` pair AND the outer
|
|
31
|
+
* `GlassDock` collapsed↔expanded pair).
|
|
78
32
|
*/
|
|
79
33
|
export declare function useLayerTransition(options: UseLayerTransitionOptions): UseLayerTransitionReturn;
|
|
@@ -7,4 +7,6 @@ export { default as DockTabButton } from "./DockTabButton.vue";
|
|
|
7
7
|
export { default as DockSelectTrigger } from "./DockSelectTrigger.vue";
|
|
8
8
|
export { default as DockDropdownTrigger } from "./DockDropdownTrigger.vue";
|
|
9
9
|
export type { UseDockStateOptions, UseDockStateReturn, DockState } from "./composables";
|
|
10
|
+
export { useLayerTransition } from "./composables";
|
|
11
|
+
export type { UseLayerTransitionOptions, UseLayerTransitionReturn, } from "./composables";
|
|
10
12
|
export { DOCK_CONTEXT_KEY, useDockContext, useOptionalDockContext, provideDockContext, type DockContext, type DockOrientation, } from "./composables/dockContext";
|
|
@@ -32,6 +32,15 @@ type __VLS_Props = {
|
|
|
32
32
|
config?: BlobConfig;
|
|
33
33
|
/** Extra seed string mixed into the satellite PRNG for a unique-but-reproducible system. */
|
|
34
34
|
seed?: string;
|
|
35
|
+
/**
|
|
36
|
+
* AX.W16 — the declarative WCAG-2.2.2 pause seam. `v-model:paused` parks the
|
|
37
|
+
* render loop (the substrate's `manual` suspend) when `true` and restarts it when
|
|
38
|
+
* `false`. This is the EXACT shape `<DockBackgroundToggle>` wears — wire its
|
|
39
|
+
* `@update:paused` to this `v-model` and the blob's animation stops/starts for ALL
|
|
40
|
+
* users. The imperative `pause()`/`resume()` defineExpose handles bind the SAME
|
|
41
|
+
* renderer seam (no parallel pause path); the prop owns the default.
|
|
42
|
+
*/
|
|
43
|
+
paused?: boolean;
|
|
35
44
|
};
|
|
36
45
|
declare function nudge(): void;
|
|
37
46
|
declare function setMood(m: BlobMood): void;
|
|
@@ -41,10 +50,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
41
50
|
setMood: typeof setMood;
|
|
42
51
|
pulse: typeof pulse;
|
|
43
52
|
currentMood: Readonly<import("vue").Ref<BlobMood, BlobMood>>;
|
|
53
|
+
pause: () => void;
|
|
54
|
+
resume: () => void;
|
|
44
55
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
45
56
|
click: () => any;
|
|
57
|
+
"update:paused": (value: boolean) => any;
|
|
46
58
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
47
59
|
onClick?: (() => any) | undefined;
|
|
60
|
+
"onUpdate:paused"?: ((value: boolean) => any) | undefined;
|
|
48
61
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
49
62
|
declare const _default: typeof __VLS_export;
|
|
50
63
|
export default _default;
|
|
@@ -22,5 +22,9 @@ export declare function useBlobMood(): {
|
|
|
22
22
|
setMood: (mood: BlobMood) => void;
|
|
23
23
|
update: (interaction: MoodInteraction) => void;
|
|
24
24
|
tick: (dt: number) => void;
|
|
25
|
+
/** AX.W16 — the quiescence at-rest predicate the renderer's demand gate reads. */
|
|
26
|
+
isSettled: () => boolean;
|
|
27
|
+
/** AX.W16 — wall-ms to the next auto-mood retarget (the wake horizon). */
|
|
28
|
+
nextAutoMoodMs: () => number;
|
|
25
29
|
};
|
|
26
30
|
export type BlobMoodSystem = ReturnType<typeof useBlobMood>;
|
|
@@ -55,5 +55,7 @@ export declare function useBlobPointer(el: Ref<HTMLElement | null>): {
|
|
|
55
55
|
click: (amp: number) => void;
|
|
56
56
|
consumeClick: () => boolean;
|
|
57
57
|
rest: () => void;
|
|
58
|
+
/** AX.W16 — the quiescence at-rest predicate the renderer's demand gate reads. */
|
|
59
|
+
isAtRest: () => boolean;
|
|
58
60
|
};
|
|
59
61
|
export type BlobPointer = ReturnType<typeof useBlobPointer>;
|
|
@@ -9,5 +9,7 @@ export declare function useBlobSatellites(config: BlobConfig, initialColor: stri
|
|
|
9
9
|
tick: (now: number, mood: MoodParams) => void;
|
|
10
10
|
nudge: () => void;
|
|
11
11
|
reseed: (color: string) => void;
|
|
12
|
+
isQuiescent: () => boolean;
|
|
13
|
+
nextEventMs: (now: number) => number;
|
|
12
14
|
};
|
|
13
15
|
export type BlobSatelliteSystem = ReturnType<typeof useBlobSatellites>;
|
|
@@ -1,22 +1,37 @@
|
|
|
1
1
|
import { type Ref } from "vue";
|
|
2
2
|
import type { ColorResolver } from "../../../../composables/color";
|
|
3
|
-
import {
|
|
3
|
+
import type { BlobConfig } from "../types";
|
|
4
4
|
import type { BlobMoodSystem } from "./useBlobMood";
|
|
5
5
|
import type { BlobPointer } from "./useBlobPointer";
|
|
6
6
|
import type { BlobSatelliteSystem } from "./useBlobSatellites";
|
|
7
7
|
export interface UseMetaballRendererOptions {
|
|
8
8
|
canvasRef: Ref<HTMLCanvasElement | null>;
|
|
9
|
+
/** The base color, ALREADY un-wrapped to a CONCRETE string by the SFC (DOM-free). */
|
|
9
10
|
color: Ref<string>;
|
|
11
|
+
/**
|
|
12
|
+
* The Fresnel rim color, ALREADY un-wrapped to a CONCRETE string by the SFC
|
|
13
|
+
* (AX.W16 — the renderer no longer reaches the DOM for the `var()`-cascade read;
|
|
14
|
+
* the SFC's `resolveTokenColor` leaf does ALL un-wrapping before the renderer sees
|
|
15
|
+
* it). A `var(--token)` rim arrives here already resolved to `rgb(...)`.
|
|
16
|
+
*/
|
|
17
|
+
rimColor: Ref<string>;
|
|
18
|
+
/**
|
|
19
|
+
* The multi-stop palette, ALREADY un-wrapped to CONCRETE strings by the SFC
|
|
20
|
+
* (AX.W16). EMPTY falls back to the base color (uStopCount <= 1).
|
|
21
|
+
*/
|
|
22
|
+
paletteStops: Ref<string[]>;
|
|
10
23
|
mood: BlobMoodSystem;
|
|
11
24
|
pointer: BlobPointer;
|
|
12
25
|
satellites: BlobSatelliteSystem;
|
|
13
26
|
config: BlobConfig;
|
|
14
27
|
/**
|
|
15
|
-
* The injected color seam (DEC-AT-2). Resolves a CSS color string to a
|
|
16
|
-
* sRGB triple in [0,1] fed straight into the shader's base-color uniform —
|
|
17
|
-
* faithful AU.W7 lift paints gamma. REQUIRED: a no-resolver mount throws (the
|
|
28
|
+
* The injected color seam (DEC-AT-2). Resolves a CONCRETE CSS color string to a
|
|
29
|
+
* GAMMA-sRGB triple in [0,1] fed straight into the shader's base-color uniform —
|
|
30
|
+
* the faithful AU.W7 lift paints gamma. REQUIRED: a no-resolver mount throws (the
|
|
18
31
|
* loud failure, not a silent gray) instructing the consumer to pass
|
|
19
|
-
* `defaultBlobColorResolver` from `@mkbabb/glass-ui/color` (or their own).
|
|
32
|
+
* `defaultBlobColorResolver` from `@mkbabb/glass-ui/color` (or their own). The
|
|
33
|
+
* renderer is DOM-FREE: it never un-wraps a `var(--token)` — the SFC's
|
|
34
|
+
* `resolveTokenColor` leaf does that BEFORE handing strings here (inv-K-3 seam).
|
|
20
35
|
*/
|
|
21
36
|
colorResolver: ColorResolver;
|
|
22
37
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as GooBlob } from "./GooBlob.vue";
|
|
2
|
-
export type { BlobMood, BlobMerge, MoodParams, MetaballSource, BlobConfig, SatellitePhase, SatelliteInternal, } from "./types";
|
|
2
|
+
export type { BlobMood, BlobMerge, BlobQuality, MoodParams, MetaballSource, BlobConfig, SatellitePhase, SatelliteInternal, } from "./types";
|
|
3
3
|
export { BLOB_CONFIG_DEFAULTS, BLOB_CONFIG_KEY } from "./types";
|
|
4
4
|
export { useBlobMood, type BlobMoodSystem } from "./composables/useBlobMood";
|
|
5
5
|
export { useBlobPointer, type BlobPointer } from "./composables/useBlobPointer";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const METABALL_SDF_GLSL = "// --- SDF ---\n\nfloat sdCircle(vec2 p, vec2 center, float radius) {\n return length(p - center) - radius;\n}\n\n// IQ 2024 quadratic-polynomial smin, NORMALIZED so k is a blend band in distance\n// units. The k *= 4.0 pre-scale makes the h*h*k*0.25 poly's effective blend width\n// equal to k (the un-normalized form's width was 0.25*k).\nfloat sminQuadratic(float a, float b, float k) {\n k *= 4.0;\n float h = max(k - abs(a - b), 0.0) / k;\n return min(a, b) - h * h * k * 0.25;\n}\n\n// IQ circular smin \u2014 a quarter-circle fillet at the seam (rounder than the\n// quadratic). The k *= 1.0/(1.0-sqrt(0.5)) factor normalizes k to the same\n// blend-band units so the merge axis swaps shape without re-tuning uSmoothK.\nfloat sminCircular(float a, float b, float k) {\n k *= 1.0 / (1.0 - sqrt(0.5));\n float h = max(k - abs(a - b), 0.0) / k;\n return min(a, b) - k * 0.5 * (1.0 + h - sqrt(1.0 - h * (h - 2.0)));\n}\n\n// Config-gated merge dispatch \u2014 uMerge 0 = quadratic, 1 = circular.\nfloat smin(float a, float b, float k) {\n if (uMerge > 0.5) return sminCircular(a, b, k);\n return sminQuadratic(a, b, k);\n}";
|
|
1
|
+
export declare const METABALL_SDF_GLSL = "// --- SDF ---\n\nfloat sdCircle(vec2 p, vec2 center, float radius) {\n return length(p - center) - radius;\n}\n\n// AX.W15 \u2014 the VALUE+GRADIENT circle: returns vec3(d, dd/dx, dd/dy). The circle\n// gradient is the UNIT radial direction (p - center)/length(p - center) (the\n// eikonal property holds EXACTLY for a circle), guarded at the degenerate centre.\n// This is the keystone of the analytic-gradient smin: carrying the gradient\n// through the scene field DELETES the per-pixel 4-tap normal (4 full sceneDist\n// evals, each running 3-octave FBM + the sat/trail loops).\nvec3 sdgCircle(vec2 p, vec2 center, float radius) {\n vec2 d = p - center;\n float len = length(d);\n vec2 grad = len > 1e-6 ? d / len : vec2(0.0, 1.0);\n return vec3(len - radius, grad);\n}\n\n// IQ 2024 quadratic-polynomial smin, NORMALIZED so k is a blend band in distance\n// units. The k *= 4.0 pre-scale makes the h*h*k*0.25 poly's effective blend width\n// equal to k (the un-normalized form's width was 0.25*k).\nfloat sminQuadratic(float a, float b, float k) {\n k *= 4.0;\n float h = max(k - abs(a - b), 0.0) / k;\n return min(a, b) - h * h * k * 0.25;\n}\n\n// IQ circular smin \u2014 a quarter-circle fillet at the seam (rounder than the\n// quadratic). The k *= 1.0/(1.0-sqrt(0.5)) factor normalizes k to the same\n// blend-band units so the merge axis swaps shape without re-tuning uSmoothK.\nfloat sminCircular(float a, float b, float k) {\n k *= 1.0 / (1.0 - sqrt(0.5));\n float h = max(k - abs(a - b), 0.0) / k;\n return min(a, b) - k * 0.5 * (1.0 + h - sqrt(1.0 - h * (h - 2.0)));\n}\n\n// Config-gated merge dispatch \u2014 uMerge 0 = quadratic, 1 = circular.\nfloat smin(float a, float b, float k) {\n if (uMerge > 0.5) return sminCircular(a, b, k);\n return sminQuadratic(a, b, k);\n}\n\n// AX.W15 \u2014 the VALUE+GRADIENT smin. a/b are vec3(dist, grad.xy); the blended\n// gradient is mix(a.yz, b.yz, w) with the interpolation weight w the distance\n// blend uses (IQ's vec2-smin insight). This propagates the analytic gradient\n// through the merge so the surface normal reads the field gradient DIRECTLY \u2014 no\n// finite-difference tap. The blend weight matches each variant.\nvec3 sminQuadraticG(vec3 a, vec3 b, float k) {\n k *= 4.0;\n float h = max(k - abs(a.x - b.x), 0.0) / k;\n float m = h * h * k * 0.25;\n // h-weight that selects which surface dominates (0 \u2192 a, 1 \u2192 b).\n float w = (a.x < b.x) ? 0.5 * h * h : 1.0 - 0.5 * h * h;\n float dist = min(a.x, b.x) - m;\n vec2 grad = mix(a.yz, b.yz, w);\n return vec3(dist, grad);\n}\n\nvec3 sminCircularG(vec3 a, vec3 b, float k) {\n k *= 1.0 / (1.0 - sqrt(0.5));\n float h = max(k - abs(a.x - b.x), 0.0) / k;\n float m = k * 0.5 * (1.0 + h - sqrt(1.0 - h * (h - 2.0)));\n float w = (a.x < b.x) ? 0.5 * h : 1.0 - 0.5 * h;\n float dist = min(a.x, b.x) - m;\n vec2 grad = mix(a.yz, b.yz, w);\n return vec3(dist, grad);\n}\n\nvec3 sminG(vec3 a, vec3 b, float k) {\n if (uMerge > 0.5) return sminCircularG(a, b, k);\n return sminQuadraticG(a, b, k);\n}";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const METABALL_EDGE_NOISE_PRE_GLSL = "// --- Noise ---\n\nfloat hash21(vec2 p) {\n vec3 p3 = fract(vec3(p.xyx) * 0.1031);\n p3 += dot(p3, p3.yzx + 33.33);\n return fract((p3.x + p3.y) * p3.z);\n}\n\n// IQ analytic-derivative gradient noise \u2014 value in .x, ANALYTIC gradient\n// (d/dx, d/dy) in .yz, from one eval. The quintic fade has a continuous 2nd\n// derivative so the gradient is smooth (a cubic smoothstep fade would crease it).\n// (Inigo Quilez, https://iquilezles.org/articles/gradientnoise/.)\nvec3 noised(vec2 p) {\n vec2 i = floor(p);\n vec2 f = fract(p);\n\n // Quintic fade + its derivative.\n vec2 u = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);\n vec2 du = 30.0 * f * f * (f * (f - 2.0) + 1.0);\n\n // Per-corner gradient vectors from the hash (centred to [-1, 1]).\n vec2 ga = -1.0 + 2.0 * vec2(hash21(i + vec2(0.0, 0.0)), hash21(i + vec2(7.3, 0.0)));\n vec2 gb = -1.0 + 2.0 * vec2(hash21(i + vec2(1.0, 0.0)), hash21(i + vec2(8.3, 0.0)));\n vec2 gc = -1.0 + 2.0 * vec2(hash21(i + vec2(0.0, 1.0)), hash21(i + vec2(7.3, 1.0)));\n vec2 gd = -1.0 + 2.0 * vec2(hash21(i + vec2(1.0, 1.0)), hash21(i + vec2(8.3, 1.0)));\n\n float va = dot(ga, f - vec2(0.0, 0.0));\n float vb = dot(gb, f - vec2(1.0, 0.0));\n float vc = dot(gc, f - vec2(0.0, 1.0));\n float vd = dot(gd, f - vec2(1.0, 1.0));\n\n // Value, remapped to [0,1] so it drops in for the prior valueNoise.\n float n = va + u.x * (vb - va) + u.y * (vc - va) + u.x * u.y * (va - vb - vc + vd);\n float value = 0.5 + 0.5 * n;\n\n // Analytic gradient (chain rule through the bilinear blend + the fade).\n vec2 grad =\n ga + u.x * (gb - ga) + u.y * (gc - ga) + u.x * u.y * (ga - gb - gc + gd) +\n du * (vec2(u.y, u.x) * (va - vb - vc + vd) + vec2(vb, vc) - va);\n return vec3(value, 0.5 * grad);\n}\n\n// Rotated-octave FBM over the analytic gradient noise: a fixed ~0.5 rad 2x2\n// rotation between octaves breaks the axis-aligned banding. The rotation CONSTANT\n// is spliced from the shared chunk (AV.W2 \u2014 the one FBM_ROT); the loops below\n// stay blob-local (param octaves +
|
|
2
|
-
export declare const METABALL_EDGE_NOISE_POST_GLSL
|
|
1
|
+
export declare const METABALL_EDGE_NOISE_PRE_GLSL = "// --- Noise ---\n\nfloat hash21(vec2 p) {\n vec3 p3 = fract(vec3(p.xyx) * 0.1031);\n p3 += dot(p3, p3.yzx + 33.33);\n return fract((p3.x + p3.y) * p3.z);\n}\n\n// IQ analytic-derivative gradient noise \u2014 value in .x, ANALYTIC gradient\n// (d/dx, d/dy) in .yz, from one eval. The quintic fade has a continuous 2nd\n// derivative so the gradient is smooth (a cubic smoothstep fade would crease it).\n// (Inigo Quilez, https://iquilezles.org/articles/gradientnoise/.)\nvec3 noised(vec2 p) {\n vec2 i = floor(p);\n vec2 f = fract(p);\n\n // Quintic fade + its derivative.\n vec2 u = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);\n vec2 du = 30.0 * f * f * (f * (f - 2.0) + 1.0);\n\n // Per-corner gradient vectors from the hash (centred to [-1, 1]).\n vec2 ga = -1.0 + 2.0 * vec2(hash21(i + vec2(0.0, 0.0)), hash21(i + vec2(7.3, 0.0)));\n vec2 gb = -1.0 + 2.0 * vec2(hash21(i + vec2(1.0, 0.0)), hash21(i + vec2(8.3, 0.0)));\n vec2 gc = -1.0 + 2.0 * vec2(hash21(i + vec2(0.0, 1.0)), hash21(i + vec2(7.3, 1.0)));\n vec2 gd = -1.0 + 2.0 * vec2(hash21(i + vec2(1.0, 1.0)), hash21(i + vec2(8.3, 1.0)));\n\n float va = dot(ga, f - vec2(0.0, 0.0));\n float vb = dot(gb, f - vec2(1.0, 0.0));\n float vc = dot(gc, f - vec2(0.0, 1.0));\n float vd = dot(gd, f - vec2(1.0, 1.0));\n\n // Value, remapped to [0,1] so it drops in for the prior valueNoise.\n float n = va + u.x * (vb - va) + u.y * (vc - va) + u.x * u.y * (va - vb - vc + vd);\n float value = 0.5 + 0.5 * n;\n\n // Analytic gradient (chain rule through the bilinear blend + the fade).\n vec2 grad =\n ga + u.x * (gb - ga) + u.y * (gc - ga) + u.x * u.y * (ga - gb - gc + gd) +\n du * (vec2(u.y, u.x) * (va - vb - vc + vd) + vec2(vb, vc) - va);\n return vec3(value, 0.5 * grad);\n}\n\n// Rotated-octave FBM over the analytic gradient noise: a fixed ~0.5 rad 2x2\n// rotation between octaves breaks the axis-aligned banding. The rotation CONSTANT\n// is spliced from the shared chunk (AV.W2 \u2014 the one FBM_ROT); the loops below\n// stay blob-local (param octaves + the LIQUID lacunarity/persistence, per \u00A73a).";
|
|
2
|
+
export declare const METABALL_EDGE_NOISE_POST_GLSL: string;
|
|
@@ -2,6 +2,13 @@ import type { InjectionKey } from "vue";
|
|
|
2
2
|
export type BlobMood = "idle" | "happy" | "curious" | "sleepy" | "excited";
|
|
3
3
|
/** Smin merge variant — `quadratic` (cheap, creased) | `circular` (rounder menisci). */
|
|
4
4
|
export type BlobMerge = "quadratic" | "circular";
|
|
5
|
+
/**
|
|
6
|
+
* Render-quality axis (AX.W16) — `full` (default) renders the metaball pass at the
|
|
7
|
+
* clamped DPR; `half` renders the backing store at HALF resolution and lets the
|
|
8
|
+
* browser bilinear-upsample on composite (~4× fragment savings for weak GPUs — the
|
|
9
|
+
* blob is the ideal candidate: the soft FBM/AA edge hides the interpolation).
|
|
10
|
+
*/
|
|
11
|
+
export type BlobQuality = "full" | "half";
|
|
5
12
|
export interface MoodParams {
|
|
6
13
|
orbitSpeedScale: number;
|
|
7
14
|
wobbleScale: number;
|
|
@@ -55,6 +62,7 @@ export interface BlobConfig {
|
|
|
55
62
|
satelliteCount: number;
|
|
56
63
|
satelliteRadius: number;
|
|
57
64
|
orbitRadius: number;
|
|
65
|
+
quality: BlobQuality;
|
|
58
66
|
tempo: number;
|
|
59
67
|
smoothK: number;
|
|
60
68
|
/** Smin merge variant — `quadratic` (default) | `circular` (rounder menisci). */
|
|
@@ -20,6 +20,21 @@ export type CardTier = "wash" | "quiet" | "resting" | "floating" | "overlay";
|
|
|
20
20
|
* ANY tier; the retired `<CartoonCard>` was `tier="quiet" surface="cartoon"`.
|
|
21
21
|
*/
|
|
22
22
|
export type CardSurface = "glass" | "cartoon";
|
|
23
|
+
/**
|
|
24
|
+
* Specular catch-light register (AX.W09) — the pointer-anchored moving lens on a
|
|
25
|
+
* glass card.
|
|
26
|
+
*
|
|
27
|
+
* off — NO catch-light (default). The clean resting panel: a data/content
|
|
28
|
+
* `surface="glass"` card over any backplate reads flat — no centred
|
|
29
|
+
* white bloom, no pointer wiring. The §24 three-consumer-confirmed
|
|
30
|
+
* default for the common content-card case.
|
|
31
|
+
* subtle — the token-ladder lens: the pointer-anchored catch-light wakes on
|
|
32
|
+
* hover/active at the SUBTLE `--glass-specular-intensity-*` magnitudes.
|
|
33
|
+
* The explicit opt-in for a hero/chrome surface.
|
|
34
|
+
* full — the brighter pre-tune rung set, for the busy-backdrop case the recipe
|
|
35
|
+
* was originally authored over (a local intensity-token override).
|
|
36
|
+
*/
|
|
37
|
+
export type CardSpecular = "off" | "subtle" | "full";
|
|
23
38
|
interface Props extends PrimitiveProps {
|
|
24
39
|
/** Surface tier; selects one rung of the glass ladder. Default `resting`. */
|
|
25
40
|
tier?: CardTier;
|
|
@@ -33,12 +48,13 @@ interface Props extends PrimitiveProps {
|
|
|
33
48
|
/** `::after` paper-grain overlay. Off for scroll panes (the grain conflicts
|
|
34
49
|
* with overflow:auto repaints). */
|
|
35
50
|
grain?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
|
|
51
|
+
/** Specular catch-light register (AX.W09). `off` (default) keeps the card
|
|
52
|
+
* CLEAN — no pointer-anchored lens, clean over any backplate (the §24
|
|
53
|
+
* three-consumer-confirmed default for a data/content card). `subtle` wakes
|
|
54
|
+
* the pointer-anchored moving catch-light at the token-ladder magnitudes (a
|
|
55
|
+
* hero/chrome opt-in); `full` runs the brighter pre-tune rung set for a busy
|
|
56
|
+
* backdrop. Only `glass` surfaces wire it; `cartoon` owns its own sticker lift. */
|
|
57
|
+
specular?: CardSpecular;
|
|
42
58
|
class?: HTMLAttributes["class"];
|
|
43
59
|
}
|
|
44
60
|
declare var __VLS_10: {};
|
|
@@ -51,7 +67,7 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
51
67
|
tier: CardTier;
|
|
52
68
|
surface: CardSurface;
|
|
53
69
|
grain: boolean;
|
|
54
|
-
|
|
70
|
+
specular: CardSpecular;
|
|
55
71
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
56
72
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
57
73
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as Card, type CardTier, type CardSurface } from "./Card.vue";
|
|
1
|
+
export { default as Card, type CardTier, type CardSurface, type CardSpecular, } from "./Card.vue";
|
|
2
2
|
export { default as CardHeader } from "./CardHeader.vue";
|
|
3
3
|
export { default as CardTitle } from "./CardTitle.vue";
|
|
4
4
|
export { default as CardDescription } from "./CardDescription.vue";
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { type HTMLAttributes } from "vue";
|
|
2
2
|
import { type ProgressRootProps } from "reka-ui";
|
|
3
3
|
/**
|
|
4
|
-
* Default progress variant —
|
|
5
|
-
* `translateX(-%)` intake-pulse. The plainest rung; no lifecycle
|
|
6
|
-
* (that lives on the gradient variant). The thin `Progress`
|
|
7
|
-
* here for `variant="default"`.
|
|
4
|
+
* Default progress variant — a `--progress-track` rail + a `--progress-fill`
|
|
5
|
+
* indicator with a `translateX(-%)` intake-pulse. The plainest rung; no lifecycle
|
|
6
|
+
* motion grammar (that lives on the gradient variant). The thin `Progress`
|
|
7
|
+
* dispatcher routes here for `variant="default"`.
|
|
8
|
+
*
|
|
9
|
+
* Token-read parity with the `gradient` variant (AX.W24 F1): the rail/indicator
|
|
10
|
+
* colour read `--progress-track`/`--progress-fill` (fallbacks `var(--secondary)`/
|
|
11
|
+
* `var(--primary)`) as Tailwind arbitrary properties — `bg-[var(--token,…)]` /
|
|
12
|
+
* `[background:var(--token,…)]` — NOT the `bg-secondary`/`bg-primary` utility
|
|
13
|
+
* classes. A `bg-primary` utility lives in `@layer utilities`, which ALWAYS
|
|
14
|
+
* outranks the `@layer components` `.glass-progress-rail` recipe regardless of
|
|
15
|
+
* source order, so a `:root { --progress-fill }` (or `.glass-progress-rail`'s
|
|
16
|
+
* token-set) override was a silent no-op on the default variant. Reading the token
|
|
17
|
+
* at source makes the `default` variant token-retintable for EVERY consumer.
|
|
8
18
|
*/
|
|
9
19
|
type __VLS_Props = ProgressRootProps & {
|
|
10
20
|
class?: HTMLAttributes["class"];
|
|
@@ -21,6 +21,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
21
21
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
22
|
"onUpdate:modelValue"?: ((payload: number[] | undefined) => any) | undefined;
|
|
23
23
|
onValueCommit?: ((payload: number[]) => any) | undefined;
|
|
24
|
-
}>, {
|
|
24
|
+
}>, {
|
|
25
|
+
keepDockOpen: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
27
|
declare const _default: typeof __VLS_export;
|
|
26
28
|
export default _default;
|
|
@@ -20,6 +20,25 @@ export type ColorResolver = (css: string) => [number, number, number];
|
|
|
20
20
|
* keeps them off the GPU). The equivalence canary asserts the COMPOSED path.
|
|
21
21
|
*/
|
|
22
22
|
export declare function oklchToLinear(stop: OklchStop): [number, number, number];
|
|
23
|
+
/**
|
|
24
|
+
* Warm-white catch-light → LINEAR-sRGB triple (AX.W11). The OKLCh-principled light
|
|
25
|
+
* tint the painterly relight (aurora's impasto sheen, the blob's `warmCream`) adds
|
|
26
|
+
* in LINEAR light — one shared OKLCh derivation both surfaces' light models route
|
|
27
|
+
* through instead of an eyeballed sRGB-ish literal. Just `oklchToLinear({L,C,h})`
|
|
28
|
+
* with a self-documenting name (the warm-light/cool-shadow temperature-coupling rule
|
|
29
|
+
* the literature prescribes is "the catch-light is a warm, near-white OKLCh anchor").
|
|
30
|
+
*
|
|
31
|
+
* Aurora's default anchor is `(0.985, 0.0125, 77.5°)` — the OKLCh anchor that
|
|
32
|
+
* reproduces the prior eyeballed `[1.0, 0.95, 0.88]` warm-white to <1e-3 linear (so
|
|
33
|
+
* the live relight reads identically; the seam fix is invisible to the eye). The
|
|
34
|
+
* blob's `warmCream` anchor is `(0.97, 0.03, 85°)` — a deeper, more-saturated cream;
|
|
35
|
+
* W15 re-routes the blob default through THIS helper at that anchor (the cross-surface
|
|
36
|
+
* unification: ONE OKLCh derive, each surface its own principled anchor).
|
|
37
|
+
*
|
|
38
|
+
* An invalid (non-finite) anchor THROWS — a library-internal contract violation, not
|
|
39
|
+
* a silent grey return (the fail-explicit precept; a stale anchor must surface loud).
|
|
40
|
+
*/
|
|
41
|
+
export declare function warmCatchLight(L: number, C: number, hDeg: number): [number, number, number];
|
|
23
42
|
/**
|
|
24
43
|
* OKLCh stop → GAMMA-sRGB in [0,1] — the blob's faithful-lift exit (DEC-AT-7's W7
|
|
25
44
|
* GAMMA space). value.js's `oklabToRgb255` returns gamma-encoded 0..255 (HSV/sRGB,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export * from "./useResizeObserver";
|
|
2
2
|
export * from "./useTouchGate";
|
|
3
3
|
export * from "./useTokenColor";
|
|
4
|
+
export * from "./useResolveTokenColor";
|
|
4
5
|
export * from "./useClipboard";
|
|
5
6
|
export * from "./useUserInvalidAria";
|
|
6
|
-
export * from "./useTextHighlight";
|
|
7
7
|
export * from "./useBreakpoint";
|
|
8
8
|
export * from "./useIdleReady";
|
|
9
9
|
export * from "./useViewportReady";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** A bounded LRU-ish cache for the un-wrap (clears wholesale past the cap). */
|
|
2
|
+
export interface ResolveTokenColorCache {
|
|
3
|
+
resolve: (css: string, el: HTMLElement | null) => string;
|
|
4
|
+
/** Drop every cached entry — call on a cascade change (dark-mode flip) so a token re-resolves. */
|
|
5
|
+
invalidate: () => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Un-wrap a `var(--token)` color to a concrete `rgb(...)` via a single cached cascade
|
|
9
|
+
* read; a literal (no `var()`) passes straight through. Paints `css` onto the element's
|
|
10
|
+
* `color` property — a `var(--token)` painted on a real CSS property resolves through
|
|
11
|
+
* the cascade, so `getComputedStyle(el).color` returns the concrete `rgb(...)` — then
|
|
12
|
+
* restores the prior value. SSR-safe (returns `css` unchanged when `window`/`el` are
|
|
13
|
+
* absent).
|
|
14
|
+
*
|
|
15
|
+
* @param css the color string (a `var(--token)` wrapper or a literal)
|
|
16
|
+
* @param el the element to resolve the cascade against (the host wrapper)
|
|
17
|
+
* @returns the concrete color string the `ColorResolver` can parse
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveTokenColor(css: string, el: HTMLElement | null): string;
|
|
20
|
+
/**
|
|
21
|
+
* Build a bounded cache around `resolveTokenColor` — the un-wrap (a forced sync
|
|
22
|
+
* reflow) runs once per unique color string. `invalidate()` drops every entry so a
|
|
23
|
+
* token re-resolves on a dark-mode flip (the SFC observes `<html>.class` and calls it).
|
|
24
|
+
*
|
|
25
|
+
* @param maxEntries the cache cap before a wholesale clear (default 256)
|
|
26
|
+
*/
|
|
27
|
+
export declare function createTokenColorCache(maxEntries?: number): ResolveTokenColorCache;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { useCanvas2D, useCanvasLifecycle } from "./useCanvas2D";
|
|
2
2
|
export type { Canvas2DFrame, Canvas2DHandle, Canvas2DOptions, Canvas2DSuspendReason, } from "./useCanvas2D";
|
|
3
|
+
export { resolveCanvasColor } from "./resolveCanvasColor";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a CSS custom property or color value to a Canvas2D-VALID
|
|
3
|
+
* `rgb()`/`rgba()` string.
|
|
4
|
+
*
|
|
5
|
+
* @param cssVar a `--custom-property` NAME (resolved as `var(<name>)`) OR a full
|
|
6
|
+
* CSS color value (`light-dark(...)`, `color-mix(...)`, `var(...)`, `oklch()`,
|
|
7
|
+
* `hsl()`, hex, a named color). A bare `--token` is wrapped as `var(--token)`.
|
|
8
|
+
* @param el an element ON the cascade — the canvas host or any descendant. The
|
|
9
|
+
* probe is appended here so it inherits `el`'s `color-scheme` + `--token`
|
|
10
|
+
* cascade; the resolved color reflects the live theme at `el`.
|
|
11
|
+
* @returns the browser-resolved `rgb()`/`rgba()` string, ready to hand straight
|
|
12
|
+
* to `ctx.strokeStyle`/`ctx.fillStyle`. On SSR / no-DOM, returns the input
|
|
13
|
+
* `cssVar` unchanged (the befitting-silent fallback).
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // A `light-dark()` `--foreground` token that Canvas2D would reject raw:
|
|
17
|
+
* ctx.strokeStyle = resolveCanvasColor("--foreground", canvas);
|
|
18
|
+
* // → "rgb(28, 25, 23)" in light, "rgb(250, 250, 249)" in dark — NOT black.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveCanvasColor(cssVar: string, el: HTMLElement): string;
|
|
@@ -45,4 +45,18 @@ export interface Canvas2DHandle {
|
|
|
45
45
|
/** The live `prefers-reduced-motion: reduce` state (consumers read it to skip stepping). */
|
|
46
46
|
readonly reducedMotion: boolean;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
/**
|
|
49
|
+
* The Canvas2D lifecycle substrate — the park/freeze/dispose twin of
|
|
50
|
+
* `useWebGLCanvas`. Returns an imperative {@link Canvas2DHandle} (the same
|
|
51
|
+
* handle idiom the WebGL twin uses — an imperative canvas seam is NOT a
|
|
52
|
+
* ref-bundle). `useCanvasLifecycle` is the alias-of-record for the
|
|
53
|
+
* lifecycle-only framing; both name the same factory.
|
|
54
|
+
*/
|
|
55
|
+
export declare function useCanvas2D(options: Canvas2DOptions): Canvas2DHandle;
|
|
56
|
+
/**
|
|
57
|
+
* Alias-of-record for {@link useCanvas2D} — the lifecycle-only framing (the
|
|
58
|
+
* park/freeze/dispose machinery, paralleling the WebGL substrate's
|
|
59
|
+
* `createCanvasLifecycle`). Same factory, same handle; reach for this name when
|
|
60
|
+
* the lifecycle (not the 2D drawing) is the consumer's emphasis.
|
|
61
|
+
*/
|
|
62
|
+
export declare const useCanvasLifecycle: typeof useCanvas2D;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { useGlassRenderer, createGlassFilter, destroyGlassFilter, type GlassTier, type GlassFilterState, type UseGlassRendererReturn, } from "./useGlassRenderer";
|
|
2
|
-
export {
|
|
2
|
+
export { useSpecularTracking } from "./useSpecularTracking";
|
|
3
|
+
export type { UseSpecularTracking } from "./useSpecularTracking";
|
|
4
|
+
export { useCanvas2D, useCanvasLifecycle, resolveCanvasColor } from "./canvas2d";
|
|
3
5
|
export type { Canvas2DFrame, Canvas2DHandle, Canvas2DOptions, Canvas2DSuspendReason, } from "./canvas2d";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ref, type CSSProperties } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* `useSpecularTracking` — the pointer-anchored moving-specular write seam
|
|
4
|
+
* (AX.W09). The single DRY home for the catch-light position write that was
|
|
5
|
+
* hand-copied VERBATIM in `Card.vue` and `DockIconButton.vue`.
|
|
6
|
+
*
|
|
7
|
+
* On pointer-move it writes the cursor position (`--mouse-x`/`--mouse-y`, as
|
|
8
|
+
* percentages of the host box) onto the host's inline style; the unified
|
|
9
|
+
* `.glass-material::before` recipe (`glass.css`) MAPS that host write onto its
|
|
10
|
+
* typed `--specular-x`/`--specular-y` channel and paints the travelling glow.
|
|
11
|
+
*
|
|
12
|
+
* VOCAB (HARDENING §G #28): `--mouse-x`/`--mouse-y` is the HOST WRITE this seam
|
|
13
|
+
* owns; `--specular-x`/`--specular-y` is the CSS-internal MAPPED channel the
|
|
14
|
+
* recipe reads. The host writes `--mouse-x/y`; the recipe maps it.
|
|
15
|
+
*
|
|
16
|
+
* The catch-light MAGNITUDE rides the `--glass-specular-intensity-{rest,hover,
|
|
17
|
+
* active}` token cohort (tokens.css) the recipe reads — this seam only feeds the
|
|
18
|
+
* position. The recipe's rest rung is `0` (dormant) so an UNWIRED surface is
|
|
19
|
+
* clean; calling this seam is the wire-or-omit opt-in that wakes the lens on
|
|
20
|
+
* hover/active.
|
|
21
|
+
*
|
|
22
|
+
* PRM-aware: under `prefers-reduced-motion: reduce` the seam DOES NOT write the
|
|
23
|
+
* position (the CSS half pins the catch-light static at the centred `50%`
|
|
24
|
+
* fallback). The write is style-only — no reflow, no re-render — and inert until
|
|
25
|
+
* the user actually moves the pointer over a wired host.
|
|
26
|
+
*/
|
|
27
|
+
export interface UseSpecularTracking {
|
|
28
|
+
/** Bind to the host element's `:style`. Carries the `--mouse-x/--mouse-y` write. */
|
|
29
|
+
specularStyle: ReturnType<typeof ref<CSSProperties>>;
|
|
30
|
+
/** Bind to the host's `@pointermove`. Writes the cursor position (PRM-gated). */
|
|
31
|
+
onPointerMove: (event: PointerEvent) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare function useSpecularTracking(): UseSpecularTracking;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type CanvasSuspendReason = "tab-hidden" | "off-screen" | "manual";
|
|
1
|
+
export type CanvasSuspendReason = "tab-hidden" | "off-screen" | "off-screen-io" | "manual";
|
|
2
2
|
/** The per-frame hooks a backend's `buildContext` returns to the lifecycle core. */
|
|
3
3
|
export interface CanvasFrameHooks {
|
|
4
4
|
/** Draw one frame at `timeSec`. */
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export declare const OETF_GLSL = "\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}";
|
|
2
2
|
export declare const FBM_ROT_GLSL = "const mat2 FBM_ROT = mat2(0.8, 0.6, -0.6, 0.8);";
|
|
3
3
|
export declare const OKLCH_MATRICES_GLSL = "\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\u00B7v.\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\u2192OKLab coefficients (gamut.ts lines 295-297 \u2014\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 \u2192 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 \u2192 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 \u2192 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 \u2192 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) \u2192 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 \u2192 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) \u2192 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}";
|
|
4
|
+
export declare const PALETTE_RAMP_GLSL = "\n// value.js interpolateHue in the NORMALIZED-TURNS domain (h_rad/TAU \u2192 turns, the\n// exact .5/+1.0 branch per method, fract() wrap, *TAU back). A radians-native port\n// (PI thresholds / +TAU wrap) diverges 180\u00B0 at the antipode. methods: 0 shorter,\n// 1 longer, 2 increasing, 3 decreasing.\nfloat interpolateHueTurns(float h0, float h1, float t, int method) {\n float TAU = 2.0 * PI;\n float a = h0 / TAU;\n float b = h1 / TAU;\n float i = b - a;\n if (method == 0) { // shorter\n if (i > 0.5) a += 1.0; else if (i < -0.5) b += 1.0;\n } else if (method == 1) { // longer\n if (i > 0.0 && i < 0.5) a += 1.0; else if (i > -0.5 && i <= 0.0) b += 1.0;\n } else if (method == 2) { // increasing\n if (i < 0.0) b += 1.0;\n } else { // decreasing\n if (i > 0.0) a += 1.0;\n }\n float r = a + t * (b - a);\n r = fract(r); // (r % 1 + 1) % 1 \u2014 fract is non-negative in GLSL\n return r * TAU; // back to radians\n}\n\n// Linear-sRGB endpoint pair \u2192 OKLab-rectangular interpolation \u2192 linear sRGB. Holds\n// chroma across the ramp (no grey midpoint). The default/shorter ramp path.\nvec3 mixPaletteOklab(vec3 linA, vec3 linB, float t) {\n vec3 labA = LMS_TO_OKLAB * (sign(LINEAR_SRGB_TO_LMS * linA) * pow(abs(LINEAR_SRGB_TO_LMS * linA), vec3(1.0 / 3.0)));\n vec3 labB = LMS_TO_OKLAB * (sign(LINEAR_SRGB_TO_LMS * linB) * pow(abs(LINEAR_SRGB_TO_LMS * linB), vec3(1.0 / 3.0)));\n vec3 lab = mix(labA, labB, t);\n return oklabToLinearSrgb(lab);\n}\n\n// Linear-sRGB endpoint pair \u2192 OKLCh interpolation along the huePath arc \u2192 linear\n// sRGB. L and C lerp; H walks the chosen arc. The deliberate-rainbow path.\nvec3 mixPaletteOklchArc(vec3 linA, vec3 linB, float t, int method) {\n vec3 labA = LMS_TO_OKLAB * (sign(LINEAR_SRGB_TO_LMS * linA) * pow(abs(LINEAR_SRGB_TO_LMS * linA), vec3(1.0 / 3.0)));\n vec3 labB = LMS_TO_OKLAB * (sign(LINEAR_SRGB_TO_LMS * linB) * pow(abs(LINEAR_SRGB_TO_LMS * linB), vec3(1.0 / 3.0)));\n vec3 lchA = oklabToOklch(labA);\n vec3 lchB = oklabToOklch(labB);\n float L = mix(lchA.x, lchB.x, t);\n float C = mix(lchA.y, lchB.y, t);\n float H = interpolateHueTurns(lchA.z, lchB.z, t, method);\n return oklabToLinearSrgb(oklchToOklab(vec3(L, C, H)));\n}\n\n// The ramp dispatcher both samplePalette ports splice. tRaw is the raw inter-stop\n// parameter [0,1]; the smoothstep ease + the huePath branch live HERE so the GLSL\n// and WGSL ramps are character-for-character one source. increasing(2)/decreasing(3)\n// take the OKLCh hue-arc (rainbow sweep); every other method takes the OKLab-\n// rectangular straight line (no hue detour).\nvec3 samplePaletteRamp(vec3 a, vec3 b, float tRaw, int huePath) {\n float t = smoothstep(0.0, 1.0, tRaw);\n if (huePath == 2 || huePath == 3) {\n return mixPaletteOklchArc(a, b, t, huePath);\n }\n return mixPaletteOklab(a, b, t);\n}";
|
|
5
|
+
export declare const PCG_HASH_GLSL = "\n// Jarzynski PCG2D \u2014 uvec2 \u2192 uvec2 permuted-congruential hash (JCGT 2020).\nuvec2 pcg2d(uvec2 v) {\n v = v * 1664525u + 1013904223u;\n v.x += v.y * 1664525u;\n v.y += v.x * 1664525u;\n v = v ^ (v >> 16u);\n v.x += v.y * 1664525u;\n v.y += v.x * 1664525u;\n v = v ^ (v >> 16u);\n return v;\n}\n\n// Float\u2192[0,1) scalar hash: bit-reinterpret the lattice coordinate, pcg2d it, take the\n// high word back to [0,1). Integer-bit \u2014 no sin() periodicity, no float-fract lattice.\nfloat pcgHash2(vec2 p) {\n uvec2 u = floatBitsToUint(p);\n return float(pcg2d(u).x) * (1.0 / 4294967296.0);\n}\n\n// Integer-lattice gradient: pcg2d the integer cell, fold the hash to an angle, return\n// the unit gradient vector. The gradient basis (not a scalar value) is what makes the\n// noise zero at the nodes (no value-noise plateaus).\nvec2 pcgGrad2(ivec2 cell) {\n uvec2 h = pcg2d(uvec2(cell));\n float ang = float(h.x) * (1.0 / 4294967296.0) * 6.28318530717958647692;\n return vec2(cos(ang), sin(ang));\n}\n\n// 2D SIMPLEX gradient noise (Gustavson skew). The skew transform F2/G2 maps the square\n// lattice onto a simplex (triangular) grid \u2014 no axis-aligned directional bias. Each of\n// the three simplex corners contributes grad\u00B7offset shaped by a radial (0.5 - r\u00B2)\u2074\n// falloff. Output is ~[-1, 1]; callers remap to [0,1] via 0.5 + 0.5*gnoise.\nfloat gnoise(vec2 p) {\n const float F2 = 0.36602540378443864676; // (sqrt(3) - 1) / 2\n const float G2 = 0.21132486540518711775; // (3 - sqrt(3)) / 6\n float s = (p.x + p.y) * F2;\n vec2 i = floor(p + s);\n float tt = (i.x + i.y) * G2;\n vec2 x0 = p - (i - tt); // offset from the simplex origin corner\n ivec2 i1 = (x0.x > x0.y) ? ivec2(1, 0) : ivec2(0, 1);\n vec2 x1 = x0 - vec2(i1) + G2;\n vec2 x2 = x0 - 1.0 + 2.0 * G2;\n ivec2 ii = ivec2(i);\n float n = 0.0;\n float t0 = 0.5 - dot(x0, x0);\n if (t0 > 0.0) { t0 *= t0; n += t0 * t0 * dot(pcgGrad2(ii), x0); }\n float t1 = 0.5 - dot(x1, x1);\n if (t1 > 0.0) { t1 *= t1; n += t1 * t1 * dot(pcgGrad2(ii + i1), x1); }\n float t2 = 0.5 - dot(x2, x2);\n if (t2 > 0.0) { t2 *= t2; n += t2 * t2 * dot(pcgGrad2(ii + ivec2(1, 1)), x2); }\n return 70.0 * n; // normalize to ~[-1, 1]\n}";
|
|
4
6
|
export declare const OETF_WGSL = "\nfn srgbToLinearCh(c: f32) -> f32 {\n return select(pow((c + 0.055) / 1.055, 2.4), c / 12.92, c <= 0.04045);\n}\nfn srgbToLinear(c: vec3f) -> vec3f {\n return vec3f(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\nfn linearToSrgbCh(c: f32) -> f32 {\n return select(1.055 * pow(c, 1.0 / 2.4) - 0.055, c * 12.92, c <= 0.0031308);\n}\nfn linearToSrgb(c: vec3f) -> vec3f {\n return vec3f(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}";
|
|
5
7
|
export declare const FBM_ROT_WGSL = "const FBM_ROT: mat2x2f = mat2x2f(0.8, 0.6, -0.6, 0.8);";
|
|
6
8
|
export declare const OKLCH_MATRICES_WGSL = "\nconst LINEAR_SRGB_TO_LMS: mat3x3f = mat3x3f(\n 0.4122214708, 0.2119034982, 0.0883024619,\n 0.5363325363, 0.6806995451, 0.2817188376,\n 0.0514459929, 0.1073969566, 0.6299787005\n);\nconst LMS_TO_OKLAB: mat3x3f = mat3x3f(\n 0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660\n);\nconst OKLAB_TO_LMS: mat3x3f = mat3x3f(\n 1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480\n);\nconst LMS_TO_LINEAR_SRGB: mat3x3f = mat3x3f(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\nfn srgbToOklab(c: vec3f) -> vec3f {\n let lin = srgbToLinear(c);\n let lms = LINEAR_SRGB_TO_LMS * lin;\n let lmsCbrt = sign(lms) * pow(abs(lms), vec3f(1.0 / 3.0));\n return LMS_TO_OKLAB * lmsCbrt;\n}\nfn oklabToLinearSrgb(lab: vec3f) -> vec3f {\n let lms_ = OKLAB_TO_LMS * lab;\n let lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\nfn oklabToOklch(lab: vec3f) -> vec3f {\n let C = length(lab.yz);\n var H = atan2(lab.z, lab.y);\n if (H < 0.0) { H = H + 2.0 * PI; }\n return vec3f(lab.x, C, H);\n}\nfn oklchToOklab(lch: vec3f) -> vec3f {\n return vec3f(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}";
|
|
9
|
+
export declare const PALETTE_RAMP_WGSL = "\nfn interpolateHueTurns(h0: f32, h1: f32, t: f32, method: i32) -> f32 {\n let TAU = 2.0 * PI;\n var a = h0 / TAU;\n var b = h1 / TAU;\n let i = b - a;\n if (method == 0) { // shorter\n if (i > 0.5) { a = a + 1.0; } else if (i < -0.5) { b = b + 1.0; }\n } else if (method == 1) { // longer\n if (i > 0.0 && i < 0.5) { a = a + 1.0; } else if (i > -0.5 && i <= 0.0) { b = b + 1.0; }\n } else if (method == 2) { // increasing\n if (i < 0.0) { b = b + 1.0; }\n } else { // decreasing\n if (i > 0.0) { a = a + 1.0; }\n }\n let r = fract(a + t * (b - a));\n return r * TAU;\n}\n\nfn mixPaletteOklab(linA: vec3f, linB: vec3f, t: f32) -> vec3f {\n let labA = LMS_TO_OKLAB * (sign(LINEAR_SRGB_TO_LMS * linA) * pow(abs(LINEAR_SRGB_TO_LMS * linA), vec3f(1.0 / 3.0)));\n let labB = LMS_TO_OKLAB * (sign(LINEAR_SRGB_TO_LMS * linB) * pow(abs(LINEAR_SRGB_TO_LMS * linB), vec3f(1.0 / 3.0)));\n let lab = mix(labA, labB, vec3f(t));\n return oklabToLinearSrgb(lab);\n}\n\nfn mixPaletteOklchArc(linA: vec3f, linB: vec3f, t: f32, method: i32) -> vec3f {\n let labA = LMS_TO_OKLAB * (sign(LINEAR_SRGB_TO_LMS * linA) * pow(abs(LINEAR_SRGB_TO_LMS * linA), vec3f(1.0 / 3.0)));\n let labB = LMS_TO_OKLAB * (sign(LINEAR_SRGB_TO_LMS * linB) * pow(abs(LINEAR_SRGB_TO_LMS * linB), vec3f(1.0 / 3.0)));\n let lchA = oklabToOklch(labA);\n let lchB = oklabToOklch(labB);\n let L = mix(lchA.x, lchB.x, t);\n let C = mix(lchA.y, lchB.y, t);\n let H = interpolateHueTurns(lchA.z, lchB.z, t, method);\n return oklabToLinearSrgb(oklchToOklab(vec3f(L, C, H)));\n}\n\nfn samplePaletteRamp(a: vec3f, b: vec3f, tRaw: f32, huePath: i32) -> vec3f {\n let t = smoothstep(0.0, 1.0, tRaw);\n if (huePath == 2 || huePath == 3) {\n return mixPaletteOklchArc(a, b, t, huePath);\n }\n return mixPaletteOklab(a, b, t);\n}";
|
|
10
|
+
export declare const PCG_HASH_WGSL = "\nfn pcg2d(v0: vec2u) -> vec2u {\n var v = v0 * 1664525u + vec2u(1013904223u);\n v.x = v.x + v.y * 1664525u;\n v.y = v.y + v.x * 1664525u;\n v = v ^ (v >> vec2u(16u));\n v.x = v.x + v.y * 1664525u;\n v.y = v.y + v.x * 1664525u;\n v = v ^ (v >> vec2u(16u));\n return v;\n}\n\nfn pcgHash2(p: vec2f) -> f32 {\n let u = bitcast<vec2u>(p);\n return f32(pcg2d(u).x) * (1.0 / 4294967296.0);\n}\n\nfn pcgGrad2(cell: vec2i) -> vec2f {\n let h = pcg2d(bitcast<vec2u>(cell));\n let ang = f32(h.x) * (1.0 / 4294967296.0) * 6.28318530717958647692;\n return vec2f(cos(ang), sin(ang));\n}\n\nfn gnoise(p: vec2f) -> f32 {\n let F2 = 0.36602540378443864676;\n let G2 = 0.21132486540518711775;\n let s = (p.x + p.y) * F2;\n let i = floor(p + vec2f(s));\n let tt = (i.x + i.y) * G2;\n let x0 = p - (i - vec2f(tt));\n var i1 = vec2i(0, 1);\n if (x0.x > x0.y) { i1 = vec2i(1, 0); }\n let x1 = x0 - vec2f(i1) + vec2f(G2);\n let x2 = x0 - vec2f(1.0) + vec2f(2.0 * G2);\n let ii = vec2i(i);\n var n = 0.0;\n var t0 = 0.5 - dot(x0, x0);\n if (t0 > 0.0) { t0 = t0 * t0; n = n + t0 * t0 * dot(pcgGrad2(ii), x0); }\n var t1 = 0.5 - dot(x1, x1);\n if (t1 > 0.0) { t1 = t1 * t1; n = n + t1 * t1 * dot(pcgGrad2(ii + i1), x1); }\n var t2 = 0.5 - dot(x2, x2);\n if (t2 > 0.0) { t2 = t2 * t2; n = n + t2 * t2 * dot(pcgGrad2(ii + vec2i(1, 1)), x2); }\n return 70.0 * n;\n}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type WebGLSuspendReason = "tab-hidden" | "off-screen" | "manual";
|
|
1
|
+
export type WebGLSuspendReason = "tab-hidden" | "off-screen" | "off-screen-io" | "manual";
|
|
2
2
|
/** The per-frame hooks a consumer's `setup(gl)` returns. */
|
|
3
3
|
export interface WebGLCanvasFrame {
|
|
4
4
|
/** Draw one frame at `timeSec`. The consumer uploads its uniforms + draws. */
|
package/dist/configurator.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./useConfiguratorState-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./useConfiguratorState-CMff4GzH.js";
|
|
2
2
|
export { e as CONFIGURATOR_DENSITY_KEY, t as Configurator, i as ConfiguratorLayer, n as ConfiguratorRow, r as provideConfiguratorDensity, o as useConfiguratorState, a as useOptionalConfiguratorDensity };
|
package/dist/confirm-dialog.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./createLucideIcon-B6uNAU9G.js";
|
|
2
2
|
import { n as t } from "./button-CAywcrhO.js";
|
|
3
|
-
import { t as n } from "./_plugin-vue_export-helper-
|
|
3
|
+
import { t as n } from "./_plugin-vue_export-helper-ok8pgSl5.js";
|
|
4
4
|
import { Transition as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, mergeModels as d, openBlock as f, renderSlot as p, toDisplayString as m, unref as h, useModel as g, withCtx as _, withKeys as v, withModifiers as y } from "vue";
|
|
5
5
|
var b = e("loader-circle", [["path", {
|
|
6
6
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|