@arkitektio/bsx 4.3.0 → 6.0.0

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 (349) hide show
  1. package/README.md +39 -18
  2. package/dist/bsx/analyze.d.ts +6 -5
  3. package/dist/bsx/analyze.d.ts.map +1 -1
  4. package/dist/bsx/analyze.js +12 -10
  5. package/dist/bsx/analyze.js.map +1 -1
  6. package/dist/bsx/declared.d.ts +111 -0
  7. package/dist/bsx/declared.d.ts.map +1 -0
  8. package/dist/bsx/declared.js +311 -0
  9. package/dist/bsx/declared.js.map +1 -0
  10. package/dist/bsx/index.d.ts +1 -0
  11. package/dist/bsx/index.d.ts.map +1 -1
  12. package/dist/bsx/index.js +1 -0
  13. package/dist/bsx/index.js.map +1 -1
  14. package/dist/bsx/infer.d.ts +40 -17
  15. package/dist/bsx/infer.d.ts.map +1 -1
  16. package/dist/bsx/infer.js +105 -49
  17. package/dist/bsx/infer.js.map +1 -1
  18. package/dist/bsx/language.d.ts +6 -2
  19. package/dist/bsx/language.d.ts.map +1 -1
  20. package/dist/bsx/language.js +65 -21
  21. package/dist/bsx/language.js.map +1 -1
  22. package/dist/bsx/parse.d.ts +19 -8
  23. package/dist/bsx/parse.d.ts.map +1 -1
  24. package/dist/bsx/parse.js +49 -59
  25. package/dist/bsx/parse.js.map +1 -1
  26. package/dist/bsx/print.d.ts.map +1 -1
  27. package/dist/bsx/print.js +25 -35
  28. package/dist/bsx/print.js.map +1 -1
  29. package/dist/bsx/references.d.ts +48 -54
  30. package/dist/bsx/references.d.ts.map +1 -1
  31. package/dist/bsx/references.js +359 -159
  32. package/dist/bsx/references.js.map +1 -1
  33. package/dist/catalogs/html.d.ts +3 -3
  34. package/dist/catalogs/html.d.ts.map +1 -1
  35. package/dist/catalogs/html.js +3 -3
  36. package/dist/catalogs/html.js.map +1 -1
  37. package/dist/catalogs/index.d.ts +172 -180
  38. package/dist/catalogs/index.d.ts.map +1 -1
  39. package/dist/catalogs/index.js +6 -2
  40. package/dist/catalogs/index.js.map +1 -1
  41. package/dist/catalogs/logo.d.ts +19 -33
  42. package/dist/catalogs/logo.d.ts.map +1 -1
  43. package/dist/catalogs/logo.js +4 -5
  44. package/dist/catalogs/logo.js.map +1 -1
  45. package/dist/catalogs/parts/data.d.ts +6 -6
  46. package/dist/catalogs/parts/feedback.d.ts +15 -15
  47. package/dist/catalogs/parts/forms.d.ts +24 -24
  48. package/dist/catalogs/parts/html.d.ts +3 -3
  49. package/dist/catalogs/parts/html.d.ts.map +1 -1
  50. package/dist/catalogs/parts/html.js +1 -1
  51. package/dist/catalogs/parts/html.js.map +1 -1
  52. package/dist/catalogs/parts/icons.d.ts +11 -11
  53. package/dist/catalogs/parts/icons.js +1 -1
  54. package/dist/catalogs/parts/index.d.ts +153 -165
  55. package/dist/catalogs/parts/index.d.ts.map +1 -1
  56. package/dist/catalogs/parts/layout.d.ts +11 -1
  57. package/dist/catalogs/parts/layout.d.ts.map +1 -1
  58. package/dist/catalogs/parts/layout.js +9 -0
  59. package/dist/catalogs/parts/layout.js.map +1 -1
  60. package/dist/catalogs/parts/logo.d.ts +17 -32
  61. package/dist/catalogs/parts/logo.d.ts.map +1 -1
  62. package/dist/catalogs/parts/logo.js +13 -15
  63. package/dist/catalogs/parts/logo.js.map +1 -1
  64. package/dist/catalogs/parts/navigation.d.ts +20 -20
  65. package/dist/catalogs/parts/overlays.d.ts +55 -55
  66. package/dist/catalogs/parts/run.d.ts +5 -13
  67. package/dist/catalogs/parts/run.d.ts.map +1 -1
  68. package/dist/catalogs/parts/run.js +1 -1
  69. package/dist/catalogs/parts/scene.d.ts +9 -17
  70. package/dist/catalogs/parts/scene.d.ts.map +1 -1
  71. package/dist/catalogs/parts/scene.js +1 -5
  72. package/dist/catalogs/parts/scene.js.map +1 -1
  73. package/dist/catalogs/parts/structure.js +2 -2
  74. package/dist/catalogs/parts/toast.js +1 -1
  75. package/dist/catalogs/parts/toast.js.map +1 -1
  76. package/dist/catalogs/parts/typography.d.ts +3 -3
  77. package/dist/catalogs/parts/typography.js +1 -1
  78. package/dist/catalogs/parts/typography.js.map +1 -1
  79. package/dist/catalogs/props.d.ts +4 -4
  80. package/dist/catalogs/scene.d.ts +8 -16
  81. package/dist/catalogs/scene.d.ts.map +1 -1
  82. package/dist/catalogs/scene.js +3 -3
  83. package/dist/catalogs/scene.js.map +1 -1
  84. package/dist/catalogs/shadcn.d.ts +58 -58
  85. package/dist/catalogs/shadcn.d.ts.map +1 -1
  86. package/dist/catalogs/shadcn.js +4 -4
  87. package/dist/catalogs/shadcn.js.map +1 -1
  88. package/dist/catalogs/structure.d.ts +1 -1
  89. package/dist/catalogs/structure.d.ts.map +1 -1
  90. package/dist/catalogs/structure.js +3 -3
  91. package/dist/catalogs/structure.js.map +1 -1
  92. package/dist/catalogs/ui.d.ts +83 -73
  93. package/dist/catalogs/ui.d.ts.map +1 -1
  94. package/dist/catalogs/ui.js +4 -3
  95. package/dist/catalogs/ui.js.map +1 -1
  96. package/dist/catalogs.d.ts +1 -1
  97. package/dist/catalogs.d.ts.map +1 -1
  98. package/dist/catalogs.js +2 -2
  99. package/dist/catalogs.js.map +1 -1
  100. package/dist/logo/actionLogoSource.d.ts +3 -3
  101. package/dist/logo/actionLogoSource.d.ts.map +1 -1
  102. package/dist/logo/actionLogoSource.js +4 -4
  103. package/dist/logo/actionLogoSource.js.map +1 -1
  104. package/dist/ports.js +1 -1
  105. package/dist/ports.js.map +1 -1
  106. package/dist/renderer/BlokRenderer.d.ts +10 -6
  107. package/dist/renderer/BlokRenderer.d.ts.map +1 -1
  108. package/dist/renderer/BlokRenderer.js +23 -9
  109. package/dist/renderer/BlokRenderer.js.map +1 -1
  110. package/dist/renderer/baseCatalog.d.ts +8 -6
  111. package/dist/renderer/baseCatalog.d.ts.map +1 -1
  112. package/dist/renderer/baseCatalog.js +7 -5
  113. package/dist/renderer/baseCatalog.js.map +1 -1
  114. package/dist/renderer/bloks/control.d.ts +20 -2
  115. package/dist/renderer/bloks/control.d.ts.map +1 -1
  116. package/dist/renderer/bloks/control.js +98 -15
  117. package/dist/renderer/bloks/control.js.map +1 -1
  118. package/dist/renderer/bloks/data.d.ts +6 -6
  119. package/dist/renderer/bloks/feedback.d.ts +15 -15
  120. package/dist/renderer/bloks/forms.d.ts +24 -24
  121. package/dist/renderer/bloks/html.d.ts +2 -2
  122. package/dist/renderer/bloks/html.js +2 -2
  123. package/dist/renderer/bloks/icons.d.ts +5 -5
  124. package/dist/renderer/bloks/index.d.ts +145 -144
  125. package/dist/renderer/bloks/index.d.ts.map +1 -1
  126. package/dist/renderer/bloks/index.js +1 -1
  127. package/dist/renderer/bloks/layout.d.ts +9 -1
  128. package/dist/renderer/bloks/layout.d.ts.map +1 -1
  129. package/dist/renderer/bloks/layout.js +15 -0
  130. package/dist/renderer/bloks/layout.js.map +1 -1
  131. package/dist/renderer/bloks/logo/index.d.ts +6 -13
  132. package/dist/renderer/bloks/logo/index.d.ts.map +1 -1
  133. package/dist/renderer/bloks/logo/index.js +3 -4
  134. package/dist/renderer/bloks/logo/index.js.map +1 -1
  135. package/dist/renderer/bloks/logo/logo.fixture.json +266 -250
  136. package/dist/renderer/bloks/navigation.d.ts +20 -20
  137. package/dist/renderer/bloks/overlays.d.ts +55 -55
  138. package/dist/renderer/bloks/run/components.d.ts +2 -6
  139. package/dist/renderer/bloks/run/components.d.ts.map +1 -1
  140. package/dist/renderer/bloks/run/components.js +1 -1
  141. package/dist/renderer/bloks/scene/index.d.ts +5 -9
  142. package/dist/renderer/bloks/scene/index.d.ts.map +1 -1
  143. package/dist/renderer/bloks/scene/interaction.d.ts.map +1 -1
  144. package/dist/renderer/bloks/scene/interaction.js +3 -2
  145. package/dist/renderer/bloks/scene/interaction.js.map +1 -1
  146. package/dist/renderer/bloks/shared/props.d.ts +2 -2
  147. package/dist/renderer/bloks/toast.d.ts +1 -1
  148. package/dist/renderer/bloks/typography.d.ts +3 -3
  149. package/dist/renderer/bloks/typography.js +1 -1
  150. package/dist/renderer/catalog.d.ts +4 -7
  151. package/dist/renderer/catalog.d.ts.map +1 -1
  152. package/dist/renderer/catalog.js +7 -31
  153. package/dist/renderer/catalog.js.map +1 -1
  154. package/dist/renderer/declarations.d.ts +40 -33
  155. package/dist/renderer/declarations.d.ts.map +1 -1
  156. package/dist/renderer/declarations.js +41 -56
  157. package/dist/renderer/declarations.js.map +1 -1
  158. package/dist/renderer/declare.d.ts +31 -19
  159. package/dist/renderer/declare.d.ts.map +1 -1
  160. package/dist/renderer/declare.js +44 -18
  161. package/dist/renderer/declare.js.map +1 -1
  162. package/dist/renderer/persist.d.ts +22 -13
  163. package/dist/renderer/persist.d.ts.map +1 -1
  164. package/dist/renderer/persist.js +40 -21
  165. package/dist/renderer/persist.js.map +1 -1
  166. package/dist/renderer/runtime/catalog.d.ts +27 -7
  167. package/dist/renderer/runtime/catalog.d.ts.map +1 -1
  168. package/dist/renderer/runtime/catalog.js +30 -3
  169. package/dist/renderer/runtime/catalog.js.map +1 -1
  170. package/dist/renderer/runtime/components.d.ts +10 -4
  171. package/dist/renderer/runtime/components.d.ts.map +1 -1
  172. package/dist/renderer/runtime/components.js +8 -5
  173. package/dist/renderer/runtime/components.js.map +1 -1
  174. package/dist/renderer/runtime/context.d.ts +5 -5
  175. package/dist/renderer/runtime/context.d.ts.map +1 -1
  176. package/dist/renderer/runtime/context.js +11 -5
  177. package/dist/renderer/runtime/context.js.map +1 -1
  178. package/dist/renderer/runtime/describe.d.ts +16 -6
  179. package/dist/renderer/runtime/describe.d.ts.map +1 -1
  180. package/dist/renderer/runtime/describe.js +5 -2
  181. package/dist/renderer/runtime/describe.js.map +1 -1
  182. package/dist/renderer/runtime/hooks.d.ts.map +1 -1
  183. package/dist/renderer/runtime/hooks.js +8 -4
  184. package/dist/renderer/runtime/hooks.js.map +1 -1
  185. package/dist/renderer/runtime/index.d.ts +2 -0
  186. package/dist/renderer/runtime/index.d.ts.map +1 -1
  187. package/dist/renderer/runtime/index.js +2 -0
  188. package/dist/renderer/runtime/index.js.map +1 -1
  189. package/dist/renderer/runtime/locals.d.ts +57 -0
  190. package/dist/renderer/runtime/locals.d.ts.map +1 -0
  191. package/dist/renderer/runtime/locals.js +87 -0
  192. package/dist/renderer/runtime/locals.js.map +1 -0
  193. package/dist/renderer/runtime/preflight.d.ts.map +1 -1
  194. package/dist/renderer/runtime/preflight.js +5 -2
  195. package/dist/renderer/runtime/preflight.js.map +1 -1
  196. package/dist/renderer/runtime/scope.d.ts +14 -0
  197. package/dist/renderer/runtime/scope.d.ts.map +1 -1
  198. package/dist/renderer/runtime/scope.js +25 -3
  199. package/dist/renderer/runtime/scope.js.map +1 -1
  200. package/dist/renderer/runtime/text.d.ts +28 -0
  201. package/dist/renderer/runtime/text.d.ts.map +1 -0
  202. package/dist/renderer/runtime/text.js +82 -0
  203. package/dist/renderer/runtime/text.js.map +1 -0
  204. package/dist/renderer/runtime/tree.d.ts.map +1 -1
  205. package/dist/renderer/runtime/tree.js +7 -1
  206. package/dist/renderer/runtime/tree.js.map +1 -1
  207. package/dist/renderer/runtime/types.d.ts +8 -3
  208. package/dist/renderer/runtime/types.d.ts.map +1 -1
  209. package/dist/runtime.d.ts +0 -1
  210. package/dist/runtime.d.ts.map +1 -1
  211. package/dist/runtime.js +0 -1
  212. package/dist/runtime.js.map +1 -1
  213. package/dist/scene.d.ts +1 -1
  214. package/dist/scene.d.ts.map +1 -1
  215. package/dist/scene.js +2 -2
  216. package/dist/scene.js.map +1 -1
  217. package/dist/shadcn.d.ts +154 -153
  218. package/dist/shadcn.d.ts.map +1 -1
  219. package/dist/shadcn.js +7 -7
  220. package/dist/shadcn.js.map +1 -1
  221. package/dist/spec/bsx_v2.json +12324 -6934
  222. package/dist/spec/catalogs/base@4.json +13175 -0
  223. package/dist/spec/catalogs/base@4.json.js +13175 -0
  224. package/dist/spec/catalogs/orkestrator@1.json +489 -0
  225. package/dist/spec/catalogs/orkestrator@1.json.js +489 -0
  226. package/dist/spec/catalogs.d.ts +109 -46
  227. package/dist/spec/catalogs.d.ts.map +1 -1
  228. package/dist/spec/catalogs.js +243 -75
  229. package/dist/spec/catalogs.js.map +1 -1
  230. package/dist/spec/vocabulary.d.ts +44 -7
  231. package/dist/spec/vocabulary.d.ts.map +1 -1
  232. package/dist/spec/vocabulary.js +65 -7
  233. package/dist/spec/vocabulary.js.map +1 -1
  234. package/dist/spec/vocabulary.json +83 -43
  235. package/dist/spec/vocabulary.json.js +83 -43
  236. package/dist/vendor/core/ui/button-group.d.ts +1 -1
  237. package/dist/vendor/core/ui/button.d.ts +1 -1
  238. package/dist/vendor/core/ui/field.d.ts +1 -1
  239. package/package.json +1 -1
  240. package/src/bsx/analyze.ts +14 -12
  241. package/src/bsx/bsx.test.ts +4 -4
  242. package/src/bsx/declared.ts +346 -0
  243. package/src/bsx/index.ts +1 -0
  244. package/src/bsx/infer.test.ts +54 -52
  245. package/src/bsx/infer.ts +128 -71
  246. package/src/bsx/language.test.ts +37 -25
  247. package/src/bsx/language.ts +72 -25
  248. package/src/bsx/parse.ts +51 -64
  249. package/src/bsx/partial.test.ts +1 -1
  250. package/src/bsx/print.ts +27 -34
  251. package/src/bsx/references.test.ts +86 -83
  252. package/src/bsx/references.ts +391 -198
  253. package/src/catalogs/catalogs.test.ts +46 -14
  254. package/src/catalogs/html.ts +3 -3
  255. package/src/catalogs/index.ts +6 -2
  256. package/src/catalogs/logo.ts +4 -5
  257. package/src/catalogs/parts/html.ts +1 -1
  258. package/src/catalogs/parts/icons.ts +1 -1
  259. package/src/catalogs/parts/layout.ts +11 -0
  260. package/src/catalogs/parts/logo.ts +14 -18
  261. package/src/catalogs/parts/run.ts +1 -1
  262. package/src/catalogs/parts/scene.ts +1 -7
  263. package/src/catalogs/parts/structure.ts +2 -2
  264. package/src/catalogs/parts/toast.ts +1 -1
  265. package/src/catalogs/parts/typography.ts +1 -1
  266. package/src/catalogs/scene.ts +3 -3
  267. package/src/catalogs/shadcn.ts +4 -4
  268. package/src/catalogs/structure.ts +3 -3
  269. package/src/catalogs/ui.ts +4 -3
  270. package/src/catalogs.ts +9 -2
  271. package/src/logo/actionLogoSource.ts +4 -4
  272. package/src/ports.ts +1 -1
  273. package/src/renderer/BlokComponentHost.test.tsx +5 -5
  274. package/src/renderer/BlokRenderer.tsx +46 -14
  275. package/src/renderer/addBlokComponents.test.tsx +8 -22
  276. package/src/renderer/baseCatalog.ts +7 -5
  277. package/src/renderer/bloks/components.test.tsx +2 -2
  278. package/src/renderer/bloks/control.tsx +136 -17
  279. package/src/renderer/bloks/flow.test.tsx +1 -1
  280. package/src/renderer/bloks/html.tsx +2 -2
  281. package/src/renderer/bloks/index.ts +1 -1
  282. package/src/renderer/bloks/layout.tsx +28 -0
  283. package/src/renderer/bloks/logo/index.tsx +4 -5
  284. package/src/renderer/bloks/logo/logo.fixture.json +266 -250
  285. package/src/renderer/bloks/logo/logo.test.tsx +18 -7
  286. package/src/renderer/bloks/run/components.tsx +1 -1
  287. package/src/renderer/bloks/run/space.test.tsx +12 -4
  288. package/src/renderer/bloks/scene/interaction.tsx +11 -6
  289. package/src/renderer/bloks/scene/transform.test.ts +8 -7
  290. package/src/renderer/bloks/time.test.tsx +1 -1
  291. package/src/renderer/bloks/toast.tsx +1 -1
  292. package/src/renderer/bloks/typography.tsx +1 -1
  293. package/src/renderer/catalog.tsx +7 -31
  294. package/src/renderer/declarations.test.ts +38 -51
  295. package/src/renderer/declarations.ts +67 -88
  296. package/src/renderer/declare.test.ts +41 -0
  297. package/src/renderer/declare.ts +70 -32
  298. package/src/renderer/persist.test.ts +70 -49
  299. package/src/renderer/persist.ts +57 -34
  300. package/src/renderer/runtime/catalog.test.ts +2 -2
  301. package/src/renderer/runtime/catalog.ts +35 -10
  302. package/src/renderer/runtime/components.tsx +17 -8
  303. package/src/renderer/runtime/context.tsx +17 -10
  304. package/src/renderer/runtime/describe.ts +21 -8
  305. package/src/renderer/runtime/hooks.ts +6 -4
  306. package/src/renderer/runtime/index.ts +2 -0
  307. package/src/renderer/runtime/locals.tsx +105 -0
  308. package/src/renderer/runtime/preflight.ts +5 -2
  309. package/src/renderer/runtime/scope.tsx +31 -3
  310. package/src/renderer/runtime/text.test.tsx +65 -0
  311. package/src/renderer/runtime/text.ts +88 -0
  312. package/src/renderer/runtime/tree.tsx +16 -4
  313. package/src/renderer/runtime/types.ts +8 -3
  314. package/src/runtime.ts +0 -1
  315. package/src/scene.ts +2 -2
  316. package/src/shadcn.ts +7 -7
  317. package/src/spec/bsx_v2.json +12324 -6934
  318. package/src/spec/catalogs/base@4.json +13175 -0
  319. package/src/spec/catalogs/orkestrator@1.json +489 -0
  320. package/src/spec/catalogs.ts +259 -103
  321. package/src/spec/spec.test.ts +93 -24
  322. package/src/spec/vocabulary.json +83 -43
  323. package/src/spec/vocabulary.ts +102 -17
  324. package/dist/renderer/modules.d.ts +0 -4
  325. package/dist/renderer/modules.d.ts.map +0 -1
  326. package/dist/renderer/modules.js +0 -11
  327. package/dist/renderer/modules.js.map +0 -1
  328. package/dist/spec/catalogs/base@2.json +0 -355
  329. package/dist/spec/catalogs/base@2.json.js +0 -355
  330. package/dist/spec/catalogs/html@1.json +0 -308
  331. package/dist/spec/catalogs/html@1.json.js +0 -308
  332. package/dist/spec/catalogs/logo@1.json +0 -1687
  333. package/dist/spec/catalogs/logo@1.json.js +0 -1687
  334. package/dist/spec/catalogs/scene@1.json +0 -878
  335. package/dist/spec/catalogs/scene@1.json.js +0 -878
  336. package/dist/spec/catalogs/shadcn@1.json +0 -4002
  337. package/dist/spec/catalogs/shadcn@1.json.js +0 -4002
  338. package/dist/spec/catalogs/structure@1.json +0 -185
  339. package/dist/spec/catalogs/structure@1.json.js +0 -185
  340. package/dist/spec/catalogs/ui@1.json +0 -5349
  341. package/dist/spec/catalogs/ui@1.json.js +0 -5349
  342. package/src/renderer/modules.ts +0 -12
  343. package/src/spec/catalogs/base@2.json +0 -355
  344. package/src/spec/catalogs/html@1.json +0 -308
  345. package/src/spec/catalogs/logo@1.json +0 -1687
  346. package/src/spec/catalogs/scene@1.json +0 -878
  347. package/src/spec/catalogs/shadcn@1.json +0 -4002
  348. package/src/spec/catalogs/structure@1.json +0 -185
  349. package/src/spec/catalogs/ui@1.json +0 -5349
