@almadar/std 16.145.0 → 16.147.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 (135) hide show
  1. package/behaviors/lolo/infra/atoms/std-migration-job.lolo +269 -0
  2. package/behaviors/lolo/infra/atoms/std-mod-queue.lolo +1 -1
  3. package/behaviors/lolo/ml/atoms/std-data-collector.lolo +56 -0
  4. package/behaviors/lolo/ml/atoms/std-graph-builder.lolo +90 -0
  5. package/behaviors/lolo/ml/atoms/std-ml-similarity.lolo +25 -13
  6. package/behaviors/lolo/ml/atoms/std-tokenizer.lolo +108 -0
  7. package/behaviors/lolo/ml/atoms/std-weight-validator.lolo +106 -0
  8. package/behaviors/lolo/ui/core/atoms/std-app-layout.lolo +14 -0
  9. package/behaviors/lolo/ui/core/atoms/std-billable-hour.lolo +1 -1
  10. package/behaviors/lolo/ui/core/atoms/std-esign-flow.lolo +3 -3
  11. package/behaviors/lolo/ui/core/atoms/std-esign-request.lolo +4 -4
  12. package/behaviors/lolo/ui/core/atoms/std-event-log.lolo +2 -2
  13. package/behaviors/lolo/ui/core/atoms/std-file-store.lolo +1 -1
  14. package/behaviors/lolo/ui/core/atoms/std-gallery.lolo +1 -1
  15. package/behaviors/lolo/ui/core/atoms/std-image-upload-multi.lolo +2 -2
  16. package/behaviors/lolo/ui/core/atoms/std-import.lolo +132 -0
  17. package/behaviors/lolo/ui/core/atoms/std-recurrence.lolo +5 -5
  18. package/behaviors/lolo/ui/core/atoms/std-saved-search.lolo +1 -1
  19. package/behaviors/lolo/ui/core/atoms/std-signature-capture.lolo +1 -1
  20. package/behaviors/lolo/ui/core/atoms/std-stats.lolo +1 -1
  21. package/behaviors/lolo/ui/core/atoms/std-tag-taxonomy.lolo +3 -3
  22. package/behaviors/lolo/ui/core/molecules/ui-data-grid.lolo +0 -2
  23. package/behaviors/lolo/ui/core/molecules/ui-data-list.lolo +0 -2
  24. package/behaviors/lolo/ui/core/molecules/ui-import-preview-tree.lolo +96 -0
  25. package/behaviors/lolo/ui/core/molecules/ui-import-progress.lolo +49 -0
  26. package/behaviors/lolo/ui/core/molecules/ui-import-source-picker.lolo +67 -0
  27. package/behaviors/lolo/ui/core/molecules/ui-table-view.lolo +0 -2
  28. package/behaviors/lolo/ui/core/organisms/ui-entity-cards.lolo +0 -2
  29. package/behaviors/lolo/ui/core/organisms/ui-entity-list.lolo +0 -2
  30. package/behaviors/lolo/ui/core/organisms/ui-entity-table.lolo +0 -2
  31. package/behaviors/lolo/ui/core/organisms/ui-timeline.lolo +0 -2
  32. package/behaviors/lolo/ui/game/atoms/std-dungeon-combat.lolo +2 -2
  33. package/behaviors/lolo/ui/game/molecules/std-worldmap-board-2d.lolo +1 -1
  34. package/behaviors/lolo/ui/game/organisms/ui-boardgame-board.lolo +2 -2
  35. package/behaviors/lolo/ui/game/organisms/ui-builder-board.lolo +2 -2
  36. package/behaviors/lolo/ui/game/organisms/ui-debugger-board.lolo +3 -3
  37. package/behaviors/lolo/ui/game/organisms/ui-physics-sandbox-board.lolo +3 -3
  38. package/behaviors/lolo/ui/game/organisms/ui-roguelike-board.lolo +1 -1
  39. package/behaviors/lolo/ui/game/organisms/ui-sequencer-board.lolo +1 -1
  40. package/behaviors/lolo/ui/learning/atoms/std-algo-heapsort.lolo +2 -2
  41. package/behaviors/lolo/ui/learning/atoms/std-algo-mst.lolo +3 -3
  42. package/behaviors/registry/factory-signatures.json +11531 -2142
  43. package/behaviors/registry/infra/atoms/std-migration-job.orb +1310 -0
  44. package/behaviors/registry/infra/atoms/std-mod-queue.orb +5 -5
  45. package/behaviors/registry/ml/atoms/std-data-collector.orb +324 -0
  46. package/behaviors/registry/ml/atoms/std-graph-builder.orb +480 -0
  47. package/behaviors/registry/ml/atoms/std-ml-similarity.orb +127 -72
  48. package/behaviors/registry/ml/atoms/std-tokenizer.orb +570 -0
  49. package/behaviors/registry/ml/atoms/std-weight-validator.orb +624 -0
  50. package/behaviors/registry/ui/core/atoms/std-app-layout.orb +33 -1
  51. package/behaviors/registry/ui/core/atoms/std-billable-hour.orb +2 -2
  52. package/behaviors/registry/ui/core/atoms/std-esign-flow.orb +17 -21
  53. package/behaviors/registry/ui/core/atoms/std-esign-request.orb +7 -13
  54. package/behaviors/registry/ui/core/atoms/std-event-log.orb +2 -4
  55. package/behaviors/registry/ui/core/atoms/std-file-store.orb +3 -4
  56. package/behaviors/registry/ui/core/atoms/std-gallery.orb +11 -20
  57. package/behaviors/registry/ui/core/atoms/std-image-upload-multi.orb +4 -4
  58. package/behaviors/registry/ui/core/atoms/std-import.orb +701 -0
  59. package/behaviors/registry/ui/core/atoms/std-recurrence.orb +5 -10
  60. package/behaviors/registry/ui/core/atoms/std-saved-search.orb +2 -2
  61. package/behaviors/registry/ui/core/atoms/std-signature-capture.orb +2 -2
  62. package/behaviors/registry/ui/core/molecules/ui-data-grid.orb +12 -25
  63. package/behaviors/registry/ui/core/molecules/ui-data-list.orb +13 -26
  64. package/behaviors/registry/ui/core/molecules/ui-import-preview-tree.orb +354 -0
  65. package/behaviors/registry/ui/core/molecules/ui-import-progress.orb +195 -0
  66. package/behaviors/registry/ui/core/molecules/ui-import-source-picker.orb +279 -0
  67. package/behaviors/registry/ui/core/molecules/ui-table-view.orb +12 -25
  68. package/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +0 -13
  69. package/behaviors/registry/ui/core/organisms/ui-entity-list.orb +8 -21
  70. package/behaviors/registry/ui/core/organisms/ui-entity-table.orb +0 -13
  71. package/behaviors/registry/ui/core/organisms/ui-timeline.orb +0 -13
  72. package/behaviors/registry/ui/game/atoms/std-dungeon-combat.orb +4 -4
  73. package/behaviors/registry/ui/game/molecules/std-worldmap-board-2d.orb +6 -9
  74. package/behaviors/registry/ui/game/organisms/ui-boardgame-board.orb +4 -4
  75. package/behaviors/registry/ui/game/organisms/ui-builder-board.orb +4 -4
  76. package/behaviors/registry/ui/game/organisms/ui-debugger-board.orb +12 -12
  77. package/behaviors/registry/ui/game/organisms/ui-physics-sandbox-board.orb +19 -19
  78. package/behaviors/registry/ui/game/organisms/ui-roguelike-board.orb +1 -1
  79. package/behaviors/registry/ui/game/organisms/ui-sequencer-board.orb +2 -2
  80. package/behaviors/registry/ui/learning/atoms/std-algo-heapsort.orb +8 -8
  81. package/dist/behaviors/behaviors-embeddings.json +568 -496
  82. package/dist/behaviors/behaviors-registry.json +7518 -3936
  83. package/dist/behaviors/exports-reader.js +3093 -2581
  84. package/dist/behaviors/functions/index.d.ts +922 -14
  85. package/dist/behaviors/functions/index.js +3056 -2582
  86. package/dist/behaviors/index.d.ts +1 -1
  87. package/dist/behaviors/index.js +3094 -2582
  88. package/dist/behaviors/knob-embeddings.json +1 -1
  89. package/dist/behaviors/query.js +3093 -2581
  90. package/dist/behaviors/registry/factory-signatures.json +11531 -2142
  91. package/dist/behaviors/registry/infra/atoms/std-migration-job.orb +1310 -0
  92. package/dist/behaviors/registry/infra/atoms/std-mod-queue.orb +5 -5
  93. package/dist/behaviors/registry/ml/atoms/std-data-collector.orb +324 -0
  94. package/dist/behaviors/registry/ml/atoms/std-graph-builder.orb +480 -0
  95. package/dist/behaviors/registry/ml/atoms/std-ml-similarity.orb +127 -72
  96. package/dist/behaviors/registry/ml/atoms/std-tokenizer.orb +570 -0
  97. package/dist/behaviors/registry/ml/atoms/std-weight-validator.orb +624 -0
  98. package/dist/behaviors/registry/ui/core/atoms/std-app-layout.orb +33 -1
  99. package/dist/behaviors/registry/ui/core/atoms/std-billable-hour.orb +2 -2
  100. package/dist/behaviors/registry/ui/core/atoms/std-esign-flow.orb +17 -21
  101. package/dist/behaviors/registry/ui/core/atoms/std-esign-request.orb +7 -13
  102. package/dist/behaviors/registry/ui/core/atoms/std-event-log.orb +2 -4
  103. package/dist/behaviors/registry/ui/core/atoms/std-file-store.orb +3 -4
  104. package/dist/behaviors/registry/ui/core/atoms/std-gallery.orb +11 -20
  105. package/dist/behaviors/registry/ui/core/atoms/std-image-upload-multi.orb +4 -4
  106. package/dist/behaviors/registry/ui/core/atoms/std-import.orb +701 -0
  107. package/dist/behaviors/registry/ui/core/atoms/std-recurrence.orb +5 -10
  108. package/dist/behaviors/registry/ui/core/atoms/std-saved-search.orb +2 -2
  109. package/dist/behaviors/registry/ui/core/atoms/std-signature-capture.orb +2 -2
  110. package/dist/behaviors/registry/ui/core/molecules/ui-data-grid.orb +12 -25
  111. package/dist/behaviors/registry/ui/core/molecules/ui-data-list.orb +13 -26
  112. package/dist/behaviors/registry/ui/core/molecules/ui-import-preview-tree.orb +354 -0
  113. package/dist/behaviors/registry/ui/core/molecules/ui-import-progress.orb +195 -0
  114. package/dist/behaviors/registry/ui/core/molecules/ui-import-source-picker.orb +279 -0
  115. package/dist/behaviors/registry/ui/core/molecules/ui-table-view.orb +12 -25
  116. package/dist/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +0 -13
  117. package/dist/behaviors/registry/ui/core/organisms/ui-entity-list.orb +8 -21
  118. package/dist/behaviors/registry/ui/core/organisms/ui-entity-table.orb +0 -13
  119. package/dist/behaviors/registry/ui/core/organisms/ui-timeline.orb +0 -13
  120. package/dist/behaviors/registry/ui/game/atoms/std-dungeon-combat.orb +4 -4
  121. package/dist/behaviors/registry/ui/game/molecules/std-worldmap-board-2d.orb +6 -9
  122. package/dist/behaviors/registry/ui/game/organisms/ui-boardgame-board.orb +4 -4
  123. package/dist/behaviors/registry/ui/game/organisms/ui-builder-board.orb +4 -4
  124. package/dist/behaviors/registry/ui/game/organisms/ui-debugger-board.orb +12 -12
  125. package/dist/behaviors/registry/ui/game/organisms/ui-physics-sandbox-board.orb +19 -19
  126. package/dist/behaviors/registry/ui/game/organisms/ui-roguelike-board.orb +1 -1
  127. package/dist/behaviors/registry/ui/game/organisms/ui-sequencer-board.orb +2 -2
  128. package/dist/behaviors/registry/ui/learning/atoms/std-algo-heapsort.orb +8 -8
  129. package/dist/behaviors-embeddings.json +568 -496
  130. package/dist/behaviors-registry.json +7518 -3936
  131. package/dist/index.d.ts +1 -1
  132. package/dist/index.js +3094 -2582
  133. package/dist/knob-embeddings.json +1 -1
  134. package/dist/registry/factory-signatures.json +11531 -2142
  135. package/package.json +2 -2
