@cratis/pi 8.0.1 → 8.1.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.
- package/package/corpus/harnesses/copilot/instructions/ai-distribution.instructions.md +9 -102
- package/package/corpus/harnesses/copilot/instructions/authoring-skills.instructions.md +3 -5
- package/package/corpus/harnesses/copilot/instructions/browser.instructions.md +8 -49
- package/package/corpus/harnesses/copilot/instructions/code-health.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/code-quality.csharp.instructions.md +3 -84
- package/package/corpus/harnesses/copilot/instructions/code-quality.instructions.md +6 -51
- package/package/corpus/harnesses/copilot/instructions/code-quality.typescript.instructions.md +4 -81
- package/package/corpus/harnesses/copilot/instructions/codescene.instructions.md +5 -54
- package/package/corpus/harnesses/copilot/instructions/components.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/cratis-folder-is-configuration.instructions.md +5 -22
- package/package/corpus/harnesses/copilot/instructions/csharp.instructions.md +7 -315
- package/package/corpus/harnesses/copilot/instructions/dialogs.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/discoverability.instructions.md +3 -25
- package/package/corpus/harnesses/copilot/instructions/documentation-structure-and-formatting.instructions.md +5 -151
- package/package/corpus/harnesses/copilot/instructions/documentation.instructions.md +5 -104
- package/package/corpus/harnesses/copilot/instructions/editing-cratis-docs.instructions.md +5 -63
- package/package/corpus/harnesses/copilot/instructions/efcore.instructions.md +8 -55
- package/package/corpus/harnesses/copilot/instructions/efcore.specs.instructions.md +3 -33
- package/package/corpus/harnesses/copilot/instructions/elixir.instructions.md +6 -79
- package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md +4 -27
- package/package/corpus/harnesses/copilot/instructions/framework-dotnet.instructions.md +4 -6
- package/package/corpus/harnesses/copilot/instructions/framework.instructions.md +0 -2
- package/package/corpus/harnesses/copilot/instructions/frontend-quality.instructions.md +0 -1
- package/package/corpus/harnesses/copilot/instructions/frontend-testing.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/github-actions.instructions.md +7 -138
- package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +19 -19
- package/package/corpus/harnesses/copilot/instructions/go-engineering.instructions.md +1 -4
- package/package/corpus/harnesses/copilot/instructions/go.instructions.md +2 -7
- package/package/corpus/harnesses/copilot/instructions/guards-and-fuses.instructions.md +5 -6
- package/package/corpus/harnesses/copilot/instructions/java.instructions.md +7 -129
- package/package/corpus/harnesses/copilot/instructions/kotlin.instructions.md +8 -165
- package/package/corpus/harnesses/copilot/instructions/orleans.instructions.md +5 -98
- package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +9 -63
- package/package/corpus/harnesses/copilot/instructions/scripting.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +8 -148
- package/package/corpus/harnesses/copilot/instructions/specs.elixir.instructions.md +4 -37
- package/package/corpus/harnesses/copilot/instructions/specs.typescript.instructions.md +3 -1
- package/package/corpus/harnesses/copilot/instructions/storybook.instructions.md +7 -70
- package/package/corpus/harnesses/copilot/instructions/typescript.instructions.md +8 -98
- package/package/corpus/harnesses/copilot/instructions/writing-correct-examples.instructions.md +3 -47
- package/package/corpus/harnesses/copilot/instructions/writing-cratis-docs.instructions.md +3 -65
- package/package/corpus/hooks/README.md +4 -7
- package/package/corpus/hooks/scripts/quality-gates.json +3 -5
- package/package/corpus/rules/ai-distribution.md +9 -102
- package/package/corpus/rules/authoring-skills.md +3 -5
- package/package/corpus/rules/browser.md +8 -49
- package/package/corpus/rules/code-health-policy.txt +4 -24
- package/package/corpus/rules/code-health.md +1 -1
- package/package/corpus/rules/code-quality.csharp.md +3 -84
- package/package/corpus/rules/code-quality.md +6 -51
- package/package/corpus/rules/code-quality.typescript.md +4 -81
- package/package/corpus/rules/codescene.md +5 -54
- package/package/corpus/rules/components.md +1 -1
- package/package/corpus/rules/cratis-folder-is-configuration.md +5 -22
- package/package/corpus/rules/csharp.md +7 -315
- package/package/corpus/rules/dialogs.md +1 -1
- package/package/corpus/rules/discoverability.md +3 -25
- package/package/corpus/rules/documentation-structure-and-formatting.md +5 -151
- package/package/corpus/rules/documentation.md +5 -104
- package/package/corpus/rules/editing-cratis-docs.md +5 -63
- package/package/corpus/rules/efcore.md +8 -55
- package/package/corpus/rules/efcore.specs.md +3 -33
- package/package/corpus/rules/elixir.md +6 -79
- package/package/corpus/rules/exit-codes-and-wrappers.md +4 -27
- package/package/corpus/rules/framework-dotnet.md +4 -6
- package/package/corpus/rules/framework.md +0 -2
- package/package/corpus/rules/frontend-quality.md +0 -1
- package/package/corpus/rules/frontend-testing.md +1 -1
- package/package/corpus/rules/general.md +2 -2
- package/package/corpus/rules/github-actions.md +7 -138
- package/package/corpus/rules/glossary.md +19 -19
- package/package/corpus/rules/go-engineering.md +1 -4
- package/package/corpus/rules/go.md +2 -7
- package/package/corpus/rules/guards-and-fuses.md +5 -6
- package/package/corpus/rules/java.md +7 -129
- package/package/corpus/rules/kotlin.md +8 -165
- package/package/corpus/rules/orleans.md +5 -98
- package/package/corpus/rules/profiles.md +9 -63
- package/package/corpus/rules/scripting.md +1 -1
- package/package/corpus/rules/specs.csharp.md +8 -148
- package/package/corpus/rules/specs.elixir.md +4 -37
- package/package/corpus/rules/specs.typescript.md +3 -1
- package/package/corpus/rules/storybook.md +7 -70
- package/package/corpus/rules/typescript.md +8 -98
- package/package/corpus/rules/writing-correct-examples.md +3 -47
- package/package/corpus/rules/writing-cratis-docs.md +3 -65
- package/package/corpus/skills/cratis-application-growth/SKILL.md +7 -54
- package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +49 -0
- package/package/corpus/skills/cratis-application-growth/references/rename-window.md +12 -14
- package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
- package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +3 -3
- package/package/corpus/skills/cratis-arc-authorize-request/references/kotlin.md +2 -2
- package/package/corpus/skills/cratis-arc-code-analysis-typescript/SKILL.md +10 -43
- package/package/corpus/skills/cratis-arc-code-analysis-typescript/references/rule-fixes.md +40 -0
- package/package/corpus/skills/cratis-arc-connect-storage/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-connect-storage/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
- package/package/corpus/skills/cratis-arc-declare-command/references/kotlin.md +6 -7
- package/package/corpus/skills/cratis-arc-declare-operation/SKILL.md +2 -8
- package/package/corpus/skills/cratis-arc-declare-operation/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-diagnose-live-query/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-diagnose-live-query/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-expose-mcp-operation/SKILL.md +6 -12
- package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/custom-exposure-and-audit.md +4 -0
- package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +11 -4
- package/package/corpus/skills/cratis-arc-expose-query/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-generate-proxies/references/go.md +19 -2
- package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +1 -2
- package/package/corpus/skills/cratis-arc-host-application/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-arc-host-application/references/go.md +5 -1
- package/package/corpus/skills/cratis-arc-host-application/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-identity-and-tenancy-kotlin/SKILL.md +4 -7
- package/package/corpus/skills/cratis-arc-invoke-command/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-arc-invoke-command/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/typescript.md +4 -2
- package/package/corpus/skills/cratis-arc-migrate-relational-schema/SKILL.md +6 -6
- package/package/corpus/skills/cratis-arc-page-query/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +10 -6
- package/package/corpus/skills/cratis-arc-page-query/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-arc-page-query/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-page-query/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +7 -3
- package/package/corpus/skills/cratis-arc-react-separate-view-model/references/react-routing-and-messaging.md +1 -1
- package/package/corpus/skills/cratis-arc-select-backend-sdk/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/elixir.md +2 -4
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/go.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/kotlin.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/typescript.md +1 -3
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/SKILL.md +13 -51
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/read-model-naming.md +9 -1
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/storage-boundaries.md +40 -0
- package/package/corpus/skills/cratis-arc-storage-typescript/SKILL.md +19 -64
- package/package/corpus/skills/cratis-arc-storage-typescript/references/drizzle.md +62 -0
- package/package/corpus/skills/cratis-arc-tenancy-typescript/SKILL.md +24 -55
- package/package/corpus/skills/cratis-arc-tenancy-typescript/references/tenant-selection.md +49 -0
- package/package/corpus/skills/cratis-arc-testing-kotlin/SKILL.md +13 -31
- package/package/corpus/skills/cratis-arc-testing-kotlin/references/jvm-scenario-variants.md +25 -0
- package/package/corpus/skills/cratis-arc-testing-typescript/SKILL.md +24 -62
- package/package/corpus/skills/cratis-arc-testing-typescript/references/hosts-and-runners.md +51 -0
- package/package/corpus/skills/cratis-arc-validate-command/SKILL.md +4 -4
- package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +10 -12
- package/package/corpus/skills/cratis-arc-validate-command/references/elixir.md +16 -3
- package/package/corpus/skills/cratis-arc-validate-command/references/go.md +19 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/java.md +20 -7
- package/package/corpus/skills/cratis-arc-validate-command/references/kotlin.md +22 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/python.md +8 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/typescript.md +22 -2
- package/package/corpus/skills/cratis-arc-validation-kotlin/SKILL.md +22 -248
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/feature-filters.md +55 -0
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/model-validation.md +72 -0
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/server-validators.md +86 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +27 -275
- package/package/corpus/skills/cratis-arc-validation-typescript/references/models-and-queries.md +63 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/references/rules-and-checks.md +46 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/references/server-decisions.md +114 -0
- package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +15 -255
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/command-effects.md +13 -6
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/inspection.md +75 -0
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +78 -13
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/recovery-and-comparison.md +16 -14
- package/package/corpus/skills/cratis-chronicle-connect-application/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +10 -6
- package/package/corpus/skills/cratis-chronicle-connect-application/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +8 -8
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +10 -8
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +8 -4
- package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +4 -4
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/deployed-readers.md +21 -8
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +5 -7
- package/package/corpus/skills/cratis-chronicle-inspect-observer/references/elixir.md +3 -3
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +10 -80
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/blocked-tools.md +2 -2
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +9 -24
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/observational-tools.md +10 -0
- package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +7 -6
- package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +11 -5
- package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +3 -1
- package/package/corpus/skills/cratis-chronicle-protect-personal-data/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-protect-personal-data/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +51 -40
- package/package/corpus/skills/cratis-chronicle-publish-contract/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/{occurrences.md → csharp-occurrences.md} +2 -2
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +5 -6
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/go.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +21 -19
- package/package/corpus/skills/cratis-chronicle-record-event/references/elixir.md +3 -3
- package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +3 -4
- package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -4
- package/package/corpus/skills/cratis-chronicle-record-event/references/typescript.md +2 -2
- package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +7 -2
- package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +4 -4
- package/package/corpus/skills/cratis-chronicle-select-client/references/csharp.md +3 -3
- package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +2 -6
- package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +2 -2
- package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +1 -1
- package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +1 -5
- package/package/corpus/skills/cratis-chronicle-select-client/references/python.md +3 -3
- package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +2 -2
- package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +12 -201
- package/package/corpus/skills/cratis-chronicle-web-workbench/references/hosting.md +67 -0
- package/package/corpus/skills/cratis-chronicle-web-workbench/references/operations.md +88 -0
- package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +8 -4
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/build-once-and-shard.md +13 -11
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/caching.md +2 -2
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/flaky-and-hung-jobs.md +6 -4
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/required-checks-and-path-filters.md +20 -61
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/security-and-pinning.md +1 -1
- package/package/corpus/skills/cratis-cli-terminal-workbench/SKILL.md +15 -26
- package/package/corpus/skills/cratis-code-review/SKILL.md +7 -6
- package/package/corpus/skills/cratis-commits-and-pull-requests/SKILL.md +1 -1
- package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-description.md +1 -1
- package/package/corpus/skills/cratis-components-accessibility/SKILL.md +14 -206
- package/package/corpus/skills/cratis-components-accessibility/references/control-labels.md +29 -0
- package/package/corpus/skills/cratis-components-accessibility/references/focus-and-announcements.md +8 -0
- package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-build-canvas/references/pixi-items.md +1 -1
- package/package/corpus/skills/cratis-components-choose-control/SKILL.md +7 -8
- package/package/corpus/skills/cratis-components-choose-control/references/collections.md +2 -2
- package/package/corpus/skills/cratis-components-choose-control/references/inputs.md +1 -1
- package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +22 -27
- package/package/corpus/skills/cratis-components-compose-toolbar/references/contributed-tools.md +5 -0
- package/package/corpus/skills/cratis-components-coordinate-feedback/SKILL.md +19 -25
- package/package/corpus/skills/cratis-components-display-list/SKILL.md +26 -19
- package/package/corpus/skills/cratis-components-display-list/references/server-query.md +3 -3
- package/package/corpus/skills/cratis-components-edit-schema-data/SKILL.md +15 -12
- package/package/corpus/skills/cratis-components-edit-schema-data/references/controlled-editor.md +3 -3
- package/package/corpus/skills/cratis-components-explore-data/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-host-chat/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-submit-form/SKILL.md +9 -15
- package/package/corpus/skills/cratis-components-submit-form/references/confirmation.md +5 -5
- package/package/corpus/skills/cratis-components-submit-form/references/wizard.md +3 -3
- package/package/corpus/skills/cratis-components-theme-application/SKILL.md +7 -51
- package/package/corpus/skills/cratis-components-theme-application/references/palette.md +49 -0
- package/package/corpus/skills/cratis-components-theme-application/references/renderer-adapters.md +4 -2
- package/package/corpus/skills/cratis-content-length/SKILL.md +34 -46
- package/package/corpus/skills/cratis-content-length/references/length-evidence.md +26 -127
- package/package/corpus/skills/cratis-developer-marketing/SKILL.md +15 -27
- package/package/corpus/skills/cratis-developer-marketing/references/measurement.md +3 -19
- package/package/corpus/skills/cratis-developer-marketing/references/playbook-evidence.md +29 -224
- package/package/corpus/skills/cratis-discoverability/SKILL.md +11 -4
- package/package/corpus/skills/cratis-discoverability/references/package-metadata.md +2 -2
- package/package/corpus/skills/cratis-documentation-writing/SKILL.md +4 -3
- package/package/corpus/skills/cratis-engineering-ci-gates/SKILL.md +13 -129
- package/package/corpus/skills/cratis-engineering-ci-gates/references/gate-operation.md +132 -0
- package/package/corpus/skills/cratis-engineering-consolidation-guard/SKILL.md +11 -100
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/ci-required-check.md +55 -40
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/source-verification.md +68 -0
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/verification-details.md +38 -0
- package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +14 -65
- package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +40 -174
- package/package/corpus/skills/cratis-engineering-decision-record/SKILL.md +8 -52
- package/package/corpus/skills/cratis-engineering-decision-record/references/decision-pitfalls.md +29 -0
- package/package/corpus/skills/cratis-engineering-decision-record/references/decision-scope.md +20 -0
- package/package/corpus/skills/cratis-engineering-decision-record/references/record-format.md +3 -4
- package/package/corpus/skills/cratis-engineering-docs-authoring/SKILL.md +7 -12
- package/package/corpus/skills/cratis-engineering-docs-authoring/references/site-format.md +5 -4
- package/package/corpus/skills/cratis-engineering-effect-boundaries/SKILL.md +6 -40
- package/package/corpus/skills/cratis-engineering-effect-boundaries/references/failure-archetypes.md +18 -151
- package/package/corpus/skills/cratis-engineering-inherited-work/SKILL.md +5 -21
- package/package/corpus/skills/cratis-engineering-inherited-work/references/continue-inherited-work.md +19 -0
- package/package/corpus/skills/cratis-engineering-issue-design-note/SKILL.md +3 -66
- package/package/corpus/skills/cratis-engineering-issue-design-note/references/design-note-format.md +68 -0
- package/package/corpus/skills/cratis-engineering-issue-hygiene/SKILL.md +2 -84
- package/package/corpus/skills/cratis-engineering-issue-hygiene/references/issue-disposition.md +87 -0
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/SKILL.md +15 -263
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dependency-map.md +3 -3
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/docker-images.md +28 -6
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dotnet-nuget.md +18 -14
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/helper-runbook.md +231 -0
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/other-environments.md +2 -3
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/worked-examples.md +62 -77
- package/package/corpus/skills/cratis-engineering-post-mortem/SKILL.md +6 -39
- package/package/corpus/skills/cratis-engineering-post-mortem/references/proportionate-follow-up.md +36 -0
- package/package/corpus/skills/cratis-engineering-regression-cluster/SKILL.md +4 -4
- package/package/corpus/skills/cratis-engineering-release-trains/SKILL.md +8 -134
- package/package/corpus/skills/cratis-engineering-release-trains/references/candidate-assembly.md +139 -0
- package/package/corpus/skills/cratis-engineering-review-rounds/SKILL.md +3 -100
- package/package/corpus/skills/cratis-engineering-review-rounds/references/round-handoffs.md +109 -0
- package/package/corpus/skills/cratis-environments-and-secrets/SKILL.md +1 -5
- package/package/corpus/skills/cratis-environments-and-secrets/references/environment-file.md +1 -3
- package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +11 -116
- package/package/corpus/skills/cratis-event-model-diagram/references/frame-patterns.md +93 -0
- package/package/corpus/skills/cratis-fundamentals-concept-go/SKILL.md +4 -15
- package/package/corpus/skills/cratis-fundamentals-name-value/SKILL.md +8 -8
- package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-fundamentals-name-value/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/go.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/java.md +5 -5
- package/package/corpus/skills/cratis-fundamentals-name-value/references/kotlin.md +15 -2
- package/package/corpus/skills/cratis-fundamentals-name-value/references/python.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-telemetry/SKILL.md +10 -27
- package/package/corpus/skills/cratis-fundamentals-telemetry/references/otlp-export.md +16 -0
- package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +26 -188
- package/package/corpus/skills/cratis-fundamentals-type-discovery/references/diagnostics.md +14 -0
- package/package/corpus/skills/cratis-governed-release-methodology/SKILL.md +7 -5
- package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +23 -157
- package/package/corpus/skills/cratis-lens-browser-extension/references/troubleshooting.md +139 -0
- package/package/corpus/skills/cratis-llm-friendly-documentation/SKILL.md +7 -5
- package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +2 -4
- package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +7 -0
- package/package/corpus/skills/cratis-modeling-discover-timeline/SKILL.md +2 -2
- package/package/corpus/skills/cratis-modeling-discover-timeline/references/group-and-document-intake.md +1 -1
- package/package/corpus/skills/cratis-modeling-review-event-model/SKILL.md +2 -2
- package/package/corpus/skills/cratis-modeling-review-event-model/references/implementation-findings.md +2 -2
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/SKILL.md +5 -23
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/compare-evidence.md +20 -0
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/recovery-inputs.md +3 -3
- package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +8 -63
- package/package/corpus/skills/cratis-multi-service-local-orchestration/references/aspire.md +52 -0
- package/package/corpus/skills/cratis-observability/SKILL.md +1 -1
- package/package/corpus/skills/cratis-observability/references/arc-and-chronicle-signals.md +9 -23
- package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +3 -14
- package/package/corpus/skills/cratis-observability/references/csharp.md +4 -6
- package/package/corpus/skills/cratis-observability/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-observability/references/troubleshooting.md +4 -5
- package/package/corpus/skills/cratis-onboarding-runtime/SKILL.md +1 -4
- package/package/corpus/skills/cratis-onboarding-runtime/references/default-offering.md +0 -3
- package/package/corpus/skills/cratis-onboarding-runtime/references/sign-up-review.md +0 -4
- package/package/corpus/skills/cratis-orchestration-lanes/SKILL.md +7 -49
- package/package/corpus/skills/cratis-orchestration-lanes/references/escalation.md +22 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/inbox-and-handover.md +4 -4
- package/package/corpus/skills/cratis-orchestration-lanes/references/placeholders.md +1 -1
- package/package/corpus/skills/cratis-orchestration-lanes/references/roles.md +12 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/roll-call.md +12 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/worktrees.md +10 -0
- package/package/corpus/skills/cratis-orchestration-merge-gates/SKILL.md +14 -13
- package/package/corpus/skills/cratis-orchestration-merge-gates/references/merge-queue.md +51 -26
- package/package/corpus/skills/cratis-orchestration-merge-gates/references/unattended-guards.md +8 -14
- package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +9 -65
- package/package/corpus/skills/cratis-orleans-jobs/references/activation-callbacks.md +5 -0
- package/package/corpus/skills/cratis-orleans-jobs/references/lifecycle-and-placement.md +11 -7
- package/package/corpus/skills/cratis-orleans-jobs/references/state-machines.md +1 -1
- package/package/corpus/skills/cratis-orleans-jobs/references/step-planning.md +27 -0
- package/package/corpus/skills/cratis-orleans-jobs/references/storage-and-options.md +35 -0
- package/package/corpus/skills/cratis-performance-review/SKILL.md +6 -76
- package/package/corpus/skills/cratis-performance-review/references/review-checklist.md +79 -0
- package/package/corpus/skills/cratis-platform-configure-environment/SKILL.md +19 -16
- package/package/corpus/skills/cratis-platform-contribute-change/SKILL.md +2 -2
- package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +5 -5
- package/package/corpus/skills/cratis-platform-deliver-slice/references/coordinate-slices.md +1 -1
- package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +2 -3
- package/package/corpus/skills/cratis-platform-prepare-release-pr/SKILL.md +2 -2
- package/package/corpus/skills/cratis-platform-start-application/SKILL.md +10 -8
- package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +6 -6
- package/package/corpus/skills/cratis-platform-start-application/references/java.md +4 -4
- package/package/corpus/skills/cratis-platform-start-application/references/kotlin.md +4 -4
- package/package/corpus/skills/cratis-platform-verify-service-handoff/SKILL.md +3 -3
- package/package/corpus/skills/cratis-release-notes/SKILL.md +9 -133
- package/package/corpus/skills/cratis-release-notes/references/channel-guidance.md +59 -0
- package/package/corpus/skills/cratis-release-notes/references/publish-repair.md +64 -0
- package/package/corpus/skills/cratis-rtk/SKILL.md +12 -18
- package/package/corpus/skills/cratis-screenplay-accept-model/SKILL.md +3 -3
- package/package/corpus/skills/cratis-screenplay-accept-model/references/capability-consumption.md +1 -1
- package/package/corpus/skills/cratis-screenplay-accept-model/references/coverage-obligations.md +1 -1
- package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/SKILL.md +25 -59
- package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/references/onboarding-directives.md +11 -10
- package/package/corpus/skills/cratis-screenplay-author-extension/SKILL.md +9 -6
- package/package/corpus/skills/cratis-screenplay-author-extension/references/consume.md +3 -3
- package/package/corpus/skills/cratis-screenplay-author-extension/references/stage-candidate.md +8 -0
- package/package/corpus/skills/cratis-screenplay-availability/SKILL.md +20 -167
- package/package/corpus/skills/cratis-screenplay-availability/references/complete-example.md +23 -47
- package/package/corpus/skills/cratis-screenplay-availability/references/review-checks.md +9 -10
- package/package/corpus/skills/cratis-screenplay-availability/references/runtime-ownership.md +26 -23
- package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +6 -14
- package/package/corpus/skills/cratis-screenplay-declare-slice/references/projection-replay.md +2 -2
- package/package/corpus/skills/cratis-screenplay-declare-slice/references/read-identity.md +1 -1
- package/package/corpus/skills/cratis-screenplay-edit-workspace/SKILL.md +7 -9
- package/package/corpus/skills/cratis-screenplay-edit-workspace/references/model-notes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-handoff-slice/SKILL.md +10 -14
- package/package/corpus/skills/cratis-screenplay-model-automation/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-automation/references/reaction-boundaries.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-interaction/SKILL.md +6 -31
- package/package/corpus/skills/cratis-screenplay-model-interaction/references/shell-and-data.md +22 -0
- package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +5 -5
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +5 -5
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/version-migration.md +4 -4
- package/package/corpus/skills/cratis-screenplay-recover-intent/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-recover-intent/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-screenplay-recover-intent/references/ground-truth-benchmark.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +4 -75
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/host-body-execution.md +0 -2
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/observable-result.md +85 -1
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/query-rejections.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +15 -133
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +5 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +4 -12
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +28 -57
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +4 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +13 -20
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/neighbouring-skills.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/read-model-keys.md +3 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-id-rules.md +2 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +5 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +82 -71
- package/package/corpus/skills/cratis-security-review/SKILL.md +4 -73
- package/package/corpus/skills/cratis-security-review/references/arc-boundaries.md +24 -13
- package/package/corpus/skills/cratis-security-review/references/review-checklist.md +74 -0
- package/package/corpus/skills/cratis-session-handoff/SKILL.md +7 -32
- package/package/corpus/skills/cratis-session-handoff/references/handoff-template.md +2 -2
- package/package/corpus/skills/cratis-session-handoff/references/session-hygiene.md +20 -0
- package/package/corpus/skills/cratis-showrunner-herald/SKILL.md +9 -17
- package/package/corpus/skills/cratis-showrunner-herald/references/options.md +2 -2
- package/package/corpus/skills/cratis-showrunner-herald/references/templates-and-images.md +16 -10
- package/package/corpus/skills/cratis-social-feed-post/SKILL.md +9 -162
- package/package/corpus/skills/cratis-social-feed-post/references/asset-and-formatting.md +37 -0
- package/package/corpus/skills/cratis-social-feed-post/references/editorial-checks.md +40 -0
- package/package/corpus/skills/cratis-social-feed-post/references/engagement-evidence.md +39 -150
- package/package/corpus/skills/cratis-social-feed-post/references/linkedin-media.md +24 -0
- package/package/corpus/skills/cratis-social-feed-post/references/other-channels.md +23 -0
- package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +5 -5
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +2 -2
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-query-scenario.md +13 -5
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +7 -4
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/go.md +20 -4
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +2 -2
- package/package/corpus/skills/cratis-specifications-observe-ui/SKILL.md +5 -5
- package/package/corpus/skills/cratis-specifications-test-application-ui/SKILL.md +2 -2
- package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript-command-results.md +2 -2
- package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -2
- package/package/corpus/skills/cratis-stage-render-slice/SKILL.md +10 -9
- package/package/corpus/skills/cratis-stage-run-sandbox/SKILL.md +3 -3
- package/package/corpus/skills/cratis-stage-run-sandbox/references/semantic-spec-runner.md +7 -6
- package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +4 -6
- package/package/corpus/skills/cratis-technical-examples/SKILL.md +10 -106
- package/package/corpus/skills/cratis-technical-examples/references/csharp-package-checks.md +1 -1
- package/package/corpus/skills/cratis-technical-examples/references/source-and-format.md +42 -0
- package/package/corpus/skills/cratis-technical-examples/references/typescript-package-checks.md +2 -2
- package/package/corpus/skills/cratis-technical-examples/references/verification-scope.md +37 -0
- package/package/corpus/skills/cratis-ux-review/SKILL.md +8 -40
- package/package/corpus/skills/cratis-ux-review/references/capture-contract.md +24 -0
- package/package/corpus/skills/cratis-ux-review/references/checklist.md +1 -1
- package/package/corpus/skills/cratis-ux-review/references/report-template.md +2 -1
- package/package/corpus/skills/cratis-writing-voice-and-cadence/SKILL.md +19 -132
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/ai-tells.md +24 -97
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/author-and-batch.md +23 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/documentation-evidence.md +25 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/interpretation.md +17 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/stock-constructions.md +23 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/voice-guidance.md +8 -29
- package/package.json +1 -1
- /package/package/corpus/skills/cratis-chronicle-protect-decision/references/{standalone.md → csharp-standalone.md} +0 -0
- /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/silent-backup-failure.md → silent-backup-failure.md} +0 -0
- /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/unintended-release-regression.md → unintended-release-regression.md} +0 -0
|
@@ -1,221 +1,29 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-components-accessibility
|
|
3
|
-
description: Use when fixing Cratis Components focus, keyboard
|
|
3
|
+
description: Use when fixing Cratis Components focus, keyboard activation, accessible names or field error announcements. Not for visual theming (use cratis-components-theme-application).
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Make a Components interaction accessible
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
in its own source. It is deliberately narrow. It is not a WCAG conformance
|
|
11
|
-
guide, and it does not claim the library is conformant.
|
|
9
|
+
Start with the built-in controls under `CratisComponentsProvider`. Use their behavior props for accessible names and state and their documented parts for styling. Do not nest a second modal or keyboard handler that manages the same controls: one surface needs one focus and selection owner.
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
what is written here.
|
|
15
|
-
|
|
16
|
-
Focus, overlay and collection behavior come from React Aria **internally** — the
|
|
17
|
-
dialog is a React Aria `Modal` inside a `ModalOverlay`; you never import React
|
|
18
|
-
Aria yourself, and its class names are not a styling or testing hook.
|
|
19
|
-
|
|
20
|
-
## 1. Dialog focus discipline
|
|
21
|
-
|
|
22
|
-
A modal must move focus into itself when it opens. Leaving focus on the document
|
|
23
|
-
body strands keyboard and screen-reader users, so `Dialog` has **no "focus
|
|
24
|
-
nothing" option** — `DialogInitialFocus` has exactly three members and one of
|
|
25
|
-
them always applies.
|
|
26
|
-
|
|
27
|
-
```ts
|
|
28
|
-
enum DialogInitialFocus { Confirm = 1, Cancel = 2, Content = 3 }
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
| Member | Effect | Use for |
|
|
32
|
-
| --- | --- | --- |
|
|
33
|
-
| `Confirm` | focuses the confirm button — **the default** | ordinary, safe dialogs |
|
|
34
|
-
| `Cancel` | focuses the least destructive action | anything irreversible |
|
|
35
|
-
| `Content` | focuses the dialog title, arming nothing | a dialog that should commit to nothing |
|
|
36
|
-
|
|
37
|
-
### The armed-Enter hazard
|
|
38
|
-
|
|
39
|
-
`Confirm` *arms* the confirm button. A browser fires `click` from the `keydown`
|
|
40
|
-
of Enter or Space, so an Enter that is still held — or repeating — from the
|
|
41
|
-
action that opened the dialog can confirm it immediately, before the user has
|
|
42
|
-
read anything.
|
|
43
|
-
|
|
44
|
-
**Any dialog whose confirm action is destructive or irreversible must set
|
|
45
|
-
`initialFocus`.**
|
|
11
|
+
1. Name the actual control. Put a field's visible name in `title` for a built-in command field. Give icon-only controls a name and keep redundant icons hidden (`aria-hidden="true"`). `Dropdown` forwards the ID and accessible name to its trigger; a regular single-select uses a button, whereas a filtered one uses a combobox. Query the visible control by its actual role and name. `DatePickerInput` is segmented: use `aria-label` or `aria-labelledby` on the group, not an external `htmlFor` expecting a text input.
|
|
46
12
|
|
|
47
13
|
```tsx
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
initialFocus={DialogInitialFocus.Cancel}>
|
|
14
|
+
<label htmlFor="advisory-role">Advisory role</label>
|
|
15
|
+
<Dropdown id="advisory-role" options={roles} value={role} onChange={setRole}
|
|
16
|
+
aria-describedby="role-help" />
|
|
17
|
+
<p id="role-help">Choose one advisory role.</p>
|
|
53
18
|
```
|
|
54
19
|
|
|
55
|
-
`
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
`DialogInitialFocus` imports from `@cratis/components/Dialogs`. While `isBusy`
|
|
59
|
-
is set the dialog marks its content `inert` and disables every dismissal path,
|
|
60
|
-
so a user cannot interact with a half-committed form.
|
|
61
|
-
|
|
62
|
-
## 2. Every accessible name is a prop or a provider message — never a baked-in English string
|
|
63
|
-
|
|
64
|
-
This is the library's strongest and most consistent convention: any string a
|
|
65
|
-
screen reader will read is exposed as an overridable, localizable prop, and the
|
|
66
|
-
library-wide ones also come from `CratisComponentsProvider`'s `messages`. The
|
|
67
|
-
precedence is always the same: **a named component prop wins, then the matching
|
|
68
|
-
provider message, then the English default.** Set the provider messages once for
|
|
69
|
-
the application's locale, and the per-instance props where one control needs a
|
|
70
|
-
different name.
|
|
71
|
-
|
|
72
|
-
| Component | Prop | Provider message |
|
|
73
|
-
| --- | --- | --- |
|
|
74
|
-
| `Dialog` / `CommandDialog` / `StepperCommandDialog` | `closeAriaLabel`; `okLabel`, `cancelLabel`, `yesLabel`, `noLabel` | `messages.dialog` (`ok`, `cancel`, `yes`, `no`, `close`) |
|
|
75
|
-
| `CommandStepper` / `StepperCommandDialog` | `nextLabel`, `previousLabel` | `messages.stepper` (`next`, `previous`, `submit`) |
|
|
76
|
-
| `DataPage` | `actionsAriaLabel`, `globalSearchAriaLabel`, `paginatorAriaLabels` | `messages.dataTable`, `messages.paginator` |
|
|
77
|
-
| `DataTableForQuery` / `DataTableForObservableQuery` | `paginatorAriaLabels` | `messages.paginator` (`navigation`, `first`, `previous`, `next`, `last`) |
|
|
78
|
-
| `Column` (filter menu) | `filterLabels` — match mode, clear, apply, true, false | `messages.columnFilter` |
|
|
79
|
-
| `Toaster` | `dismissAriaLabel` | `messages.notifications` (`dismiss`, `region`) |
|
|
80
|
-
| `Dropdown` | `aria-label`, `aria-labelledby`, `aria-describedby` | `messages.dropdown` (`showOptions`, `clearSelection`) |
|
|
81
|
-
| `DatePickerInput` / `CalendarField` | `aria-label` / `aria-labelledby` for the segmented **group**; `todayLabel`, `clearLabel` | `messages.datePicker` (`today`, `clear`, `openCalendar`, `previousMonth`, `nextMonth`, `label`) |
|
|
82
|
-
| Every CommandForm field | `aria-label` (falls back to the field `title`), `aria-describedby`, `id` | — |
|
|
83
|
-
| `SchemaEditor` | `labels` | — |
|
|
84
|
-
| `ObjectNavigationalBar` | `backLabel` — tooltip **and** accessible name | — |
|
|
85
|
-
| `ToolbarButton` | `title` — required; the accessible name and the tooltip | — |
|
|
86
|
-
| `Toolbar` | `aria-label`, `aria-labelledby` | `messages.toolbar` (`label`, default `'Tools'`) |
|
|
87
|
-
| `ToolbarFolder` drawer | `closeLabel` | `messages.toolbar.closeDrawer` |
|
|
88
|
-
| `FilterPanel` | `aria-label`, `searchAriaLabel` | `messages.filter` (`label`, `searchAriaLabel`) |
|
|
89
|
-
| `ToolbarFanOutItem` / `ToolbarFolder` | `tooltip` / `title` — required | — |
|
|
90
|
-
| `RatingField` | `starAriaLabel` | — |
|
|
91
|
-
| `ChipsField` | `removeAriaLabel` | — |
|
|
92
|
-
|
|
93
|
-
In a localized application, treat any component whose accessible name you have
|
|
94
|
-
not supplied — and any provider message group left at its English default — as
|
|
95
|
-
a defect.
|
|
96
|
-
|
|
97
|
-
## 3. Put the name on the focusable element, not the wrapper
|
|
98
|
-
|
|
99
|
-
An accessible name has to land on the element that actually receives focus and
|
|
100
|
-
carries the role. `Dropdown` demonstrates the rule: `id` and the `aria-*`
|
|
101
|
-
attributes route to the **trigger** (`data-cratis-part='trigger'`), not to the
|
|
102
|
-
layout wrapper, and the control id is deliberately not duplicated onto the
|
|
103
|
-
wrapper so an external `<label htmlFor>` associates correctly. A single select
|
|
104
|
-
follows the button/listbox pattern and a filtered one is a combobox — so in a
|
|
105
|
-
test, query the trigger by its accessible name or its part, **not** by
|
|
106
|
-
`role="combobox"`.
|
|
107
|
-
|
|
108
|
-
```tsx
|
|
109
|
-
<label htmlFor='role'>Advisory role</label>
|
|
110
|
-
<Dropdown id='role' value={role} options={roles} aria-describedby='role-help' />
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
`DatePickerInput` is a segmented field: its `id` identifies the **focus group**,
|
|
114
|
-
not a native text input, so name it with `aria-label`/`aria-labelledby` on the
|
|
115
|
-
group. `Tooltip` enhances exactly one real focusable child so focus, hover and
|
|
116
|
-
`aria-describedby` stay together — wrap text, fragments or several siblings in
|
|
117
|
-
one native control first. Several `RadioButtonField`s bound to one property need
|
|
118
|
-
the same explicit `name` for native arrow-key group navigation.
|
|
119
|
-
|
|
120
|
-
Apply the same rule to your own wrapper components: forward `id`, `tabIndex`,
|
|
121
|
-
and `aria-*` down to the focusable child rather than putting them on a
|
|
122
|
-
container.
|
|
123
|
-
|
|
124
|
-
## 4. Field errors are announced — do not duplicate them
|
|
125
|
-
|
|
126
|
-
Every CommandForm field runs its title and validation messages through one
|
|
127
|
-
helper: the control's accessible name falls back to the field `title`, and when
|
|
128
|
-
the field has errors a visually hidden `<span id="…-errors">` is rendered and
|
|
129
|
-
linked from the control's `aria-describedby` (merged with any `aria-describedby`
|
|
130
|
-
you pass). Arc renders the visible error text; the hidden span exists only for
|
|
131
|
-
assistive technology. Do **not** render a second announcement or wire your own
|
|
132
|
-
`aria-describedby` to the visible error — you would announce it twice.
|
|
133
|
-
|
|
134
|
-
## 5. Decorative icons are hidden
|
|
135
|
-
|
|
136
|
-
Icons and loading spinners inside a labelled control are marked
|
|
137
|
-
`aria-hidden='true'` so a button's accessible name is exactly its label and not
|
|
138
|
-
the icon's text. Do the same in application components: an icon that sits beside
|
|
139
|
-
a text label carries no information of its own (`<FaPlus aria-hidden='true' />`).
|
|
140
|
-
|
|
141
|
-
## 6. Customize through parts without fighting the component's ARIA
|
|
142
|
-
|
|
143
|
-
Parts (`pt` and `data-cratis-part`) are for **presentation**. The component owns
|
|
144
|
-
the role, the name and the state attributes on its elements: *named behavior
|
|
145
|
-
props override conflicting part attributes*, so a `role` or `aria-*` value you
|
|
146
|
-
push through `pt` onto a part the component already labels is either overridden
|
|
147
|
-
or produces two competing semantics. Put identity and ARIA on the documented
|
|
148
|
-
behavior props (§2, §3) and keep `pt` to `className`, `style` and data
|
|
149
|
-
attributes. State is expressed through valid ARIA plus a data attribute
|
|
150
|
-
(`aria-invalid` + `data-invalid`, `data-disabled`, `data-selected`) — express your
|
|
151
|
-
own component state the same way, never through made-up attributes.
|
|
152
|
-
|
|
153
|
-
One focus lifecycle per interactive surface: never nest a second modal or focus
|
|
154
|
-
trap inside a Components dialog to borrow another look, and never combine two
|
|
155
|
-
keyboard-selection owners for one control. A presentation adapter must preserve
|
|
156
|
-
the Components contract without adding a second semantic control.
|
|
157
|
-
|
|
158
|
-
## What Cratis Components does — and does not — give you
|
|
159
|
-
|
|
160
|
-
Be accurate about this — over-promising accessibility is worse than saying
|
|
161
|
-
nothing.
|
|
162
|
-
|
|
163
|
-
- **There is an automated scan, on representative surfaces.** The library runs
|
|
164
|
-
`axe-core` (WCAG 2 A and AA rules) over a set of representative foundation
|
|
165
|
-
surfaces in its own specs, and Storybook carries the accessibility addon. That
|
|
166
|
-
proves those surfaces have no *automated* violations; it is not a conformance
|
|
167
|
-
certification, it does not cover every component, and it cannot see keyboard
|
|
168
|
-
order, focus restoration, screen-reader phrasing or color relationships the
|
|
169
|
-
product introduces.
|
|
170
|
-
- **Modal focus management is real**: focus moves in per §1, the backdrop and the
|
|
171
|
-
document behind are handled by the React Aria modal, Escape and backdrop
|
|
172
|
-
dismissal follow `dismissable`, and busy content is `inert`. Verify keyboard
|
|
173
|
-
order, initial focus, focus restoration and screen-reader output in the
|
|
174
|
-
application's supported browsers and assistive technologies — Components does
|
|
175
|
-
not certify them for you.
|
|
176
|
-
- **Breadcrumbs and drill-ins in `SchemaEditor`, `ObjectContentEditor` and
|
|
177
|
-
`ObjectNavigationalBar` are native `<button>`s** (with `aria-current` on the
|
|
178
|
-
current crumb), so they are focusable and keyboard-activatable. Anything beyond
|
|
179
|
-
that — shortcut keys, arrow-key grid navigation — is not implemented; verify
|
|
180
|
-
against the component source before documenting it.
|
|
181
|
-
- **A custom design still owns visible focus, contrast, target size, reduced
|
|
182
|
-
motion, forced colors and responsive behavior.** Components supplies semantic
|
|
183
|
-
behavior and the `--cratis-focus-ring` token; it cannot infer the product's
|
|
184
|
-
color relationships.
|
|
185
|
-
- **Query state is announced.** Loading rows contain `role='status'`; failure
|
|
186
|
-
and unauthorized rows contain `role='alert'`. `empty-row` is only for a real
|
|
187
|
-
empty result. `Message live={false}` avoids double announcement inside an
|
|
188
|
-
existing live region.
|
|
189
|
-
- **FilterPanel is a named non-modal dialog.** It uses the overlay environment,
|
|
190
|
-
and Escape returns focus to its anchor. Localize `messages.filter`.
|
|
191
|
-
- **Toolbars navigate by keyboard.** `ToolbarFocusMode.Arrows` is the default
|
|
192
|
-
(arrows/Home/End, each tool retains its Tab stop); `SingleTabStop` implements
|
|
193
|
-
the WAI-ARIA toolbar pattern, while `None` keeps native focus. `ToolbarButton`
|
|
194
|
-
exposes `aria-pressed` when `active` is supplied. Tabs, toggle groups, tag
|
|
195
|
-
groups and breadcrumbs also provide keyboard semantics; name each control.
|
|
196
|
-
- **ErrorBoundary uses neutral recovery copy**, never exception text. Supply
|
|
197
|
-
`fallback` (node or `(reset) => node`) to localize it; `onError` reports
|
|
198
|
-
diagnostics, `onReset` runs before retry remounts only the protected section.
|
|
199
|
-
- **Application layouts still own skip links and announcements.** Library
|
|
200
|
-
status regions and focus behavior do not certify the surrounding application.
|
|
20
|
+
2. Check the keyboard path. For ordinary dialogs, leave initial focus to the component (the predefined footer defaults to confirm). Tab through the actions and fields, verify Escape and backdrop behavior with the configured dismissal props, and verify focus returns to the opener. While a dialog is busy, the body is inert and dismissal is blocked. Use one focusable child for `Tooltip` so hover and focus describe the same control. When using several `RadioButtonField`s for the same property, give them the same `name` for native arrow-key navigation.
|
|
21
|
+
3. Submit a form that passes client validation but is rejected by the server. Inspect the focused control's accessible description. Built-in command fields using shared field accessibility add a hidden error description and merge it with the supplied `aria-describedby`. Leave the visible Arc errors in place; do not wire the same error into a second description or announcement.
|
|
201
22
|
|
|
202
|
-
##
|
|
23
|
+
## Choose this when confirmation is irreversible or destructive
|
|
203
24
|
|
|
204
|
-
|
|
205
|
-
`initialFocus` to `DialogInitialFocus.Cancel` or `Content`.
|
|
206
|
-
- `CratisComponentsProvider` carries the locale and every `messages` group the
|
|
207
|
-
application renders; no accessible name in application code is a hard-coded
|
|
208
|
-
English string.
|
|
209
|
-
- `id`, `tabIndex`, and `aria-*` on a wrapper component reach the focusable
|
|
210
|
-
child, not the container; a `DatePickerInput` is named on its group.
|
|
211
|
-
- Icons beside a text label are `aria-hidden`.
|
|
212
|
-
- No `role`/`aria-*` is injected through `pt`; no CSS or test targets a React Aria
|
|
213
|
-
class name.
|
|
214
|
-
- Field errors are not announced twice.
|
|
215
|
-
- No claim of keyboard support, automated coverage, or WCAG conformance is made
|
|
216
|
-
that the source does not back.
|
|
25
|
+
Set `initialFocus={DialogInitialFocus.Cancel}` on the dialog so a second Enter aimed at the opener does not immediately confirm. Import `DialogInitialFocus` from `@cratis/components/Dialogs`. `Cancel` falls back to the title when there is no predefined dismissing button. Set `DialogInitialFocus.Content` directly when focus belongs on the title, not on an action. Open with the keyboard and verify that a separate, deliberate confirmation is needed. Use `cratis-components-coordinate-feedback` for shared confirmation setup.
|
|
217
26
|
|
|
218
|
-
|
|
219
|
-
accessibility risks without claiming conformance, use `cratis-ux-review`.
|
|
27
|
+
Read [Control labels](references/control-labels.md) when localizing built-in action names or labeling an internal control. For query states, recovery and drill-ins, read [Focus and announcements](references/focus-and-announcements.md).
|
|
220
28
|
|
|
221
|
-
|
|
29
|
+
Verify keyboard order, initial focus, focus restoration, descriptions, and announcements in the application's supported browsers and assistive technologies. An automated scan cannot certify those workflows or the product's conformance.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Localize control and action names
|
|
2
|
+
|
|
3
|
+
Set shared messages in `CratisComponentsProvider`'s `value.messages`; supply a component's documented label prop to override it for one instance. Unset messages can fall back to English. This is not a guarantee that every string in every component uses provider messages. Verify the spoken name and description of the actual control in each supported locale.
|
|
4
|
+
|
|
5
|
+
| Component | Prop | Provider message |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| `Dialog` / `CommandDialog` | `closeAriaLabel`; `okLabel`, `cancelLabel`, `yesLabel`, `noLabel` | `messages.dialog` (`ok`, `cancel`, `yes`, `no`, `close`) |
|
|
8
|
+
| `CommandStepper` / `StepperCommandDialog` | `nextLabel`, `previousLabel`, `okLabel` (submit) | `messages.stepper` (`next`, `previous`, `submit`) |
|
|
9
|
+
| `StepperCommandDialog` | `cancelLabel` (footer Cancel when `showCancel` is enabled) | `messages.dialog.cancel` |
|
|
10
|
+
| `DataPage` (action toolbar) | `actionsAriaLabel` | — |
|
|
11
|
+
| `DataPage` (search and paginator) | `globalSearchAriaLabel`, `paginatorAriaLabels` | `messages.dataTable`, `messages.paginator` |
|
|
12
|
+
| `DataTableForQuery` / `DataTableForObservableQuery` | `paginatorAriaLabels` | `messages.paginator` (`navigation`, `first`, `previous`, `next`, `last`) |
|
|
13
|
+
| `Column` (filter menu) | `filterLabels` — match mode, clear, apply, true, false | `messages.columnFilter` |
|
|
14
|
+
| `Toaster` | `dismissAriaLabel`, `regionAriaLabel` | `messages.notifications` (`dismiss`, `region`) |
|
|
15
|
+
| `Dropdown` | `aria-label`, `aria-labelledby`, `aria-describedby` | `messages.dropdown` (`showOptions`, `clearSelection`) |
|
|
16
|
+
| `DatePickerInput` | `aria-label` / `aria-labelledby` for the segmented group; `todayLabel`, `clearLabel`, `openCalendarLabel` | `messages.datePicker` (`today`, `clear`, `openCalendar`, `previousMonth`, `nextMonth`, `label`) |
|
|
17
|
+
| `CalendarField` | `title` or `aria-label` for the group; `openCalendarLabel` for the trigger | `messages.datePicker` for calendar controls |
|
|
18
|
+
| Built-in CommandForm fields | `aria-label` (falls back to the field `title`), `aria-describedby`, `id` | — |
|
|
19
|
+
| `SchemaEditor` | `labels` | — |
|
|
20
|
+
| `ObjectNavigationalBar` | `backLabel` — tooltip **and** accessible name | — |
|
|
21
|
+
| `ToolbarButton` | `title` — required; the accessible name and the tooltip | — |
|
|
22
|
+
| `Toolbar` | `aria-label`, `aria-labelledby` | `messages.toolbar` (`label`, default `'Tools'`) |
|
|
23
|
+
| `ToolbarFolder` drawer | `closeLabel` | `messages.toolbar.closeDrawer` |
|
|
24
|
+
| `FilterPanel` | `aria-label`, `searchAriaLabel` | `messages.filter` (`label`, `searchAriaLabel`) |
|
|
25
|
+
| `ToolbarFanOutItem` / `ToolbarFolder` | `tooltip` / `title` — required | — |
|
|
26
|
+
| `RatingField` | `starAriaLabel` | — |
|
|
27
|
+
| `ChipsField` | `removeAriaLabel` | — |
|
|
28
|
+
|
|
29
|
+
Use `aria-labelledby` to point to a visible label when the component exposes it. Keep presentation changes in `pt`; only supply semantic attributes through a part when its API documents that use. For example, `Dropdown` supports `pt.clear['aria-label']` for the clear action. Avoid competing names or roles on wrapper and control.
|
package/package/corpus/skills/cratis-components-accessibility/references/focus-and-announcements.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Focus and announcements beyond form fields
|
|
2
|
+
|
|
3
|
+
- For a query table, verify that loading is announced as status and refusal as an alert; the empty row means there are no matching rows, not that a request failed. Use `Message live={false}` when placing it inside an existing live region to avoid a duplicate announcement.
|
|
4
|
+
- Keep the toolbar's default arrow-key navigation. Choose this when the host must own arrow-key handling: set `focusMode={ToolbarFocusMode.None}` on `Toolbar` (import both from `@cratis/components/Toolbar`). This keeps native focus behavior and turns off the built-in keyboard handling; verify that Tab still reaches the tools and arrow keys follow the host's behavior.
|
|
5
|
+
- Give `FilterPanel` a descriptive name. Verify that Escape dismisses the non-modal filter and returns focus to its trigger. Drill-ins and breadcrumbs in schema/object editors use native buttons: test Tab and activation rather than assuming an arrow-key grid.
|
|
6
|
+
- After dialog refusal, check where focus lands. The dialog focuses a supplied feedback target, the enabled confirm button, or the title. Fix inaccessible field errors at the control; color alone does not name a failure.
|
|
7
|
+
- Use `ErrorBoundary` with a neutral, localizable `fallback`; send diagnostics through `onError`. A fallback function receives `reset`; `onReset` runs before remounting the protected section. Do not render exception text to users.
|
|
8
|
+
- The host still owns skip links, visible focus, target size, contrast, responsiveness, reduced motion and forced colors. Preserve `--cratis-focus-ring` behavior when styling; do not target the underlying renderer's class names. For a screenshot review of visible risks, use `cratis-ux-review`; it cannot verify keyboard or assistive behavior.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-components-build-canvas
|
|
3
|
-
description: Use when
|
|
3
|
+
description: Use when laying out interactive DOM items or Pixi markers in world coordinates on a pannable, zoomable Canvas. Not for grouping tool buttons (use cratis-components-compose-toolbar).
|
|
4
4
|
compatibility: Requires react, @cratis/components and the pixi.js peer dependency.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Place a book on a pannable board
|
|
8
8
|
|
|
9
|
-
Default to DOM `CanvasItem` for content that needs keyboard focus.
|
|
9
|
+
Default to DOM `CanvasItem` for content that needs keyboard focus. Choose this when displaying dense markers: use [Pixi items](references/pixi-items.md). Keep positions in host data; panning and zooming do not save them.
|
|
10
10
|
|
|
11
|
-
1. Install a `pixi.js` version that satisfies the Components peer range.
|
|
12
|
-
2. Give the containing element a height and set the canvas to fill it in the slice stylesheet.
|
|
11
|
+
1. Install a `pixi.js` version that satisfies the Components peer range. Import `Canvas` and `CanvasItem` from `@cratis/components/Canvas`. Render `BookBoard` inside the app's `CratisComponentsProvider` from `@cratis/components`.
|
|
12
|
+
2. Give the containing element a height and set the canvas to fill it in the slice stylesheet. Use the built-in zoom controls; they stay fixed when the board moves. Choose this when supplying equivalent host navigation controls: pass `showControls={false}`.
|
|
13
13
|
3. Pass the book ID, title and its world coordinates from the board screen. Place its button inside `CanvasItem`; call the screen's `openBook` handler with the same ID.
|
|
14
14
|
|
|
15
15
|
```tsx
|
|
@@ -20,7 +20,7 @@ type BoardBook = { id: string; title: string; x: number; y: number };
|
|
|
20
20
|
export function BookBoard({ book, openBook }: { book: BoardBook; openBook: (id: string) => void }) {
|
|
21
21
|
return <div className="book-board">
|
|
22
22
|
<Canvas className="book-board__surface">
|
|
23
|
-
<CanvasItem
|
|
23
|
+
<CanvasItem x={book.x} y={book.y}>
|
|
24
24
|
<button type="button" onClick={() => openBook(book.id)}>{book.title}</button>
|
|
25
25
|
</CanvasItem>
|
|
26
26
|
</Canvas>
|
|
@@ -35,7 +35,7 @@ Pan or zoom: the book should move with the board. Tab to its button and activate
|
|
|
35
35
|
## Avoid
|
|
36
36
|
|
|
37
37
|
- Don't add the camera offset to `x` or `y`; the canvas applies it when it positions the item.
|
|
38
|
-
- Don't put a fixed control inside a `CanvasItem`. Items move and scale with the board.
|
|
38
|
+
- Don't put a fixed control inside a `CanvasItem`. Items move and scale with the board. Pass a `CanvasItem` ID when a board `Region` must recognize the item; the click callback does not need a registry ID.
|
|
39
39
|
|
|
40
40
|
## When it goes off the usual path
|
|
41
41
|
|
|
@@ -45,4 +45,4 @@ Pan or zoom: the book should move with the board. Tab to its button and activate
|
|
|
45
45
|
|
|
46
46
|
- [Add contextual board tools](../cratis-components-compose-toolbar/SKILL.md)
|
|
47
47
|
|
|
48
|
-
`initialPan` and `initialZoom` are starting values.
|
|
48
|
+
`initialPan` and `initialZoom` are starting values. Capture the handle with `onHandleReady` for later navigation in world coordinates. Observe camera transforms separately from edits to items: panning must not dirty a diagram. Include the Pixi peer even when the item content is DOM.
|
|
@@ -12,4 +12,4 @@ import { Canvas } from '@cratis/components/Canvas';
|
|
|
12
12
|
onItemPointerDown={book => openBook(book.id)} />
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Pixi markers are not keyboard-focusable. Keep a keyboard-operable DOM action for anything a marker opens. Verify in a
|
|
15
|
+
Pixi markers are not keyboard-focusable. Keep a keyboard-operable DOM action for anything a marker opens. Verify in a browser: pan, zoom, click a marker at its new screen position and confirm the handler receives its stable ID.
|
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-components-choose-control
|
|
3
|
-
description: Use when
|
|
3
|
+
description: Use when binding a standalone number, calendar date or searchable choice to React state. Not for command fields (use cratis-components-submit-form).
|
|
4
4
|
compatibility: Requires react and @cratis/components.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Bind book editor inputs by value type
|
|
8
8
|
|
|
9
|
-
1.
|
|
9
|
+
1. Import the controls from `@cratis/components/Common`. Mount the editor inside `CratisComponentsProvider` from `@cratis/components`.
|
|
10
10
|
2. Keep a `number | null` for a price, `Date | null` for a publication date, or `string | null` for an author's option key. Each control calls `onChange(null)` when cleared.
|
|
11
|
-
3. Bind `value` and `onChange` to the same state. Let `NumberInput` inherit the provider locale; it does not infer browser preferences on its own. When the app follows the browser, set `locale: navigator.language` in the mounted Components provider's `value` on the client, not on each field. Set `maximumFractionDigits` to suit the domain value.
|
|
11
|
+
3. Bind `value` and `onChange` to the same state. Let `NumberInput` inherit the provider locale; it does not infer browser preferences on its own. When the app follows the browser, set `locale: navigator.language` in the mounted Components provider's `value` on the client, not on each field. Set `maximumFractionDigits` to suit the domain value. Pass the available authors to the editor.
|
|
12
12
|
|
|
13
13
|
```tsx
|
|
14
14
|
import { useState } from 'react';
|
|
15
15
|
import { ComboBox, DatePickerInput, NumberInput } from '@cratis/components/Common';
|
|
16
16
|
|
|
17
17
|
type AuthorOption = { key: string; label: string };
|
|
18
|
-
export function BookFields({ authors
|
|
18
|
+
export function BookFields({ authors }: { authors: AuthorOption[] }) {
|
|
19
19
|
const [price, setPrice] = useState<number | null>(null);
|
|
20
20
|
const [published, setPublished] = useState<Date | null>(null);
|
|
21
21
|
const [authorId, setAuthorId] = useState<string | null>(null);
|
|
22
22
|
return <>
|
|
23
23
|
<NumberInput value={price} onChange={setPrice} maximumFractionDigits={2} aria-label="Price" />
|
|
24
24
|
<DatePickerInput value={published} onChange={setPublished} aria-label="Published" />
|
|
25
|
-
<ComboBox options={authors} value={authorId} onChange={setAuthorId} aria-label="Author"
|
|
26
|
-
loading={loading} failure={failure} />
|
|
25
|
+
<ComboBox options={authors} value={authorId} onChange={setAuthorId} aria-label="Author" />
|
|
27
26
|
</>;
|
|
28
27
|
}
|
|
29
28
|
```
|
|
30
29
|
|
|
31
30
|
Use `ComboBox` for choosing an existing author; store its unique key because two options may share a label. For a free-text name, use `<input aria-label="Author name" value={name} onChange={event => setName(event.target.value)} />` with string state. Read prices and dates from `onChange`, not formatted text.
|
|
32
31
|
|
|
33
|
-
Put the accessible name on the control itself, not its surrounding panel. For the segmented date picker, pass `aria-label` on `DatePickerInput` to name its focus group.
|
|
32
|
+
Put the accessible name on the control itself, not its surrounding panel. For the segmented date picker, pass `aria-label` on `DatePickerInput` to name its focus group. Find each control by its accessible name, set a value with the keyboard, then clear it. The host should receive the typed value followed by `null`.
|
|
34
33
|
|
|
35
34
|
## When it goes off the usual path
|
|
36
35
|
|
|
37
|
-
- **
|
|
36
|
+
- **Choose this when the first outside click must also activate the underlying control:** pass `isNonModal={true}` to `DatePickerInput`. Otherwise leave the default: the first click only dismisses the calendar.
|
|
38
37
|
|
|
39
38
|
## Related skills
|
|
40
39
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Choosing and removing collection items
|
|
2
2
|
|
|
3
|
-
Treat ComboBox selection and text as separate state: `value` is the selected key or `null`; `inputValue` is a search draft. For remote search
|
|
3
|
+
Treat ComboBox selection and text as separate state: `value` is the selected key or `null`; `inputValue` is a search draft. For remote search, bind `inputValue` and `onInputChange` to the draft, set `filter="none"`, and set `loading` or `failure` for the current request only. Drop stale responses. The footer receives the draft text; it does not select a newly created option automatically.
|
|
4
4
|
|
|
5
5
|
For a string list, `onChange` supplies the next array. Turning off `editable` hides the entry field but does not prohibit removal. Use `disabled` or a display-only surface when the user may not change the list. When equal labels can recur, remove the selected occurrence, not every matching string.
|
|
6
6
|
|
|
7
|
-
Use ToggleGroup for a value, Tabs for the ID of a real panel. Neither selection callback is a navigation event. Update the owner
|
|
7
|
+
Use ToggleGroup for a value, Tabs for the ID of a real panel. Neither selection callback is a navigation event. Update the owner's state explicitly.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# Breadcrumb navigation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Pass `items` to `Breadcrumbs` from `@cratis/components/Common` in navigation order. The last crumb represents the current page, not a link: the component suppresses navigation there. For a router adapter configure `value.router` on the provider rather than passing a top-level `router` prop. Check an intermediate crumb with both keyboard and pointer and check that the current page cannot navigate to itself.
|
|
@@ -1,43 +1,38 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-components-compose-toolbar
|
|
3
|
-
description: Use when
|
|
3
|
+
description: Use when grouping screen actions in a keyboard-navigable toolbar or changing the available tools by mode. Not for row actions on a list (use cratis-components-display-list).
|
|
4
4
|
compatibility: Requires react and @cratis/components.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Compose a toolbar for screen actions
|
|
8
8
|
|
|
9
|
-
Use
|
|
10
|
-
|
|
11
|
-
1. In `Features/Board/DrawingTools.tsx`, accept the shelf board's current mode, the operation to draw a shelf and the operation to add a review note. Use the application's `CratisComponentsProvider` from `@cratis/components`.
|
|
12
|
-
2. Give each button visible `text` and a `title` for its accessible name and tooltip, and `onClick` for the action.
|
|
13
|
-
3. Set `focusMode` to `SingleTabStop` to enter the toolbar once with Tab and move between its tools with arrow keys. Omit `focusMode` to keep each tool a Tab stop with arrow navigation.
|
|
9
|
+
Use a stable group of `ToolbarButton`s inside `Toolbar` from `@cratis/components/Toolbar`. Render it inside the app's `CratisComponentsProvider`. Supply a `title` for each button's accessible name and tooltip, `text` when it needs a visible label, and `onClick` for the action.
|
|
14
10
|
|
|
15
11
|
```tsx
|
|
16
|
-
import { Toolbar, ToolbarButton
|
|
17
|
-
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<ToolbarContext name="draw"><ToolbarButton text="Shelf" title="Draw shelf" onClick={draw} /></ToolbarContext>
|
|
24
|
-
<ToolbarContext name="review"><ToolbarButton text="Note" title="Add note" onClick={annotate} /></ToolbarContext>
|
|
25
|
-
</ToolbarSection>
|
|
26
|
-
</Toolbar>;
|
|
27
|
-
}
|
|
12
|
+
import { Toolbar, ToolbarButton } from '@cratis/components/Toolbar';
|
|
13
|
+
|
|
14
|
+
export const ShelfTools = ({ draw }: { draw: () => void }) => (
|
|
15
|
+
<Toolbar aria-label="Shelf tools">
|
|
16
|
+
<ToolbarButton text="Shelf" title="Draw shelf" onClick={draw} />
|
|
17
|
+
</Toolbar>
|
|
18
|
+
);
|
|
28
19
|
```
|
|
29
20
|
|
|
30
|
-
|
|
21
|
+
Tab to the tool and activate it; the host should draw one shelf. With several tools, verify that each is a Tab stop and arrow keys move along the toolbar. Choose this when the toolbar's built-in tools should share one Tab stop: set `focusMode={ToolbarFocusMode.SingleTabStop}`; import the enum from the same entry point. Keep `active` for toggles, not momentary actions. If the host must handle arrow keys itself, use the `cratis-components-accessibility` skill (installed with `cratis/components`), then read its focus and announcements reference.
|
|
31
22
|
|
|
32
|
-
##
|
|
23
|
+
## Choose this when changing modes changes the available tools
|
|
33
24
|
|
|
34
|
-
|
|
35
|
-
- **A draft should reset on mode switch:** call the host's `setDraft('')` as part of changing modes. An inactive context stays mounted, hidden and inert.
|
|
25
|
+
Import `ToolbarSection` and `ToolbarContext` from the same entry point. Put mode-specific tools in a section, leaving shared tools outside it:
|
|
36
26
|
|
|
37
|
-
|
|
27
|
+
```tsx
|
|
28
|
+
<ToolbarSection activeContext={mode}>
|
|
29
|
+
<ToolbarContext name="draw"><ToolbarButton text="Shelf" title="Draw shelf" onClick={draw} /></ToolbarContext>
|
|
30
|
+
<ToolbarContext name="review"><ToolbarButton text="Note" title="Add note" onClick={annotate} /></ToolbarContext>
|
|
31
|
+
</ToolbarSection>
|
|
32
|
+
```
|
|
38
33
|
|
|
39
|
-
|
|
34
|
+
Switch between `draw` and `review`; only the active tools should be reachable. If no tools appear, check that `activeContext` matches a context name. An inactive context stays mounted, hidden and inert. Reset drafts from the host if needed, and if a change hides the focused tool, move focus to a visible control such as the mode switcher.
|
|
40
35
|
|
|
41
|
-
For tools contributed
|
|
36
|
+
For tools contributed from another subtree or selected from a catalog, read [Contributed and catalog tools](references/contributed-tools.md).
|
|
42
37
|
|
|
43
|
-
For
|
|
38
|
+
For actions on a query-backed list or its selection, use [the DataPage menu](../cratis-components-display-list/SKILL.md).
|
package/package/corpus/skills/cratis-components-compose-toolbar/references/contributed-tools.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Contributed and catalog tools
|
|
2
|
+
|
|
3
|
+
Choose contribution when a feature outside the toolbar subtree owns the tool. Put contributor and consumer under the same `ToolbarSlotProvider` and publish a named `ToolbarSlot` using `slotName`. Consume it through `ToolbarContext.slotName`, `ToolbarLayout name={slotName}` (contributions replace fallback children), or `useToolbarSlot(slotName)`. Set `order` only when ordering matters. Mount and unmount the contributor and verify that the tool appears and disappears.
|
|
4
|
+
|
|
5
|
+
Choose `ToolbarFolder` with `presentation="drawer"` and `items` for an insertable catalog. `onActivate(item)` tells the host which item to insert; it does not insert the item itself. Set `closeOnInsert` only when activating a tile or completing a drop should dismiss the drawer; it does not wait for the host to persist the insert. Canceled drags should neither insert nor close it. Give a `ToolbarFolder` a `title` and a `ToolbarFanOutItem` a `tooltip`.
|
|
@@ -1,32 +1,28 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-components-coordinate-feedback
|
|
3
|
-
description: Use when
|
|
3
|
+
description: Use when confirming an action before executing it or showing a shared busy dialog while it runs. Not for forms that collect command fields (use cratis-components-submit-form).
|
|
4
4
|
compatibility: Requires react, @cratis/arc.react and @cratis/components.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Confirm before removing an author
|
|
8
8
|
|
|
9
|
-
1.
|
|
9
|
+
1. Under the app's `Arc` and `CratisComponentsProvider`, register `ConfirmationDialog` once and mount the feature below that registration. Use the shared dialog for ordinary confirmation, such as removing an author from a list that can be restored.
|
|
10
10
|
|
|
11
11
|
```tsx
|
|
12
12
|
import { DialogComponents } from '@cratis/arc.react/dialogs';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<>
|
|
22
|
-
<Authors onOpen={open} />
|
|
23
|
-
{openedId !== undefined && <section aria-label="Author details">Author {String(openedId)}</section>}
|
|
24
|
-
</>
|
|
25
|
-
</DialogComponents>;
|
|
26
|
-
}
|
|
13
|
+
import { ConfirmationDialog } from '@cratis/components/Dialogs';
|
|
14
|
+
import { RemoveAuthorButton } from './RemoveAuthorButton';
|
|
15
|
+
|
|
16
|
+
export const AuthorActions = ({ name, remove }: { name: string; remove: () => Promise<void> }) => (
|
|
17
|
+
<DialogComponents confirmation={ConfirmationDialog}>
|
|
18
|
+
<RemoveAuthorButton name={name} remove={remove} />
|
|
19
|
+
</DialogComponents>
|
|
20
|
+
);
|
|
27
21
|
```
|
|
28
22
|
|
|
29
|
-
|
|
23
|
+
Put that registration at the app boundary when sharing it across features. If already registered, render just the button in the feature.
|
|
24
|
+
|
|
25
|
+
2. Open the confirmation on click and run the operation only on `DialogResult.Yes`. `remove` resolves only on success and rejects on failure. If it wraps an Arc command, check `isSuccess`; a returned result can still report refusal.
|
|
30
26
|
|
|
31
27
|
```tsx
|
|
32
28
|
import { useRef, useState } from 'react';
|
|
@@ -56,21 +52,19 @@ export function RemoveAuthorButton({ name, remove }: { name: string; remove: ()
|
|
|
56
52
|
}
|
|
57
53
|
```
|
|
58
54
|
|
|
59
|
-
##
|
|
55
|
+
## Show progress for the operation
|
|
60
56
|
|
|
61
57
|
Default to local pending feedback for a short row action. Keep the re-entry guard separate from visible progress: confirmation is a choice, not a request in flight. For a one-click row action without confirmation, use the same ref guard: set it before the first await and release it in `finally` on success or failure. Disabling the button on the next render is too late to guard a second invocation.
|
|
62
58
|
|
|
63
|
-
Choose
|
|
59
|
+
Choose this when the user must wait before continuing: add `busyIndicator={BusyIndicatorDialog}` to the registration and import `BusyIndicatorDialog` from `@cratis/components/Dialogs`. Import `{ useBusyIndicator }` from `@cratis/arc.react/dialogs` and add `const [showBusy, closeBusy] = useBusyIndicator('Removing author…');` in `RemoveAuthorButton`. After Yes, wrap `await remove()` with `void showBusy(); try { await remove(); } finally { closeBusy(); }`. Do not await `showBusy()`; it resolves when the dialog closes.
|
|
64
60
|
|
|
65
|
-
##
|
|
61
|
+
## Verify the outcome
|
|
66
62
|
|
|
67
63
|
- **No or dismissal:** do not call the removal operation.
|
|
68
64
|
- **Failure after Yes:** show the removal failure and allow retry. Confirmation is not evidence that removal succeeded.
|
|
69
65
|
|
|
70
|
-
##
|
|
71
|
-
|
|
72
|
-
- For a one-off check, dismiss the confirmation in the existing story and confirm the author remains. Use [the UI observation skill](../cratis-specifications-observe-ui/SKILL.md) to exercise the interaction.
|
|
66
|
+
## Choose this when confirmation is irreversible
|
|
73
67
|
|
|
74
|
-
-
|
|
68
|
+
The shared `ConfirmationDialog` uses the regular confirm-focus default. Use a custom `Dialog` opened with `useDialog`, or register a custom confirmation component that reads the request with `useDialogContext`, so you can set `initialFocus={DialogInitialFocus.Cancel}`. See `cratis-components-accessibility` for the focus check. Use [a command dialog](../cratis-components-submit-form/SKILL.md) if the confirmation also collects command fields.
|
|
75
69
|
|
|
76
|
-
|
|
70
|
+
For nonblocking notifications, mount one `Toaster` from `@cratis/components/Notifications`. Use `toast.info({ title: message })` for informational feedback. Treat `toastCommandResult` as common result presentation, not permission to retry or a policy for every refusal. Keep exception stacks out of user copy.
|