@almadar/std 16.202.0 → 16.204.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 (64) hide show
  1. package/behaviors/lolo/ui/core/atoms/std-modal-editor.lolo +230 -0
  2. package/behaviors/lolo/ui/core/molecules/ui-code-block.lolo +302 -0
  3. package/behaviors/lolo/ui/core/molecules/ui-pagination.lolo +1 -1
  4. package/behaviors/lolo/ui/core/molecules/ui-table-view.lolo +1 -1
  5. package/behaviors/lolo/ui/game/atoms/std-choice-gate.lolo +1 -1
  6. package/behaviors/lolo/ui/game/atoms/std-fx-narrative.lolo +1 -1
  7. package/behaviors/lolo/ui/game/atoms/std-fx-particles.lolo +1 -1
  8. package/behaviors/lolo/ui/game/atoms/std-game-design-sheet.lolo +69 -0
  9. package/behaviors/lolo/ui/game/atoms/std-gate-lock.lolo +1 -1
  10. package/behaviors/lolo/ui/game/atoms/std-lives.lolo +1 -1
  11. package/behaviors/lolo/ui/game/atoms/std-loop-lock.lolo +1 -1
  12. package/behaviors/lolo/ui/game/atoms/std-objective-flow.lolo +1 -1
  13. package/behaviors/lolo/ui/game/atoms/std-pad-lock.lolo +1 -1
  14. package/behaviors/lolo/ui/game/atoms/std-patrol-hazard.lolo +1 -1
  15. package/behaviors/lolo/ui/game/atoms/std-pickup.lolo +1 -1
  16. package/behaviors/lolo/ui/game/atoms/std-platformer-body.lolo +1 -1
  17. package/behaviors/lolo/ui/game/atoms/std-tutorial-overlay.lolo +1 -1
  18. package/behaviors/lolo/ui/game/atoms/std-velocity-gate.lolo +1 -1
  19. package/behaviors/lolo/ui/learning/atoms/ui-algo-graph-canvas.lolo +1 -1
  20. package/behaviors/lolo/ui/learning/atoms/ui-algorithm-canvas.lolo +1 -1
  21. package/behaviors/lolo/ui/learning/atoms/ui-biology-canvas.lolo +1 -1
  22. package/behaviors/lolo/ui/learning/atoms/ui-chemistry-canvas.lolo +1 -1
  23. package/behaviors/lolo/ui/learning/atoms/ui-learning-canvas.lolo +1 -1
  24. package/behaviors/lolo/ui/learning/atoms/ui-math-canvas.lolo +3 -3
  25. package/behaviors/lolo/ui/learning/atoms/ui-physics-canvas.lolo +1 -1
  26. package/behaviors/registry/ui/core/atoms/std-modal-editor.orb +1450 -0
  27. package/behaviors/registry/ui/core/molecules/ui-code-block.orb +687 -1
  28. package/behaviors/registry/ui/core/molecules/ui-pagination.orb +6 -1
  29. package/behaviors/registry/ui/game/atoms/std-choice-gate.orb +82 -2
  30. package/behaviors/registry/ui/game/atoms/std-fx-narrative.orb +1 -1
  31. package/behaviors/registry/ui/game/atoms/std-fx-particles.orb +82 -2
  32. package/behaviors/registry/ui/game/atoms/std-game-design-sheet.orb +527 -0
  33. package/behaviors/registry/ui/game/atoms/std-gate-lock.orb +48 -2
  34. package/behaviors/registry/ui/game/atoms/std-lives.orb +26 -2
  35. package/behaviors/registry/ui/game/atoms/std-loop-lock.orb +56 -2
  36. package/behaviors/registry/ui/game/atoms/std-objective-flow.orb +1 -1
  37. package/behaviors/registry/ui/game/atoms/std-pad-lock.orb +30 -2
  38. package/behaviors/registry/ui/game/atoms/std-patrol-hazard.orb +63 -2
  39. package/behaviors/registry/ui/game/atoms/std-pickup.orb +1 -1
  40. package/behaviors/registry/ui/game/atoms/std-platformer-body.orb +1 -1
  41. package/behaviors/registry/ui/game/atoms/std-tutorial-overlay.orb +24 -2
  42. package/behaviors/registry/ui/game/atoms/std-velocity-gate.orb +75 -2
  43. package/behaviors/registry/ui/learning/atoms/ui-algo-graph-canvas.orb +1 -0
  44. package/behaviors/registry/ui/learning/atoms/ui-algorithm-canvas.orb +1 -0
  45. package/behaviors/registry/ui/learning/atoms/ui-biology-canvas.orb +1 -0
  46. package/behaviors/registry/ui/learning/atoms/ui-chemistry-canvas.orb +1 -0
  47. package/behaviors/registry/ui/learning/atoms/ui-learning-canvas.orb +1 -0
  48. package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +3 -0
  49. package/behaviors/registry/ui/learning/atoms/ui-physics-canvas.orb +1 -0
  50. package/dist/behaviors/exports-reader.js +2589 -2501
  51. package/dist/behaviors/functions/index.d.ts +244 -16
  52. package/dist/behaviors/functions/index.js +2584 -2502
  53. package/dist/behaviors/index.d.ts +1 -1
  54. package/dist/behaviors/index.js +2590 -2502
  55. package/dist/behaviors/query.js +2589 -2501
  56. package/dist/behaviors-embeddings.hash.json +3 -3
  57. package/dist/behaviors-embeddings.json +35 -27
  58. package/dist/behaviors-registry.json +1729 -212
  59. package/dist/index.d.ts +1 -1
  60. package/dist/index.js +2590 -2502
  61. package/dist/knob-embeddings.hash.json +3 -3
  62. package/dist/knob-embeddings.json +1 -1
  63. package/dist/registry/factory-signatures.json +1 -1
  64. package/package.json +2 -2
