@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.
Files changed (137) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/components/accordion/accordion.css +2 -2
  3. package/components/action-list/action-list.css +2 -2
  4. package/components/agent-artifact/agent-artifact.css +31 -31
  5. package/components/agent-feedback-bar/agent-feedback-bar.css +10 -10
  6. package/components/agent-questions/agent-questions.css +59 -57
  7. package/components/agent-reasoning/agent-reasoning.css +54 -54
  8. package/components/agent-suggestions/agent-suggestions.css +4 -4
  9. package/components/agent-trace/agent-trace.css +53 -53
  10. package/components/alert/alert.css +53 -53
  11. package/components/avatar/avatar.css +27 -27
  12. package/components/badge/badge.css +56 -53
  13. package/components/block/block.css +16 -16
  14. package/components/blockquote/blockquote.css +16 -16
  15. package/components/breadcrumb/breadcrumb.css +23 -23
  16. package/components/button/button.css +123 -101
  17. package/components/calendar-grid/calendar-grid.css +95 -92
  18. package/components/calendar-picker/calendar-picker.css +141 -139
  19. package/components/canvas/canvas.css +12 -12
  20. package/components/card/card.css +83 -83
  21. package/components/chart/chart.css +218 -218
  22. package/components/chart-legend/chart-legend.css +26 -26
  23. package/components/check/check.css +40 -40
  24. package/components/code/code.css +125 -125
  25. package/components/col/col.css +15 -15
  26. package/components/color-picker/color-picker.css +55 -55
  27. package/components/combobox/combobox.css +64 -62
  28. package/components/command/command.css +91 -91
  29. package/components/context-menu/context-menu.css +1 -1
  30. package/components/date-range-picker/date-range-picker.css +59 -59
  31. package/components/datetime-picker/datetime-picker.css +25 -25
  32. package/components/demo-toggle/demo-toggle.css +27 -27
  33. package/components/description-list/description-list.css +18 -18
  34. package/components/divider/divider.css +24 -24
  35. package/components/embed/embed.css +6 -6
  36. package/components/empty-state/empty-state.css +29 -29
  37. package/components/feed/feed.css +12 -12
  38. package/components/field/field.css +28 -28
  39. package/components/field/field.test.js +2 -2
  40. package/components/fields/fields.css +5 -5
  41. package/components/grid/grid.a2ui.json +10 -0
  42. package/components/grid/grid.css +23 -5
  43. package/components/grid/grid.d.ts +4 -0
  44. package/components/grid/grid.yaml +13 -0
  45. package/components/heatmap/heatmap.css +61 -61
  46. package/components/icon/icon.css +12 -12
  47. package/components/image/image.css +14 -14
  48. package/components/inline-edit/inline-edit.css +16 -16
  49. package/components/inline-message/inline-message.css +16 -16
  50. package/components/input/input.css +69 -66
  51. package/components/inspector/inspector.css +6 -6
  52. package/components/integration-card/integration-card.css +41 -41
  53. package/components/integration-card/integration-card.test.js +4 -4
  54. package/components/kbd/kbd.css +47 -40
  55. package/components/link/link.css +12 -12
  56. package/components/list/list.css +8 -8
  57. package/components/list-window/list-window.css +10 -10
  58. package/components/loading-overlay/loading-overlay.css +17 -18
  59. package/components/loading-overlay/loading-overlay.test.js +8 -8
  60. package/components/mark/mark.css +16 -16
  61. package/components/menu/menu.css +9 -9
  62. package/components/modal/modal.class.js +5 -9
  63. package/components/modal/modal.css +43 -43
  64. package/components/nav/nav.css +40 -40
  65. package/components/nav-group/nav-group.css +54 -54
  66. package/components/nav-item/nav-item.css +44 -44
  67. package/components/noodles/noodles.css +31 -31
  68. package/components/number-format/number-format.css +4 -4
  69. package/components/option-card/option-card.css +70 -70
  70. package/components/otp-input/otp-input.css +29 -29
  71. package/components/page/page.a2ui.json +1 -1
  72. package/components/page/page.css +27 -27
  73. package/components/page/page.d.ts +1 -1
  74. package/components/page/page.yaml +1 -1
  75. package/components/pagination/pagination.css +6 -6
  76. package/components/pane/pane.css +57 -57
  77. package/components/password-strength/password-strength.css +32 -32
  78. package/components/pipeline-status/pipeline-status.css +67 -67
  79. package/components/popover/popover.css +11 -11
  80. package/components/preview/preview.css +21 -21
  81. package/components/progress/progress.css +23 -23
  82. package/components/progress-row/progress-row.css +17 -17
  83. package/components/qr-code/qr-code.css +4 -4
  84. package/components/radio/radio.css +39 -39
  85. package/components/range/range.css +58 -55
  86. package/components/rating/rating.css +28 -28
  87. package/components/relative-time/relative-time.css +6 -6
  88. package/components/richtext/richtext.css +133 -133
  89. package/components/row/row.css +19 -19
  90. package/components/search/search.css +5 -5
  91. package/components/segment/segment.css +29 -24
  92. package/components/segmented/segmented.css +30 -25
  93. package/components/select/select.css +95 -93
  94. package/components/skeleton/skeleton.css +14 -14
  95. package/components/skip-nav/skip-nav.css +4 -4
  96. package/components/slider/slider.css +61 -61
  97. package/components/spinner/spinner.css +40 -40
  98. package/components/spinner/spinner.test.js +10 -12
  99. package/components/stack/stack.css +11 -11
  100. package/components/stat/stat.css +27 -27
  101. package/components/step-progress/step-progress.css +20 -20
  102. package/components/stepper/stepper.css +29 -29
  103. package/components/stream/stream.css +12 -12
  104. package/components/swatch/swatch.css +68 -68
  105. package/components/swiper/swiper.class.js +5 -12
  106. package/components/swiper/swiper.css +57 -57
  107. package/components/switch/switch.css +53 -53
  108. package/components/table/table.css +166 -163
  109. package/components/table-toolbar/table-toolbar.css +33 -33
  110. package/components/tabs/tabs.css +54 -51
  111. package/components/tag/tag.css +74 -71
  112. package/components/tag/tag.test.js +14 -14
  113. package/components/tags-input/tags-input.css +51 -49
  114. package/components/text/text.css +44 -44
  115. package/components/textarea/textarea.css +49 -46
  116. package/components/time-picker/time-picker.css +47 -47
  117. package/components/timeline/timeline.css +54 -54
  118. package/components/toast/toast.css +58 -58
  119. package/components/toc/toc.css +28 -28
  120. package/components/toggle-group/toggle-group.css +9 -6
  121. package/components/toggle-scheme/toggle-scheme.css +2 -2
  122. package/components/toolbar/toolbar.css +18 -18
  123. package/components/tooltip/tooltip.css +2 -2
  124. package/components/tour/tour.css +4 -4
  125. package/components/tree/tree.css +37 -37
  126. package/components/upload/upload.css +49 -49
  127. package/dist/host.min.css +1 -0
  128. package/dist/web-components.min.css +1 -1
  129. package/dist/web-components.min.js +2 -2
  130. package/package.json +1 -1
  131. package/styles/api/text.css +9 -2
  132. package/styles/foundation/space.css +19 -18
  133. package/styles/host.css +48 -0
  134. package/styles/prose.css +187 -173
  135. package/styles/type/scale.css +6 -0
  136. package/styles/typography.css +10 -5
  137. 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-default: var(--a-space-2);
