jenosize-ui 0.2.1 → 0.3.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 (225) hide show
  1. package/README.md +183 -63
  2. package/THIRD-PARTY-NOTICES.md +15 -0
  3. package/dist/GradientPicker-CQm3GT7F.d.ts +144 -0
  4. package/dist/{PaymentInput-Dn5WVQVy.d.ts → PaymentInput-Cz5jFB3p.d.ts} +1 -1
  5. package/dist/{Select-Dt5ARIH8.d.ts → Select-CXOAMlk7.d.ts} +15 -1
  6. package/dist/{TagInput-BaBeve6L.d.ts → TagInput-CzIrONr-.d.ts} +1 -1
  7. package/dist/area-chart.d.ts +2 -2
  8. package/dist/area-chart.js +7 -6
  9. package/dist/at-least-one-BZ2dsck-.d.ts +18 -0
  10. package/dist/avatar.d.ts +1 -1
  11. package/dist/avatar.js +12 -11
  12. package/dist/badge.d.ts +1 -1
  13. package/dist/badge.js +6 -6
  14. package/dist/bar-chart.d.ts +2 -2
  15. package/dist/bar-chart.js +7 -6
  16. package/dist/breadcrumb.d.ts +1 -1
  17. package/dist/breadcrumb.js +4 -4
  18. package/dist/button.d.ts +1 -1
  19. package/dist/button.js +11 -10
  20. package/dist/calendar.d.ts +1 -1
  21. package/dist/calendar.js +16 -15
  22. package/dist/callout.d.ts +4 -2
  23. package/dist/callout.js +12 -11
  24. package/dist/card.d.ts +59 -3
  25. package/dist/card.js +4 -4
  26. package/dist/carousel.d.ts +169 -0
  27. package/dist/carousel.js +9 -0
  28. package/dist/catalog.json +11180 -0
  29. package/dist/checkbox.js +8 -7
  30. package/dist/{chunk-MVG5MABV.js → chunk-26XQU3TC.js} +8 -8
  31. package/dist/{chunk-X2X7Q7NW.js → chunk-2R3QWWOT.js} +3 -3
  32. package/dist/{chunk-AIARANKE.js → chunk-3JQKVC2K.js} +4 -4
  33. package/dist/chunk-3P3QZPHV.js +109 -0
  34. package/dist/{chunk-GLKFFA7N.js → chunk-44AWXIQK.js} +5 -5
  35. package/dist/{chunk-FWRHBMWT.js → chunk-4Y32RIC7.js} +5 -19
  36. package/dist/{chunk-5XPMY2LF.js → chunk-5ECTNYKU.js} +5 -5
  37. package/dist/{chunk-6B6BWTXC.js → chunk-5GBA6X6A.js} +5 -5
  38. package/dist/{chunk-UGKELBNC.js → chunk-5SGF47TZ.js} +9 -9
  39. package/dist/{chunk-POQTE7JI.js → chunk-5XSR757T.js} +7 -7
  40. package/dist/{chunk-GZMDZF2V.js → chunk-6FGLABYH.js} +3 -3
  41. package/dist/{chunk-MCQG4H6T.js → chunk-6T3QAO5K.js} +12 -4
  42. package/dist/{chunk-SKRR3ZMP.js → chunk-737A4YNC.js} +3 -3
  43. package/dist/{chunk-AFYXSZGW.js → chunk-7LSUUEAF.js} +7 -5
  44. package/dist/{chunk-7VLYQR4D.js → chunk-7OFGPDYJ.js} +3 -3
  45. package/dist/{chunk-54SIZR63.js → chunk-7UCKFULR.js} +7 -7
  46. package/dist/{chunk-LQURV7HQ.js → chunk-7ZA3QZRP.js} +4 -4
  47. package/dist/{chunk-X2VMIBK5.js → chunk-A4YPUS6C.js} +4 -4
  48. package/dist/{chunk-5ZEUTSCV.js → chunk-B4OVIE2X.js} +6 -6
  49. package/dist/{chunk-P6CON2R2.js → chunk-BH32X25C.js} +3 -3
  50. package/dist/{chunk-667ZHY3T.js → chunk-BJHLW25G.js} +85 -538
  51. package/dist/{chunk-ULGCGKOE.js → chunk-BKBINQJZ.js} +4 -4
  52. package/dist/{chunk-CFFWYXDW.js → chunk-BXQFBFT7.js} +5 -5
  53. package/dist/{chunk-I6WMNXC7.js → chunk-CQGMOPLG.js} +6 -6
  54. package/dist/{chunk-FNQJJO63.js → chunk-CUONE6LA.js} +4 -4
  55. package/dist/{chunk-FFMTYQXE.js → chunk-CVCS5G3E.js} +43 -21
  56. package/dist/{chunk-33TOK7ES.js → chunk-DCKVNHV5.js} +5 -5
  57. package/dist/{chunk-A323V6AI.js → chunk-DYRGHXT5.js} +3 -3
  58. package/dist/{chunk-T4ZFZTY6.js → chunk-EHML2DLR.js} +4 -4
  59. package/dist/{chunk-N3RVMBPX.js → chunk-EJKQGUUM.js} +4 -4
  60. package/dist/{chunk-E2YZ7IMT.js → chunk-ESDSTS5N.js} +6 -6
  61. package/dist/{chunk-LCG34A5T.js → chunk-EVINS473.js} +5 -3
  62. package/dist/chunk-EXRVOGJ5.js +325 -0
  63. package/dist/{chunk-YHBI52P2.js → chunk-GDW6NFYN.js} +3 -3
  64. package/dist/chunk-GOCO45FF.js +619 -0
  65. package/dist/{chunk-7ZM7SNCZ.js → chunk-GPHGPY6T.js} +3 -3
  66. package/dist/{chunk-PO2TYK3C.js → chunk-GWYDOZGQ.js} +3 -3
  67. package/dist/{chunk-LO22VQL5.js → chunk-HNNNJP3A.js} +4 -4
  68. package/dist/{chunk-ZZSNTCCL.js → chunk-IESEBPYA.js} +4 -4
  69. package/dist/{chunk-3H444OJA.js → chunk-JZ4HGFWK.js} +3 -3
  70. package/dist/chunk-KBQJIVUB.js +33 -0
  71. package/dist/{chunk-CKMWBVRR.js → chunk-KCM4KEZ2.js} +4 -4
  72. package/dist/{chunk-3QXLIZIX.js → chunk-KNGJ3CSB.js} +3 -3
  73. package/dist/{chunk-FH7Z7SGQ.js → chunk-KNW3IUWX.js} +12 -11
  74. package/dist/{chunk-KZP6B6B3.js → chunk-KTWTYK5U.js} +16 -5
  75. package/dist/{chunk-LYXPJERB.js → chunk-L7Z6XGBU.js} +5 -5
  76. package/dist/{chunk-ZHAT2XZ4.js → chunk-LLUWBQK6.js} +10 -10
  77. package/dist/{chunk-QHH6AUR3.js → chunk-MDKVYC6R.js} +7 -7
  78. package/dist/{chunk-22M75A3N.js → chunk-MS6DY4CE.js} +14 -11
  79. package/dist/{chunk-LLPWQDF7.js → chunk-MTOTPAYZ.js} +3 -3
  80. package/dist/{chunk-AZ7DKRBY.js → chunk-MVF7FA4D.js} +5 -5
  81. package/dist/{chunk-AIGYMTCU.js → chunk-MVUNB43J.js} +3 -3
  82. package/dist/{chunk-ZMFY7WAY.js → chunk-O24HHIQG.js} +41 -39
  83. package/dist/{chunk-NKG4N6HA.js → chunk-O5EHNNPS.js} +4 -4
  84. package/dist/{chunk-5DP7W5HX.js → chunk-OIPFTJS6.js} +3 -3
  85. package/dist/{chunk-U4WSJAYK.js → chunk-OXNIEIOY.js} +20 -20
  86. package/dist/chunk-P2BGR77C.js +344 -0
  87. package/dist/{chunk-CGHYXWTT.js → chunk-PFAFTLN3.js} +4 -4
  88. package/dist/{chunk-4RBIWI2Q.js → chunk-Q2KR7PSX.js} +3 -3
  89. package/dist/{chunk-7GUPNTAH.js → chunk-QSOLK2I2.js} +7 -7
  90. package/dist/chunk-QTWRR7IS.js +1129 -0
  91. package/dist/{chunk-OLLD2BZN.js → chunk-QZHAL4BL.js} +3 -3
  92. package/dist/{chunk-OACWA4TC.js → chunk-R25NHHYT.js} +6 -6
  93. package/dist/{chunk-QDKETK7D.js → chunk-S55JKMG7.js} +5 -5
  94. package/dist/{chunk-S5TEWPWW.js → chunk-S5LLA36K.js} +10 -10
  95. package/dist/{chunk-QDYE5LVT.js → chunk-SF3HCW4G.js} +45 -4
  96. package/dist/{chunk-KHGW72BM.js → chunk-SGMVB7HD.js} +3 -3
  97. package/dist/{chunk-FKVPAEJ6.js → chunk-SKJC2KYD.js} +4 -3
  98. package/dist/chunk-SKPKL47Y.js +5671 -0
  99. package/dist/{chunk-6MMBQVRO.js → chunk-TCTTZHUS.js} +9 -9
  100. package/dist/chunk-U5X3MLM5.js +67 -0
  101. package/dist/chunk-UHSGD4CD.js +364 -0
  102. package/dist/chunk-UJ4WEQHR.js +525 -0
  103. package/dist/{chunk-6H4LNWQ7.js → chunk-VDFWWWLL.js} +9 -4
  104. package/dist/{chunk-5KSD4WKN.js → chunk-VIKV25VP.js} +5 -5
  105. package/dist/chunk-WJB5GWAZ.js +20 -0
  106. package/dist/{chunk-HHYEAFCL.js → chunk-XAQQ4LYL.js} +11 -11
  107. package/dist/{chunk-4VGEJG4M.js → chunk-XCFFM2C7.js} +9 -9
  108. package/dist/chunk-XKTD3X6Z.js +183 -0
  109. package/dist/{chunk-GQRSABRN.js → chunk-XWXXKEG6.js} +4 -4
  110. package/dist/chunk-YGFTNICV.js +110 -0
  111. package/dist/{chunk-T5574MXM.js → chunk-YGJL7QS7.js} +8 -8
  112. package/dist/{chunk-SB3DG572.js → chunk-YKPTUANT.js} +6 -6
  113. package/dist/{chunk-YQYVGWIC.js → chunk-YQAYAJ2T.js} +33 -11
  114. package/dist/chunk-YXYZW6WU.js +998 -0
  115. package/dist/{chunk-IQNVSQRK.js → chunk-Z6NSOC6T.js} +5 -5
  116. package/dist/{chunk-BBKE4W3B.js → chunk-ZAWGG4H2.js} +7 -7
  117. package/dist/{chunk-BFVJHH7S.js → chunk-ZF362B2X.js} +5 -5
  118. package/dist/{chunk-RJTVCA62.js → chunk-ZJIY642R.js} +3 -3
  119. package/dist/color-input.d.ts +93 -0
  120. package/dist/color-input.js +35 -0
  121. package/dist/color-picker.d.ts +268 -0
  122. package/dist/color-picker.js +28 -0
  123. package/dist/color-value-DYzChVOW.d.ts +129 -0
  124. package/dist/combobox.d.ts +1 -1
  125. package/dist/combobox.js +13 -12
  126. package/dist/date-calendar.d.ts +49 -0
  127. package/dist/date-calendar.js +12 -0
  128. package/dist/date-input.d.ts +1 -1
  129. package/dist/date-input.js +11 -10
  130. package/dist/date-picker.d.ts +15 -131
  131. package/dist/date-picker.js +26 -22
  132. package/dist/date-types-DrDdF6WJ.d.ts +100 -0
  133. package/dist/dialog.d.ts +1 -1
  134. package/dist/dialog.js +10 -10
  135. package/dist/drawer.d.ts +1 -1
  136. package/dist/drawer.js +9 -9
  137. package/dist/dropdown-menu.d.ts +1 -1
  138. package/dist/dropdown-menu.js +6 -6
  139. package/dist/dropzone.d.ts +3 -3
  140. package/dist/dropzone.js +17 -16
  141. package/dist/form.d.ts +15 -5
  142. package/dist/form.js +75 -36
  143. package/dist/header-navigation.d.ts +2 -2
  144. package/dist/header-navigation.js +21 -20
  145. package/dist/helper.d.ts +1 -1
  146. package/dist/index.d.ts +25 -11
  147. package/dist/index.js +92 -79
  148. package/dist/indicator.js +4 -4
  149. package/dist/inline-banner.d.ts +68 -0
  150. package/dist/inline-banner.js +20 -0
  151. package/dist/input.d.ts +1 -1
  152. package/dist/input.js +10 -9
  153. package/dist/kanban-board.d.ts +2 -2
  154. package/dist/kanban-board.js +16 -15
  155. package/dist/labels-C992bt7G.d.ts +1160 -0
  156. package/dist/line-chart.d.ts +2 -2
  157. package/dist/line-chart.js +7 -6
  158. package/dist/mcp.js +231 -0
  159. package/dist/number-input.d.ts +1 -1
  160. package/dist/number-input.js +10 -9
  161. package/dist/pagination.d.ts +1 -1
  162. package/dist/pagination.js +14 -13
  163. package/dist/{card-D56VxyAe.d.ts → panel-CUGm_Mxy.d.ts} +9 -57
  164. package/dist/payment-input.d.ts +3 -3
  165. package/dist/payment-input.js +10 -9
  166. package/dist/picker-draft-BPV3MUPY.d.ts +9 -0
  167. package/dist/pie-chart.d.ts +2 -2
  168. package/dist/pie-chart.js +7 -6
  169. package/dist/popover.d.ts +65 -4
  170. package/dist/popover.js +9 -9
  171. package/dist/progress-steps.js +4 -4
  172. package/dist/progress.js +3 -3
  173. package/dist/provider.d.ts +1 -1
  174. package/dist/provider.js +3 -3
  175. package/dist/qr-code.d.ts +227 -0
  176. package/dist/qr-code.js +19 -0
  177. package/dist/radar-chart.d.ts +2 -2
  178. package/dist/radar-chart.js +7 -6
  179. package/dist/radial-chart.d.ts +2 -2
  180. package/dist/radial-chart.js +7 -6
  181. package/dist/radio.js +8 -7
  182. package/dist/rich-text-editor.d.ts +624 -0
  183. package/dist/rich-text-editor.js +51 -0
  184. package/dist/rich-text-highlight.d.ts +11 -0
  185. package/dist/rich-text-highlight.js +65 -0
  186. package/dist/rich-text-sanitize.d.ts +17 -0
  187. package/dist/rich-text-sanitize.js +176 -0
  188. package/dist/scroll-area.js +2 -2
  189. package/dist/select.d.ts +2 -2
  190. package/dist/select.js +17 -16
  191. package/dist/separator.js +2 -2
  192. package/dist/shared-CGf2D8ZX.d.ts +20 -0
  193. package/dist/sidebar-navigation.d.ts +76 -27
  194. package/dist/sidebar-navigation.js +16 -15
  195. package/dist/sidebar-state.d.ts +76 -0
  196. package/dist/sidebar-state.js +27 -0
  197. package/dist/skeleton.js +2 -2
  198. package/dist/slider.d.ts +321 -0
  199. package/dist/slider.js +13 -0
  200. package/dist/styles.css +1 -1
  201. package/dist/switch.d.ts +1 -1
  202. package/dist/switch.js +2 -2
  203. package/dist/table.d.ts +3 -19
  204. package/dist/table.js +34 -33
  205. package/dist/tabs.js +2 -2
  206. package/dist/tag-input.d.ts +3 -3
  207. package/dist/tag-input.js +13 -12
  208. package/dist/tag.d.ts +1 -1
  209. package/dist/tag.js +4 -4
  210. package/dist/textarea.js +8 -7
  211. package/dist/theme.css +965 -0
  212. package/dist/theme.js +12 -11
  213. package/dist/toast.d.ts +1 -1
  214. package/dist/toast.js +12 -11
  215. package/dist/tooltip.js +4 -3
  216. package/dist/tree.d.ts +1 -1
  217. package/dist/tree.js +6 -6
  218. package/dist/{types-DR9rAEy1.d.ts → types-DYFl0CEB.d.ts} +1 -1
  219. package/dist/{use-uploads-KaPqDklo.d.ts → use-uploads-2E7n0PWT.d.ts} +1 -1
  220. package/dist/verification-code-input.js +10 -9
  221. package/package.json +92 -8
  222. package/dist/chunk-BLIZ3CL3.js +0 -49
  223. package/dist/labels-DPrh0se9.d.ts +0 -627
  224. package/dist/panel-El4oI68p.d.ts +0 -9
  225. package/dist/shared-BYXJPnsN.d.ts +0 -11
