@floegence/floe-webapp-core 0.1.0
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.
- package/dist/app/FloeApp.d.ts +37 -0
- package/dist/app/FloeProvider.d.ts +17 -0
- package/dist/app/index.d.ts +2 -0
- package/dist/components/deck/DeckCell.d.ts +17 -0
- package/dist/components/deck/DeckGrid.d.ts +14 -0
- package/dist/components/deck/DeckTopBar.d.ts +9 -0
- package/dist/components/deck/DropZonePreview.d.ts +10 -0
- package/dist/components/deck/LayoutSelector.d.ts +7 -0
- package/dist/components/deck/WidgetFrame.d.ts +14 -0
- package/dist/components/deck/WidgetPalette.d.ts +7 -0
- package/dist/components/deck/WidgetResizeHandle.d.ts +9 -0
- package/dist/components/deck/WidgetTypeSwitcher.d.ts +9 -0
- package/dist/components/deck/index.d.ts +9 -0
- package/dist/components/icons/index.d.ts +29 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/launchpad/Launchpad.d.ts +15 -0
- package/dist/components/launchpad/LaunchpadGrid.d.ts +8 -0
- package/dist/components/launchpad/LaunchpadItem.d.ts +18 -0
- package/dist/components/launchpad/LaunchpadPagination.d.ts +6 -0
- package/dist/components/launchpad/LaunchpadSearch.d.ts +6 -0
- package/dist/components/launchpad/index.d.ts +10 -0
- package/dist/components/layout/ActivityBar.d.ts +24 -0
- package/dist/components/layout/BottomBar.d.ts +27 -0
- package/dist/components/layout/MobileTabBar.d.ts +19 -0
- package/dist/components/layout/Panel.d.ts +27 -0
- package/dist/components/layout/ResizeHandle.d.ts +9 -0
- package/dist/components/layout/Shell.d.ts +23 -0
- package/dist/components/layout/Sidebar.d.ts +33 -0
- package/dist/components/layout/TopBar.d.ts +11 -0
- package/dist/components/layout/index.d.ts +9 -0
- package/dist/components/loading/LoadingOverlay.d.ts +10 -0
- package/dist/components/loading/Skeleton.d.ts +21 -0
- package/dist/components/loading/SnakeLoader.d.ts +9 -0
- package/dist/components/loading/index.d.ts +3 -0
- package/dist/components/ui/Button.d.ts +12 -0
- package/dist/components/ui/Card.d.ts +79 -0
- package/dist/components/ui/CommandPalette.d.ts +4 -0
- package/dist/components/ui/Dialog.d.ts +29 -0
- package/dist/components/ui/Dropdown.d.ts +35 -0
- package/dist/components/ui/FloatingWindow.d.ts +45 -0
- package/dist/components/ui/Input.d.ts +16 -0
- package/dist/components/ui/Tooltip.d.ts +12 -0
- package/dist/components/ui/index.d.ts +8 -0
- package/dist/context/CommandContext.d.ts +30 -0
- package/dist/context/ComponentRegistry.d.ts +90 -0
- package/dist/context/DeckContext.d.ts +88 -0
- package/dist/context/FloeConfigContext.d.ts +133 -0
- package/dist/context/LayoutContext.d.ts +20 -0
- package/dist/context/NotificationContext.d.ts +32 -0
- package/dist/context/ThemeContext.d.ts +12 -0
- package/dist/context/WidgetRegistry.d.ts +37 -0
- package/dist/context/createSimpleContext.d.ts +15 -0
- package/dist/context/index.d.ts +9 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/useDebounce.d.ts +5 -0
- package/dist/hooks/useDeckDrag.d.ts +6 -0
- package/dist/hooks/useKeybind.d.ts +4 -0
- package/dist/hooks/useMediaQuery.d.ts +5 -0
- package/dist/hooks/usePersisted.d.ts +5 -0
- package/dist/hooks/useResizeObserver.d.ts +9 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +226 -0
- package/dist/index10.js +92 -0
- package/dist/index11.js +101 -0
- package/dist/index12.js +113 -0
- package/dist/index13.js +82 -0
- package/dist/index14.js +123 -0
- package/dist/index15.js +106 -0
- package/dist/index16.js +131 -0
- package/dist/index17.js +152 -0
- package/dist/index18.js +41 -0
- package/dist/index19.js +61 -0
- package/dist/index2.js +215 -0
- package/dist/index20.js +79 -0
- package/dist/index21.js +162 -0
- package/dist/index22.js +293 -0
- package/dist/index23.js +136 -0
- package/dist/index24.js +45 -0
- package/dist/index25.js +146 -0
- package/dist/index26.js +258 -0
- package/dist/index27.js +92 -0
- package/dist/index28.js +42 -0
- package/dist/index29.js +71 -0
- package/dist/index3.js +94 -0
- package/dist/index30.js +280 -0
- package/dist/index31.js +154 -0
- package/dist/index32.js +31 -0
- package/dist/index33.js +50 -0
- package/dist/index34.js +15 -0
- package/dist/index35.js +32 -0
- package/dist/index36.js +51 -0
- package/dist/index37.js +41 -0
- package/dist/index38.js +28 -0
- package/dist/index39.js +176 -0
- package/dist/index4.js +55 -0
- package/dist/index40.js +43 -0
- package/dist/index41.js +69 -0
- package/dist/index42.js +99 -0
- package/dist/index43.js +120 -0
- package/dist/index44.js +141 -0
- package/dist/index45.js +42 -0
- package/dist/index46.js +386 -0
- package/dist/index47.js +16 -0
- package/dist/index48.js +13 -0
- package/dist/index49.js +19 -0
- package/dist/index5.js +48 -0
- package/dist/index50.js +13 -0
- package/dist/index51.js +11 -0
- package/dist/index52.js +59 -0
- package/dist/index53.js +8 -0
- package/dist/index54.js +6 -0
- package/dist/index55.js +48 -0
- package/dist/index56.js +29 -0
- package/dist/index57.js +35 -0
- package/dist/index58.js +94 -0
- package/dist/index59.js +25 -0
- package/dist/index6.js +73 -0
- package/dist/index60.js +49 -0
- package/dist/index61.js +17 -0
- package/dist/index62.js +38 -0
- package/dist/index63.js +67 -0
- package/dist/index64.js +87 -0
- package/dist/index65.js +17 -0
- package/dist/index66.js +2266 -0
- package/dist/index7.js +112 -0
- package/dist/index8.js +66 -0
- package/dist/index9.js +33 -0
- package/dist/styles/build.d.ts +1 -0
- package/dist/styles/themes/index.d.ts +9 -0
- package/dist/styles.css +1 -0
- package/dist/styles.js +1 -0
- package/dist/utils/animations.d.ts +222 -0
- package/dist/utils/bodyStyleLock.d.ts +9 -0
- package/dist/utils/cn.d.ts +5 -0
- package/dist/utils/defer.d.ts +5 -0
- package/dist/utils/gridCollision.d.ts +31 -0
- package/dist/utils/gridLayout.d.ts +38 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/keybind.d.ts +22 -0
- package/dist/utils/persist.d.ts +17 -0
- package/dist/widgets/MetricsWidget.d.ts +5 -0
- package/dist/widgets/SidebarWidget.d.ts +11 -0
- package/dist/widgets/TerminalWidget.d.ts +5 -0
- package/dist/widgets/index.d.ts +3 -0
- package/package.json +40 -0
package/dist/index14.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { delegateEvents as O, createComponent as e, template as l, insert as r, effect as P, className as j } from "solid-js/web";
|
|
2
|
+
import { createSignal as k, Show as n, For as y } from "solid-js";
|
|
3
|
+
import { cn as f } from "./index53.js";
|
|
4
|
+
import { useDeck as D } from "./index46.js";
|
|
5
|
+
import { useWidgetRegistry as F } from "./index45.js";
|
|
6
|
+
import { Plus as T, X, ChevronRight as q } from "./index30.js";
|
|
7
|
+
import { Button as G } from "./index19.js";
|
|
8
|
+
import { deferNonBlocking as H } from "./index54.js";
|
|
9
|
+
var J = /* @__PURE__ */ l('<div class="text-center text-muted-foreground text-sm py-8">No widgets registered'), K = /* @__PURE__ */ l('<div><div class="flex items-center justify-between p-3 border-b border-border"><h2 class="text-sm font-semibold">Add Widget</h2><button class="p-1 rounded hover:bg-muted transition-colors cursor-pointer"></button></div><div class="p-2 overflow-y-auto h-[calc(100%-48px)]">'), L = /* @__PURE__ */ l('<div class="fixed inset-0 bg-black/20 z-40">'), Q = /* @__PURE__ */ l('<div class="ml-4 mt-1 space-y-1">'), U = /* @__PURE__ */ l('<div class=mb-2><button class="w-full flex items-center gap-2 p-2 rounded hover:bg-muted transition-colors text-left cursor-pointer"><span class="text-sm font-medium"></span><span class="ml-auto text-xs text-muted-foreground">'), V = /* @__PURE__ */ l('<button class="w-full flex items-center gap-2 p-2 rounded hover:bg-muted transition-colors text-left cursor-pointer"><span class=text-sm>'), Y = /* @__PURE__ */ l('<div class="w-4 h-4">');
|
|
10
|
+
function ie(C) {
|
|
11
|
+
const p = D(), b = F(), [d, s] = k(!1), [W, z] = k(null), S = [{
|
|
12
|
+
key: "metrics",
|
|
13
|
+
label: "Metrics"
|
|
14
|
+
}, {
|
|
15
|
+
key: "terminal",
|
|
16
|
+
label: "Terminal"
|
|
17
|
+
}, {
|
|
18
|
+
key: "custom",
|
|
19
|
+
label: "Custom"
|
|
20
|
+
}], A = (t) => {
|
|
21
|
+
s(!1), H(() => p.addWidget(t));
|
|
22
|
+
}, B = (t) => {
|
|
23
|
+
z((o) => o === t ? null : t);
|
|
24
|
+
};
|
|
25
|
+
return e(n, {
|
|
26
|
+
get when() {
|
|
27
|
+
return p.editMode();
|
|
28
|
+
},
|
|
29
|
+
get children() {
|
|
30
|
+
return [e(n, {
|
|
31
|
+
get when() {
|
|
32
|
+
return !d();
|
|
33
|
+
},
|
|
34
|
+
get children() {
|
|
35
|
+
return e(G, {
|
|
36
|
+
variant: "outline",
|
|
37
|
+
size: "sm",
|
|
38
|
+
get class() {
|
|
39
|
+
return f("fixed bottom-4 right-4 z-50 shadow-lg", C.class);
|
|
40
|
+
},
|
|
41
|
+
onClick: () => s(!0),
|
|
42
|
+
get children() {
|
|
43
|
+
return [e(T, {
|
|
44
|
+
class: "w-4 h-4 mr-1"
|
|
45
|
+
}), "Add Widget"];
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}), (() => {
|
|
50
|
+
var t = K(), o = t.firstChild, E = o.firstChild, x = E.nextSibling, $ = o.nextSibling;
|
|
51
|
+
return x.$$click = () => s(!1), r(x, e(X, {
|
|
52
|
+
class: "w-4 h-4"
|
|
53
|
+
})), r($, e(y, {
|
|
54
|
+
each: S,
|
|
55
|
+
children: (i) => {
|
|
56
|
+
const c = () => b.getWidgetsByCategory(i.key), v = () => W() === i.key, N = () => c().length > 0;
|
|
57
|
+
return e(n, {
|
|
58
|
+
get when() {
|
|
59
|
+
return N();
|
|
60
|
+
},
|
|
61
|
+
get children() {
|
|
62
|
+
var u = U(), m = u.firstChild, g = m.firstChild, R = g.nextSibling;
|
|
63
|
+
return m.$$click = () => B(i.key), r(m, e(q, {
|
|
64
|
+
get class() {
|
|
65
|
+
return f("w-4 h-4 text-muted-foreground transition-transform", v() && "rotate-90");
|
|
66
|
+
}
|
|
67
|
+
}), g), r(g, () => i.label), r(R, () => c().length), r(u, e(n, {
|
|
68
|
+
get when() {
|
|
69
|
+
return v();
|
|
70
|
+
},
|
|
71
|
+
get children() {
|
|
72
|
+
var w = Q();
|
|
73
|
+
return r(w, e(y, {
|
|
74
|
+
get each() {
|
|
75
|
+
return c();
|
|
76
|
+
},
|
|
77
|
+
children: (h) => (() => {
|
|
78
|
+
var a = V(), _ = a.firstChild;
|
|
79
|
+
return a.$$click = () => A(h.type), r(a, e(n, {
|
|
80
|
+
get when() {
|
|
81
|
+
return h.icon;
|
|
82
|
+
},
|
|
83
|
+
get fallback() {
|
|
84
|
+
return Y();
|
|
85
|
+
},
|
|
86
|
+
children: (I) => {
|
|
87
|
+
const M = I();
|
|
88
|
+
return e(M, {
|
|
89
|
+
class: "w-4 h-4 text-muted-foreground"
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}), _), r(_, () => h.name), a;
|
|
93
|
+
})()
|
|
94
|
+
})), w;
|
|
95
|
+
}
|
|
96
|
+
}), null), u;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}), null), r($, e(n, {
|
|
101
|
+
get when() {
|
|
102
|
+
return b.widgets().size === 0;
|
|
103
|
+
},
|
|
104
|
+
get children() {
|
|
105
|
+
return J();
|
|
106
|
+
}
|
|
107
|
+
}), null), P(() => j(t, f("fixed right-0 top-0 bottom-0 w-72 bg-background border-l border-border shadow-xl z-50", "transform transition-transform duration-200", d() ? "translate-x-0" : "translate-x-full"))), t;
|
|
108
|
+
})(), e(n, {
|
|
109
|
+
get when() {
|
|
110
|
+
return d();
|
|
111
|
+
},
|
|
112
|
+
get children() {
|
|
113
|
+
var t = L();
|
|
114
|
+
return t.$$click = () => s(!1), t;
|
|
115
|
+
}
|
|
116
|
+
})];
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
O(["click"]);
|
|
121
|
+
export {
|
|
122
|
+
ie as WidgetPalette
|
|
123
|
+
};
|
package/dist/index15.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { delegateEvents as E, createComponent as o, template as s, insert as l, effect as v, className as x, Portal as R, setStyleProperty as w, use as T } from "solid-js/web";
|
|
2
|
+
import { createSignal as y, createEffect as W, onCleanup as I, Show as p, For as L } from "solid-js";
|
|
3
|
+
import { cn as m } from "./index53.js";
|
|
4
|
+
import { useDeck as N } from "./index46.js";
|
|
5
|
+
import { useWidgetRegistry as z } from "./index45.js";
|
|
6
|
+
import { deferNonBlocking as A } from "./index54.js";
|
|
7
|
+
import { ArrowRightLeft as B, ChevronDown as M } from "./index30.js";
|
|
8
|
+
var O = /* @__PURE__ */ s('<button title="Switch widget type">'), F = /* @__PURE__ */ s('<div class="fixed inset-0 z-[9998]">'), K = /* @__PURE__ */ s('<div class="px-2 py-3 text-xs text-muted-foreground text-center">No other widget types available'), j = /* @__PURE__ */ s('<div><div class=p-1><div class="px-2 py-1.5 text-xs text-muted-foreground font-medium">Switch to'), q = /* @__PURE__ */ s('<button class="w-full flex items-center gap-2 px-2 py-1.5 rounded hover:bg-muted transition-colors text-left cursor-pointer"><span class=text-xs>'), G = /* @__PURE__ */ s('<div class="w-4 h-4">');
|
|
9
|
+
function Z(f) {
|
|
10
|
+
const $ = N(), b = z(), [c, d] = y(!1), [g, k] = y({
|
|
11
|
+
top: 0,
|
|
12
|
+
left: 0
|
|
13
|
+
});
|
|
14
|
+
let u;
|
|
15
|
+
const _ = () => f.widget.type, h = () => Array.from(b.widgets().values()).filter((t) => t.type !== _()), C = (e, t) => {
|
|
16
|
+
e.stopPropagation(), e.preventDefault(), d(!1);
|
|
17
|
+
const r = f.widget.id, n = $.changeWidgetType;
|
|
18
|
+
A(() => n(r, t));
|
|
19
|
+
}, S = (e) => {
|
|
20
|
+
if (e.stopPropagation(), e.preventDefault(), !c() && u) {
|
|
21
|
+
const t = u.getBoundingClientRect();
|
|
22
|
+
k({
|
|
23
|
+
top: t.bottom + 4,
|
|
24
|
+
left: t.right - 160
|
|
25
|
+
// Align right edge
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
d((t) => !t);
|
|
29
|
+
}, P = () => {
|
|
30
|
+
d(!1);
|
|
31
|
+
};
|
|
32
|
+
return W(() => {
|
|
33
|
+
if (!c() || typeof document > "u") return;
|
|
34
|
+
const e = (t) => {
|
|
35
|
+
t.key === "Escape" && d(!1);
|
|
36
|
+
};
|
|
37
|
+
document.addEventListener("keydown", e), I(() => document.removeEventListener("keydown", e));
|
|
38
|
+
}), [(() => {
|
|
39
|
+
var e = O();
|
|
40
|
+
e.$$click = S;
|
|
41
|
+
var t = u;
|
|
42
|
+
return typeof t == "function" ? T(t, e) : u = e, l(e, o(B, {
|
|
43
|
+
class: "w-3.5 h-3.5"
|
|
44
|
+
}), null), l(e, o(M, {
|
|
45
|
+
get class() {
|
|
46
|
+
return m("w-3 h-3 transition-transform", c() && "rotate-180");
|
|
47
|
+
}
|
|
48
|
+
}), null), v(() => x(e, m("p-0.5 rounded hover:bg-muted text-muted-foreground hover:text-foreground", "transition-colors cursor-pointer pointer-events-auto flex items-center gap-0.5", f.class))), e;
|
|
49
|
+
})(), o(p, {
|
|
50
|
+
get when() {
|
|
51
|
+
return c();
|
|
52
|
+
},
|
|
53
|
+
get children() {
|
|
54
|
+
return o(R, {
|
|
55
|
+
get children() {
|
|
56
|
+
return [(() => {
|
|
57
|
+
var e = F();
|
|
58
|
+
return e.$$click = P, e;
|
|
59
|
+
})(), (() => {
|
|
60
|
+
var e = j(), t = e.firstChild;
|
|
61
|
+
return t.firstChild, l(t, o(L, {
|
|
62
|
+
get each() {
|
|
63
|
+
return h();
|
|
64
|
+
},
|
|
65
|
+
children: (r) => (() => {
|
|
66
|
+
var n = q(), a = n.firstChild;
|
|
67
|
+
return n.$$click = (i) => C(i, r.type), l(n, o(p, {
|
|
68
|
+
get when() {
|
|
69
|
+
return r.icon;
|
|
70
|
+
},
|
|
71
|
+
get fallback() {
|
|
72
|
+
return G();
|
|
73
|
+
},
|
|
74
|
+
children: (i) => {
|
|
75
|
+
const D = i();
|
|
76
|
+
return o(D, {
|
|
77
|
+
class: "w-4 h-4 text-muted-foreground"
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}), a), l(a, () => r.name), n;
|
|
81
|
+
})()
|
|
82
|
+
}), null), l(t, o(p, {
|
|
83
|
+
get when() {
|
|
84
|
+
return h().length === 0;
|
|
85
|
+
},
|
|
86
|
+
get children() {
|
|
87
|
+
return K();
|
|
88
|
+
}
|
|
89
|
+
}), null), v((r) => {
|
|
90
|
+
var n = m("fixed z-[9999]", "min-w-[160px] max-h-[240px] overflow-y-auto", "bg-popover border border-border rounded-md shadow-xl", "animate-in fade-in slide-in-from-top-1 duration-150"), a = `${g().top}px`, i = `${Math.max(8, g().left)}px`;
|
|
91
|
+
return n !== r.e && x(e, r.e = n), a !== r.t && w(e, "top", r.t = a), i !== r.a && w(e, "left", r.a = i), r;
|
|
92
|
+
}, {
|
|
93
|
+
e: void 0,
|
|
94
|
+
t: void 0,
|
|
95
|
+
a: void 0
|
|
96
|
+
}), e;
|
|
97
|
+
})()];
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
})];
|
|
102
|
+
}
|
|
103
|
+
E(["click"]);
|
|
104
|
+
export {
|
|
105
|
+
Z as WidgetTypeSwitcher
|
|
106
|
+
};
|
package/dist/index16.js
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { delegateEvents as j, template as s, insert as o, createComponent as a, memo as q, effect as w, className as C } from "solid-js/web";
|
|
2
|
+
import { createSignal as R, Show as v, For as G } from "solid-js";
|
|
3
|
+
import { cn as b } from "./index53.js";
|
|
4
|
+
import { useDeck as H } from "./index46.js";
|
|
5
|
+
import { deferNonBlocking as g } from "./index54.js";
|
|
6
|
+
import { ChevronDown as J, Check as K, Copy as M, Pencil as Q, Trash as U } from "./index30.js";
|
|
7
|
+
var W = /* @__PURE__ */ s('<div class="absolute top-full left-0 mt-1 w-64 bg-popover border border-border rounded-md shadow-lg z-50 overflow-hidden"><div class="max-h-64 overflow-y-auto py-1"></div><div class="border-t border-border px-2 py-1.5"><button class="w-full text-left text-xs text-primary hover:underline cursor-pointer">+ New Layout'), X = /* @__PURE__ */ s('<div class="fixed inset-0 z-40">'), Y = /* @__PURE__ */ s('<div><button><span class="truncate max-w-[120px]">'), Z = /* @__PURE__ */ s('<span class="flex-1 text-xs truncate">'), ee = /* @__PURE__ */ s('<button class="p-1 rounded hover:bg-background transition-colors cursor-pointer"title=Rename>'), te = /* @__PURE__ */ s('<button class="p-1 rounded hover:bg-destructive/10 transition-colors cursor-pointer"title=Delete>'), re = /* @__PURE__ */ s('<div class="flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity"><button class="p-1 rounded hover:bg-background transition-colors cursor-pointer"title=Duplicate>'), ne = /* @__PURE__ */ s('<div><div class="w-4 h-4 flex-shrink-0">'), oe = /* @__PURE__ */ s('<input type=text class="flex-1 text-xs bg-background border border-border rounded px-1.5 py-0.5"autofocus>'), le = /* @__PURE__ */ s('<span class="ml-1 text-[10px] text-muted-foreground">(preset)');
|
|
8
|
+
function pe(N) {
|
|
9
|
+
const u = H(), [$, d] = R(!1), [I, _] = R(null), [P, h] = R(""), L = () => u.activeLayout(), D = () => u.layouts(), T = (t) => {
|
|
10
|
+
d(!1), g(() => u.setActiveLayout(t));
|
|
11
|
+
}, z = (t, n) => {
|
|
12
|
+
n.stopPropagation();
|
|
13
|
+
const p = D().find((e) => e.id === t);
|
|
14
|
+
if (p) {
|
|
15
|
+
d(!1), g(() => u.duplicateLayout(t, `${p.name} (Copy)`));
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
d(!1);
|
|
19
|
+
}, A = (t, n) => {
|
|
20
|
+
n.stopPropagation(), d(!1), g(() => u.deleteLayout(t));
|
|
21
|
+
}, O = (t, n, p) => {
|
|
22
|
+
p.stopPropagation(), _(t), h(n);
|
|
23
|
+
}, S = (t) => {
|
|
24
|
+
const n = P().trim();
|
|
25
|
+
_(null), h(""), n && g(() => u.renameLayout(t, n));
|
|
26
|
+
}, V = () => {
|
|
27
|
+
_(null), h("");
|
|
28
|
+
};
|
|
29
|
+
return (() => {
|
|
30
|
+
var t = Y(), n = t.firstChild, p = n.firstChild;
|
|
31
|
+
return n.$$click = () => d(!$()), o(p, () => {
|
|
32
|
+
var e;
|
|
33
|
+
return ((e = L()) == null ? void 0 : e.name) ?? "Select Layout";
|
|
34
|
+
}), o(n, a(J, {
|
|
35
|
+
get class() {
|
|
36
|
+
return b("w-4 h-4 text-muted-foreground transition-transform", $() && "rotate-180");
|
|
37
|
+
}
|
|
38
|
+
}), null), o(t, a(v, {
|
|
39
|
+
get when() {
|
|
40
|
+
return $();
|
|
41
|
+
},
|
|
42
|
+
get children() {
|
|
43
|
+
return [(() => {
|
|
44
|
+
var e = W(), f = e.firstChild, x = f.nextSibling, B = x.firstChild;
|
|
45
|
+
return o(f, a(G, {
|
|
46
|
+
get each() {
|
|
47
|
+
return D();
|
|
48
|
+
},
|
|
49
|
+
children: (l) => {
|
|
50
|
+
const E = () => l.id === u.activeLayoutId(), k = () => I() === l.id;
|
|
51
|
+
return (() => {
|
|
52
|
+
var m = ne(), F = m.firstChild;
|
|
53
|
+
return m.$$click = () => !k() && T(l.id), o(F, a(v, {
|
|
54
|
+
get when() {
|
|
55
|
+
return E();
|
|
56
|
+
},
|
|
57
|
+
get children() {
|
|
58
|
+
return a(K, {
|
|
59
|
+
class: "w-4 h-4 text-primary"
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
})), o(m, a(v, {
|
|
63
|
+
get when() {
|
|
64
|
+
return !k();
|
|
65
|
+
},
|
|
66
|
+
get fallback() {
|
|
67
|
+
return (() => {
|
|
68
|
+
var r = oe();
|
|
69
|
+
return r.$$click = (i) => i.stopPropagation(), r.addEventListener("blur", () => S(l.id)), r.$$keydown = (i) => {
|
|
70
|
+
i.key === "Enter" && S(l.id), i.key === "Escape" && V();
|
|
71
|
+
}, r.$$input = (i) => h(i.currentTarget.value), w(() => r.value = P()), r;
|
|
72
|
+
})();
|
|
73
|
+
},
|
|
74
|
+
get children() {
|
|
75
|
+
var r = Z();
|
|
76
|
+
return o(r, () => l.name, null), o(r, (() => {
|
|
77
|
+
var i = q(() => !!l.isPreset);
|
|
78
|
+
return () => i() && le();
|
|
79
|
+
})(), null), r;
|
|
80
|
+
}
|
|
81
|
+
}), null), o(m, a(v, {
|
|
82
|
+
get when() {
|
|
83
|
+
return !k();
|
|
84
|
+
},
|
|
85
|
+
get children() {
|
|
86
|
+
var r = re(), i = r.firstChild;
|
|
87
|
+
return i.$$click = (c) => z(l.id, c), o(i, a(M, {
|
|
88
|
+
class: "w-3.5 h-3.5 text-muted-foreground"
|
|
89
|
+
})), o(r, a(v, {
|
|
90
|
+
get when() {
|
|
91
|
+
return !l.isPreset;
|
|
92
|
+
},
|
|
93
|
+
get children() {
|
|
94
|
+
return [(() => {
|
|
95
|
+
var c = ee();
|
|
96
|
+
return c.$$click = (y) => O(l.id, l.name, y), o(c, a(Q, {
|
|
97
|
+
class: "w-3.5 h-3.5 text-muted-foreground"
|
|
98
|
+
})), c;
|
|
99
|
+
})(), (() => {
|
|
100
|
+
var c = te();
|
|
101
|
+
return c.$$click = (y) => A(l.id, y), o(c, a(U, {
|
|
102
|
+
class: "w-3.5 h-3.5 text-destructive"
|
|
103
|
+
})), c;
|
|
104
|
+
})()];
|
|
105
|
+
}
|
|
106
|
+
}), null), r;
|
|
107
|
+
}
|
|
108
|
+
}), null), w(() => C(m, b("flex items-center gap-2 px-2 py-1.5 hover:bg-muted transition-colors cursor-pointer group", E() && "bg-muted"))), m;
|
|
109
|
+
})();
|
|
110
|
+
}
|
|
111
|
+
})), B.$$click = () => {
|
|
112
|
+
d(!1), g(() => u.createLayout("New Layout"));
|
|
113
|
+
}, e;
|
|
114
|
+
})(), (() => {
|
|
115
|
+
var e = X();
|
|
116
|
+
return e.$$click = () => d(!1), e;
|
|
117
|
+
})()];
|
|
118
|
+
}
|
|
119
|
+
}), null), w((e) => {
|
|
120
|
+
var f = b("relative", N.class), x = b("flex items-center gap-2 px-3 py-1.5 rounded-md border border-border", "hover:bg-muted transition-colors text-xs cursor-pointer", $() && "bg-muted");
|
|
121
|
+
return f !== e.e && C(t, e.e = f), x !== e.t && C(n, e.t = x), e;
|
|
122
|
+
}, {
|
|
123
|
+
e: void 0,
|
|
124
|
+
t: void 0
|
|
125
|
+
}), t;
|
|
126
|
+
})();
|
|
127
|
+
}
|
|
128
|
+
j(["click", "input", "keydown"]);
|
|
129
|
+
export {
|
|
130
|
+
pe as LayoutSelector
|
|
131
|
+
};
|
package/dist/index17.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { delegateEvents as S, template as d, insert as i, createComponent as t, Portal as B, effect as b, className as y, setStyleProperty as k } from "solid-js/web";
|
|
2
|
+
import { createSignal as $, createEffect as L, onCleanup as R, Show as a, For as A } from "solid-js";
|
|
3
|
+
import { cn as h } from "./index53.js";
|
|
4
|
+
import { useDeck as N } from "./index46.js";
|
|
5
|
+
import { useLayout as T } from "./index41.js";
|
|
6
|
+
import { useWidgetRegistry as F } from "./index45.js";
|
|
7
|
+
import { deferNonBlocking as I } from "./index54.js";
|
|
8
|
+
import { LayoutSelector as K } from "./index16.js";
|
|
9
|
+
import { Plus as j, ChevronDown as q, Check as G, Pencil as H } from "./index30.js";
|
|
10
|
+
import { Button as C } from "./index19.js";
|
|
11
|
+
var J = /* @__PURE__ */ d('<div class="fixed inset-0 z-[9998]">'), O = /* @__PURE__ */ d('<div class="px-3 py-4 text-xs text-muted-foreground text-center">No widgets available'), Q = /* @__PURE__ */ d("<div><div class=p-1>"), U = /* @__PURE__ */ d("<div><div class=flex-1>"), V = /* @__PURE__ */ d('<button class="w-full flex items-center gap-2 px-3 py-2 rounded hover:bg-muted transition-colors text-left cursor-pointer"><span class=text-xs>'), X = /* @__PURE__ */ d('<div class="w-4 h-4">');
|
|
12
|
+
function ae(v) {
|
|
13
|
+
const c = N(), _ = T(), w = F(), [m, g] = $(!1), [x, M] = $({
|
|
14
|
+
top: 0,
|
|
15
|
+
left: 0
|
|
16
|
+
});
|
|
17
|
+
let p;
|
|
18
|
+
const P = () => _.isMobile(), D = (e, r) => {
|
|
19
|
+
e.stopPropagation(), e.preventDefault(), g(!1), I(() => c.addWidget(r));
|
|
20
|
+
}, E = (e) => {
|
|
21
|
+
if (e.stopPropagation(), e.preventDefault(), !m() && p) {
|
|
22
|
+
const r = p.getBoundingClientRect();
|
|
23
|
+
M({
|
|
24
|
+
top: r.bottom + 4,
|
|
25
|
+
left: r.left
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
g((r) => !r);
|
|
29
|
+
}, W = () => {
|
|
30
|
+
g(!1);
|
|
31
|
+
};
|
|
32
|
+
return L(() => {
|
|
33
|
+
if (!m() || typeof document > "u") return;
|
|
34
|
+
const e = (r) => {
|
|
35
|
+
r.key === "Escape" && g(!1);
|
|
36
|
+
};
|
|
37
|
+
document.addEventListener("keydown", e), R(() => document.removeEventListener("keydown", e));
|
|
38
|
+
}), (() => {
|
|
39
|
+
var e = U(), r = e.firstChild;
|
|
40
|
+
return i(e, t(K, {}), r), i(e, t(a, {
|
|
41
|
+
get when() {
|
|
42
|
+
return c.editMode();
|
|
43
|
+
},
|
|
44
|
+
get children() {
|
|
45
|
+
return [t(C, {
|
|
46
|
+
ref(n) {
|
|
47
|
+
var u = p;
|
|
48
|
+
typeof u == "function" ? u(n) : p = n;
|
|
49
|
+
},
|
|
50
|
+
variant: "outline",
|
|
51
|
+
size: "sm",
|
|
52
|
+
onClick: E,
|
|
53
|
+
get children() {
|
|
54
|
+
return [t(j, {
|
|
55
|
+
class: "w-3.5 h-3.5 mr-1"
|
|
56
|
+
}), "Add Widget", t(q, {
|
|
57
|
+
get class() {
|
|
58
|
+
return h("w-3.5 h-3.5 ml-1 transition-transform", m() && "rotate-180");
|
|
59
|
+
}
|
|
60
|
+
})];
|
|
61
|
+
}
|
|
62
|
+
}), t(a, {
|
|
63
|
+
get when() {
|
|
64
|
+
return m();
|
|
65
|
+
},
|
|
66
|
+
get children() {
|
|
67
|
+
return t(B, {
|
|
68
|
+
get children() {
|
|
69
|
+
return [(() => {
|
|
70
|
+
var n = J();
|
|
71
|
+
return n.$$click = W, n;
|
|
72
|
+
})(), (() => {
|
|
73
|
+
var n = Q(), u = n.firstChild;
|
|
74
|
+
return i(u, t(A, {
|
|
75
|
+
get each() {
|
|
76
|
+
return Array.from(w.widgets().values());
|
|
77
|
+
},
|
|
78
|
+
children: (o) => (() => {
|
|
79
|
+
var l = V(), f = l.firstChild;
|
|
80
|
+
return l.$$click = (s) => D(s, o.type), i(l, t(a, {
|
|
81
|
+
get when() {
|
|
82
|
+
return o.icon;
|
|
83
|
+
},
|
|
84
|
+
get fallback() {
|
|
85
|
+
return X();
|
|
86
|
+
},
|
|
87
|
+
children: (s) => {
|
|
88
|
+
const z = s();
|
|
89
|
+
return t(z, {
|
|
90
|
+
class: "w-4 h-4 text-muted-foreground"
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}), f), i(f, () => o.name), l;
|
|
94
|
+
})()
|
|
95
|
+
}), null), i(u, t(a, {
|
|
96
|
+
get when() {
|
|
97
|
+
return w.widgets().size === 0;
|
|
98
|
+
},
|
|
99
|
+
get children() {
|
|
100
|
+
return O();
|
|
101
|
+
}
|
|
102
|
+
}), null), b((o) => {
|
|
103
|
+
var l = h("fixed z-[9999]", "min-w-[180px] max-h-[300px] overflow-y-auto", "bg-popover border border-border rounded-md shadow-xl", "animate-in fade-in slide-in-from-top-1 duration-150"), f = `${x().top}px`, s = `${Math.max(8, x().left)}px`;
|
|
104
|
+
return l !== o.e && y(n, o.e = l), f !== o.t && k(n, "top", o.t = f), s !== o.a && k(n, "left", o.a = s), o;
|
|
105
|
+
}, {
|
|
106
|
+
e: void 0,
|
|
107
|
+
t: void 0,
|
|
108
|
+
a: void 0
|
|
109
|
+
}), n;
|
|
110
|
+
})()];
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
})];
|
|
115
|
+
}
|
|
116
|
+
}), r), i(e, t(a, {
|
|
117
|
+
get when() {
|
|
118
|
+
return !P();
|
|
119
|
+
},
|
|
120
|
+
get children() {
|
|
121
|
+
return t(C, {
|
|
122
|
+
get variant() {
|
|
123
|
+
return c.editMode() ? "default" : "outline";
|
|
124
|
+
},
|
|
125
|
+
size: "sm",
|
|
126
|
+
onClick: () => c.toggleEditMode(),
|
|
127
|
+
get children() {
|
|
128
|
+
return t(a, {
|
|
129
|
+
get when() {
|
|
130
|
+
return c.editMode();
|
|
131
|
+
},
|
|
132
|
+
get fallback() {
|
|
133
|
+
return [t(H, {
|
|
134
|
+
class: "w-3.5 h-3.5 mr-1.5"
|
|
135
|
+
}), "Edit"];
|
|
136
|
+
},
|
|
137
|
+
get children() {
|
|
138
|
+
return [t(G, {
|
|
139
|
+
class: "w-3.5 h-3.5 mr-1.5"
|
|
140
|
+
}), "Done"];
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}), null), i(e, () => v.actions, null), b(() => y(e, h("deck-topbar flex items-center gap-3 px-3 py-2 border-b border-border bg-background", v.class))), e;
|
|
147
|
+
})();
|
|
148
|
+
}
|
|
149
|
+
S(["click"]);
|
|
150
|
+
export {
|
|
151
|
+
ae as DeckTopBar
|
|
152
|
+
};
|
package/dist/index18.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { template as v, effect as b, className as i, setStyleProperty as m } from "solid-js/web";
|
|
2
|
+
import { cn as n } from "./index53.js";
|
|
3
|
+
import { positionToGridArea as f } from "./index60.js";
|
|
4
|
+
var g = /* @__PURE__ */ v("<div><div>");
|
|
5
|
+
function _(a) {
|
|
6
|
+
const s = () => f(a.position);
|
|
7
|
+
return (() => {
|
|
8
|
+
var e = g(), l = e.firstChild;
|
|
9
|
+
return b((r) => {
|
|
10
|
+
var t = n(
|
|
11
|
+
"pointer-events-none rounded-md relative",
|
|
12
|
+
"border-2 border-dashed",
|
|
13
|
+
// Theme-adaptive colors
|
|
14
|
+
a.isValid !== !1 ? [
|
|
15
|
+
// Light mode: darker colors for contrast
|
|
16
|
+
"border-slate-400 bg-slate-200/60",
|
|
17
|
+
// Dark mode: lighter colors for contrast
|
|
18
|
+
"dark:border-slate-400 dark:bg-slate-600/40"
|
|
19
|
+
] : ["border-red-400 bg-red-200/60", "dark:border-red-400 dark:bg-red-500/30"],
|
|
20
|
+
// Theme-adaptive shadow
|
|
21
|
+
"shadow-[0_4px_16px_rgba(0,0,0,0.12)]",
|
|
22
|
+
"dark:shadow-[0_4px_16px_rgba(255,255,255,0.08)]",
|
|
23
|
+
// Subtle animation
|
|
24
|
+
"animate-in fade-in duration-150"
|
|
25
|
+
), d = s(), o = n("absolute inset-0 rounded-md", a.isValid !== !1 ? [
|
|
26
|
+
// Light mode: subtle dark gradient
|
|
27
|
+
"bg-gradient-to-br from-slate-300/40 via-transparent to-slate-400/20",
|
|
28
|
+
// Dark mode: subtle light gradient
|
|
29
|
+
"dark:from-slate-400/20 dark:via-transparent dark:to-slate-300/10"
|
|
30
|
+
] : ["bg-gradient-to-br from-red-300/40 via-transparent to-red-400/20", "dark:from-red-400/20 dark:via-transparent dark:to-red-300/10"]);
|
|
31
|
+
return t !== r.e && i(e, r.e = t), d !== r.t && m(e, "grid-area", r.t = d), o !== r.a && i(l, r.a = o), r;
|
|
32
|
+
}, {
|
|
33
|
+
e: void 0,
|
|
34
|
+
t: void 0,
|
|
35
|
+
a: void 0
|
|
36
|
+
}), e;
|
|
37
|
+
})();
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
_ as DropZonePreview
|
|
41
|
+
};
|
package/dist/index19.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { template as c, spread as d, mergeProps as l, insert as n, createComponent as t, memo as u, Dynamic as m } from "solid-js/web";
|
|
2
|
+
import { splitProps as g, Show as p } from "solid-js";
|
|
3
|
+
import { cn as s } from "./index53.js";
|
|
4
|
+
import { Loader2 as h } from "./index30.js";
|
|
5
|
+
var b = /* @__PURE__ */ c("<button type=button>");
|
|
6
|
+
const f = {
|
|
7
|
+
default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:scale-[0.98]",
|
|
8
|
+
primary: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:scale-[0.98]",
|
|
9
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80 active:scale-[0.98]",
|
|
10
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground active:scale-[0.98]",
|
|
11
|
+
ghost: "hover:bg-accent hover:text-accent-foreground active:scale-[0.98]",
|
|
12
|
+
destructive: "bg-error text-error-foreground shadow-sm hover:bg-error/90 active:scale-[0.98]"
|
|
13
|
+
}, v = {
|
|
14
|
+
sm: "h-7 px-2.5 text-xs rounded",
|
|
15
|
+
md: "h-8 px-3 text-xs rounded-md",
|
|
16
|
+
lg: "h-9 px-4 text-sm rounded-md",
|
|
17
|
+
icon: "h-8 w-8 rounded-md"
|
|
18
|
+
}, y = {
|
|
19
|
+
sm: "w-3.5 h-3.5",
|
|
20
|
+
md: "w-3.5 h-3.5",
|
|
21
|
+
lg: "w-4 h-4",
|
|
22
|
+
icon: "w-4 h-4"
|
|
23
|
+
};
|
|
24
|
+
function k(i) {
|
|
25
|
+
const [e, a] = g(i, ["variant", "size", "loading", "icon", "class", "children", "disabled"]), o = () => y[e.size ?? "md"];
|
|
26
|
+
return (() => {
|
|
27
|
+
var r = b();
|
|
28
|
+
return d(r, l({
|
|
29
|
+
get class() {
|
|
30
|
+
return s("inline-flex items-center justify-center gap-1.5 font-medium cursor-pointer", "transition-colors duration-150", "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", "disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed", f[e.variant ?? "default"], v[e.size ?? "md"], e.class);
|
|
31
|
+
},
|
|
32
|
+
get disabled() {
|
|
33
|
+
return e.disabled || e.loading;
|
|
34
|
+
}
|
|
35
|
+
}, a), !1, !0), n(r, t(p, {
|
|
36
|
+
get when() {
|
|
37
|
+
return e.loading;
|
|
38
|
+
},
|
|
39
|
+
get fallback() {
|
|
40
|
+
return u(() => !!e.icon)() && t(m, {
|
|
41
|
+
get component() {
|
|
42
|
+
return e.icon;
|
|
43
|
+
},
|
|
44
|
+
get class() {
|
|
45
|
+
return o();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
get children() {
|
|
50
|
+
return t(h, {
|
|
51
|
+
get class() {
|
|
52
|
+
return s(o(), "animate-spin");
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}), null), n(r, () => e.children, null), r;
|
|
57
|
+
})();
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
k as Button
|
|
61
|
+
};
|