@adecore/ui 0.49.7 → 0.50.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/dist/SlidingColumn.d.ts +2 -1
- package/dist/SlidingColumn.js +90 -87
- package/dist/file-tree/style.js +2 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/locales/en.d.ts +3 -0
- package/dist/locales/en.js +4 -1
- package/dist/locales/nl.d.ts +3 -0
- package/dist/locales/nl.js +4 -1
- package/dist/tabs/use-tab-drag.d.ts +52 -0
- package/dist/tabs/use-tab-drag.js +218 -0
- package/dist/theme.css +65 -13
- package/dist/workspace/PaneBar.d.ts +39 -0
- package/dist/workspace/PaneBar.js +399 -0
- package/dist/workspace/Workspace.d.ts +4 -1
- package/dist/workspace/Workspace.js +207 -155
- package/dist/workspace/WorkspaceRail.d.ts +13 -0
- package/dist/workspace/WorkspaceRail.js +125 -0
- package/dist/workspace/WorkspaceTopRow.d.ts +15 -0
- package/dist/workspace/WorkspaceTopRow.js +81 -0
- package/dist/workspace/context.d.ts +4 -0
- package/dist/workspace/context.js +5 -0
- package/dist/workspace/top-row-slot.d.ts +2 -0
- package/dist/workspace/top-row-slot.js +6 -0
- package/package.json +1 -1
- package/src/SlidingColumn.tsx +21 -2
- package/src/file-tree/style.ts +2 -0
- package/src/index.ts +5 -0
- package/src/locales/en.ts +4 -1
- package/src/locales/nl.ts +4 -1
- package/src/tabs/use-tab-drag.ts +256 -0
- package/src/theme.css +65 -13
- package/src/workspace/PaneBar.tsx +276 -0
- package/src/workspace/Workspace.tsx +28 -12
- package/src/workspace/WorkspaceRail.tsx +30 -0
- package/src/workspace/WorkspaceTopRow.tsx +37 -0
- package/src/workspace/context.ts +6 -0
- package/src/workspace/top-row-slot.ts +7 -0
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import 'react';
|
|
2
|
+
import { useState } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useRender } from '@base-ui/react/use-render';
|
|
5
|
-
import { WorkspaceContext } from './context.js';
|
|
5
|
+
import { TopRowSlotContext, WorkspaceContext } from './context.js';
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
7
|
const isPresent = node => node !== undefined && node !== null && node !== false;
|
|
8
|
+
/** The sidebar, the toolbar and the content on one raised sheet, with the side panel and the rail behind it. */
|
|
8
9
|
export function Workspace(t0) {
|
|
9
|
-
const $ = _c(
|
|
10
|
+
const $ = _c(77);
|
|
10
11
|
let children;
|
|
11
12
|
let className;
|
|
12
13
|
let props;
|
|
14
|
+
let rail;
|
|
13
15
|
let ref;
|
|
14
16
|
let render;
|
|
15
17
|
let sidePanel;
|
|
@@ -27,6 +29,7 @@ export function Workspace(t0) {
|
|
|
27
29
|
toolbar,
|
|
28
30
|
sidebar,
|
|
29
31
|
sidePanel,
|
|
32
|
+
rail,
|
|
30
33
|
sidebarWidth: t2,
|
|
31
34
|
sidePanelWidth: t3,
|
|
32
35
|
sidebarOpen,
|
|
@@ -42,79 +45,92 @@ export function Workspace(t0) {
|
|
|
42
45
|
$[1] = children;
|
|
43
46
|
$[2] = className;
|
|
44
47
|
$[3] = props;
|
|
45
|
-
$[4] =
|
|
46
|
-
$[5] =
|
|
47
|
-
$[6] =
|
|
48
|
-
$[7] =
|
|
49
|
-
$[8] =
|
|
50
|
-
$[9] =
|
|
51
|
-
$[10] =
|
|
52
|
-
$[11] =
|
|
53
|
-
$[12] =
|
|
54
|
-
$[13] =
|
|
55
|
-
$[14] =
|
|
48
|
+
$[4] = rail;
|
|
49
|
+
$[5] = ref;
|
|
50
|
+
$[6] = render;
|
|
51
|
+
$[7] = sidePanel;
|
|
52
|
+
$[8] = sidePanelOpen;
|
|
53
|
+
$[9] = sidebar;
|
|
54
|
+
$[10] = sidebarOpen;
|
|
55
|
+
$[11] = style;
|
|
56
|
+
$[12] = t1;
|
|
57
|
+
$[13] = t2;
|
|
58
|
+
$[14] = t3;
|
|
59
|
+
$[15] = toolbar;
|
|
56
60
|
} else {
|
|
57
61
|
children = $[1];
|
|
58
62
|
className = $[2];
|
|
59
63
|
props = $[3];
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
rail = $[4];
|
|
65
|
+
ref = $[5];
|
|
66
|
+
render = $[6];
|
|
67
|
+
sidePanel = $[7];
|
|
68
|
+
sidePanelOpen = $[8];
|
|
69
|
+
sidebar = $[9];
|
|
70
|
+
sidebarOpen = $[10];
|
|
71
|
+
style = $[11];
|
|
72
|
+
t1 = $[12];
|
|
73
|
+
t2 = $[13];
|
|
74
|
+
t3 = $[14];
|
|
75
|
+
toolbar = $[15];
|
|
71
76
|
}
|
|
72
77
|
const layout = t1 === undefined ? "standard" : t1;
|
|
73
78
|
const sidebarWidth = t2 === undefined ? 248 : t2;
|
|
74
79
|
const sidePanelWidth = t3 === undefined ? 320 : t3;
|
|
75
80
|
let t4;
|
|
76
|
-
if ($[
|
|
81
|
+
if ($[16] !== sidebar) {
|
|
77
82
|
t4 = isPresent(sidebar);
|
|
78
|
-
$[
|
|
79
|
-
$[
|
|
83
|
+
$[16] = sidebar;
|
|
84
|
+
$[17] = t4;
|
|
80
85
|
} else {
|
|
81
|
-
t4 = $[
|
|
86
|
+
t4 = $[17];
|
|
82
87
|
}
|
|
83
88
|
const hasSidebar = t4;
|
|
84
89
|
let t5;
|
|
85
|
-
if ($[
|
|
90
|
+
if ($[18] !== sidePanel) {
|
|
86
91
|
t5 = isPresent(sidePanel);
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
92
|
+
$[18] = sidePanel;
|
|
93
|
+
$[19] = t5;
|
|
89
94
|
} else {
|
|
90
|
-
t5 = $[
|
|
95
|
+
t5 = $[19];
|
|
91
96
|
}
|
|
92
97
|
const hasPanel = t5;
|
|
93
|
-
const leftOpen = hasSidebar && (sidebarOpen ?? true);
|
|
94
|
-
const rightOpen = hasPanel && (sidePanelOpen ?? true);
|
|
95
98
|
let t6;
|
|
96
|
-
if ($[
|
|
97
|
-
t6 = isPresent(
|
|
98
|
-
$[
|
|
99
|
-
$[
|
|
99
|
+
if ($[20] !== rail) {
|
|
100
|
+
t6 = isPresent(rail);
|
|
101
|
+
$[20] = rail;
|
|
102
|
+
$[21] = t6;
|
|
100
103
|
} else {
|
|
101
|
-
t6 = $[
|
|
104
|
+
t6 = $[21];
|
|
102
105
|
}
|
|
103
|
-
const
|
|
106
|
+
const hasRail = t6;
|
|
107
|
+
const leftOpen = hasSidebar && (sidebarOpen ?? true);
|
|
108
|
+
const rightOpen = hasPanel && (sidePanelOpen ?? true);
|
|
104
109
|
let t7;
|
|
105
|
-
if ($[
|
|
106
|
-
t7 =
|
|
107
|
-
$[
|
|
108
|
-
$[
|
|
110
|
+
if ($[22] !== toolbar) {
|
|
111
|
+
t7 = isPresent(toolbar);
|
|
112
|
+
$[22] = toolbar;
|
|
113
|
+
$[23] = t7;
|
|
109
114
|
} else {
|
|
110
|
-
t7 = $[
|
|
115
|
+
t7 = $[23];
|
|
111
116
|
}
|
|
112
|
-
const
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
const hasToolbar = t7;
|
|
118
|
+
const [topRowSlot, setTopRowSlot] = useState(null);
|
|
119
|
+
let t8;
|
|
120
|
+
if ($[24] !== className) {
|
|
121
|
+
t8 = clsx("ade-workspace", className);
|
|
122
|
+
$[24] = className;
|
|
123
|
+
$[25] = t8;
|
|
124
|
+
} else {
|
|
125
|
+
t8 = $[25];
|
|
126
|
+
}
|
|
127
|
+
const t9 = hasToolbar || undefined;
|
|
128
|
+
const t10 = leftOpen || undefined;
|
|
129
|
+
const t11 = rightOpen || undefined;
|
|
130
|
+
const t12 = hasRail || undefined;
|
|
131
|
+
let t13;
|
|
132
|
+
if ($[26] !== hasSidebar || $[27] !== sidebar || $[28] !== sidebarWidth) {
|
|
133
|
+
t13 = hasSidebar && /*#__PURE__*/_jsx("aside", {
|
|
118
134
|
className: "ade-workspace-sidebar",
|
|
119
135
|
"data-auto": sidebarWidth === "auto" || undefined,
|
|
120
136
|
style: {
|
|
@@ -122,51 +138,63 @@ export function Workspace(t0) {
|
|
|
122
138
|
},
|
|
123
139
|
children: sidebar
|
|
124
140
|
});
|
|
125
|
-
$[
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
141
|
+
$[26] = hasSidebar;
|
|
142
|
+
$[27] = sidebar;
|
|
143
|
+
$[28] = sidebarWidth;
|
|
144
|
+
$[29] = t13;
|
|
129
145
|
} else {
|
|
130
|
-
|
|
146
|
+
t13 = $[29];
|
|
131
147
|
}
|
|
132
|
-
let
|
|
133
|
-
if ($[
|
|
134
|
-
|
|
148
|
+
let t14;
|
|
149
|
+
if ($[30] !== hasToolbar || $[31] !== toolbar) {
|
|
150
|
+
t14 = hasToolbar && /*#__PURE__*/_jsx("div", {
|
|
135
151
|
className: "ade-workspace-toolbar",
|
|
136
152
|
children: toolbar
|
|
137
153
|
});
|
|
138
|
-
$[
|
|
139
|
-
$[
|
|
140
|
-
$[
|
|
154
|
+
$[30] = hasToolbar;
|
|
155
|
+
$[31] = toolbar;
|
|
156
|
+
$[32] = t14;
|
|
141
157
|
} else {
|
|
142
|
-
|
|
158
|
+
t14 = $[32];
|
|
143
159
|
}
|
|
144
|
-
let
|
|
145
|
-
if ($[
|
|
146
|
-
|
|
160
|
+
let t15;
|
|
161
|
+
if ($[33] !== children) {
|
|
162
|
+
t15 = /*#__PURE__*/_jsx("div", {
|
|
147
163
|
className: "ade-workspace-content",
|
|
148
164
|
children: children
|
|
149
165
|
});
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
166
|
+
$[33] = children;
|
|
167
|
+
$[34] = t15;
|
|
152
168
|
} else {
|
|
153
|
-
|
|
169
|
+
t15 = $[34];
|
|
154
170
|
}
|
|
155
|
-
let
|
|
156
|
-
if ($[
|
|
157
|
-
|
|
171
|
+
let t16;
|
|
172
|
+
if ($[35] !== t14 || $[36] !== t15) {
|
|
173
|
+
t16 = /*#__PURE__*/_jsxs("div", {
|
|
158
174
|
className: "ade-workspace-center",
|
|
159
|
-
children: [
|
|
175
|
+
children: [t14, t15]
|
|
160
176
|
});
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
177
|
+
$[35] = t14;
|
|
178
|
+
$[36] = t15;
|
|
179
|
+
$[37] = t16;
|
|
164
180
|
} else {
|
|
165
|
-
|
|
181
|
+
t16 = $[37];
|
|
166
182
|
}
|
|
167
|
-
let
|
|
168
|
-
if ($[
|
|
169
|
-
|
|
183
|
+
let t17;
|
|
184
|
+
if ($[38] !== t13 || $[39] !== t16) {
|
|
185
|
+
t17 = /*#__PURE__*/_jsxs("div", {
|
|
186
|
+
className: "ade-workspace-sheet",
|
|
187
|
+
children: [t13, t16]
|
|
188
|
+
});
|
|
189
|
+
$[38] = t13;
|
|
190
|
+
$[39] = t16;
|
|
191
|
+
$[40] = t17;
|
|
192
|
+
} else {
|
|
193
|
+
t17 = $[40];
|
|
194
|
+
}
|
|
195
|
+
let t18;
|
|
196
|
+
if ($[41] !== hasPanel || $[42] !== sidePanel || $[43] !== sidePanelWidth) {
|
|
197
|
+
t18 = hasPanel && /*#__PURE__*/_jsx("aside", {
|
|
170
198
|
className: "ade-workspace-side-panel",
|
|
171
199
|
"data-auto": sidePanelWidth === "auto" || undefined,
|
|
172
200
|
style: {
|
|
@@ -174,107 +202,131 @@ export function Workspace(t0) {
|
|
|
174
202
|
},
|
|
175
203
|
children: sidePanel
|
|
176
204
|
});
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
205
|
+
$[41] = hasPanel;
|
|
206
|
+
$[42] = sidePanel;
|
|
207
|
+
$[43] = sidePanelWidth;
|
|
208
|
+
$[44] = t18;
|
|
181
209
|
} else {
|
|
182
|
-
|
|
210
|
+
t18 = $[44];
|
|
183
211
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
212
|
+
const t19 = hasRail && rail;
|
|
213
|
+
let t20;
|
|
214
|
+
if ($[45] !== t17 || $[46] !== t18 || $[47] !== t19) {
|
|
215
|
+
t20 = /*#__PURE__*/_jsxs(_Fragment, {
|
|
216
|
+
children: [t17, t18, t19]
|
|
188
217
|
});
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
218
|
+
$[45] = t17;
|
|
219
|
+
$[46] = t18;
|
|
220
|
+
$[47] = t19;
|
|
221
|
+
$[48] = t20;
|
|
193
222
|
} else {
|
|
194
|
-
|
|
223
|
+
t20 = $[48];
|
|
195
224
|
}
|
|
196
|
-
let
|
|
197
|
-
if ($[
|
|
198
|
-
|
|
225
|
+
let t21;
|
|
226
|
+
if ($[49] !== layout || $[50] !== props || $[51] !== style || $[52] !== t10 || $[53] !== t11 || $[54] !== t12 || $[55] !== t20 || $[56] !== t8 || $[57] !== t9) {
|
|
227
|
+
t21 = {
|
|
199
228
|
...props,
|
|
200
|
-
className:
|
|
229
|
+
className: t8,
|
|
201
230
|
style,
|
|
202
231
|
"data-layout": layout,
|
|
203
|
-
"data-toolbar":
|
|
204
|
-
"data-sidebar":
|
|
205
|
-
"data-side-panel":
|
|
206
|
-
|
|
232
|
+
"data-toolbar": t9,
|
|
233
|
+
"data-sidebar": t10,
|
|
234
|
+
"data-side-panel": t11,
|
|
235
|
+
"data-rail": t12,
|
|
236
|
+
children: t20
|
|
207
237
|
};
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
238
|
+
$[49] = layout;
|
|
239
|
+
$[50] = props;
|
|
240
|
+
$[51] = style;
|
|
241
|
+
$[52] = t10;
|
|
242
|
+
$[53] = t11;
|
|
243
|
+
$[54] = t12;
|
|
244
|
+
$[55] = t20;
|
|
245
|
+
$[56] = t8;
|
|
246
|
+
$[57] = t9;
|
|
247
|
+
$[58] = t21;
|
|
217
248
|
} else {
|
|
218
|
-
|
|
249
|
+
t21 = $[58];
|
|
219
250
|
}
|
|
220
|
-
let
|
|
221
|
-
if ($[
|
|
222
|
-
|
|
251
|
+
let t22;
|
|
252
|
+
if ($[59] !== ref || $[60] !== render || $[61] !== t21) {
|
|
253
|
+
t22 = {
|
|
223
254
|
render,
|
|
224
255
|
ref,
|
|
225
256
|
defaultTagName: "div",
|
|
226
|
-
props:
|
|
257
|
+
props: t21
|
|
227
258
|
};
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
259
|
+
$[59] = ref;
|
|
260
|
+
$[60] = render;
|
|
261
|
+
$[61] = t21;
|
|
262
|
+
$[62] = t22;
|
|
232
263
|
} else {
|
|
233
|
-
|
|
264
|
+
t22 = $[62];
|
|
234
265
|
}
|
|
235
|
-
const element = useRender(
|
|
236
|
-
const
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
right: t20,
|
|
266
|
+
const element = useRender(t22);
|
|
267
|
+
const t23 = !hasToolbar;
|
|
268
|
+
const t24 = !leftOpen;
|
|
269
|
+
let t25;
|
|
270
|
+
if ($[63] !== t23 || $[64] !== t24) {
|
|
271
|
+
t25 = {
|
|
272
|
+
top: t23,
|
|
273
|
+
right: true,
|
|
244
274
|
bottom: true,
|
|
245
|
-
left:
|
|
275
|
+
left: t24
|
|
246
276
|
};
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[59] = t22;
|
|
277
|
+
$[63] = t23;
|
|
278
|
+
$[64] = t24;
|
|
279
|
+
$[65] = t25;
|
|
251
280
|
} else {
|
|
252
|
-
|
|
281
|
+
t25 = $[65];
|
|
253
282
|
}
|
|
254
|
-
let
|
|
255
|
-
if ($[
|
|
256
|
-
|
|
283
|
+
let t26;
|
|
284
|
+
if ($[66] !== layout || $[67] !== t25) {
|
|
285
|
+
t26 = {
|
|
257
286
|
layout,
|
|
258
|
-
edges:
|
|
287
|
+
edges: t25
|
|
259
288
|
};
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
289
|
+
$[66] = layout;
|
|
290
|
+
$[67] = t25;
|
|
291
|
+
$[68] = t26;
|
|
263
292
|
} else {
|
|
264
|
-
|
|
293
|
+
t26 = $[68];
|
|
265
294
|
}
|
|
266
|
-
const context =
|
|
267
|
-
let
|
|
268
|
-
if ($[
|
|
269
|
-
|
|
270
|
-
|
|
295
|
+
const context = t26;
|
|
296
|
+
let t27;
|
|
297
|
+
if ($[69] !== topRowSlot) {
|
|
298
|
+
t27 = {
|
|
299
|
+
slot: topRowSlot,
|
|
300
|
+
register: setTopRowSlot
|
|
301
|
+
};
|
|
302
|
+
$[69] = topRowSlot;
|
|
303
|
+
$[70] = t27;
|
|
304
|
+
} else {
|
|
305
|
+
t27 = $[70];
|
|
306
|
+
}
|
|
307
|
+
let t28;
|
|
308
|
+
if ($[71] !== element || $[72] !== t27) {
|
|
309
|
+
t28 = /*#__PURE__*/_jsx(TopRowSlotContext, {
|
|
310
|
+
value: t27,
|
|
271
311
|
children: element
|
|
272
312
|
});
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
313
|
+
$[71] = element;
|
|
314
|
+
$[72] = t27;
|
|
315
|
+
$[73] = t28;
|
|
316
|
+
} else {
|
|
317
|
+
t28 = $[73];
|
|
318
|
+
}
|
|
319
|
+
let t29;
|
|
320
|
+
if ($[74] !== context || $[75] !== t28) {
|
|
321
|
+
t29 = /*#__PURE__*/_jsx(WorkspaceContext, {
|
|
322
|
+
value: context,
|
|
323
|
+
children: t28
|
|
324
|
+
});
|
|
325
|
+
$[74] = context;
|
|
326
|
+
$[75] = t28;
|
|
327
|
+
$[76] = t29;
|
|
276
328
|
} else {
|
|
277
|
-
|
|
329
|
+
t29 = $[76];
|
|
278
330
|
}
|
|
279
|
-
return
|
|
331
|
+
return t29;
|
|
280
332
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
export type WorkspaceRailProps = useRender.ComponentProps<'nav'>;
|
|
3
|
+
/**
|
|
4
|
+
* The column of buttons at the right edge of a `Workspace`, 48 pixels wide. Its first separator stands on
|
|
5
|
+
* the top row's bottom line when one 32 pixel button comes before it. It makes no stacking context, so a
|
|
6
|
+
* hover never covers the sheet's edge; a tooltip still rises above the sheet.
|
|
7
|
+
*/
|
|
8
|
+
export declare function WorkspaceRail({ className, render, ref, ...props }: WorkspaceRailProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
9
|
+
export declare function WorkspaceRailSeparator({ className }: {
|
|
10
|
+
className?: string;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
/** Pushes what follows to the bottom of the rail. */
|
|
13
|
+
export declare function WorkspaceRailSpacer(): import("react").JSX.Element;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
5
|
+
/**
|
|
6
|
+
* The column of buttons at the right edge of a `Workspace`, 48 pixels wide. Its first separator stands on
|
|
7
|
+
* the top row's bottom line when one 32 pixel button comes before it. It makes no stacking context, so a
|
|
8
|
+
* hover never covers the sheet's edge; a tooltip still rises above the sheet.
|
|
9
|
+
*/
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
export function WorkspaceRail(t0) {
|
|
12
|
+
const $ = _c(17);
|
|
13
|
+
let className;
|
|
14
|
+
let props;
|
|
15
|
+
let ref;
|
|
16
|
+
let render;
|
|
17
|
+
if ($[0] !== t0) {
|
|
18
|
+
({
|
|
19
|
+
className,
|
|
20
|
+
render,
|
|
21
|
+
ref,
|
|
22
|
+
...props
|
|
23
|
+
} = t0);
|
|
24
|
+
$[0] = t0;
|
|
25
|
+
$[1] = className;
|
|
26
|
+
$[2] = props;
|
|
27
|
+
$[3] = ref;
|
|
28
|
+
$[4] = render;
|
|
29
|
+
} else {
|
|
30
|
+
className = $[1];
|
|
31
|
+
props = $[2];
|
|
32
|
+
ref = $[3];
|
|
33
|
+
render = $[4];
|
|
34
|
+
}
|
|
35
|
+
const {
|
|
36
|
+
t
|
|
37
|
+
} = useTranslation("ui");
|
|
38
|
+
let t1;
|
|
39
|
+
if ($[5] !== t) {
|
|
40
|
+
t1 = t("workspace.tools");
|
|
41
|
+
$[5] = t;
|
|
42
|
+
$[6] = t1;
|
|
43
|
+
} else {
|
|
44
|
+
t1 = $[6];
|
|
45
|
+
}
|
|
46
|
+
let t2;
|
|
47
|
+
if ($[7] !== className) {
|
|
48
|
+
t2 = clsx("ade-workspace-rail", className);
|
|
49
|
+
$[7] = className;
|
|
50
|
+
$[8] = t2;
|
|
51
|
+
} else {
|
|
52
|
+
t2 = $[8];
|
|
53
|
+
}
|
|
54
|
+
let t3;
|
|
55
|
+
if ($[9] !== props || $[10] !== t1 || $[11] !== t2) {
|
|
56
|
+
t3 = {
|
|
57
|
+
"aria-label": t1,
|
|
58
|
+
...props,
|
|
59
|
+
className: t2
|
|
60
|
+
};
|
|
61
|
+
$[9] = props;
|
|
62
|
+
$[10] = t1;
|
|
63
|
+
$[11] = t2;
|
|
64
|
+
$[12] = t3;
|
|
65
|
+
} else {
|
|
66
|
+
t3 = $[12];
|
|
67
|
+
}
|
|
68
|
+
let t4;
|
|
69
|
+
if ($[13] !== ref || $[14] !== render || $[15] !== t3) {
|
|
70
|
+
t4 = {
|
|
71
|
+
render,
|
|
72
|
+
ref,
|
|
73
|
+
defaultTagName: "nav",
|
|
74
|
+
props: t3
|
|
75
|
+
};
|
|
76
|
+
$[13] = ref;
|
|
77
|
+
$[14] = render;
|
|
78
|
+
$[15] = t3;
|
|
79
|
+
$[16] = t4;
|
|
80
|
+
} else {
|
|
81
|
+
t4 = $[16];
|
|
82
|
+
}
|
|
83
|
+
return useRender(t4);
|
|
84
|
+
}
|
|
85
|
+
export function WorkspaceRailSeparator(t0) {
|
|
86
|
+
const $ = _c(4);
|
|
87
|
+
const {
|
|
88
|
+
className
|
|
89
|
+
} = t0;
|
|
90
|
+
let t1;
|
|
91
|
+
if ($[0] !== className) {
|
|
92
|
+
t1 = clsx("ade-workspace-rail-separator", className);
|
|
93
|
+
$[0] = className;
|
|
94
|
+
$[1] = t1;
|
|
95
|
+
} else {
|
|
96
|
+
t1 = $[1];
|
|
97
|
+
}
|
|
98
|
+
let t2;
|
|
99
|
+
if ($[2] !== t1) {
|
|
100
|
+
t2 = /*#__PURE__*/_jsx("span", {
|
|
101
|
+
"aria-hidden": true,
|
|
102
|
+
className: t1
|
|
103
|
+
});
|
|
104
|
+
$[2] = t1;
|
|
105
|
+
$[3] = t2;
|
|
106
|
+
} else {
|
|
107
|
+
t2 = $[3];
|
|
108
|
+
}
|
|
109
|
+
return t2;
|
|
110
|
+
}
|
|
111
|
+
/** Pushes what follows to the bottom of the rail. */
|
|
112
|
+
export function WorkspaceRailSpacer() {
|
|
113
|
+
const $ = _c(1);
|
|
114
|
+
let t0;
|
|
115
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
116
|
+
t0 = /*#__PURE__*/_jsx("span", {
|
|
117
|
+
"aria-hidden": true,
|
|
118
|
+
className: "ade-workspace-rail-spacer"
|
|
119
|
+
});
|
|
120
|
+
$[0] = t0;
|
|
121
|
+
} else {
|
|
122
|
+
t0 = $[0];
|
|
123
|
+
}
|
|
124
|
+
return t0;
|
|
125
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
+
export interface WorkspaceTopRowProps extends Omit<ComponentProps<'header'>, 'children'> {
|
|
3
|
+
/** Before the project: room for a window's own controls, and a button that brings the sidebar back. */
|
|
4
|
+
leading?: ReactNode;
|
|
5
|
+
/** The project: a switcher, or a strip of project tabs. */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** Leaves out the slot a lone pane's bar goes into, as beside project tabs, which take the row. */
|
|
8
|
+
slotless?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The 47 pixel band at the top of a `Workspace`'s sheet, as its `toolbar`: the project, and beside it the
|
|
12
|
+
* slot where the bar of a lone pane goes (`useTopRowSlot`, `PaneBar`'s `container`). The window drags by
|
|
13
|
+
* every part of it that is not a control.
|
|
14
|
+
*/
|
|
15
|
+
export declare function WorkspaceTopRow({ leading, children, slotless, className, ...props }: WorkspaceTopRowProps): import("react").JSX.Element;
|