@adecore/ui 0.31.12 → 0.33.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/Input.js
CHANGED
|
@@ -1,20 +1,239 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { fieldControlProps, useFieldControl } from './field-context.js';
|
|
4
|
-
import { Icon } from
|
|
4
|
+
import { Icon } from "./Icon.js";
|
|
5
5
|
/* The one text input: one border and one focus ring at the one height or the compact one. */
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export function Input(t0) {
|
|
8
|
+
const $ = _c(39);
|
|
9
|
+
let className;
|
|
10
|
+
let icon;
|
|
11
|
+
let id;
|
|
12
|
+
let props;
|
|
13
|
+
let t1;
|
|
14
|
+
let t2;
|
|
15
|
+
if ($[0] !== t0) {
|
|
16
|
+
({
|
|
17
|
+
size: t1,
|
|
18
|
+
mono: t2,
|
|
19
|
+
icon,
|
|
20
|
+
className,
|
|
21
|
+
id,
|
|
22
|
+
...props
|
|
23
|
+
} = t0);
|
|
24
|
+
$[0] = t0;
|
|
25
|
+
$[1] = className;
|
|
26
|
+
$[2] = icon;
|
|
27
|
+
$[3] = id;
|
|
28
|
+
$[4] = props;
|
|
29
|
+
$[5] = t1;
|
|
30
|
+
$[6] = t2;
|
|
31
|
+
} else {
|
|
32
|
+
className = $[1];
|
|
33
|
+
icon = $[2];
|
|
34
|
+
id = $[3];
|
|
35
|
+
props = $[4];
|
|
36
|
+
t1 = $[5];
|
|
37
|
+
t2 = $[6];
|
|
38
|
+
}
|
|
39
|
+
const size = t1 === undefined ? "md" : t1;
|
|
40
|
+
const mono = t2 === undefined ? false : t2;
|
|
41
|
+
const field = useFieldControl();
|
|
42
|
+
const small = size === "sm";
|
|
43
|
+
let t3;
|
|
44
|
+
if ($[7] !== field || $[8] !== id) {
|
|
45
|
+
t3 = fieldControlProps(field, id);
|
|
46
|
+
$[7] = field;
|
|
47
|
+
$[8] = id;
|
|
48
|
+
$[9] = t3;
|
|
49
|
+
} else {
|
|
50
|
+
t3 = $[9];
|
|
51
|
+
}
|
|
52
|
+
let t4;
|
|
53
|
+
if ($[10] !== props || $[11] !== t3) {
|
|
54
|
+
t4 = {
|
|
55
|
+
...t3,
|
|
56
|
+
...props
|
|
57
|
+
};
|
|
58
|
+
$[10] = props;
|
|
59
|
+
$[11] = t3;
|
|
60
|
+
$[12] = t4;
|
|
61
|
+
} else {
|
|
62
|
+
t4 = $[12];
|
|
63
|
+
}
|
|
64
|
+
const control = t4;
|
|
65
|
+
if (icon === undefined) {
|
|
66
|
+
const t5 = small && "field-sm";
|
|
67
|
+
const t6 = mono && "font-mono text-code";
|
|
68
|
+
let t7;
|
|
69
|
+
if ($[13] !== className || $[14] !== t5 || $[15] !== t6) {
|
|
70
|
+
t7 = clsx("field", t5, t6, className);
|
|
71
|
+
$[13] = className;
|
|
72
|
+
$[14] = t5;
|
|
73
|
+
$[15] = t6;
|
|
74
|
+
$[16] = t7;
|
|
75
|
+
} else {
|
|
76
|
+
t7 = $[16];
|
|
12
77
|
}
|
|
13
|
-
|
|
14
|
-
|
|
78
|
+
let t8;
|
|
79
|
+
if ($[17] !== control || $[18] !== t7) {
|
|
80
|
+
t8 = /*#__PURE__*/_jsx("input", {
|
|
81
|
+
...control,
|
|
82
|
+
className: t7
|
|
83
|
+
});
|
|
84
|
+
$[17] = control;
|
|
85
|
+
$[18] = t7;
|
|
86
|
+
$[19] = t8;
|
|
87
|
+
} else {
|
|
88
|
+
t8 = $[19];
|
|
89
|
+
}
|
|
90
|
+
return t8;
|
|
91
|
+
}
|
|
92
|
+
const t5 = small && "field-sm";
|
|
93
|
+
let t6;
|
|
94
|
+
if ($[20] !== className || $[21] !== t5) {
|
|
95
|
+
t6 = clsx("field relative flex p-0", t5, className);
|
|
96
|
+
$[20] = className;
|
|
97
|
+
$[21] = t5;
|
|
98
|
+
$[22] = t6;
|
|
99
|
+
} else {
|
|
100
|
+
t6 = $[22];
|
|
101
|
+
}
|
|
102
|
+
const t7 = small ? 12 : 14;
|
|
103
|
+
const t8 = small ? "left-2" : "left-2.5";
|
|
104
|
+
let t9;
|
|
105
|
+
if ($[23] !== t8) {
|
|
106
|
+
t9 = clsx("pointer-events-none absolute top-1/2 -translate-y-1/2 text-text-faint", t8);
|
|
107
|
+
$[23] = t8;
|
|
108
|
+
$[24] = t9;
|
|
109
|
+
} else {
|
|
110
|
+
t9 = $[24];
|
|
111
|
+
}
|
|
112
|
+
let t10;
|
|
113
|
+
if ($[25] !== icon || $[26] !== t7 || $[27] !== t9) {
|
|
114
|
+
t10 = /*#__PURE__*/_jsx(Icon, {
|
|
115
|
+
icon: icon,
|
|
116
|
+
size: t7,
|
|
117
|
+
className: t9
|
|
118
|
+
});
|
|
119
|
+
$[25] = icon;
|
|
120
|
+
$[26] = t7;
|
|
121
|
+
$[27] = t9;
|
|
122
|
+
$[28] = t10;
|
|
123
|
+
} else {
|
|
124
|
+
t10 = $[28];
|
|
125
|
+
}
|
|
126
|
+
const t11 = small ? "pr-2 pl-7" : "pr-2.5 pl-8";
|
|
127
|
+
const t12 = mono && "font-mono text-code";
|
|
128
|
+
let t13;
|
|
129
|
+
if ($[29] !== t11 || $[30] !== t12) {
|
|
130
|
+
t13 = clsx("min-w-0 flex-1 bg-transparent outline-none placeholder:text-text-faint", t11, t12);
|
|
131
|
+
$[29] = t11;
|
|
132
|
+
$[30] = t12;
|
|
133
|
+
$[31] = t13;
|
|
134
|
+
} else {
|
|
135
|
+
t13 = $[31];
|
|
136
|
+
}
|
|
137
|
+
let t14;
|
|
138
|
+
if ($[32] !== control || $[33] !== t13) {
|
|
139
|
+
t14 = /*#__PURE__*/_jsx("input", {
|
|
140
|
+
...control,
|
|
141
|
+
className: t13
|
|
142
|
+
});
|
|
143
|
+
$[32] = control;
|
|
144
|
+
$[33] = t13;
|
|
145
|
+
$[34] = t14;
|
|
146
|
+
} else {
|
|
147
|
+
t14 = $[34];
|
|
148
|
+
}
|
|
149
|
+
let t15;
|
|
150
|
+
if ($[35] !== t10 || $[36] !== t14 || $[37] !== t6) {
|
|
151
|
+
t15 = /*#__PURE__*/_jsxs("span", {
|
|
152
|
+
className: t6,
|
|
153
|
+
children: [t10, t14]
|
|
154
|
+
});
|
|
155
|
+
$[35] = t10;
|
|
156
|
+
$[36] = t14;
|
|
157
|
+
$[37] = t6;
|
|
158
|
+
$[38] = t15;
|
|
159
|
+
} else {
|
|
160
|
+
t15 = $[38];
|
|
161
|
+
}
|
|
162
|
+
return t15;
|
|
15
163
|
}
|
|
16
164
|
/* A field of a few lines: a commit message, the body of a pull request, a note. At least 64px tall; `rows` makes it taller. */
|
|
17
|
-
export function TextArea(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
165
|
+
export function TextArea(t0) {
|
|
166
|
+
const $ = _c(19);
|
|
167
|
+
let className;
|
|
168
|
+
let id;
|
|
169
|
+
let props;
|
|
170
|
+
let t1;
|
|
171
|
+
let t2;
|
|
172
|
+
let t3;
|
|
173
|
+
if ($[0] !== t0) {
|
|
174
|
+
({
|
|
175
|
+
size: t1,
|
|
176
|
+
resize: t2,
|
|
177
|
+
mono: t3,
|
|
178
|
+
className,
|
|
179
|
+
id,
|
|
180
|
+
...props
|
|
181
|
+
} = t0);
|
|
182
|
+
$[0] = t0;
|
|
183
|
+
$[1] = className;
|
|
184
|
+
$[2] = id;
|
|
185
|
+
$[3] = props;
|
|
186
|
+
$[4] = t1;
|
|
187
|
+
$[5] = t2;
|
|
188
|
+
$[6] = t3;
|
|
189
|
+
} else {
|
|
190
|
+
className = $[1];
|
|
191
|
+
id = $[2];
|
|
192
|
+
props = $[3];
|
|
193
|
+
t1 = $[4];
|
|
194
|
+
t2 = $[5];
|
|
195
|
+
t3 = $[6];
|
|
196
|
+
}
|
|
197
|
+
const size = t1 === undefined ? "md" : t1;
|
|
198
|
+
const resize = t2 === undefined ? "none" : t2;
|
|
199
|
+
const mono = t3 === undefined ? false : t3;
|
|
200
|
+
const field = useFieldControl();
|
|
201
|
+
let t4;
|
|
202
|
+
if ($[7] !== field || $[8] !== id) {
|
|
203
|
+
t4 = fieldControlProps(field, id);
|
|
204
|
+
$[7] = field;
|
|
205
|
+
$[8] = id;
|
|
206
|
+
$[9] = t4;
|
|
207
|
+
} else {
|
|
208
|
+
t4 = $[9];
|
|
209
|
+
}
|
|
210
|
+
const t5 = size === "sm" && "field-sm";
|
|
211
|
+
const t6 = resize === "vertical" ? "resize-y" : "resize-none";
|
|
212
|
+
const t7 = mono && "font-mono text-code";
|
|
213
|
+
let t8;
|
|
214
|
+
if ($[10] !== className || $[11] !== t5 || $[12] !== t6 || $[13] !== t7) {
|
|
215
|
+
t8 = clsx("field h-auto min-h-16 py-1.5", t5, t6, t7, className);
|
|
216
|
+
$[10] = className;
|
|
217
|
+
$[11] = t5;
|
|
218
|
+
$[12] = t6;
|
|
219
|
+
$[13] = t7;
|
|
220
|
+
$[14] = t8;
|
|
221
|
+
} else {
|
|
222
|
+
t8 = $[14];
|
|
223
|
+
}
|
|
224
|
+
let t9;
|
|
225
|
+
if ($[15] !== props || $[16] !== t4 || $[17] !== t8) {
|
|
226
|
+
t9 = /*#__PURE__*/_jsx("textarea", {
|
|
227
|
+
...t4,
|
|
228
|
+
...props,
|
|
229
|
+
className: t8
|
|
230
|
+
});
|
|
231
|
+
$[15] = props;
|
|
232
|
+
$[16] = t4;
|
|
233
|
+
$[17] = t8;
|
|
234
|
+
$[18] = t9;
|
|
235
|
+
} else {
|
|
236
|
+
t9 = $[18];
|
|
237
|
+
}
|
|
238
|
+
return t9;
|
|
239
|
+
}
|
package/dist/Kbd.js
CHANGED
|
@@ -1,22 +1,162 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { isApplePlatform } from './platform.js';
|
|
4
4
|
import { formatShortcut, shortcutParts } from './shortcut.js';
|
|
5
5
|
/* A shortcut chip on the surface it sits on: in a tooltip, in a palette's footer, in a line of help. */
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
7
|
const INLINE_KBD = 'rounded-sm bg-surface-sunken px-[5px] py-px font-sans text-xs/[inherit] text-text-muted';
|
|
7
8
|
/* One key, drawn as a cap. A settings page prints a shortcut key by key, so a gesture can stand beside it. */
|
|
8
9
|
const KEY_CAP = 'inline-grid place-items-center rounded-md border border-b-2 border-border-strong bg-surface-hover bg-clip-padding font-sans text-text';
|
|
9
10
|
/* `sm` fits inside a small field, as the hint of the key that focuses it. */
|
|
10
|
-
const KEY_CAP_SIZES = {
|
|
11
|
+
const KEY_CAP_SIZES = {
|
|
12
|
+
md: 'h-6 min-w-6 px-1.5 text-xs',
|
|
13
|
+
sm: 'h-5 min-w-5 px-1 text-2xs'
|
|
14
|
+
};
|
|
11
15
|
/* A shortcut as this platform prints it: `⌘K` on macOS, `Ctrl+K` elsewhere. */
|
|
12
|
-
export function Kbd(
|
|
13
|
-
|
|
16
|
+
export function Kbd(t0) {
|
|
17
|
+
const $ = _c(10);
|
|
18
|
+
const {
|
|
19
|
+
shortcut,
|
|
20
|
+
children,
|
|
21
|
+
variant: t1,
|
|
22
|
+
className,
|
|
23
|
+
ref
|
|
24
|
+
} = t0;
|
|
25
|
+
const variant = t1 === undefined ? "menu" : t1;
|
|
26
|
+
const t2 = variant === "inline" && INLINE_KBD;
|
|
27
|
+
let t3;
|
|
28
|
+
if ($[0] !== className || $[1] !== t2) {
|
|
29
|
+
t3 = clsx(t2, className);
|
|
30
|
+
$[0] = className;
|
|
31
|
+
$[1] = t2;
|
|
32
|
+
$[2] = t3;
|
|
33
|
+
} else {
|
|
34
|
+
t3 = $[2];
|
|
35
|
+
}
|
|
36
|
+
let t4;
|
|
37
|
+
if ($[3] !== children || $[4] !== shortcut) {
|
|
38
|
+
t4 = shortcut !== undefined ? formatShortcut(shortcut, isApplePlatform()) : children;
|
|
39
|
+
$[3] = children;
|
|
40
|
+
$[4] = shortcut;
|
|
41
|
+
$[5] = t4;
|
|
42
|
+
} else {
|
|
43
|
+
t4 = $[5];
|
|
44
|
+
}
|
|
45
|
+
let t5;
|
|
46
|
+
if ($[6] !== ref || $[7] !== t3 || $[8] !== t4) {
|
|
47
|
+
t5 = /*#__PURE__*/_jsx("kbd", {
|
|
48
|
+
ref: ref,
|
|
49
|
+
className: t3,
|
|
50
|
+
children: t4
|
|
51
|
+
});
|
|
52
|
+
$[6] = ref;
|
|
53
|
+
$[7] = t3;
|
|
54
|
+
$[8] = t4;
|
|
55
|
+
$[9] = t5;
|
|
56
|
+
} else {
|
|
57
|
+
t5 = $[9];
|
|
58
|
+
}
|
|
59
|
+
return t5;
|
|
14
60
|
}
|
|
15
|
-
export function KeyCap(
|
|
16
|
-
|
|
61
|
+
export function KeyCap(t0) {
|
|
62
|
+
const $ = _c(7);
|
|
63
|
+
const {
|
|
64
|
+
children,
|
|
65
|
+
size: t1,
|
|
66
|
+
className,
|
|
67
|
+
ref
|
|
68
|
+
} = t0;
|
|
69
|
+
const size = t1 === undefined ? "md" : t1;
|
|
70
|
+
const t2 = KEY_CAP_SIZES[size];
|
|
71
|
+
let t3;
|
|
72
|
+
if ($[0] !== className || $[1] !== t2) {
|
|
73
|
+
t3 = clsx(KEY_CAP, t2, className);
|
|
74
|
+
$[0] = className;
|
|
75
|
+
$[1] = t2;
|
|
76
|
+
$[2] = t3;
|
|
77
|
+
} else {
|
|
78
|
+
t3 = $[2];
|
|
79
|
+
}
|
|
80
|
+
let t4;
|
|
81
|
+
if ($[3] !== children || $[4] !== ref || $[5] !== t3) {
|
|
82
|
+
t4 = /*#__PURE__*/_jsx("kbd", {
|
|
83
|
+
ref: ref,
|
|
84
|
+
className: t3,
|
|
85
|
+
children: children
|
|
86
|
+
});
|
|
87
|
+
$[3] = children;
|
|
88
|
+
$[4] = ref;
|
|
89
|
+
$[5] = t3;
|
|
90
|
+
$[6] = t4;
|
|
91
|
+
} else {
|
|
92
|
+
t4 = $[6];
|
|
93
|
+
}
|
|
94
|
+
return t4;
|
|
17
95
|
}
|
|
18
96
|
/* A shortcut as one cap per key, `⌘` and `K`, plus the pointer gesture it goes with. */
|
|
19
|
-
export function Keys(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
97
|
+
export function Keys(t0) {
|
|
98
|
+
const $ = _c(15);
|
|
99
|
+
const {
|
|
100
|
+
shortcut,
|
|
101
|
+
then,
|
|
102
|
+
size: t1,
|
|
103
|
+
className,
|
|
104
|
+
ref
|
|
105
|
+
} = t0;
|
|
106
|
+
const size = t1 === undefined ? "md" : t1;
|
|
107
|
+
let t2;
|
|
108
|
+
if ($[0] !== shortcut || $[1] !== then) {
|
|
109
|
+
let t3;
|
|
110
|
+
if ($[3] !== then) {
|
|
111
|
+
t3 = then ? [then] : [];
|
|
112
|
+
$[3] = then;
|
|
113
|
+
$[4] = t3;
|
|
114
|
+
} else {
|
|
115
|
+
t3 = $[4];
|
|
116
|
+
}
|
|
117
|
+
t2 = [...shortcutParts(shortcut, isApplePlatform()), ...t3];
|
|
118
|
+
$[0] = shortcut;
|
|
119
|
+
$[1] = then;
|
|
120
|
+
$[2] = t2;
|
|
121
|
+
} else {
|
|
122
|
+
t2 = $[2];
|
|
123
|
+
}
|
|
124
|
+
const parts = t2;
|
|
125
|
+
const t3 = size === "sm" ? "gap-0.5" : "gap-1";
|
|
126
|
+
let t4;
|
|
127
|
+
if ($[5] !== className || $[6] !== t3) {
|
|
128
|
+
t4 = clsx("flex items-center", t3, className);
|
|
129
|
+
$[5] = className;
|
|
130
|
+
$[6] = t3;
|
|
131
|
+
$[7] = t4;
|
|
132
|
+
} else {
|
|
133
|
+
t4 = $[7];
|
|
134
|
+
}
|
|
135
|
+
let t5;
|
|
136
|
+
if ($[8] !== parts || $[9] !== size) {
|
|
137
|
+
t5 = parts.map((part, index) => /*#__PURE__*/_jsx(KeyCap, {
|
|
138
|
+
size: size,
|
|
139
|
+
children: part
|
|
140
|
+
}, `${part}-${index}`));
|
|
141
|
+
$[8] = parts;
|
|
142
|
+
$[9] = size;
|
|
143
|
+
$[10] = t5;
|
|
144
|
+
} else {
|
|
145
|
+
t5 = $[10];
|
|
146
|
+
}
|
|
147
|
+
let t6;
|
|
148
|
+
if ($[11] !== ref || $[12] !== t4 || $[13] !== t5) {
|
|
149
|
+
t6 = /*#__PURE__*/_jsx("span", {
|
|
150
|
+
ref: ref,
|
|
151
|
+
className: t4,
|
|
152
|
+
children: t5
|
|
153
|
+
});
|
|
154
|
+
$[11] = ref;
|
|
155
|
+
$[12] = t4;
|
|
156
|
+
$[13] = t5;
|
|
157
|
+
$[14] = t6;
|
|
158
|
+
} else {
|
|
159
|
+
t6 = $[14];
|
|
160
|
+
}
|
|
161
|
+
return t6;
|
|
162
|
+
}
|
package/dist/LazyBoundary.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { Suspense, useSyncExternalStore } from 'react';
|
|
3
2
|
import { readLandings, subscribeLandings } from './lazy-landings.js';
|
|
4
3
|
/*
|
|
@@ -6,7 +5,17 @@ import { readLandings, subscribeLandings } from './lazy-landings.js';
|
|
|
6
5
|
* 300 ms after its fallback showed; this boundary draws again as an ordinary update once a module
|
|
7
6
|
* lands, so a chunk that takes 20 ms shows after 20 ms.
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
export function LazyBoundary({
|
|
10
|
+
fallback = null,
|
|
11
|
+
children
|
|
12
|
+
}) {
|
|
13
|
+
// Compiled, the same boundary would come back and the landing would wait for React's own retry after all.
|
|
14
|
+
'use no memo';
|
|
15
|
+
|
|
16
|
+
useSyncExternalStore(subscribeLandings, readLandings, readLandings);
|
|
17
|
+
return /*#__PURE__*/_jsx(Suspense, {
|
|
18
|
+
fallback: fallback,
|
|
19
|
+
children: children
|
|
20
|
+
});
|
|
21
|
+
}
|
package/dist/ListRow.js
CHANGED
|
@@ -1,20 +1,80 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
1
2
|
import clsx from 'clsx';
|
|
2
3
|
import { useRender } from '@base-ui/react/use-render';
|
|
3
4
|
const VARIANT = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
/* A row of a list that reads as a table and fills the width of its panel: commits, processes,
|
|
6
|
+
branches. Square, so the rows stack into one block. It carries no padding; the caller pads 12px
|
|
7
|
+
beside text and 4px beside a button. */
|
|
8
|
+
flat: 'flex h-7 items-center',
|
|
9
|
+
/* A row of a list a person finds their way through: a sidebar, devices, recent files. Inset from
|
|
10
|
+
the edge and rounded, so each row reads as a place of its own. */
|
|
11
|
+
inset: 'flex h-8 items-center rounded-md px-2'
|
|
11
12
|
};
|
|
12
13
|
/* The height and the shape of one row of a list. What it does (a button, a link, a menu trigger) comes from `render`. */
|
|
13
|
-
export function ListRow(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
export function ListRow(t0) {
|
|
15
|
+
const $ = _c(16);
|
|
16
|
+
let className;
|
|
17
|
+
let props;
|
|
18
|
+
let ref;
|
|
19
|
+
let render;
|
|
20
|
+
let variant;
|
|
21
|
+
if ($[0] !== t0) {
|
|
22
|
+
({
|
|
23
|
+
variant,
|
|
24
|
+
render,
|
|
25
|
+
className,
|
|
26
|
+
ref,
|
|
27
|
+
...props
|
|
28
|
+
} = t0);
|
|
29
|
+
$[0] = t0;
|
|
30
|
+
$[1] = className;
|
|
31
|
+
$[2] = props;
|
|
32
|
+
$[3] = ref;
|
|
33
|
+
$[4] = render;
|
|
34
|
+
$[5] = variant;
|
|
35
|
+
} else {
|
|
36
|
+
className = $[1];
|
|
37
|
+
props = $[2];
|
|
38
|
+
ref = $[3];
|
|
39
|
+
render = $[4];
|
|
40
|
+
variant = $[5];
|
|
41
|
+
}
|
|
42
|
+
const t1 = VARIANT[variant];
|
|
43
|
+
let t2;
|
|
44
|
+
if ($[6] !== className || $[7] !== t1) {
|
|
45
|
+
t2 = clsx(t1, className);
|
|
46
|
+
$[6] = className;
|
|
47
|
+
$[7] = t1;
|
|
48
|
+
$[8] = t2;
|
|
49
|
+
} else {
|
|
50
|
+
t2 = $[8];
|
|
51
|
+
}
|
|
52
|
+
let t3;
|
|
53
|
+
if ($[9] !== props || $[10] !== t2) {
|
|
54
|
+
t3 = {
|
|
55
|
+
...props,
|
|
56
|
+
className: t2
|
|
57
|
+
};
|
|
58
|
+
$[9] = props;
|
|
59
|
+
$[10] = t2;
|
|
60
|
+
$[11] = t3;
|
|
61
|
+
} else {
|
|
62
|
+
t3 = $[11];
|
|
63
|
+
}
|
|
64
|
+
let t4;
|
|
65
|
+
if ($[12] !== ref || $[13] !== render || $[14] !== t3) {
|
|
66
|
+
t4 = {
|
|
67
|
+
render,
|
|
68
|
+
ref,
|
|
69
|
+
defaultTagName: "div",
|
|
70
|
+
props: t3
|
|
71
|
+
};
|
|
72
|
+
$[12] = ref;
|
|
73
|
+
$[13] = render;
|
|
74
|
+
$[14] = t3;
|
|
75
|
+
$[15] = t4;
|
|
76
|
+
} else {
|
|
77
|
+
t4 = $[15];
|
|
78
|
+
}
|
|
79
|
+
return useRender(t4);
|
|
80
|
+
}
|
package/dist/Meter.js
CHANGED
|
@@ -1,7 +1,110 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
/* A level against a scale: how full it is, and where a target or a limit sits on the same scale. */
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
export function Meter(t0) {
|
|
6
|
+
const $ = _c(25);
|
|
7
|
+
const {
|
|
8
|
+
value,
|
|
9
|
+
min: t1,
|
|
10
|
+
max: t2,
|
|
11
|
+
marks: t3,
|
|
12
|
+
label,
|
|
13
|
+
valueText,
|
|
14
|
+
className,
|
|
15
|
+
ref
|
|
16
|
+
} = t0;
|
|
17
|
+
const min = t1 === undefined ? 0 : t1;
|
|
18
|
+
const max = t2 === undefined ? 100 : t2;
|
|
19
|
+
let t4;
|
|
20
|
+
if ($[0] !== t3) {
|
|
21
|
+
t4 = t3 === undefined ? [] : t3;
|
|
22
|
+
$[0] = t3;
|
|
23
|
+
$[1] = t4;
|
|
24
|
+
} else {
|
|
25
|
+
t4 = $[1];
|
|
26
|
+
}
|
|
27
|
+
const marks = t4;
|
|
28
|
+
let t5;
|
|
29
|
+
if ($[2] !== max || $[3] !== min) {
|
|
30
|
+
t5 = level => max > min ? Math.min(1, Math.max(0, (level - min) / (max - min))) : 0;
|
|
31
|
+
$[2] = max;
|
|
32
|
+
$[3] = min;
|
|
33
|
+
$[4] = t5;
|
|
34
|
+
} else {
|
|
35
|
+
t5 = $[4];
|
|
36
|
+
}
|
|
37
|
+
const fractionOf = t5;
|
|
38
|
+
const t6 = value === null ? min : Math.min(max, Math.max(min, value));
|
|
39
|
+
let t7;
|
|
40
|
+
if ($[5] !== className) {
|
|
41
|
+
t7 = clsx("relative h-1.5 rounded-full bg-surface-sunken", className);
|
|
42
|
+
$[5] = className;
|
|
43
|
+
$[6] = t7;
|
|
44
|
+
} else {
|
|
45
|
+
t7 = $[6];
|
|
46
|
+
}
|
|
47
|
+
let t8;
|
|
48
|
+
if ($[7] !== fractionOf || $[8] !== value) {
|
|
49
|
+
t8 = value !== null && /*#__PURE__*/_jsx("span", {
|
|
50
|
+
className: "absolute inset-y-0 left-0 rounded-full bg-accent",
|
|
51
|
+
style: {
|
|
52
|
+
width: `${fractionOf(value) * 100}%`
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
$[7] = fractionOf;
|
|
56
|
+
$[8] = value;
|
|
57
|
+
$[9] = t8;
|
|
58
|
+
} else {
|
|
59
|
+
t8 = $[9];
|
|
60
|
+
}
|
|
61
|
+
let t9;
|
|
62
|
+
if ($[10] !== fractionOf || $[11] !== marks) {
|
|
63
|
+
let t10;
|
|
64
|
+
if ($[13] !== fractionOf) {
|
|
65
|
+
t10 = mark => /*#__PURE__*/_jsx("span", {
|
|
66
|
+
className: "absolute -inset-y-0.5 w-px bg-text-muted",
|
|
67
|
+
style: {
|
|
68
|
+
left: `${fractionOf(mark) * 100}%`
|
|
69
|
+
}
|
|
70
|
+
}, mark);
|
|
71
|
+
$[13] = fractionOf;
|
|
72
|
+
$[14] = t10;
|
|
73
|
+
} else {
|
|
74
|
+
t10 = $[14];
|
|
75
|
+
}
|
|
76
|
+
t9 = marks.map(t10);
|
|
77
|
+
$[10] = fractionOf;
|
|
78
|
+
$[11] = marks;
|
|
79
|
+
$[12] = t9;
|
|
80
|
+
} else {
|
|
81
|
+
t9 = $[12];
|
|
82
|
+
}
|
|
83
|
+
let t10;
|
|
84
|
+
if ($[15] !== label || $[16] !== max || $[17] !== min || $[18] !== ref || $[19] !== t6 || $[20] !== t7 || $[21] !== t8 || $[22] !== t9 || $[23] !== valueText) {
|
|
85
|
+
t10 = /*#__PURE__*/_jsxs("div", {
|
|
86
|
+
ref: ref,
|
|
87
|
+
role: "meter",
|
|
88
|
+
"aria-label": label,
|
|
89
|
+
"aria-valuemin": min,
|
|
90
|
+
"aria-valuemax": max,
|
|
91
|
+
"aria-valuenow": t6,
|
|
92
|
+
"aria-valuetext": valueText,
|
|
93
|
+
className: t7,
|
|
94
|
+
children: [t8, t9]
|
|
95
|
+
});
|
|
96
|
+
$[15] = label;
|
|
97
|
+
$[16] = max;
|
|
98
|
+
$[17] = min;
|
|
99
|
+
$[18] = ref;
|
|
100
|
+
$[19] = t6;
|
|
101
|
+
$[20] = t7;
|
|
102
|
+
$[21] = t8;
|
|
103
|
+
$[22] = t9;
|
|
104
|
+
$[23] = valueText;
|
|
105
|
+
$[24] = t10;
|
|
106
|
+
} else {
|
|
107
|
+
t10 = $[24];
|
|
108
|
+
}
|
|
109
|
+
return t10;
|
|
110
|
+
}
|