@floegence/floe-webapp-core 0.86.60 → 0.86.62
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/chat/blocks/BlockRenderer.js +1 -1
- package/dist/components/chat/blocks/CodeDiffBlock.js +56 -56
- package/dist/components/chat/blocks/ImageBlock.js +1 -1
- package/dist/components/chat/blocks/ToolCallBlock.js +57 -57
- package/dist/components/chat/status/ConnectionStatus.js +10 -10
- package/dist/components/deck/DeckCell.js +25 -25
- package/dist/components/deck/DeckContextMenu.js +20 -20
- package/dist/components/deck/DeckGrid.js +1 -1
- package/dist/components/deck/DeckTopBar.js +42 -42
- package/dist/components/deck/DropZonePreview.js +6 -6
- package/dist/components/deck/LayoutSelector.js +53 -53
- package/dist/components/deck/WidgetFrame.js +28 -28
- package/dist/components/deck/WidgetPalette.js +31 -31
- package/dist/components/deck/WidgetTypeSwitcher.js +31 -31
- package/dist/components/file-browser/Breadcrumb.js +27 -27
- package/dist/components/file-browser/DirectoryTree.js +15 -15
- package/dist/components/file-browser/DragPreview.js +58 -58
- package/dist/components/file-browser/FileBrowser.js +17 -17
- package/dist/components/file-browser/FileBrowserStatusBar.js +18 -18
- package/dist/components/file-browser/FileBrowserToolbar.js +27 -27
- package/dist/components/file-browser/FileContextMenu.js +47 -47
- package/dist/components/file-browser/FileGridView.js +53 -51
- package/dist/components/file-browser/FileItemDecorations.js +30 -27
- package/dist/components/file-browser/FileListView.js +114 -114
- package/dist/components/icons/index.js +1357 -1357
- package/dist/components/launchpad/Launchpad.js +14 -14
- package/dist/components/launchpad/LaunchpadGrid.js +7 -7
- package/dist/components/launchpad/LaunchpadItem.js +11 -11
- package/dist/components/launchpad/LaunchpadPagination.js +16 -16
- package/dist/components/launchpad/LaunchpadSearch.js +9 -9
- package/dist/components/layout/ActivityBar.js +52 -55
- package/dist/components/layout/BottomBar.js +17 -17
- package/dist/components/layout/MobileNavigationPanel.js +36 -36
- package/dist/components/layout/MobileTabBar.js +39 -39
- package/dist/components/layout/Panel.js +16 -16
- package/dist/components/layout/ResizeHandle.js +19 -19
- package/dist/components/layout/Shell.js +50 -50
- package/dist/components/layout/Sidebar.js +37 -36
- package/dist/components/layout/SidebarPane.js +19 -19
- package/dist/components/layout/TopBar.js +16 -16
- package/dist/components/layout/TopBarIconButton.js +15 -15
- package/dist/components/loading/LoadingOverlay.js +9 -9
- package/dist/components/loading/Skeleton.js +11 -11
- package/dist/components/ui/Button.js +36 -36
- package/dist/components/ui/Card.d.ts +11 -62
- package/dist/components/ui/Card.js +64 -237
- package/dist/components/ui/Checkbox.js +79 -79
- package/dist/components/ui/CommandPalette.js +56 -55
- package/dist/components/ui/Dialog.js +91 -93
- package/dist/components/ui/DirectoryInput.js +22 -22
- package/dist/components/ui/DirectoryPicker.js +8 -8
- package/dist/components/ui/Dropdown.js +89 -87
- package/dist/components/ui/FeedbackIndicator.js +57 -57
- package/dist/components/ui/FileOpenPicker.js +37 -37
- package/dist/components/ui/FileSavePicker.js +41 -41
- package/dist/components/ui/FloatingWindow.js +213 -205
- package/dist/components/ui/Form.js +76 -76
- package/dist/components/ui/HighlightBlock.js +14 -14
- package/dist/components/ui/Input.js +106 -109
- package/dist/components/ui/Pagination.js +86 -86
- package/dist/components/ui/Popover.d.ts +33 -0
- package/dist/components/ui/Popover.js +133 -0
- package/dist/components/ui/ProcessingIndicator.js +344 -345
- package/dist/components/ui/Progress.js +94 -97
- package/dist/components/ui/QuoteBlock.js +25 -25
- package/dist/components/ui/Radio.js +91 -91
- package/dist/components/ui/SegmentedControl.js +24 -24
- package/dist/components/ui/Stepper.js +68 -60
- package/dist/components/ui/Switch.js +25 -25
- package/dist/components/ui/Tabs.js +99 -87
- package/dist/components/ui/Tag.js +12 -9
- package/dist/components/ui/Tooltip.js +30 -30
- package/dist/components/ui/floatingPresence.d.ts +7 -0
- package/dist/components/ui/floatingPresence.js +80 -39
- package/dist/components/ui/index.d.ts +2 -1
- package/dist/components/ui/picker/DirectoryFavorites.js +27 -27
- package/dist/components/ui/picker/PickerBase.js +107 -107
- package/dist/context/NotificationContext.js +4 -4
- package/dist/context/ThemeContext.js +71 -70
- package/dist/floe.css +205 -43
- package/dist/full.js +650 -652
- package/dist/language.css +320 -0
- package/dist/primitives.css +23 -17
- package/dist/standalone.css +1 -0
- package/dist/styles/themes/classicSemanticTokens.d.ts +122 -122
- package/dist/styles/themes/classicSemanticTokens.js +140 -138
- package/dist/styles/themes/index.d.ts +3 -1
- package/dist/styles/themes/index.js +10 -10
- package/dist/styles/themes/presets.d.ts +2 -2
- package/dist/styles/themes/presets.js +34 -34
- package/dist/styles/tokens.d.ts +152 -68
- package/dist/styles/tokens.js +87 -49
- package/dist/styles.css +1 -1
- package/dist/surface.css +161 -116
- package/dist/themes/dark.css +64 -64
- package/dist/themes/light.css +64 -64
- package/dist/ui.css +171 -255
- package/dist/ui.js +176 -178
- package/dist/utils/hotInteraction.d.ts +7 -0
- package/dist/utils/hotInteraction.js +12 -12
- package/dist/widgets/TerminalWidget.js +28 -28
- package/dist/workbench-composition.css +15 -15
- package/package.json +1 -1
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { spread as h, mergeProps as
|
|
2
|
-
import { createMemo as
|
|
1
|
+
import { spread as h, mergeProps as v, insert as l, createComponent as i, Dynamic as y, template as s } from "solid-js/web";
|
|
2
|
+
import { createMemo as o, Show as D } from "solid-js";
|
|
3
3
|
import { cn as R } from "../../utils/cn.js";
|
|
4
4
|
import { useDeck as S } from "../../context/DeckContext.js";
|
|
5
5
|
import { useWidgetRegistry as W } from "../../context/WidgetRegistry.js";
|
|
6
|
-
import { WidgetStateProvider as
|
|
7
|
-
import { positionToGridArea as
|
|
8
|
-
import { WidgetFrame as
|
|
9
|
-
import { SURFACE_PORTAL_LAYER_ATTR as
|
|
10
|
-
var
|
|
6
|
+
import { WidgetStateProvider as k } from "../../context/WidgetStateContext.js";
|
|
7
|
+
import { positionToGridArea as C } from "../../utils/gridLayout.js";
|
|
8
|
+
import { WidgetFrame as _ } from "./WidgetFrame.js";
|
|
9
|
+
import { SURFACE_PORTAL_LAYER_ATTR as z } from "../ui/dialogSurfaceScope.js";
|
|
10
|
+
var b = /* @__PURE__ */ s("<div data-floe-dialog-surface-host=true>"), x = /* @__PURE__ */ s('<div class="h-full flex items-center justify-center text-[var(--floe-ink-soft)] text-xs"><span>Widget: ');
|
|
11
11
|
function j(e) {
|
|
12
|
-
const t = S(),
|
|
12
|
+
const t = S(), n = W(), c = () => t.editMode(), g = () => e.widget.type, d = o(() => n.getWidget(g())), u = o(() => C(e.position)), f = () => t.getWidgetState(e.widget.id), m = (r, w) => {
|
|
13
13
|
t.updateWidgetState(e.widget.id, r, w);
|
|
14
|
-
},
|
|
14
|
+
}, a = () => d()?.component;
|
|
15
15
|
return (() => {
|
|
16
|
-
var r =
|
|
17
|
-
return h(r,
|
|
16
|
+
var r = b();
|
|
17
|
+
return h(r, v({
|
|
18
18
|
get "data-floe-deck-widget-id"() {
|
|
19
19
|
return e.widget.id;
|
|
20
20
|
}
|
|
21
21
|
}, {
|
|
22
|
-
[
|
|
22
|
+
[z]: "true"
|
|
23
23
|
}, {
|
|
24
24
|
"data-floe-geometry-surface": "deck-widget",
|
|
25
25
|
get class() {
|
|
26
|
-
return R("deck-cell relative rounded-md overflow-hidden group", "bg-card border border-
|
|
26
|
+
return R("deck-cell relative rounded-md overflow-hidden group", "bg-card border border-[var(--floe-line)]", !e.isDragging && !e.isResizing && "transition-shadow duration-[var(--floe-duration-fast)] ease-out", e.isDragging && "shadow-2xl z-50 ring-2 ring-primary/70", e.isResizing && "shadow-[var(--floe-elevation-float)] z-50 ring-2 ring-[var(--floe-accent-soft)]", !e.isDragging && !e.isResizing && "hover:ring-1 hover:ring-primary/50", "select-none", e.isDragging && "cursor-grabbing");
|
|
27
27
|
},
|
|
28
28
|
get style() {
|
|
29
29
|
return e.dragOverlayStyle ?? {
|
|
30
|
-
"grid-area":
|
|
30
|
+
"grid-area": u()
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
}), !1, !0),
|
|
33
|
+
}), !1, !0), l(r, i(_, {
|
|
34
34
|
get widget() {
|
|
35
35
|
return e.widget;
|
|
36
36
|
},
|
|
@@ -46,26 +46,26 @@ function j(e) {
|
|
|
46
46
|
get children() {
|
|
47
47
|
return i(D, {
|
|
48
48
|
get when() {
|
|
49
|
-
return
|
|
49
|
+
return a();
|
|
50
50
|
},
|
|
51
51
|
get fallback() {
|
|
52
52
|
return i(A, {
|
|
53
53
|
get type() {
|
|
54
|
-
return
|
|
54
|
+
return g();
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
},
|
|
58
58
|
get children() {
|
|
59
|
-
return i(
|
|
59
|
+
return i(k, {
|
|
60
60
|
get widgetId() {
|
|
61
61
|
return e.widget.id;
|
|
62
62
|
},
|
|
63
|
-
state:
|
|
64
|
-
onStateChange:
|
|
63
|
+
state: f,
|
|
64
|
+
onStateChange: m,
|
|
65
65
|
get children() {
|
|
66
|
-
return i(
|
|
66
|
+
return i(y, {
|
|
67
67
|
get component() {
|
|
68
|
-
return
|
|
68
|
+
return a();
|
|
69
69
|
},
|
|
70
70
|
get widgetId() {
|
|
71
71
|
return e.widget.id;
|
|
@@ -74,7 +74,7 @@ function j(e) {
|
|
|
74
74
|
return e.widget.config;
|
|
75
75
|
},
|
|
76
76
|
get isEditMode() {
|
|
77
|
-
return
|
|
77
|
+
return c();
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
}
|
|
@@ -87,8 +87,8 @@ function j(e) {
|
|
|
87
87
|
}
|
|
88
88
|
function A(e) {
|
|
89
89
|
return (() => {
|
|
90
|
-
var t = x(),
|
|
91
|
-
return
|
|
90
|
+
var t = x(), n = t.firstChild;
|
|
91
|
+
return n.firstChild, l(n, () => e.type, null), t;
|
|
92
92
|
})();
|
|
93
93
|
}
|
|
94
94
|
export {
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { createComponent as l, Portal as
|
|
2
|
-
import { Show as
|
|
1
|
+
import { createComponent as l, Portal as x, insert as c, effect as v, className as h, setStyleProperty as f, template as i, delegateEvents as g } from "solid-js/web";
|
|
2
|
+
import { Show as d, For as p } from "solid-js";
|
|
3
3
|
import { cn as $ } from "../../utils/cn.js";
|
|
4
4
|
import { Plus as w } from "../icons/index.js";
|
|
5
|
-
var
|
|
5
|
+
var k = /* @__PURE__ */ i('<div class="fixed inset-0 z-[9998]">'), b = /* @__PURE__ */ i('<div role=menu><div class="px-2 py-1 text-caption font-semibold uppercase tracking-wider text-[var(--floe-ink-quiet)] flex items-center gap-1.5">Add widget here'), y = /* @__PURE__ */ i('<div class="px-3 py-3 text-xs text-[var(--floe-ink-soft)] text-center">No widgets registered'), _ = /* @__PURE__ */ i('<button type=button role=menuitem class="w-full flex items-center gap-2 px-2.5 py-1.5 rounded-xs hover:bg-[var(--floe-state-hover)] transition-colors text-left cursor-pointer"><span class="text-xs text-foreground">'), C = /* @__PURE__ */ i('<div class="w-4 h-4 flex-shrink-0">');
|
|
6
6
|
function N(r) {
|
|
7
|
-
return l(
|
|
7
|
+
return l(d, {
|
|
8
8
|
get when() {
|
|
9
9
|
return r.open;
|
|
10
10
|
},
|
|
11
11
|
get children() {
|
|
12
|
-
return l(
|
|
12
|
+
return l(x, {
|
|
13
13
|
get children() {
|
|
14
14
|
return [(() => {
|
|
15
|
-
var t =
|
|
16
|
-
return t.$$contextmenu = (
|
|
17
|
-
|
|
15
|
+
var t = k();
|
|
16
|
+
return t.$$contextmenu = (a) => {
|
|
17
|
+
a.preventDefault(), r.onDismiss();
|
|
18
18
|
}, t.$$click = () => r.onDismiss(), t;
|
|
19
19
|
})(), (() => {
|
|
20
|
-
var t =
|
|
21
|
-
return a
|
|
20
|
+
var t = b(), a = t.firstChild, u = a.firstChild;
|
|
21
|
+
return c(a, l(w, {
|
|
22
22
|
class: "w-2.5 h-2.5"
|
|
23
|
-
}),
|
|
23
|
+
}), u), c(t, l(d, {
|
|
24
24
|
get when() {
|
|
25
25
|
return r.items.length > 0;
|
|
26
26
|
},
|
|
@@ -36,7 +36,7 @@ function N(r) {
|
|
|
36
36
|
var n = _(), o = n.firstChild;
|
|
37
37
|
return n.$$click = () => {
|
|
38
38
|
r.onSelect(e.type);
|
|
39
|
-
},
|
|
39
|
+
}, c(n, l(d, {
|
|
40
40
|
get when() {
|
|
41
41
|
return e.icon;
|
|
42
42
|
},
|
|
@@ -44,18 +44,18 @@ function N(r) {
|
|
|
44
44
|
return C();
|
|
45
45
|
},
|
|
46
46
|
children: (s) => {
|
|
47
|
-
const
|
|
48
|
-
return l(
|
|
49
|
-
class: "w-4 h-4 text-
|
|
47
|
+
const m = s();
|
|
48
|
+
return l(m, {
|
|
49
|
+
class: "w-4 h-4 text-[var(--floe-ink-soft)] flex-shrink-0"
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
}), o),
|
|
52
|
+
}), o), c(o, () => e.name), n;
|
|
53
53
|
})()
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
}), null),
|
|
57
|
-
var n = $("fixed z-[9999] min-w-[180px] max-h-[320px] overflow-y-auto", "bg-popover border border-
|
|
58
|
-
return n !== e.e && h(t, e.e = n), o !== e.t &&
|
|
56
|
+
}), null), v((e) => {
|
|
57
|
+
var n = $("fixed z-[9999] min-w-[180px] max-h-[320px] overflow-y-auto", "bg-popover border border-[var(--floe-line)] rounded-panel shadow-[var(--floe-elevation-float-strong)]", "animate-in fade-in slide-in-from-top-1 duration-[var(--floe-duration-fast)]", "p-1"), o = `${r.y}px`, s = `${r.x}px`;
|
|
58
|
+
return n !== e.e && h(t, e.e = n), o !== e.t && f(t, "top", e.t = o), s !== e.a && f(t, "left", e.a = s), e;
|
|
59
59
|
}, {
|
|
60
60
|
e: void 0,
|
|
61
61
|
t: void 0,
|
|
@@ -67,7 +67,7 @@ function N(r) {
|
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
g(["click", "contextmenu"]);
|
|
71
71
|
export {
|
|
72
72
|
N as DeckContextMenu
|
|
73
73
|
};
|
|
@@ -204,7 +204,7 @@ function Lt(z) {
|
|
|
204
204
|
// Only enable vertical scroll when content exceeds 24 rows
|
|
205
205
|
rt() ? "overflow-y-scroll" : "overflow-y-hidden",
|
|
206
206
|
"grid p-1",
|
|
207
|
-
L() && "bg-
|
|
207
|
+
L() && "bg-[var(--floe-well)]",
|
|
208
208
|
z.class
|
|
209
209
|
), s = `${k()}px`, c = k(), l = `1 / ${G() + 1}`;
|
|
210
210
|
return i !== e.e && ot(t, e.e = i), s !== e.t && u(t, "grid-auto-rows", e.t = s), c !== e.a && M(t, "data-row-height", e.a = c), l !== e.o && u(r, "grid-row", e.o = l), e;
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { insert as i, createComponent as o, effect as h, className as x, Portal as W, setStyleProperty 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
|
|
1
|
+
import { insert as i, createComponent as o, effect as h, className as x, Portal as W, setStyleProperty as k, template as l, use as B, delegateEvents as q } from "solid-js/web";
|
|
2
|
+
import { createSignal as _, createEffect as z, onCleanup as A, Show as f, For as N } from "solid-js";
|
|
3
|
+
import { cn as p } from "../../utils/cn.js";
|
|
4
|
+
import { useDeck as F } from "../../context/DeckContext.js";
|
|
5
|
+
import { useResolvedFloeConfig as I } from "../../context/FloeConfigContext.js";
|
|
6
|
+
import { useLayout as T } from "../../context/LayoutContext.js";
|
|
7
|
+
import { useWidgetRegistry as K } from "../../context/WidgetRegistry.js";
|
|
8
8
|
import { deferNonBlocking as C } from "../../utils/defer.js";
|
|
9
|
-
import { LayoutSelector as
|
|
9
|
+
import { LayoutSelector as j } from "./LayoutSelector.js";
|
|
10
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-
|
|
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-[var(--floe-ink-soft)] 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-xs hover:bg-[var(--floe-state-hover)] transition-colors text-left cursor-pointer"><span class=text-xs>'), ee = /* @__PURE__ */ l('<div class="w-4 h-4">');
|
|
12
12
|
function ue($) {
|
|
13
|
-
const P =
|
|
14
|
-
|
|
15
|
-
const b =
|
|
13
|
+
const P = I(), d = F();
|
|
14
|
+
T();
|
|
15
|
+
const b = K(), [m, v] = _(!1), [w, D] = _({
|
|
16
16
|
top: 0,
|
|
17
17
|
left: 0
|
|
18
18
|
});
|
|
19
|
-
let
|
|
20
|
-
const y = () => (P.config.deck.presetsMode ?? "mutable") === "immutable" && !!
|
|
21
|
-
r.stopPropagation(), r.preventDefault(),
|
|
19
|
+
let g;
|
|
20
|
+
const y = () => (P.config.deck.presetsMode ?? "mutable") === "immutable" && !!d.activeLayout()?.isPreset, E = (r, n) => {
|
|
21
|
+
r.stopPropagation(), r.preventDefault(), v(!1), C(() => d.addWidget(n));
|
|
22
22
|
}, L = (r) => {
|
|
23
|
-
if (r.stopPropagation(), r.preventDefault(), !m() &&
|
|
24
|
-
const n =
|
|
23
|
+
if (r.stopPropagation(), r.preventDefault(), !m() && g) {
|
|
24
|
+
const n = g.getBoundingClientRect();
|
|
25
25
|
D({
|
|
26
26
|
top: n.bottom + 4,
|
|
27
27
|
left: n.left
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
v((n) => !n);
|
|
31
31
|
}, M = () => {
|
|
32
|
-
|
|
32
|
+
v(!1);
|
|
33
33
|
};
|
|
34
|
-
return
|
|
34
|
+
return z(() => {
|
|
35
35
|
if (!m() || typeof document > "u") return;
|
|
36
36
|
const r = (n) => {
|
|
37
|
-
n.key === "Escape" &&
|
|
37
|
+
n.key === "Escape" && v(!1);
|
|
38
38
|
};
|
|
39
|
-
document.addEventListener("keydown", r),
|
|
39
|
+
document.addEventListener("keydown", r), A(() => document.removeEventListener("keydown", r));
|
|
40
40
|
}), (() => {
|
|
41
41
|
var r = Y(), n = r.firstChild, S = n.nextSibling;
|
|
42
|
-
return i(r, o(
|
|
42
|
+
return i(r, o(j, {}), n), i(r, o(f, {
|
|
43
43
|
get when() {
|
|
44
44
|
return !y();
|
|
45
45
|
},
|
|
@@ -47,15 +47,15 @@ function ue($) {
|
|
|
47
47
|
return [(() => {
|
|
48
48
|
var e = O(), s = e.firstChild;
|
|
49
49
|
e.$$click = L;
|
|
50
|
-
var t =
|
|
51
|
-
return typeof t == "function" ? B(t, e) :
|
|
50
|
+
var t = g;
|
|
51
|
+
return typeof t == "function" ? B(t, e) : g = 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 p("w-2.5 h-2.5 opacity-50 transition-transform", m() && "rotate-180");
|
|
56
56
|
}
|
|
57
|
-
}), null), h(() => x(e,
|
|
58
|
-
})(), o(
|
|
57
|
+
}), null), h(() => x(e, p("flex items-center gap-1 px-1.5 h-5 rounded-xs text-caption", "text-[var(--floe-ink-quiet)] hover:text-foreground hover:bg-[var(--floe-state-hover)]", "transition-colors cursor-pointer"))), e;
|
|
58
|
+
})(), o(f, {
|
|
59
59
|
get when() {
|
|
60
60
|
return m();
|
|
61
61
|
},
|
|
@@ -67,28 +67,28 @@ function ue($) {
|
|
|
67
67
|
return e.$$click = M, e;
|
|
68
68
|
})(), (() => {
|
|
69
69
|
var e = V(), s = e.firstChild;
|
|
70
|
-
return i(s, o(
|
|
70
|
+
return i(s, o(N, {
|
|
71
71
|
get each() {
|
|
72
72
|
return Array.from(b.widgets().values());
|
|
73
73
|
},
|
|
74
74
|
children: (t) => (() => {
|
|
75
75
|
var a = Z(), u = a.firstChild;
|
|
76
|
-
return a.$$click = (
|
|
76
|
+
return a.$$click = (c) => E(c, t.type), i(a, o(f, {
|
|
77
77
|
get when() {
|
|
78
78
|
return t.icon;
|
|
79
79
|
},
|
|
80
80
|
get fallback() {
|
|
81
81
|
return ee();
|
|
82
82
|
},
|
|
83
|
-
children: (
|
|
84
|
-
const R =
|
|
83
|
+
children: (c) => {
|
|
84
|
+
const R = c();
|
|
85
85
|
return o(R, {
|
|
86
|
-
class: "w-4 h-4 text-
|
|
86
|
+
class: "w-4 h-4 text-[var(--floe-ink-soft)]"
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
}), u), i(u, () => t.name), a;
|
|
90
90
|
})()
|
|
91
|
-
}), null), i(s, o(
|
|
91
|
+
}), null), i(s, o(f, {
|
|
92
92
|
get when() {
|
|
93
93
|
return b.widgets().size === 0;
|
|
94
94
|
},
|
|
@@ -96,8 +96,8 @@ function ue($) {
|
|
|
96
96
|
return U();
|
|
97
97
|
}
|
|
98
98
|
}), null), h((t) => {
|
|
99
|
-
var a =
|
|
100
|
-
return a !== t.e && x(e, t.e = a), u !== t.t &&
|
|
99
|
+
var a = p("fixed z-[9999]", "min-w-[180px] max-h-[300px] overflow-y-auto", "bg-popover border border-[var(--floe-line)] rounded-panel shadow-[var(--floe-elevation-float-strong)]", "animate-in fade-in slide-in-from-top-1 duration-[var(--floe-duration-fast)]"), u = `${w().top}px`, c = `${Math.max(8, w().left)}px`;
|
|
100
|
+
return a !== t.e && x(e, t.e = a), u !== t.t && k(e, "top", t.t = u), c !== t.a && k(e, "left", t.a = c), t;
|
|
101
101
|
}, {
|
|
102
102
|
e: void 0,
|
|
103
103
|
t: void 0,
|
|
@@ -109,25 +109,25 @@ function ue($) {
|
|
|
109
109
|
}
|
|
110
110
|
})];
|
|
111
111
|
}
|
|
112
|
-
}), S), i(r, o(
|
|
112
|
+
}), S), i(r, o(f, {
|
|
113
113
|
get when() {
|
|
114
114
|
return y();
|
|
115
115
|
},
|
|
116
116
|
get children() {
|
|
117
117
|
var e = X(), s = e.firstChild;
|
|
118
118
|
return e.$$click = () => {
|
|
119
|
-
const t =
|
|
119
|
+
const t = d.activeLayout();
|
|
120
120
|
t && C(() => {
|
|
121
|
-
|
|
121
|
+
d.duplicateLayout(t.id, `${t.name} (Copy)`), d.setEditMode(!0);
|
|
122
122
|
});
|
|
123
123
|
}, i(e, o(J, {
|
|
124
124
|
class: "w-2.5 h-2.5"
|
|
125
|
-
}), s), h(() => x(e,
|
|
125
|
+
}), s), h(() => x(e, p("flex items-center gap-1 px-1.5 h-5 rounded-xs text-caption", "text-[var(--floe-ink-quiet)] hover:text-foreground hover:bg-[var(--floe-state-hover)]", "transition-colors cursor-pointer"))), e;
|
|
126
126
|
}
|
|
127
|
-
}), null), i(r, () => $.actions, null), h(() => x(r,
|
|
127
|
+
}), null), i(r, () => $.actions, null), h(() => x(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-[var(--floe-line-quiet)]", $.class))), r;
|
|
128
128
|
})();
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
q(["click"]);
|
|
131
131
|
export {
|
|
132
132
|
ue as DeckTopBar
|
|
133
133
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { effect as
|
|
1
|
+
import { effect as f, className as g, setStyleProperty as a, template as c } from "solid-js/web";
|
|
2
2
|
import { cn as m } from "../../utils/cn.js";
|
|
3
3
|
import { positionToGridArea as b } from "../../utils/gridLayout.js";
|
|
4
|
-
var u = /* @__PURE__ */
|
|
4
|
+
var u = /* @__PURE__ */ c('<div data-floe-deck-drop-preview=true><div class="absolute inset-0 rounded-md">');
|
|
5
5
|
function w(i) {
|
|
6
6
|
const v = () => b(i.position), o = () => i.isValid !== !1 ? "--info" : "--error";
|
|
7
7
|
return (() => {
|
|
8
8
|
var e = u(), l = e.firstChild;
|
|
9
|
-
return
|
|
10
|
-
var
|
|
9
|
+
return f((r) => {
|
|
10
|
+
var n = m(
|
|
11
11
|
"pointer-events-none rounded-md relative z-20",
|
|
12
12
|
"border-2 border-dashed",
|
|
13
13
|
i.isValid !== !1 ? "border-info/60 bg-info/10 ring-1 ring-inset ring-info/25" : "border-error/60 bg-error/10 ring-1 ring-inset ring-error/25",
|
|
14
14
|
// Subtle animation
|
|
15
|
-
"animate-in fade-in duration-
|
|
15
|
+
"animate-in fade-in duration-[var(--floe-duration-fast)]"
|
|
16
16
|
), t = v(), d = `0 4px 16px color-mix(in srgb, var(${o()}) 18%, transparent)`, s = `linear-gradient(
|
|
17
17
|
135deg,
|
|
18
18
|
color-mix(in srgb, var(${o()}) 18%, transparent) 0%,
|
|
19
19
|
transparent 55%,
|
|
20
20
|
color-mix(in srgb, var(${o()}) 10%, var(--card)) 100%
|
|
21
21
|
)`;
|
|
22
|
-
return
|
|
22
|
+
return n !== r.e && g(e, r.e = n), t !== r.t && a(e, "grid-area", r.t = t), d !== r.a && a(e, "box-shadow", r.a = d), s !== r.o && a(l, "background", r.o = s), r;
|
|
23
23
|
}, {
|
|
24
24
|
e: void 0,
|
|
25
25
|
t: void 0,
|
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createSignal as R, Show as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { insert as l, createComponent as i, memo as F, effect as w, className as C, template as s, delegateEvents as j } from "solid-js/web";
|
|
2
|
+
import { createSignal as R, Show as m, For as G } from "solid-js";
|
|
3
|
+
import { cn as k } from "../../utils/cn.js";
|
|
4
4
|
import { useDeck as H } from "../../context/DeckContext.js";
|
|
5
|
-
import { deferNonBlocking as
|
|
5
|
+
import { deferNonBlocking as h } from "../../utils/defer.js";
|
|
6
6
|
import { ChevronDown as J, Check as K, Copy as M, Pencil as Q, Trash as U } from "../icons/index.js";
|
|
7
|
-
var W = /* @__PURE__ */ s('<div class="absolute top-full left-0 mt-1 w-48 bg-popover border border-
|
|
8
|
-
function pe(
|
|
9
|
-
const u = H(), [$, d] = R(!1), [
|
|
10
|
-
d(!1),
|
|
11
|
-
},
|
|
7
|
+
var W = /* @__PURE__ */ s('<div class="absolute top-full left-0 mt-1 w-48 bg-popover border border-[var(--floe-line)] rounded-xs shadow-[var(--floe-elevation-float)] z-50 overflow-hidden"><div class="max-h-48 overflow-y-auto py-0.5"></div><div class="border-t border-[var(--floe-line)] px-1.5 py-1"><button class="w-full text-left text-caption text-primary/80 hover:text-[var(--floe-accent-ink)] cursor-pointer">+ New Layout'), X = /* @__PURE__ */ s('<div class="fixed inset-0 z-40">'), Y = /* @__PURE__ */ s('<div><button><span class="truncate max-w-[80px] text-[var(--floe-ink-quiet)] font-medium">'), Z = /* @__PURE__ */ s('<span class="flex-1 text-caption truncate text-foreground/80">'), ee = /* @__PURE__ */ s('<button class="p-0.5 rounded-xs hover:bg-background transition-colors cursor-pointer"title=Rename>'), te = /* @__PURE__ */ s('<button class="p-0.5 rounded-xs hover:bg-destructive/10 transition-colors cursor-pointer"title=Delete>'), re = /* @__PURE__ */ s('<div class="flex items-center gap-0 opacity-0 group-hover:opacity-100 transition-opacity"><button class="p-0.5 rounded-xs hover:bg-background transition-colors cursor-pointer"title=Duplicate>'), ne = /* @__PURE__ */ s('<div><div class="w-3 h-3 flex-shrink-0">'), le = /* @__PURE__ */ s('<input type=text class="flex-1 text-caption bg-background border border-[var(--floe-line)] rounded-xs px-1 py-0.5"autofocus>'), oe = /* @__PURE__ */ s('<span class="ml-1 text-[var(--floe-ink-quiet)]">(preset)');
|
|
8
|
+
function pe(E) {
|
|
9
|
+
const u = H(), [$, d] = R(!1), [N, b] = R(null), [P, g] = R(""), I = () => u.activeLayout(), D = () => u.layouts(), L = (e) => {
|
|
10
|
+
d(!1), h(() => u.setActiveLayout(e));
|
|
11
|
+
}, T = (e, r) => {
|
|
12
12
|
r.stopPropagation();
|
|
13
13
|
const p = D().find((n) => n.id === e);
|
|
14
14
|
if (p) {
|
|
15
|
-
d(!1),
|
|
15
|
+
d(!1), h(() => u.duplicateLayout(e, `${p.name} (Copy)`));
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
d(!1);
|
|
19
|
-
},
|
|
20
|
-
r.stopPropagation(), d(!1),
|
|
21
|
-
},
|
|
22
|
-
p.stopPropagation(),
|
|
19
|
+
}, z = (e, r) => {
|
|
20
|
+
r.stopPropagation(), d(!1), h(() => u.deleteLayout(e));
|
|
21
|
+
}, A = (e, r, p) => {
|
|
22
|
+
p.stopPropagation(), b(e), g(r);
|
|
23
23
|
}, S = (e) => {
|
|
24
24
|
const r = P().trim();
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
25
|
+
b(null), g(""), r && h(() => u.renameLayout(e, r));
|
|
26
|
+
}, O = () => {
|
|
27
|
+
b(null), g("");
|
|
28
28
|
};
|
|
29
29
|
return (() => {
|
|
30
30
|
var e = Y(), r = e.firstChild, p = r.firstChild;
|
|
31
|
-
return r.$$click = () => d(!$()),
|
|
31
|
+
return r.$$click = () => d(!$()), l(p, () => I()?.name ?? "Layout"), l(r, i(J, {
|
|
32
32
|
get class() {
|
|
33
|
-
return
|
|
33
|
+
return k("w-2.5 h-2.5 text-[var(--floe-ink-ghost)] transition-transform", $() && "rotate-180");
|
|
34
34
|
}
|
|
35
|
-
}), null),
|
|
35
|
+
}), null), l(e, i(m, {
|
|
36
36
|
get when() {
|
|
37
37
|
return $();
|
|
38
38
|
},
|
|
39
39
|
get children() {
|
|
40
40
|
return [(() => {
|
|
41
|
-
var n = W(), f = n.firstChild, x = f.nextSibling,
|
|
42
|
-
return
|
|
41
|
+
var n = W(), f = n.firstChild, x = f.nextSibling, V = x.firstChild;
|
|
42
|
+
return l(f, i(G, {
|
|
43
43
|
get each() {
|
|
44
44
|
return D();
|
|
45
45
|
},
|
|
46
|
-
children: (
|
|
47
|
-
const
|
|
46
|
+
children: (o) => {
|
|
47
|
+
const q = () => o.id === u.activeLayoutId(), _ = () => N() === o.id;
|
|
48
48
|
return (() => {
|
|
49
|
-
var
|
|
50
|
-
return
|
|
49
|
+
var v = ne(), B = v.firstChild;
|
|
50
|
+
return v.$$click = () => !_() && L(o.id), l(B, i(m, {
|
|
51
51
|
get when() {
|
|
52
|
-
return
|
|
52
|
+
return q();
|
|
53
53
|
},
|
|
54
54
|
get children() {
|
|
55
|
-
return
|
|
56
|
-
class: "w-3 h-3 text-
|
|
55
|
+
return i(K, {
|
|
56
|
+
class: "w-3 h-3 text-[var(--floe-accent-ink)]"
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
})),
|
|
59
|
+
})), l(v, i(m, {
|
|
60
60
|
get when() {
|
|
61
|
-
return !
|
|
61
|
+
return !_();
|
|
62
62
|
},
|
|
63
63
|
get fallback() {
|
|
64
64
|
return (() => {
|
|
65
|
-
var t =
|
|
66
|
-
return t.$$click = (
|
|
67
|
-
|
|
68
|
-
}, t.$$input = (
|
|
65
|
+
var t = le();
|
|
66
|
+
return t.$$click = (a) => a.stopPropagation(), t.addEventListener("blur", () => S(o.id)), t.$$keydown = (a) => {
|
|
67
|
+
a.key === "Enter" && S(o.id), a.key === "Escape" && O();
|
|
68
|
+
}, t.$$input = (a) => g(a.currentTarget.value), w(() => t.value = P()), t;
|
|
69
69
|
})();
|
|
70
70
|
},
|
|
71
71
|
get children() {
|
|
72
72
|
var t = Z();
|
|
73
|
-
return
|
|
74
|
-
var
|
|
75
|
-
return () =>
|
|
73
|
+
return l(t, () => o.name, null), l(t, (() => {
|
|
74
|
+
var a = F(() => !!o.isPreset);
|
|
75
|
+
return () => a() && oe();
|
|
76
76
|
})(), null), t;
|
|
77
77
|
}
|
|
78
|
-
}), null),
|
|
78
|
+
}), null), l(v, i(m, {
|
|
79
79
|
get when() {
|
|
80
|
-
return !
|
|
80
|
+
return !_();
|
|
81
81
|
},
|
|
82
82
|
get children() {
|
|
83
|
-
var t = re(),
|
|
84
|
-
return
|
|
85
|
-
class: "w-2.5 h-2.5 text-
|
|
86
|
-
})),
|
|
83
|
+
var t = re(), a = t.firstChild;
|
|
84
|
+
return a.$$click = (c) => T(o.id, c), l(a, i(M, {
|
|
85
|
+
class: "w-2.5 h-2.5 text-[var(--floe-ink-quiet)]"
|
|
86
|
+
})), l(t, i(m, {
|
|
87
87
|
get when() {
|
|
88
|
-
return !
|
|
88
|
+
return !o.isPreset;
|
|
89
89
|
},
|
|
90
90
|
get children() {
|
|
91
91
|
return [(() => {
|
|
92
92
|
var c = ee();
|
|
93
|
-
return c.$$click = (y) =>
|
|
94
|
-
class: "w-2.5 h-2.5 text-
|
|
93
|
+
return c.$$click = (y) => A(o.id, o.name, y), l(c, i(Q, {
|
|
94
|
+
class: "w-2.5 h-2.5 text-[var(--floe-ink-quiet)]"
|
|
95
95
|
})), c;
|
|
96
96
|
})(), (() => {
|
|
97
97
|
var c = te();
|
|
98
|
-
return c.$$click = (y) =>
|
|
98
|
+
return c.$$click = (y) => z(o.id, y), l(c, i(U, {
|
|
99
99
|
class: "w-2.5 h-2.5 text-destructive/70"
|
|
100
100
|
})), c;
|
|
101
101
|
})()];
|
|
102
102
|
}
|
|
103
103
|
}), null), t;
|
|
104
104
|
}
|
|
105
|
-
}), null), w(() => C(
|
|
105
|
+
}), null), w(() => C(v, k("flex items-center gap-1.5 px-1.5 py-1 hover:bg-[var(--floe-state-press)] transition-colors cursor-pointer group", q() && "bg-[var(--floe-well)]"))), v;
|
|
106
106
|
})();
|
|
107
107
|
}
|
|
108
|
-
})),
|
|
109
|
-
d(!1),
|
|
108
|
+
})), V.$$click = () => {
|
|
109
|
+
d(!1), h(() => u.createLayout("New Layout"));
|
|
110
110
|
}, n;
|
|
111
111
|
})(), (() => {
|
|
112
112
|
var n = X();
|
|
@@ -114,7 +114,7 @@ function pe(N) {
|
|
|
114
114
|
})()];
|
|
115
115
|
}
|
|
116
116
|
}), null), w((n) => {
|
|
117
|
-
var f =
|
|
117
|
+
var f = k("relative", E.class), x = k("flex items-center gap-1 px-1.5 h-5 rounded-xs", "hover:bg-[var(--floe-state-hover)] transition-colors text-caption cursor-pointer", $() && "bg-[var(--floe-well)]");
|
|
118
118
|
return f !== n.e && C(e, n.e = f), x !== n.t && C(r, n.t = x), n;
|
|
119
119
|
}, {
|
|
120
120
|
e: void 0,
|
|
@@ -122,7 +122,7 @@ function pe(N) {
|
|
|
122
122
|
}), e;
|
|
123
123
|
})();
|
|
124
124
|
}
|
|
125
|
-
|
|
125
|
+
j(["click", "input", "keydown"]);
|
|
126
126
|
export {
|
|
127
127
|
pe as LayoutSelector
|
|
128
128
|
};
|