contour-ds 1.7.2 → 1.9.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 (150) hide show
  1. package/README.md +244 -326
  2. package/dist/agent-cookbook.json +960 -0
  3. package/dist/agent-examples.json +65 -0
  4. package/dist/agent-map-wiring.json +152 -0
  5. package/dist/agent-rules.json +16 -0
  6. package/dist/build-manifest.json +344 -126
  7. package/dist/contour-wc-content.esm.js +1939 -0
  8. package/dist/contour-wc-content.esm.min.js +1 -0
  9. package/dist/contour-wc-core.esm.js +3724 -0
  10. package/dist/contour-wc-core.esm.min.js +1 -0
  11. package/dist/contour-wc-dashboard.esm.js +6986 -0
  12. package/dist/contour-wc-dashboard.esm.min.js +1 -0
  13. package/dist/contour-wc-data.esm.js +6572 -0
  14. package/dist/contour-wc-data.esm.min.js +1 -0
  15. package/dist/contour-wc-docs.esm.js +976 -0
  16. package/dist/contour-wc-docs.esm.min.js +1 -0
  17. package/dist/contour-wc-feedback.esm.js +1742 -0
  18. package/dist/contour-wc-feedback.esm.min.js +1 -0
  19. package/dist/contour-wc-forms.esm.js +2437 -0
  20. package/dist/contour-wc-forms.esm.min.js +1 -0
  21. package/dist/contour-wc-interaction.esm.js +1343 -0
  22. package/dist/contour-wc-interaction.esm.min.js +1 -0
  23. package/dist/contour-wc-layout.esm.js +845 -0
  24. package/dist/contour-wc-layout.esm.min.js +1 -0
  25. package/dist/contour-wc-map.esm.js +2411 -0
  26. package/dist/contour-wc-map.esm.min.js +1 -0
  27. package/dist/contour-wc-misc.esm.js +945 -0
  28. package/dist/contour-wc-misc.esm.min.js +1 -0
  29. package/dist/contour-wc-navigation.esm.js +2842 -0
  30. package/dist/contour-wc-navigation.esm.min.js +1 -0
  31. package/dist/contour-wc-ui.esm.js +6519 -0
  32. package/dist/contour-wc-ui.esm.min.js +1 -0
  33. package/dist/contour-wc.esm.js +14435 -5723
  34. package/dist/contour-wc.esm.min.js +1 -1
  35. package/dist/contour-wc.js +14436 -5725
  36. package/dist/contour-wc.min.js +1 -1
  37. package/dist/contour.a11y.json +402 -0
  38. package/dist/contour.code-snippets +4534 -0
  39. package/dist/contour.components.json +4870 -1222
  40. package/dist/contour.css +6672 -4711
  41. package/dist/contour.d.ts +753 -1085
  42. package/dist/contour.esm.js +440 -18
  43. package/dist/contour.esm.min.js +1 -1
  44. package/dist/contour.html-data.json +11343 -0
  45. package/dist/contour.js +440 -18
  46. package/dist/contour.min.css +1 -1
  47. package/dist/contour.min.js +1 -1
  48. package/dist/contour.react.d.ts +422 -0
  49. package/dist/contour.single.html +17 -0
  50. package/dist/contour.single.min.css +1 -0
  51. package/dist/contour.themes.json +56 -12
  52. package/dist/contour.tokens.json +1318 -1053
  53. package/dist/contour.vue.d.ts +420 -0
  54. package/dist/contour.web-types.json +11703 -0
  55. package/dist/custom-elements.json +36120 -0
  56. package/dist/docs/actions.md +16 -6
  57. package/dist/docs/affordances.md +21 -85
  58. package/dist/docs/apireference.md +9 -5
  59. package/dist/docs/colour.md +10 -4
  60. package/dist/docs/componentindex.md +9 -22
  61. package/dist/docs/data.md +39 -58
  62. package/dist/docs/docs.md +12 -7
  63. package/dist/docs/feedback.md +30 -12
  64. package/dist/docs/field.md +28 -13
  65. package/dist/docs/forms.md +35 -19
  66. package/dist/docs/index.json +70 -61
  67. package/dist/docs/install.md +12 -7
  68. package/dist/docs/landing.md +7 -4
  69. package/dist/docs/mapengine.md +30 -8
  70. package/dist/docs/motion.md +12 -6
  71. package/dist/docs/navigation.md +31 -7
  72. package/dist/docs/overlays.md +32 -25
  73. package/dist/docs/overview.md +3 -2
  74. package/dist/docs/patterns.md +20 -10
  75. package/dist/docs/playground.md +11 -4
  76. package/dist/docs/principles.md +8 -6
  77. package/dist/docs/recipes.md +117 -13
  78. package/dist/docs/space.md +10 -6
  79. package/dist/docs/status.md +13 -14
  80. package/dist/docs/surfaces.md +17 -22
  81. package/dist/docs/theming.md +18 -32
  82. package/dist/docs/type.md +12 -5
  83. package/dist/docs/webcomponents.md +75 -33
  84. package/dist/hljs.css +1 -20
  85. package/dist/map-chrome.mapbox.css +68 -92
  86. package/dist/map-chrome.maplibre.css +68 -92
  87. package/dist/registry/items/contour-core.json +2 -2
  88. package/dist/registry/items/contour-data.json +2 -2
  89. package/dist/registry/items/contour-docs.json +2 -2
  90. package/dist/registry/items/contour-landing.json +2 -2
  91. package/dist/registry/registry.json +8 -8
  92. package/dist/surfaces/contour-core.min.css +1 -1
  93. package/dist/surfaces/contour-data.min.css +1 -1
  94. package/dist/surfaces/contour-docs.min.css +1 -1
  95. package/dist/surfaces/contour-landing.min.css +1 -1
  96. package/dist/svg/icons.svg +367 -0
  97. package/dist/wc/behaviours.mjs +222 -192
  98. package/dist/wc/content.mjs +486 -142
  99. package/dist/wc/core.mjs +917 -395
  100. package/dist/wc/dashboard.mjs +252 -25
  101. package/dist/wc/data-chart.mjs +1333 -0
  102. package/dist/wc/data-export.mjs +391 -0
  103. package/dist/wc/data-gauge.mjs +779 -0
  104. package/dist/wc/data-geo.mjs +696 -0
  105. package/dist/wc/data-glyphs.mjs +133 -0
  106. package/dist/wc/data-legend.mjs +431 -0
  107. package/dist/wc/data-readout.mjs +227 -0
  108. package/dist/wc/data-series.mjs +1004 -0
  109. package/dist/wc/data-table.mjs +751 -0
  110. package/dist/wc/data.mjs +15 -3707
  111. package/dist/wc/docs.mjs +113 -19
  112. package/dist/wc/feedback.mjs +320 -116
  113. package/dist/wc/forms-controls.mjs +635 -0
  114. package/dist/wc/forms-field.mjs +547 -0
  115. package/dist/wc/forms-groups.mjs +347 -0
  116. package/dist/wc/forms-input.mjs +292 -0
  117. package/dist/wc/forms.mjs +10 -1122
  118. package/dist/wc/glyph.mjs +204 -0
  119. package/dist/wc/index.mjs +16 -7
  120. package/dist/wc/interaction.mjs +322 -75
  121. package/dist/wc/layout.mjs +100 -29
  122. package/dist/wc/map.mjs +888 -285
  123. package/dist/wc/misc.mjs +137 -26
  124. package/dist/wc/navigation-menu.mjs +735 -0
  125. package/dist/wc/navigation-shell.mjs +495 -0
  126. package/dist/wc/navigation-tree.mjs +995 -0
  127. package/dist/wc/navigation.mjs +9 -1636
  128. package/dist/wc/registration.mjs +1 -8
  129. package/dist/wc/shadow.mjs +285 -113
  130. package/dist/wc/states.mjs +75 -78
  131. package/dist/wc/svg.mjs +209 -34
  132. package/dist/wc/ui-atoms.mjs +608 -0
  133. package/dist/wc/ui-data.mjs +1404 -0
  134. package/dist/wc/ui-feedback.mjs +419 -0
  135. package/dist/wc/ui-inputs.mjs +1570 -0
  136. package/dist/wc/ui-menus.mjs +307 -0
  137. package/dist/wc/ui-overlays.mjs +1605 -0
  138. package/integrations/README.md +25 -5
  139. package/integrations/ai/CLAUDE.md +6 -3
  140. package/integrations/ai/COPILOT.md +14 -0
  141. package/integrations/ai/GEMINI.md +14 -0
  142. package/integrations/ai/WINDSURF.md +14 -0
  143. package/integrations/ai/v0-prompt.md +13 -1
  144. package/integrations/frameworks/README.md +235 -0
  145. package/integrations/native/README.md +0 -3
  146. package/integrations/native/style-dictionary.config.json +1 -1
  147. package/integrations/tailwind/contour-theme.css +71 -13
  148. package/integrations/validate-markup.mjs +172 -0
  149. package/package.json +103 -39
  150. package/dist/wc/ui.mjs +0 -3560
