@fluxy-chat/create-fluxy-chat 0.4.0 → 0.5.0

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.
@@ -0,0 +1,242 @@
1
+ :root {
2
+ font-family: system-ui, -apple-system, sans-serif;
3
+ line-height: 1.5;
4
+ color: #0f172a;
5
+ background: #fdfbf9;
6
+ }
7
+
8
+ * {
9
+ box-sizing: border-box;
10
+ }
11
+
12
+ body {
13
+ margin: 0;
14
+ }
15
+
16
+ .shell {
17
+ max-width: 880px;
18
+ margin: 0 auto;
19
+ padding: 1.5rem;
20
+ }
21
+
22
+ .hero {
23
+ margin-bottom: 1rem;
24
+ }
25
+
26
+ .hero h1 {
27
+ font-size: 1.35rem;
28
+ margin: 0 0 0.35rem;
29
+ }
30
+
31
+ .hero p {
32
+ margin: 0;
33
+ font-size: 0.875rem;
34
+ color: #64748b;
35
+ }
36
+
37
+ .hero a {
38
+ color: #c2410c;
39
+ }
40
+
41
+ .layout {
42
+ display: grid;
43
+ gap: 1rem;
44
+ }
45
+
46
+ @media (min-width: 900px) {
47
+ .layout {
48
+ grid-template-columns: 1fr 240px;
49
+ align-items: start;
50
+ }
51
+ }
52
+
53
+ .chat-panel {
54
+ display: flex;
55
+ flex-direction: column;
56
+ min-height: 520px;
57
+ border: 1px solid #e7e5e4;
58
+ border-radius: 16px;
59
+ background: #fff;
60
+ overflow: hidden;
61
+ box-shadow: 0 8px 30px rgb(15 23 42 / 6%);
62
+ }
63
+
64
+ .chat-header {
65
+ display: flex;
66
+ justify-content: space-between;
67
+ align-items: center;
68
+ padding: 0.75rem 1rem;
69
+ border-bottom: 1px solid #e7e5e4;
70
+ background: #0f172a;
71
+ color: #fff;
72
+ }
73
+
74
+ .status {
75
+ font-size: 0.75rem;
76
+ opacity: 0.85;
77
+ }
78
+
79
+ .messages {
80
+ flex: 1;
81
+ overflow-y: auto;
82
+ list-style: none;
83
+ margin: 0;
84
+ padding: 1rem;
85
+ display: flex;
86
+ flex-direction: column;
87
+ gap: 0.5rem;
88
+ }
89
+
90
+ .message {
91
+ display: flex;
92
+ flex-direction: column;
93
+ gap: 0.15rem;
94
+ padding: 0.6rem 0.85rem;
95
+ border-radius: 10px;
96
+ background: #f8fafc;
97
+ max-width: 85%;
98
+ }
99
+
100
+ .message.self {
101
+ align-self: flex-end;
102
+ background: #fff7ed;
103
+ border: 1px solid #fed7aa;
104
+ }
105
+
106
+ .message.agent {
107
+ background: #f1f5f9;
108
+ border: 1px solid #e2e8f0;
109
+ }
110
+
111
+ .author {
112
+ font-size: 0.7rem;
113
+ color: #64748b;
114
+ font-weight: 600;
115
+ }
116
+
117
+ .composer {
118
+ display: flex;
119
+ flex-direction: column;
120
+ gap: 0.5rem;
121
+ padding: 0.75rem;
122
+ border-top: 1px solid #e7e5e4;
123
+ }
124
+
125
+ .composer-row {
126
+ display: flex;
127
+ gap: 0.5rem;
128
+ }
129
+
130
+ .composer input {
131
+ flex: 1;
132
+ border: 1px solid #cbd5e1;
133
+ border-radius: 10px;
134
+ padding: 0.55rem 0.75rem;
135
+ }
136
+
137
+ .composer button {
138
+ border: none;
139
+ border-radius: 10px;
140
+ background: #c2410c;
141
+ color: #fff;
142
+ padding: 0.55rem 1rem;
143
+ cursor: pointer;
144
+ font-weight: 600;
145
+ }
146
+
147
+ .composer button.secondary {
148
+ background: #0f172a;
149
+ }
150
+
151
+ .composer button:disabled {
152
+ opacity: 0.55;
153
+ cursor: not-allowed;
154
+ }
155
+
156
+ .hint {
157
+ font-size: 0.75rem;
158
+ color: #64748b;
159
+ }
160
+
161
+ .tools {
162
+ margin: 0 1rem 1rem;
163
+ padding: 0.75rem;
164
+ border-radius: 10px;
165
+ border: 1px solid #e2e8f0;
166
+ background: #f8fafc;
167
+ }
168
+
169
+ .tools h3 {
170
+ margin: 0 0 0.5rem;
171
+ font-size: 0.7rem;
172
+ letter-spacing: 0.06em;
173
+ text-transform: uppercase;
174
+ color: #64748b;
175
+ }
176
+
177
+ .tools ul {
178
+ margin: 0;
179
+ padding-left: 1rem;
180
+ font-size: 0.8rem;
181
+ }
182
+
183
+ .side {
184
+ display: flex;
185
+ flex-direction: column;
186
+ gap: 0.75rem;
187
+ }
188
+
189
+ .card {
190
+ border: 1px solid #e7e5e4;
191
+ border-radius: 12px;
192
+ padding: 0.85rem 1rem;
193
+ background: #fff;
194
+ font-size: 0.8rem;
195
+ }
196
+
197
+ .card h2 {
198
+ margin: 0 0 0.5rem;
199
+ font-size: 0.75rem;
200
+ text-transform: uppercase;
201
+ letter-spacing: 0.05em;
202
+ color: #64748b;
203
+ }
204
+
205
+ .card dl {
206
+ margin: 0;
207
+ display: grid;
208
+ gap: 0.35rem;
209
+ }
210
+
211
+ .card dt {
212
+ color: #94a3b8;
213
+ font-size: 0.7rem;
214
+ }
215
+
216
+ .card dd {
217
+ margin: 0;
218
+ word-break: break-all;
219
+ }
220
+
221
+ .card a {
222
+ color: #c2410c;
223
+ }
224
+
225
+ .error-box {
226
+ border: 1px solid #fecaca;
227
+ background: #fef2f2;
228
+ color: #991b1b;
229
+ border-radius: 12px;
230
+ padding: 1rem;
231
+ font-size: 0.875rem;
232
+ }
233
+
234
+ .error-box code {
235
+ font-size: 0.8rem;
236
+ }
237
+
238
+ .typing {
239
+ padding: 0 1rem 0.5rem;
240
+ font-size: 0.75rem;
241
+ color: #64748b;
242
+ }
@@ -0,0 +1,10 @@
1
+ import { StrictMode } from "react";
2
+ import { createRoot } from "react-dom/client";
3
+ import { App } from "./App";
4
+ import "./index.css";
5
+
6
+ createRoot(document.getElementById("root")!).render(
7
+ <StrictMode>
8
+ <App />
9
+ </StrictMode>,
10
+ );
@@ -0,0 +1,16 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ readonly VITE_FLUXYCHAT_WORKER_URL: string;
5
+ readonly VITE_FLUXYCHAT_MEMBER_JWT: string;
6
+ readonly VITE_FLUXYCHAT_ROOM_ID: string;
7
+ readonly VITE_FLUXYCHAT_AGENT_ID: string;
8
+ readonly VITE_FLUXYCHAT_AGENT_HANDLE: string;
9
+ readonly VITE_FLUXYCHAT_PROJECT_ID: string;
10
+ readonly VITE_FLUXYCHAT_CONSOLE_URL: string;
11
+ readonly VITE_FLUXYCHAT_USER_ID: string;
12
+ }
13
+
14
+ interface ImportMeta {
15
+ readonly env: ImportMetaEnv;
16
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "useDefineForClassFields": true,
5
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
6
+ "module": "ESNext",
7
+ "skipLibCheck": true,
8
+ "moduleResolution": "bundler",
9
+ "allowImportingTsExtensions": true,
10
+ "isolatedModules": true,
11
+ "moduleDetection": "force",
12
+ "noEmit": true,
13
+ "jsx": "react-jsx",
14
+ "strict": true,
15
+ "noUnusedLocals": true,
16
+ "noUnusedParameters": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+ "noUncheckedSideEffectImports": true
19
+ },
20
+ "include": ["src"]
21
+ }
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from "vite";
2
+ import react from "@vitejs/plugin-react";
3
+
4
+ export default defineConfig({
5
+ plugins: [react()],
6
+ server: { port: 5173, open: true },
7
+ });