@floegence/floe-webapp-core 0.15.9 → 0.15.10

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.
@@ -29,5 +29,7 @@ export interface DirectoryInputProps {
29
29
  class?: string;
30
30
  /** Maximum height for the tree panel (default: '200px') */
31
31
  treeMaxHeight?: string;
32
+ /** Whether the tree panel is expanded by default (default: true) */
33
+ defaultExpanded?: boolean;
32
34
  }
33
35
  export declare function DirectoryInput(props: DirectoryInputProps): import("solid-js").JSX.Element;
package/dist/index126.js CHANGED
@@ -1,20 +1,10 @@
1
- function W(t) {
2
- const c = t.labels, i = c.length;
3
- if (i <= 2) return;
4
- const n = t.viewBoxWidth;
5
- if (!Number.isFinite(n) || n <= 0) return;
6
- const x = t.padding.left, s = t.padding.right, o = n - x - s;
7
- if (!Number.isFinite(o) || o <= 0) return;
8
- const e = t.viewportWidthPx, m = typeof e == "number" && Number.isFinite(e) && e > 0 ? Math.min(1, e / n) : 1, l = o * m;
9
- let a = 0;
10
- for (const r of c)
11
- r && r.length > a && (a = r.length);
12
- if (a <= 0) return;
13
- const f = t.axisFontSizePx ?? 10, u = t.avgCharWidthFactor ?? 0.6, g = t.minGapPx ?? 6, d = a * f * u + g, h = l / Math.max(1, i - 1);
14
- if (h >= d) return;
15
- const v = Math.max(1, Math.ceil(d / Math.max(1, h))), P = Math.floor((i - 1) / v) + 1;
16
- return Math.max(2, Math.min(i, P));
1
+ function i(e) {
2
+ return e.activeIsFullScreen || e.mobileSidebarOpen ? e.activeId : "";
3
+ }
4
+ function t(e) {
5
+ return e.clickedIsFullScreen ? { nextActiveId: e.clickedId, nextMobileSidebarOpen: !1 } : e.clickedId === e.activeId && e.mobileSidebarOpen ? { nextActiveId: e.clickedId, nextMobileSidebarOpen: !1 } : { nextActiveId: e.clickedId, nextMobileSidebarOpen: !0 };
17
6
  }
18
7
  export {
19
- W as computeAutoMaxXAxisLabels
8
+ i as resolveMobileTabActiveId,
9
+ t as resolveMobileTabSelect
20
10
  };
package/dist/index130.js CHANGED
@@ -1,10 +1,20 @@
1
- function i(e) {
2
- return e.activeIsFullScreen || e.mobileSidebarOpen ? e.activeId : "";
3
- }
4
- function t(e) {
5
- return e.clickedIsFullScreen ? { nextActiveId: e.clickedId, nextMobileSidebarOpen: !1 } : e.clickedId === e.activeId && e.mobileSidebarOpen ? { nextActiveId: e.clickedId, nextMobileSidebarOpen: !1 } : { nextActiveId: e.clickedId, nextMobileSidebarOpen: !0 };
1
+ function W(t) {
2
+ const c = t.labels, i = c.length;
3
+ if (i <= 2) return;
4
+ const n = t.viewBoxWidth;
5
+ if (!Number.isFinite(n) || n <= 0) return;
6
+ const x = t.padding.left, s = t.padding.right, o = n - x - s;
7
+ if (!Number.isFinite(o) || o <= 0) return;
8
+ const e = t.viewportWidthPx, m = typeof e == "number" && Number.isFinite(e) && e > 0 ? Math.min(1, e / n) : 1, l = o * m;
9
+ let a = 0;
10
+ for (const r of c)
11
+ r && r.length > a && (a = r.length);
12
+ if (a <= 0) return;
13
+ const f = t.axisFontSizePx ?? 10, u = t.avgCharWidthFactor ?? 0.6, g = t.minGapPx ?? 6, d = a * f * u + g, h = l / Math.max(1, i - 1);
14
+ if (h >= d) return;
15
+ const v = Math.max(1, Math.ceil(d / Math.max(1, h))), P = Math.floor((i - 1) / v) + 1;
16
+ return Math.max(2, Math.min(i, P));
6
17
  }
7
18
  export {
8
- i as resolveMobileTabActiveId,
9
- t as resolveMobileTabSelect
19
+ W as computeAutoMaxXAxisLabels
10
20
  };
package/dist/index2.js CHANGED
@@ -11,7 +11,7 @@ import { BottomBar as j } from "./index6.js";
11
11
  import { MobileTabBar as q } from "./index7.js";
12
12
  import { ActivityBar as G } from "./index3.js";
13
13
  import { ResizeHandle as M } from "./index8.js";
14
- import { resolveMobileTabActiveId as J, resolveMobileTabSelect as K } from "./index130.js";
14
+ import { resolveMobileTabActiveId as J, resolveMobileTabSelect as K } from "./index126.js";
15
15
  var B = /* @__PURE__ */ v('<div class="flex items-center gap-2">'), U = /* @__PURE__ */ v('<div class="absolute inset-0 z-40 bg-black/30 cursor-pointer">'), V = /* @__PURE__ */ v('<div><div class="h-full overflow-auto overscroll-contain">'), X = /* @__PURE__ */ v('<div class="relative shrink-0 border-t border-border bg-terminal-background overflow-hidden">'), Y = /* @__PURE__ */ v('<div><div class="flex-1 min-h-0 flex overflow-hidden relative"><div class="flex-1 min-w-0 flex flex-col overflow-hidden"><main class="flex-1 min-h-0 overflow-auto overscroll-contain">');
16
16
  function be(l) {
17
17
  const t = W(), k = E(), d = Q(k.config.layout.mobileQuery), [S, b] = P(!1), c = () => l.sidebarMode === "hidden", w = (e) => t.setSidebarActiveTab(e, {
package/dist/index30.js CHANGED
@@ -1,9 +1,9 @@
1
- import { delegateEvents as k, insert as n, createComponent as a, memo as y, effect as S, className as p, template as u } from "solid-js/web";
2
- import { splitProps as E, createSignal as $, createEffect as C, on as _, Show as g } from "solid-js";
3
- import { cn as c } from "./index113.js";
1
+ import { delegateEvents as k, insert as o, createComponent as a, memo as y, effect as S, className as p, template as c } from "solid-js/web";
2
+ import { splitProps as $, createSignal as C, createEffect as f, on as _, Show as g } from "solid-js";
3
+ import { cn as u } from "./index113.js";
4
4
  import { usePickerTree as T, PickerBreadcrumb as F, PickerFolderTree as L } from "./index32.js";
5
5
  import { Folder as z, ChevronRight as R } from "./index42.js";
6
- var B = /* @__PURE__ */ u('<div class="border border-input rounded-b-md overflow-hidden bg-background shadow-sm border-t-0"><div class="px-2 py-1 border-b border-border/50 bg-muted/30">'), D = /* @__PURE__ */ u('<p class="mt-1 text-[11px] text-error"role=alert>'), H = /* @__PURE__ */ u('<p class="mt-1 text-[11px] text-muted-foreground">'), M = /* @__PURE__ */ u("<div><button type=button><span>");
6
+ var B = /* @__PURE__ */ c('<div class="border border-input rounded-b-md overflow-hidden bg-background shadow-sm border-t-0"><div class="px-2 py-1 border-b border-border/50 bg-muted/30">'), D = /* @__PURE__ */ c('<p class="mt-1 text-[11px] text-error"role=alert>'), H = /* @__PURE__ */ c('<p class="mt-1 text-[11px] text-muted-foreground">'), M = /* @__PURE__ */ c("<div><button type=button><span>");
7
7
  const I = {
8
8
  sm: {
9
9
  container: "h-7 px-2",
@@ -21,8 +21,12 @@ const I = {
21
21
  text: "text-sm"
22
22
  }
23
23
  };
24
- function A(f) {
25
- const [e] = E(f, ["value", "onChange", "files", "onExpand", "placeholder", "homePath", "homeLabel", "initialPath", "disabled", "size", "error", "helperText", "class", "treeMaxHeight"]), [d, b] = $(!1), v = () => e.size ?? "md", i = () => I[v()], o = T({
24
+ function A(b) {
25
+ const [e] = $(b, ["value", "onChange", "files", "onExpand", "placeholder", "homePath", "homeLabel", "initialPath", "disabled", "size", "error", "helperText", "class", "treeMaxHeight", "defaultExpanded"]), [d, v] = C(e.defaultExpanded !== !1), P = () => e.size ?? "md", i = () => I[P()];
26
+ f(() => {
27
+ d() && e.files.length === 0 && e.onExpand && e.onExpand("/");
28
+ });
29
+ const n = T({
26
30
  initialPath: e.initialPath ?? "/",
27
31
  open: () => !0,
28
32
  files: () => e.files,
@@ -30,63 +34,63 @@ function A(f) {
30
34
  homeLabel: e.homeLabel,
31
35
  homePath: e.homePath
32
36
  });
33
- C(_(o.selectedPath, (r) => {
37
+ f(_(n.selectedPath, (r) => {
34
38
  if (!d()) return;
35
- const l = o.toDisplayPath(r);
39
+ const l = n.toDisplayPath(r);
36
40
  e.onChange?.(l);
37
41
  }));
38
- const P = () => {
42
+ const E = () => {
39
43
  if (e.disabled) return;
40
44
  const r = d();
41
- !r && e.files.length === 0 && e.onExpand && e.onExpand("/"), b(!r);
45
+ !r && e.files.length === 0 && e.onExpand && e.onExpand("/"), v(!r);
42
46
  }, w = () => e.value ? e.homePath && e.value.startsWith(e.homePath) ? "~" + (e.value.slice(e.homePath.length) || "") : e.value : null;
43
47
  return (() => {
44
48
  var r = M(), l = r.firstChild, h = l.firstChild;
45
- return l.$$click = P, n(l, a(z, {
49
+ return l.$$click = E, o(l, a(z, {
46
50
  get class() {
47
- return c("text-muted-foreground flex-shrink-0", i().icon);
51
+ return u("text-muted-foreground flex-shrink-0", i().icon);
48
52
  }
49
- }), h), n(h, () => w() || e.placeholder || "Select a directory..."), n(l, a(R, {
53
+ }), h), o(h, () => w() || e.placeholder || "Select a directory..."), o(l, a(R, {
50
54
  get class() {
51
- return c("text-muted-foreground flex-shrink-0 transition-transform duration-150", i().icon, d() && "rotate-90");
55
+ return u("text-muted-foreground flex-shrink-0 transition-transform duration-150", i().icon, d() && "rotate-90");
52
56
  }
53
- }), null), n(r, a(g, {
57
+ }), null), o(r, a(g, {
54
58
  get when() {
55
59
  return d();
56
60
  },
57
61
  get children() {
58
62
  var t = B(), s = t.firstChild;
59
- return n(s, a(F, {
63
+ return o(s, a(F, {
60
64
  get segments() {
61
- return o.breadcrumbSegments;
65
+ return n.breadcrumbSegments;
62
66
  },
63
67
  get onClick() {
64
- return o.handleBreadcrumbClick;
68
+ return n.handleBreadcrumbClick;
65
69
  }
66
- })), n(t, a(L, {
70
+ })), o(t, a(L, {
67
71
  get rootFolders() {
68
- return o.rootFolders;
72
+ return n.rootFolders;
69
73
  },
70
74
  get selectedPath() {
71
- return o.selectedPath;
75
+ return n.selectedPath;
72
76
  },
73
77
  get expandedPaths() {
74
- return o.expandedPaths;
78
+ return n.expandedPaths;
75
79
  },
76
80
  get onToggle() {
77
- return o.toggleExpand;
81
+ return n.toggleExpand;
78
82
  },
79
83
  get onSelect() {
80
- return o.handleSelectFolder;
84
+ return n.handleSelectFolder;
81
85
  },
82
86
  get onSelectRoot() {
83
- return o.handleSelectRoot;
87
+ return n.handleSelectRoot;
84
88
  },
85
89
  get isSelectable() {
86
- return o.isSelectable;
90
+ return n.isSelectable;
87
91
  },
88
92
  get homeLabel() {
89
- return o.homeLabel;
93
+ return n.homeLabel;
90
94
  },
91
95
  class: "border-0 rounded-none",
92
96
  get style() {
@@ -96,24 +100,24 @@ function A(f) {
96
100
  }
97
101
  }), null), t;
98
102
  }
99
- }), null), n(r, a(g, {
103
+ }), null), o(r, a(g, {
100
104
  get when() {
101
105
  return e.error;
102
106
  },
103
107
  get children() {
104
108
  var t = D();
105
- return n(t, () => e.error), t;
109
+ return o(t, () => e.error), t;
106
110
  }
107
- }), null), n(r, a(g, {
111
+ }), null), o(r, a(g, {
108
112
  get when() {
109
113
  return y(() => !!e.helperText)() && !e.error;
110
114
  },
111
115
  get children() {
112
116
  var t = H();
113
- return n(t, () => e.helperText), t;
117
+ return o(t, () => e.helperText), t;
114
118
  }
115
119
  }), null), S((t) => {
116
- var s = e.disabled, m = c("w-full flex items-center gap-2 rounded border border-input bg-background shadow-sm", "transition-colors duration-100 cursor-pointer", "hover:bg-muted/50", "focus:outline-none focus:ring-1 focus:ring-ring focus:border-ring", "disabled:cursor-not-allowed disabled:opacity-50", e.error && "border-error focus:ring-error", d() && "rounded-b-none border-b-0", i().container, e.class), x = c("flex-1 text-left truncate font-mono", i().text, e.value ? "text-foreground" : "text-muted-foreground/60");
120
+ var s = e.disabled, m = u("w-full flex items-center gap-2 rounded border border-input bg-background shadow-sm", "transition-colors duration-100 cursor-pointer", "hover:bg-muted/50", "focus:outline-none focus:ring-1 focus:ring-ring focus:border-ring", "disabled:cursor-not-allowed disabled:opacity-50", e.error && "border-error focus:ring-error", d() && "rounded-b-none border-b-0", i().container, e.class), x = u("flex-1 text-left truncate font-mono", i().text, e.value ? "text-foreground" : "text-muted-foreground/60");
117
121
  return s !== t.e && (l.disabled = t.e = s), m !== t.t && p(l, t.t = m), x !== t.a && p(h, t.a = x), t;
118
122
  }, {
119
123
  e: void 0,
package/dist/index37.js CHANGED
@@ -2,7 +2,7 @@ import { delegateEvents as te, createComponent as $, mergeProps as ee, insert as
2
2
  import { splitProps as _t, createUniqueId as Xt, createMemo as K, createSignal as pt, createEffect as wt, onCleanup as Mt, Show as ot, For as z, untrack as qt } from "solid-js";
3
3
  import { cn as Tt } from "./index113.js";
4
4
  import { useResizeObserver as ne } from "./index108.js";
5
- import { computeAutoMaxXAxisLabels as re } from "./index126.js";
5
+ import { computeAutoMaxXAxisLabels as re } from "./index130.js";
6
6
  var It = /* @__PURE__ */ A("<div class=chart-title>"), Et = /* @__PURE__ */ A("<svg><g class=chart-grid></svg>", !1, !0, !1), ae = /* @__PURE__ */ A("<div class=chart-legend>"), oe = /* @__PURE__ */ A('<div><svg class=chart-svg preserveAspectRatio="xMidYMid meet"><defs></defs><rect fill=transparent class=chart-hover-area></rect><g class=chart-axis-labels></g><g class=chart-axis-labels>'), se = /* @__PURE__ */ A("<svg><linearGradient x1=0% y1=0% x2=0% y2=100%><stop offset=0% style=stop-opacity:0.4></stop><stop offset=100% style=stop-opacity:0.05></svg>", !1, !0, !1), Dt = /* @__PURE__ */ A("<svg><line class=chart-grid-line></svg>", !1, !0, !1), ie = /* @__PURE__ */ A("<svg><text class=chart-axis-label text-anchor=end dominant-baseline=middle></svg>", !1, !0, !1), le = /* @__PURE__ */ A("<svg><text class=chart-axis-label></svg>", !1, !0, !1), ce = /* @__PURE__ */ A("<svg><path class=chart-area></svg>", !1, !0, !1), de = /* @__PURE__ */ A("<svg><path fill=none stroke-width=2 stroke-linecap=round stroke-linejoin=round class=chart-line></svg>", !1, !0, !1), ue = /* @__PURE__ */ A("<svg><circle stroke-width=2 class=chart-point><title></svg>", !1, !0, !1), he = /* @__PURE__ */ A("<svg><line class=chart-crosshair></svg>", !1, !0, !1), ve = /* @__PURE__ */ A("<svg><rect rx=4 class=chart-tooltip-bg></svg>", !1, !0, !1), ge = /* @__PURE__ */ A("<svg><text class=chart-tooltip-label></svg>", !1, !0, !1), me = /* @__PURE__ */ A("<svg><circle r=6 class=chart-crosshair-point></svg>", !1, !0, !1), fe = /* @__PURE__ */ A("<svg><g><circle r=4></circle><text class=chart-tooltip-value>: </svg>", !1, !0, !1), xe = /* @__PURE__ */ A("<div class=chart-legend-item><div class=chart-legend-color></div><span class=chart-legend-label>"), be = /* @__PURE__ */ A('<div><svg class=chart-svg preserveAspectRatio="xMidYMid meet"><defs></defs><g class=chart-axis-labels>'), $e = /* @__PURE__ */ A("<svg><linearGradient x1=0% y1=0% x2=0% y2=100%><stop offset=0% style=stop-opacity:1></stop><stop offset=100% style=stop-opacity:0.7></svg>", !1, !0, !1), ye = /* @__PURE__ */ A("<svg><text class=chart-bar-value text-anchor=middle></svg>", !1, !0, !1), pe = /* @__PURE__ */ A("<svg><g><rect rx=2 class=chart-bar><title></svg>", !1, !0, !1), Me = /* @__PURE__ */ A("<svg><text class=chart-axis-label text-anchor=middle></svg>", !1, !0, !1), we = /* @__PURE__ */ A("<svg><text class=chart-pie-center-label text-anchor=middle dominant-baseline=middle></svg>", !1, !0, !1), Le = /* @__PURE__ */ A("<svg><text class=chart-pie-center-sublabel text-anchor=middle dominant-baseline=middle>Total</svg>", !1, !0, !1), Ae = /* @__PURE__ */ A("<div class=chart-pie-legend>"), Ce = /* @__PURE__ */ A('<div><div class=chart-pie-wrapper><svg class="chart-svg chart-pie-svg"><defs>'), _e = /* @__PURE__ */ A("<svg><linearGradient x1=0% y1=0% x2=100% y2=100%><stop offset=0% style=stop-opacity:1></stop><stop offset=100% style=stop-opacity:0.8></svg>", !1, !0, !1), Pe = /* @__PURE__ */ A("<svg><path class=chart-pie-slice><title></svg>", !1, !0, !1), Se = /* @__PURE__ */ A("<div class=chart-legend-item><div class=chart-legend-color></div><span class=chart-legend-label></span><span class=chart-legend-value>%"), Fe = /* @__PURE__ */ A("<div class=chart-monitoring-status><div class=chart-monitoring-dot></div><span>Live"), Te = /* @__PURE__ */ A("<div><div class=chart-monitoring-header>");
7
7
  const Lt = [
8
8
  "var(--primary)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floegence/floe-webapp-core",
3
- "version": "0.15.9",
3
+ "version": "0.15.10",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",