@omg-dev/react 0.1.308
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/LICENSE +21 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +241 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +681 -0
- package/package.json +40 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Benny Kok
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type OmgClient } from "@omg-dev/client";
|
|
3
|
+
export interface OmgProviderProps {
|
|
4
|
+
client: OmgClient;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function OmgProvider({ client, children }: OmgProviderProps): import("react").JSX.Element;
|
|
8
|
+
export declare function useOmgClient(): OmgClient;
|
|
9
|
+
export interface OmgComputerSurfaceProps {
|
|
10
|
+
className?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
selectedSessionId?: string | null;
|
|
13
|
+
onSelectedSessionChange?: (sessionId: string) => void;
|
|
14
|
+
onNewSession?: () => void;
|
|
15
|
+
onOpenFullComputer?: () => void;
|
|
16
|
+
pollIntervalMs?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function OmgComputerSurface({ className, title, selectedSessionId: controlledSessionId, onSelectedSessionChange, onNewSession, onOpenFullComputer, pollIntervalMs, }: OmgComputerSurfaceProps): import("react").JSX.Element;
|
|
19
|
+
export declare function createOmgComputerSurface(client: OmgClient, props?: OmgComputerSurfaceProps): import("react").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,iBAAiB,CAAC;AAIzB,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,gBAAgB,+BAMjE;AAED,wBAAgB,YAAY,IAAI,SAAS,CAIxC;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,uBAAuB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAwJD,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,KAAkB,EAClB,iBAAiB,EAAE,mBAAmB,EACtC,uBAAuB,EACvB,YAAY,EACZ,kBAAkB,EAClB,cAAsB,GACvB,EAAE,uBAAuB,+BAuVzB;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,SAAS,EACjB,KAAK,GAAE,uBAA4B,+BAOpC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useCallback, useContext, useEffect, useRef, useState, } from "react";
|
|
3
|
+
const ClientContext = createContext(null);
|
|
4
|
+
export function OmgProvider({ client, children }) {
|
|
5
|
+
return (_jsx(ClientContext.Provider, { value: client, children: children }));
|
|
6
|
+
}
|
|
7
|
+
export function useOmgClient() {
|
|
8
|
+
const client = useContext(ClientContext);
|
|
9
|
+
if (!client)
|
|
10
|
+
throw new Error("useOmgClient must be used inside OmgProvider");
|
|
11
|
+
return client;
|
|
12
|
+
}
|
|
13
|
+
function sessionTitle(session) {
|
|
14
|
+
return (session.title?.trim() ||
|
|
15
|
+
session.lastUserText?.trim() ||
|
|
16
|
+
session.project?.trim() ||
|
|
17
|
+
"Untitled session");
|
|
18
|
+
}
|
|
19
|
+
function sessionSubtitle(session) {
|
|
20
|
+
const agent = session.agentLabel || session.agent || "Agent";
|
|
21
|
+
return session.project ? `${agent} · ${session.project}` : agent;
|
|
22
|
+
}
|
|
23
|
+
function sortSessions(sessions) {
|
|
24
|
+
return [...sessions]
|
|
25
|
+
.filter((session) => !!session.sessionId)
|
|
26
|
+
.sort((a, b) => (b.lastActivityAt ?? b.startedAt ?? 0) -
|
|
27
|
+
(a.lastActivityAt ?? a.startedAt ?? 0));
|
|
28
|
+
}
|
|
29
|
+
function messageKey(message, index) {
|
|
30
|
+
return (message.id ||
|
|
31
|
+
`${message.role ?? "unknown"}:${message.kind ?? "unknown"}:${message.ts ?? index}:${index}`);
|
|
32
|
+
}
|
|
33
|
+
function mergeMessage(messages, incoming) {
|
|
34
|
+
const withoutMatchingOptimistic = incoming.role === "user" && incoming.text
|
|
35
|
+
? messages.filter((message) => !(message.pending &&
|
|
36
|
+
message.role === "user" &&
|
|
37
|
+
message.text?.trim() === incoming.text?.trim()))
|
|
38
|
+
: messages;
|
|
39
|
+
if (!incoming.id)
|
|
40
|
+
return [...withoutMatchingOptimistic, incoming].slice(-100);
|
|
41
|
+
const index = withoutMatchingOptimistic.findIndex((message) => message.id === incoming.id);
|
|
42
|
+
if (index < 0)
|
|
43
|
+
return [...withoutMatchingOptimistic, incoming].slice(-100);
|
|
44
|
+
const next = [...withoutMatchingOptimistic];
|
|
45
|
+
next[index] = { ...next[index], ...incoming };
|
|
46
|
+
return next;
|
|
47
|
+
}
|
|
48
|
+
function applyTranscriptEvent(messages, event) {
|
|
49
|
+
if (event.type === "snapshot") {
|
|
50
|
+
const optimistic = messages.filter((message) => message.pending);
|
|
51
|
+
return [...event.messages, ...optimistic].slice(-100);
|
|
52
|
+
}
|
|
53
|
+
if (event.type === "message")
|
|
54
|
+
return mergeMessage(messages, event.message);
|
|
55
|
+
if (event.type !== "ai_part")
|
|
56
|
+
return messages;
|
|
57
|
+
const part = event.part;
|
|
58
|
+
if (part.type !== "text-delta" || !part.id)
|
|
59
|
+
return messages;
|
|
60
|
+
const existing = messages.find((message) => message.id === part.id);
|
|
61
|
+
const text = part.reset
|
|
62
|
+
? part.text ?? part.delta ?? ""
|
|
63
|
+
: `${existing?.text ?? ""}${part.delta ?? ""}`;
|
|
64
|
+
if (!text)
|
|
65
|
+
return messages;
|
|
66
|
+
return mergeMessage(messages, {
|
|
67
|
+
id: part.id,
|
|
68
|
+
role: "assistant",
|
|
69
|
+
kind: "text",
|
|
70
|
+
text,
|
|
71
|
+
ts: part.ts ?? Date.now(),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function ComputerSkeleton() {
|
|
75
|
+
return (_jsxs("div", { className: "lfgc-skeleton", "aria-label": "Loading Computer", children: [_jsx("div", { className: "lfgc-skeleton-sidebar", children: [0, 1, 2, 3].map((item) => (_jsxs("div", { className: "lfgc-skeleton-row", children: [_jsx("span", { className: "lfgc-skeleton-dot" }), _jsxs("span", { className: "lfgc-skeleton-lines", children: [_jsx("span", {}), _jsx("span", {})] })] }, item))) }), _jsxs("div", { className: "lfgc-skeleton-thread", children: [_jsx("span", { className: "lfgc-skeleton-bubble lfgc-skeleton-bubble-user" }), _jsx("span", { className: "lfgc-skeleton-bubble" }), _jsx("span", { className: "lfgc-skeleton-bubble lfgc-skeleton-bubble-short" })] })] }));
|
|
76
|
+
}
|
|
77
|
+
function StatusDot({ busy, connection, }) {
|
|
78
|
+
const state = busy
|
|
79
|
+
? "working"
|
|
80
|
+
: connection.status === "live"
|
|
81
|
+
? "online"
|
|
82
|
+
: connection.status;
|
|
83
|
+
return (_jsx("span", { className: `lfgc-status-dot lfgc-status-dot-${state}`, "aria-label": state, title: state }));
|
|
84
|
+
}
|
|
85
|
+
function EmptyComputer({ onNewSession, onOpenFullComputer, }) {
|
|
86
|
+
return (_jsxs("div", { className: "lfgc-empty", children: [_jsx("div", { className: "lfgc-empty-orb", "aria-hidden": "true", children: _jsx("span", {}) }), _jsx("h2", { children: "Your Computer is ready" }), _jsx("p", { children: "Start a session and keep working here while LFG runs on your machine." }), _jsxs("div", { className: "lfgc-empty-actions", children: [onNewSession ? (_jsx("button", { className: "lfgc-button lfgc-button-primary", onClick: onNewSession, children: "New session" })) : null, onOpenFullComputer ? (_jsx("button", { className: "lfgc-button", onClick: onOpenFullComputer, children: "Open tools" })) : null] })] }));
|
|
87
|
+
}
|
|
88
|
+
export function OmgComputerSurface({ className, title = "Computer", selectedSessionId: controlledSessionId, onSelectedSessionChange, onNewSession, onOpenFullComputer, pollIntervalMs = 5_000, }) {
|
|
89
|
+
const client = useOmgClient();
|
|
90
|
+
const cached = client.peekSessions();
|
|
91
|
+
const [sessions, setSessions] = useState(cached ? sortSessions(cached) : null);
|
|
92
|
+
const [internalSessionId, setInternalSessionId] = useState(controlledSessionId ?? null);
|
|
93
|
+
const [messages, setMessages] = useState([]);
|
|
94
|
+
const [messagesLoading, setMessagesLoading] = useState(false);
|
|
95
|
+
const [busy, setBusy] = useState(false);
|
|
96
|
+
const [composer, setComposer] = useState("");
|
|
97
|
+
const [sending, setSending] = useState(false);
|
|
98
|
+
const [error, setError] = useState(null);
|
|
99
|
+
const [connection, setConnection] = useState(client.live.state);
|
|
100
|
+
const threadEndRef = useRef(null);
|
|
101
|
+
const selectedSessionId = controlledSessionId ?? internalSessionId;
|
|
102
|
+
const selectedSession = sessions?.find((session) => session.sessionId === selectedSessionId) ?? null;
|
|
103
|
+
const selectSession = useCallback((sessionId) => {
|
|
104
|
+
if (controlledSessionId === undefined)
|
|
105
|
+
setInternalSessionId(sessionId);
|
|
106
|
+
onSelectedSessionChange?.(sessionId);
|
|
107
|
+
}, [controlledSessionId, onSelectedSessionChange]);
|
|
108
|
+
const refreshSessions = useCallback(async () => {
|
|
109
|
+
try {
|
|
110
|
+
const next = sortSessions(await client.listSessions());
|
|
111
|
+
setSessions(next);
|
|
112
|
+
setError(null);
|
|
113
|
+
const requested = controlledSessionId ?? internalSessionId;
|
|
114
|
+
if (!requested && next[0]?.sessionId)
|
|
115
|
+
selectSession(next[0].sessionId);
|
|
116
|
+
}
|
|
117
|
+
catch (refreshError) {
|
|
118
|
+
setError(refreshError instanceof Error
|
|
119
|
+
? refreshError.message
|
|
120
|
+
: "Couldn’t reach your Computer.");
|
|
121
|
+
setSessions((current) => current ?? []);
|
|
122
|
+
}
|
|
123
|
+
}, [
|
|
124
|
+
client,
|
|
125
|
+
controlledSessionId,
|
|
126
|
+
internalSessionId,
|
|
127
|
+
selectSession,
|
|
128
|
+
]);
|
|
129
|
+
useEffect(() => {
|
|
130
|
+
void refreshSessions();
|
|
131
|
+
const interval = window.setInterval(() => {
|
|
132
|
+
void refreshSessions();
|
|
133
|
+
}, pollIntervalMs);
|
|
134
|
+
return () => window.clearInterval(interval);
|
|
135
|
+
}, [pollIntervalMs, refreshSessions]);
|
|
136
|
+
useEffect(() => client.live.subscribeConnection(setConnection), [client]);
|
|
137
|
+
useEffect(() => {
|
|
138
|
+
if (!selectedSessionId) {
|
|
139
|
+
setMessages([]);
|
|
140
|
+
setBusy(false);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
let active = true;
|
|
144
|
+
setMessagesLoading(true);
|
|
145
|
+
setMessages([]);
|
|
146
|
+
setBusy(!!selectedSession?.busy);
|
|
147
|
+
void client.getMessages(selectedSessionId).then((response) => {
|
|
148
|
+
if (!active)
|
|
149
|
+
return;
|
|
150
|
+
setMessages(Array.isArray(response.messages) ? response.messages : []);
|
|
151
|
+
setMessagesLoading(false);
|
|
152
|
+
}, (loadError) => {
|
|
153
|
+
if (!active)
|
|
154
|
+
return;
|
|
155
|
+
setMessagesLoading(false);
|
|
156
|
+
setError(loadError instanceof Error
|
|
157
|
+
? loadError.message
|
|
158
|
+
: "Couldn’t load this session.");
|
|
159
|
+
});
|
|
160
|
+
const unsubscribe = client.live.subscribeTranscript(selectedSessionId, (event) => {
|
|
161
|
+
if (!active)
|
|
162
|
+
return;
|
|
163
|
+
if (event.type === "busy")
|
|
164
|
+
setBusy(event.busy);
|
|
165
|
+
if (event.type === "error")
|
|
166
|
+
setError(event.error);
|
|
167
|
+
setMessages((current) => applyTranscriptEvent(current, event));
|
|
168
|
+
if (event.type === "snapshot")
|
|
169
|
+
setMessagesLoading(false);
|
|
170
|
+
});
|
|
171
|
+
return () => {
|
|
172
|
+
active = false;
|
|
173
|
+
unsubscribe();
|
|
174
|
+
};
|
|
175
|
+
}, [client, selectedSession?.busy, selectedSessionId]);
|
|
176
|
+
useEffect(() => {
|
|
177
|
+
threadEndRef.current?.scrollIntoView({ block: "end" });
|
|
178
|
+
}, [messages.length, busy]);
|
|
179
|
+
const submit = async (event) => {
|
|
180
|
+
event.preventDefault();
|
|
181
|
+
const text = composer.trim();
|
|
182
|
+
if (!selectedSessionId || !text || sending)
|
|
183
|
+
return;
|
|
184
|
+
setComposer("");
|
|
185
|
+
setSending(true);
|
|
186
|
+
setBusy(true);
|
|
187
|
+
const optimistic = {
|
|
188
|
+
id: `optimistic-${Date.now()}`,
|
|
189
|
+
role: "user",
|
|
190
|
+
kind: "text",
|
|
191
|
+
text,
|
|
192
|
+
ts: Date.now(),
|
|
193
|
+
pending: true,
|
|
194
|
+
};
|
|
195
|
+
setMessages((current) => [...current, optimistic].slice(-100));
|
|
196
|
+
try {
|
|
197
|
+
await client.sendMessage(selectedSessionId, text);
|
|
198
|
+
setError(null);
|
|
199
|
+
}
|
|
200
|
+
catch (sendError) {
|
|
201
|
+
setMessages((current) => current.map((message) => message.id === optimistic.id
|
|
202
|
+
? { ...message, pending: false, title: "Couldn’t send" }
|
|
203
|
+
: message));
|
|
204
|
+
setError(sendError instanceof Error ? sendError.message : "Couldn’t send.");
|
|
205
|
+
}
|
|
206
|
+
finally {
|
|
207
|
+
setSending(false);
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
return (_jsxs("section", { className: `lfgc-root ${className ?? ""}`, "aria-label": title, children: [_jsxs("header", { className: "lfgc-header", children: [_jsxs("div", { className: "lfgc-brand", children: [_jsx("span", { className: "lfgc-brand-mark", "aria-hidden": "true", children: _jsx("span", {}) }), _jsxs("div", { children: [_jsx("h1", { children: title }), _jsx("p", { children: connection.status === "live"
|
|
211
|
+
? "Connected"
|
|
212
|
+
: connection.status === "offline"
|
|
213
|
+
? "Computer offline"
|
|
214
|
+
: "Connecting" })] })] }), _jsxs("div", { className: "lfgc-header-actions", children: [onOpenFullComputer ? (_jsx("button", { className: "lfgc-icon-button", onClick: onOpenFullComputer, "aria-label": "Open Computer tools", title: "Open Computer tools", children: "\u2022\u2022\u2022" })) : null, onNewSession ? (_jsx("button", { className: "lfgc-icon-button lfgc-icon-button-primary", onClick: onNewSession, "aria-label": "New session", title: "New session", children: "+" })) : null] })] }), error ? (_jsxs("div", { className: "lfgc-error", role: "status", children: [_jsx("span", { children: error }), _jsx("button", { onClick: () => void refreshSessions(), children: "Try again" })] })) : null, sessions === null ? (_jsx(ComputerSkeleton, {})) : sessions.length === 0 ? (_jsx(EmptyComputer, { onNewSession: onNewSession, onOpenFullComputer: onOpenFullComputer })) : (_jsxs("div", { className: "lfgc-workspace", children: [_jsxs("nav", { className: "lfgc-sessions", "aria-label": "Sessions", children: [_jsxs("div", { className: "lfgc-sessions-heading", children: [_jsx("span", { children: "Live sessions" }), _jsx("span", { children: sessions.length })] }), _jsx("div", { className: "lfgc-session-list", children: sessions.map((session) => {
|
|
215
|
+
const id = session.sessionId;
|
|
216
|
+
const selected = id === selectedSessionId;
|
|
217
|
+
return (_jsxs("button", { className: `lfgc-session-row ${selected ? "lfgc-session-row-selected" : ""}`, onClick: () => selectSession(id), "aria-current": selected ? "page" : undefined, children: [_jsx(StatusDot, { busy: !!session.busy, connection: connection }), _jsxs("span", { className: "lfgc-session-copy", children: [_jsx("strong", { children: sessionTitle(session) }), _jsx("small", { children: sessionSubtitle(session) })] })] }, id));
|
|
218
|
+
}) })] }), _jsxs("main", { className: "lfgc-thread", children: [_jsxs("div", { className: "lfgc-thread-heading", children: [_jsxs("div", { children: [_jsx("h2", { children: selectedSession
|
|
219
|
+
? sessionTitle(selectedSession)
|
|
220
|
+
: "Select a session" }), _jsx("p", { children: selectedSession
|
|
221
|
+
? sessionSubtitle(selectedSession)
|
|
222
|
+
: "Your work stays live here." })] }), selectedSessionId && busy ? (_jsx("button", { className: "lfgc-stop-button", onClick: () => void client.interrupt(selectedSessionId), children: "Stop" })) : null] }), _jsxs("div", { className: "lfgc-messages", "aria-live": "polite", children: [messagesLoading && messages.length === 0 ? (_jsxs("div", { className: "lfgc-message-skeletons", children: [_jsx("span", { className: "lfgc-skeleton-bubble lfgc-skeleton-bubble-user" }), _jsx("span", { className: "lfgc-skeleton-bubble" })] })) : null, !messagesLoading && messages.length === 0 ? (_jsx("div", { className: "lfgc-thread-empty", children: _jsx("span", { children: "Ready when you are." }) })) : null, messages.map((message, index) => {
|
|
223
|
+
const user = message.role === "user";
|
|
224
|
+
const thinking = message.kind === "thinking";
|
|
225
|
+
return (_jsxs("article", { className: `lfgc-message ${user ? "lfgc-message-user" : ""} ${thinking ? "lfgc-message-thinking" : ""}`, children: [!user ? (_jsx("span", { className: "lfgc-message-avatar", "aria-hidden": "true", children: _jsx("span", {}) })) : null, _jsxs("div", { className: "lfgc-message-body", children: [message.name && message.kind !== "text" ? (_jsx("strong", { className: "lfgc-message-attachment", children: message.name })) : null, _jsx("p", { children: message.text || (thinking ? "Thinking…" : "") }), message.pending ? _jsx("small", { children: "Sending\u2026" }) : null] })] }, messageKey(message, index)));
|
|
226
|
+
}), busy &&
|
|
227
|
+
!messages.some((message) => message.kind === "thinking") ? (_jsxs("div", { className: "lfgc-working", "aria-label": "Agent is working", children: [_jsx("span", {}), _jsx("span", {}), _jsx("span", {})] })) : null, _jsx("div", { ref: threadEndRef })] }), _jsxs("form", { className: "lfgc-composer", onSubmit: submit, children: [_jsx("textarea", { value: composer, onChange: (event) => setComposer(event.target.value), onKeyDown: (event) => {
|
|
228
|
+
if (event.key === "Enter" &&
|
|
229
|
+
!event.shiftKey &&
|
|
230
|
+
!event.nativeEvent.isComposing) {
|
|
231
|
+
event.preventDefault();
|
|
232
|
+
event.currentTarget.form?.requestSubmit();
|
|
233
|
+
}
|
|
234
|
+
}, placeholder: selectedSessionId
|
|
235
|
+
? "Message your agent"
|
|
236
|
+
: "Select a session first", disabled: !selectedSessionId, rows: 1 }), _jsx("button", { type: "submit", disabled: !selectedSessionId || !composer.trim() || sending, "aria-label": "Send message", children: "\u2191" })] })] })] }))] }));
|
|
237
|
+
}
|
|
238
|
+
export function createOmgComputerSurface(client, props = {}) {
|
|
239
|
+
return (_jsx(OmgProvider, { client: client, children: _jsx(OmgComputerSurface, { ...props }) }));
|
|
240
|
+
}
|
|
241
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EAET,MAAM,EACN,QAAQ,GAGT,MAAM,OAAO,CAAC;AASf,MAAM,aAAa,GAAG,aAAa,CAAmB,IAAI,CAAC,CAAC;AAO5D,MAAM,UAAU,WAAW,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAoB;IAChE,OAAO,CACL,KAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,YAClC,QAAQ,GACc,CAC1B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,MAAM,MAAM,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IACzC,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAC7E,OAAO,MAAM,CAAC;AAChB,CAAC;AAYD,SAAS,YAAY,CAAC,OAAmB;IACvC,OAAO,CACL,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE;QACrB,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE;QAC5B,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE;QACvB,kBAAkB,CACnB,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,OAAmB;IAC1C,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC;IAC7D,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,MA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AC,GAAG,KAAK,OAAO;gDACrB,CAAC,KAAK,CAAC,QAAQ;gDACf,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAC9B,CAAC;gDACD,KAAK,CAAC,cAAc,EAAE,CAAC;gDACvB,KAAK,CAAC,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,CAAC;4CAC5C,CAAC;wCACH,CAAC,EACD,WAAW,EACT,iBAAiB;4CACf,CAAC,CAAC,oBAAoB;4CACtB,CAAC,CAAC,wBAAwB,EAE9B,QAAQ,EAAE,CAAC,iBAAiB,EAC5B,IAAI,EAAE,CAAC,GACP,EACF,iBACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,iBAAiB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,OAAO,gBAChD,cAAc,uBAGlB,IACJ,IACF,IACH,CACP,IACO,CACX,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,MAAiB,EACjB,KAAK,GAA4B,EAAE;IAEnC,OAAO,CACL,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,YACzB,KAAC,kBAAkB,OAAK,KAAK,GAAI,GACrB,CACf,CAAC;AACJ,CAAC"}
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,681 @@
|
|
|
1
|
+
.lfgc-root {
|
|
2
|
+
--lfgc-bg: #f5f5f2;
|
|
3
|
+
--lfgc-panel: rgba(255, 255, 255, 0.82);
|
|
4
|
+
--lfgc-panel-strong: #ffffff;
|
|
5
|
+
--lfgc-text: #181817;
|
|
6
|
+
--lfgc-muted: #75756f;
|
|
7
|
+
--lfgc-line: rgba(24, 24, 23, 0.08);
|
|
8
|
+
--lfgc-accent: #ff5c35;
|
|
9
|
+
--lfgc-accent-soft: rgba(255, 92, 53, 0.11);
|
|
10
|
+
background:
|
|
11
|
+
radial-gradient(circle at 15% -10%, rgba(255, 255, 255, 0.95), transparent 34rem),
|
|
12
|
+
var(--lfgc-bg);
|
|
13
|
+
color: var(--lfgc-text);
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
height: 100%;
|
|
17
|
+
min-height: 0;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
font-family: Geist, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.lfgc-root *,
|
|
23
|
+
.lfgc-root *::before,
|
|
24
|
+
.lfgc-root *::after {
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.lfgc-header {
|
|
29
|
+
align-items: center;
|
|
30
|
+
display: flex;
|
|
31
|
+
flex: 0 0 auto;
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
padding: calc(0.65rem + env(safe-area-inset-top)) 1rem 0.65rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.lfgc-brand,
|
|
37
|
+
.lfgc-header-actions,
|
|
38
|
+
.lfgc-session-row,
|
|
39
|
+
.lfgc-message {
|
|
40
|
+
align-items: center;
|
|
41
|
+
display: flex;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.lfgc-brand {
|
|
45
|
+
gap: 0.7rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.lfgc-brand h1,
|
|
49
|
+
.lfgc-thread-heading h2,
|
|
50
|
+
.lfgc-empty h2 {
|
|
51
|
+
font-size: 0.95rem;
|
|
52
|
+
letter-spacing: -0.02em;
|
|
53
|
+
line-height: 1.1;
|
|
54
|
+
margin: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.lfgc-brand p,
|
|
58
|
+
.lfgc-thread-heading p,
|
|
59
|
+
.lfgc-empty p {
|
|
60
|
+
color: var(--lfgc-muted);
|
|
61
|
+
font-size: 0.72rem;
|
|
62
|
+
margin: 0.2rem 0 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.lfgc-brand-mark,
|
|
66
|
+
.lfgc-message-avatar,
|
|
67
|
+
.lfgc-empty-orb {
|
|
68
|
+
background: linear-gradient(145deg, #ff805e, var(--lfgc-accent));
|
|
69
|
+
box-shadow: 0 8px 20px rgba(255, 92, 53, 0.24), inset 0 1px rgba(255, 255, 255, 0.5);
|
|
70
|
+
display: grid;
|
|
71
|
+
place-items: center;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.lfgc-brand-mark {
|
|
75
|
+
border-radius: 11px;
|
|
76
|
+
height: 2rem;
|
|
77
|
+
width: 2rem;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.lfgc-brand-mark span,
|
|
81
|
+
.lfgc-message-avatar span,
|
|
82
|
+
.lfgc-empty-orb span {
|
|
83
|
+
background: white;
|
|
84
|
+
border-radius: 50%;
|
|
85
|
+
height: 34%;
|
|
86
|
+
opacity: 0.94;
|
|
87
|
+
width: 34%;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.lfgc-header-actions {
|
|
91
|
+
gap: 0.45rem;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.lfgc-icon-button,
|
|
95
|
+
.lfgc-stop-button,
|
|
96
|
+
.lfgc-button,
|
|
97
|
+
.lfgc-error button {
|
|
98
|
+
-webkit-tap-highlight-color: transparent;
|
|
99
|
+
appearance: none;
|
|
100
|
+
background: var(--lfgc-panel);
|
|
101
|
+
border: 1px solid var(--lfgc-line);
|
|
102
|
+
color: inherit;
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
font: inherit;
|
|
105
|
+
transition: transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1), background 160ms ease;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.lfgc-icon-button {
|
|
109
|
+
border-radius: 50%;
|
|
110
|
+
font-size: 1.05rem;
|
|
111
|
+
height: 2.25rem;
|
|
112
|
+
line-height: 1;
|
|
113
|
+
width: 2.25rem;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.lfgc-icon-button-primary {
|
|
117
|
+
background: var(--lfgc-text);
|
|
118
|
+
color: white;
|
|
119
|
+
font-size: 1.35rem;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.lfgc-icon-button:active,
|
|
123
|
+
.lfgc-button:active,
|
|
124
|
+
.lfgc-session-row:active {
|
|
125
|
+
transform: scale(0.96);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.lfgc-error {
|
|
129
|
+
align-items: center;
|
|
130
|
+
background: rgba(255, 92, 53, 0.09);
|
|
131
|
+
border: 1px solid rgba(255, 92, 53, 0.14);
|
|
132
|
+
border-radius: 12px;
|
|
133
|
+
color: #9b351d;
|
|
134
|
+
display: flex;
|
|
135
|
+
font-size: 0.75rem;
|
|
136
|
+
justify-content: space-between;
|
|
137
|
+
margin: 0 1rem 0.65rem;
|
|
138
|
+
padding: 0.55rem 0.7rem;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.lfgc-error button {
|
|
142
|
+
background: transparent;
|
|
143
|
+
border: 0;
|
|
144
|
+
font-weight: 650;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.lfgc-workspace,
|
|
148
|
+
.lfgc-skeleton {
|
|
149
|
+
display: grid;
|
|
150
|
+
flex: 1 1 auto;
|
|
151
|
+
grid-template-columns: minmax(13rem, 21rem) minmax(0, 1fr);
|
|
152
|
+
min-height: 0;
|
|
153
|
+
padding: 0 0.65rem max(0.65rem, env(safe-area-inset-bottom));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.lfgc-sessions,
|
|
157
|
+
.lfgc-thread,
|
|
158
|
+
.lfgc-skeleton-sidebar,
|
|
159
|
+
.lfgc-skeleton-thread {
|
|
160
|
+
background: var(--lfgc-panel);
|
|
161
|
+
border: 1px solid var(--lfgc-line);
|
|
162
|
+
min-height: 0;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.lfgc-sessions,
|
|
166
|
+
.lfgc-skeleton-sidebar {
|
|
167
|
+
border-radius: 22px 0 0 22px;
|
|
168
|
+
border-right: 0;
|
|
169
|
+
overflow: hidden;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.lfgc-thread,
|
|
173
|
+
.lfgc-skeleton-thread {
|
|
174
|
+
border-radius: 0 22px 22px 0;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.lfgc-sessions-heading {
|
|
178
|
+
align-items: center;
|
|
179
|
+
color: var(--lfgc-muted);
|
|
180
|
+
display: flex;
|
|
181
|
+
font-size: 0.68rem;
|
|
182
|
+
font-weight: 650;
|
|
183
|
+
justify-content: space-between;
|
|
184
|
+
letter-spacing: 0.02em;
|
|
185
|
+
padding: 0.9rem 0.9rem 0.55rem;
|
|
186
|
+
text-transform: uppercase;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.lfgc-session-list {
|
|
190
|
+
display: flex;
|
|
191
|
+
flex-direction: column;
|
|
192
|
+
gap: 0.2rem;
|
|
193
|
+
overflow-y: auto;
|
|
194
|
+
padding: 0 0.45rem 0.65rem;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.lfgc-session-row {
|
|
198
|
+
background: transparent;
|
|
199
|
+
border: 0;
|
|
200
|
+
border-radius: 14px;
|
|
201
|
+
color: inherit;
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
gap: 0.65rem;
|
|
204
|
+
min-width: 0;
|
|
205
|
+
padding: 0.68rem;
|
|
206
|
+
text-align: left;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.lfgc-session-row:hover,
|
|
210
|
+
.lfgc-session-row-selected {
|
|
211
|
+
background: var(--lfgc-panel-strong);
|
|
212
|
+
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65), 0 7px 20px rgba(24, 24, 23, 0.04);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.lfgc-status-dot {
|
|
216
|
+
background: #a9aaa5;
|
|
217
|
+
border: 2px solid var(--lfgc-panel-strong);
|
|
218
|
+
border-radius: 50%;
|
|
219
|
+
box-shadow: 0 0 0 1px var(--lfgc-line);
|
|
220
|
+
flex: 0 0 auto;
|
|
221
|
+
height: 0.66rem;
|
|
222
|
+
width: 0.66rem;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.lfgc-status-dot-online {
|
|
226
|
+
background: #4ebc78;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.lfgc-status-dot-working {
|
|
230
|
+
animation: lfgc-pulse 1.7s ease-in-out infinite;
|
|
231
|
+
background: var(--lfgc-accent);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.lfgc-session-copy {
|
|
235
|
+
display: flex;
|
|
236
|
+
flex: 1;
|
|
237
|
+
flex-direction: column;
|
|
238
|
+
min-width: 0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.lfgc-session-copy strong,
|
|
242
|
+
.lfgc-session-copy small {
|
|
243
|
+
overflow: hidden;
|
|
244
|
+
text-overflow: ellipsis;
|
|
245
|
+
white-space: nowrap;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.lfgc-session-copy strong {
|
|
249
|
+
font-size: 0.78rem;
|
|
250
|
+
font-weight: 630;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.lfgc-session-copy small {
|
|
254
|
+
color: var(--lfgc-muted);
|
|
255
|
+
font-size: 0.68rem;
|
|
256
|
+
margin-top: 0.18rem;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.lfgc-thread {
|
|
260
|
+
display: flex;
|
|
261
|
+
flex-direction: column;
|
|
262
|
+
overflow: hidden;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.lfgc-thread-heading {
|
|
266
|
+
align-items: center;
|
|
267
|
+
border-bottom: 1px solid var(--lfgc-line);
|
|
268
|
+
display: flex;
|
|
269
|
+
flex: 0 0 auto;
|
|
270
|
+
justify-content: space-between;
|
|
271
|
+
min-height: 3.8rem;
|
|
272
|
+
padding: 0.75rem 1rem;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.lfgc-stop-button {
|
|
276
|
+
border-radius: 999px;
|
|
277
|
+
color: #a13c26;
|
|
278
|
+
font-size: 0.7rem;
|
|
279
|
+
padding: 0.45rem 0.72rem;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.lfgc-messages {
|
|
283
|
+
display: flex;
|
|
284
|
+
flex: 1;
|
|
285
|
+
flex-direction: column;
|
|
286
|
+
gap: 0.85rem;
|
|
287
|
+
min-height: 0;
|
|
288
|
+
overflow-y: auto;
|
|
289
|
+
padding: 1.2rem clamp(0.8rem, 4vw, 3.5rem);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.lfgc-message {
|
|
293
|
+
align-items: flex-start;
|
|
294
|
+
gap: 0.55rem;
|
|
295
|
+
max-width: min(44rem, 92%);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.lfgc-message-user {
|
|
299
|
+
align-self: flex-end;
|
|
300
|
+
flex-direction: row-reverse;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.lfgc-message-avatar {
|
|
304
|
+
border-radius: 9px;
|
|
305
|
+
flex: 0 0 auto;
|
|
306
|
+
height: 1.65rem;
|
|
307
|
+
margin-top: 0.1rem;
|
|
308
|
+
width: 1.65rem;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.lfgc-message-body {
|
|
312
|
+
min-width: 0;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.lfgc-message-body p {
|
|
316
|
+
font-size: 0.86rem;
|
|
317
|
+
line-height: 1.55;
|
|
318
|
+
margin: 0;
|
|
319
|
+
overflow-wrap: anywhere;
|
|
320
|
+
white-space: pre-wrap;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.lfgc-message-user .lfgc-message-body {
|
|
324
|
+
background: var(--lfgc-text);
|
|
325
|
+
border-radius: 17px 17px 5px 17px;
|
|
326
|
+
color: white;
|
|
327
|
+
padding: 0.65rem 0.85rem;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.lfgc-message-body small {
|
|
331
|
+
display: block;
|
|
332
|
+
font-size: 0.62rem;
|
|
333
|
+
margin-top: 0.25rem;
|
|
334
|
+
opacity: 0.58;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.lfgc-message-thinking {
|
|
338
|
+
color: var(--lfgc-muted);
|
|
339
|
+
font-style: italic;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.lfgc-message-attachment {
|
|
343
|
+
display: block;
|
|
344
|
+
font-size: 0.75rem;
|
|
345
|
+
margin-bottom: 0.2rem;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.lfgc-working {
|
|
349
|
+
align-items: center;
|
|
350
|
+
align-self: flex-start;
|
|
351
|
+
display: flex;
|
|
352
|
+
gap: 0.24rem;
|
|
353
|
+
margin-left: 2.2rem;
|
|
354
|
+
min-height: 1.5rem;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.lfgc-working span {
|
|
358
|
+
animation: lfgc-working 1.25s ease-in-out infinite;
|
|
359
|
+
background: var(--lfgc-muted);
|
|
360
|
+
border-radius: 50%;
|
|
361
|
+
height: 0.28rem;
|
|
362
|
+
opacity: 0.38;
|
|
363
|
+
width: 0.28rem;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.lfgc-working span:nth-child(2) {
|
|
367
|
+
animation-delay: 120ms;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.lfgc-working span:nth-child(3) {
|
|
371
|
+
animation-delay: 240ms;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.lfgc-thread-empty {
|
|
375
|
+
color: var(--lfgc-muted);
|
|
376
|
+
display: grid;
|
|
377
|
+
flex: 1;
|
|
378
|
+
font-size: 0.78rem;
|
|
379
|
+
place-items: center;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.lfgc-composer {
|
|
383
|
+
align-items: flex-end;
|
|
384
|
+
background: var(--lfgc-panel-strong);
|
|
385
|
+
border: 1px solid var(--lfgc-line);
|
|
386
|
+
border-radius: 20px;
|
|
387
|
+
box-shadow: 0 12px 34px rgba(24, 24, 23, 0.08);
|
|
388
|
+
display: flex;
|
|
389
|
+
flex: 0 0 auto;
|
|
390
|
+
gap: 0.5rem;
|
|
391
|
+
margin: 0.5rem clamp(0.7rem, 3vw, 2rem) calc(0.7rem + env(safe-area-inset-bottom));
|
|
392
|
+
padding: 0.45rem;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.lfgc-composer textarea {
|
|
396
|
+
background: transparent;
|
|
397
|
+
border: 0;
|
|
398
|
+
color: inherit;
|
|
399
|
+
field-sizing: content;
|
|
400
|
+
flex: 1;
|
|
401
|
+
font: inherit;
|
|
402
|
+
font-size: 0.82rem;
|
|
403
|
+
line-height: 1.45;
|
|
404
|
+
max-height: 9rem;
|
|
405
|
+
min-height: 2rem;
|
|
406
|
+
outline: none;
|
|
407
|
+
padding: 0.42rem 0.55rem;
|
|
408
|
+
resize: none;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.lfgc-composer textarea::placeholder {
|
|
412
|
+
color: color-mix(in srgb, var(--lfgc-muted) 72%, transparent);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.lfgc-composer button {
|
|
416
|
+
align-items: center;
|
|
417
|
+
appearance: none;
|
|
418
|
+
background: var(--lfgc-text);
|
|
419
|
+
border: 0;
|
|
420
|
+
border-radius: 50%;
|
|
421
|
+
color: white;
|
|
422
|
+
cursor: pointer;
|
|
423
|
+
display: flex;
|
|
424
|
+
font-size: 1rem;
|
|
425
|
+
height: 2rem;
|
|
426
|
+
justify-content: center;
|
|
427
|
+
width: 2rem;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.lfgc-composer button:disabled {
|
|
431
|
+
cursor: default;
|
|
432
|
+
opacity: 0.25;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.lfgc-empty {
|
|
436
|
+
align-items: center;
|
|
437
|
+
display: flex;
|
|
438
|
+
flex: 1;
|
|
439
|
+
flex-direction: column;
|
|
440
|
+
justify-content: center;
|
|
441
|
+
padding: 2rem;
|
|
442
|
+
text-align: center;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.lfgc-empty-orb {
|
|
446
|
+
border-radius: 25px;
|
|
447
|
+
height: 4rem;
|
|
448
|
+
margin-bottom: 1.2rem;
|
|
449
|
+
transform: rotate(-4deg);
|
|
450
|
+
width: 4rem;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.lfgc-empty p {
|
|
454
|
+
max-width: 22rem;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.lfgc-empty-actions {
|
|
458
|
+
display: flex;
|
|
459
|
+
gap: 0.55rem;
|
|
460
|
+
margin-top: 1.2rem;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.lfgc-button {
|
|
464
|
+
border-radius: 999px;
|
|
465
|
+
font-size: 0.75rem;
|
|
466
|
+
padding: 0.64rem 0.9rem;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.lfgc-button-primary {
|
|
470
|
+
background: var(--lfgc-text);
|
|
471
|
+
color: white;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.lfgc-skeleton-sidebar,
|
|
475
|
+
.lfgc-skeleton-thread {
|
|
476
|
+
padding: 1rem;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.lfgc-skeleton-row {
|
|
480
|
+
align-items: center;
|
|
481
|
+
display: flex;
|
|
482
|
+
gap: 0.65rem;
|
|
483
|
+
padding: 0.72rem 0.2rem;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.lfgc-skeleton-dot,
|
|
487
|
+
.lfgc-skeleton-lines span,
|
|
488
|
+
.lfgc-skeleton-bubble {
|
|
489
|
+
animation: lfgc-skeleton 1.8s ease-in-out infinite;
|
|
490
|
+
background: rgba(24, 24, 23, 0.075);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.lfgc-skeleton-dot {
|
|
494
|
+
border-radius: 50%;
|
|
495
|
+
height: 0.7rem;
|
|
496
|
+
width: 0.7rem;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.lfgc-skeleton-lines {
|
|
500
|
+
display: flex;
|
|
501
|
+
flex: 1;
|
|
502
|
+
flex-direction: column;
|
|
503
|
+
gap: 0.38rem;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.lfgc-skeleton-lines span {
|
|
507
|
+
border-radius: 999px;
|
|
508
|
+
height: 0.48rem;
|
|
509
|
+
width: 74%;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.lfgc-skeleton-lines span:last-child {
|
|
513
|
+
height: 0.4rem;
|
|
514
|
+
width: 48%;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.lfgc-skeleton-thread,
|
|
518
|
+
.lfgc-message-skeletons {
|
|
519
|
+
display: flex;
|
|
520
|
+
flex-direction: column;
|
|
521
|
+
gap: 1rem;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.lfgc-skeleton-bubble {
|
|
525
|
+
border-radius: 13px;
|
|
526
|
+
display: block;
|
|
527
|
+
height: 3.8rem;
|
|
528
|
+
width: 58%;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.lfgc-skeleton-bubble-user {
|
|
532
|
+
align-self: flex-end;
|
|
533
|
+
height: 2.8rem;
|
|
534
|
+
width: 42%;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.lfgc-skeleton-bubble-short {
|
|
538
|
+
height: 2.5rem;
|
|
539
|
+
width: 36%;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.lfgc-message-skeletons {
|
|
543
|
+
width: 100%;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
@keyframes lfgc-skeleton {
|
|
547
|
+
50% {
|
|
548
|
+
background: rgba(24, 24, 23, 0.115);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
@keyframes lfgc-pulse {
|
|
553
|
+
50% {
|
|
554
|
+
box-shadow: 0 0 0 4px var(--lfgc-accent-soft);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
@keyframes lfgc-working {
|
|
559
|
+
50% {
|
|
560
|
+
opacity: 0.9;
|
|
561
|
+
transform: translateY(-2px);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
@media (max-width: 720px) {
|
|
566
|
+
.lfgc-header {
|
|
567
|
+
padding-inline: 0.8rem;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.lfgc-workspace,
|
|
571
|
+
.lfgc-skeleton {
|
|
572
|
+
display: flex;
|
|
573
|
+
flex-direction: column;
|
|
574
|
+
padding: 0 0.45rem max(0.45rem, env(safe-area-inset-bottom));
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.lfgc-sessions,
|
|
578
|
+
.lfgc-skeleton-sidebar {
|
|
579
|
+
background: transparent;
|
|
580
|
+
border: 0;
|
|
581
|
+
border-radius: 0;
|
|
582
|
+
flex: 0 0 auto;
|
|
583
|
+
overflow-x: auto;
|
|
584
|
+
scrollbar-width: none;
|
|
585
|
+
scroll-snap-type: x proximity;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.lfgc-sessions::-webkit-scrollbar,
|
|
589
|
+
.lfgc-skeleton-sidebar::-webkit-scrollbar {
|
|
590
|
+
display: none;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.lfgc-sessions-heading {
|
|
594
|
+
display: none;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.lfgc-session-list {
|
|
598
|
+
flex-direction: row;
|
|
599
|
+
gap: 0.4rem;
|
|
600
|
+
padding: 0.2rem 0.1rem 0.55rem;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.lfgc-session-row {
|
|
604
|
+
background: rgba(255, 255, 255, 0.56);
|
|
605
|
+
flex: 0 0 min(70vw, 15rem);
|
|
606
|
+
padding: 0.55rem 0.65rem;
|
|
607
|
+
scroll-snap-align: start;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.lfgc-thread,
|
|
611
|
+
.lfgc-skeleton-thread {
|
|
612
|
+
border-radius: 22px;
|
|
613
|
+
flex: 1;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.lfgc-skeleton-sidebar {
|
|
617
|
+
display: flex;
|
|
618
|
+
gap: 0.5rem;
|
|
619
|
+
padding: 0.2rem 0 0.65rem;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.lfgc-skeleton-row {
|
|
623
|
+
background: rgba(255, 255, 255, 0.5);
|
|
624
|
+
border-radius: 14px;
|
|
625
|
+
flex: 0 0 12rem;
|
|
626
|
+
padding: 0.7rem;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
.lfgc-messages {
|
|
630
|
+
padding: 1rem 0.75rem;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.lfgc-message {
|
|
634
|
+
max-width: 94%;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
.lfgc-thread-heading {
|
|
638
|
+
min-height: 3.4rem;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
@media (prefers-color-scheme: dark) {
|
|
643
|
+
.lfgc-root {
|
|
644
|
+
--lfgc-bg: #080808;
|
|
645
|
+
--lfgc-panel: rgba(22, 22, 21, 0.88);
|
|
646
|
+
--lfgc-panel-strong: #1d1d1c;
|
|
647
|
+
--lfgc-text: #f5f4f0;
|
|
648
|
+
--lfgc-muted: #9a9993;
|
|
649
|
+
--lfgc-line: rgba(255, 255, 255, 0.08);
|
|
650
|
+
background:
|
|
651
|
+
radial-gradient(circle at 15% -10%, rgba(58, 44, 39, 0.38), transparent 32rem),
|
|
652
|
+
var(--lfgc-bg);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.lfgc-icon-button-primary,
|
|
656
|
+
.lfgc-composer button,
|
|
657
|
+
.lfgc-button-primary {
|
|
658
|
+
background: #f5f4f0;
|
|
659
|
+
color: #111110;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
.lfgc-error {
|
|
663
|
+
color: #ff9b81;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
.lfgc-message-user .lfgc-message-body {
|
|
667
|
+
background: #f0efea;
|
|
668
|
+
color: #141413;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
@media (prefers-reduced-motion: reduce) {
|
|
673
|
+
.lfgc-root *,
|
|
674
|
+
.lfgc-root *::before,
|
|
675
|
+
.lfgc-root *::after {
|
|
676
|
+
animation-duration: 1ms !important;
|
|
677
|
+
animation-iteration-count: 1 !important;
|
|
678
|
+
scroll-behavior: auto !important;
|
|
679
|
+
transition-duration: 1ms !important;
|
|
680
|
+
}
|
|
681
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@omg-dev/react",
|
|
3
|
+
"version": "0.1.308",
|
|
4
|
+
"description": "Embeddable React surfaces for OMG.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://omg.dev",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/BennyKok/omg.dev.git",
|
|
10
|
+
"directory": "packages/react"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/BennyKok/omg.dev/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"./dist/styles.css"
|
|
18
|
+
],
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./styles.css": "./dist/styles.css"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@omg-dev/client": "0.1.308",
|
|
31
|
+
"@omg-dev/protocol": "0.1.308"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"react": ">=19",
|
|
35
|
+
"react-dom": ">=19"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
}
|
|
40
|
+
}
|