@@ -1,4 +1,4 @@
1
- # A 4px base, and shapes that stay soft.
1
+ # Space & shape
2
2
 
3
3
  Section `space` — marker `04`, position 5 of 27 in the guide.
4
4
  Generated from `index.html`; prose quoted, counts from the inventory, no URL (the project is
@@ -6,33 +6,37 @@ private until v1.0). See `index.json` for the whole set and the shared statement
6
6
 
7
7
  ## What the guide says
8
8
 
9
- Spacing is a scale, not a decision. Components inherit the rhythm so a card in a sidebar and a card on a landing page breathe at the same rate.
9
+ A 4px base, and shapes that stay soft. Spacing is a scale, not a decision. Components inherit the rhythm so a card in a sidebar and a card on a landing page breathe at the same rate.
10
10
 
11
- The same blocks as contour-* elements live in §23.
11
+ The same blocks as contour-* elements live in §22.
12
12
 
13
13
  Shadows only for things that genuinely float above the page. Everything else uses surface lightness.
14
14
 
15
+ The same blocks as elements. Attributes are the canonical wire format; the full catalogue, with every element and its reactivity, is in Web components.
16
+
15
17
  ## Subsections
16
18
 
17
19
  - Space scale
18
20
  - Radius scale
19
21
  - Elevation
