@floegence/floe-webapp-core 0.35.21 → 0.35.22

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.
@@ -1,74 +1,77 @@
1
- import { insert as i, createComponent as o, use as B, effect as k, className as s, setStyleProperty as C, template as a, delegateEvents as M } from "solid-js/web";
2
- import { Show as l } from "solid-js";
3
- import { useLayout as j } from "../../context/LayoutContext.js";
4
- import { cn as d } from "../../utils/cn.js";
5
- import { ResizeHandle as A } from "./ResizeHandle.js";
6
- var E = /* @__PURE__ */ a('<div class="min-w-0 flex items-center gap-1.5">'), O = /* @__PURE__ */ a('<button type=button class="flex items-center justify-center w-5 h-5 rounded cursor-pointer hover:bg-sidebar-accent/80 transition-colors"aria-label="Close sidebar"><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="w-3.5 h-3.5"><path d="M18 6 6 18"></path><path d="m6 6 12 12">'), P = /* @__PURE__ */ a('<div class="flex min-w-0 items-center gap-1.5">'), H = /* @__PURE__ */ a('<aside data-floe-geometry-surface=sidebar-pane><div><div class="flex items-center justify-between px-3 py-2 border-b border-sidebar-border"><span class="text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60"></span></div><div>'), L = /* @__PURE__ */ a("<div>");
7
- function I(e) {
8
- const z = j(), m = () => z.isMobile(), v = () => e.width ?? 240, c = () => e.open ?? !0, u = () => m() && e.mobileOverlay !== !1 && c(), w = () => u() && typeof e.onClose == "function", R = () => u() && e.mobileBackdrop !== !1 && typeof e.onClose == "function", _ = () => e.resizable && c() && !m() && typeof e.onResize == "function";
1
+ import { insert as r, createComponent as o, use as E, effect as S, className as d, setStyleProperty as _, setAttribute as f, template as a, delegateEvents as L } from "solid-js/web";
2
+ import { Show as s } from "solid-js";
3
+ import { useLayout as O } from "../../context/LayoutContext.js";
4
+ import { cn as c } from "../../utils/cn.js";
5
+ import { ResizeHandle as P } from "./ResizeHandle.js";
6
+ var H = /* @__PURE__ */ a('<div class="min-w-0 flex items-center gap-1.5">'), N = /* @__PURE__ */ a('<button type=button class="flex items-center justify-center w-5 h-5 rounded cursor-pointer hover:bg-sidebar-accent/80 transition-colors focus:outline-none focus-visible:ring-1 focus-visible:ring-sidebar-ring focus-visible:ring-inset"aria-label="Close sidebar"><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="w-3.5 h-3.5"><path d="M18 6 6 18"></path><path d="m6 6 12 12">'), q = /* @__PURE__ */ a('<div class="flex min-w-0 items-center gap-1.5">'), D = /* @__PURE__ */ a('<aside data-floe-geometry-surface=sidebar-pane><div><div class="flex items-center justify-between px-3 py-2 border-b border-sidebar-border"><span class="text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60"></span></div><div>'), F = /* @__PURE__ */ a("<div>");
7
+ function T(t) {
8
+ const A = O(), m = () => A.isMobile(), g = () => t.width ?? 240, u = () => t.open ?? !0, l = () => m() && t.mobileOverlay !== !1 && u(), w = () => l() && typeof t.onClose == "function", B = () => l() && t.mobileBackdrop !== !1 && typeof t.onClose == "function", M = () => t.resizable && u() && !m() && typeof t.onResize == "function";
9
9
  return [(() => {
10
- var n = H(), h = n.firstChild, f = h.firstChild, S = f.firstChild, b = f.nextSibling;
11
- return i(S, () => e.title), i(f, o(l, {
10
+ var i = D(), h = i.firstChild, v = h.firstChild, j = v.firstChild, b = v.nextSibling;
11
+ return r(j, () => t.title), r(v, o(s, {
12
12
  get when() {
13
- return e.headerActions || w();
13
+ return t.headerActions || w();
14
14
  },
15
15
  get children() {
16
- var t = P();
17
- return i(t, o(l, {
16
+ var e = q();
17
+ return r(e, o(s, {
18
18
  get when() {
19
- return e.headerActions;
19
+ return t.headerActions;
20
20
  },
21
21
  get children() {
22
- var r = E();
23
- return i(r, () => e.headerActions), r;
22
+ var n = H();
23
+ return r(n, () => t.headerActions), n;
24
24
  }
25
- }), null), i(t, o(l, {
25
+ }), null), r(e, o(s, {
26
26
  get when() {
27
27
  return w();
28
28
  },
29
29
  get children() {
30
- var r = O();
31
- return r.$$click = () => e.onClose?.(), r;
30
+ var n = N();
31
+ return n.$$click = () => t.onClose?.(), n;
32
32
  }
33
- }), null), t;
33
+ }), null), e;
34
34
  }
35
- }), null), B((t) => e.bodyRef?.(t), b), i(b, () => e.children), i(n, o(l, {
35
+ }), null), E((e) => t.bodyRef?.(e), b), r(b, () => t.children), r(i, o(s, {
36
36
  get when() {
37
- return _();
37
+ return M();
38
38
  },
39
39
  get children() {
40
- return o(A, {
40
+ return o(P, {
41
41
  direction: "horizontal",
42
- onResize: (t) => e.onResize?.(t),
42
+ onResize: (e) => t.onResize?.(e),
43
43
  get onResizeStart() {
44
- return e.onResizeStart;
44
+ return t.onResizeStart;
45
45
  },
46
46
  get onResizeEnd() {
47
- return e.onResizeEnd;
47
+ return t.onResizeEnd;
48
48
  }
49
49
  });
50
50
  }
51
- }), null), k((t) => {
52
- var r = d("flex-shrink-0 border-r border-border bg-sidebar relative", "transition-[width,transform,box-shadow] duration-200 ease-out", "overflow-hidden", u() && "absolute inset-y-0 left-0 z-10 shadow-lg", e.class), g = c() ? `${v()}px` : "0px", x = d("h-full flex flex-col", e.innerClass), y = `${v()}px`, $ = d("flex-1 min-h-0 overflow-auto", e.bodyClass);
53
- return r !== t.e && s(n, t.e = r), g !== t.t && C(n, "width", t.t = g), x !== t.a && s(h, t.a = x), y !== t.o && C(h, "width", t.o = y), $ !== t.i && s(b, t.i = $), t;
51
+ }), null), S((e) => {
52
+ var n = c("flex-shrink-0 border-r border-border bg-sidebar relative", "transition-[width,transform,box-shadow] duration-200 ease-out", "overflow-hidden", l() && "absolute inset-y-0 left-0 z-10 shadow-lg", t.class), x = u() ? `${g()}px` : "0px", y = l() ? "dialog" : void 0, k = l() ? "true" : void 0, C = t.ariaLabel, z = c("h-full flex flex-col", t.innerClass), $ = `${g()}px`, R = c("flex-1 min-h-0 overflow-auto", t.bodyClass);
53
+ return n !== e.e && d(i, e.e = n), x !== e.t && _(i, "width", e.t = x), y !== e.a && f(i, "role", e.a = y), k !== e.o && f(i, "aria-modal", e.o = k), C !== e.i && f(i, "aria-label", e.i = C), z !== e.n && d(h, e.n = z), $ !== e.s && _(h, "width", e.s = $), R !== e.h && d(b, e.h = R), e;
54
54
  }, {
55
55
  e: void 0,
56
56
  t: void 0,
57
57
  a: void 0,
58
58
  o: void 0,
59
- i: void 0
60
- }), n;
61
- })(), o(l, {
59
+ i: void 0,
60
+ n: void 0,
61
+ s: void 0,
62
+ h: void 0
63
+ }), i;
64
+ })(), o(s, {
62
65
  get when() {
63
- return R();
66
+ return B();
64
67
  },
65
68
  get children() {
66
- var n = L();
67
- return n.$$click = () => e.onClose?.(), k(() => s(n, d("absolute inset-0 bg-background/60 backdrop-blur-sm z-[9]", e.backdropClass))), n;
69
+ var i = F();
70
+ return i.$$click = () => t.onClose?.(), S(() => d(i, c("absolute inset-0 bg-background/60 backdrop-blur-sm z-[9]", t.backdropClass))), i;
68
71
  }
69
72
  })];
70
73
  }
71
- M(["click"]);
74
+ L(["click"]);
72
75
  export {
73
- I as SidebarPane
76
+ T as SidebarPane
74
77
  };
@@ -3,6 +3,7 @@ export interface TopBarProps {
3
3
  logo?: JSX.Element;
4
4
  title?: string;
5
5
  actions?: JSX.Element;
6
+ ariaLabel?: string;
6
7
  class?: string;
7
8
  }
8
9
  /**
@@ -1,48 +1,49 @@
1
- import { insert as t, createComponent as d, effect as $, className as g, template as l, delegateEvents as k } from "solid-js/web";
2
- import { Show as h } from "solid-js";
3
- import { cn as p } from "../../utils/cn.js";
4
- import { useCommand as y } from "../../context/CommandContext.js";
5
- import { Search as _ } from "../icons/index.js";
6
- import { useResolvedFloeConfig as w } from "../../context/FloeConfigContext.js";
7
- var C = /* @__PURE__ */ l('<span class="font-medium text-xs hidden sm:inline">'), S = /* @__PURE__ */ l('<kbd class="hidden md:inline text-[10px] px-1 py-0.5 rounded bg-background/80 border border-border/50 font-mono shrink-0">'), B = /* @__PURE__ */ l('<header data-floe-shell-slot=top-bar style=border-bottom-color:var(--top-bar-border)><div class="h-10 flex items-center gap-3 px-3"><div class="flex items-center gap-2 flex-shrink-0"></div><button type=button><span class="flex-1 text-left hidden sm:inline truncate"></span></button><div class="flex items-center gap-1">'), E = /* @__PURE__ */ l('<div class="w-6 h-6 rounded bg-primary flex items-center justify-center text-primary-foreground text-xs font-bold">F');
1
+ import { insert as t, createComponent as d, effect as y, className as h, setAttribute as $, template as i, delegateEvents as _ } from "solid-js/web";
2
+ import { Show as v } from "solid-js";
3
+ import { cn as x } from "../../utils/cn.js";
4
+ import { useCommand as w } from "../../context/CommandContext.js";
5
+ import { Search as C } from "../icons/index.js";
6
+ import { useResolvedFloeConfig as S } from "../../context/FloeConfigContext.js";
7
+ var B = /* @__PURE__ */ i('<span class="font-medium text-xs hidden sm:inline">'), E = /* @__PURE__ */ i('<kbd class="hidden md:inline text-[10px] px-1 py-0.5 rounded bg-background/80 border border-border/50 font-mono shrink-0">'), F = /* @__PURE__ */ i('<header data-floe-shell-slot=top-bar style=border-bottom-color:var(--top-bar-border)><div class="h-10 flex items-center gap-3 px-3"><div class="flex items-center gap-2 flex-shrink-0"></div><button type=button><span class="flex-1 text-left hidden sm:inline truncate"></span></button><div class="flex items-center gap-1">'), j = /* @__PURE__ */ i('<div class="w-6 h-6 rounded bg-primary flex items-center justify-center text-primary-foreground text-xs font-bold">F');
8
8
  function R(o) {
9
- const c = y(), i = w(), n = () => i.config.commands.palette.enabled;
9
+ const c = w(), a = S(), n = () => a.config.commands.palette.enabled;
10
10
  return (() => {
11
- var s = B(), x = s.firstChild, a = x.firstChild, r = a.nextSibling, m = r.firstChild, v = r.nextSibling;
12
- return t(a, () => o.logo || E(), null), t(a, d(h, {
11
+ var l = F(), p = l.firstChild, s = p.firstChild, r = s.nextSibling, m = r.firstChild, k = r.nextSibling;
12
+ return t(s, () => o.logo || j(), null), t(s, d(v, {
13
13
  get when() {
14
14
  return o.title;
15
15
  },
16
16
  get children() {
17
- var e = C();
17
+ var e = B();
18
18
  return t(e, () => o.title), e;
19
19
  }
20
- }), null), r.$$click = () => n() && c.open(), t(r, d(_, {
20
+ }), null), r.$$click = () => n() && c.open(), t(r, d(C, {
21
21
  class: "w-3.5 h-3.5 shrink-0"
22
- }), m), t(m, () => i.config.strings.topBar.searchPlaceholder), t(r, d(h, {
22
+ }), m), t(m, () => a.config.strings.topBar.searchPlaceholder), t(r, d(v, {
23
23
  get when() {
24
24
  return n();
25
25
  },
26
26
  get children() {
27
- var e = S();
28
- return t(e, () => c.getKeybindDisplay(i.config.commands.palette.keybind)), e;
27
+ var e = E();
28
+ return t(e, () => c.getKeybindDisplay(a.config.commands.palette.keybind)), e;
29
29
  }
30
- }), null), t(v, () => o.actions), $((e) => {
31
- var f = p(
30
+ }), null), t(k, () => o.actions), y((e) => {
31
+ var b = x(
32
32
  // Safe-area padding must not be applied on a fixed-height element (border-box),
33
33
  // otherwise the content gets squeezed on iOS notch devices.
34
34
  "shrink-0 bg-background border-b border-border safe-top safe-left safe-right",
35
35
  o.class
36
- ), b = !n(), u = p("flex-1 max-w-sm flex items-center gap-2 h-7 px-2.5", n() ? "cursor-pointer" : "cursor-not-allowed", "text-xs text-muted-foreground", "bg-muted/40 hover:bg-muted/70 rounded", "border border-transparent hover:border-border/50", "transition-colors duration-100", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", !n() && "opacity-60 hover:bg-muted/40");
37
- return f !== e.e && g(s, e.e = f), b !== e.t && (r.disabled = e.t = b), u !== e.a && g(r, e.a = u), e;
36
+ ), f = o.ariaLabel, u = !n(), g = x("flex-1 max-w-sm flex items-center gap-2 h-7 px-2.5", n() ? "cursor-pointer" : "cursor-not-allowed", "text-xs text-muted-foreground", "bg-muted/40 hover:bg-muted/70 rounded", "border border-transparent hover:border-border/50", "transition-colors duration-100", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", !n() && "opacity-60 hover:bg-muted/40");
37
+ return b !== e.e && h(l, e.e = b), f !== e.t && $(l, "aria-label", e.t = f), u !== e.a && (r.disabled = e.a = u), g !== e.o && h(r, e.o = g), e;
38
38
  }, {
39
39
  e: void 0,
40
40
  t: void 0,
41
- a: void 0
42
- }), s;
41
+ a: void 0,
42
+ o: void 0
43
+ }), l;
43
44
  })();
44
45
  }
45
- k(["click"]);
46
+ _(["click"]);
46
47
  export {
47
48
  R as TopBar
48
49
  };
@@ -14,12 +14,25 @@ export interface DropdownItem {
14
14
  }
15
15
  export interface DropdownProps {
16
16
  trigger: JSX.Element;
17
+ triggerClass?: string;
18
+ triggerAriaLabel?: string;
17
19
  items: DropdownItem[];
18
20
  value?: string;
19
21
  onSelect: (id: string) => void;
20
22
  align?: 'start' | 'center' | 'end';
23
+ disabled?: boolean;
21
24
  class?: string;
22
25
  }
26
+ export type DropdownFocusMode = 'first' | 'last' | 'selected';
27
+ export interface DropdownTriggerAction {
28
+ nextOpen: boolean;
29
+ focusMode?: DropdownFocusMode;
30
+ }
31
+ export declare function resolveDropdownTriggerKeyAction(key: string, options: {
32
+ open: boolean;
33
+ hasSelection: boolean;
34
+ }): DropdownTriggerAction | null;
35
+ export declare function getWrappedMenuItemIndex(length: number, currentIndex: number, delta: 1 | -1): number | null;
23
36
  /**
24
37
  * Dropdown menu component with cascade submenu support
25
38
  */