@almadar/std 16.173.0 → 16.175.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 (220) hide show
  1. package/behaviors/lolo/infra/atoms/std-cross-reference.lolo +2 -4
  2. package/behaviors/lolo/ui/core/atoms/std-board.lolo +5 -9
  3. package/behaviors/lolo/ui/core/atoms/std-browse.lolo +8 -1
  4. package/behaviors/lolo/ui/core/atoms/std-esign-flow.lolo +2 -2
  5. package/behaviors/lolo/ui/core/atoms/std-event-log.lolo +3 -7
  6. package/behaviors/lolo/ui/core/atoms/std-form-advanced.lolo +1 -1
  7. package/behaviors/lolo/ui/core/atoms/std-image-upload-multi.lolo +1 -1
  8. package/behaviors/lolo/ui/core/atoms/std-list.lolo +3 -3
  9. package/behaviors/lolo/ui/core/atoms/std-modal.lolo +2 -2
  10. package/behaviors/lolo/ui/core/atoms/std-multi-party-flow.lolo +2 -4
  11. package/behaviors/lolo/ui/core/atoms/std-rating-review.lolo +5 -13
  12. package/behaviors/lolo/ui/core/atoms/std-recurrence.lolo +3 -7
  13. package/behaviors/lolo/ui/core/atoms/std-saved-search.lolo +1 -1
  14. package/behaviors/lolo/ui/core/atoms/std-signature-capture.lolo +2 -2
  15. package/behaviors/lolo/ui/core/atoms/std-step-flow.lolo +2 -4
  16. package/behaviors/lolo/ui/core/atoms/std-tag-taxonomy.lolo +1 -1
  17. package/behaviors/lolo/ui/core/atoms/std-thread.lolo +2 -2
  18. package/behaviors/lolo/ui/core/atoms/std-vote.lolo +2 -2
  19. package/behaviors/lolo/ui/core/atoms/std-wizard.lolo +3 -7
  20. package/behaviors/lolo/ui/core/atoms/ui-atlas-image.lolo +1 -1
  21. package/behaviors/lolo/ui/core/atoms/ui-atlas-panel.lolo +1 -1
  22. package/behaviors/lolo/ui/core/atoms/ui-center.lolo +1 -1
  23. package/behaviors/lolo/ui/core/atoms/ui-hstack.lolo +1 -1
  24. package/behaviors/lolo/ui/core/atoms/ui-icon.lolo +1 -1
  25. package/behaviors/lolo/ui/core/atoms/ui-stack.lolo +1 -1
  26. package/behaviors/lolo/ui/core/atoms/ui-typography.lolo +1 -1
  27. package/behaviors/lolo/ui/core/atoms/ui-vstack.lolo +1 -1
  28. package/behaviors/lolo/ui/core/molecules/ui-content-renderer.lolo +1 -1
  29. package/behaviors/lolo/ui/core/molecules/ui-form-layout.lolo +1 -1
  30. package/behaviors/lolo/ui/core/molecules/ui-grid.lolo +1 -1
  31. package/behaviors/lolo/ui/core/molecules/ui-table-view.lolo +4 -9
  32. package/behaviors/lolo/ui/core/organisms/ui-chat-bar.lolo +1 -1
  33. package/behaviors/lolo/ui/core/organisms/ui-dashboard-grid.lolo +1 -1
  34. package/behaviors/lolo/ui/core/organisms/ui-detail-panel.lolo +1 -1
  35. package/behaviors/lolo/ui/core/organisms/ui-entity-cards.lolo +1 -1
  36. package/behaviors/lolo/ui/core/organisms/ui-entity-list.lolo +1 -1
  37. package/behaviors/lolo/ui/core/organisms/ui-entity-table.lolo +1 -1
  38. package/behaviors/lolo/ui/core/organisms/ui-form-section.lolo +9 -3
  39. package/behaviors/lolo/ui/core/organisms/ui-form.lolo +9 -3
  40. package/behaviors/lolo/ui/core/organisms/ui-master-detail.lolo +1 -1
  41. package/behaviors/lolo/ui/core/organisms/ui-media-gallery.lolo +1 -1
  42. package/behaviors/lolo/ui/core/organisms/ui-segment-renderer.lolo +7 -1
  43. package/behaviors/lolo/ui/core/organisms/ui-stat-card.lolo +1 -1
  44. package/behaviors/lolo/ui/core/organisms/ui-subagent-trace-panel.lolo +1 -1
  45. package/behaviors/lolo/ui/game/atoms/ui-action-tile.lolo +1 -1
  46. package/behaviors/lolo/ui/game/atoms/ui-draw-shape-layer.lolo +41 -9
  47. package/behaviors/lolo/ui/game/atoms/ui-draw-shape.lolo +40 -8
  48. package/behaviors/lolo/ui/game/atoms/ui-draw-sprite-layer.lolo +13 -3
  49. package/behaviors/lolo/ui/game/atoms/ui-draw-sprite.lolo +12 -2
  50. package/behaviors/lolo/ui/game/atoms/ui-draw-text-layer.lolo +3 -3
  51. package/behaviors/lolo/ui/game/atoms/ui-draw-text.lolo +2 -2
  52. package/behaviors/lolo/ui/game/organisms/std-tactics-board-3d.lolo +32 -2
  53. package/behaviors/lolo/ui/learning/atoms/std-learn-classify.lolo +133 -23
  54. package/behaviors/lolo/ui/learning/atoms/std-learn-compare.lolo +397 -0
  55. package/behaviors/lolo/ui/learning/atoms/std-learn-coupled-sim.lolo +537 -0
  56. package/behaviors/lolo/ui/learning/atoms/std-learn-derivation.lolo +428 -0
  57. package/behaviors/lolo/ui/learning/atoms/std-learn-doser.lolo +520 -0
  58. package/behaviors/lolo/ui/learning/atoms/std-learn-estimate.lolo +419 -0
  59. package/behaviors/lolo/ui/learning/atoms/std-learn-goal-seek.lolo +591 -0
  60. package/behaviors/lolo/ui/learning/atoms/std-learn-grid-sim.lolo +425 -0
  61. package/behaviors/lolo/ui/learning/atoms/std-learn-hotspot.lolo +398 -0
  62. package/behaviors/lolo/ui/learning/atoms/std-learn-measure.lolo +325 -0
  63. package/behaviors/lolo/ui/learning/atoms/std-learn-perturb.lolo +494 -0
  64. package/behaviors/lolo/ui/learning/atoms/std-learn-predict.lolo +408 -0
  65. package/behaviors/lolo/ui/learning/atoms/std-learn-scatter-fit.lolo +805 -0
  66. package/behaviors/lolo/ui/learning/atoms/std-learn-scenario.lolo +307 -0
  67. package/behaviors/lolo/ui/learning/atoms/std-learn-sim-3d.lolo +318 -0
  68. package/behaviors/lolo/ui/learning/atoms/std-learn-speed-drill.lolo +336 -0
  69. package/behaviors/lolo/ui/learning/atoms/std-learn-tour-3d.lolo +409 -0
  70. package/behaviors/lolo/ui/learning/atoms/std-learn-transport.lolo +186 -0
  71. package/behaviors/lolo/ui/learning/atoms/std-learn-tree.lolo +522 -0
  72. package/behaviors/lolo/ui/learning/atoms/ui-algo-graph-canvas.lolo +192 -0
  73. package/behaviors/lolo/ui/learning/atoms/ui-algorithm-canvas.lolo +111 -2
  74. package/behaviors/lolo/ui/learning/atoms/ui-biology-canvas.lolo +193 -5
  75. package/behaviors/lolo/ui/learning/atoms/ui-chemistry-canvas.lolo +173 -5
  76. package/behaviors/lolo/ui/learning/atoms/ui-learning-canvas.lolo +48 -1
  77. package/behaviors/lolo/ui/learning/atoms/ui-math-canvas.lolo +141 -1
  78. package/behaviors/lolo/ui/learning/atoms/ui-physics-canvas.lolo +242 -5
  79. package/behaviors/lolo/ui/marketing/organisms/ui-book-viewer.lolo +1 -1
  80. package/behaviors/lolo/ui/marketing/organisms/ui-case-study-organism.lolo +1 -1
  81. package/behaviors/lolo/ui/marketing/organisms/ui-feature-grid-organism.lolo +1 -1
  82. package/behaviors/lolo/ui/marketing/organisms/ui-hero-organism.lolo +1 -1
  83. package/behaviors/lolo/ui/marketing/organisms/ui-pricing-organism.lolo +1 -1
  84. package/behaviors/lolo/ui/marketing/organisms/ui-showcase-organism.lolo +1 -1
  85. package/behaviors/lolo/ui/marketing/organisms/ui-stats-organism.lolo +1 -1
  86. package/behaviors/lolo/ui/marketing/organisms/ui-step-flow-organism.lolo +1 -1
  87. package/behaviors/lolo/ui/marketing/organisms/ui-team-organism.lolo +1 -1
  88. package/behaviors/registry/agent/atoms/std-agent-session.orb +22 -1
  89. package/behaviors/registry/agent/atoms/std-agent-tool-call.orb +38 -2
  90. package/behaviors/registry/agent/atoms/std-agent-tool-loop.orb +38 -2
  91. package/behaviors/registry/agent/organisms/std-agent-rabit.orb +23 -1
  92. package/behaviors/registry/infra/atoms/std-approval-gate.orb +8 -16
  93. package/behaviors/registry/infra/atoms/std-cache-aside.orb +31 -62
  94. package/behaviors/registry/infra/atoms/std-circuit-breaker.orb +16 -32
  95. package/behaviors/registry/infra/atoms/std-cross-reference.orb +32 -4
  96. package/behaviors/registry/infra/atoms/std-data-erasure.orb +8 -16
  97. package/behaviors/registry/infra/atoms/std-mod-queue.orb +8 -16
  98. package/behaviors/registry/infra/atoms/std-rate-limiter.orb +14 -28
  99. package/behaviors/registry/infra/atoms/std-row-access-control.orb +30 -2
  100. package/behaviors/registry/ui/core/atoms/std-billable-hour.orb +1 -2
  101. package/behaviors/registry/ui/core/atoms/std-board.orb +19 -5
  102. package/behaviors/registry/ui/core/atoms/std-browse.orb +29 -7
  103. package/behaviors/registry/ui/core/atoms/std-dashboard-grid-embedded.orb +1 -2
  104. package/behaviors/registry/ui/core/atoms/std-esign-flow.orb +3 -5
  105. package/behaviors/registry/ui/core/atoms/std-esign-request.orb +3 -6
  106. package/behaviors/registry/ui/core/atoms/std-event-log.orb +17 -3
  107. package/behaviors/registry/ui/core/atoms/std-export.orb +2 -4
  108. package/behaviors/registry/ui/core/atoms/std-form-advanced.orb +1 -1
  109. package/behaviors/registry/ui/core/atoms/std-gallery.orb +9 -18
  110. package/behaviors/registry/ui/core/atoms/std-graphs.orb +15 -1
  111. package/behaviors/registry/ui/core/atoms/std-import.orb +2 -4
  112. package/behaviors/registry/ui/core/atoms/std-list.orb +4 -6
  113. package/behaviors/registry/ui/core/atoms/std-modal.orb +2 -2
  114. package/behaviors/registry/ui/core/atoms/std-multi-party-flow.orb +16 -2
  115. package/behaviors/registry/ui/core/atoms/std-pagination.orb +15 -1
  116. package/behaviors/registry/ui/core/atoms/std-rating-review.orb +19 -5
  117. package/behaviors/registry/ui/core/atoms/std-recurrence.orb +17 -3
  118. package/behaviors/registry/ui/core/atoms/std-rich-editor.orb +15 -1
  119. package/behaviors/registry/ui/core/atoms/std-scatter.orb +15 -1
  120. package/behaviors/registry/ui/core/atoms/std-signature-capture.orb +2 -2
  121. package/behaviors/registry/ui/core/atoms/std-stats.orb +15 -1
  122. package/behaviors/registry/ui/core/atoms/std-step-flow.orb +16 -2
  123. package/behaviors/registry/ui/core/atoms/std-thread.orb +2 -2
  124. package/behaviors/registry/ui/core/atoms/std-vote.orb +2 -2
  125. package/behaviors/registry/ui/core/atoms/std-wizard.orb +17 -3
  126. package/behaviors/registry/ui/core/atoms/ui-atlas-image.orb +4 -1
  127. package/behaviors/registry/ui/core/atoms/ui-atlas-panel.orb +4 -1
  128. package/behaviors/registry/ui/core/atoms/ui-center.orb +4 -1
  129. package/behaviors/registry/ui/core/atoms/ui-hstack.orb +4 -1
  130. package/behaviors/registry/ui/core/atoms/ui-icon.orb +4 -1
  131. package/behaviors/registry/ui/core/atoms/ui-stack.orb +4 -1
  132. package/behaviors/registry/ui/core/atoms/ui-typography.orb +4 -1
  133. package/behaviors/registry/ui/core/atoms/ui-vstack.orb +4 -1
  134. package/behaviors/registry/ui/core/molecules/ui-accordion.orb +3 -3
  135. package/behaviors/registry/ui/core/molecules/ui-content-renderer.orb +4 -1
  136. package/behaviors/registry/ui/core/molecules/ui-form-layout.orb +4 -1
  137. package/behaviors/registry/ui/core/molecules/ui-grid.orb +4 -1
  138. package/behaviors/registry/ui/core/molecules/ui-table-view.orb +4 -39
  139. package/behaviors/registry/ui/core/molecules/ui-tabs.orb +2 -2
  140. package/behaviors/registry/ui/core/molecules/ui-wizard-container.orb +1 -1
  141. package/behaviors/registry/ui/core/organisms/ui-chat-bar.orb +4 -1
  142. package/behaviors/registry/ui/core/organisms/ui-dashboard-grid.orb +5 -2
  143. package/behaviors/registry/ui/core/organisms/ui-detail-panel.orb +5 -2
  144. package/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +4 -1
  145. package/behaviors/registry/ui/core/organisms/ui-entity-list.orb +4 -1
  146. package/behaviors/registry/ui/core/organisms/ui-entity-table.orb +4 -1
  147. package/behaviors/registry/ui/core/organisms/ui-form-section.orb +34 -2
  148. package/behaviors/registry/ui/core/organisms/ui-form.orb +34 -2
  149. package/behaviors/registry/ui/core/organisms/ui-master-detail.orb +4 -1
  150. package/behaviors/registry/ui/core/organisms/ui-media-gallery.orb +4 -1
  151. package/behaviors/registry/ui/core/organisms/ui-segment-renderer.orb +24 -2
  152. package/behaviors/registry/ui/core/organisms/ui-stat-card.orb +4 -1
  153. package/behaviors/registry/ui/core/organisms/ui-subagent-trace-panel.orb +4 -1
  154. package/behaviors/registry/ui/core/organisms/ui-tabbed-container.orb +1 -1
  155. package/behaviors/registry/ui/core/organisms/ui-ui-slot-renderer.orb +1 -1
  156. package/behaviors/registry/ui/game/atoms/std-fx-particles.orb +35 -1
  157. package/behaviors/registry/ui/game/atoms/ui-action-tile.orb +4 -1
  158. package/behaviors/registry/ui/game/atoms/ui-draw-shape-layer.orb +183 -13
  159. package/behaviors/registry/ui/game/atoms/ui-draw-shape.orb +104 -9
  160. package/behaviors/registry/ui/game/atoms/ui-draw-sprite-layer.orb +56 -2
  161. package/behaviors/registry/ui/game/atoms/ui-draw-sprite.orb +36 -4
  162. package/behaviors/registry/ui/game/atoms/ui-draw-text-layer.orb +21 -2
  163. package/behaviors/registry/ui/game/atoms/ui-draw-text.orb +19 -4
  164. package/behaviors/registry/ui/game/organisms/std-tactics-board-3d.orb +173 -2
  165. package/behaviors/registry/ui/learning/atoms/std-learn-classify.orb +1288 -197
  166. package/behaviors/registry/ui/learning/atoms/std-learn-compare.orb +2814 -0
  167. package/behaviors/registry/ui/learning/atoms/std-learn-coupled-sim.orb +3183 -0
  168. package/behaviors/registry/ui/learning/atoms/std-learn-derivation.orb +2512 -0
  169. package/behaviors/registry/ui/learning/atoms/std-learn-doser.orb +3678 -0
  170. package/behaviors/registry/ui/learning/atoms/std-learn-estimate.orb +2394 -0
  171. package/behaviors/registry/ui/learning/atoms/std-learn-goal-seek.orb +3951 -0
  172. package/behaviors/registry/ui/learning/atoms/std-learn-grid-sim.orb +3458 -0
  173. package/behaviors/registry/ui/learning/atoms/std-learn-hotspot.orb +2646 -0
  174. package/behaviors/registry/ui/learning/atoms/std-learn-measure.orb +1979 -0
  175. package/behaviors/registry/ui/learning/atoms/std-learn-perturb.orb +2994 -0
  176. package/behaviors/registry/ui/learning/atoms/std-learn-predict.orb +2682 -0
  177. package/behaviors/registry/ui/learning/atoms/std-learn-scatter-fit.orb +6539 -0
  178. package/behaviors/registry/ui/learning/atoms/std-learn-scenario.orb +1842 -0
  179. package/behaviors/registry/ui/learning/atoms/std-learn-sim-3d.orb +1648 -0
  180. package/behaviors/registry/ui/learning/atoms/std-learn-speed-drill.orb +2307 -0
  181. package/behaviors/registry/ui/learning/atoms/std-learn-tour-3d.orb +3118 -0
  182. package/behaviors/registry/ui/learning/atoms/std-learn-transport.orb +986 -0
  183. package/behaviors/registry/ui/learning/atoms/std-learn-tree.orb +3333 -0
  184. package/behaviors/registry/ui/learning/atoms/ui-algo-graph-canvas.orb +716 -0
  185. package/behaviors/registry/ui/learning/atoms/ui-algorithm-canvas.orb +679 -5
  186. package/behaviors/registry/ui/learning/atoms/ui-biology-canvas.orb +962 -18
  187. package/behaviors/registry/ui/learning/atoms/ui-chemistry-canvas.orb +919 -30
  188. package/behaviors/registry/ui/learning/atoms/ui-learning-canvas.orb +372 -1
  189. package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +936 -16
  190. package/behaviors/registry/ui/learning/atoms/ui-physics-canvas.orb +1328 -43
  191. package/behaviors/registry/ui/marketing/atoms/std-marketing-article.orb +1 -2
  192. package/behaviors/registry/ui/marketing/atoms/std-marketing-footer.orb +1 -2
  193. package/behaviors/registry/ui/marketing/atoms/std-marketing-split.orb +1 -2
  194. package/behaviors/registry/ui/marketing/atoms/std-marketing-stats.orb +1 -2
  195. package/behaviors/registry/ui/marketing/atoms/std-marketing-steps.orb +1 -2
  196. package/behaviors/registry/ui/marketing/atoms/std-marketing-team.orb +1 -2
  197. package/behaviors/registry/ui/marketing/organisms/ui-book-viewer.orb +4 -1
  198. package/behaviors/registry/ui/marketing/organisms/ui-case-study-organism.orb +4 -1
  199. package/behaviors/registry/ui/marketing/organisms/ui-feature-grid-organism.orb +4 -1
  200. package/behaviors/registry/ui/marketing/organisms/ui-hero-organism.orb +4 -1
  201. package/behaviors/registry/ui/marketing/organisms/ui-pricing-organism.orb +4 -1
  202. package/behaviors/registry/ui/marketing/organisms/ui-showcase-organism.orb +4 -1
  203. package/behaviors/registry/ui/marketing/organisms/ui-stats-organism.orb +4 -1
  204. package/behaviors/registry/ui/marketing/organisms/ui-step-flow-organism.orb +4 -1
  205. package/behaviors/registry/ui/marketing/organisms/ui-team-organism.orb +4 -1
  206. package/dist/behaviors/exports-reader.js +3704 -2189
  207. package/dist/behaviors/functions/index.d.ts +2638 -254
  208. package/dist/behaviors/functions/index.js +3648 -2190
  209. package/dist/behaviors/index.d.ts +1 -1
  210. package/dist/behaviors/index.js +3705 -2190
  211. package/dist/behaviors/query.js +3704 -2189
  212. package/dist/behaviors-embeddings.hash.json +3 -3
  213. package/dist/behaviors-embeddings.json +289 -213
  214. package/dist/behaviors-registry.json +7900 -587
  215. package/dist/index.d.ts +1 -1
  216. package/dist/index.js +3705 -2190
  217. package/dist/knob-embeddings.hash.json +3 -3
  218. package/dist/knob-embeddings.json +1 -1
  219. package/dist/registry/factory-signatures.json +1 -1
  220. package/package.json +2 -2
