@almadar/std 16.239.0 → 16.242.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 (167) hide show
  1. package/behaviors/behaviors-registry.json +4814 -553
  2. package/behaviors/lolo/agent/atoms/std-agent-memory.lolo +38 -1
  3. package/behaviors/lolo/agent/atoms/std-agent-session.lolo +1074 -47
  4. package/behaviors/lolo/agent/atoms/std-agent-tool-loop.lolo +8 -7
  5. package/behaviors/lolo/agent/organisms/std-agent-assistant.lolo +56 -37
  6. package/behaviors/lolo/infra/atoms/std-page-open.lolo +59 -0
  7. package/behaviors/lolo/infra/atoms/std-page-search.lolo +134 -0
  8. package/behaviors/lolo/infra/atoms/std-page-treat.lolo +59 -0
  9. package/behaviors/lolo/infra/atoms/std-page-watch.lolo +86 -0
  10. package/behaviors/lolo/ui/core/atoms/std-board.lolo +53 -6
  11. package/behaviors/lolo/ui/core/atoms/std-book-reader.lolo +25 -1
  12. package/behaviors/lolo/ui/core/atoms/std-card-grid.lolo +9 -0
  13. package/behaviors/lolo/ui/core/atoms/std-doc-page.lolo +153 -0
  14. package/behaviors/lolo/ui/core/atoms/std-site-header.lolo +15 -3
  15. package/behaviors/lolo/ui/core/atoms/std-tag-strip.lolo +2 -2
  16. package/behaviors/lolo/ui/core/atoms/std-tag-taxonomy.lolo +7 -7
  17. package/behaviors/lolo/ui/core/atoms/std-version-history.lolo +1 -1
  18. package/behaviors/lolo/ui/core/molecules/ui-header.lolo +5 -0
  19. package/behaviors/lolo/ui/learning/atoms/std-learn-arrangement.lolo +124 -92
  20. package/behaviors/lolo/ui/learning/atoms/std-learn-classify.lolo +114 -55
  21. package/behaviors/lolo/ui/learning/atoms/std-learn-compare.lolo +40 -14
  22. package/behaviors/lolo/ui/learning/atoms/std-learn-coupled-sim.lolo +363 -123
  23. package/behaviors/lolo/ui/learning/atoms/std-learn-derivation.lolo +93 -48
  24. package/behaviors/lolo/ui/learning/atoms/std-learn-diagram.lolo +60 -28
  25. package/behaviors/lolo/ui/learning/atoms/std-learn-doser.lolo +193 -96
  26. package/behaviors/lolo/ui/learning/atoms/std-learn-estimate.lolo +75 -32
  27. package/behaviors/lolo/ui/learning/atoms/std-learn-goal-seek.lolo +142 -86
  28. package/behaviors/lolo/ui/learning/atoms/std-learn-grid-sim.lolo +266 -98
  29. package/behaviors/lolo/ui/learning/atoms/std-learn-hotspot.lolo +103 -65
  30. package/behaviors/lolo/ui/learning/atoms/std-learn-live-sim.lolo +223 -109
  31. package/behaviors/lolo/ui/learning/atoms/std-learn-measure.lolo +232 -64
  32. package/behaviors/lolo/ui/learning/atoms/std-learn-param-explorer.lolo +69 -29
  33. package/behaviors/lolo/ui/learning/atoms/std-learn-perturb.lolo +363 -123
  34. package/behaviors/lolo/ui/learning/atoms/std-learn-predict.lolo +73 -41
  35. package/behaviors/lolo/ui/learning/atoms/std-learn-sample-accumulator.lolo +96 -38
  36. package/behaviors/lolo/ui/learning/atoms/std-learn-sandbox.lolo +65 -45
  37. package/behaviors/lolo/ui/learning/atoms/std-learn-scatter-fit.lolo +243 -117
  38. package/behaviors/lolo/ui/learning/atoms/std-learn-scenario.lolo +76 -28
  39. package/behaviors/lolo/ui/learning/atoms/std-learn-sim-3d.lolo +228 -109
  40. package/behaviors/lolo/ui/learning/atoms/std-learn-speed-drill.lolo +95 -44
  41. package/behaviors/lolo/ui/learning/atoms/std-learn-stepper.lolo +199 -125
  42. package/behaviors/lolo/ui/learning/atoms/std-learn-tour-3d.lolo +92 -48
  43. package/behaviors/lolo/ui/learning/atoms/std-learn-trace-player.lolo +239 -78
  44. package/behaviors/lolo/ui/learning/atoms/std-learn-transport.lolo +147 -38
  45. package/behaviors/lolo/ui/learning/atoms/std-learn-tree.lolo +123 -58
  46. package/behaviors/lolo/ui/learning/atoms/ui-algo-graph-canvas.lolo +22 -0
  47. package/behaviors/lolo/ui/learning/atoms/ui-algorithm-canvas.lolo +26 -0
  48. package/behaviors/lolo/ui/learning/atoms/ui-biology-canvas.lolo +26 -0
  49. package/behaviors/lolo/ui/learning/atoms/ui-chemistry-canvas.lolo +27 -1
  50. package/behaviors/lolo/ui/learning/atoms/ui-learning-canvas.lolo +27 -1
  51. package/behaviors/lolo/ui/learning/atoms/ui-math-canvas.lolo +29 -9
  52. package/behaviors/lolo/ui/learning/atoms/ui-physics-canvas.lolo +26 -0
  53. package/behaviors/lolo-behavior-contracts.json +1 -1
  54. package/behaviors/registry/agent/atoms/std-agent-memory.orb +372 -2
  55. package/behaviors/registry/agent/atoms/std-agent-session.orb +4752 -348
  56. package/behaviors/registry/agent/atoms/std-agent-tool-loop.orb +54 -42
  57. package/behaviors/registry/agent/organisms/std-agent-assistant.orb +356 -122
  58. package/behaviors/registry/factory-signatures.json +1 -1
  59. package/behaviors/registry/infra/atoms/std-page-open.orb +435 -0
  60. package/behaviors/registry/infra/atoms/std-page-search.orb +867 -0
  61. package/behaviors/registry/infra/atoms/std-page-treat.orb +494 -0
  62. package/behaviors/registry/infra/atoms/std-page-watch.orb +554 -0
  63. package/behaviors/registry/ui/core/atoms/std-board.orb +110 -14
  64. package/behaviors/registry/ui/core/atoms/std-book-reader.orb +119 -0
  65. package/behaviors/registry/ui/core/atoms/std-card-grid.orb +61 -0
  66. package/behaviors/registry/ui/core/atoms/std-doc-page.orb +594 -0
  67. package/behaviors/registry/ui/core/atoms/std-site-header.orb +40 -2
  68. package/behaviors/registry/ui/core/atoms/std-tag-strip.orb +2 -0
  69. package/behaviors/registry/ui/core/atoms/std-tag-taxonomy.orb +24 -0
  70. package/behaviors/registry/ui/core/atoms/std-version-history.orb +8 -1
  71. package/behaviors/registry/ui/core/molecules/ui-header.orb +7 -0
  72. package/behaviors/registry/ui/learning/atoms/std-learn-arrangement.orb +903 -369
  73. package/behaviors/registry/ui/learning/atoms/std-learn-classify.orb +1002 -232
  74. package/behaviors/registry/ui/learning/atoms/std-learn-compare.orb +253 -74
  75. package/behaviors/registry/ui/learning/atoms/std-learn-coupled-sim.orb +3624 -921
  76. package/behaviors/registry/ui/learning/atoms/std-learn-derivation.orb +685 -144
  77. package/behaviors/registry/ui/learning/atoms/std-learn-diagram.orb +404 -52
  78. package/behaviors/registry/ui/learning/atoms/std-learn-doser.orb +1787 -210
  79. package/behaviors/registry/ui/learning/atoms/std-learn-estimate.orb +699 -71
  80. package/behaviors/registry/ui/learning/atoms/std-learn-goal-seek.orb +1102 -578
  81. package/behaviors/registry/ui/learning/atoms/std-learn-grid-sim.orb +2760 -872
  82. package/behaviors/registry/ui/learning/atoms/std-learn-hotspot.orb +689 -152
  83. package/behaviors/registry/ui/learning/atoms/std-learn-live-sim.orb +1431 -633
  84. package/behaviors/registry/ui/learning/atoms/std-learn-measure.orb +2485 -512
  85. package/behaviors/registry/ui/learning/atoms/std-learn-param-explorer.orb +501 -197
  86. package/behaviors/registry/ui/learning/atoms/std-learn-perturb.orb +3642 -928
  87. package/behaviors/registry/ui/learning/atoms/std-learn-predict.orb +705 -125
  88. package/behaviors/registry/ui/learning/atoms/std-learn-sample-accumulator.orb +624 -114
  89. package/behaviors/registry/ui/learning/atoms/std-learn-sandbox.orb +405 -153
  90. package/behaviors/registry/ui/learning/atoms/std-learn-scatter-fit.orb +1911 -611
  91. package/behaviors/registry/ui/learning/atoms/std-learn-scenario.orb +436 -128
  92. package/behaviors/registry/ui/learning/atoms/std-learn-sim-3d.orb +2482 -485
  93. package/behaviors/registry/ui/learning/atoms/std-learn-speed-drill.orb +896 -192
  94. package/behaviors/registry/ui/learning/atoms/std-learn-stepper.orb +2001 -759
  95. package/behaviors/registry/ui/learning/atoms/std-learn-tour-3d.orb +734 -228
  96. package/behaviors/registry/ui/learning/atoms/std-learn-trace-player.orb +2501 -764
  97. package/behaviors/registry/ui/learning/atoms/std-learn-transport.orb +1591 -173
  98. package/behaviors/registry/ui/learning/atoms/std-learn-tree.orb +883 -122
  99. package/behaviors/registry/ui/learning/atoms/ui-algo-graph-canvas.orb +176 -0
  100. package/behaviors/registry/ui/learning/atoms/ui-algorithm-canvas.orb +211 -0
  101. package/behaviors/registry/ui/learning/atoms/ui-biology-canvas.orb +211 -0
  102. package/behaviors/registry/ui/learning/atoms/ui-chemistry-canvas.orb +212 -1
  103. package/behaviors/registry/ui/learning/atoms/ui-learning-canvas.orb +212 -1
  104. package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +203 -9
  105. package/behaviors/registry/ui/learning/atoms/ui-physics-canvas.orb +211 -0
  106. package/behaviors/signatures.lolo +325 -655
  107. package/canonical-operators.json +35 -1
  108. package/dist/behaviors/exports-reader.js +41980 -35508
  109. package/dist/behaviors/functions/index.d.ts +1063 -140
  110. package/dist/behaviors/functions/index.js +41951 -35506
  111. package/dist/behaviors/index.d.ts +1 -1
  112. package/dist/behaviors/index.js +41981 -35509
  113. package/dist/behaviors/query.js +41980 -35508
  114. package/dist/behaviors-embeddings.hash.json +3 -3
  115. package/dist/behaviors-embeddings.json +47 -27
  116. package/dist/behaviors-registry.json +4814 -553
  117. package/dist/index.d.ts +4 -4
  118. package/dist/index.js +42019 -35509
  119. package/dist/knob-embeddings.hash.json +3 -3
  120. package/dist/knob-embeddings.json +623 -263
  121. package/dist/modules/anim.d.ts +1 -1
  122. package/dist/modules/array.d.ts +1 -1
  123. package/dist/modules/async.d.ts +1 -1
  124. package/dist/modules/behavior.d.ts +1 -1
  125. package/dist/modules/browser.d.ts +1 -1
  126. package/dist/modules/composition.d.ts +1 -1
  127. package/dist/modules/contract.d.ts +1 -1
  128. package/dist/modules/core.d.ts +1 -1
  129. package/dist/modules/core.js +2 -0
  130. package/dist/modules/data.d.ts +1 -1
  131. package/dist/modules/ease.d.ts +1 -1
  132. package/dist/modules/format.d.ts +1 -1
  133. package/dist/modules/geo.d.ts +1 -1
  134. package/dist/modules/graph.d.ts +1 -1
  135. package/dist/modules/grid.d.ts +1 -1
  136. package/dist/modules/i18n.d.ts +17 -0
  137. package/dist/modules/i18n.js +22 -0
  138. package/dist/modules/index.d.ts +2 -1
  139. package/dist/modules/index.js +24 -1
  140. package/dist/modules/integration.d.ts +1 -1
  141. package/dist/modules/json.d.ts +1 -1
  142. package/dist/modules/llm.d.ts +1 -1
  143. package/dist/modules/math.d.ts +1 -1
  144. package/dist/modules/memory.d.ts +1 -1
  145. package/dist/modules/nn.d.ts +1 -1
  146. package/dist/modules/noise.d.ts +1 -1
  147. package/dist/modules/object.d.ts +1 -1
  148. package/dist/modules/os.d.ts +1 -1
  149. package/dist/modules/path.d.ts +1 -1
  150. package/dist/modules/prob.d.ts +1 -1
  151. package/dist/modules/session.d.ts +1 -1
  152. package/dist/modules/str.d.ts +1 -1
  153. package/dist/modules/tensor.d.ts +1 -1
  154. package/dist/modules/time.d.ts +1 -1
  155. package/dist/modules/trace.d.ts +1 -1
  156. package/dist/modules/train.d.ts +1 -1
  157. package/dist/modules/validate.d.ts +1 -1
  158. package/dist/modules/vector.d.ts +1 -1
  159. package/dist/modules/workspace.d.ts +1 -1
  160. package/dist/registry/factory-signatures.json +1 -1
  161. package/dist/registry.d.ts +10 -3
  162. package/dist/registry.js +31 -1
  163. package/dist/{types-DLx38UFZ.d.ts → types-Cdb321uM.d.ts} +9 -3
  164. package/i18n/ar.json +1 -0
  165. package/i18n/en.json +1 -0
  166. package/i18n/sl.json +1 -0
  167. package/package.json +3 -3
