@floegence/floe-webapp-core 0.86.62 → 0.86.64

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 (33) hide show
  1. package/dist/app/FloeRegistryContributions.js +0 -3
  2. package/dist/components/icons/ActivityRailIcons.d.ts +30 -0
  3. package/dist/components/icons/ActivityRailIcons.js +68 -0
  4. package/dist/components/icons/index.d.ts +1 -0
  5. package/dist/components/layout/ActivityBar.js +55 -54
  6. package/dist/components/layout/DisplayModeSwitcher.d.ts +10 -0
  7. package/dist/components/layout/DisplayModeSwitcher.js +102 -33
  8. package/dist/components/layout/Shell.d.ts +0 -6
  9. package/dist/components/layout/Shell.js +212 -258
  10. package/dist/components/layout/ThemeToggle.d.ts +19 -0
  11. package/dist/components/layout/ThemeToggle.js +39 -0
  12. package/dist/components/layout/index.d.ts +1 -1
  13. package/dist/components/ui/Button.js +22 -14
  14. package/dist/components/ui/Dialog.js +101 -95
  15. package/dist/components/ui/Tabs.js +172 -159
  16. package/dist/components/ui/dialogHeightMotion.d.ts +9 -0
  17. package/dist/components/ui/dialogHeightMotion.js +49 -0
  18. package/dist/components/ui/index.d.ts +1 -0
  19. package/dist/context/ComponentRegistry.d.ts +0 -8
  20. package/dist/context/ComponentRegistry.js +61 -67
  21. package/dist/context/FloeConfigContext.d.ts +0 -6
  22. package/dist/context/FloeConfigContext.js +9 -15
  23. package/dist/context/index.d.ts +1 -1
  24. package/dist/display-mode.css +2 -45
  25. package/dist/full.js +693 -683
  26. package/dist/icons.js +112 -102
  27. package/dist/layout.js +33 -35
  28. package/dist/styles.css +1 -1
  29. package/dist/surface.css +53 -1
  30. package/dist/ui.js +33 -31
  31. package/package.json +1 -1
  32. package/dist/components/layout/BottomBar.d.ts +0 -29
  33. package/dist/components/layout/BottomBar.js +0 -70