package/dist/theme.css CHANGED
@@ -188,6 +188,25 @@
188
188
  dialog-vs-backdrop measured 1.00:1). Its own role rather than `bg-overlay/20` at the call site,
189
189
  so the pairing lives in the token layer next to the radius it is tuned against. */
190
190
  --color-bg-overlay-soft: color-mix(in oklab, var(--color-neutral-950) 20%, transparent);
191
+ /* A SURFACE drawn ON an unknown colour — the carousel's framed indicator pill and its overlay
192
+ arrow chips, sitting on the caller's photograph. 90% opaque, so whatever is behind it stays
193
+ legible as texture without competing with the marks on top.
194
+
195
+ IT INVERTS IN DARK, and that reverses this role's first shipped position. The original argument
196
+ was the one `fg-on-color` and `border-on-color` still carry — it sits on the caller's media, not
197
+ on the page, so there is no page tone for it to respond to. Untitled UI disagrees, and measuring
198
+ the component settled it: their `--color-alpha-white` is `rgb(255 255 255)` in light and
199
+ `rgb(12 14 18)` in dark (`.refs/untitledui-react/styles/theme.css:106,483`), so their pill AND
200
+ their arrows flip together. Ours did not, and the result was two DIFFERENT on-media surfaces on
201
+ one photograph — a near-black arrow disc beside a white pill, in dark, on the same image. A
202
+ surface that hosts the page's own controls is read as belonging to the page even when it floats
203
+ over media; the two `on-color` roles that stay constant are a HAIRLINE and a GLYPH, which have
204
+ no such reading. Owner decision, 2026-08-19.
205
+
206
+ NOT `bg-overlay-soft`, which was the obvious reach and is wrong: that role is a DIMMING wash
207
+ designed to push a page BACK behind a modal (neutral-950 at 20%). On a photo it darkens the pill
208
+ instead of lifting it rather than giving it a surface of its own. */
209
+ --color-bg-on-color: oklch(1 0 0 / 0.9);
191
210
 
192
211
  /* Type. `text-*` is TYPE; `fg-*` below is NON-TEXT foreground (icons, dots, bars). The property
193
212
  * prefix does not tell you which — `text-fg-quaternary` is an ICON coloured with the `text`
@@ -231,6 +250,10 @@
231
250
  * icons paint mono glyphs with `fill-fg-secondary`, which is Untitled UI's own class string —
232
251
  * declaring the role is what lets it transfer VERBATIM instead of through a crosswalk. */
233
252
  --color-fg-secondary: var(--color-neutral-700);
253
+ /* Its hover step. Untitled UI's role and its values (neutral-800 / neutral-200); minted here for
254
+ * the carousel's page-side arrow box, whose glyph rests at `fg-secondary`. Without it the class
255
+ * would name nothing and the hover would silently not paint. */
256
+ --color-fg-secondary_hover: var(--color-neutral-800);
234
257
  --color-fg-quaternary: var(--color-neutral-400);
235
258
  --color-fg-quaternary_hover: var(--color-neutral-500);
236
259
  /* HOUSE: Untitled UI v8 replaced this with `opacity-50`, but a child's `opacity` EATS the inset
@@ -239,6 +262,12 @@
239
262
  /* Absorbs the former `fg-on-brand` AND `fg-on-inverse` — both were the literal #ffffff in both
240
263
  * themes. (`text-primary_on-brand` is NOT equivalent: its dark value is neutral-50.) */
241
264
  --color-fg-white: #ffffff;
265
+ /* A FOREGROUND drawn ON an unknown colour — the gradient picker's dashed angle guide. Constant
266
+ * white at 50%, with NO `.dark` pairing, for the same reason `border-on-color` is a constant
267
+ * darkening: it sits on the user's gradient, not on the page, so there is no page tone for it to
268
+ * respond to. The checkerboard's `raw-ramp-ok` escape hatch does not apply here — this one IS a
269
+ * foreground role, so it gets a role. */
270
+ --color-fg-on-color: oklch(1 0 0 / 0.5);
242
271
  /* Primary feedback glyph tints — the -600 stop, one step deeper than the `-secondary` pair below.
243
272
  * NOT interchangeable with `text-success-primary`/`text-warning-primary`/`text-error-primary`:
244
273
  * identical here in LIGHT (both -600) and DIVERGENT in dark (fg -500 vs text -400), which is exactly
@@ -257,6 +286,14 @@
257
286
  --color-fg-success-primary_hover: var(--color-green-700);
258
287
  --color-fg-warning-primary_hover: var(--color-amber-700);
259
288
  --color-fg-error-primary_hover: var(--color-red-700);
289
+ /* The BRAND-OR-NEUTRAL foreground: brand in light, neutral in dark. Untitled UI's own role and
290
+ * its own values (`--color-fg-brand-primary_alt`, theme.css:327 / :685), documented there as
291
+ * "switches to gray when in dark mode, such as active horizontal tabs". It exists here for the
292
+ * carousel's ACTIVE indicator pip, which is drawn on the caller's media as often as on the page —
293
+ * `bg-brand-solid` held its brand in dark and read as a coloured chip on a dark pill, where UUI's
294
+ * light neutral reads as "you are here" against faint neutral siblings. Distinct from
295
+ * `fg-brand-secondary` (a saturated -500 tint that stays brand in both themes). */
296
+ --color-fg-brand-primary_alt: var(--color-brand-600);
260
297
  /* Leading-dot / secondary glyph tints — the saturated -500 stop. */