@@ -0,0 +1,67 @@
1
+ app ui-import-source-picker "1.0.0"
2
+ "ImportSourcePicker — UI factory (1:1 with the @almadar/ui import-source-picker pattern)."
3
+ orbital ImportSourcePickerOrbital {
4
+ type ImportSourcePickerSourcesItem = {
5
+ id : string!
6
+ label : string!
7
+ description : string
8
+ icon : icon
9
+ kind : "action" | "file"
10
+ accept : string
11
+ multiple : boolean
12
+ disabled : boolean
13
+ }
14
+
15
+ entity ImportSourcePickerItem [runtime] {
16
+ id : string!
17
+ }
18
+
19
+ trait ImportSourcePickerRender -> @rebindable ImportSourcePickerItem [interaction, instance] {
20
+ initial: idle
21
+
22
+ state idle {
23
+ INIT -> idle
24
+ (render-ui main {
25
+ sources: @config.sources
26
+ onSelect: @config.onSelect
27
+ title: @config.title
28
+ moreSources: @config.moreSources
29
+ className: @config.className
30
+ type: import-source-picker
31
+ })
32
+ }
33
+
34
+ emits {
35
+ @config.onSelect -> external {
36
+ sourceId : string
37
+ }
38
+ @description "Called with the source id when an 'action' option is picked"
39
+ @tier "essential"
40
+ }
41
+
42
+ config {
43
+ sources : [ImportSourcePickerSourcesItem] = [{ id: "Id", label: "Label", description: "Description", icon: "circle", kind: action, accept: "Accept", multiple: false, disabled: false }, { id: "Id 2", label: "Label 2", description: "Description 2", icon: "circle", kind: file, accept: "Accept 2", multiple: true, disabled: true }]
44
+ @label "Sources"
45
+ @description "Source options to render"
46
+ @tier "presentation"
47
+ onSelect : string = "SELECT"
48
+ @label "On Select"
49
+ @description "Called with the source id when an 'action' option is picked"
50
+ @tier "presentation"
51
+ title : string
52
+ @label "Title"
53
+ @description "Optional heading above the options"
54
+ @tier "presentation"
55
+ moreSources : node
56
+ @label "More Sources"
57
+ @description "Generic slot for additional sources rendered below the options"
58
+ @tier "presentation"
59
+ className : string
60
+ @label "Class Name"
61
+ @description "Additional CSS classes"
62
+ @tier "presentation"
63
+ }
64
+ }
65
+
66
+ page "/import-source-picker" as ImportSourcePickerPage -> ImportSourcePickerRender
67
+ }
@@ -111,8 +111,6 @@ orbital TableViewOrbital {
111
111
  look: @config.look
112
112
  type: table-view
113
113
  })
