@canonical/design-system 0.49.0 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +55 -1
  2. package/data/documentation/pattern/library_side_navigation.ttl +1 -1
  3. package/data/global/component/badge.ttl +1 -1
  4. package/data/global/modifier/achromat.ttl +1 -0
  5. package/data/global/modifier/alpha.ttl +1 -0
  6. package/data/global/modifier/beta.ttl +1 -0
  7. package/data/global/modifier/branded.ttl +1 -0
  8. package/data/global/modifier/caution.ttl +1 -0
  9. package/data/global/modifier/comfortable.ttl +1 -0
  10. package/data/global/modifier/completed.ttl +1 -0
  11. package/data/global/modifier/constructive.ttl +1 -0
  12. package/data/global/modifier/contrasted.ttl +1 -0
  13. package/data/global/modifier/dark.ttl +1 -0
  14. package/data/global/modifier/dense.ttl +1 -0
  15. package/data/global/modifier/deprecated.ttl +1 -0
  16. package/data/global/modifier/destructive.ttl +1 -0
  17. package/data/global/modifier/deutan.ttl +1 -0
  18. package/data/global/modifier/end_of_life.ttl +1 -0
  19. package/data/global/modifier/error.ttl +1 -0
  20. package/data/global/modifier/experimental.ttl +1 -0
  21. package/data/global/modifier/failed.ttl +1 -0
  22. package/data/global/modifier/highlighted.ttl +1 -0
  23. package/data/global/modifier/in_progress.ttl +1 -0
  24. package/data/global/modifier/information.ttl +2 -1
  25. package/data/global/modifier/layer1.ttl +1 -0
  26. package/data/global/modifier/layer2.ttl +1 -0
  27. package/data/global/modifier/layer3.ttl +1 -0
  28. package/data/global/modifier/less.ttl +1 -0
  29. package/data/global/modifier/light.ttl +1 -0
  30. package/data/global/modifier/lts.ttl +1 -0
  31. package/data/global/modifier/more.ttl +1 -0
  32. package/data/global/modifier/muted.ttl +1 -0
  33. package/data/global/modifier/planned.ttl +1 -0
  34. package/data/global/modifier/primary.ttl +1 -0
  35. package/data/global/modifier/protan.ttl +1 -0
  36. package/data/global/modifier/secondary.ttl +1 -0
  37. package/data/global/modifier/stable.ttl +1 -0
  38. package/data/global/modifier/standard.ttl +1 -0
  39. package/data/global/modifier/tertiary.ttl +1 -0
  40. package/data/global/modifier/tritan.ttl +1 -0
  41. package/data/global/modifier/typical.ttl +1 -0
  42. package/data/global/modifier/warning.ttl +1 -0
  43. package/data/global/modifier_family/anticipation.ttl +1 -0
  44. package/data/global/modifier_family/color.ttl +1 -0
  45. package/data/global/modifier_family/color_vision.ttl +1 -0
  46. package/data/global/modifier_family/contrast.ttl +1 -0
  47. package/data/global/modifier_family/density.ttl +1 -0
  48. package/data/global/modifier_family/emphasis.ttl +1 -0
  49. package/data/global/modifier_family/importance.ttl +1 -0
  50. package/data/global/modifier_family/lifecycle.ttl +1 -0
  51. package/data/global/modifier_family/release.ttl +1 -0
  52. package/data/global/modifier_family/severity.ttl +1 -0
  53. package/data/global/modifier_family/support.ttl +1 -0
  54. package/data/global/modifier_family/surface.ttl +2 -1
  55. package/data/global/state/editable.ttl +2 -1
  56. package/data/global/state/focused.ttl +2 -1
  57. package/data/global/state/invalid.ttl +2 -1
  58. package/data/global/state/loading.ttl +2 -1
  59. package/data/global/state/valid.ttl +2 -1
  60. package/data/global/state/wireframe.ttl +2 -1
  61. package/data/global_dataviews/modifier/exclusion.ttl +1 -0
  62. package/data/global_dataviews/modifier/inclusion.ttl +1 -0
  63. package/data/global_dataviews/modifier/match.ttl +1 -0
  64. package/data/global_dataviews/modifier/presence.ttl +1 -0
  65. package/data/global_dataviews/modifier/range.ttl +1 -0
  66. package/data/global_dataviews/modifier_family/condition.ttl +1 -0
  67. package/data/sites/component/store_card.ttl +1 -1
  68. package/definitions/ontology.ttl +9 -0
  69. package/definitions/shapes.ttl +1079 -0
  70. package/package.json +7 -6
  71. package/skills/adoption-a2-components/SKILL.md +45 -2
  72. package/skills/design-auditor/SKILL.md +2 -1
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "types": "src/index.ts",
5
5
  "type": "module",
6
6
  "license": "LGPL-3.0",
7
- "version": "0.49.0",
7
+ "version": "0.50.0",
8
8
  "bin": {
9
9
  "collect-implementations": "./src/collect-implementations.ts"
10
10
  },
@@ -29,8 +29,9 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@biomejs/biome": "^2.3.14",
32
- "@canonical/biome-config": "^0.49.0",
33
- "@canonical/typescript-config": "^0.49.0",
32
+ "@canonical/biome-config": "^0.50.0",
33
+ "@canonical/ke": "^0.50.0",
34
+ "@canonical/typescript-config": "^0.50.0",
34
35
  "@types/bun": "latest",
