@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,17 +1,17 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { createComponent as r, use as G, setAttribute as c, style as ne, Portal as ae, spread as I, mergeProps as E, memo as p, insert as i, effect as P, className as q, template as m } from "solid-js/web";
|
|
2
|
+
import { createSignal as T, onMount as le, onCleanup as M, createUniqueId as ie, createEffect as K, createMemo as U, Show as u, untrack as V } from "solid-js";
|
|
3
|
+
import { cn as g } from "../../utils/cn.js";
|
|
4
4
|
import { Button as j } from "./Button.js";
|
|
5
5
|
import { X as de } from "../icons/index.js";
|
|
6
|
-
import { useResolvedFloeConfig as
|
|
7
|
-
import { useOverlayMask as
|
|
8
|
-
import { resolveSurfacePortalHost as
|
|
9
|
-
import { LOCAL_INTERACTION_SURFACE_ATTR as
|
|
6
|
+
import { useResolvedFloeConfig as fe } from "../../context/FloeConfigContext.js";
|
|
7
|
+
import { useOverlayMask as se } from "../../hooks/useOverlayMask.js";
|
|
8
|
+
import { resolveSurfacePortalHost as ce, DIALOG_SURFACE_BOUNDARY_ATTR as k, SURFACE_PORTAL_LAYER_ATTR as ue, DIALOG_SURFACE_HOST_ATTR as ge, isSurfacePortalMode as z, projectSurfacePortalRect as me, resolveSurfacePortalBoundaryRect as he, resolveSurfacePortalMount as ve } from "./dialogSurfaceScope.js";
|
|
9
|
+
import { LOCAL_INTERACTION_SURFACE_ATTR as ye } from "./localInteractionSurface.js";
|
|
10
10
|
import { createFloatingPresence as we } from "./floatingPresence.js";
|
|
11
|
-
import { useDialogPlacement as
|
|
12
|
-
import { observeViewport as
|
|
11
|
+
import { useDialogPlacement as be } from "./DialogPlacementContext.js";
|
|
12
|
+
import { observeViewport as pe, viewportStyle as xe } from "../../viewport.js";
|
|
13
13
|
import { resolveFloatingBoundary as $e } from "./surfaceFloatingBoundary.js";
|
|
14
|
-
var Ae = /* @__PURE__ */
|
|
14
|
+
var Ae = /* @__PURE__ */ m("<span aria-hidden=true>"), Ce = /* @__PURE__ */ m('<h2 class="text-[length:var(--floe-type-heading-sm)] font-semibold leading-[var(--floe-line-heading)] tracking-[var(--floe-tracking-tight)] text-[var(--floe-ink)]">'), _e = /* @__PURE__ */ m('<div data-floe-dialog-header class="flex shrink-0 items-start justify-between gap-[var(--floe-gap-control)] px-[var(--floe-pad-group)] py-[var(--floe-pad-control)] border-b border-[var(--floe-line)]"><div>'), ke = /* @__PURE__ */ m('<p class="mb-3 shrink-0 text-[length:var(--floe-type-body)] leading-[var(--floe-line-body)] text-[var(--floe-ink-soft)] last:mb-0">'), Se = /* @__PURE__ */ m('<div data-floe-dialog-footer class="flex shrink-0 items-center justify-end gap-[var(--floe-gap-control)] px-[var(--floe-pad-group)] py-[var(--floe-pad-control)] border-t border-[var(--floe-line)]">'), Oe = /* @__PURE__ */ m("<div><div></div><div><div data-floe-surface=floating><div data-floe-dialog-body>"), Re = /* @__PURE__ */ m("<h2 class=sr-only>");
|
|
15
15
|
const De = {
|
|
16
16
|
display: "none"
|
|
17
17
|
};
|
|
@@ -36,51 +36,49 @@ function Be(e) {
|
|
|
36
36
|
window.clearTimeout(e);
|
|
37
37
|
}
|
|
38
38
|
function Fe(e) {
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
let
|
|
43
|
-
const [
|
|
44
|
-
open: () => e.open && !!
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}), A = () => s.mounted() && !!S() && L() > 0;
|
|
49
|
-
K(() => e.onPresenceChange?.(A())), E(() => e.onPresenceChange?.(!1));
|
|
39
|
+
const x = be(), [n, W] = T();
|
|
40
|
+
le(() => M(pe(window, W)));
|
|
41
|
+
const s = ie(), B = () => `dialog-${s}-title`, H = () => `dialog-${s}-description`;
|
|
42
|
+
let S;
|
|
43
|
+
const [O, Y] = T(null), [L, X] = T(0), [J, Q] = T(0), $ = () => e.presentation === "side-drawer", h = () => e.presentation === "bottom-drawer", f = we({
|
|
44
|
+
open: () => e.open && !!O() && L() > 0,
|
|
45
|
+
element: () => S
|
|
46
|
+
}), A = () => f.mounted() && !!O() && L() > 0;
|
|
47
|
+
K(() => e.onPresenceChange?.(A())), M(() => e.onPresenceChange?.(!1));
|
|
50
48
|
const ee = (t) => {
|
|
51
49
|
Y(t), Pe(() => {
|
|
52
|
-
V(
|
|
50
|
+
V(O) === t && X((d) => d + 1);
|
|
53
51
|
});
|
|
54
|
-
},
|
|
55
|
-
owner:
|
|
52
|
+
}, R = U(() => A() ? ce({
|
|
53
|
+
owner: O()
|
|
56
54
|
}) : {
|
|
57
55
|
host: null,
|
|
58
56
|
boundaryHost: null,
|
|
59
57
|
mountHost: null,
|
|
60
58
|
mode: "global"
|
|
61
|
-
}), C = () => `dialog-boundary-${
|
|
59
|
+
}), C = () => `dialog-boundary-${s}`, a = () => x.mode() === "auto" && z(R()), te = () => a() ? ve(R()) : void 0, N = () => e.globalZIndex ?? x.globalZIndex(), F = (t) => me($e(t, void 0, V(n)?.safeArea) ?? he(t), t), oe = () => F(R()), D = U(() => (J(), n(), oe())), re = (t) => typeof Element < "u" && t instanceof Element ? !!t.closest(`[${k}="${C()}"]`) : typeof Node < "u" && t instanceof Node ? !!t.parentElement?.closest(`[${k}="${C()}"]`) : !1;
|
|
62
60
|
return K(() => {
|
|
63
|
-
const t =
|
|
61
|
+
const t = R();
|
|
64
62
|
if (!A() || !a() || typeof window > "u")
|
|
65
63
|
return;
|
|
66
|
-
let d = !1,
|
|
67
|
-
const
|
|
64
|
+
let d = !1, v = null, l = Z(F(t));
|
|
65
|
+
const y = () => {
|
|
68
66
|
if (d || !z(t))
|
|
69
67
|
return;
|
|
70
|
-
const
|
|
71
|
-
|
|
68
|
+
const o = Z(F(t));
|
|
69
|
+
o !== l && (l = o, Q((w) => w + 1));
|
|
72
70
|
}, _ = () => {
|
|
73
|
-
d || (
|
|
74
|
-
|
|
71
|
+
d || (v = Te(() => {
|
|
72
|
+
y(), _();
|
|
75
73
|
}));
|
|
76
74
|
};
|
|
77
|
-
_(),
|
|
78
|
-
d = !0,
|
|
75
|
+
_(), M(() => {
|
|
76
|
+
d = !0, v !== null && Be(v);
|
|
79
77
|
});
|
|
80
|
-
}),
|
|
78
|
+
}), se({
|
|
81
79
|
open: A,
|
|
82
|
-
root: () =>
|
|
83
|
-
containsTarget:
|
|
80
|
+
root: () => S,
|
|
81
|
+
containsTarget: re,
|
|
84
82
|
onClose: () => e.onOpenChange(!1),
|
|
85
83
|
lockBodyScroll: () => !a(),
|
|
86
84
|
trapFocus: !0,
|
|
@@ -93,19 +91,19 @@ function Fe(e) {
|
|
|
93
91
|
restoreFocus: !0
|
|
94
92
|
}), [(() => {
|
|
95
93
|
var t = Ae();
|
|
96
|
-
return G(ee, t),
|
|
97
|
-
})(),
|
|
94
|
+
return G(ee, t), c(t, "data-floe-dialog-owner-anchor", s), ne(t, De), t;
|
|
95
|
+
})(), r(u, {
|
|
98
96
|
get when() {
|
|
99
97
|
return A();
|
|
100
98
|
},
|
|
101
99
|
get children() {
|
|
102
|
-
return
|
|
100
|
+
return r(ae, {
|
|
103
101
|
get mount() {
|
|
104
102
|
return te();
|
|
105
103
|
},
|
|
106
104
|
get children() {
|
|
107
|
-
var t = Oe(), d = t.firstChild,
|
|
108
|
-
|
|
105
|
+
var t = Oe(), d = t.firstChild, v = d.nextSibling, l = v.firstChild, y = l.firstChild;
|
|
106
|
+
c(t, "data-floe-dialog-overlay-root", s), I(t, E({
|
|
109
107
|
get "data-floe-dialog-mode"() {
|
|
110
108
|
return a() ? "surface" : "global";
|
|
111
109
|
},
|
|
@@ -113,28 +111,28 @@ function Fe(e) {
|
|
|
113
111
|
return e.presentation ?? "dialog";
|
|
114
112
|
},
|
|
115
113
|
get "data-floating-presence"() {
|
|
116
|
-
return
|
|
114
|
+
return f.state();
|
|
117
115
|
},
|
|
118
116
|
get "aria-hidden"() {
|
|
119
|
-
return
|
|
117
|
+
return f.exiting() ? "true" : void 0;
|
|
120
118
|
}
|
|
121
119
|
}, {
|
|
122
|
-
[
|
|
120
|
+
[ye]: "true"
|
|
123
121
|
}, () => ({
|
|
124
122
|
[ue]: "true",
|
|
125
123
|
[k]: C()
|
|
126
124
|
}), {
|
|
127
125
|
get class() {
|
|
128
|
-
return
|
|
126
|
+
return g(a() ? g("absolute z-20 box-border", !$() && "p-3") : g("fixed box-border p-4", N() === void 0 && "z-50"), h() && "floe-bottom-drawer-overlay", $() && "floe-side-drawer-overlay", f.exiting() && !h() && "pointer-events-none");
|
|
129
127
|
},
|
|
130
128
|
get style() {
|
|
131
|
-
return
|
|
132
|
-
left: `${
|
|
133
|
-
top: `${
|
|
134
|
-
width: `${
|
|
135
|
-
height: `${
|
|
129
|
+
return p(() => !!a())() ? {
|
|
130
|
+
left: `${D().left}px`,
|
|
131
|
+
top: `${D().top}px`,
|
|
132
|
+
width: `${D().width}px`,
|
|
133
|
+
height: `${D().height}px`
|
|
136
134
|
} : {
|
|
137
|
-
...n() ?
|
|
135
|
+
...n() ? xe(n()) : {
|
|
138
136
|
inset: "0"
|
|
139
137
|
},
|
|
140
138
|
"--floe-dialog-safe-top": `${(n()?.safeArea.top ?? 0) / (n()?.fixedScale ?? 1)}px`,
|
|
@@ -148,30 +146,30 @@ function Fe(e) {
|
|
|
148
146
|
"z-index": N()
|
|
149
147
|
};
|
|
150
148
|
}
|
|
151
|
-
}), !1, !0),
|
|
149
|
+
}), !1, !0), c(d, "data-floe-dialog-backdrop", s), I(d, E(() => ({
|
|
152
150
|
[k]: C()
|
|
153
151
|
}), {
|
|
154
152
|
get "data-floating-presence"() {
|
|
155
|
-
return
|
|
153
|
+
return f.state();
|
|
156
154
|
},
|
|
157
155
|
get class() {
|
|
158
|
-
return
|
|
156
|
+
return g("absolute inset-0 floe-floating-presence floe-floating-backdrop", e.closeOnBackdropClick === !1 ? "cursor-default" : "cursor-pointer", h() ? "floe-bottom-drawer-backdrop" : a() ? "bg-background/72 backdrop-blur-[2px]" : "bg-background/80 backdrop-blur-sm");
|
|
159
157
|
},
|
|
160
158
|
onClick: () => {
|
|
161
|
-
!
|
|
159
|
+
!f.exiting() && e.closeOnBackdropClick !== !1 && e.onOpenChange(!1);
|
|
162
160
|
}
|
|
163
161
|
}), !1, !1);
|
|
164
|
-
var _ =
|
|
165
|
-
return typeof _ == "function" ? G(_,
|
|
162
|
+
var _ = S;
|
|
163
|
+
return typeof _ == "function" ? G(_, l) : S = l, c(l, "data-floe-dialog-panel", s), I(l, E({
|
|
166
164
|
get "data-floe-drawer-side"() {
|
|
167
|
-
return
|
|
165
|
+
return p(() => !!$())() ? e.drawerSide ?? "right" : void 0;
|
|
168
166
|
}
|
|
169
167
|
}, () => ({
|
|
170
168
|
[k]: C(),
|
|
171
169
|
[ge]: "true"
|
|
172
170
|
}), {
|
|
173
171
|
get class() {
|
|
174
|
-
return
|
|
172
|
+
return g(a() ? "flex max-h-[calc(100%-1rem)] w-[min(32rem,calc(100%-1rem))] max-w-[calc(100%-1rem)] flex-col" : "w-full max-w-md", "bg-popover text-popover-foreground rounded-panel shadow-[var(--floe-elevation-float-strong)]", "border border-[var(--floe-line)]", "floe-floating-presence", h() ? "floe-bottom-drawer-panel" : $() ? "floe-side-drawer-panel" : "floe-floating-dialog-panel", "pointer-events-auto flex flex-col", e.class);
|
|
175
173
|
},
|
|
176
174
|
style: {
|
|
177
175
|
"max-height": "100%",
|
|
@@ -179,54 +177,54 @@ function Fe(e) {
|
|
|
179
177
|
"min-width": "0"
|
|
180
178
|
},
|
|
181
179
|
get "data-floating-presence"() {
|
|
182
|
-
return
|
|
180
|
+
return f.state();
|
|
183
181
|
},
|
|
184
182
|
get inert() {
|
|
185
|
-
return
|
|
183
|
+
return p(() => !!h())() && f.exiting();
|
|
186
184
|
},
|
|
187
185
|
role: "dialog",
|
|
188
186
|
get "aria-modal"() {
|
|
189
187
|
return a() ? void 0 : "true";
|
|
190
188
|
},
|
|
191
189
|
get "aria-labelledby"() {
|
|
192
|
-
return
|
|
190
|
+
return p(() => !!e.title)() ? B() : void 0;
|
|
193
191
|
},
|
|
194
192
|
get "aria-describedby"() {
|
|
195
|
-
return
|
|
193
|
+
return p(() => !!e.bodyDescription)() ? H() : void 0;
|
|
196
194
|
},
|
|
197
|
-
onKeyDown: (
|
|
195
|
+
onKeyDown: (o) => e.onKeyDown?.(o),
|
|
198
196
|
tabIndex: -1
|
|
199
|
-
}), !1, !0), l
|
|
197
|
+
}), !1, !0), i(l, r(u, {
|
|
200
198
|
get when() {
|
|
201
199
|
return e.header === void 0;
|
|
202
200
|
},
|
|
203
201
|
get fallback() {
|
|
204
|
-
return [
|
|
202
|
+
return [r(u, {
|
|
205
203
|
get when() {
|
|
206
204
|
return e.title;
|
|
207
205
|
},
|
|
208
206
|
get children() {
|
|
209
|
-
var
|
|
210
|
-
return
|
|
207
|
+
var o = Re();
|
|
208
|
+
return i(o, () => e.title), P(() => c(o, "id", B())), o;
|
|
211
209
|
}
|
|
212
|
-
}),
|
|
210
|
+
}), p(() => e.header)];
|
|
213
211
|
},
|
|
214
212
|
get children() {
|
|
215
|
-
return
|
|
213
|
+
return r(u, {
|
|
216
214
|
get when() {
|
|
217
215
|
return e.title;
|
|
218
216
|
},
|
|
219
217
|
get children() {
|
|
220
|
-
var
|
|
221
|
-
return
|
|
218
|
+
var o = _e(), w = o.firstChild;
|
|
219
|
+
return i(w, r(u, {
|
|
222
220
|
get when() {
|
|
223
221
|
return e.title;
|
|
224
222
|
},
|
|
225
223
|
get children() {
|
|
226
|
-
var
|
|
227
|
-
return
|
|
224
|
+
var b = Ce();
|
|
225
|
+
return i(b, () => e.title), P(() => c(b, "id", B())), b;
|
|
228
226
|
}
|
|
229
|
-
})),
|
|
227
|
+
})), i(o, r(j, {
|
|
230
228
|
variant: "ghost-destructive",
|
|
231
229
|
size: "icon",
|
|
232
230
|
class: "-my-2 -mr-2 h-[46px] w-[46px] shrink-0 sm:my-0 sm:-mr-1 sm:h-6 sm:w-6",
|
|
@@ -235,33 +233,33 @@ function Fe(e) {
|
|
|
235
233
|
return e.closeLabel ?? "Close";
|
|
236
234
|
},
|
|
237
235
|
get children() {
|
|
238
|
-
return
|
|
236
|
+
return r(de, {
|
|
239
237
|
class: "w-3.5 h-3.5"
|
|
240
238
|
});
|
|
241
239
|
}
|
|
242
|
-
}), null),
|
|
240
|
+
}), null), o;
|
|
243
241
|
}
|
|
244
242
|
});
|
|
245
243
|
}
|
|
246
|
-
}),
|
|
244
|
+
}), y), i(y, r(u, {
|
|
247
245
|
get when() {
|
|
248
246
|
return e.bodyDescription;
|
|
249
247
|
},
|
|
250
248
|
get children() {
|
|
251
|
-
var
|
|
252
|
-
return
|
|
249
|
+
var o = ke();
|
|
250
|
+
return i(o, () => e.bodyDescription), P(() => c(o, "id", H())), o;
|
|
253
251
|
}
|
|
254
|
-
}), null),
|
|
252
|
+
}), null), i(y, () => e.children, null), i(l, r(u, {
|
|
255
253
|
get when() {
|
|
256
254
|
return e.footer;
|
|
257
255
|
},
|
|
258
256
|
get children() {
|
|
259
|
-
var
|
|
260
|
-
return
|
|
257
|
+
var o = Se();
|
|
258
|
+
return i(o, () => e.footer), o;
|
|
261
259
|
}
|
|
262
|
-
}), null),
|
|
263
|
-
var w =
|
|
264
|
-
return w !==
|
|
260
|
+
}), null), P((o) => {
|
|
261
|
+
var w = g("pointer-events-none relative z-[1] flex h-full w-full", $() ? e.drawerSide === "left" ? "items-stretch justify-start" : "items-stretch justify-end" : h() ? "items-end justify-center" : "items-center justify-center"), b = g("min-h-0 flex-1 overflow-auto overscroll-contain px-[var(--floe-pad-group)] py-[var(--floe-pad-group)]", e.contentClass);
|
|
262
|
+
return w !== o.e && q(v, o.e = w), b !== o.t && q(y, o.t = b), o;
|
|
265
263
|
}, {
|
|
266
264
|
e: void 0,
|
|
267
265
|
t: void 0
|
|
@@ -272,8 +270,8 @@ function Fe(e) {
|
|
|
272
270
|
})];
|
|
273
271
|
}
|
|
274
272
|
function We(e) {
|
|
275
|
-
const
|
|
276
|
-
return
|
|
273
|
+
const x = fe();
|
|
274
|
+
return r(Fe, {
|
|
277
275
|
get open() {
|
|
278
276
|
return e.open;
|
|
279
277
|
},
|
|
@@ -290,16 +288,16 @@ function We(e) {
|
|
|
290
288
|
return e.globalZIndex;
|
|
291
289
|
},
|
|
292
290
|
get footer() {
|
|
293
|
-
return [
|
|
291
|
+
return [r(j, {
|
|
294
292
|
variant: "ghost",
|
|
295
293
|
onClick: () => e.onOpenChange(!1),
|
|
296
294
|
get disabled() {
|
|
297
295
|
return e.loading;
|
|
298
296
|
},
|
|
299
297
|
get children() {
|
|
300
|
-
return e.cancelText ??
|
|
298
|
+
return e.cancelText ?? x.config.strings.confirmDialog.cancel;
|
|
301
299
|
}
|
|
302
|
-
}),
|
|
300
|
+
}), r(j, {
|
|
303
301
|
get variant() {
|
|
304
302
|
return e.variant === "destructive" ? "destructive" : "primary";
|
|
305
303
|
},
|
|
@@ -310,7 +308,7 @@ function We(e) {
|
|
|
310
308
|
return e.loading;
|
|
311
309
|
},
|
|
312
310
|
get children() {
|
|
313
|
-
return e.confirmText ??
|
|
311
|
+
return e.confirmText ?? x.config.strings.confirmDialog.confirm;
|
|
314
312
|
}
|
|
315
313
|
})];
|
|
316
314
|
},
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { insert as a, createComponent as i, mergeProps as y, memo as C, effect as _, className as P, setAttribute as d, template as
|
|
2
|
-
import { createSignal as S, mergeProps as z, Show as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { insert as a, createComponent as i, mergeProps as y, memo as C, effect as _, className as P, setAttribute as d, template as n, delegateEvents as E } from "solid-js/web";
|
|
2
|
+
import { createSignal as S, mergeProps as z, Show as c } from "solid-js";
|
|
3
|
+
import { cn as k } from "../../utils/cn.js";
|
|
4
4
|
import { Folder as A, ChevronRight as N } from "../icons/index.js";
|
|
5
5
|
import { formatPickerPath as T } from "./picker/PickerNavigation.js";
|
|
6
|
-
import { usePickerNavigation as
|
|
7
|
-
var
|
|
6
|
+
import { usePickerNavigation as q, PickerPanel as D } from "./picker/PickerBase.js";
|
|
7
|
+
var F = /* @__PURE__ */ n("<div class=mt-2>"), I = /* @__PURE__ */ n('<p role=alert class="mt-1 text-xs text-error">'), R = /* @__PURE__ */ n('<p class="mt-1 text-[length:var(--floe-type-caption)] text-[var(--floe-ink-soft)]">'), V = /* @__PURE__ */ n('<div><button data-floe-input-surface data-floe-surface=inset type=button><span class="min-w-0 flex-1 truncate">');
|
|
8
8
|
function L(t) {
|
|
9
|
-
const [o, w] = S(t.defaultExpanded !== !1),
|
|
9
|
+
const [o, w] = S(t.defaultExpanded !== !1), b = z(t, {
|
|
10
10
|
get initialPath() {
|
|
11
11
|
return t.value || t.initialPath;
|
|
12
12
|
}
|
|
13
|
-
}),
|
|
13
|
+
}), s = q(b, () => t.open ?? !0, (l) => t.onChange?.(l)), $ = () => T(t.value ?? "", s.context()?.homePathAbs ?? t.homePath);
|
|
14
14
|
return (() => {
|
|
15
|
-
var
|
|
15
|
+
var l = V(), r = l.firstChild, u = r.firstChild;
|
|
16
16
|
return r.$$click = () => w((e) => !e), a(r, i(A, {
|
|
17
|
-
class: "h-4 w-4 shrink-0 text-
|
|
18
|
-
}),
|
|
17
|
+
class: "h-4 w-4 shrink-0 text-[var(--floe-ink-quiet)]"
|
|
18
|
+
}), u), a(u, () => $() || t.placeholder || "Select a directory…"), a(r, i(N, {
|
|
19
19
|
get class() {
|
|
20
|
-
return
|
|
20
|
+
return k("h-3.5 w-3.5 shrink-0 transition-transform", o() && "rotate-90");
|
|
21
21
|
}
|
|
22
|
-
}), null), a(
|
|
22
|
+
}), null), a(l, i(c, {
|
|
23
23
|
get when() {
|
|
24
24
|
return o();
|
|
25
25
|
},
|
|
26
26
|
get children() {
|
|
27
|
-
var e =
|
|
28
|
-
return a(e, i(
|
|
29
|
-
source:
|
|
27
|
+
var e = F();
|
|
28
|
+
return a(e, i(D, y(t, {
|
|
29
|
+
source: s
|
|
30
30
|
}))), e;
|
|
31
31
|
}
|
|
32
|
-
}), null), a(
|
|
32
|
+
}), null), a(l, i(c, {
|
|
33
33
|
get when() {
|
|
34
34
|
return t.error;
|
|
35
35
|
},
|
|
36
36
|
get children() {
|
|
37
|
-
var e =
|
|
37
|
+
var e = I();
|
|
38
38
|
return a(e, () => t.error), e;
|
|
39
39
|
}
|
|
40
|
-
}), null), a(
|
|
40
|
+
}), null), a(l, i(c, {
|
|
41
41
|
get when() {
|
|
42
42
|
return C(() => !!t.helperText)() && !t.error;
|
|
43
43
|
},
|
|
44
44
|
get children() {
|
|
45
|
-
var e =
|
|
45
|
+
var e = R();
|
|
46
46
|
return a(e, () => t.helperText), e;
|
|
47
47
|
}
|
|
48
48
|
}), null), _((e) => {
|
|
49
|
-
var m = t.class,
|
|
50
|
-
return m !== e.e && P(
|
|
49
|
+
var m = t.class, v = t.error ? !0 : void 0, h = t.disabled, f = o(), x = t.value, g = k("floe-field flex w-full cursor-pointer items-center gap-2 px-2 text-left disabled:cursor-not-allowed disabled:opacity-60", t.size === "lg" ? "h-9 text-sm" : t.size === "md" ? "h-8 text-xs" : "h-7 text-xs");
|
|
50
|
+
return m !== e.e && P(l, e.e = m), v !== e.t && d(r, "aria-invalid", e.t = v), h !== e.a && (r.disabled = e.a = h), f !== e.o && d(r, "aria-expanded", e.o = f), x !== e.i && d(r, "title", e.i = x), g !== e.n && P(r, e.n = g), e;
|
|
51
51
|
}, {
|
|
52
52
|
e: void 0,
|
|
53
53
|
t: void 0,
|
|
@@ -55,7 +55,7 @@ function L(t) {
|
|
|
55
55
|
o: void 0,
|
|
56
56
|
i: void 0,
|
|
57
57
|
n: void 0
|
|
58
|
-
}),
|
|
58
|
+
}), l;
|
|
59
59
|
})();
|
|
60
60
|
}
|
|
61
61
|
E(["click"]);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createComponent as n, mergeProps as s, insert as i, effect as g, setAttribute as u, template as m } from "solid-js/web";
|
|
2
|
-
import { createMemo as
|
|
3
|
-
import { cn as
|
|
2
|
+
import { createMemo as f } from "solid-js";
|
|
3
|
+
import { cn as d } from "../../utils/cn.js";
|
|
4
4
|
import { Button as o } from "./Button.js";
|
|
5
5
|
import { Dialog as h } from "./Dialog.js";
|
|
6
|
-
import { usePickerNavigation as
|
|
6
|
+
import { usePickerNavigation as v, PickerPanel as P, pickerCopy as b } from "./picker/PickerBase.js";
|
|
7
7
|
import { parsePickerPath as w } from "./picker/PickerNavigation.js";
|
|
8
|
-
var
|
|
8
|
+
var C = /* @__PURE__ */ m('<div class="flex w-full items-center gap-2"><span class="min-w-0 flex-1 truncate text-[length:var(--floe-type-caption)] text-[var(--floe-ink-soft)]">');
|
|
9
9
|
function $(e) {
|
|
10
|
-
const a =
|
|
10
|
+
const a = f(() => [...new Set((e.suggestedPaths ?? []).map((r) => w(r)).filter(Boolean))]), t = v(e, () => e.open, void 0, void 0, () => a().length ? "suggestions" : "browse"), c = () => {
|
|
11
11
|
if (e.disabled || t.view() !== "browse" || !t.valid()) return;
|
|
12
12
|
const r = t.currentPath();
|
|
13
13
|
e.onSelect(r), e.onOpenChange(!1);
|
|
@@ -23,11 +23,11 @@ function $(e) {
|
|
|
23
23
|
return e.title ?? "Select Directory";
|
|
24
24
|
},
|
|
25
25
|
get class() {
|
|
26
|
-
return
|
|
26
|
+
return d("max-w-lg", e.class);
|
|
27
27
|
},
|
|
28
28
|
get footer() {
|
|
29
29
|
return (() => {
|
|
30
|
-
var r =
|
|
30
|
+
var r = C(), l = r.firstChild;
|
|
31
31
|
return i(l, () => t.currentPath()), i(r, n(o, {
|
|
32
32
|
variant: "ghost",
|
|
33
33
|
size: "sm",
|
|
@@ -49,7 +49,7 @@ function $(e) {
|
|
|
49
49
|
})();
|
|
50
50
|
},
|
|
51
51
|
get children() {
|
|
52
|
-
return n(
|
|
52
|
+
return n(P, s(e, {
|
|
53
53
|
source: t,
|
|
54
54
|
suggestions: {
|
|
55
55
|
get paths() {
|