5
- --chart-legend-row-gap-default: var(--a-space-1);
6
- --chart-legend-py-default: var(--a-space-1);
7
- --chart-legend-px-default: 0;
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-default: var(--a-space-2-5);
11
- --chart-legend-line-w-default: 2px;
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-default: var(--a-ui-tiny);
15
- --chart-legend-fg-default: var(--a-fg-subtle);
16
- --chart-legend-fg-inactive-default: var(--a-fg-muted);
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-default: var(--a-radius-sm);
20
- --chart-legend-row-hover-default: var(--a-canvas-2);
21
- --chart-legend-row-fg-hover-default: var(--a-fg);
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-default: var(--a-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, var(--chart-legend-gap-default));
32
- padding: var(--chart-legend-py, var(--chart-legend-py-default)) var(--chart-legend-px, var(--chart-legend-px-default));
33
- font-size: var(--chart-legend-font-size, var(--chart-legend-font-size-default));
34
- color: var(--chart-legend-fg, var(--chart-legend-fg-default));
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, var(--chart-legend-fg-default));
59
- --badge-radius: var(--chart-legend-row-radius, var(--chart-legend-row-radius-default));
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, var(--chart-legend-py-default));
62
- --badge-gap: var(--chart-legend-row-gap, var(--chart-legend-row-gap-default));
63
- --badge-font-size: var(--chart-legend-font-size, var(--chart-legend-font-size-default));
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, var(--chart-legend-row-hover-default));
76
- --badge-fg: var(--chart-legend-row-fg-hover, var(--chart-legend-row-fg-hover-default));
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, var(--chart-legend-focus-ring-default));
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, var(--chart-legend-fg-inactive-default));
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, var(--check-border-hover-default));
8
- background: var(--check-bg-hover, var(--check-bg-hover-default));
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, var(--check-bg-checked-hover-default));
13
- border-color: var(--check-bg-checked-hover, var(--check-bg-checked-hover-default));
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, var(--check-bg-checked-default));
18
- border-color: var(--check-border-checked, var(--check-border-checked-default));
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, var(--check-size-default)) * 0.3);
22
- --_icon-h: calc(var(--check-size, var(--check-size-default)) * 0.55);
23
- --_icon-border: solid var(--check-fg-checked, var(--check-fg-checked-default));
24
- --_icon-bw: 0 calc(var(--check-size, var(--check-size-default)) * 0.12) calc(var(--check-size, var(--check-size-default)) * 0.12) 0;
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, var(--check-fg-checked-default));
29
- --_icon-w: calc(var(--check-size, var(--check-size-default)) * 0.5);
30
- --_icon-h: calc(var(--check-size, var(--check-size-default)) * 0.12);
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-default: var(--a-toggle-size);
37
- --check-gap-default: var(--a-space-2);
38
- --check-font-size-default: var(--a-ui-size);
39
- --check-radius-default: min(var(--a-radius-md), var(--a-space-1-5));
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-default: var(--a-ui-bg);
43
- --check-border-default: var(--a-ui-border);
44
- --check-border-hover-default: var(--a-fg-subtle);
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-default: var(--a-duration-fast);
48
- --check-easing-default: var(--a-easing);
47
+ --check-duration: var(--a-duration-fast);
48
+ --check-easing: var(--a-easing);
49
49
 
