@floegence/floe-webapp-core 0.86.58 → 0.86.62

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 (103) hide show
  1. package/dist/components/chat/blocks/BlockRenderer.js +1 -1
  2. package/dist/components/chat/blocks/CodeDiffBlock.js +56 -56
  3. package/dist/components/chat/blocks/ImageBlock.js +1 -1
  4. package/dist/components/chat/blocks/ToolCallBlock.js +57 -57
  5. package/dist/components/chat/status/ConnectionStatus.js +10 -10
  6. package/dist/components/deck/DeckCell.js +25 -25
  7. package/dist/components/deck/DeckContextMenu.js +20 -20
  8. package/dist/components/deck/DeckGrid.js +1 -1
  9. package/dist/components/deck/DeckTopBar.js +42 -42
  10. package/dist/components/deck/DropZonePreview.js +6 -6
  11. package/dist/components/deck/LayoutSelector.js +53 -53
  12. package/dist/components/deck/WidgetFrame.js +28 -28
  13. package/dist/components/deck/WidgetPalette.js +31 -31
  14. package/dist/components/deck/WidgetTypeSwitcher.js +31 -31
  15. package/dist/components/file-browser/Breadcrumb.js +27 -27
  16. package/dist/components/file-browser/DirectoryTree.js +15 -15
  17. package/dist/components/file-browser/DragPreview.js +58 -58
  18. package/dist/components/file-browser/FileBrowser.js +17 -17
  19. package/dist/components/file-browser/FileBrowserStatusBar.js +18 -18
  20. package/dist/components/file-browser/FileBrowserToolbar.js +27 -27
  21. package/dist/components/file-browser/FileContextMenu.js +47 -47
  22. package/dist/components/file-browser/FileGridView.js +53 -51
  23. package/dist/components/file-browser/FileItemDecorations.js +30 -27
  24. package/dist/components/file-browser/FileListView.js +114 -114
  25. package/dist/components/icons/index.js +1357 -1357
  26. package/dist/components/launchpad/Launchpad.js +14 -14
  27. package/dist/components/launchpad/LaunchpadGrid.js +7 -7
  28. package/dist/components/launchpad/LaunchpadItem.js +11 -11
  29. package/dist/components/launchpad/LaunchpadPagination.js +16 -16
  30. package/dist/components/launchpad/LaunchpadSearch.js +9 -9
  31. package/dist/components/layout/ActivityBar.js +52 -55
  32. package/dist/components/layout/BottomBar.js +17 -17
  33. package/dist/components/layout/MobileNavigationPanel.js +36 -36
  34. package/dist/components/layout/MobileTabBar.js +39 -39
  35. package/dist/components/layout/Panel.js +16 -16
  36. package/dist/components/layout/ResizeHandle.js +19 -19
  37. package/dist/components/layout/Shell.js +50 -50
  38. package/dist/components/layout/Sidebar.js +37 -36
  39. package/dist/components/layout/SidebarPane.js +19 -19
  40. package/dist/components/layout/TopBar.js +16 -16
  41. package/dist/components/layout/TopBarIconButton.js +15 -15
  42. package/dist/components/loading/LoadingOverlay.js +9 -9
  43. package/dist/components/loading/Skeleton.js +11 -11
  44. package/dist/components/ui/Button.js +36 -36
  45. package/dist/components/ui/Card.d.ts +11 -62
  46. package/dist/components/ui/Card.js +64 -237
  47. package/dist/components/ui/Checkbox.js +79 -79
  48. package/dist/components/ui/CommandPalette.js +56 -55
  49. package/dist/components/ui/Dialog.js +91 -93
  50. package/dist/components/ui/DirectoryInput.js +22 -22
  51. package/dist/components/ui/DirectoryPicker.js +8 -8
  52. package/dist/components/ui/Dropdown.js +89 -87
  53. package/dist/components/ui/FeedbackIndicator.js +57 -57
  54. package/dist/components/ui/FileOpenPicker.js +37 -37
  55. package/dist/components/ui/FileSavePicker.js +41 -41
  56. package/dist/components/ui/FloatingWindow.js +266 -261
  57. package/dist/components/ui/Form.js +76 -76
  58. package/dist/components/ui/HighlightBlock.js +14 -14
  59. package/dist/components/ui/Input.js +106 -109
  60. package/dist/components/ui/Pagination.js +86 -86
  61. package/dist/components/ui/Popover.d.ts +33 -0
  62. package/dist/components/ui/Popover.js +133 -0
  63. package/dist/components/ui/ProcessingIndicator.js +344 -345
  64. package/dist/components/ui/Progress.js +94 -97
  65. package/dist/components/ui/QuoteBlock.js +25 -25
  66. package/dist/components/ui/Radio.js +91 -91
  67. package/dist/components/ui/SegmentedControl.js +24 -24
  68. package/dist/components/ui/Stepper.js +68 -60
  69. package/dist/components/ui/Switch.js +25 -25
  70. package/dist/components/ui/Tabs.js +99 -87
  71. package/dist/components/ui/Tag.js +12 -9
  72. package/dist/components/ui/Tooltip.js +30 -30
  73. package/dist/components/ui/floatingPresence.d.ts +7 -0
  74. package/dist/components/ui/floatingPresence.js +80 -39
  75. package/dist/components/ui/index.d.ts +2 -1
  76. package/dist/components/ui/picker/DirectoryFavorites.js +27 -27
  77. package/dist/components/ui/picker/PickerBase.js +107 -107
  78. package/dist/context/NotificationContext.js +4 -4
  79. package/dist/context/ThemeContext.js +71 -70
  80. package/dist/floe.css +205 -43
  81. package/dist/full.js +650 -652
  82. package/dist/language.css +320 -0
  83. package/dist/primitives.css +23 -17
  84. package/dist/standalone.css +1 -0
  85. package/dist/styles/themes/classicSemanticTokens.d.ts +122 -122
  86. package/dist/styles/themes/classicSemanticTokens.js +140 -138
  87. package/dist/styles/themes/index.d.ts +3 -1
  88. package/dist/styles/themes/index.js +10 -10
  89. package/dist/styles/themes/presets.d.ts +2 -2
  90. package/dist/styles/themes/presets.js +34 -34
  91. package/dist/styles/tokens.d.ts +152 -68
  92. package/dist/styles/tokens.js +87 -49
  93. package/dist/styles.css +1 -1
  94. package/dist/surface.css +161 -116
  95. package/dist/themes/dark.css +64 -64
  96. package/dist/themes/light.css +64 -64
  97. package/dist/ui.css +171 -255
  98. package/dist/ui.js +176 -178
  99. package/dist/utils/hotInteraction.d.ts +7 -0
  100. package/dist/utils/hotInteraction.js +12 -12
  101. package/dist/widgets/TerminalWidget.js +28 -28
  102. package/dist/workbench-composition.css +15 -15
  103. package/package.json +1 -1
