@cratis/pi 8.4.1 → 8.6.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 (286) hide show
  1. package/package/corpus/harnesses/copilot/instructions/ai-distribution.instructions.md +2 -1
  2. package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md +1 -1
  3. package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +5 -3
  4. package/package/corpus/harnesses/copilot/instructions/react.instructions.md +3 -1
  5. package/package/corpus/harnesses/copilot/instructions/reactors.instructions.md +3 -1
  6. package/package/corpus/harnesses/copilot/instructions/scripting.instructions.md +2 -1
  7. package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +6 -3
  8. package/package/corpus/harnesses/copilot/instructions/vertical-slices.instructions.md +5 -2
  9. package/package/corpus/hooks/scripts/cratis-guard-secrets.sh +131 -9
  10. package/package/corpus/rules/ai-distribution.md +2 -1
  11. package/package/corpus/rules/exit-codes-and-wrappers.md +1 -1
  12. package/package/corpus/rules/glossary.md +5 -3
  13. package/package/corpus/rules/react.md +3 -1
  14. package/package/corpus/rules/reactors.md +3 -1
  15. package/package/corpus/rules/scripting.md +2 -1
  16. package/package/corpus/rules/specs.csharp.md +6 -3
  17. package/package/corpus/rules/vertical-slices.md +5 -2
  18. package/package/corpus/skills/cratis-application-growth/SKILL.md +1 -2
  19. package/package/corpus/skills/cratis-application-growth/references/csharp.md +1 -3
  20. package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +1 -2
  21. package/package/corpus/skills/cratis-application-growth/references/rename-window.md +1 -3
  22. package/package/corpus/skills/cratis-application-growth/references/service-and-delivery.md +3 -2
  23. package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
  24. package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +3 -3
  25. package/package/corpus/skills/cratis-arc-authorize-request/references/authproxy.md +47 -3
  26. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp-query-security.md +18 -3
  27. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +12 -3
  28. package/package/corpus/skills/cratis-arc-authorize-request/references/typescript.md +2 -0
  29. package/package/corpus/skills/cratis-arc-connect-storage/references/csharp.md +1 -0
  30. package/package/corpus/skills/cratis-arc-connect-storage/references/elixir.md +9 -2
  31. package/package/corpus/skills/cratis-arc-declare-command/SKILL.md +2 -0
  32. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-chronicle.md +47 -8
  33. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-controller.md +3 -1
  34. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-history.md +6 -3
  35. package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +38 -11
  36. package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
  37. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp-abilities.md +2 -2
  38. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp-recovery.md +6 -4
  39. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp.md +2 -2
  40. package/package/corpus/skills/cratis-arc-diagnose-live-query/SKILL.md +1 -1
  41. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/csharp.md +29 -7
  42. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/java.md +1 -1
  43. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/kotlin.md +1 -1
  44. package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/csharp-diagnose-tool-call.md +9 -7
  45. package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/csharp.md +52 -1
  46. package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +4 -2
  47. package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +36 -10
  48. package/package/corpus/skills/cratis-arc-expose-query/references/go.md +2 -2
  49. package/package/corpus/skills/cratis-arc-expose-query/references/typescript.md +6 -3
  50. package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +1 -0
  51. package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +55 -6
  52. package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +9 -0
  53. package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
  54. package/package/corpus/skills/cratis-arc-host-application/references/csharp-configuration.md +54 -0
  55. package/package/corpus/skills/cratis-arc-host-application/references/csharp-deployment.md +98 -0
  56. package/package/corpus/skills/cratis-arc-host-application/references/csharp-http.md +9 -1
  57. package/package/corpus/skills/cratis-arc-host-application/references/csharp-identity.md +87 -4
  58. package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +9 -0
  59. package/package/corpus/skills/cratis-arc-invoke-command/references/csharp-extensions.md +4 -0
  60. package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +2 -1
  61. package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +19 -2
  62. package/package/corpus/skills/cratis-arc-isolate-tenant/references/csharp.md +4 -2
  63. package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +2 -0
  64. package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +33 -36
  65. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-commands.md +18 -3
  66. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-host.md +94 -19
  67. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-identity.md +29 -5
  68. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-instant-feedback.md +81 -0
  69. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-localization.md +80 -0
  70. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-navigation.md +103 -0
  71. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-queries.md +41 -2
  72. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-structure.md +117 -0
  73. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript.md +8 -4
  74. package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +3 -3
  75. package/package/corpus/skills/cratis-arc-react-separate-view-model/references/typescript.md +27 -6
  76. package/package/corpus/skills/cratis-arc-testing-typescript/references/typescript.md +2 -2
  77. package/package/corpus/skills/cratis-arc-validate-command/references/csharp-rules.md +23 -2
  78. package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +28 -2
  79. package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +1 -0
  80. package/package/corpus/skills/cratis-authproxy-configure/SKILL.md +136 -0
  81. package/package/corpus/skills/cratis-authproxy-configure/references/admission.md +125 -0
  82. package/package/corpus/skills/cratis-authproxy-configure/references/aspire.md +154 -0
  83. package/package/corpus/skills/cratis-authproxy-configure/references/operations.md +122 -0
  84. package/package/corpus/skills/cratis-authproxy-configure/references/services-and-routing.md +114 -0
  85. package/package/corpus/skills/cratis-authproxy-configure/references/sessions-and-logout.md +126 -0
  86. package/package/corpus/skills/cratis-authproxy-configure/references/sign-in-providers.md +116 -0
  87. package/package/corpus/skills/cratis-authproxy-configure/references/tenant-resolution.md +135 -0
  88. package/package/corpus/skills/cratis-choreography-run-workflow/SKILL.md +117 -0
  89. package/package/corpus/skills/cratis-choreography-run-workflow/references/csharp-chronicle.md +164 -0
  90. package/package/corpus/skills/cratis-choreography-run-workflow/references/csharp.md +354 -0
  91. package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +6 -6
  92. package/package/corpus/skills/cratis-chronicle-cli-operations/references/inspection.md +11 -3
  93. package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +50 -0
  94. package/package/corpus/skills/cratis-chronicle-cli-operations/references/recovery-and-comparison.md +17 -3
  95. package/package/corpus/skills/cratis-chronicle-cli-operations/references/setup-and-target.md +8 -2
  96. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp-services.md +13 -2
  97. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +12 -0
  98. package/package/corpus/skills/cratis-chronicle-connect-application/references/kotlin.md +2 -0
  99. package/package/corpus/skills/cratis-chronicle-connect-application/references/python.md +2 -2
  100. package/package/corpus/skills/cratis-chronicle-connect-application/references/typescript.md +10 -1
  101. package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +9 -2
  102. package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +35 -3
  103. package/package/corpus/skills/cratis-chronicle-constrain-append/references/go.md +1 -1
  104. package/package/corpus/skills/cratis-chronicle-constrain-append/references/operations.md +70 -0
  105. package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +6 -3
  106. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/configuration.md +113 -16
  107. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/container-and-kubernetes.md +293 -0
  108. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/kernel-options.md +16 -9
  109. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/network-and-tls.md +60 -7
  110. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +124 -2
  111. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/upgrade-and-recovery.md +36 -1
  112. package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +12 -0
  113. package/package/corpus/skills/cratis-chronicle-evolve-event/references/csharp.md +2 -2
  114. package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +15 -5
  115. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +9 -8
  116. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/go.md +2 -2
  117. package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +1 -1
  118. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +1 -1
  119. package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +2 -2
  120. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-fluent.md +15 -4
  121. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-model-bound.md +4 -1
  122. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-reading.md +5 -2
  123. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +23 -0
  124. package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +1 -0
  125. package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +2 -1
  126. package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +3 -1
  127. package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +4 -3
  128. package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +3 -1
  129. package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +3 -1
  130. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp-scopes.md +41 -4
  131. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +22 -4
  132. package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +7 -0
  133. package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +9 -1
  134. package/package/corpus/skills/cratis-chronicle-protect-decision/references/java.md +8 -0
  135. package/package/corpus/skills/cratis-chronicle-protect-decision/references/kotlin.md +9 -0
  136. package/package/corpus/skills/cratis-chronicle-protect-decision/references/typescript.md +7 -0
  137. package/package/corpus/skills/cratis-chronicle-protect-personal-data/SKILL.md +1 -1
  138. package/package/corpus/skills/cratis-chronicle-protect-personal-data/references/csharp.md +28 -3
  139. package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +7 -6
  140. package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +41 -0
  141. package/package/corpus/skills/cratis-chronicle-publish-contract/references/elixir-integrations.md +3 -3
  142. package/package/corpus/skills/cratis-chronicle-publish-contract/references/webhook-signature-wire-format.md +82 -0
  143. package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +19 -1
  144. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp-outputs.md +3 -1
  145. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp-pages.md +1 -1
  146. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +37 -4
  147. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/elixir.md +11 -0
  148. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +2 -1
  149. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -0
  150. package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +3 -3
  151. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp-coordination.md +31 -2
  152. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp-history.md +21 -4
  153. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +20 -2
  154. package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
  155. package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +1 -1
  156. package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -0
  157. package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +2 -1
  158. package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +3 -1
  159. package/package/corpus/skills/cratis-chronicle-reduce-state/references/java.md +10 -1
  160. package/package/corpus/skills/cratis-chronicle-reduce-state/references/kotlin.md +10 -1
  161. package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +27 -5
  162. package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +18 -0
  163. package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +21 -1
  164. package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +13 -0
  165. package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +15 -0
  166. package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +15 -0
  167. package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +16 -0
  168. package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +1 -1
  169. package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +4 -3
  170. package/package/corpus/skills/cratis-ci-pipeline-performance/references/publish-pipelines.md +19 -4
  171. package/package/corpus/skills/cratis-code-review/SKILL.md +6 -2
  172. package/package/corpus/skills/cratis-code-review/references/csharp-diagnostics.md +28 -2
  173. package/package/corpus/skills/cratis-code-review/references/csharp.md +4 -4
  174. package/package/corpus/skills/cratis-commits-and-pull-requests/SKILL.md +6 -38
  175. package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-description.md +2 -0
  176. package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-labels-and-release.md +5 -4
  177. package/package/corpus/skills/cratis-commits-and-pull-requests/references/workflow-inputs.md +39 -0
  178. package/package/corpus/skills/cratis-components-accessibility/SKILL.md +6 -8
  179. package/package/corpus/skills/cratis-components-accessibility/references/typescript.md +32 -14
  180. package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +4 -3
  181. package/package/corpus/skills/cratis-components-build-canvas/references/typescript-props.md +1 -1
  182. package/package/corpus/skills/cratis-components-build-canvas/references/typescript.md +4 -2
  183. package/package/corpus/skills/cratis-components-choose-control/SKILL.md +13 -7
  184. package/package/corpus/skills/cratis-components-choose-control/references/from-primereact.md +116 -0
  185. package/package/corpus/skills/cratis-components-choose-control/references/menu.md +90 -0
  186. package/package/corpus/skills/cratis-components-choose-control/references/typescript-composition.md +48 -0
  187. package/package/corpus/skills/cratis-components-choose-control/references/typescript.md +2 -2
  188. package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +2 -1
  189. package/package/corpus/skills/cratis-components-compose-toolbar/references/floating-toolbar.md +146 -0
  190. package/package/corpus/skills/cratis-components-diagnose-screen/SKILL.md +102 -0
  191. package/package/corpus/skills/cratis-components-display-list/SKILL.md +10 -10
  192. package/package/corpus/skills/cratis-components-display-list/references/typescript-custom-panel.md +74 -0
  193. package/package/corpus/skills/cratis-components-display-list/references/typescript-datatables.md +2 -7
  194. package/package/corpus/skills/cratis-components-display-list/references/typescript.md +3 -2
  195. package/package/corpus/skills/cratis-components-submit-form/SKILL.md +6 -6
  196. package/package/corpus/skills/cratis-components-submit-form/references/typescript-commanddialog.md +21 -1
  197. package/package/corpus/skills/cratis-components-submit-form/references/typescript-commandform.md +72 -2
  198. package/package/corpus/skills/cratis-components-submit-form/references/typescript.md +7 -5
  199. package/package/corpus/skills/cratis-components-theme-application/SKILL.md +17 -15
  200. package/package/corpus/skills/cratis-components-theme-application/references/localization.md +166 -0
  201. package/package/corpus/skills/cratis-components-theme-application/references/typescript.md +18 -14
  202. package/package/corpus/skills/cratis-components-theme-application/references/upgrade-from-previous-major.md +141 -0
  203. package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +2 -0
  204. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp-domain-philosophy.md +31 -3
  205. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp-fundamentals-helpers.md +119 -0
  206. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp.md +4 -0
  207. package/package/corpus/skills/cratis-fundamentals-concept/references/csharp-serialization.md +72 -1
  208. package/package/corpus/skills/cratis-fundamentals-concept/references/csharp.md +9 -0
  209. package/package/corpus/skills/cratis-fundamentals-concept/references/go.md +2 -1
  210. package/package/corpus/skills/cratis-fundamentals-concept/references/java-json.md +3 -2
  211. package/package/corpus/skills/cratis-fundamentals-concept/references/kotlin-json.md +3 -2
  212. package/package/corpus/skills/cratis-fundamentals-concept/references/typescript-serialization.md +41 -2
  213. package/package/corpus/skills/cratis-fundamentals-name-value/SKILL.md +8 -7
  214. package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +2 -1
  215. package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +3 -3
  216. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/csharp-diagnostics.md +8 -0
  217. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/csharp.md +2 -2
  218. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/go-dependency-injection.md +3 -0
  219. package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +6 -4
  220. package/package/corpus/skills/cratis-modeling-design-event-model/references/command-inventory.md +7 -1
  221. package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +13 -1
  222. package/package/corpus/skills/cratis-modeling-design-event-model/references/review-one-slice.md +6 -0
  223. package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +6 -6
  224. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/csharp-aspire.md +116 -28
  225. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/docker-compose.md +2 -2
  226. package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +46 -0
  227. package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +4 -2
  228. package/package/corpus/skills/cratis-platform-build-application/SKILL.md +8 -0
  229. package/package/corpus/skills/cratis-platform-build-application/references/cratis-identity.md +71 -0
  230. package/package/corpus/skills/cratis-platform-build-application/references/studio-repository.md +96 -0
  231. package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +14 -8
  232. package/package/corpus/skills/cratis-platform-deliver-slice/references/csharp.md +167 -3
  233. package/package/corpus/skills/cratis-platform-deliver-slice/references/eventual-consistency.md +150 -0
  234. package/package/corpus/skills/cratis-platform-deliver-slice/references/typescript.md +14 -1
  235. package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +1 -1
  236. package/package/corpus/skills/cratis-platform-prepare-release-pr/SKILL.md +8 -8
  237. package/package/corpus/skills/cratis-platform-prepare-release-pr/references/product-release-checks.md +16 -2
  238. package/package/corpus/skills/cratis-platform-start-application/SKILL.md +21 -0
  239. package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +77 -3
  240. package/package/corpus/skills/cratis-platform-upgrade-application/SKILL.md +118 -0
  241. package/package/corpus/skills/cratis-platform-upgrade-application/references/csharp.md +117 -0
  242. package/package/corpus/skills/cratis-platform-upgrade-application/references/java.md +53 -0
  243. package/package/corpus/skills/cratis-platform-upgrade-application/references/kotlin.md +53 -0
  244. package/package/corpus/skills/cratis-platform-upgrade-application/references/typescript.md +71 -0
  245. package/package/corpus/skills/cratis-release-notes/SKILL.md +1 -1
  246. package/package/corpus/skills/cratis-release-notes/references/publish-repair.md +6 -3
  247. package/package/corpus/skills/cratis-screenplay-accept-model/references/csharp.md +34 -3
  248. package/package/corpus/skills/cratis-screenplay-accept-model/references/read-the-evidence.md +84 -3
  249. package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +7 -11
  250. package/package/corpus/skills/cratis-screenplay-declare-slice/references/commands.md +8 -4
  251. package/package/corpus/skills/cratis-screenplay-declare-slice/references/projections.md +2 -0
  252. package/package/corpus/skills/cratis-screenplay-declare-slice/references/structure-and-imports.md +29 -1
  253. package/package/corpus/skills/cratis-screenplay-edit-workspace/SKILL.md +2 -1
  254. package/package/corpus/skills/cratis-screenplay-edit-workspace/references/mcp-tools.md +1 -1
  255. package/package/corpus/skills/cratis-screenplay-handoff-slice/references/csharp.md +13 -1
  256. package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +1 -1
  257. package/package/corpus/skills/cratis-screenplay-model-translation/references/boundary-diagnostics.md +1 -1
  258. package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +30 -51
  259. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/cli.md +19 -2
  260. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/smallest-model.md +87 -0
  261. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/studio.md +5 -0
  262. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/typescript.md +13 -0
  263. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/workspace-mcp.md +5 -0
  264. package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +8 -12
  265. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/running-mcp.md +12 -0
  266. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/scenarios.md +2 -2
  267. package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +2 -0
  268. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-colocated.md +101 -0
  269. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +4 -2
  270. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-decision-reads.md +1 -0
  271. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-events.md +7 -0
  272. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-integration.md +7 -4
  273. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-reactors.md +18 -5
  274. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-read-models.md +4 -2
  275. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +35 -2
  276. package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +2 -0
  277. package/package/corpus/skills/cratis-specifications-exercise-backend/references/typescript.md +4 -2
  278. package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +1 -1
  279. package/package/corpus/skills/cratis-specifications-isolate-behavior/references/csharp-running.md +10 -3
  280. package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript.md +22 -4
  281. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -1
  282. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/references/typescript.md +40 -0
  283. package/package/corpus/skills/cratis-stage-render-slice/SKILL.md +6 -0
  284. package/package/corpus/skills/cratis-stage-render-slice/references/semantic-conformance.md +64 -0
  285. package/package/profile-catalog.json +15 -0
  286. package/package.json +1 -1
