@patodo/localapp 0.1.0 → 0.2.1
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/.localapp-artifact.json +133 -103
- package/README.md +3 -2
- package/bin/localapp.mjs +54 -8
- package/package.json +1 -1
- package/runtime/native/adapter-manifest.json +1 -1
- package/runtime/native/win32-x64/localapp-native.exe +0 -0
- package/runtime/server/.localapp-server-runtime.json +61 -61
- package/runtime/server/bin/server-cli.cjs +14 -2
- package/runtime/server/bin/worker.cjs +12978 -3242
- package/runtime/server/web/404.html +1 -1
- package/runtime/server/web/_next/static/chunks/{416-53d48ad9442eb7b2.js → 416-c15a156fd32eefc3.js} +1 -1
- package/runtime/server/web/_next/static/chunks/app/{layout-5557bc90d966fded.js → layout-2231382739460b63.js} +1 -1
- package/runtime/server/web/_next/static/css/7618766dbe836b27.css +3 -0
- package/runtime/server/web/inbox.html +1 -1
- package/runtime/server/web/inbox.txt +7 -7
- package/runtime/server/web/index.html +1 -1
- package/runtime/server/web/index.txt +7 -7
- package/runtime/server/web/my/analytics.html +1 -1
- package/runtime/server/web/my/analytics.txt +7 -7
- package/runtime/server/web/my/apps/placeholder/settings.html +1 -1
- package/runtime/server/web/my/apps/placeholder/settings.txt +7 -7
- package/runtime/server/web/my/apps.html +1 -1
- package/runtime/server/web/my/apps.txt +7 -7
- package/runtime/server/web/my/dashboard.html +1 -1
- package/runtime/server/web/my/dashboard.txt +7 -7
- package/runtime/server/web/my/device-actions.html +1 -1
- package/runtime/server/web/my/device-actions.txt +7 -7
- package/runtime/server/web/my/device-notifications.html +1 -1
- package/runtime/server/web/my/device-notifications.txt +7 -7
- package/runtime/server/web/my/favorites.html +1 -1
- package/runtime/server/web/my/favorites.txt +7 -7
- package/runtime/server/web/my/groups.html +1 -1
- package/runtime/server/web/my/groups.txt +7 -7
- package/runtime/server/web/my/info.html +1 -1
- package/runtime/server/web/my/info.txt +7 -7
- package/runtime/server/web/my/keys.html +1 -1
- package/runtime/server/web/my/keys.txt +7 -7
- package/runtime/server/web/my/orgs.html +1 -1
- package/runtime/server/web/my/orgs.txt +7 -7
- package/runtime/server/web/my/pages.html +1 -1
- package/runtime/server/web/my/pages.txt +7 -7
- package/runtime/server/web/my/peers.html +1 -1
- package/runtime/server/web/my/peers.txt +7 -7
- package/runtime/server/web/my/recent.html +1 -1
- package/runtime/server/web/my/recent.txt +7 -7
- package/runtime/server/web/my/settings.html +1 -1
- package/runtime/server/web/my/settings.txt +7 -7
- package/runtime/server/web/my/studio.html +1 -1
- package/runtime/server/web/my/studio.txt +7 -7
- package/runtime/server/web/my/subscriptions.html +1 -1
- package/runtime/server/web/my/subscriptions.txt +7 -7
- package/runtime/server/web/my/system.html +1 -1
- package/runtime/server/web/my/system.txt +7 -7
- package/runtime/server/web/my/tasks.html +1 -1
- package/runtime/server/web/my/tasks.txt +7 -7
- package/runtime/server/web/my/users.html +1 -1
- package/runtime/server/web/my/users.txt +7 -7
- package/runtime/server/web/my.html +1 -1
- package/runtime/server/web/my.txt +7 -7
- package/runtime/server/web/platform-shell/placeholder/placeholder.html +1 -1
- package/runtime/server/web/platform-shell/placeholder/placeholder.txt +8 -8
- package/runtime/server/web/platform-shell-preview.html +1 -1
- package/runtime/server/web/platform-shell-preview.txt +8 -8
- package/runtime/server/web/setup.html +1 -1
- package/runtime/server/web/setup.txt +7 -7
- package/template/.claude/skills/localapp-collaboration/SKILL.md +92 -0
- package/template/AGENTS.md +6 -0
- package/template/CLAUDE.md +6 -0
- package/template/package.json +2 -1
- package/template/runtime/platform-capabilities.json +13 -1
- package/template/runtime/sdk/crdt/package.json +39 -0
- package/template/runtime/sdk/crdt/src/index.ts +440 -0
- package/template/runtime/sdk/crdt/src/react.ts +67 -0
- package/template/runtime/sdk/crdt/tests/provider.test.ts +169 -0
- package/template/runtime/sdk/crdt/tsconfig.json +18 -0
- package/template/runtime/server-core/dist/generated/platform-capabilities.d.ts +14 -2
- package/template/runtime/server-core/dist/generated/platform-capabilities.d.ts.map +1 -1
- package/template/runtime/server-core/dist/generated/platform-capabilities.js +14 -2
- package/template/runtime/server-core/dist/generated/platform-capabilities.js.map +1 -1
- package/template/runtime/server-core/dist/lib/__tests__/platform-capabilities.test.js +13 -2
- package/template/runtime/server-core/dist/lib/__tests__/platform-capabilities.test.js.map +1 -1
- package/template/runtime/version.json +1 -1
- package/template/tests/agent-guidance-template.test.ts +14 -0
- package/runtime/server/web/_next/static/css/afdc0938fca59693.css +0 -3
- /package/runtime/server/web/_next/static/{CqtRUQyhpQ2FmEc3vaVz3 → GyUKT-hZbRN2iexOBXTTr}/_buildManifest.js +0 -0
- /package/runtime/server/web/_next/static/{CqtRUQyhpQ2FmEc3vaVz3 → GyUKT-hZbRN2iexOBXTTr}/_ssgManifest.js +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
|
-
2:I[
|
|
3
|
-
3:I[8172,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-
|
|
2
|
+
2:I[6249,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"ThemeProvider"]
|
|
3
|
+
3:I[8172,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"AuthProvider"]
|
|
4
4
|
4:I[6461,[],""]
|
|
5
5
|
5:I[1129,[],""]
|
|
6
|
-
6:I[2388,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-
|
|
7
|
-
7:I[1467,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-
|
|
8
|
-
8:I[3690,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-
|
|
6
|
+
6:I[2388,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"LoginDialog"]
|
|
7
|
+
7:I[1467,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"ChangePasswordDialog"]
|
|
8
|
+
8:I[3690,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"Toaster"]
|
|
9
9
|
9:"$Sreact.suspense"
|
|
10
|
-
a:I[
|
|
10
|
+
a:I[8630,["265","static/chunks/265-a58973dbf631dc41.js","448","static/chunks/448-280e06e915001cb5.js","184","static/chunks/184-184da63eba05808f.js","86","static/chunks/86-7105ac54171494a1.js","416","static/chunks/416-c15a156fd32eefc3.js","970","static/chunks/app/platform-shell/%5BuserId%5D/%5Bname%5D/page-da0d5e71857f33d1.js"],"PlatformShellClient"]
|
|
11
11
|
b:I[6032,[],"OutletBoundary"]
|
|
12
12
|
d:I[9769,[],"AsyncMetadataOutlet"]
|
|
13
13
|
f:I[6032,[],"ViewportBoundary"]
|
|
@@ -15,8 +15,8 @@ f:I[6032,[],"ViewportBoundary"]
|
|
|
15
15
|
13:I[9247,[],""]
|
|
16
16
|
:HL["/_next/static/media/22a5144ee8d83bca-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
17
17
|
:HL["/_next/static/media/7d4881bb7e1bf84d-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
18
|
-
:HL["/_next/static/css/
|
|
19
|
-
0:{"P":null,"b":"
|
|
18
|
+
:HL["/_next/static/css/7618766dbe836b27.css","style"]
|
|
19
|
+
0:{"P":null,"b":"GyUKT-hZbRN2iexOBXTTr","p":"","c":["","platform-shell","placeholder","placeholder"],"i":false,"f":[[["",{"children":["platform-shell",{"children":[["userId","placeholder","d"],{"children":[["name","placeholder","d"],{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/7618766dbe836b27.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_246ccd __variable_c29908 font-sans antialiased","children":["$","$L2",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"disableTransitionOnChange":true,"children":[["$","$L3",null,{"children":[["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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"}],["$","$L6",null,{}],["$","$L7",null,{}]]}],["$","$L8",null,{}]]}]}]}]]}],{"children":["platform-shell",["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["userId","placeholder","d"],["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["name","placeholder","d"],["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$9",null,{"fallback":null,"children":["$","$La",null,{}]}],null,["$","$Lb",null,{"children":["$Lc",["$","$Ld",null,{"promise":"$@e"}]]}]]}],{},null,false]},null,false]},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Lf",null,{"children":"$L10"}],["$","meta",null,{"name":"next-size-adjust","content":""}]],["$","$L11",null,{"children":["$","div",null,{"hidden":true,"children":["$","$9",null,{"fallback":null,"children":"$L12"}]}]}]]}],false]],"m":"$undefined","G":["$13",[]],"s":false,"S":true}
|
|
20
20
|
10:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
21
21
|
c:null
|
|
22
22
|
e:{"metadata":[["$","title","0",{"children":"LocalApp"}],["$","meta","1",{"name":"description","content":"Build and share apps"}]],"error":null,"digest":"$undefined"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--GyUKT_hZbRN2iexOBXTTr--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/22a5144ee8d83bca-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/7d4881bb7e1bf84d-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/7618766dbe836b27.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0bed2fdf6baa566e.js"/><script src="/_next/static/chunks/740d80ee-6c0a9504f1fd46f8.js" async=""></script><script src="/_next/static/chunks/66-6f6658280a10fbca.js" async=""></script><script src="/_next/static/chunks/main-app-5b3c67453d8c5b99.js" async=""></script><script src="/_next/static/chunks/308-d74213c6f5179bf0.js" async=""></script><script src="/_next/static/chunks/app/layout-2231382739460b63.js" async=""></script><script src="/_next/static/chunks/265-a58973dbf631dc41.js" async=""></script><script src="/_next/static/chunks/448-280e06e915001cb5.js" async=""></script><script src="/_next/static/chunks/184-184da63eba05808f.js" async=""></script><script src="/_next/static/chunks/86-7105ac54171494a1.js" async=""></script><script src="/_next/static/chunks/416-c15a156fd32eefc3.js" async=""></script><script src="/_next/static/chunks/app/platform-shell-preview/page-52fa7e8c8b480934.js" async=""></script><meta name="next-size-adjust" content=""/><title>LocalApp</title><meta name="description" content="Build and share apps"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_246ccd __variable_c29908 font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","system",null,["light","dark"],null,true,true)</script><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><!--/$--><!--$--><!--/$--><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/webpack-0bed2fdf6baa566e.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[6249,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-2231382739460b63.js\"],\"ThemeProvider\"]\n3:I[8172,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-2231382739460b63.js\"],\"AuthProvider\"]\n4:I[6461,[],\"\"]\n5:I[1129,[],\"\"]\n6:I[2388,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-2231382739460b63.js\"],\"LoginDialog\"]\n7:I[1467,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-2231382739460b63.js\"],\"ChangePasswordDialog\"]\n8:I[3690,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-2231382739460b63.js\"],\"Toaster\"]\n9:\"$Sreact.suspense\"\na:I[8630,[\"265\",\"static/chunks/265-a58973dbf631dc41.js\",\"448\",\"static/chunks/448-280e06e915001cb5.js\",\"184\",\"static/chunks/184-184da63eba05808f.js\",\"86\",\"static/chunks/86-7105ac54171494a1.js\",\"416\",\"static/chunks/416-c15a156fd32eefc3.js\",\"886\",\"static/chunks/app/platform-shell-preview/page-52fa7e8c8b480934.js\"],\"PlatformShellClient\"]\nb:I[6032,[],\"OutletBoundary\"]\nd:I[9769,[],\"AsyncMetadataOutlet\"]\nf:I[6032,[],\"ViewportBoundary\"]\n11:I[6032,[],\"MetadataBoundary\"]\n13:I[9247,[],\"\"]\n:HL[\"/_next/static/media/22a5144ee8d83bca-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/7d4881bb7e1bf84d-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/7618766dbe836b27.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"GyUKT-hZbRN2iexOBXTTr\",\"p\":\"\",\"c\":[\"\",\"platform-shell-preview\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"platform-shell-preview\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/7618766dbe836b27.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_246ccd __variable_c29908 font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"attribute\":\"class\",\"defaultTheme\":\"system\",\"enableSystem\":true,\"disableTransitionOnChange\":true,\"children\":[[\"$\",\"$L3\",null,{\"children\":[[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",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\"}],[\"$\",\"$L6\",null,{}],[\"$\",\"$L7\",null,{}]]}],[\"$\",\"$L8\",null,{}]]}]}]}]]}],{\"children\":[\"platform-shell-preview\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$9\",null,{\"fallback\":null,\"children\":[\"$\",\"$La\",null,{}]}],null,[\"$\",\"$Lb\",null,{\"children\":[\"$Lc\",[\"$\",\"$Ld\",null,{\"promise\":\"$@e\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Lf\",null,{\"children\":\"$L10\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$L11\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$9\",null,{\"fallback\":null,\"children\":\"$L12\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$13\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"10:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nc:null\n"])</script><script>self.__next_f.push([1,"e:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"LocalApp\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Build and share apps\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"12:\"$e:metadata\"\n"])</script></body></html>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
|
-
2:I[
|
|
3
|
-
3:I[8172,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-
|
|
2
|
+
2:I[6249,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"ThemeProvider"]
|
|
3
|
+
3:I[8172,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"AuthProvider"]
|
|
4
4
|
4:I[6461,[],""]
|
|
5
5
|
5:I[1129,[],""]
|
|
6
|
-
6:I[2388,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-
|
|
7
|
-
7:I[1467,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-
|
|
8
|
-
8:I[3690,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-
|
|
6
|
+
6:I[2388,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"LoginDialog"]
|
|
7
|
+
7:I[1467,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"ChangePasswordDialog"]
|
|
8
|
+
8:I[3690,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"Toaster"]
|
|
9
9
|
9:"$Sreact.suspense"
|
|
10
|
-
a:I[
|
|
10
|
+
a:I[8630,["265","static/chunks/265-a58973dbf631dc41.js","448","static/chunks/448-280e06e915001cb5.js","184","static/chunks/184-184da63eba05808f.js","86","static/chunks/86-7105ac54171494a1.js","416","static/chunks/416-c15a156fd32eefc3.js","886","static/chunks/app/platform-shell-preview/page-52fa7e8c8b480934.js"],"PlatformShellClient"]
|
|
11
11
|
b:I[6032,[],"OutletBoundary"]
|
|
12
12
|
d:I[9769,[],"AsyncMetadataOutlet"]
|
|
13
13
|
f:I[6032,[],"ViewportBoundary"]
|
|
@@ -15,8 +15,8 @@ f:I[6032,[],"ViewportBoundary"]
|
|
|
15
15
|
13:I[9247,[],""]
|
|
16
16
|
:HL["/_next/static/media/22a5144ee8d83bca-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
17
17
|
:HL["/_next/static/media/7d4881bb7e1bf84d-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
18
|
-
:HL["/_next/static/css/
|
|
19
|
-
0:{"P":null,"b":"
|
|
18
|
+
:HL["/_next/static/css/7618766dbe836b27.css","style"]
|
|
19
|
+
0:{"P":null,"b":"GyUKT-hZbRN2iexOBXTTr","p":"","c":["","platform-shell-preview"],"i":false,"f":[[["",{"children":["platform-shell-preview",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/7618766dbe836b27.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_246ccd __variable_c29908 font-sans antialiased","children":["$","$L2",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"disableTransitionOnChange":true,"children":[["$","$L3",null,{"children":[["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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"}],["$","$L6",null,{}],["$","$L7",null,{}]]}],["$","$L8",null,{}]]}]}]}]]}],{"children":["platform-shell-preview",["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$9",null,{"fallback":null,"children":["$","$La",null,{}]}],null,["$","$Lb",null,{"children":["$Lc",["$","$Ld",null,{"promise":"$@e"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Lf",null,{"children":"$L10"}],["$","meta",null,{"name":"next-size-adjust","content":""}]],["$","$L11",null,{"children":["$","div",null,{"hidden":true,"children":["$","$9",null,{"fallback":null,"children":"$L12"}]}]}]]}],false]],"m":"$undefined","G":["$13",[]],"s":false,"S":true}
|
|
20
20
|
10:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
21
21
|
c:null
|
|
22
22
|
e:{"metadata":[["$","title","0",{"children":"LocalApp"}],["$","meta","1",{"name":"description","content":"Build and share apps"}]],"error":null,"digest":"$undefined"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--CqtRUQyhpQ2FmEc3vaVz3--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/22a5144ee8d83bca-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/7d4881bb7e1bf84d-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/afdc0938fca59693.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0bed2fdf6baa566e.js"/><script src="/_next/static/chunks/740d80ee-6c0a9504f1fd46f8.js" async=""></script><script src="/_next/static/chunks/66-6f6658280a10fbca.js" async=""></script><script src="/_next/static/chunks/main-app-5b3c67453d8c5b99.js" async=""></script><script src="/_next/static/chunks/308-d74213c6f5179bf0.js" async=""></script><script src="/_next/static/chunks/app/layout-5557bc90d966fded.js" async=""></script><script src="/_next/static/chunks/265-a58973dbf631dc41.js" async=""></script><script src="/_next/static/chunks/app/setup/page-9e29d6f66825a8f8.js" async=""></script><meta name="next-size-adjust" content=""/><title>LocalApp</title><meta name="description" content="Build and share apps"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_246ccd __variable_c29908 font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","system",null,["light","dark"],null,true,true)</script><main class="flex min-h-screen items-center justify-center bg-muted/30 p-4"><section class="w-full max-w-md rounded-xl border bg-card p-6 shadow-sm"><div class="mb-6 flex items-center gap-3"><div class="flex size-10 items-center justify-center rounded-lg bg-primary/10 text-primary"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-shield-check size-5" aria-hidden="true"><path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"></path><path d="m9 12 2 2 4-4"></path></svg></div><div><h1 class="text-xl font-bold">初始化 LocalApp</h1><p class="text-sm text-muted-foreground">创建第一个管理员账户</p></div></div><form class="space-y-4"><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="setup-username">管理员用户名</label><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50" id="setup-username" autoComplete="username" required="" value=""/></div><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="setup-password">管理员密码</label><input type="password" class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50" id="setup-password" autoComplete="new-password" minLength="6" required="" value=""/></div><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-9 px-4 py-2 w-full" type="submit">初始化 LocalApp</button></form></section></main><!--$--><!--/$--><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/webpack-0bed2fdf6baa566e.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[8630,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-5557bc90d966fded.js\"],\"ThemeProvider\"]\n3:I[8172,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-5557bc90d966fded.js\"],\"AuthProvider\"]\n4:I[6461,[],\"\"]\n5:I[1129,[],\"\"]\n6:I[2388,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-5557bc90d966fded.js\"],\"LoginDialog\"]\n7:I[1467,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-5557bc90d966fded.js\"],\"ChangePasswordDialog\"]\n8:I[3690,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-5557bc90d966fded.js\"],\"Toaster\"]\n9:I[5959,[\"265\",\"static/chunks/265-a58973dbf631dc41.js\",\"620\",\"static/chunks/app/setup/page-9e29d6f66825a8f8.js\"],\"SetupPage\"]\na:I[6032,[],\"OutletBoundary\"]\nc:I[9769,[],\"AsyncMetadataOutlet\"]\ne:I[6032,[],\"ViewportBoundary\"]\n10:I[6032,[],\"MetadataBoundary\"]\n11:\"$Sreact.suspense\"\n13:I[9247,[],\"\"]\n:HL[\"/_next/static/media/22a5144ee8d83bca-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/7d4881bb7e1bf84d-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/afdc0938fca59693.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"CqtRUQyhpQ2FmEc3vaVz3\",\"p\":\"\",\"c\":[\"\",\"setup\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"setup\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/afdc0938fca59693.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_246ccd __variable_c29908 font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"attribute\":\"class\",\"defaultTheme\":\"system\",\"enableSystem\":true,\"disableTransitionOnChange\":true,\"children\":[[\"$\",\"$L3\",null,{\"children\":[[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",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\"}],[\"$\",\"$L6\",null,{}],[\"$\",\"$L7\",null,{}]]}],[\"$\",\"$L8\",null,{}]]}]}]}]]}],{\"children\":[\"setup\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L9\",null,{}],null,[\"$\",\"$La\",null,{\"children\":[\"$Lb\",[\"$\",\"$Lc\",null,{\"promise\":\"$@d\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Le\",null,{\"children\":\"$Lf\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$L10\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$11\",null,{\"fallback\":null,\"children\":\"$L12\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$13\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"f:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nb:null\n"])</script><script>self.__next_f.push([1,"d:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"LocalApp\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Build and share apps\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"12:\"$d:metadata\"\n"])</script></body></html>
|
|
1
|
+
<!DOCTYPE html><!--GyUKT_hZbRN2iexOBXTTr--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/22a5144ee8d83bca-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/7d4881bb7e1bf84d-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/7618766dbe836b27.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0bed2fdf6baa566e.js"/><script src="/_next/static/chunks/740d80ee-6c0a9504f1fd46f8.js" async=""></script><script src="/_next/static/chunks/66-6f6658280a10fbca.js" async=""></script><script src="/_next/static/chunks/main-app-5b3c67453d8c5b99.js" async=""></script><script src="/_next/static/chunks/308-d74213c6f5179bf0.js" async=""></script><script src="/_next/static/chunks/app/layout-2231382739460b63.js" async=""></script><script src="/_next/static/chunks/265-a58973dbf631dc41.js" async=""></script><script src="/_next/static/chunks/app/setup/page-9e29d6f66825a8f8.js" async=""></script><meta name="next-size-adjust" content=""/><title>LocalApp</title><meta name="description" content="Build and share apps"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_246ccd __variable_c29908 font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","system",null,["light","dark"],null,true,true)</script><main class="flex min-h-screen items-center justify-center bg-muted/30 p-4"><section class="w-full max-w-md rounded-xl border bg-card p-6 shadow-sm"><div class="mb-6 flex items-center gap-3"><div class="flex size-10 items-center justify-center rounded-lg bg-primary/10 text-primary"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-shield-check size-5" aria-hidden="true"><path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"></path><path d="m9 12 2 2 4-4"></path></svg></div><div><h1 class="text-xl font-bold">初始化 LocalApp</h1><p class="text-sm text-muted-foreground">创建第一个管理员账户</p></div></div><form class="space-y-4"><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="setup-username">管理员用户名</label><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50" id="setup-username" autoComplete="username" required="" value=""/></div><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="setup-password">管理员密码</label><input type="password" class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50" id="setup-password" autoComplete="new-password" minLength="6" required="" value=""/></div><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-9 px-4 py-2 w-full" type="submit">初始化 LocalApp</button></form></section></main><!--$--><!--/$--><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/webpack-0bed2fdf6baa566e.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[6249,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-2231382739460b63.js\"],\"ThemeProvider\"]\n3:I[8172,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-2231382739460b63.js\"],\"AuthProvider\"]\n4:I[6461,[],\"\"]\n5:I[1129,[],\"\"]\n6:I[2388,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-2231382739460b63.js\"],\"LoginDialog\"]\n7:I[1467,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-2231382739460b63.js\"],\"ChangePasswordDialog\"]\n8:I[3690,[\"308\",\"static/chunks/308-d74213c6f5179bf0.js\",\"177\",\"static/chunks/app/layout-2231382739460b63.js\"],\"Toaster\"]\n9:I[5959,[\"265\",\"static/chunks/265-a58973dbf631dc41.js\",\"620\",\"static/chunks/app/setup/page-9e29d6f66825a8f8.js\"],\"SetupPage\"]\na:I[6032,[],\"OutletBoundary\"]\nc:I[9769,[],\"AsyncMetadataOutlet\"]\ne:I[6032,[],\"ViewportBoundary\"]\n10:I[6032,[],\"MetadataBoundary\"]\n11:\"$Sreact.suspense\"\n13:I[9247,[],\"\"]\n:HL[\"/_next/static/media/22a5144ee8d83bca-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/7d4881bb7e1bf84d-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/7618766dbe836b27.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"GyUKT-hZbRN2iexOBXTTr\",\"p\":\"\",\"c\":[\"\",\"setup\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"setup\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/7618766dbe836b27.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_246ccd __variable_c29908 font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"attribute\":\"class\",\"defaultTheme\":\"system\",\"enableSystem\":true,\"disableTransitionOnChange\":true,\"children\":[[\"$\",\"$L3\",null,{\"children\":[[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",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\"}],[\"$\",\"$L6\",null,{}],[\"$\",\"$L7\",null,{}]]}],[\"$\",\"$L8\",null,{}]]}]}]}]]}],{\"children\":[\"setup\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L9\",null,{}],null,[\"$\",\"$La\",null,{\"children\":[\"$Lb\",[\"$\",\"$Lc\",null,{\"promise\":\"$@d\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Le\",null,{\"children\":\"$Lf\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$L10\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$11\",null,{\"fallback\":null,\"children\":\"$L12\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$13\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"f:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nb:null\n"])</script><script>self.__next_f.push([1,"d:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"LocalApp\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Build and share apps\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"12:\"$d:metadata\"\n"])</script></body></html>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
|
-
2:I[
|
|
3
|
-
3:I[8172,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-
|
|
2
|
+
2:I[6249,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"ThemeProvider"]
|
|
3
|
+
3:I[8172,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"AuthProvider"]
|
|
4
4
|
4:I[6461,[],""]
|
|
5
5
|
5:I[1129,[],""]
|
|
6
|
-
6:I[2388,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-
|
|
7
|
-
7:I[1467,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-
|
|
8
|
-
8:I[3690,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-
|
|
6
|
+
6:I[2388,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"LoginDialog"]
|
|
7
|
+
7:I[1467,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"ChangePasswordDialog"]
|
|
8
|
+
8:I[3690,["308","static/chunks/308-d74213c6f5179bf0.js","177","static/chunks/app/layout-2231382739460b63.js"],"Toaster"]
|
|
9
9
|
9:I[5959,["265","static/chunks/265-a58973dbf631dc41.js","620","static/chunks/app/setup/page-9e29d6f66825a8f8.js"],"SetupPage"]
|
|
10
10
|
a:I[6032,[],"OutletBoundary"]
|
|
11
11
|
c:I[9769,[],"AsyncMetadataOutlet"]
|
|
@@ -15,8 +15,8 @@ e:I[6032,[],"ViewportBoundary"]
|
|
|
15
15
|
13:I[9247,[],""]
|
|
16
16
|
:HL["/_next/static/media/22a5144ee8d83bca-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
17
17
|
:HL["/_next/static/media/7d4881bb7e1bf84d-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
18
|
-
:HL["/_next/static/css/
|
|
19
|
-
0:{"P":null,"b":"
|
|
18
|
+
:HL["/_next/static/css/7618766dbe836b27.css","style"]
|
|
19
|
+
0:{"P":null,"b":"GyUKT-hZbRN2iexOBXTTr","p":"","c":["","setup"],"i":false,"f":[[["",{"children":["setup",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/7618766dbe836b27.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_246ccd __variable_c29908 font-sans antialiased","children":["$","$L2",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"disableTransitionOnChange":true,"children":[["$","$L3",null,{"children":[["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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"}],["$","$L6",null,{}],["$","$L7",null,{}]]}],["$","$L8",null,{}]]}]}]}]]}],{"children":["setup",["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L9",null,{}],null,["$","$La",null,{"children":["$Lb",["$","$Lc",null,{"promise":"$@d"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Le",null,{"children":"$Lf"}],["$","meta",null,{"name":"next-size-adjust","content":""}]],["$","$L10",null,{"children":["$","div",null,{"hidden":true,"children":["$","$11",null,{"fallback":null,"children":"$L12"}]}]}]]}],false]],"m":"$undefined","G":["$13",[]],"s":false,"S":true}
|
|
20
20
|
f:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
21
21
|
b:null
|
|
22
22
|
d:{"metadata":[["$","title","0",{"children":"LocalApp"}],["$","meta","1",{"name":"description","content":"Build and share apps"}]],"error":null,"digest":"$undefined"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: localapp-collaboration
|
|
3
|
+
description: >
|
|
4
|
+
LocalApp 多人协作指南。当应用需要 CRDT、Yjs、多人同时编辑、离线合并、协作光标、
|
|
5
|
+
标记谁正在编辑字段或用遮罩显示编辑区域时触发。
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# LocalApp 实时协作
|
|
9
|
+
|
|
10
|
+
LocalApp 提供两种互补协作模型。业务表单、任务和审批记录优先使用 named SQL;需要显式保存冲突时使用
|
|
11
|
+
`record-versioned`。只有文本、富文本、白板或结构化共享文档等必须自动合并的内容才使用可选
|
|
12
|
+
`@localapp/crdt`。不要创建应用私有 WebSocket Server 或第二套用户系统。
|
|
13
|
+
|
|
14
|
+
## 启用 CRDT
|
|
15
|
+
|
|
16
|
+
应用模板已把 `@localapp/crdt` 作为可选内置包。使用时在 `manifest.json` 同时声明平台要求和资源:
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"platformVersion": "^1.3",
|
|
21
|
+
"requires": {
|
|
22
|
+
"backend": "named-sql",
|
|
23
|
+
"identity": ["currentUser", "pageOwner"],
|
|
24
|
+
"primitives": ["crdt", "editing-awareness-overlay"]
|
|
25
|
+
},
|
|
26
|
+
"collaboration": {
|
|
27
|
+
"enabled": true,
|
|
28
|
+
"overlay": true,
|
|
29
|
+
"resources": {
|
|
30
|
+
"documents": {
|
|
31
|
+
"mode": "crdt",
|
|
32
|
+
"read": "authenticated",
|
|
33
|
+
"write": "authenticated",
|
|
34
|
+
"maxDocumentBytes": 5242880,
|
|
35
|
+
"awareness": true,
|
|
36
|
+
"overlay": true
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`read` 可为 `public | authenticated | owner | acl`;`write` 不允许 `public`。使用 `acl` 时声明用户 ID 或
|
|
44
|
+
`group:<name>`。权限按整份文档执行,字段级秘密必须拆成不同资源或文档。
|
|
45
|
+
|
|
46
|
+
## React 用法
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
import { useLocalAppCrdt, useEditingTarget } from "@localapp/crdt/react";
|
|
50
|
+
|
|
51
|
+
const { provider, doc, status, peers } = useLocalAppCrdt({
|
|
52
|
+
resource: "documents",
|
|
53
|
+
documentId: `proposal-${proposalId}`,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
useEditingTarget(provider, {
|
|
57
|
+
surfaceId: `proposal:${proposalId}`,
|
|
58
|
+
fieldId: "title",
|
|
59
|
+
label: "标题",
|
|
60
|
+
}, titleFocused);
|
|
61
|
+
|
|
62
|
+
const title = doc.getText("title");
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
编辑器本身负责把输入绑定到 `Y.Text`、`Y.Map` 或 `Y.Array`。富文本、CodeMirror、Monaco 等使用对应的
|
|
66
|
+
Yjs binding;不要在 React state 与 Yjs 之间双向全量覆盖。
|
|
67
|
+
|
|
68
|
+
## Editing Awareness 遮罩
|
|
69
|
+
|
|
70
|
+
应用只声明稳定目标,不发送 CSS selector 或用户资料:
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
<section data-localapp-edit-surface={`proposal:${proposalId}`}>
|
|
74
|
+
<input data-localapp-edit-field="title" />
|
|
75
|
+
</section>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Server 从当前 Session 生成用户 ID、姓名、头像和颜色;Platform Shell 只在
|
|
79
|
+
`[data-localapp-app-root]` 内精确匹配这些 data attribute,并绘制不拦截交互的半透明遮罩。自己的 client 不会
|
|
80
|
+
显示为远端遮罩;失焦、卸载或离线超时后状态自动清除。
|
|
81
|
+
|
|
82
|
+
`surfaceId` / `fieldId` 必须稳定,不使用数组下标。虚拟列表重新挂载后保留相同 ID。选区位置使用包导出的
|
|
83
|
+
`encodeRelativePosition()` / `decodeRelativePosition()`,不要保存绝对字符 offset。
|
|
84
|
+
|
|
85
|
+
## 验证
|
|
86
|
+
|
|
87
|
+
1. 两个独立登录 Session 同时编辑同一文档,确认双方最终 `Y.Doc` 收敛。
|
|
88
|
+
2. 断网编辑后恢复,确认本地更新上传且没有 revision 冲突。
|
|
89
|
+
3. 只读、未登录和错误 ACL 写入必须失败。
|
|
90
|
+
4. 在一个页面聚焦标记字段,另一页面必须看到姓名遮罩;失焦或关闭页面后遮罩消失。
|
|
91
|
+
5. 滚动、响应式变化和目标重新挂载后遮罩继续跟随,且遮罩层保持 `pointer-events: none`。
|
|
92
|
+
6. 通过正式 `/<owner>/<app>/` URL 使用应用内 Browser 验收,不以 raw `/serve/` 页面代替。
|
package/template/AGENTS.md
CHANGED
|
@@ -31,3 +31,9 @@ Device Action 脚本是当前操作系统用户代码:保持输入校验、路
|
|
|
31
31
|
- PDF 预览使用模板已固定的 `react-pdf` 与 `pdfjs-dist`,图片预览使用 `yet-another-react-lightbox` 或等价可访问组件,并清理 object URL。
|
|
32
32
|
- 业务状态使用 `manifest.business` 与 named mutation/transition,权限由 Server 后端执行,前端权限组件只负责展示。
|
|
33
33
|
- 应用专属的目录、市场元数据和外部工具适配器属于应用自身,不修改通用 Server 或 Device Action skill。
|
|
34
|
+
|
|
35
|
+
## 实时协作
|
|
36
|
+
|
|
37
|
+
普通表单记录继续使用 named SQL 或 `record-versioned` 协作;只有文本、富文本、白板等必须自动合并的内容才使用可选的 `@localapp/crdt`。使用前阅读 `.claude/skills/localapp-collaboration/SKILL.md`,在 manifest 声明 CRDT 资源、`platformVersion: ^1.3` 及所需 primitives。
|
|
38
|
+
|
|
39
|
+
需要显示“谁正在编辑什么”时,在应用 DOM 上提供稳定的 `data-localapp-edit-surface` / `data-localapp-edit-field`,并通过 provider 发送 editing target。遮罩由 Platform Shell 绘制;应用不要发送 CSS selector、用户身份、颜色,也不要自行实现另一套 presence 服务。
|
package/template/CLAUDE.md
CHANGED
|
@@ -72,6 +72,12 @@ backend/resources/<resource>/
|
|
|
72
72
|
- 页面上的缓存与 localStorage 不能替代 Server 权限。
|
|
73
73
|
- 通知先进入 Web 收件箱;应用只创建平台通知,不直接调用系统通知 API。
|
|
74
74
|
|
|
75
|
+
## 实时协作
|
|
76
|
+
|
|
77
|
+
普通业务记录优先使用 named SQL;需要 revision 冲突提示时使用 `record-versioned`。文本、富文本、白板等必须自动合并时才启用可选 `@localapp/crdt`,并先阅读 `.claude/skills/localapp-collaboration/SKILL.md`。
|
|
78
|
+
|
|
79
|
+
CRDT 应用声明 `platformVersion: ^1.3`、`requires.primitives` 和 `manifest.collaboration.resources`。编辑位置通过稳定的 `data-localapp-edit-surface` / `data-localapp-edit-field` 暴露给 Platform Shell;不要自行实现用户身份、Awareness Server 或遮罩层。
|
|
80
|
+
|
|
75
81
|
## 文件、图片与 PDF
|
|
76
82
|
|
|
77
83
|
上传使用 SDK content API,数据库只保存受保护的 file key、文件名、MIME、大小和业务 owner。下载和预览使用 SDK 返回的 authenticated content URL。
|
package/template/package.json
CHANGED
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
"yet-another-react-lightbox": "3.32.1"
|
|
52
52
|
},
|
|
53
53
|
"optionalDependencies": {
|
|
54
|
-
"@localapp/sdk-agent": "file:./.localapp/runtime/sdk/agent"
|
|
54
|
+
"@localapp/sdk-agent": "file:./.localapp/runtime/sdk/agent",
|
|
55
|
+
"@localapp/crdt": "file:./.localapp/runtime/sdk/crdt"
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
58
|
"@sinclair/typebox": "^0.34.49",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./capabilities.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"platformVersion": "1.
|
|
4
|
+
"platformVersion": "1.3.0",
|
|
5
5
|
"content": {
|
|
6
6
|
"upload": {
|
|
7
7
|
"enabled": true,
|
|
@@ -94,6 +94,18 @@
|
|
|
94
94
|
"pageOwner": true,
|
|
95
95
|
"groups": true
|
|
96
96
|
},
|
|
97
|
+
"collaboration": {
|
|
98
|
+
"recordVersioned": {
|
|
99
|
+
"enabled": true
|
|
100
|
+
},
|
|
101
|
+
"crdt": {
|
|
102
|
+
"enabled": true,
|
|
103
|
+
"protocol": "yjs-v1",
|
|
104
|
+
"maxDocumentBytes": 16777216,
|
|
105
|
+
"awareness": true,
|
|
106
|
+
"editingOverlay": true
|
|
107
|
+
}
|
|
108
|
+
},
|
|
97
109
|
"verification": {
|
|
98
110
|
"enabled": true,
|
|
99
111
|
"isolatedDatabase": true,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@localapp/crdt",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Optional LocalApp CRDT collaboration provider and editing awareness",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./src/index.ts",
|
|
7
|
+
"types": "./src/index.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./src/index.ts",
|
|
10
|
+
"./react": "./src/react.ts"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"src"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@localapp/sdk": "file:../core",
|
|
18
|
+
"yjs": "^13.6.32"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"react": "^18.3.0"
|
|
22
|
+
},
|
|
23
|
+
"peerDependenciesMeta": {
|
|
24
|
+
"react": {
|
|
25
|
+
"optional": true
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/react": "^18.3.0",
|
|
30
|
+
"react": "^18.3.0",
|
|
31
|
+
"typescript": "^5.4.0",
|
|
32
|
+
"vitest": "^4.1.7"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsc -p tsconfig.json",
|
|
36
|
+
"test": "vitest run",
|
|
37
|
+
"clean": "rimraf dist"
|
|
38
|
+
}
|
|
39
|
+
}
|