@almadar/std 16.174.0 → 16.176.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 (45) hide show
  1. package/behaviors/lolo/ui/core/molecules/ui-table-view.lolo +4 -9
  2. package/behaviors/lolo/ui/learning/atoms/std-learn-classify.lolo +132 -22
  3. package/behaviors/lolo/ui/learning/atoms/std-learn-derivation.lolo +428 -0
  4. package/behaviors/lolo/ui/learning/atoms/std-learn-doser.lolo +520 -0
  5. package/behaviors/lolo/ui/learning/atoms/std-learn-scatter-fit.lolo +805 -0
  6. package/behaviors/lolo/ui/learning/atoms/std-learn-tour-3d.lolo +31 -2
  7. package/behaviors/lolo/ui/learning/atoms/std-learn-transport.lolo +186 -0
  8. package/behaviors/lolo/ui/learning/atoms/std-learn-tree.lolo +522 -0
  9. package/behaviors/lolo/ui/learning/atoms/ui-algo-graph-canvas.lolo +192 -0
  10. package/behaviors/lolo/ui/learning/atoms/ui-algorithm-canvas.lolo +111 -2
  11. package/behaviors/lolo/ui/learning/atoms/ui-biology-canvas.lolo +150 -1
  12. package/behaviors/lolo/ui/learning/atoms/ui-chemistry-canvas.lolo +132 -1
  13. package/behaviors/lolo/ui/learning/atoms/ui-learning-canvas.lolo +48 -1
  14. package/behaviors/lolo/ui/learning/atoms/ui-math-canvas.lolo +141 -1
  15. package/behaviors/lolo/ui/learning/atoms/ui-physics-canvas.lolo +199 -1
  16. package/behaviors/registry/ui/core/molecules/ui-table-view.orb +4 -39
  17. package/behaviors/registry/ui/learning/atoms/std-learn-classify.orb +1288 -197
  18. package/behaviors/registry/ui/learning/atoms/std-learn-derivation.orb +2512 -0
  19. package/behaviors/registry/ui/learning/atoms/std-learn-doser.orb +3678 -0
  20. package/behaviors/registry/ui/learning/atoms/std-learn-scatter-fit.orb +6539 -0
  21. package/behaviors/registry/ui/learning/atoms/std-learn-tour-3d.orb +173 -2
  22. package/behaviors/registry/ui/learning/atoms/std-learn-transport.orb +986 -0
  23. package/behaviors/registry/ui/learning/atoms/std-learn-tree.orb +3333 -0
  24. package/behaviors/registry/ui/learning/atoms/ui-algo-graph-canvas.orb +716 -0
  25. package/behaviors/registry/ui/learning/atoms/ui-algorithm-canvas.orb +506 -1
  26. package/behaviors/registry/ui/learning/atoms/ui-biology-canvas.orb +684 -0
  27. package/behaviors/registry/ui/learning/atoms/ui-chemistry-canvas.orb +634 -0
  28. package/behaviors/registry/ui/learning/atoms/ui-learning-canvas.orb +256 -0
  29. package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +736 -12
  30. package/behaviors/registry/ui/learning/atoms/ui-physics-canvas.orb +1061 -33
  31. package/dist/behaviors/exports-reader.js +2448 -2184
  32. package/dist/behaviors/functions/index.d.ts +800 -13
  33. package/dist/behaviors/functions/index.js +2431 -2185
  34. package/dist/behaviors/index.d.ts +1 -1
  35. package/dist/behaviors/index.js +2449 -2185
  36. package/dist/behaviors/query.js +2448 -2184
  37. package/dist/behaviors-embeddings.hash.json +3 -3
  38. package/dist/behaviors-embeddings.json +318 -294
  39. package/dist/behaviors-registry.json +4391 -1298
  40. package/dist/index.d.ts +1 -1
  41. package/dist/index.js +2449 -2185
  42. package/dist/knob-embeddings.hash.json +3 -3
  43. package/dist/knob-embeddings.json +1 -1
  44. package/dist/registry/factory-signatures.json +1 -1
  45. package/package.json +2 -2