@@ -16,11 +16,11 @@
16
16
 
17
17
  ## Default
18
18
 
19
- Follow the repository's own label scheme. Check whether it calls Cratis policy, runs `cratis/release-action`, or both. Policy checks the intent; it does not publish. When the repository derives releases from pull requests, the label on a merged change tells the action whether and how to bump the version.
19
+ Follow the repository's own label scheme. Check whether it calls Cratis policy, runs `cratis/release-action`, or both. Policy checks the intent; it does not publish. When the repository derives releases from pull requests, the label on a merged change tells the action whether and how to bump the version. The action bumps from the highest stable release; without one, from the highest version tag; without either, or if the lookup fails, from `0.0.0`. The label selects only the bump: `minor` and `patch` stay on that base's major and `major` advances it. No label targets an older major's maintenance line. `no-release` leaves that pull request's bump and notes out of any release, but in batch mode its merge can still trigger a release of other pending changes. Where a product supports an older major, ship the fix through that product's maintenance route; see `cratis-platform-prepare-release-pr` for product-specific release checks.
20
20
 
21
21
  ## The four labels
22
22
 
23
- Choose by what a consumer observes after upgrading, not by which folder changed.
23
+ Choose by what a consumer observes after upgrading, not by which folder changed. The table gives the default meanings; the Cratis Go SDKs are still v0.x and label a breaking change `minor` (see below).
24
24
 
