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
package/out/index.txt ADDED
@@ -0,0 +1,18 @@
1
+ 1:"$Sreact.fragment"
2
+ 2:I[17279,["/_next/static/chunks/0u5ydb-f0.vxl.js","/_next/static/chunks/0dbhjjzl8qfwv.js"],"ErrorBoundary"]
3
+ 3:I[39756,["/_next/static/chunks/0u5ydb-f0.vxl.js","/_next/static/chunks/0dbhjjzl8qfwv.js"],"default"]
4
+ 4:I[37457,["/_next/static/chunks/0u5ydb-f0.vxl.js","/_next/static/chunks/0dbhjjzl8qfwv.js"],"default"]
5
+ 5:I[47257,["/_next/static/chunks/0u5ydb-f0.vxl.js","/_next/static/chunks/0dbhjjzl8qfwv.js"],"ClientPageRoot"]
6
+ 6:I[29615,["/_next/static/chunks/0u5ydb-f0.vxl.js","/_next/static/chunks/0dbhjjzl8qfwv.js","/_next/static/chunks/03k8t3tgym~8~.js","/_next/static/chunks/0ohm.ia-4ec60.js"],"default"]
7
+ 9:I[97367,["/_next/static/chunks/0u5ydb-f0.vxl.js","/_next/static/chunks/0dbhjjzl8qfwv.js"],"OutletBoundary"]
8
+ a:"$Sreact.suspense"
9
+ c:I[97367,["/_next/static/chunks/0u5ydb-f0.vxl.js","/_next/static/chunks/0dbhjjzl8qfwv.js"],"ViewportBoundary"]
10
+ e:I[97367,["/_next/static/chunks/0u5ydb-f0.vxl.js","/_next/static/chunks/0dbhjjzl8qfwv.js"],"MetadataBoundary"]
11
+ 10:I[68027,["/_next/static/chunks/0u5ydb-f0.vxl.js","/_next/static/chunks/0dbhjjzl8qfwv.js"],"default",1]
12
+ :HL["/_next/static/chunks/09vfh8lfuacc0.css","style"]
13
+ 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/09vfh8lfuacc0.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0u5ydb-f0.vxl.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0dbhjjzl8qfwv.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"zh-CN","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"charSet":"UTF-8"}],["$","meta",null,{"name":"viewport","content":"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"}],["$","link",null,{"rel":"icon","href":"/favicon.ico"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n var theme = localStorage.getItem('theme');\n if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {\n document.documentElement.setAttribute('data-theme', 'dark');\n }\n })();\n "}}]]}],["$","body",null,{"children":["$","$L2",null,{"children":[["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n window.onerror = function(message, source, lineno, colno, error) {\n console.error('[Global Error]', { message, source, lineno, colno, error });\n };\n window.onunhandledrejection = function(event) {\n console.error('[Unhandled Promise Rejection]', event.reason);\n };\n "}}],["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]]}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/03k8t3tgym~8~.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0ohm.ia-4ec60.js","async":true,"nonce":"$undefined"}]],["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lc",null,{"children":"$Ld"}],["$","div",null,{"hidden":true,"children":["$","$Le",null,{"children":["$","$a",null,{"name":"Next.Metadata","children":"$Lf"}]}]}],null]}],false]],"m":"$undefined","G":["$10",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/09vfh8lfuacc0.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"0h4f4QFk_KC9FlSRfQACk"}
14
+ 7:{}
15
+ 8:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"
16
+ d:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
17
+ b:null
18
+ f:[["$","title","0",{"children":"MostBox 文件管理"}],["$","meta","1",{"name":"description","content":"MostBox P2P 文件管理"}]]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "most-box",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "MostBox - P2P file sharing application",
5
5
  "type": "module",
6
6
  "main": "server.js",
@@ -8,15 +8,16 @@
8
8
  "most-box": "./cli.js"
9
9
  },
10
10
  "files": [
11
+ "out",
11
12
  "public",
12
13
  "src",
13
14
  "server.js",
14
- "build.mjs",
15
15
  "cli.js"
16
16
  ],
