@adecore/ui 0.35.5 → 0.36.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.
Files changed (63) hide show
  1. package/dist/Button.d.ts +2 -3
  2. package/dist/Button.js +21 -46
  3. package/dist/Checkbox.js +1 -1
  4. package/dist/ChoiceCards.js +2 -2
  5. package/dist/IconPicker.d.ts +2 -1
  6. package/dist/IconPicker.js +504 -217
  7. package/dist/Input.d.ts +5 -3
  8. package/dist/Input.js +127 -112
  9. package/dist/Segmented.js +1 -1
  10. package/dist/SplitButton.d.ts +17 -0
  11. package/dist/SplitButton.js +237 -0
  12. package/dist/Stepper.js +1 -1
  13. package/dist/Switch.js +1 -1
  14. package/dist/Tile.js +2 -2
  15. package/dist/button-class.d.ts +6 -0
  16. package/dist/button-class.js +92 -0
  17. package/dist/file-tree/empty-lines.d.ts +11 -0
  18. package/dist/file-tree/empty-lines.js +89 -0
  19. package/dist/file-tree/highlight.d.ts +4 -0
  20. package/dist/file-tree/highlight.js +75 -0
  21. package/dist/file-tree/parts.d.ts +9 -1
  22. package/dist/file-tree/parts.js +297 -205
  23. package/dist/file-tree/style.js +13 -0
  24. package/dist/file-tree/use-empty-lines.d.ts +3 -0
  25. package/dist/file-tree/use-empty-lines.js +176 -0
  26. package/dist/file-tree/use-file-tree.js +5 -1
  27. package/dist/file-tree/use-slots.d.ts +16 -2
  28. package/dist/file-tree/use-slots.js +186 -43
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.js +1 -0
  31. package/dist/locales/en.d.ts +1 -0
  32. package/dist/locales/en.js +1 -0
  33. package/dist/locales/nl.d.ts +1 -0
  34. package/dist/locales/nl.js +1 -0
  35. package/dist/select-shared.d.ts +1 -1
  36. package/dist/select-shared.js +1 -1
  37. package/dist/settings/SettingsDialog.js +1 -1
  38. package/dist/theme.css +33 -3
  39. package/package.json +1 -1
  40. package/src/Button.tsx +3 -36
  41. package/src/Checkbox.tsx +1 -1
  42. package/src/ChoiceCards.tsx +2 -2
  43. package/src/IconPicker.tsx +220 -136
  44. package/src/Input.tsx +19 -10
  45. package/src/Segmented.tsx +1 -1
  46. package/src/SplitButton.tsx +72 -0
  47. package/src/Stepper.tsx +6 -1
  48. package/src/Switch.tsx +1 -1
  49. package/src/Tile.tsx +2 -2
  50. package/src/button-class.ts +111 -0
  51. package/src/file-tree/empty-lines.ts +105 -0
  52. package/src/file-tree/highlight.ts +80 -0
  53. package/src/file-tree/parts.tsx +42 -11
  54. package/src/file-tree/style.ts +13 -0
  55. package/src/file-tree/use-empty-lines.ts +115 -0
  56. package/src/file-tree/use-file-tree.ts +2 -1
  57. package/src/file-tree/use-slots.ts +176 -17
  58. package/src/index.ts +1 -0
  59. package/src/locales/en.ts +1 -0
  60. package/src/locales/nl.ts +1 -0
  61. package/src/select-shared.ts +2 -1
  62. package/src/settings/SettingsDialog.tsx +1 -1
  63. package/src/theme.css +33 -3