25
25
  | Label | Consumer impact |
26
26
  | --- | --- |
@@ -30,6 +30,7 @@ Choose by what a consumer observes after upgrading, not by which folder changed.
30
30
  | `no-release` | Nothing they compile against, run or observe changes |
31
31
 
32
32
  - Set **exactly one**. In single-PR mode, conflicting intent stops the release decision with `reason=error`; a merged PR without intent yields `reason=no-label`. A caller can fail its Publish workflow on these reasons; the decision alone need not fail the run. The enabled policy intent check rejects both on applicable pull requests into `main`.
33
+ - The Cratis Go SDKs are still v0.x: label a breaking change `minor` and a compatible fix `patch`, and state the break explicitly in the description. Their `major` check fails while the repository's `GO_RELEASE_MAJOR_CEILING` variable is `0`, the default, because the bump would publish v1.0.0. Approval alone does not pass it: a maintainer sets the ceiling to `1` for an approved v1 launch. See `cratis-platform-prepare-release-pr` for product-specific release checks.
33
34
  - `no-release` is a decision, not an omission. It does not excuse the pull request from any required check: a workflow or spec change can break the pipeline for everyone without ever being released.
34
35
  - If a consumer could not tell the difference by upgrading, there is nothing to version. An unnecessary `patch` burns a version and buries the releases that matter. When genuinely unsure, ask.
35
36
  - Use only `no-release` for Dependabot pull requests. The policy intent check exempts them and the release action skips them. The `major`, `minor` or `patch` Dependabot adds describes the dependency's version, not this product's.
@@ -63,7 +64,7 @@ gh pr create --title "<title>" --body-file <pr-body> --label patch --assignee @m
63
64
  gh pr edit 123 --remove-label minor --add-label patch
64
65
  ```
65
66
 
66
- Fix a wrong label in one edit. Whether it starts a new policy run depends on the repository's subscribed events. Policy prefers live metadata but can fall back to the event payload. Before merging, require every applicable check on the exact pushed head, not only policy.
67
+ Fix a wrong label in one edit. Whether the edit starts a new policy run depends on the repository's subscribed events. The shared release-notes and release-intent checks read the pull request's current labels, so re-running them after the fix picks up the new label. When they cannot read the pull request, for example because the caller does not grant `pull-requests: read`, they use the triggering event's labels and a re-run does not see the fix. The Go SDKs' separate `major` check differs by repository: Arc.Go and Chronicle.Go use only the triggering event's labels and need a new pull request event, such as the label edit itself; Fundamentals.Go reads the current labels and fails if it cannot. A new event works for all three. Before merging, require every applicable check on the exact pushed head, not only policy.
67
68
 
68
69
  ## Confirm publication and recover failures
69
70
 
@@ -71,7 +72,7 @@ Check the decision reason, then verify the release tag points to the intended co
71
72
 
72
73
  - Wrong label on a merged single-PR release that did not publish: a `push`-triggered release can pick up the corrected label on retry because it looks up the pull request. A `pull_request` retry replays the original event. Use `cratis-release-notes` for authorized recovery if this is not a clean retry.
73
74
  - A concurrent run claimed the tag for a different commit: first confirm who owns the tag and whether the intended change already shipped. Retry a calculated-version run so it can choose a new version. Do not retry with the same fixed manual version; an authorized manual release needs an unused version.
74
- - Batches net reverts and exclude `no-release` and Dependabot before evaluating `hotfix`. An eligible hotfix bypasses the window for the whole pending batch; a pending `major` causes the hotfix merge run to fail and other automatic runs can leave the batch pending. Hand off major approval and batch or partial publication repair through `cratis-release-notes` rather than treating a label edit as recovery.
75
+ - Batches net a revert only when its description references an earlier pull request in the collected range with GitHub's revert text: a `Reverts Owner/Repo#n` line for this repository, or `This reverts commit <full sha>` naming that pull request's merge commit. A plain inverse change is not netted. Batches then exclude `no-release` and Dependabot before evaluating `hotfix`. An eligible hotfix bypasses the window for the whole pending batch. While the batch holds both a hotfix and a `major`, the hotfix's own merge run fails with `error` naming the major pull request, and other automatic runs warn and leave it `batched`. A retry re-evaluates the current batch, so it can end differently, for example `nothing-pending` once the range is released. A manual Publish run with an empty or `0.0.0` version skips the window and this hold, but the other batch checks still apply, such as `no-label`, `nothing-pending` or `already-released`. Hand off major approval and batch or partial publication repair through `cratis-release-notes` rather than treating a label edit as recovery.
75
76
 
76
77
  ## Group related work into one pull request
77
78
 
@@ -0,0 +1,39 @@
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
+ # Workflow inputs and outputs
5
+
6
+ ## Policy workflow inputs
7
+
8
+ Check the caller's workflow for which inputs its referenced policy supports.
9
+
10
+ - `runs-on` — select a different runner when the normal runner cannot run policy.
11
+ - `release-intent` — control the `main` release-label gate; use only when the repository deliberately differs.
12
+ - `extra-allowed` — allow additional root Markdown file names, comma-separated.
13
+ - `extra-allowed-paths` — allow additional documentation directory prefixes, comma-separated.
14
+ - `agent-authors` — list agent logins (comma- or newline-separated) to warn when a valid trace is missing on checked pull requests.
15
+ - `require-agent-trace` — make that warning a failure for listed authors, regardless of label.
16
+
17
+ ## Release-action inputs and outputs
18
+
19
+ For workflow maintainers; use the repository's existing publication workflow when delivering a pull request.
20
+
21
+ - `github-token` — supply a token when the workflow token cannot read pull requests or write releases with the required scopes.
22
+ - `version` — use an explicit version for an authorized manual release instead of deriving it from intent.
23
+ - `release-notes` — supply the body for an explicit manual release when no pull request body will be read.
24
+ - `tag-prefix` — align version tags with a repository's naming convention.
25
+ - `major-labels` — map alternate labels to a breaking release.
26
+ - `minor-labels` — map alternate labels to a compatible feature release.
27
+ - `patch-labels` — map alternate labels to a fix release.
28
+ - `no-release-labels` — map alternate labels to intentional non-publication.
29
+ - `release-window` — opt into batching by setting the wait in minutes; use a scheduled trigger and serialize publication across triggers.
30
+ - `hotfix-labels` — map alternate labels to bypass the release window.
31
+ - `close-resolved-issues` — turn off issue closing when the workflow should only publish; enabled closing requires `issues: write`.
32
+ - `should-publish` — gate downstream publication jobs on intent after the release job succeeds.
33
+ - `version` (output) — version to publish under.
34
+ - `tag` — release tag to verify against the intended commit.
35
+ - `prerelease` — select prerelease artifact handling.
36
+ - `isolated-for-pull-request` — select pull-request-only publication when indicated.
37
+ - `previous-version` — identify the predecessor for release comparison, when known.
38
+ - `pull-requests` — inspect the included pull request numbers in a batched decision.
39
+ - `reason` — distinguish unexpected non-publication from an intentional skip or a pending batch.
@@ -13,20 +13,19 @@ license: MIT
13
13
  - Capability catalog
14
14
  - Verify the screen
15
15
 
16
- Cratis Components ship the roles, keyboard models, focus management, error association and live regions of their own controls. The application still owns every name it supplies, the translation of built-in text, page structure, route-change announcements and the verification of its workflows.
16
+ Cratis Components ship the roles, keyboard models, focus management, error association and live regions of their own controls. The application still owns every name it supplies, translating built-in text the message packs lack, page structure, route-change announcements and the verification of its workflows.
17
17
 
18
18
  Read `references/<language>.md` for the project's SDK (`.csproj` → csharp, Node server `package.json` → typescript, `*.kt` → kotlin, `*.java` → java, `go.mod` → go, `mix.exs` → elixir); only the project's languages are installed. Cratis Components is React-only, so its props, enums and import paths are in the typescript reference. Names in examples are illustrative.
19
19
 
20
20
  ## How it behaves
21
21
 
22
- - **Name resolution.** A built-in name or label resolves from the instance's own prop, then the matching provider message, then an English default. Translate through provider messages once; use the instance prop only where one occurrence needs a different name.
23
- - **Messages merge per key.** Supplied messages merge over the English defaults key by key, so a partially translated group speaks English for missing keys instead of failing.
22
+ - **Name resolution.** A built-in name or label resolves key by key: the instance's own prop wins, then the provider message, and a missing key falls back to lower sources ending in English. The localization reference has the full order. Translate through provider messages; use the instance prop only where one occurrence differs.
24
23
  - **One owner per surface.** Each dialog, toolbar, picker and panel owns its focus and keys. A second modal, key handler or live region around it competes with it, causing a double focus move or a double announcement.
25
24
  - **Announcements are local.** Components announce their own events (a message appearing, a toast, a refused dialog, a failed query) through their own live regions. Route changes, document titles and cross-screen status belong to the application.
