stylegallery 0.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/AGENTS.md +156 -0
- package/CATALOG.md +69 -0
- package/DOMAINS.md +65 -0
- package/GOVERNANCE.md +222 -0
- package/GUIDE.md +59 -0
- package/README.md +313 -0
- package/consumer-reference/adapters/style-dictionary.config.mjs +36 -0
- package/consumer-reference/agent-native/README.md +157 -0
- package/consumer-reference/agent-native/registry.json +640 -0
- package/consumer-reference/agent-native/schema/agent-native.schema.json +848 -0
- package/consumer-reference/agent-native/schema/epistemic.schema.json +14 -0
- package/consumer-reference/agent-native/schema/execution.schema.json +12 -0
- package/consumer-reference/agent-native/schema/identity.schema.json +10 -0
- package/consumer-reference/agent-native/schema/learning.schema.json +12 -0
- package/consumer-reference/agent-native/schema/manifest.schema.json +6 -0
- package/consumer-reference/agent-native/schema/operation.schema.json +12 -0
- package/consumer-reference/agent-native/schema/protocol-binding.schema.json +9 -0
- package/consumer-reference/agent-native/schema/retrieval.schema.json +10 -0
- package/consumer-reference/baselines/calibration.json +260 -0
- package/consumer-reference/baselines/manifest.json +21 -0
- package/consumer-reference/contract.md +83 -0
- package/consumer-reference/fixtures/consumer-conformance/e2e-fixture.mjs +282 -0
- package/consumer-reference/fixtures/consumer-conformance/manifest.json +102 -0
- package/consumer-reference/fixtures/consumer-conformance/runtime-proof.mjs +32 -0
- package/consumer-reference/fixtures/consumer-conformance/valid-migration-result.json +18 -0
- package/consumer-reference/fixtures/consumer-conformance/valid-migration.json +142 -0
- package/consumer-reference/fixtures/invalid-stable-ended-support.json +19 -0
- package/consumer-reference/fixtures/promotion/invalid-blocking-evidence.json +26 -0
- package/consumer-reference/fixtures/promotion/invalid-count-only.json +29 -0
- package/consumer-reference/fixtures/promotion/invalid-missing-owner-migration.json +25 -0
- package/consumer-reference/fixtures/promotion/invalid-normative-bypass-no-regression.json +25 -0
- package/consumer-reference/fixtures/promotion/invalid-related-counted-independent.json +45 -0
- package/consumer-reference/fixtures/promotion/invalid-stable-ended-support.json +26 -0
- package/consumer-reference/fixtures/promotion/manifest.json +15 -0
- package/consumer-reference/fixtures/promotion/valid-deferred-example.json +67 -0
- package/consumer-reference/fixtures/promotion/valid-normative-bypass.json +67 -0
- package/consumer-reference/fixtures/token-portability/invalid-cycle.json +7 -0
- package/consumer-reference/fixtures/token-portability/invalid-dangling-alias.json +6 -0
- package/consumer-reference/fixtures/token-portability/invalid-extends.json +4 -0
- package/consumer-reference/fixtures/token-portability/invalid-json-pointer.json +7 -0
- package/consumer-reference/fixtures/token-portability/invalid-resolver.json +9 -0
- package/consumer-reference/fixtures/token-portability/invalid-type-mismatch.json +10 -0
- package/consumer-reference/fixtures/token-portability/invalid-unknown-reserved.json +6 -0
- package/consumer-reference/fixtures/token-portability/invalid-untested-type.json +6 -0
- package/consumer-reference/fixtures/token-portability/valid-border.json +14 -0
- package/consumer-reference/fixtures/token-portability/valid-reference.json +32 -0
- package/consumer-reference/fixtures/token-portability/valid-whole-alias.json +7 -0
- package/consumer-reference/fixtures/valid-deprecated.json +21 -0
- package/consumer-reference/fixtures/valid-experimental.json +19 -0
- package/consumer-reference/generated/manifest.json +40 -0
- package/consumer-reference/generated/tokens.css +12 -0
- package/consumer-reference/index.md +32 -0
- package/consumer-reference/policies/shared-experimental.json +37 -0
- package/consumer-reference/schema/ax-evidence.schema.json +30 -0
- package/consumer-reference/schema/baseline-manifest.schema.json +55 -0
- package/consumer-reference/schema/calibration-record.schema.json +190 -0
- package/consumer-reference/schema/capture-session.schema.json +161 -0
- package/consumer-reference/schema/component-state.schema.json +150 -0
- package/consumer-reference/schema/consumer-conformance-record.schema.json +365 -0
- package/consumer-reference/schema/dom-evidence.schema.json +38 -0
- package/consumer-reference/schema/evidence-record.schema.json +81 -0
- package/consumer-reference/schema/fixture-manifest.schema.json +32 -0
- package/consumer-reference/schema/item.schema.json +188 -0
- package/consumer-reference/schema/page-evidence-manifest.schema.json +216 -0
- package/consumer-reference/schema/page-evidence-session.schema.json +119 -0
- package/consumer-reference/schema/portable-tokens.schema.json +104 -0
- package/consumer-reference/schema/promotion-rfc.schema.json +219 -0
- package/consumer-reference/schema/runtime-evidence-manifest.schema.json +33 -0
- package/consumer-reference/schema/visual-evidence.schema.json +31 -0
- package/design-engineering/consumer-migration-readiness.md +124 -0
- package/design-engineering/index.md +28 -0
- package/design-engineering/interface-craft.md +107 -0
- package/design-engineering/reference-profiles/external-adaptation/index.md +12 -0
- package/design-engineering/reference-profiles/governed-local/editorial/components/button.component.json +125 -0
- package/design-engineering/reference-profiles/governed-local/editorial/evidence/button.evidence.json +3504 -0
- package/design-engineering/reference-profiles/governed-local/editorial/fixtures/button.fixture.json +65 -0
- package/design-engineering/reference-profiles/governed-local/editorial/generated/evidence-coverage.md +23 -0
- package/design-engineering/reference-profiles/governed-local/editorial/generated/keyboard-matrix.md +19 -0
- package/design-engineering/reference-profiles/governed-local/editorial/generated/state-matrix.md +21 -0
- package/design-engineering/reference-profiles/governed-local/editorial/local-foundations.json +12 -0
- package/design-engineering/reference-profiles/governed-local/editorial/profile.json +43 -0
- package/design-engineering/reference-profiles/governed-local/editorial/states/button.states.json +195 -0
- package/design-engineering/reference-profiles/governed-local/editorial/tokens.dtcg.json +17 -0
- package/design-engineering/reference-profiles/governed-local/index.md +26 -0
- package/design-engineering/reference-profiles/governed-local/terminal/components/button.component.json +125 -0
- package/design-engineering/reference-profiles/governed-local/terminal/evidence/button.evidence.json +3504 -0
- package/design-engineering/reference-profiles/governed-local/terminal/fixtures/button.fixture.json +65 -0
- package/design-engineering/reference-profiles/governed-local/terminal/generated/evidence-coverage.md +23 -0
- package/design-engineering/reference-profiles/governed-local/terminal/generated/keyboard-matrix.md +19 -0
- package/design-engineering/reference-profiles/governed-local/terminal/generated/state-matrix.md +21 -0
- package/design-engineering/reference-profiles/governed-local/terminal/local-foundations.json +12 -0
- package/design-engineering/reference-profiles/governed-local/terminal/profile.json +43 -0
- package/design-engineering/reference-profiles/governed-local/terminal/states/button.states.json +195 -0
- package/design-engineering/reference-profiles/governed-local/terminal/tokens.dtcg.json +17 -0
- package/design-engineering/reference-profiles/index.md +19 -0
- package/game-ui/classification.md +82 -0
- package/game-ui/index.md +35 -0
- package/game-ui/reference-record.md +62 -0
- package/game-ui/screen-hierarchy.md +107 -0
- package/game-ui/unity/architecture.md +166 -0
- package/game-ui/unity/cli-loop.md +84 -0
- package/game-ui/unity/data/unity-technologies-public-repositories.json +26654 -0
- package/game-ui/unity/org-wiki.md +146 -0
- package/game-ui/unity/repository-map.md +102 -0
- package/game-ui/unity/ui-systems.md +85 -0
- package/guides/decision-tree.md +149 -0
- package/guides/documentation-mode-taxonomy.md +157 -0
- package/guides/layout-brief.md +220 -0
- package/guides/vocabulary.md +148 -0
- package/guides/webpage-generation-workflow.md +185 -0
- package/index.md +36 -0
- package/layout/index.md +26 -0
- package/motion/index.md +24 -0
- package/motion/practice-reference.md +145 -0
- package/motion/review-workflow.md +86 -0
- package/motion/vocabulary.md +82 -0
- package/package.json +78 -0
- package/patterns/centering/center.md +87 -0
- package/patterns/centering/index.md +6 -0
- package/patterns/centering/super-center.md +89 -0
- package/patterns/containment/box.md +87 -0
- package/patterns/containment/clamped-card.md +86 -0
- package/patterns/containment/content-limiter.md +87 -0
- package/patterns/containment/fluid-styles.md +86 -0
- package/patterns/containment/index.md +8 -0
- package/patterns/grid-repetition/card-grid.md +88 -0
- package/patterns/grid-repetition/columns.md +87 -0
- package/patterns/grid-repetition/dense-grid.md +88 -0
- package/patterns/grid-repetition/grid-wrapper.md +89 -0
- package/patterns/grid-repetition/index.md +12 -0
- package/patterns/grid-repetition/masonry-approx.md +87 -0
- package/patterns/grid-repetition/page-grid.md +90 -0
- package/patterns/grid-repetition/ram-grid.md +88 -0
- package/patterns/grid-repetition/twelve-span-grid.md +92 -0
- package/patterns/in-line-grouping/badge-list.md +94 -0
- package/patterns/in-line-grouping/breadcrumb.md +89 -0
- package/patterns/in-line-grouping/cluster.md +89 -0
- package/patterns/in-line-grouping/deconstructed-pancake.md +92 -0
- package/patterns/in-line-grouping/index.md +13 -0
- package/patterns/in-line-grouping/pagination.md +89 -0
- package/patterns/in-line-grouping/reel.md +90 -0
- package/patterns/in-line-grouping/split-nav.md +97 -0
- package/patterns/in-line-grouping/tab-strip.md +88 -0
- package/patterns/in-line-grouping/wrap-row.md +89 -0
- package/patterns/index.md +13 -0
- package/patterns/media-fit/frame.md +95 -0
- package/patterns/media-fit/icon-frame.md +87 -0
- package/patterns/media-fit/index.md +6 -0
- package/patterns/overlay-exception/imposter.md +95 -0
- package/patterns/overlay-exception/index.md +6 -0
- package/patterns/overlay-exception/overlay-stack.md +89 -0
- package/patterns/split-sidebar/index.md +12 -0
- package/patterns/split-sidebar/list-detail.md +95 -0
- package/patterns/split-sidebar/main-with-rail.md +95 -0
- package/patterns/split-sidebar/media-object.md +102 -0
- package/patterns/split-sidebar/sidebar.md +101 -0
- package/patterns/split-sidebar/split-screen.md +92 -0
- package/patterns/split-sidebar/sticky-aside.md +97 -0
- package/patterns/split-sidebar/supporting-pane.md +95 -0
- package/patterns/split-sidebar/switcher.md +93 -0
- package/patterns/stacking/feed.md +88 -0
- package/patterns/stacking/index.md +8 -0
- package/patterns/stacking/line-up.md +95 -0
- package/patterns/stacking/stack.md +87 -0
- package/patterns/stacking/step-nav.md +88 -0
- package/patterns/viewport-shell/cover.md +90 -0
- package/patterns/viewport-shell/fixed-sidenav-shell.md +97 -0
- package/patterns/viewport-shell/holy-grail.md +112 -0
- package/patterns/viewport-shell/index.md +11 -0
- package/patterns/viewport-shell/panel-layout.md +95 -0
- package/patterns/viewport-shell/scroll-body-shell.md +93 -0
- package/patterns/viewport-shell/sticky-footer.md +92 -0
- package/patterns/viewport-shell/sticky-header.md +86 -0
- package/platform-guides/apple-interaction.md +89 -0
- package/platform-guides/index.md +26 -0
- package/quality/claim-records/index.md +3 -0
- package/quality/claim-records/samples.md +92 -0
- package/quality/claim-records/stylegallery-multidomain-scope.md +42 -0
- package/quality/claims.md +77 -0
- package/quality/evidence/accessibility.md +58 -0
- package/quality/evidence/consumer-migration.md +42 -0
- package/quality/evidence/design-rationale.md +34 -0
- package/quality/evidence/executable-evidence.md +79 -0
- package/quality/evidence/families.md +56 -0
- package/quality/evidence/hci-evaluation.md +36 -0
- package/quality/evidence/index.md +16 -0
- package/quality/evidence/pattern-contract-audit.md +96 -0
- package/quality/evidence/search-metadata-polyhierarchy.md +86 -0
- package/quality/evidence/sources.md +43 -0
- package/quality/evidence/tokens.md +33 -0
- package/quality/evidence/visual-qa.md +41 -0
- package/quality/gates/accessibility-evidence.md +60 -0
- package/quality/gates/consumer-migration-evidence.md +53 -0
- package/quality/gates/design-claim.md +56 -0
- package/quality/gates/harmony-evaluation.md +78 -0
- package/quality/gates/index.md +13 -0
- package/quality/gates/layout.md +52 -0
- package/quality/gates/rationale.md +53 -0
- package/quality/gates/visual-evidence.md +47 -0
- package/quality/index.md +55 -0
- package/quality/principles.md +58 -0
- package/recipes/article-page.md +52 -0
- package/recipes/command-surface.md +55 -0
- package/recipes/dashboard.md +56 -0
- package/recipes/form-flow.md +55 -0
- package/recipes/homepage.md +89 -0
- package/recipes/index.md +13 -0
- package/recipes/list-detail.md +55 -0
- package/recipes/primitive-to-recipe-matrix.md +83 -0
- package/recipes/saas-settings.md +52 -0
- package/scripts/agent-native/a2a-projection.mjs +248 -0
- package/scripts/agent-native/agui-projection.mjs +178 -0
- package/scripts/agent-native/canonical-json.mjs +109 -0
- package/scripts/agent-native/cli-adapter.mjs +68 -0
- package/scripts/agent-native/events.mjs +113 -0
- package/scripts/agent-native/execution.mjs +227 -0
- package/scripts/agent-native/fixture.mjs +159 -0
- package/scripts/agent-native/identity.mjs +184 -0
- package/scripts/agent-native/immutable-store.mjs +102 -0
- package/scripts/agent-native/knowledge.mjs +168 -0
- package/scripts/agent-native/learning-records.mjs +244 -0
- package/scripts/agent-native/learning.mjs +247 -0
- package/scripts/agent-native/mcp-adapter.mjs +173 -0
- package/scripts/agent-native/queries.mjs +173 -0
- package/scripts/agent-native/registry.mjs +154 -0
- package/scripts/agent-native/retrieval.mjs +171 -0
- package/scripts/agent-native/self-description.mjs +160 -0
- package/scripts/artifact-metadata.mjs +20 -0
- package/scripts/audit-evidence-freshness.mjs +308 -0
- package/scripts/baseline-contract.mjs +189 -0
- package/scripts/baseline-schema-parity.mjs +40 -0
- package/scripts/build-reference-artifacts.mjs +127 -0
- package/scripts/calibration-raw-contract.mjs +172 -0
- package/scripts/capture-session-contract.mjs +187 -0
- package/scripts/component-state-artifact-fixture.mjs +44 -0
- package/scripts/component-state-contract.mjs +99 -0
- package/scripts/component-state-semantics.mjs +128 -0
- package/scripts/component-state-workflow-contract.mjs +67 -0
- package/scripts/component-state-workflow-negative-cases.mjs +64 -0
- package/scripts/consumer-conformance-contract.mjs +198 -0
- package/scripts/consumer-evidence-governance-contract.mjs +210 -0
- package/scripts/consumer-reference-case-runner.mjs +93 -0
- package/scripts/consumer-reference-schema.mjs +155 -0
- package/scripts/create-component-state-session.mjs +100 -0
- package/scripts/create-page-evidence-session.mjs +139 -0
- package/scripts/domain-document-boundaries.mjs +40 -0
- package/scripts/domain-validation-checks.mjs +141 -0
- package/scripts/evidence-artifact-contract.mjs +191 -0
- package/scripts/finalize-component-state-evidence.mjs +165 -0
- package/scripts/finalize-page-evidence.mjs +197 -0
- package/scripts/generate-consumer-reference-evidence.mjs +154 -0
- package/scripts/generate-patterns.mjs +218 -0
- package/scripts/governance-matrix-contract.mjs +73 -0
- package/scripts/governance-matrix-negative-cases.mjs +114 -0
- package/scripts/governance-policy-contract.mjs +49 -0
- package/scripts/governance-test-fixture.mjs +321 -0
- package/scripts/governance-workflow-negative-cases.mjs +241 -0
- package/scripts/governed-profile-registry.mjs +125 -0
- package/scripts/json-schema-formats.mjs +31 -0
- package/scripts/markdown-structure.mjs +45 -0
- package/scripts/page-artifact-metadata.mjs +124 -0
- package/scripts/page-evidence-contract.mjs +297 -0
- package/scripts/page-evidence-fixture.mjs +271 -0
- package/scripts/pattern-data.mjs +325 -0
- package/scripts/profile-record-contract.mjs +140 -0
- package/scripts/promotion-attestation-contract.mjs +91 -0
- package/scripts/promotion-boundary-test-contract.mjs +92 -0
- package/scripts/promotion-fixture-inventory.mjs +109 -0
- package/scripts/promotion-governance-contract.mjs +28 -0
- package/scripts/reference-artifact-path-contract.mjs +28 -0
- package/scripts/reference-profile-contract.mjs +114 -0
- package/scripts/reference-token-contract.mjs +156 -0
- package/scripts/run-consumer-page-evidence-ci.mjs +170 -0
- package/scripts/sg-mcp.mjs +16 -0
- package/scripts/sg.mjs +27 -0
- package/scripts/strict-json.mjs +72 -0
- package/scripts/summarize-sentinel-calibration.mjs +98 -0
- package/scripts/test-agent-adapter-conformance.mjs +250 -0
- package/scripts/test-agent-conformance-receipt.mjs +106 -0
- package/scripts/test-agent-events.mjs +81 -0
- package/scripts/test-agent-execution-effects.mjs +114 -0
- package/scripts/test-agent-execution-fixtures.mjs +140 -0
- package/scripts/test-agent-execution-kernel.mjs +39 -0
- package/scripts/test-agent-execution-learning.mjs +130 -0
- package/scripts/test-agent-execution-lifecycle.mjs +143 -0
- package/scripts/test-agent-execution-safety.mjs +158 -0
- package/scripts/test-agent-execution-views.mjs +117 -0
- package/scripts/test-agent-identity-integrity-cases.mjs +160 -0
- package/scripts/test-agent-knowledge-kernel.mjs +183 -0
- package/scripts/test-agent-learning.mjs +246 -0
- package/scripts/test-agent-mcp.mjs +246 -0
- package/scripts/test-agent-native-schemas.mjs +215 -0
- package/scripts/test-agent-projections.mjs +249 -0
- package/scripts/test-agent-registry-mcp-integrity.mjs +215 -0
- package/scripts/test-agent-registry-mutations.mjs +110 -0
- package/scripts/test-audit-evidence-freshness.mjs +177 -0
- package/scripts/test-component-state-sentinel.mjs +35 -0
- package/scripts/test-component-state-source-contract.mjs +83 -0
- package/scripts/test-consumer-conformance-sentinel.mjs +165 -0
- package/scripts/test-consumer-reference-sentinel.mjs +31 -0
- package/scripts/test-generate-consumer-reference-evidence.mjs +124 -0
- package/scripts/test-json-cli-output.mjs +151 -0
- package/scripts/test-json-schema-formats.mjs +40 -0
- package/scripts/test-reference-adapters.mjs +199 -0
- package/scripts/test-renderer-purity.mjs +34 -0
- package/scripts/test-sg-cli.mjs +129 -0
- package/scripts/test-summarize-sentinel-calibration.mjs +226 -0
- package/scripts/test-validate-baseline-manifest.mjs +234 -0
- package/scripts/test-validate-component-state-artifacts.mjs +243 -0
- package/scripts/test-validate-component-state.mjs +106 -0
- package/scripts/test-validate-consumer-conformance.mjs +427 -0
- package/scripts/test-validate-consumer-reference-cli.mjs +69 -0
- package/scripts/test-validate-consumer-reference.mjs +263 -0
- package/scripts/test-validate-domains.mjs +357 -0
- package/scripts/test-validate-governance.mjs +292 -0
- package/scripts/test-validate-ia.mjs +262 -0
- package/scripts/test-validate-okf.mjs +73 -0
- package/scripts/test-validate-page-evidence.mjs +302 -0
- package/scripts/test-validate-patterns.mjs +157 -0
- package/scripts/test-validate-promotion-rfc.mjs +250 -0
- package/scripts/test-validate-reference-profiles.mjs +170 -0
- package/scripts/test-validate-unity-org-wiki.mjs +57 -0
- package/scripts/test-validate-unity-source-contracts.mjs +67 -0
- package/scripts/test-validate-vocabulary.mjs +174 -0
- package/scripts/test-validate-webpage-workflow.mjs +293 -0
- package/scripts/validate-baseline-manifest.mjs +44 -0
- package/scripts/validate-catalog.mjs +65 -0
- package/scripts/validate-component-state.mjs +141 -0
- package/scripts/validate-consumer-conformance.mjs +477 -0
- package/scripts/validate-consumer-reference.mjs +288 -0
- package/scripts/validate-domains.mjs +237 -0
- package/scripts/validate-governance.mjs +248 -0
- package/scripts/validate-ia.mjs +136 -0
- package/scripts/validate-links.mjs +66 -0
- package/scripts/validate-okf.mjs +104 -0
- package/scripts/validate-page-evidence.mjs +191 -0
- package/scripts/validate-patterns.mjs +246 -0
- package/scripts/validate-promotion-rfc.mjs +224 -0
- package/scripts/validate-reference-artifacts.mjs +125 -0
- package/scripts/validate-renderer-purity.mjs +56 -0
- package/scripts/validate-unity-org-wiki.mjs +146 -0
- package/scripts/validate-unity-source-contracts.mjs +107 -0
- package/scripts/validate-vocabulary.mjs +115 -0
- package/scripts/validate-webpage-workflow.mjs +254 -0
- package/scripts/visual-expectation-contract.mjs +20 -0
- package/scripts/workflow-action-contract.mjs +163 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://stylegallery.local/consumer-reference/schema/baseline-manifest.schema.json",
|
|
4
|
+
"title": "Proposed Chromium baseline manifest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema_version", "status", "baseline_owner_approval", "platform", "architecture", "container_image", "node", "os", "playwright", "browser_revision", "browser_version", "viewport", "source", "baseline", "calibration"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_version": { "const": "1.0" },
|
|
10
|
+
"status": { "const": "proposed" },
|
|
11
|
+
"baseline_owner_approval": { "const": "pending" },
|
|
12
|
+
"platform": { "const": "linux/amd64" },
|
|
13
|
+
"architecture": { "const": "amd64" },
|
|
14
|
+
"container_image": { "const": "mcr.microsoft.com/playwright:v1.61.0-noble@sha256:57b65fdc9ceabe0ef613124c7bbe2babcf9362c4d85e382fe3b03604e84b428a" },
|
|
15
|
+
"node": { "const": "22" },
|
|
16
|
+
"os": { "const": "Ubuntu 24.04" },
|
|
17
|
+
"playwright": { "const": "1.61.0" },
|
|
18
|
+
"browser_revision": { "const": "1228" },
|
|
19
|
+
"browser_version": { "const": "149.0.7827.55" },
|
|
20
|
+
"viewport": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["width", "height"],
|
|
24
|
+
"properties": { "width": { "const": 1024 }, "height": { "const": 768 } }
|
|
25
|
+
},
|
|
26
|
+
"source": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"required": ["path", "sha256"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"path": { "const": "tests/helpers/render-consumer-reference.mjs" },
|
|
32
|
+
"sha256": { "const": "88802a948909d5e40470be6b5481766ce2de498e59c053ac68af370b46e72ca9" }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"baseline": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"required": ["path", "sha256"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"path": { "const": "tests/snapshots/consumer-reference-card-grid.png" },
|
|
41
|
+
"sha256": { "const": "5528358e957a6115793155e501f62716f7db31dc1c86856d9e1234868d672837" }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"calibration": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": ["record", "required_runs", "workflow_artifact_name"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"record": { "const": "consumer-reference/baselines/calibration.json" },
|
|
50
|
+
"required_runs": { "const": 20 },
|
|
51
|
+
"workflow_artifact_name": { "const": "chromium-sentinel-calibration-${run_id}-${sha}" }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://stylegallery.local/consumer-reference/schema/calibration-record.schema.json",
|
|
4
|
+
"title": "Chromium sentinel calibration record",
|
|
5
|
+
"$comment": "This schema owns recursive shape and exact scalar identity. scripts/baseline-contract.mjs additionally enforces committed_ci tuple correlation and cross-run DOM/AX/hash equality.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schema_version", "status", "baseline_owner_approval", "required_runs", "committed_ci", "environment", "reference", "runs"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema_version": { "const": "1.0" },
|
|
11
|
+
"status": { "enum": ["awaiting_committed_ci", "awaiting_external_verification", "completed"] },
|
|
12
|
+
"baseline_owner_approval": { "const": "pending" },
|
|
13
|
+
"required_runs": { "const": 20 },
|
|
14
|
+
"committed_ci": {
|
|
15
|
+
"oneOf": [
|
|
16
|
+
{ "type": "null" },
|
|
17
|
+
{
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["artifact_name", "checkout_sha", "execution_repository", "external_verification", "head_sha", "raw_evidence_sha256", "repository", "run_attempt", "run_id", "sha", "workflow"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"run_id": { "type": "string", "pattern": "^[0-9]+$" },
|
|
23
|
+
"run_attempt": { "type": "string", "pattern": "^[0-9]+$" },
|
|
24
|
+
"sha": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
|
25
|
+
"checkout_sha": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
|
26
|
+
"execution_repository": {
|
|
27
|
+
"description": "Actual GitHub Actions repository, limited to the canonical upstream or the explicit calibration fork.",
|
|
28
|
+
"enum": ["ark-jo/StyleGallery", "changeroa/StyleGallery"]
|
|
29
|
+
},
|
|
30
|
+
"external_verification": {
|
|
31
|
+
"oneOf": [
|
|
32
|
+
{ "type": "null" },
|
|
33
|
+
{
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"required": ["artifact", "repository_relationship", "source", "verified_at"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"artifact": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["api_digest", "expires_at", "id", "name", "size_in_bytes"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"api_digest": { "const": "sha256:3f11a517b447e1b5a1da17d9ee66ba2dd947fc8a0a482c447556ef00652e6074" },
|
|
44
|
+
"expires_at": { "const": "2026-07-27T15:01:36Z" },
|
|
45
|
+
"id": { "const": "8283099324" },
|
|
46
|
+
"name": { "const": "chromium-sentinel-calibration-29260372260-18229be570766d3b42f5600955120bfcba690b76" },
|
|
47
|
+
"size_in_bytes": { "const": 70310 }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"repository_relationship": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": ["execution_is_fork", "parent", "source"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"execution_is_fork": { "const": true },
|
|
56
|
+
"parent": { "const": "changeroa/StyleGallery" },
|
|
57
|
+
"source": { "const": "changeroa/StyleGallery" }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"source": { "const": "https://github.com/ark-jo/StyleGallery/actions/runs/29260372260" },
|
|
61
|
+
"verified_at": { "const": "2026-07-13T15:04:41Z" }
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"head_sha": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
|
67
|
+
"raw_evidence_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
68
|
+
"repository": {
|
|
69
|
+
"description": "Canonical upstream repository, independent of the GitHub Actions execution repository.",
|
|
70
|
+
"const": "changeroa/StyleGallery"
|
|
71
|
+
},
|
|
72
|
+
"workflow": { "const": ".github/workflows/validate.yml" },
|
|
73
|
+
"artifact_name": { "type": "string", "pattern": "^chromium-sentinel-calibration-[0-9]+-[0-9a-f]{40}$" }
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"environment": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"additionalProperties": false,
|
|
81
|
+
"required": ["platform", "architecture", "container_image", "node", "os", "playwright", "browser_revision", "browser_version", "viewport"],
|
|
82
|
+
"properties": {
|
|
83
|
+
"platform": { "const": "linux/amd64" },
|
|
84
|
+
"architecture": { "const": "amd64" },
|
|
85
|
+
"container_image": { "const": "mcr.microsoft.com/playwright:v1.61.0-noble@sha256:57b65fdc9ceabe0ef613124c7bbe2babcf9362c4d85e382fe3b03604e84b428a" },
|
|
86
|
+
"node": { "const": "22" },
|
|
87
|
+
"os": { "const": "Ubuntu 24.04" },
|
|
88
|
+
"playwright": { "const": "1.61.0" },
|
|
89
|
+
"browser_revision": { "const": "1228" },
|
|
90
|
+
"browser_version": { "const": "149.0.7827.55" },
|
|
91
|
+
"viewport": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"required": ["width", "height"],
|
|
95
|
+
"properties": { "width": { "const": 1024 }, "height": { "const": 768 } }
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"reference": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"additionalProperties": false,
|
|
102
|
+
"required": ["source", "baseline"],
|
|
103
|
+
"properties": {
|
|
104
|
+
"source": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": ["path", "sha256"],
|
|
108
|
+
"properties": {
|
|
109
|
+
"path": { "const": "tests/helpers/render-consumer-reference.mjs" },
|
|
110
|
+
"sha256": { "const": "88802a948909d5e40470be6b5481766ce2de498e59c053ac68af370b46e72ca9" }
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"baseline": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"required": ["path", "sha256"],
|
|
117
|
+
"properties": {
|
|
118
|
+
"path": { "const": "tests/snapshots/consumer-reference-card-grid.png" },
|
|
119
|
+
"sha256": { "const": "5528358e957a6115793155e501f62716f7db31dc1c86856d9e1234868d672837" }
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"runs": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"maxItems": 20,
|
|
127
|
+
"uniqueItems": true,
|
|
128
|
+
"items": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"additionalProperties": false,
|
|
131
|
+
"required": ["run", "completed", "architecture", "png_sha256", "dom_sha256", "ax_sha256", "metadata_sha256", "screenshot_diff_pixels"],
|
|
132
|
+
"properties": {
|
|
133
|
+
"run": { "type": "integer", "minimum": 1, "maximum": 20 },
|
|
134
|
+
"completed": { "const": true },
|
|
135
|
+
"architecture": { "const": "amd64" },
|
|
136
|
+
"png_sha256": { "const": "5528358e957a6115793155e501f62716f7db31dc1c86856d9e1234868d672837" },
|
|
137
|
+
"dom_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
138
|
+
"ax_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
139
|
+
"metadata_sha256": { "const": "43a98d03b473e29c78ba2d359cf5f39346288d55564e5bfe65bc4a4fd78ebc2c" },
|
|
140
|
+
"screenshot_diff_pixels": { "const": 0 }
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"allOf": [
|
|
146
|
+
{
|
|
147
|
+
"if": { "properties": { "status": { "const": "awaiting_committed_ci" } } },
|
|
148
|
+
"then": { "properties": { "committed_ci": { "type": "null" }, "runs": { "maxItems": 0 } } },
|
|
149
|
+
"else": {
|
|
150
|
+
"properties": {
|
|
151
|
+
"committed_ci": { "type": "object" },
|
|
152
|
+
"runs": {
|
|
153
|
+
"minItems": 20,
|
|
154
|
+
"maxItems": 20,
|
|
155
|
+
"allOf": [
|
|
156
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 1 } } }, "minContains": 1, "maxContains": 1 },
|
|
157
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 2 } } }, "minContains": 1, "maxContains": 1 },
|
|
158
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 3 } } }, "minContains": 1, "maxContains": 1 },
|
|
159
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 4 } } }, "minContains": 1, "maxContains": 1 },
|
|
160
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 5 } } }, "minContains": 1, "maxContains": 1 },
|
|
161
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 6 } } }, "minContains": 1, "maxContains": 1 },
|
|
162
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 7 } } }, "minContains": 1, "maxContains": 1 },
|
|
163
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 8 } } }, "minContains": 1, "maxContains": 1 },
|
|
164
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 9 } } }, "minContains": 1, "maxContains": 1 },
|
|
165
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 10 } } }, "minContains": 1, "maxContains": 1 },
|
|
166
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 11 } } }, "minContains": 1, "maxContains": 1 },
|
|
167
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 12 } } }, "minContains": 1, "maxContains": 1 },
|
|
168
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 13 } } }, "minContains": 1, "maxContains": 1 },
|
|
169
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 14 } } }, "minContains": 1, "maxContains": 1 },
|
|
170
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 15 } } }, "minContains": 1, "maxContains": 1 },
|
|
171
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 16 } } }, "minContains": 1, "maxContains": 1 },
|
|
172
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 17 } } }, "minContains": 1, "maxContains": 1 },
|
|
173
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 18 } } }, "minContains": 1, "maxContains": 1 },
|
|
174
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 19 } } }, "minContains": 1, "maxContains": 1 },
|
|
175
|
+
{ "contains": { "required": ["run"], "properties": { "run": { "const": 20 } } }, "minContains": 1, "maxContains": 1 }
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"if": { "properties": { "status": { "const": "completed" } } },
|
|
183
|
+
"then": { "properties": { "committed_ci": { "properties": { "external_verification": { "type": "object" } } } } },
|
|
184
|
+
"else": {
|
|
185
|
+
"if": { "properties": { "status": { "const": "awaiting_external_verification" } } },
|
|
186
|
+
"then": { "properties": { "committed_ci": { "properties": { "external_verification": { "type": "null" } } } } }
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://stylegallery.local/consumer-reference/schema/capture-session.schema.json",
|
|
4
|
+
"title": "Component-state capture session",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema_version", "record_kind", "session_id", "nonce", "started_at", "repository", "revision", "branch", "attempt", "environment", "source", "intended"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_version": { "const": "1.0" },
|
|
10
|
+
"record_kind": { "const": "component_state_capture_session" },
|
|
11
|
+
"session_id": { "type": "string", "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$" },
|
|
12
|
+
"nonce": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
13
|
+
"started_at": { "type": "string", "format": "date-time" },
|
|
14
|
+
"repository": { "type": "string", "minLength": 1 },
|
|
15
|
+
"revision": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
|
|
16
|
+
"branch": { "type": "string", "minLength": 1 },
|
|
17
|
+
"attempt": { "type": "integer", "minimum": 1 },
|
|
18
|
+
"environment": { "$ref": "#/$defs/environment" },
|
|
19
|
+
"source": { "$ref": "#/$defs/source_manifest" },
|
|
20
|
+
"intended": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"minItems": 1,
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["profile_name", "profile_id", "scenarios"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"profile_name": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
29
|
+
"profile_id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
30
|
+
"scenarios": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"minItems": 1,
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"required": ["id", "channels"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
39
|
+
"channels": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["visual", "dom", "ax"] } }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"$defs": {
|
|
48
|
+
"environment": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"required": ["kind", "platform", "node", "browser", "browser_revision", "playwright", "lockfile_sha256", "container_image", "viewport"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"kind": { "const": "browser" },
|
|
54
|
+
"platform": { "type": "string", "minLength": 1 },
|
|
55
|
+
"node": { "type": "string", "pattern": "^v\\d+\\.\\d+\\.\\d+$" },
|
|
56
|
+
"browser": { "type": "string", "minLength": 1 },
|
|
57
|
+
"browser_revision": { "type": "string", "minLength": 1 },
|
|
58
|
+
"playwright": { "type": "string", "minLength": 1 },
|
|
59
|
+
"lockfile_sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
60
|
+
"container_image": { "type": "string", "minLength": 1 },
|
|
61
|
+
"viewport": { "type": "string", "pattern": "^\\d+x\\d+$" }
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"session_link": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"required": ["session_id", "nonce", "receipt_sha256", "started_at", "revision", "branch", "attempt", "environment", "source"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"session_id": { "type": "string", "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$" },
|
|
70
|
+
"nonce": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
71
|
+
"receipt_sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
72
|
+
"started_at": { "type": "string", "format": "date-time" },
|
|
73
|
+
"revision": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
|
|
74
|
+
"branch": { "type": "string", "minLength": 1 },
|
|
75
|
+
"attempt": { "type": "integer", "minimum": 1 },
|
|
76
|
+
"environment": { "$ref": "#/$defs/environment" },
|
|
77
|
+
"source": { "$ref": "#/$defs/source_manifest" }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"receipt_artifact": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": ["path", "sha256", "byte_length", "media_type"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"path": { "const": "capture-session.json" },
|
|
86
|
+
"sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
87
|
+
"byte_length": { "type": "integer", "minimum": 1 },
|
|
88
|
+
"media_type": { "const": "application/json" }
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"completed_session": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"required": ["session_id", "nonce", "receipt_sha256", "receipt", "started_at", "completed_at", "repository", "revision", "branch", "attempt", "environment", "source", "intended"],
|
|
95
|
+
"properties": {
|
|
96
|
+
"session_id": { "type": "string", "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$" },
|
|
97
|
+
"nonce": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
98
|
+
"receipt_sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
99
|
+
"receipt": { "$ref": "#/$defs/receipt_artifact" },
|
|
100
|
+
"started_at": { "type": "string", "format": "date-time" },
|
|
101
|
+
"completed_at": { "type": "string", "format": "date-time" },
|
|
102
|
+
"repository": { "type": "string", "minLength": 1 },
|
|
103
|
+
"revision": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
|
|
104
|
+
"branch": { "type": "string", "minLength": 1 },
|
|
105
|
+
"attempt": { "type": "integer", "minimum": 1 },
|
|
106
|
+
"environment": { "$ref": "#/$defs/environment" },
|
|
107
|
+
"source": { "$ref": "#/$defs/source_manifest" },
|
|
108
|
+
"intended": { "$ref": "#/$defs/intended" }
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"source_manifest": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"required": ["sha256", "files"],
|
|
115
|
+
"properties": {
|
|
116
|
+
"sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
117
|
+
"files": {
|
|
118
|
+
"type": "array",
|
|
119
|
+
"minItems": 1,
|
|
120
|
+
"uniqueItems": true,
|
|
121
|
+
"items": {
|
|
122
|
+
"type": "object",
|
|
123
|
+
"additionalProperties": false,
|
|
124
|
+
"required": ["path", "sha256", "byte_length"],
|
|
125
|
+
"properties": {
|
|
126
|
+
"path": { "type": "string", "pattern": "^(?:(?:consumer-reference|profiles|scripts|tests)/[^\\\\?#]+|package(?:-lock)?\\.json|playwright\\.config\\.mjs)$" },
|
|
127
|
+
"sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
128
|
+
"byte_length": { "type": "integer", "minimum": 1 }
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"intended": {
|
|
135
|
+
"type": "array",
|
|
136
|
+
"minItems": 1,
|
|
137
|
+
"items": {
|
|
138
|
+
"type": "object",
|
|
139
|
+
"additionalProperties": false,
|
|
140
|
+
"required": ["profile_name", "profile_id", "scenarios"],
|
|
141
|
+
"properties": {
|
|
142
|
+
"profile_name": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
143
|
+
"profile_id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
144
|
+
"scenarios": {
|
|
145
|
+
"type": "array",
|
|
146
|
+
"minItems": 1,
|
|
147
|
+
"items": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"additionalProperties": false,
|
|
150
|
+
"required": ["id", "channels"],
|
|
151
|
+
"properties": {
|
|
152
|
+
"id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
153
|
+
"channels": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["visual", "dom", "ax"] } }
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://stylegallery.local/consumer-reference/schema/component-state.schema.json",
|
|
4
|
+
"title": "Consumer component and compound-state records",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{ "$ref": "#/$defs/component" },
|
|
7
|
+
{ "$ref": "#/$defs/stateSet" }
|
|
8
|
+
],
|
|
9
|
+
"$defs": {
|
|
10
|
+
"applicability": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": ["name", "status"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"name": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$" },
|
|
16
|
+
"status": { "enum": ["required", "conditional", "not_applicable", "prohibited"] },
|
|
17
|
+
"condition": { "type": "string", "minLength": 1 },
|
|
18
|
+
"resolution": { "enum": ["required", "not_applicable", "prohibited"] },
|
|
19
|
+
"reason": { "type": "string", "minLength": 10, "pattern": "^\\S+(?:\\s+\\S+){2,}\\s*[.!?]$" },
|
|
20
|
+
"values": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": ["string", "boolean"] } }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"component": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["schema_version", "record_kind", "component_id", "profile_id", "anatomy", "semantic_modes", "versions"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"schema_version": { "const": "1.0" },
|
|
29
|
+
"record_kind": { "const": "component" },
|
|
30
|
+
"component_id": { "const": "button" },
|
|
31
|
+
"profile_id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
32
|
+
"anatomy": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$" } },
|
|
33
|
+
"semantic_modes": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"minItems": 1,
|
|
36
|
+
"items": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": ["id", "element", "role", "keys", "aria_states", "activation"],
|
|
40
|
+
"properties": {
|
|
41
|
+
"id": { "enum": ["action", "toggle", "disclosure", "switch"] },
|
|
42
|
+
"element": { "const": "button" },
|
|
43
|
+
"role": { "enum": ["button", "switch"] },
|
|
44
|
+
"keys": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["Enter", "Space"] } },
|
|
45
|
+
"aria_states": { "type": "array", "items": { "$ref": "#/$defs/applicability" } },
|
|
46
|
+
"activation": { "enum": ["invoke", "toggle", "control"] }
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"versions": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": ["design_revision", "package_version", "api_version", "delivery_channel", "lifecycle"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"design_revision": { "type": "string", "pattern": "^\\d{4}\\.\\d{2}\\.\\d{2}$" },
|
|
56
|
+
"package_version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[a-z0-9.-]+)?$" },
|
|
57
|
+
"api_version": { "type": "string", "pattern": "^\\d+\\.\\d+$" },
|
|
58
|
+
"delivery_channel": { "enum": ["preview", "stable"] },
|
|
59
|
+
"lifecycle": { "enum": ["experimental", "stable", "deprecated"] }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"stateSet": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"required": ["schema_version", "record_kind", "component_id", "profile_id", "visual_environments", "scenarios"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"schema_version": { "const": "1.0" },
|
|
70
|
+
"record_kind": { "const": "state_set" },
|
|
71
|
+
"component_id": { "const": "button" },
|
|
72
|
+
"profile_id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
73
|
+
"visual_environments": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"minItems": 1,
|
|
76
|
+
"items": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"additionalProperties": false,
|
|
79
|
+
"required": ["id", "browser", "browser_revision", "container_image", "platform", "playwright", "viewport"],
|
|
80
|
+
"properties": {
|
|
81
|
+
"id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
82
|
+
"browser": { "type": "string", "minLength": 1 },
|
|
83
|
+
"browser_revision": { "type": "string", "minLength": 1 },
|
|
84
|
+
"container_image": { "type": "string", "minLength": 1 },
|
|
85
|
+
"platform": { "enum": ["darwin/arm64", "linux/amd64"] },
|
|
86
|
+
"playwright": { "const": "1.61.0" },
|
|
87
|
+
"viewport": { "const": "1024x768" }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"scenarios": {
|
|
92
|
+
"type": "array",
|
|
93
|
+
"minItems": 1,
|
|
94
|
+
"items": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": ["id", "semantic_mode", "states", "aria", "expected"],
|
|
98
|
+
"properties": {
|
|
99
|
+
"id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
100
|
+
"semantic_mode": { "enum": ["action", "toggle", "disclosure", "switch"] },
|
|
101
|
+
"states": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["focus", "pressed", "expanded", "loading", "busy", "disabled", "invalid", "selected", "current", "reduced_motion"] } },
|
|
102
|
+
"aria": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"properties": {
|
|
106
|
+
"pressed": { "enum": ["true", "false"] },
|
|
107
|
+
"expanded": { "enum": ["true", "false"] },
|
|
108
|
+
"busy": { "enum": ["true", "false"] },
|
|
109
|
+
"disabled": { "enum": ["true", "false"] },
|
|
110
|
+
"checked": { "enum": ["true", "false"] }
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"expected": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"required": ["visual", "visual_image", "dom", "ax", "activation"],
|
|
117
|
+
"properties": {
|
|
118
|
+
"visual": {
|
|
119
|
+
"type": "array",
|
|
120
|
+
"minItems": 1,
|
|
121
|
+
"uniqueItems": true,
|
|
122
|
+
"items": { "enum": ["ready", "focus", "pressed", "expanded", "loading", "busy", "disabled"] }
|
|
123
|
+
},
|
|
124
|
+
"visual_image": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"minItems": 1,
|
|
127
|
+
"items": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"additionalProperties": false,
|
|
130
|
+
"required": ["environment_id", "sha256", "width", "height"],
|
|
131
|
+
"properties": {
|
|
132
|
+
"environment_id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
133
|
+
"sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
134
|
+
"width": { "type": "integer", "minimum": 44 },
|
|
135
|
+
"height": { "type": "integer", "minimum": 44 }
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"dom": { "type": "object", "additionalProperties": { "type": "string" } },
|
|
140
|
+
"ax": { "type": "object", "additionalProperties": { "type": ["string", "boolean"] } },
|
|
141
|
+
"activation": { "enum": ["allowed", "suppressed"] }
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|