50
50
  /* ── Focus ── */
51
- --check-focus-ring-default: var(--a-focus-ring);
51
+ --check-focus-ring: var(--a-focus-ring);
52
52
 
53
53
  /* ── State: default hover ── */
54
- --check-bg-hover-default: var(--a-bg-muted);
54
+ --check-bg-hover: var(--a-bg-muted);
55
55
 
56
56
  /* ── State: checked ── */
57
- --check-bg-checked-default: var(--a-primary);
58
- --check-border-checked-default: var(--a-primary);
59
- --check-fg-checked-default: var(--a-chrome-light);
60
- --check-bg-checked-hover-default: var(--a-primary-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-default: var(--a-ui-text-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, var(--check-gap-default));
84
+ gap: var(--check-gap);
85
85
  cursor: pointer;
86
86
  user-select: none;
87
- font-size: var(--check-font-size, var(--check-font-size-default));
87
+ font-size: var(--check-font-size);
88
88
  outline: none;
89
89
  }
90
- :scope[disabled] { cursor: not-allowed; color: var(--check-fg-disabled, var(--check-fg-disabled-default)); }
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, var(--check-size-default));
96
- height: var(--check-size, var(--check-size-default));
97
- border: 1.5px solid var(--check-border, var(--check-border-default));
98
- border-radius: var(--check-radius, var(--check-radius-default));
99
- background: var(--check-bg, var(--check-bg-default));
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, var(--check-duration-default)) var(--check-easing, var(--check-easing-default)),
105
- border-color var(--check-duration, var(--check-duration-default)) var(--check-easing, var(--check-easing-default));
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, var(--check-focus-ring-default)); }
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
  }
