@mkbabb/glass-ui 10.1.5 → 11.0.1
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/MIGRATION.md +1024 -1461
- package/README.md +2 -2
- package/dist/DialogContent-DG5kseRQ.js +159 -0
- package/dist/DropdownMenuTrigger-uhSXgEfK.js +76 -0
- package/dist/{Surface-1nPoabc3.js → Surface-C7wq2j0A.js} +3 -0
- package/dist/aurora.css +1 -0
- package/dist/aurora.js +246 -2472
- package/dist/auroraImageSource-xNLDUjcy.js +30 -0
- package/dist/axes.js +8 -8
- package/dist/blob.css +1 -0
- package/dist/blob.js +57 -54
- package/dist/budget-CJfhLIIV.js +13 -0
- package/dist/button-CAKhiOZy.js +113 -0
- package/dist/button.js +1 -1
- package/dist/{card-ByyqRBvK.js → card-D_uXphvL.js} +4 -1
- package/dist/card.js +1 -1
- package/dist/carousel.js +3 -2
- package/dist/{checkbox-B1qn65se.js → checkbox-COLnvULu.js} +1 -0
- package/dist/checkbox.css +1 -0
- package/dist/checkbox.js +1 -1
- package/dist/{collapsible-DFzK29Oh.js → collapsible-Bd4Et730.js} +1 -0
- package/dist/collapsible.css +1 -0
- package/dist/collapsible.js +1 -1
- package/dist/color-HkUaTAJj.js +270 -0
- package/dist/{color.glsl-DTJhdekG.js → color.glsl-bFJm8k5R.js} +4 -16
- package/dist/color.wgsl-B-qDJ_OM.js +4 -0
- package/dist/{command-CatrAsrl.js → command-BsFOGZwB.js} +3 -2
- package/dist/command.css +1 -0
- package/dist/command.js +1 -1
- package/dist/component-styles.css +0 -1
- package/dist/components/_shared/axes.d.ts +7 -0
- package/dist/components/_shared/feedback/dot-ring.css +1 -1
- package/dist/components/_shared/overlay/focus-return.d.ts +9 -0
- package/dist/components/_shared/overlay/index.d.ts +3 -0
- package/dist/components/_shared/overlay/root-scroll-lock.d.ts +4 -0
- package/dist/components/_shared/overlay/sheet-width.d.ts +2 -0
- package/dist/components/_shared/shape/useBarShape.d.ts +4 -0
- package/dist/components/aurora/composables/auroraFallbackGround.d.ts +12 -0
- package/dist/components/aurora/constants/presets.d.ts +21 -0
- package/dist/components/aurora/index.d.ts +2 -2
- package/dist/components/button/styles.css +1 -1
- package/dist/components/dark-mode-toggle/dark-mode-toggle.css +1 -1
- package/dist/components/dialog/DialogContent.vue.d.ts +2 -2
- package/dist/components/dialog/ModalOverlay.vue.d.ts +2 -2
- package/dist/components/dialog/ModalScrim.vue.d.ts +26 -0
- package/dist/components/dialog/styles.css +1 -1
- package/dist/components/dock/GlassDock.vue.d.ts +4 -1
- package/dist/components/dock/composables/useDockShellProps.d.ts +34 -2
- package/dist/components/dock/composables/useDockState.d.ts +5 -0
- package/dist/components/dock/index.d.ts +1 -2
- package/dist/components/dock/styles/controls/icon-button.css +1 -1
- package/dist/components/dock/styles/controls/tab-button.css +1 -1
- package/dist/components/dock/styles/morph.css +1 -1
- package/dist/components/dock/styles/run.css +1 -1
- package/dist/components/dock/styles/shell.css +1 -1
- package/dist/components/dock/trigger.d.ts +1 -0
- package/dist/components/expandable-container/ExpandableContainer.vue.d.ts +30 -29
- package/dist/components/menu/ContextMenu.vue.d.ts +27 -0
- package/dist/components/menu/DropdownMenu.vue.d.ts +5 -23
- package/dist/components/menu/context.d.ts +18 -5
- package/dist/components/menu/family-click.d.ts +2 -0
- package/dist/components/menu/family-context.d.ts +2 -0
- package/dist/components/menu/index.d.ts +1 -1
- package/dist/components/sheet/SheetContent.vue.d.ts +2 -2
- package/dist/components/sortable-list/styles.css +1 -0
- package/dist/components/surface/Surface.vue.d.ts +4 -1
- package/dist/components/tabs/composables/useTabDragMorph.d.ts +4 -7
- package/dist/components/tabs/styles/segmented.css +1 -1
- package/dist/components/tabs/types.d.ts +7 -8
- package/dist/composables/glass/fieldPaint.d.ts +4 -0
- package/dist/composables/glass/useGlassBackdropLuminance.d.ts +7 -6
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +8 -0
- package/dist/composables/motion/core/motionTempo.d.ts +2 -1
- package/dist/composables/motion/morph/useDragMorph.d.ts +2 -2
- package/dist/composables/motion/morph/useSelectionGroup.d.ts +6 -25
- package/dist/composables/motion/morph/useSelectionIndicator.d.ts +8 -54
- package/dist/composables/motion/spring/useLiquidFlex.d.ts +3 -5
- package/dist/composables/motion/spring/useSpringMount.d.ts +0 -9
- package/dist/{configurator-Dl10mc3L.js → configurator-C1ZKEf1b.js} +7 -5
- package/dist/configurator.css +1 -0
- package/dist/configurator.js +1 -1
- package/dist/constants-DfrO-IaH.js +8 -0
- package/dist/constellation.css +1 -0
- package/dist/constellation.js +2 -1
- package/dist/control.css +1 -0
- package/dist/{control.css_vue_type_style_index_0_src_true_lang-BIdufaDG.js → control.css_vue_type_style_index_0_src_true_lang-D2hdtjs4.js} +1 -0
- package/dist/{createCanvasLifecycle-hJHobVTn.js → createCanvasLifecycle-DS0vEs_G.js} +76 -75
- package/dist/dark-mode-toggle.js +1 -1
- package/dist/{data-table-8y6fbyOB.js → data-table-CunuMkZ3.js} +1 -0
- package/dist/data-table.css +1 -0
- package/dist/data-table.js +1 -1
- package/dist/{deck-Cm_VmyNL.js → deck-Bc-2mEKE.js} +1 -0
- package/dist/deck.js +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dock-trigger.d.ts +1 -0
- package/dist/dock-trigger.js +88 -0
- package/dist/dock.js +685 -729
- package/dist/easing.js +4 -4
- package/dist/expandable-container-wS1awXGd.js +135 -0
- package/dist/expandable-container.css +1 -0
- package/dist/expandable-container.js +1 -1
- package/dist/{fading-scroll-ClCPooXb.js → fading-scroll-D3Y20ibL.js} +1 -1
- package/dist/fading-scroll.js +1 -1
- package/dist/fieldPaint-Ci77oajZ.js +7 -0
- package/dist/fourier-field.css +1 -0
- package/dist/fourier-field.js +15 -13
- package/dist/glSetup-DMaDgrEj.js +577 -0
- package/dist/glass-ui.js +66 -65
- package/dist/handmark.css +1 -0
- package/dist/handmark.js +82 -71
- package/dist/index.css +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/{input-eLZ_AU7l.js → input-BLF2pMHE.js} +1 -1
- package/dist/input.js +1 -1
- package/dist/{label-CE03H1KL.js → label-ryNPL7e6.js} +1 -0
- package/dist/label.css +1 -0
- package/dist/label.js +1 -1
- package/dist/labeled-field.css +1 -0
- package/dist/labeled-field.js +5 -4
- package/dist/{menu-DaYAZiVW.js → menu-C_l2Sslf.js} +162 -112
- package/dist/menu.js +3 -3
- package/dist/metric.js +1 -0
- package/dist/motion-core.js +138 -44
- package/dist/motion-lHDAQHEE.js +91 -0
- package/dist/motion.js +5 -5
- package/dist/motionTempo-DXdVbCWr.js +13 -0
- package/dist/music-staff.js +1 -0
- package/dist/{number-field-RP89046a.js → number-field-BXFUP49Z.js} +3 -2
- package/dist/number-field.css +1 -0
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.css +1 -0
- package/dist/pager-dots.js +3 -2
- package/dist/participation-C5y5VZTN.js +52 -0
- package/dist/{popover-BdpoE4Ar.js → popover-DQUmwuAa.js} +3 -2
- package/dist/popover.js +1 -1
- package/dist/{progress-eVa-mc7J.js → progress-BUn0Bw7Z.js} +1 -0
- package/dist/progress.css +1 -0
- package/dist/progress.js +1 -1
- package/dist/{radio-group-B58Bz16F.js → radio-group-xdEy2tdi.js} +1 -0
- package/dist/radio-group.css +1 -0
- package/dist/radio-group.js +1 -1
- package/dist/root-scroll-lock-DJFrQhMa.js +22 -0
- package/dist/select-Dt5dXm87.js +309 -0
- package/dist/select.js +1 -1
- package/dist/{separator-D4EZM10u.js → separator-C4y9p_ky.js} +1 -0
- package/dist/separator.css +1 -0
- package/dist/separator.js +1 -1
- package/dist/sheet-DLqNUIZl.js +347 -0
- package/dist/sheet-width-DgXgJNa5.js +18 -0
- package/dist/sheet.js +2 -2
- package/dist/{slider-Dg3Qqdyo.js → slider-B4w12E_u.js} +8 -8
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +2 -1
- package/dist/{status-dot-W4LFiJps.js → status-dot-BDZKcRxy.js} +2 -1
- package/dist/status-dot.css +1 -0
- package/dist/status-dot.js +1 -1
- package/dist/styles/components.css +1 -1
- package/dist/styles/glass/glass-capsule.css +1 -1
- package/dist/styles/glass/glass-chip.css +1 -1
- package/dist/styles/glass/mark.css +1 -1
- package/dist/styles/glass/overlay-plate.css +1 -1
- package/dist/styles/glass/surface-axis.css +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/styles/theme/radius.css +1 -1
- package/dist/styles/tokens/color-radius.css +1 -1
- package/dist/styles/tokens/manifest.d.ts +1 -1
- package/dist/styles/tokens/scale-paper.css +1 -1
- package/dist/styles/utilities/base-misc.css +1 -1
- package/dist/surface.js +1 -1
- package/dist/{switch-BYUZ6g9G.js → switch-DLfGYU35.js} +1 -0
- package/dist/switch.css +1 -0
- package/dist/switch.js +1 -1
- package/dist/tabs-NgTRPGZx.js +229 -0
- package/dist/tabs.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.css +1 -0
- package/dist/timeline.js +4 -3
- package/dist/toggle-group-DgXcJGD6.js +129 -0
- package/dist/toggle-group.css +1 -0
- package/dist/toggle-group.js +1 -1
- package/dist/tokens.js +2 -0
- package/dist/{tooltip-CZVubnJf.js → tooltip-Do3qCw0r.js} +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.css +1 -0
- package/dist/typewriter.js +1 -0
- package/dist/uniformBridge-CJyy7NOn.js +150 -0
- package/dist/useBarShape-CmP35Z8o.js +24 -0
- package/dist/{useCanvas2D-CQRElMyE.js → useCanvas2D-Bhpwua98.js} +1 -1
- package/dist/{useDockCtaReceive-BSSgD6mu.js → useDockCtaReceive-Dn_-paqP.js} +1 -1
- package/dist/{useDragMorph-B363RUbF.js → useDragMorph-BEI74U0t.js} +51 -40
- package/dist/{color.wgsl-BTszLY39.js → useGpuSubstrate-Y5XAdU8d.js} +7 -7
- package/dist/{useLiquidPress-h1scrPtP.js → useLiquidPress-D5mjZC6U.js} +2 -2
- package/dist/useScrollChrome-DMP6kDI9.js +67 -0
- package/dist/useSelectionGroup-DAQv5Lb5.js +186 -0
- package/dist/{useSpring-9u2_shxV.js → useSpring-Aof0nTRt.js} +1 -1
- package/dist/useSpringMount-jgNkymRl.js +73 -0
- package/dist/wgpuSetup-CFuqd_RP.js +1278 -0
- package/package.json +8 -1
- package/dist/DialogContent-CwIBvou_.js +0 -157
- package/dist/DropdownMenuTrigger-CKRnhDSQ.js +0 -93
- package/dist/button-BOFTUPyU.js +0 -110
- package/dist/composables/motion/morph/eyeglass.d.ts +0 -141
- package/dist/expandable-container-CZUj9BzY.js +0 -142
- package/dist/glass-ui.css +0 -2
- package/dist/motion-BvV1_24p.js +0 -61
- package/dist/motionTempo-tscp92Nm.js +0 -7
- package/dist/participation-B7UFdgXB.js +0 -55
- package/dist/select-BiF0FCZf.js +0 -292
- package/dist/sheet-DmJxgAHc.js +0 -345
- package/dist/tabs-C5sC0fBE.js +0 -269
- package/dist/toggle-group-CC5b3o1R.js +0 -125
- package/dist/useScrollChrome-BJbWV32F.js +0 -162
- package/dist/useSelectionGroup-zsEwitF6.js +0 -291
- package/dist/useSpringMount-OA-0mTNv.js +0 -73
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { t as e } from "./value-DMhh2R94.js";
|
|
2
|
+
import { cssToOklch as t, deriveHue as n, gamutMapStop as r, oklchStopToHex as i, oklchToLinear as a } from "./color.js";
|
|
3
|
+
import { interpolateHue as o } from "@mkbabb/value.js/color";
|
|
4
|
+
//#region src/components/aurora/composables/textureUpload.ts
|
|
5
|
+
var s = {
|
|
6
|
+
premultiplyAlpha: "none",
|
|
7
|
+
colorSpaceConversion: "none"
|
|
8
|
+
};
|
|
9
|
+
function c(e) {
|
|
10
|
+
return createImageBitmap(e, s);
|
|
11
|
+
}
|
|
12
|
+
async function l(e) {
|
|
13
|
+
return typeof e == "string" ? c(await (await fetch(e)).blob()) : e instanceof Blob ? c(e) : e;
|
|
14
|
+
}
|
|
15
|
+
function u() {
|
|
16
|
+
let e = new ImageData(1, 1);
|
|
17
|
+
return e.data.set([
|
|
18
|
+
128,
|
|
19
|
+
128,
|
|
20
|
+
128,
|
|
21
|
+
255
|
|
22
|
+
]), e;
|
|
23
|
+
}
|
|
24
|
+
function d(e) {
|
|
25
|
+
return e instanceof HTMLImageElement ? {
|
|
26
|
+
width: e.naturalWidth,
|
|
27
|
+
height: e.naturalHeight
|
|
28
|
+
} : {
|
|
29
|
+
width: e.width,
|
|
30
|
+
height: e.height
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function f(e, t, n = {}) {
|
|
34
|
+
let { linearFilter: r = !0, clampToEdge: i = !0 } = n, a = e.createTexture();
|
|
35
|
+
e.bindTexture(e.TEXTURE_2D, a), e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1), e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, e.NONE), e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, !1), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, t);
|
|
36
|
+
let o = r ? e.LINEAR : e.NEAREST;
|
|
37
|
+
e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, o), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, o);
|
|
38
|
+
let s = i ? e.CLAMP_TO_EDGE : e.REPEAT;
|
|
39
|
+
return e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, s), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, s), e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, e.BROWSER_DEFAULT_WEBGL), a;
|
|
40
|
+
}
|
|
41
|
+
function p(e, t) {
|
|
42
|
+
let { width: n, height: r } = d(t), i = e.createTexture({
|
|
43
|
+
label: "[texture-upload] image",
|
|
44
|
+
size: [
|
|
45
|
+
n,
|
|
46
|
+
r,
|
|
47
|
+
1
|
|
48
|
+
],
|
|
49
|
+
format: "rgba8unorm",
|
|
50
|
+
usage: 22
|
|
51
|
+
});
|
|
52
|
+
return e.queue.copyExternalImageToTexture({
|
|
53
|
+
source: t,
|
|
54
|
+
flipY: !1
|
|
55
|
+
}, {
|
|
56
|
+
texture: i,
|
|
57
|
+
premultipliedAlpha: !1
|
|
58
|
+
}, [
|
|
59
|
+
n,
|
|
60
|
+
r,
|
|
61
|
+
1
|
|
62
|
+
]), {
|
|
63
|
+
texture: i,
|
|
64
|
+
width: n,
|
|
65
|
+
height: r
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/components/aurora/constants/presets.ts
|
|
70
|
+
var m = {
|
|
71
|
+
nucleiDrift: 5e-4,
|
|
72
|
+
paletteDrift: 4e-4,
|
|
73
|
+
breathDepth: .0015,
|
|
74
|
+
warpDrift: 15e-5
|
|
75
|
+
};
|
|
76
|
+
function h(e) {
|
|
77
|
+
return Math.abs(e.nucleiDrift) >= m.nucleiDrift || Math.abs(e.paletteDrift) >= m.paletteDrift || Math.abs(e.breathDepth) >= m.breathDepth || Math.abs(e.warpDrift) >= m.warpDrift;
|
|
78
|
+
}
|
|
79
|
+
var g = 8, _ = 8, v = 1, y = .115, b = .004, x = .06, S = {
|
|
80
|
+
palette: [
|
|
81
|
+
{
|
|
82
|
+
L: .64,
|
|
83
|
+
C: .17,
|
|
84
|
+
h: 30
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
L: .76,
|
|
88
|
+
C: .15,
|
|
89
|
+
h: 55
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
L: .87,
|
|
93
|
+
C: .13,
|
|
94
|
+
h: 82
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
nuclei: [{
|
|
98
|
+
x: .3,
|
|
99
|
+
y: .3,
|
|
100
|
+
radius: .5,
|
|
101
|
+
paletteBias: 0,
|
|
102
|
+
valueBias: 0,
|
|
103
|
+
driftRadius: .045,
|
|
104
|
+
driftPhase: 0
|
|
105
|
+
}, {
|
|
106
|
+
x: .7,
|
|
107
|
+
y: .65,
|
|
108
|
+
radius: .5,
|
|
109
|
+
paletteBias: 1,
|
|
110
|
+
valueBias: .05,
|
|
111
|
+
driftRadius: .045,
|
|
112
|
+
driftPhase: 2.4
|
|
113
|
+
}],
|
|
114
|
+
softmaxBeta: 3,
|
|
115
|
+
valueVariance: .08,
|
|
116
|
+
warpAmount: .5,
|
|
117
|
+
warpScale: 1.6,
|
|
118
|
+
warpDrift: .008,
|
|
119
|
+
warpMode: "fbm",
|
|
120
|
+
noiseOctaves: 4,
|
|
121
|
+
medium: "smooth",
|
|
122
|
+
flow: {
|
|
123
|
+
pattern: "none",
|
|
124
|
+
focalX: .5,
|
|
125
|
+
focalY: .5,
|
|
126
|
+
angle: 0,
|
|
127
|
+
curl: 0
|
|
128
|
+
},
|
|
129
|
+
strokeAmount: 0,
|
|
130
|
+
strokeScale: 140,
|
|
131
|
+
strokeAnisotropy: .7,
|
|
132
|
+
strokeLayers: 1,
|
|
133
|
+
strokeMode: "oil",
|
|
134
|
+
wetEdge: 0,
|
|
135
|
+
granulation: 0,
|
|
136
|
+
impasto: 0,
|
|
137
|
+
brokenColor: 0,
|
|
138
|
+
canvasGrain: 0,
|
|
139
|
+
nucleiDrift: .015,
|
|
140
|
+
paletteDrift: .015,
|
|
141
|
+
breathDepth: .05,
|
|
142
|
+
breathPeriod: 40,
|
|
143
|
+
saturation: 1,
|
|
144
|
+
paperGrain: .008,
|
|
145
|
+
alpha: 1,
|
|
146
|
+
vividness: 1
|
|
147
|
+
}, C = {
|
|
148
|
+
medium: "crayon",
|
|
149
|
+
strokeOrient: "tensor",
|
|
150
|
+
granulation: .3,
|
|
151
|
+
canvasGrain: .5,
|
|
152
|
+
strokeAmount: .35,
|
|
153
|
+
strokeAnisotropy: .5,
|
|
154
|
+
strokeLayers: 1,
|
|
155
|
+
impasto: 0,
|
|
156
|
+
brokenColor: 0,
|
|
157
|
+
wetEdge: 0,
|
|
158
|
+
saturation: .92,
|
|
159
|
+
paperGrain: .008
|
|
160
|
+
}, w = {
|
|
161
|
+
nucleiDrift: 0,
|
|
162
|
+
paletteDrift: 0,
|
|
163
|
+
warpDrift: 0,
|
|
164
|
+
breathDepth: 0,
|
|
165
|
+
paperGrain: 0
|
|
166
|
+
};
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/components/aurora/composables/color.ts
|
|
169
|
+
function T(e, t = 8, n) {
|
|
170
|
+
let r = n ?? new Float32Array(t * 3), i = Math.min(e.length, t);
|
|
171
|
+
for (let t = 0; t < i; t++) {
|
|
172
|
+
let [n, i, o] = a(e[t]);
|
|
173
|
+
r[t * 3 + 0] = n, r[t * 3 + 1] = i, r[t * 3 + 2] = o;
|
|
174
|
+
}
|
|
175
|
+
for (let e = i; e < t; e++) r[e * 3 + 0] = 0, r[e * 3 + 1] = 0, r[e * 3 + 2] = 0;
|
|
176
|
+
return r;
|
|
177
|
+
}
|
|
178
|
+
function E(e) {
|
|
179
|
+
if (e.length === 0) return "transparent";
|
|
180
|
+
if (e.length === 1) return i(e[0]);
|
|
181
|
+
let t = e.length;
|
|
182
|
+
return `linear-gradient(135deg, ${e.map((e, n) => {
|
|
183
|
+
let r = Math.round(n / (t - 1) * 100);
|
|
184
|
+
return `${i(e)} ${r}%`;
|
|
185
|
+
}).join(", ")})`;
|
|
186
|
+
}
|
|
187
|
+
function D(e) {
|
|
188
|
+
return t(e);
|
|
189
|
+
}
|
|
190
|
+
var O = [.35, .95], k = [.18, .42];
|
|
191
|
+
function A(e, t) {
|
|
192
|
+
return e ? [Math.max(0, Math.min(1, e[0])), Math.max(0, Math.min(1, e[1]))] : t === "dark" ? k : O;
|
|
193
|
+
}
|
|
194
|
+
function j(e, i = {}) {
|
|
195
|
+
let a = typeof e == "string" ? t(e) : e, { stopCount: o = 4, harmony: s = "analogous", lightnessSpread: c = .32, chromaFalloff: l = .85, hueSpread: u = 28, lightnessEasing: d = "linear", chromaEasing: f = "bell", temperatureShift: p = 0, avoidHues: m, scheme: h, lBand: g } = i, _ = Math.max(2, Math.min(8, Math.round(o))), [v, y] = A(g, h), b = a.L - c / 2, x = a.L + c / 2;
|
|
196
|
+
b < v && (x += v - b, b = v), x > y && (b -= x - y, x = y), b = Math.max(v, b), x = Math.min(y, x);
|
|
197
|
+
let S = [], C = -Infinity;
|
|
198
|
+
for (let e = 0; e < _; e++) {
|
|
199
|
+
let t = _ === 1 ? 0 : e / (_ - 1), i = b + (x - b) * N(t, d), o = a.C * l, c;
|
|
200
|
+
if (f === "bell") c = o + (a.C - o) * P(t);
|
|
201
|
+
else {
|
|
202
|
+
let e = f === "sine" ? N(t, "sine") : t;
|
|
203
|
+
c = a.C - (a.C - o) * e;
|
|
204
|
+
}
|
|
205
|
+
let h = n(a.h, s, u, t);
|
|
206
|
+
p > 0 && (h = R(h, t, p)), m && m.length > 0 && (h = H(h, m));
|
|
207
|
+
let g = M(r({
|
|
208
|
+
L: i,
|
|
209
|
+
C: c,
|
|
210
|
+
h
|
|
211
|
+
}), C);
|
|
212
|
+
C = g.L, S.push(g);
|
|
213
|
+
}
|
|
214
|
+
return S;
|
|
215
|
+
}
|
|
216
|
+
function M(e, t) {
|
|
217
|
+
if (e.L >= t) return e;
|
|
218
|
+
let { h: n } = e, r = t, i = e.C;
|
|
219
|
+
for (let e = 0; e < 48; e++) {
|
|
220
|
+
let [e, t, o] = a({
|
|
221
|
+
L: r,
|
|
222
|
+
C: i,
|
|
223
|
+
h: n
|
|
224
|
+
});
|
|
225
|
+
if (Math.max(e, t, o) <= 1) break;
|
|
226
|
+
i *= .99;
|
|
227
|
+
}
|
|
228
|
+
return {
|
|
229
|
+
L: r,
|
|
230
|
+
C: i,
|
|
231
|
+
h: n
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
function N(e, t) {
|
|
235
|
+
return t === "sine" ? .5 - .5 * Math.cos(Math.PI * e) : e;
|
|
236
|
+
}
|
|
237
|
+
function P(e) {
|
|
238
|
+
return Math.sin(Math.PI * e);
|
|
239
|
+
}
|
|
240
|
+
var F = 70, I = 250, L = 22;
|
|
241
|
+
function R(t, n, r) {
|
|
242
|
+
let i = (n - .5) * 2;
|
|
243
|
+
if (i === 0 || r === 0) return t;
|
|
244
|
+
let a = (e("applyTemperature", o(t, i >= 0 ? F : I, 1, "shorter")) - t + 540) % 360 - 180;
|
|
245
|
+
return ((t + Math.sign(a) * Math.min(Math.abs(i) * r * L, Math.abs(a))) % 360 + 360) % 360;
|
|
246
|
+
}
|
|
247
|
+
var z = (e) => (e % 360 + 360) % 360;
|
|
248
|
+
function B(e, t, n) {
|
|
249
|
+
let r = z(e), i = z(t), a = z(n);
|
|
250
|
+
return i <= a ? r >= i && r <= a : r >= i || r <= a;
|
|
251
|
+
}
|
|
252
|
+
function V(e, t) {
|
|
253
|
+
let n = Math.abs(z(e) - z(t)) % 360;
|
|
254
|
+
return n > 180 ? 360 - n : n;
|
|
255
|
+
}
|
|
256
|
+
function H(e, t) {
|
|
257
|
+
let n = .5, r = z(e);
|
|
258
|
+
for (let e = 0; e < t.length + 2; e++) {
|
|
259
|
+
let e = !1;
|
|
260
|
+
for (let [i, a] of t) {
|
|
261
|
+
if (!B(r, i, a)) continue;
|
|
262
|
+
let t = z(i - n), o = z(a + n);
|
|
263
|
+
r = V(r, t) <= V(r, o) ? t : o, e = !0;
|
|
264
|
+
}
|
|
265
|
+
if (!e) return r;
|
|
266
|
+
}
|
|
267
|
+
return r;
|
|
268
|
+
}
|
|
269
|
+
//#endregion
|
|
270
|
+
export { f as _, S as a, b as c, C as d, w as f, l as g, u as h, E as i, g as l, h as m, T as n, v as o, y as p, D as r, x as s, j as t, _ as u, p as v };
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
function e(e, t, n) {
|
|
2
|
-
return Math.max(t, Math.min(n, e));
|
|
3
|
-
}
|
|
4
|
-
function t() {
|
|
5
|
-
let e = typeof window < "u" && window.devicePixelRatio || 1;
|
|
6
|
-
return Math.min(e, 2);
|
|
7
|
-
}
|
|
8
|
-
function n() {
|
|
9
|
-
let e = typeof window < "u" && window.devicePixelRatio || 1;
|
|
10
|
-
return Math.min(e, 1.5);
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
1
|
//#region src/composables/glass/webgl/compile.ts
|
|
14
|
-
function
|
|
2
|
+
function e(e, t, n, r = "[glass-ui:webgl]") {
|
|
15
3
|
let i = e.createShader(t);
|
|
16
4
|
if (e.shaderSource(i, n), e.compileShader(i), !e.getShaderParameter(i, e.COMPILE_STATUS)) {
|
|
17
5
|
let t = e.getShaderInfoLog(i) ?? "unknown";
|
|
@@ -19,7 +7,7 @@ function r(e, t, n, r = "[glass-ui:webgl]") {
|
|
|
19
7
|
}
|
|
20
8
|
return i;
|
|
21
9
|
}
|
|
22
|
-
function
|
|
10
|
+
function t(e, t, n, r = "[glass-ui:webgl]") {
|
|
23
11
|
let i = e.createProgram();
|
|
24
12
|
if (e.attachShader(i, t), e.attachShader(i, n), e.linkProgram(i), !e.getProgramParameter(i, e.LINK_STATUS)) {
|
|
25
13
|
let t = e.getProgramInfoLog(i) ?? "unknown";
|
|
@@ -29,6 +17,6 @@ function i(e, t, n, r = "[glass-ui:webgl]") {
|
|
|
29
17
|
}
|
|
30
18
|
//#endregion
|
|
31
19
|
//#region src/composables/glass/procedural/color.glsl.ts
|
|
32
|
-
var
|
|
20
|
+
var n = "\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}", r = "const mat2 FBM_ROT = mat2(0.8, 0.6, -0.6, 0.8);", i = "\n// value.js LINEAR_SRGB_TO_LMS (constants.ts), row-major; written here as GLSL\n// columns (= the transpose) so mat3 * vec3 evaluates the row-major M·v.\nconst mat3 LINEAR_SRGB_TO_LMS = mat3(\n 0.4122214708, 0.2119034982, 0.0883024619,\n 0.5363325363, 0.6806995451, 0.2817188376,\n 0.0514459929, 0.1073969566, 0.6299787005\n);\n\n// value.js srgbToOKLab's INLINE LMS→OKLab coefficients (gamut.ts lines 295-297 —\n// these differ at the ~1e-9 digit from LMS_TO_OKLAB_MATRIX; use the inline ones to\n// mirror the exact value.js path), row-major → GLSL columns.\nconst mat3 LMS_TO_OKLAB = mat3(\n 0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660\n);\n\n// value.js OKLAB_TO_LMS_COEFF (constants.ts), row-major → GLSL columns. Rows:\n// l = [1, 0.3963377774, 0.2158037573], m = [1, -0.1055613458, -0.0638541728],\n// s = [1, -0.0894841775, -1.2914855480].\nconst mat3 OKLAB_TO_LMS = mat3(\n 1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480\n);\n\n// value.js LMS_TO_LINEAR_SRGB (constants.ts), row-major → GLSL columns.\nconst mat3 LMS_TO_LINEAR_SRGB = mat3(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\n// Gamma sRGB → raw OKLab (L, a, b). Mirrors value.js srgbToOKLab.\nvec3 srgbToOklab(vec3 c) {\n vec3 lin = srgbToLinear(c);\n vec3 lms = LINEAR_SRGB_TO_LMS * lin;\n vec3 lmsCbrt = sign(lms) * pow(abs(lms), vec3(1.0 / 3.0));\n return LMS_TO_OKLAB * lmsCbrt;\n}\n\n// Raw OKLab (L, a, b) → linear sRGB. Mirrors value.js oklabToLinearSRGB.\nvec3 oklabToLinearSrgb(vec3 lab) {\n vec3 lms_ = OKLAB_TO_LMS * lab;\n vec3 lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\n\n// OKLab → OKLCh: H in RADIANS. Mirrors value.js rawOklabToOklch (which returns\n// degrees; we stay in radians and only fold to [0, 2pi)).\nvec3 oklabToOklch(vec3 lab) {\n float C = length(lab.yz);\n float H = atan(lab.z, lab.y);\n if (H < 0.0) H += 2.0 * PI;\n return vec3(lab.x, C, H);\n}\n\n// OKLCh (H radians) → OKLab. Mirrors value.js rawOklchToOklab.\nvec3 oklchToOklab(vec3 lch) {\n return vec3(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}", a = "\n// value.js interpolateHue in the NORMALIZED-TURNS domain (h_rad/TAU → 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° 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 — fract is non-negative in GLSL\n return r * TAU; // back to radians\n}\n\n// Linear-sRGB endpoint pair → OKLab-rectangular interpolation → 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 → OKLCh interpolation along the huePath arc → 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 aurora's samplePalette splices. tRaw is the raw inter-stop\n// parameter [0,1]; the smoothstep ease + the huePath branch live HERE so the ramp is\n// one source. increasing(2)/decreasing(3) take the OKLCh hue-arc (rainbow sweep);\n// every other method takes the OKLab-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}", o = "\n// Jarzynski PCG2D — uvec2 → 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→[0,1) scalar hash: bit-reinterpret the lattice coordinate, pcg2d it, take the\n// high word back to [0,1). Integer-bit — 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 — no axis-aligned directional bias. Each of\n// the three simplex corners contributes grad·offset shaped by a radial (0.5 - r²)⁴\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}";
|
|
33
21
|
//#endregion
|
|
34
|
-
export {
|
|
22
|
+
export { o as a, a as i, n, e as o, i as r, t as s, r as t };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/composables/glass/procedural/color.wgsl.ts
|
|
2
|
+
var e = "\nfn srgbToLinearCh(c: f32) -> f32 {\n if (c <= 0.04045) { return c / 12.92; }\n return pow((c + 0.055) / 1.055, 2.4);\n}\nfn srgbToLinear(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfn linearToSrgbCh(c: f32) -> f32 {\n if (c <= 0.0031308) { return c * 12.92; }\n return 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nfn linearToSrgb(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}", t = "const FBM_ROT: mat2x2<f32> = mat2x2<f32>(0.8, 0.6, -0.6, 0.8);", n = "\n// value.js LINEAR_SRGB_TO_LMS, row-major → WGSL columns (= the transpose).\nconst LINEAR_SRGB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 0.4122214708, 0.2119034982, 0.0883024619,\n 0.5363325363, 0.6806995451, 0.2817188376,\n 0.0514459929, 0.1073969566, 0.6299787005\n);\n\n// value.js srgbToOKLab's INLINE LMS→OKLab coefficients, row-major → WGSL columns.\nconst LMS_TO_OKLAB: mat3x3<f32> = mat3x3<f32>(\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, row-major → WGSL columns.\nconst OKLAB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\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, row-major → WGSL columns.\nconst LMS_TO_LINEAR_SRGB: mat3x3<f32> = mat3x3<f32>(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\nfn cbrt3(v: vec3<f32>) -> vec3<f32> {\n return sign(v) * pow(abs(v), vec3<f32>(1.0 / 3.0));\n}\n\n// Gamma sRGB → raw OKLab (L, a, b). Mirrors value.js srgbToOKLab.\nfn srgbToOklab(c: vec3<f32>) -> vec3<f32> {\n let lin = srgbToLinear(c);\n let lms = LINEAR_SRGB_TO_LMS * lin;\n return LMS_TO_OKLAB * cbrt3(lms);\n}\n\n// Raw OKLab (L, a, b) → linear sRGB. Mirrors value.js oklabToLinearSRGB.\nfn oklabToLinearSrgb(lab: vec3<f32>) -> vec3<f32> {\n let lms_ = OKLAB_TO_LMS * lab;\n let lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\n\n// OKLab → OKLCh: H in RADIANS, folded to [0, 2pi). Mirrors value.js rawOklabToOklch.\nfn oklabToOklch(lab: vec3<f32>) -> vec3<f32> {\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 vec3<f32>(lab.x, C, H);\n}\n\n// OKLCh (H radians) → OKLab. Mirrors value.js rawOklchToOklab.\nfn oklchToOklab(lch: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}", r = "\n// value.js interpolateHue in the NORMALIZED-TURNS domain. methods: 0 shorter,\n// 1 longer, 2 increasing, 3 decreasing.\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 var r = a + t * (b - a);\n r = fract(r); // fract is non-negative in WGSL\n return r * TAU; // back to radians\n}\n\n// Linear-sRGB endpoint pair → OKLab-rectangular interpolation → linear sRGB.\nfn mixPaletteOklab(linA: vec3<f32>, linB: vec3<f32>, t: f32) -> vec3<f32> {\n let labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linA);\n let labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linB);\n let lab = mix(labA, labB, t);\n return oklabToLinearSrgb(lab);\n}\n\n// Linear-sRGB endpoint pair → OKLCh hue-arc interpolation → linear sRGB.\nfn mixPaletteOklchArc(linA: vec3<f32>, linB: vec3<f32>, t: f32, method: i32) -> vec3<f32> {\n let labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linA);\n let labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linB);\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(vec3<f32>(L, C, H)));\n}\n\n// The ramp dispatcher (the samplePalette splices it). tRaw is the raw inter-stop\n// parameter [0,1]; the smoothstep ease + the huePath branch live here so the ramp is\n// one source. increasing(2)/decreasing(3) take the OKLCh hue-arc; every other method\n// takes the OKLab-rectangular straight line.\nfn samplePaletteRamp(a: vec3<f32>, b: vec3<f32>, tRaw: f32, huePath: i32) -> vec3<f32> {\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}";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { r as i, e as n, n as r, t };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import "./command.css";
|
|
1
2
|
import { t as e } from "./class-names-FlXcvRRT.js";
|
|
2
3
|
import { t } from "./primitive-B2t2jdqM.js";
|
|
3
4
|
import { t as n } from "./selection-DqIULxRG.js";
|
|
4
|
-
import { n as r, t as i } from "./DialogContent-
|
|
5
|
-
import { t as a } from "./participation-
|
|
5
|
+
import { n as r, t as i } from "./DialogContent-DG5kseRQ.js";
|
|
6
|
+
import { t as a } from "./participation-C5y5VZTN.js";
|
|
6
7
|
import { t as o } from "./rowClass-DYOXwxhO.js";
|
|
7
8
|
import { computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createTextVNode as d, createVNode as f, defineComponent as p, mergeProps as m, normalizeClass as h, openBlock as g, renderSlot as _, toDisplayString as v, unref as y, useAttrs as b, withCtx as x } from "vue";
|
|
8
9
|
import { ComboboxContent as S, ComboboxEmpty as C, ComboboxGroup as w, ComboboxInput as T, ComboboxItem as E, ComboboxLabel as D, ComboboxRoot as O, ComboboxSeparator as k } from "reka-ui";
|
package/dist/command.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer theme, base, components, utilities;@layer components{.command{border-radius:var(--radius-card);width:100%;height:100%;color:var(--popover-foreground);flex-direction:column;display:flex;overflow:hidden}.command-dialog__content{padding:0;overflow:hidden}.command__input-wrapper{border-block-end:1px solid color-mix(in oklab, var(--foreground) calc(var(--ink-seam) * 100%), transparent);align-items:center;padding-inline:.75rem;display:flex}.command__input-icon{opacity:.5;flex:none;width:1rem;height:1rem;margin-inline-end:.5rem}.command-dialog__content .command__input-icon,.command-dialog__content .command__item>svg{width:1.25rem;height:1.25rem}.command__input{width:100%;height:var(--dropdown-input-height);color:inherit;font:inherit;font-size:var(--dropdown-text);background:0 0;border:0;outline:0;padding-block:.75rem}.command-dialog__content .command__input{height:3rem}.command__input::placeholder{color:var(--muted-foreground)}.command__input:disabled{cursor:not-allowed;opacity:var(--opacity-disabled)}.command__list{max-height:var(--overlay-max-block);scrollbar-gutter:stable;padding:var(--overlay-pad);overflow-x:hidden}.command__group{color:var(--foreground);flex:none;padding:.25rem;overflow:hidden}.command__group-label{color:var(--muted-foreground);font-size:var(--dropdown-text-secondary);padding:.25rem .5rem;font-weight:500}.command__item[data-disabled]{pointer-events:none}.command__empty{text-align:center;font-size:var(--dropdown-text);padding-block:1.25rem}.command__separator{margin-inline:-.25rem}.command__shortcut{color:var(--muted-foreground);font-size:var(--dropdown-text-secondary);letter-spacing:var(--type-tracking-caps);margin-inline-start:auto}}
|
package/dist/command.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./command-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./command-BsFOGZwB.js";
|
|
2
2
|
export { r as Command, t as CommandDialog, s as CommandEmpty, a as CommandGroup, e as CommandInput, n as CommandItem, o as CommandList, i as CommandSeparator, c as CommandShortcut };
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/** The surface-decoration axis. */
|
|
2
2
|
export declare const SURFACES: readonly ["glass", "veil", "opaque"];
|
|
3
3
|
export type Surface = (typeof SURFACES)[number];
|
|
4
|
+
/** The backdrop-sampling axis. `live` samples and filters what is painted behind the
|
|
5
|
+
* plate on every frame; `static` samples nothing, so no backdrop-filter surface is
|
|
6
|
+
* allocated. A plate in the page flow over a still field is the `static` case: nothing
|
|
7
|
+
* moves behind it but the field, so the lens costs a full re-filter per scroll frame and
|
|
8
|
+
* shows nothing the fill does not. Floating chrome that content scrolls under stays `live`. */
|
|
9
|
+
export declare const BACKDROP_MODES: readonly ["live", "static"];
|
|
10
|
+
export type BackdropMode = (typeof BACKDROP_MODES)[number];
|
|
4
11
|
/** The five-rung glass ladder. */
|
|
5
12
|
export declare const SURFACE_TIERS: readonly ["wash", "quiet", "resting", "floating", "overlay"];
|
|
6
13
|
export type SurfaceTier = (typeof SURFACE_TIERS)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.glass-dot-ring{position: relative;display: inline-block;aspect-ratio: 1;inline-size: var(--icon-lg);--dot-ring-tint: currentColor;--dot-ring-inequality: 0.2360679775;--dot-ring-spin: var(--duration-xl);--_dot-ring-pitch: sin(180deg / 7);--_dot-ring-radius: calc( 50% / (1 + var(--_dot-ring-pitch) * sqrt(1 + var(--dot-ring-inequality))) );--_dot-ring-bead: calc(2 * var(--_dot-ring-pitch) * var(--_dot-ring-radius));animation: glass-dot-ring-redistribute var(--dot-ring-spin) linear infinite;--dot-ring-extent: 1;transition: --dot-ring-extent var(--spring-dock-duration) var(--spring-dock);}@starting-style{.glass-dot-ring{--dot-ring-extent: 0;}}.glass-dot-ring-leave-active{transition: opacity var(--spring-dock-exit-duration) var(--exit-curve);}.glass-dot-ring-leave-active .glass-dot-ring{transition: --dot-ring-extent var(--spring-dock-exit-duration) var(--exit-curve);}.glass-dot-ring-leave-to{opacity: 0;}.glass-dot-ring-leave-to .glass-dot-ring{--dot-ring-extent: 0;}.glass-dot-ring-spoke{position: absolute;inset: 0;rotate: calc(var(--dot-ring-k) * (1turn / 7));}.glass-dot-ring-bead{position: absolute;inset-inline-start: 50%;inset-block-start: 50%;inline-size: var(--_dot-ring-bead);block-size: var(--_dot-ring-bead);margin-inline-start: calc(var(--_dot-ring-bead) / -2);margin-block-start: calc(var(--_dot-ring-bead) / -2);border-radius: var(--radius-
|
|
1
|
+
@layer components{.glass-dot-ring{position: relative;display: inline-block;aspect-ratio: 1;inline-size: var(--icon-lg);--dot-ring-tint: currentColor;--dot-ring-inequality: 0.2360679775;--dot-ring-spin: var(--duration-xl);--_dot-ring-pitch: sin(180deg / 7);--_dot-ring-radius: calc( 50% / (1 + var(--_dot-ring-pitch) * sqrt(1 + var(--dot-ring-inequality))) );--_dot-ring-bead: calc(2 * var(--_dot-ring-pitch) * var(--_dot-ring-radius));animation: glass-dot-ring-redistribute var(--dot-ring-spin) linear infinite;--dot-ring-extent: 1;transition: --dot-ring-extent var(--spring-dock-duration) var(--spring-dock);}@starting-style{.glass-dot-ring{--dot-ring-extent: 0;}}.glass-dot-ring-leave-active{transition: opacity var(--spring-dock-exit-duration) var(--exit-curve);}.glass-dot-ring-leave-active .glass-dot-ring{transition: --dot-ring-extent var(--spring-dock-exit-duration) var(--exit-curve);}.glass-dot-ring-leave-to{opacity: 0;}.glass-dot-ring-leave-to .glass-dot-ring{--dot-ring-extent: 0;}.glass-dot-ring-spoke{position: absolute;inset: 0;rotate: calc(var(--dot-ring-k) * (1turn / 7));}.glass-dot-ring-bead{position: absolute;inset-inline-start: 50%;inset-block-start: 50%;inline-size: var(--_dot-ring-bead);block-size: var(--_dot-ring-bead);margin-inline-start: calc(var(--_dot-ring-bead) / -2);margin-block-start: calc(var(--_dot-ring-bead) / -2);border-radius: var(--radius-circle);background: oklch( from var(--dot-ring-tint) l c calc(h + var(--dot-ring-k) * (360 / 7) * var(--dot-ring-inequality)) );translate: calc( 100% / (2 * var(--_dot-ring-pitch)) * var(--dot-ring-extent) ) 0;scale: calc( sqrt( 1 + var(--dot-ring-inequality) * var(--dot-ring-extent) * cos( var(--dot-ring-phase) + var(--dot-ring-k) * (1turn / 7) ) ) * (1 + (sqrt(7) - 1) * (1 - var(--dot-ring-extent))) );}@media (prefers-reduced-motion: reduce){.glass-dot-ring{animation: none;transition: none;}.glass-dot-ring-leave-active,.glass-dot-ring-leave-active .glass-dot-ring{transition: none;}}@media (forced-colors: active){.glass-dot-ring-bead{background: CanvasText;}}}@keyframes glass-dot-ring-redistribute{to{--dot-ring-phase: 1turn;}}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE QUIET RETURN (U/B7b L · O-11, O-19). reka's modal content answers its
|
|
3
|
+
* close-auto-focus with a bare `triggerElement.focus()`. In WebKit a clicked button
|
|
4
|
+
* takes no focus, so reka records the nearest focusable ancestor as the trigger (a
|
|
5
|
+
* figure plate, a section), and the bare focus scrolls the page to it on every close.
|
|
6
|
+
* Glass owns the return instead: the same element, with `preventScroll`. A consumer
|
|
7
|
+
* that cancels the event (its own `@close-auto-focus` runs first) keeps its say.
|
|
8
|
+
*/
|
|
9
|
+
export declare function returnFocusQuietly(trigger: () => HTMLElement | null | undefined): (event: Event) => void;
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
* contracts, stated once, beside each other, with their readers.
|
|
8
8
|
*/
|
|
9
9
|
export { overlayContentAttrs, type OverlayAttrs, type OverlayRole } from "./content.js";
|
|
10
|
+
export { returnFocusQuietly } from "./focus-return.js";
|
|
10
11
|
export { isTeleportedTarget } from "./isTeleportedTarget.js";
|
|
11
12
|
export { useDockParticipation, useHoldToken, type DockParticipation, type DockPortalAttrs, type HoldTarget, type HoldToken, } from "./participation.js";
|
|
12
13
|
export type { FloatingAlign, FloatingPlacementProps, FloatingSide, } from "./placement.js";
|
|
14
|
+
export { acquireRootScrollLock, releaseRootScrollLock, useRootScrollLock, } from "./root-scroll-lock.js";
|
|
15
|
+
export { useSheetWidth } from "./sheet-width.js";
|
|
13
16
|
export { useModalShortcutBarrier } from "./shortcuts.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function acquireRootScrollLock(): boolean;
|
|
2
|
+
export declare function releaseRootScrollLock(): void;
|
|
3
|
+
/** Hold the root lock while `active()` is true; release it when the scope ends. */
|
|
4
|
+
export declare function useRootScrollLock(active: () => boolean): void;
|
|
@@ -105,4 +105,16 @@ export interface AuroraFallbackGround {
|
|
|
105
105
|
* sees (not a separate idealization).
|
|
106
106
|
*/
|
|
107
107
|
export declare function auroraFallbackGround(config: AuroraConfig, options?: AuroraFallbackGroundOptions): AuroraFallbackGround;
|
|
108
|
+
/**
|
|
109
|
+
* The identity of a config's fallback ground: the palette and the preset's field
|
|
110
|
+
* shape (softmax sharpness, value variance, and each nucleus's radius, ellipse and
|
|
111
|
+
* biases), without the nuclei positions.
|
|
112
|
+
*
|
|
113
|
+
* `Aurora.vue` encodes the ground once per key (atlas U/B7 F6, O-16). Nuclei that
|
|
114
|
+
* move (a scroll lean, a drift a consumer drives) move only on the GPU path; the
|
|
115
|
+
* ground stays the field the preset was mounted with. Two configs with the same key
|
|
116
|
+
* paint the same ground, so a config change that keeps the key costs no encode and
|
|
117
|
+
* no `background-image` write.
|
|
118
|
+
*/
|
|
119
|
+
export declare function auroraGroundKey(config: AuroraConfig): string;
|
|
108
120
|
export {};
|
|
@@ -370,3 +370,24 @@ export declare const PAPER_WASH_GROUND: {
|
|
|
370
370
|
readonly saturation: 0.92;
|
|
371
371
|
readonly paperGrain: 0.008;
|
|
372
372
|
};
|
|
373
|
+
/**
|
|
374
|
+
* `STILL_FIELD` — a field that draws once and asks for no further frame (A7, P-G2).
|
|
375
|
+
* A PRESET PARTIAL over the consumer's own palette and nuclei, spread LAST:
|
|
376
|
+
* `const cfg = { ...consumerBase, ...STILL_FIELD }`.
|
|
377
|
+
*
|
|
378
|
+
* Every drift axis is 0, so `isAuroraDriftLive` parks the loop after the first frame,
|
|
379
|
+
* and the film grain (`paperGrain`) is 0, because the shader reseeds it from the clock on
|
|
380
|
+
* every drawn frame, which reads as flicker over a full page whenever something else asks
|
|
381
|
+
* for one. The canvas tooth (`canvasGrain`) is spatial, not clocked, so it stays: a still
|
|
382
|
+
* field keeps its texture. A pointer
|
|
383
|
+
* still wakes the loop only while it moves (the shared field's own rest gate), and the
|
|
384
|
+
* field settles back to the same still frame. Use it behind data: the page's motion
|
|
385
|
+
* budget belongs to the marks, not the ground.
|
|
386
|
+
*/
|
|
387
|
+
export declare const STILL_FIELD: {
|
|
388
|
+
readonly nucleiDrift: 0;
|
|
389
|
+
readonly paletteDrift: 0;
|
|
390
|
+
readonly warpDrift: 0;
|
|
391
|
+
readonly breathDepth: 0;
|
|
392
|
+
readonly paperGrain: 0;
|
|
393
|
+
};
|
|
@@ -5,11 +5,11 @@ export type { UseAuroraReturn } from "./composables/useAurora.js";
|
|
|
5
5
|
export { useCursorInteraction } from "./composables/useCursorInteraction.js";
|
|
6
6
|
export { createAurora } from "./composables/runtime.js";
|
|
7
7
|
export type { AuroraRuntimeMode, AuroraRuntimeOptions } from "./composables/runtime.js";
|
|
8
|
-
export { DEFAULT_AURORA_CONFIG, PAPER_WASH_GROUND, DEFAULT_VIVIDNESS, VIVID_TARGET, IMAGE_BLUR_MIN_DEFAULT, IMAGE_BLUR_MAX_DEFAULT, MAX_NUCLEI, MAX_STOPS, type AuroraConfig, type AuroraCursorApi, type AuroraFlow, type AuroraInstance, type AuroraInteractivity, type AuroraMedium, type AuroraNucleus, type AuroraSource, type AuroraImageSource, type AuroraImageBlur, type FlowPattern, type OklchStop, type StrokeMode, type StrokeOrient, type WarpMode, } from "./constants/presets.js";
|
|
8
|
+
export { DEFAULT_AURORA_CONFIG, PAPER_WASH_GROUND, STILL_FIELD, DEFAULT_VIVIDNESS, VIVID_TARGET, IMAGE_BLUR_MIN_DEFAULT, IMAGE_BLUR_MAX_DEFAULT, MAX_NUCLEI, MAX_STOPS, type AuroraConfig, type AuroraCursorApi, type AuroraFlow, type AuroraInstance, type AuroraInteractivity, type AuroraMedium, type AuroraNucleus, type AuroraSource, type AuroraImageSource, type AuroraImageBlur, type FlowPattern, type OklchStop, type StrokeMode, type StrokeOrient, type WarpMode, } from "./constants/presets.js";
|
|
9
9
|
export { resolveAtoms, configToAtoms, DEFAULT_ATOMS, type AuroraAtoms, type AuroraZones, type AuroraMediumAtom, type AuroraInteractivityAtom, type AuroraFieldInteractivityAtom, type AuroraSmoothInteractivityAtom, type AuroraPainterlyInteractivityAtom, } from "./composables/atoms.js";
|
|
10
10
|
export { nucleiPrior, type AuroraMotionAtom, type AuroraZoneArrangement, } from "./composables/atoms-fields.js";
|
|
11
11
|
export { deriveAurora, flattenPalette, hexToOklchStop, paletteToCssGradient, } from "./composables/color.js";
|
|
12
12
|
export { cssToOklch, oklchStopToHex, oklchToLinear, } from "../../composables/color/index.js";
|
|
13
|
-
export { auroraFallbackGround, sampleAuroraField, nucleiFieldStatic, relativeLuminance, type AuroraFallbackGround, type AuroraFallbackGroundOptions, type AuroraGroundMetrics, } from "./composables/auroraFallbackGround.js";
|
|
13
|
+
export { auroraFallbackGround, auroraGroundKey, sampleAuroraField, nucleiFieldStatic, relativeLuminance, type AuroraFallbackGround, type AuroraFallbackGroundOptions, type AuroraGroundMetrics, } from "./composables/auroraFallbackGround.js";
|
|
14
14
|
export type { AuroraHarmony, DeriveAuroraOptions, DeriveEasing, } from "./composables/color.js";
|
|
15
15
|
export type { AuroraHuePath } from "./constants/presets.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.button{--button-size: var(--control-h-md);--button-tone: var(--foreground);--button-accent: var(--primary);--button-quiet-ink: var(--muted-foreground);--button-ink: var(--button-tone);--button-edge: transparent;display: inline-flex;min-inline-size: 0;max-inline-size: 100%;min-block-size: var(--button-size);align-items: center;justify-content: center;gap: var(--space-atom);padding-inline: calc(var(--button-size) / 2 - var(--space-residue));border: 1px solid var(--button-edge);border-radius: calc(var(--button-size) / 2);color: var(--button-ink);font: inherit;font-size: var(--control-text);font-weight: 500;line-height: 1.1;text-align: center;text-decoration: none;cursor: pointer;appearance: none;touch-action: manipulation;user-select: none;scale: 1;--scale-press: var(--scale-press-sm);transition: background-color var(--engage-control-engage-release) var(--ease-standard),border-color var(--engage-control-engage-release) var(--ease-standard),box-shadow var(--engage-control-engage-release) var(--ease-standard),color var(--engage-control-engage-release) var(--ease-standard),opacity var(--engage-control-engage-release) var(--ease-standard),scale var(--spring-press-duration) var(--transition-liquid-spatial);}.button > svg{flex: none;pointer-events: none;}.button > svg:not([class*="size-"]){inline-size: var(--ui-glyph);block-size: var(--ui-glyph);}.button > .button-mark{flex: none;inline-size: var(--ui-glyph);}.button[data-emphasis="primary"]{--glass-depth: var(--glass-depth-content);font-weight: 600;}.button[data-emphasis="secondary"]{--glass-veil-tier: var(--glass-veil-quiet);--glass-blur-floating: var(--glass-blur-quiet);}.button[data-tone="destructive"]{--button-tone: var(--destructive);--button-accent: var(--destructive);--button-quiet-ink: var(--destructive);--button-edge: color-mix( in oklab,var(--destructive) calc(var(--ink-perimeter) * 100%),transparent );--glass-capsule-fill: color-mix( in oklab,var(--glass-veil),var(--destructive) var(--feedback-tone-strength) );}.button[data-emphasis="quiet"],.button[data-emphasis="text"]{--button-edge: transparent;--button-ink: var(--button-quiet-ink);background: transparent;box-shadow: none;}.button[data-emphasis="text"]{--button-ink: var(--button-accent);padding-inline: var(--space-residue);text-underline-offset: 0.25em;}@media (hover: hover){.button[data-emphasis="quiet"]:hover:not(:disabled,[aria-disabled="true"]){--button-ink: var(--button-tone);background: color-mix( in oklab,var(--button-tone) calc(var(--fill-hover) * 100%),transparent );}.button[data-emphasis="text"]:hover:not(:disabled,[aria-disabled="true"]){text-decoration: underline;}}.button[data-emphasis="quiet"]:active:not(:disabled,[aria-disabled="true"]){background: color-mix( in oklab,var(--button-tone) calc(var(--fill-selected) * 100%),transparent );}.button[data-emphasis="text"]:active:not(:disabled,[aria-disabled="true"]){background: color-mix( in oklab,var(--button-accent) calc(var(--fill-hover) * 100%),transparent );}.button[data-size="xs"]{--button-size: var(--control-h-xs);gap: var(--space-residue);font-size: var(--control-text-sm);}.button[data-size="sm"]{--button-size: var(--control-h-sm);gap: var(--space-residue);font-size: var(--control-text-sm);}.button[data-size="lg"]{--button-size: var(--control-h-lg);font-size: var(--type-body);}.button[data-icon-only]{inline-size: var(--button-size);block-size: var(--button-size);min-block-size: var(--button-size);padding: 0;}.button:disabled,.button[aria-disabled="true"]{--button-ink: oklch(from var(--foreground) l 0 h / var(--opacity-disabled));cursor: not-allowed;}.button[data-loading]{cursor: progress;}.button.glass-specular-track:active::before{--specular-intensity: calc( var(--glass-specular-intensity-hover) + ( var(--glass-specular-intensity-active) - var(--glass-specular-intensity-hover) ) * var(--glass-btn-press-t) );}}
|
|
1
|
+
@layer components{.button{--button-size: var(--control-h-md);--button-tone: var(--foreground);--button-accent: var(--primary);--button-quiet-ink: var(--muted-foreground);--button-ink: var(--button-tone);--button-edge: transparent;display: inline-flex;min-inline-size: 0;max-inline-size: 100%;min-block-size: var(--button-size);align-items: center;justify-content: center;gap: var(--space-atom);padding-inline: calc(var(--button-size) / 2 - var(--space-residue));border: 1px solid var(--button-edge);border-radius: calc(var(--button-size) / 2);color: var(--button-ink);font: inherit;font-size: var(--control-text);font-weight: 500;line-height: 1.1;text-align: center;text-decoration: none;cursor: pointer;appearance: none;touch-action: manipulation;user-select: none;scale: 1;--scale-press: var(--scale-press-sm);transition: background-color var(--engage-control-engage-release) var(--ease-standard),border-color var(--engage-control-engage-release) var(--ease-standard),box-shadow var(--engage-control-engage-release) var(--ease-standard),color var(--engage-control-engage-release) var(--ease-standard),opacity var(--engage-control-engage-release) var(--ease-standard),scale var(--spring-press-duration) var(--transition-liquid-spatial);}.button > svg{flex: none;pointer-events: none;}.button > svg:not([class*="size-"]){inline-size: var(--ui-glyph);block-size: var(--ui-glyph);}.button > .button-mark{flex: none;inline-size: var(--ui-glyph);}.button[data-emphasis="primary"]{--glass-depth: var(--glass-depth-content);font-weight: 600;}.button[data-emphasis="secondary"]{--glass-veil-tier: var(--glass-veil-quiet);--glass-blur-floating: var(--glass-blur-quiet);}.button[data-tone="destructive"]{--button-tone: var(--destructive);--button-accent: var(--destructive);--button-quiet-ink: var(--destructive);--button-edge: color-mix( in oklab,var(--destructive) calc(var(--ink-perimeter) * 100%),transparent );--glass-capsule-fill: color-mix( in oklab,var(--glass-veil),var(--destructive) var(--feedback-tone-strength) );}.button[data-emphasis="quiet"],.button[data-emphasis="text"]{--button-edge: transparent;--button-ink: var(--button-quiet-ink);background: transparent;box-shadow: none;}.button[data-emphasis="text"]{--button-ink: var(--button-accent);padding-inline: var(--space-residue);text-underline-offset: 0.25em;}@media (hover: hover){.button[data-emphasis="quiet"]:hover:not(:disabled,[aria-disabled="true"]){--button-ink: var(--button-tone);background: color-mix( in oklab,var(--button-tone) calc(var(--fill-hover) * 100%),transparent );}.button[data-emphasis="text"]:hover:not(:disabled,[aria-disabled="true"]){text-decoration: underline;}}.button[data-emphasis="quiet"]:active:not(:disabled,[aria-disabled="true"]){background: color-mix( in oklab,var(--button-tone) calc(var(--fill-selected) * 100%),transparent );}.button[data-emphasis="text"]:active:not(:disabled,[aria-disabled="true"]){background: color-mix( in oklab,var(--button-accent) calc(var(--fill-hover) * 100%),transparent );}.button[data-size="xs"]{--button-size: var(--control-h-xs);gap: var(--space-residue);font-size: var(--control-text-sm);}.button[data-size="sm"]{--button-size: var(--control-h-sm);gap: var(--space-residue);font-size: var(--control-text-sm);}.button[data-size="lg"]{--button-size: var(--control-h-lg);font-size: var(--type-body);}.button[data-icon-only]{inline-size: var(--button-size);block-size: var(--button-size);min-block-size: var(--button-size);padding: 0;}.button[data-shape="bar"]{border-radius: var(--radius-bar);}.button:disabled,.button[aria-disabled="true"]{--button-ink: oklch(from var(--foreground) l 0 h / var(--opacity-disabled));cursor: not-allowed;}.button[data-loading]{cursor: progress;}.button.glass-specular-track:active::before{--specular-intensity: calc( var(--glass-specular-intensity-hover) + ( var(--glass-specular-intensity-active) - var(--glass-specular-intensity-hover) ) * var(--glass-btn-press-t) );}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.dark-mode-toggle-button{--dark-mode-toggle-size: 2.25rem;--dark-mode-toggle-padding: 0.375rem;appearance: none;display: inline-grid;place-items: center;flex: none;width: var(--dark-mode-toggle-size);height: var(--dark-mode-toggle-size);padding: var(--dark-mode-toggle-padding);border: 0;border-radius: var(--radius-
|
|
1
|
+
@layer components{.dark-mode-toggle-button{--dark-mode-toggle-size: 2.25rem;--dark-mode-toggle-padding: 0.375rem;appearance: none;display: inline-grid;place-items: center;flex: none;width: var(--dark-mode-toggle-size);height: var(--dark-mode-toggle-size);padding: var(--dark-mode-toggle-padding);border: 0;border-radius: var(--radius-circle);color: var(--foreground);background: transparent;opacity: 0.8;cursor: pointer;transition: opacity var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard);}@media (hover: hover){.dark-mode-toggle-button:hover{background: var(--surface-tint-10);opacity: 1;}}.dark-mode-toggle-button:focus-visible{outline: none;box-shadow: var(--focus-ring-shadow,var(--dock-ring));opacity: 1;}.dark-mode-toggle-button > svg{display: block;width: 100%;height: 100%;fill: currentColor;}.dark-mode-toggle-button[data-size="sm"]{--dark-mode-toggle-size: 1.75rem;--dark-mode-toggle-padding: 0.25rem;}.dark-mode-toggle-button[data-size="lg"]{--dark-mode-toggle-size: 2.75rem;--dark-mode-toggle-padding: 0.5rem;}.dark-mode-toggle-button[data-size="control"]{--dark-mode-toggle-size: var(--control-size,2.25rem);--dark-mode-toggle-padding: var(--control-icon-padding,0.375rem);}.dark-mode-toggle-button[data-size="dock"],.glass-dock .dark-mode-toggle-button:not([data-size="sm"]):not([data-size="lg"]):not( [data-size="control"] ){--dark-mode-toggle-size: var(--dock-control-size,var(--size-icon-btn));--dark-mode-toggle-padding: calc( ( var(--dock-control-size,var(--size-icon-btn)) - var(--dock-control-glyph-size,var(--dock-icon-glyph,1.25rem)) ) / 2 );}.toggle-sun,.toggle-circle{transform-origin: center;transition-property: transform;transition-duration: var(--spring-dock-duration);transition-timing-function: var(--spring-dock);}:where(.dark) .dark-mode-toggle-button .toggle-sun{transform: rotate(0.5turn);}:where(.dark) .dark-mode-toggle-button .toggle-circle{transform: translateX(-15%);}}@layer components{@media (prefers-reduced-motion: reduce){.dark-mode-toggle-button,.dark-mode-toggle-button .toggle-sun,.dark-mode-toggle-button .toggle-circle{transition: none;}}}
|
|
@@ -21,9 +21,9 @@ export interface DialogContentProps {
|
|
|
21
21
|
scroll?: boolean;
|
|
22
22
|
dismiss?: DialogDismiss;
|
|
23
23
|
}
|
|
24
|
-
declare var
|
|
24
|
+
declare var __VLS_29: {};
|
|
25
25
|
type __VLS_Slots = {} & {
|
|
26
|
-
default?: (props: typeof
|
|
26
|
+
default?: (props: typeof __VLS_29) => any;
|
|
27
27
|
};
|
|
28
28
|
declare const __VLS_base: import("vue").DefineComponent<DialogContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
29
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
@@ -48,9 +48,9 @@ interface ModalOverlayProps {
|
|
|
48
48
|
*/
|
|
49
49
|
veil?: boolean;
|
|
50
50
|
}
|
|
51
|
-
declare var
|
|
51
|
+
declare var __VLS_14: {};
|
|
52
52
|
type __VLS_Slots = {} & {
|
|
53
|
-
default?: (props: typeof
|
|
53
|
+
default?: (props: typeof __VLS_14) => any;
|
|
54
54
|
};
|
|
55
55
|
declare const __VLS_base: import("vue").DefineComponent<ModalOverlayProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ModalOverlayProps> & Readonly<{}>, {
|
|
56
56
|
opacity: number | null;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The scrim element under `ModalOverlay`'s presence. It is reka's `DialogOverlayImpl`
|
|
3
|
+
* less one line: reka's overlay takes `useBodyScrollLock`, which writes
|
|
4
|
+
* `overflow: hidden` (and a padding compensation) onto `body`. Under a consumer root
|
|
5
|
+
* whose overflow is not `visible`, that turns `body` into the page's scroller while a
|
|
6
|
+
* modal is open, so sticky elements drop out of place and the page can jump when it
|
|
7
|
+
* lets go (U/B7b: the atlas homepage finder, 4 of 4 cells per engine). This scrim holds
|
|
8
|
+
* the page still through the one root lock instead (`_shared/overlay`), for exactly as
|
|
9
|
+
* long as reka's lock held it: while the scrim is present.
|
|
10
|
+
*/
|
|
11
|
+
type __VLS_Props = {
|
|
12
|
+
present: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare var __VLS_1: {};
|
|
15
|
+
type __VLS_Slots = {} & {
|
|
16
|
+
default?: (props: typeof __VLS_1) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{:where([data-slot="dialog-content"]){border-radius: var(--radius-3xl);display: grid;gap: var(--space-body);inline-size: min(100% - 2 * var(--space-section),32rem);padding-inline: var(--space-family);padding-block: var(--space-family);translate: -50% -50%;}:where([data-slot="dialog-header"]){display: flex;flex-direction: column;gap: var(--space-atom);text-align: start;}:where([data-slot="dialog-content"]:has([data-slot="dialog-close"])) :where([data-slot="dialog-header"]){padding-inline-end: calc(var(--touch-target) + var(--space-atom));}:where([data-slot="dialog-title"]){font-size: calc(var(--type-body) * 1.272);line-height: var(--type-leading-body);letter-spacing: var(--type-tracking-tight);}:where([data-slot="dialog-description"]){font-size: var(--type-body);line-height: var(--type-leading-body);color: var(--foreground);}:where([data-slot="dialog-footer"]){display: flex;flex-direction: row;justify-content: flex-end;gap: var(--space-body);}:where([data-slot="dialog-close"]){position: absolute;inset-block-start: var(--space-family);inset-inline-end: var(--space-family);display: inline-flex;align-items: center;justify-content: center;inline-size: var(--touch-target);block-size: var(--touch-target);border-radius: var(--radius-
|
|
1
|
+
@layer components{:where([data-slot="dialog-content"]){border-radius: var(--radius-3xl);display: grid;gap: var(--space-body);inline-size: min(100% - 2 * var(--space-section),32rem);padding-inline: var(--space-family);padding-block: var(--space-family);translate: -50% -50%;}:where([data-slot="dialog-header"]){display: flex;flex-direction: column;gap: var(--space-atom);text-align: start;}:where([data-slot="dialog-content"]:has([data-slot="dialog-close"])) :where([data-slot="dialog-header"]){padding-inline-end: calc(var(--touch-target) + var(--space-atom));}:where([data-slot="dialog-title"]){font-size: calc(var(--type-body) * 1.272);line-height: var(--type-leading-body);letter-spacing: var(--type-tracking-tight);}:where([data-slot="dialog-description"]){font-size: var(--type-body);line-height: var(--type-leading-body);color: var(--foreground);}:where([data-slot="dialog-footer"]){display: flex;flex-direction: row;justify-content: flex-end;gap: var(--space-body);}:where([data-slot="dialog-close"]){position: absolute;inset-block-start: var(--space-family);inset-inline-end: var(--space-family);display: inline-flex;align-items: center;justify-content: center;inline-size: var(--touch-target);block-size: var(--touch-target);border-radius: var(--radius-circle);color: var(--foreground);cursor: pointer;isolation: isolate;}:where([data-slot="dialog-close"])::before{content: "";position: absolute;inset: 0;z-index: -1;border-radius: inherit;background: transparent;transition: background-color var(--spring-press-duration) var(--spring-press),scale var(--spring-press-duration) var(--spring-press);}@media (hover: hover){:where([data-slot="dialog-close"]):hover::before{background: color-mix(in oklab,var(--foreground) 5%,transparent);scale: var(--scale-hover);}}:where([data-slot="dialog-close"]):active::before{background: color-mix(in oklab,var(--foreground) 12%,transparent);scale: var(--scale-press);}:where([data-slot="dialog-close"]):focus-visible{outline: 2px solid color-mix(in oklab,var(--foreground) 48%,transparent);outline-offset: 2px;}}@property --rebuff-x{syntax: "<length>";inherits: false;initial-value: 0px;}@keyframes glass-dialog-rebuff-a{0%{--rebuff-x: 0px;}22%{--rebuff-x: -4px;}48%{--rebuff-x: 3px;}72%{--rebuff-x: -1.6px;}88%{--rebuff-x: 0.6px;}100%{--rebuff-x: 0px;}}@keyframes glass-dialog-rebuff-b{0%{--rebuff-x: 0px;}22%{--rebuff-x: -4px;}48%{--rebuff-x: 3px;}72%{--rebuff-x: -1.6px;}88%{--rebuff-x: 0.6px;}100%{--rebuff-x: 0px;}}@layer components{:where([data-slot="dialog-content"][data-rebuff]){translate: calc(-50% + var(--rebuff-x)) -50%;}:where([data-slot="dialog-content"][data-rebuff="a"]){animation: glass-dialog-rebuff-a var(--spring-press-duration) var(--spring-press);}:where([data-slot="dialog-content"][data-rebuff="b"]){animation: glass-dialog-rebuff-b var(--spring-press-duration) var(--spring-press);}}@keyframes glass-dialog-rebuff-flash{0%,100%{outline-color: transparent;}50%{outline-color: color-mix(in oklab,var(--foreground) 48%,transparent);}}@layer components{@media (prefers-reduced-motion: reduce){:where([data-slot="dialog-content"][data-rebuff]){outline: 2px solid transparent;outline-offset: 0;animation: glass-dialog-rebuff-flash var(--spring-press-duration) linear;}}}
|
|
@@ -22,8 +22,11 @@ declare const __VLS_base: import("vue").DefineComponent<DockProps, {
|
|
|
22
22
|
keepOpen: (kind?: import("./composables/dockContext.js").DockHoldKind) => void;
|
|
23
23
|
release: (kind?: import("./composables/dockContext.js").DockHoldKind) => void;
|
|
24
24
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DockProps> & Readonly<{}>, {
|
|
25
|
+
anchor: import(".").DockAnchor;
|
|
25
26
|
collapse: import(".").DockCollapse;
|
|
26
|
-
backdropMode: import(".").
|
|
27
|
+
backdropMode: import("../_shared/axes.js").BackdropMode;
|
|
28
|
+
expandOn: import(".").DockExpandOn;
|
|
29
|
+
collapsedLabel: string;
|
|
27
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
31
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
32
|
declare const _default: typeof __VLS_export;
|