@apliteni/apliteni-ui 0.164.1 → 0.165.1

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.
@@ -886,10 +886,13 @@ meanings per language:
886
886
  | `json` | a property key | a string value | a number, `true`, `false`, `null` | — | — |
887
887
  | `ts` | a keyword | a string or template | a number or literal | — | a `//` or `/* */` comment |
888
888
 
889
- They colour short snippets, not arbitrary programs. Three of the five miss WCAG AA on the light
890
- card. They are recorded as debt, not presented as compliant: `.f` and `.u` at 3.81:1 and `.s` at
891
- 4.45:1. **The copy button is icon-only in both faces**, with `copyLabel` as its accessible name
892
- and `title`. **Confirming a copy does not change the control's size or its name**: the glyph
889
+ They colour short snippets, not arbitrary programs. All five clear WCAG AA in both themes, on
890
+ every ground a code block can take. **In a card, a code block paints the page ground**, as an
891
+ inline chip does, and a line divides its label row from the code. When more code lies past an
892
+ edge, a shade marks that edge. In light, keywords, flags and URLs fall below AA where that
893
+ shade is darkest: 4.15:1 and 4.36:1, and 3.91:1 and 4.10:1 in a table scroll. This is recorded
894
+ debt. The reveal block keeps its own look. **The copy button is
895
+ icon-only in both faces**, with `copyLabel` as its accessible name and `title`. **Confirming a copy does not change the control's size or its name**: the glyph
893
896
  swaps inside the same box, and the word goes to a hidden live region. Snippet descendants use
894
897
  the shared ring, except the browser-focusable code region. A `<pre>` sits flush with its card and
895
898
  has no radius, so **the card paints that ring instead**.
@@ -8,7 +8,7 @@
8
8
 
9
9
  **Why:** Without a legend, readers need labels for unfamiliar glyphs.
10
10
 
11
- **Except:** New entries require a decision and pass Earn a wordless button on Button labels. Allowed: close, copy, overflow, expand, collapse and export. Theme and sidebar toggles and collapsed-rail links have separate approval. On [#729](https://github.com/apliteni/apliteni-ui/issues/729), the owner chose a glyph-only React AppShell search trigger below 560px for one light row of icons. Its sentence stays the accessible name: phones have no hover title. On [#742](https://github.com/apliteni/apliteni-ui/issues/742), the owner asked for a chart's icon-only Chart and Table switch.
11
+ **Except:** New entries require a decision and pass Earn a wordless button on Button labels. Allowed: close, copy, overflow, expand, collapse and export. Theme and sidebar toggles and collapsed-rail links have separate approval. Owner additions: a chart's Chart and Table switch ([#742](https://github.com/apliteni/apliteni-ui/issues/742)), a React AppShell search trigger below 560px for one light icon row ([#729](https://github.com/apliteni/apliteni-ui/issues/729)), and a notifications bell with its count ([#798](https://github.com/apliteni/apliteni-ui/issues/798)). The last two are named by their sentence: phones have no hover title.
12
12
 
13
13
  **Do:** A wordless overflow menu and a labelled Settings.
14
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.164.1",
3
+ "version": "0.165.1",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
@@ -4,7 +4,8 @@
4
4
  * ========================================================================== */
5
5
 
6
6
  .ui-snippet {
7
- background: var(--surface);
7
+ /* The surface its container is not on, as an inline chip takes it. #800 */
8
+ background: var(--code-bg); /* code-bg: inherit — a block reads the ground its container hands a chip, and holds no chip. */
8
9
  border-radius: var(--radius-md);
9
10
  overflow: hidden;
10
11
  }
@@ -13,6 +14,8 @@
13
14
  justify-content: space-between;
14
15
  align-items: center;
15
16
  padding: 10px 15px;
17
+ /* A line between two regions of one surface, as the viewer toolbar draws it. */
18
+ border-bottom: 1px solid var(--card-edge);
16
19
  }