@@ -1,92 +1,92 @@
1
1
  @scope (code-ui) {
2
2
  :where(:scope) {
3
3
  /* ── Layout ── */
4
- --code-px-default: var(--a-space-3);
5
- --code-py-default: var(--a-space-2);
6
- --code-radius-default: var(--a-radius-md);
7
- --code-radius-sm-default: var(--a-radius-sm);
8
- --code-copy-px-default: var(--a-space-1);
9
- --code-copy-py-default: var(--a-space-0-5);
10
- --code-lint-marker-w-default: 3px; /* Vertical lint-marker rule; intrinsic measurement; no --a-space-* equivalent at this width. */
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-default: var(--a-bg);
14
- --code-fg-default: var(--a-fg);
15
- --code-border-default: var(--a-border-subtle);
16
- --code-header-bg-default: var(--a-bg-scrim);
17
- --code-header-fg-default: var(--a-fg-muted);
18
- --code-copy-hover-bg-default: var(--a-bg-muted);
19
- --code-copy-hover-fg-default: var(--a-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-default: var(--a-font-family-code);
23
- --code-font-size-default: var(--a-ui-sm);
24
- --code-header-font-default: var(--a-ui-sm);
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-default: var(--a-duration-fast);
28
- --code-easing-default: var(--a-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-default: var(--a-bg-subtle);
35
- --code-gutter-fg-default: var(--a-fg-muted);
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-default: color-mix(in oklab, var(--a-accent-muted) 40%, transparent);
40
- --code-selection-bg-default: color-mix(in oklab, var(--a-accent-muted) 60%, transparent);
41
- --code-selection-match-default: color-mix(in oklab, var(--a-accent-muted) 30%, transparent);
42
- --code-cursor-default: var(--a-accent-strong);
43
- --code-focus-ring-default: var(--a-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-default: var(--a-fg-subtle);
51
- --code-tok-keyword-default: var(--a-accent-strong);
52
- --code-tok-string-default: var(--a-success-strong);
53
- --code-tok-number-default: var(--a-info-strong);
54
- --code-tok-boolean-default: var(--a-info-strong);
55
- --code-tok-operator-default: var(--a-fg);
56
- --code-tok-punctuation-default: var(--a-fg-muted);
57
- --code-tok-function-default: var(--a-brand-strong);
58
- --code-tok-variable-default: var(--a-fg);
59
- --code-tok-type-default: var(--a-warning-strong);
60
- --code-tok-property-default: var(--a-fg);
61
- --code-tok-tag-default: var(--a-accent-strong);
62
- --code-tok-attribute-default: var(--a-warning-strong);
63
- --code-tok-url-default: var(--a-info-strong);
64
- --code-tok-invalid-default: var(--a-danger-strong);
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-default: var(--a-bg-subtle);
71
- --code-lint-error-default: var(--a-danger-strong);
72
- --code-lint-warning-default: var(--a-warning-strong);
73
- --code-lint-info-default: var(--a-info-strong);
74
- --code-lint-tooltip-bg-default: var(--a-bg-strong); /* §230-bundle (v0.5.9): elevated panel surface. Was orphaned --a-surface-floating. */
75
- --code-lint-tooltip-fg-default: var(--a-fg);
76
- --code-lint-tooltip-border-default: var(--a-border-subtle);
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, var(--code-border-default));
84
- border-radius: var(--code-radius, var(--code-radius-default));
83
+ border: 1px solid var(--code-border);
84
+ border-radius: var(--code-radius);
85
85
  overflow: hidden;
86
- background: var(--code-bg, var(--code-bg-default));
87
- color: var(--code-fg, var(--code-fg-default));
88
- font-family: var(--code-font, var(--code-font-default));
89
- font-size: var(--code-font-size, var(--code-font-size-default));
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, var(--code-py-default)) var(--code-px, var(--code-px-default));
100
- background: var(--code-header-bg, var(--code-header-bg-default));
101
- border-bottom: 1px solid var(--code-border, var(--code-border-default));
102
- font-size: var(--code-header-font, var(--code-header-font-default));
103
- color: var(--code-header-fg, var(--code-header-fg-default));
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, var(--code-header-font-default));
117
- color: var(--code-header-fg, var(--code-header-fg-default));
118
- padding: var(--code-copy-py, var(--code-copy-py-default)) var(--code-copy-px, var(--code-copy-px-default));
119
- border-radius: var(--code-radius-sm, var(--code-radius-sm-default));
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, var(--code-duration-default)) var(--code-easing, var(--code-easing-default)),
122
- color var(--code-duration, var(--code-duration-default)) var(--code-easing, var(--code-easing-default));
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, var(--code-copy-hover-bg-default));
126
- color: var(--code-copy-hover-fg, var(--code-copy-hover-fg-default));
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, var(--code-py-default)) var(--code-px, var(--code-px-default));
137
+ padding: var(--code-py) var(--code-px);
138
138
  overflow-x: auto;
139
- font-family: var(--code-font, var(--code-font-default));
140
- font-size: var(--code-font-size, var(--code-font-size-default));
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, var(--code-px-default)));
174
- padding-inline: var(--code-px, var(--code-px-default));
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, var(--code-py-default)) var(--code-px, var(--code-px-default));
209
- background: var(--code-header-bg, var(--code-header-bg-default));
210
- border-top: 1px solid var(--code-border, var(--code-border-default));
211
- font-size: var(--code-header-font, var(--code-header-font-default));
212
- color: var(--code-header-fg, var(--code-header-fg-default));
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, var(--code-bg-default));
219
+ background: var(--code-bg);
220
220
  border: none;