261
298
  --color-fg-brand-secondary: var(--color-brand-500);
262
299
  --color-fg-brand-secondary_hover: var(--color-brand-600);
@@ -291,6 +328,15 @@
291
328
  /* The elevated-surface hairline — a translucent inset ring on menu/listbox popups, softer than the
292
329
  * neutral-200 divider. `rgb()` rather than `oklch()` to match the reference's own notation. */
293
330
  --color-border-secondary_alt: rgb(0 0 0 / 0.1);
331
+ /* An edge drawn ON an unknown colour — a colour swatch, a hue track, a gradient preview. It reads
332
+ * against the SWATCH, not the page, and the swatch can be any colour the user picked, so this is a
333
+ * CONSTANT darkening in both themes with NO `.dark` pairing — the same posture `bg-overlay` holds
334
+ * for the modal scrim.
335
+ *
336
+ * NOT `border-secondary_alt`, which is this exact value in light and then goes OPAQUE `neutral-800`
337
+ * in dark: that would ring a bright yellow swatch in grey. The two roles look interchangeable in
338
+ * the light baseline and are not, which is the §7 mis-file this token exists to prevent. */
339
+ --color-border-on-color: oklch(0 0 0 / 0.1);
294
340
  --color-border-brand: var(--color-brand-500);
295
341
  /* NOTE: no `--color-border-brand-solid`. The seamless checked rim for checkbox/radio must match the
296
342
  * brand-600 solid FILL exactly, and a second role holding the same value is a role that can drift.
@@ -404,6 +450,76 @@
404
450
  --color-utility-blue-600: var(--color-blue-600);
405
451
  --color-utility-blue-700: var(--color-blue-700);
406
452
 
453
+ /* ══════════════ Prose palette — the NAMES a RichTextEditor document can wear ══════════════
454
+ *
455
+ * Eight text colours and their eight highlight washes. **A coloured run in a stored document
456
+ * stores a NAME, never a value** — `<span class="jz-color jz-color--blue">` — and `jz-prose`
457
+ * binds that name to the role below (see the `jz-color` / `jz-mark` rules there). That is what
458
+ * makes a saved document repaint for dark mode, and repaint again when a site overrides a role;
459
+ * an inline `style="color:#175CD3"` beats every rule in the sheet and could do neither.
460
+ *
461
+ * **Its own role family, not a slice of `utility-*`, and the reason is what each family MEANS.**
462
+ * `utility-<hue>-*` is the badge/tone ramp — eight stops, indexed by `src/lib/color.ts`, with a
463
+ * `SemanticColor` tone behind every hue. These are two stops of document paint with no tone, no
464
+ * ramp and no component API behind them, and three of the eight hues (purple, pink, and
465
+ * neutral read at a different stop) have no badge tone at all. Declaring them as utility stops
466
+ * would either mint six unread stops per hue — the exact mistake the ramp header above records —
467
+ * or ship a ragged ramp. So they resolve straight off the stock palette, the same way every
468
+ * `utility-*` role does one block up.
469
+ *
470
+ * **The stops were chosen by measurement, not by symmetry** (`scripts/check-contrast.mjs`,
471
+ * `prose palette` block). `-700` text on `bg-primary` and `text-primary` on a `-50` wash both
472
+ * clear 4.5 for all eight, and so does every one of the 64 coloured-text-on-a-highlight
473
+ * combinations a user can compose — worst case 4.52 in light, 7.61 in dark. The obvious `-100`
474
+ * wash does NOT: it puts a fifth of those combinations below 4.5 (worst 4.05), which is why the
475
+ * highlight is one step lighter than the badge wash it looks like.
476
+ *
477
+ * **A site recolours a name in one line** — `:root { --color-prose-blue: … }` — and both the
478
+ * document and the picker's chip follow, because the chip reads this role too. Adding a NINTH
479
+ * name is one more line here plus one `jz-prose` rule; see `docs/components/rich-text-editor.md`. */
480
+ --color-prose-neutral: var(--color-neutral-700);
481
+ --color-prose-neutral-mark: var(--color-neutral-50);
482
+ --color-prose-brand: var(--color-brand-700);
483
+ --color-prose-brand-mark: var(--color-brand-50);
484
+ --color-prose-red: var(--color-red-700);
485
+ --color-prose-red-mark: var(--color-red-50);
486
+ --color-prose-amber: var(--color-amber-700);
487
+ --color-prose-amber-mark: var(--color-amber-50);
488
+ --color-prose-green: var(--color-green-700);
489
+ --color-prose-green-mark: var(--color-green-50);
490
+ --color-prose-blue: var(--color-blue-700);
491
+ --color-prose-blue-mark: var(--color-blue-50);
492
+ --color-prose-purple: var(--color-purple-700);
493
+ --color-prose-purple-mark: var(--color-purple-50);
494
+ --color-prose-pink: var(--color-pink-700);
495
+ --color-prose-pink-mark: var(--color-pink-50);
496
+
497
+ /* ── Syntax palette — 5 roles the code block's highlighter paints with ─────────────────────
498
+ *
499
+ * The `codeLanguage` Select used to write a `language-*` attribute nothing rendered: all eleven
500
+ * members painted identically. These are what make the pick visible. Same category as the prose
501
+ * palette above and declared on its terms — document paint, no tone axis, no ramp, no component
502
+ * API — so they resolve straight off the stock palette at the same two stops (`-700` light,
503
+ * `-300` dark) and take no `utility-*` slice.
504
+ *
505
+ * **Five roles over the ~30 scopes highlight.js emits, grouped hard.** Five colours are what a
506
+ * reader distinguishes in a snippet; everything unnamed (`punctuation`, `operator`, `params`,
507
+ * `subst`) deliberately keeps `text-primary`. The mapping from hljs class to role lives with the
508
+ * rules in `jz-prose` — one table, one place.
509
+ *
510
+ * **Measured against `bg-secondary`, not `bg-primary`** (`scripts/check-contrast.mjs`, `syntax
511
+ * palette` block): the `<pre>` carries the fill, so the prose palette's own numbers do not
512
+ * transfer. `-700` clears 4.5 for all five (worst 4.74 green, 4.82 amber); `-600` would fail at
513
+ * ~3.1, which is why the stop is not one step lighter for warmth.
514
+ *
515
+ * A site recolours one in one line — `:root { --color-prose-syntax-string: … }` — the same way it
516
+ * recolours a prose name. */
517
+ --color-prose-syntax-keyword: var(--color-purple-700);
518
+ --color-prose-syntax-string: var(--color-green-700);
519
+ --color-prose-syntax-comment: var(--color-neutral-600);
520
+ --color-prose-syntax-name: var(--color-blue-700);
521
+ --color-prose-syntax-value: var(--color-amber-700);
522
+
407
523
  /* ── Illustration — 4 OPAQUE fill steps a line-art drawing is painted from ─────────────────
408
524
  *
409
525
  * Steps 1→4: the lit face, the backdrop disc + confetti, the shaded face, the deepest detail.
@@ -421,6 +537,19 @@
421
537
  --color-illustration-neutral-3: var(--color-neutral-200);
422
538
  --color-illustration-neutral-4: var(--color-neutral-300);
423
539
 
540
+ /* ── Slider handle — the one control whose THUMB INVERTS across the themes ────────────────────
541
+ *
542
+ * Light: a white disc inside a brand hairline. Dark: a brand disc inside a page-coloured
543
+ * hairline. No existing surface role does that — `bg-primary_alt` steps one stop UP in dark, not
544
+ * to brand — so the thumb needs real tokens rather than a pairing that happens to look close.
545
+ * Values are Untitled UI's own (`.refs/untitledui-react/styles/theme.css:377-378, 732-733`),
546
+ * re-expressed on our ramp: read a reference for VALUES, never paste its component code.
547
+ *
548
+ * COMPONENT tokens, so no property mirror — like `--textarea-resize-handle` below, the long
549
+ * spelling IS the idiom (`bg-slider-handle-bg`, `ring-slider-handle-border`). */
550
+ --color-slider-handle-bg: var(--color-bg-primary);
551
+ --color-slider-handle-border: var(--color-bg-brand-solid);
552
+
424
553
  /* Textarea resize grip — an <svg> data-URI (two round-capped diagonals) drawn into the native
425
554
  * ::-webkit-resizer corner, its stroke tracking `border-primary`. THE HEXES ARE BAKED INTO THE
426
555
  * url() AND CANNOT INTERPOLATE A var(), so no rename script, eslint rule or gate will ever touch
@@ -489,6 +618,7 @@
489
618
  --background-color-warning-solid_hover: var(--color-bg-warning-solid_hover);
490
619
  --background-color-overlay: var(--color-bg-overlay);
491
620
  --background-color-overlay-soft: var(--color-bg-overlay-soft);
621
+ --background-color-on-color: var(--color-bg-on-color);
492
622
 
493
623
  /* ── text-color ── */
494
624
  --text-color-primary: var(--color-text-primary);
@@ -510,6 +640,7 @@
510
640
  --border-color-strong: var(--color-border-strong);
511
641
  --border-color-tertiary: var(--color-border-tertiary);
512
642
  --border-color-secondary_alt: var(--color-border-secondary_alt);
643
+ --border-color-on-color: var(--color-border-on-color);
513
644
  --border-color-brand: var(--color-border-brand);
514
645
  --border-color-error_subtle: var(--color-border-error_subtle);
515
646
  --border-color-success: var(--color-border-success);
@@ -522,6 +653,7 @@
522
653
  --ring-color-strong: var(--color-border-strong);
523
654
  --ring-color-tertiary: var(--color-border-tertiary);
524
655
  --ring-color-secondary_alt: var(--color-border-secondary_alt);
656
+ --ring-color-on-color: var(--color-border-on-color);
525
657
  --ring-color-brand: var(--color-border-brand);
526
658
  --ring-color-error_subtle: var(--color-border-error_subtle);
527
659
  --ring-color-success: var(--color-border-success);
