@adia-ai/web-components 0.7.3 → 0.7.5
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/CHANGELOG.md +31 -0
- package/components/accordion/accordion.css +2 -2
- package/components/action-list/action-list.css +2 -2
- package/components/agent-artifact/agent-artifact.css +31 -31
- package/components/agent-feedback-bar/agent-feedback-bar.css +10 -10
- package/components/agent-questions/agent-questions.css +59 -57
- package/components/agent-reasoning/agent-reasoning.css +54 -54
- package/components/agent-suggestions/agent-suggestions.css +4 -4
- package/components/agent-trace/agent-trace.css +53 -53
- package/components/alert/alert.css +53 -53
- package/components/avatar/avatar.css +27 -27
- package/components/badge/badge.css +56 -53
- package/components/block/block.css +16 -16
- package/components/blockquote/blockquote.css +16 -16
- package/components/breadcrumb/breadcrumb.css +23 -23
- package/components/button/button.css +123 -101
- package/components/calendar-grid/calendar-grid.css +95 -92
- package/components/calendar-picker/calendar-picker.css +141 -139
- package/components/canvas/canvas.css +12 -12
- package/components/card/card.css +83 -83
- package/components/chart/chart.css +218 -218
- package/components/chart-legend/chart-legend.css +26 -26
- package/components/check/check.css +40 -40
- package/components/code/code.css +125 -125
- package/components/col/col.css +15 -15
- package/components/color-picker/color-picker.css +55 -55
- package/components/combobox/combobox.css +64 -62
- package/components/command/command.css +91 -91
- package/components/context-menu/context-menu.css +1 -1
- package/components/date-range-picker/date-range-picker.css +59 -59
- package/components/datetime-picker/datetime-picker.css +25 -25
- package/components/demo-toggle/demo-toggle.css +27 -27
- package/components/description-list/description-list.css +18 -18
- package/components/divider/divider.css +24 -24
- package/components/embed/embed.css +6 -6
- package/components/empty-state/empty-state.css +29 -29
- package/components/feed/feed.css +12 -12
- package/components/field/field.css +28 -28
- package/components/field/field.test.js +2 -2
- package/components/fields/fields.css +5 -5
- package/components/grid/grid.a2ui.json +10 -0
- package/components/grid/grid.css +23 -5
- package/components/grid/grid.d.ts +4 -0
- package/components/grid/grid.yaml +13 -0
- package/components/heatmap/heatmap.css +61 -61
- package/components/icon/icon.css +12 -12
- package/components/image/image.css +14 -14
- package/components/inline-edit/inline-edit.css +16 -16
- package/components/inline-message/inline-message.css +16 -16
- package/components/input/input.css +69 -66
- package/components/inspector/inspector.css +6 -6
- package/components/integration-card/integration-card.css +41 -41
- package/components/integration-card/integration-card.test.js +4 -4
- package/components/kbd/kbd.css +47 -40
- package/components/link/link.css +12 -12
- package/components/list/list.css +8 -8
- package/components/list-window/list-window.css +10 -10
- package/components/loading-overlay/loading-overlay.css +17 -18
- package/components/loading-overlay/loading-overlay.test.js +8 -8
- package/components/mark/mark.css +16 -16
- package/components/menu/menu.css +9 -9
- package/components/modal/modal.class.js +5 -9
- package/components/modal/modal.css +43 -43
- package/components/nav/nav.css +40 -40
- package/components/nav-group/nav-group.css +54 -54
- package/components/nav-item/nav-item.css +44 -44
- package/components/noodles/noodles.css +31 -31
- package/components/number-format/number-format.css +4 -4
- package/components/option-card/option-card.css +70 -70
- package/components/otp-input/otp-input.css +29 -29
- package/components/page/page.a2ui.json +1 -1
- package/components/page/page.css +27 -27
- package/components/page/page.d.ts +1 -1
- package/components/page/page.yaml +1 -1
- package/components/pagination/pagination.css +6 -6
- package/components/pane/pane.css +57 -57
- package/components/password-strength/password-strength.css +32 -32
- package/components/pipeline-status/pipeline-status.css +67 -67
- package/components/popover/popover.css +11 -11
- package/components/preview/preview.css +21 -21
- package/components/progress/progress.css +23 -23
- package/components/progress-row/progress-row.css +17 -17
- package/components/qr-code/qr-code.css +4 -4
- package/components/radio/radio.css +39 -39
- package/components/range/range.css +58 -55
- package/components/rating/rating.css +28 -28
- package/components/relative-time/relative-time.css +6 -6
- package/components/richtext/richtext.css +133 -133
- package/components/row/row.css +19 -19
- package/components/search/search.css +5 -5
- package/components/segment/segment.css +29 -24
- package/components/segmented/segmented.css +30 -25
- package/components/select/select.css +95 -93
- package/components/skeleton/skeleton.css +14 -14
- package/components/skip-nav/skip-nav.css +4 -4
- package/components/slider/slider.css +61 -61
- package/components/spinner/spinner.css +40 -40
- package/components/spinner/spinner.test.js +10 -12
- package/components/stack/stack.css +11 -11
- package/components/stat/stat.css +27 -27
- package/components/step-progress/step-progress.css +20 -20
- package/components/stepper/stepper.css +29 -29
- package/components/stream/stream.css +12 -12
- package/components/swatch/swatch.css +68 -68
- package/components/swiper/swiper.class.js +5 -12
- package/components/swiper/swiper.css +57 -57
- package/components/switch/switch.css +53 -53
- package/components/table/table.css +166 -163
- package/components/table-toolbar/table-toolbar.css +33 -33
- package/components/tabs/tabs.css +54 -51
- package/components/tag/tag.css +74 -71
- package/components/tag/tag.test.js +14 -14
- package/components/tags-input/tags-input.css +51 -49
- package/components/text/text.css +44 -44
- package/components/textarea/textarea.css +49 -46
- package/components/time-picker/time-picker.css +47 -47
- package/components/timeline/timeline.css +54 -54
- package/components/toast/toast.css +58 -58
- package/components/toc/toc.css +28 -28
- package/components/toggle-group/toggle-group.css +9 -6
- package/components/toggle-scheme/toggle-scheme.css +2 -2
- package/components/toolbar/toolbar.css +18 -18
- package/components/tooltip/tooltip.css +2 -2
- package/components/tour/tour.css +4 -4
- package/components/tree/tree.css +37 -37
- package/components/upload/upload.css +49 -49
- package/dist/host.min.css +1 -0
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +2 -2
- package/package.json +1 -1
- package/styles/api/text.css +9 -2
- package/styles/foundation/space.css +19 -18
- package/styles/host.css +48 -0
- package/styles/prose.css +187 -173
- package/styles/type/scale.css +6 -0
- package/styles/typography.css +10 -5
- package/styles/verse.css +122 -0
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
@scope (chart-legend-ui) {
|
|
2
2
|
:where(:scope) {
|
|
3
3
|
/* ── Layout ── */
|
|
4
|
-
--chart-legend-gap
|
|
5
|
-
--chart-legend-row-gap
|
|
6
|
-
--chart-legend-py
|
|
7
|
-
--chart-legend-px
|
|
4
|
+
--chart-legend-gap: var(--a-space-2);
|
|
5
|
+
--chart-legend-row-gap: var(--a-space-1);
|
|
6
|
+
--chart-legend-py: var(--a-space-1);
|
|
7
|
+
--chart-legend-px: 0;
|
|
8
8
|
|
|
9
9
|
/* ── Swatch ── */
|
|
10
|
-
--chart-legend-swatch-size
|
|
11
|
-
--chart-legend-line-w
|
|
10
|
+
--chart-legend-swatch-size: var(--a-space-2-5);
|
|
11
|
+
--chart-legend-line-w: 2px;
|
|
12
12
|
|
|
13
13
|
/* ── Typography ── */
|
|
14
|
-
--chart-legend-font-size
|
|
15
|
-
--chart-legend-fg
|
|
16
|
-
--chart-legend-fg-inactive
|
|
14
|
+
--chart-legend-font-size: var(--a-ui-tiny);
|
|
15
|
+
--chart-legend-fg: var(--a-fg-subtle);
|
|
16
|
+
--chart-legend-fg-inactive: var(--a-fg-muted);
|
|
17
17
|
|
|
18
18
|
/* ── Interaction ── */
|
|
19
|
-
--chart-legend-row-radius
|
|
20
|
-
--chart-legend-row-hover
|
|
21
|
-
--chart-legend-row-fg-hover
|
|
19
|
+
--chart-legend-row-radius: var(--a-radius-sm);
|
|
20
|
+
--chart-legend-row-hover: var(--a-canvas-2);
|
|
21
|
+
--chart-legend-row-fg-hover: var(--a-fg);
|
|
22
22
|
|
|
23
23
|
/* ── Focus ── */
|
|
24
|
-
--chart-legend-focus-ring
|
|
24
|
+
--chart-legend-focus-ring: var(--a-focus-ring);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
:scope {
|
|
28
28
|
box-sizing: border-box;
|
|
29
29
|
display: flex;
|
|
30
30
|
flex-wrap: wrap;
|
|
31
|
-
gap: var(--chart-legend-gap
|
|
32
|
-
padding: var(--chart-legend-py
|
|
33
|
-
font-size: var(--chart-legend-font-size
|
|
34
|
-
color: var(--chart-legend-fg
|
|
31
|
+
gap: var(--chart-legend-gap);
|
|
32
|
+
padding: var(--chart-legend-py) var(--chart-legend-px);
|
|
33
|
+
font-size: var(--chart-legend-font-size);
|
|
34
|
+
color: var(--chart-legend-fg);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/* Position variants — drive flex-direction. DOM placement still wins for
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
font-size, line-height) comes from badge-ui itself. */
|
|
56
56
|
badge-ui[data-row] {
|
|
57
57
|
--badge-bg: transparent;
|
|
58
|
-
--badge-fg: var(--chart-legend-fg
|
|
59
|
-
--badge-radius: var(--chart-legend-row-radius
|
|
58
|
+
--badge-fg: var(--chart-legend-fg);
|
|
59
|
+
--badge-radius: var(--chart-legend-row-radius);
|
|
60
60
|
--badge-px: var(--a-space-1);
|
|
61
|
-
--badge-py: var(--chart-legend-py
|
|
62
|
-
--badge-gap: var(--chart-legend-row-gap
|
|
63
|
-
--badge-font-size: var(--chart-legend-font-size
|
|
61
|
+
--badge-py: var(--chart-legend-py);
|
|
62
|
+
--badge-gap: var(--chart-legend-row-gap);
|
|
63
|
+
--badge-font-size: var(--chart-legend-font-size);
|
|
64
64
|
cursor: pointer;
|
|
65
65
|
transition: background var(--a-duration-fast) var(--a-easing),
|
|
66
66
|
color var(--a-duration-fast) var(--a-easing);
|
|
@@ -72,19 +72,19 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
badge-ui[data-row][role="button"]:hover {
|
|
75
|
-
--badge-bg: var(--chart-legend-row-hover
|
|
76
|
-
--badge-fg: var(--chart-legend-row-fg-hover
|
|
75
|
+
--badge-bg: var(--chart-legend-row-hover);
|
|
76
|
+
--badge-fg: var(--chart-legend-row-fg-hover);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
badge-ui[data-row][role="button"]:focus-visible {
|
|
80
80
|
outline: none;
|
|
81
|
-
box-shadow: var(--chart-legend-focus-ring
|
|
81
|
+
box-shadow: var(--chart-legend-focus-ring);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/* Inactive (toggled-off) rows — dim the swatch + fade label. Drives
|
|
85
85
|
badge-ui's --badge-fg so the label fades alongside the swatch. */
|
|
86
86
|
badge-ui[data-row]:not([data-active]) {
|
|
87
|
-
--badge-fg: var(--chart-legend-fg-inactive
|
|
87
|
+
--badge-fg: var(--chart-legend-fg-inactive);
|
|
88
88
|
}
|
|
89
89
|
badge-ui[data-row]:not([data-active]) swatch-ui {
|
|
90
90
|
opacity: 0.4;
|
|
@@ -4,63 +4,63 @@
|
|
|
4
4
|
Safari leaves the visual stuck — selectors moved out as plain
|
|
5
5
|
`tagname[attr]` rules. See docs/BROWSER-COMPAT.md §3a. */
|
|
6
6
|
check-ui:not([disabled]):hover [slot="box"] {
|
|
7
|
-
border-color: var(--check-border-hover
|
|
8
|
-
background: var(--check-bg-hover
|
|
7
|
+
border-color: var(--check-border-hover);
|
|
8
|
+
background: var(--check-bg-hover);
|
|
9
9
|
}
|
|
10
10
|
check-ui[checked]:not([disabled]):hover [slot="box"],
|
|
11
11
|
check-ui[indeterminate]:not([disabled]):hover [slot="box"] {
|
|
12
|
-
background: var(--check-bg-checked-hover
|
|
13
|
-
border-color: var(--check-bg-checked-hover
|
|
12
|
+
background: var(--check-bg-checked-hover);
|
|
13
|
+
border-color: var(--check-bg-checked-hover);
|
|
14
14
|
}
|
|
15
15
|
check-ui[checked] [slot="box"],
|
|
16
16
|
check-ui[indeterminate] [slot="box"] {
|
|
17
|
-
background: var(--check-bg-checked
|
|
18
|
-
border-color: var(--check-border-checked
|
|
17
|
+
background: var(--check-bg-checked);
|
|
18
|
+
border-color: var(--check-border-checked);
|
|
19
19
|
}
|
|
20
20
|
check-ui[checked] {
|
|
21
|
-
--_icon-w: calc(var(--check-size
|
|
22
|
-
--_icon-h: calc(var(--check-size
|
|
23
|
-
--_icon-border: solid var(--check-fg-checked
|
|
24
|
-
--_icon-bw: 0 calc(var(--check-size
|
|
21
|
+
--_icon-w: calc(var(--check-size) * 0.3);
|
|
22
|
+
--_icon-h: calc(var(--check-size) * 0.55);
|
|
23
|
+
--_icon-border: solid var(--check-fg-checked);
|
|
24
|
+
--_icon-bw: 0 calc(var(--check-size) * 0.12) calc(var(--check-size) * 0.12) 0;
|
|
25
25
|
--_icon-transform: rotate(45deg) translate(-1px, -1px);
|
|
26
26
|
}
|
|
27
27
|
check-ui[indeterminate] {
|
|
28
|
-
--_dash-bg: var(--check-fg-checked
|
|
29
|
-
--_icon-w: calc(var(--check-size
|
|
30
|
-
--_icon-h: calc(var(--check-size
|
|
28
|
+
--_dash-bg: var(--check-fg-checked);
|
|
29
|
+
--_icon-w: calc(var(--check-size) * 0.5);
|
|
30
|
+
--_icon-h: calc(var(--check-size) * 0.12);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
@scope (check-ui) {
|
|
34
34
|
:where(:scope) {
|
|
35
35
|
/* ── Tokens ── (size scales with universal [size] attribute via --a-toggle-size) */
|
|
36
|
-
--check-size
|
|
37
|
-
--check-gap
|
|
38
|
-
--check-font-size
|
|
39
|
-
--check-radius
|
|
36
|
+
--check-size: var(--a-toggle-size);
|
|
37
|
+
--check-gap: var(--a-space-2);
|
|
38
|
+
--check-font-size: var(--a-ui-size);
|
|
39
|
+
--check-radius: min(var(--a-radius-md), var(--a-space-1-5));
|
|
40
40
|
|
|
41
41
|
/* ── State: default ── */
|
|
42
|
-
--check-bg
|
|
43
|
-
--check-border
|
|
44
|
-
--check-border-hover
|
|
42
|
+
--check-bg: var(--a-ui-bg);
|
|
43
|
+
--check-border: var(--a-ui-border);
|
|
44
|
+
--check-border-hover: var(--a-fg-subtle);
|
|
45
45
|
|
|
46
46
|
/* ── Transitions ── */
|
|
47
|
-
--check-duration
|
|
48
|
-
--check-easing
|
|
47
|
+
--check-duration: var(--a-duration-fast);
|
|
48
|
+
--check-easing: var(--a-easing);
|
|
49
49
|
|
|
50
50
|
/* ── Focus ── */
|
|
51
|
-
--check-focus-ring
|
|
51
|
+
--check-focus-ring: var(--a-focus-ring);
|
|
52
52
|
|
|
53
53
|
/* ── State: default hover ── */
|
|
54
|
-
--check-bg-hover
|
|
54
|
+
--check-bg-hover: var(--a-bg-muted);
|
|
55
55
|
|
|
56
56
|
/* ── State: checked ── */
|
|
57
|
-
--check-bg-checked
|
|
58
|
-
--check-border-checked
|
|
59
|
-
--check-fg-checked
|
|
60
|
-
--check-bg-checked-hover
|
|
57
|
+
--check-bg-checked: var(--a-primary);
|
|
58
|
+
--check-border-checked: var(--a-primary);
|
|
59
|
+
--check-fg-checked: var(--a-chrome-light);
|
|
60
|
+
--check-bg-checked-hover: var(--a-primary-hover);
|
|
61
61
|
|
|
62
62
|
/* ── State: disabled ── */
|
|
63
|
-
--check-fg-disabled
|
|
63
|
+
--check-fg-disabled: var(--a-ui-text-disabled);
|
|
64
64
|
|
|
65
65
|
/* ── Check icon (CSS border trick, no SVG) ── */
|
|
66
66
|
--_icon-w: 0;
|
|
@@ -81,28 +81,28 @@ check-ui[indeterminate] {
|
|
|
81
81
|
box-sizing: border-box;
|
|
82
82
|
display: inline-flex;
|
|
83
83
|
align-items: center;
|
|
84
|
-
gap: var(--check-gap
|
|
84
|
+
gap: var(--check-gap);
|
|
85
85
|
cursor: pointer;
|
|
86
86
|
user-select: none;
|
|
87
|
-
font-size: var(--check-font-size
|
|
87
|
+
font-size: var(--check-font-size);
|
|
88
88
|
outline: none;
|
|
89
89
|
}
|
|
90
|
-
:scope[disabled] { cursor: not-allowed; color: var(--check-fg-disabled
|
|
90
|
+
:scope[disabled] { cursor: not-allowed; color: var(--check-fg-disabled); }
|
|
91
91
|
|
|
92
92
|
/* Box */
|
|
93
93
|
[slot="box"] {
|
|
94
94
|
flex-shrink: 0;
|
|
95
|
-
width: var(--check-size
|
|
96
|
-
height: var(--check-size
|
|
97
|
-
border: 1.5px solid var(--check-border
|
|
98
|
-
border-radius: var(--check-radius
|
|
99
|
-
background: var(--check-bg
|
|
95
|
+
width: var(--check-size);
|
|
96
|
+
height: var(--check-size);
|
|
97
|
+
border: 1.5px solid var(--check-border);
|
|
98
|
+
border-radius: var(--check-radius);
|
|
99
|
+
background: var(--check-bg);
|
|
100
100
|
display: inline-flex;
|
|
101
101
|
align-items: center;
|
|
102
102
|
justify-content: center;
|
|
103
103
|
transition:
|
|
104
|
-
background var(--check-duration
|
|
105
|
-
border-color var(--check-duration
|
|
104
|
+
background var(--check-duration) var(--check-easing),
|
|
105
|
+
border-color var(--check-duration) var(--check-easing);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/* Icon (checkmark or dash) */
|
|
@@ -123,7 +123,7 @@ check-ui[indeterminate] {
|
|
|
123
123
|
:scope[label]::after { content: attr(label); }
|
|
124
124
|
|
|
125
125
|
/* Focus */
|
|
126
|
-
:scope:focus-visible [slot="box"] { box-shadow: var(--check-focus-ring
|
|
126
|
+
:scope:focus-visible [slot="box"] { box-shadow: var(--check-focus-ring); }
|
|
127
127
|
|
|
128
128
|
/* Size handled by universal [size] attribute system. */
|
|
129
129
|
}
|
package/components/code/code.css
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
1
|
@scope (code-ui) {
|
|
2
2
|
:where(:scope) {
|
|
3
3
|
/* ── Layout ── */
|
|
4
|
-
--code-px
|
|
5
|
-
--code-py
|
|
6
|
-
--code-radius
|
|
7
|
-
--code-radius-sm
|
|
8
|
-
--code-copy-px
|
|
9
|
-
--code-copy-py
|
|
10
|
-
--code-lint-marker-w
|
|
4
|
+
--code-px: var(--a-space-3);
|
|
5
|
+
--code-py: var(--a-space-2);
|
|
6
|
+
--code-radius: var(--a-radius-md);
|
|
7
|
+
--code-radius-sm: var(--a-radius-sm);
|
|
8
|
+
--code-copy-px: var(--a-space-1);
|
|
9
|
+
--code-copy-py: var(--a-space-0-5);
|
|
10
|
+
--code-lint-marker-w: 3px; /* Vertical lint-marker rule; intrinsic measurement; no --a-space-* equivalent at this width. */
|
|
11
11
|
|
|
12
12
|
/* ── Colors ── */
|
|
13
|
-
--code-bg
|
|
14
|
-
--code-fg
|
|
15
|
-
--code-border
|
|
16
|
-
--code-header-bg
|
|
17
|
-
--code-header-fg
|
|
18
|
-
--code-copy-hover-bg
|
|
19
|
-
--code-copy-hover-fg
|
|
13
|
+
--code-bg: var(--a-bg);
|
|
14
|
+
--code-fg: var(--a-fg);
|
|
15
|
+
--code-border: var(--a-border-subtle);
|
|
16
|
+
--code-header-bg: var(--a-bg-scrim);
|
|
17
|
+
--code-header-fg: var(--a-fg-muted);
|
|
18
|
+
--code-copy-hover-bg: var(--a-bg-muted);
|
|
19
|
+
--code-copy-hover-fg: var(--a-fg);
|
|
20
20
|
|
|
21
21
|
/* ── Typography ── */
|
|
22
|
-
--code-font
|
|
23
|
-
--code-font-size
|
|
24
|
-
--code-header-font
|
|
22
|
+
--code-font: var(--a-font-family-code);
|
|
23
|
+
--code-font-size: var(--a-ui-sm);
|
|
24
|
+
--code-header-font: var(--a-ui-sm);
|
|
25
25
|
|
|
26
26
|
/* ── Transition ── */
|
|
27
|
-
--code-duration
|
|
28
|
-
--code-easing
|
|
27
|
+
--code-duration: var(--a-duration-fast);
|
|
28
|
+
--code-easing: var(--a-easing);
|
|
29
29
|
|
|
30
30
|
/* ── Editor chrome (CodeMirror 6) ──
|
|
31
31
|
Active only when `[language]` triggers the CM mount. Still safe
|
|
32
32
|
to emit in read-only mode; unused until `.cm-editor` is in the
|
|
33
33
|
DOM. See docs/specs/code-editor.md §6. */
|
|
34
|
-
--code-gutter-bg
|
|
35
|
-
--code-gutter-fg
|
|
34
|
+
--code-gutter-bg: var(--a-bg-subtle);
|
|
35
|
+
--code-gutter-fg: var(--a-fg-muted);
|
|
36
36
|
/* Transparency-mixing in oklab — Safari < 18 has an OKLCH bug where
|
|
37
37
|
the transparent operand's hue resolves to 0, red-shifting the mix.
|
|
38
38
|
oklab is hue-agnostic and visually identical in fixed engines. */
|
|
39
|
-
--code-active-line-bg
|
|
40
|
-
--code-selection-bg
|
|
41
|
-
--code-selection-match
|
|
42
|
-
--code-cursor
|
|
43
|
-
--code-focus-ring
|
|
39
|
+
--code-active-line-bg: color-mix(in oklab, var(--a-accent-muted) 40%, transparent);
|
|
40
|
+
--code-selection-bg: color-mix(in oklab, var(--a-accent-muted) 60%, transparent);
|
|
41
|
+
--code-selection-match: color-mix(in oklab, var(--a-accent-muted) 30%, transparent);
|
|
42
|
+
--code-cursor: var(--a-accent-strong);
|
|
43
|
+
--code-focus-ring: var(--a-focus-ring);
|
|
44
44
|
|
|
45
45
|
/* ── Syntax highlight tokens ──
|
|
46
46
|
Map Lezer/CodeMirror highlight tag names to AdiaUI semantic
|
|
47
47
|
tokens. Overridable per-instance by setting `--code-tok-*` on
|
|
48
48
|
any ancestor. See docs/specs/code-editor.md §6.3 for the tag →
|
|
49
49
|
class → role map. */
|
|
50
|
-
--code-tok-comment
|
|
51
|
-
--code-tok-keyword
|
|
52
|
-
--code-tok-string
|
|
53
|
-
--code-tok-number
|
|
54
|
-
--code-tok-boolean
|
|
55
|
-
--code-tok-operator
|
|
56
|
-
--code-tok-punctuation
|
|
57
|
-
--code-tok-function
|
|
58
|
-
--code-tok-variable
|
|
59
|
-
--code-tok-type
|
|
60
|
-
--code-tok-property
|
|
61
|
-
--code-tok-tag
|
|
62
|
-
--code-tok-attribute
|
|
63
|
-
--code-tok-url
|
|
64
|
-
--code-tok-invalid
|
|
50
|
+
--code-tok-comment: var(--a-fg-subtle);
|
|
51
|
+
--code-tok-keyword: var(--a-accent-strong);
|
|
52
|
+
--code-tok-string: var(--a-success-strong);
|
|
53
|
+
--code-tok-number: var(--a-info-strong);
|
|
54
|
+
--code-tok-boolean: var(--a-info-strong);
|
|
55
|
+
--code-tok-operator: var(--a-fg);
|
|
56
|
+
--code-tok-punctuation: var(--a-fg-muted);
|
|
57
|
+
--code-tok-function: var(--a-brand-strong);
|
|
58
|
+
--code-tok-variable: var(--a-fg);
|
|
59
|
+
--code-tok-type: var(--a-warning-strong);
|
|
60
|
+
--code-tok-property: var(--a-fg);
|
|
61
|
+
--code-tok-tag: var(--a-accent-strong);
|
|
62
|
+
--code-tok-attribute: var(--a-warning-strong);
|
|
63
|
+
--code-tok-url: var(--a-info-strong);
|
|
64
|
+
--code-tok-invalid: var(--a-danger-strong);
|
|
65
65
|
|
|
66
66
|
/* ── Lint markers (Phase 3 — editable JSON) ──
|
|
67
67
|
`@codemirror/lint` paints gutter markers + diagnostic tooltips
|
|
68
68
|
+ inline underlines. Only fires in editable mode with a linter
|
|
69
69
|
attached; read-only instances never see these selectors. */
|
|
70
|
-
--code-lint-gutter-bg
|
|
71
|
-
--code-lint-error
|
|
72
|
-
--code-lint-warning
|
|
73
|
-
--code-lint-info
|
|
74
|
-
--code-lint-tooltip-bg
|
|
75
|
-
--code-lint-tooltip-fg
|
|
76
|
-
--code-lint-tooltip-border
|
|
70
|
+
--code-lint-gutter-bg: var(--a-bg-subtle);
|
|
71
|
+
--code-lint-error: var(--a-danger-strong);
|
|
72
|
+
--code-lint-warning: var(--a-warning-strong);
|
|
73
|
+
--code-lint-info: var(--a-info-strong);
|
|
74
|
+
--code-lint-tooltip-bg: var(--a-bg-strong); /* §230-bundle (v0.5.9): elevated panel surface. Was orphaned --a-surface-floating. */
|
|
75
|
+
--code-lint-tooltip-fg: var(--a-fg);
|
|
76
|
+
--code-lint-tooltip-border: var(--a-border-subtle);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/* ── Block (default) ── */
|
|
80
80
|
:scope {
|
|
81
81
|
box-sizing: border-box;
|
|
82
82
|
display: block;
|
|
83
|
-
border: 1px solid var(--code-border
|
|
84
|
-
border-radius: var(--code-radius
|
|
83
|
+
border: 1px solid var(--code-border);
|
|
84
|
+
border-radius: var(--code-radius);
|
|
85
85
|
overflow: hidden;
|
|
86
|
-
background: var(--code-bg
|
|
87
|
-
color: var(--code-fg
|
|
88
|
-
font-family: var(--code-font
|
|
89
|
-
font-size: var(--code-font-size
|
|
86
|
+
background: var(--code-bg);
|
|
87
|
+
color: var(--code-fg);
|
|
88
|
+
font-family: var(--code-font);
|
|
89
|
+
font-size: var(--code-font-size);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
/* Header — chrome band above the code block */
|
|
@@ -96,11 +96,11 @@
|
|
|
96
96
|
align-items: center;
|
|
97
97
|
justify-content: space-between;
|
|
98
98
|
min-height: var(--a-chrome-pane-header-height);
|
|
99
|
-
padding: var(--code-py
|
|
100
|
-
background: var(--code-header-bg
|
|
101
|
-
border-bottom: 1px solid var(--code-border
|
|
102
|
-
font-size: var(--code-header-font
|
|
103
|
-
color: var(--code-header-fg
|
|
99
|
+
padding: var(--code-py) var(--code-px);
|
|
100
|
+
background: var(--code-header-bg);
|
|
101
|
+
border-bottom: 1px solid var(--code-border);
|
|
102
|
+
font-size: var(--code-header-font);
|
|
103
|
+
color: var(--code-header-fg);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
& > header [slot="label"] {
|
|
@@ -113,17 +113,17 @@
|
|
|
113
113
|
& > header [slot="copy"] {
|
|
114
114
|
all: unset;
|
|
115
115
|
cursor: pointer;
|
|
116
|
-
font-size: var(--code-header-font
|
|
117
|
-
color: var(--code-header-fg
|
|
118
|
-
padding: var(--code-copy-py
|
|
119
|
-
border-radius: var(--code-radius-sm
|
|
116
|
+
font-size: var(--code-header-font);
|
|
117
|
+
color: var(--code-header-fg);
|
|
118
|
+
padding: var(--code-copy-py) var(--code-copy-px);
|
|
119
|
+
border-radius: var(--code-radius-sm);
|
|
120
120
|
transition:
|
|
121
|
-
background var(--code-duration
|
|
122
|
-
color var(--code-duration
|
|
121
|
+
background var(--code-duration) var(--code-easing),
|
|
122
|
+
color var(--code-duration) var(--code-easing);
|
|
123
123
|
}
|
|
124
124
|
& > header [slot="copy"]:hover {
|
|
125
|
-
background: var(--code-copy-hover-bg
|
|
126
|
-
color: var(--code-copy-hover-fg
|
|
125
|
+
background: var(--code-copy-hover-bg);
|
|
126
|
+
color: var(--code-copy-hover-fg);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
/* Pre > Code — reset any ambient page styling (margins, borders,
|
|
@@ -134,10 +134,10 @@
|
|
|
134
134
|
border: none;
|
|
135
135
|
border-radius: 0;
|
|
136
136
|
background: transparent;
|
|
137
|
-
padding: var(--code-py
|
|
137
|
+
padding: var(--code-py) var(--code-px);
|
|
138
138
|
overflow-x: auto;
|
|
139
|
-
font-family: var(--code-font
|
|
140
|
-
font-size: var(--code-font-size
|
|
139
|
+
font-family: var(--code-font);
|
|
140
|
+
font-size: var(--code-font-size);
|
|
141
141
|
line-height: 1.5;
|
|
142
142
|
scrollbar-width: none;
|
|
143
143
|
}
|
|
@@ -170,8 +170,8 @@
|
|
|
170
170
|
grid-template-columns: 1fr;
|
|
171
171
|
/* Bleed the row tint to the pre's padding edges so it reads as a
|
|
172
172
|
full-width line, not a gap-margined pill. */
|
|
173
|
-
margin-inline: calc(-1 * var(--code-px
|
|
174
|
-
padding-inline: var(--code-px
|
|
173
|
+
margin-inline: calc(-1 * var(--code-px));
|
|
174
|
+
padding-inline: var(--code-px);
|
|
175
175
|
}
|
|
176
176
|
& > pre > code[data-line-numbers] > [data-line-state] {
|
|
177
177
|
grid-template-columns: auto 1fr;
|
|
@@ -205,21 +205,21 @@
|
|
|
205
205
|
align-items: center;
|
|
206
206
|
justify-content: space-between;
|
|
207
207
|
min-height: var(--a-chrome-pane-footer-height);
|
|
208
|
-
padding: var(--code-py
|
|
209
|
-
background: var(--code-header-bg
|
|
210
|
-
border-top: 1px solid var(--code-border
|
|
211
|
-
font-size: var(--code-header-font
|
|
212
|
-
color: var(--code-header-fg
|
|
208
|
+
padding: var(--code-py) var(--code-px);
|
|
209
|
+
background: var(--code-header-bg);
|
|
210
|
+
border-top: 1px solid var(--code-border);
|
|
211
|
+
font-size: var(--code-header-font);
|
|
212
|
+
color: var(--code-header-fg);
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
/* ── Inline ── */
|
|
216
216
|
:scope[inline] {
|
|
217
217
|
display: inline;
|
|
218
218
|
padding: 0.1em 0.4em;
|
|
219
|
-
background: var(--code-bg
|
|
219
|
+
background: var(--code-bg);
|
|
220
220
|
border: none;
|
|
221
|
-
border-radius: var(--code-radius-sm
|
|
222
|
-
font-family: var(--code-font
|
|
221
|
+
border-radius: var(--code-radius-sm);
|
|
222
|
+
font-family: var(--code-font);
|
|
223
223
|
font-size: 0.9em;
|
|
224
224
|
overflow: visible;
|
|
225
225
|
}
|
|
@@ -295,9 +295,9 @@
|
|
|
295
295
|
|
|
296
296
|
:scope .cm-editor {
|
|
297
297
|
background: transparent;
|
|
298
|
-
color: var(--code-fg
|
|
299
|
-
font-family: var(--code-font
|
|
300
|
-
font-size: var(--code-font-size
|
|
298
|
+
color: var(--code-fg);
|
|
299
|
+
font-family: var(--code-font);
|
|
300
|
+
font-size: var(--code-font-size);
|
|
301
301
|
line-height: 1.5;
|
|
302
302
|
}
|
|
303
303
|
|
|
@@ -313,64 +313,64 @@
|
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
:scope .cm-content {
|
|
316
|
-
padding: var(--code-py
|
|
317
|
-
caret-color: var(--code-cursor
|
|
316
|
+
padding: var(--code-py) var(--code-px);
|
|
317
|
+
caret-color: var(--code-cursor);
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
:scope .cm-editor.cm-focused {
|
|
321
|
-
outline: 2px solid var(--code-focus-ring
|
|
321
|
+
outline: 2px solid var(--code-focus-ring);
|
|
322
322
|
outline-offset: -2px;
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
:scope .cm-gutters {
|
|
326
|
-
background: var(--code-gutter-bg
|
|
327
|
-
color: var(--code-gutter-fg
|
|
328
|
-
border-right: 1px solid var(--code-border
|
|
326
|
+
background: var(--code-gutter-bg);
|
|
327
|
+
color: var(--code-gutter-fg);
|
|
328
|
+
border-right: 1px solid var(--code-border);
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
:scope .cm-activeLine {
|
|
332
|
-
background: var(--code-active-line-bg
|
|
332
|
+
background: var(--code-active-line-bg);
|
|
333
333
|
}
|
|
334
334
|
:scope .cm-activeLineGutter {
|
|
335
|
-
background: var(--code-active-line-bg
|
|
336
|
-
color: var(--code-fg
|
|
335
|
+
background: var(--code-active-line-bg);
|
|
336
|
+
color: var(--code-fg);
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
:scope .cm-selectionBackground,
|
|
340
340
|
:scope ::selection {
|
|
341
|
-
background: var(--code-selection-bg
|
|
341
|
+
background: var(--code-selection-bg);
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
:scope .cm-selectionMatch {
|
|
345
|
-
background: var(--code-selection-match
|
|
345
|
+
background: var(--code-selection-match);
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
:scope .cm-cursor {
|
|
349
|
-
border-left-color: var(--code-cursor
|
|
349
|
+
border-left-color: var(--code-cursor);
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
/* Syntax highlight — one rule per token role (see core/_cm-theme.js) */
|
|
353
|
-
:scope .tok-comment { color: var(--code-tok-comment
|
|
354
|
-
:scope .tok-keyword { color: var(--code-tok-keyword
|
|
355
|
-
:scope .tok-string { color: var(--code-tok-string
|
|
356
|
-
:scope .tok-number { color: var(--code-tok-number
|
|
357
|
-
:scope .tok-boolean { color: var(--code-tok-boolean
|
|
358
|
-
:scope .tok-operator { color: var(--code-tok-operator
|
|
359
|
-
:scope .tok-punctuation { color: var(--code-tok-punctuation
|
|
360
|
-
:scope .tok-function { color: var(--code-tok-function
|
|
361
|
-
:scope .tok-variable { color: var(--code-tok-variable
|
|
362
|
-
:scope .tok-type { color: var(--code-tok-type
|
|
363
|
-
:scope .tok-property { color: var(--code-tok-property
|
|
364
|
-
:scope .tok-tag { color: var(--code-tok-tag
|
|
365
|
-
:scope .tok-attribute { color: var(--code-tok-attribute
|
|
366
|
-
:scope .tok-url { color: var(--code-tok-url
|
|
367
|
-
:scope .tok-invalid { color: var(--code-tok-invalid
|
|
353
|
+
:scope .tok-comment { color: var(--code-tok-comment); font-style: italic; }
|
|
354
|
+
:scope .tok-keyword { color: var(--code-tok-keyword); font-weight: 500; }
|
|
355
|
+
:scope .tok-string { color: var(--code-tok-string); }
|
|
356
|
+
:scope .tok-number { color: var(--code-tok-number); }
|
|
357
|
+
:scope .tok-boolean { color: var(--code-tok-boolean); }
|
|
358
|
+
:scope .tok-operator { color: var(--code-tok-operator); }
|
|
359
|
+
:scope .tok-punctuation { color: var(--code-tok-punctuation); }
|
|
360
|
+
:scope .tok-function { color: var(--code-tok-function); }
|
|
361
|
+
:scope .tok-variable { color: var(--code-tok-variable); }
|
|
362
|
+
:scope .tok-type { color: var(--code-tok-type); font-weight: 500; }
|
|
363
|
+
:scope .tok-property { color: var(--code-tok-property); }
|
|
364
|
+
:scope .tok-tag { color: var(--code-tok-tag); }
|
|
365
|
+
:scope .tok-attribute { color: var(--code-tok-attribute); }
|
|
366
|
+
:scope .tok-url { color: var(--code-tok-url); text-decoration: underline; }
|
|
367
|
+
:scope .tok-invalid { color: var(--code-tok-invalid); text-decoration: wavy underline; }
|
|
368
368
|
|
|
369
369
|
/* ── Lint gutter + diagnostics ──
|
|
370
370
|
Styles the `@codemirror/lint` markers in the gutter, the inline
|
|
371
371
|
wavy underline on the diagnostic range, and the tooltip panel. */
|
|
372
372
|
:scope .cm-gutter-lint {
|
|
373
|
-
background: var(--code-lint-gutter-bg
|
|
373
|
+
background: var(--code-lint-gutter-bg);
|
|
374
374
|
width: 1em;
|
|
375
375
|
}
|
|
376
376
|
:scope .cm-lint-marker {
|
|
@@ -378,19 +378,19 @@
|
|
|
378
378
|
height: 0.7em;
|
|
379
379
|
margin: 0.15em 0.15em;
|
|
380
380
|
}
|
|
381
|
-
:scope .cm-lint-marker-error { color: var(--code-lint-error
|
|
382
|
-
:scope .cm-lint-marker-warning { color: var(--code-lint-warning
|
|
383
|
-
:scope .cm-lint-marker-info { color: var(--code-lint-info
|
|
381
|
+
:scope .cm-lint-marker-error { color: var(--code-lint-error); }
|
|
382
|
+
:scope .cm-lint-marker-warning { color: var(--code-lint-warning); }
|
|
383
|
+
:scope .cm-lint-marker-info { color: var(--code-lint-info); }
|
|
384
384
|
|
|
385
|
-
:scope .cm-lintRange-error { background: none; text-decoration: wavy underline var(--code-lint-error
|
|
386
|
-
:scope .cm-lintRange-warning { background: none; text-decoration: wavy underline var(--code-lint-warning
|
|
387
|
-
:scope .cm-lintRange-info { background: none; text-decoration: wavy underline var(--code-lint-info
|
|
385
|
+
:scope .cm-lintRange-error { background: none; text-decoration: wavy underline var(--code-lint-error); }
|
|
386
|
+
:scope .cm-lintRange-warning { background: none; text-decoration: wavy underline var(--code-lint-warning); }
|
|
387
|
+
:scope .cm-lintRange-info { background: none; text-decoration: wavy underline var(--code-lint-info); }
|
|
388
388
|
|
|
389
389
|
:scope .cm-tooltip.cm-tooltip-lint {
|
|
390
|
-
background: var(--code-lint-tooltip-bg
|
|
391
|
-
color: var(--code-lint-tooltip-fg
|
|
392
|
-
border: 1px solid var(--code-lint-tooltip-border
|
|
393
|
-
border-radius: var(--code-radius-sm
|
|
390
|
+
background: var(--code-lint-tooltip-bg);
|
|
391
|
+
color: var(--code-lint-tooltip-fg);
|
|
392
|
+
border: 1px solid var(--code-lint-tooltip-border);
|
|
393
|
+
border-radius: var(--code-radius-sm);
|
|
394
394
|
padding: var(--a-space-1) var(--a-space-2);
|
|
395
395
|
font-size: var(--a-ui-sm);
|
|
396
396
|
font-family: var(--a-font-family);
|
|
@@ -398,11 +398,11 @@
|
|
|
398
398
|
}
|
|
399
399
|
:scope .cm-diagnostic {
|
|
400
400
|
padding: 0;
|
|
401
|
-
border-inline-start: var(--code-lint-marker-w
|
|
401
|
+
border-inline-start: var(--code-lint-marker-w) solid transparent;
|
|
402
402
|
padding-inline-start: var(--a-space-2);
|
|
403
403
|
}
|
|
404
|
-
:scope .cm-diagnostic-error { border-inline-start-color: var(--code-lint-error
|
|
405
|
-
:scope .cm-diagnostic-warning { border-inline-start-color: var(--code-lint-warning
|
|
406
|
-
:scope .cm-diagnostic-info { border-inline-start-color: var(--code-lint-info
|
|
404
|
+
:scope .cm-diagnostic-error { border-inline-start-color: var(--code-lint-error); }
|
|
405
|
+
:scope .cm-diagnostic-warning { border-inline-start-color: var(--code-lint-warning); }
|
|
406
|
+
:scope .cm-diagnostic-info { border-inline-start-color: var(--code-lint-info); }
|
|
407
407
|
:scope .cm-diagnosticText { white-space: pre-wrap; }
|
|
408
408
|
}
|