@floegence/floe-webapp-core 0.86.60 → 0.86.63

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 (122) hide show
  1. package/dist/app/FloeRegistryContributions.js +0 -3
  2. package/dist/components/chat/blocks/BlockRenderer.js +1 -1
  3. package/dist/components/chat/blocks/CodeDiffBlock.js +56 -56
  4. package/dist/components/chat/blocks/ImageBlock.js +1 -1
  5. package/dist/components/chat/blocks/ToolCallBlock.js +57 -57
  6. package/dist/components/chat/status/ConnectionStatus.js +10 -10
  7. package/dist/components/deck/DeckCell.js +25 -25
  8. package/dist/components/deck/DeckContextMenu.js +20 -20
  9. package/dist/components/deck/DeckGrid.js +1 -1
  10. package/dist/components/deck/DeckTopBar.js +42 -42
  11. package/dist/components/deck/DropZonePreview.js +6 -6
  12. package/dist/components/deck/LayoutSelector.js +53 -53
  13. package/dist/components/deck/WidgetFrame.js +28 -28
  14. package/dist/components/deck/WidgetPalette.js +31 -31
  15. package/dist/components/deck/WidgetTypeSwitcher.js +31 -31
  16. package/dist/components/file-browser/Breadcrumb.js +27 -27
  17. package/dist/components/file-browser/DirectoryTree.js +15 -15
  18. package/dist/components/file-browser/DragPreview.js +58 -58
  19. package/dist/components/file-browser/FileBrowser.js +17 -17
  20. package/dist/components/file-browser/FileBrowserStatusBar.js +18 -18
  21. package/dist/components/file-browser/FileBrowserToolbar.js +27 -27
  22. package/dist/components/file-browser/FileContextMenu.js +47 -47
  23. package/dist/components/file-browser/FileGridView.js +53 -51
  24. package/dist/components/file-browser/FileItemDecorations.js +30 -27
  25. package/dist/components/file-browser/FileListView.js +114 -114
  26. package/dist/components/icons/ActivityRailIcons.d.ts +30 -0
  27. package/dist/components/icons/ActivityRailIcons.js +68 -0
  28. package/dist/components/icons/index.d.ts +1 -0
  29. package/dist/components/icons/index.js +1357 -1357
  30. package/dist/components/launchpad/Launchpad.js +14 -14
  31. package/dist/components/launchpad/LaunchpadGrid.js +7 -7
  32. package/dist/components/launchpad/LaunchpadItem.js +11 -11
  33. package/dist/components/launchpad/LaunchpadPagination.js +16 -16
  34. package/dist/components/launchpad/LaunchpadSearch.js +9 -9
  35. package/dist/components/layout/ActivityBar.js +61 -63
  36. package/dist/components/layout/DisplayModeSwitcher.d.ts +10 -0
  37. package/dist/components/layout/DisplayModeSwitcher.js +102 -33
  38. package/dist/components/layout/MobileNavigationPanel.js +36 -36
  39. package/dist/components/layout/MobileTabBar.js +39 -39
  40. package/dist/components/layout/Panel.js +16 -16
  41. package/dist/components/layout/ResizeHandle.js +19 -19
  42. package/dist/components/layout/Shell.d.ts +0 -6
  43. package/dist/components/layout/Shell.js +208 -254
  44. package/dist/components/layout/Sidebar.js +37 -36
  45. package/dist/components/layout/SidebarPane.js +19 -19
  46. package/dist/components/layout/ThemeToggle.d.ts +19 -0
  47. package/dist/components/layout/ThemeToggle.js +39 -0
  48. package/dist/components/layout/TopBar.js +16 -16
  49. package/dist/components/layout/TopBarIconButton.js +15 -15
  50. package/dist/components/layout/index.d.ts +1 -1
  51. package/dist/components/loading/LoadingOverlay.js +9 -9
  52. package/dist/components/loading/Skeleton.js +11 -11
  53. package/dist/components/ui/Button.js +44 -36
  54. package/dist/components/ui/Card.d.ts +11 -62
  55. package/dist/components/ui/Card.js +64 -237
  56. package/dist/components/ui/Checkbox.js +79 -79
  57. package/dist/components/ui/CommandPalette.js +56 -55
  58. package/dist/components/ui/Dialog.js +91 -93
  59. package/dist/components/ui/DirectoryInput.js +22 -22
  60. package/dist/components/ui/DirectoryPicker.js +8 -8
  61. package/dist/components/ui/Dropdown.js +89 -87
  62. package/dist/components/ui/FeedbackIndicator.js +57 -57
  63. package/dist/components/ui/FileOpenPicker.js +37 -37
  64. package/dist/components/ui/FileSavePicker.js +41 -41
  65. package/dist/components/ui/FloatingWindow.js +213 -205
  66. package/dist/components/ui/Form.js +76 -76
  67. package/dist/components/ui/HighlightBlock.js +14 -14
  68. package/dist/components/ui/Input.js +106 -109
  69. package/dist/components/ui/Pagination.js +86 -86
  70. package/dist/components/ui/Popover.d.ts +33 -0
  71. package/dist/components/ui/Popover.js +133 -0
  72. package/dist/components/ui/ProcessingIndicator.js +344 -345
  73. package/dist/components/ui/Progress.js +94 -97
  74. package/dist/components/ui/QuoteBlock.js +25 -25
  75. package/dist/components/ui/Radio.js +91 -91
  76. package/dist/components/ui/SegmentedControl.js +24 -24
  77. package/dist/components/ui/Stepper.js +68 -60
  78. package/dist/components/ui/Switch.js +25 -25
  79. package/dist/components/ui/Tabs.js +188 -163
  80. package/dist/components/ui/Tag.js +12 -9
  81. package/dist/components/ui/Tooltip.js +30 -30
  82. package/dist/components/ui/floatingPresence.d.ts +7 -0
  83. package/dist/components/ui/floatingPresence.js +80 -39
  84. package/dist/components/ui/index.d.ts +2 -1
  85. package/dist/components/ui/picker/DirectoryFavorites.js +27 -27
  86. package/dist/components/ui/picker/PickerBase.js +107 -107
  87. package/dist/context/ComponentRegistry.d.ts +0 -8
  88. package/dist/context/ComponentRegistry.js +61 -67
  89. package/dist/context/FloeConfigContext.d.ts +0 -6
  90. package/dist/context/FloeConfigContext.js +9 -15
  91. package/dist/context/NotificationContext.js +4 -4
  92. package/dist/context/ThemeContext.js +71 -70
  93. package/dist/context/index.d.ts +1 -1
  94. package/dist/display-mode.css +2 -45
  95. package/dist/floe.css +205 -43
  96. package/dist/full.js +701 -695
  97. package/dist/icons.js +112 -102
  98. package/dist/language.css +320 -0
  99. package/dist/layout.js +33 -35
  100. package/dist/primitives.css +23 -17
  101. package/dist/standalone.css +1 -0
  102. package/dist/styles/themes/classicSemanticTokens.d.ts +122 -122
  103. package/dist/styles/themes/classicSemanticTokens.js +140 -138
  104. package/dist/styles/themes/index.d.ts +3 -1
  105. package/dist/styles/themes/index.js +10 -10
  106. package/dist/styles/themes/presets.d.ts +2 -2
  107. package/dist/styles/themes/presets.js +34 -34
  108. package/dist/styles/tokens.d.ts +152 -68
  109. package/dist/styles/tokens.js +87 -49
  110. package/dist/styles.css +1 -1
  111. package/dist/surface.css +214 -117
  112. package/dist/themes/dark.css +64 -64
  113. package/dist/themes/light.css +64 -64
  114. package/dist/ui.css +171 -255
  115. package/dist/ui.js +176 -178
  116. package/dist/utils/hotInteraction.d.ts +7 -0
  117. package/dist/utils/hotInteraction.js +12 -12
  118. package/dist/widgets/TerminalWidget.js +28 -28
  119. package/dist/workbench-composition.css +15 -15
  120. package/package.json +1 -1
  121. package/dist/components/layout/BottomBar.d.ts +0 -29
  122. package/dist/components/layout/BottomBar.js +0 -70
