@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,44 +1,44 @@
1
- import { createComponent as v, spread as ue, mergeProps as fe, insert as f, effect as y, className as k, setStyleProperty as ae, memo as le, use as ie, setAttribute as p, template as w, delegateEvents as Re } from "solid-js/web";
2
- import { splitProps as ve, Show as B, createSignal as L, untrack as de, createEffect as X, onCleanup as ce } from "solid-js";
3
- import { cn as g } from "../../utils/cn.js";
1
+ import { createComponent as v, spread as ue, mergeProps as fe, insert as f, effect as y, className as x, setStyleProperty as ae, memo as le, use as ie, setAttribute as p, template as w, delegateEvents as Re } from "solid-js/web";
2
+ import { splitProps as ve, Show as B, createSignal as L, untrack as ce, createEffect as U, onCleanup as de } from "solid-js";
3
+ import { cn as h } from "../../utils/cn.js";
4
4
  import { deferAfterPaint as _ } from "../../utils/defer.js";
5
5
  import { KeyedFor as Te } from "./KeyedFor.js";
6
6
  import { createUIFirstSelection as ze } from "../../utils/uiFirstSelection.js";
7
7
  import { useViewActivation as Ee } from "../../context/ViewActivationContext.js";
8
8
  import { X as He, Plus as Pe, ChevronRight as De } from "../icons/index.js";