26
25
 
27
26
  ## Default path
28
27
 
29
- 1. **Configure once.** Mount the components provider at the application root with the user's locale and a translated message set for every built-in surface the application uses. Done when switching the user's language (locale and message set) changes the spoken names of dialog actions, paginator buttons and toast close buttons.
28
+ 1. **Configure once.** Mount the components provider at the root with the user's language and the message packs on (see Provider and localization). For a language without a pack, supply messages for every message group in use. Done when switching the user's language changes the spoken names of dialog actions, paginator buttons and toast close buttons.
30
29
  2. **Name every focusable control.** Point a visible label at the control, or pass the component's name prop. For a group control (toggle group, tabs, tag group, segmented date input), reference the visible label by id, because a group has no single labelable element. Icon-only buttons require a name; hide decorative icons from assistive technology. Done when every control in the accessibility tree has a meaningful, translated name and none is named by placeholder text alone.
31
30
  3. **Use the built-in command fields.** In a command form or dialog, a field's title is its accessible name, and its validation errors are attached as a hidden description while the invalid state is exposed. Add only your own help text, by id. Done when an invalid submit leaves each field describing its help text and every error, once.
32
31
  4. **Choose the dialog's initial focus.** Keep the default (the confirm button) for an ordinary dialog. For an irreversible or destructive confirmation, focus the dismissing button, because a second press of the key that opened the dialog confirms a focused confirm button. For a dialog that must be read first, or one with a custom footer or none, focus the title. Done when opening a destructive dialog by keyboard and pressing Enter again does not perform the action.
@@ -37,11 +36,10 @@ Read `references/<language>.md` for the project's SDK (`.csproj` → csharp, Nod
37
36
 
38
37
  ### Provider and localization
39
38
 
40
- - **Locale:** the provider's language tag drives date and number formats, date segment order and the spoken strings of React Aria-based controls (step buttons, date segments); an invalid tag falls back to US English. It neither translates provider messages nor sets text direction.
39
+ - **Language, message packs and format:** see `cratis-components-theme-application` (`references/localization.md`). With a message pack on (English and Norwegian Bokmål ship), names in the message groups below are translated; other languages speak English until you supply messages. A name outside the groups (the data page actions menubar) needs its own prop.
40
+ - **Locale:** the UI language tag also sets the spoken strings of React Aria-based controls (step buttons, date segments); an invalid tag falls back to US English. Alone it turns on no message pack and sets no text direction.
41
41
  - **Direction:** toolbar and menubar arrow keys follow the layout's CSS direction; set the document direction (`dir`) yourself for right-to-left languages.
42
- - **Message groups:** one per built-in surface: dialog (shared by every dialog, including the refusal announcement), stepper, paginator, data table, column filter, filter, toolbar, notifications, dropdown and date picker. Translate every group the application renders; your language reference lists each group's keys and per-instance overrides.
43
- - **English defaults:** the exported default message set; start each translation from it.
44
- - **Instance overrides:** most of these names also take a per-instance prop (see Name resolution).
42
+ - **Message groups:** dialog, stepper, paginator, data table, column filter, filter, toolbar, notifications, dropdown, date picker, command (validation summary, GUID errors, password toggle), controls (chip, tag removal) and language selector. Your language reference lists their keys and instance overrides.
45
43
  - **Component label sets:** the schema, markdown, icon-picker and configuration editors, time machine, pivot viewer, canvas controls and chat take their own labels object instead of provider messages, merged over exported English defaults; pass only translated keys.
46
44
 
47
45
  ### Naming controls
@@ -10,44 +10,62 @@
10
10
  - Status and announcements
11
11
  - Page structure and visuals
12
12
 
13
- Sections match the capability catalog in the skill. Import from the `@cratis/components/<Area>` subpath named in each section. Names in examples are illustrative.
13
+ Sections match the capability catalog in the skill. Import components from the `@cratis/components/<Area>` subpath named in each section, and the setup APIs (`CratisComponentsProvider`, `cratisDefaults`, the configuration types) from the package root, `@cratis/components`. Names in examples are illustrative.
14
14
 
15
15
  ## Provider and localization
16
16
 
17
- Mount `CratisComponentsProvider` (`@cratis/components/Common`) once at the root. `value.locale` is a BCP 47 tag; `value.messages` takes partial groups that deep-merge over `cratisDefaults` (also exported from `Common`). Pass `toaster` to mount the built-in toaster.
17
+ Language, message packs and regional format are set up in `cratis-components-theme-application` (`references/localization.md`): `ArcComponentsProvider` when the application uses Arc localization, otherwise `CratisComponentsProvider` with `messagePacks="builtin"`. Either way the provider is mounted once at the root, and the shipped English and Norwegian Bokmål packs translate every group below, so those languages need no `value.messages`.
18
+
19
+ For any other language the English pack applies; translate it through `value.messages`. Groups are partial and merge key by key over the pack, or over `cratisDefaults` when no pack is on. Function-valued keys stay functions. Supplied messages win over the pack in every language, so select them by language together with `locale`. A key you leave out follows the rest of the order: the pack's text (English here), or the component's own fallback where the pack leaves the key unset. Leave `filter.searchAriaLabel` unset when the localized search placeholder should name the search input; setting it replaces the placeholder as the name on every filter search.
18
20
 
19
21
  ```tsx
20
- import { CratisComponentsProvider } from '@cratis/components/Common';
22
+ import { CratisComponentsProvider, type CratisComponentsMessages } from '@cratis/components';
23
+
24
+ // Abbreviated: translate the keys of every group the application renders.
25
+ const swedish: CratisComponentsMessages = {
26
+ dialog: { ok: 'OK', cancel: 'Avbryt', yes: 'Ja', no: 'Nej', close: 'Stäng', refused: 'Åtgärden slutfördes inte.' },
27
+ paginator: {
28
+ navigation: 'Sidnavigering',
29
+ first: 'Första sidan',
30
+ previous: 'Föregående sida',
31
+ next: 'Nästa sida',
32
+ last: 'Sista sidan',
33
+ page: (page) => `Sida ${page}`,
34
+ },
35
+ notifications: { dismiss: 'Stäng', region: 'Aviseringar' },
36
+ };
37
+
38
+ // Keyed by language subtag; `language` is the user's valid BCP 47 tag, in any casing.
39
+ const messagesByLanguage: Record<string, CratisComponentsMessages> = { sv: swedish };
21
40
 
22
41
  <CratisComponentsProvider
23
- value={{
24
- locale: 'nb-NO',
25
- messages: {
26
- dialog: { ok: 'OK', cancel: 'Avbryt', yes: 'Ja', no: 'Nei', close: 'Lukk', refused: 'Handlingen ble ikke fullført.' },
27
- paginator: { navigation: 'Sider', page: (page) => `Side ${page}` },
28
- notifications: { dismiss: 'Lukk', region: 'Varsler' },
29
- },
30
- }}
42
+ messagePacks="builtin"
43
+ value={{ locale: language, messages: messagesByLanguage[new Intl.Locale(language).language] }}
31
44
  toaster
32
45
  >
33
46
  <App />
34
47
  </CratisComponentsProvider>
35
48
  ```
36
49
 
37
- Switch language (locale and `messages` together) and confirm the dialog buttons, paginator and toast close button speak the new text. If they stay English, the provider is not above the component or the group key is misspelled.
50
+ Switch language and confirm the dialog buttons, the paginator (its navigation name, its first, previous, next and last actions and, when the table turns them on, its numbered page links) and the toast close button speak the new text. If a label keeps the previous language, check for a fixed instance prop on that component (an `okLabel` wins even when the messages change), then check that `value.messages` changes with `locale`. If they stay English, the message packs are not on, the language has no pack and no `messages`, the provider is not above the component, or the group key is misspelled.
38
51
 
39
52
  | Group (`value.messages.*`) | Keys | Instance override |
40
53
  | --- | --- | --- |
41
- | `dialog` | `ok`, `cancel`, `yes`, `no`, `close`, `refused` | `Dialog`/`CommandDialog`: `okLabel`, `cancelLabel`, `yesLabel`, `noLabel`, `closeAriaLabel`; per refusal: `Dialog.refusalFeedback`, `CommandDialog.validationAnnouncement` |
54
+ | `dialog` | `ok`, `cancel`, `yes`, `no`, `close`, `refused` | `Dialog`/`CommandDialog`: `okLabel`, `cancelLabel`, `yesLabel`, `noLabel`, `closeAriaLabel`; per refusal: `Dialog.refusalFeedback` |
42
55
  | `stepper` | `next`, `previous`, `submit` | `CommandStepper`/`StepperCommandDialog`: `nextLabel`, `previousLabel`, `okLabel`; `StepperCommandDialog` footer: `cancelLabel` (with `showCancel`) |
43
56
  | `paginator` | `navigation`, `first`, `previous`, `next`, `last`, `page(page)`, `pages`, `range(start, end, total)` | `DataTableForQuery`, `DataTableForObservableQuery`, `DataPage`: `paginatorAriaLabels`; `TablePaginator`: `ariaLabels` |
44
57
  | `dataTable` | `selectRow`, `selectAllRows`, `sortAscending`, `sortDescending`, `search`, `searchAriaLabel`, `loading`, `failed`, `unauthorized`, `filteredEmpty`, `filteredEmptyServer` | query tables and `DataPage`: `loadingMessage`, `failureMessage`, `unauthorizedMessage`, `filteredEmptyMessage`, `globalSearchAriaLabel` |
