most-box 0.0.2 → 0.0.4

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.
Files changed (68) hide show
  1. package/README.md +26 -0
  2. package/cli.js +2 -2
  3. package/out/404/index.html +15 -0
  4. package/out/404.html +15 -0
  5. package/out/__next.__PAGE__.txt +9 -0
  6. package/out/__next._full.txt +18 -0
  7. package/out/__next._head.txt +5 -0
  8. package/out/__next._index.txt +6 -0
  9. package/out/__next._tree.txt +2 -0
  10. package/out/_next/static/0h4f4QFk_KC9FlSRfQACk/_buildManifest.js +11 -0
  11. package/out/_next/static/0h4f4QFk_KC9FlSRfQACk/_clientMiddlewareManifest.js +1 -0
  12. package/out/_next/static/0h4f4QFk_KC9FlSRfQACk/_ssgManifest.js +1 -0
  13. package/out/_next/static/chunks/00l-yd3t8dvwz.js +5 -0
  14. package/out/_next/static/chunks/03k8t3tgym~8~.js +1 -0
  15. package/out/_next/static/chunks/03~yq9q893hmn.js +1 -0
  16. package/out/_next/static/chunks/09vfh8lfuacc0.css +1 -0
  17. package/out/_next/static/chunks/0bogtdbh.dcu1.js +1 -0
  18. package/out/_next/static/chunks/0dbhjjzl8qfwv.js +1 -0
  19. package/out/_next/static/chunks/0f73psqhr8dre.css +1 -0
  20. package/out/_next/static/chunks/0fbi7z4_.4j1j.js +1 -0
  21. package/out/_next/static/chunks/0ht900cau6_ur.js +31 -0
  22. package/out/_next/static/chunks/0ohm.ia-4ec60.js +1 -0
  23. package/out/_next/static/chunks/0u5ydb-f0.vxl.js +1 -0
  24. package/out/_next/static/chunks/14t2m1on-s5v~.js +1 -0
  25. package/out/_next/static/chunks/turbopack-076ce9exut_h3.js +1 -0
  26. package/out/_not-found/__next._full.txt +16 -0
  27. package/out/_not-found/__next._head.txt +5 -0
  28. package/out/_not-found/__next._index.txt +6 -0
  29. package/out/_not-found/__next._not-found/__PAGE__.txt +5 -0
  30. package/out/_not-found/__next._not-found.txt +5 -0
  31. package/out/_not-found/__next._tree.txt +2 -0
  32. package/out/_not-found/index.html +15 -0
  33. package/out/_not-found/index.txt +16 -0
  34. package/out/app.css +1535 -0
  35. package/out/bundle.js +107 -0
  36. package/out/bundle.js.map +7 -0
  37. package/out/chat/__next._full.txt +19 -0
  38. package/out/chat/__next._head.txt +5 -0
  39. package/out/chat/__next._index.txt +6 -0
  40. package/out/chat/__next._tree.txt +3 -0
  41. package/out/chat/__next.chat/__PAGE__.txt +9 -0
  42. package/out/chat/__next.chat.txt +5 -0
  43. package/out/chat/index.html +15 -0
  44. package/out/chat/index.txt +19 -0
  45. package/out/chat-page.js +112 -0
  46. package/out/chat.css +378 -0
  47. package/out/favicon.ico +0 -0
  48. package/out/index.html +15 -0
  49. package/out/index.js +148 -0
  50. package/out/index.txt +18 -0
  51. package/package.json +11 -6
  52. package/public/app.css +20 -4
  53. package/public/bundle.js +1 -1
  54. package/public/bundle.js.map +7 -0
  55. package/public/chat-page.js +112 -0
  56. package/public/chat.css +378 -0
  57. package/public/index.js +148 -0
  58. package/server.js +188 -6
  59. package/src/config.js +12 -1
  60. package/src/core/cid.js +7 -3
  61. package/src/index.js +475 -7
  62. package/src/utils/api.js +6 -0
  63. package/build.mjs +0 -40
  64. package/public/app.jsx +0 -1543
  65. package/public/bundle.css +0 -1
  66. package/public/error-boundary.jsx +0 -50
  67. package/public/index.html +0 -16
  68. package/public/index.jsx +0 -20
