@floegence/floe-webapp-core 0.81.0 → 0.81.2
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/assets/markdown.worker-DurayC72.js +59 -0
- package/dist/components/chat/diff/diffModel.js +1 -1
- package/dist/components/chat/hooks/useMarkdown.js +5 -5
- package/dist/components/chat/markdown/markdown.js +1 -1
- package/dist/components/editor/CodeEditor.js +4 -4
- package/dist/components/file-browser/DragPreview.js +1 -1
- package/dist/components/icons/DockIcons.js +118 -114
- package/dist/components/layout/BottomBarCompanion.js +29 -29
- package/dist/components/layout/Shell.js +1 -1
- package/dist/components/notes/NotesOverlay.js +1 -1
- package/dist/components/ui/FeedbackIndicator.js +109 -101
- package/dist/components/ui/picker/PickerNavigation.js +10 -9
- package/dist/components/workbench/WorkbenchFilterBar.js +226 -223
- package/dist/components/workbench/WorkbenchLockButton.js +1 -1
- package/dist/components/workbench/WorkbenchOverlay.js +1 -1
- package/dist/components/workbench/WorkbenchSurface.js +101 -101
- package/dist/node_modules/.pnpm/marked@17.0.6/node_modules/marked/lib/marked.esm.js +1141 -0
- package/dist/node_modules/.pnpm/{solid-motionone@1.0.4_solid-js@1.9.11 → solid-motionone@1.0.4_solid-js@1.9.15}/node_modules/solid-motionone/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/{tailwind-merge@3.4.0 → tailwind-merge@3.7.0}/node_modules/tailwind-merge/dist/bundle-mjs.js +653 -420
- package/dist/pdf/PdfDocumentSurface.js +1 -0
- package/dist/pdf/localization.js +2 -0
- package/dist/styles.css +1 -1
- package/dist/utils/cn.js +1 -1
- package/package.json +11 -11
- package/dist/assets/markdown.worker-xpdzahxf.js +0 -59
- package/dist/node_modules/.pnpm/marked@17.0.1/node_modules/marked/lib/marked.esm.js +0 -1114
- /package/dist/node_modules/.pnpm/{@solid-primitives_props@3.2.2_solid-js@1.9.11 → @solid-primitives_props@3.2.4_solid-js@1.9.15}/node_modules/@solid-primitives/props/dist/combineProps.js +0 -0
- /package/dist/node_modules/.pnpm/{@solid-primitives_refs@1.1.2_solid-js@1.9.11 → @solid-primitives_refs@1.1.4_solid-js@1.9.15}/node_modules/@solid-primitives/refs/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@solid-primitives_transition-group@1.1.2_solid-js@1.9.11 → @solid-primitives_transition-group@1.1.2_solid-js@1.9.15}/node_modules/@solid-primitives/transition-group/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{diff@8.0.3 → diff@8.0.4}/node_modules/diff/libesm/diff/base.js +0 -0
- /package/dist/node_modules/.pnpm/{diff@8.0.3 → diff@8.0.4}/node_modules/diff/libesm/diff/line.js +0 -0
|
@@ -1,190 +1,198 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createUniqueId as
|
|
3
|
-
import { AlertTriangle as
|
|
4
|
-
import { useOverlayMask as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { insert as c, createComponent as u, effect as I, setAttribute as g, setStyleProperty as w, spread as D, mergeProps as G, memo as J, className as Y, template as y, use as Z, delegateEvents as ee } from "solid-js/web";
|
|
2
|
+
import { createUniqueId as te, createSignal as p, createMemo as re, createEffect as N, untrack as ne, Show as $, For as oe, onCleanup as ie } from "solid-js";
|
|
3
|
+
import { AlertTriangle as se, Info as ae, X as le } from "../icons/index.js";
|
|
4
|
+
import { useOverlayMask as ce } from "../../hooks/useOverlayMask.js";
|
|
5
|
+
import { useMediaQuery as de } from "../../hooks/useMediaQuery.js";
|
|
6
|
+
import { cn as ue } from "../../utils/cn.js";
|
|
7
|
+
import { SurfaceFloatingLayer as fe } from "./SurfaceFloatingLayer.js";
|
|
8
|
+
import { calculateMenuPosition as me } from "./menuUtils.js";
|
|
9
|
+
import { WORKBENCH_TEXT_SELECTION_SURFACE_ATTR as ve, CANVAS_WHEEL_INTERACTIVE_ATTR as he } from "./localInteractionSurface.js";
|
|
10
|
+
import { resolveSurfacePortalHost as be, resolveSurfacePortalBoundaryRect as ge, resolveSurfacePortalScale as we } from "./dialogSurfaceScope.js";
|
|
11
|
+
var ye = /* @__PURE__ */ y('<div class="flex shrink-0 items-center justify-between gap-2 border-b border-border px-3 py-2"><span class="min-w-0 truncate text-xs font-medium"></span><button type=button class="flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md hover:bg-accent">'), xe = /* @__PURE__ */ y("<div data-floe-status-details>"), Ee = /* @__PURE__ */ y('<span data-floe-status-indicator><button type=button class="inline-flex h-full w-full cursor-pointer items-center justify-center rounded-md hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"aria-haspopup=dialog></button><span class=sr-only role=alert aria-atomic=true></span><span class=sr-only role=status aria-atomic=true>'), pe = /* @__PURE__ */ y("<div>"), Se = /* @__PURE__ */ y('<div class="flex flex-wrap items-center gap-2">'), Ce = /* @__PURE__ */ y('<section class="space-y-2 border-b border-border pb-3 mb-3 last:border-0 last:pb-0 last:mb-0"><p class=font-medium>');
|
|
12
|
+
function Be(i) {
|
|
13
|
+
const A = te(), H = de("(pointer: coarse)"), S = () => H() ? "2.75rem" : i.size === "md" ? "2rem" : "1.75rem", [m, T] = p(!1), [C, q] = p(), [K, U] = p({
|
|
13
14
|
x: 0,
|
|
14
15
|
y: 0
|
|
15
|
-
}), [
|
|
16
|
+
}), [M, V] = p({
|
|
16
17
|
width: 360,
|
|
17
18
|
height: 384
|
|
18
|
-
}), [
|
|
19
|
-
let
|
|
20
|
-
const
|
|
19
|
+
}), [W, P] = p(!1);
|
|
20
|
+
let v, h = !1;
|
|
21
|
+
const f = () => i.entries.length > 0, _ = re(() => i.entries.some((t) => t.severity === "error") ? "error" : i.entries.some((t) => t.severity === "warning") ? "warning" : "info"), R = (t) => i.entries.filter((r) => r.severity === "error" === t).map((r) => r.summary).join(". "), X = () => (f() ? v : i.restoreFocus())?.focus({
|
|
21
22
|
preventScroll: !0
|
|
22
|
-
}),
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
return
|
|
26
|
-
open:
|
|
27
|
-
root:
|
|
28
|
-
containsTarget:
|
|
29
|
-
onClose: () =>
|
|
23
|
+
}), k = (t) => {
|
|
24
|
+
T(!1), h = !1, t && X();
|
|
25
|
+
}, x = (t) => t instanceof Node && !!(v?.contains(t) || C()?.contains(t));
|
|
26
|
+
return ce({
|
|
27
|
+
open: m,
|
|
28
|
+
root: C,
|
|
29
|
+
containsTarget: x,
|
|
30
|
+
onClose: () => k(!0),
|
|
30
31
|
lockBodyScroll: !1,
|
|
31
32
|
trapFocus: !1,
|
|
32
33
|
autoFocus: !1,
|
|
33
34
|
restoreFocus: !1,
|
|
34
35
|
closeOnEscape: "inside",
|
|
35
|
-
escapeKeyPhase: "
|
|
36
|
+
escapeKeyPhase: "capture",
|
|
36
37
|
blockHotkeys: !1
|
|
37
|
-
}),
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
}), N(() => {
|
|
39
|
+
if (f()) {
|
|
40
|
+
m() && queueMicrotask(() => ne(() => {
|
|
41
|
+
m() && h && document.activeElement === document.body && C()?.focus({
|
|
41
42
|
preventScroll: !0
|
|
42
43
|
});
|
|
43
44
|
}));
|
|
44
45
|
return;
|
|
45
46
|
}
|
|
46
|
-
const t =
|
|
47
|
-
|
|
47
|
+
const t = h || typeof document < "u" && x(document.activeElement);
|
|
48
|
+
T(!1), h = !1, t && i.restoreFocus()?.focus({
|
|
48
49
|
preventScroll: !0
|
|
49
50
|
});
|
|
50
|
-
}),
|
|
51
|
-
const t =
|
|
52
|
-
if (!
|
|
53
|
-
const r =
|
|
54
|
-
let b = 0,
|
|
55
|
-
const
|
|
51
|
+
}), N(() => {
|
|
52
|
+
const t = C();
|
|
53
|
+
if (!m() || !t || !v) return;
|
|
54
|
+
const r = v;
|
|
55
|
+
let b = 0, F = !0;
|
|
56
|
+
const L = () => {
|
|
56
57
|
if (b = 0, !r.isConnected) {
|
|
57
|
-
|
|
58
|
+
k(!1);
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
60
|
-
const
|
|
61
|
+
const n = be({
|
|
61
62
|
owner: r
|
|
62
|
-
}),
|
|
63
|
-
|
|
64
|
-
width: Math.max(0, Math.min(360,
|
|
65
|
-
height: Math.max(0, Math.min(384,
|
|
66
|
-
}),
|
|
63
|
+
}), d = ge(n), E = we(n);
|
|
64
|
+
V({
|
|
65
|
+
width: Math.max(0, Math.min(360, d.right - d.left - 16)) / E.x,
|
|
66
|
+
height: Math.max(0, Math.min(384, d.bottom - d.top - 16)) / E.y
|
|
67
|
+
}), U(me(r.getBoundingClientRect(), t.getBoundingClientRect(), "end", d)), P(!0), F && (F = !1, t.focus({
|
|
67
68
|
preventScroll: !0
|
|
68
69
|
}));
|
|
69
70
|
}, e = () => {
|
|
70
|
-
cancelAnimationFrame(b), b = requestAnimationFrame(
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
for (let
|
|
71
|
+
cancelAnimationFrame(b), b = requestAnimationFrame(L);
|
|
72
|
+
}, s = new ResizeObserver(e);
|
|
73
|
+
s.observe(r), s.observe(t);
|
|
74
|
+
const o = new MutationObserver(e);
|
|
75
|
+
for (let n = r.parentElement; n; n = n.parentElement) o.observe(n, {
|
|
75
76
|
attributes: !0,
|
|
76
77
|
attributeFilter: ["style", "class"]
|
|
77
78
|
});
|
|
78
|
-
const
|
|
79
|
-
|
|
79
|
+
const a = (n) => {
|
|
80
|
+
h = x(n.target);
|
|
80
81
|
};
|
|
81
|
-
document.addEventListener("focusin",
|
|
82
|
-
const l = (
|
|
83
|
-
|
|
82
|
+
document.addEventListener("focusin", a);
|
|
83
|
+
const l = (n) => {
|
|
84
|
+
x(n.target) || k(!1);
|
|
84
85
|
};
|
|
85
|
-
window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), document.addEventListener("pointerdown", l, !0), e(),
|
|
86
|
-
cancelAnimationFrame(b), document.removeEventListener("focusin",
|
|
86
|
+
window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), document.addEventListener("pointerdown", l, !0), e(), ie(() => {
|
|
87
|
+
cancelAnimationFrame(b), document.removeEventListener("focusin", a), s.disconnect(), o.disconnect(), window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0), document.removeEventListener("pointerdown", l, !0);
|
|
87
88
|
});
|
|
88
89
|
}), (() => {
|
|
89
|
-
var t =
|
|
90
|
+
var t = Ee(), r = t.firstChild, b = r.nextSibling, F = b.nextSibling;
|
|
90
91
|
r.$$click = () => {
|
|
91
|
-
|
|
92
|
+
f() && (P(!1), T((e) => !e));
|
|
92
93
|
}, r.addEventListener("blur", (e) => {
|
|
93
|
-
e.relatedTarget && (
|
|
94
|
+
e.relatedTarget && (h = x(e.relatedTarget));
|
|
94
95
|
}), r.addEventListener("focus", () => {
|
|
95
|
-
|
|
96
|
+
h = !0;
|
|
96
97
|
});
|
|
97
|
-
var
|
|
98
|
-
return typeof
|
|
98
|
+
var L = v;
|
|
99
|
+
return typeof L == "function" ? Z(L, r) : v = r, c(r, u($, {
|
|
99
100
|
get when() {
|
|
100
|
-
return
|
|
101
|
+
return _() !== "info";
|
|
101
102
|
},
|
|
102
103
|
get fallback() {
|
|
103
|
-
return
|
|
104
|
+
return u(ae, {
|
|
104
105
|
class: "h-4 w-4",
|
|
105
106
|
"aria-hidden": "true"
|
|
106
107
|
});
|
|
107
108
|
},
|
|
108
109
|
get children() {
|
|
109
|
-
return
|
|
110
|
+
return u(se, {
|
|
110
111
|
class: "h-4 w-4",
|
|
111
112
|
"aria-hidden": "true"
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
|
-
})),
|
|
115
|
+
})), c(b, () => R(!0)), c(F, () => R(!1)), c(t, u($, {
|
|
115
116
|
get when() {
|
|
116
|
-
return
|
|
117
|
+
return J(() => !!m())() && f();
|
|
117
118
|
},
|
|
118
119
|
get children() {
|
|
119
|
-
return
|
|
120
|
-
owner:
|
|
120
|
+
return u(fe, {
|
|
121
|
+
owner: v,
|
|
121
122
|
get position() {
|
|
122
|
-
return
|
|
123
|
+
return K();
|
|
123
124
|
},
|
|
124
|
-
layerRef:
|
|
125
|
-
id:
|
|
125
|
+
layerRef: q,
|
|
126
|
+
id: A,
|
|
126
127
|
role: "dialog",
|
|
127
128
|
get "aria-label"() {
|
|
128
|
-
return
|
|
129
|
+
return i.label;
|
|
129
130
|
},
|
|
130
131
|
tabindex: -1,
|
|
131
132
|
"data-floe-surface": "floating",
|
|
132
133
|
class: "flex flex-col overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-lg",
|
|
133
134
|
get style() {
|
|
134
135
|
return {
|
|
135
|
-
width: `${
|
|
136
|
-
"max-height": `${
|
|
137
|
-
visibility:
|
|
136
|
+
width: `${M().width}px`,
|
|
137
|
+
"max-height": `${M().height}px`,
|
|
138
|
+
visibility: W() ? "visible" : "hidden"
|
|
138
139
|
};
|
|
139
140
|
},
|
|
140
141
|
get children() {
|
|
141
142
|
return [(() => {
|
|
142
|
-
var e =
|
|
143
|
-
return
|
|
143
|
+
var e = ye(), s = e.firstChild, o = s.nextSibling;
|
|
144
|
+
return c(s, () => i.label), o.$$click = () => k(!0), c(o, u(le, {
|
|
144
145
|
class: "h-4 w-4"
|
|
145
|
-
})),
|
|
146
|
+
})), I((a) => {
|
|
147
|
+
var l = i.closeLabel, n = S(), d = S();
|
|
148
|
+
return l !== a.e && g(o, "aria-label", a.e = l), n !== a.t && w(o, "width", a.t = n), d !== a.a && w(o, "height", a.a = d), a;
|
|
149
|
+
}, {
|
|
150
|
+
e: void 0,
|
|
151
|
+
t: void 0,
|
|
152
|
+
a: void 0
|
|
153
|
+
}), e;
|
|
146
154
|
})(), (() => {
|
|
147
|
-
var e =
|
|
148
|
-
return
|
|
149
|
-
[
|
|
150
|
-
[
|
|
155
|
+
var e = xe();
|
|
156
|
+
return D(e, G({
|
|
157
|
+
[he]: "true",
|
|
158
|
+
[ve]: "true"
|
|
151
159
|
}, {
|
|
152
160
|
class: "min-h-0 overflow-auto overscroll-contain p-3 text-xs",
|
|
153
161
|
style: {
|
|
154
162
|
"overflow-wrap": "anywhere"
|
|
155
163
|
}
|
|
156
|
-
}), !1, !0),
|
|
164
|
+
}), !1, !0), c(e, u(oe, {
|
|
157
165
|
get each() {
|
|
158
|
-
return
|
|
166
|
+
return i.entries;
|
|
159
167
|
},
|
|
160
|
-
children: (
|
|
161
|
-
var
|
|
162
|
-
return a
|
|
168
|
+
children: (s) => (() => {
|
|
169
|
+
var o = Ce(), a = o.firstChild;
|
|
170
|
+
return c(a, () => s.summary), c(o, u($, {
|
|
163
171
|
get when() {
|
|
164
|
-
return
|
|
172
|
+
return s.detail;
|
|
165
173
|
},
|
|
166
174
|
get children() {
|
|
167
|
-
var l =
|
|
168
|
-
return
|
|
175
|
+
var l = pe();
|
|
176
|
+
return c(l, () => s.detail), l;
|
|
169
177
|
}
|
|
170
|
-
}), null),
|
|
178
|
+
}), null), c(o, u($, {
|
|
171
179
|
get when() {
|
|
172
|
-
return
|
|
180
|
+
return s.actions;
|
|
173
181
|
},
|
|
174
182
|
get children() {
|
|
175
|
-
var l =
|
|
176
|
-
return
|
|
183
|
+
var l = Se();
|
|
184
|
+
return c(l, () => s.actions), l;
|
|
177
185
|
}
|
|
178
|
-
}), null),
|
|
186
|
+
}), null), o;
|
|
179
187
|
})()
|
|
180
188
|
})), e;
|
|
181
189
|
})()];
|
|
182
190
|
}
|
|
183
191
|
});
|
|
184
192
|
}
|
|
185
|
-
}), null),
|
|
186
|
-
var
|
|
187
|
-
return
|
|
193
|
+
}), null), I((e) => {
|
|
194
|
+
var s = ue("inline-flex shrink-0 items-center justify-center align-middle", i.class), o = S(), a = S(), l = f() ? "visible" : "hidden", n = _() === "error" ? "var(--error)" : _() === "warning" ? "var(--warning)" : "var(--muted-foreground)", d = f() ? 0 : -1, E = !f() || void 0, B = `${i.label}${f() ? `: ${i.entries.map((Q) => Q.summary).join("; ")}` : ""}`, O = i.label, j = m(), z = m() ? A : void 0;
|
|
195
|
+
return s !== e.e && Y(t, e.e = s), o !== e.t && w(t, "width", e.t = o), a !== e.a && w(t, "height", e.a = a), l !== e.o && w(r, "visibility", e.o = l), n !== e.i && w(r, "color", e.i = n), d !== e.n && g(r, "tabindex", e.n = d), E !== e.s && g(r, "aria-hidden", e.s = E), B !== e.h && g(r, "aria-label", e.h = B), O !== e.r && g(r, "title", e.r = O), j !== e.d && g(r, "aria-expanded", e.d = j), z !== e.l && g(r, "aria-controls", e.l = z), e;
|
|
188
196
|
}, {
|
|
189
197
|
e: void 0,
|
|
190
198
|
t: void 0,
|
|
@@ -200,7 +208,7 @@ function Ae(n) {
|
|
|
200
208
|
}), t;
|
|
201
209
|
})();
|
|
202
210
|
}
|
|
203
|
-
|
|
211
|
+
ee(["click"]);
|
|
204
212
|
export {
|
|
205
|
-
|
|
213
|
+
Be as FeedbackIndicator
|
|
206
214
|
};
|
|
@@ -28,6 +28,7 @@ class S extends Error {
|
|
|
28
28
|
constructor(n) {
|
|
29
29
|
super(n), this.kind = n;
|
|
30
30
|
}
|
|
31
|
+
kind;
|
|
31
32
|
}
|
|
32
33
|
function g(t, n = "") {
|
|
33
34
|
let e = String(t ?? "").trim();
|
|
@@ -59,9 +60,9 @@ function j(t, n) {
|
|
|
59
60
|
throw new S("missingPath");
|
|
60
61
|
}
|
|
61
62
|
function V(t, n) {
|
|
62
|
-
const [e, u] = l(null), [o,
|
|
63
|
+
const [e, u] = l(null), [o, E] = l(""), [B, H] = l([]), [v, C] = l(""), [N, c] = l(!1), [$, f] = l(null), [I, q] = l(!1), [h, R] = l(!1);
|
|
63
64
|
let p = 0, b = 0, A, w = /* @__PURE__ */ new Map();
|
|
64
|
-
const G = () => h() &&
|
|
65
|
+
const G = () => h() && !N() && !$() && !!o() && g(v(), e()?.homePathAbs) === o(), L = () => {
|
|
65
66
|
p += 1, b += 1, w = /* @__PURE__ */ new Map();
|
|
66
67
|
}, W = () => {
|
|
67
68
|
L(), d(() => {
|
|
@@ -81,16 +82,16 @@ function V(t, n) {
|
|
|
81
82
|
const s = t(), m = { showHidden: I() }, F = `${r}\0${m.showHidden}`;
|
|
82
83
|
let P = w.get(F);
|
|
83
84
|
P || (P = Promise.resolve().then(() => s.loadDirectory ? s.loadDirectory(r, m) : j(s.files ?? [], r)), w.set(F, P));
|
|
84
|
-
let
|
|
85
|
+
let k;
|
|
85
86
|
try {
|
|
86
|
-
|
|
87
|
+
k = await P;
|
|
87
88
|
} finally {
|
|
88
89
|
w.get(F) === P && w.delete(F);
|
|
89
90
|
}
|
|
90
91
|
if (!y()) return !1;
|
|
91
|
-
const O = s.loadDirectory || m.showHidden ?
|
|
92
|
+
const O = s.loadDirectory || m.showHidden ? k : k.filter((T) => !T.name.startsWith("."));
|
|
92
93
|
return d(() => {
|
|
93
|
-
|
|
94
|
+
E(r), H(O), C(r), c(!1), f(null);
|
|
94
95
|
}), n?.(r), !0;
|
|
95
96
|
} catch (s) {
|
|
96
97
|
return y() && d(() => {
|
|
@@ -103,7 +104,7 @@ function V(t, n) {
|
|
|
103
104
|
A = i;
|
|
104
105
|
const a = t();
|
|
105
106
|
d(() => {
|
|
106
|
-
R(!0), u(null),
|
|
107
|
+
R(!0), u(null), E(""), H([]), C(i ?? ""), c(!0), f(null), q(a.initialShowHidden ?? !a.loadDirectory);
|
|
107
108
|
});
|
|
108
109
|
try {
|
|
109
110
|
const r = a.loadPathContext ? await a.loadPathContext() : a.pathContext;
|
|
@@ -129,8 +130,8 @@ function V(t, n) {
|
|
|
129
130
|
currentPath: o,
|
|
130
131
|
entries: B,
|
|
131
132
|
pathInput: v,
|
|
132
|
-
pending:
|
|
133
|
-
error:
|
|
133
|
+
pending: N,
|
|
134
|
+
error: $,
|
|
134
135
|
showHidden: I,
|
|
135
136
|
active: h,
|
|
136
137
|
valid: G,
|