@cratis/scene.engine 4.2.0 → 4.3.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 (310) hide show
  1. package/dist/cjs/editing/DescriptorCatalog.js +42 -0
  2. package/dist/cjs/editing/DescriptorCatalog.js.map +1 -0
  3. package/dist/cjs/editing/EditSession.js +44 -0
  4. package/dist/cjs/editing/EditSession.js.map +1 -0
  5. package/dist/cjs/editing/applyEdit.js +83 -0
  6. package/dist/cjs/editing/applyEdit.js.map +1 -0
  7. package/dist/cjs/editing/applyEffectiveConfiguration.js +62 -0
  8. package/dist/cjs/editing/applyEffectiveConfiguration.js.map +1 -0
  9. package/dist/cjs/editing/collectComponents.js +34 -0
  10. package/dist/cjs/editing/collectComponents.js.map +1 -0
  11. package/dist/cjs/editing/describeNode.js +63 -0
  12. package/dist/cjs/editing/describeNode.js.map +1 -0
  13. package/dist/cjs/editing/diagnostics.js +36 -0
  14. package/dist/cjs/editing/diagnostics.js.map +1 -0
  15. package/dist/cjs/editing/documentPaths.js +45 -0
  16. package/dist/cjs/editing/documentPaths.js.map +1 -0
  17. package/dist/cjs/editing/exposureEdits.js +106 -0
  18. package/dist/cjs/editing/exposureEdits.js.map +1 -0
  19. package/dist/cjs/editing/exposureGrants.js +115 -0
  20. package/dist/cjs/editing/exposureGrants.js.map +1 -0
  21. package/dist/cjs/editing/indexDocument.js +400 -0
  22. package/dist/cjs/editing/indexDocument.js.map +1 -0
  23. package/dist/cjs/editing/inspect.js +127 -0
  24. package/dist/cjs/editing/inspect.js.map +1 -0
  25. package/dist/cjs/editing/instanceEdits.js +255 -0
  26. package/dist/cjs/editing/instanceEdits.js.map +1 -0
  27. package/dist/cjs/editing/layoutTypeDescriptors.js +425 -0
  28. package/dist/cjs/editing/layoutTypeDescriptors.js.map +1 -0
  29. package/dist/cjs/editing/layoutTypeEdits.js +141 -0
  30. package/dist/cjs/editing/layoutTypeEdits.js.map +1 -0
  31. package/dist/cjs/editing/nodeIds.js +115 -0
  32. package/dist/cjs/editing/nodeIds.js.map +1 -0
  33. package/dist/cjs/editing/pathAccess.js +53 -0
  34. package/dist/cjs/editing/pathAccess.js.map +1 -0
  35. package/dist/cjs/editing/propertyEdits.js +118 -0
  36. package/dist/cjs/editing/propertyEdits.js.map +1 -0
  37. package/dist/cjs/editing/resolveEffectiveConfiguration.js +200 -0
  38. package/dist/cjs/editing/resolveEffectiveConfiguration.js.map +1 -0
  39. package/dist/cjs/editing/resolveTemplateChain.js +100 -0
  40. package/dist/cjs/editing/resolveTemplateChain.js.map +1 -0
  41. package/dist/cjs/editing/structureEdits.js +231 -0
  42. package/dist/cjs/editing/structureEdits.js.map +1 -0
  43. package/dist/cjs/editing/validateBinding.js +111 -0
  44. package/dist/cjs/editing/validateBinding.js.map +1 -0
  45. package/dist/cjs/editing/validateValue.js +114 -0
  46. package/dist/cjs/editing/validateValue.js.map +1 -0
  47. package/dist/cjs/index.js +51 -0
  48. package/dist/cjs/index.js.map +1 -1
  49. package/dist/esm/editing/DescriptorCatalog.d.ts +9 -0
  50. package/dist/esm/editing/DescriptorCatalog.d.ts.map +1 -0
  51. package/dist/esm/editing/DescriptorCatalog.js +38 -0
  52. package/dist/esm/editing/DescriptorCatalog.js.map +1 -0
  53. package/dist/esm/editing/DocumentIndex.d.ts +31 -0
  54. package/dist/esm/editing/DocumentIndex.d.ts.map +1 -0
  55. package/dist/esm/editing/DocumentIndex.js +2 -0
  56. package/dist/esm/editing/DocumentIndex.js.map +1 -0
  57. package/dist/esm/editing/EditOutcome.d.ts +7 -0
  58. package/dist/esm/editing/EditOutcome.d.ts.map +1 -0
  59. package/dist/esm/editing/EditOutcome.js +2 -0
  60. package/dist/esm/editing/EditOutcome.js.map +1 -0
  61. package/dist/esm/editing/EditSession.d.ts +20 -0
  62. package/dist/esm/editing/EditSession.d.ts.map +1 -0
  63. package/dist/esm/editing/EditSession.js +42 -0
  64. package/dist/esm/editing/EditSession.js.map +1 -0
  65. package/dist/esm/editing/EditingContext.d.ts +8 -0
  66. package/dist/esm/editing/EditingContext.d.ts.map +1 -0
  67. package/dist/esm/editing/EditingContext.js +2 -0
  68. package/dist/esm/editing/EditingContext.js.map +1 -0
  69. package/dist/esm/editing/TemplateChain.d.ts +13 -0
  70. package/dist/esm/editing/TemplateChain.d.ts.map +1 -0
  71. package/dist/esm/editing/TemplateChain.js +2 -0
  72. package/dist/esm/editing/TemplateChain.js.map +1 -0
  73. package/dist/esm/editing/applyEdit.d.ts +5 -0
  74. package/dist/esm/editing/applyEdit.d.ts.map +1 -0
  75. package/dist/esm/editing/applyEdit.js +81 -0
  76. package/dist/esm/editing/applyEdit.js.map +1 -0
  77. package/dist/esm/editing/applyEffectiveConfiguration.d.ts +3 -0
  78. package/dist/esm/editing/applyEffectiveConfiguration.d.ts.map +1 -0
  79. package/dist/esm/editing/applyEffectiveConfiguration.js +60 -0
  80. package/dist/esm/editing/applyEffectiveConfiguration.js.map +1 -0
  81. package/dist/esm/editing/collectComponents.d.ts +3 -0
  82. package/dist/esm/editing/collectComponents.d.ts.map +1 -0
  83. package/dist/esm/editing/collectComponents.js +32 -0
  84. package/dist/esm/editing/collectComponents.js.map +1 -0
  85. package/dist/esm/editing/describeNode.d.ts +11 -0
  86. package/dist/esm/editing/describeNode.d.ts.map +1 -0
  87. package/dist/esm/editing/describeNode.js +60 -0
  88. package/dist/esm/editing/describeNode.js.map +1 -0
  89. package/dist/esm/editing/diagnostics.d.ts +6 -0
  90. package/dist/esm/editing/diagnostics.d.ts.map +1 -0
  91. package/dist/esm/editing/diagnostics.js +32 -0
  92. package/dist/esm/editing/diagnostics.js.map +1 -0
  93. package/dist/esm/editing/documentPaths.d.ts +8 -0
  94. package/dist/esm/editing/documentPaths.d.ts.map +1 -0
  95. package/dist/esm/editing/documentPaths.js +41 -0
  96. package/dist/esm/editing/documentPaths.js.map +1 -0
  97. package/dist/esm/editing/exposureEdits.d.ts +5 -0
  98. package/dist/esm/editing/exposureEdits.d.ts.map +1 -0
  99. package/dist/esm/editing/exposureEdits.js +103 -0
  100. package/dist/esm/editing/exposureEdits.js.map +1 -0
  101. package/dist/esm/editing/exposureGrants.d.ts +21 -0
  102. package/dist/esm/editing/exposureGrants.d.ts.map +1 -0
  103. package/dist/esm/editing/exposureGrants.js +112 -0
  104. package/dist/esm/editing/exposureGrants.js.map +1 -0
  105. package/dist/esm/editing/given/a_layout_document.d.ts +14 -0
  106. package/dist/esm/editing/given/a_layout_document.d.ts.map +1 -0
  107. package/dist/esm/editing/given/a_layout_document.js +67 -0
  108. package/dist/esm/editing/given/a_layout_document.js.map +1 -0
  109. package/dist/esm/editing/given/a_scene_document.d.ts +20 -0
  110. package/dist/esm/editing/given/a_scene_document.d.ts.map +1 -0
  111. package/dist/esm/editing/given/a_scene_document.js +110 -0
  112. package/dist/esm/editing/given/a_scene_document.js.map +1 -0
  113. package/dist/esm/editing/index.d.ts +19 -0
  114. package/dist/esm/editing/index.d.ts.map +1 -0
  115. package/dist/esm/editing/index.js +19 -0
  116. package/dist/esm/editing/index.js.map +1 -0
  117. package/dist/esm/editing/indexDocument.d.ts +6 -0
  118. package/dist/esm/editing/indexDocument.d.ts.map +1 -0
  119. package/dist/esm/editing/indexDocument.js +396 -0
  120. package/dist/esm/editing/indexDocument.js.map +1 -0
  121. package/dist/esm/editing/inspect.d.ts +8 -0
  122. package/dist/esm/editing/inspect.d.ts.map +1 -0
  123. package/dist/esm/editing/inspect.js +124 -0
  124. package/dist/esm/editing/inspect.js.map +1 -0
  125. package/dist/esm/editing/instanceEdits.d.ts +9 -0
  126. package/dist/esm/editing/instanceEdits.d.ts.map +1 -0
  127. package/dist/esm/editing/instanceEdits.js +248 -0
  128. package/dist/esm/editing/instanceEdits.js.map +1 -0
  129. package/dist/esm/editing/layoutTypeDescriptors.d.ts +5 -0
  130. package/dist/esm/editing/layoutTypeDescriptors.d.ts.map +1 -0
  131. package/dist/esm/editing/layoutTypeDescriptors.js +421 -0
  132. package/dist/esm/editing/layoutTypeDescriptors.js.map +1 -0
  133. package/dist/esm/editing/layoutTypeEdits.d.ts +4 -0
  134. package/dist/esm/editing/layoutTypeEdits.d.ts.map +1 -0
  135. package/dist/esm/editing/layoutTypeEdits.js +139 -0
  136. package/dist/esm/editing/layoutTypeEdits.js.map +1 -0
  137. package/dist/esm/editing/nodeIds.d.ts +14 -0
  138. package/dist/esm/editing/nodeIds.d.ts.map +1 -0
  139. package/dist/esm/editing/nodeIds.js +102 -0
  140. package/dist/esm/editing/nodeIds.js.map +1 -0
  141. package/dist/esm/editing/pathAccess.d.ts +7 -0
  142. package/dist/esm/editing/pathAccess.d.ts.map +1 -0
  143. package/dist/esm/editing/pathAccess.js +48 -0
  144. package/dist/esm/editing/pathAccess.js.map +1 -0
  145. package/dist/esm/editing/propertyEdits.d.ts +15 -0
  146. package/dist/esm/editing/propertyEdits.d.ts.map +1 -0
  147. package/dist/esm/editing/propertyEdits.js +113 -0
  148. package/dist/esm/editing/propertyEdits.js.map +1 -0
  149. package/dist/esm/editing/resolveEffectiveConfiguration.d.ts +5 -0
  150. package/dist/esm/editing/resolveEffectiveConfiguration.d.ts.map +1 -0
  151. package/dist/esm/editing/resolveEffectiveConfiguration.js +198 -0
  152. package/dist/esm/editing/resolveEffectiveConfiguration.js.map +1 -0
  153. package/dist/esm/editing/resolveTemplateChain.d.ts +4 -0
  154. package/dist/esm/editing/resolveTemplateChain.d.ts.map +1 -0
  155. package/dist/esm/editing/resolveTemplateChain.js +98 -0
  156. package/dist/esm/editing/resolveTemplateChain.js.map +1 -0
  157. package/dist/esm/editing/structureEdits.d.ts +6 -0
  158. package/dist/esm/editing/structureEdits.d.ts.map +1 -0
  159. package/dist/esm/editing/structureEdits.js +227 -0
  160. package/dist/esm/editing/structureEdits.js.map +1 -0
  161. package/dist/esm/editing/validateBinding.d.ts +7 -0
  162. package/dist/esm/editing/validateBinding.d.ts.map +1 -0
  163. package/dist/esm/editing/validateBinding.js +108 -0
  164. package/dist/esm/editing/validateBinding.js.map +1 -0
  165. package/dist/esm/editing/validateValue.d.ts +8 -0
  166. package/dist/esm/editing/validateValue.d.ts.map +1 -0
  167. package/dist/esm/editing/validateValue.js +111 -0
  168. package/dist/esm/editing/validateValue.js.map +1 -0
  169. package/dist/esm/index.d.ts +1 -0
  170. package/dist/esm/index.d.ts.map +1 -1
  171. package/dist/esm/index.js +14 -0
  172. package/dist/esm/index.js.map +1 -1
  173. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  174. package/editing/DescriptorCatalog.ts +51 -0
  175. package/editing/DocumentIndex.ts +73 -0
  176. package/editing/EditOutcome.ts +21 -0
  177. package/editing/EditSession.ts +50 -0
  178. package/editing/EditingContext.ts +23 -0
  179. package/editing/TemplateChain.ts +36 -0
  180. package/editing/applyEdit.ts +69 -0
  181. package/editing/applyEffectiveConfiguration.ts +53 -0
  182. package/editing/collectComponents.ts +36 -0
  183. package/editing/describeNode.ts +61 -0
  184. package/editing/diagnostics.ts +30 -0
  185. package/editing/documentPaths.ts +40 -0
  186. package/editing/exposureEdits.ts +119 -0
  187. package/editing/exposureGrants.ts +159 -0
  188. package/editing/given/a_layout_document.ts +88 -0
  189. package/editing/given/a_scene_document.ts +135 -0
  190. package/editing/index.ts +21 -0
  191. package/editing/indexDocument.ts +237 -0
  192. package/editing/inspect.ts +142 -0
  193. package/editing/instanceEdits.ts +243 -0
  194. package/editing/layoutTypeDescriptors.ts +191 -0
  195. package/editing/layoutTypeEdits.ts +135 -0
  196. package/editing/nodeIds.ts +111 -0
  197. package/editing/pathAccess.ts +81 -0
  198. package/editing/propertyEdits.ts +119 -0
  199. package/editing/resolveEffectiveConfiguration.ts +202 -0
  200. package/editing/resolveTemplateChain.ts +109 -0
  201. package/editing/structureEdits.ts +234 -0
  202. package/editing/validateBinding.ts +103 -0
  203. package/editing/validateValue.ts +130 -0
  204. package/index.ts +1 -0
  205. package/package.json +5 -4
  206. package/dist/esm/for_aggregateContributions/when_aggregating_by_contribution_point.d.ts +0 -2
  207. package/dist/esm/for_aggregateContributions/when_aggregating_by_contribution_point.d.ts.map +0 -1
  208. package/dist/esm/for_aggregateContributions/when_aggregating_by_contribution_point.js +0 -23
  209. package/dist/esm/for_aggregateContributions/when_aggregating_by_contribution_point.js.map +0 -1
  210. package/dist/esm/for_buildStarterProfile/when_checking_against_the_shared_fixture_corpus.d.ts +0 -2
  211. package/dist/esm/for_buildStarterProfile/when_checking_against_the_shared_fixture_corpus.d.ts.map +0 -1
  212. package/dist/esm/for_buildStarterProfile/when_checking_against_the_shared_fixture_corpus.js +0 -16
  213. package/dist/esm/for_buildStarterProfile/when_checking_against_the_shared_fixture_corpus.js.map +0 -1
  214. package/dist/esm/for_computeSizeClass/when_computing_the_size_class.d.ts +0 -2
  215. package/dist/esm/for_computeSizeClass/when_computing_the_size_class.d.ts.map +0 -1
  216. package/dist/esm/for_computeSizeClass/when_computing_the_size_class.js +0 -17
  217. package/dist/esm/for_computeSizeClass/when_computing_the_size_class.js.map +0 -1
  218. package/dist/esm/for_evaluateFlowArrangement/when_evaluating_against_the_shared_fixture_corpus.d.ts +0 -2
  219. package/dist/esm/for_evaluateFlowArrangement/when_evaluating_against_the_shared_fixture_corpus.d.ts.map +0 -1
  220. package/dist/esm/for_evaluateFlowArrangement/when_evaluating_against_the_shared_fixture_corpus.js +0 -43
  221. package/dist/esm/for_evaluateFlowArrangement/when_evaluating_against_the_shared_fixture_corpus.js.map +0 -1
  222. package/dist/esm/for_evaluateFreeformArrangement/when_evaluating_against_the_shared_fixture_corpus.d.ts +0 -2
  223. package/dist/esm/for_evaluateFreeformArrangement/when_evaluating_against_the_shared_fixture_corpus.d.ts.map +0 -1
  224. package/dist/esm/for_evaluateFreeformArrangement/when_evaluating_against_the_shared_fixture_corpus.js +0 -46
  225. package/dist/esm/for_evaluateFreeformArrangement/when_evaluating_against_the_shared_fixture_corpus.js.map +0 -1
  226. package/dist/esm/for_evaluateFreeformSlotArrangement/when_evaluating_against_the_shared_fixture_corpus.d.ts +0 -2
  227. package/dist/esm/for_evaluateFreeformSlotArrangement/when_evaluating_against_the_shared_fixture_corpus.d.ts.map +0 -1
  228. package/dist/esm/for_evaluateFreeformSlotArrangement/when_evaluating_against_the_shared_fixture_corpus.js +0 -25
  229. package/dist/esm/for_evaluateFreeformSlotArrangement/when_evaluating_against_the_shared_fixture_corpus.js.map +0 -1
  230. package/dist/esm/for_incompatibleStarterThemes/when_checking_against_the_shared_fixture_corpus.d.ts +0 -2
  231. package/dist/esm/for_incompatibleStarterThemes/when_checking_against_the_shared_fixture_corpus.d.ts.map +0 -1
  232. package/dist/esm/for_incompatibleStarterThemes/when_checking_against_the_shared_fixture_corpus.js +0 -17
  233. package/dist/esm/for_incompatibleStarterThemes/when_checking_against_the_shared_fixture_corpus.js.map +0 -1
  234. package/dist/esm/for_packageCatalog/when_querying_against_the_shared_fixture_corpus.d.ts +0 -2
  235. package/dist/esm/for_packageCatalog/when_querying_against_the_shared_fixture_corpus.d.ts.map +0 -1
  236. package/dist/esm/for_packageCatalog/when_querying_against_the_shared_fixture_corpus.js +0 -22
  237. package/dist/esm/for_packageCatalog/when_querying_against_the_shared_fixture_corpus.js.map +0 -1
  238. package/dist/esm/for_packageDependencies/fixtures.d.ts +0 -38
  239. package/dist/esm/for_packageDependencies/fixtures.d.ts.map +0 -1
  240. package/dist/esm/for_packageDependencies/fixtures.js +0 -5
  241. package/dist/esm/for_packageDependencies/fixtures.js.map +0 -1
  242. package/dist/esm/for_packageDependencies/when_resolving_against_the_shared_fixture_corpus.d.ts +0 -2
  243. package/dist/esm/for_packageDependencies/when_resolving_against_the_shared_fixture_corpus.d.ts.map +0 -1
  244. package/dist/esm/for_packageDependencies/when_resolving_against_the_shared_fixture_corpus.js +0 -29
  245. package/dist/esm/for_packageDependencies/when_resolving_against_the_shared_fixture_corpus.js.map +0 -1
  246. package/dist/esm/for_packageVersionRange/when_checking_against_the_shared_fixture_corpus.d.ts +0 -2
  247. package/dist/esm/for_packageVersionRange/when_checking_against_the_shared_fixture_corpus.d.ts.map +0 -1
  248. package/dist/esm/for_packageVersionRange/when_checking_against_the_shared_fixture_corpus.js +0 -10
  249. package/dist/esm/for_packageVersionRange/when_checking_against_the_shared_fixture_corpus.js.map +0 -1
  250. package/dist/esm/for_panelKind/when_telling_the_panels_apart.d.ts +0 -2
  251. package/dist/esm/for_panelKind/when_telling_the_panels_apart.d.ts.map +0 -1
  252. package/dist/esm/for_panelKind/when_telling_the_panels_apart.js +0 -38
  253. package/dist/esm/for_panelKind/when_telling_the_panels_apart.js.map +0 -1
  254. package/dist/esm/for_renderElement/when_rendering_a_mixed_tree.d.ts +0 -2
  255. package/dist/esm/for_renderElement/when_rendering_a_mixed_tree.d.ts.map +0 -1
  256. package/dist/esm/for_renderElement/when_rendering_a_mixed_tree.js +0 -46
  257. package/dist/esm/for_renderElement/when_rendering_a_mixed_tree.js.map +0 -1
  258. package/dist/esm/for_resolveBehaviors/when_resolving_additive_attachments.d.ts +0 -2
  259. package/dist/esm/for_resolveBehaviors/when_resolving_additive_attachments.d.ts.map +0 -1
  260. package/dist/esm/for_resolveBehaviors/when_resolving_additive_attachments.js +0 -68
  261. package/dist/esm/for_resolveBehaviors/when_resolving_additive_attachments.js.map +0 -1
  262. package/dist/esm/for_resolveComponentName/when_resolving_against_the_shared_fixture_corpus.d.ts +0 -2
  263. package/dist/esm/for_resolveComponentName/when_resolving_against_the_shared_fixture_corpus.d.ts.map +0 -1
  264. package/dist/esm/for_resolveComponentName/when_resolving_against_the_shared_fixture_corpus.js +0 -20
  265. package/dist/esm/for_resolveComponentName/when_resolving_against_the_shared_fixture_corpus.js.map +0 -1
  266. package/dist/esm/for_resolveScreenTemplates/when_resolving_against_the_shared_fixture_corpus.d.ts +0 -2
  267. package/dist/esm/for_resolveScreenTemplates/when_resolving_against_the_shared_fixture_corpus.d.ts.map +0 -1
  268. package/dist/esm/for_resolveScreenTemplates/when_resolving_against_the_shared_fixture_corpus.js +0 -30
  269. package/dist/esm/for_resolveScreenTemplates/when_resolving_against_the_shared_fixture_corpus.js.map +0 -1
  270. package/dist/esm/for_resolveStrings/when_resolving_a_strings_reference.d.ts +0 -2
  271. package/dist/esm/for_resolveStrings/when_resolving_a_strings_reference.d.ts.map +0 -1
  272. package/dist/esm/for_resolveStrings/when_resolving_a_strings_reference.js +0 -69
  273. package/dist/esm/for_resolveStrings/when_resolving_a_strings_reference.js.map +0 -1
  274. package/dist/esm/for_runActions/given/a_recording_dispatcher.d.ts +0 -21
  275. package/dist/esm/for_runActions/given/a_recording_dispatcher.d.ts.map +0 -1
  276. package/dist/esm/for_runActions/given/a_recording_dispatcher.js +0 -45
  277. package/dist/esm/for_runActions/given/a_recording_dispatcher.js.map +0 -1
  278. package/dist/esm/for_runActions/when_running_a_sequence_of_actions.d.ts +0 -2
  279. package/dist/esm/for_runActions/when_running_a_sequence_of_actions.d.ts.map +0 -1
  280. package/dist/esm/for_runActions/when_running_a_sequence_of_actions.js +0 -126
  281. package/dist/esm/for_runActions/when_running_a_sequence_of_actions.js.map +0 -1
  282. package/dist/esm/for_runActions/when_running_against_the_shared_fixture_corpus.d.ts +0 -2
  283. package/dist/esm/for_runActions/when_running_against_the_shared_fixture_corpus.d.ts.map +0 -1
  284. package/dist/esm/for_runActions/when_running_against_the_shared_fixture_corpus.js +0 -61
  285. package/dist/esm/for_runActions/when_running_against_the_shared_fixture_corpus.js.map +0 -1
  286. package/dist/esm/for_themeCompatibility/when_checking_against_the_shared_fixture_corpus.d.ts +0 -2
  287. package/dist/esm/for_themeCompatibility/when_checking_against_the_shared_fixture_corpus.d.ts.map +0 -1
  288. package/dist/esm/for_themeCompatibility/when_checking_against_the_shared_fixture_corpus.js +0 -18
  289. package/dist/esm/for_themeCompatibility/when_checking_against_the_shared_fixture_corpus.js.map +0 -1
  290. package/for_aggregateContributions/when_aggregating_by_contribution_point.ts +0 -31
  291. package/for_buildStarterProfile/when_checking_against_the_shared_fixture_corpus.ts +0 -32
  292. package/for_computeSizeClass/when_computing_the_size_class.ts +0 -23
  293. package/for_evaluateFlowArrangement/when_evaluating_against_the_shared_fixture_corpus.ts +0 -67
  294. package/for_evaluateFreeformArrangement/when_evaluating_against_the_shared_fixture_corpus.ts +0 -68
  295. package/for_evaluateFreeformSlotArrangement/when_evaluating_against_the_shared_fixture_corpus.ts +0 -47
  296. package/for_incompatibleStarterThemes/when_checking_against_the_shared_fixture_corpus.ts +0 -34
  297. package/for_packageCatalog/when_querying_against_the_shared_fixture_corpus.ts +0 -26
  298. package/for_packageDependencies/fixtures.ts +0 -44
  299. package/for_packageDependencies/when_resolving_against_the_shared_fixture_corpus.ts +0 -39
  300. package/for_packageVersionRange/when_checking_against_the_shared_fixture_corpus.ts +0 -13
  301. package/for_panelKind/when_telling_the_panels_apart.ts +0 -47
  302. package/for_renderElement/when_rendering_a_mixed_tree.ts +0 -58
  303. package/for_resolveBehaviors/when_resolving_additive_attachments.ts +0 -100
  304. package/for_resolveComponentName/when_resolving_against_the_shared_fixture_corpus.ts +0 -36
  305. package/for_resolveScreenTemplates/when_resolving_against_the_shared_fixture_corpus.ts +0 -49
  306. package/for_resolveStrings/when_resolving_a_strings_reference.ts +0 -85
  307. package/for_runActions/given/a_recording_dispatcher.ts +0 -72
  308. package/for_runActions/when_running_a_sequence_of_actions.ts +0 -226
  309. package/for_runActions/when_running_against_the_shared_fixture_corpus.ts +0 -124
  310. package/for_themeCompatibility/when_checking_against_the_shared_fixture_corpus.ts +0 -37