22
+ - Web components
20
23
 
21
24
  ## Blocks documented here
22
25
 
23
- 8 block(s). Their facts live in `../contour.components.json`;
26
+ 9 block(s). Their facts live in `../contour.components.json`;
24
27
  only the names are here, because the same figure in two files is how a document
25
28
  starts disagreeing with itself.
26
29
 
27
30
  - `.c-badge`
28
31
  - `.c-btn`
29
32
  - `.c-card`
33
+ - `.c-divider`
30
34
  - `.c-elevation`
35
+ - `.c-eyebrow`
31
36
  - `.c-icon-badge`
32
37
  - `.c-kbd`
33
38
  - `.c-section-head`
34
- - `.c-segmented`
35
39
 
36
40
  ---
37
41
 
38
- Source `index.html` @ `1beb0033376e73f1` · last committed 2026-11-08T12:25:18+01:00 · no URL: the project is private until v1.0.
42
+ Source `index.html` @ `e59a15ba0fa53c75` · last committed 2026-11-29T20:19:21+01:00 · no URL: the project is private until v1.0.
@@ -1,6 +1,6 @@
1
1
  # Status & labels
2
2
 
3
- Section `status` — marker `07`, position 9 of 27 in the guide.
3
+ Section `status` — marker `08`, position 9 of 27 in the guide.
4
4
  Generated from `index.html`; prose quoted, counts from the inventory, no URL (the project is
5
5
  private until v1.0). See `index.json` for the whole set and the shared statement.
6
6
 
@@ -8,39 +8,38 @@ private until v1.0). See `index.json` for the whole set and the shared statement
8
8
 
9
9
  Badges carry a category. Chips carry a value. Pills carry a state. The waypoint dot carries presence. Four jobs, four shapes — never interchangeable.
10
10
 
11
- Equivalent contour-* elements are catalogued in §23.
11
+ Equivalent contour-* elements are catalogued in §22.
12
+
13
+ The same blocks as elements. Attributes are the canonical wire format; the full catalogue, with every element and its reactivity, is in Web components.
12
14
 
13
15
  ## Subsections
14
16
 
15
- - Web component counterpart
16
- - Empty state
17
- - Skeleton
18
- - Loading
19
- - Web component counterparts
17
+ - Web components
20
18
 
21
19
  ## Blocks documented here
22
20
 
23
- 16 block(s). Their facts live in `../contour.components.json`;
21
+ 17 block(s). Their facts live in `../contour.components.json`;
24
22
  only the names are here, because the same figure in two files is how a document
25
23
  starts disagreeing with itself.
26
24
 
27
25
  - `.c-avatar`
26
+ - `.c-avatar-group`
28
27
  - `.c-badge`
28
+ - `.c-badge-overflow`
29
29
  - `.c-btn`
30
30
  - `.c-chip`
31
+ - `.c-cluster`
31
32
  - `.c-dot`
32
- - `.c-empty`
33
+ - `.c-eyebrow`
34
+ - `.c-flag`
33
35
  - `.c-icon-badge`
34
36
  - `.c-kbd`
35
37
  - `.c-live-badge`
36
- - `.c-loading`
37
38
  - `.c-pill`
38
39
  - `.c-section-head`
39
- - `.c-skeleton`
40
- - `.c-skeleton-group`
41
- - `.c-spinner`
40
+ - `.c-status-light`
42
41
  - `.c-tag`
43
42
 
44
43
  ---
45
44
 
46
- Source `index.html` @ `1beb0033376e73f1` · last committed 2026-11-08T12:25:18+01:00 · no URL: the project is private until v1.0.
45
+ Source `index.html` @ `e59a15ba0fa53c75` · last committed 2026-11-29T20:19:21+01:00 · no URL: the project is private until v1.0.
@@ -6,9 +6,13 @@ private until v1.0). See `index.json` for the whole set and the shared statement
6
6
 
7
7
  ## What the guide says
8
8
 
9
- Cards are for things that are independently actionable. Information that only belongs to its group does not get a container — it gets space and a rule.
9
+ Cards are for things that stand alone — a result, a feature, a next step. Information that only belongs to its group does not get a container — it gets space and a rule.
10
10
 
