@newtone-dev/ui-react-web 0.2.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.
Files changed (304) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +83 -0
  3. package/dist/accordion/accordion.css +239 -0
  4. package/dist/accordion/accordion.d.ts +106 -0
  5. package/dist/accordion/accordion.d.ts.map +1 -0
  6. package/dist/accordion/accordion.js +15 -0
  7. package/dist/accordion/accordion.js.map +1 -0
  8. package/dist/accordion/index.d.ts +4 -0
  9. package/dist/accordion/index.d.ts.map +1 -0
  10. package/dist/accordion/index.js +3 -0
  11. package/dist/accordion/index.js.map +1 -0
  12. package/dist/action/action.css +86 -0
  13. package/dist/action/action.d.ts +62 -0
  14. package/dist/action/action.d.ts.map +1 -0
  15. package/dist/action/action.js +59 -0
  16. package/dist/action/action.js.map +1 -0
  17. package/dist/action/index.d.ts +4 -0
  18. package/dist/action/index.d.ts.map +1 -0
  19. package/dist/action/index.js +3 -0
  20. package/dist/action/index.js.map +1 -0
  21. package/dist/avatar/avatar.css +39 -0
  22. package/dist/avatar/avatar.d.ts +43 -0
  23. package/dist/avatar/avatar.d.ts.map +1 -0
  24. package/dist/avatar/avatar.js +38 -0
  25. package/dist/avatar/avatar.js.map +1 -0
  26. package/dist/avatar/index.d.ts +4 -0
  27. package/dist/avatar/index.d.ts.map +1 -0
  28. package/dist/avatar/index.js +3 -0
  29. package/dist/avatar/index.js.map +1 -0
  30. package/dist/button/button.css +112 -0
  31. package/dist/button/button.d.ts +36 -0
  32. package/dist/button/button.d.ts.map +1 -0
  33. package/dist/button/button.js +24 -0
  34. package/dist/button/button.js.map +1 -0
  35. package/dist/button/index.d.ts +3 -0
  36. package/dist/button/index.d.ts.map +1 -0
  37. package/dist/button/index.js +2 -0
  38. package/dist/button/index.js.map +1 -0
  39. package/dist/card-box/card-box.css +75 -0
  40. package/dist/card-box/card-box.d.ts +114 -0
  41. package/dist/card-box/card-box.d.ts.map +1 -0
  42. package/dist/card-box/card-box.js +9 -0
  43. package/dist/card-box/card-box.js.map +1 -0
  44. package/dist/card-box/index.d.ts +4 -0
  45. package/dist/card-box/index.d.ts.map +1 -0
  46. package/dist/card-box/index.js +3 -0
  47. package/dist/card-box/index.js.map +1 -0
  48. package/dist/card-grid/card-grid.css +97 -0
  49. package/dist/card-grid/card-grid.d.ts +63 -0
  50. package/dist/card-grid/card-grid.d.ts.map +1 -0
  51. package/dist/card-grid/card-grid.js +27 -0
  52. package/dist/card-grid/card-grid.js.map +1 -0
  53. package/dist/card-grid/index.d.ts +4 -0
  54. package/dist/card-grid/index.d.ts.map +1 -0
  55. package/dist/card-grid/index.js +3 -0
  56. package/dist/card-grid/index.js.map +1 -0
  57. package/dist/color/gamut.d.ts +20 -0
  58. package/dist/color/gamut.d.ts.map +1 -0
  59. package/dist/color/gamut.js +72 -0
  60. package/dist/color/gamut.js.map +1 -0
  61. package/dist/color/index.d.ts +8 -0
  62. package/dist/color/index.d.ts.map +1 -0
  63. package/dist/color/index.js +21 -0
  64. package/dist/color/index.js.map +1 -0
  65. package/dist/color/oklch.d.ts +35 -0
  66. package/dist/color/oklch.d.ts.map +1 -0
  67. package/dist/color/oklch.js +103 -0
  68. package/dist/color/oklch.js.map +1 -0
  69. package/dist/color/scale.d.ts +20 -0
  70. package/dist/color/scale.d.ts.map +1 -0
  71. package/dist/color/scale.js +75 -0
  72. package/dist/color/scale.js.map +1 -0
  73. package/dist/color/seeds.d.ts +33 -0
  74. package/dist/color/seeds.d.ts.map +1 -0
  75. package/dist/color/seeds.js +148 -0
  76. package/dist/color/seeds.js.map +1 -0
  77. package/dist/control/control.css +203 -0
  78. package/dist/control/control.d.ts +112 -0
  79. package/dist/control/control.d.ts.map +1 -0
  80. package/dist/control/control.js +107 -0
  81. package/dist/control/control.js.map +1 -0
  82. package/dist/control/index.d.ts +4 -0
  83. package/dist/control/index.d.ts.map +1 -0
  84. package/dist/control/index.js +3 -0
  85. package/dist/control/index.js.map +1 -0
  86. package/dist/data-list/data-list.css +52 -0
  87. package/dist/data-list/data-list.d.ts +55 -0
  88. package/dist/data-list/data-list.d.ts.map +1 -0
  89. package/dist/data-list/data-list.js +51 -0
  90. package/dist/data-list/data-list.js.map +1 -0
  91. package/dist/data-list/index.d.ts +5 -0
  92. package/dist/data-list/index.d.ts.map +1 -0
  93. package/dist/data-list/index.js +3 -0
  94. package/dist/data-list/index.js.map +1 -0
  95. package/dist/data-list/row/row.d.ts +16 -0
  96. package/dist/data-list/row/row.d.ts.map +1 -0
  97. package/dist/data-list/row/row.js +15 -0
  98. package/dist/data-list/row/row.js.map +1 -0
  99. package/dist/feature-card/feature-card.css +93 -0
  100. package/dist/feature-card/feature-card.d.ts +68 -0
  101. package/dist/feature-card/feature-card.d.ts.map +1 -0
  102. package/dist/feature-card/feature-card.js +11 -0
  103. package/dist/feature-card/feature-card.js.map +1 -0
  104. package/dist/feature-card/index.d.ts +4 -0
  105. package/dist/feature-card/index.d.ts.map +1 -0
  106. package/dist/feature-card/index.js +3 -0
  107. package/dist/feature-card/index.js.map +1 -0
  108. package/dist/framed-icon/framed-icon.css +77 -0
  109. package/dist/framed-icon/framed-icon.d.ts +61 -0
  110. package/dist/framed-icon/framed-icon.d.ts.map +1 -0
  111. package/dist/framed-icon/framed-icon.js +14 -0
  112. package/dist/framed-icon/framed-icon.js.map +1 -0
  113. package/dist/framed-icon/index.d.ts +4 -0
  114. package/dist/framed-icon/index.d.ts.map +1 -0
  115. package/dist/framed-icon/index.js +3 -0
  116. package/dist/framed-icon/index.js.map +1 -0
  117. package/dist/gallery/gallery.css +165 -0
  118. package/dist/gallery/gallery.d.ts +85 -0
  119. package/dist/gallery/gallery.d.ts.map +1 -0
  120. package/dist/gallery/gallery.js +75 -0
  121. package/dist/gallery/gallery.js.map +1 -0
  122. package/dist/gallery/index.d.ts +4 -0
  123. package/dist/gallery/index.d.ts.map +1 -0
  124. package/dist/gallery/index.js +3 -0
  125. package/dist/gallery/index.js.map +1 -0
  126. package/dist/icon/icon.css +83 -0
  127. package/dist/icon/icon.d.ts +69 -0
  128. package/dist/icon/icon.d.ts.map +1 -0
  129. package/dist/icon/icon.js +18 -0
  130. package/dist/icon/icon.js.map +1 -0
  131. package/dist/icon/index.d.ts +4 -0
  132. package/dist/icon/index.d.ts.map +1 -0
  133. package/dist/icon/index.js +3 -0
  134. package/dist/icon/index.js.map +1 -0
  135. package/dist/icon-link/icon-link.css +57 -0
  136. package/dist/icon-link/icon-link.d.ts +47 -0
  137. package/dist/icon-link/icon-link.d.ts.map +1 -0
  138. package/dist/icon-link/icon-link.js +35 -0
  139. package/dist/icon-link/icon-link.js.map +1 -0
  140. package/dist/icon-link/index.d.ts +4 -0
  141. package/dist/icon-link/index.d.ts.map +1 -0
  142. package/dist/icon-link/index.js +3 -0
  143. package/dist/icon-link/index.js.map +1 -0
  144. package/dist/identity/identity.d.ts +25 -0
  145. package/dist/identity/identity.d.ts.map +1 -0
  146. package/dist/identity/identity.js +25 -0
  147. package/dist/identity/identity.js.map +1 -0
  148. package/dist/identity/index.d.ts +3 -0
  149. package/dist/identity/index.d.ts.map +1 -0
  150. package/dist/identity/index.js +2 -0
  151. package/dist/identity/index.js.map +1 -0
  152. package/dist/index.d.ts +57 -0
  153. package/dist/index.d.ts.map +1 -0
  154. package/dist/index.js +29 -0
  155. package/dist/index.js.map +1 -0
  156. package/dist/link/index.d.ts +3 -0
  157. package/dist/link/index.d.ts.map +1 -0
  158. package/dist/link/index.js +2 -0
  159. package/dist/link/index.js.map +1 -0
  160. package/dist/link/link.css +65 -0
  161. package/dist/link/link.d.ts +38 -0
  162. package/dist/link/link.d.ts.map +1 -0
  163. package/dist/link/link.js +22 -0
  164. package/dist/link/link.js.map +1 -0
  165. package/dist/logo-marquee/index.d.ts +4 -0
  166. package/dist/logo-marquee/index.d.ts.map +1 -0
  167. package/dist/logo-marquee/index.js +3 -0
  168. package/dist/logo-marquee/index.js.map +1 -0
  169. package/dist/logo-marquee/logo-marquee.css +227 -0
  170. package/dist/logo-marquee/logo-marquee.d.ts +69 -0
  171. package/dist/logo-marquee/logo-marquee.d.ts.map +1 -0
  172. package/dist/logo-marquee/logo-marquee.js +11 -0
  173. package/dist/logo-marquee/logo-marquee.js.map +1 -0
  174. package/dist/media-plate/index.d.ts +4 -0
  175. package/dist/media-plate/index.d.ts.map +1 -0
  176. package/dist/media-plate/index.js +3 -0
  177. package/dist/media-plate/index.js.map +1 -0
  178. package/dist/media-plate/media-plate.css +41 -0
  179. package/dist/media-plate/media-plate.d.ts +45 -0
  180. package/dist/media-plate/media-plate.d.ts.map +1 -0
  181. package/dist/media-plate/media-plate.js +5 -0
  182. package/dist/media-plate/media-plate.js.map +1 -0
  183. package/dist/media-window/media-window.css +82 -0
  184. package/dist/navbar/actions/actions.d.ts +14 -0
  185. package/dist/navbar/actions/actions.d.ts.map +1 -0
  186. package/dist/navbar/actions/actions.js +12 -0
  187. package/dist/navbar/actions/actions.js.map +1 -0
  188. package/dist/navbar/brand/brand.d.ts +12 -0
  189. package/dist/navbar/brand/brand.d.ts.map +1 -0
  190. package/dist/navbar/brand/brand.js +10 -0
  191. package/dist/navbar/brand/brand.js.map +1 -0
  192. package/dist/navbar/context.d.ts +12 -0
  193. package/dist/navbar/context.d.ts.map +1 -0
  194. package/dist/navbar/context.js +13 -0
  195. package/dist/navbar/context.js.map +1 -0
  196. package/dist/navbar/index.d.ts +8 -0
  197. package/dist/navbar/index.d.ts.map +1 -0
  198. package/dist/navbar/index.js +8 -0
  199. package/dist/navbar/index.js.map +1 -0
  200. package/dist/navbar/link/drawer/drawer.css +50 -0
  201. package/dist/navbar/link/drawer/drawer.d.ts +20 -0
  202. package/dist/navbar/link/drawer/drawer.d.ts.map +1 -0
  203. package/dist/navbar/link/drawer/drawer.js +44 -0
  204. package/dist/navbar/link/drawer/drawer.js.map +1 -0
  205. package/dist/navbar/link/link.css +54 -0
  206. package/dist/navbar/link/link.d.ts +30 -0
  207. package/dist/navbar/link/link.d.ts.map +1 -0
  208. package/dist/navbar/link/link.js +29 -0
  209. package/dist/navbar/link/link.js.map +1 -0
  210. package/dist/navbar/links/links.d.ts +14 -0
  211. package/dist/navbar/links/links.d.ts.map +1 -0
  212. package/dist/navbar/links/links.js +14 -0
  213. package/dist/navbar/links/links.js.map +1 -0
  214. package/dist/navbar/menu-button/menu-button.css +20 -0
  215. package/dist/navbar/menu-button/menu-button.d.ts +13 -0
  216. package/dist/navbar/menu-button/menu-button.d.ts.map +1 -0
  217. package/dist/navbar/menu-button/menu-button.js +20 -0
  218. package/dist/navbar/menu-button/menu-button.js.map +1 -0
  219. package/dist/navbar/navbar.css +179 -0
  220. package/dist/navbar/navbar.d.ts +58 -0
  221. package/dist/navbar/navbar.d.ts.map +1 -0
  222. package/dist/navbar/navbar.js +96 -0
  223. package/dist/navbar/navbar.js.map +1 -0
  224. package/dist/numbered-list/index.d.ts +4 -0
  225. package/dist/numbered-list/index.d.ts.map +1 -0
  226. package/dist/numbered-list/index.js +3 -0
  227. package/dist/numbered-list/index.js.map +1 -0
  228. package/dist/numbered-list/numbered-list.css +46 -0
  229. package/dist/numbered-list/numbered-list.d.ts +31 -0
  230. package/dist/numbered-list/numbered-list.d.ts.map +1 -0
  231. package/dist/numbered-list/numbered-list.js +26 -0
  232. package/dist/numbered-list/numbered-list.js.map +1 -0
  233. package/dist/on-media/on-media.css +198 -0
  234. package/dist/quick-action/index.d.ts +4 -0
  235. package/dist/quick-action/index.d.ts.map +1 -0
  236. package/dist/quick-action/index.js +3 -0
  237. package/dist/quick-action/index.js.map +1 -0
  238. package/dist/quick-action/quick-action.css +70 -0
  239. package/dist/quick-action/quick-action.d.ts +68 -0
  240. package/dist/quick-action/quick-action.d.ts.map +1 -0
  241. package/dist/quick-action/quick-action.js +54 -0
  242. package/dist/quick-action/quick-action.js.map +1 -0
  243. package/dist/segmented-control/index.d.ts +4 -0
  244. package/dist/segmented-control/index.d.ts.map +1 -0
  245. package/dist/segmented-control/index.js +3 -0
  246. package/dist/segmented-control/index.js.map +1 -0
  247. package/dist/segmented-control/segmented-control.css +206 -0
  248. package/dist/segmented-control/segmented-control.d.ts +91 -0
  249. package/dist/segmented-control/segmented-control.d.ts.map +1 -0
  250. package/dist/segmented-control/segmented-control.js +9 -0
  251. package/dist/segmented-control/segmented-control.js.map +1 -0
  252. package/dist/stat-card/index.d.ts +4 -0
  253. package/dist/stat-card/index.d.ts.map +1 -0
  254. package/dist/stat-card/index.js +3 -0
  255. package/dist/stat-card/index.js.map +1 -0
  256. package/dist/stat-card/stat-card.css +56 -0
  257. package/dist/stat-card/stat-card.d.ts +48 -0
  258. package/dist/stat-card/stat-card.d.ts.map +1 -0
  259. package/dist/stat-card/stat-card.js +11 -0
  260. package/dist/stat-card/stat-card.js.map +1 -0
  261. package/dist/surface/index.d.ts +3 -0
  262. package/dist/surface/index.d.ts.map +1 -0
  263. package/dist/surface/index.js +2 -0
  264. package/dist/surface/index.js.map +1 -0
  265. package/dist/surface/surface.d.ts +40 -0
  266. package/dist/surface/surface.d.ts.map +1 -0
  267. package/dist/surface/surface.js +22 -0
  268. package/dist/surface/surface.js.map +1 -0
  269. package/dist/tag/index.d.ts +4 -0
  270. package/dist/tag/index.d.ts.map +1 -0
  271. package/dist/tag/index.js +3 -0
  272. package/dist/tag/index.js.map +1 -0
  273. package/dist/tag/tag.css +77 -0
  274. package/dist/tag/tag.d.ts +80 -0
  275. package/dist/tag/tag.d.ts.map +1 -0
  276. package/dist/tag/tag.js +16 -0
  277. package/dist/tag/tag.js.map +1 -0
  278. package/dist/text/index.d.ts +3 -0
  279. package/dist/text/index.d.ts.map +1 -0
  280. package/dist/text/index.js +2 -0
  281. package/dist/text/index.js.map +1 -0
  282. package/dist/text/text.css +232 -0
  283. package/dist/text/text.d.ts +64 -0
  284. package/dist/text/text.d.ts.map +1 -0
  285. package/dist/text/text.js +37 -0
  286. package/dist/text/text.js.map +1 -0
  287. package/dist/video-lightbox/index.d.ts +4 -0
  288. package/dist/video-lightbox/index.d.ts.map +1 -0
  289. package/dist/video-lightbox/index.js +3 -0
  290. package/dist/video-lightbox/index.js.map +1 -0
  291. package/dist/video-lightbox/video-lightbox.css +167 -0
  292. package/dist/video-lightbox/video-lightbox.d.ts +92 -0
  293. package/dist/video-lightbox/video-lightbox.d.ts.map +1 -0
  294. package/dist/video-lightbox/video-lightbox.js +31 -0
  295. package/dist/video-lightbox/video-lightbox.js.map +1 -0
  296. package/dist/wrapper/index.d.ts +3 -0
  297. package/dist/wrapper/index.d.ts.map +1 -0
  298. package/dist/wrapper/index.js +2 -0
  299. package/dist/wrapper/index.js.map +1 -0
  300. package/dist/wrapper/wrapper.d.ts +113 -0
  301. package/dist/wrapper/wrapper.d.ts.map +1 -0
  302. package/dist/wrapper/wrapper.js +83 -0
  303. package/dist/wrapper/wrapper.js.map +1 -0
  304. package/package.json +184 -0