114
- VIEW -> idle
115
- (emit VIEW {})
116
114
  }
117
115
 
118
116
  emits {
@@ -96,8 +96,6 @@ orbital EntityCardsOrbital {
96
96
  imageField: @config.imageField
97
97
  type: entity-cards
98
98
  })
99
- VIEW -> idle
100
- (emit VIEW {})
101
99
  }
102
100
 
103
101
  emits {
@@ -74,8 +74,6 @@ orbital EntityListOrbital {
74
74
  fieldNames: @config.fieldNames
75
75
  type: entity-list
76
76
  })
77
- VIEW -> idle
78
- (emit VIEW {})
79
77
  }
80
78
 
81
79
  emits {
@@ -120,8 +120,6 @@ orbital EntityTableOrbital {
120
120
  look: @config.look
121
121
  type: entity-table
122
122
  })
123
- VIEW -> idle
124
- (emit VIEW {})
125
123
  }
126
124
 
127
125
  emits {
@@ -59,8 +59,6 @@ orbital TimelineOrbital {
59
59
  look: @config.look
60
60
  type: timeline
61
61
  })
62
- VIEW -> idle
63
- (emit VIEW {})
64
62
  }
65
63
 
66
64
  emits {
@@ -55,11 +55,11 @@ orbital DungeonCombatOrbital {
55
55
  (let ((target (array/find @entity.enemies (fn e (== @e.id @payload.targetId)))))
56
56
  (let ((newHealth (math/max 0 (- (object/get @target health) @config.attackDamage))))
57
57
  (do
58
- (set @entity.enemies (array/map @entity.enemies (fn e (if (== @e.id @payload.targetId) (object/merge @e { health: @newHealth, animation: (if (<= @newHealth 0) "death" "hit") }) e))))
58
+ (set @entity.enemies (array/map @entity.enemies (fn e (if (== @e.id @payload.targetId) (object/merge @e { health: @newHealth, animation: (if (<= @newHealth 0) "death" "hit") }) @e))))
59
59
  (if (<= @newHealth 0)
60
60
  (do
61
61
  (set @entity.combatScore (+ @entity.combatScore @config.pointsPerKill))
62
- (emit BURST { particles: (array/map (array/filter @entity.enemies (fn e (== @e.id @payload.targetId))) (fn t { id: (str/concat "fx-kill-" (object/get t id)), type: "explosion", x: (object/get (object/get t position) x), z: (object/get (object/get t position) y), ttl: 5 })) }))
62
+ (emit BURST { particles: (array/map (array/filter @entity.enemies (fn e (== @e.id @payload.targetId))) (fn t { id: (str/concat "fx-kill-" (object/get @t id)), type: "explosion", x: (object/get (object/get @t position) x), z: (object/get (object/get @t position) y), ttl: 5 })) }))
63
63
  true))))
64
64
 
65
65
  MONSTER_TICK -> active when @config.running
@@ -168,7 +168,7 @@ orbital WorldMapBoard2DOrbital {
168
168
 
169
169
  HERO_MOVE -> playing when (and (== @entity.result "none") (and (!= @entity.selectedHeroId "") (and (grid/in-bounds { x: ?x, y: ?y } @config.gridWidth @config.gridHeight) (and (<= (grid/manhattan-distance (object/get (array/find @entity.units (fn u (== @u.id @entity.selectedHeroId))) position) { x: ?x, y: ?y }) @config.movementRange) (and (== (object/get (array/find @entity.tiles (fn t (and (== (object/get @t x) ?x) (== (object/get @t y) ?y)))) passable) true) (== (array/len (array/filter @entity.units (fn u (and (== (object/get (object/get @u position) x) ?x) (== (object/get (object/get @u position) y) ?y))))) 0))))))
170
170
  (emit MOVE { unitId: @entity.selectedHeroId, x: ?x, y: ?y })
171
- (if (== (object/get (array/find @config.features (fn f (and (== (object/get f x) ?x) (and (== (object/get f y) ?y) (== (object/get f type) "gold_mine"))))) type) "gold_mine") (emit MINE_HIT { id: "" }) null)
171
+ (if (== (object/get (array/find @config.features (fn f (and (== (object/get @f x) ?x) (and (== (object/get @f y) ?y) (== (object/get @f type) "gold_mine"))))) type) "gold_mine") (emit MINE_HIT { id: "" }) null)
172
172
  (set @entity.selectedHeroId "")
173
173
  (set @entity.validMoves [])
174
174
 
@@ -119,7 +119,7 @@ orbital BoardgameBoardOrbital {
119
119
  (set @entity.landingIndex (math/min @entity.lastIndex (+ @entity.playerIndex @entity.dice)))
120
120
  (set @entity.landingType (object/get (array/nth @config.track @entity.landingIndex) type))
121
121
  (set @entity.playerIndex (if (== @entity.landingType "bonus") (math/min @entity.lastIndex (+ @entity.landingIndex 2)) (if (== @entity.landingType "trap") (math/max 0 (- @entity.landingIndex 2)) @entity.landingIndex)))
122
- (set @entity.pieces (array/map @entity.pieces (fn p (if (== @p.id "you") (object/merge p { position: { x: (object/get (array/nth @config.track @entity.playerIndex) x), y: (object/get (array/nth @config.track @entity.playerIndex) y) }, trackIndex: @entity.playerIndex }) p))))
122
+ (set @entity.pieces (array/map @entity.pieces (fn p (if (== @p.id "you") (object/merge @p { position: { x: (object/get (array/nth @config.track @entity.playerIndex) x), y: (object/get (array/nth @config.track @entity.playerIndex) y) }, trackIndex: @entity.playerIndex }) @p))))
123
123
  (if (or (== @entity.landingType "bonus") (== @entity.landingType "trap")) (set @entity.effects (array/append @entity.effects { key: @entity.landingType, x: (object/get (array/nth @config.track @entity.landingIndex) x), y: (object/get (array/nth @config.track @entity.landingIndex) y), ttl: 6 })) true)
124
124
  (set @entity.result (if (== @entity.playerIndex @entity.lastIndex) "victory" "none"))
125
125
  (if (== @entity.result "victory") (emit GAME_END) true)
@@ -218,7 +218,7 @@ orbital BoardgameBoardOrbital {
218
218
  (set @entity.landingIndex (math/min @entity.lastIndex (+ @entity.rivalIndex @entity.dice)))
219
219
  (set @entity.landingType (object/get (array/nth @config.track @entity.landingIndex) type))
220
220
  (set @entity.rivalIndex (if (== @entity.landingType "bonus") (math/min @entity.lastIndex (+ @entity.landingIndex 2)) (if (== @entity.landingType "trap") (math/max 0 (- @entity.landingIndex 2)) @entity.landingIndex)))
221
- (set @entity.pieces (array/map @entity.pieces (fn p (if (== @p.id "rival") (object/merge p { position: { x: (object/get (array/nth @config.track @entity.rivalIndex) x), y: (object/get (array/nth @config.track @entity.rivalIndex) y) }, trackIndex: @entity.rivalIndex }) p))))
221
+ (set @entity.pieces (array/map @entity.pieces (fn p (if (== @p.id "rival") (object/merge @p { position: { x: (object/get (array/nth @config.track @entity.rivalIndex) x), y: (object/get (array/nth @config.track @entity.rivalIndex) y) }, trackIndex: @entity.rivalIndex }) @p))))
222
222
  (if (or (== @entity.landingType "bonus") (== @entity.landingType "trap")) (set @entity.effects (array/append @entity.effects { key: @entity.landingType, x: (object/get (array/nth @config.track @entity.landingIndex) x), y: (object/get (array/nth @config.track @entity.landingIndex) y), ttl: 6 })) true)
223
223
  (set @entity.result (if (== @entity.rivalIndex @entity.lastIndex) "defeat" "none"))
224
224
  (if (== @entity.result "defeat") (emit GAME_END) true)
@@ -100,7 +100,7 @@ orbital BuilderBoardOrbital {
100
100
  ]
101
101
  })
102
102
 
103
- CHECK -> complete when (== (array/len (array/filter @entity.slots (fn s (!= (object/get s placedComponentId) (object/get s requiredComponentId))))) 0)
103
+ CHECK -> complete when (== (array/len (array/filter @entity.slots (fn s (!= (object/get @s placedComponentId) (object/get @s requiredComponentId))))) 0)
104
104
  (set @entity.attempts (+ @entity.attempts 1))
105
105
  (set @entity.result "win")
106
106
  (render-ui main {
@@ -112,7 +112,7 @@ orbital BuilderBoardOrbital {
112
112
  ]
113
113
  })
114
114
 
115
- CHECK -> playing when (> (array/len (array/filter @entity.slots (fn s (!= (object/get s placedComponentId) (object/get s requiredComponentId))))) 0)
115
+ CHECK -> playing when (> (array/len (array/filter @entity.slots (fn s (!= (object/get @s placedComponentId) (object/get @s requiredComponentId))))) 0)
116
116
  (set @entity.attempts (+ @entity.attempts 1))
117
117
  (render-ui main {
118
118
  type: game-shell
@@ -74,7 +74,7 @@ orbital DebuggerBoardOrbital {
74
74
  ]
75
75
  })
76
76
  TOGGLE_FLAG -> playing
77
- (set @entity.lines (array/map @entity.lines (fn l (if (== (object/get l id) ?lineId) (object/merge l { isFlagged: (not (object/get l isFlagged)) }) l))))
77
+ (set @entity.lines (array/map @entity.lines (fn l (if (== (object/get @l id) ?lineId) (object/merge @l { isFlagged: (not (object/get @l isFlagged)) }) @l))))
78
78
  (render-ui main {
79
79
  type: game-shell
80
80
  hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: [ { label: "Attempts", value: @entity.attempts }, { label: "Status", value: @entity.result } ] }, { type: stack, direction: horizontal, gap: sm, children: [ { type: button, action: CHECK, label: "Check", variant: primary }, { type: button, action: PLAY_AGAIN, label: "Reset", variant: secondary } ] } ] }
@@ -84,7 +84,7 @@ orbital DebuggerBoardOrbital {
84
84
  ]
85
85
  })