@@ -42,24 +42,24 @@ var de = /* @__PURE__ */ k('<div class="pt-8 pb-4 px-8">'), ue = /* @__PURE__ */
42
42
  .launchpad-search {
43
43
  animation: launchpad-search-enter 0.4s ease-out;
44
44
  }
45
- </style><div class="flex-1 min-h-0 overflow-hidden"></div><div class="absolute bottom-4 right-4 text-muted-foreground/60 text-xs hidden md:block"><kbd class="px-1.5 py-0.5 rounded border border-border/50 bg-card/80 text-foreground/80 font-mono mr-1">ESC</kbd> to close<span class=mx-2>|</span><kbd class="px-1.5 py-0.5 rounded border border-border/50 bg-card/80 text-foreground/80 font-mono mr-1">\\u2190</kbd><kbd class="px-1.5 py-0.5 rounded border border-border/50 bg-card/80 text-foreground/80 font-mono">→</kbd> to navigate`);
45
+ </style><div class="flex-1 min-h-0 overflow-hidden"></div><div class="absolute bottom-4 right-4 text-[var(--floe-ink-quiet)] text-xs hidden md:block"><kbd class="px-1.5 py-0.5 rounded-xs border border-[var(--floe-line)] bg-card/80 text-foreground/80 font-mono mr-1">ESC</kbd> to close<span class=mx-2>|</span><kbd class="px-1.5 py-0.5 rounded-xs border border-[var(--floe-line)] bg-card/80 text-foreground/80 font-mono mr-1">←</kbd><kbd class="px-1.5 py-0.5 rounded-xs border border-[var(--floe-line)] bg-card/80 text-foreground/80 font-mono">→</kbd> to navigate`);
46
46
  function we(r) {
47
47
  let m;
48
- const [b, X] = d(""), [Q, w] = d(""), [h, C] = d(0), [R, L] = d(!0), [N, P] = d(null);
48
+ const [p, X] = d(""), [Q, w] = d(""), [h, C] = d(0), [R, L] = d(!0), [q, P] = d(null);
49
49
  let o = null;
50
- const p = () => r.itemsPerPage ?? 20, W = () => r.columns ?? 5, j = () => r.showSearch !== !1, S = (() => {
50
+ const b = () => r.itemsPerPage ?? 20, N = () => r.columns ?? 5, W = () => r.showSearch !== !1, S = (() => {
51
51
  try {
52
52
  return ie();
53
53
  } catch {
54
54
  return null;
55
55
  }
56
- })(), q = () => S ? S.active() : !0, $ = u(() => {
56
+ })(), j = () => S ? S.active() : !0, $ = u(() => {
57
57
  const e = r.items ?? [], t = r.additionalItems ?? [];
58
58
  return [...e, ...t];
59
59
  });
60
60
  let v = 0;
61
61
  Y(() => {
62
- const e = b().trim();
62
+ const e = p().trim();
63
63
  v += 1;
64
64
  const t = v;
65
65
  if (!e) {
@@ -77,9 +77,9 @@ function we(r) {
77
77
  }))), A = u(() => {
78
78
  const e = Q().toLowerCase().trim();
79
79
  return e ? z().filter((t) => t.nameLower.includes(e) || t.descLower.includes(e)).map((t) => t.item) : $();
80
- }), y = u(() => Math.max(1, Math.ceil(A().length / p()))), B = u(() => {
81
- const e = h() * p();
82
- return A().slice(e, e + p());
80
+ }), y = u(() => Math.max(1, Math.ceil(A().length / b()))), B = u(() => {
81
+ const e = h() * b();
82
+ return A().slice(e, e + b());
83
83
  }), D = (e) => {
84
84
  X(e), C(0);
85
85
  }, x = (e) => {
@@ -108,7 +108,7 @@ function we(r) {
108
108
  y: t.clientY
109
109
  });
110
110
  }, H = (e) => {
111
- const t = N();
111
+ const t = q();
112
112
  if (!t) return;
113
113
  const a = e.changedTouches[0];
114
114
  if (!a) return;
@@ -118,7 +118,7 @@ function we(r) {
118
118
  e.target.closest('button, input, a, [role="button"]') || r.onClose?.();
119
119
  };
120
120
  Y(() => {
121
- q() && (document.addEventListener("keydown", I), E(() => {
121
+ j() && (document.addEventListener("keydown", I), E(() => {
122
122
  document.removeEventListener("keydown", I);
123
123
  }));
124
124
  }), re(() => {
@@ -149,13 +149,13 @@ function we(r) {
149
149
  var c = m;
150
150
  return typeof c == "function" ? ee(c, e) : m = e, i(e, l(_, {
151
151
  get when() {
152
- return j();
152
+ return W();
153
153
  },
154
154
  get children() {
155
155
  var n = de();
156
156
  return i(n, l(ae, {
157
157
  get value() {
158
- return b();
158
+ return p();
159
159
  },
160
160
  onChange: D,
161
161
  placeholder: "Search apps..."
@@ -169,14 +169,14 @@ function we(r) {
169
169
  return r.onItemClick;
170
170
  },
171
171
  get columns() {
172
- return W();
172
+ return N();
173
173
  },
174
174
  get animating() {
175
175
  return R();
176
176
  }
177
177
  })), i(e, l(_, {
178
178
  get when() {
179
- return F(() => y() > 1)() && !b();
179
+ return F(() => y() > 1)() && !p();
180
180
  },
181
181
  get children() {
182
182
  var n = ue();
@@ -1,12 +1,12 @@
1
- import { insert as o, createComponent as a, effect as d, setStyleProperty as u, template as i } from "solid-js/web";
2
- import { Show as s, For as f } from "solid-js";
1
+ import { insert as o, createComponent as a, effect as s, setStyleProperty as u, template as i } from "solid-js/web";
2
+ import { Show as d, For as f } from "solid-js";
3
3
  import { LaunchpadItem as g } from "./LaunchpadItem.js";
4
- var h = /* @__PURE__ */ i('<div class="grid gap-4 place-items-center">'), v = /* @__PURE__ */ i('<div class="launchpad-grid w-full h-full flex items-center justify-center p-8">'), p = /* @__PURE__ */ i('<div class="text-muted-foreground text-xs">No apps found');
4
+ var v = /* @__PURE__ */ i('<div class="grid gap-4 place-items-center">'), h = /* @__PURE__ */ i('<div class="launchpad-grid w-full h-full flex items-center justify-center p-8">'), p = /* @__PURE__ */ i('<div class="text-[var(--floe-ink-soft)] text-xs">No apps found');
5
5
  function $(t) {
6
6
  const l = () => t.columns ?? 5;
7
7
  return (() => {
8
- var m = v();
9
- return o(m, a(s, {
8
+ var m = h();
9
+ return o(m, a(d, {
10
10
  get when() {
11
11
  return t.items.length > 0;
12
12
  },
@@ -14,7 +14,7 @@ function $(t) {
14
14
  return p();
15
15
  },
16
16
  get children() {
17
- var r = h();
17
+ var r = v();
18
18
  return o(r, a(f, {
19
19
  get each() {
20
20
  return t.items;
@@ -34,7 +34,7 @@ function $(t) {
34
34
  };
35
35
  }
36
36
  })
37
- })), d((e) => {
37
+ })), s((e) => {
38
38
  var n = `repeat(${l()}, minmax(0, 1fr))`, c = `${l() * 120}px`;
39
39
  return n !== e.e && u(r, "grid-template-columns", e.e = n), c !== e.t && u(r, "max-width", e.t = c), e;
40
40
  }, {
@@ -1,22 +1,22 @@
1
- import { insert as l, createComponent as x, effect as g, style as f, setAttribute as b, setStyleProperty as d, template as y, delegateEvents as h } from "solid-js/web";
2
- var k = /* @__PURE__ */ y('<button type=button class="launchpad-item group flex flex-col items-center gap-2 rounded-2xl p-3 cursor-pointer bg-transparent select-none outline-none transition-[transform,background-color] duration-200 ease-out hover:scale-[1.02] hover:bg-card/20 focus-visible:bg-card/30 active:scale-95"tabindex=0><div class="w-14 h-14 rounded-2xl flex items-center justify-center shadow-lg transition-transform duration-200 group-hover:scale-105"style="box-shadow:0 16px 32px -20px color-mix(in srgb, var(--foreground) 55%, transparent)"></div><span class="text-xs text-foreground/80 font-medium truncate max-w-[80px] text-center">');
1
+ import { insert as c, createComponent as f, effect as g, style as x, setAttribute as y, setStyleProperty as d, template as b, delegateEvents as h } from "solid-js/web";
2
+ var k = /* @__PURE__ */ b('<button type=button class="launchpad-item group flex flex-col items-center gap-2 rounded-panel p-3 cursor-pointer bg-transparent select-none outline-none transition-[transform,background-color] duration-[var(--floe-duration-base)] ease-out hover:-translate-y-[var(--floe-hover-lift)] hover:bg-card/20 focus-visible:bg-card/30 active:scale-[var(--floe-press-scale)]"tabindex=0><div class="w-14 h-14 rounded-panel flex items-center justify-center shadow-[var(--floe-elevation-float)] transition-transform duration-[var(--floe-duration-base)] group-hover:-translate-y-[var(--floe-hover-lift)]"></div><span class="text-xs text-foreground/80 font-medium truncate max-w-[80px] text-center">');
3
3
  function C(e) {
4
- const s = () => e.item.color ?? "linear-gradient(135deg, color-mix(in srgb, var(--primary) 78%, var(--info) 22%), color-mix(in srgb, var(--primary) 58%, var(--accent) 42%))", i = () => {
4
+ const s = () => e.item.color ?? "linear-gradient(135deg, color-mix(in srgb, var(--primary) 78%, var(--info) 22%), color-mix(in srgb, var(--primary) 58%, var(--accent) 42%))", a = () => {
5
5
  e.item.onClick?.(), e.onClick?.(e.item);
6
- }, m = (t) => {
7
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), i());
6
+ }, v = (t) => {
7
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), a());
8
8
  };
9
9
  return (() => {
10
- var t = k(), r = t.firstChild, u = r.nextSibling;
11
- return t.$$keydown = m, t.$$click = i, l(r, x(e.item.icon, {
10
+ var t = k(), r = t.firstChild, m = r.nextSibling;
11
+ return t.$$keydown = v, t.$$click = a, c(r, f(e.item.icon, {
12
12
  class: "w-7 h-7"
13
- })), l(u, () => e.item.name), g((n) => {
14
- var v = {
13
+ })), c(m, () => e.item.name), g((n) => {
14
+ var u = {
15
15
  "--item-index": e.index,
16
16
  "animation-delay": `${e.index * 30}ms`,
17
17
  ...e.style
18
- }, o = e.item.description ?? e.item.name, a = s(), c = e.item.color ? "white" : "var(--primary-foreground)";
19
- return n.e = f(t, v, n.e), o !== n.t && b(t, "title", n.t = o), a !== n.a && d(r, "background", n.a = a), c !== n.o && d(r, "color", n.o = c), n;
18
+ }, i = e.item.description ?? e.item.name, o = s(), l = e.item.color ? "white" : "var(--primary-foreground)";
19
+ return n.e = x(t, u, n.e), i !== n.t && y(t, "title", n.t = i), o !== n.a && d(r, "background", n.a = o), l !== n.o && d(r, "color", n.o = l), n;
20
20
  }, {
21
21
  e: void 0,
22
22
  t: void 0,
@@ -1,32 +1,32 @@
1
- import { insert as c, createComponent as g, setAttribute as o, effect as s, classList as d, template as l, delegateEvents as m } from "solid-js/web";
2
- import { For as v } from "solid-js";
3
- var f = /* @__PURE__ */ l('<div class="launchpad-pagination flex items-center justify-center gap-2">'), b = /* @__PURE__ */ l('<button type=button class="w-2 h-2 rounded-full cursor-pointer transition-all duration-300 outline-none focus-visible:ring-2">');
1
+ import { insert as u, createComponent as s, setAttribute as i, effect as g, classList as v, template as l, delegateEvents as d } from "solid-js/web";
2
+ import { For as f } from "solid-js";
3
+ var m = /* @__PURE__ */ l('<div class="launchpad-pagination flex items-center justify-center gap-2">'), b = /* @__PURE__ */ l('<button type=button class="w-2 h-2 rounded-full cursor-pointer transition-[background-color,color,transform] duration-[var(--floe-duration-slow)] outline-none focus-visible:ring-2">');
4
4
  function $(r) {
5
5
  return (() => {
6
- var a = f();
7
- return c(a, g(v, {
6
+ var a = m();
7
+ return u(a, s(f, {
8
8
  get each() {
9
9
  return Array.from({
10
10
  length: r.totalPages
11
- }, (t, e) => e);
11
+ }, (e, t) => t);
12
12
  },
13
- children: (t) => (() => {
14
- var e = b();
15
- return e.$$click = () => r.onPageChange(t), o(e, "aria-label", `Go to page ${t + 1}`), s((n) => {
16
- var u = {
17
- "bg-primary scale-125": r.currentPage === t,
18
- "bg-muted-foreground/30": r.currentPage !== t
19
- }, i = r.currentPage === t ? "page" : void 0;
20
- return n.e = d(e, u, n.e), i !== n.t && o(e, "aria-current", n.t = i), n;
13
+ children: (e) => (() => {
14
+ var t = b();
15
+ return t.$$click = () => r.onPageChange(e), i(t, "aria-label", `Go to page ${e + 1}`), g((n) => {
16
+ var c = {
17
+ "bg-primary scale-125": r.currentPage === e,
18
+ "bg-[var(--floe-ink-ghost)]": r.currentPage !== e
19
+ }, o = r.currentPage === e ? "page" : void 0;
20
+ return n.e = v(t, c, n.e), o !== n.t && i(t, "aria-current", n.t = o), n;
21
21
  }, {
22
22
  e: void 0,
23
23
  t: void 0
24
- }), e;
24
+ }), t;
25
25
  })()
26
26
  })), a;
27
27
  })();
28
28
  }
29
- m(["click"]);
29
+ d(["click"]);
30
30
  export {
31
31
  $ as LaunchpadPagination
32
32
  };
@@ -1,15 +1,15 @@
1
- import { insert as n, createComponent as u, effect as l, setAttribute as d, template as c, delegateEvents as i } from "solid-js/web";
1
+ import { insert as n, createComponent as i, effect as l, setAttribute as d, template as u, delegateEvents as c } from "solid-js/web";
2
2
  import { Search as s } from "../icons/index.js";
3
- var h = /* @__PURE__ */ c('<div class="launchpad-search w-full max-w-md mx-auto"><div class=relative><input type=text class="w-full h-10 pl-10 pr-4 rounded-lg bg-card/80 backdrop-blur-sm border border-border text-foreground placeholder:text-muted-foreground/60 outline-none transition-all duration-200 shadow-sm">');
4
- function f(t) {
3
+ var f = /* @__PURE__ */ u('<div class="launchpad-search w-full max-w-md mx-auto"><div class=relative><input type=text class="w-full h-10 pl-10 pr-4 rounded-control bg-card/80 backdrop-blur-sm border border-[var(--floe-line)] text-foreground placeholder:text-[var(--floe-ink-quiet)] outline-none transition-[border-color,box-shadow,background-color] duration-[var(--floe-duration-base)] shadow-[var(--floe-elevation-raised)]">');
4
+ function v(r) {
5
5
  return (() => {
6
- var r = h(), a = r.firstChild, e = a.firstChild;
7
- return n(a, u(s, {
8
- class: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"
9
- }), e), e.$$input = (o) => t.onChange(o.currentTarget.value), l(() => d(e, "placeholder", t.placeholder ?? "Search")), l(() => e.value = t.value), r;
6
+ var t = f(), a = t.firstChild, e = a.firstChild;
7
+ return n(a, i(s, {
8
+ class: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--floe-ink-soft)]"
9
+ }), e), e.$$input = (o) => r.onChange(o.currentTarget.value), l(() => d(e, "placeholder", r.placeholder ?? "Search")), l(() => e.value = r.value), t;
10
10
  })();
11
11
  }
12
- i(["input"]);
12
+ c(["input"]);
13
13
  export {
14
- f as LaunchpadSearch
14
+ v as LaunchpadSearch
15
15
  };
@@ -1,128 +1,126 @@
1
- import { insert as l, createComponent as o, effect as g, className as x, setAttribute as u, template as v, use as $, Dynamic as B, memo as D, delegateEvents as E } from "solid-js/web";
2
- import { createMemo as s, For as I, Show as h, onMount as R, onCleanup as S } from "solid-js";
3
- import { cn as y } from "../../utils/cn.js";
4
- import { deferNonBlocking as _ } from "../../utils/defer.js";
5
- import { Tooltip as j } from "../ui/Tooltip.js";
6
- import { resolveActivityBarClick as P } from "./activityBarBehavior.js";
7
- import { isBarItemContextMenuKey as T, keyboardBarItemContextMenuRequest as q } from "./barItemContextMenu.js";
8
- var K = /* @__PURE__ */ v('<div class="flex flex-col">'), N = /* @__PURE__ */ v('<nav data-floe-shell-slot=activity-bar style=border-right-color:var(--activity-bar-border)><div class="flex flex-col">'), X = /* @__PURE__ */ v('<div class="absolute left-0 top-0 w-1 h-full bg-primary rounded-r">'), Y = /* @__PURE__ */ v("<span>"), F = /* @__PURE__ */ v("<button type=button>");
9
- function Q(t) {
10
- const a = s(() => t.activeId), c = s(() => t.collapsed ?? !1), f = s(() => t.onActiveChange), b = s(() => t.onCollapsedChange), m = (e) => {
1
+ import { insert as d, createComponent as o, effect as x, className as g, setAttribute as u, template as b, use as D, Dynamic as E, memo as R, delegateEvents as S } from "solid-js/web";
2
+ import { createMemo as m, For as M, Show as B, onMount as j, onCleanup as q } from "solid-js";
3
+ import { cn as v } from "../../utils/cn.js";
4
+ import { deferNonBlocking as P } from "../../utils/defer.js";
5
+ import { Tooltip as T } from "../ui/Tooltip.js";
6
+ import { resolveActivityBarClick as _ } from "./activityBarBehavior.js";
7
+ import { isBarItemContextMenuKey as K, keyboardBarItemContextMenuRequest as N } from "./barItemContextMenu.js";
8
+ var X = /* @__PURE__ */ b('<div class="flex flex-col">'), Y = /* @__PURE__ */ b('<nav data-floe-shell-slot=activity-bar style=border-right-color:var(--activity-bar-border)><div class="flex flex-col">'), F = /* @__PURE__ */ b("<span>"), H = /* @__PURE__ */ b("<button type=button data-floe-interactive=press><span aria-hidden=true>");
9
+ function U(t) {
10
+ const r = m(() => t.activeId), c = m(() => t.collapsed ?? !1), s = m(() => t.onActiveChange), h = m(() => t.onCollapsedChange), f = (e) => {
11
11
  if (e.onClick) {
12
- _(() => e.onClick());
12
+ P(() => e.onClick());
13
13
  return;
14
14
  }
15
- const i = P({
15
+ const a = _({
16
16
  clickedId: e.id,
17
- activeId: a(),
17
+ activeId: r(),
18
18
  collapsed: c(),
19
19
  behavior: e.collapseBehavior
20
20
  });
21
- i.nextActiveId !== a() && (typeof i.openSidebar == "boolean" ? f()(i.nextActiveId, {
22
- openSidebar: i.openSidebar
23
- }) : f()(i.nextActiveId)), typeof i.nextCollapsed == "boolean" && b()?.(i.nextCollapsed);
21
+ a.nextActiveId !== r() && (typeof a.openSidebar == "boolean" ? s()(a.nextActiveId, {
22
+ openSidebar: a.openSidebar
23
+ }) : s()(a.nextActiveId)), typeof a.nextCollapsed == "boolean" && h()?.(a.nextCollapsed);
24
24
  };
25
25
  return (() => {
26
- var e = N(), i = e.firstChild;
27
- return l(i, o(I, {
26
+ var e = Y(), a = e.firstChild;
27
+ return d(a, o(M, {
28
28
  get each() {
29
29
  return t.items;
30
30
  },
31
- children: (n) => o(M, {
31
+ children: (n) => o($, {
32
32
  item: n,
33
33
  get isActive() {
34
- return a() === n.id;
34
+ return r() === n.id;
35
35
  },
36
- onClick: () => m(n)
36
+ onClick: () => f(n)
37
37
  })
38
- })), l(e, o(h, {
38
+ })), d(e, o(B, {
39
39
  get when() {
40
40
  return t.bottomItems?.length;
41
41
  },
42
42
  get children() {
43
- var n = K();
44
- return l(n, o(I, {
43
+ var n = X();
44
+ return d(n, o(M, {
45
45
  get each() {
46
46
  return t.bottomItems;
47
47
  },
48
- children: (r) => o(M, {
49
- item: r,
50
- isActive: !1,
51
- onClick: () => m(r)
48
+ children: (i) => o($, {
49
+ item: i,
50
+ get isActive() {
51
+ return r() === i.id;
52
+ },
53
+ onClick: () => f(i)
52
54
  })
53
55
  })), n;
54
56
  }
55
- }), null), g((n) => {
56
- var r = y("w-10 md:w-12 flex flex-col justify-between shrink-0 min-h-0", "bg-activity-bar border-r border-border", t.class), d = t.ariaLabel;
57
- return r !== n.e && x(e, n.e = r), d !== n.t && u(e, "aria-label", n.t = d), n;
57
+ }), null), x((n) => {
58
+ var i = v("w-10 md:w-12 flex flex-col justify-between shrink-0 min-h-0", "bg-activity-bar border-r border-[var(--floe-line-quiet)]", t.class), l = t.ariaLabel;
59
+ return i !== n.e && g(e, n.e = i), l !== n.t && u(e, "aria-label", n.t = l), n;
58
60
  }, {
59
61
  e: void 0,
60
62
  t: void 0
61
63
  }), e;
62
64
  })();
63
65
  }
64
- function M(t) {
65
- let a;
66
- const c = () => typeof t.item.badge == "function" ? t.item.badge() : t.item.badge, f = () => typeof t.item.ariaExpanded == "function" ? t.item.ariaExpanded() : t.item.ariaExpanded;
67
- R(() => t.item.buttonRef?.(a ?? null)), S(() => t.item.buttonRef?.(null));
68
- const b = (e) => {
66
+ function $(t) {
67
+ let r;
68
+ const c = () => typeof t.item.badge == "function" ? t.item.badge() : t.item.badge, s = () => typeof t.item.ariaExpanded == "function" ? t.item.ariaExpanded() : t.item.ariaExpanded;
69
+ j(() => t.item.buttonRef?.(r ?? null)), q(() => t.item.buttonRef?.(null));
70
+ const h = (e) => {
69
71
  t.item.onContextMenu && (e.preventDefault(), e.stopPropagation(), t.item.onContextMenu({
70
72
  trigger: e.currentTarget,
71
73
  clientX: e.clientX,
72
74
  clientY: e.clientY,
73
75
  source: "pointer"
74
76
  }));
75
- }, m = (e) => {
76
- !t.item.onContextMenu || !T(e) || (e.preventDefault(), e.stopPropagation(), t.item.onContextMenu(q(e.currentTarget)));
77
+ }, f = (e) => {
78
+ !t.item.onContextMenu || !K(e) || (e.preventDefault(), e.stopPropagation(), t.item.onContextMenu(N(e.currentTarget)));
77
79
  };
78
- return o(j, {
80
+ return o(T, {
79
81
  get content() {
80
82
  return t.item.label;
81
83
  },
82
84
  placement: "right",
83
85
  delay: 0,
84
86
  get children() {
85
- var e = F();
86
- e.$$keydown = m, e.$$contextmenu = b, e.$$click = () => t.onClick();
87
- var i = a;
88
- return typeof i == "function" ? $(i, e) : a = e, l(e, o(h, {
89
- get when() {
90
- return t.isActive;
91
- },
92
- get children() {
93
- return X();
94
- }
95
- }), null), l(e, o(B, {
87
+ var e = H(), a = e.firstChild;
88
+ e.$$keydown = f, e.$$contextmenu = h, e.$$click = () => t.onClick();
89
+ var n = r;
90
+ return typeof n == "function" ? D(n, e) : r = e, d(e, o(E, {
96
91
  get component() {
97
92
  return t.item.icon;
98
93
  },
99
- class: "w-5 h-5"
100
- }), null), l(e, o(h, {
94
+ get class() {
95
+ return v("relative w-5 h-5 transition-colors duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", t.isActive ? "text-activity-bar-foreground-active" : "group-hover/activity-item:text-activity-bar-foreground-active");
96
+ }
97
+ }), null), d(e, o(B, {
101
98
  get when() {
102
99
  return c();
103
100
  },
104
101
  get children() {
105
- var n = Y();
106
- return l(n, (() => {
107
- var r = D(() => typeof c() == "number" && c() > 99);
108
- return () => r() ? "99+" : c();
109
- })()), g(() => x(n, y("absolute top-0.5 right-0.5 min-w-3.5 h-3.5 px-1", "flex items-center justify-center", "text-[9px] font-medium rounded-full", "bg-activity-bar-badge text-activity-bar-badge-foreground"))), n;
102
+ var i = F();
103
+ return d(i, (() => {
104
+ var l = R(() => typeof c() == "number" && c() > 99);
105
+ return () => l() ? "99+" : c();
106
+ })()), x(() => g(i, v("absolute top-0.5 right-0.5 min-w-3.5 h-3.5 px-1", "flex items-center justify-center", "text-[length:var(--floe-type-caption)] font-medium rounded-full", "bg-activity-bar-badge text-activity-bar-badge-foreground"))), i;
110
107
  }
111
- }), null), g((n) => {
112
- var r = y("relative w-full aspect-square flex items-center justify-center cursor-pointer", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset", t.isActive ? "text-activity-bar-foreground-active bg-accent" : "text-activity-bar-foreground transition-[color,background-color] duration-100 hover:text-activity-bar-foreground-active hover:bg-accent/50"), d = t.item.label, C = t.isActive, k = f(), w = t.item.ariaControls, A = t.item.ariaHasPopup ?? (t.item.onContextMenu ? "menu" : void 0);
113
- return r !== n.e && x(e, n.e = r), d !== n.t && u(e, "aria-label", n.t = d), C !== n.a && u(e, "aria-pressed", n.a = C), k !== n.o && u(e, "aria-expanded", n.o = k), w !== n.i && u(e, "aria-controls", n.i = w), A !== n.n && u(e, "aria-haspopup", n.n = A), n;
108
+ }), null), x((i) => {
109
+ var l = v("group/activity-item relative w-full aspect-square flex items-center justify-center cursor-pointer", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset", "text-activity-bar-foreground", t.isActive && "text-activity-bar-foreground-active"), y = t.item.label, C = t.isActive, k = s(), A = t.item.ariaControls, w = t.item.ariaHasPopup ?? (t.item.onContextMenu ? "menu" : void 0), I = v("absolute inset-1 rounded-md", "transition-colors duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", t.isActive ? "bg-[var(--floe-state-selected)]" : "bg-transparent group-hover/activity-item:bg-[var(--floe-state-hover)]");
110
+ return l !== i.e && g(e, i.e = l), y !== i.t && u(e, "aria-label", i.t = y), C !== i.a && u(e, "aria-pressed", i.a = C), k !== i.o && u(e, "aria-expanded", i.o = k), A !== i.i && u(e, "aria-controls", i.i = A), w !== i.n && u(e, "aria-haspopup", i.n = w), I !== i.s && g(a, i.s = I), i;
114
111
  }, {
115
112
  e: void 0,
116
113
  t: void 0,
117
114
  a: void 0,
118
115
  o: void 0,
119
116
  i: void 0,
120
- n: void 0
117
+ n: void 0,
118
+ s: void 0
121
119
  }), e;
122
120
  }
123
121
  });
124
122
  }
125
- E(["click", "contextmenu", "keydown"]);
123
+ S(["click", "contextmenu", "keydown"]);
126
124
  export {
127
- Q as ActivityBar
125
+ U as ActivityBar
128
126
  };
@@ -3,5 +3,15 @@ export declare function sanitizeDisplayMode(value: unknown, fallback?: DisplayMo
3
3
  export interface DisplayModeSwitcherProps {
4
4
  mode: DisplayMode;
5
5
  onChange: (mode: DisplayMode) => void;
6
+ class?: string;
6
7
  }
8
+ /**
9
+ * Display-mode switcher.
10
+ *
11
+ * The three modes are peer views of the same workspace, so the control is a
12
+ * segmented rail rather than three buttons: one travelling pill marks the
13
+ * current mode and slides to the next one. The pill is the selection — the
14
+ * faces under it stay flat — which keeps a single thing moving and lets the
15
+ * eye follow it across the bar.
16
+ */
7
17
  export declare function DisplayModeSwitcher(props: DisplayModeSwitcherProps): import("solid-js").JSX.Element;
@@ -1,52 +1,121 @@
1
- import { insert as a, createComponent as m, memo as h, effect as v, setAttribute as y, template as o, delegateEvents as p } from "solid-js/web";
2
- import { For as _ } from "solid-js";
3
- import { Bookmark as u, LayoutDashboard as k, Grid3x3 as f } from "../icons/index.js";
4
- var w = /* @__PURE__ */ o('<div class=display-mode-switcher role=tablist aria-label="Display mode">'), D = /* @__PURE__ */ o("<button type=button class=display-mode-switcher__pill role=tab><span class=display-mode-switcher__label>"), $ = /* @__PURE__ */ o("<span class=display-mode-switcher__pill-bg>");
5
- const g = /* @__PURE__ */ new Set(["activity", "deck", "workbench"]);
6
- function E(i, r = "activity") {
7
- return typeof i == "string" && g.has(i) ? i : r;
1
+ import { insert as b, memo as z, effect as y, setStyleProperty as p, createComponent as k, use as D, setAttribute as A, className as R, template as x, delegateEvents as B } from "solid-js/web";
2
+ import { createSignal as C, createEffect as M, onCleanup as $, For as F } from "solid-js";
3
+ import { cn as E } from "../../utils/cn.js";
4
+ import { Bookmark as I, LayoutDashboard as O, Grid3x3 as P } from "../icons/index.js";
5
+ var N = /* @__PURE__ */ x('<div role=tablist aria-label="Display mode"data-floe-surface=inset data-floe-surface-part=rail>'), q = /* @__PURE__ */ x('<span aria-hidden=true data-floe-surface=raised data-floe-surface-part=segment-pill class="display-mode-switcher__pill pointer-events-none absolute top-0.5 bottom-0.5 left-0 rounded-[calc(var(--floe-radius-control)-2px)]">'), W = /* @__PURE__ */ x('<button type=button role=tab><span class="display-mode-switcher__label whitespace-nowrap">');
6
+ const G = /* @__PURE__ */ new Set(["activity", "deck", "workbench"]);
7
+ function Q(r, s = "activity") {
8
+ return typeof r == "string" && G.has(r) ? r : s;
8
9
  }
9
- const A = [{
10
+ const H = [{
10
11
  id: "activity",
11
12
  label: "Activity",
12
- icon: u
13
+ icon: I
13
14
  }, {
14
15
  id: "deck",
15
16
  label: "Deck",
16
- icon: k
17
+ icon: O
17
18
  }, {
18
19
  id: "workbench",
19
20
  label: "Workbench",
20
- icon: f
21
- }];
22
- function L(i) {
21
+ icon: P
22
+ }], L = {
23
+ x: 0,
24
+ width: 0,
25
+ visible: !1
26
+ };
27
+ let h;
28
+ function T(r) {
29
+ let s;
30
+ const d = /* @__PURE__ */ new Map(), [g, f] = C(L), [w, S] = C(!1), _ = () => {
31
+ const o = s, v = d.get(r.mode);
32
+ if (!o || !v) {
33
+ f(L);
34
+ return;
35
+ }
36
+ const n = o.getBoundingClientRect();
37
+ if (n.width <= 0)
38
+ return;
39
+ const l = (a) => {
40
+ const e = d.get(a);
41
+ if (!e) return;
42
+ const c = e.offsetParent === o && Number.isFinite(e.offsetLeft), u = c ? e.offsetLeft : e.getBoundingClientRect().left - n.left, m = c ? e.offsetWidth : e.getBoundingClientRect().width;
43
+ return {
44
+ x: u,
45
+ width: m
46
+ };
47
+ }, t = l(r.mode);
48
+ if (!t || t.width <= 0) return;
49
+ const i = h !== void 0 && h !== r.mode ? l(h) : void 0;
50
+ if (w())
51
+ f({
52
+ ...t,
53
+ visible: t.width > 0
54
+ });
55
+ else {
56
+ const a = i ?? t;
57
+ f({
58
+ ...a,
59
+ visible: a.width > 0
60
+ }), requestAnimationFrame(() => {
61
+ w() || (S(!0), requestAnimationFrame(() => {
62
+ i && f({
63
+ ...t,
64
+ visible: t.width > 0
65
+ });
66
+ }));
67
+ });
68
+ }
69
+ h = r.mode;
70
+ };
71
+ if (M(() => {
72
+ r.mode, _();
73
+ }), typeof ResizeObserver < "u") {
74
+ const o = new ResizeObserver(() => _());
75
+ M(() => {
76
+ s && o.observe(s);
77
+ }), $(() => o.disconnect());
78
+ }
23
79
  return (() => {
24
- var r = w();
25
- return a(r, m(_, {
26
- each: A,
27
- children: (l) => {
28
- const b = l.icon, c = () => i.mode === l.id;
80
+ var o = N(), v = s;
81
+ return typeof v == "function" ? D(v, o) : s = o, b(o, (() => {
82
+ var n = z(() => !!g().visible);
83
+ return () => n() ? (() => {
84
+ var l = q();
85
+ return y((t) => {
86
+ var i = `translate3d(${g().x}px, 0, 0)`, a = `${g().width}px`, e = w() ? void 0 : "none";
87
+ return i !== t.e && p(l, "transform", t.e = i), a !== t.t && p(l, "width", t.t = a), e !== t.a && p(l, "transition-property", t.a = e), t;
88
+ }, {
89
+ e: void 0,
90
+ t: void 0,
91
+ a: void 0
92
+ }), l;
93
+ })() : null;
94
+ })(), null), b(o, k(F, {
95
+ each: H,
96
+ children: (n) => {
97
+ const l = n.icon, t = () => r.mode === n.id;
29
98
  return (() => {
30
- var e = D(), s = e.firstChild;
31
- return e.$$click = () => i.onChange(l.id), a(e, (() => {
32
- var t = h(() => !!c());
33
- return () => t() ? $() : null;
34
- })(), s), a(e, m(b, {
35
- class: "display-mode-switcher__icon"
36
- }), s), a(s, () => l.label), v((t) => {
37
- var n = !!c(), d = c();
38
- return n !== t.e && e.classList.toggle("is-active", t.e = n), d !== t.t && y(e, "aria-selected", t.t = d), t;
99
+ var i = W(), a = i.firstChild;
100
+ return i.$$click = () => r.onChange(n.id), D((e) => {
101
+ d.set(n.id, e), $(() => d.delete(n.id));
102
+ }, i), b(i, k(l, {
103
+ class: "display-mode-switcher__icon h-3 w-3 shrink-0"
104
+ }), a), b(a, () => n.label), y((e) => {
105
+ var c = t(), u = t() ? 0 : -1, m = E("display-mode-switcher__option relative z-10 inline-flex cursor-pointer items-center", "gap-1.5 rounded-sm px-2", "transition-colors duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-[var(--floe-plane)]", t() ? "text-foreground" : "text-[var(--floe-ink-soft)] hover:text-foreground");
106
+ return c !== e.e && A(i, "aria-selected", e.e = c), u !== e.t && A(i, "tabindex", e.t = u), m !== e.a && R(i, e.a = m), e;
39
107
  }, {
40
108
  e: void 0,
41
- t: void 0
42
- }), e;
109
+ t: void 0,
110
+ a: void 0
111
+ }), i;
43
112
  })();
44
113
  }
45
- })), r;
114
+ }), null), y(() => R(o, E("display-mode-switcher relative inline-flex items-stretch", "h-[var(--floe-control-height-sm)] rounded-control border border-[var(--floe-line)] p-0.5", "text-[length:var(--floe-type-caption)] leading-[var(--floe-line-control)]", r.class))), o;
46
115
  })();
47
116
  }
48
- p(["click"]);
117
+ B(["click"]);
49
118
  export {
50
- L as DisplayModeSwitcher,
51
- E as sanitizeDisplayMode
119
+ T as DisplayModeSwitcher,
120
+ Q as sanitizeDisplayMode
52
121
  };