45
58
  | `columnFilter` | `filterTriggerAriaLabel(field)`, `valueAriaLabel(field)`, `matchModeAriaLabel`, `matchModeLabel(mode, defaultLabel)`, `clear`, `apply`, `true`, `false` | `Column`: `filterLabels` (partial; defaults in `defaultColumnFilterMenuLabels`) |
46
- | `filter` | `label`, `searchAriaLabel` | `FilterPanel`: `aria-label`, `searchAriaLabel`; `FilterDefinition.searchAriaLabel`; `CheckboxListFilter`: `searchAriaLabel` |
59
+ | `filter` | `label`, `searchAriaLabel`, `searchPlaceholder`, `searchFallback`, `empty`, `noMatches`, `clearFilter`, `clearRange`, `minimum`, `maximum`, `items` | `FilterPanel`: `aria-label`, `searchAriaLabel`, `searchPlaceholder`, `clearFilterAriaLabel`, `clearRangeAriaLabel`; `FilterDefinition`: `searchAriaLabel`, `searchPlaceholder`; `CheckboxListFilter`: `searchAriaLabel`, `searchPlaceholder`, `emptyMessage`, `noMatchesMessage`; `RangeHistogramFilter`: `minimumAriaLabel`, `maximumAriaLabel`, `itemsLabel` |
47
60
  | `toolbar` | `label`, `closeDrawer` | `Toolbar`: `aria-label`, `aria-labelledby`; `ToolbarFolder`: `closeLabel` |
48
61
  | `notifications` | `dismiss`, `region` | `Toaster`: `dismissAriaLabel`, `regionAriaLabel` |
49
62
  | `dropdown` | `showOptions`, `clearSelection` | `Dropdown`: `pt.trigger['aria-label']` for a filtered dropdown's options button, `pt.clear['aria-label']` for the clear action |
50
63
  | `datePicker` | `today`, `clear`, `openCalendar`, `previousMonth`, `nextMonth`, `label` | `DatePickerInput`: `todayLabel`, `clearLabel`, `openCalendarLabel`; `CalendarField`: `openCalendarLabel` |
64
+ | `command` | `validationAnnouncement(count, firstMessage)`, `guidFormat`, `guidRequired`, `showPassword`, `hidePassword` | `CommandDialog`: `validationAnnouncement`; `GuidField`: `formatErrorMessage`, `requiredErrorMessage`; `PasswordField`: `showLabel`, `hideLabel` |
65
+ | `controls` | `remove`, `removeItem(item)` | `Chip`: `removeAriaLabel`; `TagGroup`: `removeLabel`; `ChipsField`: `removeAriaLabel` |
66
+ | `languageSelector` | `label` | `LanguageSelector`: `label` |
67
+
68
+ The groups do not cover every built-in name: the `DataPage` actions menubar is named `'Actions'` until `actionsAriaLabel` is set.
51
69
 
52
70
  Component label sets take a `labels` prop instead, merged key by key over English defaults, so pass only the translated keys: `SchemaEditor` (keys in `defaultSchemaEditorLabels`), `MarkdownEditor` (`defaultMarkdownEditorLabels`), `IconPicker` (`defaultIconPickerLabels`), `TimeMachine` (`defaultTimeMachineLabels`), the configuration editor (`defaultOrderedItemLabels`, `defaultPropertyControlsLabels`), `PivotViewer` (`PivotViewerLabels`; `loadingLabel` wins over `labels.loading`), `Canvas` (`controlsLabels`, type `CanvasControlsLabels`), the canvas chat (`ChatLabels` and related `*Labels` types from `Canvas`) and the chat sidebar (`ChatSidebarLabels`, which nests `conversation` and `topicList` labels, from `Chat`).
53
71
 
@@ -17,7 +17,7 @@ compatibility: Requires react, @cratis/components, @cratis/arc.react, @cratis/fu
17
17
 
18
18
  ## What a Canvas is
19
19
 
20
- `Canvas` is the Cratis Components infinite board: a surface the user pans and zooms, with content placed at world coordinates. World coordinates are positions on the board before pan and zoom; a world point appears on screen at `world × zoom + pan`, measured from the canvas's top-left corner. Everything comes from the `@cratis/components/Canvas` subpath, which also exports the board shapes (`Note`, `Region`) and the on-board conversation kit (`Chat`, `ChatBubble` and their parts).
20
+ `Canvas` is the Cratis Components infinite board: a surface the user pans and zooms, with content placed at world coordinates. World coordinates are positions on the board before pan and zoom; a world point appears on screen at `world × zoom + pan`, measured from the canvas's top-left corner. The board's own parts come from the `@cratis/components/Canvas` subpath, which also exports the board shapes (`Note`, `Region`) and the on-board conversation kit (`Chat`, `ChatBubble` and their parts).
21
21
 
22
22
  The canvas owns the camera, gestures, controls and minimap. The application owns the content: item data, positions, sizes, text, selection, membership and persistence. Panning and zooming never change item data, and no shape saves anything or synchronizes it between users.
23
23
 
@@ -35,6 +35,7 @@ Read `references/<language>.md` for the project's SDK (`.csproj` → csharp, Nod
35
35
  | A conversation pinned beside a board item | `Chat` in a `CanvasItem`, with `ChatBubble` as its marker |
36
36
  | Chat with topics, outside a board, or without Pixi | `cratis-components-host-chat` |
37
37
  | Tools or modes beside the board | `cratis-components-compose-toolbar` |
38
+ | Contextual actions for one selected item | `FloatingToolbar` from `@cratis/components/FloatingToolbar`, directly inside the item (`cratis-components-compose-toolbar`) |
38
39
  | Chrome that stays put, or popups that escape the canvas clip | `CanvasOverlay`, `AnchoredOverlay` |
39
40
 
40
41
  ## How it behaves at runtime
@@ -71,7 +72,7 @@ Containment is a center-point test, inclusive on all edges, over every `CanvasIt
71
72
 
72
73
  ## Default path
73
74
 
74
- 1. Install the `pixi.js` peer within the range Components declares. Load `@cratis/components/tokens` and `@cratis/components/styles` once at the application root (plus `@cratis/components/theme` for the baseline look). With per-area stylesheets, load `@cratis/components/styles/base` once and `@cratis/components/Canvas/styles` (shapes and chat kit included) with the board's code instead; never both. The board needs no `CratisComponentsProvider`.
75
+ 1. Install the `pixi.js` peer within the range Components declares. Load `@cratis/components/tokens` and `@cratis/components/styles` once at the application root (plus `@cratis/components/theme` for the baseline look). With per-area stylesheets, load `@cratis/components/styles/base` once and `@cratis/components/Canvas/styles` (shapes and chat kit included; add `@cratis/components/FloatingToolbar/styles` for `FloatingToolbar`) with the board's code instead; never both. The board needs no `CratisComponentsProvider`.
75
76
  2. Put the board in the owning feature's slice. Give its wrapper a height, and size the canvas to fill the wrapper.
76
77
  3. Keep the items in application state, each with a stable id and world `x`/`y`. Render each as a `CanvasItem` with that id as `id` and list key, plus `x` and `y`, containing ordinary controls whose handlers receive the item's id, never its screen position.
77
78
  4. Keep the integrated controls. Add `showMinimap` when the board outgrows the viewport, and `controlsLabels` in a localized application.
@@ -101,7 +102,7 @@ Containment is a center-point test, inclusive on all edges, over every `CanvasIt
101
102
  - `controlsFollowViewportInsets` — on by default: the bar steps inward by `--canvas-viewport-left`/`--canvas-viewport-right`, set on an ancestor when a host panel overlaps the board; turn off when the host already shifts the canvas.
102
103
  - `controlsGlassSurface` — a product-owned surface behind the bar; `disableControlsGlass` forces the plain CSS pill when that glass would re-render board content every frame.
103
104
  - `captureAttributes` (`CanvasCaptureAttributes`) — attribute names (`layer`, `content`, `transformHost`) for a product capture or compositor pipeline.
104
- - `readOnly` — a view-only board: pan and zoom still work, pointer input to content is blocked, and the content layer is inert, so the keyboard cannot reach it either. Portaled content (`CanvasOverlay`, `AnchoredOverlay`) lies outside that layer and stays operable: close or disable it when entering read-only. It is presentation, not write authorization; the server still authorizes every command.
105
+ - `readOnly` — a view-only board: pan and zoom still work, pointer input to content is blocked, and the content layer is inert, so the keyboard cannot reach it either. Portaled content (`CanvasOverlay`, `AnchoredOverlay`, `FloatingToolbar`) lies outside that layer and stays operable: close, disable or unmount it when entering read-only. It is presentation, not write authorization; the server still authorizes every command.
105
106
  - `backgroundDragPans` — on by default; turn off when the host claims empty-background drag, for example for rubber-band selection. Wheel, middle-button and touch still pan.
106
107
  - `className`, `style` — size and style the root.
107
108
  - `--cratis-canvas-minimap-grid-color`, `--cratis-canvas-minimap-item-color` — recolor the minimap grid and items without their own color.
@@ -15,7 +15,7 @@ Everything imports from `@cratis/components/Canvas`. Required props are marked w
15
15
  - **CanvasHandle**: `smoothPanToWorld(x, y, durationMs?)`, `smoothPanZoomToWorld(x, y, targetZoom?, durationMs?)`, `getContainerRect(): DOMRect | null`, `getItemBounds(): MinimapItem[]`.