86
86
 
87
- CHECK -> complete when (and (== (array/len (array/filter @entity.lines (fn l (and (object/get l isBug) (not (object/get l isFlagged)))))) 0) (== (array/len (array/filter @entity.lines (fn l (and (not (object/get l isBug)) (object/get l isFlagged))))) 0))
87
+ CHECK -> complete when (and (== (array/len (array/filter @entity.lines (fn l (and (object/get @l isBug) (not (object/get @l isFlagged)))))) 0) (== (array/len (array/filter @entity.lines (fn l (and (not (object/get @l isBug)) (object/get @l isFlagged))))) 0))
88
88
  (set @entity.attempts (+ @entity.attempts 1))
89
89
  (set @entity.result "win")
90
90
  (render-ui main {
@@ -96,7 +96,7 @@ orbital DebuggerBoardOrbital {
96
96
  ]
97
97
  })
98
98
 
99
- CHECK -> playing when (or (> (array/len (array/filter @entity.lines (fn l (and (object/get l isBug) (not (object/get l isFlagged)))))) 0) (> (array/len (array/filter @entity.lines (fn l (and (not (object/get l isBug)) (object/get l isFlagged))))) 0))
99
+ CHECK -> playing when (or (> (array/len (array/filter @entity.lines (fn l (and (object/get @l isBug) (not (object/get @l isFlagged)))))) 0) (> (array/len (array/filter @entity.lines (fn l (and (not (object/get @l isBug)) (object/get @l isFlagged))))) 0))
100
100
  (set @entity.attempts (+ @entity.attempts 1))