11
- Equivalent contour-* elements are catalogued in §23.
11
+ Equivalent contour-* elements are catalogued in §22.
12
+
13
+ The surfaces content sits on: a card for the standalone thing, a plate for the hero, a feature for the indexed list.
14
+
15
+ A raised, bordered container for content that stands alone — a result, a feature, a next step.
12
16
 
13
17
  Route calculation runs in single-digit milliseconds once the tile graph is built.
14
18
 
@@ -24,49 +28,40 @@ No routing server, no third-party API, no latency tax.
24
28
 
25
29
  The same query always returns the same engine and result.
26
30
 
27
- The end of the page: the brand, a line about what this is, and the links that stay reachable.
28
-
29
- A design system for spatial interfaces. One set of rules for three surfaces.
31
+ Responsive content
30
32
 
31
- Scroll container with content-visibility for performance. Virtualization logic is the consumer's responsibility — this provides the CSS containment and scroll behavior.
33
+ The same blocks as elements. Attributes are the canonical wire format; the full catalogue, with every element and its reactivity, is in Web components.
32
34
 
33
35
  ## Subsections
34
36
 
37
+ - Containers
35
38
  - Millisecond routing
36
39
  - Isolines, built in
37
40
  - GeoJSON out
38
41
  - A raised surface for hero content
39
- - Feature blocks
40
- - Foundations
41
- - Components
42
- - Web component counterpart
42
+ - Web components
43
43
 
44
44
  ## Blocks documented here
45
45
 
46
- 19 block(s). Their facts live in `../contour.components.json`;
46
+ 14 block(s). Their facts live in `../contour.components.json`;
47
47
  only the names are here, because the same figure in two files is how a document
48
48
  starts disagreeing with itself.
49
49
 
50
50
  - `.c-badge`
51
- - `.c-brand`
52
51
  - `.c-btn`
52
+ - `.c-calendar`
53
53
  - `.c-card`
54
- - `.c-coordinate`
55
- - `.c-draggable`
56
- - `.c-drop-indicator`
57
- - `.c-drop-zone`
54
+ - `.c-carousel`
55
+ - `.c-eyebrow`
58
56
  - `.c-feature`
59
- - `.c-footer`
60
57
  - `.c-icon-badge`
61
58
  - `.c-kbd`
62
59
  - `.c-link`
63
- - `.c-mark`
64
60
  - `.c-plate`
65
- - `.c-resizable`
66
- - `.c-resize-handle`
67
- - `.c-scroll-area`
61
+ - `.c-responsive-content`
68
62
  - `.c-section-head`
63
+ - `.c-stack`
69
64
 
70
65
  ---
71
66
 
72
- Source `index.html` @ `1beb0033376e73f1` · last committed 2026-11-08T12:25:18+01:00 · no URL: the project is private until v1.0.
67
+ Source `index.html` @ `e59a15ba0fa53c75` · last committed 2026-11-29T20:19:21+01:00 · no URL: the project is private until v1.0.
@@ -1,4 +1,4 @@
1
- # Two themes, one cascade.
1
+ # Theming
2
2
 
3
3
  Section `theming` — marker `21`, position 22 of 27 in the guide.
4
4
  Generated from `index.html`; prose quoted, counts from the inventory, no URL (the project is
@@ -6,9 +6,9 @@ private until v1.0). See `index.json` for the whole set and the shared statement
6
6
 
7
7
  ## What the guide says
8
8
 
9
- The color-scheme property on :root is the only switch. Every semantic token resolves through light-dark(), so the palette follows the OS by default — and CSS never depends on JavaScript to be readable.
9
+ Two themes, one cascade. The color-scheme property on :root is the only switch. Every semantic token resolves through light-dark(), so the palette follows the OS by default — and CSS never depends on JavaScript to be readable.
10
10
 
11
- Equivalent contour-* elements are catalogued in §23.
11
+ Equivalent contour-* elements are catalogued in §22.
12
12
 
13
13
  Deeper surfaces, one hairline, no shadows. Designed for long sessions in a dim room and for maps that need to glow against the page.
14
14
 
@@ -16,25 +16,9 @@ A paper-white chart with ink text. The same five families, re-stepped for contra
16
16
 
17
17
  Stored in localStorage, applied before first paint.
18
18
 
19
- Page-level morphing via the View Transitions API. Add data-view-transition with a --view-transition-name to morph elements across navigations. Falls back gracefully in browsers without support.
19
+ Widgets for editing a theme: a style panel for layer styles, a switcher for schemes, a palette editor for chart colours. The specimens show the markup contract; the wiring is the consumer's.
20
20
 
