@terpjs/react-core 0.17.0 → 0.18.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/package.json +2 -2
- package/src/styles.test.ts +11 -5
- package/src/styles.ts +52 -38
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@terpjs/react-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Terp React stack core — typed @terpjs/contract client provider, auth session, capability gates, TanStack Router adapter, app shell, page archetypes, DataView and token-styled UI primitives. First frontend stack; see README.md for the component catalog.",
|
|
6
6
|
"exports": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@tanstack/react-router": "^1.170.16",
|
|
17
|
-
"@terpjs/contract": "^0.
|
|
17
|
+
"@terpjs/contract": "^0.18.0"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"react": "^19.0.0",
|
package/src/styles.test.ts
CHANGED
|
@@ -1446,12 +1446,18 @@ describe("cascade structure", () => {
|
|
|
1446
1446
|
// and each of the six set cursor inline until it migrated. The day a calendar arrow gains
|
|
1447
1447
|
// a min/max bound, this answer changes back.
|
|
1448
1448
|
'[data-terp="iconbutton"]:disabled',
|
|
1449
|
-
// HubPage was the condition for
|
|
1450
|
-
// form: hubcard-body's border
|
|
1451
|
-
//
|
|
1452
|
-
//
|
|
1449
|
+
// HubPage was the condition for this one, and it was the condition in the strongest
|
|
1450
|
+
// form: hubcard-body's border was declared inline on the very element this selector
|
|
1451
|
+
// matches, so no layered rule could reach it at any specificity. That surface comes from
|
|
1452
|
+
// terp.base now.
|
|
1453
|
+
//
|
|
1454
|
+
// Its twin was here until the hub card's hover state came down to the edge alone. The
|
|
1455
|
+
// title's accent colour faced the same inline declaration and retired the same way, so it
|
|
1456
|
+
// belonged in this list on the same evidence — but the selector itself is gone now, and a
|
|
1457
|
+
// rule that does not exist cannot witness anything. Dropping it costs no coverage: the
|
|
1458
|
+
// escalation it stood for retired for a reason this list still records once, in the entry
|
|
1459
|
+
// above, since both halves faced the same inline consumer in the same file.
|
|
1453
1460
|
'[data-terp="hubcard"]:hover [data-terp="hubcard-body"]',
|
|
1454
|
-
'[data-terp="hubcard"]:hover [data-terp="hubcard-title"]',
|
|
1455
1461
|
// AppShell's, and it blocked these two on its own: toggleStyle declared background and
|
|
1456
1462
|
// colour inline on the shell's two toggles, the last elements wearing the icon-button
|
|
1457
1463
|
// marker able to out-rank a layered rule. Their resting look is a scoped base rule now,
|
package/src/styles.ts
CHANGED
|
@@ -2354,17 +2354,16 @@ textarea[data-terp="input"] {
|
|
|
2354
2354
|
through an ancestor. hub-card-bare is what catches this one, and only because its full
|
|
2355
2355
|
card is deliberately long enough to set the row height.
|
|
2356
2356
|
|
|
2357
|
-
The transition
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2357
|
+
The transition is ONE property on ONE element, and it used to be three across three.
|
|
2358
|
+
box-shadow and transform animated on the card and colour on the title, because the hover
|
|
2359
|
+
state lifted the card a pixel, gave it a shadow and took the title to accent alongside the
|
|
2360
|
+
edge. The movement is gone (see the state rules for why), and with it both of the card's
|
|
2361
|
+
transitions and the title's — a transition whose property nothing changes is dead weight
|
|
2362
|
+
that reads as a live intention. What remains is the body's border-color, declared on the
|
|
2363
|
+
element that owns the border. */
|
|
2362
2364
|
[data-terp="hubcard"] {
|
|
2363
2365
|
height: 100%;
|
|
2364
2366
|
min-height: 0;
|
|
2365
|
-
transition:
|
|
2366
|
-
box-shadow var(--motion-duration-fast) var(--motion-easing-standard),
|
|
2367
|
-
transform var(--motion-duration-fast) var(--motion-easing-standard);
|
|
2368
2367
|
}
|
|
2369
2368
|
[data-terp="hubcard-body"] {
|
|
2370
2369
|
display: grid;
|
|
@@ -2407,7 +2406,6 @@ textarea[data-terp="input"] {
|
|
|
2407
2406
|
color: var(--color-neutral-900);
|
|
2408
2407
|
font-size: var(--font-size-base);
|
|
2409
2408
|
font-weight: var(--font-weight-semibold);
|
|
2410
|
-
transition: color var(--motion-duration-fast) var(--motion-easing-standard);
|
|
2411
2409
|
}
|
|
2412
2410
|
/* neutral-600 rather than fg-muted, and it is not the tinted-surface case: this text
|
|
2413
2411
|
sits on the card's own neutral-0 and measures 7.58 / 7.94 / 7.50 / 7.60 / 18.42. */
|
|
@@ -4494,30 +4492,42 @@ button[data-terp="input"][data-placeholder="true"] {
|
|
|
4494
4492
|
}
|
|
4495
4493
|
|
|
4496
4494
|
/* Hub cards --------------------------------------------------------------- */
|
|
4497
|
-
/* The hover
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4495
|
+
/* The hover state is the accent edge, and nothing else.
|
|
4496
|
+
|
|
4497
|
+
It was four declarations over three elements: the card lifted a pixel and took a shadow,
|
|
4498
|
+
the body's border went accent, the title's colour went with it. The lift is what people
|
|
4499
|
+
actually noticed, and not kindly. A hub is a grid of large targets, so a pointer on its way
|
|
4500
|
+
to one card sweeps across every card between here and there, and each one twitched as it
|
|
4501
|
+
passed — motion reporting the cursor's position, which the cursor already reports. Movement
|
|
4502
|
+
in an interface should say something the still frame cannot; this said nothing, on a surface
|
|
4503
|
+
that shows several of itself at once. The shadow went with it rather than separately: a
|
|
4504
|
+
1px rise and a 1px shadow are one effect, elevation, and half of an elevation reads as a
|
|
4505
|
+
rendering fault rather than as restraint.
|
|
4506
|
+
|
|
4507
|
+
That leaves the edge to carry the whole state, and it is enough to: accent against
|
|
4508
|
+
neutral-200 is the same signal the rest of the sheet uses for is-this-one, it lands on the
|
|
4509
|
+
element the pointer is actually over, and it moves no layout. The title's accent came off
|
|
4510
|
+
with it — not because it was objectionable, but because two properties saying one thing is
|
|
4511
|
+
how a hover state grows back into four.
|
|
4512
|
+
|
|
4513
|
+
The edge recolours hubcard-BODY, not the card, and that distinction is the reason this rule
|
|
4514
|
+
was dead for as long as it was. It used to set border-color on [data-terp="hubcard"], the
|
|
4515
|
+
outer <li>, which has no border at all: HubPage puts the visible edge on the inner
|
|
4516
|
+
hubcard-body span. Measured in a browser rather than reasoned about, because no baseline
|
|
4517
|
+
captures a hover — the li computed border 0px none at rest and 0px none in the accent colour
|
|
4518
|
+
on hover, while the shadow and the transform, being on the element that could take them, did
|
|
4519
|
+
apply. So through that whole period the hover was a lift with no edge, the exact inverse of
|
|
4520
|
+
what it is now.
|
|
4521
|
+
|
|
4522
|
+
THE ESCALATION IS GONE, and this file was the condition for it. hubcard-body's border was
|
|
4523
|
+
declared inline in HubPage, on the very element this selector matches, so no layered rule
|
|
4524
|
+
could reach it at any specificity. That surface takes its base from terp.base now, so layer
|
|
4525
|
+
order alone is enough. The title's colour was the same story and retired the same way; its
|
|
4526
|
+
hover half is gone with the rest of the state, so one of the seven is now moot rather than
|
|
4527
|
+
merely retired. */
|
|
4515
4528
|
[data-terp="hubcard"]:hover [data-terp="hubcard-body"] {
|
|
4516
4529
|
border-color: var(--color-fg-accent);
|
|
4517
4530
|
}
|
|
4518
|
-
[data-terp="hubcard"]:hover [data-terp="hubcard-title"] {
|
|
4519
|
-
color: var(--color-fg-accent);
|
|
4520
|
-
}
|
|
4521
4531
|
|
|
4522
4532
|
/* Which layout is active, expressed as more than a wash. terp.state, and keyed on the
|
|
4523
4533
|
real ARIA attribute — the [data-terp="tab"][aria-selected="true"] precedent — and the
|
|
@@ -4781,14 +4791,18 @@ button[data-terp="input"][data-placeholder="true"] {
|
|
|
4781
4791
|
THE LAST ESCALATION IN THE SHEET IS GONE, and it was the widest. Its
|
|
4782
4792
|
consumers were the three inline transitions left in the package: the shell's
|
|
4783
4793
|
nav-link transition (NAV_LINK_STYLE), the hub card title's (titleTextStyle)
|
|
4784
|
-
and the sidebar's own transition: width. The first
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4794
|
+
and the sidebar's own transition: width. The first became a rule; the second
|
|
4795
|
+
became a rule and has since gone entirely, with the title's hover colour that
|
|
4796
|
+
was its only reason to exist; the third was the documented escape — the aside
|
|
4797
|
+
carried no marker, so nothing here matched it and a reduced-motion user
|
|
4798
|
+
watched the rail animate — and it is closed by the sidebar taking a marker and
|
|
4799
|
+
its width becoming a rule. With no style attribute left to out-shout, layer
|
|
4800
|
+
order alone wins: terp.motion sits above terp.base and terp.state, so
|
|
4801
|
+
transition: none needs nothing shouted. Measured, not assumed: under
|
|
4802
|
+
prefers-reduced-motion the sidebar, a nav link and a hub card BODY all compute
|
|
4803
|
+
transition-duration 0s. The body rather than the title, and the swap is the
|
|
4804
|
+
point rather than a tidy-up: the title has no transition to suppress any more,
|
|
4805
|
+
so asserting 0s on it would pass against a default and witness nothing. */
|
|
4792
4806
|
@media (prefers-reduced-motion: reduce) {
|
|
4793
4807
|
[data-terp],
|
|
4794
4808
|
[data-terp="appshell-nav"] a,
|