@@ -0,0 +1,378 @@
1
+ /* =============================================
2
+ Chat Page Styles
3
+ Chat-specific components (reuses app.css for layout)
4
+ ============================================= */
5
+
6
+ /* === Dark Theme Support === */
7
+ [data-theme="dark"] {
8
+ --chat-bg-secondary: #1e293b;
9
+ --chat-bg-tertiary: #334155;
10
+ --chat-border-color: rgba(255, 255, 255, 0.08);
11
+ }
12
+
13
+ /* === Messages Area === */
14
+ .chat-messages {
15
+ flex: 1;
16
+ overflow-y: auto;
17
+ padding: 20px 24px;
18
+ display: flex;
19
+ flex-direction: column;
20
+ gap: 16px;
21
+ }
22
+
23
+ .chat-messages-empty {
24
+ flex: 1;
25
+ display: flex;
26
+ flex-direction: column;
27
+ align-items: center;
28
+ justify-content: center;
29
+ color: var(--text-muted);
30
+ gap: 12px;
31
+
32
+ .empty-icon {
33
+ width: 64px;
34
+ height: 64px;
35
+ border-radius: 16px;
36
+ background: var(--bg-tertiary);
37
+ display: flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ color: var(--text-muted);
41
+ }
42
+
43
+ p {
44
+ font-size: 14px;
45
+ }
46
+ }
47
+
48
+ .chat-message {
49
+ display: flex;
50
+ flex-direction: column;
51
+ max-width: 70%;
52
+ animation: fadeIn 0.2s ease;
53
+
54
+ &.self {
55
+ align-self: flex-end;
56
+ align-items: flex-end;
57
+
58
+ .message-bubble {
59
+ background: color-mix(in srgb, var(--accent-blue) 12%, var(--bg-secondary));
60
+ border: 1px solid color-mix(in srgb, var(--accent-blue) 20%, var(--border-color));
61
+ border-radius: 18px 18px 4px 18px;
62
+ }
63
+ }
64
+
65
+ &.other {
66
+ align-self: flex-start;
67
+ align-items: flex-start;
68
+
69
+ .message-bubble {
70
+ background: var(--bg-tertiary);
71
+ border-radius: 18px 18px 18px 4px;
72
+ }
73
+ }
74
+
75
+ .message-author {
76
+ font-size: 11px;
77
+ color: var(--text-muted);
78
+ margin-bottom: 4px;
79
+ padding: 0 12px;
80
+ }
81
+
82
+ .message-bubble {
83
+ padding: 12px 16px;
84
+ font-size: 14px;
85
+ line-height: 1.5;
86
+ word-break: break-word;
87
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
88
+ }
89
+
90
+ .message-time {
91
+ font-size: 10px;
92
+ color: var(--text-muted);
93
+ margin-top: 4px;
94
+ padding: 0 12px;
95
+ }
96
+
97
+ &.pending .message-bubble {
98
+ opacity: 0.6;
99
+ }
100
+ }
101
+
102
+ @keyframes fadeIn {
103
+ from {
104
+ opacity: 0;
105
+ transform: translateY(8px);
106
+ }
107
+ to {
108
+ opacity: 1;
109
+ transform: translateY(0);
110
+ }
111
+ }
112
+
113
+ /* === Input Area === */
114
+ .chat-input-area {
115
+ display: flex;
116
+ gap: 12px;
117
+ padding: 16px 24px;
118
+ border-top: 1px solid var(--border-color);
119
+ background: var(--bg-secondary);
120
+
121
+ .chat-input {
122
+ flex: 1;
123
+ padding: 12px 18px;
124
+ border-radius: 24px;
125
+ border: 1.5px solid var(--border-color);
126
+ background: var(--bg-primary);
127
+ color: var(--text-primary);
128
+ font-size: 14px;
129
+ outline: none;
130
+ transition: border-color 0.15s;
131
+
132
+ &::placeholder {
133
+ color: var(--text-muted);
134
+ }
135
+
136
+ &:focus {
137
+ border-color: var(--accent-blue);
138
+ }
139
+ }
140
+
141
+ .send-btn {
142
+ width: 44px;
143
+ height: 44px;
144
+ border-radius: 50%;
145
+ border: none;
146
+ background: var(--accent-blue);
147
+ color: #fff;
148
+ cursor: pointer;
149
+ display: flex;
150
+ align-items: center;
151
+ justify-content: center;
152
+ transition: all 0.15s;
153
+ flex-shrink: 0;
154
+
155
+ &:hover:not(:disabled) {
156
+ background: color-mix(in srgb, var(--accent-blue) 85%, black);
157
+ transform: scale(1.05);
158
+ }
159
+
160
+ &:disabled {
161
+ opacity: 0.5;
162
+ cursor: not-allowed;
163
+ }
164
+ }
165
+ }
166
+
167
+ /* === Toast === */
168
+ .chat-toast {
169
+ position: fixed;
170
+ bottom: 24px;
171
+ left: 50%;
172
+ transform: translateX(-50%);
173
+ z-index: 200;
174
+ padding: 12px 24px;
175
+ border-radius: 12px;
176
+ background: var(--bg-secondary);
177
+ color: var(--text-primary);
178
+ font-size: 13px;
179
+ font-weight: 500;
180
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
181
+ border: 1px solid var(--border-color);
182
+ animation: toastIn 0.3s ease;
183
+ }
184
+
185
+ @keyframes toastIn {
186
+ from {
187
+ opacity: 0;
188
+ transform: translateX(-50%) translateY(20px);
189
+ }
190
+ to {
191
+ opacity: 1;
192
+ transform: translateX(-50%) translateY(0);
193
+ }
194
+ }
195
+
196
+ /* === Welcome State (no channel selected) === */
197
+ .chat-welcome {
198
+ flex: 1;
199
+ display: flex;
200
+ flex-direction: column;
201
+ align-items: center;
202
+ justify-content: center;
203
+ padding: 40px;
204
+ text-align: center;
205
+ background: var(--bg-primary);
206
+
207
+ .welcome-icon {
208
+ width: 80px;
209
+ height: 80px;
210
+ border-radius: 20px;
211
+ background: linear-gradient(135deg, color-mix(in srgb, var(--accent-blue) 15%, var(--bg-secondary)), color-mix(in srgb, var(--accent-blue) 5%, var(--bg-tertiary)));
212
+ display: flex;
213
+ align-items: center;
214
+ justify-content: center;
215
+ color: var(--accent-blue);
216
+ margin-bottom: 20px;
217
+ box-shadow: 0 10px 40px color-mix(in srgb, var(--accent-blue) 20%, transparent);
218
+ }
219
+
220
+ h2 {
221
+ font-size: 22px;
222
+ font-weight: 700;
223
+ margin-bottom: 8px;
224
+ }
225
+
226
+ p {
227
+ font-size: 14px;
228
+ color: var(--text-secondary);
229
+ max-width: 320px;
230
+ line-height: 1.6;
231
+ }
232
+ }
233
+
234
+ /* === Create Channel Button === */
235
+ .create-channel-btn {
236
+ margin: 8px;
237
+ padding: 10px;
238
+ border-radius: 8px;
239
+ border: 1.5px dashed var(--border-color);
240
+ background: transparent;
241
+ color: var(--text-secondary);
242
+ cursor: pointer;
243
+ display: flex;
244
+ align-items: center;
245
+ justify-content: center;
246
+ gap: 6px;
247
+ font-size: 13px;
248
+ font-weight: 500;
249
+ transition: all 0.15s;
250
+
251
+ &:hover {
252
+ border-color: var(--accent-blue);
253
+ color: var(--accent-blue);
254
+ background: color-mix(in srgb, var(--accent-blue) 5%, transparent);
255
+ }
256
+ }
257
+
258
+ /* === Peer Info === */
259
+ .peer-info {
260
+ display: flex;
261
+ align-items: center;
262
+ gap: 8px;
263
+ font-size: 11px;
264
+ color: var(--text-secondary);
265
+
266
+ .peer-dot {
267
+ width: 6px;
268
+ height: 6px;
269
+ border-radius: 50%;
270
+ background: var(--success);
271
+ }
272
+
273
+ .peer-id {
274
+ font-family: monospace;
275
+ flex: 1;
276
+ overflow: hidden;
277
+ text-overflow: ellipsis;
278
+ white-space: nowrap;
279
+ }
280
+ }
281
+
282
+ /* === Back Button (for chat sidebar) === */
283
+ .back-btn {
284
+ width: 32px;
285
+ height: 32px;
286
+ border-radius: 8px;
287
+ border: none;
288
+ background: transparent;
289
+ cursor: pointer;
290
+ color: var(--text-secondary);
291
+ display: flex;
292
+ align-items: center;
293
+ justify-content: center;
294
+ transition: background 0.15s;
295
+
296
+ &:hover {
297
+ background: var(--bg-tertiary);
298
+ }
299
+ }
300
+
301
+ /* === Mobile === */
302
+ .chat-sidebar-overlay {
303
+ display: none;
304
+ }
305
+
306
+ @media (max-width: 768px) {
307
+ .chat-sidebar {
308
+ position: fixed;
309
+ left: -240px;
310
+ top: 0;
311
+ bottom: 0;
312
+ z-index: 50;
313
+ transition: left 0.3s ease;
314
+
315
+ &.open {
316
+ left: 0;
317
+ }
318
+ }
319
+
320
+ .chat-sidebar-overlay {
321
+ display: block;
322
+ position: fixed;
323
+ inset: 0;
324
+ background: rgba(0, 0, 0, 0.5);
325
+ z-index: 40;
326
+ opacity: 0;
327
+ pointer-events: none;
328
+ transition: opacity 0.3s ease;
329
+
330
+ &.visible {
331
+ opacity: 1;
332
+ pointer-events: auto;
333
+ }
334
+ }
335
+
336
+ .chat-messages {
337
+ padding: 16px;
338
+ }
339
+
340
+ .chat-message {
341
+ max-width: 85%;
342
+ }
343
+
344
+ .chat-input-area {
345
+ padding: 12px 16px;
346
+ }
347
+
348
+ .sidebar-nav-btn .leave-channel-btn {
349
+ opacity: 1;
350
+ }
351
+ }
352
+
353
+ /* === Leave Channel Button === */
354
+ .leave-channel-btn {
355
+ margin-left: auto;
356
+ opacity: 0;
357
+ background: none;
358
+ border: none;
359
+ color: var(--text-muted);
360
+ cursor: pointer;
361
+ padding: 4px;
362
+ border-radius: 4px;
363
+ transition: opacity 0.15s, color 0.15s;
364
+ display: flex;
365
+ align-items: center;
366
+ justify-content: center;
367
+ }
368
+
369
+ .sidebar-nav-btn:hover .leave-channel-btn {
370
+ opacity: 1;
371
+ }
372
+
373
+ .leave-channel-btn:hover {
374
+ color: var(--danger);
375
+ background: color-mix(in srgb, var(--danger) 10%, transparent);
376
+ }
377
+
378
+