@floegence/floe-webapp-core 0.35.59 → 0.36.1
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/components/deck/DeckCell.js +47 -50
- package/dist/components/deck/DeckContextMenu.d.ts +22 -0
- package/dist/components/deck/DeckContextMenu.js +73 -0
- package/dist/components/deck/DeckGrid.js +147 -104
- package/dist/components/deck/DeckTopBar.js +74 -96
- package/dist/components/deck/WidgetFrame.d.ts +7 -1
- package/dist/components/deck/WidgetFrame.js +60 -52
- package/dist/components/deck/index.d.ts +1 -0
- package/dist/components/layout/DisplayModePageShell.d.ts +8 -0
- package/dist/components/layout/DisplayModePageShell.js +22 -0
- package/dist/components/layout/DisplayModeSwitcher.d.ts +7 -0
- package/dist/components/layout/DisplayModeSwitcher.js +52 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/ui/InfiniteCanvas.d.ts +2 -0
- package/dist/components/ui/InfiniteCanvas.js +43 -37
- package/dist/components/workbench/WorkbenchCanvas.d.ts +29 -0
- package/dist/components/workbench/WorkbenchCanvas.js +83 -0
- package/dist/components/workbench/WorkbenchContextMenu.d.ts +24 -0
- package/dist/components/workbench/WorkbenchContextMenu.js +44 -0
- package/dist/components/workbench/WorkbenchFilterBar.d.ts +17 -0
- package/dist/components/workbench/WorkbenchFilterBar.js +267 -0
- package/dist/components/workbench/WorkbenchHud.d.ts +6 -0
- package/dist/components/workbench/WorkbenchHud.js +17 -0
- package/dist/components/workbench/WorkbenchLockButton.d.ts +6 -0
- package/dist/components/workbench/WorkbenchLockButton.js +49 -0
- package/dist/components/workbench/WorkbenchOverlay.d.ts +18 -0
- package/dist/components/workbench/WorkbenchOverlay.js +107 -0
- package/dist/components/workbench/WorkbenchSurface.d.ts +34 -0
- package/dist/components/workbench/WorkbenchSurface.js +200 -0
- package/dist/components/workbench/WorkbenchWidget.d.ts +26 -0
- package/dist/components/workbench/WorkbenchWidget.js +192 -0
- package/dist/components/workbench/index.d.ts +7 -0
- package/dist/components/workbench/types.d.ts +56 -0
- package/dist/components/workbench/types.js +11 -0
- package/dist/components/workbench/useWorkbenchModel.d.ts +83 -0
- package/dist/components/workbench/useWorkbenchModel.js +284 -0
- package/dist/components/workbench/widgets/CodeEditorWidget.d.ts +1 -0
- package/dist/components/workbench/widgets/CodeEditorWidget.js +144 -0
- package/dist/components/workbench/widgets/FileBrowserWidget.d.ts +1 -0
- package/dist/components/workbench/widgets/FileBrowserWidget.js +142 -0
- package/dist/components/workbench/widgets/LogViewerWidget.d.ts +1 -0
- package/dist/components/workbench/widgets/LogViewerWidget.js +86 -0
- package/dist/components/workbench/widgets/SystemMonitorWidget.d.ts +1 -0
- package/dist/components/workbench/widgets/SystemMonitorWidget.js +122 -0
- package/dist/components/workbench/widgets/TerminalWidget.d.ts +1 -0
- package/dist/components/workbench/widgets/TerminalWidget.js +70 -0
- package/dist/components/workbench/widgets/widgetRegistry.d.ts +14 -0
- package/dist/components/workbench/widgets/widgetRegistry.js +71 -0
- package/dist/components/workbench/workbenchHelpers.d.ts +26 -0
- package/dist/components/workbench/workbenchHelpers.js +139 -0
- package/dist/deck.js +14 -12
- package/dist/display-mode.css +70 -0
- package/dist/full.js +475 -468
- package/dist/hooks/useDeckDrag.js +15 -15
- package/dist/layout.js +32 -27
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +2 -0
- package/dist/ui.css +4 -0
- package/dist/workbench.css +1220 -0
- package/dist/workbench.d.ts +1 -0
- package/dist/workbench.js +23 -0
- package/package.json +5 -1
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { useDeck as
|
|
5
|
-
import { useResolvedFloeConfig as
|
|
6
|
-
import { useLayout as
|
|
7
|
-
import { useWidgetRegistry as
|
|
8
|
-
import { deferNonBlocking as
|
|
9
|
-
import { LayoutSelector as
|
|
10
|
-
import { Plus as
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
const
|
|
1
|
+
import { insert as i, createComponent as o, effect as h, className as x, Portal as W, setStyleProperty as _, template as l, use as B, delegateEvents as z } from "solid-js/web";
|
|
2
|
+
import { createSignal as k, createEffect as A, onCleanup as N, Show as p, For as F } from "solid-js";
|
|
3
|
+
import { cn as f } from "../../utils/cn.js";
|
|
4
|
+
import { useDeck as I } from "../../context/DeckContext.js";
|
|
5
|
+
import { useResolvedFloeConfig as T } from "../../context/FloeConfigContext.js";
|
|
6
|
+
import { useLayout as K } from "../../context/LayoutContext.js";
|
|
7
|
+
import { useWidgetRegistry as j } from "../../context/WidgetRegistry.js";
|
|
8
|
+
import { deferNonBlocking as C } from "../../utils/defer.js";
|
|
9
|
+
import { LayoutSelector as q } from "./LayoutSelector.js";
|
|
10
|
+
import { Plus as G, ChevronDown as H, Copy as J } from "../icons/index.js";
|
|
11
|
+
var O = /* @__PURE__ */ l("<button><span>Add"), Q = /* @__PURE__ */ l('<div class="fixed inset-0 z-[9998]">'), U = /* @__PURE__ */ l('<div class="px-3 py-4 text-xs text-muted-foreground text-center">No widgets available'), V = /* @__PURE__ */ l("<div><div class=p-1>"), X = /* @__PURE__ */ l('<button title="Duplicate & edit"><span>Duplicate & Edit'), Y = /* @__PURE__ */ l('<div><div class="w-px h-3.5 bg-border/40"></div><div class=flex-1>'), Z = /* @__PURE__ */ l('<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>'), ee = /* @__PURE__ */ l('<div class="w-4 h-4">');
|
|
12
|
+
function ue($) {
|
|
13
|
+
const P = T(), c = I();
|
|
14
|
+
K();
|
|
15
|
+
const b = j(), [m, g] = k(!1), [w, D] = k({
|
|
14
16
|
top: 0,
|
|
15
17
|
left: 0
|
|
16
18
|
});
|
|
17
|
-
let
|
|
18
|
-
const
|
|
19
|
-
r.stopPropagation(), r.preventDefault(),
|
|
20
|
-
},
|
|
21
|
-
if (r.stopPropagation(), r.preventDefault(), !
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
top:
|
|
25
|
-
left:
|
|
19
|
+
let v;
|
|
20
|
+
const y = () => (P.config.deck.presetsMode ?? "mutable") === "immutable" && !!c.activeLayout()?.isPreset, E = (r, n) => {
|
|
21
|
+
r.stopPropagation(), r.preventDefault(), g(!1), C(() => c.addWidget(n));
|
|
22
|
+
}, L = (r) => {
|
|
23
|
+
if (r.stopPropagation(), r.preventDefault(), !m() && v) {
|
|
24
|
+
const n = v.getBoundingClientRect();
|
|
25
|
+
D({
|
|
26
|
+
top: n.bottom + 4,
|
|
27
|
+
left: n.left
|
|
26
28
|
});
|
|
27
29
|
}
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
|
|
30
|
+
g((n) => !n);
|
|
31
|
+
}, M = () => {
|
|
32
|
+
g(!1);
|
|
31
33
|
};
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const r = (i) => {
|
|
37
|
-
i.key === "Escape" && m(!1);
|
|
34
|
+
return A(() => {
|
|
35
|
+
if (!m() || typeof document > "u") return;
|
|
36
|
+
const r = (n) => {
|
|
37
|
+
n.key === "Escape" && g(!1);
|
|
38
38
|
};
|
|
39
|
-
document.addEventListener("keydown", r),
|
|
39
|
+
document.addEventListener("keydown", r), N(() => document.removeEventListener("keydown", r));
|
|
40
40
|
}), (() => {
|
|
41
|
-
var r =
|
|
42
|
-
return
|
|
41
|
+
var r = Y(), n = r.firstChild, S = n.nextSibling;
|
|
42
|
+
return i(r, o(q, {}), n), i(r, o(p, {
|
|
43
43
|
get when() {
|
|
44
|
-
return
|
|
44
|
+
return !y();
|
|
45
45
|
},
|
|
46
46
|
get children() {
|
|
47
47
|
return [(() => {
|
|
48
|
-
var e =
|
|
49
|
-
e.$$click =
|
|
50
|
-
var t =
|
|
51
|
-
return typeof t == "function" ?
|
|
48
|
+
var e = O(), s = e.firstChild;
|
|
49
|
+
e.$$click = L;
|
|
50
|
+
var t = v;
|
|
51
|
+
return typeof t == "function" ? B(t, e) : v = e, i(e, o(G, {
|
|
52
52
|
class: "w-2.5 h-2.5"
|
|
53
|
-
}),
|
|
53
|
+
}), s), i(e, o(H, {
|
|
54
54
|
get class() {
|
|
55
|
-
return
|
|
55
|
+
return f("w-2.5 h-2.5 opacity-50 transition-transform", m() && "rotate-180");
|
|
56
56
|
}
|
|
57
|
-
}), null),
|
|
58
|
-
})(), o(
|
|
57
|
+
}), null), h(() => x(e, f("flex items-center gap-1 px-1.5 h-5 rounded text-[10px]", "text-muted-foreground/70 hover:text-foreground hover:bg-muted/50", "transition-colors cursor-pointer"))), e;
|
|
58
|
+
})(), o(p, {
|
|
59
59
|
get when() {
|
|
60
|
-
return
|
|
60
|
+
return m();
|
|
61
61
|
},
|
|
62
62
|
get children() {
|
|
63
|
-
return o(
|
|
63
|
+
return o(W, {
|
|
64
64
|
get children() {
|
|
65
65
|
return [(() => {
|
|
66
|
-
var e =
|
|
67
|
-
return e.$$click =
|
|
66
|
+
var e = Q();
|
|
67
|
+
return e.$$click = M, e;
|
|
68
68
|
})(), (() => {
|
|
69
|
-
var e =
|
|
70
|
-
return
|
|
69
|
+
var e = V(), s = e.firstChild;
|
|
70
|
+
return i(s, o(F, {
|
|
71
71
|
get each() {
|
|
72
|
-
return Array.from(
|
|
72
|
+
return Array.from(b.widgets().values());
|
|
73
73
|
},
|
|
74
74
|
children: (t) => (() => {
|
|
75
|
-
var a =
|
|
76
|
-
return a.$$click = (
|
|
75
|
+
var a = Z(), u = a.firstChild;
|
|
76
|
+
return a.$$click = (d) => E(d, t.type), i(a, o(p, {
|
|
77
77
|
get when() {
|
|
78
78
|
return t.icon;
|
|
79
79
|
},
|
|
80
80
|
get fallback() {
|
|
81
|
-
return
|
|
81
|
+
return ee();
|
|
82
82
|
},
|
|
83
|
-
children: (
|
|
84
|
-
const
|
|
85
|
-
return o(
|
|
83
|
+
children: (d) => {
|
|
84
|
+
const R = d();
|
|
85
|
+
return o(R, {
|
|
86
86
|
class: "w-4 h-4 text-muted-foreground"
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
-
}),
|
|
89
|
+
}), u), i(u, () => t.name), a;
|
|
90
90
|
})()
|
|
91
|
-
}), null),
|
|
91
|
+
}), null), i(s, o(p, {
|
|
92
92
|
get when() {
|
|
93
|
-
return
|
|
93
|
+
return b.widgets().size === 0;
|
|
94
94
|
},
|
|
95
95
|
get children() {
|
|
96
|
-
return
|
|
96
|
+
return U();
|
|
97
97
|
}
|
|
98
|
-
}), null),
|
|
99
|
-
var a =
|
|
100
|
-
return a !== t.e &&
|
|
98
|
+
}), null), h((t) => {
|
|
99
|
+
var a = f("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"), u = `${w().top}px`, d = `${Math.max(8, w().left)}px`;
|
|
100
|
+
return a !== t.e && x(e, t.e = a), u !== t.t && _(e, "top", t.t = u), d !== t.a && _(e, "left", t.a = d), t;
|
|
101
101
|
}, {
|
|
102
102
|
e: void 0,
|
|
103
103
|
t: void 0,
|
|
@@ -109,47 +109,25 @@ function be($) {
|
|
|
109
109
|
}
|
|
110
110
|
})];
|
|
111
111
|
}
|
|
112
|
-
}),
|
|
112
|
+
}), S), i(r, o(p, {
|
|
113
113
|
get when() {
|
|
114
|
-
return
|
|
114
|
+
return y();
|
|
115
115
|
},
|
|
116
116
|
get children() {
|
|
117
|
-
var e =
|
|
117
|
+
var e = X(), s = e.firstChild;
|
|
118
118
|
return e.$$click = () => {
|
|
119
|
-
const t =
|
|
120
|
-
t &&
|
|
121
|
-
|
|
119
|
+
const t = c.activeLayout();
|
|
120
|
+
t && C(() => {
|
|
121
|
+
c.duplicateLayout(t.id, `${t.name} (Copy)`), c.setEditMode(!0);
|
|
122
122
|
});
|
|
123
|
-
},
|
|
123
|
+
}, i(e, o(J, {
|
|
124
124
|
class: "w-2.5 h-2.5"
|
|
125
|
-
}),
|
|
125
|
+
}), s), h(() => x(e, f("flex items-center gap-1 px-1.5 h-5 rounded text-[10px]", "text-muted-foreground/70 hover:text-foreground hover:bg-muted/50", "transition-colors cursor-pointer"))), e;
|
|
126
126
|
}
|
|
127
|
-
}), null),
|
|
128
|
-
get when() {
|
|
129
|
-
return k(() => !S())() && !b();
|
|
130
|
-
},
|
|
131
|
-
get children() {
|
|
132
|
-
var e = ne();
|
|
133
|
-
return e.$$click = () => s.toggleEditMode(), n(e, o(d, {
|
|
134
|
-
get when() {
|
|
135
|
-
return s.editMode();
|
|
136
|
-
},
|
|
137
|
-
get fallback() {
|
|
138
|
-
return [o(X, {
|
|
139
|
-
class: "w-2.5 h-2.5"
|
|
140
|
-
}), ae()];
|
|
141
|
-
},
|
|
142
|
-
get children() {
|
|
143
|
-
return [o(V, {
|
|
144
|
-
class: "w-2.5 h-2.5"
|
|
145
|
-
}), oe()];
|
|
146
|
-
}
|
|
147
|
-
})), g(() => h(e, p("flex items-center gap-1 px-1.5 h-5 rounded text-[10px] transition-colors cursor-pointer", s.editMode() ? "bg-primary text-primary-foreground hover:bg-primary/90" : "text-muted-foreground/70 hover:text-foreground hover:bg-muted/50"))), e;
|
|
148
|
-
}
|
|
149
|
-
}), null), n(r, () => $.actions, null), g(() => h(r, p("deck-topbar flex items-center gap-1.5 h-7 px-2", "bg-gradient-to-b from-background to-background/95", "border-b border-border/30", $.class))), r;
|
|
127
|
+
}), null), i(r, () => $.actions, null), h(() => x(r, f("deck-topbar flex items-center gap-1.5 h-7 px-2", "bg-gradient-to-b from-background to-background/95", "border-b border-border/30", $.class))), r;
|
|
150
128
|
})();
|
|
151
129
|
}
|
|
152
|
-
|
|
130
|
+
z(["click"]);
|
|
153
131
|
export {
|
|
154
|
-
|
|
132
|
+
ue as DeckTopBar
|
|
155
133
|
};
|
|
@@ -9,6 +9,12 @@ export interface WidgetFrameProps {
|
|
|
9
9
|
children: JSX.Element;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Widget chrome with header
|
|
12
|
+
* Widget chrome with header drag-handle and resize handles.
|
|
13
|
+
*
|
|
14
|
+
* The header is a persistent, always-on drag handle (notes-style): the grip
|
|
15
|
+
* icon + title region carries `data-widget-drag-handle`, so dragging the
|
|
16
|
+
* header moves the widget while the widget body stays fully interactive.
|
|
17
|
+
* The widget body never blocks pointer events — autosave on every commit
|
|
18
|
+
* means there's no "edit / done" toggle to gate interactions with.
|
|
13
19
|
*/
|
|
14
20
|
export declare function WidgetFrame(props: WidgetFrameProps): JSX.Element;
|
|
@@ -1,109 +1,117 @@
|
|
|
1
|
-
import { insert as
|
|
1
|
+
import { insert as i, createComponent as r, effect as x, className as b, setAttribute as $, template as a, delegateEvents as y } from "solid-js/web";
|
|
2
2
|
import { Show as l } from "solid-js";
|
|
3
|
-
import { cn as
|
|
4
|
-
import { useDeck as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
import { cn as _ } from "../../utils/cn.js";
|
|
4
|
+
import { useDeck as D } from "../../context/DeckContext.js";
|
|
5
|
+
import { useLayout as k } from "../../context/LayoutContext.js";
|
|
6
|
+
import { GripVertical as C, X as W } from "../icons/index.js";
|
|
7
|
+
import { WidgetResizeHandle as d } from "./WidgetResizeHandle.js";
|
|
8
|
+
import { WidgetTypeSwitcher as R } from "./WidgetTypeSwitcher.js";
|
|
9
|
+
var S = /* @__PURE__ */ a('<div class="text-muted-foreground/50 pointer-events-none">'), z = /* @__PURE__ */ a('<div class="opacity-0 group-hover:opacity-100 transition-opacity">'), A = /* @__PURE__ */ a('<button class="opacity-0 group-hover:opacity-100 p-0.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive transition-all cursor-pointer"title="Remove widget">'), E = /* @__PURE__ */ a('<div class="h-full flex flex-col"><div><span class="flex-1 text-xs font-medium text-foreground truncate"></span></div><div class="flex-1 min-h-0 overflow-auto">');
|
|
10
|
+
function T(e) {
|
|
11
|
+
const m = D(), s = k(), v = () => e.widget.title ?? e.widgetDef?.name ?? e.widget.type, g = () => !s.isMobile(), f = (o) => {
|
|
12
|
+
o.stopPropagation(), o.preventDefault(), m.removeWidget(e.widget.id);
|
|
12
13
|
};
|
|
13
14
|
return (() => {
|
|
14
|
-
var
|
|
15
|
-
return
|
|
15
|
+
var o = E(), n = o.firstChild, c = n.firstChild, h = n.nextSibling;
|
|
16
|
+
return i(n, r(l, {
|
|
16
17
|
get when() {
|
|
17
|
-
return
|
|
18
|
+
return g();
|
|
18
19
|
},
|
|
19
20
|
get children() {
|
|
20
|
-
var
|
|
21
|
-
return
|
|
21
|
+
var t = S();
|
|
22
|
+
return i(t, r(C, {
|
|
22
23
|
class: "w-3.5 h-3.5"
|
|
23
|
-
})),
|
|
24
|
+
})), t;
|
|
24
25
|
}
|
|
25
|
-
}),
|
|
26
|
+
}), c), i(n, r(l, {
|
|
26
27
|
get when() {
|
|
27
|
-
return
|
|
28
|
+
return e.widgetDef?.icon;
|
|
28
29
|
},
|
|
29
|
-
children: (
|
|
30
|
-
const
|
|
31
|
-
return
|
|
30
|
+
children: (t) => {
|
|
31
|
+
const u = t();
|
|
32
|
+
return r(u, {
|
|
32
33
|
class: "w-3.5 h-3.5 text-muted-foreground"
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
|
-
}),
|
|
36
|
+
}), c), i(c, v), i(n, r(l, {
|
|
36
37
|
get when() {
|
|
37
|
-
return
|
|
38
|
+
return g();
|
|
38
39
|
},
|
|
39
40
|
get children() {
|
|
40
|
-
|
|
41
|
+
var t = z();
|
|
42
|
+
return i(t, r(R, {
|
|
41
43
|
get widget() {
|
|
42
|
-
return
|
|
44
|
+
return e.widget;
|
|
43
45
|
}
|
|
44
|
-
});
|
|
46
|
+
})), t;
|
|
45
47
|
}
|
|
46
|
-
}), null),
|
|
48
|
+
}), null), i(n, r(l, {
|
|
47
49
|
get when() {
|
|
48
|
-
return
|
|
50
|
+
return g();
|
|
49
51
|
},
|
|
50
52
|
get children() {
|
|
51
|
-
var
|
|
52
|
-
return
|
|
53
|
+
var t = A();
|
|
54
|
+
return t.$$click = f, i(t, r(W, {
|
|
53
55
|
class: "w-3.5 h-3.5"
|
|
54
|
-
})),
|
|
56
|
+
})), t;
|
|
55
57
|
}
|
|
56
|
-
}), null),
|
|
58
|
+
}), null), i(h, () => e.children), i(o, r(l, {
|
|
57
59
|
get when() {
|
|
58
|
-
return
|
|
60
|
+
return g();
|
|
59
61
|
},
|
|
60
62
|
get children() {
|
|
61
|
-
return [
|
|
63
|
+
return [r(d, {
|
|
62
64
|
get widget() {
|
|
63
|
-
return
|
|
65
|
+
return e.widget;
|
|
64
66
|
},
|
|
65
67
|
edge: "e"
|
|
66
|
-
}),
|
|
68
|
+
}), r(d, {
|
|
67
69
|
get widget() {
|
|
68
|
-
return
|
|
70
|
+
return e.widget;
|
|
69
71
|
},
|
|
70
72
|
edge: "s"
|
|
71
|
-
}),
|
|
73
|
+
}), r(d, {
|
|
72
74
|
get widget() {
|
|
73
|
-
return
|
|
75
|
+
return e.widget;
|
|
74
76
|
},
|
|
75
77
|
edge: "se"
|
|
76
|
-
}),
|
|
78
|
+
}), r(d, {
|
|
77
79
|
get widget() {
|
|
78
|
-
return
|
|
80
|
+
return e.widget;
|
|
79
81
|
},
|
|
80
82
|
edge: "w"
|
|
81
|
-
}),
|
|
83
|
+
}), r(d, {
|
|
82
84
|
get widget() {
|
|
83
|
-
return
|
|
85
|
+
return e.widget;
|
|
84
86
|
},
|
|
85
87
|
edge: "n"
|
|
86
|
-
}),
|
|
88
|
+
}), r(d, {
|
|
87
89
|
get widget() {
|
|
88
|
-
return
|
|
90
|
+
return e.widget;
|
|
89
91
|
},
|
|
90
92
|
edge: "sw"
|
|
91
|
-
}),
|
|
93
|
+
}), r(d, {
|
|
92
94
|
get widget() {
|
|
93
|
-
return
|
|
95
|
+
return e.widget;
|
|
94
96
|
},
|
|
95
97
|
edge: "ne"
|
|
96
|
-
}),
|
|
98
|
+
}), r(d, {
|
|
97
99
|
get widget() {
|
|
98
|
-
return
|
|
100
|
+
return e.widget;
|
|
99
101
|
},
|
|
100
102
|
edge: "nw"
|
|
101
103
|
})];
|
|
102
104
|
}
|
|
103
|
-
}), null),
|
|
105
|
+
}), null), x((t) => {
|
|
106
|
+
var u = _("widget-header flex items-center gap-1 px-2 py-1.5 border-b border-border bg-muted/30", "select-none", g() && !e.isDragging && "cursor-move", e.isDragging && "cursor-grabbing"), w = g() ? e.widget.id : void 0;
|
|
107
|
+
return u !== t.e && b(n, t.e = u), w !== t.t && $(n, "data-widget-drag-handle", t.t = w), t;
|
|
108
|
+
}, {
|
|
109
|
+
e: void 0,
|
|
110
|
+
t: void 0
|
|
111
|
+
}), o;
|
|
104
112
|
})();
|
|
105
113
|
}
|
|
106
|
-
|
|
114
|
+
y(["click"]);
|
|
107
115
|
export {
|
|
108
|
-
|
|
116
|
+
T as WidgetFrame
|
|
109
117
|
};
|
|
@@ -7,3 +7,4 @@ export { WidgetTypeSwitcher, type WidgetTypeSwitcherProps } from './WidgetTypeSw
|
|
|
7
7
|
export { LayoutSelector, type LayoutSelectorProps } from './LayoutSelector';
|
|
8
8
|
export { DeckTopBar, type DeckTopBarProps } from './DeckTopBar';
|
|
9
9
|
export { DropZonePreview, type DropZonePreviewProps } from './DropZonePreview';
|
|
10
|
+
export { DeckContextMenu, type DeckContextMenuItem, type DeckContextMenuProps, } from './DeckContextMenu';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Component, type JSX } from 'solid-js';
|
|
2
|
+
export interface DisplayModePageShellProps {
|
|
3
|
+
logo?: JSX.Element;
|
|
4
|
+
actions?: JSX.Element;
|
|
5
|
+
title?: string;
|
|
6
|
+
children: JSX.Element;
|
|
7
|
+
}
|
|
8
|
+
export declare const DisplayModePageShell: Component<DisplayModePageShellProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { insert as r, createComponent as a, template as o } from "solid-js/web";
|
|
2
|
+
import "solid-js";
|
|
3
|
+
import { TopBar as i } from "./TopBar.js";
|
|
4
|
+
var n = /* @__PURE__ */ o("<div class=display-mode-page-shell><main class=display-mode-page-shell__body>");
|
|
5
|
+
const p = (e) => (() => {
|
|
6
|
+
var t = n(), l = t.firstChild;
|
|
7
|
+
return r(t, a(i, {
|
|
8
|
+
get logo() {
|
|
9
|
+
return e.logo;
|
|
10
|
+
},
|
|
11
|
+
get title() {
|
|
12
|
+
return e.title;
|
|
13
|
+
},
|
|
14
|
+
get actions() {
|
|
15
|
+
return e.actions;
|
|
16
|
+
},
|
|
17
|
+
ariaLabel: "Display mode top bar"
|
|
18
|
+
}), l), r(l, () => e.children), t;
|
|
19
|
+
})();
|
|
20
|
+
export {
|
|
21
|
+
p as DisplayModePageShell
|
|
22
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type DisplayMode = 'activity' | 'deck' | 'workbench';
|
|
2
|
+
export declare function sanitizeDisplayMode(value: unknown, fallback?: DisplayMode): DisplayMode;
|
|
3
|
+
export interface DisplayModeSwitcherProps {
|
|
4
|
+
mode: DisplayMode;
|
|
5
|
+
onChange: (mode: DisplayMode) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function DisplayModeSwitcher(props: DisplayModeSwitcherProps): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
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;
|
|
8
|
+
}
|
|
9
|
+
const A = [{
|
|
10
|
+
id: "activity",
|
|
11
|
+
label: "Activity",
|
|
12
|
+
icon: u
|
|
13
|
+
}, {
|
|
14
|
+
id: "deck",
|
|
15
|
+
label: "Deck",
|
|
16
|
+
icon: k
|
|
17
|
+
}, {
|
|
18
|
+
id: "workbench",
|
|
19
|
+
label: "Workbench",
|
|
20
|
+
icon: f
|
|
21
|
+
}];
|
|
22
|
+
function L(i) {
|
|
23
|
+
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;
|
|
29
|
+
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;
|
|
39
|
+
}, {
|
|
40
|
+
e: void 0,
|
|
41
|
+
t: void 0
|
|
42
|
+
}), e;
|
|
43
|
+
})();
|
|
44
|
+
}
|
|
45
|
+
})), r;
|
|
46
|
+
})();
|
|
47
|
+
}
|
|
48
|
+
p(["click"]);
|
|
49
|
+
export {
|
|
50
|
+
L as DisplayModeSwitcher,
|
|
51
|
+
E as sanitizeDisplayMode
|
|
52
|
+
};
|
|
@@ -9,3 +9,5 @@ export { ResizeHandle, type ResizeHandleProps } from './ResizeHandle';
|
|
|
9
9
|
export { SidebarPane, type SidebarPaneProps } from './SidebarPane';
|
|
10
10
|
export { Panel, PanelHeader, PanelContent, type PanelProps, type PanelHeaderProps, type PanelContentProps } from './Panel';
|
|
11
11
|
export { KeepAliveStack, type KeepAliveStackProps, type KeepAliveView } from './KeepAliveStack';
|
|
12
|
+
export { DisplayModeSwitcher, sanitizeDisplayMode, type DisplayMode, type DisplayModeSwitcherProps, } from './DisplayModeSwitcher';
|
|
13
|
+
export { DisplayModePageShell, type DisplayModePageShellProps } from './DisplayModePageShell';
|
|
@@ -25,5 +25,7 @@ export interface InfiniteCanvasProps {
|
|
|
25
25
|
minScale?: number;
|
|
26
26
|
maxScale?: number;
|
|
27
27
|
wheelZoomSpeed?: number;
|
|
28
|
+
/** When true, wheel zoom and pan are suppressed. Widgets inside remain interactive. */
|
|
29
|
+
disablePanZoom?: boolean;
|
|
28
30
|
}
|
|
29
31
|
export declare function InfiniteCanvas(props: InfiniteCanvasProps): JSX.Element;
|