@almadar/std 16.187.0 → 16.189.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 (102) hide show
  1. package/behaviors/lolo/ui/core/.hand-authored.json +4 -4
  2. package/behaviors/lolo/ui/core/atoms/std-board.lolo +138 -4
  3. package/behaviors/lolo/ui/core/atoms/std-browse.lolo +148 -8
  4. package/behaviors/lolo/ui/core/atoms/std-calendar.lolo +161 -11
  5. package/behaviors/lolo/ui/core/atoms/std-event-log.lolo +255 -2
  6. package/behaviors/lolo/ui/core/atoms/std-gallery.lolo +148 -1
  7. package/behaviors/lolo/ui/core/atoms/std-list.lolo +193 -1
  8. package/behaviors/lolo/ui/core/atoms/std-record-detail.lolo +731 -0
  9. package/behaviors/lolo/ui/core/atoms/std-related.lolo +5 -1
  10. package/behaviors/lolo/ui/core/atoms/std-selection.lolo +182 -1
  11. package/behaviors/lolo/ui/core/atoms/std-tree.lolo +113 -3
  12. package/behaviors/lolo/ui/core/atoms/std-version-history.lolo +1 -1
  13. package/behaviors/lolo/ui/core/molecules/ui-document-details.lolo +80 -0
  14. package/behaviors/lolo/ui/core/molecules/ui-document-panel.lolo +213 -0
  15. package/behaviors/lolo/ui/core/molecules/{ui-rich-block-editor.lolo → ui-rich-text-editor.lolo} +25 -25
  16. package/behaviors/lolo/ui/game/atoms/std-area-fill.lolo +93 -0
  17. package/behaviors/lolo/ui/game/atoms/std-choice-gate.lolo +100 -0
  18. package/behaviors/lolo/ui/game/atoms/std-coef-pad.lolo +114 -0
  19. package/behaviors/lolo/ui/game/atoms/std-curve-fog.lolo +50 -0
  20. package/behaviors/lolo/ui/game/atoms/std-loop-lock.lolo +79 -0
  21. package/behaviors/lolo/ui/game/atoms/std-pad-lock.lolo +97 -0
  22. package/behaviors/lolo/ui/game/atoms/std-patrol-hazard.lolo +14 -7
  23. package/behaviors/lolo/ui/game/atoms/std-platformer-body.lolo +48 -5
  24. package/behaviors/lolo/ui/game/atoms/std-velocity-gate.lolo +101 -0
  25. package/behaviors/lolo/ui/game/atoms/std-zone-card.lolo +95 -0
  26. package/behaviors/lolo/ui/game/organisms/std-platformer-board-2d.lolo +9 -0
  27. package/behaviors/registry/infra/atoms/std-approval-gate.orb +16 -8
  28. package/behaviors/registry/infra/atoms/std-cache-aside.orb +62 -31
  29. package/behaviors/registry/infra/atoms/std-circuit-breaker.orb +32 -16
  30. package/behaviors/registry/infra/atoms/std-data-erasure.orb +16 -8
  31. package/behaviors/registry/infra/atoms/std-mod-queue.orb +16 -8
  32. package/behaviors/registry/infra/atoms/std-rate-limiter.orb +28 -14
  33. package/behaviors/registry/infra/organisms/std-status-lifecycle-control.orb +2 -1
  34. package/behaviors/registry/ml/organisms/std-escalating-decision.orb +10 -5
  35. package/behaviors/registry/ml/organisms/std-knowledge-tracing.orb +4 -2
  36. package/behaviors/registry/ui/core/atoms/std-billable-hour.orb +2 -1
  37. package/behaviors/registry/ui/core/atoms/std-board.orb +355 -2
  38. package/behaviors/registry/ui/core/atoms/std-browse.orb +304 -31
  39. package/behaviors/registry/ui/core/atoms/std-calendar.orb +393 -25
  40. package/behaviors/registry/ui/core/atoms/std-dashboard-grid-embedded.orb +2 -1
  41. package/behaviors/registry/ui/core/atoms/std-esign-flow.orb +4 -2
  42. package/behaviors/registry/ui/core/atoms/std-esign-request.orb +6 -3
  43. package/behaviors/registry/ui/core/atoms/std-event-log.orb +773 -0
  44. package/behaviors/registry/ui/core/atoms/std-export.orb +4 -2
  45. package/behaviors/registry/ui/core/atoms/std-gallery.orb +390 -0
  46. package/behaviors/registry/ui/core/atoms/std-import.orb +4 -2
  47. package/behaviors/registry/ui/core/atoms/std-list.orb +451 -0
  48. package/behaviors/registry/ui/core/atoms/std-record-detail.orb +3360 -0
  49. package/behaviors/registry/ui/core/atoms/std-related.orb +23 -1
  50. package/behaviors/registry/ui/core/atoms/std-selection.orb +436 -0
  51. package/behaviors/registry/ui/core/atoms/std-tree.orb +292 -1
  52. package/behaviors/registry/ui/core/atoms/std-version-history.orb +1 -1
  53. package/behaviors/registry/ui/core/molecules/ui-document-details.orb +342 -0
  54. package/behaviors/registry/ui/core/molecules/ui-document-panel.orb +655 -0
  55. package/behaviors/registry/ui/core/molecules/{ui-rich-block-editor.orb → ui-rich-text-editor.orb} +84 -97
  56. package/behaviors/registry/ui/game/atoms/std-area-fill.orb +955 -0
  57. package/behaviors/registry/ui/game/atoms/std-choice-gate.orb +855 -0
  58. package/behaviors/registry/ui/game/atoms/std-coef-pad.orb +928 -0
  59. package/behaviors/registry/ui/game/atoms/std-curve-fog.orb +337 -0
  60. package/behaviors/registry/ui/game/atoms/std-fx-trail.orb +1 -1
  61. package/behaviors/registry/ui/game/atoms/std-gate-lock.orb +1 -1
  62. package/behaviors/registry/ui/game/atoms/std-lives.orb +1 -1
  63. package/behaviors/registry/ui/game/atoms/std-loop-lock.orb +785 -0
  64. package/behaviors/registry/ui/game/atoms/std-pad-lock.orb +933 -0
  65. package/behaviors/registry/ui/game/atoms/std-patrol-hazard.orb +190 -44
  66. package/behaviors/registry/ui/game/atoms/std-platformer-body.orb +1330 -653
  67. package/behaviors/registry/ui/game/atoms/std-velocity-gate.orb +1040 -0
  68. package/behaviors/registry/ui/game/atoms/std-zone-card.orb +642 -0
  69. package/behaviors/registry/ui/game/organisms/std-arcade-board-3d.orb +8 -4
  70. package/behaviors/registry/ui/game/organisms/std-crew-board-2d.orb +6 -3
  71. package/behaviors/registry/ui/game/organisms/std-dungeon-board-2d.orb +10 -5
  72. package/behaviors/registry/ui/game/organisms/std-market-board-3d.orb +8 -4
  73. package/behaviors/registry/ui/game/organisms/std-objective-board-3d.orb +8 -4
  74. package/behaviors/registry/ui/game/organisms/std-platformer-board-2d.orb +36 -1
  75. package/behaviors/registry/ui/game/organisms/std-survival-board-3d.orb +8 -4
  76. package/behaviors/registry/ui/game/organisms/std-tactics-board-2d.orb +12 -6
  77. package/behaviors/registry/ui/game/organisms/std-tactics-board-3d.orb +8 -4
  78. package/behaviors/registry/ui/game/organisms/std-worldmap-board-2d.orb +6 -3
  79. package/behaviors/registry/ui/learning/atoms/std-learn-slope-probe.orb +1 -1
  80. package/behaviors/registry/ui/marketing/atoms/std-marketing-article.orb +2 -1
  81. package/behaviors/registry/ui/marketing/atoms/std-marketing-footer.orb +2 -1
  82. package/behaviors/registry/ui/marketing/atoms/std-marketing-split.orb +2 -1
  83. package/behaviors/registry/ui/marketing/atoms/std-marketing-stats.orb +2 -1
  84. package/behaviors/registry/ui/marketing/atoms/std-marketing-steps.orb +2 -1
  85. package/behaviors/registry/ui/marketing/atoms/std-marketing-team.orb +2 -1
  86. package/dist/behaviors/exports-reader.js +10971 -6255
  87. package/dist/behaviors/functions/index.d.ts +1205 -256
  88. package/dist/behaviors/functions/index.js +10932 -6245
  89. package/dist/behaviors/index.d.ts +1 -1
  90. package/dist/behaviors/index.js +10972 -6256
  91. package/dist/behaviors/query.js +10971 -6255
  92. package/dist/behaviors-embeddings.hash.json +3 -3
  93. package/dist/behaviors-embeddings.json +485 -469
  94. package/dist/behaviors-registry.json +6125 -2940
  95. package/dist/index.d.ts +1 -1
  96. package/dist/index.js +10972 -6256
  97. package/dist/knob-embeddings.hash.json +3 -3
  98. package/dist/knob-embeddings.json +1 -1
  99. package/dist/registry/factory-signatures.json +1 -1
  100. package/package.json +4 -4
  101. package/behaviors/lolo/ui/core/atoms/std-rich-editor.lolo +0 -790
  102. package/behaviors/registry/ui/core/atoms/std-rich-editor.orb +0 -2225