@@ -1,12 +1,14 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useEffect, useLayoutEffect, useRef, useState } from 'react';
2
+ import { useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
4
  import { useRender } from '@base-ui/react/use-render';
5
5
  import { FileTree as PierreFileTree } from '@pierre/trees/react';
6
6
  import { useTranslation } from 'react-i18next';
7
7
  import clsx from 'clsx';
8
+ import { Icon } from "../Icon.js";
8
9
  import { mergeRefs } from '../merge-refs.js';
9
10
  import { directoryHandle, extendsSelection, followFocus, movesFocus, menuTargetsOf, rowPathOf, visibleRows } from './helpers.js';
11
+ import { useEmptyLines } from './use-empty-lines.js';
10
12
  import { useFileTreeShift } from "./use-file-tree-shift.js";
11
13
  import { useFileTreeSlots } from './use-slots.js';
12
14
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
@@ -14,9 +16,10 @@ function inSlot(event) {
14
16
  return event.composedPath().some(node => node instanceof HTMLElement && node.hasAttribute('data-tree-slot'));
15
17
  }
16
18
  export function FileTreeRoot(t0) {
17
- const $ = _c(79);
19
+ const $ = _c(104);
18
20
  let children;
19
21
  let className;
22
+ let emptyLabel;
20
23
  let label;
21
24
  let model;
22
25
  let onActivate;
@@ -33,7 +36,12 @@ export function FileTreeRoot(t0) {
33
36
  let renderControl;
34
37
  let renderDecoration;
35
38
  let resetKey;
39
+ let rowIcon;
40
+ let style;
36
41
  let t1;
42
+ let t2;
43
+ let t3;
44
+ let t4;
37
45
  let treeProps;
38
46
  if ($[0] !== t0) {
39
47
  ({
@@ -49,6 +57,11 @@ export function FileTreeRoot(t0) {
49
57
  onRowDragStart,
50
58
  renderControl,
51
59
  renderDecoration,
60
+ decorationOrder: t2,
61
+ rowIcon,
62
+ fitContent: t3,
63
+ highlight: t4,
64
+ emptyLabel,
52
65
  treeProps,
53
66
  render,
54
67
  className,
@@ -56,52 +69,68 @@ export function FileTreeRoot(t0) {
56
69
  children,
57
70
  onClick,
58
71
  onKeyDownCapture,
72
+ style,
59
73
  ...props
60
74
  } = t0);
61
75
  $[0] = t0;
62
76
  $[1] = children;
63
77
  $[2] = className;
64
- $[3] = label;
65
- $[4] = model;
66
- $[5] = onActivate;
67
- $[6] = onClick;
68
- $[7] = onExpandedPathsChange;
69
- $[8] = onFocusMove;
70
- $[9] = onKeyDownCapture;
71
- $[10] = onLoadChildren;
72
- $[11] = onRowContextMenu;
73
- $[12] = onRowDragStart;
74
- $[13] = props;
75
- $[14] = ref;
76
- $[15] = render;
77
- $[16] = renderControl;
78
- $[17] = renderDecoration;
79
- $[18] = resetKey;
80
- $[19] = t1;
81
- $[20] = treeProps;
78
+ $[3] = emptyLabel;
79
+ $[4] = label;
80
+ $[5] = model;
81
+ $[6] = onActivate;
82
+ $[7] = onClick;
83
+ $[8] = onExpandedPathsChange;
84
+ $[9] = onFocusMove;
85
+ $[10] = onKeyDownCapture;
86
+ $[11] = onLoadChildren;
87
+ $[12] = onRowContextMenu;
88
+ $[13] = onRowDragStart;
89
+ $[14] = props;
90
+ $[15] = ref;
91
+ $[16] = render;
92
+ $[17] = renderControl;
93
+ $[18] = renderDecoration;
94
+ $[19] = resetKey;
95
+ $[20] = rowIcon;
96
+ $[21] = style;
97
+ $[22] = t1;
98
+ $[23] = t2;
99
+ $[24] = t3;
100
+ $[25] = t4;
101
+ $[26] = treeProps;
82
102
  } else {
83
103
  children = $[1];
84
104
  className = $[2];
85
- label = $[3];
86
- model = $[4];
87
- onActivate = $[5];
88
- onClick = $[6];
89
- onExpandedPathsChange = $[7];
90
- onFocusMove = $[8];
91
- onKeyDownCapture = $[9];
92
- onLoadChildren = $[10];
93
- onRowContextMenu = $[11];
94
- onRowDragStart = $[12];
95
- props = $[13];
96
- ref = $[14];
97
- render = $[15];
98
- renderControl = $[16];
99
- renderDecoration = $[17];
100
- resetKey = $[18];
101
- t1 = $[19];
102
- treeProps = $[20];
105
+ emptyLabel = $[3];
106
+ label = $[4];
107
+ model = $[5];
108
+ onActivate = $[6];
109
+ onClick = $[7];
110
+ onExpandedPathsChange = $[8];
111
+ onFocusMove = $[9];
112
+ onKeyDownCapture = $[10];
113
+ onLoadChildren = $[11];
114
+ onRowContextMenu = $[12];
115
+ onRowDragStart = $[13];
116
+ props = $[14];
117
+ ref = $[15];
118
+ render = $[16];
119
+ renderControl = $[17];
120
+ renderDecoration = $[18];
121
+ resetKey = $[19];
122
+ rowIcon = $[20];
123
+ style = $[21];
124
+ t1 = $[22];
125
+ t2 = $[23];
126
+ t3 = $[24];
127
+ t4 = $[25];
128
+ treeProps = $[26];
103
129
  }
104
130
  const selectionFollowsFocus = t1 === undefined ? true : t1;
131
+ const decorationOrder = t2 === undefined ? "before-status" : t2;
132
+ const fitContent = t3 === undefined ? false : t3;
133
+ const highlight = t4 === undefined ? "" : t4;
105
134
  const {
106
135
  t
107
136
  } = useTranslation("ui");
@@ -110,83 +139,120 @@ export function FileTreeRoot(t0) {
110
139
  attach,
111
140
  bar
112
141
  } = useFileTreeShift(model, resetKey);
113
- let t2;
114
- if ($[21] !== attach || $[22] !== ref) {
115
- t2 = node => {
142
+ let t5;
143
+ if ($[27] !== attach || $[28] !== ref) {
144
+ t5 = node => {
116
145
  setFrame(node);
117
146
  attach(node);
118
147
  mergeRefs(ref)(node);
119
148
  };
120
- $[21] = attach;
121
- $[22] = ref;
122
- $[23] = t2;
149
+ $[27] = attach;
150
+ $[28] = ref;
151
+ $[29] = t5;
123
152
  } else {
124
- t2 = $[23];
153
+ t5 = $[29];
125
154
  }
126
- const frameRef = t2;
127
- let t3;
128
- if ($[24] !== label || $[25] !== t) {
129
- t3 = label ?? t("tree.label");
130
- $[24] = label;
131
- $[25] = t;
132
- $[26] = t3;
155
+ const frameRef = t5;
156
+ let t6;
157
+ if ($[30] !== fitContent || $[31] !== model) {
158
+ t6 = listener => fitContent ? model.subscribe(listener) : _temp;
159
+ $[30] = fitContent;
160
+ $[31] = model;
161
+ $[32] = t6;
133
162
  } else {
134
- t3 = $[26];
163
+ t6 = $[32];
135
164
  }
136
- const slots = useFileTreeSlots(model, frame, t3);
137
- let t4;
138
- if ($[27] !== onExpandedPathsChange || $[28] !== onLoadChildren) {
139
- t4 = {
165
+ const subscribeToRows = t6;
166
+ let t7;
167
+ if ($[33] !== model) {
168
+ t7 = () => model.getVisibleCount();
169
+ $[33] = model;
170
+ $[34] = t7;
171
+ } else {
172
+ t7 = $[34];
173
+ }
174
+ const countRows = t7;
175
+ const rowCount = useSyncExternalStore(subscribeToRows, countRows, countRows);
176
+ let t8;
177
+ if ($[35] !== label || $[36] !== t) {
178
+ t8 = label ?? t("tree.label");
179
+ $[35] = label;
180
+ $[36] = t;
181
+ $[37] = t8;
182
+ } else {
183
+ t8 = $[37];
184
+ }
185
+ let t9;
186
+ if ($[38] !== decorationOrder || $[39] !== emptyLabel || $[40] !== highlight || $[41] !== rowIcon) {
187
+ t9 = {
188
+ order: decorationOrder,
189
+ rowIcon,
190
+ highlight,
191
+ emptyLabel
192
+ };
193
+ $[38] = decorationOrder;
194
+ $[39] = emptyLabel;
195
+ $[40] = highlight;
196
+ $[41] = rowIcon;
197
+ $[42] = t9;
198
+ } else {
199
+ t9 = $[42];
200
+ }
201
+ const slots = useFileTreeSlots(model, frame, t8, t9);
202
+ const passEmptyLine = useEmptyLines(model, frame, emptyLabel);
203
+ let t10;
204
+ if ($[43] !== onExpandedPathsChange || $[44] !== onLoadChildren) {
205
+ t10 = {
140
206
  onLoadChildren,
141
207
  onExpandedPathsChange
142
208
  };
143
- $[27] = onExpandedPathsChange;
144
- $[28] = onLoadChildren;
145
- $[29] = t4;
209
+ $[43] = onExpandedPathsChange;
210
+ $[44] = onLoadChildren;
211
+ $[45] = t10;
146
212
  } else {
147
- t4 = $[29];
213
+ t10 = $[45];
148
214
  }
149
- const latestLoads = useRef(t4);
150
- let t5;
151
- let t6;
152
- if ($[30] !== onExpandedPathsChange || $[31] !== onLoadChildren) {
153
- t5 = () => {
215
+ const latestLoads = useRef(t10);
216
+ let t11;
217
+ let t12;
218
+ if ($[46] !== onExpandedPathsChange || $[47] !== onLoadChildren) {
219
+ t11 = () => {
154
220
  latestLoads.current = {
155
221
  onLoadChildren,
156
222
  onExpandedPathsChange
157
223
  };
158
224
  };
159
- t6 = [onLoadChildren, onExpandedPathsChange];
160
- $[30] = onExpandedPathsChange;
161
- $[31] = onLoadChildren;
162
- $[32] = t5;
163
- $[33] = t6;
225
+ t12 = [onLoadChildren, onExpandedPathsChange];
226
+ $[46] = onExpandedPathsChange;
227
+ $[47] = onLoadChildren;
228
+ $[48] = t11;
229
+ $[49] = t12;
164
230
  } else {
165
- t5 = $[32];
166
- t6 = $[33];
231
+ t11 = $[48];
232
+ t12 = $[49];
167
233
  }
168
- useLayoutEffect(t5, t6);
234
+ useLayoutEffect(t11, t12);
169
235
  const cancelFocus = useRef(undefined);
170
- let t7;
171
- if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
172
- t7 = () => () => cancelFocus.current?.();
173
- $[34] = t7;
236
+ let t13;
237
+ if ($[50] === Symbol.for("react.memo_cache_sentinel")) {
238
+ t13 = () => () => cancelFocus.current?.();
239
+ $[50] = t13;
174
240
  } else {
175
- t7 = $[34];
241
+ t13 = $[50];
176
242
  }
177
- let t8;
178
- if ($[35] !== model) {
179
- t8 = [model];
180
- $[35] = model;
181
- $[36] = t8;
243
+ let t14;
244
+ if ($[51] !== model) {
245
+ t14 = [model];
246
+ $[51] = model;
247
+ $[52] = t14;
182
248
  } else {
183
- t8 = $[36];
249
+ t14 = $[52];
184
250
  }
185
- useEffect(t7, t8);
186
- let t10;
187
- let t9;
188
- if ($[37] !== model) {
189
- t9 = () => {
251
+ useEffect(t13, t14);
252
+ let t15;
253
+ let t16;
254
+ if ($[53] !== model) {
255
+ t15 = () => {
190
256
  let previous = new Set();
191
257
  let disposed = false;
192
258
  let pending = false;
@@ -195,8 +261,8 @@ export function FileTreeRoot(t0) {
195
261
  if (disposed) {
196
262
  return;
197
263
  }
198
- const rows = visibleRows(model).filter(_temp);
199
- const known = new Set(rows.map(_temp2));
264
+ const rows = visibleRows(model).filter(_temp2);
265
+ const known = new Set(rows.map(_temp3));
200
266
  const expanded = new Set([...previous].filter(path => !known.has(path)));
201
267
  for (const row_1 of rows) {
202
268
  if (row_1.isExpanded) {
@@ -226,19 +292,19 @@ export function FileTreeRoot(t0) {
226
292
  unsubscribe();
227
293
  };
228
294
  };
229
- t10 = [model];
230
- $[37] = model;
231
- $[38] = t10;
232
- $[39] = t9;
295
+ t16 = [model];
296
+ $[53] = model;
297
+ $[54] = t15;
298
+ $[55] = t16;
233
299
  } else {
234
- t10 = $[38];
235
- t9 = $[39];
300
+ t15 = $[54];
301
+ t16 = $[55];
236
302
  }
237
- useEffect(t9, t10);
238
- let t11;
239
- let t12;
240
- if ($[40] !== frame || $[41] !== model || $[42] !== onActivate || $[43] !== onFocusMove || $[44] !== onRowContextMenu || $[45] !== onRowDragStart || $[46] !== selectionFollowsFocus) {
241
- t11 = () => {
303
+ useEffect(t15, t16);
304
+ let t17;
305
+ let t18;
306
+ if ($[56] !== frame || $[57] !== model || $[58] !== onActivate || $[59] !== onFocusMove || $[60] !== onRowContextMenu || $[61] !== onRowDragStart || $[62] !== passEmptyLine || $[63] !== selectionFollowsFocus) {
307
+ t17 = () => {
242
308
  if (frame === null) {
243
309
  return;
244
310
  }
@@ -260,20 +326,20 @@ export function FileTreeRoot(t0) {
260
326
  if (movesFocus(event_0) && selectionFollowsFocus) {
261
327
  cancelFocus.current?.();
262
328
  cancelFocus.current = followFocus(model, onFocusMove);
263
- } else {
264
- if (event_0.key === "Enter" && !event_0.altKey && !event_0.metaKey && !event_0.ctrlKey) {
265
- const path_4 = model.getFocusedPath();
266
- if (path_4 === null) {
267
- return;
268
- }
269
- event_0.preventDefault();
270
- event_0.stopPropagation();
271
- const directory = directoryHandle(model, path_4);
272
- if (directory) {
273
- directory.toggle();
274
- } else {
275
- onActivate?.(path_4);
276
- }
329
+ }
330
+ passEmptyLine(event_0);
331
+ if (event_0.key === "Enter" && !event_0.altKey && !event_0.metaKey && !event_0.ctrlKey) {
332
+ const path_4 = model.getFocusedPath();
333
+ if (path_4 === null) {
334
+ return;
335
+ }
336
+ event_0.preventDefault();
337
+ event_0.stopPropagation();
338
+ const directory = directoryHandle(model, path_4);
339
+ if (directory) {
340
+ directory.toggle();
341
+ } else {
342
+ onActivate?.(path_4);
277
343
  }
278
344
  }
279
345
  };
@@ -301,134 +367,160 @@ export function FileTreeRoot(t0) {
301
367
  frame.removeEventListener("dragstart", onDrag);
302
368
  };
303
369
  };
304
- t12 = [frame, model, selectionFollowsFocus, onActivate, onFocusMove, onRowContextMenu, onRowDragStart];
305
- $[40] = frame;
306
- $[41] = model;
307
- $[42] = onActivate;
308
- $[43] = onFocusMove;
309
- $[44] = onRowContextMenu;
310
- $[45] = onRowDragStart;
311
- $[46] = selectionFollowsFocus;
312
- $[47] = t11;
313
- $[48] = t12;
370
+ t18 = [frame, model, selectionFollowsFocus, passEmptyLine, onActivate, onFocusMove, onRowContextMenu, onRowDragStart];
371
+ $[56] = frame;
372
+ $[57] = model;
373
+ $[58] = onActivate;
374
+ $[59] = onFocusMove;
375
+ $[60] = onRowContextMenu;
376
+ $[61] = onRowDragStart;
377
+ $[62] = passEmptyLine;
378
+ $[63] = selectionFollowsFocus;
379
+ $[64] = t17;
380
+ $[65] = t18;
314
381
  } else {
315
- t11 = $[47];
316
- t12 = $[48];
382
+ t17 = $[64];
383
+ t18 = $[65];
317
384
  }
318
- useEffect(t11, t12);
319
- let t13;
320
- if ($[49] !== className) {
321
- t13 = clsx("adecore-tree adecore-file-tree", className);
322
- $[49] = className;
323
- $[50] = t13;
385
+ useEffect(t17, t18);
386
+ let t19;
387
+ if ($[66] !== className) {
388
+ t19 = clsx("adecore-tree adecore-file-tree", className);
389
+ $[66] = className;
390
+ $[67] = t19;
324
391
  } else {
325
- t13 = $[50];
392
+ t19 = $[67];
326
393
  }
327
- const t14 = treeProps?.className;
328
- let t15;
329
- if ($[51] !== t14) {
330
- t15 = clsx("adecore-file-tree-host", t14);
331
- $[51] = t14;
332
- $[52] = t15;
394
+ let t20;
395
+ if ($[68] !== fitContent || $[69] !== model || $[70] !== rowCount || $[71] !== style) {
396
+ t20 = fitContent ? {
397
+ ...style,
398
+ height: rowCount * model.getItemHeight(),
399
+ maxHeight: "100%"
400
+ } : style;
401
+ $[68] = fitContent;
402
+ $[69] = model;
403
+ $[70] = rowCount;
404
+ $[71] = style;
405
+ $[72] = t20;
333
406
  } else {
334
- t15 = $[52];
407
+ t20 = $[72];
335
408
  }
336
- let t16;
337
- if ($[53] !== model || $[54] !== t15 || $[55] !== treeProps) {
338
- t16 = /*#__PURE__*/_jsx(PierreFileTree, {
409
+ const t21 = treeProps?.className;
410
+ let t22;
411
+ if ($[73] !== t21) {
412
+ t22 = clsx("adecore-file-tree-host", t21);
413
+ $[73] = t21;
414
+ $[74] = t22;
415
+ } else {
416
+ t22 = $[74];
417
+ }
418
+ let t23;
419
+ if ($[75] !== model || $[76] !== t22 || $[77] !== treeProps) {
420
+ t23 = /*#__PURE__*/_jsx(PierreFileTree, {
339
421
  ...treeProps,
340
422
  model: model,
341
- className: t15
423
+ className: t22
342
424
  });
343
- $[53] = model;
344
- $[54] = t15;
345
- $[55] = treeProps;
346
- $[56] = t16;
425
+ $[75] = model;
426
+ $[76] = t22;
427
+ $[77] = treeProps;
428
+ $[78] = t23;
347
429
  } else {
348
- t16 = $[56];
430
+ t23 = $[78];
349
431
  }
350
- let t17;
351
- if ($[57] !== renderControl || $[58] !== renderDecoration || $[59] !== slots) {
352
- let t18;
353
- if ($[61] !== renderControl || $[62] !== renderDecoration) {
354
- t18 = t19 => {
432
+ let t24;
433
+ if ($[79] !== renderControl || $[80] !== renderDecoration || $[81] !== rowIcon || $[82] !== slots) {
434
+ let t25;
435
+ if ($[84] !== renderControl || $[85] !== renderDecoration || $[86] !== rowIcon) {
436
+ t25 = t26 => {
355
437
  const {
356
438
  row: row_2,
357
439
  control,
358
- decoration
359
- } = t19;
440
+ decoration,
441
+ icon
442
+ } = t26;
443
+ const ownIcon = icon === null ? undefined : rowIcon?.(row_2);
360
444
  return /*#__PURE__*/_jsxs("span", {
361
445
  style: {
362
446
  display: "contents"
363
447
  },
364
- children: [createPortal(renderControl?.(row_2), control), createPortal(renderDecoration?.(row_2), decoration)]
448
+ children: [createPortal(renderControl?.(row_2), control), createPortal(renderDecoration?.(row_2), decoration), icon !== null && ownIcon !== undefined && createPortal(/*#__PURE__*/_jsx(Icon, {
449
+ icon: ownIcon,
450
+ size: 14
451
+ }), icon)]
365
452
  }, control.slot);
366
453
  };
367
- $[61] = renderControl;
368
- $[62] = renderDecoration;
369
- $[63] = t18;
454
+ $[84] = renderControl;
455
+ $[85] = renderDecoration;
456
+ $[86] = rowIcon;
457
+ $[87] = t25;
370
458
  } else {
371
- t18 = $[63];
459
+ t25 = $[87];
372
460
  }
373
- t17 = slots.map(t18);
374
- $[57] = renderControl;
375
- $[58] = renderDecoration;
376
- $[59] = slots;
377
- $[60] = t17;
461
+ t24 = slots.map(t25);
462
+ $[79] = renderControl;
463
+ $[80] = renderDecoration;
464
+ $[81] = rowIcon;
465
+ $[82] = slots;
466
+ $[83] = t24;
378
467
  } else {
379
- t17 = $[60];
468
+ t24 = $[83];
380
469
  }
381
- let t18;
382
- if ($[64] !== bar || $[65] !== children || $[66] !== t16 || $[67] !== t17) {
383
- t18 = /*#__PURE__*/_jsxs(_Fragment, {
384
- children: [t16, t17, children, bar]
470
+ let t25;
471
+ if ($[88] !== bar || $[89] !== children || $[90] !== t23 || $[91] !== t24) {
472
+ t25 = /*#__PURE__*/_jsxs(_Fragment, {
473
+ children: [t23, t24, children, bar]
385
474
  });
386
- $[64] = bar;
387
- $[65] = children;
388
- $[66] = t16;
389
- $[67] = t17;
390
- $[68] = t18;
475
+ $[88] = bar;
476
+ $[89] = children;
477
+ $[90] = t23;
478
+ $[91] = t24;
479
+ $[92] = t25;
391
480
  } else {
392
- t18 = $[68];
481
+ t25 = $[92];
393
482
  }
394
- let t19;
395
- if ($[69] !== onClick || $[70] !== onKeyDownCapture || $[71] !== props || $[72] !== t13 || $[73] !== t18) {
396
- t19 = {
483
+ let t26;
484
+ if ($[93] !== onClick || $[94] !== onKeyDownCapture || $[95] !== props || $[96] !== t19 || $[97] !== t20 || $[98] !== t25) {
485
+ t26 = {
397
486
  ...props,
398
- className: t13,
487
+ className: t19,
488
+ style: t20,
399
489
  onClick,
400
490
  onKeyDownCapture,
401
- children: t18
491
+ children: t25
402
492
  };
403
- $[69] = onClick;
404
- $[70] = onKeyDownCapture;
405
- $[71] = props;
406
- $[72] = t13;
407
- $[73] = t18;
408
- $[74] = t19;
493
+ $[93] = onClick;
494
+ $[94] = onKeyDownCapture;
495
+ $[95] = props;
496
+ $[96] = t19;
497
+ $[97] = t20;
498
+ $[98] = t25;
499
+ $[99] = t26;
409
500
  } else {
410
- t19 = $[74];
501
+ t26 = $[99];
411
502
  }
412
- let t20;
413
- if ($[75] !== frameRef || $[76] !== render || $[77] !== t19) {
414
- t20 = {
503
+ let t27;
504
+ if ($[100] !== frameRef || $[101] !== render || $[102] !== t26) {
505
+ t27 = {
415
506
  render,
416
507
  ref: frameRef,
417
508
  defaultTagName: "div",
418
- props: t19
509
+ props: t26
419
510
  };
420
- $[75] = frameRef;
421
- $[76] = render;
422
- $[77] = t19;
423
- $[78] = t20;
511
+ $[100] = frameRef;
512
+ $[101] = render;
513
+ $[102] = t26;
514
+ $[103] = t27;
424
515
  } else {
425
- t20 = $[78];
516
+ t27 = $[103];
426
517
  }
427
- return useRender(t20);
518
+ return useRender(t27);
428
519
  }
429
- function _temp2(row_0) {
520
+ function _temp3(row_0) {
430
521
  return row_0.path;
431
522
  }
432
- function _temp(row) {
523
+ function _temp2(row) {
433
524
  return row.kind === "directory";
434
- }
525
+ }
526
+ function _temp() {}
@@ -1,4 +1,5 @@
1
1
  import { treeRowStyle } from '../tree/style.js';
2
+ import { MATCH_HIGHLIGHT } from './highlight.js';
2
3
  // beta.6 splits the extension into nested grids; flatten them to truncate the end of the entire name.
3
4
  export const FILE_TREE_CSS = `
4
5
  ${treeRowStyle('[data-type="item"]', 'data-item-selected')}
@@ -19,6 +20,18 @@ export const FILE_TREE_CSS = `
19
20
  [data-item-section="content"] :where([data-truncate-group-container], [data-truncate-group-container] div, [data-truncate-container], [data-truncate-container] div) { display: inline; }
20
21
  [data-item-section="content"] [data-truncate-content] { direction: ltr; }
21
22
  [data-item-section="content"] :where([data-truncate-content="overflow"], [data-truncate-marker-cell], [data-truncate-fill]) { display: none; }
23
+ [data-item-section="git"] { margin-inline-end: var(--adecore-tree-status-space, 0px); }
24
+ ::highlight(${MATCH_HIGHLIGHT}) { background-color: var(--match); color: inherit; }
22
25
  [data-tree-port] { position: absolute; z-index: 4; display: flex; align-items: center; height: 25px; pointer-events: none; }
23
26
  [data-tree-port] > slot { pointer-events: auto; }
27
+ [data-tree-port="icon"] { width: 16px; justify-content: center; }
28
+ [data-tree-port="icon"] > slot { pointer-events: none; }
29
+ [data-own-icon="true"] [data-item-section="icon"] > * { visibility: hidden; }
30
+ [data-own-icon="true"][data-item-type="folder"]:hover [data-item-section="icon"] > * { visibility: visible; }
31
+ [data-tree-port="icon"][data-hover="true"] { visibility: hidden; }
32
+ [data-empty-line="true"] { cursor: default; }
33
+ [data-empty-line="true"] :is([data-item-section="icon"], [data-item-section="git"]) { display: none; }
34
+ [data-empty-line="true"] [data-item-section="content"] { overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); }
35
+ [data-empty-line="true"] [data-item-section="content"] > * { display: none; }
36
+ [data-empty-line="true"] [data-item-section="content"]::before { content: attr(data-empty-label); }
24
37
  `;