@newtone-dev/ui-react-web 0.30.0 → 0.32.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/dist/drawer/drawer.d.ts +9 -0
- package/dist/drawer/drawer.d.ts.map +1 -0
- package/dist/drawer/drawer.js +36 -0
- package/dist/drawer/drawer.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/navbar/navbar.css +2 -2
- package/dist/navbar/navbar.d.ts +2 -2
- package/dist/navbar/navbar.d.ts.map +1 -1
- package/dist/navbar/navbar.js +5 -24
- package/dist/navbar/navbar.js.map +1 -1
- package/dist/shell/context.d.ts +14 -0
- package/dist/shell/context.d.ts.map +1 -0
- package/dist/shell/context.js +10 -0
- package/dist/shell/context.js.map +1 -0
- package/dist/shell/header/header.d.ts +12 -0
- package/dist/shell/header/header.d.ts.map +1 -0
- package/dist/shell/header/header.js +10 -0
- package/dist/shell/header/header.js.map +1 -0
- package/dist/shell/index.d.ts +7 -0
- package/dist/shell/index.d.ts.map +1 -0
- package/dist/shell/index.js +4 -0
- package/dist/shell/index.js.map +1 -0
- package/dist/shell/panel/panel.d.ts +11 -0
- package/dist/shell/panel/panel.d.ts.map +1 -0
- package/dist/shell/panel/panel.js +9 -0
- package/dist/shell/panel/panel.js.map +1 -0
- package/dist/shell/panel-link/panel-link.d.ts +14 -0
- package/dist/shell/panel-link/panel-link.d.ts.map +1 -0
- package/dist/shell/panel-link/panel-link.js +16 -0
- package/dist/shell/panel-link/panel-link.js.map +1 -0
- package/dist/shell/shell.css +241 -0
- package/dist/shell/shell.d.ts +66 -0
- package/dist/shell/shell.d.ts.map +1 -0
- package/dist/shell/shell.js +82 -0
- package/dist/shell/shell.js.map +1 -0
- package/dist/shell/toggle/toggle.d.ts +15 -0
- package/dist/shell/toggle/toggle.d.ts.map +1 -0
- package/dist/shell/toggle/toggle.js +13 -0
- package/dist/shell/toggle/toggle.js.map +1 -0
- package/dist/{page → site}/band.d.ts +8 -8
- package/dist/{page → site}/band.d.ts.map +1 -1
- package/dist/{page → site}/band.js +12 -12
- package/dist/{page → site}/band.js.map +1 -1
- package/dist/{page → site}/footer.d.ts +11 -11
- package/dist/{page → site}/footer.d.ts.map +1 -1
- package/dist/site/footer.js +30 -0
- package/dist/{page → site}/footer.js.map +1 -1
- package/dist/site/index.d.ts +5 -0
- package/dist/{page → site}/index.d.ts.map +1 -1
- package/dist/site/index.js +8 -0
- package/dist/{page → site}/index.js.map +1 -1
- package/dist/{page/page.css → site/site.css} +70 -68
- package/dist/{page/page.d.ts → site/site.d.ts} +29 -27
- package/dist/site/site.d.ts.map +1 -0
- package/dist/{page/page.js → site/site.js} +17 -17
- package/dist/site/site.js.map +1 -0
- package/dist/text/selection-paint.d.ts +1 -1
- package/dist/text/selection-paint.js +1 -1
- package/package.json +10 -5
- package/dist/page/footer.js +0 -30
- package/dist/page/index.d.ts +0 -5
- package/dist/page/index.js +0 -8
- package/dist/page/page.d.ts.map +0 -1
- package/dist/page/page.js.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Text } from '../text/index.js';
|
|
3
|
+
import { Link } from '../link/index.js';
|
|
4
|
+
import { Children } from 'react';
|
|
5
|
+
/**
|
|
6
|
+
* The upper block is the brand beside a `nav` of the columns, and the rule is its bottom border;
|
|
7
|
+
* the bar follows. Children are sorted by type rather than by a slot prop so a site writes them in
|
|
8
|
+
* reading order.
|
|
9
|
+
*/
|
|
10
|
+
export function SiteFooter({ children }) {
|
|
11
|
+
const items = Children.toArray(children);
|
|
12
|
+
const isType = (c, t) => typeof c === 'object' && c !== null && c.type === t;
|
|
13
|
+
const brand = items.filter((c) => isType(c, SiteFooterBrand));
|
|
14
|
+
const columns = items.filter((c) => isType(c, SiteFooterColumn));
|
|
15
|
+
const bar = items.filter((c) => isType(c, SiteFooterBar));
|
|
16
|
+
return (_jsxs("div", { className: "newtone-site-footer-body", children: [_jsxs("div", { className: "newtone-site-footer-top", children: [brand, columns.length > 0 ? (_jsx("nav", { className: "newtone-site-footer-nav", "aria-label": "Site", children: columns })) : null] }), bar] }));
|
|
17
|
+
}
|
|
18
|
+
export function SiteFooterBrand({ href, label, mark, children }) {
|
|
19
|
+
return (_jsxs("div", { className: "newtone-site-footer-brand", children: [_jsx("a", { href: href, className: "newtone-site-footer-brand-link", "aria-label": label, children: mark }), children ? (_jsx(Text, { as: "div", scale: "body", className: "newtone-site-footer-contact", children: children })) : null] }));
|
|
20
|
+
}
|
|
21
|
+
export function SiteFooterColumn({ title, children }) {
|
|
22
|
+
return (_jsxs("div", { className: "newtone-site-footer-column", children: [_jsx(Text, { as: "h2", scale: "eyebrow", case: "upper", className: "newtone-site-footer-title", children: title }), _jsx("ul", { className: "newtone-site-footer-list", children: children })] }));
|
|
23
|
+
}
|
|
24
|
+
export function SiteFooterLink({ href, children }) {
|
|
25
|
+
return (_jsx("li", { children: _jsx(Text, { as: "span", scale: "body", children: _jsx(Link, { variant: "standalone", href: href, children: children }) }) }));
|
|
26
|
+
}
|
|
27
|
+
export function SiteFooterBar({ copyright, children }) {
|
|
28
|
+
return (_jsxs("div", { className: "newtone-site-footer-bar", children: [copyright ? (_jsx(Text, { as: "p", scale: "caption", className: "newtone-site-footer-quiet", children: copyright })) : null, children ? (_jsx(Text, { as: "div", scale: "caption", className: "newtone-site-footer-small", children: children })) : null] }));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=footer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.js","sourceRoot":"","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"footer.js","sourceRoot":"","sources":["../../src/site/footer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MA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N,CACT,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Site } from './site.js';
|
|
2
|
+
export type { SiteProps } from './site.js';
|
|
3
|
+
export type { SiteBandProps } from './band.js';
|
|
4
|
+
export type { SiteFooterProps, SiteFooterBrandProps, SiteFooterColumnProps, SiteFooterLinkProps, SiteFooterBarProps, } from './footer.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/site/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAC1C,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAC9C,YAAY,EACR,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,GACrB,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// The door. `Site`, and the band's prop type -- but not the band.
|
|
2
|
+
//
|
|
3
|
+
// The band is reachable only as `Site.Band`, for the reason navbar/index.ts gives about its own
|
|
4
|
+
// parts: a band outside a page is not a thing. It reads `--newtone-site-max-inline-size` and
|
|
5
|
+
// `--newtone-site-gutter`, both declared on `.newtone-site`, and outside one it resolves neither.
|
|
6
|
+
// The dotted name says that at the call site.
|
|
7
|
+
export { Site } from './site.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/site/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,EAAE;AACF,gGAAgG;AAChG,6FAA6F;AAC7F,kGAAkG;AAClG,8CAA8C;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/* The page's own rules: two grounds, two hairlines drawn two ways, and one band that paints past
|
|
2
2
|
its own box.
|
|
3
3
|
*
|
|
4
|
-
* Every colour here is a
|
|
5
|
-
*
|
|
4
|
+
* Every colour here is a ROLE, read directly: there is no `site.*` group, because every value the old
|
|
5
|
+
* `page.*` group held was a bare role alias (DECISIONS 2026-10-09, a component reads the roles and a
|
|
6
|
+
* slice is earned). Elevation is what tells the regions apart -- the footer is `deep` by default.
|
|
7
|
+
* Nothing names another component's group -- production/newtone/ui_react-web/_blueprint/index.md section 5. The bar's colour is the bar's, which
|
|
6
8
|
* is why the strip above the bar is painted in navbar.css and not here.
|
|
7
9
|
*
|
|
8
10
|
* One literal: `1px`, for the hairline the gap leaves. Border WIDTH has no core scale to point at --
|
|
@@ -26,19 +28,19 @@
|
|
|
26
28
|
*
|
|
27
29
|
* THE GROUND IS PAINTED HERE EVEN THOUGH THE BODY COVERS IT. A page with no navbar and no footer is
|
|
28
30
|
* one grid row of body, and a page rendered before its own stylesheet has loaded is neither -- what
|
|
29
|
-
* this rule buys is that `.newtone-
|
|
31
|
+
* this rule buys is that `.newtone-site` is never a hole, which is the same fact card-box.css states
|
|
30
32
|
* about a `Surface` deciding a colour and not applying one. */
|
|
31
|
-
.newtone-
|
|
33
|
+
.newtone-site {
|
|
32
34
|
display: grid;
|
|
33
35
|
grid-template-rows: auto 1fr;
|
|
34
36
|
min-block-size: 100dvh;
|
|
35
|
-
background: var(--newtone-
|
|
37
|
+
background: var(--newtone-role-surface-primary);
|
|
36
38
|
|
|
37
39
|
/* ---- the gutter, and the tighter one a phone gets ---------------------
|
|
38
40
|
*
|
|
39
41
|
* 64 / 32 / 16, which is the ladder four consuming sites had each written for themselves.
|
|
40
42
|
* Joshua, 2026-09-21: *"The page padding on websites should be 64 on desktop, 32px on tablet and
|
|
41
|
-
* 16px on mobile."* production/newtone/ui_react-web/_blueprint/components/
|
|
43
|
+
* 16px on mobile."* production/newtone/ui_react-web/_blueprint/components/site.md, *The
|
|
42
44
|
* gutter*.
|
|
43
45
|
*
|
|
44
46
|
* IT IS CSS AND NOT A TOKEN, AND THAT IS FORCED. A media query condition cannot read a custom
|
|
@@ -51,20 +53,20 @@
|
|
|
51
53
|
* substituted where it is used, so above a phone the two are the same length BY CONSTRUCTION --
|
|
52
54
|
* not by two expressions agreeing to the pixel through a ramp. The difference can only ever be
|
|
53
55
|
* non-zero in the one band somebody chose. */
|
|
54
|
-
--newtone-
|
|
55
|
-
--newtone-
|
|
56
|
+
--newtone-site-gutter: var(--newtone-space-16);
|
|
57
|
+
--newtone-site-gutter-tight: var(--newtone-site-gutter);
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
@media (max-width: 80rem) {
|
|
59
|
-
.newtone-
|
|
60
|
-
--newtone-
|
|
61
|
+
.newtone-site {
|
|
62
|
+
--newtone-site-gutter: var(--newtone-space-8);
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
@media (max-width: 48rem) {
|
|
65
|
-
.newtone-
|
|
66
|
-
--newtone-
|
|
67
|
-
--newtone-
|
|
67
|
+
.newtone-site {
|
|
68
|
+
--newtone-site-gutter: var(--newtone-space-4);
|
|
69
|
+
--newtone-site-gutter-tight: var(--newtone-space-2);
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
72
|
|
|
@@ -89,8 +91,8 @@
|
|
|
89
91
|
*
|
|
90
92
|
* ON THE CONTAINER, NEVER ON THE CARD. A row takes it and the cards inside keep their own boxes; on
|
|
91
93
|
* a `CardBox` it would move that card's border and leave its neighbour's where it was. */
|
|
92
|
-
.newtone-
|
|
93
|
-
margin-inline: calc(var(--newtone-
|
|
94
|
+
.newtone-site-tight {
|
|
95
|
+
margin-inline: calc(var(--newtone-site-gutter-tight) - var(--newtone-site-gutter));
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
/* ---- the body, which is the second hairline -----------------------------
|
|
@@ -107,26 +109,26 @@
|
|
|
107
109
|
* `1fr auto` PUTS THE FOOTER ON THE BOTTOM OF A SHORT PAGE. With one child -- no footer -- the gap
|
|
108
110
|
* draws nothing and the row list has nothing to place, so a site with no footer gets no second
|
|
109
111
|
* hairline by construction rather than by a modifier class. */
|
|
110
|
-
.newtone-
|
|
112
|
+
.newtone-site-body {
|
|
111
113
|
display: grid;
|
|
112
114
|
grid-template-rows: 1fr auto;
|
|
113
115
|
gap: 1px;
|
|
114
|
-
background: var(--newtone-
|
|
116
|
+
background: var(--newtone-role-divider);
|
|
115
117
|
}
|
|
116
118
|
|
|
117
119
|
/* `min-inline-size: 0` IS NOT DECORATION. A grid item's automatic minimum size is its content, so a
|
|
118
120
|
wide child -- a table, a code block, a long unbroken string -- makes this row wider than the page
|
|
119
121
|
and the whole document scrolls sideways. It is the one thing a shell owes a page whose contents it
|
|
120
122
|
cannot see. */
|
|
121
|
-
.newtone-
|
|
123
|
+
.newtone-site-main {
|
|
122
124
|
min-inline-size: 0;
|
|
123
|
-
background: var(--newtone-
|
|
125
|
+
background: var(--newtone-role-surface-primary);
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
/* ---- the footer, and the paint below it ---------------------------------
|
|
127
129
|
*
|
|
128
130
|
* THE GROUND IS THE SAME TOKEN AS THE MAIN REGION'S AND RESOLVES TO A DIFFERENT COLOUR. This element
|
|
129
|
-
* is a `Surface`, so `--newtone-
|
|
131
|
+
* is a `Surface`, so `--newtone-role-surface-primary` resolves at ITS elevation: the page's rung when the
|
|
130
132
|
* caller passed no `footerElevation`, one below when they passed `deep`. There is no second token,
|
|
131
133
|
* because a `page.footer-ground` would be a name for a value the cascade already computes and the
|
|
132
134
|
* two would agree at `base` and diverge nowhere a test looks.
|
|
@@ -150,10 +152,10 @@
|
|
|
150
152
|
* a `::after` at `inset-block-start: 100%` adds a screenful of scrollable height to the document, a
|
|
151
153
|
* reader can scroll into empty paint, and every `100dvh` on the page still looks right. A shadow
|
|
152
154
|
* affects no layout at all. `node tools/check-page-paint.mjs <url>` is that measurement. */
|
|
153
|
-
.newtone-
|
|
155
|
+
.newtone-site-footer {
|
|
154
156
|
min-inline-size: 0;
|
|
155
|
-
background: var(--newtone-
|
|
156
|
-
box-shadow: 0 100vh 0 100vh var(--newtone-
|
|
157
|
+
background: var(--newtone-role-surface-primary);
|
|
158
|
+
box-shadow: 0 100vh 0 100vh var(--newtone-role-surface-primary);
|
|
157
159
|
}
|
|
158
160
|
|
|
159
161
|
/* ---- the track ----------------------------------------------------------
|
|
@@ -163,14 +165,14 @@
|
|
|
163
165
|
* knowledge/the-width-ladder.md already describes for a bar whose colour does.
|
|
164
166
|
*
|
|
165
167
|
* `max-inline-size` READS A CUSTOM PROPERTY FROM 2026-09-21 LATE, where it was an inline style on
|
|
166
|
-
* the one track the component rendered. `
|
|
167
|
-
* `.newtone-
|
|
168
|
+
* the one track the component rendered. `Site` declares `--newtone-site-max-inline-size` on
|
|
169
|
+
* `.newtone-site` only when a caller passed a cap, and the `none` below is what an uncapped page
|
|
168
170
|
* resolves -- so an uncapped track computes exactly the box it computed before the prop existed.
|
|
169
171
|
*
|
|
170
|
-
* IT HAD TO MOVE BECAUSE A BAND'S TRACK IS A CHILD THE CONSUMER RENDERS. `
|
|
171
|
-
* the call site, so `
|
|
172
|
+
* IT HAD TO MOVE BECAUSE A BAND'S TRACK IS A CHILD THE CONSUMER RENDERS. `Site.Band` is written at
|
|
173
|
+
* the call site, so `Site` cannot hand it an inline style. The two alternatives are both worse: a
|
|
172
174
|
* React context makes every band a CLIENT COMPONENT, and a prop per band is one number typed once
|
|
173
|
-
* per section. components/
|
|
175
|
+
* per section. components/site.md, *The cap is a custom property now*.
|
|
174
176
|
*
|
|
175
177
|
* THE CONSUMER STILL DECLARES NO NEWTONE PROPERTY, which is the half of issue 201's rule that binds.
|
|
176
178
|
* A site passes `maxInlineSize`; the library does the declaring, the same way it declares the gutter
|
|
@@ -188,18 +190,18 @@
|
|
|
188
190
|
* the one other place this library promises a measurement: a cap of 110rem that silently became 110rem
|
|
189
191
|
* PLUS two gutters would be the component resting its arithmetic on a reset it cannot see. Four of
|
|
190
192
|
* the six consuming sites carry one; the consumer this breaks for is the one nobody has written. */
|
|
191
|
-
.newtone-
|
|
193
|
+
.newtone-site-track {
|
|
192
194
|
box-sizing: border-box;
|
|
193
195
|
margin-inline: auto;
|
|
194
196
|
inline-size: 100%;
|
|
195
|
-
max-inline-size: var(--newtone-
|
|
196
|
-
padding-inline: var(--newtone-
|
|
197
|
+
max-inline-size: var(--newtone-site-max-inline-size, none);
|
|
198
|
+
padding-inline: var(--newtone-site-gutter);
|
|
197
199
|
}
|
|
198
200
|
|
|
199
201
|
/* ---- the band -----------------------------------------------------------
|
|
200
202
|
*
|
|
201
203
|
* A SECTION THAT REACHES BOTH SCREEN EDGES, WITH THE CAPPED TRACK INSIDE IT. Added 2026-09-21 late
|
|
202
|
-
* -- components/
|
|
204
|
+
* -- components/site.md, *The band*. Joshua: *"she should have clear edge to edge sections."*
|
|
203
205
|
*
|
|
204
206
|
* WHY THIS ELEMENT DECLARES ALMOST NOTHING. It is a `Surface`, so its ground, its text colours and
|
|
205
207
|
* everything under it come from the facets the caller forwarded; what it adds is the one thing a
|
|
@@ -207,19 +209,19 @@
|
|
|
207
209
|
* `<main>` is a grid item and this is an ordinary block inside it, so full width is what it already
|
|
208
210
|
* gets -- the rule below exists for `min-inline-size`, not for the width.
|
|
209
211
|
*
|
|
210
|
-
* `min-inline-size: 0` FOR THE SAME REASON `.newtone-
|
|
212
|
+
* `min-inline-size: 0` FOR THE SAME REASON `.newtone-site-main` HAS IT, one level down: a band holds
|
|
211
213
|
* whatever a page hands it, and a wide unbreakable child would otherwise push the band past the page
|
|
212
214
|
* and scroll the document sideways. The main region's own copy does not cover this, because that
|
|
213
215
|
* rule protects the grid ROW and this one protects the band's own box.
|
|
214
216
|
*
|
|
215
|
-
* IT PAINTS `--newtone-
|
|
217
|
+
* IT PAINTS `--newtone-role-surface-primary` AND IT HAS TO, BECAUSE A SURFACE DECIDES A COLOUR AND DOES NOT
|
|
216
218
|
* APPLY ONE. The facets re-point every role token under this element; painting is the element's own
|
|
217
219
|
* job.
|
|
218
220
|
*
|
|
219
221
|
* THIS RULE SHIPPED WITHOUT THE DECLARATION FOR EXACTLY ONE MEASUREMENT, and the comment that stood
|
|
220
222
|
* here argued for its absence -- that painting would *"make every band opaque at the page's rung and
|
|
221
223
|
* silently break the nested-Surface resolution that `footerElevation` is built on"*. THAT IS BACKWARDS.
|
|
222
|
-
* `--newtone-
|
|
224
|
+
* `--newtone-role-surface-primary` read inside a Surface resolves at THAT Surface's facets, which is the very
|
|
223
225
|
* mechanism `footerElevation` runs on: the footer paints this same token and comes back one rung
|
|
224
226
|
* below. A band with no facets paints the page's own colour and is invisible as a band, which is what
|
|
225
227
|
* a page of one band wants.
|
|
@@ -233,40 +235,40 @@
|
|
|
233
235
|
* AND THERE IS NO DIVIDER RULE. A band that changes ground IS the separator; two bands that do not
|
|
234
236
|
* are two paragraphs. governance/code/one-page-shows-two-dividers-and-names-where-each-one-comes-from.md
|
|
235
237
|
* is parked on the question, and a page of five bands still resolves the divider colour on exactly
|
|
236
|
-
* two elements -- which is the check in components/
|
|
237
|
-
.newtone-
|
|
238
|
+
* two elements -- which is the check in components/site.md, unchanged by any of this. */
|
|
239
|
+
.newtone-site-band {
|
|
238
240
|
min-inline-size: 0;
|
|
239
|
-
background: var(--newtone-
|
|
241
|
+
background: var(--newtone-role-surface-primary);
|
|
240
242
|
}
|
|
241
243
|
|
|
242
244
|
/* ---- the band's ink, its rhythm and the fold, 0.26.0 --------------------------------------------
|
|
243
|
-
components/
|
|
245
|
+
components/site.md, *The band's rhythm, its ink, the fold, and the footer's parts*. */
|
|
244
246
|
|
|
245
247
|
/* ONE SCREENFUL UNDER THE BAR AND ITS HAIRLINE. Three sites wrote this by hand, two of them reading
|
|
246
248
|
the navbar's group to do it (issue 243); the library reads its own sibling's length once, here. */
|
|
247
|
-
.newtone-
|
|
248
|
-
--newtone-
|
|
249
|
+
.newtone-site {
|
|
250
|
+
--newtone-site-fold-block-size: calc(100dvh - var(--newtone-navbar-min-block-size) - 1px);
|
|
249
251
|
}
|
|
250
252
|
|
|
251
253
|
/* A BAND WRITES ITS INK AS WELL AS ITS GROUND, so a band on `strong` or `emphasis` resolves its own
|
|
252
254
|
text color instead of inheriting the page's (issue 287). The footer is the same box. */
|
|
253
|
-
.newtone-
|
|
254
|
-
.newtone-
|
|
255
|
-
color: var(--newtone-
|
|
255
|
+
.newtone-site-band,
|
|
256
|
+
.newtone-site-footer {
|
|
257
|
+
color: var(--newtone-role-text-primary);
|
|
256
258
|
}
|
|
257
259
|
|
|
258
260
|
/* THE RHYTHM IS ON THE TRACK, AND ONLY WHEN A BAND ASKS. A flex column does not collapse its
|
|
259
261
|
children's margins, which is why the class is opt-in until 0.27.0 rather than on every track. */
|
|
260
|
-
.newtone-
|
|
262
|
+
.newtone-site-track--flow {
|
|
261
263
|
display: flex;
|
|
262
264
|
flex-direction: column;
|
|
263
|
-
gap: var(--newtone-
|
|
264
|
-
padding-block: var(--newtone-
|
|
265
|
+
gap: var(--newtone-site-band-gap, 0);
|
|
266
|
+
padding-block: var(--newtone-site-band-padding, 0);
|
|
265
267
|
}
|
|
266
268
|
|
|
267
|
-
.newtone-
|
|
269
|
+
.newtone-site-track--fold {
|
|
268
270
|
box-sizing: border-box;
|
|
269
|
-
min-block-size: var(--newtone-
|
|
271
|
+
min-block-size: var(--newtone-site-fold-block-size);
|
|
270
272
|
justify-content: center;
|
|
271
273
|
}
|
|
272
274
|
|
|
@@ -274,59 +276,59 @@
|
|
|
274
276
|
ADENARIO'S NUMBERS, as Andrea's and Fluxus's copies of them were. They are literals because there
|
|
275
277
|
is no space token for a viewport-scaled length, and this is now the one copy. */
|
|
276
278
|
|
|
277
|
-
.newtone-
|
|
279
|
+
.newtone-site-footer-body {
|
|
278
280
|
padding-block: clamp(3rem, 8vh, 5rem) clamp(2.5rem, 6vh, 4rem);
|
|
279
281
|
}
|
|
280
282
|
|
|
281
|
-
.newtone-
|
|
283
|
+
.newtone-site-footer-top {
|
|
282
284
|
display: grid;
|
|
283
285
|
grid-template-columns: minmax(14rem, 20rem) 1fr;
|
|
284
286
|
gap: clamp(2.5rem, 6vw, 6rem);
|
|
285
287
|
align-items: start;
|
|
286
288
|
padding-block-end: clamp(2.5rem, 6vh, 4rem);
|
|
287
|
-
border-block-end: 1px solid var(--newtone-
|
|
289
|
+
border-block-end: 1px solid var(--newtone-role-divider);
|
|
288
290
|
}
|
|
289
291
|
|
|
290
|
-
.newtone-
|
|
292
|
+
.newtone-site-footer-brand {
|
|
291
293
|
display: flex;
|
|
292
294
|
flex-direction: column;
|
|
293
295
|
align-items: flex-start;
|
|
294
296
|
gap: var(--newtone-space-3);
|
|
295
297
|
}
|
|
296
298
|
|
|
297
|
-
.newtone-
|
|
299
|
+
.newtone-site-footer-brand-link {
|
|
298
300
|
display: inline-flex;
|
|
299
301
|
align-items: center;
|
|
300
|
-
color: var(--newtone-
|
|
302
|
+
color: var(--newtone-role-text-accent);
|
|
301
303
|
text-decoration: none;
|
|
302
304
|
}
|
|
303
305
|
|
|
304
|
-
.newtone-
|
|
306
|
+
.newtone-site-footer-contact {
|
|
305
307
|
display: flex;
|
|
306
308
|
flex-direction: column;
|
|
307
309
|
gap: var(--newtone-space-2);
|
|
308
310
|
}
|
|
309
311
|
|
|
310
|
-
.newtone-
|
|
312
|
+
.newtone-site-footer-nav {
|
|
311
313
|
display: grid;
|
|
312
314
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
313
315
|
gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2vw, 2rem);
|
|
314
316
|
/* The columns' links are neutral at rest, as adenario's and Andrea's are. The library setting
|
|
315
317
|
its own Link's knob from its own token, which a consumer may not. */
|
|
316
|
-
--newtone-link-standalone-rest-text: var(--newtone-
|
|
318
|
+
--newtone-link-standalone-rest-text: var(--newtone-role-text-primary);
|
|
317
319
|
}
|
|
318
320
|
|
|
319
|
-
.newtone-
|
|
321
|
+
.newtone-site-footer-column {
|
|
320
322
|
display: flex;
|
|
321
323
|
flex-direction: column;
|
|
322
324
|
gap: var(--newtone-space-3);
|
|
323
325
|
}
|
|
324
326
|
|
|
325
|
-
.newtone-
|
|
326
|
-
color: var(--newtone-
|
|
327
|
+
.newtone-site-footer-title {
|
|
328
|
+
color: var(--newtone-role-text-secondary);
|
|
327
329
|
}
|
|
328
330
|
|
|
329
|
-
.newtone-
|
|
331
|
+
.newtone-site-footer-list {
|
|
330
332
|
list-style: none;
|
|
331
333
|
margin: 0;
|
|
332
334
|
padding: 0;
|
|
@@ -335,7 +337,7 @@
|
|
|
335
337
|
gap: var(--newtone-space-2);
|
|
336
338
|
}
|
|
337
339
|
|
|
338
|
-
.newtone-
|
|
340
|
+
.newtone-site-footer-bar {
|
|
339
341
|
display: flex;
|
|
340
342
|
flex-wrap: wrap;
|
|
341
343
|
align-items: baseline;
|
|
@@ -344,23 +346,23 @@
|
|
|
344
346
|
padding-block-start: clamp(2.5rem, 6vh, 4rem);
|
|
345
347
|
}
|
|
346
348
|
|
|
347
|
-
.newtone-
|
|
348
|
-
color: var(--newtone-
|
|
349
|
+
.newtone-site-footer-quiet {
|
|
350
|
+
color: var(--newtone-role-text-secondary);
|
|
349
351
|
}
|
|
350
352
|
|
|
351
|
-
.newtone-
|
|
353
|
+
.newtone-site-footer-small {
|
|
352
354
|
display: flex;
|
|
353
355
|
flex-wrap: wrap;
|
|
354
356
|
gap: var(--newtone-space-3) var(--newtone-space-6);
|
|
355
357
|
}
|
|
356
358
|
|
|
357
359
|
@media (max-width: 48rem) {
|
|
358
|
-
.newtone-
|
|
360
|
+
.newtone-site-footer-top {
|
|
359
361
|
grid-template-columns: minmax(0, 1fr);
|
|
360
362
|
gap: clamp(2rem, 6vh, 3rem);
|
|
361
363
|
}
|
|
362
364
|
|
|
363
|
-
.newtone-
|
|
365
|
+
.newtone-site-footer-nav {
|
|
364
366
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
365
367
|
}
|
|
366
368
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Elevation, type Mode, type Theme } from '../surface/index.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { SiteBand } from './band.js';
|
|
3
|
+
import { SiteFooter, SiteFooterBar, SiteFooterBrand, SiteFooterColumn, SiteFooterLink } from './footer.js';
|
|
4
4
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
5
5
|
/**
|
|
6
6
|
* The shell a route renders inside: a sticky bar, a body, and a footer.
|
|
@@ -13,7 +13,7 @@ import type { HTMLAttributes, ReactNode } from 'react';
|
|
|
13
13
|
* consumer wants -- fired with five.
|
|
14
14
|
*
|
|
15
15
|
* **It exists because §8's page-shell row fired.** That row refused a shell on 2026-09-03 with the
|
|
16
|
-
* count as the reason: the reference's `
|
|
16
|
+
* count as the reason: the reference's `Site` is 75 KB over six files with eight slots and two call
|
|
17
17
|
* sites, and TWO OF ITS SLOTS WERE NEVER PASSED BY ANYTHING. Those two were `header` and `footer`.
|
|
18
18
|
* **They are the two this ships**, and nothing else came with them.
|
|
19
19
|
*
|
|
@@ -24,15 +24,17 @@ import type { HTMLAttributes, ReactNode } from 'react';
|
|
|
24
24
|
*
|
|
25
25
|
* **The bar's is a border and the footer's cannot be.** A sticky bar leaves any line the layout drew
|
|
26
26
|
* between it and what follows, so the bar carries its own bottom border and always has. The footer's
|
|
27
|
-
* line is the **1px gap** in `.newtone-
|
|
27
|
+
* line is the **1px gap** in `.newtone-site-body`, whose ground is the divider colour and whose two
|
|
28
28
|
* children each paint over it -- so the line belongs to neither band, and neither has to know it has
|
|
29
29
|
* a neighbour. A rule with an owner is a rule a neighbour can duplicate, which is how the site this
|
|
30
30
|
* was read off ended up drawing three.
|
|
31
31
|
*
|
|
32
32
|
* ---- same rung, or one below -------------------------------------------
|
|
33
33
|
*
|
|
34
|
-
* **`footerElevation` omitted is
|
|
35
|
-
*
|
|
34
|
+
* **`footerElevation` omitted is `deep`, from 2026-10-09** -- a frame places its own regions on the
|
|
35
|
+
* ladder (section 5's first row, amended that day; Joshua: *"the footer would be deep"*). Passing the
|
|
36
|
+
* page's own rung puts the footer level with it. Before that date: **omitted was *same rung*.** The footer is a nested
|
|
37
|
+
* `Surface`, so with no attribute it resolves whatever the page resolves, and `--newtone-role-surface-primary`
|
|
36
38
|
* read inside it comes back as that rung's ground. **Nothing here compares the two**, and nothing
|
|
37
39
|
* here defaults either: production/newtone/ui_react-web/_blueprint/index.md section 5's first row counts
|
|
38
40
|
* a default as a READ, and a component that read a facet would have learned that `deep` exists.
|
|
@@ -45,7 +47,7 @@ import type { HTMLAttributes, ReactNode } from 'react';
|
|
|
45
47
|
*
|
|
46
48
|
* ---- the cap is on the track and never on a band -----------------------
|
|
47
49
|
*
|
|
48
|
-
* The grounds run edge to edge and only `.newtone-
|
|
50
|
+
* The grounds run edge to edge and only `.newtone-site-track` stops. **A hairline that stops 400px
|
|
49
51
|
* short of the screen edge on a wide display is the same mistake as a bar whose colour does**, which
|
|
50
52
|
* knowledge/the-width-ladder.md argues one band higher, and it is the split `Navbar` took the
|
|
51
53
|
* day before this.
|
|
@@ -60,31 +62,31 @@ import type { HTMLAttributes, ReactNode } from 'react';
|
|
|
60
62
|
* stops at 48rem, and on a wide display you can see that it does. That is the arrangement, not a
|
|
61
63
|
* defect.
|
|
62
64
|
*
|
|
63
|
-
* ---- <main> has no track, and `
|
|
65
|
+
* ---- <main> has no track, and `Site.Band` is why ------------------------
|
|
64
66
|
*
|
|
65
67
|
* **2026-09-21 late. Joshua:** *"she should have clear edge to edge sections."*
|
|
66
68
|
*
|
|
67
|
-
* This wrapped `children` in one `.newtone-
|
|
69
|
+
* This wrapped `children` in one `.newtone-site-track` until that evening. Every block of the page
|
|
68
70
|
* sat inside the cap and inside the gutter, which is exactly right for a column of prose and makes
|
|
69
71
|
* an edge-to-edge section IMPOSSIBLE -- a section that changes ground has to BE the full-width box.
|
|
70
|
-
* **So the track moved out of `<main>` and into `
|
|
72
|
+
* **So the track moved out of `<main>` and into `Site.Band`**, and `<main>` holds bands.
|
|
71
73
|
*
|
|
72
74
|
* **The footer kept its track and the asymmetry is the point.** A footer is one band by definition
|
|
73
|
-
* and nothing has ever wanted two, so a `
|
|
75
|
+
* and nothing has ever wanted two, so a `Site.Band` in that slot would be ceremony around a box that
|
|
74
76
|
* can only ever be one. `<main>` is the element that holds many.
|
|
75
77
|
*
|
|
76
78
|
* ---- the cap is a custom property, and the consumer still writes none ---
|
|
77
79
|
*
|
|
78
|
-
* `--newtone-
|
|
79
|
-
* `.newtone-
|
|
80
|
-
* component renders** -- the consumer writes `<
|
|
80
|
+
* `--newtone-site-max-inline-size`, written inline on the root from `maxInlineSize`, read by every
|
|
81
|
+
* `.newtone-site-track` on the page. **It changed shape because a band's track is not a child this
|
|
82
|
+
* component renders** -- the consumer writes `<Site.Band>`, so the value cannot arrive as a prop
|
|
81
83
|
* without being typed once per section, and it cannot arrive through context without `Band` calling
|
|
82
84
|
* `useContext` and **becoming a client component**, which is the thing the import line at the top of
|
|
83
85
|
* this file exists to avoid.
|
|
84
86
|
*
|
|
85
87
|
* **This does not break issue 201's rule.** *A consumer may declare no Newtone property* binds the
|
|
86
88
|
* CONSUMER: a site passes a prop and writes nothing. A library declaring its own property on its own
|
|
87
|
-
* root is what `--newtone-
|
|
89
|
+
* root is what `--newtone-site-gutter` below already is; the only new thing is that this one's value
|
|
88
90
|
* arrived from a prop instead of from a media query.
|
|
89
91
|
*
|
|
90
92
|
* ---- what it refuses ----------------------------------------------------
|
|
@@ -99,10 +101,10 @@ import type { HTMLAttributes, ReactNode } from 'react';
|
|
|
99
101
|
* document bar is why that is worth saying
|
|
100
102
|
*
|
|
101
103
|
* **The gutter is NOT on this list any more.** It was, with §8's four-sites-and-a-clamp argument,
|
|
102
|
-
* until it shipped later on 2026-09-21 -- `--newtone-
|
|
104
|
+
* until it shipped later on 2026-09-21 -- `--newtone-site-gutter`, 64 / 32 / 16, in site.css below.
|
|
103
105
|
* What is still owed is the borinhood reading, which is a reading and not a component.
|
|
104
106
|
*/
|
|
105
|
-
export interface
|
|
107
|
+
export interface SiteProps extends HTMLAttributes<HTMLElement> {
|
|
106
108
|
/**
|
|
107
109
|
* The sticky slot. Any node -- this does not require a `Navbar`, and the bar draws its own
|
|
108
110
|
* hairline wherever it comes from.
|
|
@@ -126,18 +128,18 @@ export interface PageProps extends HTMLAttributes<HTMLElement> {
|
|
|
126
128
|
elevation?: Elevation;
|
|
127
129
|
/**
|
|
128
130
|
* How raised the footer is. Forwarded to the footer's own `Surface`, read nowhere here.
|
|
129
|
-
* **Omitted,
|
|
131
|
+
* **Omitted, `deep`** -- one below a `base` page. Pass the page's own rung to sit level with it.
|
|
130
132
|
*/
|
|
131
133
|
footerElevation?: Elevation;
|
|
132
134
|
children?: ReactNode;
|
|
133
135
|
}
|
|
134
|
-
export declare function
|
|
135
|
-
export declare namespace
|
|
136
|
-
export {
|
|
137
|
-
export {
|
|
138
|
-
export {
|
|
139
|
-
export {
|
|
140
|
-
export {
|
|
141
|
-
export {
|
|
136
|
+
export declare function Site({ navbar, footer, maxInlineSize, theme, mode, elevation, footerElevation, className, children, ...rest }: SiteProps): import("react").JSX.Element;
|
|
137
|
+
export declare namespace Site {
|
|
138
|
+
export { SiteBand as Band };
|
|
139
|
+
export { SiteFooter as Footer };
|
|
140
|
+
export { SiteFooterBrand as FooterBrand };
|
|
141
|
+
export { SiteFooterColumn as FooterColumn };
|
|
142
|
+
export { SiteFooterLink as FooterLink };
|
|
143
|
+
export { SiteFooterBar as FooterBar };
|
|
142
144
|
}
|
|
143
|
-
//# sourceMappingURL=
|
|
145
|
+
//# sourceMappingURL=site.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site.d.ts","sourceRoot":"","sources":["../../src/site/site.tsx"],"names":[],"mappings":"AAEA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rel. `@newtone-dev/ui-react-web` re-exports Navbar, Navbar calls hooks,
|
|
3
3
|
// and this renders inside server components -- see the repo blueprint, section 4.3.
|
|
4
4
|
import { Surface } from '../surface/index.js';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { SiteBand } from './band.js';
|
|
6
|
+
import { SiteFooter, SiteFooterBar, SiteFooterBrand, SiteFooterColumn, SiteFooterLink, } from './footer.js';
|
|
7
7
|
import { SelectionPaint } from '../text/selection-paint.js';
|
|
8
|
-
export function
|
|
8
|
+
export function Site({ navbar, footer, maxInlineSize, theme, mode, elevation, footerElevation = 'deep', className, children, ...rest }) {
|
|
9
9
|
// THE CAP IS A CUSTOM PROPERTY ON THE ROOT FROM 2026-09-21 LATE, where it was an inline
|
|
10
10
|
// `max-inline-size` on the one track this component rendered. It had to move because a band's
|
|
11
11
|
// track is a child the CONSUMER renders -- see the docblock. `undefined` omits the declaration
|
|
12
12
|
// entirely rather than writing `none`, so an uncapped page computes exactly the box it computed
|
|
13
|
-
// before, and
|
|
13
|
+
// before, and site.css declares the `none` default on the rule itself.
|
|
14
14
|
//
|
|
15
15
|
// THE CONSUMER STILL WRITES NO NEWTONE PROPERTY, which is the half of issue 201's rule that
|
|
16
16
|
// binds: a site passes `maxInlineSize` and this file does the declaring.
|
|
17
17
|
const root = maxInlineSize
|
|
18
|
-
? { '--newtone-
|
|
18
|
+
? { '--newtone-site-max-inline-size': maxInlineSize }
|
|
19
19
|
: undefined;
|
|
20
|
-
return (_jsxs(Surface, { theme: theme, mode: mode, elevation: elevation, className: ['newtone-
|
|
20
|
+
return (_jsxs(Surface, { theme: theme, mode: mode, elevation: elevation, className: ['newtone-site', className].filter(Boolean).join(' '), style: root, ...rest, children: [navbar, _jsx(SelectionPaint, {}), _jsxs("div", { className: "newtone-site-body", children: [_jsx("main", { className: "newtone-site-main", children: children }), footer ? (_jsx(Surface, { as: "footer", elevation: footerElevation, className: "newtone-site-footer", children: _jsx("div", { className: "newtone-site-track", children: footer }) })) : null] })] }));
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* The band hangs off `
|
|
23
|
+
* The band hangs off `Site` and is exported nowhere else.
|
|
24
24
|
*
|
|
25
25
|
* **Same boundary as `Navbar`'s parts, for the same reason one level up.** A band outside a page
|
|
26
|
-
* resolves neither `--newtone-
|
|
27
|
-
* declared on `.newtone-
|
|
28
|
-
* a silent failure rather than a loud one. `index.ts` exports `
|
|
26
|
+
* resolves neither `--newtone-site-max-inline-size` nor `--newtone-site-gutter`, because both are
|
|
27
|
+
* declared on `.newtone-site` -- so it would render full-bleed with no track and no inset, which is
|
|
28
|
+
* a silent failure rather than a loud one. `index.ts` exports `Site` and the band's prop type.
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
//# sourceMappingURL=
|
|
30
|
+
Site.Band = SiteBand;
|
|
31
|
+
Site.Footer = SiteFooter;
|
|
32
|
+
Site.FooterBrand = SiteFooterBrand;
|
|
33
|
+
Site.FooterColumn = SiteFooterColumn;
|
|
34
|
+
Site.FooterLink = SiteFooterLink;
|
|
35
|
+
Site.FooterBar = SiteFooterBar;
|
|
36
|
+
//# sourceMappingURL=site.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site.js","sourceRoot":"","sources":["../../src/site/site.tsx"],"names":[],"mappings":";AAAA,mGAAmG;AACnG,oFAAoF;AACpF,OAAO,EAAE,OAAO,EAAyC,MAAM,qBAAqB,CAAA;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EACH,UAAU,EACV,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,cAAc,GACjB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAuI3D,MAAM,UAAU,IAAI,CAAC,EACjB,MAAM,EACN,MAAM,EACN,aAAa,EACb,KA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
|
|
12
12
|
* makes the highlight's background transparent, and this writes one gradient layer per selected line
|
|
13
13
|
* into the inline background of the block whose text it is. The ink is still the browser's.
|
|
14
14
|
*
|
|
15
|
-
* Renders nothing. `
|
|
15
|
+
* Renders nothing. `Site` mounts it; two mounts share one listener.
|
|
16
16
|
*/
|
|
17
17
|
export declare function SelectionPaint(): null;
|
|
18
18
|
//# sourceMappingURL=selection-paint.d.ts.map
|