@adecore/ui 0.31.11 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccentSwatches.js +290 -13
- package/dist/Banner.js +90 -9
- package/dist/Button.js +114 -22
- package/dist/ButtonGroup.js +62 -8
- package/dist/Checkbox.js +73 -4
- package/dist/ChoiceCards.js +205 -11
- package/dist/CloseButton.js +87 -7
- package/dist/ColorSwatch.js +132 -15
- package/dist/ColorWheelPicker.js +305 -71
- package/dist/ColumnResizeHandle.js +43 -8
- package/dist/DisabledReason.js +27 -8
- package/dist/DockShell.js +144 -37
- package/dist/EmptyState.js +95 -6
- package/dist/ErrorBoundary.js +254 -31
- package/dist/Field.js +349 -31
- package/dist/FileIcon.js +67 -6
- package/dist/Icon.js +38 -6
- package/dist/IconButton.js +176 -20
- package/dist/IconPicker.js +344 -73
- package/dist/Input.js +233 -14
- package/dist/Kbd.js +150 -10
- package/dist/LazyBoundary.js +14 -5
- package/dist/ListRow.js +75 -15
- package/dist/Meter.js +108 -5
- package/dist/MiddleTruncate.js +126 -45
- package/dist/PanelEmpty.js +64 -5
- package/dist/PanelHeader.js +95 -13
- package/dist/Pill.js +114 -19
- package/dist/ProjectSwitcher.js +225 -12
- package/dist/PromptDialog.js +352 -37
- package/dist/SectionLabel.js +62 -8
- package/dist/SegmentBar.js +197 -36
- package/dist/Segmented.js +130 -23
- package/dist/Select.js +310 -19
- package/dist/SelectSearch.js +344 -29
- package/dist/Separator.js +35 -4
- package/dist/ShortcutHints.js +146 -76
- package/dist/Skeleton.js +31 -4
- package/dist/Slider.js +172 -10
- package/dist/SlidingColumn.js +194 -34
- package/dist/Spinner.js +100 -3
- package/dist/Stepper.js +232 -11
- package/dist/Surface.js +62 -8
- package/dist/Switch.js +60 -6
- package/dist/TextMenu.js +212 -17
- package/dist/Tile.js +149 -5
- package/dist/Toasts.js +391 -33
- package/dist/Tooltip.js +153 -16
- package/dist/UIProvider.js +62 -15
- package/dist/Waveform.js +362 -93
- package/dist/Wipe.js +259 -34
- package/dist/ZoomControls.js +356 -14
- package/dist/class-name.js +1 -1
- package/dist/clipboard.js +15 -17
- package/dist/context-menu/index.parts.js +1 -1
- package/dist/dialog/index.parts.js +1 -1
- package/dist/dialog/parts.js +378 -29
- package/dist/dialog-layer.js +51 -18
- package/dist/error-boundary.js +19 -19
- package/dist/error-message.js +1 -1
- package/dist/field-context.js +7 -5
- package/dist/file-icon.js +23 -21
- package/dist/file-tree/helpers.js +133 -119
- package/dist/file-tree/index.parts.js +3 -3
- package/dist/file-tree/parts.js +418 -127
- package/dist/file-tree/style.js +1 -1
- package/dist/file-tree/use-file-tree-shift.js +43 -30
- package/dist/file-tree/use-file-tree.js +60 -18
- package/dist/file-tree/use-slots.js +220 -192
- package/dist/floating.js +2 -2
- package/dist/format/datetime.js +88 -38
- package/dist/format/duration.js +59 -53
- package/dist/format/index.js +1 -1
- package/dist/format/locale.js +76 -56
- package/dist/format/number.js +77 -61
- package/dist/format/regions.js +4 -2
- package/dist/format/time-zone.js +1 -1
- package/dist/icon-button-size.js +12 -2
- package/dist/icon-picker.js +70 -61
- package/dist/index.js +57 -57
- package/dist/key-value-list/index.parts.js +1 -1
- package/dist/key-value-list/parts.js +256 -22
- package/dist/lazy-landings.js +10 -10
- package/dist/lazy.js +84 -71
- package/dist/locales/en.js +80 -80
- package/dist/locales/nl.js +80 -80
- package/dist/locales.js +10 -7
- package/dist/menu/index.parts.js +1 -1
- package/dist/menu/parts.js +882 -44
- package/dist/merge-refs.js +8 -9
- package/dist/middle-truncate.js +24 -25
- package/dist/modality.js +27 -19
- package/dist/placement.js +11 -20
- package/dist/platform.js +6 -6
- package/dist/popover/index.parts.js +1 -1
- package/dist/popover/parts.js +173 -11
- package/dist/popup-layer.js +38 -17
- package/dist/prefetch.js +78 -79
- package/dist/preview-card/index.parts.js +1 -1
- package/dist/project-switcher-row.js +153 -12
- package/dist/select-row.js +69 -5
- package/dist/select-shared.js +6 -6
- package/dist/selection.js +16 -16
- package/dist/seti-icons.js +413 -413
- package/dist/settings/ConfirmDialog.js +55 -8
- package/dist/settings/DetailHeader.js +72 -4
- package/dist/settings/MasterDetail.js +119 -7
- package/dist/settings/SettingsDialog.js +820 -80
- package/dist/settings/SettingsRow.js +205 -18
- package/dist/settings/SettingsSection.js +96 -6
- package/dist/settings/index.js +7 -7
- package/dist/settings/target.js +7 -2
- package/dist/shortcut-hints.js +73 -55
- package/dist/shortcut.js +140 -104
- package/dist/step-places.js +1 -1
- package/dist/tabs/index.parts.js +1 -1
- package/dist/tabs/overflow.js +18 -18
- package/dist/tabs/parts.js +780 -166
- package/dist/testing/dedupe.js +82 -75
- package/dist/testing/fake-source.js +12 -12
- package/dist/testing/index.js +1 -1
- package/dist/toast-store.js +65 -46
- package/dist/tree/index.parts.js +1 -1
- package/dist/tree/parts.js +721 -94
- package/dist/tree/shift.js +28 -22
- package/dist/tree/style.js +2 -2
- package/dist/tree/use-tree-shift.js +178 -117
- package/dist/useAsyncAction.js +23 -19
- package/dist/useColumnResize.js +36 -34
- package/dist/useContentSize.js +62 -18
- package/dist/useMeasuredWidth.js +14 -3
- package/dist/useNow.js +73 -30
- package/dist/wipe-split.js +14 -14
- package/dist/workspace/DropPreview.js +60 -7
- package/dist/workspace/SplitView.js +1025 -441
- package/dist/workspace/TabStrip.js +810 -191
- package/dist/workspace/Workspace.js +276 -26
- package/dist/workspace/context.js +8 -3
- package/dist/workspace/geometry.js +173 -150
- package/dist/workspace/model.js +313 -250
- package/dist/workspace/preview.js +61 -61
- package/dist/zoom.js +2 -2
- package/package.json +1 -1
- package/src/ErrorBoundary.tsx +1 -1
- package/src/Field.tsx +4 -3
- package/src/IconPicker.tsx +3 -3
- package/src/LazyBoundary.tsx +2 -0
- package/src/MiddleTruncate.tsx +2 -2
- package/src/SegmentBar.tsx +2 -2
- package/src/Toasts.tsx +3 -1
- package/src/Tooltip.tsx +7 -10
- package/src/Waveform.tsx +3 -3
- package/src/file-tree/parts.tsx +6 -9
- package/src/file-tree/use-file-tree-shift.tsx +6 -9
- package/src/lazy.tsx +4 -0
- package/src/locales/en.ts +4 -4
- package/src/locales/nl.ts +5 -5
- package/src/settings/SettingsDialog.tsx +1 -1
- package/src/tree/parts.tsx +5 -8
- package/src/useContentSize.ts +3 -3
- package/src/workspace/SplitView.tsx +2 -2
- package/src/workspace/TabStrip.tsx +2 -3
- package/src/workspace/Workspace.tsx +2 -5
package/dist/Waveform.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { useRef } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { formatClockDuration } from './format/duration.js';
|
|
6
6
|
import { mergeRefs } from './merge-refs.js';
|
|
7
7
|
import { useMeasuredWidth } from './useMeasuredWidth.js';
|
|
8
8
|
/* About one bar per 3px, each 2px wide; a bar sits at its own time, so it lines up with the marks and the playhead. */
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
10
|
const BAR_PITCH = 3;
|
|
10
11
|
const BAR_WIDTH = 2;
|
|
11
12
|
/* The height of a silent bar, so silence still reads as a line. */
|
|
@@ -14,110 +15,378 @@ const SILENCE = 0.04;
|
|
|
14
15
|
const PAGE_STEPS = 10;
|
|
15
16
|
/* The loudest sample under each bar, or null for a bar past either end of the audio. */
|
|
16
17
|
const barsOf = (levels, duration, from, to, count) => {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
if (count <= 0 || levels.length === 0 || duration <= 0 || to <= from) {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
const perSecond = levels.length / duration;
|
|
22
|
+
return Array.from({
|
|
23
|
+
length: count
|
|
24
|
+
}, (_, i) => {
|
|
25
|
+
const start = from + (to - from) * i / count;
|
|
26
|
+
const end = from + (to - from) * (i + 1) / count;
|
|
27
|
+
if (end <= 0 || start >= duration) {
|
|
28
|
+
return null;
|
|
19
29
|
}
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const last = Math.min(levels.length - 1, Math.max(first, Math.ceil(end * perSecond) - 1));
|
|
29
|
-
let level = 0;
|
|
30
|
-
for (let index = first; index <= last; index++) {
|
|
31
|
-
level = Math.max(level, levels[index] ?? 0);
|
|
32
|
-
}
|
|
33
|
-
return Math.min(1, Math.max(SILENCE, level));
|
|
34
|
-
});
|
|
30
|
+
const first = Math.max(0, Math.floor(start * perSecond));
|
|
31
|
+
const last = Math.min(levels.length - 1, Math.max(first, Math.ceil(end * perSecond) - 1));
|
|
32
|
+
let level = 0;
|
|
33
|
+
for (let index = first; index <= last; index++) {
|
|
34
|
+
level = Math.max(level, levels[index] ?? 0);
|
|
35
|
+
}
|
|
36
|
+
return Math.min(1, Math.max(SILENCE, level));
|
|
37
|
+
});
|
|
35
38
|
};
|
|
36
39
|
/* The loudness of a piece of audio over time, played up to the playhead, where a press or a drag seeks. */
|
|
37
|
-
export function Waveform(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
export function Waveform(t0) {
|
|
41
|
+
const $ = _c(93);
|
|
42
|
+
const {
|
|
43
|
+
levels,
|
|
44
|
+
duration,
|
|
45
|
+
range,
|
|
46
|
+
value,
|
|
47
|
+
onValueChange,
|
|
48
|
+
onValueCommitted,
|
|
49
|
+
step: t1,
|
|
50
|
+
onKeyDown,
|
|
51
|
+
marks: t2,
|
|
52
|
+
label,
|
|
53
|
+
className,
|
|
54
|
+
ref
|
|
55
|
+
} = t0;
|
|
56
|
+
const step = t1 === undefined ? 1 : t1;
|
|
57
|
+
const marks = t2 === undefined ? [] : t2;
|
|
58
|
+
const {
|
|
59
|
+
t
|
|
60
|
+
} = useTranslation("ui");
|
|
61
|
+
const [measure, width] = useMeasuredWidth();
|
|
62
|
+
let t3;
|
|
63
|
+
if ($[0] !== measure || $[1] !== ref) {
|
|
64
|
+
t3 = mergeRefs(ref, measure);
|
|
65
|
+
$[0] = measure;
|
|
66
|
+
$[1] = ref;
|
|
67
|
+
$[2] = t3;
|
|
68
|
+
} else {
|
|
69
|
+
t3 = $[2];
|
|
70
|
+
}
|
|
71
|
+
const rootRef = t3;
|
|
72
|
+
const dragged = useRef(0);
|
|
73
|
+
let t4;
|
|
74
|
+
if ($[3] !== duration || $[4] !== range) {
|
|
75
|
+
t4 = range ?? [0, duration];
|
|
76
|
+
$[3] = duration;
|
|
77
|
+
$[4] = range;
|
|
78
|
+
$[5] = t4;
|
|
79
|
+
} else {
|
|
80
|
+
t4 = $[5];
|
|
81
|
+
}
|
|
82
|
+
const [from, to] = t4;
|
|
83
|
+
const span = to - from;
|
|
84
|
+
const count = Math.floor(width / BAR_PITCH);
|
|
85
|
+
let inView;
|
|
86
|
+
let positionOf;
|
|
87
|
+
let t10;
|
|
88
|
+
let t11;
|
|
89
|
+
let t12;
|
|
90
|
+
let t13;
|
|
91
|
+
let t5;
|
|
92
|
+
let t6;
|
|
93
|
+
let t7;
|
|
94
|
+
let t8;
|
|
95
|
+
let t9;
|
|
96
|
+
if ($[6] !== className || $[7] !== count || $[8] !== duration || $[9] !== from || $[10] !== label || $[11] !== levels || $[12] !== onKeyDown || $[13] !== onValueChange || $[14] !== onValueCommitted || $[15] !== rootRef || $[16] !== span || $[17] !== step || $[18] !== t || $[19] !== to || $[20] !== value || $[21] !== width) {
|
|
97
|
+
const bars = barsOf(levels, duration, from, to, count);
|
|
98
|
+
let t14;
|
|
99
|
+
if ($[33] !== from || $[34] !== span) {
|
|
100
|
+
t14 = time => span > 0 ? (time - from) / span : 0;
|
|
101
|
+
$[33] = from;
|
|
102
|
+
$[34] = span;
|
|
103
|
+
$[35] = t14;
|
|
104
|
+
} else {
|
|
105
|
+
t14 = $[35];
|
|
106
|
+
}
|
|
107
|
+
positionOf = t14;
|
|
108
|
+
let t15;
|
|
109
|
+
if ($[36] !== positionOf) {
|
|
110
|
+
t15 = time_0 => positionOf(time_0) >= 0 && positionOf(time_0) <= 1;
|
|
111
|
+
$[36] = positionOf;
|
|
112
|
+
$[37] = t15;
|
|
113
|
+
} else {
|
|
114
|
+
t15 = $[37];
|
|
115
|
+
}
|
|
116
|
+
inView = t15;
|
|
117
|
+
let t16;
|
|
118
|
+
if ($[38] !== duration) {
|
|
119
|
+
t16 = time_1 => Math.min(duration, Math.max(0, time_1));
|
|
120
|
+
$[38] = duration;
|
|
121
|
+
$[39] = t16;
|
|
122
|
+
} else {
|
|
123
|
+
t16 = $[39];
|
|
124
|
+
}
|
|
125
|
+
const clamp = t16;
|
|
126
|
+
let t17;
|
|
127
|
+
if ($[40] !== clamp || $[41] !== from || $[42] !== onValueChange || $[43] !== span) {
|
|
128
|
+
t17 = e => {
|
|
50
129
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
51
130
|
if (rect.width > 0) {
|
|
52
|
-
|
|
53
|
-
|
|
131
|
+
dragged.current = clamp(from + (e.clientX - rect.left) / rect.width * span);
|
|
132
|
+
onValueChange?.(dragged.current);
|
|
54
133
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
134
|
+
};
|
|
135
|
+
$[40] = clamp;
|
|
136
|
+
$[41] = from;
|
|
137
|
+
$[42] = onValueChange;
|
|
138
|
+
$[43] = span;
|
|
139
|
+
$[44] = t17;
|
|
140
|
+
} else {
|
|
141
|
+
t17 = $[44];
|
|
142
|
+
}
|
|
143
|
+
const seekAt = t17;
|
|
144
|
+
let t18;
|
|
145
|
+
if ($[45] !== onValueCommitted) {
|
|
146
|
+
t18 = e_0 => {
|
|
147
|
+
if (e_0.currentTarget.hasPointerCapture(e_0.pointerId)) {
|
|
148
|
+
e_0.currentTarget.releasePointerCapture(e_0.pointerId);
|
|
149
|
+
onValueCommitted?.(dragged.current);
|
|
60
150
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
151
|
+
};
|
|
152
|
+
$[45] = onValueCommitted;
|
|
153
|
+
$[46] = t18;
|
|
154
|
+
} else {
|
|
155
|
+
t18 = $[46];
|
|
156
|
+
}
|
|
157
|
+
const letGo = t18;
|
|
158
|
+
let t19;
|
|
159
|
+
if ($[47] !== clamp || $[48] !== duration || $[49] !== onKeyDown || $[50] !== onValueChange || $[51] !== onValueCommitted || $[52] !== step || $[53] !== value) {
|
|
160
|
+
t19 = e_1 => {
|
|
161
|
+
onKeyDown?.(e_1);
|
|
162
|
+
if (e_1.defaultPrevented) {
|
|
163
|
+
return;
|
|
66
164
|
}
|
|
67
165
|
const at = value ?? 0;
|
|
68
166
|
const moves = {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
167
|
+
ArrowLeft: at - step,
|
|
168
|
+
ArrowDown: at - step,
|
|
169
|
+
ArrowRight: at + step,
|
|
170
|
+
ArrowUp: at + step,
|
|
171
|
+
PageDown: at - step * PAGE_STEPS,
|
|
172
|
+
PageUp: at + step * PAGE_STEPS,
|
|
173
|
+
Home: 0,
|
|
174
|
+
End: duration
|
|
77
175
|
};
|
|
78
|
-
const next = moves[
|
|
176
|
+
const next = moves[e_1.key];
|
|
79
177
|
if (next === undefined) {
|
|
80
|
-
|
|
178
|
+
return;
|
|
81
179
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
e.stopPropagation();
|
|
180
|
+
e_1.preventDefault();
|
|
181
|
+
e_1.stopPropagation();
|
|
85
182
|
onValueChange?.(clamp(next));
|
|
86
183
|
onValueCommitted?.(clamp(next));
|
|
184
|
+
};
|
|
185
|
+
$[47] = clamp;
|
|
186
|
+
$[48] = duration;
|
|
187
|
+
$[49] = onKeyDown;
|
|
188
|
+
$[50] = onValueChange;
|
|
189
|
+
$[51] = onValueCommitted;
|
|
190
|
+
$[52] = step;
|
|
191
|
+
$[53] = value;
|
|
192
|
+
$[54] = t19;
|
|
193
|
+
} else {
|
|
194
|
+
t19 = $[54];
|
|
195
|
+
}
|
|
196
|
+
const moveByKey = t19;
|
|
197
|
+
let t20;
|
|
198
|
+
if ($[55] !== duration || $[56] !== letGo || $[57] !== moveByKey || $[58] !== onValueChange || $[59] !== seekAt || $[60] !== t || $[61] !== value) {
|
|
199
|
+
t20 = onValueChange === undefined ? {
|
|
200
|
+
role: "img"
|
|
201
|
+
} : {
|
|
202
|
+
role: "slider",
|
|
203
|
+
tabIndex: 0,
|
|
204
|
+
"aria-valuemin": 0,
|
|
205
|
+
"aria-valuemax": duration,
|
|
206
|
+
"aria-valuenow": value ?? 0,
|
|
207
|
+
"aria-valuetext": t("waveform.position", {
|
|
208
|
+
time: formatClockDuration((value ?? 0) * 1000),
|
|
209
|
+
duration: formatClockDuration(duration * 1000)
|
|
210
|
+
}),
|
|
211
|
+
onPointerDown: e_2 => {
|
|
212
|
+
e_2.currentTarget.setPointerCapture(e_2.pointerId);
|
|
213
|
+
seekAt(e_2);
|
|
214
|
+
},
|
|
215
|
+
onPointerMove: e_3 => {
|
|
216
|
+
if (e_3.currentTarget.hasPointerCapture(e_3.pointerId)) {
|
|
217
|
+
seekAt(e_3);
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
onPointerUp: letGo,
|
|
221
|
+
onPointerCancel: letGo,
|
|
222
|
+
onKeyDown: moveByKey
|
|
223
|
+
};
|
|
224
|
+
$[55] = duration;
|
|
225
|
+
$[56] = letGo;
|
|
226
|
+
$[57] = moveByKey;
|
|
227
|
+
$[58] = onValueChange;
|
|
228
|
+
$[59] = seekAt;
|
|
229
|
+
$[60] = t;
|
|
230
|
+
$[61] = value;
|
|
231
|
+
$[62] = t20;
|
|
232
|
+
} else {
|
|
233
|
+
t20 = $[62];
|
|
234
|
+
}
|
|
235
|
+
const slider = t20;
|
|
236
|
+
t10 = rootRef;
|
|
237
|
+
t11 = label;
|
|
238
|
+
t12 = slider;
|
|
239
|
+
const t21 = onValueChange !== undefined && "focus-ring cursor-ew-resize touch-none";
|
|
240
|
+
if ($[63] !== className || $[64] !== t21) {
|
|
241
|
+
t13 = clsx("relative select-none", t21, className);
|
|
242
|
+
$[63] = className;
|
|
243
|
+
$[64] = t21;
|
|
244
|
+
$[65] = t13;
|
|
245
|
+
} else {
|
|
246
|
+
t13 = $[65];
|
|
247
|
+
}
|
|
248
|
+
t5 = "absolute inset-0 size-full";
|
|
249
|
+
t6 = `0 0 ${Math.max(1, width)} 100`;
|
|
250
|
+
t7 = "none";
|
|
251
|
+
t8 = true;
|
|
252
|
+
let t22;
|
|
253
|
+
if ($[66] !== count || $[67] !== from || $[68] !== span || $[69] !== value || $[70] !== width) {
|
|
254
|
+
t22 = (level, i) => {
|
|
255
|
+
if (level === null) {
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
const center = from + span * (i + 0.5) / count;
|
|
259
|
+
return /*#__PURE__*/_jsx("rect", {
|
|
260
|
+
x: Math.round(i * width / count),
|
|
261
|
+
y: (100 - level * 100) / 2,
|
|
262
|
+
width: BAR_WIDTH,
|
|
263
|
+
height: level * 100,
|
|
264
|
+
className: value !== undefined && center <= value ? "fill-accent" : "fill-text-faint"
|
|
265
|
+
}, i);
|
|
266
|
+
};
|
|
267
|
+
$[66] = count;
|
|
268
|
+
$[67] = from;
|
|
269
|
+
$[68] = span;
|
|
270
|
+
$[69] = value;
|
|
271
|
+
$[70] = width;
|
|
272
|
+
$[71] = t22;
|
|
273
|
+
} else {
|
|
274
|
+
t22 = $[71];
|
|
275
|
+
}
|
|
276
|
+
t9 = bars.map(t22);
|
|
277
|
+
$[6] = className;
|
|
278
|
+
$[7] = count;
|
|
279
|
+
$[8] = duration;
|
|
280
|
+
$[9] = from;
|
|
281
|
+
$[10] = label;
|
|
282
|
+
$[11] = levels;
|
|
283
|
+
$[12] = onKeyDown;
|
|
284
|
+
$[13] = onValueChange;
|
|
285
|
+
$[14] = onValueCommitted;
|
|
286
|
+
$[15] = rootRef;
|
|
287
|
+
$[16] = span;
|
|
288
|
+
$[17] = step;
|
|
289
|
+
$[18] = t;
|
|
290
|
+
$[19] = to;
|
|
291
|
+
$[20] = value;
|
|
292
|
+
$[21] = width;
|
|
293
|
+
$[22] = inView;
|
|
294
|
+
$[23] = positionOf;
|
|
295
|
+
$[24] = t10;
|
|
296
|
+
$[25] = t11;
|
|
297
|
+
$[26] = t12;
|
|
298
|
+
$[27] = t13;
|
|
299
|
+
$[28] = t5;
|
|
300
|
+
$[29] = t6;
|
|
301
|
+
$[30] = t7;
|
|
302
|
+
$[31] = t8;
|
|
303
|
+
$[32] = t9;
|
|
304
|
+
} else {
|
|
305
|
+
inView = $[22];
|
|
306
|
+
positionOf = $[23];
|
|
307
|
+
t10 = $[24];
|
|
308
|
+
t11 = $[25];
|
|
309
|
+
t12 = $[26];
|
|
310
|
+
t13 = $[27];
|
|
311
|
+
t5 = $[28];
|
|
312
|
+
t6 = $[29];
|
|
313
|
+
t7 = $[30];
|
|
314
|
+
t8 = $[31];
|
|
315
|
+
t9 = $[32];
|
|
316
|
+
}
|
|
317
|
+
let t14;
|
|
318
|
+
if ($[72] !== positionOf || $[73] !== width) {
|
|
319
|
+
t14 = mark => {
|
|
320
|
+
const x = Math.round(positionOf(mark) * width) + 0.5;
|
|
321
|
+
return /*#__PURE__*/_jsx("line", {
|
|
322
|
+
x1: x,
|
|
323
|
+
x2: x,
|
|
324
|
+
y1: 0,
|
|
325
|
+
y2: 100,
|
|
326
|
+
strokeWidth: 1,
|
|
327
|
+
vectorEffect: "non-scaling-stroke",
|
|
328
|
+
className: "stroke-accent opacity-60"
|
|
329
|
+
}, mark);
|
|
87
330
|
};
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
331
|
+
$[72] = positionOf;
|
|
332
|
+
$[73] = width;
|
|
333
|
+
$[74] = t14;
|
|
334
|
+
} else {
|
|
335
|
+
t14 = $[74];
|
|
336
|
+
}
|
|
337
|
+
const t15 = marks.filter(inView).map(t14);
|
|
338
|
+
let t16;
|
|
339
|
+
if ($[75] !== t15 || $[76] !== t5 || $[77] !== t6 || $[78] !== t7 || $[79] !== t8 || $[80] !== t9) {
|
|
340
|
+
t16 = /*#__PURE__*/_jsxs("svg", {
|
|
341
|
+
className: t5,
|
|
342
|
+
viewBox: t6,
|
|
343
|
+
preserveAspectRatio: t7,
|
|
344
|
+
"aria-hidden": t8,
|
|
345
|
+
children: [t9, t15]
|
|
346
|
+
});
|
|
347
|
+
$[75] = t15;
|
|
348
|
+
$[76] = t5;
|
|
349
|
+
$[77] = t6;
|
|
350
|
+
$[78] = t7;
|
|
351
|
+
$[79] = t8;
|
|
352
|
+
$[80] = t9;
|
|
353
|
+
$[81] = t16;
|
|
354
|
+
} else {
|
|
355
|
+
t16 = $[81];
|
|
356
|
+
}
|
|
357
|
+
let t17;
|
|
358
|
+
if ($[82] !== inView || $[83] !== positionOf || $[84] !== value) {
|
|
359
|
+
t17 = value !== undefined && inView(value) && /*#__PURE__*/_jsx("span", {
|
|
360
|
+
className: "pointer-events-none absolute inset-y-0 w-px bg-accent",
|
|
361
|
+
style: {
|
|
362
|
+
left: `${positionOf(value) * 100}%`
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
$[82] = inView;
|
|
366
|
+
$[83] = positionOf;
|
|
367
|
+
$[84] = value;
|
|
368
|
+
$[85] = t17;
|
|
369
|
+
} else {
|
|
370
|
+
t17 = $[85];
|
|
371
|
+
}
|
|
372
|
+
let t18;
|
|
373
|
+
if ($[86] !== t10 || $[87] !== t11 || $[88] !== t12 || $[89] !== t13 || $[90] !== t16 || $[91] !== t17) {
|
|
374
|
+
t18 = /*#__PURE__*/_jsxs("div", {
|
|
375
|
+
ref: t10,
|
|
376
|
+
"aria-label": t11,
|
|
377
|
+
...t12,
|
|
378
|
+
className: t13,
|
|
379
|
+
children: [t16, t17]
|
|
380
|
+
});
|
|
381
|
+
$[86] = t10;
|
|
382
|
+
$[87] = t11;
|
|
383
|
+
$[88] = t12;
|
|
384
|
+
$[89] = t13;
|
|
385
|
+
$[90] = t16;
|
|
386
|
+
$[91] = t17;
|
|
387
|
+
$[92] = t18;
|
|
388
|
+
} else {
|
|
389
|
+
t18 = $[92];
|
|
390
|
+
}
|
|
391
|
+
return t18;
|
|
392
|
+
}
|