21
- Morph a card between two states using the View Transitions API. The card's view-transition-name links the before and after states.
22
-
23
- Compact state
24
-
25
- Expanded state with more content and a wider layout.
26
-
27
- A card and a dialog share one view-transition-name, so the card morphs into the dialog (and back) instead of cross-fading. The name is the only link between the two surfaces.
28
-
29
- Compact surface that expands into a dialog.
30
-
31
- Expanded surface reached by morphing the card.
32
-
33
- A small preview surface morphs into its full detail surface. Both carry the same view-transition-name; the browser interpolates size, position and content between them.
34
-
35
- Thumbnail
36
-
37
- Full surface with the complete content and a wider layout.
21
+ The same blocks as elements. Attributes are the canonical wire format; the full catalogue, with every element and its reactivity, is in Web components.
38
22
 
39
23
  ## Subsections
40
24
 
@@ -42,30 +26,32 @@ Full surface with the complete content and a wider layout.
42
26
  - Daylight
43
27
  - Scheme preference
44
28
  - Accessibility contract
45
- - Before
46
- - After
47
- - Card
48
- - Preview
49
- - Detail
50
- - Web component counterpart
29
+ - Scoped theming
30
+ - Theming tooling
31
+ - Style panel
32
+ - Style switcher
33
+ - Palette editor
34
+ - Web components
51
35
 
52
36
  ## Blocks documented here
53
37
 
54
- 10 block(s). Their facts live in `../contour.components.json`;
38
+ 12 block(s). Their facts live in `../contour.components.json`;
55
39
  only the names are here, because the same figure in two files is how a document
56
40
  starts disagreeing with itself.
57
41
 
58
42
  - `.c-badge`
59
43
  - `.c-btn`
60
- - `.c-card`
61
- - `.c-dialog`
62
44
  - `.c-dot`
45
+ - `.c-eyebrow`
63
46
  - `.c-icon-badge`
64
47
  - `.c-kbd`
65
- - `.c-panel`
48
+ - `.c-palette-editor`
66
49
  - `.c-section-head`
67
50
  - `.c-segmented`
51
+ - `.c-style-panel`
52
+ - `.c-style-switcher`
53
+ - `.c-theme-scope`
68
54
 
69
55
  ---
70
56
 
71
- Source `index.html` @ `1beb0033376e73f1` · last committed 2026-11-08T12:25:18+01:00 · no URL: the project is private until v1.0.
57
+ Source `index.html` @ `e59a15ba0fa53c75` · last committed 2026-11-29T20:19:21+01:00 · no URL: the project is private until v1.0.
package/dist/docs/type.md CHANGED
@@ -1,4 +1,4 @@
1
- # Two families, one superfamily.
1
+ # Typography
2
2
 
3
3
  Section `type` — marker `03`, position 4 of 27 in the guide.
4
4
  Generated from `index.html`; prose quoted, counts from the inventory, no URL (the project is
@@ -6,7 +6,9 @@ private until v1.0). See `index.json` for the whole set and the shared statement
6
6
 
7
7
  ## What the guide says
8
8
 
9
- IBM Plex Sans Condensed sets the display voice; IBM Plex Sans carries body copy; IBM Plex Mono is reserved for anything the machine produced. Contrast comes from proportion, not from mixing unrelated typefaces.
9
+ Two families, one superfamily. IBM Plex Sans Condensed sets the display voice; IBM Plex Sans carries body copy; IBM Plex Mono is reserved for anything the machine produced. Contrast comes from proportion, not from mixing unrelated typefaces.
10
+
11
+ IBM Plex Sans Condensed · 700 — the display voice for headings, numerals and labels.
10
12
 
11
13
  Contour lines 0123456789
12
14
 
@@ -14,18 +16,23 @@ Backend-less routing
14
16
 
15
17
  16.4 km · 19 min
16
18
 
17
- Body copy is capped at 68 characters and set at 1.65 leading — looser than the default, because light-on-dark text needs more air.
19
+ Body copy is capped at 68 characters (--measure-prose) and inherits the page's 1.65 leading (--leading-relaxed) — the default body rhythm, not an override.
20
+
21
+ ## Subsections
22
+
23
+ - Display voice
18
24
 
19
25
  ## Blocks documented here
20
26
 
21
- 3 block(s). Their facts live in `../contour.components.json`;
27
+ 4 block(s). Their facts live in `../contour.components.json`;
22
28
  only the names are here, because the same figure in two files is how a document
23
29
  starts disagreeing with itself.
24
30
 
25
31
  - `.c-btn`
32
+ - `.c-eyebrow`
26
33
  - `.c-icon-badge`
27
34
  - `.c-section-head`
28
35
 
29
36
  ---
30
37
 
31
- Source `index.html` @ `1beb0033376e73f1` · last committed 2026-11-08T12:25:18+01:00 · no URL: the project is private until v1.0.
38
+ Source `index.html` @ `e59a15ba0fa53c75` · last committed 2026-11-29T20:19:21+01:00 · no URL: the project is private until v1.0.
@@ -1,100 +1,142 @@
1
1
  # Web components
2
2
 