@@ -1,30 +1,30 @@
1
- import { insert as c, createComponent as u, effect as I, setAttribute as g, setStyleProperty as w, spread as D, mergeProps as G, memo as J, className as Y, template as y, use as Z, delegateEvents as ee } from "solid-js/web";
1
+ import { insert as c, createComponent as d, effect as I, setAttribute as b, setStyleProperty as w, spread as D, mergeProps as G, memo as J, className as Y, template as y, use as Z, delegateEvents as ee } from "solid-js/web";
2
2
  import { createUniqueId as te, createSignal as p, createMemo as re, createEffect as N, untrack as ne, Show as $, For as oe, onCleanup as ie } from "solid-js";
3
- import { AlertTriangle as se, Info as ae, X as le } from "../icons/index.js";
3
+ import { AlertTriangle as ae, Info as se, X as le } from "../icons/index.js";
4
4
  import { useOverlayMask as ce } from "../../hooks/useOverlayMask.js";
5
- import { useMediaQuery as de } from "../../hooks/useMediaQuery.js";
6
- import { cn as ue } from "../../utils/cn.js";
5
+ import { useMediaQuery as ue } from "../../hooks/useMediaQuery.js";
6
+ import { cn as de } from "../../utils/cn.js";
7
7
  import { SurfaceFloatingLayer as fe } from "./SurfaceFloatingLayer.js";