@@ -0,0 +1,1040 @@
1
+ {
2
+ "description": "Headless velocity-gate mechanic: gates that open only when the player crosses them inside a speed band, optionally in a required direction, optionally sustained for a dwell. Listens BODY_MOVED and, per closed gate, tests the player's rect (padded by reachMargin), their speed against [minSpeed, maxSpeed], and their horizontal direction against dir (0 = either). Instant gates (dwellMs 0) open on the first passing cross; dwell gates (dwellMs > 0) accumulate ~33ms per passing move and open once held reaches dwellMs — a failing move resets the hold. The first newly opened gate emits VELOCITY_GATE_OPENED (the shared entity carries the rest). Entering a closed INSTANT gate while NOT passing emits VELOCITY_GATE_DENIED once per approach — re-arming only after the player steps out — so the board can answer with a PLACE back and a hint fx; dwell gates never deny (a hot entry is fine — coming to rest inside is the point), a failed hold simply resets. RESTART re-closes every gate. Renders nothing; boards draw the gate band/chest and read open/held from the shared entity (the render authority).",
3
+ "ledger": {
4
+ "entries": {
5
+ "ent_01M11M409RW0H8NTF5AKJH3NTJ": {
6
+ "bakedName": "VelocityGateData",
7
+ "curName": "VelocityGateData",
8
+ "id": "ent_01M11M409RW0H8NTF5AKJH3NTJ",
9
+ "kind": "entity",
10
+ "owner": "workspace",
11
+ "renames": []
12
+ },
13
+ "evt_01M11M409R2FR46WEWVN0JMSNK": {
14
+ "bakedName": "BODY_MOVED",
15
+ "curName": "BODY_MOVED",
16
+ "id": "evt_01M11M409R2FR46WEWVN0JMSNK",
17
+ "kind": "event",
18
+ "owner": "workspace",
19
+ "parent": "trt_01M11M409R4QHY3YC5E9VM5GQQ",
20
+ "renames": []
21
+ },
22
+ "evt_01M11M409R76VNT0D3KFN8VR2X": {
23
+ "bakedName": "VELOCITY_GATE_DENIED",
24
+ "curName": "VELOCITY_GATE_DENIED",
25
+ "id": "evt_01M11M409R76VNT0D3KFN8VR2X",
26
+ "kind": "event",
27
+ "owner": "workspace",
28
+ "parent": "trt_01M11M409R4QHY3YC5E9VM5GQQ",
29
+ "renames": []
30
+ },
31
+ "evt_01M11M409R7VCMCWJ41R37CCWH": {
32
+ "bakedName": "RESTART",
33
+ "curName": "RESTART",
34
+ "id": "evt_01M11M409R7VCMCWJ41R37CCWH",
35
+ "kind": "event",
36
+ "owner": "workspace",
37
+ "parent": "trt_01M11M409R4QHY3YC5E9VM5GQQ",
38
+ "renames": []
39
+ },
40
+ "evt_01M11M409RW8GXWQS2H7KWNG9V": {
41
+ "bakedName": "INIT",
42
+ "curName": "INIT",
43
+ "id": "evt_01M11M409RW8GXWQS2H7KWNG9V",
44
+ "kind": "event",
45
+ "owner": "workspace",
46
+ "parent": "trt_01M11M409R4QHY3YC5E9VM5GQQ",
47
+ "renames": []
48
+ },
49
+ "evt_01M11M409RWEC4MAX79RVXR02R": {
50
+ "bakedName": "VELOCITY_GATE_OPENED",
51
+ "curName": "VELOCITY_GATE_OPENED",
52
+ "id": "evt_01M11M409RWEC4MAX79RVXR02R",
53
+ "kind": "event",
54
+ "owner": "workspace",
55
+ "parent": "trt_01M11M409R4QHY3YC5E9VM5GQQ",
56
+ "renames": []
57
+ },
58
+ "orb_01M11M409R7JMJ3WGC91RHVMWS": {
59
+ "bakedName": "VelocityGateOrbital",
60
+ "curName": "VelocityGateOrbital",
61
+ "id": "orb_01M11M409R7JMJ3WGC91RHVMWS",
62
+ "kind": "orbital",
63
+ "owner": "workspace",
64
+ "renames": []
65
+ },
66
+ "pag_01M11M409RE3A1DPXM5HWGFB7A": {
67
+ "bakedName": "VelocityGatePage",
68
+ "curName": "VelocityGatePage",
69
+ "id": "pag_01M11M409RE3A1DPXM5HWGFB7A",
70
+ "kind": "page",
71
+ "owner": "workspace",
72
+ "renames": []
73
+ },
74
+ "trt_01M11M409R4QHY3YC5E9VM5GQQ": {
75
+ "bakedName": "VelocityGate",
76
+ "curName": "VelocityGate",
77
+ "id": "trt_01M11M409R4QHY3YC5E9VM5GQQ",
78
+ "kind": "trait",
79
+ "owner": "workspace",
80
+ "renames": []
81
+ }
82
+ },
83
+ "schemaVersion": 1
84
+ },
85
+ "name": "std-velocity-gate",
86
+ "orbitals": [
87
+ {
88
+ "entity": {
89
+ "fields": [
90
+ {
91
+ "name": "id",
92
+ "required": true,
93
+ "type": "string"
94
+ },
95
+ {
96
+ "default": [],
97
+ "items": {
98
+ "properties": {
99
+ "denied": {
100
+ "name": "denied",
101
+ "required": false,
102
+ "type": "boolean"
103
+ },
104
+ "dir": {
105
+ "name": "dir",
106
+ "required": true,
107
+ "type": "number"
108
+ },
109
+ "dwellMs": {
110
+ "name": "dwellMs",
111
+ "required": true,
112
+ "type": "number"
113
+ },
114
+ "height": {
115
+ "name": "height",
116
+ "required": true,
117
+ "type": "number"
118
+ },
119
+ "held": {
120
+ "name": "held",
121
+ "required": false,
122
+ "type": "number"
123
+ },
124
+ "hint": {
125
+ "name": "hint",
126
+ "required": false,
127
+ "type": "string"
128
+ },
129
+ "id": {
130
+ "name": "id",
131
+ "required": true,
132
+ "type": "string"
133
+ },
134
+ "maxSpeed": {
135
+ "name": "maxSpeed",
136
+ "required": true,
137
+ "type": "number"
138
+ },
139
+ "minSpeed": {
140
+ "name": "minSpeed",
141
+ "required": true,
142
+ "type": "number"
143
+ },
144
+ "open": {
145
+ "name": "open",
146
+ "required": false,
147
+ "type": "boolean"
148
+ },
149
+ "reported": {
150
+ "name": "reported",
151
+ "required": false,
152
+ "type": "boolean"
153
+ },
154
+ "touching": {
155
+ "name": "touching",
156
+ "required": false,
157
+ "type": "boolean"
158
+ },
159
+ "width": {
160
+ "name": "width",
161
+ "required": true,
162
+ "type": "number"
163
+ },
164
+ "x": {
165
+ "name": "x",
166
+ "required": true,
167
+ "type": "number"
168
+ },
169
+ "y": {
170
+ "name": "y",
171
+ "required": true,
172
+ "type": "number"
173
+ }
174
+ },
175
+ "type": "object"
176
+ },
177
+ "name": "gates",
178
+ "type": "array"
179
+ }
180
+ ],
181
+ "id": "ent_01M11M409RW0H8NTF5AKJH3NTJ",
182
+ "name": "VelocityGateData",
183
+ "persistence": "runtime",
184
+ "shared": true
185
+ },
186
+ "id": "orb_01M11M409R7JMJ3WGC91RHVMWS",
187
+ "name": "VelocityGateOrbital",
188
+ "pages": [
189
+ {
190
+ "id": "pag_01M11M409RE3A1DPXM5HWGFB7A",
191
+ "name": "VelocityGatePage",
192
+ "path": "/velocity-gate",
193
+ "traits": [
194
+ {
195
+ "ref": "VelocityGate",
196
+ "refId": "trt_01M11M409R4QHY3YC5E9VM5GQQ"
197
+ }
198
+ ]
199
+ }
200
+ ],
201
+ "traits": [
202
+ {
203
+ "category": "lifecycle",
204
+ "config": {
205
+ "gates": {
206
+ "default": [],
207
+ "description": "One row per velocity gate: id, min-corner rect (x, y, width, height in world units), the speed band [minSpeed, maxSpeed] that opens it, the hold required (dwellMs 0 = instant), the horizontal direction required (dir -1/0/+1), and an optional hint shown when denied. open/touching/denied/held/reported are stamped at runtime.",
208
+ "items": {
209
+ "properties": {
210
+ "denied": {
211
+ "name": "denied",
212
+ "required": false,
213
+ "type": "boolean"
214
+ },
215
+ "dir": {
216
+ "name": "dir",
217
+ "required": true,
218
+ "type": "number"
219
+ },
220
+ "dwellMs": {
221
+ "name": "dwellMs",
222
+ "required": true,
223
+ "type": "number"
224
+ },
225
+ "height": {
226
+ "name": "height",
227
+ "required": true,
228
+ "type": "number"
229
+ },
230
+ "held": {
231
+ "name": "held",
232
+ "required": false,
233
+ "type": "number"
234
+ },
235
+ "hint": {
236
+ "name": "hint",
237
+ "required": false,
238
+ "type": "string"
239
+ },
240
+ "id": {
241
+ "name": "id",
242
+ "required": true,
243
+ "type": "string"
244
+ },
245
+ "maxSpeed": {
246
+ "name": "maxSpeed",
247
+ "required": true,
248
+ "type": "number"
249
+ },
250
+ "minSpeed": {
251
+ "name": "minSpeed",
252
+ "required": true,
253
+ "type": "number"
254
+ },
255
+ "open": {
256
+ "name": "open",
257
+ "required": false,
258
+ "type": "boolean"
259
+ },
260
+ "reported": {
261
+ "name": "reported",
262
+ "required": false,
263
+ "type": "boolean"
264
+ },
265
+ "touching": {
266
+ "name": "touching",
267
+ "required": false,
268
+ "type": "boolean"
269
+ },
270
+ "width": {
271
+ "name": "width",
272
+ "required": true,
273
+ "type": "number"
274
+ },
275
+ "x": {
276
+ "name": "x",
277
+ "required": true,
278
+ "type": "number"
279
+ },
280
+ "y": {
281
+ "name": "y",
282
+ "required": true,
283
+ "type": "number"
284
+ }
285
+ },
286
+ "type": "object"
287
+ },
288
+ "label": "Gates",
289
+ "tier": "domain",
290
+ "type": "[VelocityGate]"
291
+ },
292
+ "reachMargin": {
293
+ "default": 0.6,
294
+ "description": "Extra world units padded around a closed gate's rect when testing player contact (approximates the body's size).",
295
+ "label": "Reach Margin",
296
+ "tier": "domain",
297
+ "type": "number"
298
+ },
299
+ "running": {
300
+ "default": true,
301
+ "description": "When true, BODY_MOVED tests every gate's band and opens/denies; toggle to freeze every gate as-is.",
302
+ "label": "Running",
303
+ "tier": "domain",
304
+ "type": "boolean"
305
+ }
306
+ },
307
+ "emits": [
308
+ {
309
+ "description": "A gate's speed band was satisfied (instantly, or held for its dwell) and it flipped open; boards layer treasure fx and rewards. When several gates open on one move, the first reports and the shared entity carries the rest.",
310
+ "event": "VELOCITY_GATE_OPENED",
311
+ "eventId": "evt_01M11M409RWEC4MAX79RVXR02R",
312
+ "payloadSchema": [
313
+ {
314
+ "name": "id",
315
+ "required": true,
316
+ "type": "string"
317
+ },
318
+ {
319
+ "name": "x",
320
+ "required": true,
321
+ "type": "number"
322
+ },
323
+ {
324
+ "name": "y",
325
+ "required": true,
326
+ "type": "number"
327
+ }
328
+ ],
329
+ "scope": "external",
330
+ "tier": "domain"
331
+ },
332
+ {
333
+ "description": "The player entered a closed gate outside its speed band or against its direction; fires once per approach and re-arms after they step out. Boards answer with a PLACE back plus a hint fx.",
334
+ "event": "VELOCITY_GATE_DENIED",
335
+ "eventId": "evt_01M11M409R76VNT0D3KFN8VR2X",
336
+ "payloadSchema": [
337
+ {
338
+ "name": "id",
339
+ "required": true,
340
+ "type": "string"
341
+ },
342
+ {
343
+ "name": "x",
344
+ "required": true,
345
+ "type": "number"
346
+ },
347
+ {
348
+ "name": "y",
349
+ "required": true,
350
+ "type": "number"
351
+ },
352
+ {
353
+ "name": "speed",
354
+ "required": true,
355
+ "type": "number"
356
+ }
357
+ ],
358
+ "scope": "external",
359
+ "tier": "domain"
360
+ }
361
+ ],
362
+ "entityContract": {
363
+ "provides": [
364
+ "gates"
365
+ ],
366
+ "requires": []
367
+ },
368
+ "entityRebindable": true,
369
+ "entityRefIds": {
370
+ "VelocityGateData": "ent_01M11M409RW0H8NTF5AKJH3NTJ"
371
+ },
372
+ "id": "trt_01M11M409R4QHY3YC5E9VM5GQQ",
373
+ "linkedEntity": "VelocityGateData",
374
+ "linkedEntityId": "ent_01M11M409RW0H8NTF5AKJH3NTJ",
375
+ "name": "VelocityGate",
376
+ "scope": "instance",
377
+ "stateMachine": {
378
+ "events": [
379
+ {
380
+ "id": "evt_01M11M409RW8GXWQS2H7KWNG9V",
381
+ "key": "INIT",
382
+ "name": "Initialize"
383
+ },
384
+ {
385
+ "id": "evt_01M11M409R2FR46WEWVN0JMSNK",
386
+ "key": "BODY_MOVED",
387
+ "name": "Body Moved",
388
+ "payloadSchema": [
389
+ {
390
+ "name": "x",
391
+ "required": true,
392
+ "type": "number"
393
+ },
394
+ {
395
+ "name": "y",
396
+ "required": true,
397
+ "type": "number"
398
+ },
399
+ {
400
+ "name": "vx",
401
+ "required": true,
402
+ "type": "number"
403
+ },
404
+ {
405
+ "name": "vy",
406
+ "required": true,
407
+ "type": "number"
408
+ },
409
+ {
410
+ "name": "grounded",
411
+ "required": true,
412
+ "type": "boolean"
413
+ },
414
+ {
415
+ "name": "skating",
416
+ "required": true,
417
+ "type": "boolean"
418
+ },
419
+ {
420
+ "name": "speed",
421
+ "required": true,
422
+ "type": "number"
423
+ }
424
+ ]
425
+ },
426
+ {
427
+ "id": "evt_01M11M409R7VCMCWJ41R37CCWH",
428
+ "key": "RESTART",
429
+ "name": "Restart",
430
+ "payloadSchema": [
431
+ {
432
+ "name": "id",
433
+ "type": "string"
434
+ }
435
+ ]
436
+ },
437
+ {
438
+ "description": "A gate's speed band was satisfied (instantly, or held for its dwell) and it flipped open; boards layer treasure fx and rewards. When several gates open on one move, the first reports and the shared entity carries the rest.",
439
+ "id": "evt_01M11M409RWEC4MAX79RVXR02R",
440
+ "key": "VELOCITY_GATE_OPENED",
441
+ "name": "Velocity Gate Opened",
442
+ "payloadSchema": [
443
+ {
444
+ "name": "id",
445
+ "required": true,
446
+ "type": "string"
447
+ },
448
+ {
449
+ "name": "x",
450
+ "required": true,
451
+ "type": "number"
452
+ },
453
+ {
454
+ "name": "y",
455
+ "required": true,
456
+ "type": "number"
457
+ }
458
+ ],
459
+ "tier": "domain"
460
+ },
461
+ {
462
+ "description": "The player entered a closed gate outside its speed band or against its direction; fires once per approach and re-arms after they step out. Boards answer with a PLACE back plus a hint fx.",
463
+ "id": "evt_01M11M409R76VNT0D3KFN8VR2X",
464
+ "key": "VELOCITY_GATE_DENIED",
465
+ "name": "Velocity Gate Denied",
466
+ "payloadSchema": [
467
+ {
468
+ "name": "id",
469
+ "required": true,
470
+ "type": "string"
471
+ },
472
+ {
473
+ "name": "x",
474
+ "required": true,
475
+ "type": "number"
476
+ },
477
+ {
478
+ "name": "y",
479
+ "required": true,
480
+ "type": "number"
481
+ },
482
+ {
483
+ "name": "speed",
484
+ "required": true,
485
+ "type": "number"
486
+ }
487
+ ],
488
+ "tier": "domain"
489
+ }
490
+ ],
491
+ "states": [
492
+ {
493
+ "isInitial": true,
494
+ "name": "active"
495
+ }
496
+ ],
497
+ "transitions": [
498
+ {
499
+ "effects": [
500
+ [
501
+ "set",
502
+ "@entity.gates",
503
+ [
504
+ "array/map",
505
+ "@config.gates",
506
+ [
507
+ "fn",
508
+ "g",
509
+ [
510
+ "object/merge",
511
+ "@g",
512
+ {
513
+ "denied": false,
514
+ "held": 0.0,
515
+ "open": false,
516
+ "reported": false,
517
+ "touching": false
518
+ }
519
+ ]
520
+ ]
521
+ ]
522
+ ]
523
+ ],
524
+ "event": "INIT",
525
+ "eventId": "evt_01M11M409RW8GXWQS2H7KWNG9V",
526
+ "from": "active",
527
+ "to": "active"
528
+ },
529
+ {
530
+ "effects": [
531
+ [
532
+ "set",
533
+ "@entity.gates",
534
+ [
535
+ "array/map",
536
+ "@entity.gates",
537
+ [
538
+ "fn",
539
+ "g",
540
+ [
541
+ "let",
542
+ [
543
+ [
544
+ "inside",
545
+ [
546
+ "and",
547
+ [
548
+ "==",
549
+ [
550
+ "object/get",
551
+ "@g",
552
+ "open"
553
+ ],
554
+ false
555
+ ],
556
+ [
557
+ "and",
558
+ [
559
+ ">=",
560
+ "@payload.x",
561
+ [
562
+ "-",
563
+ [
564
+ "object/get",
565
+ "@g",
566
+ "x"
567
+ ],
568
+ "@config.reachMargin"
569
+ ]
570
+ ],
571
+ [
572
+ "and",
573
+ [
574
+ "<=",
575
+ "@payload.x",
576
+ [
577
+ "+",
578
+ [
579
+ "object/get",
580
+ "@g",
581
+ "x"
582
+ ],
583
+ [
584
+ "object/get",
585
+ "@g",
586
+ "width"
587
+ ],
588
+ "@config.reachMargin"
589
+ ]
590
+ ],
591
+ [
592
+ "and",
593
+ [
594
+ ">=",
595
+ "@payload.y",
596
+ [
597
+ "-",
598
+ [
599
+ "object/get",
600
+ "@g",
601
+ "y"
602
+ ],
603
+ "@config.reachMargin"
604
+ ]
605
+ ],
606
+ [
607
+ "<=",
608
+ "@payload.y",
609
+ [
610
+ "+",
611
+ [
612
+ "object/get",
613
+ "@g",
614
+ "y"
615
+ ],
616
+ [
617
+ "object/get",
618
+ "@g",
619
+ "height"
620
+ ],
621
+ "@config.reachMargin"
622
+ ]
623
+ ]
624
+ ]
625
+ ]
626
+ ]
627
+ ]
628
+ ]
629
+ ],
630
+ [
631
+ "let",
632
+ [
633
+ [
634
+ "dirOk",
635
+ [
636
+ "or",
637
+ [
638
+ "==",
639
+ [
640
+ "object/get",
641
+ "@g",
642
+ "dir"
643
+ ],
644
+ 0.0
645
+ ],
646
+ [
647
+ "==",
648
+ [
649
+ "math/sign",
650
+ "@payload.vx"
651
+ ],
652
+ [
653
+ "object/get",
654
+ "@g",
655
+ "dir"
656
+ ]
657
+ ]
658
+ ]
659
+ ]
660
+ ],
661
+ [
662
+ "let",
663
+ [
664
+ [
665
+ "pass",
666
+ [
667
+ "and",
668
+ "@inside",
669
+ [
670
+ "and",
671
+ [
672
+ ">=",
673
+ "@payload.speed",
674
+ [
675
+ "object/get",
676
+ "@g",
677
+ "minSpeed"
678
+ ]
679
+ ],
680
+ [
681
+ "and",
682
+ [
683
+ "<=",
684
+ "@payload.speed",
685
+ [
686
+ "object/get",
687
+ "@g",
688
+ "maxSpeed"
689
+ ]
690
+ ],
691
+ "@dirOk"
692
+ ]
693
+ ]
694
+ ]
695
+ ]
696
+ ],
697
+ [
698
+ "let",
699
+ [
700
+ [
701
+ "held",
702
+ [
703
+ "if",
704
+ "@pass",
705
+ [
706
+ "+",
707
+ [
708
+ "object/get",
709
+ "@g",
710
+ "held"
711
+ ],
712
+ 33.0
713
+ ],
714
+ 0.0
715
+ ]
716
+ ]
717
+ ],
718
+ [
719
+ "let",
720
+ [
721
+ [
722
+ "openNow",
723
+ [
724
+ "or",
725
+ [
726
+ "object/get",
727
+ "@g",
728
+ "open"
729
+ ],
730
+ [
731
+ "if",
732
+ [
733
+ ">",
734
+ [
735
+ "object/get",
736
+ "@g",
737
+ "dwellMs"
738
+ ],
739
+ 0.0
740
+ ],
741
+ [
742
+ ">=",
743
+ "@held",
744
+ [
745
+ "object/get",
746
+ "@g",
747
+ "dwellMs"
748
+ ]
749
+ ],
750
+ "@pass"
751
+ ]
752
+ ]
753
+ ]
754
+ ],
755
+ [
756
+ "object/merge",
757
+ "@g",
758
+ {
759
+ "denied": [
760
+ "and",
761
+ [
762
+ "==",
763
+ [
764
+ "object/get",
765
+ "@g",
766
+ "dwellMs"
767
+ ],
768
+ 0.0
769
+ ],
770
+ [
771
+ "and",
772
+ "@inside",
773
+ [
774
+ "and",
775
+ [
776
+ "==",
777
+ "@pass",
778
+ false
779
+ ],
780
+ [
781
+ "==",
782
+ [
783
+ "object/get",
784
+ "@g",
785
+ "touching"
786
+ ],
787
+ false
788
+ ]
789
+ ]
790
+ ]
791
+ ],
792
+ "held": "@held",
793
+ "open": "@openNow",
794
+ "touching": "@inside"
795
+ }
796
+ ]
797
+ ]
798
+ ]
799
+ ]
800
+ ]
801
+ ]
802
+ ]
803
+ ]
804
+ ],
805
+ [
806
+ "let",
807
+ [
808
+ [
809
+ "newly",
810
+ [
811
+ "array/filter",
812
+ "@entity.gates",
813
+ [
814
+ "fn",
815
+ "g",
816
+ [
817
+ "and",
818
+ [
819
+ "==",
820
+ [
821
+ "object/get",
822
+ "@g",
823
+ "open"
824
+ ],
825
+ true
826
+ ],
827
+ [
828
+ "==",
829
+ [
830
+ "object/get",
831
+ "@g",
832
+ "reported"
833
+ ],
834
+ false
835
+ ]
836
+ ]
837
+ ]
838
+ ]
839
+ ]
840
+ ],
841
+ [
842
+ "if",
843
+ [
844
+ ">",
845
+ [
846
+ "array/len",
847
+ "@newly"
848
+ ],
849
+ 0.0
850
+ ],
851
+ [
852
+ "do",
853
+ [
854
+ "set",
855
+ "@entity.gates",
856
+ [
857
+ "array/map",
858
+ "@entity.gates",
859
+ [
860
+ "fn",
861
+ "g",
862
+ [
863
+ "if",
864
+ [
865
+ "==",
866
+ [
867
+ "object/get",
868
+ "@g",
869
+ "id"
870
+ ],
871
+ [
872
+ "object/get",
873
+ [
874
+ "array/first",
875
+ "@newly"
876
+ ],
877
+ "id"
878
+ ]
879
+ ],
880
+ [
881
+ "object/merge",
882
+ "@g",
883
+ {
884
+ "reported": true
885
+ }
886
+ ],
887
+ "@g"
888
+ ]
889
+ ]
890
+ ]
891
+ ],
892
+ [
893
+ "emit",
894
+ "VELOCITY_GATE_OPENED",
895
+ {
896
+ "id": [
897
+ "object/get",
898
+ [
899
+ "array/first",
900
+ "@newly"
901
+ ],
902
+ "id"
903
+ ],
904
+ "x": [
905
+ "object/get",
906
+ [
907
+ "array/first",
908
+ "@newly"
909
+ ],
910
+ "x"
911
+ ],
912
+ "y": [
913
+ "object/get",
914
+ [
915
+ "array/first",
916
+ "@newly"
917
+ ],
918
+ "y"
919
+ ]
920
+ }
921
+ ]
922
+ ],
923
+ null
924
+ ]
925
+ ],
926
+ [
927
+ "let",
928
+ [
929
+ [
930
+ "denied",
931
+ [
932
+ "array/filter",
933
+ "@entity.gates",
934
+ [
935
+ "fn",
936
+ "g",
937
+ [
938
+ "==",
939
+ [
940
+ "object/get",
941
+ "@g",
942
+ "denied"
943
+ ],
944
+ true
945
+ ]
946
+ ]
947
+ ]
948
+ ]
949
+ ],
950
+ [
951
+ "if",
952
+ [
953
+ ">",
954
+ [
955
+ "array/len",
956
+ "@denied"
957
+ ],
958
+ 0.0
959
+ ],
960
+ [
961
+ "emit",
962
+ "VELOCITY_GATE_DENIED",
963
+ {
964
+ "id": [
965
+ "object/get",
966
+ [
967
+ "array/first",
968
+ "@denied"
969
+ ],
970
+ "id"
971
+ ],
972
+ "speed": "@payload.speed",
973
+ "x": [
974
+ "object/get",
975
+ [
976
+ "array/first",
977
+ "@denied"
978
+ ],
979
+ "x"
980
+ ],
981
+ "y": [
982
+ "object/get",
983
+ [
984
+ "array/first",
985
+ "@denied"
986
+ ],
987
+ "y"
988
+ ]
989
+ }
990
+ ],
991
+ null
992
+ ]
993
+ ]
994
+ ],
995
+ "event": "BODY_MOVED",
996
+ "eventId": "evt_01M11M409R2FR46WEWVN0JMSNK",
997
+ "from": "active",
998
+ "guard": "@config.running",
999
+ "to": "active"
1000
+ },
1001
+ {
1002
+ "effects": [
1003
+ [
1004
+ "set",
1005
+ "@entity.gates",
1006
+ [
1007
+ "array/map",
1008
+ "@config.gates",
1009
+ [
1010
+ "fn",
1011
+ "g",
1012
+ [
1013
+ "object/merge",
1014
+ "@g",
1015
+ {
1016
+ "denied": false,
1017
+ "held": 0.0,
1018
+ "open": false,
1019
+ "reported": false,
1020
+ "touching": false
1021
+ }
1022
+ ]
1023
+ ]
1024
+ ]
1025
+ ]
1026
+ ],
1027
+ "event": "RESTART",
1028
+ "eventId": "evt_01M11M409R7VCMCWJ41R37CCWH",
1029
+ "from": "active",
1030
+ "to": "active"
1031
+ }
1032
+ ]
1033
+ }
1034
+ }
1035
+ ]
1036
+ }
1037
+ ],
1038
+ "schemaVersion": 1,
1039
+ "version": "1.0.0"
1040
+ }