101
101
  (render-ui main {
102
102
  type: game-shell
@@ -141,10 +141,10 @@ orbital PhysicsSandboxBoardOrbital {
141
141
 
142
142
  ticks {
143
143
  gravityTick every 300ms
144
- (set @entity.blocks (array/map @entity.blocks (fn b (if (== (object/get b settled) true) b (if (or (== (+ (object/get b y) 1) @entity.gridHeight) (array/some @entity.blocks (fn o (and (== (object/get o settled) true) (and (== (object/get o x) (object/get b x)) (== (object/get o y) (+ (object/get b y) 1))))))) (object/merge b { settled: true }) (object/merge b { y: (+ (object/get b y) 1) }))))))
145
- (let ((clearRow (array/find (array/range 0 @entity.gridHeight) (fn r (== (array/len (array/filter @entity.blocks (fn b (and (== (object/get b settled) true) (== (object/get b y) r))))) @entity.gridWidth)))))
144
+ (set @entity.blocks (array/map @entity.blocks (fn b (if (== (object/get @b settled) true) @b (if (or (== (+ (object/get @b y) 1) @entity.gridHeight) (array/some @entity.blocks (fn o (and (== (object/get @o settled) true) (and (== (object/get @o x) (object/get @b x)) (== (object/get @o y) (+ (object/get @b y) 1))))))) (object/merge @b { settled: true }) (object/merge @b { y: (+ (object/get @b y) 1) }))))))
145
+ (let ((clearRow (array/find (array/range 0 @entity.gridHeight) (fn r (== (array/len (array/filter @entity.blocks (fn b (and (== (object/get @b settled) true) (== (object/get @b y) @r))))) @entity.gridWidth)))))
146
146
  (do
147
- (set @entity.blocks (if (!= @clearRow null) (array/map (array/filter @entity.blocks (fn b (!= (object/get b y) @clearRow))) (fn b (if (< (object/get b y) @clearRow) (object/merge b { y: (+ (object/get b y) 1) }) b))) @entity.blocks))
147
+ (set @entity.blocks (if (!= @clearRow null) (array/map (array/filter @entity.blocks (fn b (!= (object/get @b y) @clearRow))) (fn b (if (< (object/get @b y) @clearRow) (object/merge @b { y: (+ (object/get @b y) 1) }) @b))) @entity.blocks))
148
148
  (set @entity.score (if (!= @clearRow null) (+ @entity.score (* 10 @entity.gridWidth)) @entity.score))
149
149
  (set @entity.rowsCleared (if (!= @clearRow null) (+ @entity.rowsCleared 1) @entity.rowsCleared))))
150
150
  (render-ui main {
@@ -466,7 +466,7 @@ orbital RoguelikeBoardOrbital {
466
466
  enemyAiTick every 1s
467
467
  when (and (== @entity.phase "enemy_turn") (== @entity.result "none"))
468
468
  (set @entity.enemies (array/map @entity.enemies (fn e (if (> @e.hp 0) (let ((ex @e.x) (ey @e.y) (px (object/get @entity.player x)) (py (object/get @entity.player y))) (let ((adjP (and (== (math/abs (- @ex @px)) 1) (== @ey @py))) (adjQ (and (== @ex @px) (== (math/abs (- @ey @py)) 1)))) (if (or @adjP @adjQ) @e (let ((cnx (math/clamp (+ @ex (math/sign (- @px @ex))) 0 (- @entity.gridWidth 1))) (cny (math/clamp (+ @ey (math/sign (- @py @ey))) 0 (- @entity.gridHeight 1)))) (let ((ntile (array/find @entity.tiles (fn t (and (== (object/get @t x) @cnx) (== (object/get @t y) @cny))))) (occupied (array/find @entity.enemies (fn o (and (!= @o.id @e.id) (and (== @o.x @cnx) (== @o.y @cny))))))) (if (and (and (!= @ntile null) (== (object/get @ntile passable) true)) (and (== @occupied null) (or (!= @cnx @px) (!= @cny @py)))) (object/merge @e { x: @cnx, y: @cny }) @e)))))) @e))))
469
- (set @entity.playerHp (let ((adjEnemies (array/filter @entity.enemies (fn e (and (> @e.hp 0) (or (and (== (math/abs (- @e.x (object/get @entity.player x))) 1) (== @e.y (object/get @entity.player y))) (and (== @e.x (object/get @entity.player x)) (== (math/abs (- @e.y (object/get @entity.player y))) 1)))))))) (let ((dmg (if (== (array/len @adjEnemies) 0) 0 (array/reduce @adjEnemies (fn acc e (+ acc @e.attack)) 0)))) (math/max 0 (- @entity.playerHp @dmg)))))
469
+ (set @entity.playerHp (let ((adjEnemies (array/filter @entity.enemies (fn e (and (> @e.hp 0) (or (and (== (math/abs (- @e.x (object/get @entity.player x))) 1) (== @e.y (object/get @entity.player y))) (and (== @e.x (object/get @entity.player x)) (== (math/abs (- @e.y (object/get @entity.player y))) 1)))))))) (let ((dmg (if (== (array/len @adjEnemies) 0) 0 (array/reduce @adjEnemies (fn acc e (+ @acc @e.attack)) 0)))) (math/max 0 (- @entity.playerHp @dmg)))))
470
470
  (set @entity.effects (if (> (array/len (array/filter @entity.enemies (fn e (and (> @e.hp 0) (or (and (== (math/abs (- @e.x (object/get @entity.player x))) 1) (== @e.y (object/get @entity.player y))) (and (== @e.x (object/get @entity.player x)) (== (math/abs (- @e.y (object/get @entity.player y))) 1))))))) 0) (array/append @entity.effects { key: "slash", x: (object/get @entity.player x), y: (object/get @entity.player y), ttl: 4 }) @entity.effects))
471
471
  (if (<= @entity.playerHp 0) (do (set @entity.result "lost") (emit GAME_END)) true)
472
472
  (set @entity.phase (if (== @entity.result "none") "player_turn" "game_over"))
@@ -119,7 +119,7 @@ orbital SequencerBoardOrbital {
119
119
  ]
120
120
  })
121
121
 
122
- CHECK -> complete when (array/some @entity.solutions (fn sol (== (array/map @entity.slots (fn s (object/get s placedActionId))) sol)))
122
+ CHECK -> complete when (array/some @entity.solutions (fn sol (== (array/map @entity.slots (fn s (object/get @s placedActionId))) @sol)))
123
123
  (set @entity.attempts (+ @entity.attempts 1))
124
124
  (set @entity.result "win")
125
125
  (set @entity.currentStep -1)
@@ -58,9 +58,9 @@ orbital HeapSortEngineOrbital {
58
58
  (rc (+ (* 2 @entity.root) 2))
59
59
  )
60
60
  (let (
61
- (afterL (if (and (< lc @entity.heapSize) (> (object/get (array/nth @entity.bars lc) value) (object/get (array/nth @entity.bars @entity.root) value))) lc @entity.root))
61
+ (afterL (if (and (< @lc @entity.heapSize) (> (object/get (array/nth @entity.bars @lc) value) (object/get (array/nth @entity.bars @entity.root) value))) @lc @entity.root))
62
62
  )
63
- (if (and (< rc @entity.heapSize) (> (object/get (array/nth @entity.bars rc) value) (object/get (array/nth @entity.bars afterL) value))) rc afterL))))
63
+ (if (and (< @rc @entity.heapSize) (> (object/get (array/nth @entity.bars @rc) value) (object/get (array/nth @entity.bars @afterL) value))) @rc @afterL))))
64
64
  (set @entity.willSwap (not (== @entity.largest @entity.root)))
65
65
  (set @entity.buildMore (and (not @entity.willSwap) (== @entity.phase 0) (>= @entity.origin 1)))
66
66
  (set @entity.buildDone (and (not @entity.willSwap) (== @entity.phase 0) (== @entity.origin 0)))
@@ -76,7 +76,7 @@ orbital MstEngineOrbital {
76
76
  (let ( (inF (array/includes @entity.inTree (object/get @w from)))
77
77
  (inT (array/includes @entity.inTree (object/get @w to))) )
78
78
  (or (and @inF (not @inT)) (and (not @inF) @inT)))))