9
- var Me = /* @__PURE__ */ w('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="m15 18-6-6 6-6">'), _e = /* @__PURE__ */ w('<button type=button aria-label="Scroll left">'), Oe = /* @__PURE__ */ w("<div>"), We = /* @__PURE__ */ w('<button type=button aria-label="Add new tab">'), Fe = /* @__PURE__ */ w('<button type=button aria-label="Scroll right">'), je = /* @__PURE__ */ w("<div><div role=tablist data-floe-surface=inset data-floe-surface-part=tab-rail aria-orientation=horizontal>"), Ge = /* @__PURE__ */ w("<span class=flex-shrink-0>"), Ue = /* @__PURE__ */ w("<button type=button>"), Xe = /* @__PURE__ */ w('<div role=tab data-floe-surface-part=tab><span class="truncate max-w-32">'), Ke = /* @__PURE__ */ w("<div role=tabpanel>");
10
- const K = {
9
+ var Me = /* @__PURE__ */ w('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="m15 18-6-6 6-6">'), _e = /* @__PURE__ */ w('<button type=button data-floe-interactive=icon aria-label="Scroll left">'), Oe = /* @__PURE__ */ w("<div>"), We = /* @__PURE__ */ w('<button type=button data-floe-interactive=icon aria-label="Add new tab">'), Fe = /* @__PURE__ */ w('<button type=button data-floe-interactive=icon aria-label="Scroll right">'), je = /* @__PURE__ */ w("<div><div role=tablist data-floe-surface=inset data-floe-surface-part=tab-rail aria-orientation=horizontal>"), qe = /* @__PURE__ */ w("<span class=flex-shrink-0>"), Ge = /* @__PURE__ */ w("<button type=button data-floe-interactive=icon>"), Ue = /* @__PURE__ */ w('<div role=tab data-floe-surface-part=tab data-floe-interactive=item><span class="truncate max-w-32">'), Xe = /* @__PURE__ */ w("<div role=tabpanel>");
10
+ const X = {
11
11
  x: 0,
12
12
  width: 0,
13
13
  visible: !1
14
14
  };
15
- function Ve(i, e, h) {
16
- const d = i.filter((x) => !x.disabled);
17
- if (!d.length) return null;
18
- const C = d.findIndex((x) => x.id === e);
15
+ function Ke(i, e, b) {
16
+ const c = i.filter((k) => !k.disabled);
17
+ if (!c.length) return null;
18
+ const C = c.findIndex((k) => k.id === e);
19
19
  if (C < 0) return null;
20
- let b = null;
21
- switch (h) {
20
+ let g = null;
21
+ switch (b) {
22
22
  case "ArrowRight":
23
23
  case "ArrowDown":
24
- b = (C + 1) % d.length;
24
+ g = (C + 1) % c.length;
25
25
  break;
26
26
  case "ArrowLeft":
27
27
  case "ArrowUp":
28
- b = (C - 1 + d.length) % d.length;
28
+ g = (C - 1 + c.length) % c.length;
29
29
  break;
30
30
  case "Home":
31
- b = 0;
31
+ g = 0;
32
32
  break;
33
33
  case "End":
34
- b = d.length - 1;
34
+ g = c.length - 1;
35
35
  break;
36
36
  default:
37
37
  return null;
38
38
  }
39
- return d[b]?.id ?? null;
39
+ return c[g]?.id ?? null;
40
40
  }
41
- function qe(i) {
41
+ function Ve(i) {
42
42
  return i === 1 || i === 2 || i === 3 || i === 4 ? i : 2;
43
43
  }
44
44
  function Ye(i) {
@@ -69,18 +69,18 @@ function Je(i) {
69
69
  switch (i) {
70
70
  case "border":
71
71
  return {
72
- tabBorderClass: "border-border",
73
- sliderBgClass: "bg-border"
72
+ tabBorderClass: "border-[var(--floe-line)]",
73
+ sliderBgClass: "bg-[var(--floe-line)]"
74
74
  };
75
75
  case "muted-foreground":
76
76
  return {
77
77
  tabBorderClass: "border-muted-foreground",
78
- sliderBgClass: "bg-muted-foreground"
78
+ sliderBgClass: "bg-[var(--floe-ink-ghost)]"
79
79
  };
80
80
  default:
81
81
  return {
82
- tabBorderClass: "border-primary",
83
- sliderBgClass: "bg-primary"
82
+ tabBorderClass: "border-[var(--floe-accent-ink)]",
83
+ sliderBgClass: "bg-[var(--floe-accent-ink)]"
84
84
  };
85
85
  }
86
86
  }
@@ -91,35 +91,35 @@ const Qe = (i) => (() => {
91
91
  function Ze(i) {
92
92
  const {
93
93
  container: e,
94
- tab: h
95
- } = i, d = h.offsetParent, C = h.offsetWidth;
96
- if (d === e && Number.isFinite(h.offsetLeft) && Number.isFinite(C))
94
+ tab: b
95
+ } = i, c = b.offsetParent, C = b.offsetWidth;
96
+ if (c === e && Number.isFinite(b.offsetLeft) && Number.isFinite(C))
97
97
  return {
98
- x: h.offsetLeft,
98
+ x: b.offsetLeft,
99
99
  width: C,
100
100
  visible: C > 0
101
101
  };
102
- const b = e.getBoundingClientRect(), x = h.getBoundingClientRect(), R = e.offsetWidth || e.clientWidth, I = b.width > 0 && R > 0 ? b.width / R : 1, T = Number.isFinite(I) && I > 0 ? I : 1, z = x.width / T;
102
+ const g = e.getBoundingClientRect(), k = b.getBoundingClientRect(), R = e.offsetWidth || e.clientWidth, I = g.width > 0 && R > 0 ? g.width / R : 1, T = Number.isFinite(I) && I > 0 ? I : 1, z = k.width / T;
103
103
  return {
104
- x: (x.left - b.left + e.scrollLeft) / T,
104
+ x: (k.left - g.left + e.scrollLeft) / T,
105
105
  width: z,
106
106
  visible: z > 0
107
107
  };
108
108
  }
109
- function dt(i) {
110
- const [e, h] = ve(i, ["items", "activeId", "defaultActiveId", "onChange", "onActiveIdChange", "onClose", "onAdd", "showAdd", "closable", "size", "features", "slotClassNames", "ariaLabel", "class"]), d = () => e.features?.indicator?.mode ?? "activeBorder", C = () => qe(e.features?.indicator?.thicknessPx), b = () => e.features?.indicator?.colorToken ?? "primary", x = () => e.features?.indicator?.animated ?? !0, R = () => e.features?.containerBorder ?? !0, I = () => e.features?.scrollButtons ?? "auto", T = () => e.features?.closeButton?.dangerHover ?? !0, z = () => e.features?.closeButton?.enabledByDefault ?? e.closable ?? !1, he = () => e.features?.addButton?.enabled ?? e.showAdd ?? !1, V = () => Ye(C()), O = () => Je(b());
109
+ function ct(i) {
110
+ const [e, b] = ve(i, ["items", "activeId", "defaultActiveId", "onChange", "onActiveIdChange", "onClose", "onAdd", "showAdd", "closable", "size", "features", "slotClassNames", "ariaLabel", "class"]), c = () => e.features?.indicator?.mode ?? "activeBorder", C = () => Ve(e.features?.indicator?.thicknessPx), g = () => e.features?.indicator?.colorToken ?? "primary", k = () => e.features?.indicator?.animated ?? !0, R = () => e.features?.containerBorder ?? !0, I = () => e.features?.scrollButtons ?? "auto", T = () => e.features?.closeButton?.dangerHover ?? !0, z = () => e.features?.closeButton?.enabledByDefault ?? e.closable ?? !1, he = () => e.features?.addButton?.enabled ?? e.showAdd ?? !1, K = () => Ye(C()), O = () => Je(g());
111
111
  let u;
112
- const q = (() => {
112
+ const V = (() => {
113
113
  try {
114
114
  return Ee();
115
115
  } catch {
116
116
  return null;
117
117
  }
118
- })(), S = () => q ? q.active() : !0;
118
+ })(), S = () => V ? V.active() : !0;
119
119
  let W = !1;
120
- const [E, F] = L(K), H = /* @__PURE__ */ new Map();
120
+ const [E, F] = L(X), H = /* @__PURE__ */ new Map();
121
121
  let j = !1;
122
- const P = () => d() === "slider", Y = (s) => {
122
+ const P = () => c() === "slider", Y = (s) => {
123
123
  if (!u || !P()) return !1;
124
124
  const o = H.get(s);
125
125
  if (!o) return !1;
@@ -130,26 +130,26 @@ function dt(i) {
130
130
  return F(a), a.visible;
131
131
  }, be = () => {
132
132
  if (!P()) {
133
- F(K);
133
+ F(X);
134
134
  return;
135
135
  }
136
- Y(G()) || F(K);
136
+ Y(q()) || F(X);
137
137
  }, D = () => {
138
138
  j || (j = !0, _(() => {
139
- j = !1, de(() => {
139
+ j = !1, ce(() => {
140
140
  S() && be();
141
141
  });
142
142
  }));
143
- }, J = () => e.activeId !== void 0, ge = () => e.onChange ?? e.onActiveIdChange, [me, we] = L(de(() => e.defaultActiveId ?? e.items[0]?.id ?? "")), Q = ze({
143
+ }, J = () => e.activeId !== void 0, ge = () => e.onChange ?? e.onActiveIdChange, [me, we] = L(ce(() => e.defaultActiveId ?? e.items[0]?.id ?? "")), Q = ze({
144
144
  committed: () => J() ? e.activeId : me(),
145
145
  commit: (s) => {
146
146
  J() || we(s), ge()?.(s);
147
147
  }
148
- }), G = Q.visual;
149
- X(() => {
150
- S() && (d(), G(), D());
148
+ }), q = Q.visual;
149
+ U(() => {
150
+ S() && (c(), q(), D());
151
151
  });
152
- const [Z, Ce] = L(!1), [ee, pe] = L(!1), [xe, ye] = L(!1), te = () => I() === "auto" && xe(), ke = () => {
152
+ const [Z, Ce] = L(!1), [ee, pe] = L(!1), [ke, ye] = L(!1), te = () => I() === "auto" && ke(), xe = () => {
153
153
  if (!u) return;
154
154
  const {
155
155
  scrollLeft: s,
@@ -159,7 +159,7 @@ function dt(i) {
159
159
  ye(t), Ce(s > 0), pe(s + a < o - 1);
160
160
  }, M = () => {
161
161
  W || (W = !0, _(() => {
162
- W = !1, S() && ke();
162
+ W = !1, S() && xe();
163
163
  }));
164
164
  }, Be = () => {
165
165
  u && u.scrollBy({
@@ -172,7 +172,7 @@ function dt(i) {
172
172
  behavior: "smooth"
173
173
  });
174
174
  };
175
- X(() => {
175
+ U(() => {
176
176
  if (!u || !S()) return;
177
177
  M(), D();
178
178
  const s = () => M();
@@ -181,18 +181,18 @@ function dt(i) {
181
181
  M(), D();
182
182
  };
183
183
  let a;
184
- typeof ResizeObserver < "u" ? (a = new ResizeObserver(o), a.observe(u)) : typeof window < "u" && window.addEventListener("resize", o), ce(() => {
184
+ typeof ResizeObserver < "u" ? (a = new ResizeObserver(o), a.observe(u)) : typeof window < "u" && window.addEventListener("resize", o), de(() => {
185
185
  u?.removeEventListener("scroll", s), a?.disconnect(), typeof window < "u" && window.removeEventListener("resize", o);
186
186
  });
187
- }), X(() => {
187
+ }), U(() => {
188
188
  S() && (e.items.length, M(), D());
189
189
  });
190
- const U = (s, o) => {
190
+ const G = (s, o) => {
191
191
  o || (Q.request(s), P() && Y(s));
192
192
  }, Se = (s) => {
193
193
  const o = e.items.find((t) => t.id === s);
194
194
  if (!o) return;
195
- U(o.id, o.disabled);
195
+ G(o.id, o.disabled);
196
196
  const a = H.get(o.id);
197
197
  a?.focus({
198
198
  preventScroll: !0
@@ -201,7 +201,7 @@ function dt(i) {
201
201
  inline: "nearest"
202
202
  });
203
203
  }, Ae = (s, o) => {
204
- const a = Ve(e.items, o.id, s.key);
204
+ const a = Ke(e.items, o.id, s.key);
205
205
  a && (s.preventDefault(), Se(a));
206
206
  }, $e = (s, o) => {
207
207
  s.stopPropagation();
@@ -210,22 +210,34 @@ function dt(i) {
210
210
  const t = o;
211
211
  _(() => a(t));
212
212
  }, Ne = {
213
- sm: "h-7 px-2 text-[11px]",
214
- md: "h-8 px-3 text-xs"
213
+ sm: "h-[var(--floe-control-height-sm)] px-[var(--floe-control-padding-sm)]",
214
+ md: "h-[var(--floe-control-height-md)] px-[var(--floe-control-padding-md)]"
215
215
  }, Le = (s, o) => {
216
- const a = "inline-flex items-center gap-1.5 font-medium transition-colors duration-120 whitespace-nowrap", t = o ? "cursor-not-allowed opacity-50" : "cursor-pointer", r = (() => {
217
- const c = d();
218
- return c === "none" || c === "slider" && E().visible ? "border-transparent" : O().tabBorderClass;
216
+ const a = h("inline-flex items-center gap-1.5 whitespace-nowrap", "text-[length:var(--floe-type-control)] leading-[var(--floe-line-control)]"), t = o ? "cursor-not-allowed opacity-50" : "cursor-pointer", r = (() => {
217
+ const d = c();
218
+ return d === "none" || d === "slider" && E().visible ? "border-transparent" : O().tabBorderClass;
219
219
  })();
220
- return g(a, t, Ne[e.size ?? "md"], "rounded-t", V().tabBorderClass, s ? g(r, "text-foreground bg-background", e.slotClassNames?.tabActive) : g("border-transparent text-muted-foreground hover:text-foreground hover:bg-muted/50", e.slotClassNames?.tabInactive), o && "hover:bg-transparent hover:text-muted-foreground hover:border-transparent", e.slotClassNames?.tab);
220
+ return h(
221
+ a,
222
+ t,
223
+ Ne[e.size ?? "md"],
224
+ "rounded-control",
225
+ K().tabBorderClass,
226
+ /* The selected face is painted by the surface layer (`data-floe-surface`
227
+ * plus `aria-selected`), which keeps the fill, hairline and first
228
+ * elevation step identical to every other selected control. */
229
+ s ? h(r, "text-foreground", e.slotClassNames?.tabActive) : h("border-transparent text-[var(--floe-ink-soft)]", e.slotClassNames?.tabInactive),
230
+ o && "opacity-50",
231
+ e.slotClassNames?.tab
232
+ );
221
233
  };
222
234
  return (() => {
223
235
  var s = je(), o = s.firstChild;
224
236
  ue(s, fe({
225
237
  get class() {
226
- return g("relative flex items-center gap-0.5", R() && "border-b border-border", e.slotClassNames?.root, e.class);
238
+ return h("relative flex items-center gap-0.5", R() && "border-b border-[var(--floe-line)]", e.slotClassNames?.root, e.class);
227
239
  }
228
- }, h), !1, !0), f(s, v(B, {
240
+ }, b), !1, !0), f(s, v(B, {
229
241
  get when() {
230
242
  return te();
231
243
  },
@@ -234,8 +246,8 @@ function dt(i) {
234
246
  return t.$$click = Be, f(t, v(Qe, {
235
247
  class: "w-4 h-4"
236
248
  })), y((r) => {
237
- var c = !Z(), l = g("flex-shrink-0 flex items-center justify-center", "w-6 h-6 rounded cursor-pointer", "transition-[color,background-color,opacity] duration-120", Z() ? "text-muted-foreground hover:text-foreground hover:bg-muted/80 opacity-100" : "opacity-0 pointer-events-none", e.slotClassNames?.scrollButton);
238
- return c !== r.e && (t.disabled = r.e = c), l !== r.t && k(t, r.t = l), r;
249
+ var d = !Z(), l = h("flex-shrink-0 flex items-center justify-center", "w-6 h-6 rounded-control cursor-pointer", "transition-opacity duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", Z() ? "text-[var(--floe-ink-quiet)] hover:bg-[var(--floe-state-hover)] opacity-100" : "opacity-0 pointer-events-none", e.slotClassNames?.scrollButton);
250
+ return d !== r.e && (t.disabled = r.e = d), l !== r.t && x(t, r.t = l), r;
239
251
  }, {
240
252
  e: void 0,
241
253
  t: void 0
@@ -250,8 +262,8 @@ function dt(i) {
250
262
  get children() {
251
263
  var t = Oe();
252
264
  return y((r) => {
253
- var c = g("pointer-events-none absolute bottom-0 left-0 z-10", V().sliderHeightClass, O().sliderBgClass, x() ? "transition-[transform,width] duration-200 ease-out motion-reduce:transition-none" : "transition-none", "will-change-transform", e.slotClassNames?.indicator), l = `translate3d(${E().x}px, 0, 0)`, A = `${E().width}px`;
254
- return c !== r.e && k(t, r.e = c), l !== r.t && ae(t, "transform", r.t = l), A !== r.a && ae(t, "width", r.a = A), r;
265
+ var d = h("pointer-events-none absolute bottom-0 left-0 z-10", K().sliderHeightClass, O().sliderBgClass, k() ? "transition-[transform,width] duration-[var(--floe-duration-base)] ease-out motion-reduce:transition-none" : "transition-none", "will-change-transform", e.slotClassNames?.indicator), l = `translate3d(${E().x}px, 0, 0)`, A = `${E().width}px`;
266
+ return d !== r.e && x(t, r.e = d), l !== r.t && ae(t, "transform", r.t = l), A !== r.a && ae(t, "width", r.a = A), r;
255
267
  }, {
256
268
  e: void 0,
257
269
  t: void 0,
@@ -264,36 +276,36 @@ function dt(i) {
264
276
  },
265
277
  by: (t) => t.id,
266
278
  children: (t) => {
267
- const r = () => t().id === G(), c = () => t().closable ?? z();
279
+ const r = () => t().id === q(), d = () => t().closable ?? z();
268
280
  return (() => {
269
- var l = Xe(), A = l.firstChild;
281
+ var l = Ue(), A = l.firstChild;
270
282
  return l.$$keydown = (n) => {
271
283
  if (n.key === "Enter" || n.key === " ") {
272
- n.preventDefault(), U(t().id, t().disabled);
284
+ n.preventDefault(), G(t().id, t().disabled);
273
285
  return;
274
286
  }
275
287
  Ae(n, t());
276
- }, l.$$click = () => U(t().id, t().disabled), ie((n) => {
277
- H.set(t().id, n), ce(() => H.delete(t().id));
288
+ }, l.$$click = () => G(t().id, t().disabled), ie((n) => {
289
+ H.set(t().id, n), de(() => H.delete(t().id));
278
290
  }, l), f(l, v(B, {
279
291
  get when() {
280
292
  return t().icon;
281
293
  },
282
294
  get children() {
283
- var n = Ge();
295
+ var n = qe();
284
296
  return f(n, () => t().icon), n;
285
297
  }
286
298
  }), A), f(A, () => t().label), f(l, v(B, {
287
299
  get when() {
288
- return le(() => !!c())() && !t().disabled;
300
+ return le(() => !!d())() && !t().disabled;
289
301
  },
290
302
  get children() {
291
- var n = Ue();
303
+ var n = Ge();
292
304
  return n.$$click = (m) => $e(m, t().id), f(n, v(He, {
293
305
  class: "w-3 h-3"
294
306
  })), y((m) => {
295
- var $ = g("flex-shrink-0 flex items-center justify-center", "w-5 h-5 rounded cursor-pointer", "bg-transparent text-muted-foreground", T() ? "hover:bg-error hover:text-error-foreground" : "hover:bg-muted/80 hover:text-foreground", "transition-colors duration-120", "ml-1.5", e.slotClassNames?.closeButton), N = `Close ${t().label}`;
296
- return $ !== m.e && k(n, m.e = $), N !== m.t && p(n, "aria-label", m.t = N), m;
307
+ var $ = h("flex-shrink-0 flex items-center justify-center", "w-5 h-5 rounded-control cursor-pointer", "bg-transparent text-[var(--floe-ink-quiet)]", T() ? "hover:bg-error hover:text-error-foreground" : "hover:bg-[var(--floe-state-hover)]", "ml-1.5", e.slotClassNames?.closeButton), N = `Close ${t().label}`;
308
+ return $ !== m.e && x(n, m.e = $), N !== m.t && p(n, "aria-label", m.t = N), m;
297
309
  }, {
298
310
  e: void 0,
299
311
  t: void 0
@@ -301,7 +313,7 @@ function dt(i) {
301
313
  }
302
314
  }), null), y((n) => {
303
315
  var m = Le(r(), t().disabled), $ = t().domId, N = t().panelId, re = r() ? "raised" : "flat", oe = r(), ne = t().disabled, se = t().disabled ? -1 : r() ? 0 : -1;
304
- return m !== n.e && k(l, n.e = m), $ !== n.t && p(l, "id", n.t = $), N !== n.a && p(l, "aria-controls", n.a = N), re !== n.o && p(l, "data-floe-surface", n.o = re), oe !== n.i && p(l, "aria-selected", n.i = oe), ne !== n.n && p(l, "aria-disabled", n.n = ne), se !== n.s && p(l, "tabindex", n.s = se), n;
316
+ return m !== n.e && x(l, n.e = m), $ !== n.t && p(l, "id", n.t = $), N !== n.a && p(l, "aria-controls", n.a = N), re !== n.o && p(l, "data-floe-surface", n.o = re), oe !== n.i && p(l, "aria-selected", n.i = oe), ne !== n.n && p(l, "aria-disabled", n.n = ne), se !== n.s && p(l, "tabindex", n.s = se), n;
305
317
  }, {
306
318
  e: void 0,
307
319
  t: void 0,
@@ -326,7 +338,7 @@ function dt(i) {
326
338
  get class() {
327
339
  return e.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4";
328
340
  }
329
- })), y(() => k(t, g("flex-shrink-0 flex items-center justify-center", "rounded hover:bg-muted/80 cursor-pointer", "text-muted-foreground hover:text-foreground", "transition-colors duration-120", e.size === "sm" ? "w-6 h-6" : "w-7 h-7", e.slotClassNames?.addButton))), t;
341
+ })), y(() => x(t, h("flex-shrink-0 flex items-center justify-center", "rounded-control cursor-pointer", "text-[var(--floe-ink-quiet)] hover:bg-[var(--floe-state-hover)]", e.size === "sm" ? "w-6 h-6" : "w-7 h-7", e.slotClassNames?.addButton))), t;
330
342
  }
331
343
  }), null), f(s, v(B, {
332
344
  get when() {
@@ -337,37 +349,37 @@ function dt(i) {
337
349
  return t.$$click = Ie, f(t, v(De, {
338
350
  class: "w-4 h-4"
339
351
  })), y((r) => {
340
- var c = !ee(), l = g("flex-shrink-0 flex items-center justify-center", "w-6 h-6 rounded cursor-pointer", "transition-[color,background-color,opacity] duration-120", ee() ? "text-muted-foreground hover:text-foreground hover:bg-muted/80 opacity-100" : "opacity-0 pointer-events-none", e.slotClassNames?.scrollButton);
341
- return c !== r.e && (t.disabled = r.e = c), l !== r.t && k(t, r.t = l), r;
352
+ var d = !ee(), l = h("flex-shrink-0 flex items-center justify-center", "w-6 h-6 rounded-control cursor-pointer", "transition-opacity duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", ee() ? "text-[var(--floe-ink-quiet)] hover:bg-[var(--floe-state-hover)] opacity-100" : "opacity-0 pointer-events-none", e.slotClassNames?.scrollButton);
353
+ return d !== r.e && (t.disabled = r.e = d), l !== r.t && x(t, r.t = l), r;
342
354
  }, {
343
355
  e: void 0,
344
356
  t: void 0
345
357
  }), t;
346
358
  }
347
359
  }), null), y((t) => {
348
- var r = g(
360
+ var r = h(
349
361
  "relative flex-1 flex items-end gap-0.5 overflow-x-auto",
350
362
  "scrollbar-none",
351
363
  // Hide scrollbar for all browsers
352
364
  "[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",
353
365
  e.slotClassNames?.scrollContainer
354
- ), c = e.ariaLabel;
355
- return r !== t.e && k(o, t.e = r), c !== t.t && p(o, "aria-label", t.t = c), t;
366
+ ), d = e.ariaLabel;
367
+ return r !== t.e && x(o, t.e = r), d !== t.t && p(o, "aria-label", t.t = d), t;
356
368
  }, {
357
369
  e: void 0,
358
370
  t: void 0
359
371
  }), s;
360
372
  })();
361
373
  }
362
- function ct(i) {
363
- const [e, h] = ve(i, ["active", "keepMounted", "labelledBy", "class", "children"]);
374
+ function dt(i) {
375
+ const [e, b] = ve(i, ["active", "keepMounted", "labelledBy", "class", "children"]);
364
376
  return v(B, {
365
377
  get when() {
366
378
  return e.keepMounted || e.active;
367
379
  },
368
380
  get children() {
369
- var d = Ke();
370
- return ue(d, fe({
381
+ var c = Xe();
382
+ return ue(c, fe({
371
383
  get "aria-labelledby"() {
372
384
  return e.labelledBy;
373
385
  },
@@ -378,15 +390,15 @@ function ct(i) {
378
390
  return e.active ? 0 : -1;
379
391
  },
380
392
  get class() {
381
- return g(!e.active && e.keepMounted && "hidden", e.class);
393
+ return h(!e.active && e.keepMounted && "hidden", e.class);
382
394
  }
383
- }, h), !1, !0), f(d, () => e.children), d;
395
+ }, b), !1, !0), f(c, () => e.children), c;
384
396
  }
385
397
  });
386
398
  }
387
399
  Re(["click", "keydown"]);
388
400
  export {
389
- ct as TabPanel,
390
- dt as Tabs,
391
- Ve as resolveTabNavigationTargetId
401
+ dt as TabPanel,
402
+ ct as Tabs,
403
+ Ke as resolveTabNavigationTargetId
392
404
  };
@@ -1,24 +1,27 @@
1
- import { spread as i, mergeProps as u, insert as a, memo as n, createComponent as p, Dynamic as f, template as l } from "solid-js/web";
2
- import { splitProps as m } from "solid-js";
3
- import { cn as d } from "../../utils/cn.js";
4
- var _ = /* @__PURE__ */ l("<span data-floe-surface-part=badge>"), g = /* @__PURE__ */ l("<span class=floe-tag__dot aria-hidden=true>"), $ = /* @__PURE__ */ l("<span class=floe-tag__label>");
1
+ import { spread as i, mergeProps as u, insert as a, memo as n, createComponent as f, Dynamic as p, template as l } from "solid-js/web";
2
+ import { splitProps as d } from "solid-js";
3
+ import { cn as m } from "../../utils/cn.js";
4
+ var g = /* @__PURE__ */ l("<span data-floe-surface-part=badge>"), _ = /* @__PURE__ */ l("<span class=floe-tag__dot aria-hidden=true>"), $ = /* @__PURE__ */ l("<span class=floe-tag__label>");
5
5
  function z(s) {
6
- const [e, c] = m(s, ["variant", "size", "tone", "icon", "dot", "class", "children"]);
6
+ const [e, c] = d(s, ["variant", "size", "tone", "icon", "dot", "class", "children"]);
7
7
  return (() => {
8
- var t = _();
8
+ var t = g();
9
9
  return i(t, u({
10
10
  get "data-floe-surface"() {
11
11
  return e.tone === "soft" ? "inset" : "raised";
12
12
  },
13
+ get "data-floe-tone"() {
14
+ return e.tone ?? "solid";
15
+ },
13
16
  get class() {
14
- return d("floe-tag", `floe-tag--${e.variant ?? "neutral"}`, `floe-tag--${e.size ?? "md"}`, `floe-tag--${e.tone ?? "solid"}`, e.class);
17
+ return m("floe-tag", `floe-tag--${e.variant ?? "neutral"}`, `floe-tag--${e.size ?? "md"}`, `floe-tag--${e.tone ?? "solid"}`, e.class);
15
18
  }
16
19
  }, c), !1, !0), a(t, (() => {
17
20
  var r = n(() => !!e.dot);
18
- return () => r() && g();
21
+ return () => r() && _();
19
22
  })(), null), a(t, (() => {
20
23
  var r = n(() => !!e.icon);
21
- return () => r() && p(f, {
24
+ return () => r() && f(p, {
22
25
  get component() {
23
26
  return e.icon;
24
27
  },
@@ -1,60 +1,60 @@
1
- import { insert as i, createComponent as T, effect as $, className as v, setAttribute as b, template as h, delegateEvents as S } from "solid-js/web";
2
- import { createSignal as C, onCleanup as E, Show as L } from "solid-js";
3
- import { cn as g } from "../../utils/cn.js";
4
- import { createFloatingPresence as P } from "./floatingPresence.js";
5
- var k = /* @__PURE__ */ h("<div role=tooltip data-floe-surface=floating><div>"), z = /* @__PURE__ */ h('<div class="relative inline-block">');
6
- function N(o) {
7
- const [x, a] = C(!1), n = P({
8
- open: x,
9
- exitDurationMs: 80
1
+ import { insert as s, createComponent as S, effect as k, className as g, setAttribute as h, template as x, use as C, delegateEvents as E } from "solid-js/web";
2
+ import { createSignal as L, onCleanup as P, Show as _ } from "solid-js";
3
+ import { cn as y } from "../../utils/cn.js";
4
+ import { createFloatingPresence as z } from "./floatingPresence.js";
5
+ var A = /* @__PURE__ */ x("<div role=tooltip data-floe-surface=floating><div>"), F = /* @__PURE__ */ x('<div class="relative inline-block">');
6
+ function q(l) {
7
+ const [w, a] = L(!1), n = z({
8
+ open: w,
9
+ element: () => i
10
10
  });
11
- let e;
12
- E(() => {
13
- e && (clearTimeout(e), e = void 0);
11
+ let i, t;
12
+ P(() => {
13
+ t && (clearTimeout(t), t = void 0);
14
14
  });
15
- const s = () => {
16
- e && clearTimeout(e);
17
- const t = o.delay ?? 300;
18
- if (t <= 0) {
15
+ const f = () => {
16
+ t && clearTimeout(t);
17
+ const e = l.delay ?? 300;
18
+ if (e <= 0) {
19
19
  a(!0);
20
20
  return;
21
21
  }
22
- e = setTimeout(() => a(!0), t);
22
+ t = setTimeout(() => a(!0), e);
23
23
  }, d = () => {
24
- e && (clearTimeout(e), e = void 0), a(!1);
25
- }, y = {
24
+ t && (clearTimeout(t), t = void 0), a(!1);
25
+ }, $ = {
26
26
  top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
27
27
  bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
28
28
  left: "right-full top-1/2 -translate-y-1/2 mr-2",
29
29
  right: "left-full top-1/2 -translate-y-1/2 ml-2"
30
- }, w = {
30
+ }, T = {
31
31
  top: "top-full left-1/2 -translate-x-1/2 border-t-popover border-x-transparent border-b-transparent",
32
32
  bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-popover border-x-transparent border-t-transparent",
33
33
  left: "left-full top-1/2 -translate-y-1/2 border-l-popover border-y-transparent border-r-transparent",
34
34
  right: "right-full top-1/2 -translate-y-1/2 border-r-popover border-y-transparent border-l-transparent"
35
35
  };
36
36
  return (() => {
37
- var t = z();
38
- return t.$$focusout = d, t.$$focusin = s, t.addEventListener("mouseleave", d), t.addEventListener("mouseenter", s), i(t, () => o.children, null), i(t, T(L, {
37
+ var e = F();
38
+ return e.$$focusout = d, e.$$focusin = f, e.addEventListener("mouseleave", d), e.addEventListener("mouseenter", f), s(e, () => l.children, null), s(e, S(_, {
39
39
  get when() {
40
40
  return n.mounted();
41
41
  },
42
42
  get children() {
43
- var l = k(), f = l.firstChild;
44
- return i(l, () => o.content, f), $((r) => {
45
- var u = g("absolute z-50 px-2 py-1", "bg-popover text-popover-foreground text-[11px] rounded-md shadow-md", "whitespace-nowrap", "floe-floating-presence floe-floating-tooltip", y[o.placement ?? "top"], o.class), p = n.state(), c = n.exiting() ? "true" : void 0, m = g("absolute w-0 h-0 border-4", w[o.placement ?? "top"]);
46
- return u !== r.e && v(l, r.e = u), p !== r.t && b(l, "data-floating-presence", r.t = p), c !== r.a && b(l, "aria-hidden", r.a = c), m !== r.o && v(f, r.o = m), r;
43
+ var o = A(), u = o.firstChild, p = i;
44
+ return typeof p == "function" ? C(p, o) : i = o, s(o, () => l.content, u), k((r) => {
45
+ var c = y("absolute z-50 px-2.5 py-1.5", "bg-popover text-popover-foreground text-[length:var(--floe-type-caption)]", "rounded-panel border border-[var(--floe-line)]", "shadow-[var(--floe-elevation-float)]", "tracking-[var(--floe-tracking-normal)]", "whitespace-nowrap", "floe-floating-presence floe-floating-tooltip", $[l.placement ?? "top"], l.class), v = n.state(), m = n.exiting() ? "true" : void 0, b = y("absolute w-0 h-0 border-4", T[l.placement ?? "top"]);
46
+ return c !== r.e && g(o, r.e = c), v !== r.t && h(o, "data-floating-presence", r.t = v), m !== r.a && h(o, "aria-hidden", r.a = m), b !== r.o && g(u, r.o = b), r;
47
47
  }, {
48
48
  e: void 0,
49
49
  t: void 0,
50
50
  a: void 0,
51
51
  o: void 0
52
- }), l;
52
+ }), o;
53
53
  }
54
- }), null), t;
54
+ }), null), e;
55
55
  })();
56
56
  }
57
- S(["focusin", "focusout"]);
57
+ E(["focusin", "focusout"]);
58
58
  export {
59
- N as Tooltip
59
+ q as Tooltip
60
60
  };
@@ -2,6 +2,13 @@ import { type Accessor } from 'solid-js';
2
2
  export type FloatingPresenceState = 'entering' | 'open' | 'exiting';
3
3
  export interface FloatingPresenceOptions {
4
4
  open: Accessor<boolean>;
5
+ /**
6
+ * The element carrying the surface's motion classes. When present, the exit
7
+ * follows that element's own transitions, so the DOM outlives the motion CSS
8
+ * declared for it instead of a duration duplicated in JavaScript.
9
+ */
10
+ element?: Accessor<HTMLElement | undefined>;
11
+ /** Fallback for elements with no observable transition, as in SSR and unit tests. */
5
12
  exitDurationMs?: number;
6
13
  reducedMotionExitDurationMs?: number;
7
14
  }