3
- Section `webcomponents` — marker `23`, position 24 of 27 in the guide.
3
+ Section `webcomponents` — marker `22`, position 23 of 27 in the guide.
4
4
  Generated from `index.html`; prose quoted, counts from the inventory, no URL (the project is
5
5
  private until v1.0). See `index.json` for the whole set and the shared statement.
6
6
 
7
7
  ## What the guide says
8
8
 
9
- Detailed interactive stories, controls, keyboard paths and workflow demonstrations live in the optional Storybook workshop (npm run storybook). This section keeps the concise contract, reactivity, events, slots/parts and ownership boundary; Storybook links back to it and does not redefine it.
9
+ Detailed interactive stories, controls, keyboard paths and workflow demonstrations live in the optional Storybook workshop ( npm run storybook ). This section keeps the concise contract, reactivity, events, slots/parts and ownership boundary; Storybook links back to it and does not redefine it.
10
10
 
11
- Open the local Storybook workshop after npm run build, or start it with npm run storybook. The complete registered-element catalogue is in Registered elements; focused interaction stories include forms, charts, overlays and dashboard workflows.
11
+ Where each shape of the markup lives: §04–§24 show every block as the CSS an author writes by hand, and this section shows the same blocks as elements that generate it. The division is deliberate, not a migration left half-done. The raw markup is the contract a consumer copies, and it works with no script at all; this layer is the optional enhancement over that same contract, so a page can drop it and lose nothing but its attributes.
12
12
 
13
- Optional progressive enhancement. Load contour-wc.js after ds.css to use contour-* and contour-shadow-* custom elements that generate their scaffolding from attributes. Light-DOM elements use the cascade directly; shadow-DOM elements ship slots and adopted stylesheets for encapsulation.
13
+ How the element layer behaves, stated once. The panels below demonstrate each part of it; the catalogue follows.
14
14
 
15
- Where each shape of the markup lives: §04–§22 show every block as the CSS an author writes by hand, and this section shows the same blocks as elements that generate it. The division is deliberate, not a migration left half-done. The raw markup is the contract a consumer copies, and it works with no script at all; this layer is the optional enhancement over that same contract, so a page can drop it and lose nothing but its attributes.
15
+ the catalog divides components into four levels of implementation depth: Primitive (single-purpose atomic building blocks like box, stack, readout, kbd; they lay out children or render tokens); Scaffold (structural frames like dash-shell and dashboard-grid that provide CSS classes and wire host attributes but leave windowing/docking to the host application); Composition (hosts that compose multiple primitives through slots and event seams, such as header, sidebar, split-view, and map-area); and Complete widget (autonomous interactive controls with full keyboard navigation, roving tabindex, ARIA roles, form association, and event dispatch, such as combobox, table, dialog, time-slider, and sortable-list). A component that merely renders its HTML markup is not a complete control until it fulfills its interaction, keyboard, form-value and ARIA contracts.
16
16
 
17
- Reactivity: every component extends ContourBase, which snapshots the author's nodes and class on first connect. An attribute change restores that snapshot, re-runs render(), and re-wires behaviour via enhance(), so authored content and listeners survive while generated nodes are rebuilt. Form values are preserved across a re-render; render bodies use ensure() for update-or-create reactivity.
17
+ The same table contract composes inside a stack, while an error boundary keeps a fallback local to the failed widget.
18
18
 
19
- Composition: components never reach into one another. A host composes by nesting or slotted content, and interactive components emit a published vocabulary of bubbling contour:* CustomEvents — every name, its payload keys and its composed flag are the event table below — that a parent handles without coupling to internals. Shadow wrappers adopt the document's same-origin sheets once and share one parsed stylesheet across instances.
19
+ One card, two ways to change it. Writing three attributes in turn rebuilds the card three times; the same three writes inside batch() rebuild it once. The count is the element's own renderCount, not a number this page keeps, so it cannot drift from what the layer did.
20
20
 
21
- Shadow layer parity: the contour-shadow-* wrappers are a styling shell. They adopt the document's sheets and wire a small set of behaviours (tabs, segmented, combobox, tree, menu, pagination, copy, removable); the remaining wrappers provide ARIA setup only. Shadow tabs and code-tabs use a slot template and expect authored panels, unlike the light-DOM tabs which generate panels from the tabs attribute. Consumers who need full widget behaviour should use the light-DOM contour-* elements.
21
+ A single attribute write runs the whole lifecycle, in order. The four rows below are filled from the element rather than from this page: the count is renderCount, and the last row only turns green once the close button — which the layer rebuilt during the re-render — still handles a click. That is the part a re-render gets wrong when a listener is captured on a node the render then replaces.
22
22
 
23
- Async-state contract: 60 components expose loading, error, empty, retry and skeleton attributes, rendered through the shared wireStates / renderStates helpers in src/js/wc/states.mjs. A component that reads one of these attributes but does not call wireStates is a bug.
23
+ Toggle attributes live and watch the component re-render. The alert's variant and the kpi's value are driven by the controls below; no page-level state is kept.
24
24
 