@@ -534,6 +666,7 @@
534
666
  --outline-color-strong: var(--color-border-strong);
535
667
  --outline-color-tertiary: var(--color-border-tertiary);
536
668
  --outline-color-secondary_alt: var(--color-border-secondary_alt);
669
+ --outline-color-on-color: var(--color-border-on-color);
537
670
  --outline-color-brand: var(--color-border-brand);
538
671
  --outline-color-error_subtle: var(--color-border-error_subtle);
539
672
  --outline-color-success: var(--color-border-success);
@@ -762,6 +895,11 @@
762
895
  * when lightened (brand-500 = 3.33, red-500 = 3.81 under the white label). The other three are
763
896
  * HOUSE additions, so there is no reference direction to restore — and measured, lightening them
764
897
  * does not survive: white on green-500 is 2.22 and on amber-500 2.13, both well under 3.0. */
898
+ /* The on-media surface, inverted — Untitled UI's `alpha-white` goes `rgb(12 14 18)` here and ours
899
+ * follows. `color-mix` on neutral-950 rather than a literal, so the pill tracks the page's own
900
+ * near-black; the alpha stays 90%, so a photograph still reads through it as texture. See the
901
+ * light block for why this role stopped being theme-constant. */
902
+ --color-bg-on-color: color-mix(in oklab, var(--color-neutral-950) 90%, transparent);
765
903
  /* brand-950, not UUI's brand-500 — see the light block: this role backs TEXT here. */
766
904
  --color-bg-brand-primary: var(--color-brand-950);
767
905
  /* The inverse surface stays LIGHTER than the dark page so it still reads as a raised chip. */
@@ -797,6 +935,8 @@
797
935
  * and the gate RE-MEASURES that hover: softening it "to match" the rest state is the failure mode
798
936
  * the entry guards, because that is the whole rescue. */
799
937
  --color-fg-secondary: var(--color-neutral-300);
938
+ /* Steps LIGHTER here, as every dark hover must — UUI's neutral-200. */
939
+ --color-fg-secondary_hover: var(--color-neutral-200);
800
940
  --color-fg-quaternary: var(--color-neutral-600);
801
941
  /* neutral-500 in both themes — constant, so it is declared by absence in this block. Against a
802
942
  * neutral-600 rest it still steps LIGHTER here, which is the direction a dark hover must go. */
@@ -811,6 +951,10 @@
811
951
  --color-fg-success-primary_hover: var(--color-green-400);
812
952
  --color-fg-warning-primary_hover: var(--color-amber-400);
813
953
  --color-fg-error-primary_hover: var(--color-red-400);
954
+ /* The gray half of the brand-or-neutral role — UUI's `neutral-300` verbatim. This is the whole
955
+ * point of the `_alt` suffix: the token is brand where a page is light and neutral where it is
956
+ * dark, so an "active" mark reads by LIGHTNESS against its faint siblings rather than by hue. */
957
+ --color-fg-brand-primary_alt: var(--color-neutral-300);
814
958
  --color-fg-brand-secondary: var(--color-brand-400);
815
959
  --color-fg-brand-secondary_hover: var(--color-brand-300);
816
960
  --color-fg-error-secondary: var(--color-red-400);
@@ -895,12 +1039,46 @@
895
1039
  --color-utility-blue-600: var(--color-blue-400);
896
1040
  --color-utility-blue-700: var(--color-blue-300);
897
1041
 
1042
+ /* Prose palette — the same inversion by ramp stop: text 700→300, highlight wash 50→950. A stored
1043
+ * document therefore needs no `.dark` class of its own and no second copy of the name; the run
1044
+ * says `jz-color--blue` in both themes and the ROLE is what moves. */
1045
+ --color-prose-neutral: var(--color-neutral-300);
1046
+ --color-prose-neutral-mark: var(--color-neutral-950);
1047
+ --color-prose-brand: var(--color-brand-300);
1048
+ --color-prose-brand-mark: var(--color-brand-950);
1049
+ --color-prose-red: var(--color-red-300);
1050
+ --color-prose-red-mark: var(--color-red-950);
1051
+ --color-prose-amber: var(--color-amber-300);
1052
+ --color-prose-amber-mark: var(--color-amber-950);
1053
+ --color-prose-green: var(--color-green-300);
1054
+ --color-prose-green-mark: var(--color-green-950);
1055
+ --color-prose-blue: var(--color-blue-300);
1056
+ --color-prose-blue-mark: var(--color-blue-950);
1057
+ --color-prose-purple: var(--color-purple-300);
1058
+ --color-prose-purple-mark: var(--color-purple-950);
1059
+ --color-prose-pink: var(--color-pink-300);
1060
+ --color-prose-pink-mark: var(--color-pink-950);
1061
+
1062
+ /* Syntax palette — the same inversion by ramp stop, 700→300 (comment 600→400, because it is the
1063
+ * one role whose job is to RECEDE and neutral-300 would read as body text). */
1064
+ --color-prose-syntax-keyword: var(--color-purple-300);
1065
+ --color-prose-syntax-string: var(--color-green-300);
1066
+ --color-prose-syntax-comment: var(--color-neutral-400);
1067
+ --color-prose-syntax-name: var(--color-blue-300);
1068
+ --color-prose-syntax-value: var(--color-amber-300);
1069
+
898
1070
  /* Illustration — the inversion that lets ONE drawing read in both themes, straight by ramp stop. */
899
1071
  --color-illustration-neutral-1: var(--color-neutral-900);
900
1072
  --color-illustration-neutral-2: var(--color-neutral-800);
901
1073
  --color-illustration-neutral-3: var(--color-neutral-700);
902
1074
  --color-illustration-neutral-4: var(--color-neutral-600);
903
1075
 
1076
+ /* Slider handle — the inversion: the disc takes the brand and the hairline takes the page.
1077
+ * One stop LIGHTER than the fill it caps (`bg-brand-solid` stays brand-600 in both themes),
1078
+ * which is Untitled UI's own dark value: a -600 disc on a -600 fill would vanish into it. */
1079
+ --color-slider-handle-bg: var(--color-brand-500);
1080
+ --color-slider-handle-border: var(--color-bg-primary);
1081
+
904
1082
  /* Textarea resize grip — stroke tracks `border-primary` (neutral-700). Hand-maintained: see light. */
905
1083
  --textarea-resize-handle: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%3E%3Cpath%20d='M10%202L2%2010'%20stroke='%23404040'%20stroke-linecap='round'/%3E%3Cpath%20d='M11%207L7%2011'%20stroke='%23404040'%20stroke-linecap='round'/%3E%3C/svg%3E");
906
1084
 
@@ -934,6 +1112,7 @@
934
1112
  --background-color-warning-solid_hover: var(--color-bg-warning-solid_hover);
935
1113
  --background-color-overlay: var(--color-bg-overlay);
936
1114
  --background-color-overlay-soft: var(--color-bg-overlay-soft);
1115
+ --background-color-on-color: var(--color-bg-on-color);
937
1116
 
938
1117
  /* ── text-color ── */
939
1118
  --text-color-primary: var(--color-text-primary);
@@ -955,6 +1134,7 @@
955
1134
  --border-color-strong: var(--color-border-strong);
956
1135
  --border-color-tertiary: var(--color-border-tertiary);
957
1136
  --border-color-secondary_alt: var(--color-border-secondary_alt);
1137
+ --border-color-on-color: var(--color-border-on-color);
958
1138
  --border-color-brand: var(--color-border-brand);
959
1139
  --border-color-error_subtle: var(--color-border-error_subtle);
960
1140
  --border-color-success: var(--color-border-success);
@@ -967,6 +1147,7 @@
967
1147
  --ring-color-strong: var(--color-border-strong);
968
1148
  --ring-color-tertiary: var(--color-border-tertiary);
969
1149
  --ring-color-secondary_alt: var(--color-border-secondary_alt);
1150
+ --ring-color-on-color: var(--color-border-on-color);
970
1151
  --ring-color-brand: var(--color-border-brand);
971
1152
  --ring-color-error_subtle: var(--color-border-error_subtle);
972
1153
  --ring-color-success: var(--color-border-success);
@@ -979,6 +1160,7 @@
979
1160
  --outline-color-strong: var(--color-border-strong);
980
1161
  --outline-color-tertiary: var(--color-border-tertiary);
981
1162
  --outline-color-secondary_alt: var(--color-border-secondary_alt);
1163
+ --outline-color-on-color: var(--color-border-on-color);
982
1164
  --outline-color-brand: var(--color-border-brand);
983
1165
  --outline-color-error_subtle: var(--color-border-error_subtle);
984
1166
  --outline-color-success: var(--color-border-success);
@@ -1044,6 +1226,789 @@
1044
1226
  background-repeat: repeat-x;
1045
1227
  }
1046
1228
 
