@aigne/afs-ui 1.11.0-beta.12

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 (196) hide show
  1. package/LICENSE.md +26 -0
  2. package/dist/_virtual/_@oxc-project_runtime@0.108.0/helpers/decorate.cjs +11 -0
  3. package/dist/_virtual/_@oxc-project_runtime@0.108.0/helpers/decorate.mjs +10 -0
  4. package/dist/aup-protocol.cjs +235 -0
  5. package/dist/aup-protocol.d.cts +78 -0
  6. package/dist/aup-protocol.d.cts.map +1 -0
  7. package/dist/aup-protocol.d.mts +78 -0
  8. package/dist/aup-protocol.d.mts.map +1 -0
  9. package/dist/aup-protocol.mjs +235 -0
  10. package/dist/aup-protocol.mjs.map +1 -0
  11. package/dist/aup-registry.cjs +2489 -0
  12. package/dist/aup-registry.mjs +2487 -0
  13. package/dist/aup-registry.mjs.map +1 -0
  14. package/dist/aup-spec.cjs +1467 -0
  15. package/dist/aup-spec.mjs +1466 -0
  16. package/dist/aup-spec.mjs.map +1 -0
  17. package/dist/aup-types.cjs +165 -0
  18. package/dist/aup-types.d.cts +157 -0
  19. package/dist/aup-types.d.cts.map +1 -0
  20. package/dist/aup-types.d.mts +157 -0
  21. package/dist/aup-types.d.mts.map +1 -0
  22. package/dist/aup-types.mjs +157 -0
  23. package/dist/aup-types.mjs.map +1 -0
  24. package/dist/backend.cjs +14 -0
  25. package/dist/backend.d.cts +104 -0
  26. package/dist/backend.d.cts.map +1 -0
  27. package/dist/backend.d.mts +104 -0
  28. package/dist/backend.d.mts.map +1 -0
  29. package/dist/backend.mjs +13 -0
  30. package/dist/backend.mjs.map +1 -0
  31. package/dist/degradation.cjs +85 -0
  32. package/dist/degradation.d.cts +17 -0
  33. package/dist/degradation.d.cts.map +1 -0
  34. package/dist/degradation.d.mts +17 -0
  35. package/dist/degradation.d.mts.map +1 -0
  36. package/dist/degradation.mjs +84 -0
  37. package/dist/degradation.mjs.map +1 -0
  38. package/dist/index.cjs +36 -0
  39. package/dist/index.d.cts +12 -0
  40. package/dist/index.d.mts +12 -0
  41. package/dist/index.mjs +13 -0
  42. package/dist/runtime.cjs +117 -0
  43. package/dist/runtime.d.cts +59 -0
  44. package/dist/runtime.d.cts.map +1 -0
  45. package/dist/runtime.d.mts +59 -0
  46. package/dist/runtime.d.mts.map +1 -0
  47. package/dist/runtime.mjs +118 -0
  48. package/dist/runtime.mjs.map +1 -0
  49. package/dist/session.cjs +159 -0
  50. package/dist/session.d.cts +80 -0
  51. package/dist/session.d.cts.map +1 -0
  52. package/dist/session.d.mts +80 -0
  53. package/dist/session.d.mts.map +1 -0
  54. package/dist/session.mjs +159 -0
  55. package/dist/session.mjs.map +1 -0
  56. package/dist/snapshot.cjs +162 -0
  57. package/dist/snapshot.mjs +163 -0
  58. package/dist/snapshot.mjs.map +1 -0
  59. package/dist/term-page.cjs +264 -0
  60. package/dist/term-page.mjs +264 -0
  61. package/dist/term-page.mjs.map +1 -0
  62. package/dist/term.cjs +295 -0
  63. package/dist/term.d.cts +84 -0
  64. package/dist/term.d.cts.map +1 -0
  65. package/dist/term.d.mts +84 -0
  66. package/dist/term.d.mts.map +1 -0
  67. package/dist/term.mjs +296 -0
  68. package/dist/term.mjs.map +1 -0
  69. package/dist/tty.cjs +136 -0
  70. package/dist/tty.d.cts +53 -0
  71. package/dist/tty.d.cts.map +1 -0
  72. package/dist/tty.d.mts +53 -0
  73. package/dist/tty.d.mts.map +1 -0
  74. package/dist/tty.mjs +135 -0
  75. package/dist/tty.mjs.map +1 -0
  76. package/dist/ui-provider.cjs +4615 -0
  77. package/dist/ui-provider.d.cts +307 -0
  78. package/dist/ui-provider.d.cts.map +1 -0
  79. package/dist/ui-provider.d.mts +307 -0
  80. package/dist/ui-provider.d.mts.map +1 -0
  81. package/dist/ui-provider.mjs +4616 -0
  82. package/dist/ui-provider.mjs.map +1 -0
  83. package/dist/web-page/core.cjs +1388 -0
  84. package/dist/web-page/core.mjs +1387 -0
  85. package/dist/web-page/core.mjs.map +1 -0
  86. package/dist/web-page/css.cjs +1699 -0
  87. package/dist/web-page/css.mjs +1698 -0
  88. package/dist/web-page/css.mjs.map +1 -0
  89. package/dist/web-page/icons.cjs +248 -0
  90. package/dist/web-page/icons.mjs +248 -0
  91. package/dist/web-page/icons.mjs.map +1 -0
  92. package/dist/web-page/overlay-themes.cjs +514 -0
  93. package/dist/web-page/overlay-themes.mjs +513 -0
  94. package/dist/web-page/overlay-themes.mjs.map +1 -0
  95. package/dist/web-page/renderers/action.cjs +72 -0
  96. package/dist/web-page/renderers/action.mjs +72 -0
  97. package/dist/web-page/renderers/action.mjs.map +1 -0
  98. package/dist/web-page/renderers/broadcast.cjs +160 -0
  99. package/dist/web-page/renderers/broadcast.mjs +160 -0
  100. package/dist/web-page/renderers/broadcast.mjs.map +1 -0
  101. package/dist/web-page/renderers/calendar.cjs +137 -0
  102. package/dist/web-page/renderers/calendar.mjs +137 -0
  103. package/dist/web-page/renderers/calendar.mjs.map +1 -0
  104. package/dist/web-page/renderers/canvas.cjs +173 -0
  105. package/dist/web-page/renderers/canvas.mjs +173 -0
  106. package/dist/web-page/renderers/canvas.mjs.map +1 -0
  107. package/dist/web-page/renderers/cdn-loader.cjs +25 -0
  108. package/dist/web-page/renderers/cdn-loader.mjs +25 -0
  109. package/dist/web-page/renderers/cdn-loader.mjs.map +1 -0
  110. package/dist/web-page/renderers/chart.cjs +101 -0
  111. package/dist/web-page/renderers/chart.mjs +101 -0
  112. package/dist/web-page/renderers/chart.mjs.map +1 -0
  113. package/dist/web-page/renderers/deck.cjs +390 -0
  114. package/dist/web-page/renderers/deck.mjs +390 -0
  115. package/dist/web-page/renderers/deck.mjs.map +1 -0
  116. package/dist/web-page/renderers/device.cjs +1015 -0
  117. package/dist/web-page/renderers/device.mjs +1015 -0
  118. package/dist/web-page/renderers/device.mjs.map +1 -0
  119. package/dist/web-page/renderers/editor.cjs +127 -0
  120. package/dist/web-page/renderers/editor.mjs +127 -0
  121. package/dist/web-page/renderers/editor.mjs.map +1 -0
  122. package/dist/web-page/renderers/finance-chart.cjs +178 -0
  123. package/dist/web-page/renderers/finance-chart.mjs +178 -0
  124. package/dist/web-page/renderers/finance-chart.mjs.map +1 -0
  125. package/dist/web-page/renderers/frame.cjs +274 -0
  126. package/dist/web-page/renderers/frame.mjs +274 -0
  127. package/dist/web-page/renderers/frame.mjs.map +1 -0
  128. package/dist/web-page/renderers/globe.cjs +119 -0
  129. package/dist/web-page/renderers/globe.mjs +119 -0
  130. package/dist/web-page/renderers/globe.mjs.map +1 -0
  131. package/dist/web-page/renderers/input.cjs +137 -0
  132. package/dist/web-page/renderers/input.mjs +137 -0
  133. package/dist/web-page/renderers/input.mjs.map +1 -0
  134. package/dist/web-page/renderers/list.cjs +1243 -0
  135. package/dist/web-page/renderers/list.mjs +1243 -0
  136. package/dist/web-page/renderers/list.mjs.map +1 -0
  137. package/dist/web-page/renderers/map.cjs +126 -0
  138. package/dist/web-page/renderers/map.mjs +126 -0
  139. package/dist/web-page/renderers/map.mjs.map +1 -0
  140. package/dist/web-page/renderers/media.cjs +106 -0
  141. package/dist/web-page/renderers/media.mjs +106 -0
  142. package/dist/web-page/renderers/media.mjs.map +1 -0
  143. package/dist/web-page/renderers/moonphase.cjs +105 -0
  144. package/dist/web-page/renderers/moonphase.mjs +105 -0
  145. package/dist/web-page/renderers/moonphase.mjs.map +1 -0
  146. package/dist/web-page/renderers/natal-chart.cjs +222 -0
  147. package/dist/web-page/renderers/natal-chart.mjs +222 -0
  148. package/dist/web-page/renderers/natal-chart.mjs.map +1 -0
  149. package/dist/web-page/renderers/overlay.cjs +531 -0
  150. package/dist/web-page/renderers/overlay.mjs +531 -0
  151. package/dist/web-page/renderers/overlay.mjs.map +1 -0
  152. package/dist/web-page/renderers/table.cjs +74 -0
  153. package/dist/web-page/renderers/table.mjs +74 -0
  154. package/dist/web-page/renderers/table.mjs.map +1 -0
  155. package/dist/web-page/renderers/terminal.cjs +30 -0
  156. package/dist/web-page/renderers/terminal.mjs +30 -0
  157. package/dist/web-page/renderers/terminal.mjs.map +1 -0
  158. package/dist/web-page/renderers/text.cjs +109 -0
  159. package/dist/web-page/renderers/text.mjs +109 -0
  160. package/dist/web-page/renderers/text.mjs.map +1 -0
  161. package/dist/web-page/renderers/ticker.cjs +133 -0
  162. package/dist/web-page/renderers/ticker.mjs +133 -0
  163. package/dist/web-page/renderers/ticker.mjs.map +1 -0
  164. package/dist/web-page/renderers/time.cjs +69 -0
  165. package/dist/web-page/renderers/time.mjs +69 -0
  166. package/dist/web-page/renderers/time.mjs.map +1 -0
  167. package/dist/web-page/renderers/unknown.cjs +20 -0
  168. package/dist/web-page/renderers/unknown.mjs +20 -0
  169. package/dist/web-page/renderers/unknown.mjs.map +1 -0
  170. package/dist/web-page/renderers/view.cjs +161 -0
  171. package/dist/web-page/renderers/view.mjs +161 -0
  172. package/dist/web-page/renderers/view.mjs.map +1 -0
  173. package/dist/web-page/renderers/wm.cjs +669 -0
  174. package/dist/web-page/renderers/wm.mjs +669 -0
  175. package/dist/web-page/renderers/wm.mjs.map +1 -0
  176. package/dist/web-page/skeleton.cjs +103 -0
  177. package/dist/web-page/skeleton.mjs +103 -0
  178. package/dist/web-page/skeleton.mjs.map +1 -0
  179. package/dist/web-page.cjs +114 -0
  180. package/dist/web-page.d.cts +19 -0
  181. package/dist/web-page.d.cts.map +1 -0
  182. package/dist/web-page.d.mts +19 -0
  183. package/dist/web-page.d.mts.map +1 -0
  184. package/dist/web-page.mjs +115 -0
  185. package/dist/web-page.mjs.map +1 -0
  186. package/dist/web.cjs +827 -0
  187. package/dist/web.d.cts +144 -0
  188. package/dist/web.d.cts.map +1 -0
  189. package/dist/web.d.mts +144 -0
  190. package/dist/web.d.mts.map +1 -0
  191. package/dist/web.mjs +828 -0
  192. package/dist/web.mjs.map +1 -0
  193. package/dist/wm-state.cjs +172 -0
  194. package/dist/wm-state.mjs +171 -0
  195. package/dist/wm-state.mjs.map +1 -0
  196. package/package.json +59 -0