221
- border-radius: var(--code-radius-sm, var(--code-radius-sm-default));
222
- font-family: var(--code-font, var(--code-font-default));
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, var(--code-fg-default));
299
- font-family: var(--code-font, var(--code-font-default));
300
- font-size: var(--code-font-size, var(--code-font-size-default));
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, var(--code-py-default)) var(--code-px, var(--code-px-default));
317
- caret-color: var(--code-cursor, var(--code-cursor-default));
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, var(--code-focus-ring-default));
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, var(--code-gutter-bg-default));
327
- color: var(--code-gutter-fg, var(--code-gutter-fg-default));
328
- border-right: 1px solid var(--code-border, var(--code-border-default));
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, var(--code-active-line-bg-default));
332
+ background: var(--code-active-line-bg);
333
333
  }
334
334
  :scope .cm-activeLineGutter {
335
- background: var(--code-active-line-bg, var(--code-active-line-bg-default));
336
- color: var(--code-fg, var(--code-fg-default));
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, var(--code-selection-bg-default));
341
+ background: var(--code-selection-bg);
342
342
  }
343
343
 
344
344
  :scope .cm-selectionMatch {
345
- background: var(--code-selection-match, var(--code-selection-match-default));
345
+ background: var(--code-selection-match);
346
346
  }
347
347
 
348
348
  :scope .cm-cursor {
349
- border-left-color: var(--code-cursor, var(--code-cursor-default));
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, var(--code-tok-comment-default)); font-style: italic; }
354
- :scope .tok-keyword { color: var(--code-tok-keyword, var(--code-tok-keyword-default)); font-weight: 500; }
355
- :scope .tok-string { color: var(--code-tok-string, var(--code-tok-string-default)); }
356
- :scope .tok-number { color: var(--code-tok-number, var(--code-tok-number-default)); }
357
- :scope .tok-boolean { color: var(--code-tok-boolean, var(--code-tok-boolean-default)); }
358
- :scope .tok-operator { color: var(--code-tok-operator, var(--code-tok-operator-default)); }
359
- :scope .tok-punctuation { color: var(--code-tok-punctuation, var(--code-tok-punctuation-default)); }
360
- :scope .tok-function { color: var(--code-tok-function, var(--code-tok-function-default)); }
361
- :scope .tok-variable { color: var(--code-tok-variable, var(--code-tok-variable-default)); }
362
- :scope .tok-type { color: var(--code-tok-type, var(--code-tok-type-default)); font-weight: 500; }
363
- :scope .tok-property { color: var(--code-tok-property, var(--code-tok-property-default)); }
364
- :scope .tok-tag { color: var(--code-tok-tag, var(--code-tok-tag-default)); }
365
- :scope .tok-attribute { color: var(--code-tok-attribute, var(--code-tok-attribute-default)); }
366
- :scope .tok-url { color: var(--code-tok-url, var(--code-tok-url-default)); text-decoration: underline; }
367
- :scope .tok-invalid { color: var(--code-tok-invalid, var(--code-tok-invalid-default)); text-decoration: wavy underline; }
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, var(--code-lint-gutter-bg-default));
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, var(--code-lint-error-default)); }
382
- :scope .cm-lint-marker-warning { color: var(--code-lint-warning, var(--code-lint-warning-default)); }
383
- :scope .cm-lint-marker-info { color: var(--code-lint-info, var(--code-lint-info-default)); }
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, var(--code-lint-error-default)); }
386
- :scope .cm-lintRange-warning { background: none; text-decoration: wavy underline var(--code-lint-warning, var(--code-lint-warning-default)); }
387
- :scope .cm-lintRange-info { background: none; text-decoration: wavy underline var(--code-lint-info, var(--code-lint-info-default)); }
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, var(--code-lint-tooltip-bg-default));
391
- color: var(--code-lint-tooltip-fg, var(--code-lint-tooltip-fg-default));
392
- border: 1px solid var(--code-lint-tooltip-border, var(--code-lint-tooltip-border-default));
393
- border-radius: var(--code-radius-sm, var(--code-radius-sm-default));
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, var(--code-lint-marker-w-default)) solid transparent;
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, var(--code-lint-error-default)); }
405
- :scope .cm-diagnostic-warning { border-inline-start-color: var(--code-lint-warning, var(--code-lint-warning-default)); }
406
- :scope .cm-diagnostic-info { border-inline-start-color: var(--code-lint-info, var(--code-lint-info-default)); }
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
  }