16
16
  - **CanvasItemProps**: `x`*, `y`*, `children`*, `id`, `zIndex`, `onSize(width, height)`.
17
17
  - **CanvasOverlayProps**: `children`*.
18
- - **AnchoredOverlayProps**: `anchorRef`*, `open`*, `children`*, `side: 'above' | 'below' | 'left' | 'right'`, `align: 'left' | 'right' | 'center'`, `gap`.
18
+ - **AnchoredOverlayProps**: `anchorRef`*, `open`*, `children`*, `side: AnchoredOverlaySide` (`'above' | 'below' | 'left' | 'right'`), `align: AnchoredOverlayAlign` (`'left' | 'right' | 'center'`), `gap`.
19
19
 
20
20
  ## Shapes
21
21
 
@@ -22,7 +22,7 @@ Install `pixi.js` within the peer range `@cratis/components` declares. Load the
22
22
  @import '@cratis/components/theme'; /* only for the baseline look */
23
23
  ```
24
24
 
25
- With per-area stylesheets, import `@cratis/components/styles/base` instead of `styles`, and load `@cratis/components/Canvas/styles` from a CSS file imported by the module that mounts the board. Import every Canvas component, shape, chat-kit part and type from `@cratis/components/Canvas`. Message hooks (`useOnMessage`, `useMessenger`, `MessengerScope`) come from `@cratis/arc.react/messaging`, and `Guid` from `@cratis/fundamentals`.
25
+ With per-area stylesheets, import `@cratis/components/styles/base` instead of `styles`, and load `@cratis/components/Canvas/styles` from a CSS file imported by the module that mounts the board. Add `@cratis/components/FloatingToolbar/styles` there when the board uses `FloatingToolbar`; the Canvas stylesheet does not carry it and the toolbar cannot follow its item without it (the aggregate `styles` already includes it). Import every Canvas component, shape, chat-kit part and type from `@cratis/components/Canvas`. Message hooks (`useOnMessage`, `useMessenger`, `MessengerScope`) come from `@cratis/arc.react/messaging`, and `Guid` from `@cratis/fundamentals`.
26
26
 
27
27
  ## Default board
28
28
 
@@ -106,6 +106,8 @@ const [menuOpen, setMenuOpen] = useState(false);
106
106
 
107
107
  `AnchoredOverlay` repositions on window resize and scroll, not on pan or zoom, and never dismisses itself: close it from `onTransformChange`, `Escape` and outside clicks in the host.
108
108
 
109
+ Actions for one selected item (copy, colour, delete) use `FloatingToolbar` instead, imported from `@cratis/components/FloatingToolbar`. Render it as a direct child of the `CanvasItem`, only while the item is selected and the board is not `readOnly`, and pass `track={canvasTransformActivity.subscribe}` (from `@cratis/components/Canvas`) so it follows pan and zoom. The toolbar sits against the element it is rendered in, so a wrapper between it and the `CanvasItem` becomes the anchor; keep the toolbar a direct child by default. When it must be nested deeper, put a ref on a DOM element you render yourself that bounds the item's content and pass it as `anchor`; `CanvasItem` exposes no ref of its own. Its actions and placement are in the floating toolbar reference of `cratis-components-compose-toolbar` (`references/floating-toolbar.md`).
110
+
109
111
  ## Avoid
110
112
 
111
113
  - Don't add the camera offset to `x` or `y`; the canvas applies it when it positions the item.
@@ -119,7 +121,7 @@ const [menuOpen, setMenuOpen] = useState(false);
119
121
  - **TypeScript rejects a Pixi object passed to the canvas:** two copies of `pixi.js` are resolved; dedupe to one.
120
122
  - **The host owns empty-background drag** (rubber-band selection): pass `backgroundDragPans={false}`; wheel, middle-button and touch still pan.
121
123
  - **The host supplies its own zoom controls:** pass `showControls={false}` and drive the camera through the handle. To keep the integrated bar clear of a host panel, set `--canvas-viewport-left` or `--canvas-viewport-right` on an ancestor.
122
- - **View-only board:** pass `readOnly`; content no longer receives pointer or keyboard input. Close any `CanvasOverlay` or `AnchoredOverlay` content (inspectors, pickers, menus) at the same time, because it is portaled outside the blocked layer. `readOnly` only presents the board; the server still authorizes every command.
124
+ - **View-only board:** pass `readOnly`; content no longer receives pointer or keyboard input. Close any `CanvasOverlay` or `AnchoredOverlay` content (inspectors, pickers, menus) and unmount any `FloatingToolbar` at the same time, because they are portaled outside the blocked layer and stay clickable even when selection survives the switch. `readOnly` only presents the board; the server still authorizes every command.
123
125
  - **A jsdom spec renders a `CanvasItem`:** jsdom has no `ResizeObserver`; install a no-op substitute before rendering:
124
126
 
125
127
  ```tsx
@@ -29,6 +29,8 @@ The Common, Dropdown, Display, MarkdownEditor and IconPicker areas of Cratis Com
29
29
  | Yes/no | `Checkbox` | An on/off setting that should announce as a switch → `Switch` |
30
30
  | Measured progress / unknown duration / content not loaded yet | `ProgressBar` / `ProgressSpinner` / `Skeleton` | — |
31
31
  | A row of page-level actions | `ActionMenubar` | Tools beside a canvas → `cratis-components-compose-toolbar` |
32
+ | Actions for one row, or an overflow of rarer actions | `Menu` | Actions on a list's selected row → DataPage in `cratis-components-display-list` |
33
+ | A small form beside the control that opens it | `Menu` with `role='dialog'` | A title, a footer or blocking the page → `Dialog` |
32
34
  | Where the current route sits in a hierarchy | `Breadcrumbs` | A path through nested data → `ObjectNavigationalBar` in `cratis-components-edit-schema-data` |
33
35
 
34
36
  Use another skill for: query-backed lists and tables (`cratis-components-display-list`), dialogs and toasts (`cratis-components-coordinate-feedback`), provider, locale and theme setup (`cratis-components-theme-application`), checking names, focus and announcements (`cratis-components-accessibility`).