25
- Property reflection: every component declares a properties map (name → { attribute, type }), and ContourBase installs accessors so el.value = 42 writes the attribute and triggers the normal re-render path. Types are String (default), Number and Boolean; a null/false value removes the attribute. Components that observe an attribute but omit it from properties are not reflectable — the wc-contract gate flags the gap.
25
+ The form family — contour-input, contour-textarea, contour-field, contour-select (single and multiple), contour-combobox, contour-check, contour-radio, contour-switch, contour-range, contour-radio-list, contour-version, contour-checkbox-group, contour-search-field, contour-input-group, contour-number-field, contour-date-picker, contour-time-picker, contour-color-picker, contour-file-upload and contour-tags-input — participates in a native form via ElementInternals: values submit under the host's name (a multi-select and a checkbox group submit one entry per selected value), required reports validity, reset restores the authored default, and typed text survives an unrelated attribute change. The wc-contract gate measures each of these contracts. Submit the form below to see the FormData it produces.
26
26
 
27
- Mutation and events: attributes are the public input; a consumer mutates them directly (el.setAttribute("variant", "danger") or the reflected property) and the component re-renders. Interactive components emit the bubbling contour:* events in the table above with composed: true, so a parent — including one inside a shadow root — handles them without coupling to internals. Form controls use ElementInternals and emit contour:input / contour:change with { name, value, checked }.
27
+ Every contour:* event the layer dispatches, the payload keys an emission site can carry, and the composed flag. Payload keys are the union of keys the emission sites pass; an empty payload is an event that carries no detail object. Composition here is what the flag is for: a component hosted inside another author's shadow root still surfaces its events to the document, and a consumer reads the same frozen list from window.ContourEvents.
28
28
 
29
- Slots and parts: the contour-shadow-* wrappers adopt the document's sheets and expose ::part() hooks for the named regions in their templates; slotted content is preserved across re-render because the base class snapshots authored nodes. Loading, error, empty and skeleton states are rendered through the shared wireStates / renderStates helpers, so a component that reads one of those attributes without calling wireStates is a bug.
29
+ Interactive components emit bubbling contour:* CustomEvents on the host, so a parent handles them without coupling to internals. The menu below emits contour:select; the pagination emits contour:page.
30
30
 
31
- Token-name compatibility: consumers migrating from libreship may keep their --ls-* names by aliasing them onto the corresponding --color-* / --chart-* tokens on :root; the system publishes only the Contour names.
31
+ Concise usage notes for the web-component layer. The generated API cards above cover structural inputs (observed attributes, properties, parts); these notes cover intent, composition and gotchas the cards cannot express. Full text: tmp/dx_notes.md.
32
32
 
33
- The same table contract composes inside a stack, while an error boundary keeps a fallback local to the failed widget.
33
+ The contour-shadow-* wrappers: styling shells that adopt the document's sheets. The parity contract is in the layer-contract panel above.
34
34
 
35
- Every contour:* event the layer dispatches, the payload keys an emission site can carry, and the composed flag. Payload keys are the union of keys the emission sites pass; an empty payload is an event that carries no detail object. Composition here is what the flag is for: a component hosted inside another author's shadow root still surfaces its events to the document, and a consumer reads the same frozen list from window.ContourEvents.
35
+ Slotted content in the shadow root.
36
36
 
37
- One card, two ways to change it. Writing three attributes in turn rebuilds the card three times; the same three writes inside batch() rebuild it once. The count is the element's own renderCount, not a number this page keeps, so it cannot drift from what the layer did.
37
+ Dialog body content.
38
38
 
39
- Concise usage notes for the web-component layer. The generated API cards above cover structural inputs (observed attributes, properties, parts); these notes cover intent, composition and gotchas the cards cannot express. Full text: tmp/dx_notes.md.
39
+ Loading, error, empty and skeleton rendered through the shared wireStates / renderStates helpers.
40
40
 
41
- Toggle attributes live and watch the component re-render. The alert's variant and the kpi's value are driven by the controls below; no page-level state is kept.
41
+ The §06 blocks as elements.
42
42
 
43
- contour-input, contour-select, contour-check and contour-switch participate in a native form via ElementInternals: their values are submitted, validated and reset like native controls. Submit the form below to see the FormData it produces.
43
+ The §07 blocks as elements, with form association via ElementInternals.
44
44
 
45
- Interactive components emit bubbling contour:* CustomEvents on the host, so a parent handles them without coupling to internals. The menu below emits contour:select; the pagination emits contour:page.
45
+ The §08 blocks as elements.
46
+
47
+ The §09 blocks as elements.
46
48
 
47
49
  Authored content survives re-renders.
48
50
 
49
- Slotted content in the shadow root.
51
+ Content behind the scrim.
50
52
 