17
17
  "scripts": {
18
18
  "start": "npm run build && node server.js",
19
- "build": "node build.mjs",
19
+ "build": "next build",
20
+ "dev": "next dev",
20
21
  "test": "node --test tests/**/*.test.js",
21
22
  "test:unit": "node --test tests/unit/*.test.js"
22
23
  },
@@ -32,17 +33,21 @@
32
33
  "busboy": "^1.6.0",
33
34
  "corestore": "^7.9.2",
34
35
  "eventemitter3": "^5.0.4",
35
- "hyperdrive": "^13.3.1",
36
+ "hypercore": "^11.28.1",
37
+ "hyperdrive": "^13.3.2",
36
38
  "hyperswarm": "^4.17.0",
37
39
  "ipfs-unixfs-importer": "^16.1.4",
40
+ "ky": "^2.0.0",
38
41
  "lucide-react": "^1.7.0",
39
42
  "multiformats": "^13.4.2",
43
+ "next": "^16.2.2",
40
44
  "react": "^19.2.4",
41
45
  "react-dom": "^19.2.4",
46
+ "react-router-dom": "^7.14.0",
42
47
  "ws": "^8.20.0"
43
48
  },
44
49
  "devDependencies": {
45
- "esbuild": "^0.27.4",
46
- "supertest": "^7.0.0"
50
+ "esbuild": "^0.28.0",
51
+ "supertest": "^7.2.2"
47
52
  }
48
53
  }
package/public/app.css CHANGED
@@ -53,7 +53,8 @@ body {
53
53
  /* === Layout === */
54
54
  .app-layout {
55
55
  display: flex;
56
- min-height: 100vh;
56
+ height: 100vh;
57
+ overflow: hidden;
57
58
  background: var(--bg-primary);
58
59
  color: var(--text-primary);
59
60
  }
@@ -61,6 +62,8 @@ body {
61
62
  /* === Sidebar === */
62
63
  .sidebar {
63
64
  width: 200px;
65
+ height: 100vh;
66
+ overflow-y: auto;
64
67
  background: var(--bg-tertiary);
65
68
  display: flex;
66
69
  flex-direction: column;
@@ -68,8 +71,12 @@ body {
68
71
  flex-shrink: 0;
69
72
 
70
73
  .sidebar-header {
71
- padding: 20px 16px;
74
+ min-height: 64px;
75
+ padding: 14px 16px;
76
+ display: flex;
77
+ align-items: center;
72
78
  border-bottom: 1px solid var(--border-color);
79
+ box-sizing: border-box;
73
80
 
74
81
  h1 {
75
82
  font-size: 18px;
@@ -161,6 +168,7 @@ body {
161
168
  display: flex;
162
169
  flex-direction: column;
163
170
  min-width: 0;
171
+ overflow: hidden;
164
172
  }
165
173
 
166
174
  /* === Header === */
@@ -169,10 +177,12 @@ body {
169
177
  justify-content: space-between;
170
178
  align-items: center;
171
179
  flex-wrap: wrap;
172
- padding: 16px 24px;
180
+ min-height: 64px;
181
+ padding: 14px 24px;
173
182
  border-bottom: 1px solid var(--border-color);
174
183
  background: var(--bg-secondary);
175
184
  gap: 16px;
185
+ box-sizing: border-box;
176
186
 
177
187
  .header-left {
178
188
  display: flex;
@@ -1207,12 +1217,17 @@ body {
1207
1217
  }
1208
1218
  }
1209
1219
 
1220
+ .modal-overlay {
1221
+ z-index: 301;
1222
+ }
1223
+
1210
1224
  .mobile-menu-btn {
1211
1225
  display: flex;
1212
1226
  }
1213
1227
 
1214
1228
  /* Header */
1215
1229
  .app-header {
1230
+ min-height: 56px;
1216
1231
  padding: 12px 16px;
1217
1232
  gap: 8px;
1218
1233
 
@@ -1369,7 +1384,8 @@ body {
1369
1384
  }
1370
1385
 
1371
1386
  .app-header {
1372
- padding: 10px 12px;
1387
+ min-height: 52px;
1388
+ padding: 12px 12px;
1373
1389
 
1374
1390
  .header-title {
1375
1391
  font-size: 14px;