@@ -24,9 +24,6 @@ function h(r) {
24
24
  get commands() {
25
25
  return t.current.commands;
26
26
  },
27
- get statusBar() {
28
- return t.current.statusBar;
29
- },
30
27
  async onMount(o) {
31
28
  const e = t.current;
32
29
  t.mountedDefinition = e, await e.onMount?.(o);
@@ -0,0 +1,30 @@
1
+ import type { Component, JSX } from 'solid-js';
2
+ export interface ActivityRailIconProps extends JSX.SvgSVGAttributes<SVGSVGElement> {
3
+ size?: number | string;
4
+ }
5
+ /** Launchpad — four rounded tiles in a 2x2 field. */
6
+ export declare const RailLaunchpad: Component<ActivityRailIconProps>;
7
+ /** Notes — a page with a folded corner and writing rules. */
8
+ export declare const RailNotes: Component<ActivityRailIconProps>;
9
+ /** Showcase — a workspace frame with chrome and a side rail. */
10
+ export declare const RailShowcase: Component<ActivityRailIconProps>;
11
+ /** Files — a tabbed folder. */
12
+ export declare const RailFiles: Component<ActivityRailIconProps>;
13
+ /** Search — lens. */
14
+ export declare const RailSearch: Component<ActivityRailIconProps>;
15
+ /** Settings — two rails with a knob each. Legible where a gear is not. */
16
+ export declare const RailSettings: Component<ActivityRailIconProps>;
17
+ /** Chat — speech bubble with a tail. */
18
+ export declare const RailChat: Component<ActivityRailIconProps>;
19
+ /** Design tokens — sheets stacked behind a front card. */
20
+ export declare const RailDesignTokens: Component<ActivityRailIconProps>;
21
+ export declare const ActivityRailIcons: {
22
+ readonly launchpad: Component<ActivityRailIconProps>;
23
+ readonly notes: Component<ActivityRailIconProps>;
24
+ readonly showcase: Component<ActivityRailIconProps>;
25
+ readonly files: Component<ActivityRailIconProps>;
26
+ readonly search: Component<ActivityRailIconProps>;
27
+ readonly settings: Component<ActivityRailIconProps>;
28
+ readonly chat: Component<ActivityRailIconProps>;
29
+ readonly designTokens: Component<ActivityRailIconProps>;
30
+ };
@@ -0,0 +1,68 @@
1
+ import { createComponent as s, mergeProps as a, insert as c, effect as f, setAttribute as h, template as e } from "solid-js/web";
2
+ var u = /* @__PURE__ */ e('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden=true>'), d = /* @__PURE__ */ e("<svg><rect x=3.5 y=3.5 width=7.5 height=7.5 rx=2.2></svg>", !1, !0, !1), o = /* @__PURE__ */ e("<svg><rect x=13 y=3.5 width=7.5 height=7.5 rx=2.2></svg>", !1, !0, !1), p = /* @__PURE__ */ e("<svg><rect x=3.5 y=13 width=7.5 height=7.5 rx=2.2></svg>", !1, !0, !1), m = /* @__PURE__ */ e("<svg><rect x=13 y=13 width=7.5 height=7.5 rx=2.2></svg>", !1, !0, !1), _ = /* @__PURE__ */ e('<svg><path d="M7 3.5h6.75a1.5 1.5 0 0 1 1.06.44l5.25 5.25a1.5 1.5 0 0 1 .44 1.06V18.5a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-13a2 2 0 0 1 2-2Z"></svg>', !1, !0, !1), $ = /* @__PURE__ */ e('<svg><path d="M13.75 3.5v5.25a1.5 1.5 0 0 0 1.5 1.5H20.5"></svg>', !1, !0, !1), x = /* @__PURE__ */ e('<svg><path d="M8.5 13h9"></svg>', !1, !0, !1), w = /* @__PURE__ */ e('<svg><path d="M8.5 16.75h5.5"></svg>', !1, !0, !1), M = /* @__PURE__ */ e("<svg><rect x=3.5 y=4.5 width=17 height=15 rx=2.5></svg>", !1, !0, !1), y = /* @__PURE__ */ e('<svg><path d="M3.5 8.75h17"></svg>', !1, !0, !1), R = /* @__PURE__ */ e('<svg><path d="M9.5 8.75v10.75"></svg>', !1, !0, !1), k = /* @__PURE__ */ e('<svg><path d="M3.5 17.5V6.5a2 2 0 0 1 2-2h3.35a2 2 0 0 1 1.6.8l1 1.35a2 2 0 0 0 1.6.8h3.45a2 2 0 0 1 2 2v8.05a2 2 0 0 1-2 2H5.5a2 2 0 0 1-2-2Z"></svg>', !1, !0, !1), H = /* @__PURE__ */ e("<svg><circle cx=10.75 cy=10.75 r=6.25></svg>", !1, !0, !1), C = /* @__PURE__ */ e('<svg><path d="m15.25 15.25 5.25 5.25"></svg>', !1, !0, !1), S = /* @__PURE__ */ e('<svg><path d="M3.5 6.5h3.25"></svg>', !1, !0, !1), Z = /* @__PURE__ */ e('<svg><path d="M12.75 6.5h7.75"></svg>', !1, !0, !1), z = /* @__PURE__ */ e("<svg><circle cx=9.75 cy=6.5 r=2.75></svg>", !1, !0, !1), A = /* @__PURE__ */ e('<svg><path d="M3.5 17.5h8.75"></svg>', !1, !0, !1), B = /* @__PURE__ */ e('<svg><path d="M18.25 17.5h2.25"></svg>', !1, !0, !1), L = /* @__PURE__ */ e("<svg><circle cx=15.25 cy=17.5 r=2.75></svg>", !1, !0, !1), T = /* @__PURE__ */ e('<svg><path d="M20.5 7.5a3 3 0 0 0-3-3h-11a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h1.5v3.5L11.5 16.5H17.5a3 3 0 0 0 3-3Z"></svg>', !1, !0, !1), V = /* @__PURE__ */ e("<svg><rect x=6.5 y=3.5 width=14 height=14 rx=3.5></svg>", !1, !0, !1), b = /* @__PURE__ */ e('<svg><path d="M3.5 8.5v8a4 4 0 0 0 4 4h6"></svg>', !1, !0, !1);
3
+ function l(t) {
4
+ return (() => {
5
+ var g = u();
6
+ return c(g, () => t.children), f((r) => {
7
+ var v = t.size ?? 24, i = t.size ?? 24, n = t.class;
8
+ return v !== r.e && h(g, "width", r.e = v), i !== r.t && h(g, "height", r.t = i), n !== r.a && h(g, "class", r.a = n), r;
9
+ }, {
10
+ e: void 0,
11
+ t: void 0,
12
+ a: void 0
13
+ }), g;
14
+ })();
15
+ }
16
+ const j = (t) => s(l, a(t, {
17
+ get children() {
18
+ return [d(), o(), p(), m()];
19
+ }
20
+ })), D = (t) => s(l, a(t, {
21
+ get children() {
22
+ return [_(), $(), x(), w()];
23
+ }
24
+ })), F = (t) => s(l, a(t, {
25
+ get children() {
26
+ return [M(), y(), R()];
27
+ }
28
+ })), I = (t) => s(l, a(t, {
29
+ get children() {
30
+ return k();
31
+ }
32
+ })), N = (t) => s(l, a(t, {
33
+ get children() {
34
+ return [H(), C()];
35
+ }
36
+ })), P = (t) => s(l, a(t, {
37
+ get children() {
38
+ return [S(), Z(), z(), A(), B(), L()];
39
+ }
40
+ })), q = (t) => s(l, a(t, {
41
+ get children() {
42
+ return T();
43
+ }
44
+ })), E = (t) => s(l, a(t, {
45
+ get children() {
46
+ return [V(), b()];
47
+ }
48
+ })), J = {
49
+ launchpad: j,
50
+ notes: D,
51
+ showcase: F,
52
+ files: I,
53
+ search: N,
54
+ settings: P,
55
+ chat: q,
56
+ designTokens: E
57
+ };
58
+ export {
59
+ J as ActivityRailIcons,
60
+ q as RailChat,
61
+ E as RailDesignTokens,
62
+ I as RailFiles,
63
+ j as RailLaunchpad,
64
+ D as RailNotes,
65
+ N as RailSearch,
66
+ P as RailSettings,
67
+ F as RailShowcase
68
+ };
@@ -3,6 +3,7 @@ import type { JSX } from 'solid-js';
3
3
  export interface IconProps extends JSX.SvgSVGAttributes<SVGSVGElement> {
4
4
  size?: number | string;
5
5
  }
6
+ export { ActivityRailIcons, RailLaunchpad, RailNotes, RailShowcase, RailFiles, RailSearch, RailSettings, RailChat, RailDesignTokens, } from './ActivityRailIcons';
6
7
  export { DockTerminal, DockFolder, DockCpu, DockActivity, DockFileCode, DockSearch, DockGlobe, DockSparkles, DockBot, DockCode, DockMessageSquare, DockRegion, DockText, DockLayoutDashboard, DockLayers, } from './DockIcons';
7
8
  export declare const Region: (props?: IconProps) => JSX.Element;
8
9
  export declare const TextTool: (props?: IconProps) => JSX.Element;
@@ -1,111 +1,113 @@
1
- import { insert as v, createComponent as o, effect as x, className as s, setAttribute as u, template as h, use as E, Dynamic as R, memo as j, delegateEvents as q } from "solid-js/web";
2
- import { createMemo as b, For as B, Show as D, onMount as P, onCleanup as T } from "solid-js";
3
- import { cn as d } from "../../utils/cn.js";
4
- import { deferNonBlocking as _ } from "../../utils/defer.js";
5
- import { Tooltip as K } from "../ui/Tooltip.js";
6
- import { resolveActivityBarClick as N } from "./activityBarBehavior.js";
7
- import { isBarItemContextMenuKey as X, keyboardBarItemContextMenuRequest as Y } from "./barItemContextMenu.js";
8
- var F = /* @__PURE__ */ h('<div class="flex flex-col">'), H = /* @__PURE__ */ h('<nav data-floe-shell-slot=activity-bar style=border-right-color:var(--activity-bar-border)><div class="flex flex-col">'), L = /* @__PURE__ */ h("<span>"), V = /* @__PURE__ */ h("<button type=button data-floe-interactive=press><span aria-hidden=true></span><span aria-hidden=true>");
9
- function Z(t) {
10
- const l = b(() => t.activeId), c = b(() => t.collapsed ?? !1), f = b(() => t.onActiveChange), y = b(() => 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 a = N({
15
+ const a = _({
16
16
  clickedId: e.id,
17
- activeId: l(),
17
+ activeId: r(),
18
18
  collapsed: c(),
19
19
  behavior: e.collapseBehavior
20
20
  });
21
- a.nextActiveId !== l() && (typeof a.openSidebar == "boolean" ? f()(a.nextActiveId, {
21
+ a.nextActiveId !== r() && (typeof a.openSidebar == "boolean" ? s()(a.nextActiveId, {
22
22
  openSidebar: a.openSidebar
23
- }) : f()(a.nextActiveId)), typeof a.nextCollapsed == "boolean" && y()?.(a.nextCollapsed);
23
+ }) : s()(a.nextActiveId)), typeof a.nextCollapsed == "boolean" && h()?.(a.nextCollapsed);
24
24
  };
25
25
  return (() => {
26
- var e = H(), a = e.firstChild;
27
- return v(a, o(B, {
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(S, {
31
+ children: (n) => o($, {
32
32
  item: n,
33
33
  get isActive() {
34
- return l() === n.id;
34
+ return r() === n.id;
35
35
  },
36
- onClick: () => m(n)
36
+ onClick: () => f(n)
37
37
  })
38
- })), v(e, o(D, {
38
+ })), d(e, o(B, {
39
39
  get when() {
40
40
  return t.bottomItems?.length;
41
41
  },
42
42
  get children() {
43
- var n = F();
44
- return v(n, o(B, {
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(S, {
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
57
  }), null), x((n) => {
56
- var r = d("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), i = t.ariaLabel;
57
- return r !== n.e && s(e, n.e = r), i !== n.t && u(e, "aria-label", n.t = i), 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 S(t) {
65
- let l;
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
- P(() => t.item.buttonRef?.(l ?? null)), T(() => t.item.buttonRef?.(null));
68
- const y = (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 || !X(e) || (e.preventDefault(), e.stopPropagation(), t.item.onContextMenu(Y(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(K, {
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 = V(), a = e.firstChild, n = a.nextSibling;
86
- e.$$keydown = m, e.$$contextmenu = y, e.$$click = () => t.onClick();
87
- var r = l;
88
- return typeof r == "function" ? E(r, e) : l = e, v(e, o(R, {
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, {
89
91
  get component() {
90
92
  return t.item.icon;
91
93
  },
92
94
  get class() {
93
- return d("relative w-5 h-5 transition-[color,transform] 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 group-hover/activity-item:-translate-y-px");
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");
94
96
  }
95
- }), null), v(e, o(D, {
97
+ }), null), d(e, o(B, {
96
98
  get when() {
97
99
  return c();
98
100
  },
99
101
  get children() {
100
- var i = L();
101
- return v(i, (() => {
102
- var g = j(() => typeof c() == "number" && c() > 99);
103
- return () => g() ? "99+" : c();
104
- })()), x(() => s(i, d("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;
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;
105
107
  }
106
108
  }), null), x((i) => {
107
- var g = d("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"), C = t.item.label, k = t.isActive, A = f(), w = t.item.ariaControls, I = t.item.ariaHasPopup ?? (t.item.onContextMenu ? "menu" : void 0), M = d("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)]"), $ = d("absolute left-0 top-1/2 -translate-y-1/2 w-[2px] rounded-full", "transition-[height,background-color] duration-[var(--floe-duration-base)] ease-[var(--floe-ease-out)]", t.isActive ? "h-4 bg-[var(--activity-bar-foreground-active)]" : "h-1.5 bg-transparent group-hover/activity-item:h-2.5 group-hover/activity-item:bg-[var(--floe-line-strong)]");
108
- return g !== i.e && s(e, i.e = g), C !== i.t && u(e, "aria-label", i.t = C), k !== i.a && u(e, "aria-pressed", i.a = k), A !== i.o && u(e, "aria-expanded", i.o = A), w !== i.i && u(e, "aria-controls", i.i = w), I !== i.n && u(e, "aria-haspopup", i.n = I), M !== i.s && s(a, i.s = M), $ !== i.h && s(n, i.h = $), 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;
109
111
  }, {
110
112
  e: void 0,
111
113
  t: void 0,
@@ -113,13 +115,12 @@ function S(t) {
113
115
  o: void 0,
114
116
  i: void 0,
115
117
  n: void 0,
116
- s: void 0,
117
- h: void 0
118
+ s: void 0
118
119
  }), e;
119
120
  }
120
121
  });
121
122
  }
122
- q(["click", "contextmenu", "keydown"]);
123
+ S(["click", "contextmenu", "keydown"]);
123
124
  export {
124
- Z as ActivityBar
125
+ U as ActivityBar
125
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
  };
@@ -21,9 +21,6 @@ export interface ShellSlotClassNames {
21
21
  contentArea?: string;
22
22
  main?: string;
23
23
  terminalPanel?: string;
24
- bottomBar?: string;
25
- /** Height class for the bottom bar, defaults to 'h-5' (20px). Use Tailwind height classes like 'h-7' (28px). */
26
- bottomBarHeight?: string;
27
24
  mobileTabBar?: string;
28
25
  }
29
26
  export interface ShellProps {
@@ -52,9 +49,6 @@ export interface ShellProps {
52
49
  */
53
50
  activityBottomItemsMobileMode?: 'hidden' | 'topBar';
54
51
  topBarActions?: JSX.Element;
55
- /** Defaults to visible. Hidden omits the desktop status bar and its content without reserving space. Mobile navigation is unchanged. */
56
- bottomBarMode?: 'visible' | 'hidden';
57
- bottomBarItems?: JSX.Element;
58
52
  /** Stable content directly above mobile navigation, such as a composer anchor. */
59
53
  mobileAccessory?: JSX.Element;
60
54
  /** Hide navigation only while a focused editor is occluded by the soft keyboard. */