51
- Dialog body content.
53
+ The §10 blocks as elements.
52
54
 
53
- Dialog body content.
55
+ The §11 blocks as elements.
56
+
57
+ The §12 blocks as elements. Dialog, drawer and sheet open through show() / showModal().
54
58
 
55
59
  Dialog body content.
56
60
 
57
- Content behind the scrim.
61
+ Drawer body content.
62
+
63
+ The §13 blocks as elements, including the chart family.
64
+
65
+ The §14 blocks as elements.
66
+
67
+ The §15 blocks as elements.
68
+
69
+ The §16 blocks as elements.
70
+
71
+ The §17 blocks as elements.
72
+
73
+ The §18 blocks as elements.
74
+
75
+ The §19 blocks as elements.
58
76
 
59
77
  ## Subsections
60
78
 
79
+ - The layer contract
61
80
  - Composition and states
62
- - Event vocabulary
63
81
  - Reactivity, counted
64
- - DX notes (per component)
82
+ - One write, from top to bottom
65
83
  - Reactivity playground
66
84
  - Form association
85
+ - Event vocabulary
67
86
  - Event emission
87
+ - DX notes (per component)
88
+ - Shadow layer
89
+ - Async states
90
+ - Actions
91
+ - Forms
92
+ - Status & labels
93
+ - Surfaces
94
+ - Navigation
95
+ - Feedback
96
+ - Overlays
97
+ - Data display
98
+ - Map field & chrome
99
+ - Documentation
100
+ - Landing
101
+ - Patterns & filters
102
+ - Affordances & interaction
103
+ - Shells & recipes
104
+ - Attribute & property reference
68
105
 
69
106
  ## Blocks documented here
70
107
 
71
- 22 block(s). Their facts live in `../contour.components.json`;
108
+ 27 block(s). Their facts live in `../contour.components.json`;
72
109
  only the names are here, because the same figure in two files is how a document
73
110
  starts disagreeing with itself.
74
111
 
112
+ - `.c-activity-feed`
75
113
  - `.c-btn`
76
114
  - `.c-card`
77
115
  - `.c-cluster`
116
+ - `.c-code`
117
+ - `.c-eyebrow`
118
+ - `.c-feature-inspector`
119
+ - `.c-filter-pill`
78
120
  - `.c-geocoder`
79
121
  - `.c-icon-badge`
80
122
  - `.c-kbd`
81
123
  - `.c-link`
124
+ - `.c-menu`
82
125
  - `.c-panel`
83
126
  - `.c-price`
127
+ - `.c-provenance`
84
128
  - `.c-range`
85
- - `.c-scrim`
129
+ - `.c-resizable`
130
+ - `.c-saved-view`
86
131
  - `.c-section-head`
87
132
  - `.c-select`
88
133
  - `.c-shortcut`
89
- - `.c-shortcut-list`
90
- - `.c-shortcut-overlay`
91
- - `.c-shortcut-panel`
92
- - `.c-shortcut-row`
93
134
  - `.c-spatial-filter`
135
+ - `.c-split-view`
94
136
  - `.c-stack`
95
137
  - `.c-table`
96
138
  - `.c-table-wrap`
97
139
 
98
140
  ---
99
141
 
100
- Source `index.html` @ `1beb0033376e73f1` · last committed 2026-11-08T12:25:18+01:00 · no URL: the project is private until v1.0.
142
+ Source `index.html` @ `e59a15ba0fa53c75` · last committed 2026-11-29T20:19:21+01:00 · no URL: the project is private until v1.0.
package/dist/hljs.css CHANGED
@@ -1,23 +1,4 @@
1
- /* ============================================================================
2
- CONTOUR — code presentation: the highlight.js theme
3
- ----------------------------------------------------------------------------
4
- Maps highlight.js token classes onto Contour tokens, so a consumer who
5
- chooses to run highlight.js gets code that matches the system's palette in
6
- both themes. Both variants travel through light-dark().
7
-
8
- This file is deliberately NOT imported by ds.css: highlight.js is a
9
- third-party library and Contour ships zero runtime dependencies. A page
10
- that does not load highlight.js has no reason to load this sheet, and a
11
- page that does loads it after the library's own stylesheet:
12
-
13
- <link rel="stylesheet" href="src/css/ds.css" />
14
- <script src="highlight.min.js"></script>
15
- <link rel="stylesheet" href="src/css/hljs.css" />
16
-
17
- It sets colour only — never layout, never font-family (the system's mono
18
- stack already applies to <code>). The class names are the contract
19
- published in README.md under "Code presentation".
20
- ========================================================================= */
1
+ /* CONTOUR — highlight.js theme: maps highlight.js token classes onto Contour tokens in both themes; colour only, loads after highlight.js sheet. */
21
2
 
22
3
  /* Base: inherit the container's background so rows never read as highlighted. */
23
4
  .hljs {