@@ -69,6 +69,13 @@ orbital AlgorithmCanvasOrbital {
69
69
  color : string
70
70
  }
71
71
  type AlgorithmCanvasShapesItem = {
72
+ tone : "ink" | "label" | "guide" | "axis" | "grid" | "highlight" | "fill" | "series-1" | "series-2" | "series-3" | "series-4" | "series-5" | "series-6" | "series-7" | "series-8" | "primary" | "accent" | "success" | "warning" | "error" | "info" | "muted"
73
+ fillTone : "ink" | "label" | "guide" | "axis" | "grid" | "highlight" | "fill" | "series-1" | "series-2" | "series-3" | "series-4" | "series-5" | "series-6" | "series-7" | "series-8" | "primary" | "accent" | "success" | "warning" | "error" | "info" | "muted"
74
+ stroke : "thin" | "normal" | "bold"
75
+ textSize : "xs" | "sm" | "base" | "lg" | "xl" | "2xl"
76
+ font : "body" | "display" | "mono"
77
+ textCase : "theme" | "verbatim"
78
+ fillStyle : "solid" | "tint" | "outline" | "hatch"
72
79
  type : "line" | "arrow" | "circle" | "ellipse" | "rect" | "polygon" | "path" | "text" | "axis" | "grid" | "venn-region"!
73
80
  id : string
74
81
  x : number
@@ -132,6 +139,9 @@ orbital AlgorithmCanvasOrbital {
132
139
  height: @config.height
133
140
  title: @config.title
134
141
  backgroundColor: @config.backgroundColor
142
+ series: @config.series
143
+ keyMap: @config.keyMap
144
+ keyUpMap: @config.keyUpMap
135
145
  bars: @config.bars
136
146
  cells: @config.cells
137
147
  pointers: @config.pointers
@@ -175,6 +185,9 @@ orbital AlgorithmCanvasOrbital {
175
185
  height: @config.height
176
186
  title: @config.title
177
187
  backgroundColor: @config.backgroundColor
188
+ series: @payload.series
189
+ keyMap: @config.keyMap
190
+ keyUpMap: @config.keyUpMap
178
191
  bars: @payload.bars
179
192
  cells: @payload.cells
180
193
  pointers: @payload.pointers
@@ -223,6 +236,7 @@ orbital AlgorithmCanvasOrbital {
223
236
 
224
237
  listens {
225
238
  UPDATE {
239
+ series : [string]
226
240
  bars : [AlgorithmCanvasBarsItem]
227
241
  cells : [AlgorithmCanvasCellsItem]
228
242
  pointers : [AlgorithmCanvasPointersItem]
@@ -261,6 +275,18 @@ orbital AlgorithmCanvasOrbital {
261
275
  @label "Background Color"
262
276
  @description "backgroundColor prop"
263
277
  @tier "presentation"
278
+ series : [string] = []
279
+ @label "Series"
280
+ @description "Overrides the theme's categorical palette (`series-1…N`) for this canvas — real-world conventions like CPK atom colors or resistor bands. Unset, the theme's `--color-series-*` apply."
281
+ @tier "presentation"
282
+ keyMap : Map string string = { item: "INIT" }
283
+ @label "Key Map"
284
+ @description "Maps a keydown `e.code` (optionally `Mod+`/`Shift+`/`Alt+` prefixed) to a SEMANTIC event emitted as `UI:{event}` — e.g. `{ Space: TOGGLE_RUN, ArrowRight: STEP, KeyR: RESET }`; keystrokes inside inputs never route."
285
+ @tier "presentation"
286
+ keyUpMap : Map string string = { item: "INIT" }
287
+ @label "Key Up Map"
288
+ @description "Maps a keyup `e.code` to a semantic event emitted as `UI:{event}`."
289
+ @tier "presentation"
264
290
  bars : [AlgorithmCanvasBarsItem] = []
265
291
  @label "Bars"
266
292
  @description "Sorting/histogram bars; laid out left-to-right, height proportional to value."
@@ -144,6 +144,13 @@ orbital BiologyCanvasOrbital {
144
144
  label : string
145
145
  }
146
146
  type BiologyCanvasShapesItem = {
147
+ tone : "ink" | "label" | "guide" | "axis" | "grid" | "highlight" | "fill" | "series-1" | "series-2" | "series-3" | "series-4" | "series-5" | "series-6" | "series-7" | "series-8" | "primary" | "accent" | "success" | "warning" | "error" | "info" | "muted"
148
+ fillTone : "ink" | "label" | "guide" | "axis" | "grid" | "highlight" | "fill" | "series-1" | "series-2" | "series-3" | "series-4" | "series-5" | "series-6" | "series-7" | "series-8" | "primary" | "accent" | "success" | "warning" | "error" | "info" | "muted"
149
+ stroke : "thin" | "normal" | "bold"
150
+ textSize : "xs" | "sm" | "base" | "lg" | "xl" | "2xl"
151
+ font : "body" | "display" | "mono"
152
+ textCase : "theme" | "verbatim"
153
+ fillStyle : "solid" | "tint" | "outline" | "hatch"
147
154
  type : "line" | "arrow" | "circle" | "ellipse" | "rect" | "polygon" | "path" | "text" | "axis" | "grid" | "venn-region"!
148
155
  id : string
149
156
  x : number
@@ -233,6 +240,9 @@ orbital BiologyCanvasOrbital {
233
240
  height: @config.height
234
241
  title: @config.title
235
242
  backgroundColor: @config.backgroundColor
243
+ series: @config.series
244
+ keyMap: @config.keyMap
245
+ keyUpMap: @config.keyUpMap
236
246
  mode: @config.mode
237
247
  camera: @config.camera
238
248
  lighting: @config.lighting
@@ -281,6 +291,9 @@ orbital BiologyCanvasOrbital {
281
291
  height: @config.height
282
292
  title: @config.title
283
293
  backgroundColor: @config.backgroundColor
294
+ series: @payload.series
295
+ keyMap: @config.keyMap
296
+ keyUpMap: @config.keyUpMap
284
297
  mode: @config.mode
285
298
  camera: @config.camera
286
299
  lighting: @config.lighting
@@ -334,6 +347,7 @@ orbital BiologyCanvasOrbital {
334
347
 
335
348
  listens {
336
349
  UPDATE {
350
+ series : [string]
337
351
  nodes : [BiologyCanvasNodesItem]
338
352
  edges : [BiologyCanvasEdgesItem]
339
353
  compartments : [BiologyCanvasCompartmentsItem]
@@ -369,6 +383,18 @@ orbital BiologyCanvasOrbital {
369
383
  @label "Background Color"
370
384
  @description "backgroundColor prop"
371
385
  @tier "presentation"
386
+ series : [string] = []
387
+ @label "Series"
388
+ @description "Overrides the theme's categorical palette (`series-1…N`) for this canvas — real-world conventions like CPK atom colors or resistor bands. Unset, the theme's `--color-series-*` apply."
389
+ @tier "presentation"
390
+ keyMap : Map string string = { item: "INIT" }
391
+ @label "Key Map"
392
+ @description "Maps a keydown `e.code` (optionally `Mod+`/`Shift+`/`Alt+` prefixed) to a SEMANTIC event emitted as `UI:{event}` — e.g. `{ Space: TOGGLE_RUN, ArrowRight: STEP, KeyR: RESET }`; keystrokes inside inputs never route."
393
+ @tier "presentation"
394
+ keyUpMap : Map string string = { item: "INIT" }
395
+ @label "Key Up Map"
396
+ @description "Maps a keyup `e.code` to a semantic event emitted as `UI:{event}`."
397
+ @tier "presentation"
372
398
  mode : "2d" | "3d" = "2d"
373
399
  @label "Mode"
374
400
  @description "Painter: 2D raster (default) or 3D mesh scene via the lazy three.js host."
@@ -141,6 +141,13 @@ orbital ChemistryCanvasOrbital {
141
141
  color : string
142
142
  }
143
143
  type ChemistryCanvasShapesItem = {
144
+ tone : "ink" | "label" | "guide" | "axis" | "grid" | "highlight" | "fill" | "series-1" | "series-2" | "series-3" | "series-4" | "series-5" | "series-6" | "series-7" | "series-8" | "primary" | "accent" | "success" | "warning" | "error" | "info" | "muted"
145
+ fillTone : "ink" | "label" | "guide" | "axis" | "grid" | "highlight" | "fill" | "series-1" | "series-2" | "series-3" | "series-4" | "series-5" | "series-6" | "series-7" | "series-8" | "primary" | "accent" | "success" | "warning" | "error" | "info" | "muted"
146
+ stroke : "thin" | "normal" | "bold"
147
+ textSize : "xs" | "sm" | "base" | "lg" | "xl" | "2xl"
148
+ font : "body" | "display" | "mono"
149
+ textCase : "theme" | "verbatim"
150
+ fillStyle : "solid" | "tint" | "outline" | "hatch"
144
151
  type : "line" | "arrow" | "circle" | "ellipse" | "rect" | "polygon" | "path" | "text" | "axis" | "grid" | "venn-region"!
145
152
  id : string
146
153
  x : number
@@ -230,6 +237,9 @@ orbital ChemistryCanvasOrbital {
230
237
  height: @config.height
231
238
  title: @config.title
232
239
  backgroundColor: @config.backgroundColor
240
+ series: @config.series
241
+ keyMap: @config.keyMap
242
+ keyUpMap: @config.keyUpMap
233
243
  mode: @config.mode
234
244
  camera: @config.camera
235
245
  lighting: @config.lighting
@@ -278,6 +288,9 @@ orbital ChemistryCanvasOrbital {
278
288
  height: @config.height
279
289
  title: @config.title
280
290
  backgroundColor: @config.backgroundColor
291
+ series: @payload.series
292
+ keyMap: @config.keyMap
293
+ keyUpMap: @config.keyUpMap
281
294
  mode: @config.mode
282
295
  camera: @config.camera
283
296
  lighting: @config.lighting
@@ -331,6 +344,7 @@ orbital ChemistryCanvasOrbital {
331
344
 
332
345
  listens {
333
346
  UPDATE {
347
+ series : [string]
334
348
  atoms : [ChemistryCanvasAtomsItem]
335
349
  bonds : [ChemistryCanvasBondsItem]
336
350
  arrows : [ChemistryCanvasArrowsItem]
@@ -365,6 +379,18 @@ orbital ChemistryCanvasOrbital {
365
379
  @label "Background Color"
366
380
  @description "backgroundColor prop"
367
381
  @tier "presentation"
382
+ series : [string] = []
383
+ @label "Series"
384
+ @description "Overrides the theme's categorical palette (`series-1…N`) for this canvas — real-world conventions like CPK atom colors or resistor bands. Unset, the theme's `--color-series-*` apply."
385
+ @tier "presentation"
386
+ keyMap : Map string string = { item: "INIT" }
387
+ @label "Key Map"
388
+ @description "Maps a keydown `e.code` (optionally `Mod+`/`Shift+`/`Alt+` prefixed) to a SEMANTIC event emitted as `UI:{event}` — e.g. `{ Space: TOGGLE_RUN, ArrowRight: STEP, KeyR: RESET }`; keystrokes inside inputs never route."
389
+ @tier "presentation"
390
+ keyUpMap : Map string string = { item: "INIT" }
391
+ @label "Key Up Map"
392
+ @description "Maps a keyup `e.code` to a semantic event emitted as `UI:{event}`."
393
+ @tier "presentation"
368
394
  mode : "2d" | "3d" = "2d"
369
395
  @label "Mode"
370
396
  @description "Painter: 2D raster (default) or 3D mesh scene via the lazy three.js host."
@@ -409,7 +435,7 @@ orbital ChemistryCanvasOrbital {
409
435
  @tier "presentation"
410
436
  equationColor : string
411
437
  @label "Equation Color"
412
- @description "Equation text color (default '#111827')."
438
+ @description "Equation text color: a tone name, token or literal (default the `ink` tone)."
413
439
  @tier "presentation"
414
440
  lattice3d : ChemistryCanvasLattice3d
415
441
  @label "Lattice3d"
@@ -3,6 +3,13 @@ app ui-learning-canvas "1.0.0"
3
3
  ;; @pattern "learning-canvas"
4
4
  orbital LearningCanvasOrbital {
5
5
  type LearningCanvasShapesItem = {
6
+ tone : "ink" | "label" | "guide" | "axis" | "grid" | "highlight" | "fill" | "series-1" | "series-2" | "series-3" | "series-4" | "series-5" | "series-6" | "series-7" | "series-8" | "primary" | "accent" | "success" | "warning" | "error" | "info" | "muted"
7
+ fillTone : "ink" | "label" | "guide" | "axis" | "grid" | "highlight" | "fill" | "series-1" | "series-2" | "series-3" | "series-4" | "series-5" | "series-6" | "series-7" | "series-8" | "primary" | "accent" | "success" | "warning" | "error" | "info" | "muted"
8
+ stroke : "thin" | "normal" | "bold"
9
+ textSize : "xs" | "sm" | "base" | "lg" | "xl" | "2xl"
10
+ font : "body" | "display" | "mono"
11
+ textCase : "theme" | "verbatim"
12
+ fillStyle : "solid" | "tint" | "outline" | "hatch"
6
13
  type : "line" | "arrow" | "circle" | "ellipse" | "rect" | "polygon" | "path" | "text" | "axis" | "grid" | "venn-region"!
7
14
  id : string
8
15
  x : number
@@ -103,12 +110,15 @@ orbital LearningCanvasOrbital {
103
110
  width: @config.width
104
111
  height: @config.height
105
112
  backgroundColor: @config.backgroundColor
113
+ series: @config.series
106
114
  fontFamily: @config.fontFamily
107
115
  shapes: @config.shapes
108
116
  drawables: @config.drawables
109
117
  projector: @config.projector
110
118
  readouts: @config.readouts
111
119
  traces: @config.traces
120
+ keyMap: @config.keyMap
121
+ keyUpMap: @config.keyUpMap
112
122
  interactive: @config.interactive
113
123
  animate: @config.animate
114
124
  onShapeClick: @config.onShapeClick
@@ -141,12 +151,15 @@ orbital LearningCanvasOrbital {
141
151
  width: @config.width
142
152
  height: @config.height
143
153
  backgroundColor: @config.backgroundColor
154
+ series: @payload.series
144
155
  fontFamily: @config.fontFamily
145
156
  shapes: @payload.shapes
146
157
  drawables: @payload.drawables
147
158
  projector: @config.projector
148
159
  readouts: @payload.readouts
149
160
  traces: @payload.traces
161
+ keyMap: @config.keyMap
162
+ keyUpMap: @config.keyUpMap
150
163
  interactive: @config.interactive
151
164
  animate: @config.animate
152
165
  onShapeClick: @config.onShapeClick
@@ -190,6 +203,7 @@ orbital LearningCanvasOrbital {
190
203
 
191
204
  listens {
192
205
  UPDATE {
206
+ series : [string]
193
207
  shapes : [LearningCanvasShapesItem]
194
208
  drawables : [node]
195
209
  readouts : [LearningCanvasReadoutsItem]
@@ -215,7 +229,11 @@ orbital LearningCanvasOrbital {
215
229
  @tier "presentation"
216
230
  backgroundColor : string
217
231
  @label "Background Color"
218
- @description "Background color (default transparent)."
232
+ @description "Canvas ground: a tone name, `var()` token or literal (default the theme's `--surface-diagram`)."
233
+ @tier "presentation"
234
+ series : [string] = []
235
+ @label "Series"
236
+ @description "Overrides the theme's categorical palette for this canvas: `series-1…N` resolve to these colors instead. For real-world conventions (CPK atom colors, resistor bands); unset, the theme's `--color-series-*` apply."
219
237
  @tier "presentation"
220
238
  fontFamily : string
221
239
  @label "Font Family"
@@ -243,6 +261,14 @@ orbital LearningCanvasOrbital {
243
261
  @description "Inset sparkline panels stacked from the bottom-right corner."
244
262
  @synonyms "sparkline, time series, history plot"
245
263
  @tier "presentation"
264
+ keyMap : Map string string = { item: "INIT" }
265
+ @label "Key Map"
266
+ @description "Maps a keydown `e.code` — optionally prefixed `Mod+` (⌘/Ctrl), `Shift+`, `Alt+` — to a SEMANTIC event emitted as `UI:{event}` (e.g. `{ Space: TOGGLE_RUN, ArrowRight: STEP, KeyR: RESET }`); keystrokes inside inputs never route."
267
+ @tier "presentation"
268
+ keyUpMap : Map string string = { item: "INIT" }
269
+ @label "Key Up Map"
270
+ @description "Maps a keyup `e.code` to a semantic event emitted as `UI:{event}`."
271
+ @tier "presentation"
246
272
  interactive : boolean = false
247
273
  @label "Interactive"
248
274
  @description "Enable pointer interaction (click/hover)."
@@ -75,6 +75,13 @@ orbital MathCanvasOrbital {
75
75
  label : string
76
76
  }
77
77
  type MathCanvasShapesItem = {
78
+ tone : "ink" | "label" | "guide" | "axis" | "grid" | "highlight" | "fill" | "series-1" | "series-2" | "series-3" | "series-4" | "series-5" | "series-6" | "series-7" | "series-8" | "primary" | "accent" | "success" | "warning" | "error" | "info" | "muted"
79
+ fillTone : "ink" | "label" | "guide" | "axis" | "grid" | "highlight" | "fill" | "series-1" | "series-2" | "series-3" | "series-4" | "series-5" | "series-6" | "series-7" | "series-8" | "primary" | "accent" | "success" | "warning" | "error" | "info" | "muted"
80
+ stroke : "thin" | "normal" | "bold"
81
+ textSize : "xs" | "sm" | "base" | "lg" | "xl" | "2xl"
82
+ font : "body" | "display" | "mono"
83
+ textCase : "theme" | "verbatim"
84
+ fillStyle : "solid" | "tint" | "outline" | "hatch"
78
85
  type : "line" | "arrow" | "circle" | "ellipse" | "rect" | "polygon" | "path" | "text" | "axis" | "grid" | "venn-region"!
79
86
  id : string
80
87
  x : number
@@ -171,8 +178,10 @@ orbital MathCanvasOrbital {
171
178
  showGrid: @config.showGrid
172
179
  gridStep: @config.gridStep
173
180
  backgroundColor: @config.backgroundColor
181
+ series: @config.series
174
182
  gridColor: @config.gridColor
175
183
  axisColor: @config.axisColor
184
+ aspect: @config.aspect
176
185
  showTickLabels: @config.showTickLabels
177
186
  tickLabelFontSize: @config.tickLabelFontSize
178
187
  labelFontSize: @config.labelFontSize
@@ -230,8 +239,10 @@ orbital MathCanvasOrbital {
230
239
  showGrid: @config.showGrid
231
240
  gridStep: @config.gridStep
232
241
  backgroundColor: @config.backgroundColor
242
+ series: @payload.series
233
243
  gridColor: @config.gridColor
234
244
  axisColor: @config.axisColor
245
+ aspect: @config.aspect
235
246
  showTickLabels: @config.showTickLabels
236
247
  tickLabelFontSize: @config.tickLabelFontSize
237
248
  labelFontSize: @config.labelFontSize
@@ -287,6 +298,7 @@ orbital MathCanvasOrbital {
287
298
 
288
299
  listens {
289
300
  UPDATE {
301
+ series : [string]
290
302
  curves : [MathCanvasCurvesItem]
291
303
  points : [MathCanvasPointsItem]
292
304
  vectors : [MathCanvasVectorsItem]
@@ -352,27 +364,35 @@ orbital MathCanvasOrbital {
352
364
  @tier "presentation"
353
365
  backgroundColor : string
354
366
  @label "Background Color"
355
- @description "Canvas fill color; `var(--token, fallback)` strings resolve against the active theme. Default transparent."
367
+ @description "Canvas ground: a tone name, `var()` token or literal. Default the theme's `--surface-diagram`."
356
368
  @tier "presentation"
357
- gridColor : string = "var(--color-border, #9ca3af)"
369
+ series : [string] = []
370
+ @label "Series"
371
+ @description "Overrides the theme's categorical palette (`series-1…N`) for this canvas — real-world conventions like CPK atom colors or resistor bands. Unset, the theme's `--color-series-*` apply."
372
+ @tier "presentation"
373
+ gridColor : string = grid
358
374
  @label "Grid Color"
359
- @description "Grid line color; resolves theme tokens (default `var(--color-border, #9ca3af)`)."
375
+ @description "Grid line color: a tone name, token or literal (default the `grid` tone)."
360
376
  @tier "presentation"
361
- axisColor : string = "var(--color-muted-foreground, #374151)"
377
+ axisColor : string = axis
362
378
  @label "Axis Color"
363
- @description "Axis line color; resolves theme tokens (default `var(--color-muted-foreground, #374151)`)."
379
+ @description "Axis line color: a tone name, token or literal (default the `axis` tone)."
380
+ @tier "presentation"
381
+ aspect : "fit" | "equal" = fit
382
+ @label "Aspect"
383
+ @description "How the x and y ranges map to the canvas. `fit` stretches each range to fill the plot (function plots); `equal` uses one scale for both axes so circles stay round (geometry). Default `fit`."
364
384
  @tier "presentation"
365
385
  showTickLabels : boolean = false
366
386
  @label "Show Tick Labels"
367
387
  @description "Draw numeric labels on grid lines (default false)."
368
388
  @tier "presentation"
369
- tickLabelFontSize : number = 10
389
+ tickLabelFontSize : number
370
390
  @label "Tick Label Font Size"
371
- @description "Font size in px for axis tick labels (default 10)."
391
+ @description "Font size in px for axis tick labels (default the theme's `xs` step)."
372
392
  @tier "presentation"
373
- labelFontSize : number = 12
393
+ labelFontSize : number
374
394
  @label "Label Font Size"
375
- @description "Base font size in px for all other canvas annotations (points, vectors, guides, curves, regions, angles, hops; default 12)."
395
+ @description "Font size in px for all other canvas annotations (default the theme's diagram label size)."
376
396
  @tier "presentation"
377
397
  fontFamily : string
378
398
  @label "Font Family"
@@ -178,6 +178,13 @@ orbital PhysicsCanvasOrbital {
178
178
  color : string
179
179
  }
180
180
  type PhysicsCanvasShapesItem = {
181
+ tone : "ink" | "label" | "guide" | "axis" | "grid" | "highlight" | "fill" | "series-1" | "series-2" | "series-3" | "series-4" | "series-5" | "series-6" | "series-7" | "series-8" | "primary" | "accent" | "success" | "warning" | "error" | "info" | "muted"
182
+ fillTone : "ink" | "label" | "guide" | "axis" | "grid" | "highlight" | "fill" | "series-1" | "series-2" | "series-3" | "series-4" | "series-5" | "series-6" | "series-7" | "series-8" | "primary" | "accent" | "success" | "warning" | "error" | "info" | "muted"
183
+ stroke : "thin" | "normal" | "bold"
184
+ textSize : "xs" | "sm" | "base" | "lg" | "xl" | "2xl"
185
+ font : "body" | "display" | "mono"
186
+ textCase : "theme" | "verbatim"
187
+ fillStyle : "solid" | "tint" | "outline" | "hatch"
181
188
  type : "line" | "arrow" | "circle" | "ellipse" | "rect" | "polygon" | "path" | "text" | "axis" | "grid" | "venn-region"!
182
189
  id : string
183
190
  x : number
@@ -267,6 +274,9 @@ orbital PhysicsCanvasOrbital {
267
274
  height: @config.height
268
275
  title: @config.title
269
276
  backgroundColor: @config.backgroundColor
277
+ series: @config.series
278
+ keyMap: @config.keyMap
279
+ keyUpMap: @config.keyUpMap
270
280
  mode: @config.mode
271
281
  camera: @config.camera
272
282
  lighting: @config.lighting
@@ -322,6 +332,9 @@ orbital PhysicsCanvasOrbital {
322
332
  height: @config.height
323
333
  title: @config.title
324
334
  backgroundColor: @config.backgroundColor
335
+ series: @payload.series
336
+ keyMap: @config.keyMap
337
+ keyUpMap: @config.keyUpMap
325
338
  mode: @config.mode
326
339
  camera: @config.camera
327
340
  lighting: @config.lighting
@@ -382,6 +395,7 @@ orbital PhysicsCanvasOrbital {
382
395
 
383
396
  listens {
384
397
  UPDATE {
398
+ series : [string]
385
399
  bodies : [PhysicsCanvasBodiesItem]
386
400
  constraints : [PhysicsCanvasConstraintsItem]
387
401
  sceneObjects : [PhysicsCanvasSceneObjectsItem]
@@ -420,6 +434,18 @@ orbital PhysicsCanvasOrbital {
420
434
  @label "Background Color"
421
435
  @description "backgroundColor prop"
422
436
  @tier "presentation"
437
+ series : [string] = []
438
+ @label "Series"
439
+ @description "Overrides the theme's categorical palette (`series-1…N`) for this canvas — real-world conventions like CPK atom colors or resistor bands. Unset, the theme's `--color-series-*` apply."
440
+ @tier "presentation"
441
+ keyMap : Map string string = { item: "INIT" }
442
+ @label "Key Map"
443
+ @description "Maps a keydown `e.code` (optionally `Mod+`/`Shift+`/`Alt+` prefixed) to a SEMANTIC event emitted as `UI:{event}` — e.g. `{ Space: TOGGLE_RUN, ArrowRight: STEP, KeyR: RESET }`; keystrokes inside inputs never route."
444
+ @tier "presentation"
445
+ keyUpMap : Map string string = { item: "INIT" }
446
+ @label "Key Up Map"
447
+ @description "Maps a keyup `e.code` to a semantic event emitted as `UI:{event}`."
448
+ @tier "presentation"
423
449
  mode : "2d" | "3d" = "2d"
424
450
  @label "Mode"
425
451
  @description "Painter: 2D raster (default) or 3D mesh scene via the lazy three.js host."