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
package/dist/docs/space.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
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 §
|
|
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
|
-
|
|
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` @ `
|
|
42
|
+
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/status.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Status & labels
|
|
2
2
|
|
|
3
|
-
Section `status` — marker `
|
|
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 §
|
|
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
|
|
16
|
-
- Empty state
|
|
17
|
-
- Skeleton
|
|
18
|
-
- Loading
|
|
19
|
-
- Web component counterparts
|
|
17
|
+
- Web components
|
|
20
18
|
|
|
21
19
|
## Blocks documented here
|
|
22
20
|
|
|
23
|
-
|
|
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-
|
|
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-
|
|
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` @ `
|
|
45
|
+
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/surfaces.md
CHANGED
|
@@ -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
|
|
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 §
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
A design system for spatial interfaces. One set of rules for three surfaces.
|
|
31
|
+
Responsive content
|
|
30
32
|
|
|
31
|
-
|
|
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
|
-
-
|
|
40
|
-
- Foundations
|
|
41
|
-
- Components
|
|
42
|
-
- Web component counterpart
|
|
42
|
+
- Web components
|
|
43
43
|
|
|
44
44
|
## Blocks documented here
|
|
45
45
|
|
|
46
|
-
|
|
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-
|
|
55
|
-
- `.c-
|
|
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-
|
|
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` @ `
|
|
67
|
+
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/theming.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
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 §
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
- Web
|
|
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
|
-
|
|
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-
|
|
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` @ `
|
|
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
|
-
#
|
|
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
|
|
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
|
-
|
|
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` @ `
|
|
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 `
|
|
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
|
-
|
|
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
|
-
|
|
13
|
+
How the element layer behaves, stated once. The panels below demonstrate each part of it; the catalogue follows.
|
|
14
14
|
|
|
15
|
-
|
|
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
|
-
|
|
17
|
+
The same table contract composes inside a stack, while an error boundary keeps a fallback local to the failed widget.
|
|
18
18
|
|
|
19
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
35
|
+
Slotted content in the shadow root.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Dialog body content.
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Loading, error, empty and skeleton rendered through the shared wireStates / renderStates helpers.
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
The §06 blocks as elements.
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
The §07 blocks as elements, with form association via ElementInternals.
|
|
44
44
|
|
|
45
|
-
|
|
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
|
-
|
|
51
|
+
Content behind the scrim.
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
The §10 blocks as elements.
|
|
52
54
|
|
|
53
|
-
|
|
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
|
-
|
|
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
|
-
-
|
|
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
|
-
|
|
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-
|
|
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` @ `
|
|
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 {
|