@dopame/acde-linux-x64 0.0.0-stage → 0.0.10
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 +8 -0
- package/bin/acde +66 -0
- package/bin/acde.cmd +45 -0
- package/bin/acdebin-dbg +4 -0
- package/bin/app/brand/art.mjs +53 -0
- package/bin/app/brand/brand.css +39 -0
- package/bin/app/brand/lockup.mjs +17 -0
- package/bin/app/brand/mark.mjs +124 -0
- package/bin/app/dist/broker.js +1 -0
- package/bin/app/dist/web.js +1 -0
- package/bin/app/greet/index.html +177 -0
- package/bin/app/greet/package.json +16 -0
- package/bin/app/package.json +35 -0
- package/lib/acde/LICENSE +8 -0
- package/lib/acde/dist/chunk-0n69bv5q.js +1 -0
- package/lib/acde/dist/chunk-1cw92x19.js +1 -0
- package/lib/acde/dist/chunk-458e14zb.js +1 -0
- package/lib/acde/dist/chunk-88mxgp54.js +1 -0
- package/lib/acde/dist/chunk-8dv09ven.js +1 -0
- package/lib/acde/dist/chunk-8fxsj5h6.js +1 -0
- package/lib/acde/dist/chunk-8pf3kk8v.js +1 -0
- package/lib/acde/dist/chunk-8r65bz1e.js +1 -0
- package/lib/acde/dist/chunk-9hpnkmxn.js +1 -0
- package/lib/acde/dist/chunk-a7w41xr9.js +1 -0
- package/lib/acde/dist/chunk-db7qqt8a.js +1 -0
- package/lib/acde/dist/chunk-e3rzr5fj.js +1 -0
- package/lib/acde/dist/chunk-ehms6xjp.js +1 -0
- package/lib/acde/dist/chunk-ggykhab6.js +1 -0
- package/lib/acde/dist/chunk-gt70e8h2.js +1 -0
- package/lib/acde/dist/chunk-hcf0xd5c.js +1 -0
- package/lib/acde/dist/chunk-hdrvz9sa.js +1 -0
- package/lib/acde/dist/chunk-jjq2mn94.js +1 -0
- package/lib/acde/dist/chunk-k8f4m94e.js +7 -0
- package/lib/acde/dist/chunk-mtgy1bm0.js +1 -0
- package/lib/acde/dist/chunk-mtw6p7kv.js +1 -0
- package/lib/acde/dist/chunk-nwkq7cpp.js +1 -0
- package/lib/acde/dist/chunk-nyr54266.js +1 -0
- package/lib/acde/dist/chunk-p0h5kspx.js +1 -0
- package/lib/acde/dist/chunk-pdj3h86e.js +1 -0
- package/lib/acde/dist/chunk-q9dbzac5.js +1 -0
- package/lib/acde/dist/chunk-qrhbrjzk.js +1 -0
- package/lib/acde/dist/chunk-s8p0y5ap.js +1 -0
- package/lib/acde/dist/chunk-t0xqxe00.js +1 -0
- package/lib/acde/dist/chunk-tgn5c2mw.js +1 -0
- package/lib/acde/dist/chunk-wmj6zwvn.js +1 -0
- package/lib/acde/dist/chunk-wnk81fkc.js +1 -0
- package/lib/acde/dist/chunk-x208z38w.js +1 -0
- package/lib/acde/dist/chunk-xq76vbg6.js +1 -0
- package/lib/acde/dist/chunk-xr9gh5x2.js +1 -0
- package/lib/acde/dist/chunk-yytnhz6e.js +1 -0
- package/lib/acde/dist/chunk-z0ts25s1.js +1 -0
- package/lib/acde/dist/chunk-zdyw1ckt.js +1 -0
- package/lib/acde/dist/cli.js +1 -0
- package/lib/acde/dist/driver/index.js +1 -0
- package/lib/acde/dist/e2e/index.js +1 -0
- package/lib/acde/dist/types/configs.d.ts +1 -0
- package/lib/acde/dist/types/driver/acde.d.ts +106 -0
- package/lib/acde/dist/types/driver/clock.d.ts +32 -0
- package/lib/acde/dist/types/driver/expect.d.ts +60 -0
- package/lib/acde/dist/types/driver/format.d.ts +16 -0
- package/lib/acde/dist/types/driver/index.d.ts +13 -0
- package/lib/acde/dist/types/driver/input.d.ts +75 -0
- package/lib/acde/dist/types/driver/locator.d.ts +151 -0
- package/lib/acde/dist/types/driver/logs.d.ts +26 -0
- package/lib/acde/dist/types/driver/png.d.ts +31 -0
- package/lib/acde/dist/types/driver/poll.d.ts +4 -0
- package/lib/acde/dist/types/driver/screenshot.d.ts +37 -0
- package/lib/acde/dist/types/driver/trace.d.ts +26 -0
- package/lib/acde/dist/types/driver/types.d.ts +213 -0
- package/lib/acde/dist/types/driver/video.d.ts +14 -0
- package/lib/acde/dist/types/driver/window.d.ts +77 -0
- package/lib/acde/dist/types/e2e/index.d.ts +78 -0
- package/lib/acde/dist/types/e2e/settings.d.ts +39 -0
- package/lib/acde/dist/types/ipc.d.ts +24 -0
- package/lib/acde/dist/types/paths.d.ts +5 -0
- package/lib/acde/dist/types/pm.d.ts +20 -0
- package/lib/acde/dist/types/runtime.d.ts +49 -0
- package/lib/acde/dist/types/sessions.d.ts +80 -0
- package/lib/acde/dist/types/sockets.d.ts +4 -0
- package/lib/acde/launcher.d.mts +25 -0
- package/lib/acde/launcher.mjs +1 -0
- package/lib/acde/package.json +31 -0
- package/lib/acde/skills/acde/SKILL.md +114 -0
- package/lib/acde/skills/acde/references/guide/agents.md +50 -0
- package/lib/acde/skills/acde/references/guide/assets.md +40 -0
- package/lib/acde/skills/acde/references/guide/backend.md +94 -0
- package/lib/acde/skills/acde/references/guide/capabilities.md +157 -0
- package/lib/acde/skills/acde/references/guide/config.md +73 -0
- package/lib/acde/skills/acde/references/guide/desktop.md +165 -0
- package/lib/acde/skills/acde/references/guide/dev.md +66 -0
- package/lib/acde/skills/acde/references/guide/doctor.md +144 -0
- package/lib/acde/skills/acde/references/guide/files.md +181 -0
- package/lib/acde/skills/acde/references/guide/frameworks.md +74 -0
- package/lib/acde/skills/acde/references/guide/install.md +34 -0
- package/lib/acde/skills/acde/references/guide/mcp.md +64 -0
- package/lib/acde/skills/acde/references/guide/open.md +107 -0
- package/lib/acde/skills/acde/references/guide/services.md +147 -0
- package/lib/acde/skills/acde/references/guide/testing.md +378 -0
- package/lib/acde/skills/acde/references/guide/tools.md +291 -0
- package/lib/acde/skills/acde/references/guide/window.md +167 -0
- package/lib/acde/skills/acde/references/reference/cli.md +221 -0
- package/lib/acde/skills/acde/references/reference/config.md +51 -0
- package/lib/acde/skills/acde/references/reference/env.md +44 -0
- package/lib/acde/skills/acde/references/reference/manifest.md +92 -0
- package/lib/acde/skills/acde/references/reference/modules.md +586 -0
- package/lib/acde/skills/acde/references/reference/platforms.md +23 -0
- package/lib/acde/skills/acde/references/reference/service.md +47 -0
- package/lib/acde/skills/acde/references/reference/testing.md +265 -0
- package/lib/acde/skills/acde/references/reference/web.md +94 -0
- package/lib/acde/skills/acde/references/start/first-app.md +87 -0
- package/lib/acde/skills/acde/references/start/install.md +232 -0
- package/lib/acde/skills/acde/references/start/project.md +77 -0
- package/lib/acde/templates/app/acde.config.jsonc +27 -0
- package/lib/acde/templates/app/gitignore +2 -0
- package/lib/acde/templates/app/index.html +22 -0
- package/lib/acde/templates/app/package.json +5 -0
- package/lib/acde/templates/app/src/i18n.js +26 -0
- package/lib/acde/templates/app/src/locales/en.js +4 -0
- package/lib/acde/templates/app/src/locales/zh.js +4 -0
- package/lib/acde/templates/app/src/main.js +5 -0
- package/lib/acde/templates/backend/server.ts +7 -0
- package/lib/acde/templates/backend/src/main.js +6 -0
- package/lib/acde/templates/desktop/acde.config.jsonc +17 -0
- package/lib/acde/templates/desktop/gitignore +2 -0
- package/lib/acde/templates/desktop/index.html +19 -0
- package/lib/acde/templates/desktop/package.json +5 -0
- package/lib/acde/templates/desktop/src/desktop.js +16 -0
- package/lib/acde/templates/desktop/src/i18n.js +26 -0
- package/lib/acde/templates/desktop/src/locales/en.js +4 -0
- package/lib/acde/templates/desktop/src/locales/zh.js +4 -0
- package/lib/acde/templates/framework/acde.config.jsonc +26 -0
- package/lib/acde-api/LICENSE +5 -0
- package/lib/acde-api/config.schema.json +563 -0
- package/lib/acde-api/package.json +51 -0
- package/lib/acde-api/src/app.d.ts +36 -0
- package/lib/acde-api/src/frame.d.ts +15 -0
- package/lib/acde-api/src/frame.js +1 -0
- package/lib/acde-api/src/index.d.ts +11 -0
- package/lib/acde-api/src/index.js +1 -0
- package/lib/acde-api/src/modules/app-modules.d.ts +81 -0
- package/lib/acde-api/src/modules/modules.d.ts +113 -0
- package/lib/acde-api/src/modules/shell-modules.d.ts +32 -0
- package/lib/acde-api/src/runtime/level.d.ts +1 -0
- package/lib/acde-api/src/runtime/level.js +1 -0
- package/lib/acde-api/src/runtime/load.d.ts +8 -0
- package/lib/acde-api/src/runtime/load.js +1 -0
- package/lib/acde-api/src/runtime/places.d.ts +3 -0
- package/lib/acde-api/src/runtime/places.js +1 -0
- package/lib/acde-api/src/runtime/platforms.d.ts +5 -0
- package/lib/acde-api/src/runtime/platforms.js +1 -0
- package/lib/acde-api/src/shell.d.ts +14 -0
- package/lib/acde-api/src/types/capabilities.d.ts +34 -0
- package/lib/acde-api/src/types/config.d.ts +55 -0
- package/lib/acde-api/src/types/events.d.ts +151 -0
- package/lib/acde-api/src/types/manifest.d.ts +83 -0
- package/lib/acde-api/src/types/office.d.ts +118 -0
- package/lib/acde-api/src/types/page.d.ts +1090 -0
- package/lib/acde-api/src/types/permissions.d.ts +50 -0
- package/lib/acde-api/src/types/service.d.ts +35 -0
- package/lib/acde-api/src/validate.d.ts +64 -0
- package/lib/acde-api/src/validate.js +1 -0
- package/lib/acde-api/src/vite.d.ts +3 -0
- package/lib/acde-api/src/vite.js +9 -0
- package/package.json +11 -4
- package/README.md +0 -3
|
@@ -0,0 +1,563 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/dopame-org/acdert/web/packages/acde-api/config.schema.json",
|
|
4
|
+
"title": "acde.config.jsonc",
|
|
5
|
+
"description": "acde 工程的配置: 一个窗口应用 (type app) 或一个桌面 (type desktop); acde build 把它变成包的 package.json 清单",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"name": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "包名, 默认 package.json 的 name"
|
|
16
|
+
},
|
|
17
|
+
"version": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"apiLevel": {
|
|
21
|
+
"type": "integer",
|
|
22
|
+
"minimum": 1,
|
|
23
|
+
"description": "契约级别 (SDK 的 API_LEVEL); 不写时 acde build 写入当前级别"
|
|
24
|
+
},
|
|
25
|
+
"public": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "原样复制的静态文件目录, 默认 public"
|
|
28
|
+
},
|
|
29
|
+
"type": {
|
|
30
|
+
"const": "app"
|
|
31
|
+
},
|
|
32
|
+
"id": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^[a-z0-9][a-z0-9-]*$"
|
|
35
|
+
},
|
|
36
|
+
"label": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"icon": {
|
|
40
|
+
"$ref": "#/$defs/icon"
|
|
41
|
+
},
|
|
42
|
+
"entry": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "HTML 页面 (默认 index.html) 或默认导出 WindowApp 的模块; 认出框架时不用"
|
|
45
|
+
},
|
|
46
|
+
"framework": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"enum": [
|
|
49
|
+
"auto",
|
|
50
|
+
"none",
|
|
51
|
+
"next",
|
|
52
|
+
"nuxt",
|
|
53
|
+
"sveltekit",
|
|
54
|
+
"astro",
|
|
55
|
+
"react-router",
|
|
56
|
+
"remix",
|
|
57
|
+
"angular",
|
|
58
|
+
"vite",
|
|
59
|
+
"cra",
|
|
60
|
+
"script"
|
|
61
|
+
],
|
|
62
|
+
"description": "怎么构建: auto (默认) 按依赖认框架 (Next.js、Nuxt、SvelteKit、Astro、React Router、Remix、Angular、Vite、Create React App, 或 package.json 的 build 脚本) 并用它自己的构建; none 用 acde 自己的打包 (Bun.build, entry 是 HTML 或模块)"
|
|
63
|
+
},
|
|
64
|
+
"capabilities": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"fs": {
|
|
68
|
+
"oneOf": [
|
|
69
|
+
{
|
|
70
|
+
"type": "boolean"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "object",
|
|
74
|
+
"properties": {
|
|
75
|
+
"roots": {
|
|
76
|
+
"type": "array",
|
|
77
|
+
"items": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": [
|
|
83
|
+
"roots"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"terminal": {
|
|
89
|
+
"type": "boolean"
|
|
90
|
+
},
|
|
91
|
+
"office": {
|
|
92
|
+
"type": "boolean"
|
|
93
|
+
},
|
|
94
|
+
"launch": {
|
|
95
|
+
"type": "boolean"
|
|
96
|
+
},
|
|
97
|
+
"slots": {
|
|
98
|
+
"type": "boolean"
|
|
99
|
+
},
|
|
100
|
+
"open": {
|
|
101
|
+
"oneOf": [
|
|
102
|
+
{
|
|
103
|
+
"type": "boolean"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"type": "array",
|
|
107
|
+
"items": {
|
|
108
|
+
"type": "string"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"openFiles": {
|
|
114
|
+
"type": "boolean"
|
|
115
|
+
},
|
|
116
|
+
"session": {
|
|
117
|
+
"type": "boolean",
|
|
118
|
+
"description": "acde:session (注销, 语言 …; 外壳模块, 只给系统应用)"
|
|
119
|
+
},
|
|
120
|
+
"desktops": {
|
|
121
|
+
"type": "boolean",
|
|
122
|
+
"description": "acde:desktops (列出 / 切换桌面; 外壳模块, 只给系统应用)"
|
|
123
|
+
},
|
|
124
|
+
"windows": {
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"description": "acde:windows (所有窗口: 列出、聚焦、隐藏、动画; 外壳模块, 只给系统应用)"
|
|
127
|
+
},
|
|
128
|
+
"packages": {
|
|
129
|
+
"type": "boolean",
|
|
130
|
+
"description": "acde:packages (刷新、安装包, 列出和运行原生程序; 外壳模块, 只给系统应用)"
|
|
131
|
+
},
|
|
132
|
+
"inspect": {
|
|
133
|
+
"type": "boolean",
|
|
134
|
+
"description": "acde:inspect (看和操作桌面; 外壳模块, 只给系统应用)"
|
|
135
|
+
},
|
|
136
|
+
"desktop": {
|
|
137
|
+
"type": "boolean",
|
|
138
|
+
"description": "acde:desktop (桌面事件和钉住的面板; 外壳模块, 只给系统应用)"
|
|
139
|
+
},
|
|
140
|
+
"setDefault": {
|
|
141
|
+
"type": "boolean",
|
|
142
|
+
"description": "acde:setDefault (设默认应用; 外壳模块, 只给系统应用)"
|
|
143
|
+
},
|
|
144
|
+
"camera": {
|
|
145
|
+
"type": "boolean",
|
|
146
|
+
"description": "navigator.mediaDevices.getUserMedia 的摄像头 (还要系统同意: macOS 隐私设置)"
|
|
147
|
+
},
|
|
148
|
+
"microphone": {
|
|
149
|
+
"type": "boolean",
|
|
150
|
+
"description": "navigator.mediaDevices.getUserMedia 的麦克风 (还要系统同意: macOS 隐私设置)"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"additionalProperties": true,
|
|
154
|
+
"description": "acde 的能力; 别的键是桌面服务的名字"
|
|
155
|
+
},
|
|
156
|
+
"optional": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"items": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
"description": "capabilities 里可以缺的几项 (每项也要写在 capabilities 里); 其余都是必需的, 缺了应用不进列表、启动时被拒"
|
|
162
|
+
},
|
|
163
|
+
"services": {
|
|
164
|
+
"type": "array",
|
|
165
|
+
"items": {
|
|
166
|
+
"type": "string"
|
|
167
|
+
},
|
|
168
|
+
"description": "用到的桌面服务名 (照旧 import acde:<名字>); 不能用系统模块的名字"
|
|
169
|
+
},
|
|
170
|
+
"heapMb": {
|
|
171
|
+
"type": "number",
|
|
172
|
+
"minimum": 32
|
|
173
|
+
},
|
|
174
|
+
"size": {
|
|
175
|
+
"type": "array",
|
|
176
|
+
"items": {
|
|
177
|
+
"type": "integer",
|
|
178
|
+
"minimum": 1
|
|
179
|
+
},
|
|
180
|
+
"minItems": 2,
|
|
181
|
+
"maxItems": 2,
|
|
182
|
+
"description": "窗口页面的初始尺寸 [宽, 高], 逻辑像素, 不含窗框; 默认 800x600. 单应用模式 (acdert app) 里是宿主窗口内容区的初始尺寸 (不超出工作区)"
|
|
183
|
+
},
|
|
184
|
+
"multiple": {
|
|
185
|
+
"type": "boolean"
|
|
186
|
+
},
|
|
187
|
+
"frame": {
|
|
188
|
+
"type": "boolean"
|
|
189
|
+
},
|
|
190
|
+
"mimeTypes": {
|
|
191
|
+
"type": "array",
|
|
192
|
+
"items": {
|
|
193
|
+
"type": "string"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"schemes": {
|
|
197
|
+
"type": "array",
|
|
198
|
+
"items": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"pattern": "^[a-z][a-z0-9+.-]*$"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"requests": {
|
|
204
|
+
"type": "array",
|
|
205
|
+
"items": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"backend": {
|
|
211
|
+
"oneOf": [
|
|
212
|
+
{
|
|
213
|
+
"const": false
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"type": "object",
|
|
217
|
+
"properties": {
|
|
218
|
+
"entry": {
|
|
219
|
+
"type": "string"
|
|
220
|
+
},
|
|
221
|
+
"port": {
|
|
222
|
+
"type": "integer",
|
|
223
|
+
"minimum": 0,
|
|
224
|
+
"maximum": 65535
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"additionalProperties": false
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"description": "false: 没有后端; 默认找 server.ts 等"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"required": [
|
|
234
|
+
"type"
|
|
235
|
+
],
|
|
236
|
+
"additionalProperties": false
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"type": "object",
|
|
240
|
+
"properties": {
|
|
241
|
+
"$schema": {
|
|
242
|
+
"type": "string"
|
|
243
|
+
},
|
|
244
|
+
"name": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"description": "包名, 默认 package.json 的 name"
|
|
247
|
+
},
|
|
248
|
+
"version": {
|
|
249
|
+
"type": "string"
|
|
250
|
+
},
|
|
251
|
+
"apiLevel": {
|
|
252
|
+
"type": "integer",
|
|
253
|
+
"minimum": 1,
|
|
254
|
+
"description": "契约级别 (SDK 的 API_LEVEL); 不写时 acde build 写入当前级别"
|
|
255
|
+
},
|
|
256
|
+
"public": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"description": "原样复制的静态文件目录, 默认 public"
|
|
259
|
+
},
|
|
260
|
+
"type": {
|
|
261
|
+
"const": "desktop"
|
|
262
|
+
},
|
|
263
|
+
"id": {
|
|
264
|
+
"type": "string",
|
|
265
|
+
"pattern": "^[a-z0-9][a-z0-9-]*$"
|
|
266
|
+
},
|
|
267
|
+
"label": {
|
|
268
|
+
"type": "string"
|
|
269
|
+
},
|
|
270
|
+
"description": {
|
|
271
|
+
"type": "string"
|
|
272
|
+
},
|
|
273
|
+
"entry": {
|
|
274
|
+
"type": "string",
|
|
275
|
+
"description": "桌面页面, 默认 index.html"
|
|
276
|
+
},
|
|
277
|
+
"heapMb": {
|
|
278
|
+
"type": "number",
|
|
279
|
+
"minimum": 32
|
|
280
|
+
},
|
|
281
|
+
"services": {
|
|
282
|
+
"type": "object",
|
|
283
|
+
"additionalProperties": {
|
|
284
|
+
"oneOf": [
|
|
285
|
+
{
|
|
286
|
+
"type": "string",
|
|
287
|
+
"description": "服务的模块文件"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"type": "object",
|
|
291
|
+
"properties": {
|
|
292
|
+
"module": {
|
|
293
|
+
"type": "string",
|
|
294
|
+
"description": "服务的模块文件"
|
|
295
|
+
},
|
|
296
|
+
"modules": {
|
|
297
|
+
"type": "array",
|
|
298
|
+
"items": {
|
|
299
|
+
"enum": [
|
|
300
|
+
"windows",
|
|
301
|
+
"packages",
|
|
302
|
+
"session",
|
|
303
|
+
"desktops",
|
|
304
|
+
"inspect",
|
|
305
|
+
"desktop",
|
|
306
|
+
"setDefault",
|
|
307
|
+
"permissions"
|
|
308
|
+
]
|
|
309
|
+
},
|
|
310
|
+
"description": "这个服务能用的外壳模块, 服务里 ctx.import('acde:<名字>') 拿到; acde build 写进桌面清单的 {name, modules}"
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"required": [
|
|
314
|
+
"module"
|
|
315
|
+
],
|
|
316
|
+
"additionalProperties": false
|
|
317
|
+
}
|
|
318
|
+
]
|
|
319
|
+
},
|
|
320
|
+
"description": "服务名 → 模块文件, 或 {module, modules} (再列出它能用的外壳模块)"
|
|
321
|
+
},
|
|
322
|
+
"apps": {
|
|
323
|
+
"type": "array",
|
|
324
|
+
"items": {
|
|
325
|
+
"type": "object",
|
|
326
|
+
"properties": {
|
|
327
|
+
"id": {
|
|
328
|
+
"type": "string",
|
|
329
|
+
"pattern": "^[a-z0-9][a-z0-9-]*$"
|
|
330
|
+
},
|
|
331
|
+
"label": {
|
|
332
|
+
"type": "string"
|
|
333
|
+
},
|
|
334
|
+
"icon": {
|
|
335
|
+
"$ref": "#/$defs/icon"
|
|
336
|
+
},
|
|
337
|
+
"entry": {
|
|
338
|
+
"type": "string",
|
|
339
|
+
"description": "HTML 页面 (默认 index.html) 或默认导出 WindowApp 的模块"
|
|
340
|
+
},
|
|
341
|
+
"capabilities": {
|
|
342
|
+
"type": "object",
|
|
343
|
+
"properties": {
|
|
344
|
+
"fs": {
|
|
345
|
+
"oneOf": [
|
|
346
|
+
{
|
|
347
|
+
"type": "boolean"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"type": "object",
|
|
351
|
+
"properties": {
|
|
352
|
+
"roots": {
|
|
353
|
+
"type": "array",
|
|
354
|
+
"items": {
|
|
355
|
+
"type": "string"
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"required": [
|
|
360
|
+
"roots"
|
|
361
|
+
]
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
},
|
|
365
|
+
"terminal": {
|
|
366
|
+
"type": "boolean"
|
|
367
|
+
},
|
|
368
|
+
"office": {
|
|
369
|
+
"type": "boolean"
|
|
370
|
+
},
|
|
371
|
+
"launch": {
|
|
372
|
+
"type": "boolean"
|
|
373
|
+
},
|
|
374
|
+
"slots": {
|
|
375
|
+
"type": "boolean"
|
|
376
|
+
},
|
|
377
|
+
"open": {
|
|
378
|
+
"oneOf": [
|
|
379
|
+
{
|
|
380
|
+
"type": "boolean"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"type": "array",
|
|
384
|
+
"items": {
|
|
385
|
+
"type": "string"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
]
|
|
389
|
+
},
|
|
390
|
+
"openFiles": {
|
|
391
|
+
"type": "boolean"
|
|
392
|
+
},
|
|
393
|
+
"session": {
|
|
394
|
+
"type": "boolean",
|
|
395
|
+
"description": "acde:session (注销, 语言 …; 外壳模块, 只给系统应用)"
|
|
396
|
+
},
|
|
397
|
+
"desktops": {
|
|
398
|
+
"type": "boolean",
|
|
399
|
+
"description": "acde:desktops (列出 / 切换桌面; 外壳模块, 只给系统应用)"
|
|
400
|
+
},
|
|
401
|
+
"windows": {
|
|
402
|
+
"type": "boolean",
|
|
403
|
+
"description": "acde:windows (所有窗口: 列出、聚焦、隐藏、动画; 外壳模块, 只给系统应用)"
|
|
404
|
+
},
|
|
405
|
+
"packages": {
|
|
406
|
+
"type": "boolean",
|
|
407
|
+
"description": "acde:packages (刷新、安装包, 列出和运行原生程序; 外壳模块, 只给系统应用)"
|
|
408
|
+
},
|
|
409
|
+
"inspect": {
|
|
410
|
+
"type": "boolean",
|
|
411
|
+
"description": "acde:inspect (看和操作桌面; 外壳模块, 只给系统应用)"
|
|
412
|
+
},
|
|
413
|
+
"desktop": {
|
|
414
|
+
"type": "boolean",
|
|
415
|
+
"description": "acde:desktop (桌面事件和钉住的面板; 外壳模块, 只给系统应用)"
|
|
416
|
+
},
|
|
417
|
+
"setDefault": {
|
|
418
|
+
"type": "boolean",
|
|
419
|
+
"description": "acde:setDefault (设默认应用; 外壳模块, 只给系统应用)"
|
|
420
|
+
},
|
|
421
|
+
"camera": {
|
|
422
|
+
"type": "boolean",
|
|
423
|
+
"description": "navigator.mediaDevices.getUserMedia 的摄像头 (还要系统同意: macOS 隐私设置)"
|
|
424
|
+
},
|
|
425
|
+
"microphone": {
|
|
426
|
+
"type": "boolean",
|
|
427
|
+
"description": "navigator.mediaDevices.getUserMedia 的麦克风 (还要系统同意: macOS 隐私设置)"
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"additionalProperties": true,
|
|
431
|
+
"description": "acde 的能力; 别的键是桌面服务的名字"
|
|
432
|
+
},
|
|
433
|
+
"optional": {
|
|
434
|
+
"type": "array",
|
|
435
|
+
"items": {
|
|
436
|
+
"type": "string"
|
|
437
|
+
},
|
|
438
|
+
"description": "capabilities 里可以缺的几项 (每项也要写在 capabilities 里); 其余都是必需的, 缺了应用不进列表、启动时被拒"
|
|
439
|
+
},
|
|
440
|
+
"services": {
|
|
441
|
+
"type": "array",
|
|
442
|
+
"items": {
|
|
443
|
+
"type": "string"
|
|
444
|
+
},
|
|
445
|
+
"description": "用到的桌面服务名 (照旧 import acde:<名字>); 不能用系统模块的名字"
|
|
446
|
+
},
|
|
447
|
+
"heapMb": {
|
|
448
|
+
"type": "number",
|
|
449
|
+
"minimum": 32
|
|
450
|
+
},
|
|
451
|
+
"size": {
|
|
452
|
+
"type": "array",
|
|
453
|
+
"items": {
|
|
454
|
+
"type": "integer",
|
|
455
|
+
"minimum": 1
|
|
456
|
+
},
|
|
457
|
+
"minItems": 2,
|
|
458
|
+
"maxItems": 2,
|
|
459
|
+
"description": "窗口页面的初始尺寸 [宽, 高], 逻辑像素, 不含窗框; 默认 800x600. 单应用模式 (acdert app) 里是宿主窗口内容区的初始尺寸 (不超出工作区)"
|
|
460
|
+
},
|
|
461
|
+
"multiple": {
|
|
462
|
+
"type": "boolean"
|
|
463
|
+
},
|
|
464
|
+
"frame": {
|
|
465
|
+
"type": "boolean"
|
|
466
|
+
},
|
|
467
|
+
"mimeTypes": {
|
|
468
|
+
"type": "array",
|
|
469
|
+
"items": {
|
|
470
|
+
"type": "string"
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
"schemes": {
|
|
474
|
+
"type": "array",
|
|
475
|
+
"items": {
|
|
476
|
+
"type": "string",
|
|
477
|
+
"pattern": "^[a-z][a-z0-9+.-]*$"
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
"requests": {
|
|
481
|
+
"type": "array",
|
|
482
|
+
"items": {
|
|
483
|
+
"type": "string",
|
|
484
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
"backend": {
|
|
488
|
+
"oneOf": [
|
|
489
|
+
{
|
|
490
|
+
"const": false
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"type": "object",
|
|
494
|
+
"properties": {
|
|
495
|
+
"entry": {
|
|
496
|
+
"type": "string"
|
|
497
|
+
},
|
|
498
|
+
"port": {
|
|
499
|
+
"type": "integer",
|
|
500
|
+
"minimum": 0,
|
|
501
|
+
"maximum": 65535
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
"additionalProperties": false
|
|
505
|
+
}
|
|
506
|
+
],
|
|
507
|
+
"description": "false: 没有后端; 默认找 server.ts 等"
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
"required": [
|
|
511
|
+
"id",
|
|
512
|
+
"entry"
|
|
513
|
+
],
|
|
514
|
+
"additionalProperties": false
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
"required": [
|
|
519
|
+
"type"
|
|
520
|
+
],
|
|
521
|
+
"additionalProperties": false
|
|
522
|
+
}
|
|
523
|
+
],
|
|
524
|
+
"$defs": {
|
|
525
|
+
"icon": {
|
|
526
|
+
"type": "string",
|
|
527
|
+
"minLength": 1,
|
|
528
|
+
"description": "图标: Dopame 的图标名 (@dopame/acde-api/manifest 的 ICON_NAMES 之一: files, browser, editor, office, term, projects, dash, team, dopa, settings, store, app, timer, cards, list, chart, calc, music, video, photo, paint, game, chat, mail, calendar, code, book, map, weather), 或工程里的一张图片 (.svg / .png, 相对工程目录, acde build 拷进包里); 别的值 acde check 警告",
|
|
529
|
+
"examples": [
|
|
530
|
+
"files",
|
|
531
|
+
"browser",
|
|
532
|
+
"editor",
|
|
533
|
+
"office",
|
|
534
|
+
"term",
|
|
535
|
+
"projects",
|
|
536
|
+
"dash",
|
|
537
|
+
"team",
|
|
538
|
+
"dopa",
|
|
539
|
+
"settings",
|
|
540
|
+
"store",
|
|
541
|
+
"app",
|
|
542
|
+
"timer",
|
|
543
|
+
"cards",
|
|
544
|
+
"list",
|
|
545
|
+
"chart",
|
|
546
|
+
"calc",
|
|
547
|
+
"music",
|
|
548
|
+
"video",
|
|
549
|
+
"photo",
|
|
550
|
+
"paint",
|
|
551
|
+
"game",
|
|
552
|
+
"chat",
|
|
553
|
+
"mail",
|
|
554
|
+
"calendar",
|
|
555
|
+
"code",
|
|
556
|
+
"book",
|
|
557
|
+
"map",
|
|
558
|
+
"weather",
|
|
559
|
+
"icon.svg"
|
|
560
|
+
]
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dopame/acde-api",
|
|
3
|
+
"version": "0.0.10",
|
|
4
|
+
"description": "acde SDK: one devDependency makes a web app (React, Vue, Svelte, any Vite / Next.js / Nuxt / SvelteKit / Astro / Angular project) an acde app. Types of acde.config.jsonc, the manifest, the services and the acde:* modules; load() for optional acde:* modules; the Vite plugin (@dopame/acde-api/vite). The checks acdert applies to a manifest (@dopame/acde-api/manifest). The tools are the acde CLI: acde new / check / build / install / dev",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/dopame-org/acdert",
|
|
11
|
+
"directory": "web/packages/acde-api"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./src/index.d.ts",
|
|
16
|
+
"default": "./src/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./app": {
|
|
19
|
+
"types": "./src/app.d.ts",
|
|
20
|
+
"default": "./src/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./shell": {
|
|
23
|
+
"types": "./src/shell.d.ts",
|
|
24
|
+
"default": "./src/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./vite": {
|
|
27
|
+
"types": "./src/vite.d.ts",
|
|
28
|
+
"default": "./src/vite.js"
|
|
29
|
+
},
|
|
30
|
+
"./manifest": {
|
|
31
|
+
"types": "./src/validate.d.ts",
|
|
32
|
+
"default": "./src/validate.js"
|
|
33
|
+
},
|
|
34
|
+
"./config.schema.json": "./config.schema.json"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"src",
|
|
38
|
+
"config.schema.json"
|
|
39
|
+
],
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"vite": ">=5"
|
|
42
|
+
},
|
|
43
|
+
"peerDependenciesMeta": {
|
|
44
|
+
"vite": {
|
|
45
|
+
"optional": true
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// <reference path="./modules/app-modules.d.ts" />
|
|
2
|
+
import type * as Page from './types/page'
|
|
3
|
+
import type { AcdeCapabilities } from './types/capabilities'
|
|
4
|
+
|
|
5
|
+
export type * from './types/manifest'
|
|
6
|
+
export type * from './types/page'
|
|
7
|
+
export type * from './types/service'
|
|
8
|
+
export type * from './types/config'
|
|
9
|
+
export type * from './types/capabilities'
|
|
10
|
+
export { API_LEVEL } from './runtime/level'
|
|
11
|
+
export { PLATFORM_SUPPORT, RUNNING_MODES, platformSupport } from './runtime/platforms'
|
|
12
|
+
export { SHARED_PLACES, type PlaceCapability, type SharedPlace } from './runtime/places'
|
|
13
|
+
|
|
14
|
+
export interface AppModules {
|
|
15
|
+
readonly fs: Page.AcdeFs
|
|
16
|
+
readonly office: Page.AcdeOffice
|
|
17
|
+
readonly terminal: Page.AcdeTerminals
|
|
18
|
+
readonly network: Page.AcdeNetwork
|
|
19
|
+
readonly system: Page.AcdeSystem
|
|
20
|
+
readonly bluetooth: Page.AcdeBluetooth
|
|
21
|
+
readonly audio: Page.AcdeAudio
|
|
22
|
+
readonly devices: Page.AcdeDevices
|
|
23
|
+
readonly power: Page.AcdePower
|
|
24
|
+
readonly input: Page.AcdeInput
|
|
25
|
+
readonly display: Page.AcdeDisplay
|
|
26
|
+
readonly launch: Page.AcdeLaunch
|
|
27
|
+
readonly apps: Page.AcdeAppList
|
|
28
|
+
readonly open: Page.AcdeOpen
|
|
29
|
+
readonly openPath: Page.AcdeOpenFiles['openPath']
|
|
30
|
+
readonly handlers: Page.AcdeOpenFiles['handlers']
|
|
31
|
+
readonly window: Page.AcdeWindow
|
|
32
|
+
readonly capabilities: AcdeCapabilities
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function load<K extends keyof AppModules>(name: K): Promise<AppModules[K] | null>
|
|
36
|
+
export function load(name: string): Promise<unknown>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface FrameThemeWire {
|
|
2
|
+
readonly colors: readonly number[];
|
|
3
|
+
readonly style: number;
|
|
4
|
+
readonly side: number;
|
|
5
|
+
readonly align: number;
|
|
6
|
+
readonly ignored: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
export declare class FrameThemes {
|
|
9
|
+
#private;
|
|
10
|
+
static readonly KEYS: readonly ["active", "inactive", "light", "buttonStyle", "buttonSide", "titleAlign"];
|
|
11
|
+
static readonly STATES: readonly ["active", "inactive"];
|
|
12
|
+
static readonly COLORS: readonly ["background", "title", "line", "buttons"];
|
|
13
|
+
static color(text: unknown): number | null;
|
|
14
|
+
static parse(raw: unknown): FrameThemeWire | string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class i{static KEYS=["active","inactive","light","buttonStyle","buttonSide","titleAlign"];static STATES=["active","inactive"];static COLORS=["background","title","line","buttons"];static#n={buttonStyle:["dots","glyphs"],buttonSide:["left","right"],titleAlign:["center","start"]};static#t=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;static#r=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d*\.?\d+)\s*)?\)$/i;static color(t){if(typeof t!="string")return null;const n=i.#t.exec(t.trim());if(n){const u=n[1].length<=4?[...n[1]].map(f=>f+f).join(""):n[1];return Number.parseInt(u.length===6?`${u}ff`:u,16)}const e=i.#r.exec(t.trim());if(!e)return null;const[l,o,r]=[e[1],e[2],e[3]].map(Number),c=e[4]===void 0?1:Number(e[4]);return[l,o,r].some(u=>u>255)||c>1?null:(l<<24|o<<16|r<<8|Math.round(c*255))>>>0}static parse(t){if(t==null)return{colors:Array(16).fill(-1),style:0,side:0,align:0,ignored:[]};if(typeof t!="object"||Array.isArray(t))return"a frame theme is an object (or null for the runtime look)";const n=t,e=Object.keys(n).filter(s=>!i.KEYS.includes(s)),l=[],o=n.light,r=typeof o!="object"||o===null||Array.isArray(o);if(o!==void 0&&r)return"light is an object with active and inactive colors";const c=o??{};e.push(...Object.keys(c).filter(s=>!i.STATES.includes(s)).map(s=>`light.${s}`));for(const[s,a]of[["",n],["light.",c]])for(const d of i.STATES){const g=i.#e(`${s}${d}`,a[d],e);if(typeof g=="string")return g;l.push(...g)}const u=[];for(const s of["buttonStyle","buttonSide","titleAlign"]){const a=n[s],d=i.#n[s];if(a!==void 0&&!d.includes(a))return`${s} is one of ${d.join(", ")}`;u.push(a===void 0?0:d.indexOf(a)+1)}const[f,b,y]=u;return{colors:l,style:f,side:b,align:y,ignored:e}}static#e(t,n,e){if(n===void 0)return Array(4).fill(-1);if(typeof n!="object"||n===null||Array.isArray(n))return`${t} is an object of colors (${i.COLORS.join(", ")})`;const l=n;e.push(...Object.keys(l).filter(r=>!i.COLORS.includes(r)).map(r=>`${t}.${r}`));const o=[];for(const r of i.COLORS){if(l[r]===void 0){o.push(-1);continue}const c=i.color(l[r]);if(c===null)return`${t}.${r} is not a color (#rgb, #rgba, #rrggbb, #rrggbbaa, rgb() or rgba()): ${JSON.stringify(l[r])}`;o.push(c)}return o}}export{i as FrameThemes};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference path="./modules/modules.d.ts" />
|
|
2
|
+
export type * from './types/manifest'
|
|
3
|
+
export type * from './types/page'
|
|
4
|
+
export type * from './types/service'
|
|
5
|
+
export type * from './types/config'
|
|
6
|
+
export type * from './types/capabilities'
|
|
7
|
+
export type { AcdeModules } from './runtime/load'
|
|
8
|
+
export { load } from './runtime/load'
|
|
9
|
+
export { API_LEVEL } from './runtime/level'
|
|
10
|
+
export { PLATFORM_SUPPORT, RUNNING_MODES, platformSupport } from './runtime/platforms'
|
|
11
|
+
export { SHARED_PLACES, type PlaceCapability, type SharedPlace } from './runtime/places'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{API_LEVEL as p}from"./runtime/level.js";import{load as f}from"./runtime/load.js";import{SHARED_PLACES as E}from"./runtime/places.js";import{PLATFORM_SUPPORT as S,RUNNING_MODES as e,platformSupport as x}from"./runtime/platforms.js";export{p as API_LEVEL,S as PLATFORM_SUPPORT,e as RUNNING_MODES,E as SHARED_PLACES,f as load,x as platformSupport};
|