@@ -0,0 +1,2814 @@
1
+ {
2
+ "description": "Generic dual-view comparator — two instances of the same config-declared curve family (power y = A·xᴮ, linear y = A + B·x, or sine y = A·sin(B·x)) render overlaid on one canvas, each side driven by its own parameter pair of sliders, with a live delta readout of the two values at the midpoint x. Changing either side recomputes immediately, so the learner sees exactly how the two settings diverge. All labels and defaults are config-declared, so the same mechanism serves any side-by-side contrast: two interest rates compounding, two spring constants, two demand elasticities, two wave frequencies. Standalone by default; behind a lab router set matchMode and it renders only when MODE_SELECTED matches.",
3
+ "ledger": {
4
+ "entries": {
5
+ "ent_01M07580GWS8R3KZP2PDX8FA6G": {
6
+ "bakedName": "CompareScene",
7
+ "curName": "CompareScene",
8
+ "id": "ent_01M07580GWS8R3KZP2PDX8FA6G",
9
+ "kind": "entity",
10
+ "owner": "workspace",
11
+ "renames": []
12
+ },
13
+ "evt_01M07580GXDCEKXQEPFYDSF1TS": {
14
+ "bakedName": "INIT",
15
+ "curName": "INIT",
16
+ "id": "evt_01M07580GXDCEKXQEPFYDSF1TS",
17
+ "kind": "event",
18
+ "owner": "workspace",
19
+ "parent": "trt_01M07580GXTEC742YQ30195GJQ",
20
+ "renames": []
21
+ },
22
+ "evt_01M07580H56QMZDG0CCEWS1HD1": {
23
+ "bakedName": "SET_PARAM",
24
+ "curName": "SET_PARAM",
25
+ "id": "evt_01M07580H56QMZDG0CCEWS1HD1",
26
+ "kind": "event",
27
+ "owner": "workspace",
28
+ "parent": "trt_01M07580GXTEC742YQ30195GJQ",
29
+ "renames": []
30
+ },
31
+ "evt_01M07580H57BA2GVWK2DYXF0SY": {
32
+ "bakedName": "COMPARISON_CHANGED",
33
+ "curName": "COMPARISON_CHANGED",
34
+ "id": "evt_01M07580H57BA2GVWK2DYXF0SY",
35
+ "kind": "event",
36
+ "owner": "workspace",
37
+ "parent": "trt_01M07580GXTEC742YQ30195GJQ",
38
+ "renames": []
39
+ },
40
+ "evt_01M07580H5Q89M2Z3CM4P6NA63": {
41
+ "bakedName": "MODE_SELECTED",
42
+ "curName": "MODE_SELECTED",
43
+ "id": "evt_01M07580H5Q89M2Z3CM4P6NA63",
44
+ "kind": "event",
45
+ "owner": "workspace",
46
+ "parent": "trt_01M07580GXTEC742YQ30195GJQ",
47
+ "renames": []
48
+ },
49
+ "orb_01M07580GW33PDHJ6KY44QDGW7": {
50
+ "bakedName": "CompareOrbital",
51
+ "curName": "CompareOrbital",
52
+ "id": "orb_01M07580GW33PDHJ6KY44QDGW7",
53
+ "kind": "orbital",
54
+ "owner": "workspace",
55
+ "renames": []
56
+ },
57
+ "pag_01M07580H7BK3DP2CS3JVJQRHT": {
58
+ "bakedName": "ComparePage",
59
+ "curName": "ComparePage",
60
+ "id": "pag_01M07580H7BK3DP2CS3JVJQRHT",
61
+ "kind": "page",
62
+ "owner": "workspace",
63
+ "renames": []
64
+ },
65
+ "trt_01M07580GXTEC742YQ30195GJQ": {
66
+ "bakedName": "CompareSim",
67
+ "curName": "CompareSim",
68
+ "id": "trt_01M07580GXTEC742YQ30195GJQ",
69
+ "kind": "trait",
70
+ "owner": "workspace",
71
+ "renames": []
72
+ }
73
+ },
74
+ "schemaVersion": 1
75
+ },
76
+ "name": "std-learn-compare",
77
+ "orbitals": [
78
+ {
79
+ "entity": {
80
+ "fields": [
81
+ {
82
+ "name": "id",
83
+ "required": true,
84
+ "type": "string"
85
+ },
86
+ {
87
+ "default": false,
88
+ "name": "active",
89
+ "type": "boolean"
90
+ },
91
+ {
92
+ "name": "title",
93
+ "type": "string"
94
+ },
95
+ {
96
+ "name": "curveKind",
97
+ "type": "string"
98
+ },
99
+ {
100
+ "default": 0.0,
101
+ "name": "leftA",
102
+ "type": "number"
103
+ },
104
+ {
105
+ "default": 0.0,
106
+ "name": "leftB",
107
+ "type": "number"
108
+ },
109
+ {
110
+ "default": 0.0,
111
+ "name": "rightA",
112
+ "type": "number"
113
+ },
114
+ {
115
+ "default": 0.0,
116
+ "name": "rightB",
117
+ "type": "number"
118
+ },
119
+ {
120
+ "items": {
121
+ "properties": {
122
+ "color": {
123
+ "name": "color",
124
+ "required": false,
125
+ "type": "string"
126
+ },
127
+ "label": {
128
+ "name": "label",
129
+ "required": false,
130
+ "type": "string"
131
+ },
132
+ "samples": {
133
+ "items": {
134
+ "properties": {
135
+ "x": {
136
+ "name": "x",
137
+ "required": true,
138
+ "type": "number"
139
+ },
140
+ "y": {
141
+ "name": "y",
142
+ "required": true,
143
+ "type": "number"
144
+ }
145
+ },
146
+ "type": "object"
147
+ },
148
+ "name": "samples",
149
+ "required": true,
150
+ "type": "array"
151
+ }
152
+ },
153
+ "type": "object"
154
+ },
155
+ "name": "curves",
156
+ "type": "array"
157
+ },
158
+ {
159
+ "default": 0.0,
160
+ "name": "xMid",
161
+ "type": "number"
162
+ },
163
+ {
164
+ "default": 0.0,
165
+ "name": "leftMid",
166
+ "type": "number"
167
+ },
168
+ {
169
+ "default": 0.0,
170
+ "name": "rightMid",
171
+ "type": "number"
172
+ },
173
+ {
174
+ "default": 0.0,
175
+ "name": "delta",
176
+ "type": "number"
177
+ },
178
+ {
179
+ "name": "yMin",
180
+ "type": "number"
181
+ },
182
+ {
183
+ "name": "yMax",
184
+ "type": "number"
185
+ }
186
+ ],
187
+ "id": "ent_01M07580GWS8R3KZP2PDX8FA6G",
188
+ "name": "CompareScene",
189
+ "persistence": "runtime"
190
+ },
191
+ "id": "orb_01M07580GW33PDHJ6KY44QDGW7",
192
+ "name": "CompareOrbital",
193
+ "pages": [
194
+ {
195
+ "id": "pag_01M07580H7BK3DP2CS3JVJQRHT",
196
+ "name": "ComparePage",
197
+ "path": "/learn-compare",
198
+ "traits": [
199
+ {
200
+ "ref": "CompareSim",
201
+ "refId": "trt_01M07580GXTEC742YQ30195GJQ"
202
+ }
203
+ ]
204
+ }
205
+ ],
206
+ "traits": [
207
+ {
208
+ "category": "interaction",
209
+ "config": {
210
+ "compareText": {
211
+ "default": "Tune each side's parameters and watch how the two curves diverge.",
212
+ "description": "One-sentence statement of what is being contrasted.",
213
+ "label": "Compare Text",
214
+ "tier": "domain",
215
+ "type": "string"
216
+ },
217
+ "curveKind": {
218
+ "default": "power",
219
+ "description": "Curve family both sides are drawn from: power (y = A·xᴮ), linear (y = A + B·x), or sine (y = A·sin(B·x)).",
220
+ "label": "Curve Kind",
221
+ "synonyms": "curve family, power law, linear function, sine wave, function type",
222
+ "tier": "domain",
223
+ "type": "string"
224
+ },
225
+ "gridStep": {
226
+ "default": 1.0,
227
+ "label": "Grid Step",
228
+ "tier": "presentation",
229
+ "type": "number"
230
+ },
231
+ "height": {
232
+ "default": 400.0,
233
+ "label": "Height",
234
+ "tier": "presentation",
235
+ "type": "number"
236
+ },
237
+ "leftADefault": {
238
+ "default": 1.0,
239
+ "label": "Left A Default",
240
+ "tier": "domain",
241
+ "type": "number"
242
+ },
243
+ "leftBDefault": {
244
+ "default": 2.0,
245
+ "label": "Left B Default",
246
+ "tier": "domain",
247
+ "type": "number"
248
+ },
249
+ "leftColor": {
250
+ "default": "#3b82f6",
251
+ "label": "Left Color",
252
+ "tier": "presentation",
253
+ "type": "string"
254
+ },
255
+ "leftLabel": {
256
+ "default": "Left",
257
+ "description": "Display name of the first compared instance.",
258
+ "label": "Left Label",
259
+ "tier": "domain",
260
+ "type": "string"
261
+ },
262
+ "matchMode": {
263
+ "default": "",
264
+ "description": "When composed behind a lab router, the MODE_SELECTED mode value this instrument responds to. Empty string means standalone — render immediately on INIT.",
265
+ "label": "Match Mode",
266
+ "tier": "presentation",
267
+ "type": "string"
268
+ },
269
+ "paramALabel": {
270
+ "default": "A",
271
+ "label": "Parameter A Label",
272
+ "tier": "presentation",
273
+ "type": "string"
274
+ },
275
+ "paramAMax": {
276
+ "default": 5.0,
277
+ "label": "Parameter A Max",
278
+ "tier": "domain",
279
+ "type": "number"
280
+ },
281
+ "paramAMin": {
282
+ "default": -5.0,
283
+ "label": "Parameter A Min",
284
+ "tier": "domain",
285
+ "type": "number"
286
+ },
287
+ "paramAStep": {
288
+ "default": 0.1,
289
+ "label": "Parameter A Step",
290
+ "tier": "presentation",
291
+ "type": "number"
292
+ },
293
+ "paramBLabel": {
294
+ "default": "B",
295
+ "label": "Parameter B Label",
296
+ "tier": "presentation",
297
+ "type": "string"
298
+ },
299
+ "paramBMax": {
300
+ "default": 5.0,
301
+ "label": "Parameter B Max",
302
+ "tier": "domain",
303
+ "type": "number"
304
+ },
305
+ "paramBMin": {
306
+ "default": -5.0,
307
+ "label": "Parameter B Min",
308
+ "tier": "domain",
309
+ "type": "number"
310
+ },
311
+ "paramBStep": {
312
+ "default": 0.1,
313
+ "label": "Parameter B Step",
314
+ "tier": "presentation",
315
+ "type": "number"
316
+ },
317
+ "rightADefault": {
318
+ "default": 2.0,
319
+ "label": "Right A Default",
320
+ "tier": "domain",
321
+ "type": "number"
322
+ },
323
+ "rightBDefault": {
324
+ "default": 1.5,
325
+ "label": "Right B Default",
326
+ "tier": "domain",
327
+ "type": "number"
328
+ },
329
+ "rightColor": {
330
+ "default": "#f59e0b",
331
+ "label": "Right Color",
332
+ "tier": "presentation",
333
+ "type": "string"
334
+ },
335
+ "rightLabel": {
336
+ "default": "Right",
337
+ "description": "Display name of the second compared instance.",
338
+ "label": "Right Label",
339
+ "tier": "domain",
340
+ "type": "string"
341
+ },
342
+ "showAxes": {
343
+ "default": true,
344
+ "label": "Show Axes",
345
+ "tier": "presentation",
346
+ "type": "boolean"
347
+ },
348
+ "showGrid": {
349
+ "default": true,
350
+ "label": "Show Grid",
351
+ "tier": "presentation",
352
+ "type": "boolean"
353
+ },
354
+ "title": {
355
+ "default": "Compare Two Settings",
356
+ "description": "Title shown above the canvas.",
357
+ "label": "Title",
358
+ "tier": "presentation",
359
+ "type": "string"
360
+ },
361
+ "width": {
362
+ "default": 600.0,
363
+ "label": "Width",
364
+ "tier": "presentation",
365
+ "type": "number"
366
+ },
367
+ "xMax": {
368
+ "default": 10.0,
369
+ "label": "X Max",
370
+ "tier": "presentation",
371
+ "type": "number"
372
+ },
373
+ "xMin": {
374
+ "default": 0.0,
375
+ "label": "X Min",
376
+ "tier": "presentation",
377
+ "type": "number"
378
+ }
379
+ },
380
+ "emits": [
381
+ {
382
+ "description": "Both parameter pairs and the midpoint delta after a slider change — a composed listener (readout, grader) can subscribe; a harmless no-op when the atom runs standalone.",
383
+ "event": "COMPARISON_CHANGED",
384
+ "eventId": "evt_01M07580H57BA2GVWK2DYXF0SY",
385
+ "payloadSchema": [
386
+ {
387
+ "name": "leftA",
388
+ "type": "number"
389
+ },
390
+ {
391
+ "name": "leftB",
392
+ "type": "number"
393
+ },
394
+ {
395
+ "name": "rightA",
396
+ "type": "number"
397
+ },
398
+ {
399
+ "name": "rightB",
400
+ "type": "number"
401
+ },
402
+ {
403
+ "name": "delta",
404
+ "type": "number"
405
+ }
406
+ ],
407
+ "scope": "external",
408
+ "synonyms": "dual view, side by side, comparator, contrast two settings, A/B comparison",
409
+ "tier": "domain"
410
+ }
411
+ ],
412
+ "entityContract": {
413
+ "provides": [
414
+ "active",
415
+ "curveKind",
416
+ "curves",
417
+ "delta",
418
+ "leftA",
419
+ "leftB",
420
+ "leftMid",
421
+ "rightA",
422
+ "rightB",
423
+ "rightMid",
424
+ "title",
425
+ "xMid",
426
+ "yMax",
427
+ "yMin"
428
+ ],
429
+ "requires": []
430
+ },
431
+ "entityRebindable": true,
432
+ "entityRefIds": {
433
+ "CompareScene": "ent_01M07580GWS8R3KZP2PDX8FA6G"
434
+ },
435
+ "id": "trt_01M07580GXTEC742YQ30195GJQ",
436
+ "linkedEntity": "CompareScene",
437
+ "linkedEntityId": "ent_01M07580GWS8R3KZP2PDX8FA6G",
438
+ "name": "CompareSim",
439
+ "scope": "instance",
440
+ "stateMachine": {
441
+ "events": [
442
+ {
443
+ "id": "evt_01M07580GXDCEKXQEPFYDSF1TS",
444
+ "key": "INIT",
445
+ "name": "Initialize"
446
+ },
447
+ {
448
+ "description": "Lab router broadcast naming the active mode; this instrument renders when the mode equals matchMode, otherwise renders null.",
449
+ "id": "evt_01M07580H5Q89M2Z3CM4P6NA63",
450
+ "key": "MODE_SELECTED",
451
+ "name": "Mode Selected",
452
+ "payloadSchema": [
453
+ {
454
+ "name": "mode",
455
+ "type": "string"
456
+ }
457
+ ],
458
+ "tier": "domain"
459
+ },
460
+ {
461
+ "description": "Learner dragged one of the four sliders — side names the compared instance (left or right), which names the parameter (A or B), value is the new setting; both curves and the delta recompute immediately.",
462
+ "id": "evt_01M07580H56QMZDG0CCEWS1HD1",
463
+ "key": "SET_PARAM",
464
+ "name": "Set Param",
465
+ "payloadSchema": [
466
+ {
467
+ "name": "side",
468
+ "type": "string"
469
+ },
470
+ {
471
+ "name": "which",
472
+ "type": "string"
473
+ },
474
+ {
475
+ "name": "value",
476
+ "type": "number"
477
+ }
478
+ ],
479
+ "tier": "domain"
480
+ },
481
+ {
482
+ "description": "Both parameter pairs and the midpoint delta after a slider change — a composed listener (readout, grader) can subscribe; a harmless no-op when the atom runs standalone.",
483
+ "id": "evt_01M07580H57BA2GVWK2DYXF0SY",
484
+ "key": "COMPARISON_CHANGED",
485
+ "name": "Comparison Changed",
486
+ "payloadSchema": [
487
+ {
488
+ "name": "leftA",
489
+ "type": "number"
490
+ },
491
+ {
492
+ "name": "leftB",
493
+ "type": "number"
494
+ },
495
+ {
496
+ "name": "rightA",
497
+ "type": "number"
498
+ },
499
+ {
500
+ "name": "rightB",
501
+ "type": "number"
502
+ },
503
+ {
504
+ "name": "delta",
505
+ "type": "number"
506
+ }
507
+ ],
508
+ "synonyms": "dual view, side by side, comparator, contrast two settings, A/B comparison",
509
+ "tier": "domain"
510
+ }
511
+ ],
512
+ "states": [
513
+ {
514
+ "isInitial": true,
515
+ "name": "idle"
516
+ }
517
+ ],
518
+ "transitions": [
519
+ {
520
+ "effects": [
521
+ [
522
+ "let",
523
+ [
524
+ [
525
+ "kind",
526
+ "@config.curveKind"
527
+ ],
528
+ [
529
+ "span",
530
+ [
531
+ "-",
532
+ "@config.xMax",
533
+ "@config.xMin"
534
+ ]
535
+ ],
536
+ [
537
+ "lA",
538
+ "@config.leftADefault"
539
+ ],
540
+ [
541
+ "lB",
542
+ "@config.leftBDefault"
543
+ ],
544
+ [
545
+ "rA",
546
+ "@config.rightADefault"
547
+ ],
548
+ [
549
+ "rB",
550
+ "@config.rightBDefault"
551
+ ],
552
+ [
553
+ "leftSamples",
554
+ [
555
+ "array/map",
556
+ [
557
+ "array/range",
558
+ 0.0,
559
+ 81.0
560
+ ],
561
+ [
562
+ "fn",
563
+ [
564
+ "i"
565
+ ],
566
+ [
567
+ "let",
568
+ [
569
+ [
570
+ "x",
571
+ [
572
+ "+",
573
+ "@config.xMin",
574
+ [
575
+ "*",
576
+ "@i",
577
+ [
578
+ "/",
579
+ "@span",
580
+ 80.0
581
+ ]
582
+ ]
583
+ ]
584
+ ],
585
+ [
586
+ "yVal",
587
+ [
588
+ "if",
589
+ [
590
+ "==",
591
+ "@kind",
592
+ "power"
593
+ ],
594
+ [
595
+ "*",
596
+ "@lA",
597
+ [
598
+ "math/pow",
599
+ "@x",
600
+ "@lB"
601
+ ]
602
+ ],
603
+ [
604
+ "if",
605
+ [
606
+ "==",
607
+ "@kind",
608
+ "linear"
609
+ ],
610
+ [
611
+ "+",
612
+ "@lA",
613
+ [
614
+ "*",
615
+ "@lB",
616
+ "@x"
617
+ ]
618
+ ],
619
+ [
620
+ "*",
621
+ "@lA",
622
+ [
623
+ "math/sin",
624
+ [
625
+ "*",
626
+ "@lB",
627
+ "@x"
628
+ ]
629
+ ]
630
+ ]
631
+ ]
632
+ ]
633
+ ]
634
+ ],
635
+ {
636
+ "x": "@x",
637
+ "y": "@yVal"
638
+ }
639
+ ]
640
+ ]
641
+ ]
642
+ ],
643
+ [
644
+ "rightSamples",
645
+ [
646
+ "array/map",
647
+ [
648
+ "array/range",
649
+ 0.0,
650
+ 81.0
651
+ ],
652
+ [
653
+ "fn",
654
+ [
655
+ "i"
656
+ ],
657
+ [
658
+ "let",
659
+ [
660
+ [
661
+ "x",
662
+ [
663
+ "+",
664
+ "@config.xMin",
665
+ [
666
+ "*",
667
+ "@i",
668
+ [
669
+ "/",
670
+ "@span",
671
+ 80.0
672
+ ]
673
+ ]
674
+ ]
675
+ ],
676
+ [
677
+ "yVal",
678
+ [
679
+ "if",
680
+ [
681
+ "==",
682
+ "@kind",
683
+ "power"
684
+ ],
685
+ [
686
+ "*",
687
+ "@rA",
688
+ [
689
+ "math/pow",
690
+ "@x",
691
+ "@rB"
692
+ ]
693
+ ],
694
+ [
695
+ "if",
696
+ [
697
+ "==",
698
+ "@kind",
699
+ "linear"
700
+ ],
701
+ [
702
+ "+",
703
+ "@rA",
704
+ [
705
+ "*",
706
+ "@rB",
707
+ "@x"
708
+ ]
709
+ ],
710
+ [
711
+ "*",
712
+ "@rA",
713
+ [
714
+ "math/sin",
715
+ [
716
+ "*",
717
+ "@rB",
718
+ "@x"
719
+ ]
720
+ ]
721
+ ]
722
+ ]
723
+ ]
724
+ ]
725
+ ],
726
+ {
727
+ "x": "@x",
728
+ "y": "@yVal"
729
+ }
730
+ ]
731
+ ]
732
+ ]
733
+ ],
734
+ [
735
+ "allSamples",
736
+ [
737
+ "array/concat",
738
+ "@leftSamples",
739
+ "@rightSamples"
740
+ ]
741
+ ],
742
+ [
743
+ "yMinRaw",
744
+ [
745
+ "array/reduce",
746
+ "@allSamples",
747
+ [
748
+ "object/get",
749
+ [
750
+ "array/nth",
751
+ "@allSamples",
752
+ 0.0
753
+ ],
754
+ "y"
755
+ ],
756
+ [
757
+ "fn",
758
+ [
759
+ "acc",
760
+ "s"
761
+ ],
762
+ [
763
+ "math/min",
764
+ "@acc",
765
+ [
766
+ "object/get",
767
+ "@s",
768
+ "y"
769
+ ]
770
+ ]
771
+ ]
772
+ ]
773
+ ],
774
+ [
775
+ "yMaxRaw",
776
+ [
777
+ "array/reduce",
778
+ "@allSamples",
779
+ [
780
+ "object/get",
781
+ [
782
+ "array/nth",
783
+ "@allSamples",
784
+ 0.0
785
+ ],
786
+ "y"
787
+ ],
788
+ [
789
+ "fn",
790
+ [
791
+ "acc",
792
+ "s"
793
+ ],
794
+ [
795
+ "math/max",
796
+ "@acc",
797
+ [
798
+ "object/get",
799
+ "@s",
800
+ "y"
801
+ ]
802
+ ]
803
+ ]
804
+ ]
805
+ ],
806
+ [
807
+ "yPad",
808
+ [
809
+ "*",
810
+ 0.1,
811
+ [
812
+ "math/max",
813
+ 0.001,
814
+ [
815
+ "-",
816
+ "@yMaxRaw",
817
+ "@yMinRaw"
818
+ ]
819
+ ]
820
+ ]
821
+ ],
822
+ [
823
+ "xMidV",
824
+ [
825
+ "/",
826
+ [
827
+ "+",
828
+ "@config.xMin",
829
+ "@config.xMax"
830
+ ],
831
+ 2.0
832
+ ]
833
+ ],
834
+ [
835
+ "lMid",
836
+ [
837
+ "if",
838
+ [
839
+ "==",
840
+ "@kind",
841
+ "power"
842
+ ],
843
+ [
844
+ "*",
845
+ "@lA",
846
+ [
847
+ "math/pow",
848
+ "@xMidV",
849
+ "@lB"
850
+ ]
851
+ ],
852
+ [
853
+ "if",
854
+ [
855
+ "==",
856
+ "@kind",
857
+ "linear"
858
+ ],
859
+ [
860
+ "+",
861
+ "@lA",
862
+ [
863
+ "*",
864
+ "@lB",
865
+ "@xMidV"
866
+ ]
867
+ ],
868
+ [
869
+ "*",
870
+ "@lA",
871
+ [
872
+ "math/sin",
873
+ [
874
+ "*",
875
+ "@lB",
876
+ "@xMidV"
877
+ ]
878
+ ]
879
+ ]
880
+ ]
881
+ ]
882
+ ],
883
+ [
884
+ "rMid",
885
+ [
886
+ "if",
887
+ [
888
+ "==",
889
+ "@kind",
890
+ "power"
891
+ ],
892
+ [
893
+ "*",
894
+ "@rA",
895
+ [
896
+ "math/pow",
897
+ "@xMidV",
898
+ "@rB"
899
+ ]
900
+ ],
901
+ [
902
+ "if",
903
+ [
904
+ "==",
905
+ "@kind",
906
+ "linear"
907
+ ],
908
+ [
909
+ "+",
910
+ "@rA",
911
+ [
912
+ "*",
913
+ "@rB",
914
+ "@xMidV"
915
+ ]
916
+ ],
917
+ [
918
+ "*",
919
+ "@rA",
920
+ [
921
+ "math/sin",
922
+ [
923
+ "*",
924
+ "@rB",
925
+ "@xMidV"
926
+ ]
927
+ ]
928
+ ]
929
+ ]
930
+ ]
931
+ ]
932
+ ],
933
+ [
934
+ "do",
935
+ [
936
+ "set",
937
+ "@entity.active",
938
+ true
939
+ ],
940
+ [
941
+ "set",
942
+ "@entity.title",
943
+ "@config.title"
944
+ ],
945
+ [
946
+ "set",
947
+ "@entity.curveKind",
948
+ "@kind"
949
+ ],
950
+ [
951
+ "set",
952
+ "@entity.leftA",
953
+ "@lA"
954
+ ],
955
+ [
956
+ "set",
957
+ "@entity.leftB",
958
+ "@lB"
959
+ ],
960
+ [
961
+ "set",
962
+ "@entity.rightA",
963
+ "@rA"
964
+ ],
965
+ [
966
+ "set",
967
+ "@entity.rightB",
968
+ "@rB"
969
+ ],
970
+ [
971
+ "set",
972
+ "@entity.xMid",
973
+ "@xMidV"
974
+ ],
975
+ [
976
+ "set",
977
+ "@entity.leftMid",
978
+ "@lMid"
979
+ ],
980
+ [
981
+ "set",
982
+ "@entity.rightMid",
983
+ "@rMid"
984
+ ],
985
+ [
986
+ "set",
987
+ "@entity.delta",
988
+ [
989
+ "-",
990
+ "@rMid",
991
+ "@lMid"
992
+ ]
993
+ ],
994
+ [
995
+ "set",
996
+ "@entity.yMin",
997
+ [
998
+ "-",
999
+ "@yMinRaw",
1000
+ "@yPad"
1001
+ ]
1002
+ ],
1003
+ [
1004
+ "set",
1005
+ "@entity.yMax",
1006
+ [
1007
+ "+",
1008
+ "@yMaxRaw",
1009
+ "@yPad"
1010
+ ]
1011
+ ],
1012
+ [
1013
+ "set",
1014
+ "@entity.curves",
1015
+ [
1016
+ {
1017
+ "color": "@config.leftColor",
1018
+ "label": "@config.leftLabel",
1019
+ "samples": "@leftSamples"
1020
+ },
1021
+ {
1022
+ "color": "@config.rightColor",
1023
+ "label": "@config.rightLabel",
1024
+ "samples": "@rightSamples"
1025
+ }
1026
+ ]
1027
+ ]
1028
+ ]
1029
+ ],
1030
+ [
1031
+ "render-ui",
1032
+ "main",
1033
+ {
1034
+ "children": [
1035
+ {
1036
+ "children": [
1037
+ {
1038
+ "content": "@entity.title",
1039
+ "type": "typography",
1040
+ "variant": "h4"
1041
+ },
1042
+ {
1043
+ "content": "@config.compareText",
1044
+ "type": "typography",
1045
+ "variant": "body"
1046
+ },
1047
+ {
1048
+ "children": [
1049
+ {
1050
+ "children": [
1051
+ {
1052
+ "content": [
1053
+ "str/concat",
1054
+ "@config.leftLabel",
1055
+ " — ",
1056
+ "@config.paramALabel",
1057
+ ": ",
1058
+ [
1059
+ "math/round",
1060
+ "@entity.leftA",
1061
+ 2.0
1062
+ ]
1063
+ ],
1064
+ "type": "typography",
1065
+ "variant": "caption"
1066
+ },
1067
+ {
1068
+ "action": "SET_PARAM",
1069
+ "actionPayload": {
1070
+ "side": "left",
1071
+ "which": "A"
1072
+ },
1073
+ "max": "@config.paramAMax",
1074
+ "min": "@config.paramAMin",
1075
+ "showTooltip": true,
1076
+ "step": "@config.paramAStep",
1077
+ "type": "range-slider",
1078
+ "value": "@entity.leftA"
1079
+ },
1080
+ {
1081
+ "content": [
1082
+ "str/concat",
1083
+ "@config.leftLabel",
1084
+ " — ",
1085
+ "@config.paramBLabel",
1086
+ ": ",
1087
+ [
1088
+ "math/round",
1089
+ "@entity.leftB",
1090
+ 2.0
1091
+ ]
1092
+ ],
1093
+ "type": "typography",
1094
+ "variant": "caption"
1095
+ },
1096
+ {
1097
+ "action": "SET_PARAM",
1098
+ "actionPayload": {
1099
+ "side": "left",
1100
+ "which": "B"
1101
+ },
1102
+ "max": "@config.paramBMax",
1103
+ "min": "@config.paramBMin",
1104
+ "showTooltip": true,
1105
+ "step": "@config.paramBStep",
1106
+ "type": "range-slider",
1107
+ "value": "@entity.leftB"
1108
+ }
1109
+ ],
1110
+ "direction": "vertical",
1111
+ "gap": "xs",
1112
+ "type": "stack"
1113
+ },
1114
+ {
1115
+ "children": [
1116
+ {
1117
+ "content": [
1118
+ "str/concat",
1119
+ "@config.rightLabel",
1120
+ " — ",
1121
+ "@config.paramALabel",
1122
+ ": ",
1123
+ [
1124
+ "math/round",
1125
+ "@entity.rightA",
1126
+ 2.0
1127
+ ]
1128
+ ],
1129
+ "type": "typography",
1130
+ "variant": "caption"
1131
+ },
1132
+ {
1133
+ "action": "SET_PARAM",
1134
+ "actionPayload": {
1135
+ "side": "right",
1136
+ "which": "A"
1137
+ },
1138
+ "max": "@config.paramAMax",
1139
+ "min": "@config.paramAMin",
1140
+ "showTooltip": true,
1141
+ "step": "@config.paramAStep",
1142
+ "type": "range-slider",
1143
+ "value": "@entity.rightA"
1144
+ },
1145
+ {
1146
+ "content": [
1147
+ "str/concat",
1148
+ "@config.rightLabel",
1149
+ " — ",
1150
+ "@config.paramBLabel",
1151
+ ": ",
1152
+ [
1153
+ "math/round",
1154
+ "@entity.rightB",
1155
+ 2.0
1156
+ ]
1157
+ ],
1158
+ "type": "typography",
1159
+ "variant": "caption"
1160
+ },
1161
+ {
1162
+ "action": "SET_PARAM",
1163
+ "actionPayload": {
1164
+ "side": "right",
1165
+ "which": "B"
1166
+ },
1167
+ "max": "@config.paramBMax",
1168
+ "min": "@config.paramBMin",
1169
+ "showTooltip": true,
1170
+ "step": "@config.paramBStep",
1171
+ "type": "range-slider",
1172
+ "value": "@entity.rightB"
1173
+ }
1174
+ ],
1175
+ "direction": "vertical",
1176
+ "gap": "xs",
1177
+ "type": "stack"
1178
+ }
1179
+ ],
1180
+ "direction": "horizontal",
1181
+ "gap": "lg",
1182
+ "type": "stack"
1183
+ },
1184
+ {
1185
+ "animate": false,
1186
+ "curves": "@entity.curves",
1187
+ "gridStep": "@config.gridStep",
1188
+ "height": "@config.height",
1189
+ "interactive": false,
1190
+ "points": [],
1191
+ "shapes": [],
1192
+ "showAxes": "@config.showAxes",
1193
+ "showGrid": "@config.showGrid",
1194
+ "title": "",
1195
+ "type": "math-canvas",
1196
+ "vectors": [],
1197
+ "width": "@config.width",
1198
+ "xMax": "@config.xMax",
1199
+ "xMin": "@config.xMin",
1200
+ "yMax": "@entity.yMax",
1201
+ "yMin": "@entity.yMin"
1202
+ },
1203
+ {
1204
+ "content": [
1205
+ "str/concat",
1206
+ "At x=",
1207
+ [
1208
+ "math/round",
1209
+ "@entity.xMid",
1210
+ 2.0
1211
+ ],
1212
+ ": ",
1213
+ "@config.leftLabel",
1214
+ " = ",
1215
+ [
1216
+ "math/round",
1217
+ "@entity.leftMid",
1218
+ 3.0
1219
+ ],
1220
+ ", ",
1221
+ "@config.rightLabel",
1222
+ " = ",
1223
+ [
1224
+ "math/round",
1225
+ "@entity.rightMid",
1226
+ 3.0
1227
+ ],
1228
+ ", Δ = ",
1229
+ [
1230
+ "math/round",
1231
+ "@entity.delta",
1232
+ 3.0
1233
+ ]
1234
+ ],
1235
+ "type": "typography",
1236
+ "variant": "body"
1237
+ }
1238
+ ],
1239
+ "direction": "vertical",
1240
+ "gap": "md",
1241
+ "type": "stack"
1242
+ }
1243
+ ],
1244
+ "padding": "md",
1245
+ "type": "box"
1246
+ }
1247
+ ]
1248
+ ],
1249
+ "event": "INIT",
1250
+ "eventId": "evt_01M07580GXDCEKXQEPFYDSF1TS",
1251
+ "from": "idle",
1252
+ "guard": [
1253
+ "==",
1254
+ "@config.matchMode",
1255
+ ""
1256
+ ],
1257
+ "to": "idle"
1258
+ },
1259
+ {
1260
+ "effects": [
1261
+ [
1262
+ "let",
1263
+ [
1264
+ [
1265
+ "kind",
1266
+ "@config.curveKind"
1267
+ ],
1268
+ [
1269
+ "span",
1270
+ [
1271
+ "-",
1272
+ "@config.xMax",
1273
+ "@config.xMin"
1274
+ ]
1275
+ ],
1276
+ [
1277
+ "lA",
1278
+ "@config.leftADefault"
1279
+ ],
1280
+ [
1281
+ "lB",
1282
+ "@config.leftBDefault"
1283
+ ],
1284
+ [
1285
+ "rA",
1286
+ "@config.rightADefault"
1287
+ ],
1288
+ [
1289
+ "rB",
1290
+ "@config.rightBDefault"
1291
+ ],
1292
+ [
1293
+ "leftSamples",
1294
+ [
1295
+ "array/map",
1296
+ [
1297
+ "array/range",
1298
+ 0.0,
1299
+ 81.0
1300
+ ],
1301
+ [
1302
+ "fn",
1303
+ [
1304
+ "i"
1305
+ ],
1306
+ [
1307
+ "let",
1308
+ [
1309
+ [
1310
+ "x",
1311
+ [
1312
+ "+",
1313
+ "@config.xMin",
1314
+ [
1315
+ "*",
1316
+ "@i",
1317
+ [
1318
+ "/",
1319
+ "@span",
1320
+ 80.0
1321
+ ]
1322
+ ]
1323
+ ]
1324
+ ],
1325
+ [
1326
+ "yVal",
1327
+ [
1328
+ "if",
1329
+ [
1330
+ "==",
1331
+ "@kind",
1332
+ "power"
1333
+ ],
1334
+ [
1335
+ "*",
1336
+ "@lA",
1337
+ [
1338
+ "math/pow",
1339
+ "@x",
1340
+ "@lB"
1341
+ ]
1342
+ ],
1343
+ [
1344
+ "if",
1345
+ [
1346
+ "==",
1347
+ "@kind",
1348
+ "linear"
1349
+ ],
1350
+ [
1351
+ "+",
1352
+ "@lA",
1353
+ [
1354
+ "*",
1355
+ "@lB",
1356
+ "@x"
1357
+ ]
1358
+ ],
1359
+ [
1360
+ "*",
1361
+ "@lA",
1362
+ [
1363
+ "math/sin",
1364
+ [
1365
+ "*",
1366
+ "@lB",
1367
+ "@x"
1368
+ ]
1369
+ ]
1370
+ ]
1371
+ ]
1372
+ ]
1373
+ ]
1374
+ ],
1375
+ {
1376
+ "x": "@x",
1377
+ "y": "@yVal"
1378
+ }
1379
+ ]
1380
+ ]
1381
+ ]
1382
+ ],
1383
+ [
1384
+ "rightSamples",
1385
+ [
1386
+ "array/map",
1387
+ [
1388
+ "array/range",
1389
+ 0.0,
1390
+ 81.0
1391
+ ],
1392
+ [
1393
+ "fn",
1394
+ [
1395
+ "i"
1396
+ ],
1397
+ [
1398
+ "let",
1399
+ [
1400
+ [
1401
+ "x",
1402
+ [
1403
+ "+",
1404
+ "@config.xMin",
1405
+ [
1406
+ "*",
1407
+ "@i",
1408
+ [
1409
+ "/",
1410
+ "@span",
1411
+ 80.0
1412
+ ]
1413
+ ]
1414
+ ]
1415
+ ],
1416
+ [
1417
+ "yVal",
1418
+ [
1419
+ "if",
1420
+ [
1421
+ "==",
1422
+ "@kind",
1423
+ "power"
1424
+ ],
1425
+ [
1426
+ "*",
1427
+ "@rA",
1428
+ [
1429
+ "math/pow",
1430
+ "@x",
1431
+ "@rB"
1432
+ ]
1433
+ ],
1434
+ [
1435
+ "if",
1436
+ [
1437
+ "==",
1438
+ "@kind",
1439
+ "linear"
1440
+ ],
1441
+ [
1442
+ "+",
1443
+ "@rA",
1444
+ [
1445
+ "*",
1446
+ "@rB",
1447
+ "@x"
1448
+ ]
1449
+ ],
1450
+ [
1451
+ "*",
1452
+ "@rA",
1453
+ [
1454
+ "math/sin",
1455
+ [
1456
+ "*",
1457
+ "@rB",
1458
+ "@x"
1459
+ ]
1460
+ ]
1461
+ ]
1462
+ ]
1463
+ ]
1464
+ ]
1465
+ ],
1466
+ {
1467
+ "x": "@x",
1468
+ "y": "@yVal"
1469
+ }
1470
+ ]
1471
+ ]
1472
+ ]
1473
+ ],
1474
+ [
1475
+ "allSamples",
1476
+ [
1477
+ "array/concat",
1478
+ "@leftSamples",
1479
+ "@rightSamples"
1480
+ ]
1481
+ ],
1482
+ [
1483
+ "yMinRaw",
1484
+ [
1485
+ "array/reduce",
1486
+ "@allSamples",
1487
+ [
1488
+ "object/get",
1489
+ [
1490
+ "array/nth",
1491
+ "@allSamples",
1492
+ 0.0
1493
+ ],
1494
+ "y"
1495
+ ],
1496
+ [
1497
+ "fn",
1498
+ [
1499
+ "acc",
1500
+ "s"
1501
+ ],
1502
+ [
1503
+ "math/min",
1504
+ "@acc",
1505
+ [
1506
+ "object/get",
1507
+ "@s",
1508
+ "y"
1509
+ ]
1510
+ ]
1511
+ ]
1512
+ ]
1513
+ ],
1514
+ [
1515
+ "yMaxRaw",
1516
+ [
1517
+ "array/reduce",
1518
+ "@allSamples",
1519
+ [
1520
+ "object/get",
1521
+ [
1522
+ "array/nth",
1523
+ "@allSamples",
1524
+ 0.0
1525
+ ],
1526
+ "y"
1527
+ ],
1528
+ [
1529
+ "fn",
1530
+ [
1531
+ "acc",
1532
+ "s"
1533
+ ],
1534
+ [
1535
+ "math/max",
1536
+ "@acc",
1537
+ [
1538
+ "object/get",
1539
+ "@s",
1540
+ "y"
1541
+ ]
1542
+ ]
1543
+ ]
1544
+ ]
1545
+ ],
1546
+ [
1547
+ "yPad",
1548
+ [
1549
+ "*",
1550
+ 0.1,
1551
+ [
1552
+ "math/max",
1553
+ 0.001,
1554
+ [
1555
+ "-",
1556
+ "@yMaxRaw",
1557
+ "@yMinRaw"
1558
+ ]
1559
+ ]
1560
+ ]
1561
+ ],
1562
+ [
1563
+ "xMidV",
1564
+ [
1565
+ "/",
1566
+ [
1567
+ "+",
1568
+ "@config.xMin",
1569
+ "@config.xMax"
1570
+ ],
1571
+ 2.0
1572
+ ]
1573
+ ],
1574
+ [
1575
+ "lMid",
1576
+ [
1577
+ "if",
1578
+ [
1579
+ "==",
1580
+ "@kind",
1581
+ "power"
1582
+ ],
1583
+ [
1584
+ "*",
1585
+ "@lA",
1586
+ [
1587
+ "math/pow",
1588
+ "@xMidV",
1589
+ "@lB"
1590
+ ]
1591
+ ],
1592
+ [
1593
+ "if",
1594
+ [
1595
+ "==",
1596
+ "@kind",
1597
+ "linear"
1598
+ ],
1599
+ [
1600
+ "+",
1601
+ "@lA",
1602
+ [
1603
+ "*",
1604
+ "@lB",
1605
+ "@xMidV"
1606
+ ]
1607
+ ],
1608
+ [
1609
+ "*",
1610
+ "@lA",
1611
+ [
1612
+ "math/sin",
1613
+ [
1614
+ "*",
1615
+ "@lB",
1616
+ "@xMidV"
1617
+ ]
1618
+ ]
1619
+ ]
1620
+ ]
1621
+ ]
1622
+ ],
1623
+ [
1624
+ "rMid",
1625
+ [
1626
+ "if",
1627
+ [
1628
+ "==",
1629
+ "@kind",
1630
+ "power"
1631
+ ],
1632
+ [
1633
+ "*",
1634
+ "@rA",
1635
+ [
1636
+ "math/pow",
1637
+ "@xMidV",
1638
+ "@rB"
1639
+ ]
1640
+ ],
1641
+ [
1642
+ "if",
1643
+ [
1644
+ "==",
1645
+ "@kind",
1646
+ "linear"
1647
+ ],
1648
+ [
1649
+ "+",
1650
+ "@rA",
1651
+ [
1652
+ "*",
1653
+ "@rB",
1654
+ "@xMidV"
1655
+ ]
1656
+ ],
1657
+ [
1658
+ "*",
1659
+ "@rA",
1660
+ [
1661
+ "math/sin",
1662
+ [
1663
+ "*",
1664
+ "@rB",
1665
+ "@xMidV"
1666
+ ]
1667
+ ]
1668
+ ]
1669
+ ]
1670
+ ]
1671
+ ]
1672
+ ],
1673
+ [
1674
+ "do",
1675
+ [
1676
+ "set",
1677
+ "@entity.active",
1678
+ true
1679
+ ],
1680
+ [
1681
+ "set",
1682
+ "@entity.title",
1683
+ "@config.title"
1684
+ ],
1685
+ [
1686
+ "set",
1687
+ "@entity.curveKind",
1688
+ "@kind"
1689
+ ],
1690
+ [
1691
+ "set",
1692
+ "@entity.leftA",
1693
+ "@lA"
1694
+ ],
1695
+ [
1696
+ "set",
1697
+ "@entity.leftB",
1698
+ "@lB"
1699
+ ],
1700
+ [
1701
+ "set",
1702
+ "@entity.rightA",
1703
+ "@rA"
1704
+ ],
1705
+ [
1706
+ "set",
1707
+ "@entity.rightB",
1708
+ "@rB"
1709
+ ],
1710
+ [
1711
+ "set",
1712
+ "@entity.xMid",
1713
+ "@xMidV"
1714
+ ],
1715
+ [
1716
+ "set",
1717
+ "@entity.leftMid",
1718
+ "@lMid"
1719
+ ],
1720
+ [
1721
+ "set",
1722
+ "@entity.rightMid",
1723
+ "@rMid"
1724
+ ],
1725
+ [
1726
+ "set",
1727
+ "@entity.delta",
1728
+ [
1729
+ "-",
1730
+ "@rMid",
1731
+ "@lMid"
1732
+ ]
1733
+ ],
1734
+ [
1735
+ "set",
1736
+ "@entity.yMin",
1737
+ [
1738
+ "-",
1739
+ "@yMinRaw",
1740
+ "@yPad"
1741
+ ]
1742
+ ],
1743
+ [
1744
+ "set",
1745
+ "@entity.yMax",
1746
+ [
1747
+ "+",
1748
+ "@yMaxRaw",
1749
+ "@yPad"
1750
+ ]
1751
+ ],
1752
+ [
1753
+ "set",
1754
+ "@entity.curves",
1755
+ [
1756
+ {
1757
+ "color": "@config.leftColor",
1758
+ "label": "@config.leftLabel",
1759
+ "samples": "@leftSamples"
1760
+ },
1761
+ {
1762
+ "color": "@config.rightColor",
1763
+ "label": "@config.rightLabel",
1764
+ "samples": "@rightSamples"
1765
+ }
1766
+ ]
1767
+ ]
1768
+ ]
1769
+ ],
1770
+ [
1771
+ "render-ui",
1772
+ "main",
1773
+ {
1774
+ "children": [
1775
+ {
1776
+ "children": [
1777
+ {
1778
+ "content": "@entity.title",
1779
+ "type": "typography",
1780
+ "variant": "h4"
1781
+ },
1782
+ {
1783
+ "content": "@config.compareText",
1784
+ "type": "typography",
1785
+ "variant": "body"
1786
+ },
1787
+ {
1788
+ "children": [
1789
+ {
1790
+ "children": [
1791
+ {
1792
+ "content": [
1793
+ "str/concat",
1794
+ "@config.leftLabel",
1795
+ " — ",
1796
+ "@config.paramALabel",
1797
+ ": ",
1798
+ [
1799
+ "math/round",
1800
+ "@entity.leftA",
1801
+ 2.0
1802
+ ]
1803
+ ],
1804
+ "type": "typography",
1805
+ "variant": "caption"
1806
+ },
1807
+ {
1808
+ "action": "SET_PARAM",
1809
+ "actionPayload": {
1810
+ "side": "left",
1811
+ "which": "A"
1812
+ },
1813
+ "max": "@config.paramAMax",
1814
+ "min": "@config.paramAMin",
1815
+ "showTooltip": true,
1816
+ "step": "@config.paramAStep",
1817
+ "type": "range-slider",
1818
+ "value": "@entity.leftA"
1819
+ },
1820
+ {
1821
+ "content": [
1822
+ "str/concat",
1823
+ "@config.leftLabel",
1824
+ " — ",
1825
+ "@config.paramBLabel",
1826
+ ": ",
1827
+ [
1828
+ "math/round",
1829
+ "@entity.leftB",
1830
+ 2.0
1831
+ ]
1832
+ ],
1833
+ "type": "typography",
1834
+ "variant": "caption"
1835
+ },
1836
+ {
1837
+ "action": "SET_PARAM",
1838
+ "actionPayload": {
1839
+ "side": "left",
1840
+ "which": "B"
1841
+ },
1842
+ "max": "@config.paramBMax",
1843
+ "min": "@config.paramBMin",
1844
+ "showTooltip": true,
1845
+ "step": "@config.paramBStep",
1846
+ "type": "range-slider",
1847
+ "value": "@entity.leftB"
1848
+ }
1849
+ ],
1850
+ "direction": "vertical",
1851
+ "gap": "xs",
1852
+ "type": "stack"
1853
+ },
1854
+ {
1855
+ "children": [
1856
+ {
1857
+ "content": [
1858
+ "str/concat",
1859
+ "@config.rightLabel",
1860
+ " — ",
1861
+ "@config.paramALabel",
1862
+ ": ",
1863
+ [
1864
+ "math/round",
1865
+ "@entity.rightA",
1866
+ 2.0
1867
+ ]
1868
+ ],
1869
+ "type": "typography",
1870
+ "variant": "caption"
1871
+ },
1872
+ {
1873
+ "action": "SET_PARAM",
1874
+ "actionPayload": {
1875
+ "side": "right",
1876
+ "which": "A"
1877
+ },
1878
+ "max": "@config.paramAMax",
1879
+ "min": "@config.paramAMin",
1880
+ "showTooltip": true,
1881
+ "step": "@config.paramAStep",
1882
+ "type": "range-slider",
1883
+ "value": "@entity.rightA"
1884
+ },
1885
+ {
1886
+ "content": [
1887
+ "str/concat",
1888
+ "@config.rightLabel",
1889
+ " — ",
1890
+ "@config.paramBLabel",
1891
+ ": ",
1892
+ [
1893
+ "math/round",
1894
+ "@entity.rightB",
1895
+ 2.0
1896
+ ]
1897
+ ],
1898
+ "type": "typography",
1899
+ "variant": "caption"
1900
+ },
1901
+ {
1902
+ "action": "SET_PARAM",
1903
+ "actionPayload": {
1904
+ "side": "right",
1905
+ "which": "B"
1906
+ },
1907
+ "max": "@config.paramBMax",
1908
+ "min": "@config.paramBMin",
1909
+ "showTooltip": true,
1910
+ "step": "@config.paramBStep",
1911
+ "type": "range-slider",
1912
+ "value": "@entity.rightB"
1913
+ }
1914
+ ],
1915
+ "direction": "vertical",
1916
+ "gap": "xs",
1917
+ "type": "stack"
1918
+ }
1919
+ ],
1920
+ "direction": "horizontal",
1921
+ "gap": "lg",
1922
+ "type": "stack"
1923
+ },
1924
+ {
1925
+ "animate": false,
1926
+ "curves": "@entity.curves",
1927
+ "gridStep": "@config.gridStep",
1928
+ "height": "@config.height",
1929
+ "interactive": false,
1930
+ "points": [],
1931
+ "shapes": [],
1932
+ "showAxes": "@config.showAxes",
1933
+ "showGrid": "@config.showGrid",
1934
+ "title": "",
1935
+ "type": "math-canvas",
1936
+ "vectors": [],
1937
+ "width": "@config.width",
1938
+ "xMax": "@config.xMax",
1939
+ "xMin": "@config.xMin",
1940
+ "yMax": "@entity.yMax",
1941
+ "yMin": "@entity.yMin"
1942
+ },
1943
+ {
1944
+ "content": [
1945
+ "str/concat",
1946
+ "At x=",
1947
+ [
1948
+ "math/round",
1949
+ "@entity.xMid",
1950
+ 2.0
1951
+ ],
1952
+ ": ",
1953
+ "@config.leftLabel",
1954
+ " = ",
1955
+ [
1956
+ "math/round",
1957
+ "@entity.leftMid",
1958
+ 3.0
1959
+ ],
1960
+ ", ",
1961
+ "@config.rightLabel",
1962
+ " = ",
1963
+ [
1964
+ "math/round",
1965
+ "@entity.rightMid",
1966
+ 3.0
1967
+ ],
1968
+ ", Δ = ",
1969
+ [
1970
+ "math/round",
1971
+ "@entity.delta",
1972
+ 3.0
1973
+ ]
1974
+ ],
1975
+ "type": "typography",
1976
+ "variant": "body"
1977
+ }
1978
+ ],
1979
+ "direction": "vertical",
1980
+ "gap": "md",
1981
+ "type": "stack"
1982
+ }
1983
+ ],
1984
+ "padding": "md",
1985
+ "type": "box"
1986
+ }
1987
+ ]
1988
+ ],
1989
+ "event": "MODE_SELECTED",
1990
+ "eventId": "evt_01M07580H5Q89M2Z3CM4P6NA63",
1991
+ "from": "idle",
1992
+ "guard": [
1993
+ "==",
1994
+ "@payload.mode",
1995
+ "@config.matchMode"
1996
+ ],
1997
+ "to": "idle"
1998
+ },
1999
+ {
2000
+ "effects": [
2001
+ [
2002
+ "let",
2003
+ [
2004
+ [
2005
+ "kind",
2006
+ "@entity.curveKind"
2007
+ ],
2008
+ [
2009
+ "span",
2010
+ [
2011
+ "-",
2012
+ "@config.xMax",
2013
+ "@config.xMin"
2014
+ ]
2015
+ ],
2016
+ [
2017
+ "lA",
2018
+ [
2019
+ "if",
2020
+ [
2021
+ "and",
2022
+ [
2023
+ "==",
2024
+ "@payload.side",
2025
+ "left"
2026
+ ],
2027
+ [
2028
+ "==",
2029
+ "@payload.which",
2030
+ "A"
2031
+ ]
2032
+ ],
2033
+ [
2034
+ "math/clamp",
2035
+ "@payload.value",
2036
+ "@config.paramAMin",
2037
+ "@config.paramAMax"
2038
+ ],
2039
+ "@entity.leftA"
2040
+ ]
2041
+ ],
2042
+ [
2043
+ "lB",
2044
+ [
2045
+ "if",
2046
+ [
2047
+ "and",
2048
+ [
2049
+ "==",
2050
+ "@payload.side",
2051
+ "left"
2052
+ ],
2053
+ [
2054
+ "==",
2055
+ "@payload.which",
2056
+ "B"
2057
+ ]
2058
+ ],
2059
+ [
2060
+ "math/clamp",
2061
+ "@payload.value",
2062
+ "@config.paramBMin",
2063
+ "@config.paramBMax"
2064
+ ],
2065
+ "@entity.leftB"
2066
+ ]
2067
+ ],
2068
+ [
2069
+ "rA",
2070
+ [
2071
+ "if",
2072
+ [
2073
+ "and",
2074
+ [
2075
+ "==",
2076
+ "@payload.side",
2077
+ "right"
2078
+ ],
2079
+ [
2080
+ "==",
2081
+ "@payload.which",
2082
+ "A"
2083
+ ]
2084
+ ],
2085
+ [
2086
+ "math/clamp",
2087
+ "@payload.value",
2088
+ "@config.paramAMin",
2089
+ "@config.paramAMax"
2090
+ ],
2091
+ "@entity.rightA"
2092
+ ]
2093
+ ],
2094
+ [
2095
+ "rB",
2096
+ [
2097
+ "if",
2098
+ [
2099
+ "and",
2100
+ [
2101
+ "==",
2102
+ "@payload.side",
2103
+ "right"
2104
+ ],
2105
+ [
2106
+ "==",
2107
+ "@payload.which",
2108
+ "B"
2109
+ ]
2110
+ ],
2111
+ [
2112
+ "math/clamp",
2113
+ "@payload.value",
2114
+ "@config.paramBMin",
2115
+ "@config.paramBMax"
2116
+ ],
2117
+ "@entity.rightB"
2118
+ ]
2119
+ ],
2120
+ [
2121
+ "leftSamples",
2122
+ [
2123
+ "array/map",
2124
+ [
2125
+ "array/range",
2126
+ 0.0,
2127
+ 81.0
2128
+ ],
2129
+ [
2130
+ "fn",
2131
+ [
2132
+ "i"
2133
+ ],
2134
+ [
2135
+ "let",
2136
+ [
2137
+ [
2138
+ "x",
2139
+ [
2140
+ "+",
2141
+ "@config.xMin",
2142
+ [
2143
+ "*",
2144
+ "@i",
2145
+ [
2146
+ "/",
2147
+ "@span",
2148
+ 80.0
2149
+ ]
2150
+ ]
2151
+ ]
2152
+ ],
2153
+ [
2154
+ "yVal",
2155
+ [
2156
+ "if",
2157
+ [
2158
+ "==",
2159
+ "@kind",
2160
+ "power"
2161
+ ],
2162
+ [
2163
+ "*",
2164
+ "@lA",
2165
+ [
2166
+ "math/pow",
2167
+ "@x",
2168
+ "@lB"
2169
+ ]
2170
+ ],
2171
+ [
2172
+ "if",
2173
+ [
2174
+ "==",
2175
+ "@kind",
2176
+ "linear"
2177
+ ],
2178
+ [
2179
+ "+",
2180
+ "@lA",
2181
+ [
2182
+ "*",
2183
+ "@lB",
2184
+ "@x"
2185
+ ]
2186
+ ],
2187
+ [
2188
+ "*",
2189
+ "@lA",
2190
+ [
2191
+ "math/sin",
2192
+ [
2193
+ "*",
2194
+ "@lB",
2195
+ "@x"
2196
+ ]
2197
+ ]
2198
+ ]
2199
+ ]
2200
+ ]
2201
+ ]
2202
+ ],
2203
+ {
2204
+ "x": "@x",
2205
+ "y": "@yVal"
2206
+ }
2207
+ ]
2208
+ ]
2209
+ ]
2210
+ ],
2211
+ [
2212
+ "rightSamples",
2213
+ [
2214
+ "array/map",
2215
+ [
2216
+ "array/range",
2217
+ 0.0,
2218
+ 81.0
2219
+ ],
2220
+ [
2221
+ "fn",
2222
+ [
2223
+ "i"
2224
+ ],
2225
+ [
2226
+ "let",
2227
+ [
2228
+ [
2229
+ "x",
2230
+ [
2231
+ "+",
2232
+ "@config.xMin",
2233
+ [
2234
+ "*",
2235
+ "@i",
2236
+ [
2237
+ "/",
2238
+ "@span",
2239
+ 80.0
2240
+ ]
2241
+ ]
2242
+ ]
2243
+ ],
2244
+ [
2245
+ "yVal",
2246
+ [
2247
+ "if",
2248
+ [
2249
+ "==",
2250
+ "@kind",
2251
+ "power"
2252
+ ],
2253
+ [
2254
+ "*",
2255
+ "@rA",
2256
+ [
2257
+ "math/pow",
2258
+ "@x",
2259
+ "@rB"
2260
+ ]
2261
+ ],
2262
+ [
2263
+ "if",
2264
+ [
2265
+ "==",
2266
+ "@kind",
2267
+ "linear"
2268
+ ],
2269
+ [
2270
+ "+",
2271
+ "@rA",
2272
+ [
2273
+ "*",
2274
+ "@rB",
2275
+ "@x"
2276
+ ]
2277
+ ],
2278
+ [
2279
+ "*",
2280
+ "@rA",
2281
+ [
2282
+ "math/sin",
2283
+ [
2284
+ "*",
2285
+ "@rB",
2286
+ "@x"
2287
+ ]
2288
+ ]
2289
+ ]
2290
+ ]
2291
+ ]
2292
+ ]
2293
+ ],
2294
+ {
2295
+ "x": "@x",
2296
+ "y": "@yVal"
2297
+ }
2298
+ ]
2299
+ ]
2300
+ ]
2301
+ ],
2302
+ [
2303
+ "allSamples",
2304
+ [
2305
+ "array/concat",
2306
+ "@leftSamples",
2307
+ "@rightSamples"
2308
+ ]
2309
+ ],
2310
+ [
2311
+ "yMinRaw",
2312
+ [
2313
+ "array/reduce",
2314
+ "@allSamples",
2315
+ [
2316
+ "object/get",
2317
+ [
2318
+ "array/nth",
2319
+ "@allSamples",
2320
+ 0.0
2321
+ ],
2322
+ "y"
2323
+ ],
2324
+ [
2325
+ "fn",
2326
+ [
2327
+ "acc",
2328
+ "s"
2329
+ ],
2330
+ [
2331
+ "math/min",
2332
+ "@acc",
2333
+ [
2334
+ "object/get",
2335
+ "@s",
2336
+ "y"
2337
+ ]
2338
+ ]
2339
+ ]
2340
+ ]
2341
+ ],
2342
+ [
2343
+ "yMaxRaw",
2344
+ [
2345
+ "array/reduce",
2346
+ "@allSamples",
2347
+ [
2348
+ "object/get",
2349
+ [
2350
+ "array/nth",
2351
+ "@allSamples",
2352
+ 0.0
2353
+ ],
2354
+ "y"
2355
+ ],
2356
+ [
2357
+ "fn",
2358
+ [
2359
+ "acc",
2360
+ "s"
2361
+ ],
2362
+ [
2363
+ "math/max",
2364
+ "@acc",
2365
+ [
2366
+ "object/get",
2367
+ "@s",
2368
+ "y"
2369
+ ]
2370
+ ]
2371
+ ]
2372
+ ]
2373
+ ],
2374
+ [
2375
+ "yPad",
2376
+ [
2377
+ "*",
2378
+ 0.1,
2379
+ [
2380
+ "math/max",
2381
+ 0.001,
2382
+ [
2383
+ "-",
2384
+ "@yMaxRaw",
2385
+ "@yMinRaw"
2386
+ ]
2387
+ ]
2388
+ ]
2389
+ ],
2390
+ [
2391
+ "lMid",
2392
+ [
2393
+ "if",
2394
+ [
2395
+ "==",
2396
+ "@kind",
2397
+ "power"
2398
+ ],
2399
+ [
2400
+ "*",
2401
+ "@lA",
2402
+ [
2403
+ "math/pow",
2404
+ "@entity.xMid",
2405
+ "@lB"
2406
+ ]
2407
+ ],
2408
+ [
2409
+ "if",
2410
+ [
2411
+ "==",
2412
+ "@kind",
2413
+ "linear"
2414
+ ],
2415
+ [
2416
+ "+",
2417
+ "@lA",
2418
+ [
2419
+ "*",
2420
+ "@lB",
2421
+ "@entity.xMid"
2422
+ ]
2423
+ ],
2424
+ [
2425
+ "*",
2426
+ "@lA",
2427
+ [
2428
+ "math/sin",
2429
+ [
2430
+ "*",
2431
+ "@lB",
2432
+ "@entity.xMid"
2433
+ ]
2434
+ ]
2435
+ ]
2436
+ ]
2437
+ ]
2438
+ ],
2439
+ [
2440
+ "rMid",
2441
+ [
2442
+ "if",
2443
+ [
2444
+ "==",
2445
+ "@kind",
2446
+ "power"
2447
+ ],
2448
+ [
2449
+ "*",
2450
+ "@rA",
2451
+ [
2452
+ "math/pow",
2453
+ "@entity.xMid",
2454
+ "@rB"
2455
+ ]
2456
+ ],
2457
+ [
2458
+ "if",
2459
+ [
2460
+ "==",
2461
+ "@kind",
2462
+ "linear"
2463
+ ],
2464
+ [
2465
+ "+",
2466
+ "@rA",
2467
+ [
2468
+ "*",
2469
+ "@rB",
2470
+ "@entity.xMid"
2471
+ ]
2472
+ ],
2473
+ [
2474
+ "*",
2475
+ "@rA",
2476
+ [
2477
+ "math/sin",
2478
+ [
2479
+ "*",
2480
+ "@rB",
2481
+ "@entity.xMid"
2482
+ ]
2483
+ ]
2484
+ ]
2485
+ ]
2486
+ ]
2487
+ ]
2488
+ ],
2489
+ [
2490
+ "do",
2491
+ [
2492
+ "set",
2493
+ "@entity.leftA",
2494
+ "@lA"
2495
+ ],
2496
+ [
2497
+ "set",
2498
+ "@entity.leftB",
2499
+ "@lB"
2500
+ ],
2501
+ [
2502
+ "set",
2503
+ "@entity.rightA",
2504
+ "@rA"
2505
+ ],
2506
+ [
2507
+ "set",
2508
+ "@entity.rightB",
2509
+ "@rB"
2510
+ ],
2511
+ [
2512
+ "set",
2513
+ "@entity.leftMid",
2514
+ "@lMid"
2515
+ ],
2516
+ [
2517
+ "set",
2518
+ "@entity.rightMid",
2519
+ "@rMid"
2520
+ ],
2521
+ [
2522
+ "set",
2523
+ "@entity.delta",
2524
+ [
2525
+ "-",
2526
+ "@rMid",
2527
+ "@lMid"
2528
+ ]
2529
+ ],
2530
+ [
2531
+ "set",
2532
+ "@entity.yMin",
2533
+ [
2534
+ "-",
2535
+ "@yMinRaw",
2536
+ "@yPad"
2537
+ ]
2538
+ ],
2539
+ [
2540
+ "set",
2541
+ "@entity.yMax",
2542
+ [
2543
+ "+",
2544
+ "@yMaxRaw",
2545
+ "@yPad"
2546
+ ]
2547
+ ],
2548
+ [
2549
+ "set",
2550
+ "@entity.curves",
2551
+ [
2552
+ {
2553
+ "color": "@config.leftColor",
2554
+ "label": "@config.leftLabel",
2555
+ "samples": "@leftSamples"
2556
+ },
2557
+ {
2558
+ "color": "@config.rightColor",
2559
+ "label": "@config.rightLabel",
2560
+ "samples": "@rightSamples"
2561
+ }
2562
+ ]
2563
+ ]
2564
+ ]
2565
+ ],
2566
+ [
2567
+ "render-ui",
2568
+ "main",
2569
+ {
2570
+ "children": [
2571
+ {
2572
+ "children": [
2573
+ {
2574
+ "content": "@entity.title",
2575
+ "type": "typography",
2576
+ "variant": "h4"
2577
+ },
2578
+ {
2579
+ "content": "@config.compareText",
2580
+ "type": "typography",
2581
+ "variant": "body"
2582
+ },
2583
+ {
2584
+ "children": [
2585
+ {
2586
+ "children": [
2587
+ {
2588
+ "content": [
2589
+ "str/concat",
2590
+ "@config.leftLabel",
2591
+ " — ",
2592
+ "@config.paramALabel",
2593
+ ": ",
2594
+ [
2595
+ "math/round",
2596
+ "@entity.leftA",
2597
+ 2.0
2598
+ ]
2599
+ ],
2600
+ "type": "typography",
2601
+ "variant": "caption"
2602
+ },
2603
+ {
2604
+ "action": "SET_PARAM",
2605
+ "actionPayload": {
2606
+ "side": "left",
2607
+ "which": "A"
2608
+ },
2609
+ "max": "@config.paramAMax",
2610
+ "min": "@config.paramAMin",
2611
+ "showTooltip": true,
2612
+ "step": "@config.paramAStep",
2613
+ "type": "range-slider",
2614
+ "value": "@entity.leftA"
2615
+ },
2616
+ {
2617
+ "content": [
2618
+ "str/concat",
2619
+ "@config.leftLabel",
2620
+ " — ",
2621
+ "@config.paramBLabel",
2622
+ ": ",
2623
+ [
2624
+ "math/round",
2625
+ "@entity.leftB",
2626
+ 2.0
2627
+ ]
2628
+ ],
2629
+ "type": "typography",
2630
+ "variant": "caption"
2631
+ },
2632
+ {
2633
+ "action": "SET_PARAM",
2634
+ "actionPayload": {
2635
+ "side": "left",
2636
+ "which": "B"
2637
+ },
2638
+ "max": "@config.paramBMax",
2639
+ "min": "@config.paramBMin",
2640
+ "showTooltip": true,
2641
+ "step": "@config.paramBStep",
2642
+ "type": "range-slider",
2643
+ "value": "@entity.leftB"
2644
+ }
2645
+ ],
2646
+ "direction": "vertical",
2647
+ "gap": "xs",
2648
+ "type": "stack"
2649
+ },
2650
+ {
2651
+ "children": [
2652
+ {
2653
+ "content": [
2654
+ "str/concat",
2655
+ "@config.rightLabel",
2656
+ " — ",
2657
+ "@config.paramALabel",
2658
+ ": ",
2659
+ [
2660
+ "math/round",
2661
+ "@entity.rightA",
2662
+ 2.0
2663
+ ]
2664
+ ],
2665
+ "type": "typography",
2666
+ "variant": "caption"
2667
+ },
2668
+ {
2669
+ "action": "SET_PARAM",
2670
+ "actionPayload": {
2671
+ "side": "right",
2672
+ "which": "A"
2673
+ },
2674
+ "max": "@config.paramAMax",
2675
+ "min": "@config.paramAMin",
2676
+ "showTooltip": true,
2677
+ "step": "@config.paramAStep",
2678
+ "type": "range-slider",
2679
+ "value": "@entity.rightA"
2680
+ },
2681
+ {
2682
+ "content": [
2683
+ "str/concat",
2684
+ "@config.rightLabel",
2685
+ " — ",
2686
+ "@config.paramBLabel",
2687
+ ": ",
2688
+ [
2689
+ "math/round",
2690
+ "@entity.rightB",
2691
+ 2.0
2692
+ ]
2693
+ ],
2694
+ "type": "typography",
2695
+ "variant": "caption"
2696
+ },
2697
+ {
2698
+ "action": "SET_PARAM",
2699
+ "actionPayload": {
2700
+ "side": "right",
2701
+ "which": "B"
2702
+ },
2703
+ "max": "@config.paramBMax",
2704
+ "min": "@config.paramBMin",
2705
+ "showTooltip": true,
2706
+ "step": "@config.paramBStep",
2707
+ "type": "range-slider",
2708
+ "value": "@entity.rightB"
2709
+ }
2710
+ ],
2711
+ "direction": "vertical",
2712
+ "gap": "xs",
2713
+ "type": "stack"
2714
+ }
2715
+ ],
2716
+ "direction": "horizontal",
2717
+ "gap": "lg",
2718
+ "type": "stack"
2719
+ },
2720
+ {
2721
+ "animate": false,
2722
+ "curves": "@entity.curves",
2723
+ "gridStep": "@config.gridStep",
2724
+ "height": "@config.height",
2725
+ "interactive": false,
2726
+ "points": [],
2727
+ "shapes": [],
2728
+ "showAxes": "@config.showAxes",
2729
+ "showGrid": "@config.showGrid",
2730
+ "title": "",
2731
+ "type": "math-canvas",
2732
+ "vectors": [],
2733
+ "width": "@config.width",
2734
+ "xMax": "@config.xMax",
2735
+ "xMin": "@config.xMin",
2736
+ "yMax": "@entity.yMax",
2737
+ "yMin": "@entity.yMin"
2738
+ },
2739
+ {
2740
+ "content": [
2741
+ "str/concat",
2742
+ "At x=",
2743
+ [
2744
+ "math/round",
2745
+ "@entity.xMid",
2746
+ 2.0
2747
+ ],
2748
+ ": ",
2749
+ "@config.leftLabel",
2750
+ " = ",
2751
+ [
2752
+ "math/round",
2753
+ "@entity.leftMid",
2754
+ 3.0
2755
+ ],
2756
+ ", ",
2757
+ "@config.rightLabel",
2758
+ " = ",
2759
+ [
2760
+ "math/round",
2761
+ "@entity.rightMid",
2762
+ 3.0
2763
+ ],
2764
+ ", Δ = ",
2765
+ [
2766
+ "math/round",
2767
+ "@entity.delta",
2768
+ 3.0
2769
+ ]
2770
+ ],
2771
+ "type": "typography",
2772
+ "variant": "body"
2773
+ }
2774
+ ],
2775
+ "direction": "vertical",
2776
+ "gap": "md",
2777
+ "type": "stack"
2778
+ }
2779
+ ],
2780
+ "padding": "md",
2781
+ "type": "box"
2782
+ }
2783
+ ],
2784
+ [
2785
+ "emit",
2786
+ "COMPARISON_CHANGED",
2787
+ {
2788
+ "delta": "@entity.delta",
2789
+ "leftA": "@entity.leftA",
2790
+ "leftB": "@entity.leftB",
2791
+ "rightA": "@entity.rightA",
2792
+ "rightB": "@entity.rightB"
2793
+ }
2794
+ ]
2795
+ ],
2796
+ "event": "SET_PARAM",
2797
+ "eventId": "evt_01M07580H56QMZDG0CCEWS1HD1",
2798
+ "from": "idle",
2799
+ "guard": [
2800
+ "==",
2801
+ "@entity.active",
2802
+ true
2803
+ ],
2804
+ "to": "idle"
2805
+ }
2806
+ ]
2807
+ }
2808
+ }
2809
+ ]
2810
+ }
2811
+ ],
2812
+ "schemaVersion": 1,
2813
+ "version": "1.0.0"
2814
+ }