@mkbabb/glass-ui 3.8.0 → 3.10.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/README.md +1 -6
- package/dist/{CardAction-q2qHCJFG.js → CardAction-DuArVky-.js} +4 -4
- package/dist/{CommandShortcut-SzWRhROC.js → CommandShortcut-CefCj5mt.js} +7 -7
- package/dist/{ContextMenuSubContent-Do977Cbf.js → ContextMenuSubContent-Bhg4f5jX.js} +3 -3
- package/dist/{DataTable-CvlWXz65.js → DataTable-CUHMukiQ.js} +1 -1
- package/dist/{DialogContent-DjZWT3lK.js → DialogContent-BRkT1cjP.js} +1 -1
- package/dist/{MetricBadge-lTc002u2.js → MetricBadge-BZVWIxNy.js} +6 -4
- package/dist/{Notification-BxK8LZMw.js → Notification-DLMhblXR.js} +2 -2
- package/dist/{NumberFieldContent-CLNVR1iY.js → NumberFieldContent-BbLOh8RU.js} +2 -2
- package/dist/{SelectScrollDownButton-C7TRe-ep.js → SelectScrollDownButton-T32cVFeM.js} +3 -3
- package/dist/{SelectSeparator-L8pPEn4L.js → SelectSeparator-C4Ql0gzV.js} +1 -1
- package/dist/{Switch-LDKLmmgx.js → Switch-Ch-k3Rv-.js} +1 -1
- package/dist/{TabsList-qyHZ2lKY.js → TabsList-B8CVOQPC.js} +2 -2
- package/dist/{Toaster-CabYEEF_.js → Toaster-1rYWrmAm.js} +1 -1
- package/dist/{ToggleGroupItem-CkXUcBlt.js → ToggleGroupItem-Cev4pOVK.js} +4 -4
- package/dist/animated-digit.js +1 -1
- package/dist/api/index.d.ts +2 -1
- package/dist/api.js +1 -1
- package/dist/aurora.js +236 -545
- package/dist/{badge-DHQrc_GQ.js → badge-CaoFJzRb.js} +5 -5
- package/dist/badge.js +1 -1
- package/dist/{button-CAywcrhO.js → button-DN39cGqL.js} +13 -12
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel.js +1 -1
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/{compile-BBTRjvQS.js → compile-BOXjLUxu.js} +24 -24
- package/dist/components/custom/aurora/composables/atoms.d.ts +21 -4
- package/dist/components/custom/aurora/composables/runtime.d.ts +0 -9
- package/dist/components/custom/aurora/composables/uniformBridge.d.ts +0 -11
- package/dist/components/custom/aurora/constants/renderMode.d.ts +0 -32
- package/dist/components/custom/aurora/constants/shaders/brush.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/constants/shaders/mediums.glsl.d.ts +2 -2
- package/dist/components/custom/aurora/constants/shaders/tonemap.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/index.d.ts +1 -1
- package/dist/components/custom/configurator/ConfiguratorLayer.vue.d.ts +1 -1
- package/dist/components/custom/constellation/Constellation.vue.d.ts +73 -1
- package/dist/components/custom/constellation/constellationField.d.ts +255 -3
- package/dist/components/custom/constellation/index.d.ts +2 -2
- package/dist/components/custom/dock/DockSeparator.vue.d.ts +3 -0
- package/dist/components/custom/dock/DockTabButton.vue.d.ts +4 -3
- package/dist/components/custom/dock/GlassDock.vue.d.ts +45 -63
- package/dist/components/custom/dock/composables/dockContext.d.ts +7 -0
- package/dist/components/custom/dock/index.d.ts +2 -1
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +29 -0
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +6 -0
- package/dist/components/custom/fourier-field/index.d.ts +25 -1
- package/dist/components/custom/fourier-field/math.d.ts +3 -8
- package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +8 -10
- package/dist/components/custom/goo-blob/composables/useBlobMood.d.ts +19 -5
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +6 -14
- package/dist/components/custom/goo-blob/index.d.ts +1 -1
- package/dist/components/custom/goo-blob/types.d.ts +59 -25
- package/dist/components/custom/handmark/HandMark.vue.d.ts +29 -0
- package/dist/components/custom/handmark/brush.d.ts +219 -0
- package/dist/components/custom/handmark/freehand.d.ts +69 -0
- package/dist/components/custom/handmark/geometry.d.ts +32 -0
- package/dist/components/custom/handmark/index.d.ts +21 -0
- package/dist/components/custom/handmark/ink.d.ts +11 -0
- package/dist/components/custom/handmark/texture.d.ts +39 -0
- package/dist/components/custom/handmark/types.d.ts +53 -0
- package/dist/components/custom/handmark/useHandMark.d.ts +66 -0
- package/dist/components/custom/metric-badge/MetricBadge.vue.d.ts +8 -0
- package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +92 -0
- package/dist/components/custom/tabs/composables/useTabIndicator.d.ts +49 -0
- package/dist/components/custom/tabs/index.d.ts +2 -5
- package/dist/components/ui/button/index.d.ts +1 -1
- package/dist/components/ui/card/Card.vue.d.ts +5 -3
- package/dist/components/ui/carousel/CarouselNext.vue.d.ts +1 -1
- package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +1 -1
- package/dist/components/ui/carousel/GlassCarouselPager.vue.d.ts +3 -4
- package/dist/components/ui/slider/index.d.ts +22 -11
- package/dist/components/ui/tabs/TabsList.vue.d.ts +1 -1
- package/dist/composables/color/index.d.ts +12 -7
- package/dist/composables/context/createContext.d.ts +1 -1
- package/dist/composables/glass/webgl/shaders/procedural-color.glsl.d.ts +1 -6
- package/dist/composables/motion/core/index.d.ts +1 -0
- package/dist/composables/motion/useRouteTransition.d.ts +42 -0
- package/dist/configurator.js +1 -1
- package/dist/confirm-dialog.js +1 -1
- package/dist/constellation.js +212 -72
- package/dist/context-menu.js +1 -1
- package/dist/controls.js +1 -1
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/deck-progress.js +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dock.js +257 -243
- package/dist/{dropdown-menu-B_4bWyyG.js → dropdown-menu-D77jX6Df.js} +3 -3
- package/dist/dropdown-menu.js +1 -1
- package/dist/expandable-container.js +61 -38
- package/dist/forms.js +5 -5
- package/dist/fourier-field.js +89 -97
- package/dist/fourier-math.d.ts +1 -0
- package/dist/fourier-math.js +2 -0
- package/dist/glass-panel.js +1 -1
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +107 -109
- package/dist/goo-blob.js +316 -297
- package/dist/handmark.d.ts +1 -0
- package/dist/handmark.js +609 -0
- package/dist/hover-popover.js +1 -1
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/keyboard.js +1 -1
- package/dist/labeled-field.js +5 -5
- package/dist/math-DTpRVC0e.js +27 -0
- package/dist/{menuItemVariants-DKM85SNE.js → menuItemVariants-CCoBNkU5.js} +1 -1
- package/dist/metric-badge.js +1 -1
- package/dist/metric-stack.js +1 -1
- package/dist/motion-core.js +70 -69
- package/dist/motion.js +2 -2
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +1 -1
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +4 -4
- package/dist/select.js +2 -2
- package/dist/{slider-D9puf-Ko.js → slider-CyzcxBoh.js} +6 -6
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +1 -1
- package/dist/status-dot.js +17 -16
- package/dist/styles/animations.css +80 -20
- package/dist/styles/cards.css +2 -2
- package/dist/styles/components.css +1 -1
- package/dist/styles/dock/density.css +230 -0
- package/dist/styles/dock/layer-group.css +275 -0
- package/dist/styles/dock/layers.css +355 -0
- package/dist/styles/dock/morph.css +244 -0
- package/dist/styles/dock/overflow.css +201 -0
- package/dist/styles/dock/shell.css +457 -0
- package/dist/styles/dock-controls.css +205 -55
- package/dist/styles/dock.css +42 -1349
- package/dist/styles/drawer.css +12 -4
- package/dist/styles/glass.css +535 -78
- package/dist/styles/index.css +12 -11
- package/dist/styles/paper.css +68 -2
- package/dist/styles/theme.css +58 -0
- package/dist/styles/tokens.css +601 -69
- package/dist/styles/transitions.css +20 -2
- package/dist/styles/utilities.css +218 -78
- package/dist/styles/view-transition.css +51 -0
- package/dist/switch.js +1 -1
- package/dist/tabs.js +182 -151
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/{useAnimatedNumber-C_3wZLx4.js → useAnimatedNumber-Bcpy5Etf.js} +1 -1
- package/dist/{useConfiguratorState-CMff4GzH.js → useConfiguratorState-DxAqksK6.js} +21 -10
- package/dist/{useGlassRenderer-5I0YkI4t.js → useGlassRenderer-D7YGOYiM.js} +1 -1
- package/dist/useViewTransition-DaN5Zrox.js +21 -0
- package/dist/vReveal-zUIQk-rJ.js +53 -0
- package/dist/watercolor-dot.js +1 -1
- package/package.json +80 -39
- package/src/styles/animations.css +80 -20
- package/src/styles/cards.css +2 -2
- package/src/styles/dock/density.css +230 -0
- package/src/styles/dock/layer-group.css +275 -0
- package/src/styles/dock/layers.css +355 -0
- package/src/styles/dock/morph.css +244 -0
- package/src/styles/dock/overflow.css +201 -0
- package/src/styles/dock/shell.css +457 -0
- package/src/styles/dock-controls.css +205 -55
- package/src/styles/dock.css +42 -1349
- package/src/styles/drawer.css +12 -4
- package/src/styles/glass.css +535 -78
- package/src/styles/index.css +12 -11
- package/src/styles/paper.css +68 -2
- package/src/styles/theme.css +58 -0
- package/src/styles/tokens.css +601 -69
- package/src/styles/transitions.css +20 -2
- package/src/styles/utilities.css +218 -78
- package/src/styles/view-transition.css +51 -0
- package/dist/DiscoGlyph-CG0F410s.js +0 -132
- package/dist/GlyphFace-DRjDkB0s.js +0 -51
- package/dist/UnderlineTabs-Uxn-R3MT.js +0 -39
- package/dist/components/custom/aurora/composables/gpuRuntime.d.ts +0 -16
- package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +0 -7
- package/dist/components/custom/aurora/constants/shaders/painterly.wgsl.d.ts +0 -7
- package/dist/components/custom/aurora/constants/shaders/wake.wgsl.d.ts +0 -4
- package/dist/components/custom/disco-glyph/DiscoGlyph.vue.d.ts +0 -58
- package/dist/components/custom/disco-glyph/index.d.ts +0 -1
- package/dist/components/custom/glass-carousel/GlassCarousel.vue.d.ts +0 -36
- package/dist/components/custom/glass-carousel/GlassCarouselItem.vue.d.ts +0 -28
- package/dist/components/custom/glass-carousel/index.d.ts +0 -4
- package/dist/components/custom/glass-carousel/useGlassCarousel.d.ts +0 -30
- package/dist/components/custom/glyph-face/GlyphFace.vue.d.ts +0 -64
- package/dist/components/custom/glyph-face/index.d.ts +0 -2
- package/dist/components/custom/glyph-face/keys.d.ts +0 -9
- package/dist/components/custom/responsive-tabs/ResponsiveTabs.vue.d.ts +0 -73
- package/dist/components/custom/responsive-tabs/index.d.ts +0 -2
- package/dist/components/custom/tabs/BouncyTabs.vue.d.ts +0 -27
- package/dist/components/custom/tabs/BouncyToggle.vue.d.ts +0 -60
- package/dist/components/custom/tabs/UnderlineTabs.vue.d.ts +0 -20
- package/dist/components/custom/tabs/composables/useBouncySlider.d.ts +0 -39
- package/dist/composables/glass/createGPUCanvas.d.ts +0 -40
- package/dist/disco-glyph.d.ts +0 -1
- package/dist/disco-glyph.js +0 -2
- package/dist/glass-carousel.d.ts +0 -1
- package/dist/glass-carousel.js +0 -219
- package/dist/glyph-face.d.ts +0 -1
- package/dist/glyph-face.js +0 -3
- package/dist/keys-BsYjEFOW.js +0 -9
- package/dist/responsive-tabs.d.ts +0 -1
- package/dist/responsive-tabs.js +0 -95
- package/dist/styles/disco-glyph.css +0 -26
- package/dist/styles/glyph-face.css +0 -92
- package/dist/vReveal-CqaCz_mC.js +0 -44
- package/src/styles/disco-glyph.css +0 -26
- package/src/styles/glyph-face.css +0 -92
- /package/dist/{DeckProgress-AVgbIULY.js → DeckProgress-Dmk4_AKN.js} +0 -0
- /package/dist/{HoverPopover-D56O6Ylp.js → HoverPopover-2LOIW34a.js} +0 -0
- /package/dist/{IconTooltip-D2T5nYOM.js → IconTooltip-Cus0fvK0.js} +0 -0
- /package/dist/{Input-DVG_J0ne.js → Input-xuDwALQR.js} +0 -0
- /package/dist/{ScrollingText-CVyqxvfv.js → ScrollingText-BPP84wKo.js} +0 -0
- /package/dist/{color-DMLTunJK.js → color-C5ls_QF7.js} +0 -0
- /package/dist/{constants-BPOqYJAm.js → constants-yKeKnE84.js} +0 -0
- /package/dist/{presets-D1XPuTj-.js → presets-Dkdv55Gt.js} +0 -0
- /package/dist/{prng-COGhh02-.js → prng-D27-B3tK.js} +0 -0
- /package/dist/{useGlobalDark-D3EBWzXK.js → useGlobalDark-d6waty-X.js} +0 -0
- /package/dist/{useIntersectionPause-Bj4sPkMh.js → useIntersectionPause-Cck5Uxk8.js} +0 -0
- /package/dist/{useInterval-CcLfq2WU.js → useInterval-Dsmqwi03.js} +0 -0
- /package/dist/{useKeyboardShortcuts-BXWXOZ-9.js → useKeyboardShortcuts-CyIYrndH.js} +0 -0
- /package/dist/{useScrollProgress-C9ysDic5.js → useScrollProgress-CffFGLa5.js} +0 -0
- /package/dist/{useSortable-MGAbCGVJ.js → useSortable-C8ReQ50P.js} +0 -0
- /package/dist/{useTextHighlight-9nMW23Qb.js → useTextHighlight-CWEi25hf.js} +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./cn-DJXf4yaB.js";
|
|
2
|
-
import { n as t } from "./keys-BsYjEFOW.js";
|
|
3
|
-
import { computed as n, createElementBlock as r, createElementVNode as i, defineComponent as a, normalizeClass as o, normalizeStyle as s, openBlock as c, ref as l, renderSlot as u } from "vue";
|
|
4
|
-
//#region src/components/custom/glyph-face/GlyphFace.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var d = ["data-active"], f = /* @__PURE__ */ a({
|
|
6
|
-
__name: "GlyphFace",
|
|
7
|
-
props: {
|
|
8
|
-
active: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
default: !1
|
|
11
|
-
},
|
|
12
|
-
tint: {},
|
|
13
|
-
silhouette: {},
|
|
14
|
-
class: { type: [
|
|
15
|
-
Boolean,
|
|
16
|
-
null,
|
|
17
|
-
String,
|
|
18
|
-
Object,
|
|
19
|
-
Array
|
|
20
|
-
] }
|
|
21
|
-
},
|
|
22
|
-
setup(a) {
|
|
23
|
-
let f = a, p = l(void 0);
|
|
24
|
-
t(p);
|
|
25
|
-
let m = n(() => e("glyph-face", f.class)), h = n(() => {
|
|
26
|
-
let e = { "--gf-tint": f.tint ?? "transparent" }, t = f.silhouette ?? p.value;
|
|
27
|
-
if (t) {
|
|
28
|
-
let n = t.trim();
|
|
29
|
-
e["--gf-silhouette"] = /^[Mm][\s.,\d-]/.test(n) ? `path('${n}')` : n;
|
|
30
|
-
}
|
|
31
|
-
return e;
|
|
32
|
-
});
|
|
33
|
-
return (e, t) => (c(), r("span", {
|
|
34
|
-
class: o(m.value),
|
|
35
|
-
"data-active": a.active ? "true" : "false",
|
|
36
|
-
style: s(h.value)
|
|
37
|
-
}, [
|
|
38
|
-
t[0] ||= i("span", {
|
|
39
|
-
class: "glyph-face-backplate",
|
|
40
|
-
"aria-hidden": "true"
|
|
41
|
-
}, null, -1),
|
|
42
|
-
u(e.$slots, "default"),
|
|
43
|
-
t[1] ||= i("span", {
|
|
44
|
-
class: "glyph-face-cap",
|
|
45
|
-
"aria-hidden": "true"
|
|
46
|
-
}, null, -1)
|
|
47
|
-
], 14, d));
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
//#endregion
|
|
51
|
-
export { f as t };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./cn-DJXf4yaB.js";
|
|
2
|
-
import { t } from "./_plugin-vue_export-helper-ok8pgSl5.js";
|
|
3
|
-
import { Fragment as n, createElementBlock as r, defineComponent as i, mergeModels as a, normalizeClass as o, openBlock as s, renderList as c, toDisplayString as l, unref as u, useModel as d } from "vue";
|
|
4
|
-
//#region src/components/custom/tabs/UnderlineTabs.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var f = ["aria-selected", "onClick"], p = /* @__PURE__ */ t(/* @__PURE__ */ i({
|
|
6
|
-
__name: "UnderlineTabs",
|
|
7
|
-
props: /* @__PURE__ */ a({
|
|
8
|
-
options: {},
|
|
9
|
-
class: { type: [
|
|
10
|
-
Boolean,
|
|
11
|
-
null,
|
|
12
|
-
String,
|
|
13
|
-
Object,
|
|
14
|
-
Array
|
|
15
|
-
] }
|
|
16
|
-
}, {
|
|
17
|
-
modelValue: { required: !0 },
|
|
18
|
-
modelModifiers: {}
|
|
19
|
-
}),
|
|
20
|
-
emits: ["update:modelValue"],
|
|
21
|
-
setup(t) {
|
|
22
|
-
let i = t, a = d(t, "modelValue");
|
|
23
|
-
function p(e) {
|
|
24
|
-
a.value = e;
|
|
25
|
-
}
|
|
26
|
-
return (d, m) => (s(), r("div", {
|
|
27
|
-
role: "tablist",
|
|
28
|
-
class: o(u(e)("underline-tabs", i.class))
|
|
29
|
-
}, [(s(!0), r(n, null, c(t.options, (e) => (s(), r("button", {
|
|
30
|
-
key: e.value,
|
|
31
|
-
class: "underline-tab",
|
|
32
|
-
role: "tab",
|
|
33
|
-
"aria-selected": a.value === e.value ? "true" : "false",
|
|
34
|
-
onClick: (t) => p(e.value)
|
|
35
|
-
}, l(e.label), 9, f))), 128))], 2));
|
|
36
|
-
}
|
|
37
|
-
}), [["__scopeId", "data-v-f3ec0f83"]]);
|
|
38
|
-
//#endregion
|
|
39
|
-
export { p as t };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { GPUCanvasFrame, GPUCanvasSetupArgs } from "../../../../composables/glass/createGPUCanvas";
|
|
2
|
-
import type { CursorState } from "./cursorModel";
|
|
3
|
-
import type { AuroraConfig } from "../constants/presets";
|
|
4
|
-
export interface GPUAuroraDeps {
|
|
5
|
-
canvas: HTMLCanvasElement;
|
|
6
|
-
getConfig: () => AuroraConfig;
|
|
7
|
-
cursor: CursorState;
|
|
8
|
-
getReducedMotion: () => boolean;
|
|
9
|
-
/** The frozen frame-time offset under reduced motion (matches the WebGL2 path). */
|
|
10
|
-
frozenOffset: number;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The `setup` callback for `createGPUCanvas`. Builds the pipeline once on the device,
|
|
14
|
-
* returns the frame hooks. The single render pass draws the WGSL aurora base field.
|
|
15
|
-
*/
|
|
16
|
-
export declare function createGPUAuroraSetup(deps: GPUAuroraDeps): ({ device, context, format }: GPUCanvasSetupArgs) => GPUCanvasFrame;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
declare const WGSL_MAX_NUCLEI = 6;
|
|
2
|
-
declare const WGSL_MAX_STOPS = 8;
|
|
3
|
-
export declare const AURORA_VERTEX_WGSL = "\nstruct VSOut {\n @builtin(position) pos: vec4f,\n @location(0) uv: vec2f,\n};\n\n@vertex\nfn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {\n // Full-screen triangle (matches the WebGL2 [-1,-1, 3,-1, -1,3] quad).\n var p = array<vec2f, 3>(vec2f(-1.0, -1.0), vec2f(3.0, -1.0), vec2f(-1.0, 3.0));\n var out: VSOut;\n let xy = p[vi];\n out.pos = vec4f(xy, 0.0, 1.0);\n out.uv = 0.5 * (xy + vec2f(1.0));\n return out;\n}";
|
|
4
|
-
export declare const AURORA_FRAGMENT_WGSL = "\nconst PI: f32 = 3.141592653589793;\nconst W_LUMA: vec3f = vec3f(0.2126, 0.7152, 0.0722);\nconst MAX_NUCLEI: u32 = 6u;\nconst MAX_STOPS: u32 = 8u;\n\n// The uniform struct \u2014 ONLY constant-indexed scalars (safe in the uniform address\n// space). The five count/enum fields are f32 (AX.W07 1a): the WebGPU write path packs\n// them as floats and the shader i32-casts at each use, so WGSL never reads a float\n// bit-pattern as a raw i32. The dynamically-indexed arrays moved OUT to struct Field\n// below (AX.W07 1b).\nstruct Uniforms {\n time: f32,\n stopCount: f32,\n nucleiCount: f32,\n softmaxBeta: f32,\n valueVariance: f32,\n warpAmount: f32,\n warpScale: f32,\n warpDrift: f32,\n warpMode: f32,\n noiseOctaves: f32,\n medium: f32,\n breathDepth: f32,\n breathPeriod: f32,\n saturation: f32,\n paperGrain: f32,\n alpha: f32,\n // AX.W11 \u2014 the huePath enum (f32-packed, i32()-cast in samplePalette) carries the\n // shared ramp's OKLab-rectangular-vs-OKLCh-hue-arc dispatch into the WebGPU twin so\n // a huePath:'increasing' rainbow config arcs identically to the WebGL2 oracle. The\n // CPU pad keeps the buffer vec4-aligned (WGPU_UNIFORM_FLOATS rounds to 20).\n huePath: f32,\n};\n\n// The dynamically-indexed arrays \u2014 bound var<storage, read> (AX.W07 1b). A runtime\n// palette/nuclei index into a var<uniform> array<vec4f> returns [0,0,0,0] on Metal\n// (MSL forbids dynamic indexing of constant); storage is always-legal. The vec4 stride\n// is std140-identical to the uniform layout, so the move is byte-exact.\nstruct Field {\n palette: array<vec4f, 8>, // .xyz = linear-sRGB stop\n nucleiPos: array<vec4f, 6>, // .xy pos, .z radius, .w paletteBias\n nucleiMod: array<vec4f, 6>, // .x valueBias, .y elong, .z angle, .w driftRadius\n};\n\n@group(0) @binding(0) var<uniform> U: Uniforms;\n@group(0) @binding(1) var<storage, read> F: Field;\n\n\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}\nconst FBM_ROT: mat2x2f = mat2x2f(0.8, 0.6, -0.6, 0.8);\n\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}\n\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}\n\n// AX.W12 \u2014 the painterly-medium organic noise basis (PCG2D integer-bit hash + 2D\n// simplex gradient noise), SPLICED from the shared procedural-color chunk \u2014 the EXACT\n// twin of the GLSL leaf aurora.frag.ts splices, so the hash can NEVER drift between\n// backends (proof:aurora-noise-hash-equivalence locks the twins to 1e-6). The WebGPU\n// single-pass fs_main below stays the smooth pole (it runs no medium body \u2014 the\n// painterly mediums are the W7c/W14 multi-pass), so the leaf is single-sourced HERE for\n// the twin-equivalence contract; the W14 painterly passes consume it.\n\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}\n\nfn hash21(p0: vec2f) -> f32 {\n var p = fract(p0 * vec2f(123.34, 456.21));\n p = p + dot(p, p + 45.32);\n return fract(p.x * p.y);\n}\nfn vnoise(p: vec2f) -> f32 {\n let i = floor(p);\n let f = fract(p);\n let u = f * f * (3.0 - 2.0 * f);\n let a = hash21(i);\n let b = hash21(i + vec2f(1.0, 0.0));\n let c = hash21(i + vec2f(0.0, 1.0));\n let d = hash21(i + vec2f(1.0, 1.0));\n return mix(mix(a, b, u.x), mix(c, d, u.x), u.y);\n}\nfn fbm(p0: vec2f) -> f32 {\n var v = 0.0;\n var a = 0.5;\n var p = p0;\n let octaves = i32(U.noiseOctaves); // AX.W07 1a \u2014 i32()-cast the f32-packed count.\n for (var i = 0; i < 5; i = i + 1) {\n if (i >= octaves) { break; }\n v = v + a * vnoise(p);\n p = FBM_ROT * p * 2.02;\n a = a * 0.5;\n }\n return v;\n}\n\nfn samplePalette(id: f32) -> vec3f {\n // AX.W11 \u2014 splice the SHARED samplePaletteRamp (the smoothstep ease + the OKLab-\n // rectangular-vs-OKLCh-hue-arc huePath dispatch), the EXACT twin the GLSL oracle\n // splices. The body here only selects the bracketing stop pair + the raw inter-stop\n // t (the W07 storage-Field dynamic index), then hands them to the shared ramp.\n let n = i32(U.stopCount); // AX.W07 1a \u2014 i32()-cast the f32-packed count.\n if (n <= 1) { return F.palette[0].xyz; }\n let t = clamp(id, 0.0, 1.0) * f32(n - 1);\n let i0 = i32(floor(t));\n let i1 = min(i0 + 1, n - 1);\n let f = t - f32(i0);\n // AX.W07 1b \u2014 read the palette from the storage Field (dynamic i0/i1 index);\n // AX.W11 \u2014 i32()-cast the f32-packed huePath enum (parity with the count casts).\n return samplePaletteRamp(F.palette[i0].xyz, F.palette[i1].xyz, f, i32(U.huePath));\n}\n\nfn domainWarp(p: vec2f, t: f32) -> vec2f {\n let drift = t * U.warpDrift * 5.0;\n let q = vec2f(\n fbm(p * U.warpScale + vec2f(drift, 0.0)),\n fbm(p * U.warpScale + vec2f(5.2, 1.3 + drift))\n );\n let r = vec2f(\n fbm(p * U.warpScale + 4.0 * q + vec2f(1.7, 9.2)),\n fbm(p * U.warpScale + 4.0 * q + vec2f(8.3, 2.8))\n );\n return p + U.warpAmount * r;\n}\n\nfn nucleiField(p: vec2f, t: f32) -> vec2f {\n // Returns (paletteId, valueMod) \u2014 softmax over the nuclei (isotropic; the WebGPU\n // twin keeps the parity-floor isotropic Gaussian).\n var accumId = 0.0;\n var accumVal = 0.0;\n var w = 0.0;\n let n = i32(U.nucleiCount); // AX.W07 1a \u2014 i32()-cast the f32-packed count.\n for (var i = 0; i < 6; i = i + 1) {\n if (i >= n) { break; }\n // AX.W07 1b \u2014 read the nuclei from the storage Field (dynamic i index).\n let pos = F.nucleiPos[i].xy;\n let rad = max(F.nucleiPos[i].z, 0.01);\n let d2 = dot(p - pos, p - pos);\n let wi = exp((-U.softmaxBeta * d2) / (rad * rad));\n accumId = accumId + wi * F.nucleiPos[i].w;\n accumVal = accumVal + wi * F.nucleiMod[i].x;\n w = w + wi;\n }\n if (w < 1e-4) { return vec2f(0.5, 0.0); }\n return vec2f(accumId / w, accumVal / w);\n}\n\n// ACES (Narkowicz) \u2014 matches the GLSL tonemap.\nfn aces(x: vec3f) -> vec3f {\n let a = 2.51; let b = 0.03; let c = 2.43; let d = 0.59; let e = 0.14;\n return clamp((x * (a * x + b)) / (x * (c * x + d) + e), vec3f(0.0), vec3f(1.0));\n}\n\n@fragment\nfn fs_main(@location(0) uv: vec2f) -> @location(0) vec4f {\n let t = U.time;\n let pw = domainWarp(uv, t);\n let nf = nucleiField(pw, t);\n var col = samplePalette(nf.x);\n col = col * (1.0 + U.valueVariance * nf.y);\n\n // Breath.\n let breath = sin(t * 6.2831 / max(U.breathPeriod, 1.0));\n col = col * (1.0 + U.breathDepth * breath * 0.5);\n\n // (The WebGPU smooth pole; the painterly mediums run the W7c multi-pass passes.)\n col = aces(col);\n col = linearToSrgb(col); // the mandatory OETF (linear \u2192 display).\n return vec4f(col * U.alpha, U.alpha); // premultiply AFTER the OETF (parity).\n}";
|
|
5
|
-
/** The assembled WGSL module string (vertex + fragment) for createGPUCanvas. */
|
|
6
|
-
export declare const AURORA_WGSL: string;
|
|
7
|
-
export { WGSL_MAX_NUCLEI, WGSL_MAX_STOPS };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/** The tensor-target format the CONSUMER declares (NOT baked in the substrate). */
|
|
2
|
-
export declare const PAINTERLY_TENSOR_FORMAT: "rgba16float";
|
|
3
|
-
/** The anisotropic-Kuwahara sector count the CONSUMER declares. */
|
|
4
|
-
export declare const PAINTERLY_KUWAHARA_SECTORS: 8;
|
|
5
|
-
export declare const PAINTERLY_TENSOR_WGSL = "\n@group(0) @binding(0) var baseTex: texture_2d<f32>;\n@group(0) @binding(1) var baseSampler: sampler;\n\nconst W_LUMA: vec3f = vec3f(0.2126, 0.7152, 0.0722);\n\n@fragment\nfn tensor_main(@location(0) uv: vec2f) -> @location(0) vec4f {\n let texel = 1.0 / vec2f(textureDimensions(baseTex));\n // 3x3 Sobel over luma.\n var l: array<f32, 9>;\n var k = 0;\n for (var dy = -1; dy <= 1; dy = dy + 1) {\n for (var dx = -1; dx <= 1; dx = dx + 1) {\n let s = textureSample(baseTex, baseSampler, uv + vec2f(f32(dx), f32(dy)) * texel).rgb;\n l[k] = dot(s, W_LUMA);\n k = k + 1;\n }\n }\n let gx = (l[2] + 2.0 * l[5] + l[8]) - (l[0] + 2.0 * l[3] + l[6]);\n let gy = (l[6] + 2.0 * l[7] + l[8]) - (l[0] + 2.0 * l[1] + l[2]);\n // (Jxx, Jyy, Jxy) \u2014 RGBA16F target (magnitudes exceed [0,1], 8-bit LDR clips).\n return vec4f(gx * gx, gy * gy, gx * gy, 1.0);\n}";
|
|
6
|
-
export declare const PAINTERLY_SMOOTH_WGSL = "\n@group(0) @binding(0) var tensorTex: texture_2d<f32>;\n@group(0) @binding(1) var tensorSampler: sampler;\n@group(0) @binding(2) var<uniform> dir: vec2f;\n\n@fragment\nfn smooth_main(@location(0) uv: vec2f) -> @location(0) vec4f {\n let texel = 1.0 / vec2f(textureDimensions(tensorTex));\n // 9-tap Gaussian (sigma ~2) along the dir axis.\n let w = array<f32, 5>(0.227027, 0.194594, 0.121622, 0.054054, 0.016216);\n var sum = textureSample(tensorTex, tensorSampler, uv).xyz * w[0];\n for (var i = 1; i < 5; i = i + 1) {\n let off = dir * texel * f32(i);\n sum = sum + textureSample(tensorTex, tensorSampler, uv + off).xyz * w[i];\n sum = sum + textureSample(tensorTex, tensorSampler, uv - off).xyz * w[i];\n }\n return vec4f(sum, 1.0);\n}";
|
|
7
|
-
export declare const PAINTERLY_KUWAHARA_WGSL: string;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/** The wake velocity-texture format (the CONSUMER declares it; the substrate bakes none). */
|
|
2
|
-
export declare const WAKE_TEXTURE_FORMAT: "rg16float";
|
|
3
|
-
export declare const WAKE_ADVECT_WGSL = "\nstruct WakeUniforms {\n dt: f32,\n tempo: f32, // the master tempo scalar (0 under PRM/pause \u2014 freezes injection)\n dissipation: f32,\n pad: f32,\n splatPos: vec2f, // the delta-tracked pointer position (0..1)\n splatVel: vec2f, // the pointer velocity (the splat direction/strength)\n splatRadius: f32,\n rippleAmp: f32, // a click \u2192 a radial-ripple impulse\n pad2: vec2f,\n};\n\n@group(0) @binding(0) var velTex: texture_2d<f32>;\n@group(0) @binding(1) var velSampler: sampler;\n@group(0) @binding(2) var<uniform> U: WakeUniforms;\n\n@fragment\nfn advect_main(@location(0) uv: vec2f) -> @location(0) vec4f {\n let texel = 1.0 / vec2f(textureDimensions(velTex));\n // Self-advection: trace back along the local velocity by dt (semi-Lagrangian).\n let v0 = textureSample(velTex, velSampler, uv).xy;\n let back = uv - v0 * U.dt;\n var v = textureSample(velTex, velSampler, back).xy;\n // Dissipate (the eddies decay so the wake lingers but fades).\n v = v * U.dissipation;\n\n // Delta-tracked Gaussian SPLAT \u2014 the pointer writes velocity into the field. The\n // injection is gated by the master tempo (0 under PRM \u2192 no new motion under reduce).\n let d = uv - U.splatPos;\n let g = exp(-dot(d, d) / max(U.splatRadius * U.splatRadius, 1e-6));\n v = v + U.splatVel * g * U.tempo;\n\n // Click \u2192 a radial-ripple impulse (pushes velocity radially outward from the splat).\n if (U.rippleAmp > 0.001) {\n let dir = d / max(length(d), 1e-4);\n v = v + dir * U.rippleAmp * g * U.tempo;\n }\n\n return vec4f(v, 0.0, 1.0);\n}";
|
|
4
|
-
export declare const WAKE_APPLY_WGSL = "\n@group(0) @binding(0) var wakeTex: texture_2d<f32>;\n@group(0) @binding(1) var wakeSampler: sampler;\n\nfn wakeBias(uv: vec2f) -> vec2f {\n return textureSample(wakeTex, wakeSampler, uv).xy;\n}";
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* <DiscoGlyph> — faceted SVG glyph primitive.
|
|
3
|
-
*
|
|
4
|
-
* Three layers paint over a single `silhouette` path:
|
|
5
|
-
* 1. base — the silhouette filled `currentColor` so consumers retain the
|
|
6
|
-
* lucide cascade (Vignelli-clean colour register at idle).
|
|
7
|
-
* 2. facet — an 8-stop linear gradient that simulates ~6 facets cutting
|
|
8
|
-
* across the glyph face. `phaseColor` (default `currentColor`) drives
|
|
9
|
-
* the hue; in active states a phase var (`--phase-color` or similar)
|
|
10
|
-
* reads through. Q.W3.A.3: gradient axis adapts to silhouette via
|
|
11
|
-
* `facetAxis` so each consumer picks the axis that cuts *across* its
|
|
12
|
-
* dominant stroke direction (CheckDisco's V-shape calls for vertical;
|
|
13
|
-
* ArrowRightDisco's horizontal shaft also vertical; PlayDisco's
|
|
14
|
-
* triangle works on the diagonal).
|
|
15
|
-
* 3. cap — a 165° specular catch-light gradient. White at the upper-left,
|
|
16
|
-
* transparent past 40%; the polished-metal hot-spot a real disco
|
|
17
|
-
* glyph would carry under club lighting.
|
|
18
|
-
*
|
|
19
|
-
* Q.W3.A.1 silhouette hand-off: when wrapped in a `<GlyphFace>`, this
|
|
20
|
-
* primitive publishes its `silhouette` prop upward via the
|
|
21
|
-
* `GLYPH_FACE_SILHOUETTE_KEY` injection slot, so the GlyphFace cap clips
|
|
22
|
-
* to the disco silhouette without the wrapping consumer (PrimaryAction)
|
|
23
|
-
* needing to mirror the path on every glyph swap. The provide/inject
|
|
24
|
-
* path is reactive — GlyphFace re-reads when the descendant's
|
|
25
|
-
* `silhouette` prop changes (e.g. PrimaryAction's `glyphFor(state)`
|
|
26
|
-
* branches across Play / Check / ArrowRight / RotateCcw).
|
|
27
|
-
*
|
|
28
|
-
* `useId()` scopes the gradient ids so multiple glyphs on one page do not
|
|
29
|
-
* collide post-SSR/hydration. The id format mirrors the existing speedtest
|
|
30
|
-
* conventions (`disco-facet-<id>` / `disco-cap-<id>`).
|
|
31
|
-
*/
|
|
32
|
-
type __VLS_Props = {
|
|
33
|
-
/** SVG path d-attribute describing the glyph silhouette. */
|
|
34
|
-
silhouette: string;
|
|
35
|
-
/** SVG viewBox. Defaults `0 0 24 24`. */
|
|
36
|
-
viewBox?: string;
|
|
37
|
-
/** Phase-tinted state — wired through CSS class consumers may hook. */
|
|
38
|
-
active?: boolean;
|
|
39
|
-
/** Stop-color for the facet gradient. Defaults `currentColor`. */
|
|
40
|
-
phaseColor?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Axis along which the facet gradient runs. The 8 stops cut
|
|
43
|
-
* perpendicular to this axis, so a diagonal axis gives diagonal
|
|
44
|
-
* facets, vertical gives horizontal facets across the glyph,
|
|
45
|
-
* etc. Q.W3.A.3 default stays diagonal; consumers picking an
|
|
46
|
-
* axis that cuts across the silhouette's dominant stroke
|
|
47
|
-
* sharpen the facet read at small render sizes.
|
|
48
|
-
*/
|
|
49
|
-
facetAxis?: "diagonal" | "horizontal" | "vertical";
|
|
50
|
-
};
|
|
51
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
52
|
-
active: boolean;
|
|
53
|
-
viewBox: string;
|
|
54
|
-
phaseColor: string;
|
|
55
|
-
facetAxis: "diagonal" | "horizontal" | "vertical";
|
|
56
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
57
|
-
declare const _default: typeof __VLS_export;
|
|
58
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as DiscoGlyph } from "./DiscoGlyph.vue";
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { type HTMLAttributes } from "vue";
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
/** Scroll axis */
|
|
4
|
-
orientation?: "horizontal" | "vertical";
|
|
5
|
-
/** Expanded = items spread to fill space; collapsed = compact pill */
|
|
6
|
-
expanded?: boolean;
|
|
7
|
-
/** Enable scroll-snap */
|
|
8
|
-
snap?: boolean | "mandatory" | "proximity";
|
|
9
|
-
/** Show overflow fade indicators */
|
|
10
|
-
fadeOverflow?: boolean;
|
|
11
|
-
class?: HTMLAttributes["class"];
|
|
12
|
-
};
|
|
13
|
-
declare var __VLS_15: {};
|
|
14
|
-
type __VLS_Slots = {} & {
|
|
15
|
-
default?: (props: typeof __VLS_15) => any;
|
|
16
|
-
};
|
|
17
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
18
|
-
canScrollStart: import("vue").Ref<boolean, boolean>;
|
|
19
|
-
canScrollEnd: import("vue").Ref<boolean, boolean>;
|
|
20
|
-
scrollToItem: (index: number) => void;
|
|
21
|
-
isTransitioning: import("vue").Ref<boolean, boolean>;
|
|
22
|
-
visualExpanded: import("vue").Ref<boolean, boolean>;
|
|
23
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
24
|
-
orientation: "horizontal" | "vertical";
|
|
25
|
-
expanded: boolean;
|
|
26
|
-
snap: boolean | "mandatory" | "proximity";
|
|
27
|
-
fadeOverflow: boolean;
|
|
28
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
-
declare const _default: typeof __VLS_export;
|
|
31
|
-
export default _default;
|
|
32
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
-
new (): {
|
|
34
|
-
$slots: S;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type HTMLAttributes } from "vue";
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
/** Whether this item is the active/highlighted one */
|
|
4
|
-
active?: boolean;
|
|
5
|
-
/** Whether the item grows/shrinks between expanded and collapsed modes */
|
|
6
|
-
expandable?: boolean;
|
|
7
|
-
class?: HTMLAttributes["class"];
|
|
8
|
-
};
|
|
9
|
-
declare var __VLS_1: {};
|
|
10
|
-
type __VLS_Slots = {} & {
|
|
11
|
-
default?: (props: typeof __VLS_1) => any;
|
|
12
|
-
};
|
|
13
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
-
click: (e: MouseEvent) => any;
|
|
15
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
-
onClick?: ((e: MouseEvent) => any) | undefined;
|
|
17
|
-
}>, {
|
|
18
|
-
active: boolean;
|
|
19
|
-
expandable: boolean;
|
|
20
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
-
declare const _default: typeof __VLS_export;
|
|
23
|
-
export default _default;
|
|
24
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
-
new (): {
|
|
26
|
-
$slots: S;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type Ref } from "vue";
|
|
2
|
-
export interface UseGlassCarouselOptions {
|
|
3
|
-
/** Scroll axis */
|
|
4
|
-
orientation: Ref<"horizontal" | "vertical">;
|
|
5
|
-
/** The logical expanded state */
|
|
6
|
-
expanded: Ref<boolean>;
|
|
7
|
-
/** The carousel root element ref — dimensions are animated on this element */
|
|
8
|
-
rootEl: Ref<HTMLElement | null>;
|
|
9
|
-
/** The scroll viewport element ref (reka-ui ScrollAreaViewport) */
|
|
10
|
-
viewportEl: Ref<HTMLElement | null>;
|
|
11
|
-
/** Fade duration in ms before the mode swap (default: 60) */
|
|
12
|
-
fadeMs?: number;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Composable for GlassCarousel — manages scroll overflow detection,
|
|
16
|
-
* expand/collapse transitions (following GlassDock's FLIP pattern),
|
|
17
|
-
* and item scroll-to behavior.
|
|
18
|
-
*/
|
|
19
|
-
export declare function useGlassCarousel(options: UseGlassCarouselOptions): {
|
|
20
|
-
canScrollStart: Ref<boolean, boolean>;
|
|
21
|
-
canScrollEnd: Ref<boolean, boolean>;
|
|
22
|
-
getOverflowFadeClass: () => "" | "scroll-fade-y" | "scroll-fade-mask" | "scroll-fade-top" | "scroll-fade-bottom";
|
|
23
|
-
updateOverflow: () => void;
|
|
24
|
-
scrollToItem: (index: number) => void;
|
|
25
|
-
visualExpanded: Ref<boolean, boolean>;
|
|
26
|
-
isTransitioning: Ref<boolean, boolean>;
|
|
27
|
-
transitionSize: Ref<string | null, string | null>;
|
|
28
|
-
suppressTransition: Ref<boolean, boolean>;
|
|
29
|
-
onTransitionEnd: (e: TransitionEvent) => void;
|
|
30
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes } from "vue";
|
|
2
|
-
/**
|
|
3
|
-
* <GlyphFace> — phase-tinted lucide wrapper with catch-light cap.
|
|
4
|
-
*
|
|
5
|
-
* Three layers compose around any slotted glyph:
|
|
6
|
-
* 1. backplate — phase-tinted radial gradient (or transparent at idle).
|
|
7
|
-
* Reads as the icon "sitting in" something.
|
|
8
|
-
* 2. slot — the slotted glyph silhouette, unchanged. Stays `currentColor`
|
|
9
|
-
* so the glyph reads Vignelli-clean; the disco punch is in the
|
|
10
|
-
* backplate + cap layers.
|
|
11
|
-
* 3. cap — 165° linear-gradient pseudo with `mix-blend-mode: screen`
|
|
12
|
-
* (Q.W3 default; consumers may override to `overlay` for the
|
|
13
|
-
* metallic-punch substrate). Reads as a single specular hot-spot
|
|
14
|
-
* in the upper-left, painted only against the slotted silhouette.
|
|
15
|
-
*
|
|
16
|
-
* Q.W3.A.1 inversion: cap clips to silhouette by default. Three resolution
|
|
17
|
-
* paths populate `--gf-silhouette`:
|
|
18
|
-
* - explicit `silhouette` prop on this component (path d-attr or raw
|
|
19
|
-
* `clip-path` expression);
|
|
20
|
-
* - provide/inject from a `<DiscoGlyph>` descendant — the disco
|
|
21
|
-
* primitive publishes its `silhouette` upward via the
|
|
22
|
-
* `GLYPH_FACE_SILHOUETTE_KEY` symbol, so wrappers around the four
|
|
23
|
-
* speedtest disco icons inherit the silhouette without a
|
|
24
|
-
* consumer-side prop plumb;
|
|
25
|
-
* - lucide consumers pass the silhouette explicitly via the
|
|
26
|
-
* `lucide-silhouettes.ts` table at the speedtest project.
|
|
27
|
-
*
|
|
28
|
-
* When no silhouette resolves the cap renders nothing — the fail-safe
|
|
29
|
-
* is "no cap" not "wrong cap" (closes the wrapper-rectangle leak A1 §1.2
|
|
30
|
-
* traced to the lucide consumer sites).
|
|
31
|
-
*
|
|
32
|
-
* `tint` accepts any CSS color or var (e.g. `var(--phase-color)`); the
|
|
33
|
-
* backplate's `--gf-tint` custom property reads it. Defaults transparent,
|
|
34
|
-
* so `<GlyphFace>` without `active` reads as a plain glyph wrapper.
|
|
35
|
-
*/
|
|
36
|
-
type __VLS_Props = {
|
|
37
|
-
/** Whether the backplate is visible. Defaults `false`. */
|
|
38
|
-
active?: boolean;
|
|
39
|
-
/** CSS color/var for the backplate tint. Defaults transparent. */
|
|
40
|
-
tint?: string;
|
|
41
|
-
/**
|
|
42
|
-
* SVG path d-attribute or raw CSS clip-path expression that
|
|
43
|
-
* masks the cap to a glyph silhouette. When set, the cap clips
|
|
44
|
-
* to the supplied shape. Takes precedence over silhouette
|
|
45
|
-
* provided by a descendant DiscoGlyph.
|
|
46
|
-
*/
|
|
47
|
-
silhouette?: string;
|
|
48
|
-
class?: HTMLAttributes["class"];
|
|
49
|
-
};
|
|
50
|
-
declare var __VLS_1: {};
|
|
51
|
-
type __VLS_Slots = {} & {
|
|
52
|
-
default?: (props: typeof __VLS_1) => any;
|
|
53
|
-
};
|
|
54
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
55
|
-
active: boolean;
|
|
56
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
57
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
58
|
-
declare const _default: typeof __VLS_export;
|
|
59
|
-
export default _default;
|
|
60
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
61
|
-
new (): {
|
|
62
|
-
$slots: S;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Ref } from "vue";
|
|
2
|
-
export declare const GLYPH_FACE_SILHOUETTE_KEY: import("vue").InjectionKey<Ref<string | undefined, string | undefined>>;
|
|
3
|
-
export declare function provideGlyphFaceSilhouette(slot: Ref<string | undefined>): void;
|
|
4
|
-
/**
|
|
5
|
-
* Befitting silent default — returns `null` when no parent `<GlyphFace>`
|
|
6
|
-
* is present. `<DiscoGlyph>` cooperates with a wrapping `<GlyphFace>` when
|
|
7
|
-
* the slot is available; otherwise stands alone.
|
|
8
|
-
*/
|
|
9
|
-
export declare const useOptionalGlyphFaceSilhouette: () => Ref<string | undefined, string | undefined> | null;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes } from "vue";
|
|
2
|
-
import { type TabOption } from "../tabs";
|
|
3
|
-
/**
|
|
4
|
-
* ResponsiveTabs — single consume that renders as `<Select>` below the
|
|
5
|
-
* configured breakpoint and `<UnderlineTabs>` at/above it.
|
|
6
|
-
*
|
|
7
|
-
* AC.W8e (glass-ui v1.7.0) — promoted from speedtest's 3-site duplicated
|
|
8
|
-
* mobile-Select / desktop-UnderlineTabs swap (AdminDataView,
|
|
9
|
-
* AdminDashboardLayout, PublicDashboardLayout). Each site rolled its own
|
|
10
|
-
* `sm:hidden` / `hidden sm:block` pair; the primitive collapses the
|
|
11
|
-
* duplication onto a single matchMedia-driven swap. The dual-mount CSS
|
|
12
|
-
* pattern is preserved at the JSDOM/SSR level by initializing
|
|
13
|
-
* `isDesktop` from `window.matchMedia(...)`'s `matches` (or `true` when
|
|
14
|
-
* `window` is absent, matching server-rendered desktop-first).
|
|
15
|
-
*
|
|
16
|
-
* The `breakpoint` prop is a CSS length consumed inside the
|
|
17
|
-
* `(min-width: <breakpoint>)` media query — pass `"640px"` (the Tailwind
|
|
18
|
-
* `sm:` rung default), `"720px"` (speedtest's grid-engagement rung), or
|
|
19
|
-
* any other value the consumer needs.
|
|
20
|
-
*
|
|
21
|
-
* The select trigger inherits `glass-ui`'s canonical `text-small w-auto
|
|
22
|
-
* min-w-input-sm` chrome so the mobile control reads at the small text
|
|
23
|
-
* register. UnderlineTabs receives the `text-body` register and forwards
|
|
24
|
-
* any consumer-passed `class`.
|
|
25
|
-
*
|
|
26
|
-
* Consumer-side reactive selection flows through `modelValue` /
|
|
27
|
-
* `update:modelValue` symmetrically across both controls; the primitive
|
|
28
|
-
* exposes one model so the consumer doesn't bind two.
|
|
29
|
-
*/
|
|
30
|
-
export interface ResponsiveTabsProps {
|
|
31
|
-
/** Tab options — shared between mobile select + desktop tabs. */
|
|
32
|
-
options: TabOption[];
|
|
33
|
-
/**
|
|
34
|
-
* Optional subset for desktop tabs. If a consumer has a mobile-only
|
|
35
|
-
* tab (e.g. speedtest AdminDataView's "Filters" tab which is
|
|
36
|
-
* desktop-sidebar-rendered), pass the desktop-relevant subset here.
|
|
37
|
-
* Falls back to `options` when unset.
|
|
38
|
-
*/
|
|
39
|
-
desktopOptions?: TabOption[] | null;
|
|
40
|
-
/**
|
|
41
|
-
* CSS length string for the media query breakpoint. Mobile-control
|
|
42
|
-
* (Select) below; desktop-control (UnderlineTabs) at/above.
|
|
43
|
-
* Defaults to `"640px"` (Tailwind `sm:`).
|
|
44
|
-
*/
|
|
45
|
-
breakpoint?: string;
|
|
46
|
-
/** Class merged onto both controls' chrome. */
|
|
47
|
-
class?: HTMLAttributes["class"];
|
|
48
|
-
/** Class merged onto the desktop UnderlineTabs only. */
|
|
49
|
-
desktopClass?: HTMLAttributes["class"];
|
|
50
|
-
/** Class merged onto the mobile SelectTrigger only. */
|
|
51
|
-
mobileTriggerClass?: HTMLAttributes["class"];
|
|
52
|
-
/**
|
|
53
|
-
* Accessible name for the mobile `<SelectTrigger>` (axe `select-name` /
|
|
54
|
-
* WCAG 4.1.2 — the bare trigger carries only a `<SelectValue>`). Defaults to
|
|
55
|
-
* the active option's label.
|
|
56
|
-
*/
|
|
57
|
-
ariaLabel?: string;
|
|
58
|
-
}
|
|
59
|
-
type __VLS_Props = ResponsiveTabsProps;
|
|
60
|
-
type __VLS_ModelProps = {
|
|
61
|
-
modelValue: string;
|
|
62
|
-
};
|
|
63
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
64
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
65
|
-
"update:modelValue": (value: string) => any;
|
|
66
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
67
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
68
|
-
}>, {
|
|
69
|
-
desktopOptions: TabOption[] | null;
|
|
70
|
-
breakpoint: string;
|
|
71
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
72
|
-
declare const _default: typeof __VLS_export;
|
|
73
|
-
export default _default;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { type HTMLAttributes } from "vue";
|
|
2
|
-
export interface TabOption {
|
|
3
|
-
label: string;
|
|
4
|
-
value: string;
|
|
5
|
-
}
|
|
6
|
-
type __VLS_Props = {
|
|
7
|
-
options: TabOption[];
|
|
8
|
-
/** "default" = subtle muted slider; "pill" = solid foreground pill */
|
|
9
|
-
variant?: "default" | "pill";
|
|
10
|
-
/** Tab-row overflow — see `<BouncyToggle>`. */
|
|
11
|
-
overflow?: "none" | "scroll" | "auto";
|
|
12
|
-
class?: HTMLAttributes["class"];
|
|
13
|
-
};
|
|
14
|
-
type __VLS_ModelProps = {
|
|
15
|
-
modelValue: string;
|
|
16
|
-
};
|
|
17
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
18
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
-
"update:modelValue": (value: string) => any;
|
|
20
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
|
-
}>, {
|
|
23
|
-
overflow: "none" | "scroll" | "auto";
|
|
24
|
-
variant: "default" | "pill";
|
|
25
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
-
declare const _default: typeof __VLS_export;
|
|
27
|
-
export default _default;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { type HTMLAttributes } from "vue";
|
|
2
|
-
export interface ToggleOption {
|
|
3
|
-
label: string;
|
|
4
|
-
value: string;
|
|
5
|
-
icon?: string;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
tooltip?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface BouncyToggleProps {
|
|
10
|
-
options: ToggleOption[];
|
|
11
|
-
multiSelect?: boolean;
|
|
12
|
-
/** "default" = subtle muted slider; "pill" = solid foreground pill */
|
|
13
|
-
variant?: "default" | "pill";
|
|
14
|
-
/**
|
|
15
|
-
* Tab-row overflow handling.
|
|
16
|
-
* - `"none"` (default) — inline-grid with `1fr` tracks; tabs share width
|
|
17
|
-
* and clip when content exceeds the parent.
|
|
18
|
-
* - `"scroll"` — flex row with intrinsic-width tracks + `.scroll-fade-mask`
|
|
19
|
-
* + `.scrollbar-hidden`; tab text never truncates and overflowing tabs
|
|
20
|
-
* scroll horizontally with edge fades.
|
|
21
|
-
* - `"auto"` — flex row with intrinsic widths and a horizontal scroll
|
|
22
|
-
* fallback (no fade); useful when the parent already owns the affordance.
|
|
23
|
-
*/
|
|
24
|
-
overflow?: "none" | "scroll" | "auto";
|
|
25
|
-
class?: HTMLAttributes["class"];
|
|
26
|
-
}
|
|
27
|
-
type __VLS_Props = BouncyToggleProps;
|
|
28
|
-
type __VLS_ModelProps = {
|
|
29
|
-
modelValue: string | string[];
|
|
30
|
-
};
|
|
31
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
32
|
-
declare var __VLS_19: {
|
|
33
|
-
option: ToggleOption;
|
|
34
|
-
active: boolean;
|
|
35
|
-
}, __VLS_27: {
|
|
36
|
-
option: ToggleOption;
|
|
37
|
-
active: boolean;
|
|
38
|
-
};
|
|
39
|
-
type __VLS_Slots = {} & {
|
|
40
|
-
option?: (props: typeof __VLS_19) => any;
|
|
41
|
-
} & {
|
|
42
|
-
option?: (props: typeof __VLS_27) => any;
|
|
43
|
-
};
|
|
44
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
45
|
-
"update:modelValue": (value: string | string[]) => any;
|
|
46
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
47
|
-
"onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
|
|
48
|
-
}>, {
|
|
49
|
-
overflow: "none" | "scroll" | "auto";
|
|
50
|
-
variant: "default" | "pill";
|
|
51
|
-
multiSelect: boolean;
|
|
52
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
53
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
54
|
-
declare const _default: typeof __VLS_export;
|
|
55
|
-
export default _default;
|
|
56
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
57
|
-
new (): {
|
|
58
|
-
$slots: S;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type HTMLAttributes } from "vue";
|
|
2
|
-
export interface TabOption {
|
|
3
|
-
label: string;
|
|
4
|
-
value: string;
|
|
5
|
-
}
|
|
6
|
-
type __VLS_Props = {
|
|
7
|
-
options: TabOption[];
|
|
8
|
-
class?: HTMLAttributes["class"];
|
|
9
|
-
};
|
|
10
|
-
type __VLS_ModelProps = {
|
|
11
|
-
modelValue: string;
|
|
12
|
-
};
|
|
13
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
-
"update:modelValue": (value: string) => any;
|
|
16
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
17
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
18
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
-
declare const _default: typeof __VLS_export;
|
|
20
|
-
export default _default;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { type Ref, type ComputedRef } from "vue";
|
|
2
|
-
import type { ToggleOption } from "../BouncyToggle.vue";
|
|
3
|
-
/**
|
|
4
|
-
* Package-private composable for `BouncyToggle.vue` — owns the JS-measured
|
|
5
|
-
* slider path: the single- and multi-select slider styles, the offset measure,
|
|
6
|
-
* the model/options re-measure watchers, and the ResizeObserver lifecycle.
|
|
7
|
-
*
|
|
8
|
-
* The composable is the SOLE writer of the JS slider styles. It runs only on
|
|
9
|
-
* the multi-select OR `@supports not (anchor)` branch — on an anchor-supporting
|
|
10
|
-
* single-select engine the CSS `anchor-name` owns the slider position and this
|
|
11
|
-
* path stays dormant (no RO is constructed, no measure runs). The split is a
|
|
12
|
-
* KISS transposition of the logic formerly inlined in the SFC; rendered DOM and
|
|
13
|
-
* behavior are unchanged.
|
|
14
|
-
*/
|
|
15
|
-
export interface UseBouncySliderParams {
|
|
16
|
-
/** The container scroller root (observed by the ResizeObserver). */
|
|
17
|
-
containerRef: Ref<HTMLElement | null>;
|
|
18
|
-
/** Per-option button refs, index-aligned to `options`. */
|
|
19
|
-
buttonRefs: Ref<HTMLElement[]>;
|
|
20
|
-
/** The toggle options (re-measure on change). */
|
|
21
|
-
options: ComputedRef<ToggleOption[]>;
|
|
22
|
-
/** The defineModel value (re-measure on change). */
|
|
23
|
-
model: Ref<string | string[] | undefined>;
|
|
24
|
-
/** True for the multi-select path. */
|
|
25
|
-
multiSelect: ComputedRef<boolean>;
|
|
26
|
-
/** Whether the browser supports CSS anchor positioning. */
|
|
27
|
-
anchorSupported: boolean;
|
|
28
|
-
/** True when ANY JS slider writer is live (gates RO/watcher attach). */
|
|
29
|
-
jsSliderActive: ComputedRef<boolean>;
|
|
30
|
-
/** The active option values (used by the multi-slider measure). */
|
|
31
|
-
activeValues: ComputedRef<string[]>;
|
|
32
|
-
}
|
|
33
|
-
export interface UseBouncySliderReturn {
|
|
34
|
-
/** Inline style for the single-select JS slider. */
|
|
35
|
-
singleSliderStyle: Ref<Record<string, string>>;
|
|
36
|
-
/** Inline styles for each active multi-select slider, keyed by value. */
|
|
37
|
-
multiSliderStyles: Ref<Record<string, Record<string, string>>>;
|
|
38
|
-
}
|
|
39
|
-
export declare function useBouncySlider(params: UseBouncySliderParams): UseBouncySliderReturn;
|