@@ -48,7 +50,7 @@ Use another skill for: query-backed lists and tables (`cratis-components-display
48
50
  ## Default path
49
51
 
50
52
  1. Mount `CratisComponentsProvider` once at the application root and load the Components stylesheet (see `cratis-components-theme-application`).
51
- 2. Choose with the table above; import from the control's area, not the package root (provider and configuration only).
53
+ 2. Choose with the table above; import from the control's area, not the package root (provider and configuration only). `Menu` has no value: follow its reference, not steps 3–8.
52
54
  3. Hold the semantic value in component state: a key or identity (never a label), a number or `null`, a date or `null`, a list, a checked flag.
53
55
  4. Pass `value` (or `checked`) and `onChange`. Add only the options the field needs.
54
56
  5. Name the control itself: a visible label tied to its `id`; for the groups `DatePickerInput`, `ToggleGroup`, `Tabs` and `TagGroup`, which a label element cannot name, `aria-labelledby` pointing at the visible label; otherwise `aria-label`.
@@ -58,7 +60,12 @@ Use another skill for: query-backed lists and tables (`cratis-components-display
58
60
 
59
61
  Read `references/<language>.md` for the project's SDK (`.csproj` → csharp, Node server `package.json` → typescript, `*.kt` → kotlin, `*.java` → java, `go.mod` → go, `mix.exs` → elixir); only the project's languages are installed. Components is React-only: its code lives in the typescript reference.
60
62
 
61
- Neutral guidance: [collection selection](references/collections.md) (remote search, "add new", tag lists, value versus panel) and [breadcrumbs and field names](references/breadcrumbs-and-labels.md).
63
+ Neutral guidance:
64
+
65
+ - [Collection selection](references/collections.md): remote search, "add new", tag lists, value versus panel.
66
+ - [Breadcrumbs and field names](references/breadcrumbs-and-labels.md).
67
+ - [Menu](references/menu.md): read for row actions, an overflow menu or an anchored form.
68
+ - [From PrimeReact](references/from-primereact.md): read when replacing direct PrimeReact use.
62
69
 
63
70
  ## Capability catalog
64
71
 
@@ -109,21 +116,20 @@ Neutral guidance: [collection selection](references/collections.md) (remote sear
109
116
  ### Markdown field (MarkdownEditor)
110
117
 
111
118
  - **MarkdownEditor** — controlled markdown with a formatting toolbar. `value`, `onChange` (text), `onBlur`, `placeholder`, `height` (320 px when the container leaves height to content), `initialMode` (`MarkdownEditorMode.Write` or `Preview`), `autoFocus`, `disabled`, `readOnly`, `invalid`, `formats` (groups of `MarkdownFormat`, or `false` for no toolbar), `renderPreview` (your markdown renderer; the preview toggle appears only with it), `completions`, `uploadFile` (resolves a file to the markdown to insert), `onUploadFailed` (file and error), `labels` (every rendered or announced text), `id`, `aria-*`, `className`, `pt` (box, toolbar, buttons, writing area, preview, upload status, suggestions).
112
- - **MarkdownFormat** — `Bold`, `Italic`, `Strikethrough`, `Heading`, `Quote`, `Code`, `CodeBlock`, `Link`, `BulletList`, `NumberedList`, `TaskList`; each toggles. Control/Command+B, +I and +K apply bold, italic and link.
119
+ - **MarkdownFormat** — eleven formats, `Bold` to `TaskList` (see your language reference); each toggles, except `Link`, which only inserts a link. Control/Command+B, +I and +K apply bold, italic and link.
113
120
  - **MarkdownCompletion** — `trigger` (a string after whitespace or at line start, or a pattern ending at the caret whose `query` group, first group or whole match is the query), `allowSpaces`, `minimumQueryLength` (0), `debounce` (150 ms), `suggest` (query and cancellation `signal` → suggestions with `id`, `insertText`, `label`, `detail`, `annotation`, now or later; stale or rejected answers are dropped, empty closes the list), `label`, `renderSuggestion`. Choosing inserts `insertText`.
114
- - **Helpers** — `defaultMarkdownFormats` (extend the default toolbar), `defaultMarkdownEditorLabels`, `applyMarkdownFormat` (value, selection start and end, format → new value and selection), for another editing surface.
121
+ - **Helpers** — default formats and labels, applying a format to text: see your language reference.
115
122
 
116
123
  ### Icon field (IconPicker)
117
124
 
118
- - **IconPicker** — searchable popout over an application-supplied catalog. `value` (`library`, `key`, optional `variant`; `null` when empty), `onChange` (a chosen icon only, never a clear), `catalog`, `allowed` (list of values or a predicate over entries; others stay visible but unselectable), `readOnly`, `disabled`, `invalid`, `validationMessage` (implies invalid unless `invalid` is set), `placement` (`bottom start` default, `bottom`, `bottom end`, `top start`, `top`, `top end`, `start`, `end`), `compactGroupSize` (12 per category before "Show all"), `labels`, `id` (the trigger), `aria-*` (the selected icon's name is appended), `className`, `pt`.
125
+ - **IconPicker** — searchable popout over an application-supplied catalog. `value` (`library`, `key`, optional `variant`; `null` when empty), `onChange` (a chosen icon only, never a clear), `catalog`, `allowed` (list of values or a predicate over entries; others stay visible but unselectable), `readOnly`, `disabled`, `invalid`, `validationMessage` (implies invalid unless `invalid` is set), `placement` (`bottom start` default; `bottom`, `top`, `start` and `end` variants), `compactGroupSize` (12 per category before "Show all"), `labels`, `id` (the trigger), `aria-*` (the selected icon's name is appended), `className`, `pt`.
119
126
  - **IconPickerCatalog** — `libraries` (`id`, `name`, `version`, `attribution`), `icons` (identity plus `name`, `categories`, `tags`, `aliases`, `deprecated`, `renderPreview`), `status` `ready` (default), `loading` or `error`, `error` message. A new `icons` list rebuilds the search index; a selection absent from a ready catalog shows as missing.
120
- - **Helpers** — `isSameIconPickerValue`, `toIconPickerValue` (the shape to persist), `iconPickerIdentity` (string key), `formatIconPickerIdentity` (display text), `isIconPickerAllowed` (checks a catalog entry against `allowed`; to validate a stored value, resolve it to its catalog entry by identity first), `defaultIconPickerLabels`.
127
+ - **Helpers** — comparing, persisting and formatting values; checking allowed catalog entries: see your language reference.
121
128
 
122
129
  ## Pitfalls
123
130
 
124
131
  - A label on a wrapper element, or tied to `DatePickerInput`'s `id`, leaves the field unnamed.
125
132
  - Storing a `ComboBox` or `Dropdown` label instead of its key breaks when two options share a label.
126
- - Firing a remote `ComboBox` search on every keystroke floods the server; debounce the draft.
127
133
  - `ToggleGroup` and `Tabs` selections are not navigation events; update the owning state yourself.
128
134
  - Tooltip content does not replace the trigger's accessible name, which is why `IconButton` requires `aria-label`.
129
135
  - Changing an `ErrorBoundary`'s props does not reset it; retry, or give it a new `key`.
@@ -0,0 +1,116 @@
1
+ # From PrimeReact to Components
2
+
3
+ ## Contents
4
+
5
+ - When this applies
6
+ - Default path
7
+ - Control mapping
8
+ - Dialog options
9
+ - Tables
10
+ - What has no Components equivalent
11
+ - Coexistence with PrimeReact
12
+ - Styling
13
+ - Pitfalls
14
+
15
+ ## When this applies
16
+
17
+ An edge case: an application renders PrimeReact components directly and moves those screens to Cratis Components. Components has no PrimeReact dependency and exposes its own props, events, tokens and parts, never PrimeReact types. An application built on Components from the start needs none of this.
18
+
19
+ ## Default path
20
+
21
+ 1. Take one screen at a time.
22
+ 2. Replace its imports with the mapping below. Import every component from its area; the package root holds only the provider and configuration.
23
+ 3. Check dialog closing, table data and styling on that screen.
24
+ 4. Keep PrimeReact for a widget with no Components equivalent until that widget is replaced.
25
+ 5. Remove the PrimeReact provider last (see Coexistence).
26
+
27
+ ## Control mapping
28
+
29
+ | PrimeReact | Components | Area |
30
+ |---|---|---|
31
+ | Button | `Button` | Common |
32
+ | Dialog | `Dialog` | Dialogs |
33
+ | Select / Dropdown | `Dropdown` | Dropdown |
34
+ | DataTable / Column | `DataTableCore` and `Column` | DataTables |
35
+ | TabView | `Tabs` | Common |
36
+ | SelectButton, single selection | `ToggleGroup` | Common |
37
+ | Tag, Badge, Message, Skeleton | `Tag`, `Badge`, `Message`, `Skeleton` | Display |
38
+ | Toast | `Toaster` and `toast` | Notifications |
39
+ | Inputs bound to an Arc command | The command form fields (`cratis-components-submit-form`) | CommandForm |
40
+
41
+ - Inputs held in local state map to the controls of this skill. Command form fields are for command properties only; they are not a general input suite.
42
+ - A control that needs no Components behaviour can be plain HTML.
43
+
44
+ ## Dialog options
45
+
46
+ | PrimeReact Dialog | Components `Dialog` |
47
+ |---|---|
48
+ | `header` | `title`, a required string; other heading content goes in `subtitle` or `headerActions` |
49
+ | `visible` | `visible` |
50
+ | `onHide` | `onCancel` or `onClose`, by what closing means in the product |
51
+ | `footer` | `buttons` with custom content |
52
+ | A width in `style` | `width`, a CSS length as a string such as `'32rem'`, not a number |
53
+ | Pass-through slots | Parts through `pt` |
54
+
55
+ None of these is a drop-in rename. Check each dialog:
56
+
57
+ - A dialog you render yourself closes only when you change `visible`. Set it in your `onCancel`, `onConfirm` or `onClose` handler. The dialog context closes a dialog only when it was opened through the Arc dialog hooks.
58
+ - For a dialog opened through the Arc dialog hooks, the return value decides whether the dialog closes itself: `onCancel` and `onConfirm` let it close only by returning `true`, and `onClose` lets it close unless it returns `false`. A handler that returns nothing can still close the dialog by calling `closeDialog` from the dialog context, which is also how it returns a value. `onCancel` takes precedence over `onClose` for a dismissal.
59
+ - With a custom `buttons` footer, Escape, an outside press and the header close button are off by default. Turn them on with `dismissable`, or one at a time with `closeOnEscape`, `dismissOnOutsideClick` and `showCloseButton`.
60
+ - Components cannot tell which button of a custom footer confirms and which cancels: each button reports its own result, by changing `visible` or, for a dialog opened through the Arc dialog hooks, through the dialog context.
61
+
62
+ The closing rules and the dialog context are in `cratis-components-coordinate-feedback`.
63
+
64
+ ## Tables
65
+
66
+ Choose the table by who owns the data (`cratis-components-display-list` has the contracts):
67
+
68
+ | Data | Table |
69
+ |---|---|
70
+ | A list already loaded in the client | `DataTableCore` |
71
+ | A paged Arc query | `DataTableForQuery` |
72
+ | An Arc query that also delivers later results | `DataTableForObservableQuery` |
73
+ | Either query, with actions and optional details | `DataPage` |
74
+
75
+ - On `DataTableCore`, rename `value` to `data`. A query-bound table has no row property: pass the query class as `query` and the table loads the rows.
76
+ - Replace every PrimeReact `Column` with the `Column` of the DataTables area, in a Components table and in `DataPage`. A PrimeReact `Column` left in place can look as if it works for the properties both share, but its PrimeReact-specific features do not carry over.
77
+ - A lazy table that only pages becomes a query-bound table as it is: the table pages the Arc query without `serverQuery`. Add `serverQuery` when sorting, column filters or search must cover the whole result. Its required `toArguments` turns the applied column filters and search text into query arguments, and the backend query must apply those arguments itself and return a result Arc can sort and page, so sorting and filtering cover the whole result before paging. The contract is in `cratis-components-display-list`.
78
+ - For a server source that is not an Arc query, control `DataTableCore` yourself: own `sort` and `onSortChange`, and set `rowProcessing` to `DataTableRowProcessing.None` so the table renders the rows as returned. The table then filters nothing itself: for column filters or search you keep, own `filters` with `onFilter` and `globalFilter` with `onGlobalFilterChange` too and send them to the source, or those controls will not change the rows.
79
+ - Replace compact size, stripes and column alignment with table parts, column classes or styles, and product CSS.
80
+
81
+ ## What has no Components equivalent
82
+
83
+ Keep an application-owned or PrimeReact surface for these until it is replaced:
84
+
85
+ - Sidebars that stay open beside the page. A modal side sheet is `Dialog` with `placement` set to `start` or `end`.
86
+ - Timelines.
87
+ - Knobs.
88
+ - Button groups that select several values. `ToggleGroup` selects exactly one.
89
+ - Popovers that anchor to something other than the element that opens them. `Menu` covers an action list, and with the `dialog` role a form or other content, anchored to the trigger that opens it (see [Menu](menu.md)).
90
+ - Tables with row grouping or row expansion.
91
+
92
+ `Toolbar` is a tool palette for a canvas, not a replacement for a page action bar; use `ActionMenubar` or the DataPage action bar.
93
+
94
+ ## Coexistence with PrimeReact
95
+
96
+ - While any screen still imports PrimeReact directly, keep its provider, styles, dependencies and license configuration for those screens. `CratisComponentsProvider` does not need the PrimeReact provider unless the `primeReactUiLibrary` renderer adapter is selected (see the last point); the provider order is in `cratis-arc-react-bind-slice`, reference `typescript-host.md`.
97
+ - Remove the PrimeReact root only when no direct PrimeReact import, PrimeIcons class or other PrimeReact use is left, and no PrimeReact renderer adapter is selected: `primeReactUiLibrary` needs the root, and `primeReact10UiLibrary` still needs the PrimeReact dependency and theme stylesheet. Then also remove its presets, license keys and global pass-through configuration.
98
+ - An application on PrimeReact 10 can move straight to Components. It does not have to adopt PrimeReact 11 first; keep PrimeReact 10 isolated to the screens not yet replaced.
99
+ - To keep the vendor look on basic controls, select a renderer adapter. An adapter restyles only the slots it declares and never recreates the PrimeReact API, so it does not replace this mapping. There are two. `primeReactUiLibrary` needs a `PrimeReactProvider` holding the license key outside `CratisComponentsProvider`, and `rendererSetup` on `CratisComponentsProvider` with `'cratis-primereact.license-configured'` set to `true`, even when no direct PrimeReact import is left; it fails at render without either. `primeReact10UiLibrary` uses your `PrimeReactProvider` when there is one and supplies its own otherwise. Coverage and setup are in `cratis-components-theme-application`, reference `renderer-adapters.md`.
100
+
101
+ ## Styling
102
+
103
+ - Map product values to `--cratis-*` tokens.
104
+ - Replace `.p-*`, `data-scope` and `data-part` selectors with `data-cratis-part` selectors.
105
+ - Replace PrimeReact pass-through keys with the component's own `pt` parts.
106
+ - Replace PrimeIcons classes with React icon nodes or product-owned SVGs.
107
+
108
+ Tokens and parts are described in `cratis-components-theme-application`.
109
+
110
+ ## Pitfalls
111
+
112
+ - A PrimeReact `Column` left inside a Components table or `DataPage` loses its PrimeReact-specific features even where it seems to render; use the `Column` of the DataTables area.
113
+ - Sorting or filtering in the client over one page of a query misleads the user: a query-bound table holds one page. Sort and filter the whole result on the server with `serverQuery`.
114
+ - Mapping `onHide` mechanically to one callback loses the difference between cancelling and closing; decide per dialog.
115
+ - Removing the PrimeReact provider while a direct import remains, or while the `primeReactUiLibrary` renderer adapter is selected, breaks the screens that depend on it.
116
+ - A migrated dialog that returns nothing from `onCancel` and does not close itself, or that gets a custom footer, can lose a way to close that the PrimeReact dialog had. Test Escape, the close button and every footer button.
@@ -0,0 +1,90 @@
1
+ # Menu
2
+
3
+ ## Contents
4
+
5
+ - When to use it
6
+ - Default path
7
+ - Placement
8
+ - Closing and focus
9
+ - Keyboard
10
+ - A small form in the panel
11
+ - Opening it from the host
12
+ - Pitfalls
13
+
14
+ ## When to use it
15
+
16
+ `Menu` opens a panel anchored to a trigger you render. Use it for the actions of one row, for an overflow of less common actions, or for a small form that belongs next to the control that opens it.
17
+
18
+ | Need | Use instead |
19
+ |---|---|
20
+ | Actions on the row selected in a list | The DataPage action bar (`cratis-components-display-list`) |
21
+ | A row of page-level actions | `ActionMenubar` |
22
+ | A title, a footer, or blocking the page | `Dialog` (`cratis-components-coordinate-feedback`) |
23
+ | Picking a value | `Dropdown` or `ComboBox` |
24
+
25
+ ## Default path
26
+
27
+ 1. Import `Menu` and `MenuItem` from the Menu area. Its styles are part of the aggregate Components stylesheet; with per-area sheets, add the Menu sheet (see `cratis-components-theme-application`).
28
+ 2. Give the menu a `label`. It is required and names the panel for assistive technology.
29
+ 3. Render the trigger yourself in `trigger`, and spread the props it receives onto the element that opens the menu, normally a `Button`. They carry the anchor reference, the click handler and the popup, expanded and controls attributes. The second argument tells whether the menu is open.
30
+ 4. Pass the content as a function. It receives `close`.
31
+ 5. Render one `MenuItem` per action, with `onSelect` and either `label` or children. `icon` adds a decorative glyph before the label, and `disabled` shows the item but keeps it out of selection and arrow-key movement. Other attributes go to the item's button.
32
+ 6. Verify with the keyboard: open from the trigger, move with the arrow keys, choose with Enter or Space, and see focus return to the trigger.
33
+
34
+ The menu holds no value. An item runs your handler; any state it changes is yours. The code is in the composition examples of your language reference.
35
+
36
+ ## Placement
37
+
38
+ | Option | Values | Effect |
39
+ |---|---|---|
40
+ | `side` | `below` (default), `right` | The edge of the trigger the panel opens against. |
41
+ | `align` | `start` (default), `end` | The edge of the trigger the panel lines up with. |
42
+ | `width` | pixels | The panel width, kept between the stylesheet's minimum (`10rem`) and the viewport width less a small margin. Without it the panel fits its content within the same limits. |
43
+ | `className` | class name | An extra class on the panel. |
44
+
45
+ - `align` is physical. Below the trigger, `start` is the left edge and `end` the right edge; beside it, they are the top and bottom edges. It does not flip in a right-to-left layout, so choose the value for the direction you render in.
46
+ - For a trigger at the right end of a row, use `end`: the panel's right edge lines up with the trigger's.
47
+ - The panel renders outside clipping and scrolling ancestors and stays inside the viewport. A panel below the trigger opens above it when it does not fit below and does fit above.
48
+ - Inside a dialog, the panel stacks above that dialog.
49
+
50
+ ## Closing and focus
51
+
52
+ | What closes it | Where focus goes |
53
+ |---|---|
54
+ | Escape | Back to the trigger, unless focus has already moved elsewhere |
55
+ | `close()` | Back to the trigger, unless focus has already moved elsewhere |
56
+ | `close(false)` | Not restored; move focus yourself before or after the call |
57
+ | A press outside the panel and the trigger | Not restored; it stays where the press put it |
58
+ | Choosing a `MenuItem` | Runs `onSelect`, then closes; back to the trigger, unless focus has already moved elsewhere |
59
+
60
+ Focus returns to the trigger only when nothing else has taken it, which is the case when it was inside the panel as the panel closed. An item that opens a dialog therefore keeps the dialog's focus; no extra code is needed. `close(false)` only skips the return: focus that was inside the panel is lost with the panel, so use it when your code places focus somewhere else. A press inside content the panel itself opens elsewhere on the page, such as a `Dropdown` list or a nested `Menu`, counts as inside and does not close it.
61
+
62
+ ## Keyboard
63
+
64
+ With the default `menu` role:
65
+
66
+ - Focus moves to the first enabled item when the menu opens.
67
+ - Up and Down move between enabled items and wrap at the ends. Home and End go to the first and the last.
68
+ - Enter or Space chooses the focused item.
69
+ - Tab closes the menu.
70
+
71
+ ## A small form in the panel
72
+
73
+ Set `role` to `dialog` when the panel holds a form or other content instead of a list of actions.
74
+
75
+ - The trigger then announces a dialog popup, the arrow keys are left to the content, and Tab cycles between the panel's tabbable elements.
76
+ - On open, focus moves to the first tabbable element. A panel with none takes focus itself, and Tab is then not held inside it, so give the panel at least one focusable control.
77
+ - Use ordinary buttons and inputs, not `MenuItem`: a menu item is only valid inside a menu.
78
+ - Close it from your own handler with the `close` argument, for example after the form is submitted. Escape and an outside press still close it.
79
+ - The panel has no title, no footer and does not block the page. When any of these is needed, use `Dialog`.
80
+
81
+ ## Opening it from the host
82
+
83
+ The menu keeps its own open state by default. Pass `open` and `onOpenChange` together when the host must open or close it; `onOpenChange` reports every request to open or close, and the menu shows only what `open` says.
84
+
85
+ ## Pitfalls
86
+
87
+ - Two different components are named `MenuItem`. The one in the Menu area is an action inside a `Menu`; the one in the DataPage area declares an action-bar entry and renders nothing inside a `Menu`. Import each from the area of its parent.
88
+ - The trigger toggles the menu, and the panel anchors to it, only through the props the menu hands over. Spread all of them onto one element. A host that opens the menu through `open` still needs them on an element, because the panel is placed against that element.
89
+ - `MenuItem` inside a `dialog`-role panel announces an invalid structure and gets no arrow-key movement.
90
+ - Do not build a popover by hand for these cases: positioning, outside-press handling and focus return are already handled.