@startsimpli/ui 0.4.118 → 0.4.119
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startsimpli/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.119",
|
|
4
4
|
"description": "Shared UI components package for StartSimpli applications",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"react": "^18.0.0 || ^19.0.0",
|
|
49
49
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
50
50
|
"@startsimpli/api": "^0.5.58",
|
|
51
|
-
"@startsimpli/
|
|
52
|
-
"@startsimpli/
|
|
51
|
+
"@startsimpli/i18n": "^0.1.3",
|
|
52
|
+
"@startsimpli/auth": "^0.4.35"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@startsimpli/api": {
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
"tailwindcss": "^3.4.19",
|
|
124
124
|
"tsup": "^8.5.1",
|
|
125
125
|
"typescript": "^6.0.3",
|
|
126
|
-
"@startsimpli/
|
|
127
|
-
"@startsimpli/
|
|
126
|
+
"@startsimpli/realtime": "0.0.2",
|
|
127
|
+
"@startsimpli/i18n": "0.1.3"
|
|
128
128
|
},
|
|
129
129
|
"keywords": [
|
|
130
130
|
"ui",
|
|
@@ -55,6 +55,29 @@ describe('TABLE_SCROLL_CSS', () => {
|
|
|
55
55
|
it('leaves the scroller on overflow:auto so the bar is conditional on real overflow', () => {
|
|
56
56
|
expect(TABLE_SCROLL_CSS).not.toMatch(/overflow\s*:\s*scroll/)
|
|
57
57
|
})
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* startsim-xe1uo. The edge hint shipped fading to `hsl(var(--background))`,
|
|
61
|
+
* which made it INVISIBLE: it is absolutely positioned over rows whose
|
|
62
|
+
* background-color is `rgba(0,0,0,0)` all the way up, so what is actually
|
|
63
|
+
* behind it is whatever the page paints — `bg-gray-50` = rgb(249,250,251) on
|
|
64
|
+
* the marketing-agents dashboard, against a token resolving to
|
|
65
|
+
* rgb(250,250,250). Sampled from the live page: delta (1,0,1).
|
|
66
|
+
*
|
|
67
|
+
* The hint cannot know its surface, so it must SHADE rather than MATCH. Every
|
|
68
|
+
* "fade the edge" snippet reaches for the background token, so guard the
|
|
69
|
+
* shape here; the visible-shading claim itself is carried by the pixel diff
|
|
70
|
+
* in examples/workflow-studio/scripts/measure-scrollers.mjs (delta 3 -> 35).
|
|
71
|
+
*/
|
|
72
|
+
it('shades the edge hint instead of trying to match an unknowable background', () => {
|
|
73
|
+
const edgeRules = TABLE_SCROLL_CSS.slice(TABLE_SCROLL_CSS.indexOf('.ss-table-edge-right'))
|
|
74
|
+
expect(edgeRules).toMatch(/linear-gradient/)
|
|
75
|
+
expect(edgeRules).not.toMatch(/--background/)
|
|
76
|
+
expect(edgeRules).toMatch(/--foreground/)
|
|
77
|
+
// A fully transparent stop at the inner end, so it reads as a fade and not
|
|
78
|
+
// as a hard 24px band.
|
|
79
|
+
expect(edgeRules).toMatch(/--foreground\)\s*\/\s*0\)/)
|
|
80
|
+
})
|
|
58
81
|
})
|
|
59
82
|
|
|
60
83
|
describe('Table', () => {
|
|
@@ -21,6 +21,48 @@ export const TABLE_EDGE_CLASS = 'ss-table-edge'
|
|
|
21
21
|
export const TABLE_EDGE_LEFT_CLASS = 'ss-table-edge-left'
|
|
22
22
|
export const TABLE_EDGE_RIGHT_CLASS = 'ss-table-edge-right'
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* The edge hint SHADES its surface; it must never try to MATCH it.
|
|
26
|
+
*
|
|
27
|
+
* It shipped as a fade to `hsl(var(--background))` and that is structurally
|
|
28
|
+
* unable to work: the hint is absolutely positioned over table rows whose
|
|
29
|
+
* `background-color` is `rgba(0,0,0,0)` for every level from the cell up to the
|
|
30
|
+
* shell, so it cannot know what is behind it. On the marketing-agents tenant
|
|
31
|
+
* what is behind it is the dashboard's `bg-gray-50` = rgb(249,250,251), while
|
|
32
|
+
* the token resolves to rgb(250,250,250) — MEASURED 2026-09-09 by sampling the
|
|
33
|
+
* live page: delta (1,0,1), a contrast ratio of 1.00:1. The hint rendered at
|
|
34
|
+
* the right size, in the right place, and mounted only while a side hid
|
|
35
|
+
* content — and was invisible (bd startsim-xe1uo). Its only visible effect was
|
|
36
|
+
* erasing whatever glyphs sat under it, so the affordance appeared or not
|
|
37
|
+
* depending on whether that row had text at the right, and never on the header
|
|
38
|
+
* band, a blank cell, or the gap between rows.
|
|
39
|
+
*
|
|
40
|
+
* That matters more than it sounds, because the hint is the ONLY affordance a
|
|
41
|
+
* reader at the header row can see: the scrollbar is at the bottom of a
|
|
42
|
+
* scroller as tall as the whole table, measured 2,741-5,994px below the
|
|
43
|
+
* truncation on the live tenant.
|
|
44
|
+
*
|
|
45
|
+
* `--foreground` at a low alpha inverts with the theme, so one rule shades
|
|
46
|
+
* both. Measured with the pixel diff in
|
|
47
|
+
* examples/workflow-studio/scripts/measure-scrollers.mjs, which scores only the
|
|
48
|
+
* pixels that were bare surface before the hint was drawn:
|
|
49
|
+
*
|
|
50
|
+
* hsl(var(--background)) on bg-gray-50 -> delta 3 (the old rule)
|
|
51
|
+
* hsl(var(--foreground) / 0.14) on bg-gray-50 -> delta 35
|
|
52
|
+
* hsl(var(--foreground) / 0.14) on a dark page -> delta 33
|
|
53
|
+
*
|
|
54
|
+
* Confirmed against the deployed tenant rather than assumed from the harness:
|
|
55
|
+
* its `--foreground` resolves to rgba(2,8,23,0.14) at this alpha, which over
|
|
56
|
+
* the surface sampled there (rgb(249,250,251)) composites to rgb(214,216,219)
|
|
57
|
+
* — per-channel 35/34/32.
|
|
58
|
+
*
|
|
59
|
+
* If this needs re-tuning, move the alpha — do NOT reintroduce a token that
|
|
60
|
+
* names a background, or the hint silently disappears again wherever a page
|
|
61
|
+
* paints itself a shade the token does not know about.
|
|
62
|
+
*/
|
|
63
|
+
const EDGE_SHADE = 'hsl(var(--foreground) / 0.14)'
|
|
64
|
+
const EDGE_SHADE_NONE = 'hsl(var(--foreground) / 0)'
|
|
65
|
+
|
|
24
66
|
/**
|
|
25
67
|
* Content scrolls, but on macOS nothing says so (startsim-5pq7h, 5pq7h.1).
|
|
26
68
|
*
|
|
@@ -51,7 +93,11 @@ export const TABLE_EDGE_RIGHT_CLASS = 'ss-table-edge-right'
|
|
|
51
93
|
* Firefox on macOS gains nothing from them anyway (measured 0px with
|
|
52
94
|
* `scrollbar-width: thin` applied and confirmed in the computed style), so
|
|
53
95
|
* there is no Firefox branch to lose. Firefox users are served by the edge
|
|
54
|
-
* hint below instead
|
|
96
|
+
* hint below instead — a claim that was FALSE as originally shipped, because
|
|
97
|
+
* the hint faded to the background token and was invisible (startsim-xe1uo,
|
|
98
|
+
* measured delta 3). It holds because {@link EDGE_SHADE} shades instead. If
|
|
99
|
+
* that ever goes back to matching a background, this paragraph goes with it
|
|
100
|
+
* and Firefox is left with nothing at all.
|
|
55
101
|
*
|
|
56
102
|
* 2. `width` IS LOAD-BEARING even though the defect that started this is
|
|
57
103
|
* horizontal. Declaring any `::-webkit-scrollbar` rule opts the element out
|
|
@@ -75,8 +121,14 @@ export const TABLE_EDGE_RIGHT_CLASS = 'ss-table-edge-right'
|
|
|
75
121
|
* or every narrow table in the fleet grows a dead bar.
|
|
76
122
|
*
|
|
77
123
|
* On Windows/Linux this REPLACES the ~15px classic bar with a 10px one; it does
|
|
78
|
-
* not reserve a second gutter, so no platform guard is needed.
|
|
79
|
-
*
|
|
124
|
+
* not reserve a second gutter, so no platform guard is needed. That was the one
|
|
125
|
+
* unmeasured line in this file until startsim-xe1uo; MEASURED 2026-09-09 in
|
|
126
|
+
* headful Linux Chromium (classic scrollbars, negative control 15px with this
|
|
127
|
+
* sheet disabled) on the live tenant, it holds — no double gutter — at the cost
|
|
128
|
+
* of a bar 5px thinner and, at `currentColor` 22%, fainter than the platform's
|
|
129
|
+
* own. Weigh that if this ever gets tuned; it is not what sent the bead back.
|
|
130
|
+
* Nothing here animates or transitions, so `prefers-reduced-motion` has nothing
|
|
131
|
+
* to honour.
|
|
80
132
|
*
|
|
81
133
|
* ONE stylesheet, ONE id, ONE string: `ensureInjectedStyle` rewrites the sheet
|
|
82
134
|
* when an existing id carries different text, so two call sites shipping
|
|
@@ -114,11 +166,11 @@ export const SCROLL_AFFORDANCE_CSS = `
|
|
|
114
166
|
}
|
|
115
167
|
.${TABLE_EDGE_RIGHT_CLASS} {
|
|
116
168
|
right: 0;
|
|
117
|
-
background-image: linear-gradient(to left,
|
|
169
|
+
background-image: linear-gradient(to left, ${EDGE_SHADE}, ${EDGE_SHADE_NONE});
|
|
118
170
|
}
|
|
119
171
|
.${TABLE_EDGE_LEFT_CLASS} {
|
|
120
172
|
left: 0;
|
|
121
|
-
background-image: linear-gradient(to right,
|
|
173
|
+
background-image: linear-gradient(to right, ${EDGE_SHADE}, ${EDGE_SHADE_NONE});
|
|
122
174
|
}
|
|
123
175
|
`.trim()
|
|
124
176
|
|