@@ -0,0 +1,986 @@
1
+ {
2
+ "description": "Generic 2D step-transport (clock) instrument — the substrate twin of std-learn-sim-3d for discrete-step instruments. Contract: the atom owns the Step/Run-Pause/Reset transport and the clock but NOT the subject computation — STEP advances one step manually, TOGGLE_RUN engages a 32ms tick that accumulates elapsed time and fires one step every stepIntervalMs, RESET zeroes the counters and restores autoRun. Every step (button or clock) broadcasts LEARN_STEP; a composed sibling trait transitions directly on the LEARN_STEP / LEARN_RESET / LEARN_UPDATED broadcasts (the same bare-event cascade the lab routers use), applies the domain computation, halts the clock by setting the shared entity's done flag (the sibling is done's ONLY writer — it must also clear it on LEARN_RESET), and owns the scene render — this atom renders only its control strip and step caption. Standalone by default; behind a lab router set matchMode and it renders only when MODE_SELECTED matches.",
3
+ "ledger": {
4
+ "entries": {
5
+ "ent_01M0C2M9G3WH9K6WHNYM56MNKD": {
6
+ "bakedName": "LearnTransportScene",
7
+ "curName": "LearnTransportScene",
8
+ "id": "ent_01M0C2M9G3WH9K6WHNYM56MNKD",
9
+ "kind": "entity",
10
+ "owner": "workspace",
11
+ "renames": []
12
+ },
13
+ "evt_01M0C2M9G37EVWAFJ3K2C6W59R": {
14
+ "bakedName": "INIT",
15
+ "curName": "INIT",
16
+ "id": "evt_01M0C2M9G37EVWAFJ3K2C6W59R",
17
+ "kind": "event",
18
+ "owner": "workspace",
19
+ "parent": "trt_01M0C2M9G3FNPHJAAS054FS7PK",
20
+ "renames": []
21
+ },
22
+ "evt_01M0C2M9G42KN0FDTE418X0G6B": {
23
+ "bakedName": "LEARN_STEP",
24
+ "curName": "LEARN_STEP",
25
+ "id": "evt_01M0C2M9G42KN0FDTE418X0G6B",
26
+ "kind": "event",
27
+ "owner": "workspace",
28
+ "parent": "trt_01M0C2M9G3FNPHJAAS054FS7PK",
29
+ "renames": []
30
+ },
31
+ "evt_01M0C2M9G44093Q65HQCN3FC3E": {
32
+ "bakedName": "LEARN_UPDATED",
33
+ "curName": "LEARN_UPDATED",
34
+ "id": "evt_01M0C2M9G44093Q65HQCN3FC3E",
35
+ "kind": "event",
36
+ "owner": "workspace",
37
+ "parent": "trt_01M0C2M9G3FNPHJAAS054FS7PK",
38
+ "renames": []
39
+ },
40
+ "evt_01M0C2M9G4BS9264PK361XE9TH": {
41
+ "bakedName": "STEP",
42
+ "curName": "STEP",
43
+ "id": "evt_01M0C2M9G4BS9264PK361XE9TH",
44
+ "kind": "event",
45
+ "owner": "workspace",
46
+ "parent": "trt_01M0C2M9G3FNPHJAAS054FS7PK",
47
+ "renames": []
48
+ },
49
+ "evt_01M0C2M9G4CM05SFKCFDNMWXXA": {
50
+ "bakedName": "TOGGLE_RUN",
51
+ "curName": "TOGGLE_RUN",
52
+ "id": "evt_01M0C2M9G4CM05SFKCFDNMWXXA",
53
+ "kind": "event",
54
+ "owner": "workspace",
55
+ "parent": "trt_01M0C2M9G3FNPHJAAS054FS7PK",
56
+ "renames": []
57
+ },
58
+ "evt_01M0C2M9G4HNV8FV40D0DZFWA6": {
59
+ "bakedName": "MODE_SELECTED",
60
+ "curName": "MODE_SELECTED",
61
+ "id": "evt_01M0C2M9G4HNV8FV40D0DZFWA6",
62
+ "kind": "event",
63
+ "owner": "workspace",
64
+ "parent": "trt_01M0C2M9G3FNPHJAAS054FS7PK",
65
+ "renames": []
66
+ },
67
+ "evt_01M0C2M9G4JB8HF1DFKR55JGSA": {
68
+ "bakedName": "LEARN_RESET",
69
+ "curName": "LEARN_RESET",
70
+ "id": "evt_01M0C2M9G4JB8HF1DFKR55JGSA",
71
+ "kind": "event",
72
+ "owner": "workspace",
73
+ "parent": "trt_01M0C2M9G3FNPHJAAS054FS7PK",
74
+ "renames": []
75
+ },
76
+ "evt_01M0C2M9G4JTJHKWQEKYXE4MEC": {
77
+ "bakedName": "RESET",
78
+ "curName": "RESET",
79
+ "id": "evt_01M0C2M9G4JTJHKWQEKYXE4MEC",
80
+ "kind": "event",
81
+ "owner": "workspace",
82
+ "parent": "trt_01M0C2M9G3FNPHJAAS054FS7PK",
83
+ "renames": []
84
+ },
85
+ "orb_01M0C2M9G3WP1MHJ10WMCT0BS7": {
86
+ "bakedName": "LearnTransportOrbital",
87
+ "curName": "LearnTransportOrbital",
88
+ "id": "orb_01M0C2M9G3WP1MHJ10WMCT0BS7",
89
+ "kind": "orbital",
90
+ "owner": "workspace",
91
+ "renames": []
92
+ },
93
+ "pag_01M0C2M9G53B3D0AF88VMV0D78": {
94
+ "bakedName": "LearnTransportPage",
95
+ "curName": "LearnTransportPage",
96
+ "id": "pag_01M0C2M9G53B3D0AF88VMV0D78",
97
+ "kind": "page",
98
+ "owner": "workspace",
99
+ "renames": []
100
+ },
101
+ "trt_01M0C2M9G3FNPHJAAS054FS7PK": {
102
+ "bakedName": "LearnTransportSim",
103
+ "curName": "LearnTransportSim",
104
+ "id": "trt_01M0C2M9G3FNPHJAAS054FS7PK",
105
+ "kind": "trait",
106
+ "owner": "workspace",
107
+ "renames": []
108
+ }
109
+ },
110
+ "schemaVersion": 1
111
+ },
112
+ "name": "std-learn-transport",
113
+ "orbitals": [
114
+ {
115
+ "entity": {
116
+ "fields": [
117
+ {
118
+ "name": "id",
119
+ "required": true,
120
+ "type": "string"
121
+ },
122
+ {
123
+ "default": false,
124
+ "name": "active",
125
+ "type": "boolean"
126
+ },
127
+ {
128
+ "name": "title",
129
+ "type": "string"
130
+ },
131
+ {
132
+ "default": false,
133
+ "name": "running",
134
+ "type": "boolean"
135
+ },
136
+ {
137
+ "default": 0.0,
138
+ "name": "steps",
139
+ "type": "number"
140
+ },
141
+ {
142
+ "default": 0.0,
143
+ "name": "elapsedMs",
144
+ "type": "number"
145
+ },
146
+ {
147
+ "default": false,
148
+ "name": "done",
149
+ "type": "boolean"
150
+ }
151
+ ],
152
+ "id": "ent_01M0C2M9G3WH9K6WHNYM56MNKD",
153
+ "name": "LearnTransportScene",
154
+ "persistence": "runtime",
155
+ "shared": true
156
+ },
157
+ "id": "orb_01M0C2M9G3WP1MHJ10WMCT0BS7",
158
+ "name": "LearnTransportOrbital",
159
+ "pages": [
160
+ {
161
+ "id": "pag_01M0C2M9G53B3D0AF88VMV0D78",
162
+ "name": "LearnTransportPage",
163
+ "path": "/learn-transport",
164
+ "traits": [
165
+ {
166
+ "ref": "LearnTransportSim",
167
+ "refId": "trt_01M0C2M9G3FNPHJAAS054FS7PK"
168
+ }
169
+ ]
170
+ }
171
+ ],
172
+ "traits": [
173
+ {
174
+ "category": "interaction",
175
+ "config": {
176
+ "autoRun": {
177
+ "default": false,
178
+ "description": "When true the clock starts stepping on INIT; the Reset arm restores this value.",
179
+ "label": "Auto Run",
180
+ "tier": "domain",
181
+ "type": "boolean"
182
+ },
183
+ "matchMode": {
184
+ "default": "",
185
+ "description": "When composed behind a lab router, the MODE_SELECTED mode value this instrument responds to. Empty string means standalone — render immediately on INIT.",
186
+ "label": "Match Mode",
187
+ "tier": "presentation",
188
+ "type": "string"
189
+ },
190
+ "stepIntervalMs": {
191
+ "default": 500.0,
192
+ "description": "Milliseconds of running clock per domain step — the 32ms base tick accumulates elapsed time and fires LEARN_STEP each time this interval elapses. 300-900 suits narrated steppers; 32 fires every frame for continuous sims.",
193
+ "label": "Step Interval (ms)",
194
+ "tier": "domain",
195
+ "type": "number"
196
+ },
197
+ "title": {
198
+ "default": "Learning Instrument",
199
+ "description": "Title shown above the transport controls.",
200
+ "label": "Title",
201
+ "tier": "presentation",
202
+ "type": "string"
203
+ }
204
+ },
205
+ "emits": [
206
+ {
207
+ "description": "Fires once per domain step — from the Step button or every stepIntervalMs of running clock — with the step counter; the composed subject trait transitions on it and applies one step of the domain computation. A harmless no-op when the atom runs standalone.",
208
+ "event": "LEARN_STEP",
209
+ "eventId": "evt_01M0C2M9G42KN0FDTE418X0G6B",
210
+ "payloadSchema": [
211
+ {
212
+ "name": "steps",
213
+ "type": "int"
214
+ }
215
+ ],
216
+ "scope": "external",
217
+ "synonyms": "step, advance, tick, iterate, next",
218
+ "tier": "domain"
219
+ },
220
+ {
221
+ "description": "Fires on Reset after the transport counters re-zero; the composed subject trait reseeds its domain state from config on it. A harmless no-op when the atom runs standalone.",
222
+ "event": "LEARN_RESET",
223
+ "eventId": "evt_01M0C2M9G4JB8HF1DFKR55JGSA",
224
+ "scope": "external",
225
+ "synonyms": "reset, reseed, restart, clear",
226
+ "tier": "domain"
227
+ },
228
+ {
229
+ "description": "Fires on INIT/MODE_SELECTED/Run-Pause toggle with the transport state — running flag and step counter — so the composed subject trait can repaint its shell (Run/Pause label, step readout). A harmless no-op when the atom runs standalone.",
230
+ "event": "LEARN_UPDATED",
231
+ "eventId": "evt_01M0C2M9G44093Q65HQCN3FC3E",
232
+ "payloadSchema": [
233
+ {
234
+ "name": "running",
235
+ "type": "boolean"
236
+ },
237
+ {
238
+ "name": "steps",
239
+ "type": "int"
240
+ }
241
+ ],
242
+ "scope": "external",
243
+ "synonyms": "run, pause, transport, running state",
244
+ "tier": "domain"
245
+ }
246
+ ],
247
+ "entityContract": {
248
+ "provides": [
249
+ "active",
250
+ "elapsedMs",
251
+ "running",
252
+ "steps",
253
+ "title"
254
+ ],
255
+ "requires": [
256
+ "done"
257
+ ]
258
+ },
259
+ "entityRebindable": true,
260
+ "entityRefIds": {
261
+ "LearnTransportScene": "ent_01M0C2M9G3WH9K6WHNYM56MNKD"
262
+ },
263
+ "id": "trt_01M0C2M9G3FNPHJAAS054FS7PK",
264
+ "linkedEntity": "LearnTransportScene",
265
+ "linkedEntityId": "ent_01M0C2M9G3WH9K6WHNYM56MNKD",
266
+ "name": "LearnTransportSim",
267
+ "scope": "instance",
268
+ "stateMachine": {
269
+ "events": [
270
+ {
271
+ "id": "evt_01M0C2M9G37EVWAFJ3K2C6W59R",
272
+ "key": "INIT",
273
+ "name": "Initialize"
274
+ },
275
+ {
276
+ "description": "Lab router broadcast naming the active mode; this instrument renders when the mode equals matchMode, otherwise renders null.",
277
+ "id": "evt_01M0C2M9G4HNV8FV40D0DZFWA6",
278
+ "key": "MODE_SELECTED",
279
+ "name": "Mode Selected",
280
+ "payloadSchema": [
281
+ {
282
+ "name": "mode",
283
+ "type": "string"
284
+ }
285
+ ],
286
+ "tier": "domain"
287
+ },
288
+ {
289
+ "id": "evt_01M0C2M9G4BS9264PK361XE9TH",
290
+ "key": "STEP",
291
+ "name": "Step"
292
+ },
293
+ {
294
+ "id": "evt_01M0C2M9G4CM05SFKCFDNMWXXA",
295
+ "key": "TOGGLE_RUN",
296
+ "name": "Toggle Run"
297
+ },
298
+ {
299
+ "id": "evt_01M0C2M9G4JTJHKWQEKYXE4MEC",
300
+ "key": "RESET",
301
+ "name": "Reset"
302
+ },
303
+ {
304
+ "description": "Fires once per domain step — from the Step button or every stepIntervalMs of running clock — with the step counter; the composed subject trait transitions on it and applies one step of the domain computation. A harmless no-op when the atom runs standalone.",
305
+ "id": "evt_01M0C2M9G42KN0FDTE418X0G6B",
306
+ "key": "LEARN_STEP",
307
+ "name": "Learn Step",
308
+ "payloadSchema": [
309
+ {
310
+ "name": "steps",
311
+ "type": "int"
312
+ }
313
+ ],
314
+ "synonyms": "step, advance, tick, iterate, next",
315
+ "tier": "domain"
316
+ },
317
+ {
318
+ "description": "Fires on Reset after the transport counters re-zero; the composed subject trait reseeds its domain state from config on it. A harmless no-op when the atom runs standalone.",
319
+ "id": "evt_01M0C2M9G4JB8HF1DFKR55JGSA",
320
+ "key": "LEARN_RESET",
321
+ "name": "Learn Reset",
322
+ "synonyms": "reset, reseed, restart, clear",
323
+ "tier": "domain"
324
+ },
325
+ {
326
+ "description": "Fires on INIT/MODE_SELECTED/Run-Pause toggle with the transport state — running flag and step counter — so the composed subject trait can repaint its shell (Run/Pause label, step readout). A harmless no-op when the atom runs standalone.",
327
+ "id": "evt_01M0C2M9G44093Q65HQCN3FC3E",
328
+ "key": "LEARN_UPDATED",
329
+ "name": "Learn Updated",
330
+ "payloadSchema": [
331
+ {
332
+ "name": "running",
333
+ "type": "boolean"
334
+ },
335
+ {
336
+ "name": "steps",
337
+ "type": "int"
338
+ }
339
+ ],
340
+ "synonyms": "run, pause, transport, running state",
341
+ "tier": "domain"
342
+ }
343
+ ],
344
+ "states": [
345
+ {
346
+ "isInitial": true,
347
+ "name": "idle"
348
+ }
349
+ ],
350
+ "transitions": [
351
+ {
352
+ "effects": [
353
+ [
354
+ "set",
355
+ "@entity.active",
356
+ true
357
+ ],
358
+ [
359
+ "set",
360
+ "@entity.title",
361
+ "@config.title"
362
+ ],
363
+ [
364
+ "set",
365
+ "@entity.running",
366
+ "@config.autoRun"
367
+ ],
368
+ [
369
+ "set",
370
+ "@entity.steps",
371
+ 0.0
372
+ ],
373
+ [
374
+ "set",
375
+ "@entity.elapsedMs",
376
+ 0.0
377
+ ],
378
+ [
379
+ "render-ui",
380
+ "main",
381
+ {
382
+ "children": [
383
+ {
384
+ "children": [
385
+ {
386
+ "content": "@entity.title",
387
+ "type": "typography",
388
+ "variant": "h4"
389
+ },
390
+ {
391
+ "children": [
392
+ {
393
+ "action": "STEP",
394
+ "label": "Step",
395
+ "type": "button",
396
+ "variant": "primary"
397
+ },
398
+ {
399
+ "action": "TOGGLE_RUN",
400
+ "label": [
401
+ "if",
402
+ "@entity.running",
403
+ "Pause",
404
+ "Run"
405
+ ],
406
+ "type": "button",
407
+ "variant": "secondary"
408
+ },
409
+ {
410
+ "action": "RESET",
411
+ "label": "Reset",
412
+ "type": "button",
413
+ "variant": "ghost"
414
+ }
415
+ ],
416
+ "direction": "horizontal",
417
+ "gap": "sm",
418
+ "type": "stack"
419
+ },
420
+ {
421
+ "content": [
422
+ "str/concat",
423
+ "Steps: ",
424
+ "@entity.steps",
425
+ [
426
+ "if",
427
+ "@entity.done",
428
+ " — done",
429
+ [
430
+ "if",
431
+ "@entity.running",
432
+ " — auto-stepping",
433
+ " — paused"
434
+ ]
435
+ ]
436
+ ],
437
+ "type": "typography",
438
+ "variant": "caption"
439
+ }
440
+ ],
441
+ "direction": "vertical",
442
+ "gap": "sm",
443
+ "type": "stack"
444
+ }
445
+ ],
446
+ "padding": "md",
447
+ "type": "box"
448
+ }
449
+ ],
450
+ [
451
+ "emit",
452
+ "LEARN_UPDATED",
453
+ {
454
+ "running": "@entity.running",
455
+ "steps": "@entity.steps"
456
+ }
457
+ ]
458
+ ],
459
+ "event": "INIT",
460
+ "eventId": "evt_01M0C2M9G37EVWAFJ3K2C6W59R",
461
+ "from": "idle",
462
+ "guard": [
463
+ "==",
464
+ "@config.matchMode",
465
+ ""
466
+ ],
467
+ "to": "idle"
468
+ },
469
+ {
470
+ "effects": [
471
+ [
472
+ "set",
473
+ "@entity.active",
474
+ true
475
+ ],
476
+ [
477
+ "set",
478
+ "@entity.title",
479
+ "@config.title"
480
+ ],
481
+ [
482
+ "set",
483
+ "@entity.running",
484
+ "@config.autoRun"
485
+ ],
486
+ [
487
+ "set",
488
+ "@entity.steps",
489
+ 0.0
490
+ ],
491
+ [
492
+ "set",
493
+ "@entity.elapsedMs",
494
+ 0.0
495
+ ],
496
+ [
497
+ "render-ui",
498
+ "main",
499
+ {
500
+ "children": [
501
+ {
502
+ "children": [
503
+ {
504
+ "content": "@entity.title",
505
+ "type": "typography",
506
+ "variant": "h4"
507
+ },
508
+ {
509
+ "children": [
510
+ {
511
+ "action": "STEP",
512
+ "label": "Step",
513
+ "type": "button",
514
+ "variant": "primary"
515
+ },
516
+ {
517
+ "action": "TOGGLE_RUN",
518
+ "label": [
519
+ "if",
520
+ "@entity.running",
521
+ "Pause",
522
+ "Run"
523
+ ],
524
+ "type": "button",
525
+ "variant": "secondary"
526
+ },
527
+ {
528
+ "action": "RESET",
529
+ "label": "Reset",
530
+ "type": "button",
531
+ "variant": "ghost"
532
+ }
533
+ ],
534
+ "direction": "horizontal",
535
+ "gap": "sm",
536
+ "type": "stack"
537
+ },
538
+ {
539
+ "content": [
540
+ "str/concat",
541
+ "Steps: ",
542
+ "@entity.steps",
543
+ [
544
+ "if",
545
+ "@entity.done",
546
+ " — done",
547
+ [
548
+ "if",
549
+ "@entity.running",
550
+ " — auto-stepping",
551
+ " — paused"
552
+ ]
553
+ ]
554
+ ],
555
+ "type": "typography",
556
+ "variant": "caption"
557
+ }
558
+ ],
559
+ "direction": "vertical",
560
+ "gap": "sm",
561
+ "type": "stack"
562
+ }
563
+ ],
564
+ "padding": "md",
565
+ "type": "box"
566
+ }
567
+ ],
568
+ [
569
+ "emit",
570
+ "LEARN_UPDATED",
571
+ {
572
+ "running": "@entity.running",
573
+ "steps": "@entity.steps"
574
+ }
575
+ ]
576
+ ],
577
+ "event": "MODE_SELECTED",
578
+ "eventId": "evt_01M0C2M9G4HNV8FV40D0DZFWA6",
579
+ "from": "idle",
580
+ "guard": [
581
+ "==",
582
+ "@payload.mode",
583
+ "@config.matchMode"
584
+ ],
585
+ "to": "idle"
586
+ },
587
+ {
588
+ "effects": [
589
+ [
590
+ "set",
591
+ "@entity.steps",
592
+ [
593
+ "+",
594
+ "@entity.steps",
595
+ 1.0
596
+ ]
597
+ ],
598
+ [
599
+ "render-ui",
600
+ "main",
601
+ {
602
+ "children": [
603
+ {
604
+ "children": [
605
+ {
606
+ "content": "@entity.title",
607
+ "type": "typography",
608
+ "variant": "h4"
609
+ },
610
+ {
611
+ "children": [
612
+ {
613
+ "action": "STEP",
614
+ "label": "Step",
615
+ "type": "button",
616
+ "variant": "primary"
617
+ },
618
+ {
619
+ "action": "TOGGLE_RUN",
620
+ "label": [
621
+ "if",
622
+ "@entity.running",
623
+ "Pause",
624
+ "Run"
625
+ ],
626
+ "type": "button",
627
+ "variant": "secondary"
628
+ },
629
+ {
630
+ "action": "RESET",
631
+ "label": "Reset",
632
+ "type": "button",
633
+ "variant": "ghost"
634
+ }
635
+ ],
636
+ "direction": "horizontal",
637
+ "gap": "sm",
638
+ "type": "stack"
639
+ },
640
+ {
641
+ "content": [
642
+ "str/concat",
643
+ "Steps: ",
644
+ "@entity.steps",
645
+ [
646
+ "if",
647
+ "@entity.done",
648
+ " — done",
649
+ [
650
+ "if",
651
+ "@entity.running",
652
+ " — auto-stepping",
653
+ " — paused"
654
+ ]
655
+ ]
656
+ ],
657
+ "type": "typography",
658
+ "variant": "caption"
659
+ }
660
+ ],
661
+ "direction": "vertical",
662
+ "gap": "sm",
663
+ "type": "stack"
664
+ }
665
+ ],
666
+ "padding": "md",
667
+ "type": "box"
668
+ }
669
+ ],
670
+ [
671
+ "emit",
672
+ "LEARN_STEP",
673
+ {
674
+ "steps": "@entity.steps"
675
+ }
676
+ ]
677
+ ],
678
+ "event": "STEP",
679
+ "eventId": "evt_01M0C2M9G4BS9264PK361XE9TH",
680
+ "from": "idle",
681
+ "guard": [
682
+ "and",
683
+ [
684
+ "==",
685
+ "@entity.active",
686
+ true
687
+ ],
688
+ [
689
+ "not",
690
+ [
691
+ "==",
692
+ "@entity.done",
693
+ true
694
+ ]
695
+ ]
696
+ ],
697
+ "to": "idle"
698
+ },
699
+ {
700
+ "effects": [
701
+ [
702
+ "set",
703
+ "@entity.running",
704
+ [
705
+ "not",
706
+ "@entity.running"
707
+ ]
708
+ ],
709
+ [
710
+ "render-ui",
711
+ "main",
712
+ {
713
+ "children": [
714
+ {
715
+ "children": [
716
+ {
717
+ "content": "@entity.title",
718
+ "type": "typography",
719
+ "variant": "h4"
720
+ },
721
+ {
722
+ "children": [
723
+ {
724
+ "action": "STEP",
725
+ "label": "Step",
726
+ "type": "button",
727
+ "variant": "primary"
728
+ },
729
+ {
730
+ "action": "TOGGLE_RUN",
731
+ "label": [
732
+ "if",
733
+ "@entity.running",
734
+ "Pause",
735
+ "Run"
736
+ ],
737
+ "type": "button",
738
+ "variant": "secondary"
739
+ },
740
+ {
741
+ "action": "RESET",
742
+ "label": "Reset",
743
+ "type": "button",
744
+ "variant": "ghost"
745
+ }
746
+ ],
747
+ "direction": "horizontal",
748
+ "gap": "sm",
749
+ "type": "stack"
750
+ },
751
+ {
752
+ "content": [
753
+ "str/concat",
754
+ "Steps: ",
755
+ "@entity.steps",
756
+ [
757
+ "if",
758
+ "@entity.done",
759
+ " — done",
760
+ [
761
+ "if",
762
+ "@entity.running",
763
+ " — auto-stepping",
764
+ " — paused"
765
+ ]
766
+ ]
767
+ ],
768
+ "type": "typography",
769
+ "variant": "caption"
770
+ }
771
+ ],
772
+ "direction": "vertical",
773
+ "gap": "sm",
774
+ "type": "stack"
775
+ }
776
+ ],
777
+ "padding": "md",
778
+ "type": "box"
779
+ }
780
+ ],
781
+ [
782
+ "emit",
783
+ "LEARN_UPDATED",
784
+ {
785
+ "running": "@entity.running",
786
+ "steps": "@entity.steps"
787
+ }
788
+ ]
789
+ ],
790
+ "event": "TOGGLE_RUN",
791
+ "eventId": "evt_01M0C2M9G4CM05SFKCFDNMWXXA",
792
+ "from": "idle",
793
+ "guard": [
794
+ "==",
795
+ "@entity.active",
796
+ true
797
+ ],
798
+ "to": "idle"
799
+ },
800
+ {
801
+ "effects": [
802
+ [
803
+ "set",
804
+ "@entity.running",
805
+ "@config.autoRun"
806
+ ],
807
+ [
808
+ "set",
809
+ "@entity.steps",
810
+ 0.0
811
+ ],
812
+ [
813
+ "set",
814
+ "@entity.elapsedMs",
815
+ 0.0
816
+ ],
817
+ [
818
+ "render-ui",
819
+ "main",
820
+ {
821
+ "children": [
822
+ {
823
+ "children": [
824
+ {
825
+ "content": "@entity.title",
826
+ "type": "typography",
827
+ "variant": "h4"
828
+ },
829
+ {
830
+ "children": [
831
+ {
832
+ "action": "STEP",
833
+ "label": "Step",
834
+ "type": "button",
835
+ "variant": "primary"
836
+ },
837
+ {
838
+ "action": "TOGGLE_RUN",
839
+ "label": [
840
+ "if",
841
+ "@entity.running",
842
+ "Pause",
843
+ "Run"
844
+ ],
845
+ "type": "button",
846
+ "variant": "secondary"
847
+ },
848
+ {
849
+ "action": "RESET",
850
+ "label": "Reset",
851
+ "type": "button",
852
+ "variant": "ghost"
853
+ }
854
+ ],
855
+ "direction": "horizontal",
856
+ "gap": "sm",
857
+ "type": "stack"
858
+ },
859
+ {
860
+ "content": [
861
+ "str/concat",
862
+ "Steps: ",
863
+ "@entity.steps",
864
+ [
865
+ "if",
866
+ "@entity.done",
867
+ " — done",
868
+ [
869
+ "if",
870
+ "@entity.running",
871
+ " — auto-stepping",
872
+ " — paused"
873
+ ]
874
+ ]
875
+ ],
876
+ "type": "typography",
877
+ "variant": "caption"
878
+ }
879
+ ],
880
+ "direction": "vertical",
881
+ "gap": "sm",
882
+ "type": "stack"
883
+ }
884
+ ],
885
+ "padding": "md",
886
+ "type": "box"
887
+ }
888
+ ],
889
+ [
890
+ "emit",
891
+ "LEARN_RESET",
892
+ {}
893
+ ]
894
+ ],
895
+ "event": "RESET",
896
+ "eventId": "evt_01M0C2M9G4JTJHKWQEKYXE4MEC",
897
+ "from": "idle",
898
+ "guard": [
899
+ "==",
900
+ "@entity.active",
901
+ true
902
+ ],
903
+ "to": "idle"
904
+ }
905
+ ]
906
+ },
907
+ "ticks": [
908
+ {
909
+ "effects": [
910
+ [
911
+ "set",
912
+ "@entity.elapsedMs",
913
+ [
914
+ "+",
915
+ "@entity.elapsedMs",
916
+ 32.0
917
+ ]
918
+ ],
919
+ [
920
+ "when",
921
+ [
922
+ ">=",
923
+ "@entity.elapsedMs",
924
+ "@config.stepIntervalMs"
925
+ ],
926
+ [
927
+ "do",
928
+ [
929
+ "set",
930
+ "@entity.elapsedMs",
931
+ 0.0
932
+ ],
933
+ [
934
+ "set",
935
+ "@entity.steps",
936
+ [
937
+ "+",
938
+ "@entity.steps",
939
+ 1.0
940
+ ]
941
+ ],
942
+ [
943
+ "emit",
944
+ "LEARN_STEP",
945
+ {
946
+ "steps": "@entity.steps"
947
+ }
948
+ ]
949
+ ]
950
+ ]
951
+ ],
952
+ "guard": [
953
+ "and",
954
+ [
955
+ "==",
956
+ "@entity.active",
957
+ true
958
+ ],
959
+ [
960
+ "and",
961
+ [
962
+ "==",
963
+ "@entity.running",
964
+ true
965
+ ],
966
+ [
967
+ "not",
968
+ [
969
+ "==",
970
+ "@entity.done",
971
+ true
972
+ ]
973
+ ]
974
+ ]
975
+ ],
976
+ "interval": 32.0,
977
+ "name": "transportTick"
978
+ }
979
+ ]
980
+ }
981
+ ]
982
+ }
983
+ ],
984
+ "schemaVersion": 1,
985
+ "version": "1.0.0"
986
+ }