contour-ds 1.8.1 → 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 (147) hide show
  1. package/README.md +227 -378
  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/build-manifest.json +320 -179
  6. package/dist/contour-wc-content.esm.js +479 -3665
  7. package/dist/contour-wc-content.esm.min.js +1 -1
  8. package/dist/contour-wc-core.esm.js +3724 -0
  9. package/dist/contour-wc-core.esm.min.js +1 -0
  10. package/dist/contour-wc-dashboard.esm.js +2713 -4381
  11. package/dist/contour-wc-dashboard.esm.min.js +1 -1
  12. package/dist/contour-wc-data.esm.js +2658 -4346
  13. package/dist/contour-wc-data.esm.min.js +1 -1
  14. package/dist/contour-wc-docs.esm.js +218 -3547
  15. package/dist/contour-wc-docs.esm.min.js +1 -1
  16. package/dist/contour-wc-feedback.esm.js +483 -3658
  17. package/dist/contour-wc-feedback.esm.min.js +1 -1
  18. package/dist/contour-wc-forms.esm.js +503 -3754
  19. package/dist/contour-wc-forms.esm.min.js +1 -1
  20. package/dist/contour-wc-interaction.esm.js +379 -3616
  21. package/dist/contour-wc-interaction.esm.min.js +1 -1
  22. package/dist/contour-wc-layout.esm.js +234 -3563
  23. package/dist/contour-wc-layout.esm.min.js +1 -1
  24. package/dist/contour-wc-map.esm.js +949 -3743
  25. package/dist/contour-wc-map.esm.min.js +1 -1
  26. package/dist/contour-wc-misc.esm.js +237 -3556
  27. package/dist/contour-wc-misc.esm.min.js +1 -1
  28. package/dist/contour-wc-navigation.esm.js +2235 -5237
  29. package/dist/contour-wc-navigation.esm.min.js +1 -1
  30. package/dist/contour-wc-ui.esm.js +4638 -7128
  31. package/dist/contour-wc-ui.esm.min.js +1 -1
  32. package/dist/contour-wc.esm.js +11971 -7727
  33. package/dist/contour-wc.esm.min.js +1 -1
  34. package/dist/contour-wc.js +11971 -7727
  35. package/dist/contour-wc.min.js +1 -1
  36. package/dist/contour.a11y.json +402 -0
  37. package/dist/contour.code-snippets +96 -74
  38. package/dist/contour.components.json +2591 -741
  39. package/dist/contour.css +2624 -1888
  40. package/dist/contour.d.ts +421 -228
  41. package/dist/contour.esm.js +433 -18
  42. package/dist/contour.esm.min.js +1 -1
  43. package/dist/contour.html-data.json +1231 -199
  44. package/dist/contour.js +433 -18
  45. package/dist/contour.min.css +1 -1
  46. package/dist/contour.min.js +1 -1
  47. package/dist/contour.react.d.ts +100 -98
  48. package/dist/contour.single.html +2 -2
  49. package/dist/contour.single.min.css +1 -1
  50. package/dist/contour.themes.json +56 -12
  51. package/dist/contour.tokens.json +482 -255
  52. package/dist/contour.vue.d.ts +100 -98
  53. package/dist/contour.web-types.json +1226 -226
  54. package/dist/custom-elements.json +7649 -2237
  55. package/dist/docs/actions.md +15 -6
  56. package/dist/docs/affordances.md +18 -96
  57. package/dist/docs/apireference.md +9 -5
  58. package/dist/docs/colour.md +10 -4
  59. package/dist/docs/componentindex.md +9 -26
  60. package/dist/docs/data.md +36 -60
  61. package/dist/docs/docs.md +10 -12
  62. package/dist/docs/feedback.md +30 -12
  63. package/dist/docs/field.md +28 -13
  64. package/dist/docs/forms.md +35 -19
  65. package/dist/docs/index.json +63 -56
  66. package/dist/docs/install.md +12 -7
  67. package/dist/docs/landing.md +7 -4
  68. package/dist/docs/mapengine.md +18 -13
  69. package/dist/docs/motion.md +12 -6
  70. package/dist/docs/navigation.md +31 -7
  71. package/dist/docs/overlays.md +32 -25
  72. package/dist/docs/overview.md +3 -2
  73. package/dist/docs/patterns.md +19 -9
  74. package/dist/docs/playground.md +9 -22
  75. package/dist/docs/principles.md +8 -6
  76. package/dist/docs/recipes.md +113 -14
  77. package/dist/docs/space.md +10 -6
  78. package/dist/docs/status.md +12 -25
  79. package/dist/docs/surfaces.md +17 -22
  80. package/dist/docs/theming.md +18 -32
  81. package/dist/docs/type.md +12 -5
  82. package/dist/docs/webcomponents.md +66 -38
  83. package/dist/hljs.css +1 -20
  84. package/dist/map-chrome.mapbox.css +68 -92
  85. package/dist/map-chrome.maplibre.css +68 -92
  86. package/dist/registry/items/contour-core.json +2 -2
  87. package/dist/registry/items/contour-data.json +2 -2
  88. package/dist/registry/items/contour-docs.json +2 -2
  89. package/dist/registry/items/contour-landing.json +2 -2
  90. package/dist/registry/registry.json +8 -8
  91. package/dist/surfaces/contour-core.min.css +1 -1
  92. package/dist/surfaces/contour-data.min.css +1 -1
  93. package/dist/surfaces/contour-docs.min.css +1 -1
  94. package/dist/surfaces/contour-landing.min.css +1 -1
  95. package/dist/svg/icons.svg +367 -0
  96. package/dist/wc/behaviours.mjs +190 -148
  97. package/dist/wc/content.mjs +273 -129
  98. package/dist/wc/core.mjs +598 -395
  99. package/dist/wc/dashboard.mjs +64 -44
  100. package/dist/wc/data-chart.mjs +1333 -0
  101. package/dist/wc/data-export.mjs +391 -0
  102. package/dist/wc/data-gauge.mjs +779 -0
  103. package/dist/wc/data-geo.mjs +696 -0
  104. package/dist/wc/data-glyphs.mjs +133 -0
  105. package/dist/wc/data-legend.mjs +431 -0
  106. package/dist/wc/data-readout.mjs +227 -0
  107. package/dist/wc/data-series.mjs +1004 -0
  108. package/dist/wc/data-table.mjs +751 -0
  109. package/dist/wc/data.mjs +15 -4322
  110. package/dist/wc/docs.mjs +12 -11
  111. package/dist/wc/feedback.mjs +277 -122
  112. package/dist/wc/forms-controls.mjs +635 -0
  113. package/dist/wc/forms-field.mjs +547 -0
  114. package/dist/wc/forms-groups.mjs +347 -0
  115. package/dist/wc/forms-input.mjs +292 -0
  116. package/dist/wc/forms.mjs +10 -1751
  117. package/dist/wc/glyph.mjs +204 -0
  118. package/dist/wc/index.mjs +11 -9
  119. package/dist/wc/interaction.mjs +173 -80
  120. package/dist/wc/layout.mjs +28 -27
  121. package/dist/wc/map.mjs +743 -207
  122. package/dist/wc/misc.mjs +31 -20
  123. package/dist/wc/navigation-menu.mjs +735 -0
  124. package/dist/wc/navigation-shell.mjs +495 -0
  125. package/dist/wc/navigation-tree.mjs +995 -0
  126. package/dist/wc/navigation.mjs +9 -1905
  127. package/dist/wc/registration.mjs +1 -8
  128. package/dist/wc/shadow.mjs +206 -110
  129. package/dist/wc/states.mjs +54 -75
  130. package/dist/wc/svg.mjs +118 -47
  131. package/dist/wc/ui-atoms.mjs +608 -0
  132. package/dist/wc/ui-data.mjs +1404 -0
  133. package/dist/wc/ui-feedback.mjs +419 -0
  134. package/dist/wc/ui-inputs.mjs +1570 -0
  135. package/dist/wc/ui-menus.mjs +307 -0
  136. package/dist/wc/ui-overlays.mjs +1605 -0
  137. package/integrations/README.md +23 -5
  138. package/integrations/ai/CLAUDE.md +3 -0
  139. package/integrations/ai/COPILOT.md +14 -0
  140. package/integrations/ai/GEMINI.md +14 -0
  141. package/integrations/ai/WINDSURF.md +14 -0
  142. package/integrations/ai/v0-prompt.md +13 -1
  143. package/integrations/native/README.md +0 -3
  144. package/integrations/tailwind/contour-theme.css +66 -7
  145. package/integrations/validate-markup.mjs +172 -0
  146. package/package.json +77 -42
  147. package/dist/wc/ui.mjs +0 -5072