8
- import { calculateMenuPosition as me } from "./menuUtils.js";
9
- import { WORKBENCH_TEXT_SELECTION_SURFACE_ATTR as ve, CANVAS_WHEEL_INTERACTIVE_ATTR as he } from "./localInteractionSurface.js";
10
- import { resolveSurfacePortalHost as be, resolveSurfacePortalBoundaryRect as ge, resolveSurfacePortalScale as we } from "./dialogSurfaceScope.js";
11
- var ye = /* @__PURE__ */ y('<div class="flex shrink-0 items-center justify-between gap-2 border-b border-border px-3 py-2"><span class="min-w-0 truncate text-xs font-medium"></span><button type=button class="flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md hover:bg-accent">'), xe = /* @__PURE__ */ y("<div data-floe-status-details>"), Ee = /* @__PURE__ */ y('<span data-floe-status-indicator><button type=button class="inline-flex h-full w-full cursor-pointer items-center justify-center rounded-md hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"aria-haspopup=dialog></button><span class=sr-only role=alert aria-atomic=true></span><span class=sr-only role=status aria-atomic=true>'), pe = /* @__PURE__ */ y("<div>"), Se = /* @__PURE__ */ y('<div class="flex flex-wrap items-center gap-2">'), Ce = /* @__PURE__ */ y('<section class="space-y-2 border-b border-border pb-3 mb-3 last:border-0 last:pb-0 last:mb-0"><p class=font-medium>');
8
+ import { calculateMenuPosition as ve } from "./menuUtils.js";
9
+ import { WORKBENCH_TEXT_SELECTION_SURFACE_ATTR as me, CANVAS_WHEEL_INTERACTIVE_ATTR as he } from "./localInteractionSurface.js";
10
+ import { resolveSurfacePortalHost as ge, resolveSurfacePortalBoundaryRect as be, resolveSurfacePortalScale as we } from "./dialogSurfaceScope.js";
11
+ var ye = /* @__PURE__ */ y('<div class="flex shrink-0 items-center justify-between gap-2 border-b border-[var(--floe-line)] px-3 py-2"><span class="min-w-0 truncate text-xs font-medium"></span><button type=button class="flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-sm hover:bg-[var(--floe-state-hover)]">'), xe = /* @__PURE__ */ y("<div data-floe-status-details>"), Ee = /* @__PURE__ */ y('<span data-floe-status-indicator><button type=button class="inline-flex h-full w-full cursor-pointer items-center justify-center rounded-sm hover:bg-[var(--floe-state-hover)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"aria-haspopup=dialog></button><span class=sr-only role=alert aria-atomic=true></span><span class=sr-only role=status aria-atomic=true>'), pe = /* @__PURE__ */ y("<div>"), Se = /* @__PURE__ */ y('<div class="flex flex-wrap items-center gap-2">'), Ce = /* @__PURE__ */ y('<section class="space-y-2 border-b border-[var(--floe-line)] pb-3 mb-3 last:border-0 last:pb-0 last:mb-0"><p class=font-medium>');
12
12
  function Be(i) {
13
- const A = te(), H = de("(pointer: coarse)"), S = () => H() ? "2.75rem" : i.size === "md" ? "2rem" : "1.75rem", [m, T] = p(!1), [C, q] = p(), [K, U] = p({
13
+ const A = te(), H = ue("(pointer: coarse)"), S = () => H() ? "2.75rem" : i.size === "md" ? "2rem" : "1.75rem", [v, T] = p(!1), [C, q] = p(), [K, U] = p({
14
14
  x: 0,
15
15
  y: 0
16
16
  }), [M, V] = p({
17
17
  width: 360,
18
18
  height: 384
19
19
  }), [W, P] = p(!1);
20
- let v, h = !1;
21
- const f = () => i.entries.length > 0, _ = re(() => i.entries.some((t) => t.severity === "error") ? "error" : i.entries.some((t) => t.severity === "warning") ? "warning" : "info"), R = (t) => i.entries.filter((r) => r.severity === "error" === t).map((r) => r.summary).join(". "), X = () => (f() ? v : i.restoreFocus())?.focus({
20
+ let m, h = !1;
21
+ const f = () => i.entries.length > 0, _ = re(() => i.entries.some((t) => t.severity === "error") ? "error" : i.entries.some((t) => t.severity === "warning") ? "warning" : "info"), R = (t) => i.entries.filter((r) => r.severity === "error" === t).map((r) => r.summary).join(". "), X = () => (f() ? m : i.restoreFocus())?.focus({
22
22
  preventScroll: !0
23
23
  }), k = (t) => {
24
24
  T(!1), h = !1, t && X();
25
- }, x = (t) => t instanceof Node && !!(v?.contains(t) || C()?.contains(t));
25
+ }, x = (t) => t instanceof Node && !!(m?.contains(t) || C()?.contains(t));
26
26
  return ce({
27
- open: m,
27
+ open: v,
28
28
  root: C,
29
29
  containsTarget: x,
30
30
  onClose: () => k(!0),
@@ -37,8 +37,8 @@ function Be(i) {
37
37
  blockHotkeys: !1
38
38
  }), N(() => {
39
39
  if (f()) {
40
- m() && queueMicrotask(() => ne(() => {
41
- m() && h && document.activeElement === document.body && C()?.focus({
40
+ v() && queueMicrotask(() => ne(() => {
41
+ v() && h && document.activeElement === document.body && C()?.focus({
42
42
  preventScroll: !0
43
43
  });
44
44
  }));
@@ -50,44 +50,44 @@ function Be(i) {
50
50
  });
51
51
  }), N(() => {
52
52
  const t = C();
53
- if (!m() || !t || !v) return;
54
- const r = v;
55
- let b = 0, F = !0;
53
+ if (!v() || !t || !m) return;
54
+ const r = m;
55
+ let g = 0, F = !0;
56
56
  const L = () => {
57
- if (b = 0, !r.isConnected) {
57
+ if (g = 0, !r.isConnected) {
58
58
  k(!1);
59
59
  return;
60
60
  }
61
- const n = be({
61
+ const n = ge({
62
62
  owner: r
63
- }), d = ge(n), E = we(n);
63
+ }), u = be(n), E = we(n);
64
64
  V({
65
- width: Math.max(0, Math.min(360, d.right - d.left - 16)) / E.x,
66
- height: Math.max(0, Math.min(384, d.bottom - d.top - 16)) / E.y
67
- }), U(me(r.getBoundingClientRect(), t.getBoundingClientRect(), "end", d)), P(!0), F && (F = !1, t.focus({
65
+ width: Math.max(0, Math.min(360, u.right - u.left - 16)) / E.x,
66
+ height: Math.max(0, Math.min(384, u.bottom - u.top - 16)) / E.y
67
+ }), U(ve(r.getBoundingClientRect(), t.getBoundingClientRect(), "end", u)), P(!0), F && (F = !1, t.focus({
68
68
  preventScroll: !0
69
69
  }));
70
70
  }, e = () => {
71
- cancelAnimationFrame(b), b = requestAnimationFrame(L);
72
- }, s = new ResizeObserver(e);
73
- s.observe(r), s.observe(t);
71
+ cancelAnimationFrame(g), g = requestAnimationFrame(L);
72
+ }, a = new ResizeObserver(e);
73
+ a.observe(r), a.observe(t);
74
74
  const o = new MutationObserver(e);
75
75
  for (let n = r.parentElement; n; n = n.parentElement) o.observe(n, {
76
76
  attributes: !0,
77
77
  attributeFilter: ["style", "class"]
78
78
  });
79
- const a = (n) => {
79
+ const s = (n) => {
80
80
  h = x(n.target);
81
81
  };
82
- document.addEventListener("focusin", a);
82
+ document.addEventListener("focusin", s);
83
83
  const l = (n) => {
84
84
  x(n.target) || k(!1);
85
85
  };
86
86
  window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), document.addEventListener("pointerdown", l, !0), e(), ie(() => {
87
- cancelAnimationFrame(b), document.removeEventListener("focusin", a), s.disconnect(), o.disconnect(), window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0), document.removeEventListener("pointerdown", l, !0);
87
+ cancelAnimationFrame(g), document.removeEventListener("focusin", s), a.disconnect(), o.disconnect(), window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0), document.removeEventListener("pointerdown", l, !0);
88
88
  });
89
89
  }), (() => {
90
- var t = Ee(), r = t.firstChild, b = r.nextSibling, F = b.nextSibling;
90
+ var t = Ee(), r = t.firstChild, g = r.nextSibling, F = g.nextSibling;
91
91
  r.$$click = () => {
92
92
  f() && (P(!1), T((e) => !e));
93
93
  }, r.addEventListener("blur", (e) => {
@@ -95,30 +95,30 @@ function Be(i) {
95
95
  }), r.addEventListener("focus", () => {
96
96
  h = !0;
97
97
  });
98
- var L = v;
99
- return typeof L == "function" ? Z(L, r) : v = r, c(r, u($, {
98
+ var L = m;
99
+ return typeof L == "function" ? Z(L, r) : m = r, c(r, d($, {
100
100
  get when() {
101
101
  return _() !== "info";
102
102
  },
103
103
  get fallback() {
104
- return u(ae, {
104
+ return d(se, {
105
105
  class: "h-4 w-4",
106
106
  "aria-hidden": "true"
107
107
  });
108
108
  },
109
109
  get children() {
110
- return u(se, {
110
+ return d(ae, {
111
111
  class: "h-4 w-4",
112
112
  "aria-hidden": "true"
113
113
  });
114
114
  }
115
- })), c(b, () => R(!0)), c(F, () => R(!1)), c(t, u($, {
115
+ })), c(g, () => R(!0)), c(F, () => R(!1)), c(t, d($, {
116
116
  get when() {
117
- return J(() => !!m())() && f();
117
+ return J(() => !!v())() && f();
118
118
  },
119
119
  get children() {
120
- return u(fe, {
121
- owner: v,
120
+ return d(fe, {
121
+ owner: m,
122
122
  get position() {
123
123
  return K();
124
124
  },
@@ -130,7 +130,7 @@ function Be(i) {
130
130
  },
131
131
  tabindex: -1,
132
132
  "data-floe-surface": "floating",
133
- class: "flex flex-col overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-lg",
133
+ class: "flex flex-col overflow-hidden rounded-group border border-[var(--floe-line)] bg-popover text-popover-foreground shadow-[var(--floe-elevation-float)]",
134
134
  get style() {
135
135
  return {
136
136
  width: `${M().width}px`,
@@ -140,12 +140,12 @@ function Be(i) {
140
140
  },
141
141
  get children() {
142
142
  return [(() => {
143
- var e = ye(), s = e.firstChild, o = s.nextSibling;
144
- return c(s, () => i.label), o.$$click = () => k(!0), c(o, u(le, {
143
+ var e = ye(), a = e.firstChild, o = a.nextSibling;
144
+ return c(a, () => i.label), o.$$click = () => k(!0), c(o, d(le, {
145
145
  class: "h-4 w-4"
146
- })), I((a) => {
147
- var l = i.closeLabel, n = S(), d = S();
148
- return l !== a.e && g(o, "aria-label", a.e = l), n !== a.t && w(o, "width", a.t = n), d !== a.a && w(o, "height", a.a = d), a;
146
+ })), I((s) => {
147
+ var l = i.closeLabel, n = S(), u = S();
148
+ return l !== s.e && b(o, "aria-label", s.e = l), n !== s.t && w(o, "width", s.t = n), u !== s.a && w(o, "height", s.a = u), s;
149
149
  }, {
150
150
  e: void 0,
151
151
  t: void 0,
@@ -155,33 +155,33 @@ function Be(i) {
155
155
  var e = xe();
156
156
  return D(e, G({
157
157
  [he]: "true",
158
- [ve]: "true"
158
+ [me]: "true"
159
159
  }, {
160
160
  class: "min-h-0 overflow-auto overscroll-contain p-3 text-xs",
161
161
  style: {
162
162
  "overflow-wrap": "anywhere"
163
163
  }
164
- }), !1, !0), c(e, u(oe, {
164
+ }), !1, !0), c(e, d(oe, {
165
165
  get each() {
166
166
  return i.entries;
167
167
  },
168
- children: (s) => (() => {
169
- var o = Ce(), a = o.firstChild;
170
- return c(a, () => s.summary), c(o, u($, {
168
+ children: (a) => (() => {
169
+ var o = Ce(), s = o.firstChild;
170
+ return c(s, () => a.summary), c(o, d($, {
171
171
  get when() {
172
- return s.detail;
172
+ return a.detail;
173
173
  },
174
174
  get children() {
175
175
  var l = pe();
176
- return c(l, () => s.detail), l;
176
+ return c(l, () => a.detail), l;
177
177
  }
178
- }), null), c(o, u($, {
178
+ }), null), c(o, d($, {
179
179
  get when() {
180
- return s.actions;
180
+ return a.actions;
181
181
  },
182
182
  get children() {
183
183
  var l = Se();
184
- return c(l, () => s.actions), l;
184
+ return c(l, () => a.actions), l;
185
185
  }
186
186
  }), null), o;
187
187
  })()
@@ -191,8 +191,8 @@ function Be(i) {
191
191
  });
192
192
  }
193
193
  }), null), I((e) => {
194
- var s = ue("inline-flex shrink-0 items-center justify-center align-middle", i.class), o = S(), a = S(), l = f() ? "visible" : "hidden", n = _() === "error" ? "var(--error)" : _() === "warning" ? "var(--warning)" : "var(--muted-foreground)", d = f() ? 0 : -1, E = !f() || void 0, B = `${i.label}${f() ? `: ${i.entries.map((Q) => Q.summary).join("; ")}` : ""}`, O = i.label, j = m(), z = m() ? A : void 0;
195
- return s !== e.e && Y(t, e.e = s), o !== e.t && w(t, "width", e.t = o), a !== e.a && w(t, "height", e.a = a), l !== e.o && w(r, "visibility", e.o = l), n !== e.i && w(r, "color", e.i = n), d !== e.n && g(r, "tabindex", e.n = d), E !== e.s && g(r, "aria-hidden", e.s = E), B !== e.h && g(r, "aria-label", e.h = B), O !== e.r && g(r, "title", e.r = O), j !== e.d && g(r, "aria-expanded", e.d = j), z !== e.l && g(r, "aria-controls", e.l = z), e;
194
+ var a = de("inline-flex shrink-0 items-center justify-center align-middle", i.class), o = S(), s = S(), l = f() ? "visible" : "hidden", n = _() === "error" ? "var(--error)" : _() === "warning" ? "var(--warning)" : "var(--muted-foreground)", u = f() ? 0 : -1, E = !f() || void 0, B = `${i.label}${f() ? `: ${i.entries.map((Q) => Q.summary).join("; ")}` : ""}`, O = i.label, j = v(), z = v() ? A : void 0;
195
+ return a !== e.e && Y(t, e.e = a), o !== e.t && w(t, "width", e.t = o), s !== e.a && w(t, "height", e.a = s), l !== e.o && w(r, "visibility", e.o = l), n !== e.i && w(r, "color", e.i = n), u !== e.n && b(r, "tabindex", e.n = u), E !== e.s && b(r, "aria-hidden", e.s = E), B !== e.h && b(r, "aria-label", e.h = B), O !== e.r && b(r, "title", e.r = O), j !== e.d && b(r, "aria-expanded", e.d = j), z !== e.l && b(r, "aria-controls", e.l = z), e;
196
196
  }, {
197
197
  e: void 0,
198
198
  t: void 0,
@@ -1,56 +1,56 @@
1
- import { createComponent as a, insert as c, mergeProps as z, spread as K, use as L, effect as j, setAttribute as M, className as V, memo as H, template as x, delegateEvents as R } from "solid-js/web";
2
- import { createSignal as U, mergeProps as Y, createMemo as q, Show as w, For as G } from "solid-js";
1
+ import { createComponent as a, insert as c, mergeProps as z, spread as K, use as L, effect as j, setAttribute as M, className as V, memo as H, template as v, delegateEvents as R } from "solid-js/web";
2
+ import { createSignal as U, mergeProps as Y, createMemo as q, Show as b, For as G } from "solid-js";
3
3
  import { cn as N } from "../../utils/cn.js";
4
4
  import { deferNonBlocking as J } from "../../utils/defer.js";
5
5
  import { Check as Q } from "../icons/index.js";
6
6
  import { FileItemIcon as W } from "../file-browser/FileIcons.js";
7
7
  import { Button as D } from "./Button.js";
8
8
  import { Dialog as X } from "./Dialog.js";
9
- import { usePickerNavigation as Z, PickerPanel as ee, normalizePath as k, pickerCopy as b } from "./picker/PickerBase.js";
9
+ import { usePickerNavigation as Z, PickerPanel as ee, normalizePath as k, pickerCopy as w } from "./picker/PickerBase.js";
10
10
  import { pickerParentPath as te } from "./picker/PickerNavigation.js";
11
- var ne = /* @__PURE__ */ x('<div class="flex min-h-[140px] overflow-hidden rounded border border-border"><div>'), ie = /* @__PURE__ */ x('<div class="flex flex-col gap-2 -mt-1">'), le = /* @__PURE__ */ x('<div class="flex items-center w-full gap-2"><span class="flex-1 text-[11px] text-muted-foreground truncate">'), re = /* @__PURE__ */ x('<div class="flex h-full items-center justify-center px-4 text-center text-xs text-muted-foreground">'), oe = /* @__PURE__ */ x('<span class="ml-auto flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[10px] text-primary-foreground">'), ae = /* @__PURE__ */ x("<button type=button role=option><span class=truncate>");
11
+ var ne = /* @__PURE__ */ v('<div class="flex min-h-[140px] overflow-hidden rounded-xs border border-[var(--floe-line)]"><div>'), ie = /* @__PURE__ */ v('<div class="flex flex-col gap-2 -mt-1">'), le = /* @__PURE__ */ v('<div class="flex items-center w-full gap-2"><span class="flex-1 text-[length:var(--floe-type-caption)] text-[var(--floe-ink-soft)] truncate">'), re = /* @__PURE__ */ v('<div class="flex h-full items-center justify-center px-4 text-center text-[length:var(--floe-type-supporting)] text-[var(--floe-ink-soft)]">'), oe = /* @__PURE__ */ v('<span class="ml-auto flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-caption text-primary-foreground">'), ae = /* @__PURE__ */ v("<button type=button role=option><span class=truncate>");
12
12
  function ce(e, s) {
13
- const u = y(s), f = /* @__PURE__ */ new Set(), d = [];
14
- for (const g of e ?? []) {
15
- const i = k(g);
16
- if (!(i === "/" || f.has(i)) && (f.add(i), d.push(i), d.length >= u))
13
+ const u = y(s), d = /* @__PURE__ */ new Set(), f = [];
14
+ for (const h of e ?? []) {
15
+ const i = k(h);
16
+ if (!(i === "/" || d.has(i)) && (d.add(i), f.push(i), f.length >= u))
17
17
  break;
18
18
  }
19
- return d;
19
+ return f;
20
20
  }
21
- function se(e, s, u, f) {
22
- const d = k(s);
23
- if (d === "/") return [...e];
24
- if (u === "single") return [d];
25
- const g = e.indexOf(d);
26
- return g >= 0 ? e.filter((i, h) => h !== g) : e.length >= y(f) ? [...e] : [...e, d];
21
+ function se(e, s, u, d) {
22
+ const f = k(s);
23
+ if (f === "/") return [...e];
24
+ if (u === "single") return [f];
25
+ const h = e.indexOf(f);
26
+ return h >= 0 ? e.filter((i, g) => g !== h) : e.length >= y(d) ? [...e] : [...e, f];
27
27
  }
28
28
  function y(e) {
29
29
  return e == null || !Number.isFinite(e) ? Number.POSITIVE_INFINITY : Math.max(1, Math.floor(e));
30
30
  }
31
31
  function ke(e) {
32
- const s = () => e.selectionMode ?? "single", [u, f] = U([]), d = () => {
32
+ const s = () => e.selectionMode ?? "single", [u, d] = U([]), f = () => {
33
33
  if (e.initialPath) return e.initialPath;
34
34
  const t = e.initialSelectedPaths?.[0];
35
35
  return t ? te(t) : void 0;
36
- }, g = Y(e, {
36
+ }, h = Y(e, {
37
37
  get initialPath() {
38
- return d();
38
+ return f();
39
39
  },
40
40
  get scopeKey() {
41
41
  return e.scopeKey;
42
42
  }
43
- }), i = Z(g, () => e.open, void 0, () => {
44
- f(ce(e.initialSelectedPaths, s() === "single" ? 1 : e.maxSelections));
45
- }), h = q(() => i.entries().filter((t) => t.type === "file" && (!e.fileFilter || e.fileFilter(t)))), T = (t) => u().indexOf(k(t)), A = () => s() === "multiple" && u().length >= y(e.maxSelections), B = (t) => {
46
- f((o) => se(o, t.path, s(), e.maxSelections));
43
+ }), i = Z(h, () => e.open, void 0, () => {
44
+ d(ce(e.initialSelectedPaths, s() === "single" ? 1 : e.maxSelections));
45
+ }), g = q(() => i.entries().filter((t) => t.type === "file" && (!e.fileFilter || e.fileFilter(t)))), T = (t) => u().indexOf(k(t)), A = () => s() === "multiple" && u().length >= y(e.maxSelections), B = (t) => {
46
+ d((o) => se(o, t.path, s(), e.maxSelections));
47
47
  }, P = (t = u()) => {
48
48
  if (e.disabled || t.length === 0 || i.view() !== "browse" || !i.valid()) return;
49
49
  const o = e.onSelect;
50
50
  e.onOpenChange(!1), J(() => o([...t]));
51
51
  }, E = (t, o) => {
52
52
  let l;
53
- t.key === "ArrowDown" && (l = Math.min(o + 1, h().length - 1)), t.key === "ArrowUp" && (l = Math.max(o - 1, 0)), t.key === "Home" && (l = 0), t.key === "End" && (l = h().length - 1), !(l == null || l < 0) && (t.preventDefault(), $[l]?.focus());
53
+ t.key === "ArrowDown" && (l = Math.min(o + 1, g().length - 1)), t.key === "ArrowUp" && (l = Math.max(o - 1, 0)), t.key === "Home" && (l = 0), t.key === "End" && (l = g().length - 1), !(l == null || l < 0) && (t.preventDefault(), $[l]?.focus());
54
54
  }, $ = [];
55
55
  return a(X, {
56
56
  get open() {
@@ -70,13 +70,13 @@ function ke(e) {
70
70
  var t = le(), o = t.firstChild;
71
71
  return c(o, (() => {
72
72
  var l = H(() => u().length === 0);
73
- return () => l() ? b(e).noFilesSelected : b(e).selectedCount(u().length);
73
+ return () => l() ? w(e).noFilesSelected : w(e).selectedCount(u().length);
74
74
  })()), c(t, a(D, {
75
75
  variant: "ghost",
76
76
  size: "sm",
77
77
  onClick: () => e.onOpenChange(!1),
78
78
  get children() {
79
- return e.cancelText ?? b(e).cancel;
79
+ return e.cancelText ?? w(e).cancel;
80
80
  }
81
81
  }), null), c(t, a(D, {
82
82
  variant: "primary",
@@ -95,7 +95,7 @@ function ke(e) {
95
95
  var t = ie();
96
96
  return c(t, a(ee, z(e, {
97
97
  source: i
98
- })), null), c(t, a(w, {
98
+ })), null), c(t, a(b, {
99
99
  get when() {
100
100
  return i.view() === "browse";
101
101
  },
@@ -107,23 +107,23 @@ function ke(e) {
107
107
  get "aria-multiselectable"() {
108
108
  return s() === "multiple" ? "true" : void 0;
109
109
  }
110
- }), !1, !0), c(l, a(w, {
110
+ }), !1, !0), c(l, a(b, {
111
111
  get when() {
112
- return h().length > 0;
112
+ return g().length > 0;
113
113
  },
114
114
  get fallback() {
115
115
  return (() => {
116
116
  var m = re();
117
- return c(m, () => e.emptyText ?? b(e).emptyFiles), m;
117
+ return c(m, () => e.emptyText ?? w(e).emptyFiles), m;
118
118
  })();
119
119
  },
120
120
  get children() {
121
121
  return a(G, {
122
122
  get each() {
123
- return h();
123
+ return g();
124
124
  },
125
125
  children: (m, S) => {
126
- const v = () => T(m.path), F = () => A() && v() < 0;
126
+ const x = () => T(m.path), F = () => A() && x() < 0;
127
127
  return (() => {
128
128
  var r = ae(), _ = r.firstChild;
129
129
  return r.$$keydown = (n) => E(n, S()), r.$$dblclick = () => {
@@ -134,13 +134,13 @@ function ke(e) {
134
134
  item: m,
135
135
  size: 16,
136
136
  class: "w-4 h-4 flex-shrink-0"
137
- }), _), c(_, () => m.name), c(r, a(w, {
137
+ }), _), c(_, () => m.name), c(r, a(b, {
138
138
  get when() {
139
- return v() >= 0;
139
+ return x() >= 0;
140
140
  },
141
141
  get children() {
142
142
  var n = oe();
143
- return c(n, a(w, {
143
+ return c(n, a(b, {
144
144
  get when() {
145
145
  return s() === "multiple";
146
146
  },
@@ -150,13 +150,13 @@ function ke(e) {
150
150
  });
151
151
  },
152
152
  get children() {
153
- return v() + 1;
153
+ return x() + 1;
154
154
  }
155
155
  })), n;
156
156
  }
157
157
  }), null), j((n) => {
158
- var C = v() >= 0, I = F(), O = F() ? b(e).selectionLimit : m.name, p = N("flex min-h-9 w-full cursor-pointer items-center gap-2 px-2 py-1.5 text-left text-xs", "transition-colors duration-100 hover:bg-accent/60", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring", "disabled:cursor-not-allowed disabled:opacity-45", v() >= 0 && "bg-accent text-accent-foreground font-medium");
159
- return C !== n.e && M(r, "aria-selected", n.e = C), I !== n.t && (r.disabled = n.t = I), O !== n.a && M(r, "title", n.a = O), p !== n.o && V(r, n.o = p), n;
158
+ var C = x() >= 0, p = F(), I = F() ? w(e).selectionLimit : m.name, O = N("flex min-h-9 w-full cursor-pointer items-center gap-2 px-2 py-1.5 text-left text-xs", "transition-colors duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)] hover:bg-[var(--floe-state-hover)]", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring", "disabled:cursor-not-allowed disabled:opacity-45", x() >= 0 && "bg-[var(--floe-state-selected)] text-foreground font-medium");
159
+ return C !== n.e && M(r, "aria-selected", n.e = C), p !== n.t && (r.disabled = n.t = p), I !== n.a && M(r, "title", n.a = I), O !== n.o && V(r, n.o = O), n;
160
160
  }, {
161
161
  e: void 0,
162
162
  t: void 0,
@@ -1,43 +1,43 @@
1
- import { createComponent as a, insert as n, mergeProps as _, spread as z, effect as b, className as B, setAttribute as E, template as u, delegateEvents as D } from "solid-js/web";
2
- import { createSignal as F, createMemo as k, createEffect as I, on as O, Show as x, For as K } from "solid-js";
3
- import { cn as C } from "../../utils/cn.js";
1
+ import { createComponent as a, insert as n, mergeProps as p, spread as z, effect as k, className as B, setAttribute as E, template as f, delegateEvents as D } from "solid-js/web";
2
+ import { createSignal as _, createMemo as F, createEffect as I, on as O, Show as h, For as K } from "solid-js";
3
+ import { cn as b } from "../../utils/cn.js";
4
4
  import { Dialog as T } from "./Dialog.js";
5
- import { Button as N } from "./Button.js";
5
+ import { Button as C } from "./Button.js";
6
6
  import { Input as M } from "./Input.js";
7
7
  import { FileItemIcon as j } from "../file-browser/FileIcons.js";
8
8
  import { deferNonBlocking as q } from "../../utils/defer.js";
9
- import { usePickerNavigation as A, PickerPanel as R, pickerCopy as g } from "./picker/PickerBase.js";
10
- var V = /* @__PURE__ */ u('<div class="flex min-h-[100px] overflow-hidden rounded border border-border"><div>'), G = /* @__PURE__ */ u('<div class="flex flex-col gap-2 -mt-1">'), H = /* @__PURE__ */ u('<div class="flex flex-col w-full gap-2"><div class="flex items-center gap-1.5"><label class="text-xs text-muted-foreground flex-shrink-0"></label><div class=flex-1></div></div><div class="flex items-center gap-2"><span class="flex-1 text-[11px] text-muted-foreground truncate">'), J = /* @__PURE__ */ u('<div class="flex items-center justify-center h-full text-xs text-muted-foreground">'), L = /* @__PURE__ */ u('<span class="ml-auto text-[10px] text-muted-foreground/60 flex-shrink-0">'), Q = /* @__PURE__ */ u("<button type=button><span class=truncate>");
9
+ import { usePickerNavigation as A, PickerPanel as R, pickerCopy as d } from "./picker/PickerBase.js";
10
+ var V = /* @__PURE__ */ f('<div class="flex min-h-[100px] overflow-hidden rounded-xs border border-[var(--floe-line)]"><div>'), G = /* @__PURE__ */ f('<div class="flex flex-col gap-2 -mt-1">'), H = /* @__PURE__ */ f('<div class="flex flex-col w-full gap-2"><div class="flex items-center gap-1.5"><label class="text-[length:var(--floe-type-supporting)] text-[var(--floe-ink-soft)] flex-shrink-0"></label><div class=flex-1></div></div><div class="flex items-center gap-2"><span class="flex-1 text-[length:var(--floe-type-caption)] text-[var(--floe-ink-soft)] truncate">'), J = /* @__PURE__ */ f('<div class="flex items-center justify-center h-full text-[length:var(--floe-type-supporting)] text-[var(--floe-ink-soft)]">'), L = /* @__PURE__ */ f('<span class="ml-auto text-[length:var(--floe-type-caption)] text-[var(--floe-ink-ghost)] flex-shrink-0">'), Q = /* @__PURE__ */ f("<button type=button><span class=truncate>");
11
11
  function ie(e) {
12
- const [s, v] = F(e.initialFileName ?? ""), [p, m] = F(""), o = A(e, () => e.open, void 0, () => {
13
- v(e.initialFileName ?? ""), m("");
14
- }), h = k(() => o.entries().filter((t) => t.type === "file"));
12
+ const [s, g] = _(e.initialFileName ?? ""), [N, u] = _(""), o = A(e, () => e.open, void 0, () => {
13
+ g(e.initialFileName ?? ""), u("");
14
+ }), x = F(() => o.entries().filter((t) => t.type === "file"));
15
15
  I(O(s, () => {
16
- m("");
16
+ u("");
17
17
  }));
18
- const S = (t) => {
19
- v(t.name), m("");
18
+ const y = (t) => {
19
+ g(t.name), u("");
20
20
  }, $ = () => {
21
21
  if (e.disabled || o.view() !== "browse" || !o.valid()) return;
22
22
  const t = s().trim();
23
23
  if (!t) {
24
- m(g(e).fileNameRequired);
24
+ u(d(e).fileNameRequired);
25
25
  return;
26
26
  }
27
27
  if (e.validateFileName) {
28
28
  const r = e.validateFileName(t);
29
29
  if (r) {
30
- m(r);
30
+ u(r);
31
31
  return;
32
32
  }
33
33
  }
34
34
  const l = o.currentPath(), c = e.onSave;
35
35
  e.onOpenChange(!1), q(() => c(l, t));
36
- }, P = () => {
36
+ }, S = () => {
37
37
  e.onOpenChange(!1);
38
- }, y = (t) => {
38
+ }, P = (t) => {
39
39
  t.key === "Enter" && (t.preventDefault(), $());
40
- }, w = k(() => {
40
+ }, w = F(() => {
41
41
  const t = o.currentPath(), l = s().trim();
42
42
  return l ? t === "/" ? `/${l}` : `${t}/${l}` : t;
43
43
  });
@@ -52,30 +52,30 @@ function ie(e) {
52
52
  return e.title ?? "Save File";
53
53
  },
54
54
  get class() {
55
- return C("max-w-2xl", e.class);
55
+ return b("max-w-2xl", e.class);
56
56
  },
57
57
  get footer() {
58
58
  return (() => {
59
- var t = H(), l = t.firstChild, c = l.firstChild, r = c.nextSibling, i = l.nextSibling, f = i.firstChild;
60
- return n(c, () => g(e).fileName), n(r, a(M, {
59
+ var t = H(), l = t.firstChild, c = l.firstChild, r = c.nextSibling, i = l.nextSibling, m = i.firstChild;
60
+ return n(c, () => d(e).fileName), n(r, a(M, {
61
61
  size: "sm",
62
62
  get value() {
63
63
  return s();
64
64
  },
65
- onInput: (d) => v(d.currentTarget.value),
66
- onKeyDown: y,
65
+ onInput: (v) => g(v.currentTarget.value),
66
+ onKeyDown: P,
67
67
  placeholder: "filename.ext",
68
68
  get error() {
69
- return p();
69
+ return N();
70
70
  }
71
- })), n(f, w), n(i, a(N, {
71
+ })), n(m, w), n(i, a(C, {
72
72
  variant: "ghost",
73
73
  size: "sm",
74
- onClick: P,
74
+ onClick: S,
75
75
  get children() {
76
- return e.cancelText ?? g(e).cancel;
76
+ return e.cancelText ?? d(e).cancel;
77
77
  }
78
- }), null), n(i, a(N, {
78
+ }), null), n(i, a(C, {
79
79
  variant: "primary",
80
80
  size: "sm",
81
81
  onClick: $,
@@ -85,51 +85,51 @@ function ie(e) {
85
85
  get children() {
86
86
  return e.confirmText ?? "Save";
87
87
  }
88
- }), null), b(() => E(f, "title", w())), t;
88
+ }), null), k(() => E(m, "title", w())), t;
89
89
  })();
90
90
  },
91
91
  get children() {
92
92
  var t = G();
93
- return n(t, a(R, _(e, {
93
+ return n(t, a(R, p(e, {
94
94
  source: o
95
- })), null), n(t, a(x, {
95
+ })), null), n(t, a(h, {
96
96
  get when() {
97
97
  return o.view() === "browse";
98
98
  },
99
99
  get children() {
100
100
  var l = V(), c = l.firstChild;
101
- return z(c, _(() => e.scrollViewportProps, {
101
+ return z(c, p(() => e.scrollViewportProps, {
102
102
  class: "max-h-[160px] w-full min-w-0 overflow-y-auto"
103
- }), !1, !0), n(c, a(x, {
103
+ }), !1, !0), n(c, a(h, {
104
104
  get when() {
105
- return h().length > 0;
105
+ return x().length > 0;
106
106
  },
107
107
  get fallback() {
108
108
  return (() => {
109
109
  var r = J();
110
- return n(r, () => g(e).emptyFiles), r;
110
+ return n(r, () => d(e).emptyFiles), r;
111
111
  })();
112
112
  },
113
113
  get children() {
114
114
  return a(K, {
115
115
  get each() {
116
- return h();
116
+ return x();
117
117
  },
118
118
  children: (r) => (() => {
119
- var i = Q(), f = i.firstChild;
120
- return i.$$click = () => S(r), n(i, a(j, {
119
+ var i = Q(), m = i.firstChild;
120
+ return i.$$click = () => y(r), n(i, a(j, {
121
121
  item: r,
122
122
  size: 16,
123
123
  class: "w-4 h-4 flex-shrink-0"
124
- }), f), n(f, () => r.name), n(i, a(x, {
124
+ }), m), n(m, () => r.name), n(i, a(h, {
125
125
  get when() {
126
126
  return r.size != null;
127
127
  },
128
128
  get children() {
129
- var d = L();
130
- return n(d, () => U(r.size)), d;
129
+ var v = L();
130
+ return n(v, () => U(r.size)), v;
131
131
  }
132
- }), null), b(() => B(i, C("flex items-center gap-1.5 w-full text-left text-xs py-1.5 px-2 cursor-pointer", "transition-colors duration-100", "hover:bg-accent/60", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring", s() === r.name && "bg-accent text-accent-foreground font-medium"))), i;
132
+ }), null), k(() => B(i, b("flex items-center gap-1.5 w-full text-left text-xs py-1.5 px-2 cursor-pointer", "transition-colors duration-[var(--floe-duration-instant)]", "hover:bg-[var(--floe-state-hover)]", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring", s() === r.name && "bg-[var(--floe-state-selected)] text-foreground font-medium"))), i;
133
133
  })()
134
134
  });
135
135
  }