79
- (fn w (object/get @w w)))))
79
+ (fn w (object/get @w "w")))))
80
80
  (set @entity.chosenFrom
81
81
  (object/get
82
82
  (array/first
@@ -84,7 +84,7 @@ orbital MstEngineOrbital {
84
84
  (let ( (inF (array/includes @entity.inTree (object/get @w from)))
85
85
  (inT (array/includes @entity.inTree (object/get @w to))) )
86
86
  (and (or (and @inF (not @inT)) (and (not @inF) @inT))
87
- (== (object/get @w w) @entity.minW))))))
87
+ (== (object/get @w "w") @entity.minW))))))
88
88
  from))
89
89
  (set @entity.chosenTo
90
90
  (object/get
@@ -93,7 +93,7 @@ orbital MstEngineOrbital {
93
93
  (let ( (inF (array/includes @entity.inTree (object/get @w from)))
94
94
  (inT (array/includes @entity.inTree (object/get @w to))) )
95
95
  (and (or (and @inF (not @inT)) (and (not @inF) @inT))
96
- (== (object/get @w w) @entity.minW))))))
96
+ (== (object/get @w "w") @entity.minW))))))
97
97
  to))
98
98
  (set @entity.treeEdges (array/append @entity.treeEdges { from: @entity.chosenFrom, to: @entity.chosenTo }))
99
99
  (set @entity.inTree