@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,62 +1,103 @@
|
|
|
1
|
-
import { createMemo as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { createMemo as q, untrack as u, createSignal as P, createEffect as w, onCleanup as A } from "solid-js";
|
|
2
|
+
const O = 120;
|
|
3
|
+
function v() {
|
|
4
|
+
const e = globalThis.matchMedia;
|
|
5
|
+
return typeof e != "function" ? !1 : e.call(globalThis, "(prefers-reduced-motion: reduce)").matches;
|
|
4
6
|
}
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
+
function p(e) {
|
|
8
|
+
const t = globalThis.requestAnimationFrame;
|
|
9
|
+
return typeof t == "function" ? t.call(globalThis, e) : globalThis.setTimeout(e, 16);
|
|
7
10
|
}
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
function R(e) {
|
|
12
|
+
const t = globalThis.cancelAnimationFrame;
|
|
13
|
+
if (typeof t == "function") {
|
|
14
|
+
t.call(globalThis, e);
|
|
11
15
|
return;
|
|
12
16
|
}
|
|
13
17
|
globalThis.clearTimeout(e);
|
|
14
18
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
19
|
+
function W(e) {
|
|
20
|
+
const t = /^\s*(-?\d*\.?\d+)(ms|s)\s*$/.exec(e);
|
|
21
|
+
if (!t) return null;
|
|
22
|
+
const i = Number.parseFloat(t[1]);
|
|
23
|
+
return Number.isFinite(i) ? t[2] === "s" ? i * 1e3 : i : null;
|
|
17
24
|
}
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
const c = ()
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
function _(e) {
|
|
26
|
+
const t = globalThis.getComputedStyle;
|
|
27
|
+
if (!e || typeof t != "function") return null;
|
|
28
|
+
const i = t.call(globalThis, e), c = i.transitionDuration.split(","), a = { properties: /* @__PURE__ */ new Set(), longestMs: 0 };
|
|
29
|
+
return i.transitionProperty.split(",").forEach((f, l) => {
|
|
30
|
+
const n = f.trim();
|
|
31
|
+
if (n === "" || n === "none") return;
|
|
32
|
+
const r = W(c[l % c.length] ?? "0s");
|
|
33
|
+
r === null || r <= 1 || (a.properties.add(n), a.longestMs = Math.max(a.longestMs, r));
|
|
34
|
+
}), a.properties.size > 0 ? a : null;
|
|
35
|
+
}
|
|
36
|
+
function z(e) {
|
|
37
|
+
const t = q(() => e.open()), i = u(t), [c, a] = P(i), [f, l] = P(i ? "entering" : "exiting");
|
|
38
|
+
let n = null, r = null, d = null;
|
|
39
|
+
const h = () => {
|
|
40
|
+
n !== null && (R(n), n = null);
|
|
41
|
+
}, g = () => {
|
|
42
|
+
r !== null && (globalThis.clearTimeout(r), r = null), d?.(), d = null;
|
|
25
43
|
};
|
|
26
|
-
return
|
|
27
|
-
if (
|
|
28
|
-
if (
|
|
29
|
-
|
|
44
|
+
return w(() => {
|
|
45
|
+
if (t()) {
|
|
46
|
+
if (h(), g(), u(c) && u(f) === "exiting") {
|
|
47
|
+
l("open");
|
|
30
48
|
return;
|
|
31
49
|
}
|
|
32
|
-
|
|
33
|
-
n = null, t
|
|
50
|
+
a(!0), l("entering"), n = p(() => {
|
|
51
|
+
n = null, u(t) && l("open");
|
|
34
52
|
});
|
|
35
53
|
return;
|
|
36
54
|
}
|
|
37
|
-
if (
|
|
38
|
-
|
|
55
|
+
if (h(), !u(c)) {
|
|
56
|
+
l("exiting");
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
l("exiting");
|
|
60
|
+
const T = () => {
|
|
61
|
+
n = null, g(), u(t) || a(!1);
|
|
62
|
+
}, o = e.element?.(), x = v() ? null : _(o);
|
|
63
|
+
if (o && x) {
|
|
64
|
+
const b = /* @__PURE__ */ new Set(), E = /* @__PURE__ */ new Set();
|
|
65
|
+
let F = !1;
|
|
66
|
+
const S = () => {
|
|
67
|
+
F || (F = !0, T());
|
|
68
|
+
}, L = (s) => s.target === o && x.properties.has(s.propertyName), N = (s) => {
|
|
69
|
+
L(s) && b.add(s.propertyName);
|
|
70
|
+
}, m = (s) => {
|
|
71
|
+
if (L(s)) {
|
|
72
|
+
b.add(s.propertyName), E.add(s.propertyName);
|
|
73
|
+
for (const C of b)
|
|
74
|
+
if (!E.has(C)) return;
|
|
75
|
+
S();
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
o.addEventListener("transitionrun", N), o.addEventListener("transitionend", m), o.addEventListener("transitioncancel", m), d = () => {
|
|
79
|
+
o.removeEventListener("transitionrun", N), o.removeEventListener("transitionend", m), o.removeEventListener("transitioncancel", m);
|
|
80
|
+
};
|
|
81
|
+
const D = Math.max(x.longestMs, e.exitDurationMs ?? 0) + O;
|
|
82
|
+
r = globalThis.setTimeout(S, D);
|
|
39
83
|
return;
|
|
40
84
|
}
|
|
41
|
-
|
|
42
|
-
const f = y(e), w = () => {
|
|
43
|
-
n = null, t(o) || m(!1);
|
|
44
|
-
}, x = () => {
|
|
85
|
+
const M = v() ? Math.max(0, e.reducedMotionExitDurationMs ?? 1) : Math.max(0, e.exitDurationMs ?? 160), y = () => {
|
|
45
86
|
n = null, r = globalThis.setTimeout(() => {
|
|
46
|
-
r = null,
|
|
47
|
-
},
|
|
87
|
+
r = null, M <= 1 ? T() : n = p(T);
|
|
88
|
+
}, M);
|
|
48
89
|
};
|
|
49
|
-
|
|
50
|
-
n =
|
|
90
|
+
M <= 1 ? y() : n = p(() => {
|
|
91
|
+
n = p(y);
|
|
51
92
|
});
|
|
52
|
-
}),
|
|
53
|
-
|
|
93
|
+
}), A(() => {
|
|
94
|
+
h(), g();
|
|
54
95
|
}), {
|
|
55
|
-
mounted:
|
|
56
|
-
state:
|
|
57
|
-
exiting: () =>
|
|
96
|
+
mounted: c,
|
|
97
|
+
state: f,
|
|
98
|
+
exiting: () => f() === "exiting"
|
|
58
99
|
};
|
|
59
100
|
}
|
|
60
101
|
export {
|
|
61
|
-
|
|
102
|
+
z as createFloatingPresence
|
|
62
103
|
};
|
|
@@ -16,13 +16,14 @@ export { resolveFloatingWindowViewport, type FloatingWindowRect, type FloatingWi
|
|
|
16
16
|
export { Dropdown, Select, type DropdownProps, type DropdownItem, type SelectProps, } from './Dropdown';
|
|
17
17
|
export { SurfaceFloatingLayer, type SurfaceFloatingLayerPosition, type SurfaceFloatingLayerProps, type SurfaceFloatingLayerSize, } from './SurfaceFloatingLayer';
|
|
18
18
|
export { Tooltip, type TooltipProps } from './Tooltip';
|
|
19
|
+
export { Popover, type PopoverProps, type PopoverPlacement, } from './Popover';
|
|
19
20
|
export { CommandPalette } from './CommandPalette';
|
|
20
21
|
export { InfiniteCanvas, type InfiniteCanvasProps, type InfiniteCanvasPoint, type InfiniteCanvasContextMenuEvent, } from './InfiniteCanvas';
|
|
21
22
|
export { startPointerSession, type PointerSessionController, type PointerSessionEndEvent, type PointerSessionEndReason, type PointerSessionSnapshot, type StartPointerSessionOptions, } from './pointerSession';
|
|
22
23
|
export { clientToCanvasLocal, clientToCanvasWorld, createViewportFromZoomAnchor, isPointInsideCanvasRect, localToCanvasWorld, type CanvasClientPoint, type CanvasLocalPoint, type CanvasViewportLike, type CanvasViewportRectLike, type CanvasWorldPoint, } from './canvasGeometry';
|
|
23
24
|
export { CANVAS_WHEEL_INTERACTIVE_ATTR, DEFAULT_CANVAS_WHEEL_INTERACTIVE_SELECTOR, LOCAL_INTERACTION_SURFACE_ATTR, DEFAULT_LOCAL_INTERACTION_SURFACE_SELECTOR, WORKBENCH_TEXT_SELECTION_SURFACE_ATTR, DEFAULT_WORKBENCH_TEXT_SELECTION_SURFACE_SELECTOR, WORKBENCH_WIDGET_ACTIVATION_SURFACE_ATTR, DEFAULT_WORKBENCH_WIDGET_ACTIVATION_SURFACE_SELECTOR, WORKBENCH_WIDGET_SHELL_ATTR, DEFAULT_WORKBENCH_WIDGET_SHELL_SELECTOR, isLocalInteractionSurfaceTarget, resolveSurfaceInteractionTargetRole, resolveSurfaceWheelRouting, resolveWorkbenchWidgetEventOwnership, resolveWorkbenchWidgetTextSelectionTarget, resolveWorkbenchWidgetLocalTypingTarget, shouldActivateWorkbenchWidgetLocalTarget, type SurfaceInteractionRoutingOptions, type SurfaceInteractionTargetRole, type SurfaceWheelLocalReason, type SurfaceWheelRoutingDecision, type SurfaceWheelRoutingOptions, type WorkbenchWidgetEventOwnership, type WorkbenchWidgetEventOwnershipOptions, type WorkbenchWidgetLocalActivationTargetOptions, } from './localInteractionSurface';
|
|
24
25
|
export { DIALOG_SURFACE_HOST_ATTR, SURFACE_PORTAL_HOST_ATTR, SURFACE_PORTAL_LAYER_ATTR, DIALOG_SURFACE_BOUNDARY_ATTR, ensureSurfacePortalInteractionTracking, isSurfacePortalMode, projectSurfacePortalPosition, projectSurfacePortalRect, resolveSurfacePortalBoundaryRect, resolveSurfacePortalHost, resolveSurfacePortalMount, resolveSurfacePortalMountRect, __resetSurfacePortalScopeForTests, type ResolvedSurfacePortalHost, type SurfacePortalBoundaryRect, type SurfacePortalInteractionSnapshot, type SurfacePortalMode, type SurfacePortalRect, } from './surfacePortalScope';
|
|
25
|
-
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter,
|
|
26
|
+
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, type CardProps, type CardVariant, type CardHeaderProps, type CardTitleProps, type CardDescriptionProps, type CardContentProps, type CardFooterProps, } from './Card';
|
|
26
27
|
export { Tabs, TabPanel, type TabsProps, type TabPanelProps, type TabItem, type TabsFeatures, type TabsSlotClassNames, type TabsIndicatorMode, type TabsIndicatorColorToken, } from './Tabs';
|
|
27
28
|
export { DirectoryPicker, type DirectoryPickerProps } from './DirectoryPicker';
|
|
28
29
|
export { DirectoryInput, type DirectoryInputProps, type DirectoryInputSize, } from './DirectoryInput';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { createComponent as l, insert as
|
|
1
|
+
import { createComponent as l, insert as v, memo as S, effect as p, template as k, use as g, delegateEvents as D } from "solid-js/web";
|
|
2
2
|
import { createSignal as E, createEffect as b, on as L, onCleanup as B, Show as w } from "solid-js";
|
|
3
|
-
import { Star as
|
|
3
|
+
import { Star as x } from "../../icons/index.js";
|
|
4
4
|
import { Button as C } from "../Button.js";
|
|
5
5
|
import { SurfaceFloatingLayer as M } from "../SurfaceFloatingLayer.js";
|
|
6
6
|
import { useOverlayMask as P } from "../../../hooks/useOverlayMask.js";
|
|
7
|
-
var _ = /* @__PURE__ */ k('<div class="flex min-w-0 items-center">'), R = /* @__PURE__ */ k('<button type=button role=menuitem class="flex w-full cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-left text-xs hover:bg-
|
|
7
|
+
var _ = /* @__PURE__ */ k('<div class="flex min-w-0 items-center">'), R = /* @__PURE__ */ k('<button type=button role=menuitem class="flex w-full cursor-pointer items-center gap-2 rounded-xs px-2 py-1.5 text-left text-xs hover:bg-[var(--floe-state-selected)] focus:bg-[var(--floe-state-selected)] focus:outline-none">');
|
|
8
8
|
function z(e) {
|
|
9
|
-
const [
|
|
9
|
+
const [c, f] = E(!1), a = () => e.favorites.paths.includes(e.path), u = () => a() ? e.copy.unfavoriteDirectory : e.copy.favoriteDirectory, m = async () => {
|
|
10
10
|
const n = e.favorites, d = e.path;
|
|
11
|
-
if (!(!n.editable || !n.onSetFavorite ||
|
|
11
|
+
if (!(!n.editable || !n.onSetFavorite || c() || e.disabled || n.pendingPaths?.includes(d))) {
|
|
12
12
|
f(!0), e.onError?.("");
|
|
13
13
|
try {
|
|
14
14
|
await n.onSetFavorite(d, !a());
|
|
@@ -34,9 +34,9 @@ function z(e) {
|
|
|
34
34
|
return a();
|
|
35
35
|
},
|
|
36
36
|
get loading() {
|
|
37
|
-
return
|
|
37
|
+
return c() || e.favorites.pendingPaths?.includes(e.path);
|
|
38
38
|
},
|
|
39
|
-
icon: () => l(
|
|
39
|
+
icon: () => l(x, {
|
|
40
40
|
get class() {
|
|
41
41
|
return a() ? "h-3.5 w-3.5 fill-current text-warning" : "h-3.5 w-3.5";
|
|
42
42
|
}
|
|
@@ -45,15 +45,15 @@ function z(e) {
|
|
|
45
45
|
return e.disabled || !e.favorites.editable || !e.favorites.onSetFavorite;
|
|
46
46
|
},
|
|
47
47
|
onClick: () => {
|
|
48
|
-
|
|
48
|
+
m();
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
function Y(e) {
|
|
53
|
-
const [
|
|
54
|
-
let a, u,
|
|
53
|
+
const [c, f] = E();
|
|
54
|
+
let a, u, m;
|
|
55
55
|
const n = (o = !1) => {
|
|
56
|
-
const r =
|
|
56
|
+
const r = c()?.owner;
|
|
57
57
|
f(void 0), o && r?.isConnected && r.focus();
|
|
58
58
|
}, d = (o) => {
|
|
59
59
|
if (!e.favorites?.editable || e.disabled) return;
|
|
@@ -69,8 +69,8 @@ function Y(e) {
|
|
|
69
69
|
}), queueMicrotask(() => u?.focus());
|
|
70
70
|
};
|
|
71
71
|
return b(L(() => e.scopeKey, () => n())), P({
|
|
72
|
-
open: () => !!
|
|
73
|
-
root: () =>
|
|
72
|
+
open: () => !!c(),
|
|
73
|
+
root: () => m,
|
|
74
74
|
onClose: () => n(!0),
|
|
75
75
|
closeOnEscape: !0,
|
|
76
76
|
lockBodyScroll: !1,
|
|
@@ -79,7 +79,7 @@ function Y(e) {
|
|
|
79
79
|
restoreFocus: !1,
|
|
80
80
|
blockHotkeys: !1
|
|
81
81
|
}), b(() => {
|
|
82
|
-
if (!
|
|
82
|
+
if (!c()) return;
|
|
83
83
|
const o = (t) => {
|
|
84
84
|
(!(t.target instanceof Element) || !t.target.closest("[data-picker-favorite-menu]")) && n();
|
|
85
85
|
}, r = (t) => {
|
|
@@ -94,7 +94,7 @@ function Y(e) {
|
|
|
94
94
|
(t.key === "ContextMenu" || t.shiftKey && t.key === "F10") && d(t);
|
|
95
95
|
}, o.$$contextmenu = d;
|
|
96
96
|
var r = a;
|
|
97
|
-
return typeof r == "function" ? g(r, o) : a = o,
|
|
97
|
+
return typeof r == "function" ? g(r, o) : a = o, v(o, () => e.children, null), v(o, l(w, {
|
|
98
98
|
get when() {
|
|
99
99
|
return e.favorites;
|
|
100
100
|
},
|
|
@@ -115,9 +115,9 @@ function Y(e) {
|
|
|
115
115
|
return e.onError;
|
|
116
116
|
}
|
|
117
117
|
})
|
|
118
|
-
}), null),
|
|
118
|
+
}), null), v(o, l(w, {
|
|
119
119
|
get when() {
|
|
120
|
-
return
|
|
120
|
+
return c();
|
|
121
121
|
},
|
|
122
122
|
children: (t) => l(M, {
|
|
123
123
|
get position() {
|
|
@@ -131,25 +131,25 @@ function Y(e) {
|
|
|
131
131
|
height: 40
|
|
132
132
|
},
|
|
133
133
|
layerRef: (i) => {
|
|
134
|
-
|
|
134
|
+
m = i;
|
|
135
135
|
},
|
|
136
136
|
"data-picker-favorite-menu": "",
|
|
137
137
|
role: "menu",
|
|
138
|
-
class: "z-50 rounded-
|
|
138
|
+
class: "z-50 rounded-panel border border-[var(--floe-line)] bg-background p-1 shadow-[var(--floe-elevation-float)]",
|
|
139
139
|
get children() {
|
|
140
140
|
var i = R();
|
|
141
141
|
i.$$click = () => {
|
|
142
|
-
const
|
|
143
|
-
if (!
|
|
144
|
-
const
|
|
145
|
-
n(!0),
|
|
142
|
+
const s = t();
|
|
143
|
+
if (!s.favorites.editable || s.favorites.pendingPaths?.includes(s.path)) return;
|
|
144
|
+
const F = e.onError, $ = e.copy.favoritesLoadFailed;
|
|
145
|
+
n(!0), s.favorites.onSetFavorite?.(s.path, s.favorite).catch((h) => F(h instanceof Error ? h.message : $));
|
|
146
146
|
};
|
|
147
147
|
var y = u;
|
|
148
|
-
return typeof y == "function" ? g(y, i) : u = i,
|
|
148
|
+
return typeof y == "function" ? g(y, i) : u = i, v(i, l(x, {
|
|
149
149
|
class: "h-3.5 w-3.5"
|
|
150
|
-
}), null),
|
|
151
|
-
var
|
|
152
|
-
return () =>
|
|
150
|
+
}), null), v(i, (() => {
|
|
151
|
+
var s = S(() => !!t().favorite);
|
|
152
|
+
return () => s() ? e.copy.favoriteDirectory : e.copy.unfavoriteDirectory;
|
|
153
153
|
})(), null), p(() => i.disabled = !t().favorites.editable || !t().favorites.onSetFavorite || t().favorites.pendingPaths?.includes(t().path)), i;
|
|
154
154
|
}
|
|
155
155
|
})
|