@@ -0,0 +1,1450 @@
1
+ {
2
+ "description": "UI substrate: modal keyboard editing over any editable CodeBlock. The topology is fixed (NORMAL / INSERT / VISUAL / OPERATOR_PENDING / COMMAND) and every binding is config: mode-entry keys, motions, operators, ex-commands, the digit table that accumulates a repeat count, and the per-mode captured-key table the host's keyboard router reads. Vim ships as the default flavor; a Kakoune/Helix binding is the same topology with different config, never a fork. Emits are the mechanical vocabulary an editable CodeBlock listens to (SET_MODE / MOTION / OPERATE / INSERT_TEXT) plus one neutral EX_COMMAND for a buffered ':' line — std names no host command; a realization maps EX_COMMAND.name onto its own host vocabulary.",
3
+ "ledger": {
4
+ "entries": {
5
+ "ent_01M1N9RFGVPGR86MHTEQC9T0HK": {
6
+ "bakedName": "EditorMode",
7
+ "curName": "EditorMode",
8
+ "id": "ent_01M1N9RFGVPGR86MHTEQC9T0HK",
9
+ "kind": "entity",
10
+ "owner": "workspace",
11
+ "renames": []
12
+ },
13
+ "evt_01M1N9RFGV1D58J57GNQA2X8Z9": {
14
+ "bakedName": "MOTION",
15
+ "curName": "MOTION",
16
+ "id": "evt_01M1N9RFGV1D58J57GNQA2X8Z9",
17
+ "kind": "event",
18
+ "owner": "workspace",
19
+ "parent": "trt_01M1N9RFGV6G937WGGW6HPTVC3",
20
+ "renames": []
21
+ },
22
+ "evt_01M1N9RFGVK31M3ZE4N9FBHBWM": {
23
+ "bakedName": "KEY",
24
+ "curName": "KEY",
25
+ "id": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
26
+ "kind": "event",
27
+ "owner": "workspace",
28
+ "parent": "trt_01M1N9RFGV6G937WGGW6HPTVC3",
29
+ "renames": []
30
+ },
31
+ "evt_01M1N9RFGVR67GHR554ZYYYN7F": {
32
+ "bakedName": "INSERT_TEXT",
33
+ "curName": "INSERT_TEXT",
34
+ "id": "evt_01M1N9RFGVR67GHR554ZYYYN7F",
35
+ "kind": "event",
36
+ "owner": "workspace",
37
+ "parent": "trt_01M1N9RFGV6G937WGGW6HPTVC3",
38
+ "renames": []
39
+ },
40
+ "evt_01M1N9RFGVV28SH1SVXFJ7X9XY": {
41
+ "bakedName": "OPERATE",
42
+ "curName": "OPERATE",
43
+ "id": "evt_01M1N9RFGVV28SH1SVXFJ7X9XY",
44
+ "kind": "event",
45
+ "owner": "workspace",
46
+ "parent": "trt_01M1N9RFGV6G937WGGW6HPTVC3",
47
+ "renames": []
48
+ },
49
+ "evt_01M1N9RFGVVTJX76Y9V7M6TWFT": {
50
+ "bakedName": "EX_COMMAND",
51
+ "curName": "EX_COMMAND",
52
+ "id": "evt_01M1N9RFGVVTJX76Y9V7M6TWFT",
53
+ "kind": "event",
54
+ "owner": "workspace",
55
+ "parent": "trt_01M1N9RFGV6G937WGGW6HPTVC3",
56
+ "renames": []
57
+ },
58
+ "evt_01M1N9RFGVZNP12BFQMJPA2SWD": {
59
+ "bakedName": "SET_MODE",
60
+ "curName": "SET_MODE",
61
+ "id": "evt_01M1N9RFGVZNP12BFQMJPA2SWD",
62
+ "kind": "event",
63
+ "owner": "workspace",
64
+ "parent": "trt_01M1N9RFGV6G937WGGW6HPTVC3",
65
+ "renames": []
66
+ },
67
+ "evt_01M1N9S6G5JM3N66C9QE54J32Y": {
68
+ "bakedName": "INIT",
69
+ "curName": "INIT",
70
+ "id": "evt_01M1N9S6G5JM3N66C9QE54J32Y",
71
+ "kind": "event",
72
+ "owner": "workspace",
73
+ "parent": "trt_01M1N9RFGV6G937WGGW6HPTVC3",
74
+ "renames": []
75
+ },
76
+ "orb_01M1N9RFGVXRX7KY7J5VAKVWB8": {
77
+ "bakedName": "ModalEditorOrbital",
78
+ "curName": "ModalEditorOrbital",
79
+ "id": "orb_01M1N9RFGVXRX7KY7J5VAKVWB8",
80
+ "kind": "orbital",
81
+ "owner": "workspace",
82
+ "renames": []
83
+ },
84
+ "pag_01M1N9TS0RBGZ6G17KSXBQVKAM": {
85
+ "bakedName": "ModalEditorPage",
86
+ "curName": "ModalEditorPage",
87
+ "id": "pag_01M1N9TS0RBGZ6G17KSXBQVKAM",
88
+ "kind": "page",
89
+ "owner": "workspace",
90
+ "renames": []
91
+ },
92
+ "trt_01M1N9RFGV6G937WGGW6HPTVC3": {
93
+ "bakedName": "Modes",
94
+ "curName": "Modes",
95
+ "id": "trt_01M1N9RFGV6G937WGGW6HPTVC3",
96
+ "kind": "trait",
97
+ "owner": "workspace",
98
+ "renames": []
99
+ }
100
+ },
101
+ "schemaVersion": 1
102
+ },
103
+ "name": "std-modal-editor",
104
+ "orbitals": [
105
+ {
106
+ "entity": {
107
+ "fields": [
108
+ {
109
+ "name": "id",
110
+ "required": true,
111
+ "type": "string"
112
+ },
113
+ {
114
+ "default": "",
115
+ "name": "editorId",
116
+ "type": "string"
117
+ },
118
+ {
119
+ "default": 0.0,
120
+ "name": "count",
121
+ "type": "number"
122
+ },
123
+ {
124
+ "default": "",
125
+ "name": "operator",
126
+ "type": "string"
127
+ },
128
+ {
129
+ "default": "",
130
+ "name": "operatorKey",
131
+ "type": "string"
132
+ },
133
+ {
134
+ "default": "",
135
+ "name": "cmdline",
136
+ "type": "string"
137
+ }
138
+ ],
139
+ "id": "ent_01M1N9RFGVPGR86MHTEQC9T0HK",
140
+ "name": "EditorMode",
141
+ "persistence": "runtime"
142
+ },
143
+ "id": "orb_01M1N9RFGVXRX7KY7J5VAKVWB8",
144
+ "name": "ModalEditorOrbital",
145
+ "pages": [
146
+ {
147
+ "id": "pag_01M1N9TS0RBGZ6G17KSXBQVKAM",
148
+ "name": "ModalEditorPage",
149
+ "path": "/modal-editor",
150
+ "traits": [
151
+ {
152
+ "ref": "Modes",
153
+ "refId": "trt_01M1N9RFGV6G937WGGW6HPTVC3"
154
+ }
155
+ ]
156
+ }
157
+ ],
158
+ "traits": [
159
+ {
160
+ "category": "lifecycle",
161
+ "config": {
162
+ "appendKey": {
163
+ "default": "a",
164
+ "description": "Key that nudges the caret one column right, then switches to INSERT.",
165
+ "label": "Enter INSERT after the caret",
166
+ "synonyms": "append, append mode",
167
+ "tier": "presentation",
168
+ "type": "string"
169
+ },
170
+ "commandKey": {
171
+ "default": ":",
172
+ "description": "Key that switches NORMAL to COMMAND and starts buffering an ex-command line.",
173
+ "label": "Enter COMMAND",
174
+ "synonyms": "ex mode, command line, colon",
175
+ "tier": "presentation",
176
+ "type": "string"
177
+ },
178
+ "digits": {
179
+ "default": {
180
+ "0": 0.0,
181
+ "1": 1.0,
182
+ "2": 2.0,
183
+ "3": 3.0,
184
+ "4": 4.0,
185
+ "5": 5.0,
186
+ "6": 6.0,
187
+ "7": 7.0,
188
+ "8": 8.0,
189
+ "9": 9.0
190
+ },
191
+ "description": "Digit keys accumulated into a repeat count before a motion or operator fires; each digit's integer value is a lookup because the language has no string-to-int operator.",
192
+ "items": {
193
+ "type": "number"
194
+ },
195
+ "label": "Count digits",
196
+ "tier": "internal",
197
+ "type": "Map<string,number>"
198
+ },
199
+ "exCommands": {
200
+ "default": {
201
+ "q": "close-tab",
202
+ "w": "save",
203
+ "wq": "save-close-tab"
204
+ },
205
+ "description": "Buffered COMMAND-mode lines (typed after ':') mapped to a neutral command name carried on EX_COMMAND.",
206
+ "items": {
207
+ "type": "string"
208
+ },
209
+ "label": "Ex-commands",
210
+ "synonyms": "ex commands, colon commands",
211
+ "tier": "domain",
212
+ "type": "Map<string,string>"
213
+ },
214
+ "insertKey": {
215
+ "default": "i",
216
+ "description": "Key that switches NORMAL to INSERT with the caret unchanged.",
217
+ "label": "Enter INSERT before the caret",
218
+ "synonyms": "insert mode, insert key",
219
+ "tier": "presentation",
220
+ "type": "string"
221
+ },
222
+ "keymap": {
223
+ "default": {
224
+ "COMMAND": [
225
+ "Escape",
226
+ "Enter",
227
+ "Backspace",
228
+ "w",
229
+ "q"
230
+ ],
231
+ "INSERT": [
232
+ "Escape"
233
+ ],
234
+ "NORMAL": [
235
+ "i",
236
+ "a",
237
+ "o",
238
+ "v",
239
+ ":",
240
+ "d",
241
+ "y",
242
+ "c",
243
+ "h",
244
+ "j",
245
+ "k",
246
+ "l",
247
+ "w",
248
+ "b",
249
+ "e",
250
+ "0",
251
+ "1",
252
+ "2",
253
+ "3",
254
+ "4",
255
+ "5",
256
+ "6",
257
+ "7",
258
+ "8",
259
+ "9",
260
+ "$",
261
+ "^",
262
+ "G",
263
+ "{",
264
+ "}",
265
+ "Escape"
266
+ ],
267
+ "OPERATOR_PENDING": [
268
+ "Escape",
269
+ "d",
270
+ "y",
271
+ "c",
272
+ "h",
273
+ "j",
274
+ "k",
275
+ "l",
276
+ "w",
277
+ "b",
278
+ "e",
279
+ "0",
280
+ "$",
281
+ "^",
282
+ "G",
283
+ "{",
284
+ "}"
285
+ ],
286
+ "VISUAL": [
287
+ "Escape",
288
+ "d",
289
+ "y",
290
+ "c",
291
+ "h",
292
+ "j",
293
+ "k",
294
+ "l",
295
+ "w",
296
+ "b",
297
+ "e",
298
+ "0",
299
+ "$",
300
+ "^",
301
+ "G",
302
+ "{",
303
+ "}"
304
+ ]
305
+ },
306
+ "description": "The declared key set the host's keyboard router reads synchronously to decide preventDefault, keyed by this trait's current state name. A key not listed reaches the underlying textarea untouched. Keep in sync with the other knobs.",
307
+ "items": {
308
+ "items": {
309
+ "type": "string"
310
+ },
311
+ "type": "array"
312
+ },
313
+ "label": "Captured keys per mode",
314
+ "tier": "internal",
315
+ "type": "Map<string,[string]>"
316
+ },
317
+ "motions": {
318
+ "default": {
319
+ "$": "line-end",
320
+ "0": "line-start",
321
+ "G": "doc-end",
322
+ "^": "first-nonblank",
323
+ "b": "word-back",
324
+ "e": "word-end",
325
+ "h": "left",
326
+ "j": "down",
327
+ "k": "up",
328
+ "l": "right",
329
+ "w": "word-forward",
330
+ "{": "paragraph-back",
331
+ "}": "paragraph-forward"
332
+ },
333
+ "description": "Keys recognized in NORMAL, VISUAL and OPERATOR_PENDING, mapped to the closed motion vocabulary the editor surface understands.",
334
+ "items": {
335
+ "type": "string"
336
+ },
337
+ "label": "Motion keys",
338
+ "synonyms": "motions, movement, hjkl, word motion",
339
+ "tier": "domain",
340
+ "type": "Map<string,string>"
341
+ },
342
+ "openLineKey": {
343
+ "default": "o",
344
+ "description": "Key that moves to line end, inserts a newline, then switches to INSERT.",
345
+ "label": "Open a line below and insert",
346
+ "synonyms": "open line, new line below",
347
+ "tier": "presentation",
348
+ "type": "string"
349
+ },
350
+ "operators": {
351
+ "default": {
352
+ "c": "change",
353
+ "d": "delete",
354
+ "y": "yank"
355
+ },
356
+ "description": "Keys that arm OPERATOR_PENDING, mapped to the operator name carried on OPERATE. Pressing the same key again operates on the whole line.",
357
+ "items": {
358
+ "type": "string"
359
+ },
360
+ "label": "Operator keys",
361
+ "synonyms": "operators, delete, yank, change",
362
+ "tier": "domain",
363
+ "type": "Map<string,string>"
364
+ },
365
+ "visualKey": {
366
+ "default": "v",
367
+ "description": "Key that switches NORMAL to VISUAL; motions then extend the selection and an operator acts on it.",
368
+ "label": "Enter VISUAL",
369
+ "synonyms": "visual mode, select mode",
370
+ "tier": "presentation",
371
+ "type": "string"
372
+ }
373
+ },
374
+ "emits": [
375
+ {
376
+ "description": "Mode + caret instruction for the editor surface (bar | block). Also the fact a realization reads to drive a mode indicator.",
377
+ "event": "SET_MODE",
378
+ "eventId": "evt_01M1N9RFGVZNP12BFQMJPA2SWD",
379
+ "payloadSchema": [
380
+ {
381
+ "name": "editorId",
382
+ "type": "string"
383
+ },
384
+ {
385
+ "name": "mode",
386
+ "type": "string"
387
+ },
388
+ {
389
+ "name": "caret",
390
+ "type": "string"
391
+ }
392
+ ],
393
+ "scope": "external",
394
+ "tier": "primary"
395
+ },
396
+ {
397
+ "description": "Move the caret (or extend the selection in VISUAL) by a closed motion name, `count` times.",
398
+ "event": "MOTION",
399
+ "eventId": "evt_01M1N9RFGV1D58J57GNQA2X8Z9",
400
+ "payloadSchema": [
401
+ {
402
+ "name": "editorId",
403
+ "type": "string"
404
+ },
405
+ {
406
+ "name": "motion",
407
+ "type": "string"
408
+ },
409
+ {
410
+ "name": "count",
411
+ "type": "number"
412
+ }
413
+ ],
414
+ "scope": "external",
415
+ "tier": "primary"
416
+ },
417
+ {
418
+ "description": "Apply a config-declared operator (delete | yank | change) over the range a motion describes; `line` for doubled operators, `selection` in VISUAL.",
419
+ "event": "OPERATE",
420
+ "eventId": "evt_01M1N9RFGVV28SH1SVXFJ7X9XY",
421
+ "payloadSchema": [
422
+ {
423
+ "name": "editorId",
424
+ "type": "string"
425
+ },
426
+ {
427
+ "name": "operator",
428
+ "type": "string"
429
+ },
430
+ {
431
+ "name": "motion",
432
+ "type": "string"
433
+ },
434
+ {
435
+ "name": "count",
436
+ "type": "number"
437
+ }
438
+ ],
439
+ "scope": "external",
440
+ "tier": "primary"
441
+ },
442
+ {
443
+ "description": "Insert literal text at the caret (e.g. the newline `o` opens before entering INSERT).",
444
+ "event": "INSERT_TEXT",
445
+ "eventId": "evt_01M1N9RFGVR67GHR554ZYYYN7F",
446
+ "payloadSchema": [
447
+ {
448
+ "name": "editorId",
449
+ "type": "string"
450
+ },
451
+ {
452
+ "name": "text",
453
+ "type": "string"
454
+ }
455
+ ],
456
+ "scope": "external",
457
+ "tier": "secondary"
458
+ },
459
+ {
460
+ "description": "A buffered ':' line resolved through config.exCommands. `name` is a neutral config-declared string; a realization maps it onto its host's command vocabulary.",
461
+ "event": "EX_COMMAND",
462
+ "eventId": "evt_01M1N9RFGVVTJX76Y9V7M6TWFT",
463
+ "payloadSchema": [
464
+ {
465
+ "name": "editorId",
466
+ "type": "string"
467
+ },
468
+ {
469
+ "name": "name",
470
+ "type": "string"
471
+ }
472
+ ],
473
+ "scope": "external",
474
+ "tier": "secondary"
475
+ }
476
+ ],
477
+ "entityContract": {
478
+ "provides": [
479
+ "cmdline",
480
+ "count",
481
+ "editorId",
482
+ "operator",
483
+ "operatorKey"
484
+ ],
485
+ "requires": []
486
+ },
487
+ "entityRebindable": true,
488
+ "entityRefIds": {
489
+ "EditorMode": "ent_01M1N9RFGVPGR86MHTEQC9T0HK"
490
+ },
491
+ "id": "trt_01M1N9RFGV6G937WGGW6HPTVC3",
492
+ "linkedEntity": "EditorMode",
493
+ "linkedEntityId": "ent_01M1N9RFGVPGR86MHTEQC9T0HK",
494
+ "name": "Modes",
495
+ "scope": "instance",
496
+ "stateMachine": {
497
+ "events": [
498
+ {
499
+ "id": "evt_01M1N9S6G5JM3N66C9QE54J32Y",
500
+ "key": "INIT",
501
+ "name": "Initialize"
502
+ },
503
+ {
504
+ "description": "One physical keydown, delivered by the host's keyboard router. The host decides preventDefault from config.keymap; this trait only reads key + editorId.",
505
+ "id": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
506
+ "key": "KEY",
507
+ "name": "Key",
508
+ "payloadSchema": [
509
+ {
510
+ "name": "editorId",
511
+ "type": "string"
512
+ },
513
+ {
514
+ "name": "key",
515
+ "type": "string"
516
+ },
517
+ {
518
+ "name": "code",
519
+ "type": "string"
520
+ },
521
+ {
522
+ "name": "ctrl",
523
+ "type": "boolean"
524
+ },
525
+ {
526
+ "name": "alt",
527
+ "type": "boolean"
528
+ },
529
+ {
530
+ "name": "shift",
531
+ "type": "boolean"
532
+ },
533
+ {
534
+ "name": "meta",
535
+ "type": "boolean"
536
+ },
537
+ {
538
+ "name": "repeat",
539
+ "type": "boolean"
540
+ }
541
+ ]
542
+ },
543
+ {
544
+ "description": "Mode + caret instruction for the editor surface (bar | block). Also the fact a realization reads to drive a mode indicator.",
545
+ "id": "evt_01M1N9RFGVZNP12BFQMJPA2SWD",
546
+ "key": "SET_MODE",
547
+ "name": "Set Mode",
548
+ "payloadSchema": [
549
+ {
550
+ "name": "editorId",
551
+ "type": "string"
552
+ },
553
+ {
554
+ "name": "mode",
555
+ "type": "string"
556
+ },
557
+ {
558
+ "name": "caret",
559
+ "type": "string"
560
+ }
561
+ ],
562
+ "tier": "primary"
563
+ },
564
+ {
565
+ "description": "Move the caret (or extend the selection in VISUAL) by a closed motion name, `count` times.",
566
+ "id": "evt_01M1N9RFGV1D58J57GNQA2X8Z9",
567
+ "key": "MOTION",
568
+ "name": "Motion",
569
+ "payloadSchema": [
570
+ {
571
+ "name": "editorId",
572
+ "type": "string"
573
+ },
574
+ {
575
+ "name": "motion",
576
+ "type": "string"
577
+ },
578
+ {
579
+ "name": "count",
580
+ "type": "number"
581
+ }
582
+ ],
583
+ "tier": "primary"
584
+ },
585
+ {
586
+ "description": "Apply a config-declared operator (delete | yank | change) over the range a motion describes; `line` for doubled operators, `selection` in VISUAL.",
587
+ "id": "evt_01M1N9RFGVV28SH1SVXFJ7X9XY",
588
+ "key": "OPERATE",
589
+ "name": "Operate",
590
+ "payloadSchema": [
591
+ {
592
+ "name": "editorId",
593
+ "type": "string"
594
+ },
595
+ {
596
+ "name": "operator",
597
+ "type": "string"
598
+ },
599
+ {
600
+ "name": "motion",
601
+ "type": "string"
602
+ },
603
+ {
604
+ "name": "count",
605
+ "type": "number"
606
+ }
607
+ ],
608
+ "tier": "primary"
609
+ },
610
+ {
611
+ "description": "Insert literal text at the caret (e.g. the newline `o` opens before entering INSERT).",
612
+ "id": "evt_01M1N9RFGVR67GHR554ZYYYN7F",
613
+ "key": "INSERT_TEXT",
614
+ "name": "Insert Text",
615
+ "payloadSchema": [
616
+ {
617
+ "name": "editorId",
618
+ "type": "string"
619
+ },
620
+ {
621
+ "name": "text",
622
+ "type": "string"
623
+ }
624
+ ],
625
+ "tier": "secondary"
626
+ },
627
+ {
628
+ "description": "A buffered ':' line resolved through config.exCommands. `name` is a neutral config-declared string; a realization maps it onto its host's command vocabulary.",
629
+ "id": "evt_01M1N9RFGVVTJX76Y9V7M6TWFT",
630
+ "key": "EX_COMMAND",
631
+ "name": "Ex Command",
632
+ "payloadSchema": [
633
+ {
634
+ "name": "editorId",
635
+ "type": "string"
636
+ },
637
+ {
638
+ "name": "name",
639
+ "type": "string"
640
+ }
641
+ ],
642
+ "tier": "secondary"
643
+ }
644
+ ],
645
+ "states": [
646
+ {
647
+ "isInitial": true,
648
+ "name": "NORMAL"
649
+ },
650
+ {
651
+ "name": "INSERT"
652
+ },
653
+ {
654
+ "name": "VISUAL"
655
+ },
656
+ {
657
+ "name": "OPERATOR_PENDING"
658
+ },
659
+ {
660
+ "name": "COMMAND"
661
+ }
662
+ ],
663
+ "transitions": [
664
+ {
665
+ "effects": [
666
+ [
667
+ "set",
668
+ "@entity.count",
669
+ 0.0
670
+ ]
671
+ ],
672
+ "event": "INIT",
673
+ "eventId": "evt_01M1N9S6G5JM3N66C9QE54J32Y",
674
+ "from": "NORMAL",
675
+ "to": "NORMAL"
676
+ },
677
+ {
678
+ "effects": [
679
+ [
680
+ "set",
681
+ "@entity.editorId",
682
+ "@payload.editorId"
683
+ ],
684
+ [
685
+ "set",
686
+ "@entity.count",
687
+ 0.0
688
+ ],
689
+ [
690
+ "emit",
691
+ "SET_MODE",
692
+ {
693
+ "caret": "bar",
694
+ "editorId": "@payload.editorId",
695
+ "mode": "INSERT"
696
+ }
697
+ ]
698
+ ],
699
+ "event": "KEY",
700
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
701
+ "from": "NORMAL",
702
+ "guard": [
703
+ "=",
704
+ "@payload.key",
705
+ "@config.insertKey"
706
+ ],
707
+ "to": "INSERT"
708
+ },
709
+ {
710
+ "effects": [
711
+ [
712
+ "set",
713
+ "@entity.editorId",
714
+ "@payload.editorId"
715
+ ],
716
+ [
717
+ "set",
718
+ "@entity.count",
719
+ 0.0
720
+ ],
721
+ [
722
+ "emit",
723
+ "MOTION",
724
+ {
725
+ "count": 1.0,
726
+ "editorId": "@payload.editorId",
727
+ "motion": "right"
728
+ }
729
+ ],
730
+ [
731
+ "emit",
732
+ "SET_MODE",
733
+ {
734
+ "caret": "bar",
735
+ "editorId": "@payload.editorId",
736
+ "mode": "INSERT"
737
+ }
738
+ ]
739
+ ],
740
+ "event": "KEY",
741
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
742
+ "from": "NORMAL",
743
+ "guard": [
744
+ "=",
745
+ "@payload.key",
746
+ "@config.appendKey"
747
+ ],
748
+ "to": "INSERT"
749
+ },
750
+ {
751
+ "effects": [
752
+ [
753
+ "set",
754
+ "@entity.editorId",
755
+ "@payload.editorId"
756
+ ],
757
+ [
758
+ "set",
759
+ "@entity.count",
760
+ 0.0
761
+ ],
762
+ [
763
+ "emit",
764
+ "MOTION",
765
+ {
766
+ "count": 1.0,
767
+ "editorId": "@payload.editorId",
768
+ "motion": "line-end"
769
+ }
770
+ ],
771
+ [
772
+ "emit",
773
+ "INSERT_TEXT",
774
+ {
775
+ "editorId": "@payload.editorId",
776
+ "text": "\n"
777
+ }
778
+ ],
779
+ [
780
+ "emit",
781
+ "SET_MODE",
782
+ {
783
+ "caret": "bar",
784
+ "editorId": "@payload.editorId",
785
+ "mode": "INSERT"
786
+ }
787
+ ]
788
+ ],
789
+ "event": "KEY",
790
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
791
+ "from": "NORMAL",
792
+ "guard": [
793
+ "=",
794
+ "@payload.key",
795
+ "@config.openLineKey"
796
+ ],
797
+ "to": "INSERT"
798
+ },
799
+ {
800
+ "effects": [
801
+ [
802
+ "set",
803
+ "@entity.editorId",
804
+ "@payload.editorId"
805
+ ],
806
+ [
807
+ "emit",
808
+ "SET_MODE",
809
+ {
810
+ "caret": "block",
811
+ "editorId": "@payload.editorId",
812
+ "mode": "VISUAL"
813
+ }
814
+ ]
815
+ ],
816
+ "event": "KEY",
817
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
818
+ "from": "NORMAL",
819
+ "guard": [
820
+ "=",
821
+ "@payload.key",
822
+ "@config.visualKey"
823
+ ],
824
+ "to": "VISUAL"
825
+ },
826
+ {
827
+ "effects": [
828
+ [
829
+ "set",
830
+ "@entity.editorId",
831
+ "@payload.editorId"
832
+ ],
833
+ [
834
+ "set",
835
+ "@entity.cmdline",
836
+ ""
837
+ ],
838
+ [
839
+ "emit",
840
+ "SET_MODE",
841
+ {
842
+ "caret": "block",
843
+ "editorId": "@payload.editorId",
844
+ "mode": "COMMAND"
845
+ }
846
+ ]
847
+ ],
848
+ "event": "KEY",
849
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
850
+ "from": "NORMAL",
851
+ "guard": [
852
+ "=",
853
+ "@payload.key",
854
+ "@config.commandKey"
855
+ ],
856
+ "to": "COMMAND"
857
+ },
858
+ {
859
+ "effects": [
860
+ [
861
+ "set",
862
+ "@entity.editorId",
863
+ "@payload.editorId"
864
+ ],
865
+ [
866
+ "set",
867
+ "@entity.operator",
868
+ [
869
+ "object/get",
870
+ "@config.operators",
871
+ "@payload.key"
872
+ ]
873
+ ],
874
+ [
875
+ "set",
876
+ "@entity.operatorKey",
877
+ "@payload.key"
878
+ ]
879
+ ],
880
+ "event": "KEY",
881
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
882
+ "from": "NORMAL",
883
+ "guard": [
884
+ "object/has",
885
+ "@config.operators",
886
+ "@payload.key"
887
+ ],
888
+ "to": "OPERATOR_PENDING"
889
+ },
890
+ {
891
+ "effects": [
892
+ [
893
+ "set",
894
+ "@entity.count",
895
+ [
896
+ "+",
897
+ [
898
+ "*",
899
+ "@entity.count",
900
+ 10.0
901
+ ],
902
+ [
903
+ "object/get",
904
+ "@config.digits",
905
+ "@payload.key"
906
+ ]
907
+ ]
908
+ ]
909
+ ],
910
+ "event": "KEY",
911
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
912
+ "from": "NORMAL",
913
+ "guard": [
914
+ "and",
915
+ [
916
+ "object/has",
917
+ "@config.digits",
918
+ "@payload.key"
919
+ ],
920
+ [
921
+ "or",
922
+ [
923
+ "!=",
924
+ "@payload.key",
925
+ "0"
926
+ ],
927
+ [
928
+ ">",
929
+ "@entity.count",
930
+ 0.0
931
+ ]
932
+ ]
933
+ ],
934
+ "to": "NORMAL"
935
+ },
936
+ {
937
+ "effects": [
938
+ [
939
+ "set",
940
+ "@entity.editorId",
941
+ "@payload.editorId"
942
+ ],
943
+ [
944
+ "emit",
945
+ "MOTION",
946
+ {
947
+ "count": [
948
+ "if",
949
+ [
950
+ ">",
951
+ "@entity.count",
952
+ 0.0
953
+ ],
954
+ "@entity.count",
955
+ 1.0
956
+ ],
957
+ "editorId": "@payload.editorId",
958
+ "motion": [
959
+ "object/get",
960
+ "@config.motions",
961
+ "@payload.key"
962
+ ]
963
+ }
964
+ ],
965
+ [
966
+ "set",
967
+ "@entity.count",
968
+ 0.0
969
+ ]
970
+ ],
971
+ "event": "KEY",
972
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
973
+ "from": "NORMAL",
974
+ "guard": [
975
+ "object/has",
976
+ "@config.motions",
977
+ "@payload.key"
978
+ ],
979
+ "to": "NORMAL"
980
+ },
981
+ {
982
+ "effects": [
983
+ [
984
+ "set",
985
+ "@entity.count",
986
+ 0.0
987
+ ],
988
+ [
989
+ "set",
990
+ "@entity.operator",
991
+ ""
992
+ ],
993
+ [
994
+ "set",
995
+ "@entity.operatorKey",
996
+ ""
997
+ ]
998
+ ],
999
+ "event": "KEY",
1000
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
1001
+ "from": "NORMAL",
1002
+ "guard": [
1003
+ "=",
1004
+ "@payload.key",
1005
+ "Escape"
1006
+ ],
1007
+ "to": "NORMAL"
1008
+ },
1009
+ {
1010
+ "effects": [
1011
+ [
1012
+ "emit",
1013
+ "SET_MODE",
1014
+ {
1015
+ "caret": "block",
1016
+ "editorId": "@payload.editorId",
1017
+ "mode": "NORMAL"
1018
+ }
1019
+ ]
1020
+ ],
1021
+ "event": "KEY",
1022
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
1023
+ "from": "INSERT",
1024
+ "guard": [
1025
+ "=",
1026
+ "@payload.key",
1027
+ "Escape"
1028
+ ],
1029
+ "to": "NORMAL"
1030
+ },
1031
+ {
1032
+ "effects": [
1033
+ [
1034
+ "set",
1035
+ "@entity.count",
1036
+ 0.0
1037
+ ],
1038
+ [
1039
+ "emit",
1040
+ "SET_MODE",
1041
+ {
1042
+ "caret": "block",
1043
+ "editorId": "@payload.editorId",
1044
+ "mode": "NORMAL"
1045
+ }
1046
+ ]
1047
+ ],
1048
+ "event": "KEY",
1049
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
1050
+ "from": "VISUAL",
1051
+ "guard": [
1052
+ "=",
1053
+ "@payload.key",
1054
+ "Escape"
1055
+ ],
1056
+ "to": "NORMAL"
1057
+ },
1058
+ {
1059
+ "effects": [
1060
+ [
1061
+ "set",
1062
+ "@entity.count",
1063
+ 0.0
1064
+ ],
1065
+ [
1066
+ "emit",
1067
+ "OPERATE",
1068
+ {
1069
+ "count": 1.0,
1070
+ "editorId": "@payload.editorId",
1071
+ "motion": "selection",
1072
+ "operator": [
1073
+ "object/get",
1074
+ "@config.operators",
1075
+ "@payload.key"
1076
+ ]
1077
+ }
1078
+ ],
1079
+ [
1080
+ "emit",
1081
+ "SET_MODE",
1082
+ {
1083
+ "caret": "block",
1084
+ "editorId": "@payload.editorId",
1085
+ "mode": "NORMAL"
1086
+ }
1087
+ ]
1088
+ ],
1089
+ "event": "KEY",
1090
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
1091
+ "from": "VISUAL",
1092
+ "guard": [
1093
+ "object/has",
1094
+ "@config.operators",
1095
+ "@payload.key"
1096
+ ],
1097
+ "to": "NORMAL"
1098
+ },
1099
+ {
1100
+ "effects": [
1101
+ [
1102
+ "emit",
1103
+ "MOTION",
1104
+ {
1105
+ "count": [
1106
+ "if",
1107
+ [
1108
+ ">",
1109
+ "@entity.count",
1110
+ 0.0
1111
+ ],
1112
+ "@entity.count",
1113
+ 1.0
1114
+ ],
1115
+ "editorId": "@payload.editorId",
1116
+ "motion": [
1117
+ "object/get",
1118
+ "@config.motions",
1119
+ "@payload.key"
1120
+ ]
1121
+ }
1122
+ ],
1123
+ [
1124
+ "set",
1125
+ "@entity.count",
1126
+ 0.0
1127
+ ]
1128
+ ],
1129
+ "event": "KEY",
1130
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
1131
+ "from": "VISUAL",
1132
+ "guard": [
1133
+ "object/has",
1134
+ "@config.motions",
1135
+ "@payload.key"
1136
+ ],
1137
+ "to": "VISUAL"
1138
+ },
1139
+ {
1140
+ "effects": [
1141
+ [
1142
+ "emit",
1143
+ "OPERATE",
1144
+ {
1145
+ "count": [
1146
+ "if",
1147
+ [
1148
+ ">",
1149
+ "@entity.count",
1150
+ 0.0
1151
+ ],
1152
+ "@entity.count",
1153
+ 1.0
1154
+ ],
1155
+ "editorId": "@payload.editorId",
1156
+ "motion": "line",
1157
+ "operator": "@entity.operator"
1158
+ }
1159
+ ],
1160
+ [
1161
+ "set",
1162
+ "@entity.operator",
1163
+ ""
1164
+ ],
1165
+ [
1166
+ "set",
1167
+ "@entity.operatorKey",
1168
+ ""
1169
+ ],
1170
+ [
1171
+ "set",
1172
+ "@entity.count",
1173
+ 0.0
1174
+ ]
1175
+ ],
1176
+ "event": "KEY",
1177
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
1178
+ "from": "OPERATOR_PENDING",
1179
+ "guard": [
1180
+ "=",
1181
+ "@payload.key",
1182
+ "@entity.operatorKey"
1183
+ ],
1184
+ "to": "NORMAL"
1185
+ },
1186
+ {
1187
+ "effects": [
1188
+ [
1189
+ "emit",
1190
+ "OPERATE",
1191
+ {
1192
+ "count": [
1193
+ "if",
1194
+ [
1195
+ ">",
1196
+ "@entity.count",
1197
+ 0.0
1198
+ ],
1199
+ "@entity.count",
1200
+ 1.0
1201
+ ],
1202
+ "editorId": "@payload.editorId",
1203
+ "motion": [
1204
+ "object/get",
1205
+ "@config.motions",
1206
+ "@payload.key"
1207
+ ],
1208
+ "operator": "@entity.operator"
1209
+ }
1210
+ ],
1211
+ [
1212
+ "set",
1213
+ "@entity.operator",
1214
+ ""
1215
+ ],
1216
+ [
1217
+ "set",
1218
+ "@entity.operatorKey",
1219
+ ""
1220
+ ],
1221
+ [
1222
+ "set",
1223
+ "@entity.count",
1224
+ 0.0
1225
+ ]
1226
+ ],
1227
+ "event": "KEY",
1228
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
1229
+ "from": "OPERATOR_PENDING",
1230
+ "guard": [
1231
+ "object/has",
1232
+ "@config.motions",
1233
+ "@payload.key"
1234
+ ],
1235
+ "to": "NORMAL"
1236
+ },
1237
+ {
1238
+ "effects": [
1239
+ [
1240
+ "set",
1241
+ "@entity.operator",
1242
+ ""
1243
+ ],
1244
+ [
1245
+ "set",
1246
+ "@entity.operatorKey",
1247
+ ""
1248
+ ],
1249
+ [
1250
+ "set",
1251
+ "@entity.count",
1252
+ 0.0
1253
+ ]
1254
+ ],
1255
+ "event": "KEY",
1256
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
1257
+ "from": "OPERATOR_PENDING",
1258
+ "guard": [
1259
+ "=",
1260
+ "@payload.key",
1261
+ "Escape"
1262
+ ],
1263
+ "to": "NORMAL"
1264
+ },
1265
+ {
1266
+ "effects": [
1267
+ [
1268
+ "set",
1269
+ "@entity.cmdline",
1270
+ [
1271
+ "str/slice",
1272
+ "@entity.cmdline",
1273
+ 0.0,
1274
+ [
1275
+ "-",
1276
+ [
1277
+ "str/len",
1278
+ "@entity.cmdline"
1279
+ ],
1280
+ 1.0
1281
+ ]
1282
+ ]
1283
+ ]
1284
+ ],
1285
+ "event": "KEY",
1286
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
1287
+ "from": "COMMAND",
1288
+ "guard": [
1289
+ "=",
1290
+ "@payload.key",
1291
+ "Backspace"
1292
+ ],
1293
+ "to": "COMMAND"
1294
+ },
1295
+ {
1296
+ "effects": [
1297
+ [
1298
+ "emit",
1299
+ "EX_COMMAND",
1300
+ {
1301
+ "editorId": "@payload.editorId",
1302
+ "name": [
1303
+ "object/get",
1304
+ "@config.exCommands",
1305
+ "@entity.cmdline"
1306
+ ]
1307
+ }
1308
+ ],
1309
+ [
1310
+ "set",
1311
+ "@entity.cmdline",
1312
+ ""
1313
+ ],
1314
+ [
1315
+ "emit",
1316
+ "SET_MODE",
1317
+ {
1318
+ "caret": "block",
1319
+ "editorId": "@payload.editorId",
1320
+ "mode": "NORMAL"
1321
+ }
1322
+ ]
1323
+ ],
1324
+ "event": "KEY",
1325
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
1326
+ "from": "COMMAND",
1327
+ "guard": [
1328
+ "and",
1329
+ [
1330
+ "=",
1331
+ "@payload.key",
1332
+ "Enter"
1333
+ ],
1334
+ [
1335
+ "object/has",
1336
+ "@config.exCommands",
1337
+ "@entity.cmdline"
1338
+ ]
1339
+ ],
1340
+ "to": "NORMAL"
1341
+ },
1342
+ {
1343
+ "effects": [
1344
+ [
1345
+ "set",
1346
+ "@entity.cmdline",
1347
+ ""
1348
+ ],
1349
+ [
1350
+ "emit",
1351
+ "SET_MODE",
1352
+ {
1353
+ "caret": "block",
1354
+ "editorId": "@payload.editorId",
1355
+ "mode": "NORMAL"
1356
+ }
1357
+ ]
1358
+ ],
1359
+ "event": "KEY",
1360
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
1361
+ "from": "COMMAND",
1362
+ "guard": [
1363
+ "and",
1364
+ [
1365
+ "=",
1366
+ "@payload.key",
1367
+ "Enter"
1368
+ ],
1369
+ [
1370
+ "not",
1371
+ [
1372
+ "object/has",
1373
+ "@config.exCommands",
1374
+ "@entity.cmdline"
1375
+ ]
1376
+ ]
1377
+ ],
1378
+ "to": "NORMAL"
1379
+ },
1380
+ {
1381
+ "effects": [
1382
+ [
1383
+ "set",
1384
+ "@entity.cmdline",
1385
+ ""
1386
+ ],
1387
+ [
1388
+ "emit",
1389
+ "SET_MODE",
1390
+ {
1391
+ "caret": "block",
1392
+ "editorId": "@payload.editorId",
1393
+ "mode": "NORMAL"
1394
+ }
1395
+ ]
1396
+ ],
1397
+ "event": "KEY",
1398
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
1399
+ "from": "COMMAND",
1400
+ "guard": [
1401
+ "=",
1402
+ "@payload.key",
1403
+ "Escape"
1404
+ ],
1405
+ "to": "NORMAL"
1406
+ },
1407
+ {
1408
+ "effects": [
1409
+ [
1410
+ "set",
1411
+ "@entity.cmdline",
1412
+ [
1413
+ "str/concat",
1414
+ "@entity.cmdline",
1415
+ "@payload.key"
1416
+ ]
1417
+ ]
1418
+ ],
1419
+ "event": "KEY",
1420
+ "eventId": "evt_01M1N9RFGVK31M3ZE4N9FBHBWM",
1421
+ "from": "COMMAND",
1422
+ "guard": [
1423
+ "and",
1424
+ [
1425
+ "!=",
1426
+ "@payload.key",
1427
+ "Enter"
1428
+ ],
1429
+ [
1430
+ "!=",
1431
+ "@payload.key",
1432
+ "Escape"
1433
+ ],
1434
+ [
1435
+ "!=",
1436
+ "@payload.key",
1437
+ "Backspace"
1438
+ ]
1439
+ ],
1440
+ "to": "COMMAND"
1441
+ }
1442
+ ]
1443
+ }
1444
+ }
1445
+ ]
1446
+ }
1447
+ ],
1448
+ "schemaVersion": 1,
1449
+ "version": "0.1.0"
1450
+ }