35
36
  "@types/jsonld": "^1.5.15",
36
37
  "@types/n3": "^1.26.1",
@@ -43,8 +44,8 @@
43
44
  "vitest": "^5.0.0"
44
45
  },
45
46
  "dependencies": {
46
- "@canonical/anatomy-dsl": "^0.49.0",
47
- "@canonical/token-ontology": "^0.49.0",
47
+ "@canonical/anatomy-dsl": "^0.50.0",
48
+ "@canonical/token-ontology": "^0.50.0",
48
49
  "ajv": "^8.17.1",
49
50
  "jsonld": "^9.0.0",
50
51
  "n3": "^2.0.1",
@@ -68,5 +69,5 @@
68
69
  "url": "https://github.com/canonical/pragma-core/issues"
69
70
  },
70
71
  "homepage": "https://github.com/canonical/pragma-core#readme",
71
- "gitHead": "cc3b9ed9cd1a1743fb07d8c278cab94c48fde336"
72
+ "gitHead": "cd14ae5d7c5a0b4e25624d39d09f6ee2d051ba59"
72
73
  }
@@ -327,8 +327,19 @@ inside the component's package in the pragma monorepo (e.g. `packages/react/ds-g
327
327
  > The covered set is whatever the graph answers today. Query it live — never copy its
328
328
  > output into documentation, PRs, or this skill.
329
329
 
330
- A gap found is a FINDING to report (and a `specify-component` candidate) — skip that
331
- type and keep swapping the types the system does cover; never hand-roll a lookalike
330
+ A gap found is a FINDING to report (and a `specify-component` candidate). A type the
331
+ system does not document at all is skipped: keep swapping the types it does cover.
332
+ When the block the element's intent needs IS documented but the package does not
333
+ ship it, fall back in order:
334
+
335
+ 1. The nearest shipped sibling whose anatomy and intent match the block. For
336
+ example, if the export check finds no `Tag`, a read-only status can use a `Chip`
337
+ with no `onClick` or `onDismiss`, which renders a static `<span>`. Check that the
338
+ sibling renders the state you need before adopting it.
339
+ 2. Otherwise an app-local stand-in that follows the block's anatomy (`block lookup`)
340
+ and the design-system tokens — never the old app's look.
341
+
342
+ Either fallback is still reported as a finding. Never hand-roll a lookalike
332
343
  silently.
333
344
 
334
345
  ## One component type per PR
@@ -411,6 +422,38 @@ transform and a CSS stub. Under both, jsdom has no dialog API, so a test that op
411
422
  - [ ] Keyboard pass on each swapped instance (focus, activation, escape where relevant).
412
423
  - [ ] Visual pass against the component's Storybook stories.
413
424
 
425
+ ## Design-conformance pass
426
+
427
+ The per-PR checklist and a green build prove that a swap renders, not that the app
428
+ conforms to the design system. A migration can clear every check above and still
429
+ carry design problems a designer finds in minutes — spacing, token use, alignment,
430
+ hierarchy. So at the END of the swap work — the last PR, or the end of a
431
+ single-change migration — run a conformance pass before hand-off.
432
+
433
+ The code half comes from the `design-auditor` skill. It audits the design system
434
+ itself, and only its Standards Audit dimension applies to an app: pull the live
435
+ code standards and read their Do/Don't pairs against the swapped code. Pull every
436
+ category the swapped code touches, not only the app's framework: css, styling,
437
+ ui-blocks, icons and testing apply to a web app whatever renders it, and the
438
+ `pragma standard categories` output names the rest.
439
+
440
+ ```bash
441
+ pragma skill lookup design-auditor # the skill in full (MCP: skill_lookup)
442
+ pragma standard categories # then, per applicable category:
443
+ pragma standard list --category <category> # the app's framework AND the
444
+ # tech-independent ones — css,
445
+ # styling, ui-blocks, icons, ...
446
+ ```
447
+
448
+ Treat each violation like any other adoption finding: fix it, or report it with the
449
+ standard's name attached.
450
+
451
+ The visual half needs eyes. Neither the auditor nor the build sees pixels. When the
452
+ run has no browser or screenshots to check against, its summary says so and lists
453
+ what a person still has to check by eye: spacing, colour and token use, alignment,
454
+ density, heading hierarchy, and focus and hover treatment. Passing type-checks,
455
+ tests and the build is never a claim of visual conformance.
456
+
414
457
  ## Next
415
458
 
416
459
  Forms are their own programming model — continue with `adoption-a3-forms`.
@@ -48,7 +48,8 @@ Decision gates — in collaboration, pause at each and resolve it WITH the perso
48
48
  ## When NOT to Use
49
49
 
50
50
  - Auditing an APP's adoption of the design system — that is the
51
- `adoption-a1-styles`/`a2`/`a3` tracks
51
+ `adoption-a1-styles`/`a2`/`a3` tracks. The one exception is the Standards Audit
52
+ dimension, which `adoption-a2-components` borrows for its design-conformance pass
52
53
  - Fixing what the audit finds — route gaps to `specify-component`/`specify-pattern`,
53
54
  missing anatomies to `anatomy-author`
54
55