@@ -0,0 +1,77 @@
1
+ /* The mark's sheet: one colour pair, two geometries. Every colour is read from a Newtone role; none
2
+ * is declared. See the repo blueprint, sections 4.1.6 and 4.2.
3
+ *
4
+ * ---- the pair, declared once ---------------------------------------------
5
+ *
6
+ * This is the whole reason the folder exists. The 96px square and the 40px circle carry the same
7
+ * ground and the same glyph colour -- measured on the live page, not inferred -- so the two
8
+ * declarations live on `.framed-icon` and neither shape restates them. Section 5's *declared once*
9
+ * row is what would notice a second copy.
10
+ *
11
+ * **They are the two ROLES they have always been, moved rather than changed.** The live page paints
12
+ * this mark from fixed ramp steps, `accent-50` under `accent-500`, and repainting ours to match
13
+ * would put a colour that cannot move on a piece of chrome that has to recede with the surface
14
+ * behind it. A role resolves against that surface; a ramp step does not. Section 4.2 draws the line
15
+ * and media-plate.css is the one thing on the other side of it.
16
+ *
17
+ * **What the substitution costs is recorded and it is larger than it used to read.**
18
+ * the consuming site's own knowledge entry carried "roughly the same picture" for a
19
+ * day; resolved, ours is #E2E2E2 and the live page's is #F5F1FF -- a different hue and five points
20
+ * of lightness. The entry now carries both values.
21
+ *
22
+ * ---- the two geometries --------------------------------------------------
23
+ *
24
+ * **Neither box can be stretched.** Equal explicit width and height plus `flex: none`, so a card
25
+ * whose copy runs taller keeps a square square and a round circle rather than a rectangle and an
26
+ * ellipse. That guarantee is the reference's and it is the one thing it documents twice.
27
+ *
28
+ * **The sides are lengths and not spacing tokens, deliberately.** `--newtone-space-24` is 6rem and
29
+ * `--newtone-space-10` is 2.5rem, so pointing at either would resolve, build and look right -- and
30
+ * it would be a claim that this mark and the page's spacing scale have a reason to move together,
31
+ * which they do not. Issue 023 states the same refusal about corners, and the reference states it
32
+ * about its own scale. A length that happens to equal a token is a coincidence.
33
+ *
34
+ * **The side is the decision and the clearance is the consequence.** 96px is what makes the square
35
+ * the thing a credential card leads with rather than an icon in a box; the 40px glyph is centred in
36
+ * what is left, so 28px of clearance falls out of the geometry and no padding is needed. The circle
37
+ * is the same mechanism at 40px around a 24px glyph.
38
+ *
39
+ * ---- the corner, and the one that is not a corner ------------------------
40
+ *
41
+ * **The square's 8px is a give-way and the derivation is what is lost rather than the number.**
42
+ * There, a plate's corner is the card's corner minus the frame term it is inset by -- 24 minus 8 --
43
+ * so it nests inside the card's curve. Here both the card and the square take `radius.md`, because
44
+ * Newtone has two steps and both of the original's radii round to the same one. card-box.css
45
+ * carries the argument.
46
+ *
47
+ * **The circle's `50%` is not a corner at all, and that is why it may be a literal.** The live page
48
+ * writes `var(--radius-full)`, which the original publishes as 2048px -- a length chosen to be
49
+ * larger than any box it lands on. Newtone has `sm` (4px) and `md` (8px) and no third step could
50
+ * have helped: a circle is not a point further along a scale of corners, it is the statement that
51
+ * the box has none. So this is a proportion of the box rather than a size read from a system, and
52
+ * section 5's corner invariant was narrowed in the same pass to say that a LENGTH is the thing it
53
+ * refuses. The give-way is in the knowledge entry, section 4, *A circle has no name*. */
54
+
55
+ .newtone-framed-icon {
56
+ display: inline-flex;
57
+ align-items: center;
58
+ justify-content: center;
59
+ flex: none;
60
+ line-height: 1;
61
+ background: var(--newtone-framed-icon-fill);
62
+ /* The glyph's colour, set once here so the `Icon` inside inherits it through `currentColor` and
63
+ * the two can never drift. */
64
+ color: var(--newtone-framed-icon-glyph);
65
+ }
66
+
67
+ .newtone-framed-icon--square {
68
+ width: 6rem;
69
+ height: 6rem;
70
+ border-radius: var(--newtone-framed-icon-radius);
71
+ }
72
+
73
+ .newtone-framed-icon--round {
74
+ width: 2.5rem;
75
+ height: 2.5rem;
76
+ border-radius: 50%;
77
+ }
@@ -0,0 +1,61 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ /**
3
+ * The mark a card leads with: a glyph centred on its own small themed box.
4
+ *
5
+ * ---- one mark at two shapes, and why that is one folder ------------------
6
+ *
7
+ * **This folder exists because a deferral was claimed by the thing it predicted.**
8
+ * `achievement-card.tsx` said a plate was a `<span>` and a class in the sheet beside it *because
9
+ * exactly one thing renders a plate*, and named a second renderer as the event that would give it a
10
+ * folder of its own. `feature-card` is that second renderer. Nothing here was argued after the
11
+ * fact -- see the repo blueprint, section 4.1.6.
12
+ *
13
+ * **That the square and the circle are ONE mark is measured rather than assumed.** Read off a live
14
+ * page on 2026-09-04, both resolve to the identical pair: a step-50 ground under step-500 ink, at
15
+ * 96px and at 40px. The consuming site's blueprint holds the page and the measurement; this file
16
+ * holds the conclusion, which is the only half that is Newtone's.
17
+ * The reference reaches the same conclusion from its own side and says so out loud -- its
18
+ * `IconPlate` reads `IconTile`'s theme slice rather than one of its own, *"one mark at two
19
+ * shapes"*, because a second slice would let the mark be retuned in one place and not the other.
20
+ *
21
+ * **So the pair is declared once, in framed-icon.css, and the geometry is per shape.** Section 5 of
22
+ * the blueprint asserts the once. Writing it a second time in a second sheet is
23
+ * `governance/documents/staleness/a-second-copy-is-a-thing-that-drifts.md` with the drift visible on one row of one
24
+ * page.
25
+ *
26
+ * ---- what it takes, and what it refuses ---------------------------------
27
+ *
28
+ * **`shape` is a prop because two call sites take two different values** --
29
+ * `governance/evidence/size-an-api-from-call-sites-not-from-the-type.md`, which is the same count that made
30
+ * `stat-card` refuse a `size`. The alternative was the reference's own: two components sharing one
31
+ * source of colour. It is right there, where twelve grouping families make the two marks peers
32
+ * inside one of them; here a second folder for a second shape of one mark is the shape a library
33
+ * with no grouping families has nowhere to put.
34
+ *
35
+ * **There is no default.** A mark that does not say which shape it is has not been decided, and
36
+ * there is no majority to fall back on -- two call sites want each value.
37
+ *
38
+ * **The names are the geometry's and not the reference's.** There a square is an `IconPlate` and a
39
+ * circle an `IconTile`; that library also spends *plate* on the mount its drawings sit on, and
40
+ * `media-plate/` next door has the better claim on the word.
41
+ * `governance/naming/a-name-is-the-cheapest-documentation.md`.
42
+ *
43
+ * **No `fill`.** Zero call sites, and unlike `Icon`'s it buys no axis that has to be written into
44
+ * `font-variation-settings` either way -- so the count is the whole argument.
45
+ *
46
+ * **No `size`.** The glyph follows the shape, which leaves a second prop nothing to say. Both sizes
47
+ * already exist on `Icon`; issue 024's ramp needed nothing.
48
+ *
49
+ * **The glyph colour is set once, on the box**, so `Icon` -- which takes no colour prop, because a
50
+ * Newtone component may not read a role -- inherits it through `currentColor` and the two can never
51
+ * drift.
52
+ */
53
+ export type FramedIconShape = 'square' | 'round';
54
+ export interface FramedIconProps extends HTMLAttributes<HTMLElement> {
55
+ /** A Material Symbols ligature. */
56
+ icon: string;
57
+ /** The 96px square a credential leads with, or the 40px circle a feature card leads with. */
58
+ shape: FramedIconShape;
59
+ }
60
+ export declare function FramedIcon({ icon, shape, className, ...rest }: FramedIconProps): import("react").JSX.Element;
61
+ //# sourceMappingURL=framed-icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"framed-icon.d.ts","sourceRoot":"","sources":["../../src/framed-icon/framed-icon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAA;AAShD,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,WAAW,CAAC;IAChE,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,6FAA6F;IAC7F,KAAK,EAAE,eAAe,CAAA;CACzB;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,+BAW9E"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Icon } from '../icon/index.js';
3
+ /**
4
+ * The glyph each shape carries. Held here rather than at the call sites because it is not a choice:
5
+ * a 96px box wants the top of the ramp and a 40px box wants the middle, and neither is a thing a
6
+ * caller decides.
7
+ */
8
+ const GLYPH = { square: 'xl', round: 'md' };
9
+ export function FramedIcon({ icon, shape, className, ...rest }) {
10
+ return (_jsx("span", { className: [`newtone-framed-icon newtone-framed-icon--${shape}`, className]
11
+ .filter(Boolean)
12
+ .join(' '), ...rest, children: _jsx(Icon, { name: icon, size: GLYPH[shape] }) }));
13
+ }
14
+ //# sourceMappingURL=framed-icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"framed-icon.js","sourceRoot":"","sources":["../../src/framed-icon/framed-icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,kBAAkB,CAAA;AAyDtD;;;;GAIG;AACH,MAAM,KAAK,GAAsC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;AAS9E,MAAM,UAAU,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAmB;IAC3E,OAAO,CACH,eACI,SAAS,EAAE,CAAC,4CAA4C,KAAK,EAAE,EAAE,SAAS,CAAC;aACtE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,KACV,IAAI,YAER,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,GAAI,GACrC,CACV,CAAA;AACL,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** The door. See the repo blueprint, section 4.1.6. */
2
+ export { FramedIcon } from './framed-icon.js';
3
+ export type { FramedIconProps, FramedIconShape } from './framed-icon.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/framed-icon/index.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA"}
@@ -0,0 +1,3 @@
1
+ /** The door. See the repo blueprint, section 4.1.6. */
2
+ export { FramedIcon } from './framed-icon.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/framed-icon/index.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA"}
@@ -0,0 +1,165 @@
1
+ /* The gallery's sheet: a floor with a growth factor, a window whose ratio is a pair, the five
2
+ * declarations that make a scroll track a carousel, and the chrome that floats over it. Every
3
+ * colour here is a channel out of styles/on-media.css; none is written. See the repo blueprint,
4
+ * sections 4.1.11 and 4.2.
5
+ *
6
+ * ---- the floor, and the 1.4 beside it --------------------------------------
7
+ *
8
+ * `26rem` is 416px, the live gallery's own floor, and it is `mode-card`'s number -- so this is the
9
+ * ninth block width written by hand here and no new number.
10
+ * issues/done/030-the-block-width-family.md counts them; ten over six distinct numbers after this
11
+ * band, against a written condition of *a seventh number*, so it did not fire.
12
+ *
13
+ * **`1.4` is the decision the issue left open and it landed here rather than in card-grid.**
14
+ * The case against: 1.4 means nothing on its own, it is a ratio to the thing beside it, and *a
15
+ * statement about the row* is the sentence that bought `CardGrid` its `columns` mode. **What beat
16
+ * it is that this repo has written a growth factor in a card's own sheet since the first band** --
17
+ * stat-card, achievement-card, feature-card and mode-card all write `flex: 1 1 min(...)`, and `1`
18
+ * is a growth factor, simply the neutral one. `1.4` is the same statement at a different value.
19
+ * The other side also costs more than `columns` did: a value per CHILD reaches CardGrid as an array
20
+ * prop or as an attribute written onto children it treats as opaque, which is a call-site API with
21
+ * one data point -- governance/evidence/size-an-api-from-call-sites-not-from-the-type.md, and the same
22
+ * component already refused a floor prop on that ground.
23
+ *
24
+ * **The pair was checked against the live row rather than assumed.** Over floors of 416 and 320 in
25
+ * a 1136px row, 1.4 against 1 gives 640 and 480; the live pair at 1280 is 505 and 383. 1.33 against
26
+ * 1.32. The absolute widths differ because the live band is 904px wide and ours is the page.
27
+ *
28
+ * `min(..., 100%)` for card-box.tsx's reason: a bare minimum is a floor a flex item will not shrink
29
+ * past, so a card in a container narrower than its own minimum pushes out and gives the page a
30
+ * horizontal scrollbar.
31
+ *
32
+ * ---- the window, and why its ratio is two rules ----------------------------
33
+ *
34
+ * `.newtone-media-window` is Newtone's `media-window.css` and this is its **third** writer, the first that is not a
35
+ * card. Everything a window IS lives there; what is here is what is this one's -- and this one's is
36
+ * a PAIR, where both existing writers state a single value. So the shape's *invariant per card
37
+ * kind* is really *invariant per writer at each width*, and no edit was needed there to say so.
38
+ *
39
+ * **`48rem` and not the reference's 960px.** Its three sheets for this band swap at 960 because that is
40
+ * where its two-column media row stacks -- a fact about a row, not about a number, and
41
+ * governance/documents/copy-the-argument-not-the-rule.md says the reason is what crosses. **Our row stacks
42
+ * somewhere else**: 416 + 16 + 320 is 752px of content and this page spends 32px a side above the
43
+ * phone width, so it goes one-up near 816. Neither number is that, and a third hand-typed width is
44
+ * not this repo's to spend -- issues/done/022-breakpoint-vocabulary.md gave Newtone `phone` (768)
45
+ * and `laptop` (1280), `60rem` is already written twice in newtone_website, and
46
+ * `node tools/check-breakpoints.mjs` fails on a width two repos type that the vocabulary does not
47
+ * name. **The give-way is 48 pixels wide** -- and the sentence that used to describe it here was
48
+ * backwards in both of its clauses, corrected 2026-09-06 when the band was first rendered. It read
49
+ * *between 768 and about 816 the row has not stacked and the picture is already at 3 / 2*.
50
+ * **Measured: the row goes side by side at 816 and the ratio swaps at 768**, so between 769 and 815
51
+ * the row HAS stacked and this window is still at 16 / 10 -- a full-width picture wearing the shape
52
+ * meant for a half-width one. At 815 it is 751 x 469. The arithmetic above produced both numbers
53
+ * correctly and the sentence written from it inverted each. It is recorded in
54
+ * the consuming site's own knowledge entry.
55
+ *
56
+ * ---- the track: five declarations, and none of them is ours -----------------
57
+ *
58
+ * **The sliding is not ours to build.** `scroll-snap-type: x mandatory` makes the track come to
59
+ * rest on a slide; `scroll-snap-align: start` and `scroll-snap-stop: always` say which slide and
60
+ * that a fast flick may not skip past one; `overscroll-behavior-inline: contain` stops a horizontal
61
+ * swipe becoming a page-level gesture at the ends; `scroll-behavior: smooth` is what makes the
62
+ * arrows animate without anything here naming a duration or an easing -- which matters, because
63
+ * section 8 defers a motion vocabulary and this band gets to not want one.
64
+ *
65
+ * Touch, momentum, the trackpad, the keyboard's own scrolling and the resting position are all the
66
+ * browser's. gallery.tsx adds `aria-current` and the timer, and nothing else.
67
+ *
68
+ * **`display: flex` is here because .newtone-media-window undoes it.** The shape's `> *` rule sets
69
+ * `display: block`, `width: 100%` and `height: 100%` on whatever is in the slot -- which is exactly
70
+ * what the track wants for its box and exactly wrong for its children. Same specificity, and
71
+ * site.css loads shapes.css before every component sheet, so this wins by order. That ordering is
72
+ * the one clause in site.css's list that is a constraint rather than a taste, and this is the first
73
+ * rule in this repo that depends on it.
74
+ *
75
+ * ---- the chrome, which sits OUTSIDE the window -----------------------------
76
+ *
77
+ * Positioned against `.newtone-gallery` rather than against the window, so the window keeps exactly one
78
+ * child. That is the whole reason section 8's picture-window overlay exemption did not have to be
79
+ * built: `> *` stretching a mark over a whole photograph is a real hazard and the answer was to put
80
+ * the marks in the other box, not to add a hatch to the shape.
81
+ *
82
+ * `space-3` is 12px, the live page's own inset for both. */
83
+
84
+ .newtone-gallery {
85
+ position: relative;
86
+ flex: 1.4 1 min(26rem, 100%);
87
+ min-width: min(26rem, 100%);
88
+ }
89
+
90
+ .newtone-gallery-window {
91
+ --newtone-media-window-ratio: 16 / 10;
92
+ }
93
+
94
+ .newtone-gallery-track {
95
+ display: flex;
96
+ overflow-x: auto;
97
+ overscroll-behavior-inline: contain;
98
+ scroll-snap-type: x mandatory;
99
+ scroll-behavior: smooth;
100
+ /* The rail below says where a reader is; a scrollbar over the bottom of a photograph says it
101
+ again, in a widget nobody styled. Firefox's property and WebKit's pseudo-element are not
102
+ fallbacks for each other -- neither engine reads the other's -- and where a browser reads
103
+ neither, the bar is a browser's own furniture and the carousel still works. */
104
+ scrollbar-width: none;
105
+ }
106
+
107
+ .newtone-gallery-track::-webkit-scrollbar {
108
+ display: none;
109
+ }
110
+
111
+ .newtone-gallery-slide {
112
+ /* One slide is exactly the track's width, which is what lets gallery.tsx read the index off
113
+ `scrollLeft / clientWidth` and never measure a slide. */
114
+ flex: 0 0 100%;
115
+ min-width: 0;
116
+ scroll-snap-align: start;
117
+ scroll-snap-stop: always;
118
+ }
119
+
120
+ .newtone-gallery-picture {
121
+ display: block;
122
+ width: 100%;
123
+ height: 100%;
124
+ object-fit: cover;
125
+ }
126
+
127
+ .newtone-gallery-arrow {
128
+ position: absolute;
129
+ top: 50%;
130
+ transform: translateY(-50%);
131
+ }
132
+
133
+ .newtone-gallery-arrow-prev {
134
+ left: var(--newtone-gallery-control-inset);
135
+ }
136
+
137
+ .newtone-gallery-arrow-next {
138
+ right: var(--newtone-gallery-control-inset);
139
+ }
140
+
141
+ .newtone-gallery-ticks {
142
+ position: absolute;
143
+ bottom: var(--newtone-gallery-control-inset);
144
+ left: 50%;
145
+ transform: translateX(-50%);
146
+ display: flex;
147
+ align-items: center;
148
+ gap: var(--newtone-gallery-tick-gap);
149
+ }
150
+
151
+ @media (max-width: 48rem) {
152
+ .newtone-gallery-window {
153
+ --newtone-media-window-ratio: 3 / 2;
154
+ }
155
+ }
156
+
157
+ /* Half of this band's answer to a reader who asked for no motion. The other half is in gallery.tsx,
158
+ * where the timer never arms -- **a media query cannot stop a `setInterval`**, which is why section
159
+ * 5's motion row names that file as well as this one. Section 8 carries why the vocabulary those
160
+ * two guards would read from is still deferred. */
161
+ @media (prefers-reduced-motion: reduce) {
162
+ .newtone-gallery-track {
163
+ scroll-behavior: auto;
164
+ }
165
+ }
@@ -0,0 +1,85 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ /**
3
+ * Five photographs on a track the browser already scrolls, with a disc at each edge, a rail of
4
+ * marks under them, and a slide that changes by itself every five seconds.
5
+ *
6
+ * Its first consumer renders one of these. See the repo blueprint, section 3.
7
+ *
8
+ * ---- what is NOT here, which is most of it ---------------------------------
9
+ *
10
+ * **The sliding is not ours to build and the reference says so before we do:** *a scroll-snap track
11
+ * has all of it already*. Five declarations in gallery.css carry the swipe, the momentum, the
12
+ * trackpad, the keyboard's own scrolling and the resting position, and every one of them is the
13
+ * browser's implementation rather than a re-creation of it. There is no pointer capture here, no
14
+ * drag delta, no velocity threshold and no rubber-band, because a scroll container is those things.
15
+ * governance/documents/copy-the-argument-not-the-rule.md -- what crossed is the reasoning, and here the
16
+ * reasoning IS the five declarations.
17
+ *
18
+ * ---- so why this file has a directive at all --------------------------------
19
+ *
20
+ * **Two things are not markup, and they were argued as two questions rather than one.**
21
+ * `aria-current` following the scroll, and self-advance. This is the first file in this repo to
22
+ * carry `'use client'`, alongside video-lightbox/ -- section 5's row is a named set of two now, and
23
+ * accordion/ remains the component that wanted state and got `<details name>` instead.
24
+ *
25
+ * **The candidate that looked cheapest fails on its own terms.** *Ticks as anchors now, a directive
26
+ * later* defers behind the trigger *the day the missing `aria-current` is judged wrong against the
27
+ * live page* -- and the costing that wrote that sentence had already made that judgement, the same
28
+ * day, off the same reading. A deferral whose trigger has already fired is a silence.
29
+ * governance/deferrals/a-fired-trigger-cannot-be-a-deferral.md.
30
+ *
31
+ * **And a rail of five marks that never change is a placeholder.** *Ticks as anchors, no directive*
32
+ * keeps the rail and drops the state, which leaves five buttons claiming to say where a reader is
33
+ * and saying nothing -- governance/voice/an-omission-costs-nothing-a-placeholder-makes-a-claim.md. The
34
+ * honest options were a working rail or no rail, and the page being rebuilt has a rail.
35
+ *
36
+ * ---- self-advance, which was its own decision -------------------------------
37
+ *
38
+ * It is the half this repo was free to decline: a carousel that does not advance by itself is still
39
+ * a carousel, and one that cannot be scrolled is not. **What decided it is that the directive was
40
+ * already paid for and declining would have bought a concession for no saving** -- the live page
41
+ * opts in, at 5s, and a rebuild that quietly did not would owe the knowledge entry's section 4 a
42
+ * line. governance/evidence/record-a-concession-in-values-not-in-names.md.
43
+ *
44
+ * **Three guards, and the first is not optional.** It never arms under `prefers-reduced-motion`; it
45
+ * holds while a pointer or the keyboard focus is inside; it holds while the document is hidden.
46
+ * **The first is the one no stylesheet can carry** -- gallery.css answers the same reader by
47
+ * dropping `scroll-behavior` to `auto`, and there is no media query that can stop a `setInterval`.
48
+ * That is section 5's motion row and section 8's, and it is why this file is named in the check.
49
+ *
50
+ * ---- what was taken from the reference and what was left --------------------
51
+ *
52
+ * **Its `MIN_FOR_CHROME` guard is left.** That hides the arrows and the rail below two pictures,
53
+ * which is a library defending itself against call sites it cannot see; this component has one and
54
+ * it passes five. governance/evidence/size-an-api-from-call-sites-not-from-the-type.md, and
55
+ * governance/mechanisms/the-clause-edge/a-vector-nothing-executes-is-a-claim.md for the other half -- a branch nothing reaches
56
+ * is a defence nobody has tested. Trigger: a second call site passes fewer than two.
57
+ *
58
+ * **Its instant wrap is taken**, and the reason rather than the code: a wrap animated across five
59
+ * slides reads as a rewind and not as a step.
60
+ *
61
+ * ---- the labels, which are the first English in components/ -----------------
62
+ *
63
+ * Every accessible name in this folder so far arrives as a prop -- logo-marquee's group label,
64
+ * media-plate's, portrait's alt. These do not, because **the band does not know the gallery has
65
+ * arrows.** They name a control this component owns, they are invariant per component, and a prop
66
+ * with one possible value is an API sized from a type rather than from a call site. `label` is
67
+ * still the band's, because what the carousel is OF is the band's to say. Trigger: this page is
68
+ * served in a second language, or a second call site wants different words.
69
+ */
70
+ export interface GalleryImage {
71
+ /** The photograph, served by the consuming app. */
72
+ src: string;
73
+ /** What it shows. Real alt text -- a slide in a carousel is content a reader would otherwise
74
+ * miss, which is why these are described where the film's poster and the Bangkok photograph
75
+ * are `alt=""`. */
76
+ alt: string;
77
+ }
78
+ export interface GalleryProps extends HTMLAttributes<HTMLElement> {
79
+ /** The pictures, in order. */
80
+ images: GalleryImage[];
81
+ /** What the carousel is of, spoken. The band's to say. */
82
+ label: string;
83
+ }
84
+ export declare function Gallery({ images, label, className, ...rest }: GalleryProps): import("react").JSX.Element;
85
+ //# sourceMappingURL=gallery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../../src/gallery/gallery.tsx"],"names":[],"mappings":"AAEA,OAAO,EAKH,KAAK,cAAc,EAEtB,MAAM,OAAO,CAAA;AAGd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,MAAM,WAAW,YAAY;IACzB,mDAAmD;IACnD,GAAG,EAAE,MAAM,CAAA;IACX;;wBAEoB;IACpB,GAAG,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,WAAW,CAAC;IAC7D,8BAA8B;IAC9B,MAAM,EAAE,YAAY,EAAE,CAAA;IACtB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAA;CAChB;AAKD,wBAAgB,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,+BA8J1E"}
@@ -0,0 +1,75 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useRef, useState, } from 'react';
4
+ import { Icon } from '../icon/index.js';
5
+ /** Five seconds, the live page's own interval. */
6
+ const ADVANCE_MS = 5000;
7
+ export function Gallery({ images, label, className, ...rest }) {
8
+ const trackRef = useRef(null);
9
+ const [index, setIndex] = useState(0);
10
+ const pointerWithin = useRef(false);
11
+ const focusWithin = useRef(false);
12
+ const count = images.length;
13
+ // `clientWidth` and not a slide's own width: every slide is exactly the track's width
14
+ // (`flex: 0 0 100%`), so the track is the one box that has to be measured and the slides never
15
+ // do. A zero width is a track that has not been laid out yet -- scrolling it would land at 0
16
+ // and report slide one as current when it is not.
17
+ const goTo = useCallback((to, instant = false) => {
18
+ const track = trackRef.current;
19
+ if (!track || track.clientWidth === 0)
20
+ return;
21
+ track.scrollTo({ left: to * track.clientWidth, behavior: instant ? 'instant' : undefined });
22
+ }, []);
23
+ // One step in either direction, wrapping. **The wrap is instant where every other move is
24
+ // smooth**, and the reason is the reference's: an animated scroll across five slides reads as a
25
+ // rewind rather than as a step.
26
+ const step = useCallback((delta) => {
27
+ if (count === 0)
28
+ return;
29
+ const to = index + delta;
30
+ const wrapped = ((to % count) + count) % count;
31
+ goTo(wrapped, wrapped !== to);
32
+ }, [count, goTo, index]);
33
+ // The scroll is the source of truth and this only reads it. A tick is current because the track
34
+ // is resting there, whether it got there by a swipe, an arrow, a keypress or the timer -- so
35
+ // there is one place the index comes from and no state to keep in step with the browser's.
36
+ const onScroll = () => {
37
+ const track = trackRef.current;
38
+ if (!track || track.clientWidth === 0)
39
+ return;
40
+ const at = Math.min(Math.max(Math.round(track.scrollLeft / track.clientWidth), 0), count - 1);
41
+ setIndex((prev) => (prev === at ? prev : at));
42
+ };
43
+ // The track is focusable, so a keyboard reaches it; these two put the arrows' behaviour on the
44
+ // keys that already mean it. `preventDefault` because the browser's own arrow-key scrolling
45
+ // moves by a line rather than by a slide, and both firing would land between two.
46
+ const onKeyDown = (event) => {
47
+ if (event.key === 'ArrowLeft') {
48
+ event.preventDefault();
49
+ step(-1);
50
+ }
51
+ else if (event.key === 'ArrowRight') {
52
+ event.preventDefault();
53
+ step(1);
54
+ }
55
+ };
56
+ useEffect(() => {
57
+ // **The guard no stylesheet could hold.** gallery.css answers this reader by dropping
58
+ // `scroll-behavior` to `auto`; a media query cannot stop a timer, so the timer has to ask.
59
+ if (window.matchMedia('(prefers-reduced-motion: reduce)').matches)
60
+ return;
61
+ const timer = setInterval(() => {
62
+ // Pointer or focus inside means somebody is reading this one; hidden means nobody is
63
+ // watching at all and advancing would only be a jump they arrive back to.
64
+ if (pointerWithin.current || focusWithin.current || document.hidden)
65
+ return;
66
+ step(1);
67
+ }, ADVANCE_MS);
68
+ return () => clearInterval(timer);
69
+ // `step` closes over `index`, so this re-arms on every slide change. That is the behaviour
70
+ // rather than a leak: the five seconds are measured from the last move, not from mount, so
71
+ // a reader who has just swiped gets a full interval before the next one.
72
+ }, [step]);
73
+ return (_jsxs("div", { ...rest, className: ['newtone-gallery', className].filter(Boolean).join(' '), role: "group", "aria-roledescription": "carousel", "aria-label": label, onPointerEnter: () => (pointerWithin.current = true), onPointerLeave: () => (pointerWithin.current = false), onFocus: () => (focusWithin.current = true), onBlur: () => (focusWithin.current = false), children: [_jsx("div", { className: "newtone-media-window newtone-gallery-window", children: _jsx("div", { ref: trackRef, className: "newtone-gallery-track", tabIndex: 0, onScroll: onScroll, onKeyDown: onKeyDown, children: images.map((image, i) => (_jsx("div", { className: "newtone-gallery-slide", role: "group", "aria-roledescription": "slide", "aria-label": `${i + 1} of ${count}`, children: _jsx("img", { className: "newtone-gallery-picture", src: image.src, alt: image.alt, loading: "lazy", draggable: false }) }, image.src))) }) }), _jsx("button", { type: "button", className: "newtone-on-media-control newtone-gallery-arrow newtone-gallery-arrow-prev", "aria-label": "Previous image", onClick: () => step(-1), children: _jsx(Icon, { name: "chevron_left" }) }), _jsx("button", { type: "button", className: "newtone-on-media-control newtone-gallery-arrow newtone-gallery-arrow-next", "aria-label": "Next image", onClick: () => step(1), children: _jsx(Icon, { name: "chevron_right" }) }), _jsx("div", { className: "newtone-gallery-ticks", children: images.map((image, i) => (_jsx("button", { type: "button", className: "newtone-on-media-mark newtone-gallery-tick", "aria-label": `Go to image ${i + 1} of ${count}`, "aria-current": i === index ? true : undefined, onClick: () => goTo(i) }, image.src))) })] }));
74
+ }
75
+ //# sourceMappingURL=gallery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gallery.js","sourceRoot":"","sources":["../../src/gallery/gallery.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EACH,WAAW,EACX,SAAS,EACT,MAAM,EACN,QAAQ,GAGX,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAsFvC,kDAAkD;AAClD,MAAM,UAAU,GAAG,IAAI,CAAA;AAEvB,MAAM,UAAU,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAgB;IACvE,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAC7C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IACrC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IACnC,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IACjC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAA;IAE3B,sFAAsF;IACtF,+FAA+F;IAC/F,6FAA6F;IAC7F,kDAAkD;IAClD,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,EAAU,EAAE,OAAO,GAAG,KAAK,EAAE,EAAE;QACrD,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAA;QAC9B,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,WAAW,KAAK,CAAC;YAAE,OAAM;QAC7C,KAAK,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,KAAK,CAAC,WAAW,EAAE,QAAQ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,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC5C,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,IAVjB,KAAK,CAAC,GAAG,CAWhB,CACL,CAAC,GACA,IACJ,CACT,CAAA;AACL,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** The door. See the repo blueprint, section 3. */
2
+ export { Gallery } from './gallery.js';
3
+ export type { GalleryProps, GalleryImage } from './gallery.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gallery/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,3 @@
1
+ /** The door. See the repo blueprint, section 3. */
2
+ export { Gallery } from './gallery.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gallery/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,83 @@
1
+ /* The icon's sheet. Two per-instance values arrive on the element as `--newtone-icon-px` and `--newtone-icon-fill`;
2
+ * everything else here is true of every glyph, every time.
3
+ *
4
+ * ---- why this file exists at all -----------------------------------------
5
+ *
6
+ * **Google's own class is not used.** The `@import url(...)` at the top of the generated
7
+ * `tokens/fonts.css` fetches a stylesheet from Google that carries the face declarations AND a
8
+ * `.material-symbols-rounded` class doing most of what is below. We do not write that class name
9
+ * anywhere. A third party's rule arriving through an import is not a token: nobody here chose its
10
+ * contents, nothing would report a change to them, and the cascade position it lands in is decided
11
+ * by an import order that exists for a different reason. So the rules are restated here, where they
12
+ * can be read beside the component that depends on them.
13
+ *
14
+ * ---- the optical size, and the one risky line ----------------------------
15
+ *
16
+ * `opsz` tracks the glyph's pixel size, clamped to the range the font actually supports. **The
17
+ * bounds are tokens and this file reads them** -- issue 024 put `--newtone-icon-opsz-min` and
18
+ * `--newtone-icon-opsz-max` in the stylesheet for exactly this, and section 5 of the repo blueprint
19
+ * asserts that no number appears here instead.
20
+ *
21
+ * That forces the arithmetic into CSS, because a custom property has no value until the browser
22
+ * resolves it -- see icon.tsx for the two things computing it in JavaScript would have cost.
23
+ *
24
+ * **What it depends on is a math function where the axis takes a `<number>`.** CSS Values 4 allows
25
+ * one anywhere a number is allowed and current browsers implement it. It is all-or-nothing: an
26
+ * invalid `font-variation-settings` drops the whole declaration, so a browser that refuses the
27
+ * clamp loses `FILL` and `wght` with it rather than rendering a slightly wrong optical size.
28
+ * **That is a thing to look at rather than to reason about** -- the repo blueprint, section 10,
29
+ * carries it as a browser debt with what to check.
30
+ *
31
+ * `GRAD` is a locked 0 -- no emphasis grade -- and is the one literal here on purpose: it is not a
32
+ * bound and there is no token for it, because nothing has ever wanted a second value.
33
+ *
34
+ * `font-weight: normal` and the `wght` axis are not in competition: the keyword keeps the browser
35
+ * from synthesising a bold, and the axis is what actually sets the stroke. */
36
+
37
+ .newtone-icon {
38
+ font-family: var(--newtone-icon-family);
39
+ font-weight: normal;
40
+ font-style: normal;
41
+ font-size: calc(var(--newtone-icon-px) * 1px);
42
+ width: calc(var(--newtone-icon-px) * 1px);
43
+ height: calc(var(--newtone-icon-px) * 1px);
44
+
45
+ /* A ligature is what turns the text `trending_up` into a glyph. Without it the icon renders as
46
+ * its own name, which is a failure that reads as a content bug rather than a font one. */
47
+ font-feature-settings: 'liga';
48
+
49
+ /* The rules that stop a ligature being reflowed, transformed or spaced out of existence. */
50
+ line-height: 1;
51
+ letter-spacing: normal;
52
+ text-transform: none;
53
+ white-space: nowrap;
54
+ word-wrap: normal;
55
+ direction: ltr;
56
+
57
+ /* A fixed square that no flex or grid parent can stretch, with the glyph centred in it.
58
+ *
59
+ * `vertical-align` is the live sheet's own and it arrived here on 2026-09-05, when the
60
+ * credential card put a glyph INSIDE a heading -- the first inline context on this page. An
61
+ * inline-flex box otherwise sits on the text baseline, so a 20px square beside 18px words rides
62
+ * low by its own descender; `middle` centres it against the x-height instead. Every earlier call
63
+ * site is a flex child, where this declaration does nothing at all. */
64
+ display: inline-flex;
65
+ vertical-align: middle;
66
+ align-items: center;
67
+ justify-content: center;
68
+ flex: none;
69
+ overflow: hidden;
70
+ user-select: none;
71
+ -webkit-font-smoothing: antialiased;
72
+
73
+ font-variation-settings:
74
+ 'FILL' var(--newtone-icon-fill),
75
+ 'wght' var(--newtone-icon-weight),
76
+ 'GRAD' 0,
77
+ 'opsz'
78
+ clamp(
79
+ var(--newtone-icon-opsz-min),
80
+ var(--newtone-icon-px),
81
+ var(--newtone-icon-opsz-max)
82
+ );
83
+ }