@floegence/floe-webapp-core 0.86.60 → 0.86.63
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/FloeRegistryContributions.js +0 -3
- 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/ActivityRailIcons.d.ts +30 -0
- package/dist/components/icons/ActivityRailIcons.js +68 -0
- package/dist/components/icons/index.d.ts +1 -0
- 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 +61 -63
- package/dist/components/layout/DisplayModeSwitcher.d.ts +10 -0
- package/dist/components/layout/DisplayModeSwitcher.js +102 -33
- 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.d.ts +0 -6
- package/dist/components/layout/Shell.js +208 -254
- package/dist/components/layout/Sidebar.js +37 -36
- package/dist/components/layout/SidebarPane.js +19 -19
- package/dist/components/layout/ThemeToggle.d.ts +19 -0
- package/dist/components/layout/ThemeToggle.js +39 -0
- package/dist/components/layout/TopBar.js +16 -16
- package/dist/components/layout/TopBarIconButton.js +15 -15
- package/dist/components/layout/index.d.ts +1 -1
- package/dist/components/loading/LoadingOverlay.js +9 -9
- package/dist/components/loading/Skeleton.js +11 -11
- package/dist/components/ui/Button.js +44 -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 +188 -163
- 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/ComponentRegistry.d.ts +0 -8
- package/dist/context/ComponentRegistry.js +61 -67
- package/dist/context/FloeConfigContext.d.ts +0 -6
- package/dist/context/FloeConfigContext.js +9 -15
- package/dist/context/NotificationContext.js +4 -4
- package/dist/context/ThemeContext.js +71 -70
- package/dist/context/index.d.ts +1 -1
- package/dist/display-mode.css +2 -45
- package/dist/floe.css +205 -43
- package/dist/full.js +701 -695
- package/dist/icons.js +112 -102
- package/dist/language.css +320 -0
- package/dist/layout.js +33 -35
- 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 +214 -117
- 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
- package/dist/components/layout/BottomBar.d.ts +0 -29
- package/dist/components/layout/BottomBar.js +0 -70
|
@@ -42,24 +42,24 @@ var de = /* @__PURE__ */ k('<div class="pt-8 pb-4 px-8">'), ue = /* @__PURE__ */
|
|
|
42
42
|
.launchpad-search {
|
|
43
43
|
animation: launchpad-search-enter 0.4s ease-out;
|
|
44
44
|
}
|
|
45
|
-
</style><div class="flex-1 min-h-0 overflow-hidden"></div><div class="absolute bottom-4 right-4 text-
|
|
45
|
+
</style><div class="flex-1 min-h-0 overflow-hidden"></div><div class="absolute bottom-4 right-4 text-[var(--floe-ink-quiet)] text-xs hidden md:block"><kbd class="px-1.5 py-0.5 rounded-xs border border-[var(--floe-line)] bg-card/80 text-foreground/80 font-mono mr-1">ESC</kbd> to close<span class=mx-2>|</span><kbd class="px-1.5 py-0.5 rounded-xs border border-[var(--floe-line)] bg-card/80 text-foreground/80 font-mono mr-1">←</kbd><kbd class="px-1.5 py-0.5 rounded-xs border border-[var(--floe-line)] bg-card/80 text-foreground/80 font-mono">→</kbd> to navigate`);
|
|
46
46
|
function we(r) {
|
|
47
47
|
let m;
|
|
48
|
-
const [
|
|
48
|
+
const [p, X] = d(""), [Q, w] = d(""), [h, C] = d(0), [R, L] = d(!0), [q, P] = d(null);
|
|
49
49
|
let o = null;
|
|
50
|
-
const
|
|
50
|
+
const b = () => r.itemsPerPage ?? 20, N = () => r.columns ?? 5, W = () => r.showSearch !== !1, S = (() => {
|
|
51
51
|
try {
|
|
52
52
|
return ie();
|
|
53
53
|
} catch {
|
|
54
54
|
return null;
|
|
55
55
|
}
|
|
56
|
-
})(),
|
|
56
|
+
})(), j = () => S ? S.active() : !0, $ = u(() => {
|
|
57
57
|
const e = r.items ?? [], t = r.additionalItems ?? [];
|
|
58
58
|
return [...e, ...t];
|
|
59
59
|
});
|
|
60
60
|
let v = 0;
|
|
61
61
|
Y(() => {
|
|
62
|
-
const e =
|
|
62
|
+
const e = p().trim();
|
|
63
63
|
v += 1;
|
|
64
64
|
const t = v;
|
|
65
65
|
if (!e) {
|
|
@@ -77,9 +77,9 @@ function we(r) {
|
|
|
77
77
|
}))), A = u(() => {
|
|
78
78
|
const e = Q().toLowerCase().trim();
|
|
79
79
|
return e ? z().filter((t) => t.nameLower.includes(e) || t.descLower.includes(e)).map((t) => t.item) : $();
|
|
80
|
-
}), y = u(() => Math.max(1, Math.ceil(A().length /
|
|
81
|
-
const e = h() *
|
|
82
|
-
return A().slice(e, e +
|
|
80
|
+
}), y = u(() => Math.max(1, Math.ceil(A().length / b()))), B = u(() => {
|
|
81
|
+
const e = h() * b();
|
|
82
|
+
return A().slice(e, e + b());
|
|
83
83
|
}), D = (e) => {
|
|
84
84
|
X(e), C(0);
|
|
85
85
|
}, x = (e) => {
|
|
@@ -108,7 +108,7 @@ function we(r) {
|
|
|
108
108
|
y: t.clientY
|
|
109
109
|
});
|
|
110
110
|
}, H = (e) => {
|
|
111
|
-
const t =
|
|
111
|
+
const t = q();
|
|
112
112
|
if (!t) return;
|
|
113
113
|
const a = e.changedTouches[0];
|
|
114
114
|
if (!a) return;
|
|
@@ -118,7 +118,7 @@ function we(r) {
|
|
|
118
118
|
e.target.closest('button, input, a, [role="button"]') || r.onClose?.();
|
|
119
119
|
};
|
|
120
120
|
Y(() => {
|
|
121
|
-
|
|
121
|
+
j() && (document.addEventListener("keydown", I), E(() => {
|
|
122
122
|
document.removeEventListener("keydown", I);
|
|
123
123
|
}));
|
|
124
124
|
}), re(() => {
|
|
@@ -149,13 +149,13 @@ function we(r) {
|
|
|
149
149
|
var c = m;
|
|
150
150
|
return typeof c == "function" ? ee(c, e) : m = e, i(e, l(_, {
|
|
151
151
|
get when() {
|
|
152
|
-
return
|
|
152
|
+
return W();
|
|
153
153
|
},
|
|
154
154
|
get children() {
|
|
155
155
|
var n = de();
|
|
156
156
|
return i(n, l(ae, {
|
|
157
157
|
get value() {
|
|
158
|
-
return
|
|
158
|
+
return p();
|
|
159
159
|
},
|
|
160
160
|
onChange: D,
|
|
161
161
|
placeholder: "Search apps..."
|
|
@@ -169,14 +169,14 @@ function we(r) {
|
|
|
169
169
|
return r.onItemClick;
|
|
170
170
|
},
|
|
171
171
|
get columns() {
|
|
172
|
-
return
|
|
172
|
+
return N();
|
|
173
173
|
},
|
|
174
174
|
get animating() {
|
|
175
175
|
return R();
|
|
176
176
|
}
|
|
177
177
|
})), i(e, l(_, {
|
|
178
178
|
get when() {
|
|
179
|
-
return F(() => y() > 1)() && !
|
|
179
|
+
return F(() => y() > 1)() && !p();
|
|
180
180
|
},
|
|
181
181
|
get children() {
|
|
182
182
|
var n = ue();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { insert as o, createComponent as a, effect as
|
|
2
|
-
import { Show as
|
|
1
|
+
import { insert as o, createComponent as a, effect as s, setStyleProperty as u, template as i } from "solid-js/web";
|
|
2
|
+
import { Show as d, For as f } from "solid-js";
|
|
3
3
|
import { LaunchpadItem as g } from "./LaunchpadItem.js";
|
|
4
|
-
var
|
|
4
|
+
var v = /* @__PURE__ */ i('<div class="grid gap-4 place-items-center">'), h = /* @__PURE__ */ i('<div class="launchpad-grid w-full h-full flex items-center justify-center p-8">'), p = /* @__PURE__ */ i('<div class="text-[var(--floe-ink-soft)] text-xs">No apps found');
|
|
5
5
|
function $(t) {
|
|
6
6
|
const l = () => t.columns ?? 5;
|
|
7
7
|
return (() => {
|
|
8
|
-
var m =
|
|
9
|
-
return o(m, a(
|
|
8
|
+
var m = h();
|
|
9
|
+
return o(m, a(d, {
|
|
10
10
|
get when() {
|
|
11
11
|
return t.items.length > 0;
|
|
12
12
|
},
|
|
@@ -14,7 +14,7 @@ function $(t) {
|
|
|
14
14
|
return p();
|
|
15
15
|
},
|
|
16
16
|
get children() {
|
|
17
|
-
var r =
|
|
17
|
+
var r = v();
|
|
18
18
|
return o(r, a(f, {
|
|
19
19
|
get each() {
|
|
20
20
|
return t.items;
|
|
@@ -34,7 +34,7 @@ function $(t) {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
})
|
|
37
|
-
})),
|
|
37
|
+
})), s((e) => {
|
|
38
38
|
var n = `repeat(${l()}, minmax(0, 1fr))`, c = `${l() * 120}px`;
|
|
39
39
|
return n !== e.e && u(r, "grid-template-columns", e.e = n), c !== e.t && u(r, "max-width", e.t = c), e;
|
|
40
40
|
}, {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
var k = /* @__PURE__ */
|
|
1
|
+
import { insert as c, createComponent as f, effect as g, style as x, setAttribute as y, setStyleProperty as d, template as b, delegateEvents as h } from "solid-js/web";
|
|
2
|
+
var k = /* @__PURE__ */ b('<button type=button class="launchpad-item group flex flex-col items-center gap-2 rounded-panel p-3 cursor-pointer bg-transparent select-none outline-none transition-[transform,background-color] duration-[var(--floe-duration-base)] ease-out hover:-translate-y-[var(--floe-hover-lift)] hover:bg-card/20 focus-visible:bg-card/30 active:scale-[var(--floe-press-scale)]"tabindex=0><div class="w-14 h-14 rounded-panel flex items-center justify-center shadow-[var(--floe-elevation-float)] transition-transform duration-[var(--floe-duration-base)] group-hover:-translate-y-[var(--floe-hover-lift)]"></div><span class="text-xs text-foreground/80 font-medium truncate max-w-[80px] text-center">');
|
|
3
3
|
function C(e) {
|
|
4
|
-
const s = () => e.item.color ?? "linear-gradient(135deg, color-mix(in srgb, var(--primary) 78%, var(--info) 22%), color-mix(in srgb, var(--primary) 58%, var(--accent) 42%))",
|
|
4
|
+
const s = () => e.item.color ?? "linear-gradient(135deg, color-mix(in srgb, var(--primary) 78%, var(--info) 22%), color-mix(in srgb, var(--primary) 58%, var(--accent) 42%))", a = () => {
|
|
5
5
|
e.item.onClick?.(), e.onClick?.(e.item);
|
|
6
|
-
},
|
|
7
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
6
|
+
}, v = (t) => {
|
|
7
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), a());
|
|
8
8
|
};
|
|
9
9
|
return (() => {
|
|
10
|
-
var t = k(), r = t.firstChild,
|
|
11
|
-
return t.$$keydown =
|
|
10
|
+
var t = k(), r = t.firstChild, m = r.nextSibling;
|
|
11
|
+
return t.$$keydown = v, t.$$click = a, c(r, f(e.item.icon, {
|
|
12
12
|
class: "w-7 h-7"
|
|
13
|
-
})),
|
|
14
|
-
var
|
|
13
|
+
})), c(m, () => e.item.name), g((n) => {
|
|
14
|
+
var u = {
|
|
15
15
|
"--item-index": e.index,
|
|
16
16
|
"animation-delay": `${e.index * 30}ms`,
|
|
17
17
|
...e.style
|
|
18
|
-
},
|
|
19
|
-
return n.e =
|
|
18
|
+
}, i = e.item.description ?? e.item.name, o = s(), l = e.item.color ? "white" : "var(--primary-foreground)";
|
|
19
|
+
return n.e = x(t, u, n.e), i !== n.t && y(t, "title", n.t = i), o !== n.a && d(r, "background", n.a = o), l !== n.o && d(r, "color", n.o = l), n;
|
|
20
20
|
}, {
|
|
21
21
|
e: void 0,
|
|
22
22
|
t: void 0,
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { For as
|
|
3
|
-
var
|
|
1
|
+
import { insert as u, createComponent as s, setAttribute as i, effect as g, classList as v, template as l, delegateEvents as d } from "solid-js/web";
|
|
2
|
+
import { For as f } from "solid-js";
|
|
3
|
+
var m = /* @__PURE__ */ l('<div class="launchpad-pagination flex items-center justify-center gap-2">'), b = /* @__PURE__ */ l('<button type=button class="w-2 h-2 rounded-full cursor-pointer transition-[background-color,color,transform] duration-[var(--floe-duration-slow)] outline-none focus-visible:ring-2">');
|
|
4
4
|
function $(r) {
|
|
5
5
|
return (() => {
|
|
6
|
-
var a =
|
|
7
|
-
return
|
|
6
|
+
var a = m();
|
|
7
|
+
return u(a, s(f, {
|
|
8
8
|
get each() {
|
|
9
9
|
return Array.from({
|
|
10
10
|
length: r.totalPages
|
|
11
|
-
}, (
|
|
11
|
+
}, (e, t) => t);
|
|
12
12
|
},
|
|
13
|
-
children: (
|
|
14
|
-
var
|
|
15
|
-
return
|
|
16
|
-
var
|
|
17
|
-
"bg-primary scale-125": r.currentPage ===
|
|
18
|
-
"bg-
|
|
19
|
-
},
|
|
20
|
-
return n.e =
|
|
13
|
+
children: (e) => (() => {
|
|
14
|
+
var t = b();
|
|
15
|
+
return t.$$click = () => r.onPageChange(e), i(t, "aria-label", `Go to page ${e + 1}`), g((n) => {
|
|
16
|
+
var c = {
|
|
17
|
+
"bg-primary scale-125": r.currentPage === e,
|
|
18
|
+
"bg-[var(--floe-ink-ghost)]": r.currentPage !== e
|
|
19
|
+
}, o = r.currentPage === e ? "page" : void 0;
|
|
20
|
+
return n.e = v(t, c, n.e), o !== n.t && i(t, "aria-current", n.t = o), n;
|
|
21
21
|
}, {
|
|
22
22
|
e: void 0,
|
|
23
23
|
t: void 0
|
|
24
|
-
}),
|
|
24
|
+
}), t;
|
|
25
25
|
})()
|
|
26
26
|
})), a;
|
|
27
27
|
})();
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
d(["click"]);
|
|
30
30
|
export {
|
|
31
31
|
$ as LaunchpadPagination
|
|
32
32
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { insert as n, createComponent as
|
|
1
|
+
import { insert as n, createComponent as i, effect as l, setAttribute as d, template as u, delegateEvents as c } from "solid-js/web";
|
|
2
2
|
import { Search as s } from "../icons/index.js";
|
|
3
|
-
var
|
|
4
|
-
function
|
|
3
|
+
var f = /* @__PURE__ */ u('<div class="launchpad-search w-full max-w-md mx-auto"><div class=relative><input type=text class="w-full h-10 pl-10 pr-4 rounded-control bg-card/80 backdrop-blur-sm border border-[var(--floe-line)] text-foreground placeholder:text-[var(--floe-ink-quiet)] outline-none transition-[border-color,box-shadow,background-color] duration-[var(--floe-duration-base)] shadow-[var(--floe-elevation-raised)]">');
|
|
4
|
+
function v(r) {
|
|
5
5
|
return (() => {
|
|
6
|
-
var
|
|
7
|
-
return n(a,
|
|
8
|
-
class: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-
|
|
9
|
-
}), e), e.$$input = (o) =>
|
|
6
|
+
var t = f(), a = t.firstChild, e = a.firstChild;
|
|
7
|
+
return n(a, i(s, {
|
|
8
|
+
class: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--floe-ink-soft)]"
|
|
9
|
+
}), e), e.$$input = (o) => r.onChange(o.currentTarget.value), l(() => d(e, "placeholder", r.placeholder ?? "Search")), l(() => e.value = r.value), t;
|
|
10
10
|
})();
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
c(["input"]);
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
v as LaunchpadSearch
|
|
15
15
|
};
|
|
@@ -1,128 +1,126 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createMemo as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { deferNonBlocking as
|
|
5
|
-
import { Tooltip as
|
|
6
|
-
import { resolveActivityBarClick as
|
|
7
|
-
import { isBarItemContextMenuKey as
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
const
|
|
1
|
+
import { insert as d, createComponent as o, effect as x, className as g, setAttribute as u, template as b, use as D, Dynamic as E, memo as R, delegateEvents as S } from "solid-js/web";
|
|
2
|
+
import { createMemo as m, For as M, Show as B, onMount as j, onCleanup as q } from "solid-js";
|
|
3
|
+
import { cn as v } from "../../utils/cn.js";
|
|
4
|
+
import { deferNonBlocking as P } from "../../utils/defer.js";
|
|
5
|
+
import { Tooltip as T } from "../ui/Tooltip.js";
|
|
6
|
+
import { resolveActivityBarClick as _ } from "./activityBarBehavior.js";
|
|
7
|
+
import { isBarItemContextMenuKey as K, keyboardBarItemContextMenuRequest as N } from "./barItemContextMenu.js";
|
|
8
|
+
var X = /* @__PURE__ */ b('<div class="flex flex-col">'), Y = /* @__PURE__ */ b('<nav data-floe-shell-slot=activity-bar style=border-right-color:var(--activity-bar-border)><div class="flex flex-col">'), F = /* @__PURE__ */ b("<span>"), H = /* @__PURE__ */ b("<button type=button data-floe-interactive=press><span aria-hidden=true>");
|
|
9
|
+
function U(t) {
|
|
10
|
+
const r = m(() => t.activeId), c = m(() => t.collapsed ?? !1), s = m(() => t.onActiveChange), h = m(() => t.onCollapsedChange), f = (e) => {
|
|
11
11
|
if (e.onClick) {
|
|
12
|
-
|
|
12
|
+
P(() => e.onClick());
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
|
-
const
|
|
15
|
+
const a = _({
|
|
16
16
|
clickedId: e.id,
|
|
17
|
-
activeId:
|
|
17
|
+
activeId: r(),
|
|
18
18
|
collapsed: c(),
|
|
19
19
|
behavior: e.collapseBehavior
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
openSidebar:
|
|
23
|
-
}) :
|
|
21
|
+
a.nextActiveId !== r() && (typeof a.openSidebar == "boolean" ? s()(a.nextActiveId, {
|
|
22
|
+
openSidebar: a.openSidebar
|
|
23
|
+
}) : s()(a.nextActiveId)), typeof a.nextCollapsed == "boolean" && h()?.(a.nextCollapsed);
|
|
24
24
|
};
|
|
25
25
|
return (() => {
|
|
26
|
-
var e =
|
|
27
|
-
return
|
|
26
|
+
var e = Y(), a = e.firstChild;
|
|
27
|
+
return d(a, o(M, {
|
|
28
28
|
get each() {
|
|
29
29
|
return t.items;
|
|
30
30
|
},
|
|
31
|
-
children: (n) => o(
|
|
31
|
+
children: (n) => o($, {
|
|
32
32
|
item: n,
|
|
33
33
|
get isActive() {
|
|
34
|
-
return
|
|
34
|
+
return r() === n.id;
|
|
35
35
|
},
|
|
36
|
-
onClick: () =>
|
|
36
|
+
onClick: () => f(n)
|
|
37
37
|
})
|
|
38
|
-
})),
|
|
38
|
+
})), d(e, o(B, {
|
|
39
39
|
get when() {
|
|
40
40
|
return t.bottomItems?.length;
|
|
41
41
|
},
|
|
42
42
|
get children() {
|
|
43
|
-
var n =
|
|
44
|
-
return
|
|
43
|
+
var n = X();
|
|
44
|
+
return d(n, o(M, {
|
|
45
45
|
get each() {
|
|
46
46
|
return t.bottomItems;
|
|
47
47
|
},
|
|
48
|
-
children: (
|
|
49
|
-
item:
|
|
50
|
-
isActive
|
|
51
|
-
|
|
48
|
+
children: (i) => o($, {
|
|
49
|
+
item: i,
|
|
50
|
+
get isActive() {
|
|
51
|
+
return r() === i.id;
|
|
52
|
+
},
|
|
53
|
+
onClick: () => f(i)
|
|
52
54
|
})
|
|
53
55
|
})), n;
|
|
54
56
|
}
|
|
55
|
-
}), null),
|
|
56
|
-
var
|
|
57
|
-
return
|
|
57
|
+
}), null), x((n) => {
|
|
58
|
+
var i = v("w-10 md:w-12 flex flex-col justify-between shrink-0 min-h-0", "bg-activity-bar border-r border-[var(--floe-line-quiet)]", t.class), l = t.ariaLabel;
|
|
59
|
+
return i !== n.e && g(e, n.e = i), l !== n.t && u(e, "aria-label", n.t = l), n;
|
|
58
60
|
}, {
|
|
59
61
|
e: void 0,
|
|
60
62
|
t: void 0
|
|
61
63
|
}), e;
|
|
62
64
|
})();
|
|
63
65
|
}
|
|
64
|
-
function
|
|
65
|
-
let
|
|
66
|
-
const c = () => typeof t.item.badge == "function" ? t.item.badge() : t.item.badge,
|
|
67
|
-
|
|
68
|
-
const
|
|
66
|
+
function $(t) {
|
|
67
|
+
let r;
|
|
68
|
+
const c = () => typeof t.item.badge == "function" ? t.item.badge() : t.item.badge, s = () => typeof t.item.ariaExpanded == "function" ? t.item.ariaExpanded() : t.item.ariaExpanded;
|
|
69
|
+
j(() => t.item.buttonRef?.(r ?? null)), q(() => t.item.buttonRef?.(null));
|
|
70
|
+
const h = (e) => {
|
|
69
71
|
t.item.onContextMenu && (e.preventDefault(), e.stopPropagation(), t.item.onContextMenu({
|
|
70
72
|
trigger: e.currentTarget,
|
|
71
73
|
clientX: e.clientX,
|
|
72
74
|
clientY: e.clientY,
|
|
73
75
|
source: "pointer"
|
|
74
76
|
}));
|
|
75
|
-
},
|
|
76
|
-
!t.item.onContextMenu || !
|
|
77
|
+
}, f = (e) => {
|
|
78
|
+
!t.item.onContextMenu || !K(e) || (e.preventDefault(), e.stopPropagation(), t.item.onContextMenu(N(e.currentTarget)));
|
|
77
79
|
};
|
|
78
|
-
return o(
|
|
80
|
+
return o(T, {
|
|
79
81
|
get content() {
|
|
80
82
|
return t.item.label;
|
|
81
83
|
},
|
|
82
84
|
placement: "right",
|
|
83
85
|
delay: 0,
|
|
84
86
|
get children() {
|
|
85
|
-
var e =
|
|
86
|
-
e.$$keydown =
|
|
87
|
-
var
|
|
88
|
-
return typeof
|
|
89
|
-
get when() {
|
|
90
|
-
return t.isActive;
|
|
91
|
-
},
|
|
92
|
-
get children() {
|
|
93
|
-
return X();
|
|
94
|
-
}
|
|
95
|
-
}), null), l(e, o(B, {
|
|
87
|
+
var e = H(), a = e.firstChild;
|
|
88
|
+
e.$$keydown = f, e.$$contextmenu = h, e.$$click = () => t.onClick();
|
|
89
|
+
var n = r;
|
|
90
|
+
return typeof n == "function" ? D(n, e) : r = e, d(e, o(E, {
|
|
96
91
|
get component() {
|
|
97
92
|
return t.item.icon;
|
|
98
93
|
},
|
|
99
|
-
class
|
|
100
|
-
|
|
94
|
+
get class() {
|
|
95
|
+
return v("relative w-5 h-5 transition-colors duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", t.isActive ? "text-activity-bar-foreground-active" : "group-hover/activity-item:text-activity-bar-foreground-active");
|
|
96
|
+
}
|
|
97
|
+
}), null), d(e, o(B, {
|
|
101
98
|
get when() {
|
|
102
99
|
return c();
|
|
103
100
|
},
|
|
104
101
|
get children() {
|
|
105
|
-
var
|
|
106
|
-
return
|
|
107
|
-
var
|
|
108
|
-
return () =>
|
|
109
|
-
})()),
|
|
102
|
+
var i = F();
|
|
103
|
+
return d(i, (() => {
|
|
104
|
+
var l = R(() => typeof c() == "number" && c() > 99);
|
|
105
|
+
return () => l() ? "99+" : c();
|
|
106
|
+
})()), x(() => g(i, v("absolute top-0.5 right-0.5 min-w-3.5 h-3.5 px-1", "flex items-center justify-center", "text-[length:var(--floe-type-caption)] font-medium rounded-full", "bg-activity-bar-badge text-activity-bar-badge-foreground"))), i;
|
|
110
107
|
}
|
|
111
|
-
}), null),
|
|
112
|
-
var
|
|
113
|
-
return
|
|
108
|
+
}), null), x((i) => {
|
|
109
|
+
var l = v("group/activity-item relative w-full aspect-square flex items-center justify-center cursor-pointer", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset", "text-activity-bar-foreground", t.isActive && "text-activity-bar-foreground-active"), y = t.item.label, C = t.isActive, k = s(), A = t.item.ariaControls, w = t.item.ariaHasPopup ?? (t.item.onContextMenu ? "menu" : void 0), I = v("absolute inset-1 rounded-md", "transition-colors duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", t.isActive ? "bg-[var(--floe-state-selected)]" : "bg-transparent group-hover/activity-item:bg-[var(--floe-state-hover)]");
|
|
110
|
+
return l !== i.e && g(e, i.e = l), y !== i.t && u(e, "aria-label", i.t = y), C !== i.a && u(e, "aria-pressed", i.a = C), k !== i.o && u(e, "aria-expanded", i.o = k), A !== i.i && u(e, "aria-controls", i.i = A), w !== i.n && u(e, "aria-haspopup", i.n = w), I !== i.s && g(a, i.s = I), i;
|
|
114
111
|
}, {
|
|
115
112
|
e: void 0,
|
|
116
113
|
t: void 0,
|
|
117
114
|
a: void 0,
|
|
118
115
|
o: void 0,
|
|
119
116
|
i: void 0,
|
|
120
|
-
n: void 0
|
|
117
|
+
n: void 0,
|
|
118
|
+
s: void 0
|
|
121
119
|
}), e;
|
|
122
120
|
}
|
|
123
121
|
});
|
|
124
122
|
}
|
|
125
|
-
|
|
123
|
+
S(["click", "contextmenu", "keydown"]);
|
|
126
124
|
export {
|
|
127
|
-
|
|
125
|
+
U as ActivityBar
|
|
128
126
|
};
|
|
@@ -3,5 +3,15 @@ export declare function sanitizeDisplayMode(value: unknown, fallback?: DisplayMo
|
|
|
3
3
|
export interface DisplayModeSwitcherProps {
|
|
4
4
|
mode: DisplayMode;
|
|
5
5
|
onChange: (mode: DisplayMode) => void;
|
|
6
|
+
class?: string;
|
|
6
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Display-mode switcher.
|
|
10
|
+
*
|
|
11
|
+
* The three modes are peer views of the same workspace, so the control is a
|
|
12
|
+
* segmented rail rather than three buttons: one travelling pill marks the
|
|
13
|
+
* current mode and slides to the next one. The pill is the selection — the
|
|
14
|
+
* faces under it stay flat — which keeps a single thing moving and lets the
|
|
15
|
+
* eye follow it across the bar.
|
|
16
|
+
*/
|
|
7
17
|
export declare function DisplayModeSwitcher(props: DisplayModeSwitcherProps): import("solid-js").JSX.Element;
|
|
@@ -1,52 +1,121 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { For as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { insert as b, memo as z, effect as y, setStyleProperty as p, createComponent as k, use as D, setAttribute as A, className as R, template as x, delegateEvents as B } from "solid-js/web";
|
|
2
|
+
import { createSignal as C, createEffect as M, onCleanup as $, For as F } from "solid-js";
|
|
3
|
+
import { cn as E } from "../../utils/cn.js";
|
|
4
|
+
import { Bookmark as I, LayoutDashboard as O, Grid3x3 as P } from "../icons/index.js";
|
|
5
|
+
var N = /* @__PURE__ */ x('<div role=tablist aria-label="Display mode"data-floe-surface=inset data-floe-surface-part=rail>'), q = /* @__PURE__ */ x('<span aria-hidden=true data-floe-surface=raised data-floe-surface-part=segment-pill class="display-mode-switcher__pill pointer-events-none absolute top-0.5 bottom-0.5 left-0 rounded-[calc(var(--floe-radius-control)-2px)]">'), W = /* @__PURE__ */ x('<button type=button role=tab><span class="display-mode-switcher__label whitespace-nowrap">');
|
|
6
|
+
const G = /* @__PURE__ */ new Set(["activity", "deck", "workbench"]);
|
|
7
|
+
function Q(r, s = "activity") {
|
|
8
|
+
return typeof r == "string" && G.has(r) ? r : s;
|
|
8
9
|
}
|
|
9
|
-
const
|
|
10
|
+
const H = [{
|
|
10
11
|
id: "activity",
|
|
11
12
|
label: "Activity",
|
|
12
|
-
icon:
|
|
13
|
+
icon: I
|
|
13
14
|
}, {
|
|
14
15
|
id: "deck",
|
|
15
16
|
label: "Deck",
|
|
16
|
-
icon:
|
|
17
|
+
icon: O
|
|
17
18
|
}, {
|
|
18
19
|
id: "workbench",
|
|
19
20
|
label: "Workbench",
|
|
20
|
-
icon:
|
|
21
|
-
}]
|
|
22
|
-
|
|
21
|
+
icon: P
|
|
22
|
+
}], L = {
|
|
23
|
+
x: 0,
|
|
24
|
+
width: 0,
|
|
25
|
+
visible: !1
|
|
26
|
+
};
|
|
27
|
+
let h;
|
|
28
|
+
function T(r) {
|
|
29
|
+
let s;
|
|
30
|
+
const d = /* @__PURE__ */ new Map(), [g, f] = C(L), [w, S] = C(!1), _ = () => {
|
|
31
|
+
const o = s, v = d.get(r.mode);
|
|
32
|
+
if (!o || !v) {
|
|
33
|
+
f(L);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const n = o.getBoundingClientRect();
|
|
37
|
+
if (n.width <= 0)
|
|
38
|
+
return;
|
|
39
|
+
const l = (a) => {
|
|
40
|
+
const e = d.get(a);
|
|
41
|
+
if (!e) return;
|
|
42
|
+
const c = e.offsetParent === o && Number.isFinite(e.offsetLeft), u = c ? e.offsetLeft : e.getBoundingClientRect().left - n.left, m = c ? e.offsetWidth : e.getBoundingClientRect().width;
|
|
43
|
+
return {
|
|
44
|
+
x: u,
|
|
45
|
+
width: m
|
|
46
|
+
};
|
|
47
|
+
}, t = l(r.mode);
|
|
48
|
+
if (!t || t.width <= 0) return;
|
|
49
|
+
const i = h !== void 0 && h !== r.mode ? l(h) : void 0;
|
|
50
|
+
if (w())
|
|
51
|
+
f({
|
|
52
|
+
...t,
|
|
53
|
+
visible: t.width > 0
|
|
54
|
+
});
|
|
55
|
+
else {
|
|
56
|
+
const a = i ?? t;
|
|
57
|
+
f({
|
|
58
|
+
...a,
|
|
59
|
+
visible: a.width > 0
|
|
60
|
+
}), requestAnimationFrame(() => {
|
|
61
|
+
w() || (S(!0), requestAnimationFrame(() => {
|
|
62
|
+
i && f({
|
|
63
|
+
...t,
|
|
64
|
+
visible: t.width > 0
|
|
65
|
+
});
|
|
66
|
+
}));
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
h = r.mode;
|
|
70
|
+
};
|
|
71
|
+
if (M(() => {
|
|
72
|
+
r.mode, _();
|
|
73
|
+
}), typeof ResizeObserver < "u") {
|
|
74
|
+
const o = new ResizeObserver(() => _());
|
|
75
|
+
M(() => {
|
|
76
|
+
s && o.observe(s);
|
|
77
|
+
}), $(() => o.disconnect());
|
|
78
|
+
}
|
|
23
79
|
return (() => {
|
|
24
|
-
var
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
80
|
+
var o = N(), v = s;
|
|
81
|
+
return typeof v == "function" ? D(v, o) : s = o, b(o, (() => {
|
|
82
|
+
var n = z(() => !!g().visible);
|
|
83
|
+
return () => n() ? (() => {
|
|
84
|
+
var l = q();
|
|
85
|
+
return y((t) => {
|
|
86
|
+
var i = `translate3d(${g().x}px, 0, 0)`, a = `${g().width}px`, e = w() ? void 0 : "none";
|
|
87
|
+
return i !== t.e && p(l, "transform", t.e = i), a !== t.t && p(l, "width", t.t = a), e !== t.a && p(l, "transition-property", t.a = e), t;
|
|
88
|
+
}, {
|
|
89
|
+
e: void 0,
|
|
90
|
+
t: void 0,
|
|
91
|
+
a: void 0
|
|
92
|
+
}), l;
|
|
93
|
+
})() : null;
|
|
94
|
+
})(), null), b(o, k(F, {
|
|
95
|
+
each: H,
|
|
96
|
+
children: (n) => {
|
|
97
|
+
const l = n.icon, t = () => r.mode === n.id;
|
|
29
98
|
return (() => {
|
|
30
|
-
var
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return n !== t.e && e.classList.toggle("is-active", t.e = n), d !== t.t && y(e, "aria-selected", t.t = d), t;
|
|
99
|
+
var i = W(), a = i.firstChild;
|
|
100
|
+
return i.$$click = () => r.onChange(n.id), D((e) => {
|
|
101
|
+
d.set(n.id, e), $(() => d.delete(n.id));
|
|
102
|
+
}, i), b(i, k(l, {
|
|
103
|
+
class: "display-mode-switcher__icon h-3 w-3 shrink-0"
|
|
104
|
+
}), a), b(a, () => n.label), y((e) => {
|
|
105
|
+
var c = t(), u = t() ? 0 : -1, m = E("display-mode-switcher__option relative z-10 inline-flex cursor-pointer items-center", "gap-1.5 rounded-sm px-2", "transition-colors duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-[var(--floe-plane)]", t() ? "text-foreground" : "text-[var(--floe-ink-soft)] hover:text-foreground");
|
|
106
|
+
return c !== e.e && A(i, "aria-selected", e.e = c), u !== e.t && A(i, "tabindex", e.t = u), m !== e.a && R(i, e.a = m), e;
|
|
39
107
|
}, {
|
|
40
108
|
e: void 0,
|
|
41
|
-
t: void 0
|
|
42
|
-
|
|
109
|
+
t: void 0,
|
|
110
|
+
a: void 0
|
|
111
|
+
}), i;
|
|
43
112
|
})();
|
|
44
113
|
}
|
|
45
|
-
})), r;
|
|
114
|
+
}), null), y(() => R(o, E("display-mode-switcher relative inline-flex items-stretch", "h-[var(--floe-control-height-sm)] rounded-control border border-[var(--floe-line)] p-0.5", "text-[length:var(--floe-type-caption)] leading-[var(--floe-line-control)]", r.class))), o;
|
|
46
115
|
})();
|
|
47
116
|
}
|
|
48
|
-
|
|
117
|
+
B(["click"]);
|
|
49
118
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
119
|
+
T as DisplayModeSwitcher,
|
|
120
|
+
Q as sanitizeDisplayMode
|
|
52
121
|
};
|