@@ -1,100 +0,0 @@
1
- // Copyright (c) Cratis. All rights reserved.
2
- // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
-
4
- import { Behavior, InteractionActionKind, InteractionTriggerKind } from '@cratis/scene.model';
5
- import { BehaviorAttachment, resolveApplicationTriggerBehaviors, resolveBehaviors } from '../resolveBehaviors';
6
-
7
- const behavior = (name: string | undefined, kind: InteractionTriggerKind, order?: number): Behavior => ({
8
- name,
9
- order,
10
- bindings: [
11
- {
12
- trigger: { kind } as never,
13
- actions: [{ kind: InteractionActionKind.RefreshQuery, query: name ?? 'inline' } as never],
14
- },
15
- ],
16
- });
17
-
18
- describe('when resolving additive attachments', () => {
19
- const attachments: BehaviorAttachment[] = [
20
- { level: 'layout', behaviors: [behavior('LayoutWide', InteractionTriggerKind.Click)] },
21
- { level: 'module', behaviors: [behavior('ModuleWide', InteractionTriggerKind.Click)] },
22
- { level: 'element', behaviors: [behavior(undefined, InteractionTriggerKind.Click)] },
23
- ];
24
-
25
- // The point of the additive rule: a module saying 'confirm every destructive action' does not need every
26
- // screen beneath it to cooperate, and an element attaching its own does not silently cancel it.
27
- it('should run every matching attachment rather than only the most specific', () => {
28
- const resolved = resolveBehaviors(attachments, InteractionTriggerKind.Click);
29
-
30
- resolved.should.have.lengthOf(3);
31
- });
32
-
33
- it('should run the outermost attachment first', () => {
34
- const resolved = resolveBehaviors(attachments, InteractionTriggerKind.Click);
35
-
36
- resolved.map(candidate => candidate.level).should.eql(['layout', 'module', 'element']);
37
- });
38
-
39
- it('should keep an inline behavior anonymous', () => {
40
- const resolved = resolveBehaviors(attachments, InteractionTriggerKind.Click);
41
-
42
- (resolved[2].behaviorName === undefined).should.be.true;
43
- });
44
-
45
- it('should ignore bindings for a different trigger', () => {
46
- const resolved = resolveBehaviors(
47
- [{ level: 'element', behaviors: [behavior('OnSubmitOnly', InteractionTriggerKind.Submit)] }],
48
- InteractionTriggerKind.Click
49
- );
50
-
51
- resolved.should.be.empty;
52
- });
53
-
54
- it('should let an explicit order win over position', () => {
55
- const resolved = resolveBehaviors(
56
- [
57
- { level: 'layout', behaviors: [behavior('LayoutWide', InteractionTriggerKind.Click)] },
58
- { level: 'element', behaviors: [behavior('RunsFirst', InteractionTriggerKind.Click, 1)] },
59
- ],
60
- InteractionTriggerKind.Click
61
- );
62
-
63
- resolved.map(candidate => candidate.behaviorName).should.eql(['RunsFirst', 'LayoutWide']);
64
- });
65
-
66
- // Determinism is the reason this is a pure function over an ordered list: the same document has to produce
67
- // the same order on every run, or an interaction becomes intermittently wrong rather than wrong.
68
- it('should order deterministically across repeated resolutions', () => {
69
- const once = resolveBehaviors(attachments, InteractionTriggerKind.Click).map(c => c.level);
70
- const twice = resolveBehaviors(attachments, InteractionTriggerKind.Click).map(c => c.level);
71
-
72
- once.should.eql(twice);
73
- });
74
-
75
- it('should resolve a named application trigger separately from the built-in kinds', () => {
76
- const resolved = resolveApplicationTriggerBehaviors(
77
- [
78
- {
79
- level: 'screen',
80
- behaviors: [
81
- {
82
- name: undefined,
83
- bindings: [
84
- { trigger: { triggerName: 'InvoiceImported' } as never, actions: [] },
85
- { trigger: { triggerName: 'SomethingElse' } as never, actions: [] },
86
- ],
87
- },
88
- ],
89
- },
90
- ],
91
- 'InvoiceImported'
92
- );
93
-
94
- resolved.should.have.lengthOf(1);
95
- });
96
-
97
- it('should tolerate an attachment with no behaviors at all', () => {
98
- resolveBehaviors([{ level: 'element', behaviors: [] }], InteractionTriggerKind.Click).should.be.empty;
99
- });
100
- });
@@ -1,36 +0,0 @@
1
- // Copyright (c) Cratis. All rights reserved.
2
- // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
-
4
- import { readFileSync } from 'node:fs';
5
- import { join } from 'node:path';
6
- import { UiProfile } from '@cratis/scene.model';
7
- import { ComponentResolution, PackageCatalog, resolveComponentName } from '../index';
8
-
9
- interface FixtureCase {
10
- name: string;
11
- profile: { packages: string[] };
12
- catalog: PackageCatalog;
13
- requestedName: string;
14
- expected: ComponentResolution | null;
15
- }
16
-
17
- interface FixtureCorpus {
18
- cases: FixtureCase[];
19
- }
20
-
21
- const manifestPath = join(import.meta.dirname, '..', '..', '..', '..', 'package-resolution-fixtures.json');
22
- const corpus = JSON.parse(readFileSync(manifestPath, 'utf-8')) as FixtureCorpus;
23
-
24
- describe('when resolving against the shared fixture corpus', () => {
25
- for (const fixtureCase of corpus.cases) {
26
- it(`should match the expected resolution for "${fixtureCase.name}"`, () => {
27
- const profile: UiProfile = { name: 'test', targetPlatform: 'web', packages: fixtureCase.profile.packages };
28
- const actual = resolveComponentName(fixtureCase.requestedName, profile, fixtureCase.catalog);
29
- if (fixtureCase.expected === null) {
30
- (actual === undefined).should.be.true;
31
- } else {
32
- actual!.should.deep.equal(fixtureCase.expected);
33
- }
34
- });
35
- }
36
- });
@@ -1,49 +0,0 @@
1
- // Copyright (c) Cratis. All rights reserved.
2
- // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
-
4
- import { readFileSync } from 'node:fs';
5
- import { join } from 'node:path';
6
- import { Layout, ScreenTemplate } from '@cratis/scene.model';
7
- import { isScreenTemplateResolutionValid, resolveScreenTemplates } from '../index';
8
-
9
- interface FixtureCase {
10
- name: string;
11
- layout: { name: string; slots: string[] };
12
- templates: { name: string; fitsSlot: string | null; slots: string[] }[];
13
- expectedPlacements: { template: string; slot: string; container: string; depth: number }[];
14
- expectedUnplaced: { template: string; slot: string; candidates: string[] }[];
15
- expectedCycles: string[][];
16
- }
17
-
18
- const fixturePath = join(import.meta.dirname, '..', '..', '..', '..', 'screen-template-fixtures.json');
19
- const corpus = JSON.parse(readFileSync(fixturePath, 'utf-8')) as { cases: FixtureCase[] };
20
-
21
- describe('when resolving against the shared fixture corpus', () => {
22
- for (const fixtureCase of corpus.cases) {
23
- const layout: Layout = { name: fixtureCase.layout.name, slots: fixtureCase.layout.slots.map((name) => ({ name })) };
24
- const templates: ScreenTemplate[] = fixtureCase.templates.map((template) => ({
25
- name: template.name,
26
- fitsSlot: template.fitsSlot ?? undefined,
27
- slots: template.slots.map((name) => ({ name })),
28
- }));
29
-
30
- const resolution = resolveScreenTemplates(layout, templates);
31
-
32
- it(`should place every template where the corpus expects for "${fixtureCase.name}"`, () => {
33
- resolution.placements.should.deep.equal(fixtureCase.expectedPlacements);
34
- });
35
-
36
- it(`should report the expected unplaced templates for "${fixtureCase.name}"`, () => {
37
- resolution.unplaced.should.deep.equal(fixtureCase.expectedUnplaced);
38
- });
39
-
40
- it(`should report the expected cycles for "${fixtureCase.name}"`, () => {
41
- resolution.cycles.should.deep.equal(fixtureCase.expectedCycles);
42
- });
43
-
44
- it(`should consider "${fixtureCase.name}" valid only when nothing is wrong`, () => {
45
- const expectedValid = fixtureCase.expectedUnplaced.length === 0 && fixtureCase.expectedCycles.length === 0;
46
- isScreenTemplateResolutionValid(resolution).should.equal(expectedValid);
47
- });
48
- }
49
- });
@@ -1,85 +0,0 @@
1
- // Copyright (c) Cratis. All rights reserved.
2
- // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
-
4
- import { Control, ExternalComponent, HorizontalAlignment, VerticalAlignment, Visibility } from '@cratis/scene.model';
5
- import { isStringsReference, resolveStringsInElement, resolveStringsValue } from '../index';
6
-
7
- const dictionary = {
8
- 'invoice.title': 'Invoices',
9
- 'invoice.number': 'Invoice #',
10
- };
11
-
12
- function control(id: string): Control {
13
- return {
14
- id,
15
- name: id,
16
- properties: {},
17
- visibility: Visibility.Visible,
18
- isEnabled: true,
19
- opacity: 1,
20
- size: {},
21
- zIndex: 0,
22
- minimumSize: {},
23
- maximumSize: {},
24
- margin: { left: 0, top: 0, right: 0, bottom: 0 },
25
- horizontalAlignment: HorizontalAlignment.Stretch,
26
- verticalAlignment: VerticalAlignment.Stretch,
27
- borderThickness: { left: 0, top: 0, right: 0, bottom: 0 },
28
- padding: { left: 0, top: 0, right: 0, bottom: 0 },
29
- tabIndex: 0,
30
- };
31
- }
32
-
33
- function externalComponent(id: string, componentName: string, properties: Record<string, unknown>, slots: Record<string, ExternalComponent[]> = {}): ExternalComponent {
34
- return { ...control(id), componentName, properties, slots };
35
- }
36
-
37
- describe('when telling a strings reference apart from a literal value', () => {
38
- it('should recognize a $strings. reference', () => {
39
- isStringsReference('$strings.invoice.title').should.be.true;
40
- });
41
-
42
- it('should reject a literal value', () => {
43
- isStringsReference('Invoices').should.be.false;
44
- });
45
-
46
- it('should reject a non-string value', () => {
47
- isStringsReference(42).should.be.false;
48
- });
49
- });
50
-
51
- describe('when resolving a single property value', () => {
52
- it('should resolve a reference present in the dictionary', () => {
53
- (resolveStringsValue('$strings.invoice.title', dictionary) as string).should.equal('Invoices');
54
- });
55
-
56
- it('should leave a reference missing from the dictionary as its literal token', () => {
57
- (resolveStringsValue('$strings.invoice.missing', dictionary) as string).should.equal('$strings.invoice.missing');
58
- });
59
-
60
- it('should pass a non-reference value through unchanged', () => {
61
- (resolveStringsValue(42, dictionary) as number).should.equal(42);
62
- });
63
- });
64
-
65
- describe('when resolving references nested inside an external component tree', () => {
66
- const title = externalComponent('title', 'core:title', { text: '$strings.invoice.title' });
67
- const table = externalComponent('table', 'core:table', {}, {
68
- columns: [externalComponent('column', 'core:column', { label: '$strings.invoice.number' })],
69
- });
70
-
71
- const resolvedTitle = resolveStringsInElement(title, dictionary) as ExternalComponent;
72
- const resolvedTable = resolveStringsInElement(table, dictionary) as ExternalComponent;
73
-
74
- it('should resolve a reference at the top of the tree', () => {
75
- (resolvedTitle.properties.text as string).should.equal('Invoices');
76
- });
77
-
78
- it('should leave the original element untouched', () => {
79
- (title.properties.text as string).should.equal('$strings.invoice.title');
80
- });
81
-
82
- it('should resolve a reference nested inside a slot', () => {
83
- (resolvedTable.slots.columns[0].properties.label as string).should.equal('Invoice #');
84
- });
85
- });
@@ -1,72 +0,0 @@
1
- // Copyright (c) Cratis. All rights reserved.
2
- // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
-
4
- import { BindingExpression, NotificationLevel } from '@cratis/scene.model';
5
- import { ActionDispatcher, CommandOutcome, DialogOutcome } from '../../ActionDispatcher';
6
- import { InteractionContext } from '../../runActions';
7
-
8
- /**
9
- * A dispatcher that records what it was asked to do instead of doing it.
10
- *
11
- * The whole point of the engine owning the sequencing is that this is possible: no DOM, no React, no transport -
12
- * the rules are assertable as a list of calls.
13
- */
14
- export class RecordingDispatcher implements ActionDispatcher {
15
- readonly calls: string[] = [];
16
-
17
- commandSucceeds = true;
18
- dialogConfirmed = true;
19
- confirmAnswer = true;
20
-
21
- async executeCommand(command: string, args: Record<string, unknown>): Promise<CommandOutcome> {
22
- this.calls.push(`executeCommand:${command}:${JSON.stringify(args)}`);
23
- return this.commandSucceeds
24
- ? { isSuccess: true }
25
- : { isSuccess: false, validationErrors: [{ member: 'amount', message: 'Must be positive' }] };
26
- }
27
-
28
- navigate(screen: string): void {
29
- this.calls.push(`navigate:${screen}`);
30
- }
31
-
32
- navigateBack(): void {
33
- this.calls.push('navigateBack');
34
- }
35
-
36
- async openDialog(dialogTemplate: string, args: Record<string, unknown>): Promise<DialogOutcome> {
37
- this.calls.push(`openDialog:${dialogTemplate}:${JSON.stringify(args)}`);
38
- return { isConfirmed: this.dialogConfirmed, result: 'the-result' };
39
- }
40
-
41
- closeDialog(): void {
42
- this.calls.push('closeDialog');
43
- }
44
-
45
- async refreshQuery(query: string): Promise<void> {
46
- this.calls.push(`refreshQuery:${query}`);
47
- }
48
-
49
- setState(target: string, value: unknown): void {
50
- this.calls.push(`setState:${target}:${String(value)}`);
51
- }
52
-
53
- notify(level: NotificationLevel, message: string): void {
54
- this.calls.push(`notify:${level}:${message}`);
55
- }
56
-
57
- async confirm(message: string): Promise<boolean> {
58
- this.calls.push(`confirm:${message}`);
59
- return this.confirmAnswer;
60
- }
61
-
62
- async raise(trigger: string): Promise<void> {
63
- this.calls.push(`raise:${trigger}`);
64
- }
65
- }
66
-
67
- /**
68
- * A context that resolves a binding to its path, so an assertion can see which binding was used.
69
- */
70
- export const pathEchoingContext: InteractionContext = {
71
- resolve: (binding: BindingExpression) => `<${binding.path}>`,
72
- };
@@ -1,226 +0,0 @@
1
- // Copyright (c) Cratis. All rights reserved.
2
- // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
-
4
- import { InteractionAction, InteractionActionKind, NotificationLevel } from '@cratis/scene.model';
5
- import { InteractionStop, runActions } from '../runActions';
6
- import { pathEchoingContext, RecordingDispatcher } from './given/a_recording_dispatcher';
7
-
8
- const action = (kind: InteractionActionKind, extra: Record<string, unknown> = {}): InteractionAction =>
9
- ({ kind, ...extra }) as InteractionAction;
10
-
11
- describe('when running a sequence of actions', () => {
12
- it('should run them in the order they were declared', async () => {
13
- const dispatcher = new RecordingDispatcher();
14
-
15
- await runActions(
16
- [
17
- action(InteractionActionKind.RefreshQuery, { query: 'Invoices' }),
18
- action(InteractionActionKind.Notify, { level: NotificationLevel.Info, message: { text: 'Done' } }),
19
- ],
20
- dispatcher,
21
- pathEchoingContext
22
- );
23
-
24
- dispatcher.calls.should.eql(['refreshQuery:Invoices', 'notify:Info:Done']);
25
- });
26
-
27
- it('should resolve an action\'s arguments through the binding resolver', async () => {
28
- const dispatcher = new RecordingDispatcher();
29
-
30
- await runActions(
31
- [
32
- action(InteractionActionKind.ExecuteCommand, {
33
- command: 'CancelInvoice',
34
- arguments: [{ name: 'invoiceId', value: { path: 'item.invoiceId' } }],
35
- }),
36
- ],
37
- dispatcher,
38
- pathEchoingContext
39
- );
40
-
41
- dispatcher.calls.should.eql(['executeCommand:CancelInvoice:{"invoiceId":"<item.invoiceId>"}']);
42
- });
43
-
44
- it('should take the success branch when a command succeeds', async () => {
45
- const dispatcher = new RecordingDispatcher();
46
-
47
- const run = await runActions(
48
- [
49
- action(InteractionActionKind.ExecuteCommand, {
50
- command: 'RegisterInvoice',
51
- onSuccess: [action(InteractionActionKind.CloseDialog)],
52
- onFailure: [action(InteractionActionKind.Notify, { level: NotificationLevel.Error, message: { text: 'Failed' } })],
53
- }),
54
- ],
55
- dispatcher,
56
- pathEchoingContext
57
- );
58
-
59
- dispatcher.calls.should.eql(['executeCommand:RegisterInvoice:{}', 'closeDialog']);
60
- run.stop.should.equal(InteractionStop.Completed);
61
- });
62
-
63
- it('should take the failure branch when a command fails', async () => {
64
- const dispatcher = new RecordingDispatcher();
65
- dispatcher.commandSucceeds = false;
66
-
67
- await runActions(
68
- [
69
- action(InteractionActionKind.ExecuteCommand, {
70
- command: 'RegisterInvoice',
71
- onSuccess: [action(InteractionActionKind.CloseDialog)],
72
- onFailure: [action(InteractionActionKind.Notify, { level: NotificationLevel.Error, message: { text: 'Failed' } })],
73
- }),
74
- ],
75
- dispatcher,
76
- pathEchoingContext
77
- );
78
-
79
- dispatcher.calls.should.eql(['executeCommand:RegisterInvoice:{}', 'notify:Error:Failed']);
80
- });
81
-
82
- // A confirm exists to gate what follows it. If a decline let the rest run, the gate would be decorative.
83
- it('should stop the sequence when a confirm is declined', async () => {
84
- const dispatcher = new RecordingDispatcher();
85
- dispatcher.confirmAnswer = false;
86
-
87
- const run = await runActions(
88
- [
89
- action(InteractionActionKind.Confirm, {
90
- message: { text: 'Are you sure?' },
91
- onSuccess: [action(InteractionActionKind.ExecuteCommand, { command: 'CancelInvoice' })],
92
- }),
93
- action(InteractionActionKind.Notify, { level: NotificationLevel.Info, message: { text: 'Cancelled' } }),
94
- ],
95
- dispatcher,
96
- pathEchoingContext
97
- );
98
-
99
- dispatcher.calls.should.eql(['confirm:Are you sure?']);
100
- run.stop.should.equal(InteractionStop.Declined);
101
- });
102
-
103
- it('should run the gated actions when a confirm is accepted', async () => {
104
- const dispatcher = new RecordingDispatcher();
105
-
106
- await runActions(
107
- [
108
- action(InteractionActionKind.Confirm, {
109
- message: { text: 'Are you sure?' },
110
- onSuccess: [action(InteractionActionKind.ExecuteCommand, { command: 'CancelInvoice' })],
111
- }),
112
- ],
113
- dispatcher,
114
- pathEchoingContext
115
- );
116
-
117
- dispatcher.calls.should.eql(['confirm:Are you sure?', 'executeCommand:CancelInvoice:{}']);
118
- });
119
-
120
- // The screen the remaining actions were written for is gone. The compiler reports this as unreachable, so
121
- // reaching it at runtime means the document changed underneath - still not a reason to run them.
122
- it('should stop the sequence after a navigation', async () => {
123
- const dispatcher = new RecordingDispatcher();
124
-
125
- const run = await runActions(
126
- [
127
- action(InteractionActionKind.Navigate, { screen: 'InvoiceList' }),
128
- action(InteractionActionKind.Notify, { level: NotificationLevel.Info, message: { text: 'Never runs' } }),
129
- ],
130
- dispatcher,
131
- pathEchoingContext
132
- );
133
-
134
- dispatcher.calls.should.eql(['navigate:InvoiceList']);
135
- run.stop.should.equal(InteractionStop.Navigated);
136
- });
137
-
138
- it('should stop the sequence after navigating back', async () => {
139
- const dispatcher = new RecordingDispatcher();
140
-
141
- const run = await runActions(
142
- [action(InteractionActionKind.NavigateBack), action(InteractionActionKind.CloseDialog)],
143
- dispatcher,
144
- pathEchoingContext
145
- );
146
-
147
- dispatcher.calls.should.eql(['navigateBack']);
148
- run.stop.should.equal(InteractionStop.Navigated);
149
- });
150
-
151
- it('should run a dialog\'s result continuation after it closes', async () => {
152
- const dispatcher = new RecordingDispatcher();
153
-
154
- await runActions(
155
- [
156
- action(InteractionActionKind.OpenDialog, {
157
- dialogTemplate: 'InvoiceDetails',
158
- arguments: [{ name: 'invoiceId', value: { path: 'item.invoiceId' } }],
159
- onResult: [action(InteractionActionKind.RefreshQuery, { query: 'Invoices' })],
160
- }),
161
- ],
162
- dispatcher,
163
- pathEchoingContext
164
- );
165
-
166
- dispatcher.calls.should.eql([
167
- 'openDialog:InvoiceDetails:{"invoiceId":"<item.invoiceId>"}',
168
- 'refreshQuery:Invoices',
169
- ]);
170
- });
171
-
172
- it('should resolve a message from a binding when it has one', async () => {
173
- const dispatcher = new RecordingDispatcher();
174
-
175
- await runActions(
176
- [action(InteractionActionKind.Notify, { level: NotificationLevel.Info, message: { binding: { path: 'state.message' } } })],
177
- dispatcher,
178
- pathEchoingContext
179
- );
180
-
181
- dispatcher.calls.should.eql(['notify:Info:<state.message>']);
182
- });
183
-
184
- it('should localize a message given a strings key', async () => {
185
- const dispatcher = new RecordingDispatcher();
186
-
187
- await runActions(
188
- [action(InteractionActionKind.Notify, { level: NotificationLevel.Info, message: { stringsKey: 'invoiceRegistered' } })],
189
- dispatcher,
190
- { resolve: () => undefined, localize: key => `localized(${key})` }
191
- );
192
-
193
- dispatcher.calls.should.eql(['notify:Info:localized(invoiceRegistered)']);
194
- });
195
-
196
- // Fail closed and visible: an action kind this engine does not know is reported, and the rest of the
197
- // sequence is abandoned rather than half-applied silently.
198
- it('should report an action kind it does not know instead of ignoring it', async () => {
199
- const dispatcher = new RecordingDispatcher();
200
-
201
- const run = await runActions(
202
- [action('SomethingFromALaterVersion' as InteractionActionKind)],
203
- dispatcher,
204
- pathEchoingContext
205
- );
206
-
207
- dispatcher.calls.should.be.empty;
208
- run.stop.should.equal(InteractionStop.Reported);
209
- run.findings.should.have.lengthOf(1);
210
- run.findings[0].kind.should.equal('unknownAction');
211
- run.findings[0].detail.should.contain('SomethingFromALaterVersion');
212
- });
213
-
214
- it('should report a message binding that resolved to nothing', async () => {
215
- const dispatcher = new RecordingDispatcher();
216
-
217
- const run = await runActions(
218
- [action(InteractionActionKind.Confirm, { message: { binding: { path: 'state.missing' } } })],
219
- dispatcher,
220
- { resolve: () => undefined }
221
- );
222
-
223
- run.findings[0].kind.should.equal('unresolvedMessage');
224
- run.findings[0].detail.should.contain('state.missing');
225
- });
226
- });