@@ -0,0 +1,2489 @@
1
+
2
+ //#region src/aup-registry.ts
3
+ const PRIMITIVES = {
4
+ view: {
5
+ name: "view",
6
+ category: "fundamental",
7
+ description: "Layout container that arranges children in row, column, grid, stack, or overlay-grid. Supports Spatial Intent v0.3 for fine-grained alignment and spacing. overlay-grid provides a 15-region broadcast band system (TV industry standard) for HUD/overlay content. Set theme prop on overlay-grid to apply a broadcast graphics package (minimal, cnn, apple). Children use role prop for semantic roles (live-badge, clock, speaker-bar, etc.).",
8
+ props: {
9
+ layout: {
10
+ type: "string | object",
11
+ description: "As string: \"row\" (horizontal), \"column\" (vertical, default), \"grid\" (responsive auto-fill), \"stack\" (all children layered on top of each other — use for overlays). As object (Spatial Intent): { direction, align, crossAlign, gap, wrap, overflow }.",
12
+ default: "column",
13
+ enum: [
14
+ "row",
15
+ "column",
16
+ "grid",
17
+ "stack",
18
+ "overlay-grid"
19
+ ]
20
+ },
21
+ mode: {
22
+ type: "string",
23
+ description: "Visual mode hint (e.g. dark/light section)"
24
+ },
25
+ variant: {
26
+ type: "string",
27
+ description: "Semantic variant for pre-styled containers (e.g. card, section, hero)"
28
+ },
29
+ size: {
30
+ type: "object",
31
+ description: "Sizing constraints: { width, maxWidth, height, flex }. Values are CSS strings (e.g. '100%', '800px')."
32
+ },
33
+ animate: {
34
+ type: "string",
35
+ description: "Entrance animation triggered by deck slide or viewport entry",
36
+ enum: [
37
+ "none",
38
+ "fade-in",
39
+ "slide-up",
40
+ "slide-left",
41
+ "zoom-in"
42
+ ]
43
+ },
44
+ animateDelay: {
45
+ type: "number",
46
+ description: "Animation delay in ms (for staggered reveals)"
47
+ },
48
+ animateDuration: {
49
+ type: "number",
50
+ description: "Animation duration in ms (default: 600)"
51
+ },
52
+ background: {
53
+ type: "string | object",
54
+ description: "Background: CSS color/gradient string, URL string (auto-detected), or object { type: \"gradient\"|\"image\"|\"video\", value/src, opacity?, blur? }."
55
+ },
56
+ theme: {
57
+ type: "string | object",
58
+ description: "Overlay theme for overlay-grid layouts. Named presets: \"minimal\", \"cnn\", \"apple\". Pass a string for presets or an object with camelCase keys for custom CSS variables (e.g. { badgeBg: \"#ff6b00\", cardRadius: \"0\" }). Themes style children that have a role prop — agents declare WHAT (role), themes handle HOW (styling)."
59
+ }
60
+ },
61
+ events: [],
62
+ containable: true,
63
+ constraints: "Children are rendered in order. Grid layout uses CSS grid with auto-fill columns. For overlay-grid with theme: children should use the role prop for themed styling.",
64
+ example: {
65
+ id: "layout-1",
66
+ type: "view",
67
+ props: {
68
+ layout: "row",
69
+ size: { maxWidth: "800px" }
70
+ },
71
+ children: [{
72
+ id: "t1",
73
+ type: "text",
74
+ props: {
75
+ content: "Left",
76
+ level: 2
77
+ }
78
+ }, {
79
+ id: "t2",
80
+ type: "text",
81
+ props: { content: "Right" }
82
+ }]
83
+ }
84
+ },
85
+ text: {
86
+ name: "text",
87
+ category: "fundamental",
88
+ description: "Text content display. Renders as h1-h6 for headings or div for body. Supports markdown rendering via format prop.",
89
+ props: {
90
+ content: {
91
+ type: "string",
92
+ description: "The text content to display",
93
+ required: true
94
+ },
95
+ level: {
96
+ type: "number",
97
+ description: "Heading level 1-6. Omit for body text.",
98
+ enum: [
99
+ "1",
100
+ "2",
101
+ "3",
102
+ "4",
103
+ "5",
104
+ "6"
105
+ ]
106
+ },
107
+ format: {
108
+ type: "string",
109
+ description: "Set to \"markdown\" for Markdown rendering",
110
+ enum: ["text", "markdown"],
111
+ default: "text"
112
+ },
113
+ scale: {
114
+ type: "string",
115
+ description: "Typography scale: xs, sm, base, lg, xl, 2xl"
116
+ },
117
+ intent: {
118
+ type: "string",
119
+ description: "Semantic intent for colored text",
120
+ enum: [
121
+ "info",
122
+ "success",
123
+ "warning",
124
+ "error"
125
+ ]
126
+ },
127
+ mode: {
128
+ type: "string",
129
+ description: "Visual mode: \"mono\" for monospace"
130
+ },
131
+ size: {
132
+ type: "string",
133
+ description: "Size variant for the text element"
134
+ },
135
+ animate: {
136
+ type: "string",
137
+ description: "Entrance animation. \"count-up\" animates numeric content from 0 to target value.",
138
+ enum: [
139
+ "none",
140
+ "fade-in",
141
+ "slide-up",
142
+ "slide-left",
143
+ "zoom-in",
144
+ "count-up"
145
+ ]
146
+ },
147
+ animateDelay: {
148
+ type: "number",
149
+ description: "Animation delay in ms"
150
+ },
151
+ animateDuration: {
152
+ type: "number",
153
+ description: "Animation duration in ms (default: 600, count-up default: 2000)"
154
+ }
155
+ },
156
+ events: [],
157
+ containable: false,
158
+ example: {
159
+ id: "heading-1",
160
+ type: "text",
161
+ props: {
162
+ content: "Welcome",
163
+ level: 1
164
+ }
165
+ }
166
+ },
167
+ action: {
168
+ name: "action",
169
+ category: "fundamental",
170
+ description: "Clickable button or link. Emits a click event that triggers an AFS exec call. Use href for navigation links, events.click for actions.",
171
+ props: {
172
+ label: {
173
+ type: "string",
174
+ description: "Button label text",
175
+ required: true,
176
+ default: "Action"
177
+ },
178
+ variant: {
179
+ type: "string",
180
+ description: "Visual variant",
181
+ enum: [
182
+ "primary",
183
+ "secondary",
184
+ "ghost",
185
+ "destructive"
186
+ ],
187
+ default: "primary"
188
+ },
189
+ size: {
190
+ type: "string",
191
+ description: "Button size",
192
+ enum: [
193
+ "sm",
194
+ "md",
195
+ "lg"
196
+ ]
197
+ },
198
+ icon: {
199
+ type: "string",
200
+ description: "Icon name from built-in set (~170 Lucide icons). Navigation: search, home, menu, arrow-left/right/up/down, chevron-left/right/up/down, external-link, compass, move. Actions: plus, close, x, check, edit, trash, copy, download, upload, refresh, filter, share, save, undo, redo, clipboard, scissors, power, log-out. Status: info, warning, check-circle, x-circle, alert-circle, alert-triangle, loader, flag, ban, thumbs-up/down. Files: file, file-text, folder, folder-open, folder-plus, archive, book, book-open, inbox, paperclip, bookmark, scroll. Layout: list, layout, grid, sidebar, table-2, columns, maximize, minimize, panel-left/right, align-left/center/right. Devices: monitor, cpu, server, hard-drive, smartphone, tablet, printer, camera, wifi. Communication: mail, bell, message-circle, message-square, phone, send, at-sign, rss, megaphone. Media: image, video, mic, play, pause, music, volume, volume-2, volume-x, film. Data: chart, bar-chart, pie-chart, trending-up/down, activity, database, hash. Users: user, users, user-plus, user-check, user-x, github, award. Security: lock, unlock, shield, shield-check, eye, eye-off, key, fingerprint. Nature: sun, moon, cloud, cloud-rain, wind, snowflake, thermometer, flame. Commerce: dollar-sign, credit-card, shopping-cart, shopping-bag, receipt, wallet, gift, briefcase. Dev: code, code-2, braces, terminal, git-branch, git-commit, git-merge, git-pull-request, settings, gear, tool, wrench, bug, package, zap, feather. Objects: star, heart, bolt, rocket, lightbulb, robot, globe, link, calendar, clock, box, tag, map-pin, target, layers, pin, anchor, crosshair, disc, routes."
201
+ },
202
+ href: {
203
+ type: "string",
204
+ description: "URL for link behavior (renders <a> instead of <button>)"
205
+ },
206
+ target: {
207
+ type: "string",
208
+ description: "Link target (e.g. \"_blank\")"
209
+ }
210
+ },
211
+ events: ["click"],
212
+ containable: false,
213
+ constraints: "If both href and events.click are present, click event takes priority.",
214
+ example: {
215
+ id: "save-btn",
216
+ type: "action",
217
+ props: {
218
+ label: "Save",
219
+ variant: "primary",
220
+ icon: "check"
221
+ },
222
+ events: { click: {
223
+ exec: "/api/.actions/save",
224
+ args: { id: "123" }
225
+ } }
226
+ }
227
+ },
228
+ input: {
229
+ name: "input",
230
+ category: "fundamental",
231
+ description: "User input field. Emits change events with the new value. Supports text, password, date, select, toggle, checkbox, slider, progress, textarea.",
232
+ props: {
233
+ type: {
234
+ type: "string",
235
+ description: "Input subtype",
236
+ enum: [
237
+ "text",
238
+ "password",
239
+ "date",
240
+ "select",
241
+ "toggle",
242
+ "checkbox",
243
+ "slider",
244
+ "progress",
245
+ "textarea"
246
+ ],
247
+ default: "text"
248
+ },
249
+ label: {
250
+ type: "string",
251
+ description: "Visible label displayed above the input"
252
+ },
253
+ placeholder: {
254
+ type: "string",
255
+ description: "Placeholder text for text/textarea inputs"
256
+ },
257
+ options: {
258
+ type: "array",
259
+ description: "For select type: array of strings or {label, value} objects. E.g. [\"Option A\", \"Option B\"] or [{label: \"A\", value: \"a\"}]"
260
+ },
261
+ min: {
262
+ type: "number",
263
+ description: "Minimum value for number/slider/date inputs"
264
+ },
265
+ max: {
266
+ type: "number",
267
+ description: "Maximum value for number/slider/date inputs"
268
+ },
269
+ step: {
270
+ type: "number",
271
+ description: "Step increment for slider inputs"
272
+ },
273
+ rows: {
274
+ type: "number",
275
+ description: "Number of visible rows for textarea (default: 3)",
276
+ default: 3
277
+ },
278
+ intent: {
279
+ type: "string",
280
+ description: "Semantic intent for progress bar fill color",
281
+ enum: [
282
+ "info",
283
+ "success",
284
+ "warning",
285
+ "error"
286
+ ]
287
+ },
288
+ showValue: {
289
+ type: "boolean",
290
+ description: "Show numeric value on progress bar (default: true)",
291
+ default: true
292
+ }
293
+ },
294
+ events: ["change"],
295
+ containable: false,
296
+ constraints: "Current value is read from node.state.value. Change event payload includes { value } for select type.",
297
+ example: {
298
+ id: "email-input",
299
+ type: "input",
300
+ props: {
301
+ type: "text",
302
+ label: "Email",
303
+ placeholder: "you@example.com"
304
+ },
305
+ state: { value: "" },
306
+ events: { change: {
307
+ exec: "/form/.actions/validate",
308
+ args: { field: "email" }
309
+ } }
310
+ }
311
+ },
312
+ media: {
313
+ name: "media",
314
+ category: "fundamental",
315
+ description: "Displays images, avatars, icons, videos, or audio. For icons, uses the built-in icon vocabulary (same as action.icon).",
316
+ props: {
317
+ type: {
318
+ type: "string",
319
+ description: "Media subtype",
320
+ enum: [
321
+ "image",
322
+ "avatar",
323
+ "icon",
324
+ "video",
325
+ "audio"
326
+ ],
327
+ default: "image"
328
+ },
329
+ src: {
330
+ type: "string",
331
+ description: "URL for image/video/audio/avatar"
332
+ },
333
+ alt: {
334
+ type: "string",
335
+ description: "Alt text for images and avatars"
336
+ },
337
+ width: {
338
+ type: "number",
339
+ description: "Width in pixels"
340
+ },
341
+ height: {
342
+ type: "number",
343
+ description: "Height in pixels (video only)"
344
+ },
345
+ name: {
346
+ type: "string",
347
+ description: "Avatar name (for initials fallback) or icon name"
348
+ },
349
+ content: {
350
+ type: "string",
351
+ description: "Icon name from the built-in set (~170 Lucide icons, same as action.icon). Alias for name prop when type is icon."
352
+ },
353
+ size: {
354
+ type: "string",
355
+ description: "Size variant for avatars"
356
+ },
357
+ autoPlay: {
358
+ type: "boolean",
359
+ description: "Auto-play video/audio (default: false)"
360
+ },
361
+ loop: {
362
+ type: "boolean",
363
+ description: "Loop video/audio playback (default: false)"
364
+ },
365
+ muted: {
366
+ type: "boolean",
367
+ description: "Mute video/audio (default: false)"
368
+ },
369
+ controls: {
370
+ type: "boolean",
371
+ description: "Show playback controls (default: true for video/audio)",
372
+ default: true
373
+ },
374
+ volume: {
375
+ type: "number",
376
+ description: "Initial volume 0.0-1.0 (default: 1.0)"
377
+ },
378
+ poster: {
379
+ type: "string",
380
+ description: "Poster image URL for video"
381
+ },
382
+ fit: {
383
+ type: "string",
384
+ description: "Object-fit for video (cover, contain, fill, none)",
385
+ enum: [
386
+ "cover",
387
+ "contain",
388
+ "fill",
389
+ "none"
390
+ ]
391
+ }
392
+ },
393
+ events: [],
394
+ containable: false,
395
+ example: {
396
+ id: "profile-pic",
397
+ type: "media",
398
+ props: {
399
+ type: "avatar",
400
+ src: "/img/user.jpg",
401
+ name: "Alice",
402
+ alt: "Profile"
403
+ }
404
+ }
405
+ },
406
+ overlay: {
407
+ name: "overlay",
408
+ category: "fundamental",
409
+ description: "Modal dialog, toast notification, drawer, alert, confirm dialog, HUD, or choice selector. Visibility controlled by node.state.open. Children render into the content area.",
410
+ props: {
411
+ mode: {
412
+ type: "string",
413
+ description: "Overlay subtype",
414
+ enum: [
415
+ "dialog",
416
+ "toast",
417
+ "drawer",
418
+ "alert",
419
+ "confirm",
420
+ "hud",
421
+ "choice"
422
+ ],
423
+ default: "dialog"
424
+ },
425
+ title: {
426
+ type: "string",
427
+ description: "Title for dialog/alert/confirm/toast"
428
+ },
429
+ message: {
430
+ type: "string",
431
+ description: "Body text for toast/alert/confirm/hud"
432
+ },
433
+ intent: {
434
+ type: "string",
435
+ description: "Semantic intent affecting icon and button color",
436
+ enum: [
437
+ "info",
438
+ "success",
439
+ "warning",
440
+ "error"
441
+ ]
442
+ },
443
+ icon: {
444
+ type: "string",
445
+ description: "Custom icon (emoji or string). Set false to hide. HUD default: spinner"
446
+ },
447
+ side: {
448
+ type: "string",
449
+ description: "Drawer position",
450
+ enum: ["left", "right"],
451
+ default: "right"
452
+ },
453
+ position: {
454
+ type: "string",
455
+ description: "Toast position on screen",
456
+ default: "bottom-right"
457
+ },
458
+ duration: {
459
+ type: "number",
460
+ description: "Toast auto-dismiss in ms (0 = never). Default: 5000",
461
+ default: 5e3
462
+ },
463
+ dismissible: {
464
+ type: "boolean",
465
+ description: "Show close button on toast",
466
+ default: true
467
+ },
468
+ confirmLabel: {
469
+ type: "string",
470
+ description: "Confirm button text (default: \"OK\" for alert, \"Confirm\" for confirm)"
471
+ },
472
+ cancelLabel: {
473
+ type: "string",
474
+ description: "Cancel button text for confirm/choice modes (default: \"Cancel\")"
475
+ },
476
+ subtitle: {
477
+ type: "string",
478
+ description: "Secondary text for HUD mode"
479
+ },
480
+ progress: {
481
+ type: "number",
482
+ description: "Progress bar value 0-100 for HUD mode"
483
+ },
484
+ steps: {
485
+ type: "array",
486
+ description: "Choice mode: array of step objects with { header, question, options, multiSelect, allowOther }. Each option: { label, value?, description? }"
487
+ },
488
+ submitLabel: {
489
+ type: "string",
490
+ description: "Choice final submit button text (default: \"Submit\")",
491
+ default: "Submit"
492
+ }
493
+ },
494
+ events: [
495
+ "confirm",
496
+ "cancel",
497
+ "dismiss",
498
+ "select"
499
+ ],
500
+ containable: true,
501
+ constraints: "Set node.state.open = true to show. Toast auto-dismisses after duration ms. Choice emits select with { selected, other } for single-step or { answers } for multi-step.",
502
+ example: {
503
+ id: "confirm-delete",
504
+ type: "overlay",
505
+ props: {
506
+ mode: "confirm",
507
+ title: "Delete item?",
508
+ message: "This action cannot be undone.",
509
+ intent: "error",
510
+ confirmLabel: "Delete"
511
+ },
512
+ state: { open: true },
513
+ events: {
514
+ confirm: {
515
+ exec: "/items/.actions/delete",
516
+ args: { id: "123" }
517
+ },
518
+ cancel: { exec: "/ui/.actions/close-overlay" }
519
+ }
520
+ }
521
+ },
522
+ table: {
523
+ name: "table",
524
+ category: "fundamental",
525
+ description: "Tabular data display with column definitions and row data. Supports sort and row-select events.",
526
+ props: {
527
+ columns: {
528
+ type: "array",
529
+ description: "Column definitions: [{ key, label, align? }]. key maps to row object fields. align: left/center/right.",
530
+ required: true
531
+ },
532
+ rows: {
533
+ type: "array",
534
+ description: "Array of row objects keyed by column key. E.g. [{ name: \"Alice\", email: \"alice@example.com\" }]",
535
+ required: true
536
+ }
537
+ },
538
+ events: ["sort", "select"],
539
+ containable: false,
540
+ constraints: "sort event fires on header click. select event fires on row click.",
541
+ example: {
542
+ id: "user-table",
543
+ type: "table",
544
+ props: {
545
+ columns: [
546
+ {
547
+ key: "name",
548
+ label: "Name"
549
+ },
550
+ {
551
+ key: "email",
552
+ label: "Email"
553
+ },
554
+ {
555
+ key: "role",
556
+ label: "Role",
557
+ align: "center"
558
+ }
559
+ ],
560
+ rows: [{
561
+ name: "Alice",
562
+ email: "alice@co.com",
563
+ role: "Admin"
564
+ }, {
565
+ name: "Bob",
566
+ email: "bob@co.com",
567
+ role: "User"
568
+ }]
569
+ },
570
+ events: { select: {
571
+ exec: "/users/.actions/view",
572
+ args: {}
573
+ } }
574
+ }
575
+ },
576
+ time: {
577
+ name: "time",
578
+ category: "fundamental",
579
+ description: "Date/time display, live clock, timer, countdown, or date picker. Supports locale-aware formatting via Intl.DateTimeFormat.",
580
+ props: {
581
+ mode: {
582
+ type: "string",
583
+ description: "Display mode",
584
+ enum: [
585
+ "display",
586
+ "clock",
587
+ "timer",
588
+ "countdown",
589
+ "picker"
590
+ ],
591
+ default: "display"
592
+ },
593
+ value: {
594
+ type: "string",
595
+ description: "ISO date string for display/picker modes"
596
+ },
597
+ format: {
598
+ type: "object",
599
+ description: "Intl.DateTimeFormat options object. E.g. { dateStyle: \"medium\", timeStyle: \"short\" }"
600
+ },
601
+ locale: {
602
+ type: "string",
603
+ description: "BCP 47 locale (e.g. \"en-US\", \"zh-CN\")"
604
+ },
605
+ target: {
606
+ type: "string",
607
+ description: "ISO date string for countdown target"
608
+ },
609
+ expiredLabel: {
610
+ type: "string",
611
+ description: "Text when countdown finishes (default: \"00:00\")",
612
+ default: "00:00"
613
+ }
614
+ },
615
+ events: [],
616
+ containable: false,
617
+ example: {
618
+ id: "clock-1",
619
+ type: "time",
620
+ props: {
621
+ mode: "clock",
622
+ locale: "en-US"
623
+ }
624
+ }
625
+ },
626
+ chart: {
627
+ name: "chart",
628
+ category: "fundamental",
629
+ description: "Data visualization chart powered by Chart.js. Supports line, bar, area, pie, doughnut, gauge, histogram. Use node.src for live AFS data binding.",
630
+ props: {
631
+ variant: {
632
+ type: "string",
633
+ description: "Chart type",
634
+ enum: [
635
+ "line",
636
+ "bar",
637
+ "area",
638
+ "pie",
639
+ "doughnut",
640
+ "gauge",
641
+ "histogram"
642
+ ],
643
+ default: "line"
644
+ },
645
+ height: {
646
+ type: "string",
647
+ description: "CSS height for chart container"
648
+ },
649
+ data: {
650
+ type: "object",
651
+ description: "Chart.js data object: { labels: string[], datasets: [{ label, data, borderColor, backgroundColor }] }"
652
+ },
653
+ labels: {
654
+ type: "array",
655
+ description: "Shorthand: label array (used if data prop is absent)"
656
+ },
657
+ datasets: {
658
+ type: "array",
659
+ description: "Shorthand: datasets array (used if data prop is absent)"
660
+ }
661
+ },
662
+ events: [],
663
+ containable: false,
664
+ constraints: "Either provide data prop (Chart.js format) or labels+datasets shorthand. Set node.src to an AFS path for live-updating data.",
665
+ example: {
666
+ id: "revenue-chart",
667
+ type: "chart",
668
+ props: {
669
+ variant: "bar",
670
+ data: {
671
+ labels: [
672
+ "Jan",
673
+ "Feb",
674
+ "Mar",
675
+ "Apr"
676
+ ],
677
+ datasets: [{
678
+ label: "Revenue",
679
+ data: [
680
+ 120,
681
+ 190,
682
+ 150,
683
+ 210
684
+ ],
685
+ backgroundColor: "#60a5fa"
686
+ }]
687
+ }
688
+ }
689
+ }
690
+ },
691
+ "finance-chart": {
692
+ name: "finance-chart",
693
+ category: "fundamental",
694
+ description: "Financial chart powered by TradingView Lightweight Charts. Supports candlestick, OHLC, trading-line, trading-area, baseline, volume. Dispatched automatically when chart variant is a finance type.",
695
+ props: {
696
+ variant: {
697
+ type: "string",
698
+ description: "Finance chart type",
699
+ required: true,
700
+ enum: [
701
+ "candlestick",
702
+ "ohlc",
703
+ "trading-line",
704
+ "trading-area",
705
+ "baseline",
706
+ "volume"
707
+ ]
708
+ },
709
+ height: {
710
+ type: "string",
711
+ description: "CSS height (default: \"400px\")",
712
+ default: "400px"
713
+ },
714
+ data: {
715
+ type: "array",
716
+ description: "OHLCV data array: [{ time, open, high, low, close, value? }]. time is unix timestamp or 'YYYY-MM-DD' string.",
717
+ required: true
718
+ },
719
+ volumeData: {
720
+ type: "array",
721
+ description: "Volume histogram data: [{ time, value, color? }]"
722
+ },
723
+ showVolume: {
724
+ type: "boolean",
725
+ description: "Overlay volume histogram below price chart"
726
+ },
727
+ upColor: {
728
+ type: "string",
729
+ description: "Candle up color (default: \"#26a69a\")"
730
+ },
731
+ downColor: {
732
+ type: "string",
733
+ description: "Candle down color (default: \"#ef5350\")"
734
+ },
735
+ lineColor: {
736
+ type: "string",
737
+ description: "Line color for trading-line variant (default: \"#2962FF\")"
738
+ },
739
+ areaTopColor: {
740
+ type: "string",
741
+ description: "Top gradient color for area variants"
742
+ },
743
+ areaBottomColor: {
744
+ type: "string",
745
+ description: "Bottom gradient color for area variants"
746
+ },
747
+ baseValue: {
748
+ type: "number",
749
+ description: "Baseline price for baseline variant"
750
+ }
751
+ },
752
+ events: [],
753
+ containable: false,
754
+ constraints: "Finance chart is dispatched when chart.variant is one of the finance types. Use type: 'chart' with variant: 'candlestick' etc. — the dispatcher routes automatically.",
755
+ example: {
756
+ id: "stock-chart",
757
+ type: "chart",
758
+ props: {
759
+ variant: "candlestick",
760
+ height: "500px",
761
+ data: [{
762
+ time: "2024-01-01",
763
+ open: 100,
764
+ high: 105,
765
+ low: 98,
766
+ close: 103
767
+ }, {
768
+ time: "2024-01-02",
769
+ open: 103,
770
+ high: 110,
771
+ low: 101,
772
+ close: 108
773
+ }],
774
+ showVolume: true
775
+ }
776
+ }
777
+ },
778
+ map: {
779
+ name: "map",
780
+ category: "fundamental",
781
+ description: "Geographic map with markers, powered by Leaflet. Supports multiple tile styles. Use node.src for live marker data.",
782
+ props: {
783
+ center: {
784
+ type: "array",
785
+ description: "[latitude, longitude] for initial center (default: [0, 0])",
786
+ default: [0, 0]
787
+ },
788
+ zoom: {
789
+ type: "number",
790
+ description: "Initial zoom level (default: 2)",
791
+ default: 2
792
+ },
793
+ tileStyle: {
794
+ type: "string",
795
+ description: "Map tile style preset",
796
+ enum: [
797
+ "carto-light",
798
+ "carto-dark",
799
+ "carto-voyager",
800
+ "osm",
801
+ "stamen-toner",
802
+ "stamen-watercolor",
803
+ "alidade-smooth",
804
+ "alidade-dark"
805
+ ],
806
+ default: "carto-voyager"
807
+ },
808
+ height: {
809
+ type: "string",
810
+ description: "CSS height (default: \"300px\")",
811
+ default: "300px"
812
+ },
813
+ markers: {
814
+ type: "array",
815
+ description: "Array of marker objects: { lat, lng, label?, color?, intent?, radius?, size? }"
816
+ },
817
+ fitMarkers: {
818
+ type: "boolean",
819
+ description: "Auto-fit map bounds to show all markers"
820
+ },
821
+ variant: {
822
+ type: "string",
823
+ description: "Set to \"globe\" for 3D globe rendering (dispatches to globe renderer)",
824
+ enum: ["flat", "globe"],
825
+ default: "flat"
826
+ }
827
+ },
828
+ events: [],
829
+ containable: false,
830
+ constraints: "Set node.src to an AFS path for live-updating markers.",
831
+ example: {
832
+ id: "office-map",
833
+ type: "map",
834
+ props: {
835
+ center: [37.7749, -122.4194],
836
+ zoom: 12,
837
+ tileStyle: "carto-dark",
838
+ markers: [{
839
+ lat: 37.7749,
840
+ lng: -122.4194,
841
+ label: "HQ",
842
+ intent: "info"
843
+ }, {
844
+ lat: 37.785,
845
+ lng: -122.409,
846
+ label: "Office 2",
847
+ intent: "success"
848
+ }],
849
+ fitMarkers: true
850
+ }
851
+ }
852
+ },
853
+ globe: {
854
+ name: "globe",
855
+ category: "fundamental",
856
+ description: "3D globe visualization with markers and flyTo animations. Dispatched automatically when map variant is 'globe'.",
857
+ props: {
858
+ center: {
859
+ type: "array",
860
+ description: "[latitude, longitude] (default: [0, 20])",
861
+ default: [0, 20]
862
+ },
863
+ zoom: {
864
+ type: "number",
865
+ description: "Initial zoom (default: 1.5)",
866
+ default: 1.5
867
+ },
868
+ tileStyle: {
869
+ type: "string",
870
+ description: "Tile style (same as map)",
871
+ default: "carto-voyager"
872
+ },
873
+ height: {
874
+ type: "string",
875
+ description: "CSS height (default: \"500px\")",
876
+ default: "500px"
877
+ },
878
+ markers: {
879
+ type: "array",
880
+ description: "Array of { lat, lng, label?, color?, intent?, radius?, size? }"
881
+ },
882
+ flyTo: {
883
+ type: "array",
884
+ description: "Markers to cycle through with flyTo animation (defaults to markers)"
885
+ },
886
+ autoFly: {
887
+ type: "boolean",
888
+ description: "Enable automatic flyTo cycling (default: true)",
889
+ default: true
890
+ },
891
+ flyInterval: {
892
+ type: "number",
893
+ description: "ms between flyTo moves (default: 4000)",
894
+ default: 4e3
895
+ },
896
+ flyZoom: {
897
+ type: "number",
898
+ description: "Zoom level during flyTo (default: 5)",
899
+ default: 5
900
+ },
901
+ flyDuration: {
902
+ type: "number",
903
+ description: "ms per flyTo animation (default: 3000)",
904
+ default: 3e3
905
+ }
906
+ },
907
+ events: [],
908
+ containable: false,
909
+ constraints: "Use type: 'map' with variant: 'globe'. The dispatcher routes automatically.",
910
+ example: {
911
+ id: "world-globe",
912
+ type: "map",
913
+ props: {
914
+ variant: "globe",
915
+ height: "600px",
916
+ markers: [
917
+ {
918
+ lat: 48.8566,
919
+ lng: 2.3522,
920
+ label: "Paris"
921
+ },
922
+ {
923
+ lat: 35.6762,
924
+ lng: 139.6503,
925
+ label: "Tokyo"
926
+ },
927
+ {
928
+ lat: -33.8688,
929
+ lng: 151.2093,
930
+ label: "Sydney"
931
+ }
932
+ ],
933
+ autoFly: true,
934
+ flyInterval: 5e3
935
+ }
936
+ }
937
+ },
938
+ calendar: {
939
+ name: "calendar",
940
+ category: "fundamental",
941
+ description: "Calendar view displaying events by month, week, day, or agenda. Client-side navigation between months.",
942
+ props: {
943
+ mode: {
944
+ type: "string",
945
+ description: "View mode",
946
+ enum: [
947
+ "month",
948
+ "week",
949
+ "day",
950
+ "agenda"
951
+ ],
952
+ default: "month"
953
+ },
954
+ events: {
955
+ type: "array",
956
+ description: "Array of event objects: { date: \"YYYY-MM-DD\", label: string, intent?: \"info\"|\"success\"|\"warning\"|\"error\" }"
957
+ },
958
+ locale: {
959
+ type: "string",
960
+ description: "BCP 47 locale for month/day names (e.g. \"en-US\")"
961
+ }
962
+ },
963
+ events: [],
964
+ containable: false,
965
+ example: {
966
+ id: "schedule",
967
+ type: "calendar",
968
+ props: {
969
+ mode: "month",
970
+ events: [{
971
+ date: "2024-03-15",
972
+ label: "Team standup",
973
+ intent: "info"
974
+ }, {
975
+ date: "2024-03-20",
976
+ label: "Release v2.0",
977
+ intent: "success"
978
+ }]
979
+ }
980
+ }
981
+ },
982
+ moonphase: {
983
+ name: "moonphase",
984
+ category: "fundamental",
985
+ description: "Moon phase visualization for a single date or full month grid. Renders SVG moon with illumination and phase name.",
986
+ props: {
987
+ mode: {
988
+ type: "string",
989
+ description: "\"today\" shows single moon, \"month\" shows full month grid",
990
+ enum: ["today", "month"],
991
+ default: "today"
992
+ },
993
+ date: {
994
+ type: "string",
995
+ description: "ISO date string for target date (default: today)"
996
+ },
997
+ locale: {
998
+ type: "string",
999
+ description: "BCP 47 locale for date labels"
1000
+ }
1001
+ },
1002
+ events: [],
1003
+ containable: false,
1004
+ example: {
1005
+ id: "moon-1",
1006
+ type: "moonphase",
1007
+ props: {
1008
+ mode: "month",
1009
+ date: "2024-03-01"
1010
+ }
1011
+ }
1012
+ },
1013
+ "natal-chart": {
1014
+ name: "natal-chart",
1015
+ category: "fundamental",
1016
+ description: "Astrological natal chart visualization powered by @astrodraw/astrochart. Supports radix, transit overlay, aspects table, and planets table.",
1017
+ props: {
1018
+ variant: {
1019
+ type: "string",
1020
+ description: "Chart variant",
1021
+ enum: [
1022
+ "radix",
1023
+ "transit",
1024
+ "aspects-table",
1025
+ "planets-table"
1026
+ ],
1027
+ default: "radix"
1028
+ },
1029
+ height: {
1030
+ type: "string",
1031
+ description: "Container height (default: \"500px\")"
1032
+ },
1033
+ width: {
1034
+ type: "number",
1035
+ description: "Chart width in px (default: 500)"
1036
+ },
1037
+ size: {
1038
+ type: "number",
1039
+ description: "Render size in px (capped at 500)"
1040
+ },
1041
+ data: {
1042
+ type: "object",
1043
+ description: "Planet positions: { planets: { Sun: [degrees], Moon: [degrees], ... }, cusps: [12 house cusp values] }",
1044
+ required: true
1045
+ },
1046
+ transitData: {
1047
+ type: "object",
1048
+ description: "Secondary planet data for transit variant overlay"
1049
+ },
1050
+ settings: {
1051
+ type: "object",
1052
+ description: "Chart styling overrides merged into astrochart config (e.g. COLOR_BACKGROUND)"
1053
+ }
1054
+ },
1055
+ events: [],
1056
+ containable: false,
1057
+ example: {
1058
+ id: "natal-1",
1059
+ type: "natal-chart",
1060
+ props: {
1061
+ variant: "radix",
1062
+ data: {
1063
+ planets: {
1064
+ Sun: [0],
1065
+ Moon: [180],
1066
+ Mercury: [45],
1067
+ Venus: [90]
1068
+ },
1069
+ cusps: [
1070
+ 0,
1071
+ 30,
1072
+ 60,
1073
+ 90,
1074
+ 120,
1075
+ 150,
1076
+ 180,
1077
+ 210,
1078
+ 240,
1079
+ 270,
1080
+ 300,
1081
+ 330
1082
+ ]
1083
+ }
1084
+ }
1085
+ }
1086
+ },
1087
+ terminal: {
1088
+ name: "terminal",
1089
+ category: "subsystem",
1090
+ description: "Terminal emulator. Children render as terminal output lines.",
1091
+ props: { rows: {
1092
+ type: "number",
1093
+ description: "Visible rows (sets min-height as rows * 18px)"
1094
+ } },
1095
+ events: [],
1096
+ containable: true,
1097
+ constraints: "Children are appended as terminal output.",
1098
+ example: {
1099
+ id: "term-1",
1100
+ type: "terminal",
1101
+ props: { rows: 20 }
1102
+ }
1103
+ },
1104
+ editor: {
1105
+ name: "editor",
1106
+ category: "fundamental",
1107
+ description: "Code/text editor with syntax highlighting (highlight.js), line numbers, and optional toolbar. Emits change events.",
1108
+ props: {
1109
+ language: {
1110
+ type: "string",
1111
+ description: "Language ID for syntax highlighting (default: \"text\")",
1112
+ default: "text"
1113
+ },
1114
+ readOnly: {
1115
+ type: "boolean",
1116
+ description: "Make editor read-only, hide toolbar"
1117
+ },
1118
+ lineNumbers: {
1119
+ type: "boolean",
1120
+ description: "Show line number gutter (default: true)",
1121
+ default: true
1122
+ },
1123
+ content: {
1124
+ type: "string",
1125
+ description: "Initial editor content"
1126
+ }
1127
+ },
1128
+ events: ["change"],
1129
+ containable: false,
1130
+ constraints: "change event payload: { content: string }",
1131
+ example: {
1132
+ id: "code-editor",
1133
+ type: "editor",
1134
+ props: {
1135
+ language: "javascript",
1136
+ content: "console.log(\"hello\");",
1137
+ lineNumbers: true
1138
+ },
1139
+ events: { change: {
1140
+ exec: "/files/.actions/save",
1141
+ args: { path: "/src/main.js" }
1142
+ } }
1143
+ }
1144
+ },
1145
+ canvas: {
1146
+ name: "canvas",
1147
+ category: "fundamental",
1148
+ description: "Freeform drawing canvas with pen, eraser, and color tools. Client-side only — no server events emitted.",
1149
+ props: {
1150
+ width: {
1151
+ type: "number",
1152
+ description: "Canvas pixel width (default: 800)",
1153
+ default: 800
1154
+ },
1155
+ height: {
1156
+ type: "number",
1157
+ description: "Canvas pixel height (default: 400)",
1158
+ default: 400
1159
+ },
1160
+ background: {
1161
+ type: "string",
1162
+ description: "Fill color (default: \"#ffffff\")",
1163
+ default: "#ffffff"
1164
+ },
1165
+ strokeColor: {
1166
+ type: "string",
1167
+ description: "Initial brush color (default: \"#000000\")",
1168
+ default: "#000000"
1169
+ },
1170
+ strokeWidth: {
1171
+ type: "number",
1172
+ description: "Initial brush size (default: 2)",
1173
+ default: 2
1174
+ }
1175
+ },
1176
+ events: [],
1177
+ containable: false,
1178
+ example: {
1179
+ id: "whiteboard",
1180
+ type: "canvas",
1181
+ props: {
1182
+ width: 1024,
1183
+ height: 600,
1184
+ background: "#fafafa"
1185
+ }
1186
+ }
1187
+ },
1188
+ deck: {
1189
+ name: "deck",
1190
+ category: "fundamental",
1191
+ description: "Slide deck container with transitions, keyboard navigation, autoplay, and scoped visual design. Each direct child becomes a slide. Rendered in Shadow DOM — custom design tokens (fonts, colors, effects) never leak to the parent surface. Use designPreset for quick theming or design for fine-grained control. Combined with live channels, enables broadcast presentations.",
1192
+ props: {
1193
+ transition: {
1194
+ type: "string",
1195
+ description: "Slide transition style",
1196
+ enum: [
1197
+ "fade",
1198
+ "slide",
1199
+ "zoom",
1200
+ "none"
1201
+ ],
1202
+ default: "fade"
1203
+ },
1204
+ transitionDuration: {
1205
+ type: "number",
1206
+ description: "Transition duration in ms (default: 600)",
1207
+ default: 600
1208
+ },
1209
+ autoPlay: {
1210
+ type: "boolean",
1211
+ description: "Auto-advance slides (default: false)",
1212
+ default: false
1213
+ },
1214
+ autoPlayInterval: {
1215
+ type: "number",
1216
+ description: "Auto-advance interval in ms (default: 5000)",
1217
+ default: 5e3
1218
+ },
1219
+ loop: {
1220
+ type: "boolean",
1221
+ description: "Loop back to first slide after last (default: false)",
1222
+ default: false
1223
+ },
1224
+ showControls: {
1225
+ type: "boolean",
1226
+ description: "Show prev/next navigation arrows (default: true)",
1227
+ default: true
1228
+ },
1229
+ showProgress: {
1230
+ type: "boolean",
1231
+ description: "Show thin progress bar at bottom (default: true)",
1232
+ default: true
1233
+ },
1234
+ keyboard: {
1235
+ type: "boolean",
1236
+ description: "Enable keyboard navigation (default: true)",
1237
+ default: true
1238
+ },
1239
+ aspectRatio: {
1240
+ type: "string",
1241
+ description: "Deck aspect ratio",
1242
+ enum: [
1243
+ "16:9",
1244
+ "4:3",
1245
+ "auto"
1246
+ ],
1247
+ default: "auto"
1248
+ },
1249
+ presentation: {
1250
+ type: "boolean",
1251
+ description: "Full-height slides for presentation mode (viewport height per slide)",
1252
+ default: false
1253
+ },
1254
+ designPreset: {
1255
+ type: "string",
1256
+ description: "Named design preset for quick theming",
1257
+ enum: [
1258
+ "tech-dark",
1259
+ "corporate-clean",
1260
+ "keynote-dark",
1261
+ "gradient-dream",
1262
+ "neon-night",
1263
+ "warm-earth",
1264
+ "retro-terminal",
1265
+ "frosted-glass",
1266
+ "brutalist"
1267
+ ]
1268
+ },
1269
+ design: {
1270
+ type: "object",
1271
+ description: "Structured design tokens — overrides designPreset values. fonts: { heading, body, mono, urls[] }. colors: { bg, surface, text, accent, accentGlow, muted, gradient }. effects: { slideBackground (solid|gradient|dots|grid|noise|aurora), headingStyle (plain|gradient-text|glow), cardStyle (flat|glass|neon|bordered) }. spacing: { slidePadding, gap, headingSize }."
1272
+ }
1273
+ },
1274
+ events: ["change", "complete"],
1275
+ containable: true,
1276
+ constraints: "Each direct child is one slide. state.current (0-based) controls active slide. Shadow DOM isolates deck styling — design tokens don't affect parent. Keyboard: Left/Up=prev, Right/Down/Space=next, 1-9=jump, F=fullscreen, Escape=exit fullscreen.",
1277
+ example: {
1278
+ id: "launch-deck",
1279
+ type: "deck",
1280
+ props: {
1281
+ transition: "slide",
1282
+ designPreset: "tech-dark",
1283
+ design: {
1284
+ colors: { accent: "#e6b450" },
1285
+ effects: { headingStyle: "gradient-text" }
1286
+ }
1287
+ },
1288
+ state: { current: 0 },
1289
+ children: [{
1290
+ id: "slide-1",
1291
+ type: "view",
1292
+ props: { layout: "column" },
1293
+ children: [{
1294
+ id: "s1-title",
1295
+ type: "text",
1296
+ props: {
1297
+ content: "Welcome",
1298
+ level: 1,
1299
+ animate: "fade-in"
1300
+ }
1301
+ }]
1302
+ }, {
1303
+ id: "slide-2",
1304
+ type: "view",
1305
+ props: { layout: "column" },
1306
+ children: [{
1307
+ id: "s2-title",
1308
+ type: "text",
1309
+ props: {
1310
+ content: "Key Metrics",
1311
+ level: 2,
1312
+ animate: "slide-up"
1313
+ }
1314
+ }, {
1315
+ id: "s2-num",
1316
+ type: "text",
1317
+ props: {
1318
+ content: "1,234,567",
1319
+ animate: "count-up"
1320
+ }
1321
+ }]
1322
+ }],
1323
+ events: { change: {
1324
+ exec: "/analytics/.actions/track",
1325
+ args: { event: "slide-change" }
1326
+ } }
1327
+ }
1328
+ },
1329
+ frame: {
1330
+ name: "frame",
1331
+ category: "subsystem",
1332
+ description: "Sandboxed iframe for full-page isolation. AUP is the OS, pages are applications running inside it. Supports both AFS page paths (/pages/:id) and external URLs. Optional bridge script enables postMessage communication (toast, navigate, fetch).",
1333
+ props: {
1334
+ src: {
1335
+ type: "string",
1336
+ description: "URL or /pages/:id path to embed",
1337
+ required: true
1338
+ },
1339
+ bridge: {
1340
+ type: "boolean",
1341
+ description: "Inject aup-bridge.js for postMessage communication (default: false)",
1342
+ default: false
1343
+ },
1344
+ sandbox: {
1345
+ type: "string",
1346
+ description: "iframe sandbox attribute (default: \"allow-scripts allow-forms allow-popups\"). allow-same-origin is only honored for trusted bridge frames.",
1347
+ default: "allow-scripts allow-forms allow-popups"
1348
+ },
1349
+ size: {
1350
+ type: "object",
1351
+ description: "Sizing: { width: CSS string, height: CSS string }"
1352
+ },
1353
+ loading: {
1354
+ type: "string",
1355
+ description: "iframe loading strategy",
1356
+ enum: ["eager", "lazy"],
1357
+ default: "lazy"
1358
+ },
1359
+ fallback: {
1360
+ type: "string",
1361
+ description: "URL to show if page crashes or fails to load"
1362
+ },
1363
+ transparent: {
1364
+ type: "boolean",
1365
+ description: "Make iframe background transparent (for overlays on top of other content)",
1366
+ default: false
1367
+ },
1368
+ overlay: {
1369
+ type: "boolean",
1370
+ description: "Float frame as a fixed viewport overlay (position:fixed, z-index:99999, pointer-events:none). Escapes any parent stacking context — use for broadcast overlays on top of deck slides. Implies transparent. The iframe content should handle its own positioning.",
1371
+ default: false
1372
+ }
1373
+ },
1374
+ events: [
1375
+ "load",
1376
+ "error",
1377
+ "message"
1378
+ ],
1379
+ containable: false,
1380
+ constraints: "AFS page paths are resolved to HTTP URLs (/p/:id?sid=...&st=...&bridge=1). Bridge script provides window.aup.{emit, on, navigate, toast, fetch} API inside the iframe.",
1381
+ example: {
1382
+ id: "app-frame",
1383
+ type: "frame",
1384
+ props: {
1385
+ src: "/pages/dashboard",
1386
+ bridge: true,
1387
+ size: { height: "600px" }
1388
+ },
1389
+ events: { load: {
1390
+ exec: "/analytics/.actions/track",
1391
+ args: { event: "page-loaded" }
1392
+ } }
1393
+ }
1394
+ },
1395
+ device: {
1396
+ name: "device",
1397
+ category: "fundamental",
1398
+ description: "Universal rendering surface — renders any AFS path or remote AUP endpoint inline. AFS paths (src starting with /) are auto-resolved: directories render as afs-list, files render as text/detail views. WebSocket URLs connect to remote AUP backends. Shares parent theming. Supports capability negotiation and live data subscription.",
1399
+ props: {
1400
+ src: {
1401
+ type: "string",
1402
+ description: "AFS path or WebSocket URL. AFS paths (starting with /) are auto-resolved: directories → afs-list, files → text/detail view, sessions → AUP passthrough. WebSocket URLs (ws://, wss://) connect to remote AUP backends. This is the universal surface — any AFS path is a renderable component."
1403
+ },
1404
+ url: {
1405
+ type: "string",
1406
+ description: "WebSocket URL of remote AUP backend (legacy — prefer src which handles both). Shorthand: \":3300\" or \"localhost:3300\" auto-expands to ws://."
1407
+ },
1408
+ capabilities: {
1409
+ type: "object",
1410
+ description: "Rendering constraints: { primitives?: string[] (only render these types), maxWidth?: string (CSS max-width) }"
1411
+ },
1412
+ sizing: {
1413
+ type: "string",
1414
+ description: "\"fixed\" — fixed height, scrolls internally (default when height is set). \"fit\" — auto-sizes to content, constrained by minHeight/maxHeight. Default: fixed if height is set, fit otherwise.",
1415
+ default: "fit"
1416
+ },
1417
+ height: {
1418
+ type: "string",
1419
+ description: "Fixed container height (CSS value). Implies sizing=\"fixed\"."
1420
+ },
1421
+ minHeight: {
1422
+ type: "string",
1423
+ description: "Minimum height in fit mode (CSS value, e.g. \"100px\")"
1424
+ },
1425
+ maxHeight: {
1426
+ type: "string",
1427
+ description: "Maximum height in fit mode (CSS value, e.g. \"500px\"). Content scrolls if it exceeds this. Useful for embedding devices in page flow."
1428
+ },
1429
+ showStatus: {
1430
+ type: "boolean",
1431
+ description: "Show connection status dot (green=connected, red=error)",
1432
+ default: true
1433
+ }
1434
+ },
1435
+ events: [
1436
+ "connect",
1437
+ "disconnect",
1438
+ "error"
1439
+ ],
1440
+ containable: false,
1441
+ constraints: "For WebSocket sources: establishes a 2nd WebSocket to the remote AUP backend. Events from nested nodes route to the device's WS, not the parent. Auto-reconnects on disconnect with exponential backoff. For AFS paths: introspects via window.afs.stat/list/read, auto-selects rendering strategy. Checks .aup/ for provider-authored recipes before fallback. Supports in-device navigation: clicking items navigates within the surface with breadcrumb. Subscribes to path for live updates.",
1442
+ example: {
1443
+ id: "afs-surface",
1444
+ type: "device",
1445
+ src: "/modules/smart-home",
1446
+ props: {
1447
+ showStatus: true,
1448
+ capabilities: { primitives: [
1449
+ "view",
1450
+ "text",
1451
+ "action",
1452
+ "chart"
1453
+ ] }
1454
+ }
1455
+ }
1456
+ },
1457
+ ticker: {
1458
+ name: "ticker",
1459
+ category: "fundamental",
1460
+ description: "Continuously scrolling horizontal band for news headlines, stock prices, scores, alerts. Three modes: scroll (infinite loop), flip (cycle items one at a time), static (no animation). Supports intent colors (breaking, warning, success, info) and overlay-grid ticker region.",
1461
+ props: {
1462
+ mode: {
1463
+ type: "string",
1464
+ description: "Display mode",
1465
+ enum: [
1466
+ "scroll",
1467
+ "flip",
1468
+ "static"
1469
+ ],
1470
+ default: "scroll"
1471
+ },
1472
+ intent: {
1473
+ type: "string",
1474
+ description: "Semantic intent for background color",
1475
+ enum: [
1476
+ "breaking",
1477
+ "warning",
1478
+ "success",
1479
+ "info"
1480
+ ]
1481
+ },
1482
+ separator: {
1483
+ type: "string",
1484
+ description: "Text separator between items in scroll/static modes (default: \" • \")",
1485
+ default: " • "
1486
+ },
1487
+ speed: {
1488
+ type: "number",
1489
+ description: "Scroll mode: pixels per second (default: 60). Flip mode: interval in ms (default: 4000)."
1490
+ },
1491
+ pauseOnHover: {
1492
+ type: "boolean",
1493
+ description: "Pause scroll animation on mouse hover (default: true)",
1494
+ default: true
1495
+ },
1496
+ direction: {
1497
+ type: "string",
1498
+ description: "Scroll direction",
1499
+ enum: ["rtl", "ltr"],
1500
+ default: "rtl"
1501
+ },
1502
+ flipTransition: {
1503
+ type: "string",
1504
+ description: "Transition style for flip mode",
1505
+ enum: [
1506
+ "fade",
1507
+ "slide-up",
1508
+ "slide-left"
1509
+ ],
1510
+ default: "fade"
1511
+ }
1512
+ },
1513
+ events: [],
1514
+ containable: true,
1515
+ constraints: "Children are rendered as ticker items. Scroll mode duplicates items in DOM for seamless loop. Use region: 'ticker' in overlay-grid for broadcast overlays.",
1516
+ example: {
1517
+ id: "news-ticker",
1518
+ type: "ticker",
1519
+ props: {
1520
+ mode: "scroll",
1521
+ intent: "breaking",
1522
+ separator: " • "
1523
+ },
1524
+ children: [
1525
+ {
1526
+ id: "t1",
1527
+ type: "text",
1528
+ props: { content: "Breaking: Market hits all-time high" }
1529
+ },
1530
+ {
1531
+ id: "t2",
1532
+ type: "text",
1533
+ props: { content: "Tech stocks surge 5%" }
1534
+ },
1535
+ {
1536
+ id: "t3",
1537
+ type: "text",
1538
+ props: { content: "Fed holds rates steady" }
1539
+ }
1540
+ ]
1541
+ }
1542
+ },
1543
+ broadcast: {
1544
+ name: "broadcast",
1545
+ category: "fundamental",
1546
+ description: "Broadcast overlay graphics — agent specifies semantic roles (live-badge, headline, ticker, etc.) and a theme. The renderer auto-expands roles into typed elements and places them in broadcast regions. Equivalent to manually building an overlay-grid view but with ~70% fewer props. Roles: live-badge, clock, viewer-count, alert, headline, hashtag, speaker-bar, lower-third, data-widget, featured-comment, score-bug, logo, ticker.",
1547
+ props: {
1548
+ theme: {
1549
+ type: "string | object",
1550
+ description: "Overlay theme preset or custom object. Named presets: \"minimal\", \"cnn\", \"apple\". Custom: { badgeBg: \"#ff6b00\", cardRadius: \"0\" }.",
1551
+ enum: [
1552
+ "minimal",
1553
+ "cnn",
1554
+ "apple"
1555
+ ]
1556
+ },
1557
+ background: {
1558
+ type: "string | object",
1559
+ description: "Background for the broadcast surface (gradient, image, video). Same format as view.background."
1560
+ }
1561
+ },
1562
+ events: [],
1563
+ containable: true,
1564
+ constraints: "Children use simplified schema: { role, text?, lines?, items?, at?, src?, children?, intent?, mode? }. role determines the rendered type and default region. 'at' overrides default placement (e.g. 'top-end'). text → simple text content. lines[] → multi-line view. items[] → ticker items. src → media source (logo). children[] → passthrough AUP nodes.",
1565
+ example: {
1566
+ type: "broadcast",
1567
+ props: { theme: "cnn" },
1568
+ children: [
1569
+ {
1570
+ role: "live-badge",
1571
+ text: "● LIVE"
1572
+ },
1573
+ {
1574
+ role: "clock",
1575
+ text: "2:36 PM ET"
1576
+ },
1577
+ {
1578
+ role: "alert",
1579
+ text: "BREAKING NEWS"
1580
+ },
1581
+ {
1582
+ role: "headline",
1583
+ text: "MAJOR POLICY ANNOUNCEMENT EXPECTED TODAY"
1584
+ },
1585
+ {
1586
+ role: "ticker",
1587
+ items: [
1588
+ "Markets surge 2%",
1589
+ "Oil drops 3%",
1590
+ "Fed holds rates"
1591
+ ],
1592
+ intent: "breaking"
1593
+ }
1594
+ ]
1595
+ }
1596
+ },
1597
+ "afs-list": {
1598
+ name: "afs-list",
1599
+ category: "fundamental",
1600
+ description: "AFS-bound universal data view. Two orthogonal dimensions: layout (spatial arrangement) × itemStyle (per-item rendering). Binds to node.src, fetches via window.afs.list(), subscribes for live updates. Pipeline: fetch → filter → sort → transform → render. Kind-based rendering: meta.kind drives icon, badge, and CSS class per item.",
1601
+ props: {
1602
+ layout: {
1603
+ type: "string",
1604
+ description: "Spatial arrangement: list (vertical), grid (CSS grid), masonry (CSS columns), slideshow (one-at-a-time), table (data table)",
1605
+ enum: [
1606
+ "list",
1607
+ "grid",
1608
+ "masonry",
1609
+ "slideshow",
1610
+ "table"
1611
+ ],
1612
+ default: "list"
1613
+ },
1614
+ itemStyle: {
1615
+ type: "string",
1616
+ description: "Per-item rendering: row (icon+label+badge), card (image/icon+body), compact (minimal), media (image-heavy overlay), hero (full-width feature)",
1617
+ enum: [
1618
+ "row",
1619
+ "card",
1620
+ "compact",
1621
+ "media",
1622
+ "hero"
1623
+ ],
1624
+ default: "row"
1625
+ },
1626
+ gridCols: {
1627
+ type: "number",
1628
+ description: "Column count for grid/masonry layouts. Default 3.",
1629
+ default: 3
1630
+ },
1631
+ minItemWidth: {
1632
+ type: "string",
1633
+ description: "Minimum item width for auto-fill grid (e.g., '200px', '15rem'). When set, grid uses auto-fill with minmax() instead of fixed columns. gridCols overrides minItemWidth (explicit > auto)."
1634
+ },
1635
+ imageFit: {
1636
+ type: "string",
1637
+ description: "How card/media/hero images are scaled within their container. cover (default): aspect-fill, crops to fill (good for photos). contain: aspect-fit, shows entire image with letterboxing (good for logos/icons). fill: stretches to fill (rarely wanted).",
1638
+ enum: [
1639
+ "cover",
1640
+ "contain",
1641
+ "fill"
1642
+ ],
1643
+ default: "cover"
1644
+ },
1645
+ imageHeight: {
1646
+ type: "string",
1647
+ description: "Height of card image area. String CSS value ('200px', '50%') or number (px). Default 140px for card, auto for media/hero."
1648
+ },
1649
+ imageShape: {
1650
+ type: "string",
1651
+ description: "Shape of card images. rect (default): rectangular banner. circle: centered circular avatar — ideal for people/team directories.",
1652
+ enum: ["rect", "circle"],
1653
+ default: "rect"
1654
+ },
1655
+ pageSize: {
1656
+ type: "number",
1657
+ description: "Items per page for pagination. 0 = load all at once (default). When set, fetches data in pages via offset/limit and shows 'Load more' button.",
1658
+ default: 0
1659
+ },
1660
+ virtual: {
1661
+ type: "boolean",
1662
+ description: "Enable virtual scrolling. Only renders visible items + buffer. Use for large datasets (100+ items). Default false.",
1663
+ default: false
1664
+ },
1665
+ estimatedItemHeight: {
1666
+ type: "number",
1667
+ description: "Estimated height per item in pixels for virtual scroll. Default 48.",
1668
+ default: 48
1669
+ },
1670
+ bufferItems: {
1671
+ type: "number",
1672
+ description: "Extra items to render above/below viewport in virtual scroll mode. Default 5.",
1673
+ default: 5
1674
+ },
1675
+ variant: {
1676
+ type: "string",
1677
+ description: "Legacy layout variant (use layout instead). flat→list, grouped, table.",
1678
+ enum: [
1679
+ "flat",
1680
+ "grouped",
1681
+ "table"
1682
+ ],
1683
+ default: "flat"
1684
+ },
1685
+ clickMode: {
1686
+ type: "string",
1687
+ description: "Click behavior: select emits select event, navigate drills into child path, both = directories navigate and leaves select",
1688
+ enum: [
1689
+ "select",
1690
+ "navigate",
1691
+ "both"
1692
+ ],
1693
+ default: "select"
1694
+ },
1695
+ labelField: {
1696
+ type: "string",
1697
+ description: "Dot-path into entry for display label (e.g. 'id', 'content.name')",
1698
+ default: "id"
1699
+ },
1700
+ descriptionField: {
1701
+ type: "string",
1702
+ description: "Dot-path into entry for secondary text (e.g. 'meta.description'). Set null to hide.",
1703
+ default: "meta.description"
1704
+ },
1705
+ emptyText: {
1706
+ type: "string",
1707
+ description: "Text shown when list has no items",
1708
+ default: "No items"
1709
+ },
1710
+ showBreadcrumb: {
1711
+ type: "boolean",
1712
+ description: "Show breadcrumb trail in navigate/both click modes",
1713
+ default: true
1714
+ },
1715
+ kindIcons: {
1716
+ type: "object",
1717
+ description: "Override icons per kind: { \"ts:task\": \"check\", \"fs:directory\": \"folder\" }. Keys are meta.kind values, values are icon names from the built-in set."
1718
+ },
1719
+ maxDepth: {
1720
+ type: "number",
1721
+ description: "Max nesting depth for grouped variant (0 = flat groups, 3 = default). Prevents runaway recursion in deep AFS trees.",
1722
+ default: 3
1723
+ },
1724
+ filter: {
1725
+ type: "object",
1726
+ description: "Filter entries before rendering. String = match id substring. Object: { kind: \"ts:task\" }, { field: \"content.status\", match: \"ready\" }, { exclude: [\"daemon\"] }."
1727
+ },
1728
+ sort: {
1729
+ type: "object",
1730
+ description: "Sort entries. String = field name (e.g. \"id\"). Object: { field: \"content.status\", desc: true }."
1731
+ },
1732
+ transform: {
1733
+ type: "object",
1734
+ description: "Remap display fields. Each key is a dot-path into entry. { label: \"content.name\", description: \"content.summary\", badge: \"content.status\" }."
1735
+ },
1736
+ columns: {
1737
+ type: "array",
1738
+ description: "Column defs for table variant: [{ key: \"id\", label: \"Name\" }, { key: \"content.status\", label: \"Status\" }]."
1739
+ },
1740
+ searchable: {
1741
+ type: "boolean",
1742
+ description: "Show live search input that filters entries by id.",
1743
+ default: false
1744
+ },
1745
+ searchPlaceholder: {
1746
+ type: "string",
1747
+ description: "Placeholder text for search input.",
1748
+ default: "Search..."
1749
+ }
1750
+ },
1751
+ events: [
1752
+ "select",
1753
+ "navigate",
1754
+ "expand",
1755
+ "collapse"
1756
+ ],
1757
+ containable: true,
1758
+ constraints: "node.src must be an AFS path. Client fetches data via window.afs.list(src). Two orthogonal dimensions: layout (list/grid/masonry/slideshow/table) × itemStyle (row/card/compact/media/hero). Data pipeline: raw entries → filter → sort → transform → render. Children with role='item' define a custom item template (overrides itemStyle). Children with role='header' render once at top. Children with role='empty' render when no items. Template binding: ${entry.id}, ${entry.meta.kind}, ${entry.content.field} — any string prop. Three-layer template resolution: role='item' child > kind registry > built-in itemStyle. select: { path, id, meta, content }. navigate: { path, id, meta, previousPath }. expand/collapse: { path, id, childrenCount }. variant is legacy — prefer layout + itemStyle. Live subscription via window.afs.subscribe for automatic refresh on writes.",
1759
+ examples: [
1760
+ {
1761
+ id: "project-grid",
1762
+ type: "afs-list",
1763
+ src: "/teams/arcblock-core/workspaces/",
1764
+ props: {
1765
+ layout: "grid",
1766
+ itemStyle: "card",
1767
+ gridCols: 3,
1768
+ clickMode: "select",
1769
+ searchable: true,
1770
+ emptyText: "No workspaces"
1771
+ },
1772
+ events: { select: {
1773
+ exec: "/ui/.actions/navigate-workspace",
1774
+ args: {}
1775
+ } }
1776
+ },
1777
+ {
1778
+ id: "task-list",
1779
+ type: "afs-list",
1780
+ src: "/data/tasks",
1781
+ props: {
1782
+ layout: "grid",
1783
+ minItemWidth: "250px",
1784
+ pageSize: 12,
1785
+ searchable: true
1786
+ }
1787
+ },
1788
+ {
1789
+ id: "team-members",
1790
+ type: "afs-list",
1791
+ src: "/teams/arcblock-core/members/",
1792
+ props: {
1793
+ layout: "grid",
1794
+ gridCols: 3,
1795
+ pageSize: 9
1796
+ },
1797
+ children: [
1798
+ {
1799
+ id: "tpl-header",
1800
+ type: "view",
1801
+ props: {
1802
+ role: "header",
1803
+ layout: "row"
1804
+ },
1805
+ children: [{
1806
+ id: "th-icon",
1807
+ type: "media",
1808
+ props: {
1809
+ type: "icon",
1810
+ content: "users"
1811
+ }
1812
+ }, {
1813
+ id: "th-text",
1814
+ type: "text",
1815
+ props: {
1816
+ content: "Team Members",
1817
+ level: 3
1818
+ }
1819
+ }]
1820
+ },
1821
+ {
1822
+ id: "tpl-item",
1823
+ type: "view",
1824
+ props: {
1825
+ role: "item",
1826
+ mode: "card"
1827
+ },
1828
+ children: [
1829
+ {
1830
+ id: "ti-name",
1831
+ type: "text",
1832
+ props: {
1833
+ content: "${entry.id}",
1834
+ level: 3
1835
+ }
1836
+ },
1837
+ {
1838
+ id: "ti-role",
1839
+ type: "text",
1840
+ props: {
1841
+ content: "${entry.meta.kind}",
1842
+ format: "code",
1843
+ intent: "info"
1844
+ }
1845
+ },
1846
+ {
1847
+ id: "ti-desc",
1848
+ type: "text",
1849
+ props: {
1850
+ content: "${entry.content}",
1851
+ intent: "muted"
1852
+ }
1853
+ }
1854
+ ]
1855
+ },
1856
+ {
1857
+ id: "tpl-empty",
1858
+ type: "view",
1859
+ props: { role: "empty" },
1860
+ children: [{
1861
+ id: "te-text",
1862
+ type: "text",
1863
+ props: {
1864
+ content: "No members found",
1865
+ intent: "muted"
1866
+ }
1867
+ }]
1868
+ }
1869
+ ]
1870
+ },
1871
+ {
1872
+ id: "log-viewer",
1873
+ type: "afs-list",
1874
+ src: "/data/logs",
1875
+ props: {
1876
+ layout: "list",
1877
+ itemStyle: "row",
1878
+ virtual: true,
1879
+ estimatedItemHeight: 48,
1880
+ bufferItems: 5
1881
+ }
1882
+ }
1883
+ ],
1884
+ example: {
1885
+ id: "project-grid",
1886
+ type: "afs-list",
1887
+ src: "/teams/arcblock-core/workspaces/",
1888
+ props: {
1889
+ layout: "grid",
1890
+ itemStyle: "card",
1891
+ gridCols: 3,
1892
+ clickMode: "select",
1893
+ searchable: true,
1894
+ emptyText: "No workspaces"
1895
+ },
1896
+ events: { select: {
1897
+ exec: "/ui/.actions/navigate-workspace",
1898
+ args: {}
1899
+ } }
1900
+ }
1901
+ },
1902
+ rtc: {
1903
+ name: "rtc",
1904
+ category: "subsystem",
1905
+ description: "Real-time communication placeholder (WebRTC). Implementation pending — reserved primitive name.",
1906
+ props: {},
1907
+ events: [],
1908
+ containable: false,
1909
+ constraints: "Not yet implemented. Reserved for future WebRTC integration.",
1910
+ example: {
1911
+ id: "rtc-1",
1912
+ type: "rtc"
1913
+ }
1914
+ }
1915
+ };
1916
+ const THEMES = {
1917
+ midnight: {
1918
+ name: "midnight",
1919
+ description: "Dark theme with deep blues and high contrast",
1920
+ tokens: {
1921
+ bg: "#0f1729",
1922
+ surface: "#1a2332",
1923
+ border: "#2a3a4a",
1924
+ text: "#e2e8f0",
1925
+ accent: "#60a5fa",
1926
+ muted: "#94a3b8"
1927
+ }
1928
+ },
1929
+ clean: {
1930
+ name: "clean",
1931
+ description: "Minimal light theme with crisp whites",
1932
+ tokens: {
1933
+ bg: "#ffffff",
1934
+ surface: "#f8fafc",
1935
+ border: "#e2e8f0",
1936
+ text: "#1e293b",
1937
+ accent: "#3b82f6",
1938
+ muted: "#64748b"
1939
+ }
1940
+ },
1941
+ glass: {
1942
+ name: "glass",
1943
+ description: "Translucent glassmorphism style",
1944
+ tokens: {
1945
+ bg: "rgba(15,23,42,0.8)",
1946
+ surface: "rgba(30,41,59,0.6)",
1947
+ border: "rgba(148,163,184,0.2)",
1948
+ text: "#e2e8f0",
1949
+ accent: "#818cf8",
1950
+ muted: "#94a3b8"
1951
+ }
1952
+ },
1953
+ brutalist: {
1954
+ name: "brutalist",
1955
+ description: "Raw, high-contrast brutalist aesthetic",
1956
+ tokens: {
1957
+ bg: "#000000",
1958
+ surface: "#111111",
1959
+ border: "#333333",
1960
+ text: "#ffffff",
1961
+ accent: "#ff0000",
1962
+ muted: "#888888"
1963
+ }
1964
+ },
1965
+ soft: {
1966
+ name: "soft",
1967
+ description: "Gentle pastels and rounded forms",
1968
+ tokens: {
1969
+ bg: "#fef7f0",
1970
+ surface: "#fff5eb",
1971
+ border: "#fed7aa",
1972
+ text: "#451a03",
1973
+ accent: "#f97316",
1974
+ muted: "#9a3412"
1975
+ }
1976
+ },
1977
+ cyber: {
1978
+ name: "cyber",
1979
+ description: "Neon cyberpunk with electric greens",
1980
+ tokens: {
1981
+ bg: "#0a0a0a",
1982
+ surface: "#111111",
1983
+ border: "#1a3a1a",
1984
+ text: "#00ff41",
1985
+ accent: "#00ff41",
1986
+ muted: "#4ade80"
1987
+ }
1988
+ },
1989
+ editorial: {
1990
+ name: "editorial",
1991
+ description: "Magazine-style typography-focused theme",
1992
+ tokens: {
1993
+ bg: "#fafaf9",
1994
+ surface: "#f5f5f4",
1995
+ border: "#d6d3d1",
1996
+ text: "#1c1917",
1997
+ accent: "#dc2626",
1998
+ muted: "#78716c"
1999
+ }
2000
+ }
2001
+ };
2002
+ const OVERLAY_ROLES = [
2003
+ "live-badge",
2004
+ "clock",
2005
+ "viewer-count",
2006
+ "speaker-bar",
2007
+ "hashtag",
2008
+ "logo",
2009
+ "data-widget",
2010
+ "alert",
2011
+ "headline",
2012
+ "featured-comment",
2013
+ "score-bug",
2014
+ "lower-third",
2015
+ "ticker-item"
2016
+ ];
2017
+ const OVERLAY_THEMES = {
2018
+ minimal: {
2019
+ name: "minimal",
2020
+ description: "Clean default — translucent cards and badges, system fonts",
2021
+ fonts: [],
2022
+ roles: OVERLAY_ROLES,
2023
+ vars: {
2024
+ "--overlay-badge-bg": "rgba(0,0,0,0.6)",
2025
+ "--overlay-badge-color": "#fff",
2026
+ "--overlay-badge-radius": "6px",
2027
+ "--overlay-card-bg": "rgba(0,0,0,0.5)",
2028
+ "--overlay-card-radius": "8px",
2029
+ "--overlay-glass-blur": "8px",
2030
+ "--overlay-lower-bg": "rgba(0,0,0,0.5)",
2031
+ "--overlay-lower-radius": "8px",
2032
+ "--overlay-ticker-bg": "rgba(0,0,0,0.6)",
2033
+ "--overlay-alert-bg": "rgba(220,38,38,0.8)",
2034
+ "--overlay-score-bg": "rgba(0,0,0,0.7)",
2035
+ "--overlay-score-radius": "6px"
2036
+ },
2037
+ examples: [{
2038
+ name: "livestream",
2039
+ description: "Simple livestream overlay — LIVE badge, viewer count, clock",
2040
+ tree: {
2041
+ type: "view",
2042
+ props: {
2043
+ layout: "overlay-grid",
2044
+ theme: "minimal"
2045
+ },
2046
+ children: [
2047
+ {
2048
+ type: "text",
2049
+ props: {
2050
+ mode: "badge",
2051
+ role: "live-badge",
2052
+ region: "top-start"
2053
+ },
2054
+ text: "● LIVE"
2055
+ },
2056
+ {
2057
+ type: "text",
2058
+ props: {
2059
+ role: "viewer-count",
2060
+ region: "top-center"
2061
+ },
2062
+ text: "👁 1,234"
2063
+ },
2064
+ {
2065
+ type: "text",
2066
+ props: {
2067
+ role: "clock",
2068
+ region: "top-end"
2069
+ },
2070
+ text: "14:36"
2071
+ },
2072
+ {
2073
+ type: "view",
2074
+ props: {
2075
+ role: "speaker-bar",
2076
+ region: "lower-start"
2077
+ },
2078
+ children: [{
2079
+ type: "text",
2080
+ text: "Jane Smith"
2081
+ }, {
2082
+ type: "text",
2083
+ text: "Product Manager, ArcBlock"
2084
+ }]
2085
+ }
2086
+ ]
2087
+ }
2088
+ }]
2089
+ },
2090
+ cnn: {
2091
+ name: "cnn",
2092
+ description: "Hard-edge news broadcast — red accents, Barlow Condensed, yellow alerts, sharp corners",
2093
+ fonts: ["Barlow Condensed"],
2094
+ roles: OVERLAY_ROLES,
2095
+ vars: {
2096
+ "--overlay-badge-bg": "#cc0000",
2097
+ "--overlay-badge-color": "#fff",
2098
+ "--overlay-badge-radius": "2px",
2099
+ "--overlay-card-bg": "rgba(0,0,0,0.85)",
2100
+ "--overlay-card-border": "3px solid #cc0000",
2101
+ "--overlay-card-radius": "0",
2102
+ "--overlay-glass-blur": "0",
2103
+ "--overlay-lower-bg": "#cc0000",
2104
+ "--overlay-lower-radius": "0",
2105
+ "--overlay-ticker-bg": "#111",
2106
+ "--overlay-alert-bg": "#fbbf24",
2107
+ "--overlay-alert-color": "#111",
2108
+ "--overlay-score-bg": "#1a1a1a",
2109
+ "--overlay-score-radius": "0"
2110
+ },
2111
+ examples: [
2112
+ {
2113
+ name: "breaking-news",
2114
+ description: "CNN breaking news — red BREAKING NEWS bar, white headline, crawl ticker",
2115
+ tree: {
2116
+ type: "view",
2117
+ props: {
2118
+ layout: "overlay-grid",
2119
+ theme: "cnn"
2120
+ },
2121
+ children: [
2122
+ {
2123
+ type: "text",
2124
+ props: {
2125
+ mode: "badge",
2126
+ role: "live-badge",
2127
+ region: "top-start"
2128
+ },
2129
+ text: "● LIVE"
2130
+ },
2131
+ {
2132
+ type: "text",
2133
+ props: {
2134
+ role: "clock",
2135
+ region: "top-end"
2136
+ },
2137
+ text: "2:36 PM ET"
2138
+ },
2139
+ {
2140
+ type: "text",
2141
+ props: {
2142
+ role: "alert",
2143
+ region: "lower-start"
2144
+ },
2145
+ text: "BREAKING NEWS"
2146
+ },
2147
+ {
2148
+ type: "text",
2149
+ props: {
2150
+ role: "headline",
2151
+ region: "lower-center"
2152
+ },
2153
+ text: "MAJOR POLICY ANNOUNCEMENT EXPECTED FROM WHITE HOUSE TODAY"
2154
+ },
2155
+ {
2156
+ type: "view",
2157
+ props: { region: "ticker" },
2158
+ children: [{
2159
+ type: "ticker",
2160
+ props: { intent: "breaking" },
2161
+ children: [
2162
+ {
2163
+ type: "text",
2164
+ text: "Stock markets surge as Fed signals rate pause"
2165
+ },
2166
+ {
2167
+ type: "text",
2168
+ text: "Oil prices drop 3% on surprise inventory build"
2169
+ },
2170
+ {
2171
+ type: "text",
2172
+ text: "European markets close mixed amid uncertainty"
2173
+ }
2174
+ ]
2175
+ }]
2176
+ }
2177
+ ]
2178
+ }
2179
+ },
2180
+ {
2181
+ name: "interview",
2182
+ description: "CNN interview — speaker name bar, topic headline, live badge",
2183
+ tree: {
2184
+ type: "view",
2185
+ props: {
2186
+ layout: "overlay-grid",
2187
+ theme: "cnn"
2188
+ },
2189
+ children: [
2190
+ {
2191
+ type: "text",
2192
+ props: {
2193
+ mode: "badge",
2194
+ role: "live-badge",
2195
+ region: "top-start"
2196
+ },
2197
+ text: "● LIVE"
2198
+ },
2199
+ {
2200
+ type: "text",
2201
+ props: {
2202
+ role: "clock",
2203
+ region: "top-end"
2204
+ },
2205
+ text: "3:15 PM ET"
2206
+ },
2207
+ {
2208
+ type: "view",
2209
+ props: {
2210
+ role: "speaker-bar",
2211
+ region: "lower-start"
2212
+ },
2213
+ children: [{
2214
+ type: "text",
2215
+ text: "JOHN DOE"
2216
+ }, {
2217
+ type: "text",
2218
+ text: "Senior Policy Advisor"
2219
+ }]
2220
+ },
2221
+ {
2222
+ type: "text",
2223
+ props: {
2224
+ role: "headline",
2225
+ region: "lower-center"
2226
+ },
2227
+ text: "INFRASTRUCTURE BILL DEBATE CONTINUES IN SENATE"
2228
+ },
2229
+ {
2230
+ type: "view",
2231
+ props: { region: "ticker" },
2232
+ children: [{
2233
+ type: "ticker",
2234
+ children: [{
2235
+ type: "text",
2236
+ text: "DOW +0.8% • S&P +1.2% • NASDAQ +1.5%"
2237
+ }, {
2238
+ type: "text",
2239
+ text: "10Y Treasury yield at 4.25%"
2240
+ }]
2241
+ }]
2242
+ }
2243
+ ]
2244
+ }
2245
+ },
2246
+ {
2247
+ name: "election",
2248
+ description: "CNN election night — score bug with candidate tallies, alert banner",
2249
+ tree: {
2250
+ type: "view",
2251
+ props: {
2252
+ layout: "overlay-grid",
2253
+ theme: "cnn"
2254
+ },
2255
+ children: [
2256
+ {
2257
+ type: "text",
2258
+ props: {
2259
+ mode: "badge",
2260
+ role: "live-badge",
2261
+ region: "top-start"
2262
+ },
2263
+ text: "● ELECTION NIGHT"
2264
+ },
2265
+ {
2266
+ type: "text",
2267
+ props: {
2268
+ role: "clock",
2269
+ region: "top-end"
2270
+ },
2271
+ text: "9:45 PM ET"
2272
+ },
2273
+ {
2274
+ type: "view",
2275
+ props: {
2276
+ role: "score-bug",
2277
+ region: "mid-end"
2278
+ },
2279
+ children: [
2280
+ {
2281
+ type: "text",
2282
+ text: "SMITH (D) — 214"
2283
+ },
2284
+ {
2285
+ type: "text",
2286
+ text: "JONES (R) — 198"
2287
+ },
2288
+ {
2289
+ type: "text",
2290
+ text: "270 TO WIN"
2291
+ }
2292
+ ]
2293
+ },
2294
+ {
2295
+ type: "text",
2296
+ props: {
2297
+ role: "alert",
2298
+ region: "lower-start"
2299
+ },
2300
+ text: "KEY RACE ALERT"
2301
+ },
2302
+ {
2303
+ type: "text",
2304
+ props: {
2305
+ role: "headline",
2306
+ region: "lower-center"
2307
+ },
2308
+ text: "POLLS CLOSING IN FIVE KEY SWING STATES"
2309
+ },
2310
+ {
2311
+ type: "view",
2312
+ props: { region: "ticker" },
2313
+ children: [{
2314
+ type: "ticker",
2315
+ children: [
2316
+ {
2317
+ type: "text",
2318
+ text: "Florida: 52% reporting — too close to call"
2319
+ },
2320
+ {
2321
+ type: "text",
2322
+ text: "Pennsylvania: 38% reporting — too early to call"
2323
+ },
2324
+ {
2325
+ type: "text",
2326
+ text: "Arizona: polls close in 15 minutes"
2327
+ }
2328
+ ]
2329
+ }]
2330
+ }
2331
+ ]
2332
+ }
2333
+ }
2334
+ ]
2335
+ },
2336
+ apple: {
2337
+ name: "apple",
2338
+ description: "Frosted glass premium — dark glass on any background, Inter font, large radii",
2339
+ fonts: ["Inter"],
2340
+ roles: OVERLAY_ROLES,
2341
+ vars: {
2342
+ "--overlay-badge-bg": "rgba(0,0,0,0.35)",
2343
+ "--overlay-badge-color": "#fff",
2344
+ "--overlay-badge-radius": "20px",
2345
+ "--overlay-card-bg": "rgba(0,0,0,0.25)",
2346
+ "--overlay-card-border": "1px solid rgba(255,255,255,0.15)",
2347
+ "--overlay-card-radius": "16px",
2348
+ "--overlay-glass-blur": "20px",
2349
+ "--overlay-lower-bg": "rgba(0,0,0,0.25)",
2350
+ "--overlay-lower-radius": "16px",
2351
+ "--overlay-ticker-bg": "rgba(0,0,0,0.2)",
2352
+ "--overlay-alert-bg": "rgba(220,38,38,0.6)",
2353
+ "--overlay-score-bg": "rgba(0,0,0,0.25)",
2354
+ "--overlay-score-radius": "12px"
2355
+ },
2356
+ examples: [{
2357
+ name: "keynote",
2358
+ description: "Apple keynote — speaker name pill, topic card, minimal chrome",
2359
+ tree: {
2360
+ type: "view",
2361
+ props: {
2362
+ layout: "overlay-grid",
2363
+ theme: "apple"
2364
+ },
2365
+ children: [
2366
+ {
2367
+ type: "text",
2368
+ props: {
2369
+ mode: "badge",
2370
+ role: "live-badge",
2371
+ region: "top-end"
2372
+ },
2373
+ text: "● LIVE"
2374
+ },
2375
+ {
2376
+ type: "view",
2377
+ props: {
2378
+ role: "speaker-bar",
2379
+ region: "lower-start"
2380
+ },
2381
+ children: [{
2382
+ type: "text",
2383
+ text: "Craig Federighi"
2384
+ }, {
2385
+ type: "text",
2386
+ text: "SVP Software Engineering"
2387
+ }]
2388
+ },
2389
+ {
2390
+ type: "view",
2391
+ props: {
2392
+ role: "lower-third",
2393
+ region: "lower-center"
2394
+ },
2395
+ children: [{
2396
+ type: "text",
2397
+ text: "Introducing Intelligence Everywhere"
2398
+ }, {
2399
+ type: "text",
2400
+ text: "Apple Intelligence comes to every device"
2401
+ }]
2402
+ }
2403
+ ]
2404
+ }
2405
+ }, {
2406
+ name: "product-showcase",
2407
+ description: "Apple product reveal — clean stats, frosted glass data widgets",
2408
+ tree: {
2409
+ type: "view",
2410
+ props: {
2411
+ layout: "overlay-grid",
2412
+ theme: "apple"
2413
+ },
2414
+ children: [
2415
+ {
2416
+ type: "text",
2417
+ props: {
2418
+ mode: "badge",
2419
+ role: "live-badge",
2420
+ region: "top-end"
2421
+ },
2422
+ text: "● LIVE"
2423
+ },
2424
+ {
2425
+ type: "view",
2426
+ props: {
2427
+ role: "data-widget",
2428
+ region: "mid-end"
2429
+ },
2430
+ children: [
2431
+ {
2432
+ type: "text",
2433
+ text: "M4 Ultra"
2434
+ },
2435
+ {
2436
+ type: "text",
2437
+ text: "32-core CPU • 80-core GPU"
2438
+ },
2439
+ {
2440
+ type: "text",
2441
+ text: "192 GB Unified Memory"
2442
+ }
2443
+ ]
2444
+ },
2445
+ {
2446
+ type: "view",
2447
+ props: {
2448
+ role: "lower-third",
2449
+ region: "lower-center"
2450
+ },
2451
+ children: [{
2452
+ type: "text",
2453
+ text: "Mac Pro with M4 Ultra"
2454
+ }, {
2455
+ type: "text",
2456
+ text: "The most powerful Mac ever"
2457
+ }]
2458
+ },
2459
+ {
2460
+ type: "view",
2461
+ props: { region: "ticker" },
2462
+ children: [{
2463
+ type: "ticker",
2464
+ children: [
2465
+ {
2466
+ type: "text",
2467
+ text: "Available starting at $6,999"
2468
+ },
2469
+ {
2470
+ type: "text",
2471
+ text: "Order today, ships next week"
2472
+ },
2473
+ {
2474
+ type: "text",
2475
+ text: "Trade-in values up to $2,000"
2476
+ }
2477
+ ]
2478
+ }]
2479
+ }
2480
+ ]
2481
+ }
2482
+ }]
2483
+ }
2484
+ };
2485
+
2486
+ //#endregion
2487
+ exports.OVERLAY_THEMES = OVERLAY_THEMES;
2488
+ exports.PRIMITIVES = PRIMITIVES;
2489
+ exports.THEMES = THEMES;