@@ -0,0 +1,65 @@
1
+ {
2
+ "version": "1.0",
3
+ "name": "contour-agent-examples",
4
+ "audience": "an agent that has picked a block and needs working markup",
5
+ "statement": "Clean, copy-pasteable markup for the blocks an agent reaches for most: real classes, real attributes, the required ARIA, no editor placeholders. Every example is validated by the gate against the shipped CSS and the component contract (every class must resolve), so an example cannot teach a class the system does not style. The full element/state/token slice for a block is in contour.components.json; this file is the last mile from 'which block' to 'working markup'.",
6
+ "source": "tools/lib/examples.mjs",
7
+ "examples": [
8
+ {
9
+ "block": "c-btn",
10
+ "html": "<button class=\"c-btn c-btn--primary\" type=\"button\">Compute route</button>\n<button class=\"c-btn c-btn--icon\" type=\"button\" aria-label=\"Refresh results\">\n <svg aria-hidden=\"true\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M8 2a6 6 0 1 0 6 6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"/></svg>\n</button>"
11
+ },
12
+ {
13
+ "block": "c-kpi",
14
+ "html": "<div class=\"c-kpi\">\n <div class=\"c-kpi__value\">42</div>\n <div class=\"c-kpi__label\">Routes matched</div>\n</div>"
15
+ },
16
+ {
17
+ "block": "c-panel",
18
+ "html": "<section class=\"c-panel\">\n <h3 class=\"c-panel__title\">Network status</h3>\n <div class=\"c-panel__body\">\n <p>All corridors nominal.</p>\n </div>\n</section>"
19
+ },
20
+ {
21
+ "block": "c-table",
22
+ "html": "<div class=\"c-table-wrap\">\n <table class=\"c-table\">\n <caption class=\"visually-hidden\">Road segments</caption>\n <thead><tr><th scope=\"col\">Segment</th><th scope=\"col\">Length</th></tr></thead>\n <tbody><tr><td>A1</td><td>12.4 km</td></tr></tbody>\n </table>\n</div>"
23
+ },
24
+ {
25
+ "block": "c-dialog",
26
+ "html": "<dialog class=\"c-dialog\" aria-labelledby=\"dlg-title\">\n <div class=\"c-dialog__head\"><h2 class=\"c-dialog__title\" id=\"dlg-title\">Confirm reroute</h2></div>\n <div class=\"c-dialog__body\"><p>Reroute 8 vehicles?</p></div>\n <div class=\"c-dialog__foot\">\n <button class=\"c-btn c-btn--secondary\" type=\"button\">Cancel</button>\n <button class=\"c-btn c-btn--primary\" type=\"button\">Reroute</button>\n </div>\n</dialog>"
27
+ },
28
+ {
29
+ "block": "c-field",
30
+ "html": "<div class=\"c-field\">\n <label class=\"c-field__label\" for=\"origin\">Origin</label>\n <input class=\"c-input\" id=\"origin\" name=\"origin\" type=\"text\" placeholder=\"Lat, lon\" aria-describedby=\"origin-hint\">\n <p class=\"c-field__hint\" id=\"origin-hint\">Decimal degrees, WGS84.</p>\n</div>"
31
+ },
32
+ {
33
+ "block": "c-alert",
34
+ "html": "<div class=\"c-alert c-alert--info\" role=\"status\">\n <p>Elevation tiles are loading.</p>\n</div>"
35
+ },
36
+ {
37
+ "block": "c-tabs",
38
+ "html": "<div class=\"c-tabs\">\n <div class=\"c-tabs__list\" role=\"tablist\" aria-label=\"Layers\">\n <button class=\"c-tabs__tab\" role=\"tab\" aria-selected=\"true\" type=\"button\">Roads</button>\n <button class=\"c-tabs__tab\" role=\"tab\" aria-selected=\"false\" type=\"button\">Elevation</button>\n </div>\n <div class=\"c-tabs__panel\" role=\"tabpanel\">Road layer</div>\n</div>"
39
+ },
40
+ {
41
+ "block": "c-badge",
42
+ "html": "<span class=\"c-badge c-badge--success\">Live</span>"
43
+ },
44
+ {
45
+ "block": "c-progress",
46
+ "html": "<div class=\"c-progress\" role=\"progressbar\" aria-valuenow=\"60\" aria-valuemin=\"0\" aria-valuemax=\"100\" aria-label=\"Tile load\">\n <div class=\"c-progress__bar\" style=\"inline-size:60%\"></div>\n</div>"
47
+ },
48
+ {
49
+ "block": "c-toast",
50
+ "html": "<div class=\"c-toast\" role=\"status\" aria-live=\"polite\">\n <span class=\"c-toast__text\">Route computed.</span>\n</div>"
51
+ },
52
+ {
53
+ "block": "c-map-area",
54
+ "html": "<contour-map-area id=\"map\" controls=\"scale,zoom\">\n <div id=\"map-container\"></div>\n <contour-coordinate slot=\"bottom-left\" value=\"{ lat: 51.5, lon: -0.12, zoom: 12 }\"></contour-coordinate>\n <contour-scale-bar slot=\"bottom-left\" units=\"metric\"></contour-scale-bar>\n <contour-map-footer slot=\"bottom\"></contour-map-footer>\n</contour-map-area>"
55
+ },
56
+ {
57
+ "block": "c-layer-panel",
58
+ "html": "<contour-layer-panel label=\"Layers\" items='[{\"id\":\"roads\",\"name\":\"Roads\",\"visible\":true}]'></contour-layer-panel>"
59
+ },
60
+ {
61
+ "block": "c-coordinate",
62
+ "html": "<contour-coordinate value=\"{ lat: 51.5, lon: -0.12, zoom: 12 }\" precision=\"4\"></contour-coordinate>"
63
+ }
64
+ ]
65
+ }
@@ -0,0 +1,152 @@
1
+ {
2
+ "version": "1.0",
3
+ "name": "contour-map-wiring",
4
+ "audience": "an agent wiring Contour map chrome to a real map engine",
5
+ "statement": "How Contour's map chrome attaches to an engine. Contour stops at chrome (LIBRESHIP.md §1): the engine, tile pipeline and projection stay consumer-owned. The seam is contour-map-area.attachMap(instance); after that, chrome listens to the engine's viewport and forwards requests. This file gives, per vendor (MapLibre / Mapbox / Leaflet), the mount call, the engine event that feeds each contour:* event, the chrome blocks to mount and the tokens that theme them. Every event, block and token is validated against CONTOUR_EVENTS, the component contract and the token census at build time. No counts are stated here.",
6
+ "source": "tools/lib/map-wiring.mjs",
7
+ "seam": {
8
+ "host": "c-map-area",
9
+ "method": "attachMap(mapInstance)",
10
+ "notes": [
11
+ "Contour chrome is engine-agnostic: attachMap() is duck-typed, so the same chrome works across MapLibre, Mapbox and Leaflet.",
12
+ "Put chrome in the host's slots (top-right, bottom-left, bottom); the engine container is the light-DOM child."
13
+ ]
14
+ },
15
+ "vendors": [
16
+ {
17
+ "id": "maplibre",
18
+ "label": "MapLibre GL JS",
19
+ "mount": "new maplibregl.Map({ container, style, center, zoom })",
20
+ "events": [
21
+ {
22
+ "event": "contour:map-attach",
23
+ "engine": "map.on('load', () => mapArea.attachMap(map))"
24
+ },
25
+ {
26
+ "event": "contour:map-viewport",
27
+ "engine": "map.on('moveend', () => …) — feed center/zoom/bearing to the chrome"
28
+ },
29
+ {
30
+ "event": "contour:bearing",
31
+ "engine": "map.on('rotateend', () => …)"
32
+ },
33
+ {
34
+ "event": "contour:zoom",
35
+ "engine": "map.on('zoomend', () => …)"
36
+ },
37
+ {
38
+ "event": "contour:select",
39
+ "engine": "map.on('click', layerId, (e) => …) — emit { index, label }"
40
+ },
41
+ {
42
+ "event": "contour:map-popup-reposition",
43
+ "engine": "map.on('move', () => popup.reposition())"
44
+ }
45
+ ],
46
+ "chrome": [
47
+ "c-scale-bar",
48
+ "c-coordinate",
49
+ "c-map-footer",
50
+ "c-map-popup"
51
+ ],
52
+ "tokens": [
53
+ "--color-surface-1",
54
+ "--color-border",
55
+ "--z-tooltip"
56
+ ],
57
+ "notes": [
58
+ "Contour chrome is engine-agnostic: attachMap() takes the MapLibre instance and chrome queries getViewport() / forwards zoom/bearing without a hard dependency."
59
+ ]
60
+ },
61
+ {
62
+ "id": "mapbox",
63
+ "label": "Mapbox GL JS",
64
+ "mount": "new mapboxgl.Map({ container, style, center, zoom, accessToken })",
65
+ "events": [
66
+ {
67
+ "event": "contour:map-attach",
68
+ "engine": "map.on('load', () => mapArea.attachMap(map))"
69
+ },
70
+ {
71
+ "event": "contour:map-viewport",
72
+ "engine": "map.on('moveend', () => …)"
73
+ },
74
+ {
75
+ "event": "contour:bearing",
76
+ "engine": "map.on('rotateend', () => …)"
77
+ },
78
+ {
79
+ "event": "contour:zoom",
80
+ "engine": "map.on('zoomend', () => …)"
81
+ },
82
+ {
83
+ "event": "contour:select",
84
+ "engine": "map.on('click', layerId, (e) => …)"
85
+ },
86
+ {
87
+ "event": "contour:map-popup-reposition",
88
+ "engine": "map.on('move', () => popup.reposition())"
89
+ }
90
+ ],
91
+ "chrome": [
92
+ "c-scale-bar",
93
+ "c-coordinate",
94
+ "c-map-footer",
95
+ "c-map-popup"
96
+ ],
97
+ "tokens": [
98
+ "--color-surface-1",
99
+ "--color-border",
100
+ "--z-tooltip"
101
+ ],
102
+ "notes": [
103
+ "Mapbox GL JS shares MapLibre's event names (moveend/rotateend/zoomend/click), so the same chrome wiring applies; only the constructor and accessToken differ."
104
+ ]
105
+ },
106
+ {
107
+ "id": "leaflet",
108
+ "label": "Leaflet",
109
+ "mount": "L.map(container, { center, zoom })",
110
+ "events": [
111
+ {
112
+ "event": "contour:map-attach",
113
+ "engine": "map.whenReady(() => mapArea.attachMap(map))"
114
+ },
115
+ {
116
+ "event": "contour:map-viewport",
117
+ "engine": "map.on('moveend', () => …)"
118
+ },
119
+ {
120
+ "event": "contour:bearing",
121
+ "engine": "map.on('rotateend', () => …) — Leaflet needs a rotate plugin for bearing"
122
+ },
123
+ {
124
+ "event": "contour:zoom",
125
+ "engine": "map.on('zoomend', () => …)"
126
+ },
127
+ {
128
+ "event": "contour:select",
129
+ "engine": "map.on('click', (e) => …) or layer.on('click', …)"
130
+ },
131
+ {
132
+ "event": "contour:map-popup-reposition",
133
+ "engine": "map.on('move', () => popup.update())"
134
+ }
135
+ ],
136
+ "chrome": [
137
+ "c-scale-bar",
138
+ "c-coordinate",
139
+ "c-map-footer",
140
+ "c-map-popup"
141
+ ],
142
+ "tokens": [
143
+ "--color-surface-1",
144
+ "--color-border",
145
+ "--z-tooltip"
146
+ ],
147
+ "notes": [
148
+ "Leaflet is raster/vector (no WebGL); bearing needs a rotate plugin. The chrome contract is identical — attachMap() is duck-typed."
149
+ ]
150
+ }
151
+ ]
152
+ }