@floegence/floe-webapp-core 0.35.6 → 0.35.8
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/file-browser/DirectoryTree.js +78 -68
- package/dist/components/file-browser/FileGridView.js +136 -125
- package/dist/components/file-browser/FileListView.js +145 -133
- package/dist/components/file-browser/touchInteractionGuard.d.ts +5 -0
- package/dist/components/file-browser/touchInteractionGuard.js +8 -0
- package/dist/components/ui/MobileKeyboard.d.ts +22 -0
- package/dist/components/ui/MobileKeyboard.js +287 -0
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/mobileKeyboardModel.d.ts +24 -0
- package/dist/components/ui/mobileKeyboardModel.js +103 -0
- package/dist/floe.css +20 -0
- package/dist/full.d.ts +1 -0
- package/dist/full.js +546 -509
- package/dist/styles.css +1 -1
- package/dist/terminal/editorModel.d.ts +7 -0
- package/dist/terminal/editorModel.js +84 -0
- package/dist/terminal/mockRuntime.d.ts +2 -0
- package/dist/terminal/mockRuntime.js +287 -0
- package/dist/terminal/sessionModel.d.ts +37 -0
- package/dist/terminal/sessionModel.js +143 -0
- package/dist/terminal/suggestionEngine.d.ts +64 -0
- package/dist/terminal/suggestionEngine.js +1020 -0
- package/dist/terminal/types.d.ts +44 -0
- package/dist/terminal/workspaceProfile.d.ts +3 -0
- package/dist/terminal/workspaceProfile.js +30 -0
- package/dist/terminal.d.ts +6 -0
- package/dist/terminal.js +36 -0
- package/dist/ui.css +488 -0
- package/dist/ui.js +44 -42
- package/dist/utils/touchSurfaceGuard.d.ts +9 -0
- package/dist/utils/touchSurfaceGuard.js +16 -0
- package/dist/widgets/TerminalWidget.d.ts +17 -1
- package/dist/widgets/TerminalWidget.js +160 -65
- package/dist/widgets/index.d.ts +1 -1
- package/dist/widgets.js +5 -4
- package/package.json +5 -1
package/dist/ui.js
CHANGED
|
@@ -1,50 +1,51 @@
|
|
|
1
1
|
import { AffixInput as e, Input as t, NumberInput as i, Textarea as a } from "./components/ui/Input.js";
|
|
2
|
-
import { AnimatedBorderCard as p, Card as n, CardContent as x, CardDescription as f, CardFooter as c, CardHeader as d, CardTitle as
|
|
2
|
+
import { AnimatedBorderCard as p, Card as n, CardContent as x, CardDescription as f, CardFooter as c, CardHeader as d, CardTitle as l, Interactive3DCard as C, MorphCard as s, NeonCard as g } from "./components/ui/Card.js";
|
|
3
3
|
import { AreaChart as u, DataBarChart as k, DataPieChart as h, LineChart as B, MonitoringChart as D } from "./components/ui/Charts.js";
|
|
4
|
-
import { Button as
|
|
4
|
+
import { Button as b } from "./components/ui/Button.js";
|
|
5
5
|
import { Checkbox as I, CheckboxGroup as T, CheckboxList as L } from "./components/ui/Checkbox.js";
|
|
6
|
-
import { CircularProgress as A, LinearProgress as
|
|
7
|
-
import { CommandPalette as
|
|
6
|
+
import { CircularProgress as A, LinearProgress as M, SegmentedProgress as R, StepsProgress as W } from "./components/ui/Progress.js";
|
|
7
|
+
import { CommandPalette as y } from "./components/ui/CommandPalette.js";
|
|
8
8
|
import { ConfirmDialog as z, Dialog as G } from "./components/ui/Dialog.js";
|
|
9
9
|
import { DirectoryInput as E } from "./components/ui/DirectoryInput.js";
|
|
10
|
-
import { DirectoryPicker as
|
|
11
|
-
import { Dropdown as
|
|
10
|
+
import { DirectoryPicker as O } from "./components/ui/DirectoryPicker.js";
|
|
11
|
+
import { Dropdown as j, Select as q } from "./components/ui/Dropdown.js";
|
|
12
12
|
import { ErrorBlock as U, HighlightBlock as V, InfoBlock as X, NoteBlock as Y, SuccessBlock as Z, TipBlock as _, WarningBlock as $ } from "./components/ui/HighlightBlock.js";
|
|
13
13
|
import { FileSavePicker as or } from "./components/ui/FileSavePicker.js";
|
|
14
14
|
import { FloatingWindow as tr } from "./components/ui/FloatingWindow.js";
|
|
15
|
-
import { Form as ar, FormActions as mr, FormControl as pr, FormDescription as nr, FormDivider as xr, FormField as fr, FormLabel as cr, FormMessage as dr, FormRow as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
15
|
+
import { Form as ar, FormActions as mr, FormControl as pr, FormDescription as nr, FormDivider as xr, FormField as fr, FormLabel as cr, FormMessage as dr, FormRow as lr, FormSection as Cr, useFormSubmitting as sr } from "./components/ui/Form.js";
|
|
16
|
+
import { MobileKeyboard as Fr } from "./components/ui/MobileKeyboard.js";
|
|
17
|
+
import { Pagination as kr } from "./components/ui/Pagination.js";
|
|
18
|
+
import { ProcessingIndicator as Br } from "./components/ui/ProcessingIndicator.js";
|
|
19
|
+
import { QuoteBlock as Pr } from "./components/ui/QuoteBlock.js";
|
|
20
|
+
import { RadioGroup as Sr, RadioList as Ir, RadioOption as Tr } from "./components/ui/Radio.js";
|
|
21
|
+
import { SegmentedControl as wr } from "./components/ui/SegmentedControl.js";
|
|
22
|
+
import { Stepper as Mr, Wizard as Rr, useWizard as Wr } from "./components/ui/Stepper.js";
|
|
23
|
+
import { Switch as yr } from "./components/ui/Switch.js";
|
|
24
|
+
import { TabPanel as zr, Tabs as Gr } from "./components/ui/Tabs.js";
|
|
25
|
+
import { Tooltip as Er } from "./components/ui/Tooltip.js";
|
|
25
26
|
export {
|
|
26
27
|
e as AffixInput,
|
|
27
28
|
p as AnimatedBorderCard,
|
|
28
29
|
u as AreaChart,
|
|
29
|
-
|
|
30
|
+
b as Button,
|
|
30
31
|
n as Card,
|
|
31
32
|
x as CardContent,
|
|
32
33
|
f as CardDescription,
|
|
33
34
|
c as CardFooter,
|
|
34
35
|
d as CardHeader,
|
|
35
|
-
|
|
36
|
+
l as CardTitle,
|
|
36
37
|
I as Checkbox,
|
|
37
38
|
T as CheckboxGroup,
|
|
38
39
|
L as CheckboxList,
|
|
39
40
|
A as CircularProgress,
|
|
40
|
-
|
|
41
|
+
y as CommandPalette,
|
|
41
42
|
z as ConfirmDialog,
|
|
42
43
|
k as DataBarChart,
|
|
43
44
|
h as DataPieChart,
|
|
44
45
|
G as Dialog,
|
|
45
46
|
E as DirectoryInput,
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
O as DirectoryPicker,
|
|
48
|
+
j as Dropdown,
|
|
48
49
|
U as ErrorBlock,
|
|
49
50
|
or as FileSavePicker,
|
|
50
51
|
tr as FloatingWindow,
|
|
@@ -56,39 +57,40 @@ export {
|
|
|
56
57
|
fr as FormField,
|
|
57
58
|
cr as FormLabel,
|
|
58
59
|
dr as FormMessage,
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
lr as FormRow,
|
|
61
|
+
Cr as FormSection,
|
|
61
62
|
V as HighlightBlock,
|
|
62
63
|
X as InfoBlock,
|
|
63
64
|
t as Input,
|
|
64
|
-
|
|
65
|
+
C as Interactive3DCard,
|
|
65
66
|
B as LineChart,
|
|
66
|
-
|
|
67
|
+
M as LinearProgress,
|
|
68
|
+
Fr as MobileKeyboard,
|
|
67
69
|
D as MonitoringChart,
|
|
68
70
|
s as MorphCard,
|
|
69
71
|
g as NeonCard,
|
|
70
72
|
Y as NoteBlock,
|
|
71
73
|
i as NumberInput,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
kr as Pagination,
|
|
75
|
+
Br as ProcessingIndicator,
|
|
76
|
+
Pr as QuoteBlock,
|
|
77
|
+
Sr as RadioGroup,
|
|
78
|
+
Ir as RadioList,
|
|
79
|
+
Tr as RadioOption,
|
|
80
|
+
wr as SegmentedControl,
|
|
81
|
+
R as SegmentedProgress,
|
|
82
|
+
q as Select,
|
|
83
|
+
Mr as Stepper,
|
|
84
|
+
W as StepsProgress,
|
|
83
85
|
Z as SuccessBlock,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
yr as Switch,
|
|
87
|
+
zr as TabPanel,
|
|
88
|
+
Gr as Tabs,
|
|
87
89
|
a as Textarea,
|
|
88
90
|
_ as TipBlock,
|
|
89
|
-
|
|
91
|
+
Er as Tooltip,
|
|
90
92
|
$ as WarningBlock,
|
|
91
|
-
|
|
93
|
+
Rr as Wizard,
|
|
92
94
|
sr as useFormSubmitting,
|
|
93
|
-
|
|
95
|
+
Wr as useWizard
|
|
94
96
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const FLOE_TOUCH_SURFACE_ATTR = "data-floe-touch-surface";
|
|
2
|
+
export declare const FLOE_TOUCH_SURFACE_VALUE = "true";
|
|
3
|
+
export declare const preventTouchSurfaceNativeInteraction: (event: Event) => void;
|
|
4
|
+
export declare const preventTouchSurfacePointerDown: (event: PointerEvent) => void;
|
|
5
|
+
export declare const floeTouchSurfaceAttrs: {
|
|
6
|
+
readonly "data-floe-touch-surface": "true";
|
|
7
|
+
readonly onContextMenu: (event: Event) => void;
|
|
8
|
+
readonly onSelectStart: (event: Event) => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const o = "data-floe-touch-surface", n = "true", e = (t) => {
|
|
2
|
+
t.preventDefault();
|
|
3
|
+
}, c = (t) => {
|
|
4
|
+
t.preventDefault();
|
|
5
|
+
}, r = {
|
|
6
|
+
[o]: n,
|
|
7
|
+
onContextMenu: e,
|
|
8
|
+
onSelectStart: e
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
o as FLOE_TOUCH_SURFACE_ATTR,
|
|
12
|
+
n as FLOE_TOUCH_SURFACE_VALUE,
|
|
13
|
+
r as floeTouchSurfaceAttrs,
|
|
14
|
+
e as preventTouchSurfaceNativeInteraction,
|
|
15
|
+
c as preventTouchSurfacePointerDown
|
|
16
|
+
};
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
import { type Component } from 'solid-js';
|
|
1
2
|
import type { WidgetProps } from '../context/WidgetRegistry';
|
|
3
|
+
import { type TerminalRuntimeAdapter, type TerminalSuggestionProvider, type TerminalWorkspaceProfile } from '../terminal';
|
|
4
|
+
export interface TerminalWidgetLine {
|
|
5
|
+
id: number;
|
|
6
|
+
type: 'input' | 'output' | 'error';
|
|
7
|
+
content: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TerminalWidgetProps extends WidgetProps {
|
|
10
|
+
profile?: Partial<TerminalWorkspaceProfile>;
|
|
11
|
+
runtime?: TerminalRuntimeAdapter;
|
|
12
|
+
resolveNow?: () => string;
|
|
13
|
+
suggestionProviders?: readonly TerminalSuggestionProvider[];
|
|
14
|
+
quickInserts?: readonly string[];
|
|
15
|
+
}
|
|
16
|
+
export type CreateTerminalWidgetOptions = Omit<TerminalWidgetProps, 'widgetId' | 'config' | 'isEditMode'>;
|
|
17
|
+
export declare function createTerminalWidget(options?: CreateTerminalWidgetOptions): Component<WidgetProps>;
|
|
2
18
|
/**
|
|
3
19
|
* Terminal widget
|
|
4
20
|
*/
|
|
5
|
-
export declare function TerminalWidget(props:
|
|
21
|
+
export declare function TerminalWidget(props: TerminalWidgetProps): import("solid-js").JSX.Element;
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { insert as i, createComponent as d, memo as L, effect as y, className as W, spread as U, mergeProps as H, setStyleProperty as X, template as v, use as F, delegateEvents as Y } from "solid-js/web";
|
|
2
|
+
import { createSignal as C, createMemo as P, createEffect as N, Show as M, For as Z } from "solid-js";
|
|
3
|
+
import { useResolvedFloeConfig as ee } from "../context/FloeConfigContext.js";
|
|
4
|
+
import { MobileKeyboard as te } from "../components/ui/MobileKeyboard.js";
|
|
5
|
+
import { useMediaQuery as re } from "../hooks/useMediaQuery.js";
|
|
6
|
+
import { cn as q } from "../utils/cn.js";
|
|
7
|
+
import { floeTouchSurfaceAttrs as ne, preventTouchSurfacePointerDown as oe } from "../utils/touchSurfaceGuard.js";
|
|
8
|
+
import { normalizeTerminalWorkspaceProfile as ie } from "../terminal/workspaceProfile.js";
|
|
9
|
+
import { createTerminalSessionState as le, getTerminalPromptPreview as se, getTerminalSessionSuggestions as ae, applyTerminalSessionSuggestion as ue, setTerminalSessionInputValue as de, dispatchTerminalSessionKey as ce, submitTerminalSession as me } from "../terminal/sessionModel.js";
|
|
10
|
+
import { runTerminalMockCommand as pe } from "../terminal/mockRuntime.js";
|
|
11
|
+
var fe = /* @__PURE__ */ v('<button type=button class="rounded-full px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.16em] transition-colors"style="background:color-mix(in srgb, var(--terminal-foreground) 8%, transparent);color:color-mix(in srgb, var(--terminal-foreground) 82%, transparent)">'), ge = /* @__PURE__ */ v('<form class=flex-1><input type=text class="w-full bg-transparent text-terminal-foreground outline-none">'), be = /* @__PURE__ */ v('<div><div class="flex h-full min-h-0 flex-col"><div class="flex items-center justify-between border-b px-3 py-2 text-[11px]"style="border-color:color-mix(in srgb, var(--terminal-foreground) 10%, transparent);color:color-mix(in srgb, var(--terminal-foreground) 72%, transparent)"><div class="flex items-center gap-2"><div class="flex items-center gap-1.5"><span class="h-2 w-2 rounded-full bg-rose-400/80"></span><span class="h-2 w-2 rounded-full bg-amber-300/80"></span><span class="h-2 w-2 rounded-full bg-emerald-400/80"></span></div><span>Terminal Session</span></div></div><div class="flex-1 overflow-y-auto px-3 py-3 transition-[padding] duration-200"><div class="mt-2 rounded-xl px-3 py-2"style="background:color-mix(in srgb, var(--terminal-foreground) 5%, transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--terminal-foreground) 8%, transparent)"><div class="flex items-start gap-2"><span class="pt-0.5 text-emerald-300">$'), ve = /* @__PURE__ */ v("<div>"), xe = /* @__PURE__ */ v('<button><span class="whitespace-pre-wrap break-all text-terminal-foreground"><span class="mx-[1px] inline-block min-w-[0.65ch] rounded-[2px] bg-terminal-foreground text-terminal-background">');
|
|
12
|
+
function Ee(n = {}) {
|
|
13
|
+
return (h) => d(ye, H(h, n));
|
|
14
|
+
}
|
|
15
|
+
function ye(n) {
|
|
16
|
+
const h = ee(), a = re(h.config.layout.mobileQuery), [E, $] = C([{
|
|
7
17
|
id: 1,
|
|
8
18
|
type: "output",
|
|
9
19
|
content: "Welcome to Floe Terminal"
|
|
@@ -11,77 +21,162 @@ function F(p) {
|
|
|
11
21
|
id: 2,
|
|
12
22
|
type: "output",
|
|
13
23
|
content: 'Type "help" for available commands'
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
}]), [c, w] = C(le()), [x, m] = C(!1);
|
|
25
|
+
let S, p, f = 3;
|
|
26
|
+
const I = () => c().editor.value, T = P(() => ie(n.profile)), Q = () => n.runtime ?? pe, _ = P(() => se(c().editor)), K = P(() => ae(c(), {
|
|
27
|
+
profile: T(),
|
|
28
|
+
providers: n.suggestionProviders
|
|
29
|
+
})), j = (e) => {
|
|
30
|
+
w((l) => de(l, e));
|
|
31
|
+
}, z = (e) => {
|
|
32
|
+
e.preventDefault(), J();
|
|
33
|
+
}, A = () => {
|
|
34
|
+
if (!n.isEditMode) {
|
|
35
|
+
if (a()) {
|
|
36
|
+
m(!0);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
S?.focus();
|
|
40
|
+
}
|
|
41
|
+
}, k = (e) => {
|
|
42
|
+
e.length && $((l) => [...l, ...e]);
|
|
43
|
+
}, B = (e, l) => {
|
|
44
|
+
const g = {
|
|
45
|
+
id: f++,
|
|
26
46
|
type: "input",
|
|
27
47
|
content: `$ ${e}`
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
else if (e === "clear") {
|
|
36
|
-
d([{
|
|
37
|
-
id: i++,
|
|
38
|
-
type: "input",
|
|
39
|
-
content: "$ "
|
|
40
|
-
}]), s("");
|
|
48
|
+
}, s = l.lines.map((b) => ({
|
|
49
|
+
id: f++,
|
|
50
|
+
type: b.type,
|
|
51
|
+
content: b.content
|
|
52
|
+
}));
|
|
53
|
+
if (l.clear) {
|
|
54
|
+
$([]);
|
|
41
55
|
return;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
}
|
|
57
|
+
k([g, ...s]);
|
|
58
|
+
}, G = (e) => {
|
|
59
|
+
if (e.type !== "none") {
|
|
60
|
+
if (e.type === "submit") {
|
|
61
|
+
B(e.command, Q()(e.command, {
|
|
62
|
+
profile: T(),
|
|
63
|
+
resolveNow: n.resolveNow
|
|
64
|
+
}));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (e.type === "interrupt") {
|
|
68
|
+
e.command ? k([{
|
|
69
|
+
id: f++,
|
|
70
|
+
type: "input",
|
|
71
|
+
content: `$ ${e.command}`
|
|
72
|
+
}, {
|
|
73
|
+
id: f++,
|
|
74
|
+
type: "error",
|
|
75
|
+
content: "^C"
|
|
76
|
+
}]) : k([{
|
|
77
|
+
id: f++,
|
|
78
|
+
type: "error",
|
|
79
|
+
content: "^C"
|
|
80
|
+
}]);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
$([]);
|
|
84
|
+
}
|
|
85
|
+
}, R = (e) => {
|
|
86
|
+
w(e.state), G(e.effect);
|
|
87
|
+
}, J = () => {
|
|
88
|
+
R(me(c()));
|
|
89
|
+
}, O = (e) => {
|
|
90
|
+
!e || n.isEditMode || R(ce(c(), e, {
|
|
91
|
+
profile: T(),
|
|
92
|
+
providers: n.suggestionProviders
|
|
93
|
+
}));
|
|
62
94
|
};
|
|
63
|
-
return (() => {
|
|
64
|
-
|
|
65
|
-
|
|
95
|
+
return N(() => {
|
|
96
|
+
E(), I(), x(), p && (p.scrollTop = p.scrollHeight);
|
|
97
|
+
}), N(() => {
|
|
98
|
+
(!a() || n.isEditMode) && m(!1);
|
|
99
|
+
}), (() => {
|
|
100
|
+
var e = be(), l = e.firstChild, g = l.firstChild;
|
|
101
|
+
g.firstChild;
|
|
102
|
+
var s = g.nextSibling, b = s.firstChild, V = b.firstChild;
|
|
103
|
+
V.firstChild, e.$$click = A, i(g, d(M, {
|
|
104
|
+
get when() {
|
|
105
|
+
return L(() => !!a())() && !n.isEditMode;
|
|
106
|
+
},
|
|
107
|
+
get children() {
|
|
108
|
+
var t = fe();
|
|
109
|
+
return t.$$click = (r) => {
|
|
110
|
+
r.stopPropagation(), m((o) => !o);
|
|
111
|
+
}, i(t, () => x() ? "Hide Keys" : "Show Keys"), t;
|
|
112
|
+
}
|
|
113
|
+
}), null);
|
|
114
|
+
var D = p;
|
|
115
|
+
return typeof D == "function" ? F(D, s) : p = s, i(s, d(Z, {
|
|
66
116
|
get each() {
|
|
67
|
-
return
|
|
117
|
+
return E();
|
|
68
118
|
},
|
|
69
119
|
children: (t) => (() => {
|
|
70
|
-
var
|
|
71
|
-
return
|
|
120
|
+
var r = ve();
|
|
121
|
+
return i(r, () => t.content), y(() => W(r, q("whitespace-pre-wrap break-all leading-6", t.type === "error" && "text-rose-300", t.type === "input" && "text-emerald-300"))), r;
|
|
72
122
|
})()
|
|
73
|
-
}),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
123
|
+
}), b), i(V, d(M, {
|
|
124
|
+
get when() {
|
|
125
|
+
return !a();
|
|
126
|
+
},
|
|
127
|
+
get fallback() {
|
|
128
|
+
return (() => {
|
|
129
|
+
var t = xe(), r = t.firstChild, o = r.firstChild;
|
|
130
|
+
return U(t, H(ne, {
|
|
131
|
+
type: "button",
|
|
132
|
+
class: "min-h-[1.5rem] flex-1 bg-transparent text-left outline-none",
|
|
133
|
+
"aria-label": "Terminal input surface",
|
|
134
|
+
onPointerDown: (u) => {
|
|
135
|
+
oe(u), u.stopPropagation();
|
|
136
|
+
},
|
|
137
|
+
onClick: (u) => {
|
|
138
|
+
u.stopPropagation(), m(!0);
|
|
139
|
+
}
|
|
140
|
+
}), !1, !0), i(r, () => _().before, o), i(o, () => _().cursor), i(r, () => _().after, null), t;
|
|
141
|
+
})();
|
|
142
|
+
},
|
|
143
|
+
get children() {
|
|
144
|
+
var t = ge(), r = t.firstChild;
|
|
145
|
+
t.addEventListener("submit", z), r.$$input = (u) => j(u.currentTarget.value);
|
|
146
|
+
var o = S;
|
|
147
|
+
return typeof o == "function" ? F(o, r) : S = r, y(() => r.disabled = n.isEditMode), y(() => r.value = I()), t;
|
|
148
|
+
}
|
|
149
|
+
}), null), i(e, d(M, {
|
|
150
|
+
get when() {
|
|
151
|
+
return L(() => !!a())() && !n.isEditMode;
|
|
152
|
+
},
|
|
153
|
+
get children() {
|
|
154
|
+
return d(te, {
|
|
155
|
+
get visible() {
|
|
156
|
+
return x();
|
|
157
|
+
},
|
|
158
|
+
get quickInserts() {
|
|
159
|
+
return n.quickInserts;
|
|
160
|
+
},
|
|
161
|
+
get suggestions() {
|
|
162
|
+
return K();
|
|
163
|
+
},
|
|
164
|
+
onKey: O,
|
|
165
|
+
onDismiss: () => m(!1),
|
|
166
|
+
onSuggestionSelect: (t) => w((r) => ue(r, t))
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}), null), y((t) => {
|
|
170
|
+
var r = q("relative h-full overflow-hidden rounded-[inherit] bg-terminal-background text-terminal-foreground font-mono text-xs", n.isEditMode && "pointer-events-none"), o = a() && x() ? `calc(${K().length > 0 ? "16.5rem" : "15rem"} + env(safe-area-inset-bottom))` : void 0;
|
|
171
|
+
return r !== t.e && W(e, t.e = r), o !== t.t && X(s, "padding-bottom", t.t = o), t;
|
|
78
172
|
}, {
|
|
79
173
|
e: void 0,
|
|
80
174
|
t: void 0
|
|
81
|
-
}),
|
|
175
|
+
}), e;
|
|
82
176
|
})();
|
|
83
177
|
}
|
|
84
|
-
|
|
178
|
+
Y(["click", "input"]);
|
|
85
179
|
export {
|
|
86
|
-
|
|
180
|
+
ye as TerminalWidget,
|
|
181
|
+
Ee as createTerminalWidget
|
|
87
182
|
};
|
package/dist/widgets/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { SidebarWidget, FilesSidebarWidget, SearchSidebarWidget, SettingsSidebarWidget, ShowcaseSidebarWidget, } from './SidebarWidget';
|
|
2
2
|
export { MetricsWidget } from './MetricsWidget';
|
|
3
|
-
export { TerminalWidget } from './TerminalWidget';
|
|
3
|
+
export { TerminalWidget, createTerminalWidget, type TerminalWidgetLine, type TerminalWidgetProps, type CreateTerminalWidgetOptions, } from './TerminalWidget';
|
package/dist/widgets.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { FilesSidebarWidget as r, SearchSidebarWidget as t, SettingsSidebarWidget as d, ShowcaseSidebarWidget as a, SidebarWidget as g } from "./widgets/SidebarWidget.js";
|
|
2
|
-
import { MetricsWidget as
|
|
3
|
-
import { TerminalWidget as b } from "./widgets/TerminalWidget.js";
|
|
2
|
+
import { MetricsWidget as W } from "./widgets/MetricsWidget.js";
|
|
3
|
+
import { TerminalWidget as b, createTerminalWidget as m } from "./widgets/TerminalWidget.js";
|
|
4
4
|
export {
|
|
5
5
|
r as FilesSidebarWidget,
|
|
6
|
-
|
|
6
|
+
W as MetricsWidget,
|
|
7
7
|
t as SearchSidebarWidget,
|
|
8
8
|
d as SettingsSidebarWidget,
|
|
9
9
|
a as ShowcaseSidebarWidget,
|
|
10
10
|
g as SidebarWidget,
|
|
11
|
-
b as TerminalWidget
|
|
11
|
+
b as TerminalWidget,
|
|
12
|
+
m as createTerminalWidget
|
|
12
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floegence/floe-webapp-core",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -60,6 +60,10 @@
|
|
|
60
60
|
"types": "./dist/widgets.d.ts",
|
|
61
61
|
"import": "./dist/widgets.js"
|
|
62
62
|
},
|
|
63
|
+
"./terminal": {
|
|
64
|
+
"types": "./dist/terminal.d.ts",
|
|
65
|
+
"import": "./dist/terminal.js"
|
|
66
|
+
},
|
|
63
67
|
"./styles": "./dist/styles.css",
|
|
64
68
|
"./tailwind": "./dist/tailwind.css"
|
|
65
69
|
},
|