1229
+ /* ── `jz-prose` — THE RENDERER for a stored RichTextEditor document ────────────────────────────────
1230
+ *
1231
+ * **This class, not a React component, is the deliverable.** A saved document paints in Astro, a Go
1232
+ * template, Hugo, an RSC or plain PHP with ZERO JavaScript:
1233
+ *
1234
+ * <div class="jz-prose">…storedHtml…</div>
1235
+ *
1236
+ * `<RichTextContent>` is a ~10-line wrapper over it, for React callers who want a component rather
1237
+ * than a magic string. The editor wears the same class, so there is exactly ONE description of what a
1238
+ * document looks like and the editor cannot drift from the renderer.
1239
+ *
1240
+ * **It is the library's first PUBLIC utility class, and no gate covers a class name.** `api-snapshot.md`
1241
+ * reads TypeScript, so `props:check` will never notice this being renamed or dropped. The mitigations
1242
+ * are a section in `docs/components/rich-text-editor.md` and a test asserting the selector survives
1243
+ * into the BUILT `dist/styles.css`.
1244
+ *
1245
+ * ── Why `& :where(…)` and not `& > …` ─────────────────────────────────────────────────────────────
1246
+ *
1247
+ * One class has to serve two different trees. The editor wears `jz-prose` on `<EditorContent>`, whose
1248
+ * content sits inside a `.ProseMirror` CHILD; the renderer's content is its DIRECT subtree. So every
1249
+ * selector must match at ANY depth. `:where()` also pins specificity to zero, which is what keeps a
1250
+ * caller's `className` (layout-only, but still) and any Tailwind utility from losing to prose.
1251
+ *
1252
+ * Scoping is safe because `PROSE` sits on `<EditorContent>` and nothing else: the toolbar, the bubble
1253
+ * strip, the count bar and the hidden form input are all SIBLINGS. Were it on the shell, `:where(a)`
1254
+ * would repaint every link in the toolbar.
1255
+ *
1256
+ * ── Why `@apply` here, when `jz-prose-outline` below is hand-written CSS ──────────────────────────
1257
+ *
1258
+ * They are opposite cases, and the distinction is the rule. `jz-prose-outline` does `counters()` and a
1259
+ * grid — values Tailwind has NO utility for, so hand-written CSS is the only spelling. Everything here
1260
+ * has a utility and used to BE one: this is a MOVE, and the requirement is that the editor's own pixel
1261
+ * baselines come out byte-identical. Re-typing ~60 declarations by hand is ~60 chances to drift from
1262
+ * that; `@apply` carries the same class names across and cannot.
1263
+ *
1264
+ * **The theme-var pruning trap was tested, not assumed** (`docs/theme.md` — 9 vars once vanished from
1265
+ * `:root`, silently and light-theme-only). `@apply mt-4` expands to `calc(var(--spacing) * 4)`, which
1266
+ * is exactly the shape that gets pruned. Measured in the WORST case — a consumer whose only utility in
1267
+ * the whole build is `jz-prose`, scanned from a bare HTML file — and `--spacing`, `--text-lg`,
1268
+ * `--color-text-primary` and `--font-weight-semibold` all survive into `:root`. Re-run that probe if
1269
+ * this ever grows a token nothing else in the library references.
1270
+ *
1271
+ * ── What deliberately did NOT move here ───────────────────────────────────────────────────────────
1272
+ *
1273
+ * Editor CHROME stays in `prose.ts`, engine-prefixed and editor-only: the caret, the placeholder, the
1274
+ * gapcursor, the blurred-selection and find-match decorations, and every `.ProseMirror-selectednode`
1275
+ * state. A selected node is a thing you can only select in an editor; painting it in a renderer would
1276
+ * be describing a state the reader can never reach. The editable BOX (`PROSE_PAD`, `PROSE_MIN_H`) stays
1277
+ * too — that is the control's geometry, not the document's. */
1278
+ @utility jz-prose {
1279
+ color: var(--color-text-primary);
1280
+
1281
+ /* paragraphs + the spacing between blocks */
1282
+ & :where(p) {
1283
+ @apply my-2;
1284
+ }
1285
+ & :where(p:first-child) {
1286
+ @apply mt-0;
1287
+ }
1288
+ & :where(p:last-child) {
1289
+ @apply mb-0;
1290
+ }
1291
+
1292
+ /* headings — stepped DOWN from the reference's display scale, because a heading inside a bordered
1293
+ * field competes with the page's own headings rather than replacing them */
1294
+ & :where(h1) {
1295
+ @apply mt-4 mb-2 text-xl font-semibold text-primary;
1296
+ }
1297
+ & :where(h2) {
1298
+ @apply mt-4 mb-2 text-lg font-semibold text-primary;
1299
+ }
1300
+ & :where(h3) {
1301
+ @apply mt-3 mb-1.5 text-md font-semibold text-primary;
1302
+ }
1303
+ & :where(h1:first-child, h2:first-child, h3:first-child) {
1304
+ @apply mt-0;
1305
+ }
1306
+
1307
+ /* lists — `list-outside` plus padding, so a wrapped second line aligns to the text and not the
1308
+ * marker. The `ol` MARKER is not here: it is the one list decision a caller can change, so it lives
1309
+ * in `jz-prose-decimal` / `jz-prose-outline`. The vertical rhythm stays shared, which is what stops
1310
+ * the two numbering modes drifting apart in spacing. */
1311
+ & :where(ul) {
1312
+ @apply my-2 list-outside list-disc pl-5;
1313
+ }
1314
+ & :where(ol) {
1315
+ @apply my-2;
1316
+ }
1317
+ & :where(li) {
1318
+ @apply my-0.5;
1319
+ }
1320
+ & :where(li p) {
1321
+ @apply my-0;
1322
+ }
1323
+ /* nested lists tighten up rather than repeating the outer margin */
1324
+ & :where(ul ul, ol ol, ul ol, ol ul) {
1325
+ @apply my-0.5;
1326
+ }
1327
+
1328
+ /* marks */
1329
+ & :where(strong) {
1330
+ @apply font-semibold text-primary;
1331
+ }
1332
+ & :where(em) {
1333
+ @apply italic;
1334
+ }
1335
+ & :where(s) {
1336
+ @apply line-through;
1337
+ }
1338
+ & :where(u) {
1339
+ @apply underline;
1340
+ }
1341
+
1342
+ /* ── colour + highlight — the run stores a NAME, this binds the paint ───────────────────────────
1343
+ *
1344
+ * `<span class="jz-color jz-color--blue">` and `<mark class="jz-mark jz-mark--amber">`. The base
1345
+ * class reads an inheriting custom property; the modifier is the only thing that names a role. So
1346
+ * a site recolours every blue run ever written with `:root { --color-prose-blue: … }`, and adds a
1347
+ * TENTH colour with one rule of its own —
1348
+ *
1349
+ * :root { --color-prose-teal: #0e7490 }
1350
+ * .jz-prose .jz-color--teal { --jz-color: var(--color-prose-teal) }
1351
+ *
1352
+ * — which outranks these (`:where()` pins them to zero specificity) and which the picker's chip
1353
+ * also reads, so the colour is written ONCE. Nothing in a document is ever a literal: there is no
1354
+ * input to type one into, and `sanitize.ts` strips a `style` attribute on write regardless.
1355
+ *
1356
+ * The `mark` reset above the paint is not decoration. A bare `<mark>` — from a foreign document
1357
+ * reaching `<RichTextContent>`, since the editor's own schema parses only `mark.jz-mark` — paints
1358
+ * the user agent's fixed yellow-on-black otherwise, which is unreadable in dark and is not a
1359
+ * colour this palette can name.
1360
+ *
1361
+ * `box-decoration-break: clone` is what makes a highlight that WRAPS look like one highlight: the
1362
+ * default (`slice`) rounds the first fragment's left corner and the last fragment's right, leaving
1363
+ * the broken ends square, so a two-line highlight reads as a rectangle with a bite out of it. No
1364
+ * vertical padding, deliberately — padding on an inline box does not grow the line box, so it
1365
+ * would overlap the line above rather than making room. */
1366
+ & :where(mark) {
1367
+ background-color: transparent;
1368
+ color: inherit;
1369
+ }
1370
+ & :where(.jz-mark) {
1371
+ background-color: var(--jz-mark);
1372
+ box-decoration-break: clone;
1373
+ -webkit-box-decoration-break: clone;
1374
+ @apply rounded-xs px-0.5;
1375
+ }
1376
+
1377
+ & :where(.jz-color--neutral) {
1378
+ --jz-color: var(--color-prose-neutral);
1379
+ }
1380
+ & :where(.jz-color--brand) {
1381
+ --jz-color: var(--color-prose-brand);
1382
+ }
1383
+ & :where(.jz-color--red) {
1384
+ --jz-color: var(--color-prose-red);
1385
+ }
1386
+ & :where(.jz-color--amber) {
1387
+ --jz-color: var(--color-prose-amber);
1388
+ }
1389
+ & :where(.jz-color--green) {
1390
+ --jz-color: var(--color-prose-green);
1391
+ }
1392
+ & :where(.jz-color--blue) {
1393
+ --jz-color: var(--color-prose-blue);
1394
+ }
1395
+ & :where(.jz-color--purple) {
1396
+ --jz-color: var(--color-prose-purple);
1397
+ }
1398
+ & :where(.jz-color--pink) {
1399
+ --jz-color: var(--color-prose-pink);
1400
+ }
1401
+
1402
+ & :where(.jz-mark--neutral) {
1403
+ --jz-mark: var(--color-prose-neutral-mark);
1404
+ }
1405
+ & :where(.jz-mark--brand) {
1406
+ --jz-mark: var(--color-prose-brand-mark);
1407
+ }
1408
+ & :where(.jz-mark--red) {
1409
+ --jz-mark: var(--color-prose-red-mark);
1410
+ }
1411
+ & :where(.jz-mark--amber) {
1412
+ --jz-mark: var(--color-prose-amber-mark);
1413
+ }
1414
+ & :where(.jz-mark--green) {
1415
+ --jz-mark: var(--color-prose-green-mark);
1416
+ }
1417
+ & :where(.jz-mark--blue) {
1418
+ --jz-mark: var(--color-prose-blue-mark);
1419
+ }
1420
+ & :where(.jz-mark--purple) {
1421
+ --jz-mark: var(--color-prose-purple-mark);
1422
+ }
1423
+ & :where(.jz-mark--pink) {
1424
+ --jz-mark: var(--color-prose-pink-mark);
1425
+ }
1426
+
1427
+ /* ── A TABLE CELL's fill ────────────────────────────────────────────────────────────────────────
1428
+ *
1429
+ * `<td class="jz-cell jz-cell--blue">`, on exactly the terms the two runs above are stored: the
1430
+ * class is the storage, the modifier binds a NAME to a role, and a custom literal rides an inline
1431
+ * `--jz-cell` that this declaration reads. So a filled cell repaints for dark, follows a site's
1432
+ * `:root` recolour, and needs no second grammar — `table-style.ts` adds no way to spell a colour
1433
+ * that `color.ts` did not already own.
1434
+ *
1435
+ * **It binds to the `-mark` roles, not the plain ones, and that is a contrast fact rather than a
1436
+ * preference.** A cell fill sits BEHIND body text exactly as a `<mark>` does, and the `-mark` half
1437
+ * of the palette is the half already tuned to keep `text-primary` legible on it in both themes.
1438
+ * The text half is a saturated -600: eight names of white-ish body copy on a mid-tone fill, every
1439
+ * one of them below 4.5:1 in light. The picker's chips read these same roles, which is what makes
1440
+ * what you press what you get.
1441
+ *
1442
+ * A site adding a ninth colour therefore writes a THIRD line beside the two `color.ts` documents:
1443
+ * .jz-prose .jz-cell--teal { --jz-cell: var(--color-prose-teal-mark) }
1444
+ */
1445
+ & :where(.jz-cell--neutral) {
1446
+ --jz-cell: var(--color-prose-neutral-mark);
1447
+ }
1448
+ & :where(.jz-cell--brand) {
1449
+ --jz-cell: var(--color-prose-brand-mark);
1450
+ }
1451
+ & :where(.jz-cell--red) {
1452
+ --jz-cell: var(--color-prose-red-mark);
1453
+ }
1454
+ & :where(.jz-cell--amber) {
1455
+ --jz-cell: var(--color-prose-amber-mark);
1456
+ }
1457
+ & :where(.jz-cell--green) {
1458
+ --jz-cell: var(--color-prose-green-mark);
1459
+ }
1460
+ & :where(.jz-cell--blue) {
1461
+ --jz-cell: var(--color-prose-blue-mark);
1462
+ }
1463
+ & :where(.jz-cell--purple) {
1464
+ --jz-cell: var(--color-prose-purple-mark);
1465
+ }
1466
+ & :where(.jz-cell--pink) {
1467
+ --jz-cell: var(--color-prose-pink-mark);
1468
+ }
1469
+
1470
+ /* links — the brand role, underlined, because colour alone is not an affordance */
1471
+ & :where(a) {
1472
+ @apply text-brand-secondary underline decoration-1 underline-offset-2;
1473
+ }
1474
+ & :where(a:hover) {
1475
+ @apply text-brand-secondary_hover;
1476
+ }
1477
+
1478
+ /* A LINKED PICTURE is an anchor with nothing to underline. The rule above is written for a run of
1479
+ * text — colour plus an underline, because colour alone is not an affordance — and both are wrong
1480
+ * around an `<img>`: the underline paints a brand-coloured bar under the photograph (there is no
1481
+ * text baseline, so it lands on the image's bottom edge) and the colour applies to nothing.
1482
+ *
1483
+ * `:has()` rather than a class, because the anchor is emitted by the SCHEMA (`extensions.ts`
1484
+ * wraps the image when it carries an `href`) and adding a marker class there would put a second,
1485
+ * silent contract between the node and this stylesheet. The selector asks the question directly:
1486
+ * an anchor whose only child is a picture. An anchor around `<img>text</img>`-style mixed content
1487
+ * still gets the text treatment, which is correct — there IS text to underline. */
1488
+ & :where(a:has(> img:only-child)) {
1489
+ @apply no-underline;
1490
+ }
1491
+
1492
+ /* sup/sub — the browser's own default shrinks these to 83% and shifts the LINE BOX, so a paragraph
1493
+ * containing one is taller than its neighbours. `leading-none` + a relative offset keeps the line. */
1494
+ & :where(sup) {
1495
+ @apply relative -top-1 align-baseline text-xs leading-none;
1496
+ }
1497
+ & :where(sub) {
1498
+ @apply relative -bottom-1 align-baseline text-xs leading-none;
1499
+ }
1500
+
1501
+ /* blockquote — a rail, not a box. `border-l` is the affordance itself here, so it is not the
1502
+ * hand-spelled divider `rule:check` bans; there is nothing being separated. */
1503
+ & :where(blockquote) {
1504
+ @apply my-3 border-l-2 border-secondary pl-4 text-secondary;
1505
+ }
1506
+
1507
+ /* ── horizontal rule — a real `<hr>`, painted from the HOUSE rule vocabulary ───────────────────
1508
+ *
1509
+ * **This is `src/lib/rule.ts`'s paint, retyped in CSS on purpose.** That module is a table of
1510
+ * Tailwind CLASS strings and this is a stylesheet, so it cannot be imported here — and the paint
1511
+ * has to live in `jz-prose`, because that class IS the deliverable: a stored document renders in
1512
+ * Astro, Go, PHP or an RSC with zero JavaScript, and a texture that only existed as a React
1513
+ * className would vanish everywhere the editor is not. Same duplication `sanitize.ts` makes of
1514
+ * `color.ts`'s `CSS_COLOR`, and it takes the same guard: `hr.test.ts` reads this file and asserts
1515
+ * the literals below equal `RULE_TEXTURE` / `RULE_TEXTURE_THICK` as source text.
1516
+ *
1517
+ * **A border could not carry it.** A texture is a `background-image`, and a border has no
1518
+ * background — which is why the box moves from `border-t` to a real 1px of HEIGHT. The two are
1519
+ * pixel-identical at rest (`border-0 border-t` is a 1px box too), which is what leaves every
1520
+ * stored document and every baseline untouched by the migration.
1521
+ *
1522
+ * **The geometry per texture is measured, not chosen** — see `RULE_WEIGHT` in `src/lib/rule.ts`.
1523
+ * A dot needs ONE SPARE PIXEL on the thin axis (2px dot in a 3px box, 4px in 5px): at an exact fit
1524
+ * the browser's device-pixel snapping shaves an edge off every dot at DPR 1, 1.25 and 1.5, and is
1525
+ * correct only at DPR 2 — which is how that bug survived review on a retina display once already.
1526
+ *
1527
+ * All three custom properties are set together in every cell, per that module's invariant: they
1528
+ * INHERIT, so a half-set leaks. An `<hr>` has no descendants to leak into, but the block is
1529
+ * copyable and the next host may.
1530
+ *
1531
+ * Absence is the resting state for both attributes — `hr.ts` says why. Ordering is load-bearing
1532
+ * instead of specificity: every selector is inside `:where()` and therefore weighs zero, so the
1533
+ * combinations must appear AFTER the axes they refine. */
1534
+ & :where(hr) {
1535
+ @apply my-4 h-px border-0 rule-y;
1536
+ --rule-image: initial;
1537
+ --rule-size: auto;
1538
+ --rule: var(--color-border-secondary);
1539
+ }
1540
+ & :where(hr[data-texture="dashed"]) {
1541
+ --rule-image: repeating-linear-gradient(to right, var(--rule, var(--color-border-secondary)) 0 3px, transparent 3px 6px);
1542
+ --rule-size: auto;
1543
+ }
1544
+ & :where(hr[data-texture="dot"]) {
1545
+ @apply h-[3px];
1546
+ --rule-image: radial-gradient(circle, var(--rule, var(--color-border-secondary)) 1px, transparent 1px);
1547
+ --rule-size: 5px 3px;
1548
+ }
1549
+ & :where(hr[data-weight="thick"]) {
1550
+ @apply h-0.5;
1551
+ }
1552
+ /* `line` needs no thick cell: it paints through `rule-y`'s solid-fill fallback, which scales to any
1553
+ * box height. The other two do, and both are a clean 2× — a dash that kept its 3px length in a 2px
1554
+ * box would collapse from 3:1 toward square and read as a coarse dot rule. */
1555
+ & :where(hr[data-weight="thick"][data-texture="dashed"]) {
1556
+ --rule-image: repeating-linear-gradient(to right, var(--rule, var(--color-border-secondary)) 0 6px, transparent 6px 12px);
1557
+ }
1558
+ & :where(hr[data-weight="thick"][data-texture="dot"]) {
1559
+ @apply h-[5px];
1560
+ --rule-image: radial-gradient(circle, var(--rule, var(--color-border-secondary)) 2px, transparent 2px);
1561
+ --rule-size: 10px 5px;
1562
+ }
1563
+ /* **The colour is the document's OWN colour cascade, not a second one.** `jz-color--blue` already
1564
+ * binds a name to `--jz-color` for every coloured run; this hands that value to the channel the
1565
+ * rule paint already reads. So a named rule repaints for dark exactly as a named run does, a
1566
+ * custom literal rides the same `--jz-color` inline property, and no new storage exists.
1567
+ *
1568
+ * `jz-color--gradient` is deliberately unreachable here — a gradient paints through
1569
+ * `background-image`, which on a rule IS the texture. `hr.ts` refuses it at parse time and
1570
+ * `sanitize.ts` refuses it at write time; there is no third place to state it. */
1571
+ & :where(hr.jz-color) {
1572
+ --rule: var(--jz-color);
1573
+ }
1574
+
1575
+ /* inline code — a boxed run, so `rounded-sm` + the subtle fill, never the code-BLOCK padding */
1576
+ & :where(code) {
1577
+ @apply rounded-sm bg-secondary px-1 py-0.5 font-mono text-sm text-primary;
1578
+ }
1579
+ /* code block — the fill belongs to the `<pre>`, and the `<code>` inside it resets the inline recipe
1580
+ * above (otherwise every fenced block draws a second, tighter box around its own text) */
1581
+ & :where(pre) {
1582
+ @apply my-3 overflow-x-auto rounded-lg bg-secondary p-3 font-mono text-sm text-primary;
1583
+ }
1584
+ & :where(pre code) {
1585
+ @apply bg-transparent p-0 text-inherit;
1586
+ }
1587
+
1588
+ /* syntax highlighting — the five `--color-prose-syntax-*` roles over the ~30 scopes highlight.js
1589
+ * emits. This is the table: hljs class → role, in one place.
1590
+ *
1591
+ * **The classes are DECORATIONS the editor's view paints**, never content. `CodeBlockLowlight`
1592
+ * emits them as `Decoration.inline` spans, so they are absent from `editor.getHTML()` and
1593
+ * therefore from `value` — which is why `sanitize.ts` carries no `hljs-` entry and why every
1594
+ * stored document is byte-identical to what it was before highlighting existed. The consequence
1595
+ * to state plainly: a document rendered through `RichTextContent` or a bare `<div class="jz-prose">`
1596
+ * has no view and so shows PLAIN code. The rules live here rather than beside the editor chrome
1597
+ * because a highlight is document paint, and because they are already correct the day a
1598
+ * publish-time highlighter bakes the spans into stored HTML.
1599
+ *
1600
+ * **Order is load-bearing, and specificity cannot rescue it.** Every rule is 0-specificity
1601
+ * (`:where`), and highlight.js CONCATENATES a parent scope's class onto its children — a string
1602
+ * inside a meta run is `class="hljs-meta hljs-string"` — so a span can match two rules and the
1603
+ * LATER one wins. String after keyword is what paints `#include <stdio.h>`'s target as a string.
1604
+ * Do not alphabetise this block.
1605
+ *
1606
+ * Scoped to `pre code`: an `.hljs-*` class anywhere else in a caller's document is not ours to
1607
+ * paint (and the sanitizer strips it). Anything unnamed below — `punctuation`, `operator`,
1608
+ * `params`, `subst` — deliberately keeps the body colour. */
1609
+ & :where(pre code .hljs-comment, pre code .hljs-quote) {
1610
+ color: var(--color-prose-syntax-comment);
1611
+ font-style: italic;
1612
+ }
1613
+ &
1614
+ :where(
1615
+ pre code .hljs-keyword,
1616
+ pre code .hljs-built_in,
1617
+ pre code .hljs-type,
1618
+ pre code .hljs-literal,
1619
+ pre code .hljs-meta,
1620
+ pre code .hljs-doctag,
1621
+ pre code .hljs-selector-tag
1622
+ ) {
1623
+ color: var(--color-prose-syntax-keyword);
1624
+ }
1625
+ &
1626
+ :where(
1627
+ pre code .hljs-title,
1628
+ pre code .hljs-name,
1629
+ pre code .hljs-tag,
1630
+ pre code .hljs-section,
1631
+ pre code .hljs-selector-class,
1632
+ pre code .hljs-selector-id,
1633
+ pre code .hljs-link
1634
+ ) {
1635
+ color: var(--color-prose-syntax-name);
1636
+ }
1637
+ &
1638
+ :where(
1639
+ pre code .hljs-number,
1640
+ pre code .hljs-attr,
1641
+ pre code .hljs-attribute,
1642
+ pre code .hljs-variable,
1643
+ pre code .hljs-property,
1644
+ pre code .hljs-bullet,
1645
+ pre code .hljs-selector-attr,
1646
+ pre code .hljs-selector-pseudo
1647
+ ) {
1648
+ color: var(--color-prose-syntax-value);
1649
+ }
1650
+ &
1651
+ :where(
1652
+ pre code .hljs-string,
1653
+ pre code .hljs-regexp,
1654
+ pre code .hljs-char,
1655
+ pre code .hljs-symbol,
1656
+ pre code .hljs-template-tag,
1657
+ pre code .hljs-template-variable,
1658
+ pre code .hljs-addition
1659
+ ) {
1660
+ color: var(--color-prose-syntax-string);
1661
+ }
1662
+ /* Markdown's two structural marks carry no colour — weight and slope are the whole signal, so they
1663
+ * cost no role. */
1664
+ & :where(pre code .hljs-strong) {
1665
+ font-weight: 600;
1666
+ }
1667
+ & :where(pre code .hljs-emphasis) {
1668
+ font-style: italic;
1669
+ }
1670
+
1671
+ /* task list — the marker is the checkbox, so the native list marker goes and each row lays out as
1672
+ * control + text. `items-start` because a task can wrap to several lines and the box belongs on the
1673
+ * first one. Matched on the `data-type` ATTRIBUTE, which is what the stored HTML carries. */
1674
+ & :where(ul[data-type="taskList"]) {
1675
+ @apply my-2 list-none pl-0;
1676
+ }
1677
+ & :where(ul[data-type="taskList"] li) {
1678
+ @apply flex items-start gap-2;
1679
+ }
1680
+ /* The label is the hit target — a click anywhere on it activates the checkbox it wraps, so this is
1681
+ * the element the switch has to live on and putting `pointer-events-none` on the `<input>` alone
1682
+ * would change nothing. INERT is the DEFAULT here and the editable document opts back in.
1683
+ *
1684
+ * Why it needs a switch at all: `TaskItem` never disables the input (there is no
1685
+ * `checkbox.disabled` anywhere in `@tiptap/extension-list` 3.30.1 — its node view only REVERTS the
1686
+ * box on `change` when the editor is not editable), so a `readOnly` editor flickers, and
1687
+ * `RichTextContent` — `dangerouslySetInnerHTML` with NO JavaScript, which is the path a published
1688
+ * page takes — has nothing to revert with at all: the box sticks ticked while `data-checked` stays
1689
+ * put, so the strikethrough never follows and the checklist lies.
1690
+ *
1691
+ * The hook is `contenteditable`, which ProseMirror writes as `String(view.editable)` onto the
1692
+ * `.ProseMirror` node INSIDE this wrapper. Keying off "editable" rather than "not editable" is what
1693
+ * covers a renderer, which has no such node anywhere — and a hand-written `<div class="jz-prose">`
1694
+ * with it. Both rules carry only `.jz-prose`'s specificity (`:where()` is zero), so source order
1695
+ * decides and the override wins.
1696
+ *
1697
+ * Known residual, deliberately not fixed here: `pointer-events` stops mouse and touch, not
1698
+ * `Tab`+`Space`, and it cannot give the box an accessible name (upstream's STATIC `renderHTML`
1699
+ * emits an empty `<span>` in the label — only the live node view fills it in). Both need an
1700
+ * ATTRIBUTE on the element — `sanitizeRichText` injecting `disabled`/`aria-label`, or a NodeView —
1701
+ * so neither is reachable from here. See `docs/components/rich-text-editor.md` § `taskList`. */
1702
+ & :where(ul[data-type="taskList"] li > label) {
1703
+ @apply pointer-events-none mt-0.5 shrink-0;
1704
+ }
1705
+ & :where([contenteditable="true"] ul[data-type="taskList"] li > label) {
1706
+ @apply pointer-events-auto;
1707
+ }
1708
+ & :where(ul[data-type="taskList"] li > div) {
1709
+ @apply min-w-0 flex-1;
1710
+ }
1711
+ /* the checkbox is the browser's, coloured to the brand via `accent-color` — a native control inside
1712
+ * a contenteditable, so replacing it with our `<Checkbox>` would mean a NodeView and a caret trap.
1713
+ * `accent-*` takes a colour, so this is the one place the ramp is reached through a var. Whether it
1714
+ * can be CLICKED is decided on the `<label>` above, not here. */
1715
+ & :where(ul[data-type="taskList"] input) {
1716
+ @apply size-4 accent-[var(--color-bg-brand-solid)];
1717
+ }
1718
+ /* the strike lands on the item's own PARAGRAPHS, never on its content div: a nested task list is
1719
+ * a child of that div, and `text-decoration` propagates to descendants and cannot be removed by a
1720
+ * descendant rule — so striking the div struck every sub-task too, whatever ITS own `data-checked`
1721
+ * said. Checking a parent does not check its children (upstream `TaskItem` sets `checked` on the
1722
+ * one node it was clicked on), so the paint must not claim otherwise. */
1723
+ & :where(ul[data-type="taskList"] li[data-checked="true"] > div > p) {
1724
+ @apply text-tertiary line-through;
1725
+ }
1726
+
1727
+ /* table — `border-collapse` plus a hairline per cell. `table-fixed` is what stops one long cell
1728
+ * stretching a column past the field's width. */
1729
+ & :where(table) {
1730
+ @apply my-3 w-full table-fixed border-collapse overflow-hidden;
1731
+ }
1732
+ & :where(table td) {
1733
+ @apply border border-secondary px-2 py-1.5 align-top;
1734
+ }
1735
+ & :where(table th) {
1736
+ @apply border border-secondary bg-secondary px-2 py-1.5 text-left font-semibold text-primary;
1737
+ }
1738
+
1739
+ /* ── The table's TREATMENT, and a cell's VERTICAL alignment ─────────────────────────────────────
1740
+ *
1741
+ * Two closed `data-*` sets the stylesheet is the only interpreter of (`table-style.ts`), so a
1742
+ * stored table paints with zero JavaScript — the same contract the divider's `data-texture` holds.
1743
+ * Absence is the resting state on both axes, which is why there is no `[data-treatment="grid"]`
1744
+ * rule and no `[data-valign="top"]`: the two blocks above ALREADY paint them, and a rule restating
1745
+ * a default is a second place for it to drift.
1746
+ *
1747
+ * `striped` washes alternate BODY rows with `bg-secondary` — the same role
1748
+ * `src/components/table/shared.ts` uses for `ROW_STRIPE`, deliberately, so a zebra table in a
1749
+ * document and a zebra `<Table>` beside it are the same grey. The header keeps its own band, so
1750
+ * the stripe starts inside `tbody` and `nth-child(even)` makes the row AFTER the first body row
1751
+ * the first striped one.
1752
+ *
1753
+ * `plain` is the editorial look: no cell rules at all, and one `border-strong` under the header
1754
+ * carrying the whole structure. `bg-transparent` on the header is what stops it reading as a band
1755
+ * with no box around it. */
1756
+ & :where(table[data-treatment="striped"] tbody tr:nth-child(even) td) {
1757
+ @apply bg-secondary;
1758
+ }
1759
+ & :where(table[data-treatment="plain"] td),
1760
+ & :where(table[data-treatment="plain"] th) {
1761
+ @apply border-0;
1762
+ }
1763
+ & :where(table[data-treatment="plain"] th) {
1764
+ @apply border-b border-strong bg-transparent;
1765
+ }
1766
+ & :where(table td[data-valign="middle"], table th[data-valign="middle"]) {
1767
+ @apply align-middle;
1768
+ }
1769
+ & :where(table td[data-valign="bottom"], table th[data-valign="bottom"]) {
1770
+ @apply align-bottom;
1771
+ }
1772
+
1773
+ /* A cell's FILL — the reader for the eight `--jz-cell` bindings above, plus the custom literal the
1774
+ * schema writes inline. Unlike a rule, a cell has no texture competing for `background-image`, so
1775
+ * the gradient arm is reachable here and `sanitize.ts` allows both properties on a `<td>`/`<th>`.
1776
+ *
1777
+ * **It sits AFTER every rule that paints a cell background, and that ordering is load-bearing.**
1778
+ * `:where()` pins all of these to specificity 0,1,0, so source order is the entire tie-break — and
1779
+ * a fill has to beat three of them: the header band (`table th`), the zebra wash
1780
+ * (`[data-treatment="striped"] … td`) and `plain`'s `bg-transparent` header. Written where the
1781
+ * other `jz-*` colour bindings live, a filled HEADER cell painted the band's grey instead and a
1782
+ * filled cell on an even row painted the stripe — silently, and only on those cells. */
1783
+ & :where(.jz-cell) {
1784
+ background-color: var(--jz-cell);
1785
+ }
1786
+ & :where(.jz-cell--gradient) {
1787
+ background-image: var(--jz-cell-gradient);
1788
+ }
1789
+
1790
+ /* image — a block node, and its selected state is EDITOR chrome, so it stays in `prose.ts` */
1791
+ & :where(img) {
1792
+ @apply my-3 h-auto max-w-full rounded-lg;
1793
+ }
1794
+
1795
+ /* image alignment. `text-align` is NOT the mechanism — it positions a block's inline CONTENT, and an
1796
+ * image IS the block, so the property has nothing to act on; the margins are what move a picture.
1797
+ * That is why an image is absent from `TextAlign`'s `types` and carries `data-align` instead.
1798
+ *
1799
+ * `left` has no rule, because left is what an unaligned block already does. Storing it would mean
1800
+ * writing an attribute onto every image in every document to describe the state they were in
1801
+ * anyway — the same argument that keeps `TextAlign`'s `defaultAlignment` at `null`. */
1802
+ & :where(img[data-align="center"]) {
1803
+ margin-inline: auto;
1804
+ }
1805
+ & :where(img[data-align="right"]) {
1806
+ margin-inline-start: auto;
1807
+ margin-inline-end: 0;
1808
+ }
1809
+
1810
+ /* image width — a CLOSED set of seventeen steps, 20%…100%, mirroring `IMAGE_WIDTHS` in `image.ts`
1811
+ * (asserted equal by `image.test.ts`, so the two cannot drift).
1812
+ *
1813
+ * Enumerated rather than computed because CSS cannot read a `data-*` value into a length, and the
1814
+ * alternative — an inline `style="width:…"` — is exactly what `sanitize.ts` strips from an `<img>`
1815
+ * and what decision 12a rejects on principle. The snap in the resize gesture is therefore
1816
+ * STRUCTURAL: it is what makes the vocabulary something a stylesheet can enumerate, which is what
1817
+ * lets a stored document paint with no JavaScript at all.
1818
+ *
1819
+ * `max-width: 100%` above still caps every one of these, so a resized image stays responsive in a
1820
+ * narrow column without a media query. And `100` is a real member rather than the default: no
1821
+ * attribute means the image's OWN size, while `data-width="100"` forces the column and so upscales
1822
+ * a small picture. Both are wanted; only the first is the resting state. */
1823
+ & :where(img[data-width="20"]) {
1824
+ width: 20%;
1825
+ }
1826
+ & :where(img[data-width="25"]) {
1827
+ width: 25%;
1828
+ }
1829
+ & :where(img[data-width="30"]) {
1830
+ width: 30%;
1831
+ }
1832
+ & :where(img[data-width="35"]) {
1833
+ width: 35%;
1834
+ }
1835
+ & :where(img[data-width="40"]) {
1836
+ width: 40%;
1837
+ }
1838
+ & :where(img[data-width="45"]) {
1839
+ width: 45%;
1840
+ }
1841
+ & :where(img[data-width="50"]) {
1842
+ width: 50%;
1843
+ }
1844
+ & :where(img[data-width="55"]) {
1845
+ width: 55%;
1846
+ }
1847
+ & :where(img[data-width="60"]) {
1848
+ width: 60%;
1849
+ }
1850
+ & :where(img[data-width="65"]) {
1851
+ width: 65%;
1852
+ }
1853
+ & :where(img[data-width="70"]) {
1854
+ width: 70%;
1855
+ }
1856
+ & :where(img[data-width="75"]) {
1857
+ width: 75%;
1858
+ }
1859
+ & :where(img[data-width="80"]) {
1860
+ width: 80%;
1861
+ }
1862
+ & :where(img[data-width="85"]) {
1863
+ width: 85%;
1864
+ }
1865
+ & :where(img[data-width="90"]) {
1866
+ width: 90%;
1867
+ }
1868
+ & :where(img[data-width="95"]) {
1869
+ width: 95%;
1870
+ }
1871
+ & :where(img[data-width="100"]) {
1872
+ width: 100%;
1873
+ }
1874
+
1875
+ /* mention — a chip, matched on the marker ATTRIBUTE rather than a class, because the node writes no
1876
+ * class (see `mention.ts`). The fill is the brand wash and the text `text-brand-secondary`, the same
1877
+ * pairing `<Badge color="brand">` uses — a mention IS a badge inside a paragraph, and the library
1878
+ * having two looks for that is how they drift. */
1879
+ & :where([data-mention]) {
1880
+ @apply rounded-sm bg-brand-primary px-1 py-0.5 font-medium text-brand-secondary;
1881
+ }
1882
+
1883
+ /* ── the colour APPLICATION, and it is deliberately the last rule in this block ────────────────
1884
+ *
1885
+ * The name→`--jz-color` bindings sit up with the other marks, where a reader looks for them. The
1886
+ * `color:` that reads them is here, at the end, for two reasons a shorter rule cannot cover:
1887
+ *
1888
+ * 1. **`.jz-color *`, not `.jz-color` alone.** ProseMirror does not promise a mark NESTING order,
1889
+ * so a coloured bold run serializes as `<strong><span class="jz-color">` on one day and
1890
+ * `<span class="jz-color"><strong>` on another. In the second shape the `<strong>` is the
1891
+ * element being painted, and `:where(strong){text-primary}` would win on it — the same run,
1892
+ * two colours, decided by markup a user never sees. The descendant arm makes the paint a
1893
+ * property of the RUN rather than of the tag that happens to be innermost. `--jz-color` is a
1894
+ * custom property, so it is already inherited down; only the `color` needed following.
1895
+ * 2. **Source order IS the override.** Every rule in this block compiles to specificity 0, so the
1896
+ * last one wins. `strong`, `a`, `a:hover`, `code` and `blockquote` all set a `color`, and this
1897
+ * has to beat every one of them: a coloured link keeps its underline and loses the brand
1898
+ * colour (decision D — what Docs, Word and Notion all do), and colouring a run does not stop
1899
+ * working the moment someone also marks it as code (decision E).
1900
+ *
1901
+ * `mark` is NOT in the list: a highlight paints a background and inherits its text colour, which
1902
+ * is what lets colour and highlight stack on one run without either resetting the other. */
1903
+ & :where(.jz-color, .jz-color *) {
1904
+ color: var(--jz-color);
1905
+ }
1906
+
1907
+ /* ── the two LITERAL modifiers (2026-08-16) ───────────────────────────────────────────────────
1908
+ *
1909
+ * `custom` needs no rule at all, and that is the whole reason the literal rides a custom property:
1910
+ * `<span class="jz-color jz-color--custom" style="--jz-color:#175cd3">` feeds the SAME
1911
+ * `color: var(--jz-color)` above, so a picked value inherits down the `.jz-color *` arm, survives
1912
+ * `code` and a link, and loses none of the decisions written up there. An inline `color:` would
1913
+ * have beaten every one of them instead.
1914
+ *
1915
+ * `gradient` is the one that needs machinery, and it is here rather than inline for the same
1916
+ * reason: the STYLE attribute carries a value, the stylesheet carries the mechanism. Three
1917
+ * declarations, and the transparent text is why the second rule repeats the descendant arm — a
1918
+ * nested `<strong>` inside a gradient run would otherwise re-inherit `var(--jz-color)` from the
1919
+ * rule above and paint over the clip.
1920
+ *
1921
+ * `background-clip: text` on an inline box clips PER FRAGMENT, so a gradient run that wraps
1922
+ * restarts the ramp on the next line. That is CSS's own behaviour for an inline background and
1923
+ * there is no property that changes it — a gradient is a headline affordance, which is what the
1924
+ * spec says about it. */
1925
+ & :where(.jz-color--gradient) {
1926
+ background-image: var(--jz-color-gradient);
1927
+ -webkit-background-clip: text;
1928
+ background-clip: text;
1929
+ }
1930
+ & :where(.jz-color--gradient, .jz-color--gradient *) {
1931
+ color: transparent;
1932
+ }
1933
+ & :where(.jz-mark--gradient) {
1934
+ background-image: var(--jz-mark-gradient);
1935
+ }
1936
+ }
1937
+
1938
+ /* `numbering="decimal"` — the default. A native `<ol>` marker, which only ever counts its OWN list, so
1939
+ * a nested one restarts at `1.` That is the correct default: it is what every other renderer of the
1940
+ * stored HTML will show. Split out of `jz-prose` rather than living inside it because numbering is the
1941
+ * one list decision a caller can change, and §4 wants ONE table for a closed set — `PROSE_NUMBERING`
1942
+ * in `prose.ts` names both members and nothing re-derives a second answer.
1943
+ *
1944
+ * Declared AFTER `jz-prose`: both compile to specificity 0,1,0, so source order is what lets `pl-5`
1945
+ * here win over the shared rhythm above. */
1946
+ @utility jz-prose-decimal {
1947
+ & :where(ol) {
1948
+ @apply list-outside list-decimal pl-5;
1949
+ }
1950
+ }
1951
+
1952
+ /* `RichTextEditor numbering="outline"` — the multi-level `1.` / `1.1.` / `1.1.1.` marker.
1953
+ *
1954
+ * **A utility rather than arbitrary variants in `prose.ts`, because a CSS COUNTER is not a value
1955
+ * Tailwind has a utility for**, and `[content:counters(jz-ol,'.')_'.']` is a string that has to
1956
+ * survive Tailwind's own bracket parsing to work at all — the exact shape `prose.ts`'s header warns
1957
+ * about, where a class that compiles to nothing fails silently. Same reasoning as `rule-y` above: the
1958
+ * recipe lives here, once, and the component names it.
1959
+ *
1960
+ * **`list-style: none` is what makes it multi-level.** A native `<ol>` marker only ever counts its own
1961
+ * list, so a nested one restarts at 1 — no `list-style-type` can say "1.1". `counters()` (plural) walks
1962
+ * the whole nesting chain, which is the entire mechanism.
1963
+ *
1964
+ * **The `grid` on the row is not decoration.** With an absolutely-positioned `::before` in a fixed
1965
+ * gutter, a third-level `1.1.1.` outgrows the gutter and collides with its own text (measured: the
1966
+ * marker overlaps the first glyph at depth 3). Two auto columns let the marker size to its content at
1967
+ * every depth. `> *` puts every child in column 2 so a nested list lands under the text and not under
1968
+ * the number — grid auto-placement would otherwise drop it into the next row's column 1.
1969
+ *
1970
+ * The rems are literal rather than `calc(var(--spacing) * n)`: `--spacing` is a THEME var, and a theme
1971
+ * var that nothing else references is pruned from `:root` (see `docs/theme.md` — 9 were missing once),
1972
+ * which would silently invalidate every `calc()` here. 1.5rem is the nested step, 0.5rem the gutter.
1973
+ *
1974
+ * Not set: colour and margins. The marker inherits its row's text colour exactly as a native one does,
1975
+ * and the `ol` margins stay in `prose.ts` with the rest of the vertical rhythm — this utility owns the
1976
+ * NUMBERING and nothing else, so the two numbering modes cannot drift in spacing. */
1977
+ @utility jz-prose-outline {
1978
+ & :where(ol) {
1979
+ padding-left: 0;
1980
+ list-style: none;
1981
+ counter-reset: jz-ol;
1982
+ }
1983
+ & :where(ol ol) {
1984
+ padding-left: 1.25rem;
1985
+ }
1986
+ & :where(ol > li) {
1987
+ display: grid;
1988
+ grid-template-columns: auto 1fr;
1989
+ column-gap: 0.5rem;
1990
+ counter-increment: jz-ol;
1991
+ }
1992
+ & :where(ol > li) > * {
1993
+ grid-column: 2;
1994
+ }
1995
+ /* A nested list starts a fresh ROW spanning both columns, so its own `padding-left` is the ENTIRE
1996
+ * step — one fixed 1.25rem per level, the same 20px `decimal`'s nested `pl-5` steps by.
1997
+ *
1998
+ * Without this it inherits `grid-column: 2` from the rule above and lands after the PARENT's marker,
1999
+ * so each level paid that marker's width PLUS the padding — and the marker grows with depth, so the
2000
+ * step grew too: measured 82px from level 1→2 and 115px from 2→3, against 20px here. Compounding an
2001
+ * indent by the width of the thing being indented past is the bug; the marker column is `auto` for a
2002
+ * reason, and nothing else may depend on how wide it turned out. */
2003
+ & :where(ol > li > ol, ol > li > ul) {
2004
+ grid-column: 1 / -1;
2005
+ }
2006
+ & :where(ol > li)::before {
2007
+ content: counters(jz-ol, ".") ".";
2008
+ font-variant-numeric: tabular-nums;
2009
+ }
2010
+ }
2011
+
1047
2012
  /* The same, for a rule that runs DOWN. Named after `src/lib/drop-line.ts`: the axis a rule
1048
2013
  * SEPARATES, never the dimension it sets — `rule-x` separates side-by-side columns. */
1049
2014
  @utility rule-x {