17
20
  .ui-snippet__bar > span {
18
21
  /* rank: label */
@@ -22,14 +25,29 @@
22
25
  }
23
26
  .ui-snippet pre {
24
27
  margin: 0;
25
- padding: 0 15px 14px;
28
+ padding: var(--space-3) 15px 14px;
26
29
  overflow-x: auto;
30
+ /* The tab row's edge shade (src/styles/nav.css): a cover in the block's ground scrolls with
31
+ the code and hides the shade at an edge the reader has reached. Painted under the text. */
32
+ --ui-snippet-edge: color-mix(in srgb, var(--sheen) 11%, transparent);
33
+ background-image:
34
+ linear-gradient(to right, var(--code-bg) 50%, transparent),
35
+ linear-gradient(to left, var(--code-bg) 50%, transparent),
36
+ radial-gradient(farthest-side at 0 50%, var(--ui-snippet-edge), transparent),
37
+ radial-gradient(farthest-side at 100% 50%, var(--ui-snippet-edge), transparent);
38
+ background-repeat: no-repeat;
39
+ background-position: 0 0, 100% 0, 0 0, 100% 0;
40
+ background-size: var(--space-6) 100%, var(--space-6) 100%, var(--space-3) 100%, var(--space-3) 100%;
41
+ background-attachment: local, local, scroll, scroll;
27
42
  font-size: var(--text-sm);
28
43
  line-height: 1.55;
29
44
  color: var(--text);
30
45
  white-space: pre;
31
46
  font-family: var(--font-mono);
32
47
  }
48
+ :root[data-theme="light"] .ui-snippet pre { --ui-snippet-edge: color-mix(in srgb, var(--shadow-ink) 13%, transparent); }
49
+ /* The reveal block wraps, so it never scrolls and draws no shade. */
50
+ .ui-snippet--reveal pre { background-image: none; }
33
51
  /* Scrollable code is a keyboard target, but a <pre> flush with the card and
34
52
  without its radius draws a square ring that cuts across the card and squares
35
53
  its corners. The card carries the ring instead, so it follows --radius-md and
@@ -72,14 +90,20 @@
72
90
  .ui-snippet pre .f { color: var(--cyan); }
73
91
  .ui-snippet pre .s { color: var(--green); }
74
92
  .ui-snippet pre .u { color: var(--cyan); }
93
+ /* The chip inks equal --green and --cyan in dark and clear AA on both light grounds. The
94
+ reveal block keeps its own. #800 */
95
+ .ui-snippet:not(.ui-snippet--reveal) pre .s { color: var(--chip-success-ink); }
96
+ .ui-snippet:not(.ui-snippet--reveal) pre :is(.f, .u) { color: var(--chip-info-ink); }
75
97
  .ui-snippet pre .c { color: var(--text); font-style: italic; }
76
98
 
77
99
  /* Reveal: a live secret/token, tinted green */
78
100
  .ui-snippet--reveal {
79
101
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
80
102
  }
103
+ /* The reveal block keeps its earlier shape: no divider and no gap under the bar. #800 */
104
+ .ui-snippet--reveal .ui-snippet__bar { border-bottom: 0; }
81
105
  .ui-snippet--reveal .ui-snippet__bar > span { color: var(--chip-success-ink); }
82
- .ui-snippet--reveal pre { color: var(--chip-success-ink); word-break: break-all; white-space: pre-wrap; }
106
+ .ui-snippet--reveal pre { padding-top: 0; color: var(--chip-success-ink); word-break: break-all; white-space: pre-wrap; }
83
107
 
84
108
  /* Inline code. The chip paints whichever reading surface its container is not on, so an
85
109
  identifier keeps its chip on the page and inside a card, with no edge of its own. The
@@ -613,7 +613,6 @@
613
613
  .ui-filter-bar__chip,
614
614
  .ui-footer--app,
615
615
  .ui-seg,
616
- .ui-snippet,
617
616
  .ui-snippet--reveal,
618
617
  .ui-sx,
619
618
  .ui-table,