@@ -1,317 +1,333 @@
1
1
  [
2
2
  {
3
- "id": "AgentLogo[0]",
4
- "component": "AgentLogo",
3
+ "id": "Blok[0]",
4
+ "component": "Blok",
5
5
  "props": [
6
6
  {
7
- "key": "viewBox",
8
- "static_value": "0 0 24 24"
7
+ "key": "kind",
8
+ "static_value": "agent"
9
9
  },
10
10
  {
11
- "key": "title",
12
- "static_value": "Microscope"
11
+ "key": "context",
12
+ "static_value": "logo"
13
13
  }
14
14
  ],
15
15
  "children": [
16
16
  {
17
- "id": "AgentLogo[0]/Defs[0]",
18
- "component": "Defs",
17
+ "id": "Blok[0]/Logo[0]",
18
+ "component": "Logo",
19
+ "props": [
20
+ {
21
+ "key": "viewBox",
22
+ "static_value": "0 0 24 24"
23
+ },
24
+ {
25
+ "key": "title",
26
+ "static_value": "Microscope"
27
+ }
28
+ ],
19
29
  "children": [
20
30
  {
21
- "id": "sky",
22
- "component": "LinearGradient",
23
- "props": [
24
- {
25
- "key": "x2",
26
- "static_value": "1"
27
- }
28
- ],
31
+ "id": "Blok[0]/Logo[0]/Defs[0]",
32
+ "component": "Defs",
29
33
  "children": [
30
34
  {
31
- "id": "sky/Stop[0]",
32
- "component": "Stop",
35
+ "id": "sky",
36
+ "component": "LinearGradient",
33
37
  "props": [
34
38
  {
35
- "key": "offset",
36
- "static_value": "0"
39
+ "key": "x2",
40
+ "static_value": "1"
41
+ }
42
+ ],
43
+ "children": [
44
+ {
45
+ "id": "sky/Stop[0]",
46
+ "component": "Stop",
47
+ "props": [
48
+ {
49
+ "key": "offset",
50
+ "static_value": "0"
51
+ },
52
+ {
53
+ "key": "stopColor",
54
+ "static_value": "info"
55
+ }
56
+ ]
37
57
  },
38
58
  {
39
- "key": "stopColor",
40
- "static_value": "info"
59
+ "id": "sky/Stop[1]",
60
+ "component": "Stop",
61
+ "props": [
62
+ {
63
+ "key": "offset",
64
+ "static_value": "1"
65
+ },
66
+ {
67
+ "key": "stopColor",
68
+ "static_value": "brand"
69
+ }
70
+ ]
41
71
  }
42
72
  ]
43
73
  },
44
74
  {
45
- "id": "sky/Stop[1]",
46
- "component": "Stop",
47
- "props": [
75
+ "id": "round",
76
+ "component": "ClipPath",
77
+ "children": [
48
78
  {
49
- "key": "offset",
50
- "static_value": "1"
51
- },
52
- {
53
- "key": "stopColor",
54
- "static_value": "brand"
79
+ "id": "round/Circle[0]",
80
+ "component": "Circle",
81
+ "props": [
82
+ {
83
+ "key": "cx",
84
+ "static_value": "12"
85
+ },
86
+ {
87
+ "key": "cy",
88
+ "static_value": "12"
89
+ },
90
+ {
91
+ "key": "r",
92
+ "static_value": "11"
93
+ }
94
+ ]
55
95
  }
56
96
  ]
57
97
  }
58
98
  ]
59
99
  },
60
100
  {
61
- "id": "round",
62
- "component": "ClipPath",
101
+ "id": "Blok[0]/Logo[0]/G[0]",
102
+ "component": "G",
103
+ "props": [
104
+ {
105
+ "key": "clipPath",
106
+ "static_value": "url(#round)"
107
+ },
108
+ {
109
+ "key": "transform",
110
+ "static_value": "rotate(10 12 12)"
111
+ }
112
+ ],
63
113
  "children": [
64
114
  {
65
- "id": "round/Circle[0]",
66
- "component": "Circle",
115
+ "id": "Blok[0]/Logo[0]/G[0]/Rect[0]",
116
+ "component": "Rect",
67
117
  "props": [
68
118
  {
69
- "key": "cx",
70
- "static_value": "12"
119
+ "key": "x",
120
+ "static_value": "0"
71
121
  },
72
122
  {
73
- "key": "cy",
74
- "static_value": "12"
123
+ "key": "y",
124
+ "static_value": "0"
125
+ },
126
+ {
127
+ "key": "width",
128
+ "static_value": "24"
75
129
  },
76
130
  {
77
- "key": "r",
78
- "static_value": "11"
131
+ "key": "height",
132
+ "static_value": "24"
133
+ },
134
+ {
135
+ "key": "fill",
136
+ "static_value": "url(#sky)"
79
137
  }
80
138
  ]
81
- }
82
- ]
83
- }
84
- ]
85
- },
86
- {
87
- "id": "AgentLogo[0]/G[0]",
88
- "component": "G",
89
- "props": [
90
- {
91
- "key": "clipPath",
92
- "static_value": "url(#round)"
93
- },
94
- {
95
- "key": "transform",
96
- "static_value": "rotate(10 12 12)"
97
- }
98
- ],
99
- "children": [
100
- {
101
- "id": "AgentLogo[0]/G[0]/Rect[0]",
102
- "component": "Rect",
103
- "props": [
104
- {
105
- "key": "x",
106
- "static_value": "0"
107
- },
108
- {
109
- "key": "y",
110
- "static_value": "0"
111
- },
112
- {
113
- "key": "width",
114
- "static_value": "24"
115
- },
116
- {
117
- "key": "height",
118
- "static_value": "24"
119
- },
120
- {
121
- "key": "fill",
122
- "static_value": "url(#sky)"
123
- }
124
- ]
125
- },
126
- {
127
- "id": "AgentLogo[0]/G[0]/Path[0]",
128
- "component": "Path",
129
- "props": [
130
- {
131
- "key": "d",
132
- "static_value": "M6 18 L12 4 L18 18 Z"
133
- },
134
- {
135
- "key": "fill",
136
- "static_value": "none"
137
- },
138
- {
139
- "key": "stroke",
140
- "static_value": "surface"
141
- },
142
- {
143
- "key": "strokeWidth",
144
- "static_value": "1.5"
145
- },
146
- {
147
- "key": "strokeLinejoin",
148
- "static_value": "round"
149
- }
150
- ]
151
- },
152
- {
153
- "id": "AgentLogo[0]/G[0]/Line[0]",
154
- "component": "Line",
155
- "props": [
156
- {
157
- "key": "x1",
158
- "static_value": "4"
159
- },
160
- {
161
- "key": "y1",
162
- "static_value": "20"
163
- },
164
- {
165
- "key": "x2",
166
- "static_value": "20"
167
- },
168
- {
169
- "key": "y2",
170
- "static_value": "20"
171
- },
172
- {
173
- "key": "stroke",
174
- "static_value": "surface"
175
- }
176
- ]
177
- },
178
- {
179
- "id": "AgentLogo[0]/G[0]/Polygon[0]",
180
- "component": "Polygon",
181
- "props": [
182
- {
183
- "key": "points",
184
- "static_value": "10,14 14,14 12,10"
185
- },
186
- {
187
- "key": "fill",
188
- "static_value": "surface"
189
- }
190
- ]
191
- },
192
- {
193
- "id": "AgentLogo[0]/G[0]/Polyline[0]",
194
- "component": "Polyline",
195
- "props": [
196
- {
197
- "key": "points",
198
- "static_value": "2,2 4,4 6,2"
199
- },
200
- {
201
- "key": "stroke",
202
- "static_value": "surface"
203
- },
204
- {
205
- "key": "fill",
206
- "static_value": "none"
207
- }
208
- ]
209
- },
210
- {
211
- "id": "AgentLogo[0]/G[0]/Ellipse[0]",
212
- "component": "Ellipse",
213
- "props": [
214
- {
215
- "key": "cx",
216
- "static_value": "12"
217
- },
218
- {
219
- "key": "cy",
220
- "static_value": "20"
221
- },
222
- {
223
- "key": "rx",
224
- "static_value": "6"
225
- },
226
- {
227
- "key": "ry",
228
- "static_value": "1"
229
- },
230
- {
231
- "key": "fill",
232
- "static_value": "ink"
233
- },
234
- {
235
- "key": "fillOpacity",
236
- "static_value": "0.3"
237
- }
238
- ]
239
- },
240
- {
241
- "id": "AgentLogo[0]/G[0]/SvgText[0]",
242
- "component": "SvgText",
243
- "props": [
244
- {
245
- "key": "text",
246
- "static_value": "A"
247
- },
248
- {
249
- "key": "x",
250
- "static_value": "12"
251
139
  },
252
140
  {
253
- "key": "y",
254
- "static_value": "13"
255
- },
256
- {
257
- "key": "fontSize",
258
- "static_value": "4"
141
+ "id": "Blok[0]/Logo[0]/G[0]/Path[0]",
142
+ "component": "Path",
143
+ "props": [
144
+ {
145
+ "key": "d",
146
+ "static_value": "M6 18 L12 4 L18 18 Z"
147
+ },
148
+ {
149
+ "key": "fill",
150
+ "static_value": "none"
151
+ },
152
+ {
153
+ "key": "stroke",
154
+ "static_value": "surface"
155
+ },
156
+ {
157
+ "key": "strokeWidth",
158
+ "static_value": "1.5"
159
+ },
160
+ {
161
+ "key": "strokeLinejoin",
162
+ "static_value": "round"
163
+ }
164
+ ]
259
165
  },
260
166
  {
261
- "key": "textAnchor",
262
- "static_value": "middle"
167
+ "id": "Blok[0]/Logo[0]/G[0]/Line[0]",
168
+ "component": "Line",
169
+ "props": [
170
+ {
171
+ "key": "x1",
172
+ "static_value": "4"
173
+ },
174
+ {
175
+ "key": "y1",
176
+ "static_value": "20"
177
+ },
178
+ {
179
+ "key": "x2",
180
+ "static_value": "20"
181
+ },
182
+ {
183
+ "key": "y2",
184
+ "static_value": "20"
185
+ },
186
+ {
187
+ "key": "stroke",
188
+ "static_value": "surface"
189
+ }
190
+ ]
263
191
  },
264
192
  {
265
- "key": "fill",
266
- "static_value": "surface"
267
- }
268
- ]
269
- },
270
- {
271
- "id": "AgentLogo[0]/G[0]/foreach[0]",
272
- "component": "foreach",
273
- "props": [
274
- {
275
- "key": "items",
276
- "dynamic_value": {
277
- "path": "self.status.lamps"
278
- }
193
+ "id": "Blok[0]/Logo[0]/G[0]/Polygon[0]",
194
+ "component": "Polygon",
195
+ "props": [
196
+ {
197
+ "key": "points",
198
+ "static_value": "10,14 14,14 12,10"
199
+ },
200
+ {
201
+ "key": "fill",
202
+ "static_value": "surface"
203
+ }
204
+ ]
279
205
  },
280
206
  {
281
- "key": "let",
282
- "static_value": "lamp",
283
- "declares_value": "lamp"
207
+ "id": "Blok[0]/Logo[0]/G[0]/Polyline[0]",
208
+ "component": "Polyline",
209
+ "props": [
210
+ {
211
+ "key": "points",
212
+ "static_value": "2,2 4,4 6,2"
213
+ },
214
+ {
215
+ "key": "stroke",
216
+ "static_value": "surface"
217
+ },
218
+ {
219
+ "key": "fill",
220
+ "static_value": "none"
221
+ }
222
+ ]
284
223
  },
285
224
  {
286
- "key": "key",
287
- "dynamic_value": {
288
- "path": "lamp.name"
289
- }
290
- }
291
- ],
292
- "children": [
293
- {
294
- "id": "AgentLogo[0]/G[0]/foreach[0]/Circle[0]",
295
- "component": "Circle",
225
+ "id": "Blok[0]/Logo[0]/G[0]/Ellipse[0]",
226
+ "component": "Ellipse",
296
227
  "props": [
297
228
  {
298
229
  "key": "cx",
299
- "static_value": "20"
230
+ "static_value": "12"
300
231
  },
301
232
  {
302
233
  "key": "cy",
234
+ "static_value": "20"
235
+ },
236
+ {
237
+ "key": "rx",
238
+ "static_value": "6"
239
+ },
240
+ {
241
+ "key": "ry",
242
+ "static_value": "1"
243
+ },
244
+ {
245
+ "key": "fill",
246
+ "static_value": "ink"
247
+ },
248
+ {
249
+ "key": "fillOpacity",
250
+ "static_value": "0.3"
251
+ }
252
+ ]
253
+ },
254
+ {
255
+ "id": "Blok[0]/Logo[0]/G[0]/SvgText[0]",
256
+ "component": "SvgText",
257
+ "props": [
258
+ {
259
+ "key": "text",
260
+ "static_value": "A"
261
+ },
262
+ {
263
+ "key": "x",
264
+ "static_value": "12"
265
+ },
266
+ {
267
+ "key": "y",
268
+ "static_value": "13"
269
+ },
270
+ {
271
+ "key": "fontSize",
303
272
  "static_value": "4"
304
273
  },
305
274
  {
306
- "key": "r",
307
- "static_value": "1.5"
275
+ "key": "textAnchor",
276
+ "static_value": "middle"
308
277
  },
309
278
  {
310
279
  "key": "fill",
280
+ "static_value": "surface"
281
+ }
282
+ ]
283
+ },
284
+ {
285
+ "id": "Blok[0]/Logo[0]/G[0]/foreach[0]",
286
+ "component": "foreach",
287
+ "props": [
288
+ {
289
+ "key": "items",
290
+ "dynamic_value": {
291
+ "path": "self.status.lamps"
292
+ }
293
+ },
294
+ {
295
+ "key": "let",
296
+ "static_value": "lamp",
297
+ "declares_value": "lamp"
298
+ },
299
+ {
300
+ "key": "key",
311
301
  "dynamic_value": {
312
- "path": "lamp.pen"
302
+ "path": "lamp.name"
313
303
  }
314
304
  }
305
+ ],
306
+ "children": [
307
+ {
308
+ "id": "Blok[0]/Logo[0]/G[0]/foreach[0]/Circle[0]",
309
+ "component": "Circle",
310
+ "props": [
311
+ {
312
+ "key": "cx",
313
+ "static_value": "20"
314
+ },
315
+ {
316
+ "key": "cy",
317
+ "static_value": "4"
318
+ },
319
+ {
320
+ "key": "r",
321
+ "static_value": "1.5"
322
+ },
323
+ {
324
+ "key": "fill",
325
+ "dynamic_value": {
326
+ "path": "lamp.pen"
327
+ }
328
+ }
329
+ ]
330
+ }
315
331
  ]
316
332
  }
317
333
  ]
@@ -10,7 +10,7 @@ import {renderBlokDocument, testCatalog} from '../testing';
10
10
  import tree from './logo.fixture.json';
11
11
 
12
12
  /**
13
- * `logo.fixture.json` is a v2 logo blok as it is stored: a gradient and a clip
13
+ * `logo.fixture.json` is a v2 logo blok as it is stored (`<Blok kind="agent" context="logo"><Logo>`): a gradient and a clip
14
14
  * path referenced by id, every shape, text, and a keyed `foreach` over state
15
15
  * drawing one lamp per item, all painted with the viewer's pens.
16
16
  */
@@ -44,7 +44,8 @@ describe('a v2 logo blok', () => {
44
44
  'Path',
45
45
  'Polygon',
46
46
  'Polyline',
47
- 'AgentLogo',
47
+ 'Blok',
48
+ 'Logo',
48
49
  'Rect',
49
50
  'Stop',
50
51
  'SvgText',
@@ -106,7 +107,7 @@ describe('a v2 logo blok', () => {
106
107
  renderBlokDocument(testCatalog(), [
107
108
  {
108
109
  id: 'logo',
109
- component: 'AgentLogo',
110
+ component: 'Logo',
110
111
  children: [
111
112
  {id: 'ok', component: 'Circle', props: [{key: 'r', static_value: '2'}]},
112
113
  {id: 'broken', component: 'Circle', props: [{key: 'r', util_call: {operation: 'no_such_function'}}]},
@@ -135,7 +136,7 @@ describe('paint', () => {
135
136
  circle('colour', {fill: '#fbbf24'}),
136
137
  circle('empty', {fill: 'none'}),
137
138
  ];
138
- renderBlokDocument(testCatalog(), [{id: 'logo', component: 'AgentLogo', children: shapes}]);
139
+ renderBlokDocument(testCatalog(), [{id: 'logo', component: 'Logo', children: shapes}]);
139
140
 
140
141
  const svg = document.querySelector('svg')!;
141
142
  const fills = [...svg.querySelectorAll('circle')].map(shape => shape.getAttribute('fill'));
@@ -149,7 +150,7 @@ describe('paint', () => {
149
150
  circle('green', {fill: 'spectrum-green', stroke: 'spectrum-violet'}),
150
151
  circle('soft', {fill: 'spectrum-green-soft'}),
151
152
  ];
152
- renderBlokDocument(testCatalog(), [{id: 'logo', component: 'AgentLogo', children: shapes}]);
153
+ renderBlokDocument(testCatalog(), [{id: 'logo', component: 'Logo', children: shapes}]);
153
154
 
154
155
  const [green, soft] = [...document.querySelectorAll('svg circle')];
155
156
  expect(green.getAttribute('fill')).toBe('var(--logo-spectrum-green)');
@@ -159,7 +160,17 @@ describe('paint', () => {
159
160
 
160
161
  it('keeps an action logo a tree this catalog knows, its shapes placed under it', () => {
161
162
  const preflight = preflightBlokDocument(
162
- normalizeBlokComponentTree([{id: 'action', component: 'ActionLogo', children: [circle('c', {fill: 'brand'})]}]).roots,
163
+ normalizeBlokComponentTree([
164
+ {
165
+ id: 'Blok[0]',
166
+ component: 'Blok',
167
+ props: [
168
+ {key: 'kind', static_value: 'action'},
169
+ {key: 'context', static_value: 'logo'},
170
+ ],
171
+ children: [{id: 'action', component: 'Logo', children: [circle('c', {fill: 'brand'})]}],
172
+ },
173
+ ]).roots,
163
174
  testCatalog(),
164
175
  );
165
176
  expect(preflight.errors).toEqual([]);
@@ -171,7 +182,7 @@ describe('animate', () => {
171
182
  renderBlokDocument(testCatalog(), [
172
183
  {
173
184
  id: 'action',
174
- component: 'ActionLogo',
185
+ component: 'Logo',
175
186
  children: [
176
187
  circle('pulse', {animate: 'pulse', animateDelay: '0.3'}),
177
188
  {id: 'trace', component: 'Path', props: [{key: 'd', static_value: 'M0 0h4'}, {key: 'animate', static_value: 'draw'}]},
@@ -16,7 +16,7 @@ import {progressFraction, routePoints, splitRoute, throughKeys} from './math';
16
16
  type Contracts = typeof runContracts;
17
17
 
18
18
  /**
19
- * The components that place an action's dependencies in 3D (scene@1). `Space`
19
+ * The components that place an action's dependencies in 3D (the scene family). `Space`
20
20
  * is a scene whose layout is a shared room, `Placed` draws the agent a
21
21
  * dependency is bound to with that agent's own scene blok where the room keeps
22
22
  * it, and `Route` draws a line through several.