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.
- package/README.md +244 -326
- package/dist/agent-cookbook.json +960 -0
- package/dist/agent-examples.json +65 -0
- package/dist/agent-map-wiring.json +152 -0
- package/dist/agent-rules.json +16 -0
- package/dist/build-manifest.json +344 -126
- package/dist/contour-wc-content.esm.js +1939 -0
- package/dist/contour-wc-content.esm.min.js +1 -0
- package/dist/contour-wc-core.esm.js +3724 -0
- package/dist/contour-wc-core.esm.min.js +1 -0
- package/dist/contour-wc-dashboard.esm.js +6986 -0
- package/dist/contour-wc-dashboard.esm.min.js +1 -0
- package/dist/contour-wc-data.esm.js +6572 -0
- package/dist/contour-wc-data.esm.min.js +1 -0
- package/dist/contour-wc-docs.esm.js +976 -0
- package/dist/contour-wc-docs.esm.min.js +1 -0
- package/dist/contour-wc-feedback.esm.js +1742 -0
- package/dist/contour-wc-feedback.esm.min.js +1 -0
- package/dist/contour-wc-forms.esm.js +2437 -0
- package/dist/contour-wc-forms.esm.min.js +1 -0
- package/dist/contour-wc-interaction.esm.js +1343 -0
- package/dist/contour-wc-interaction.esm.min.js +1 -0
- package/dist/contour-wc-layout.esm.js +845 -0
- package/dist/contour-wc-layout.esm.min.js +1 -0
- package/dist/contour-wc-map.esm.js +2411 -0
- package/dist/contour-wc-map.esm.min.js +1 -0
- package/dist/contour-wc-misc.esm.js +945 -0
- package/dist/contour-wc-misc.esm.min.js +1 -0
- package/dist/contour-wc-navigation.esm.js +2842 -0
- package/dist/contour-wc-navigation.esm.min.js +1 -0
- package/dist/contour-wc-ui.esm.js +6519 -0
- package/dist/contour-wc-ui.esm.min.js +1 -0
- package/dist/contour-wc.esm.js +14435 -5723
- package/dist/contour-wc.esm.min.js +1 -1
- package/dist/contour-wc.js +14436 -5725
- package/dist/contour-wc.min.js +1 -1
- package/dist/contour.a11y.json +402 -0
- package/dist/contour.code-snippets +4534 -0
- package/dist/contour.components.json +4870 -1222
- package/dist/contour.css +6672 -4711
- package/dist/contour.d.ts +753 -1085
- package/dist/contour.esm.js +440 -18
- package/dist/contour.esm.min.js +1 -1
- package/dist/contour.html-data.json +11343 -0
- package/dist/contour.js +440 -18
- package/dist/contour.min.css +1 -1
- package/dist/contour.min.js +1 -1
- package/dist/contour.react.d.ts +422 -0
- package/dist/contour.single.html +17 -0
- package/dist/contour.single.min.css +1 -0
- package/dist/contour.themes.json +56 -12
- package/dist/contour.tokens.json +1318 -1053
- package/dist/contour.vue.d.ts +420 -0
- package/dist/contour.web-types.json +11703 -0
- package/dist/custom-elements.json +36120 -0
- package/dist/docs/actions.md +16 -6
- package/dist/docs/affordances.md +21 -85
- package/dist/docs/apireference.md +9 -5
- package/dist/docs/colour.md +10 -4
- package/dist/docs/componentindex.md +9 -22
- package/dist/docs/data.md +39 -58
- package/dist/docs/docs.md +12 -7
- package/dist/docs/feedback.md +30 -12
- package/dist/docs/field.md +28 -13
- package/dist/docs/forms.md +35 -19
- package/dist/docs/index.json +70 -61
- package/dist/docs/install.md +12 -7
- package/dist/docs/landing.md +7 -4
- package/dist/docs/mapengine.md +30 -8
- package/dist/docs/motion.md +12 -6
- package/dist/docs/navigation.md +31 -7
- package/dist/docs/overlays.md +32 -25
- package/dist/docs/overview.md +3 -2
- package/dist/docs/patterns.md +20 -10
- package/dist/docs/playground.md +11 -4
- package/dist/docs/principles.md +8 -6
- package/dist/docs/recipes.md +117 -13
- package/dist/docs/space.md +10 -6
- package/dist/docs/status.md +13 -14
- package/dist/docs/surfaces.md +17 -22
- package/dist/docs/theming.md +18 -32
- package/dist/docs/type.md +12 -5
- package/dist/docs/webcomponents.md +75 -33
- package/dist/hljs.css +1 -20
- package/dist/map-chrome.mapbox.css +68 -92
- package/dist/map-chrome.maplibre.css +68 -92
- package/dist/registry/items/contour-core.json +2 -2
- package/dist/registry/items/contour-data.json +2 -2
- package/dist/registry/items/contour-docs.json +2 -2
- package/dist/registry/items/contour-landing.json +2 -2
- package/dist/registry/registry.json +8 -8
- package/dist/surfaces/contour-core.min.css +1 -1
- package/dist/surfaces/contour-data.min.css +1 -1
- package/dist/surfaces/contour-docs.min.css +1 -1
- package/dist/surfaces/contour-landing.min.css +1 -1
- package/dist/svg/icons.svg +367 -0
- package/dist/wc/behaviours.mjs +222 -192
- package/dist/wc/content.mjs +486 -142
- package/dist/wc/core.mjs +917 -395
- package/dist/wc/dashboard.mjs +252 -25
- package/dist/wc/data-chart.mjs +1333 -0
- package/dist/wc/data-export.mjs +391 -0
- package/dist/wc/data-gauge.mjs +779 -0
- package/dist/wc/data-geo.mjs +696 -0
- package/dist/wc/data-glyphs.mjs +133 -0
- package/dist/wc/data-legend.mjs +431 -0
- package/dist/wc/data-readout.mjs +227 -0
- package/dist/wc/data-series.mjs +1004 -0
- package/dist/wc/data-table.mjs +751 -0
- package/dist/wc/data.mjs +15 -3707
- package/dist/wc/docs.mjs +113 -19
- package/dist/wc/feedback.mjs +320 -116
- package/dist/wc/forms-controls.mjs +635 -0
- package/dist/wc/forms-field.mjs +547 -0
- package/dist/wc/forms-groups.mjs +347 -0
- package/dist/wc/forms-input.mjs +292 -0
- package/dist/wc/forms.mjs +10 -1122
- package/dist/wc/glyph.mjs +204 -0
- package/dist/wc/index.mjs +16 -7
- package/dist/wc/interaction.mjs +322 -75
- package/dist/wc/layout.mjs +100 -29
- package/dist/wc/map.mjs +888 -285
- package/dist/wc/misc.mjs +137 -26
- package/dist/wc/navigation-menu.mjs +735 -0
- package/dist/wc/navigation-shell.mjs +495 -0
- package/dist/wc/navigation-tree.mjs +995 -0
- package/dist/wc/navigation.mjs +9 -1636
- package/dist/wc/registration.mjs +1 -8
- package/dist/wc/shadow.mjs +285 -113
- package/dist/wc/states.mjs +75 -78
- package/dist/wc/svg.mjs +209 -34
- package/dist/wc/ui-atoms.mjs +608 -0
- package/dist/wc/ui-data.mjs +1404 -0
- package/dist/wc/ui-feedback.mjs +419 -0
- package/dist/wc/ui-inputs.mjs +1570 -0
- package/dist/wc/ui-menus.mjs +307 -0
- package/dist/wc/ui-overlays.mjs +1605 -0
- package/integrations/README.md +25 -5
- package/integrations/ai/CLAUDE.md +6 -3
- package/integrations/ai/COPILOT.md +14 -0
- package/integrations/ai/GEMINI.md +14 -0
- package/integrations/ai/WINDSURF.md +14 -0
- package/integrations/ai/v0-prompt.md +13 -1
- package/integrations/frameworks/README.md +235 -0
- package/integrations/native/README.md +0 -3
- package/integrations/native/style-dictionary.config.json +1 -1
- package/integrations/tailwind/contour-theme.css +71 -13
- package/integrations/validate-markup.mjs +172 -0
- package/package.json +103 -39
- package/dist/wc/ui.mjs +0 -3560
|
@@ -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
|
+
}
|
package/dist/agent-rules.json
CHANGED
|
@@ -221,6 +221,22 @@
|
|
|
221
221
|
]
|
|
222
222
|
}
|
|
223
223
|
]
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"id": "install-by-specifier",
|
|
227
|
+
"rule": "Import Contour by the specifier the package's `exports` map publishes (`contour-ds/contour.min.css`, `contour-ds/contour-wc.esm.js`, `contour-ds/tokens.json`, …). Never import a path under `dist/` or a fragment name the map does not define — the file may exist on disk (it is copied by `files`) and still blow up at resolution time.",
|
|
228
|
+
"why": "Four consumer-facing documents pointed at `contour-ds/css/ds.css` and `contour-ds/dist/wc/contour-wc-button.esm.min.js`, both of which the exports map refuses. Nothing but a resolver caught them, because `existsSync` on the installed package returns true for anything `files` copied.",
|
|
229
|
+
"enforcement": [
|
|
230
|
+
{
|
|
231
|
+
"gate": "tools/check-consumer-install.mjs",
|
|
232
|
+
"command": "node tools/check-consumer-install.mjs",
|
|
233
|
+
"note": "installs the generated tarball into every framework fixture and resolves each specifier the fixtures actually import",
|
|
234
|
+
"exists": true,
|
|
235
|
+
"jobs": [
|
|
236
|
+
"validate"
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
]
|
|
224
240
|
}
|
|
225
241
|
]
|
|
226
242
|
}
|