@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,9 +1,9 @@
|
|
|
1
|
-
import { createComponent as o, insert as l, effect as f, className as b, setAttribute as
|
|
2
|
-
import { splitProps as B, createUniqueId as U, Switch as V, Match as S, Show as
|
|
1
|
+
import { createComponent as o, insert as l, effect as f, className as b, setAttribute as m, spread as D, mergeProps as M, template as v, use as N, memo as E } from "solid-js/web";
|
|
2
|
+
import { splitProps as B, createUniqueId as U, Switch as V, Match as S, Show as p, For as J, useContext as K, createEffect as O, createContext as Q } from "solid-js";
|
|
3
3
|
import { cn as u } from "../../utils/cn.js";
|
|
4
|
-
var R = /* @__PURE__ */ v('<svg viewBox="0 0 12 12"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M2 6l3 3 5-6">'), T = /* @__PURE__ */ v('<svg viewBox="0 0 12 12"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round><path d="M2 6h8">'), W = /* @__PURE__ */ v("<div role=group>"), X = /* @__PURE__ */ v("<div data-floe-surface=inset data-floe-surface-part=indicator>"), Y = /* @__PURE__ */ v("<input data-floe-choice-input type=checkbox>"), _ = /* @__PURE__ */ v("<span>"), Z = /* @__PURE__ */ v('<div class="flex flex-col">'), ee = /* @__PURE__ */ v('<label><div class="relative flex items-center justify-center pt-0.5">'), re = /* @__PURE__ */ v("<label data-floe-surface-part=choice><span class=font-medium>"), te = /* @__PURE__ */ v('<div class="absolute top-2 right-2"><svg class="w-4 h-4 text-
|
|
4
|
+
var R = /* @__PURE__ */ v('<svg viewBox="0 0 12 12"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M2 6l3 3 5-6">'), T = /* @__PURE__ */ v('<svg viewBox="0 0 12 12"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round><path d="M2 6h8">'), W = /* @__PURE__ */ v("<div role=group>"), X = /* @__PURE__ */ v("<div data-floe-surface=inset data-floe-surface-part=indicator>"), Y = /* @__PURE__ */ v("<input data-floe-choice-input type=checkbox>"), _ = /* @__PURE__ */ v("<span>"), Z = /* @__PURE__ */ v('<div class="flex flex-col">'), ee = /* @__PURE__ */ v('<label><div class="relative flex items-center justify-center pt-0.5">'), re = /* @__PURE__ */ v("<label data-floe-surface-part=choice><span class=font-medium>"), te = /* @__PURE__ */ v('<div class="absolute top-2 right-2"><svg class="w-4 h-4 text-[var(--floe-accent-ink)]"fill=currentColor viewBox="0 0 20 20"><path fill-rule=evenodd d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"clip-rule=evenodd>'), ne = /* @__PURE__ */ v('<label data-floe-surface-part=choice><div class="flex items-start gap-3"><div class="flex items-center justify-center pt-0.5"></div><div class="flex flex-col flex-1 min-w-0">'), oe = /* @__PURE__ */ v('<div class="absolute top-1.5 right-1.5"><div class="w-4 h-4 rounded-full bg-primary flex items-center justify-center">'), le = /* @__PURE__ */ v("<label data-floe-surface-part=choice>"), ae = /* @__PURE__ */ v("<div>");
|
|
5
5
|
const F = Q();
|
|
6
|
-
function
|
|
6
|
+
function ie() {
|
|
7
7
|
return K(F);
|
|
8
8
|
}
|
|
9
9
|
const C = {
|
|
@@ -11,13 +11,13 @@ const C = {
|
|
|
11
11
|
box: "w-3.5 h-3.5",
|
|
12
12
|
icon: "w-2.5 h-2.5",
|
|
13
13
|
label: "text-xs",
|
|
14
|
-
description: "text-
|
|
14
|
+
description: "text-caption"
|
|
15
15
|
},
|
|
16
16
|
md: {
|
|
17
17
|
box: "w-4 h-4",
|
|
18
18
|
icon: "w-3 h-3",
|
|
19
|
-
label: "text-
|
|
20
|
-
description: "text-
|
|
19
|
+
label: "text-sm",
|
|
20
|
+
description: "text-caption"
|
|
21
21
|
},
|
|
22
22
|
lg: {
|
|
23
23
|
box: "w-5 h-5",
|
|
@@ -33,7 +33,7 @@ const C = {
|
|
|
33
33
|
sm: "p-2.5",
|
|
34
34
|
md: "p-3",
|
|
35
35
|
lg: "p-4"
|
|
36
|
-
},
|
|
36
|
+
}, G = {
|
|
37
37
|
sm: {
|
|
38
38
|
container: "p-3 min-w-[80px]",
|
|
39
39
|
icon: "w-5 h-5"
|
|
@@ -49,78 +49,78 @@ const C = {
|
|
|
49
49
|
};
|
|
50
50
|
function A(w) {
|
|
51
51
|
return (() => {
|
|
52
|
-
var
|
|
53
|
-
return f(() =>
|
|
52
|
+
var i = R();
|
|
53
|
+
return f(() => m(i, "class", w.class)), i;
|
|
54
54
|
})();
|
|
55
55
|
}
|
|
56
56
|
function de(w) {
|
|
57
57
|
return (() => {
|
|
58
|
-
var
|
|
59
|
-
return f(() =>
|
|
58
|
+
var i = T();
|
|
59
|
+
return f(() => m(i, "class", w.class)), i;
|
|
60
60
|
})();
|
|
61
61
|
}
|
|
62
62
|
function ue(w) {
|
|
63
|
-
const [
|
|
64
|
-
value: () =>
|
|
65
|
-
onChange: (
|
|
66
|
-
const x =
|
|
67
|
-
|
|
63
|
+
const [i, e] = B(w, ["value", "onChange", "size", "orientation", "variant", "disabled", "class", "children"]), g = () => i.variant ?? "default", I = {
|
|
64
|
+
value: () => i.value ?? [],
|
|
65
|
+
onChange: (h, d) => {
|
|
66
|
+
const x = i.value ?? [], k = d ? [...x, h] : x.filter((c) => c !== h);
|
|
67
|
+
i.onChange?.(k);
|
|
68
68
|
},
|
|
69
|
-
size: () =>
|
|
70
|
-
variant:
|
|
71
|
-
disabled: () =>
|
|
69
|
+
size: () => i.size ?? "md",
|
|
70
|
+
variant: g,
|
|
71
|
+
disabled: () => i.disabled ?? !1
|
|
72
72
|
}, j = () => {
|
|
73
|
-
const
|
|
74
|
-
return
|
|
73
|
+
const h = g(), d = i.orientation === "horizontal";
|
|
74
|
+
return h === "button" ? u("inline-flex rounded-group border border-[var(--floe-line)] overflow-hidden", d ? "flex-row" : "flex-col") : h === "card" || h === "tile" ? u("grid gap-2", d ? "grid-flow-col auto-cols-fr" : "grid-cols-1") : u("flex", d ? "flex-row flex-wrap gap-4" : "flex-col gap-2");
|
|
75
75
|
};
|
|
76
76
|
return o(F.Provider, {
|
|
77
77
|
value: I,
|
|
78
78
|
get children() {
|
|
79
|
-
var
|
|
80
|
-
return D(
|
|
79
|
+
var h = W();
|
|
80
|
+
return D(h, M({
|
|
81
81
|
get "data-floe-surface"() {
|
|
82
|
-
return
|
|
82
|
+
return g() === "button" ? "inset" : void 0;
|
|
83
83
|
},
|
|
84
84
|
get "data-floe-surface-part"() {
|
|
85
|
-
return
|
|
85
|
+
return g() === "button" ? "rail" : void 0;
|
|
86
86
|
},
|
|
87
87
|
get class() {
|
|
88
|
-
return u(j(),
|
|
88
|
+
return u(j(), i.class);
|
|
89
89
|
}
|
|
90
|
-
}, e), !1, !0), l(
|
|
90
|
+
}, e), !1, !0), l(h, () => i.children), h;
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
function fe(w) {
|
|
95
|
-
const
|
|
96
|
-
|
|
95
|
+
const i = ie(), [e, g] = B(w, ["value", "checked", "onChange", "label", "description", "icon", "size", "variant", "indeterminate", "ref", "class", "disabled", "id"]), I = U(), j = () => e.id ?? I, h = () => i !== void 0, d = () => e.size ?? i?.size() ?? "md", x = () => e.variant ?? i?.variant() ?? "default", k = () => e.disabled ?? i?.disabled() ?? !1, c = () => h() && e.value ? i.value().includes(e.value) : e.checked ?? !1, H = () => {
|
|
96
|
+
k() || (h() && e.value ? i.onChange(e.value, !c()) : e.onChange?.(!c()));
|
|
97
97
|
}, L = () => (() => {
|
|
98
98
|
var t = X();
|
|
99
|
-
return l(t, o(
|
|
99
|
+
return l(t, o(p, {
|
|
100
100
|
get when() {
|
|
101
101
|
return e.indeterminate;
|
|
102
102
|
},
|
|
103
103
|
get children() {
|
|
104
104
|
return o(de, {
|
|
105
105
|
get class() {
|
|
106
|
-
return u(C[d()].icon, "transition-transform duration-
|
|
106
|
+
return u(C[d()].icon, "transition-transform duration-[var(--floe-duration-fast)]");
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
-
}), null), l(t, o(
|
|
110
|
+
}), null), l(t, o(p, {
|
|
111
111
|
get when() {
|
|
112
|
-
return
|
|
112
|
+
return E(() => !e.indeterminate)() && c();
|
|
113
113
|
},
|
|
114
114
|
get children() {
|
|
115
115
|
return o(A, {
|
|
116
116
|
get class() {
|
|
117
|
-
return u(C[d()].icon, "transition-transform duration-
|
|
117
|
+
return u(C[d()].icon, "transition-transform duration-[var(--floe-duration-fast)]");
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
}), null), f((r) => {
|
|
122
|
-
var n = c() || e.indeterminate ? "true" : void 0,
|
|
123
|
-
return n !== r.e &&
|
|
122
|
+
var n = c() || e.indeterminate ? "true" : void 0, a = u("rounded-xs border-2 transition-[background-color,border-color,color,transform] duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", "flex items-center justify-center", C[d()].box, c() || e.indeterminate ? "border-primary bg-primary text-primary-foreground" : "border-[var(--floe-control-edge)] bg-transparent hover:border-[var(--floe-control-edge-hover)]", k() && "cursor-not-allowed");
|
|
123
|
+
return n !== r.e && m(t, "data-floe-selected", r.e = n), a !== r.t && b(t, r.t = a), r;
|
|
124
124
|
}, {
|
|
125
125
|
e: void 0,
|
|
126
126
|
t: void 0
|
|
@@ -131,8 +131,8 @@ function fe(w) {
|
|
|
131
131
|
r && (r.indeterminate = e.indeterminate ?? !1);
|
|
132
132
|
}), (() => {
|
|
133
133
|
var n = Y();
|
|
134
|
-
return N((
|
|
135
|
-
r =
|
|
134
|
+
return N((a) => {
|
|
135
|
+
r = a, typeof e.ref == "function" && e.ref(a);
|
|
136
136
|
}, n), n.addEventListener("change", H), D(n, M({
|
|
137
137
|
get id() {
|
|
138
138
|
return j();
|
|
@@ -144,15 +144,15 @@ function fe(w) {
|
|
|
144
144
|
return c();
|
|
145
145
|
},
|
|
146
146
|
get "aria-checked"() {
|
|
147
|
-
return
|
|
147
|
+
return E(() => !!e.indeterminate)() ? "mixed" : c();
|
|
148
148
|
},
|
|
149
149
|
get disabled() {
|
|
150
|
-
return
|
|
150
|
+
return k();
|
|
151
151
|
},
|
|
152
152
|
get class() {
|
|
153
153
|
return t.class ?? "sr-only peer";
|
|
154
154
|
}
|
|
155
|
-
},
|
|
155
|
+
}, g), !1, !1), n;
|
|
156
156
|
})();
|
|
157
157
|
};
|
|
158
158
|
return o(V, {
|
|
@@ -163,31 +163,31 @@ function fe(w) {
|
|
|
163
163
|
},
|
|
164
164
|
get children() {
|
|
165
165
|
var t = ee(), r = t.firstChild;
|
|
166
|
-
return l(r, o(z, {}), null), l(r, o(L, {}), null), l(t, o(
|
|
166
|
+
return l(r, o(z, {}), null), l(r, o(L, {}), null), l(t, o(p, {
|
|
167
167
|
get when() {
|
|
168
168
|
return e.label || e.description;
|
|
169
169
|
},
|
|
170
170
|
get children() {
|
|
171
171
|
var n = Z();
|
|
172
|
-
return l(n, o(
|
|
172
|
+
return l(n, o(p, {
|
|
173
173
|
get when() {
|
|
174
174
|
return e.label;
|
|
175
175
|
},
|
|
176
176
|
get children() {
|
|
177
|
-
var
|
|
178
|
-
return l(
|
|
177
|
+
var a = _();
|
|
178
|
+
return l(a, () => e.label), f(() => b(a, u("text-foreground", C[d()].label))), a;
|
|
179
179
|
}
|
|
180
|
-
}), null), l(n, o(
|
|
180
|
+
}), null), l(n, o(p, {
|
|
181
181
|
get when() {
|
|
182
182
|
return e.description;
|
|
183
183
|
},
|
|
184
184
|
get children() {
|
|
185
|
-
var
|
|
186
|
-
return l(
|
|
185
|
+
var a = _();
|
|
186
|
+
return l(a, () => e.description), f(() => b(a, u("text-[var(--floe-ink-soft)]", C[d()].description))), a;
|
|
187
187
|
}
|
|
188
188
|
}), null), n;
|
|
189
189
|
}
|
|
190
|
-
}), null), f(() => b(t, u("inline-flex items-start gap-2 cursor-pointer select-none",
|
|
190
|
+
}), null), f(() => b(t, u("inline-flex items-start gap-2 cursor-pointer select-none", k() && "opacity-50 cursor-not-allowed", e.class))), t;
|
|
191
191
|
}
|
|
192
192
|
}), o(S, {
|
|
193
193
|
get when() {
|
|
@@ -198,8 +198,8 @@ function fe(w) {
|
|
|
198
198
|
return l(t, o(z, {
|
|
199
199
|
class: "sr-only"
|
|
200
200
|
}), r), l(r, () => e.label), f((n) => {
|
|
201
|
-
var
|
|
202
|
-
return
|
|
201
|
+
var a = c() ? "inset" : "raised", s = c() ? "true" : void 0, y = x(), $ = u("cursor-pointer select-none transition-colors duration-[var(--floe-duration-fast)]", "border-r border-[var(--floe-line)] last:border-r-0", se[d()], c() ? "bg-[var(--primary)] text-[var(--primary-foreground)] border-[var(--primary)]" : "bg-transparent text-[var(--floe-ink-soft)] hover:bg-[var(--floe-state-hover)] hover:text-[var(--floe-ink)]", k() && "opacity-50 cursor-not-allowed", e.class);
|
|
202
|
+
return a !== n.e && m(t, "data-floe-surface", n.e = a), s !== n.t && m(t, "data-floe-selected", n.t = s), y !== n.a && m(t, "data-floe-choice-variant", n.a = y), $ !== n.o && b(t, n.o = $), n;
|
|
203
203
|
}, {
|
|
204
204
|
e: void 0,
|
|
205
205
|
t: void 0,
|
|
@@ -212,10 +212,10 @@ function fe(w) {
|
|
|
212
212
|
return x() === "card";
|
|
213
213
|
},
|
|
214
214
|
get children() {
|
|
215
|
-
var t = ne(), r = t.firstChild, n = r.firstChild,
|
|
215
|
+
var t = ne(), r = t.firstChild, n = r.firstChild, a = n.nextSibling;
|
|
216
216
|
return l(t, o(z, {
|
|
217
217
|
class: "sr-only"
|
|
218
|
-
}), r), l(n, o(L, {})), l(
|
|
218
|
+
}), r), l(n, o(L, {})), l(a, o(p, {
|
|
219
219
|
get when() {
|
|
220
220
|
return e.label;
|
|
221
221
|
},
|
|
@@ -223,15 +223,15 @@ function fe(w) {
|
|
|
223
223
|
var s = _();
|
|
224
224
|
return l(s, () => e.label), f(() => b(s, u("font-medium text-foreground", C[d()].label))), s;
|
|
225
225
|
}
|
|
226
|
-
}), null), l(
|
|
226
|
+
}), null), l(a, o(p, {
|
|
227
227
|
get when() {
|
|
228
228
|
return e.description;
|
|
229
229
|
},
|
|
230
230
|
get children() {
|
|
231
231
|
var s = _();
|
|
232
|
-
return l(s, () => e.description), f(() => b(s, u("text-
|
|
232
|
+
return l(s, () => e.description), f(() => b(s, u("text-[var(--floe-ink-soft)] mt-0.5", C[d()].description))), s;
|
|
233
233
|
}
|
|
234
|
-
}), null), l(t, o(
|
|
234
|
+
}), null), l(t, o(p, {
|
|
235
235
|
get when() {
|
|
236
236
|
return c();
|
|
237
237
|
},
|
|
@@ -239,8 +239,8 @@ function fe(w) {
|
|
|
239
239
|
return te();
|
|
240
240
|
}
|
|
241
241
|
}), null), f((s) => {
|
|
242
|
-
var
|
|
243
|
-
return
|
|
242
|
+
var y = c() ? "inset" : "raised", $ = c() ? "true" : void 0, P = x(), q = u("relative cursor-pointer select-none rounded-group border transition-[background-color,border-color,color] duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", ce[d()], c() ? "border-[var(--floe-accent-line)] bg-[var(--floe-state-selected)]" : "border-[var(--floe-line)] bg-transparent hover:border-[var(--floe-line-strong)] hover:bg-[var(--floe-state-hover)]", k() && "opacity-50 cursor-not-allowed", e.class);
|
|
243
|
+
return y !== s.e && m(t, "data-floe-surface", s.e = y), $ !== s.t && m(t, "data-floe-selected", s.t = $), P !== s.a && m(t, "data-floe-choice-variant", s.a = P), q !== s.o && b(t, s.o = q), s;
|
|
244
244
|
}, {
|
|
245
245
|
e: void 0,
|
|
246
246
|
t: void 0,
|
|
@@ -256,38 +256,38 @@ function fe(w) {
|
|
|
256
256
|
var t = le();
|
|
257
257
|
return l(t, o(z, {
|
|
258
258
|
class: "sr-only"
|
|
259
|
-
}), null), l(t, o(
|
|
259
|
+
}), null), l(t, o(p, {
|
|
260
260
|
get when() {
|
|
261
261
|
return e.icon;
|
|
262
262
|
},
|
|
263
263
|
children: (r) => {
|
|
264
264
|
const n = r();
|
|
265
265
|
return (() => {
|
|
266
|
-
var
|
|
267
|
-
return l(
|
|
266
|
+
var a = ae();
|
|
267
|
+
return l(a, o(n, {
|
|
268
268
|
get class() {
|
|
269
|
-
return
|
|
269
|
+
return G[d()].icon;
|
|
270
270
|
}
|
|
271
|
-
})), f(() => b(
|
|
271
|
+
})), f(() => b(a, u("mb-2 transition-colors duration-[var(--floe-duration-fast)]", c() ? "text-[var(--floe-accent-ink)]" : "text-[var(--floe-ink-quiet)]"))), a;
|
|
272
272
|
})();
|
|
273
273
|
}
|
|
274
|
-
}), null), l(t, o(
|
|
274
|
+
}), null), l(t, o(p, {
|
|
275
275
|
get when() {
|
|
276
276
|
return e.label;
|
|
277
277
|
},
|
|
278
278
|
get children() {
|
|
279
279
|
var r = _();
|
|
280
|
-
return l(r, () => e.label), f(() => b(r, u("font-medium transition-colors duration-
|
|
280
|
+
return l(r, () => e.label), f(() => b(r, u("font-medium transition-colors duration-[var(--floe-duration-fast)]", C[d()].label, c() ? "text-[var(--floe-ink)]" : "text-[var(--floe-ink-soft)]"))), r;
|
|
281
281
|
}
|
|
282
|
-
}), null), l(t, o(
|
|
282
|
+
}), null), l(t, o(p, {
|
|
283
283
|
get when() {
|
|
284
284
|
return e.description;
|
|
285
285
|
},
|
|
286
286
|
get children() {
|
|
287
287
|
var r = _();
|
|
288
|
-
return l(r, () => e.description), f(() => b(r, u("text-
|
|
288
|
+
return l(r, () => e.description), f(() => b(r, u("text-[var(--floe-ink-soft)] mt-0.5", C[d()].description))), r;
|
|
289
289
|
}
|
|
290
|
-
}), null), l(t, o(
|
|
290
|
+
}), null), l(t, o(p, {
|
|
291
291
|
get when() {
|
|
292
292
|
return c();
|
|
293
293
|
},
|
|
@@ -298,8 +298,8 @@ function fe(w) {
|
|
|
298
298
|
})), r;
|
|
299
299
|
}
|
|
300
300
|
}), null), f((r) => {
|
|
301
|
-
var n = c() ? "inset" : "raised",
|
|
302
|
-
return n !== r.e &&
|
|
301
|
+
var n = c() ? "inset" : "raised", a = c() ? "true" : void 0, s = x(), y = u("relative flex flex-col items-center justify-center cursor-pointer select-none", "rounded-control border transition-[background-color,border-color,color] duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)] text-center", G[d()].container, c() ? "border-[var(--floe-accent-line)] bg-[var(--floe-state-selected)]" : "border-[var(--floe-line)] bg-transparent hover:border-[var(--floe-line-strong)] hover:bg-[var(--floe-state-hover)]", k() && "opacity-50 cursor-not-allowed", e.class);
|
|
302
|
+
return n !== r.e && m(t, "data-floe-surface", r.e = n), a !== r.t && m(t, "data-floe-selected", r.t = a), s !== r.a && m(t, "data-floe-choice-variant", r.a = s), y !== r.o && b(t, r.o = y), r;
|
|
303
303
|
}, {
|
|
304
304
|
e: void 0,
|
|
305
305
|
t: void 0,
|
|
@@ -312,28 +312,28 @@ function fe(w) {
|
|
|
312
312
|
});
|
|
313
313
|
}
|
|
314
314
|
function be(w) {
|
|
315
|
-
const [
|
|
315
|
+
const [i, e] = B(w, ["options"]);
|
|
316
316
|
return o(ue, M(e, {
|
|
317
317
|
get children() {
|
|
318
318
|
return o(J, {
|
|
319
319
|
get each() {
|
|
320
|
-
return
|
|
320
|
+
return i.options;
|
|
321
321
|
},
|
|
322
|
-
children: (
|
|
322
|
+
children: (g) => o(fe, {
|
|
323
323
|
get value() {
|
|
324
|
-
return
|
|
324
|
+
return g.value;
|
|
325
325
|
},
|
|
326
326
|
get label() {
|
|
327
|
-
return
|
|
327
|
+
return g.label;
|
|
328
328
|
},
|
|
329
329
|
get description() {
|
|
330
|
-
return
|
|
330
|
+
return g.description;
|
|
331
331
|
},
|
|
332
332
|
get icon() {
|
|
333
|
-
return
|
|
333
|
+
return g.icon;
|
|
334
334
|
},
|
|
335
335
|
get disabled() {
|
|
336
|
-
return
|
|
336
|
+
return g.disabled;
|
|
337
337
|
}
|
|
338
338
|
})
|
|
339
339
|
});
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { useCommand as
|
|
5
|
-
import { Search as
|
|
6
|
-
import { useResolvedFloeConfig as
|
|
7
|
-
import { useOverlayMask as
|
|
1
|
+
import { createComponent as d, Portal as K, effect as C, className as S, setStyleProperty as q, setAttribute as h, insert as a, Dynamic as R, template as u, use as E, delegateEvents as T } from "solid-js/web";
|
|
2
|
+
import { createSignal as j, createEffect as B, createMemo as H, Show as x, For as F } from "solid-js";
|
|
3
|
+
import { cn as z } from "../../utils/cn.js";
|
|
4
|
+
import { useCommand as L } from "../../context/CommandContext.js";
|
|
5
|
+
import { Search as N } from "../icons/index.js";
|
|
6
|
+
import { useResolvedFloeConfig as U } from "../../context/FloeConfigContext.js";
|
|
7
|
+
import { useOverlayMask as W } from "../../hooks/useOverlayMask.js";
|
|
8
8
|
import { matchKeybind as G } from "../../utils/keybind.js";
|
|
9
9
|
import { createFloatingPresence as J } from "./floatingPresence.js";
|
|
10
|
-
var Q = /* @__PURE__ */
|
|
11
|
-
function
|
|
12
|
-
const n =
|
|
13
|
-
let M,
|
|
14
|
-
const [D, w] =
|
|
15
|
-
open: n.isOpen
|
|
10
|
+
var Q = /* @__PURE__ */ u("<div>"), V = /* @__PURE__ */ u('<div data-floe-surface=floating><div data-floe-input-surface class="flex items-center gap-3 px-4 border-b border-[var(--floe-line)]"><input type=text><kbd class="px-1.5 py-0.5 rounded-xs border border-[var(--floe-line)] bg-[var(--floe-well)] text-[var(--floe-ink-quiet)] text-[length:var(--floe-type-caption)] font-mono leading-none"></kbd></div><div class="max-h-80 overflow-y-auto overscroll-contain py-2">'), X = /* @__PURE__ */ u('<div class="px-4 py-10 text-center text-[length:var(--floe-type-supporting)] text-[var(--floe-ink-soft)]">'), Y = /* @__PURE__ */ u('<div><div class="px-3 pt-3 pb-1 text-[length:var(--floe-type-caption)] font-semibold uppercase tracking-[0.06em] text-[var(--floe-ink-quiet)]">'), Z = /* @__PURE__ */ u('<span class="w-4 h-4 flex items-center justify-center text-[var(--floe-ink-quiet)]">'), ee = /* @__PURE__ */ u('<span class="ml-2 text-[length:var(--floe-type-caption)] text-[var(--floe-ink-quiet)]">'), te = /* @__PURE__ */ u('<kbd class="px-1.5 py-0.5 rounded-xs border border-[var(--floe-line)] bg-[var(--floe-well)] text-[var(--floe-ink-quiet)] text-[length:var(--floe-type-caption)] font-mono leading-none">'), re = /* @__PURE__ */ u('<button type=button><div class="flex-1 text-left"><span>');
|
|
11
|
+
function ue(b = {}) {
|
|
12
|
+
const n = L(), k = U();
|
|
13
|
+
let M, y;
|
|
14
|
+
const [D, w] = j(0), g = J({
|
|
15
|
+
open: n.isOpen,
|
|
16
|
+
element: () => y
|
|
16
17
|
});
|
|
17
|
-
|
|
18
|
+
W({
|
|
18
19
|
open: n.isOpen,
|
|
19
|
-
root: () =>
|
|
20
|
+
root: () => y,
|
|
20
21
|
onClose: () => n.close(),
|
|
21
22
|
lockBodyScroll: !0,
|
|
22
23
|
trapFocus: !0,
|
|
@@ -29,10 +30,10 @@ function fe(b = {}) {
|
|
|
29
30
|
selector: "input"
|
|
30
31
|
},
|
|
31
32
|
restoreFocus: !0
|
|
32
|
-
}),
|
|
33
|
+
}), B(() => {
|
|
33
34
|
n.isOpen() && (n.search(), w(0));
|
|
34
35
|
});
|
|
35
|
-
const
|
|
36
|
+
const I = (e) => {
|
|
36
37
|
if (G(e, k.config.commands.palette.keybind)) {
|
|
37
38
|
e.preventDefault(), n.close();
|
|
38
39
|
return;
|
|
@@ -57,31 +58,31 @@ function fe(b = {}) {
|
|
|
57
58
|
e.preventDefault(), t[D()] && n.execute(t[D()].id);
|
|
58
59
|
break;
|
|
59
60
|
}
|
|
60
|
-
},
|
|
61
|
+
}, O = H(() => {
|
|
61
62
|
const e = n.filteredCommands(), t = /* @__PURE__ */ new Map();
|
|
62
63
|
return e.forEach((r, i) => {
|
|
63
|
-
const
|
|
64
|
+
const v = r.category ?? "Commands", s = t.get(v);
|
|
64
65
|
s ? s.push({
|
|
65
66
|
cmd: r,
|
|
66
67
|
index: i
|
|
67
|
-
}) : t.set(
|
|
68
|
+
}) : t.set(v, [{
|
|
68
69
|
cmd: r,
|
|
69
70
|
index: i
|
|
70
71
|
}]);
|
|
71
72
|
}), Array.from(t.entries());
|
|
72
73
|
});
|
|
73
|
-
return
|
|
74
|
+
return d(x, {
|
|
74
75
|
get when() {
|
|
75
|
-
return
|
|
76
|
+
return g.mounted();
|
|
76
77
|
},
|
|
77
78
|
get children() {
|
|
78
|
-
return
|
|
79
|
+
return d(K, {
|
|
79
80
|
get children() {
|
|
80
81
|
return [(() => {
|
|
81
82
|
var e = Q();
|
|
82
83
|
return e.$$click = () => n.close(), C((t) => {
|
|
83
|
-
var r =
|
|
84
|
-
return r !== t.e &&
|
|
84
|
+
var r = z("fixed inset-0 bg-[color-mix(in_srgb,var(--background)_62%,transparent)] backdrop-blur-[2px]", "floe-floating-presence floe-floating-backdrop", b.zIndex === void 0 && "z-50"), i = b.zIndex, v = g.state(), s = g.exiting() ? "true" : void 0;
|
|
85
|
+
return r !== t.e && S(e, t.e = r), i !== t.t && q(e, "z-index", t.t = i), v !== t.a && h(e, "data-floating-presence", t.a = v), s !== t.o && h(e, "aria-hidden", t.o = s), t;
|
|
85
86
|
}, {
|
|
86
87
|
e: void 0,
|
|
87
88
|
t: void 0,
|
|
@@ -89,14 +90,14 @@ function fe(b = {}) {
|
|
|
89
90
|
o: void 0
|
|
90
91
|
}), e;
|
|
91
92
|
})(), (() => {
|
|
92
|
-
var e = V(), t = e.firstChild, r = t.firstChild, i = r.nextSibling,
|
|
93
|
-
e.$$keydown =
|
|
94
|
-
var s =
|
|
95
|
-
typeof s == "function" ?
|
|
96
|
-
class: "w-
|
|
93
|
+
var e = V(), t = e.firstChild, r = t.firstChild, i = r.nextSibling, v = t.nextSibling;
|
|
94
|
+
e.$$keydown = I;
|
|
95
|
+
var s = y;
|
|
96
|
+
typeof s == "function" ? E(s, e) : y = e, a(t, d(N, {
|
|
97
|
+
class: "w-4 h-4 text-[var(--floe-ink-quiet)] flex-shrink-0"
|
|
97
98
|
}), r), r.$$input = (o) => n.setSearch(o.currentTarget.value);
|
|
98
99
|
var P = M;
|
|
99
|
-
return typeof P == "function" ?
|
|
100
|
+
return typeof P == "function" ? E(P, r) : M = r, a(i, () => k.config.strings.commandPalette.esc), a(v, d(x, {
|
|
100
101
|
get when() {
|
|
101
102
|
return n.filteredCommands().length > 0;
|
|
102
103
|
},
|
|
@@ -107,54 +108,54 @@ function fe(b = {}) {
|
|
|
107
108
|
})();
|
|
108
109
|
},
|
|
109
110
|
get children() {
|
|
110
|
-
return
|
|
111
|
+
return d(F, {
|
|
111
112
|
get each() {
|
|
112
|
-
return
|
|
113
|
+
return O();
|
|
113
114
|
},
|
|
114
|
-
children: ([o,
|
|
115
|
-
var
|
|
116
|
-
return a(
|
|
117
|
-
each:
|
|
115
|
+
children: ([o, $]) => (() => {
|
|
116
|
+
var m = Y(), _ = m.firstChild;
|
|
117
|
+
return a(_, o), a(m, d(F, {
|
|
118
|
+
each: $,
|
|
118
119
|
children: (l) => (() => {
|
|
119
|
-
var
|
|
120
|
-
return
|
|
120
|
+
var c = re(), p = c.firstChild, A = p.firstChild;
|
|
121
|
+
return c.addEventListener("mouseenter", () => w(l.index)), c.$$click = () => n.execute(l.cmd.id), a(c, d(x, {
|
|
121
122
|
get when() {
|
|
122
123
|
return l.cmd.icon;
|
|
123
124
|
},
|
|
124
125
|
get children() {
|
|
125
|
-
var
|
|
126
|
-
return a(
|
|
126
|
+
var f = Z();
|
|
127
|
+
return a(f, d(R, {
|
|
127
128
|
get component() {
|
|
128
129
|
return l.cmd.icon;
|
|
129
130
|
},
|
|
130
|
-
class: "w-
|
|
131
|
-
})),
|
|
131
|
+
class: "w-4 h-4"
|
|
132
|
+
})), f;
|
|
132
133
|
}
|
|
133
|
-
}), p), a(
|
|
134
|
+
}), p), a(A, () => l.cmd.title), a(p, d(x, {
|
|
134
135
|
get when() {
|
|
135
136
|
return l.cmd.description;
|
|
136
137
|
},
|
|
137
138
|
get children() {
|
|
138
|
-
var
|
|
139
|
-
return a(
|
|
139
|
+
var f = ee();
|
|
140
|
+
return a(f, () => l.cmd.description), f;
|
|
140
141
|
}
|
|
141
|
-
}), null), a(
|
|
142
|
+
}), null), a(c, d(x, {
|
|
142
143
|
get when() {
|
|
143
144
|
return l.cmd.keybind;
|
|
144
145
|
},
|
|
145
146
|
get children() {
|
|
146
|
-
var
|
|
147
|
-
return a(
|
|
147
|
+
var f = te();
|
|
148
|
+
return a(f, () => n.getKeybindDisplay(l.cmd.keybind)), f;
|
|
148
149
|
}
|
|
149
|
-
}), null), C(() =>
|
|
150
|
+
}), null), C(() => S(c, z("w-full flex items-center gap-3 px-3 mx-1 rounded-sm", "min-h-[var(--floe-row-height)] cursor-pointer", "text-[length:var(--floe-type-control)] leading-[var(--floe-line-control)]", "text-[var(--floe-ink-soft)] hover:text-foreground", "focus:outline-none", D() === l.index && "bg-[var(--floe-state-selected)] text-foreground"))), c;
|
|
150
151
|
})()
|
|
151
|
-
}), null),
|
|
152
|
+
}), null), m;
|
|
152
153
|
})()
|
|
153
154
|
});
|
|
154
155
|
}
|
|
155
156
|
})), C((o) => {
|
|
156
|
-
var
|
|
157
|
-
return
|
|
157
|
+
var $ = z("fixed left-1/2 top-[20%] -translate-x-1/2", b.zIndex === void 0 && "z-50", "w-full max-w-xl", "bg-popover text-popover-foreground", "rounded-panel", "border border-[var(--floe-line)]", "shadow-[var(--floe-elevation-float-strong)]", "floe-floating-presence floe-floating-dialog-panel", "overflow-hidden"), m = b.zIndex, _ = g.state(), l = g.exiting() ? "true" : void 0, c = k.config.strings.commandPalette.placeholder, p = z("flex-1 h-12 bg-transparent", "text-[length:var(--floe-type-body)] leading-[var(--floe-line-body)]", "placeholder:text-[var(--floe-ink-ghost)]", "focus:outline-none");
|
|
158
|
+
return $ !== o.e && S(e, o.e = $), m !== o.t && q(e, "z-index", o.t = m), _ !== o.a && h(e, "data-floating-presence", o.a = _), l !== o.o && h(e, "aria-hidden", o.o = l), c !== o.i && h(r, "placeholder", o.i = c), p !== o.n && S(r, o.n = p), o;
|
|
158
159
|
}, {
|
|
159
160
|
e: void 0,
|
|
160
161
|
t: void 0,
|
|
@@ -169,7 +170,7 @@ function fe(b = {}) {
|
|
|
169
170
|
}
|
|
170
171
|
});
|
|
171
172
|
}
|
|
172
|
-
|
|
173
|
+
T(["click", "keydown", "input"]);
|
|
173
174
|
export {
|
|
174
|
-
|
|
175
|
+
ue as CommandPalette
|
|
175
176
|
};
|