@tristan2828/ui-foundation 4.72.0 → 4.74.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 (34) hide show
  1. package/conventions/docs/add-an-entity.md +38 -14
  2. package/conventions/docs/design-language.md +103 -26
  3. package/dist/components/app/markdown.d.ts +13 -1
  4. package/dist/components/app/markdown.js +43 -8
  5. package/dist/components/app/milkdown-editor.d.ts +1 -1
  6. package/dist/components/app/milkdown-editor.js +184 -19
  7. package/dist/components/app/page-link.d.ts +13 -0
  8. package/dist/components/app/page-link.js +44 -0
  9. package/dist/components/app/page-restore.d.ts +3 -0
  10. package/dist/components/app/page-restore.js +14 -0
  11. package/dist/components/app/page-trail.d.ts +17 -0
  12. package/dist/components/app/page-trail.js +71 -0
  13. package/dist/components/app/rich-text-editor.d.ts +22 -0
  14. package/dist/components/app/rich-text-editor.js +8 -0
  15. package/dist/components/app/rich-text-floating-toolbar.d.ts +3 -1
  16. package/dist/components/app/rich-text-floating-toolbar.js +2 -2
  17. package/dist/components/app/rich-text-page-links.d.ts +44 -0
  18. package/dist/components/app/rich-text-page-links.js +201 -0
  19. package/dist/components/app/rich-text-slash-menu.d.ts +3 -4
  20. package/dist/components/app/rich-text-slash.d.ts +12 -3
  21. package/dist/components/app/rich-text-slash.js +16 -5
  22. package/dist/components/app/rich-text-toolbar.d.ts +3 -1
  23. package/dist/components/app/rich-text-toolbar.js +10 -7
  24. package/dist/components/ui/breadcrumb.d.ts +10 -0
  25. package/dist/components/ui/breadcrumb.js +37 -0
  26. package/dist/index.d.ts +2 -0
  27. package/dist/index.js +1 -0
  28. package/dist/lib/page-link.d.ts +40 -0
  29. package/dist/lib/page-link.js +32 -0
  30. package/dist/lib/page-trail.d.ts +7 -0
  31. package/dist/lib/page-trail.js +24 -0
  32. package/package.json +1 -1
  33. package/styles/index.css +73 -0
  34. package/styles/theme.css +55 -1
package/styles/theme.css CHANGED
@@ -110,6 +110,38 @@
110
110
  --category-11-400: oklch(0.823 0.163 119);
111
111
  --category-12-700: oklch(0.423 0.181 337); /* magenta */
112
112
  --category-12-400: oklch(0.648 0.232 337);
113
+ /*
114
+ * The heat scale (design-language.md "Heat scale"). Five steps from cold
115
+ * to hot, for values that have an order: a heat map, a calendar of how
116
+ * much. Not status (tones) and not categories (the slots above).
117
+ *
118
+ * Opaque fills, unlike the slots: each step has its own --heat-N-foreground
119
+ * for text on it. Lightness falls at every step in both themes, so the
120
+ * order survives in greyscale and for colour-blind readers, and hue runs
121
+ * blue, teal, gold, orange, red, so the cold half and the hot half never
122
+ * meet (blue against yellow survives red-green colour blindness).
123
+ *
124
+ * Measured from these values (tests/heat-scale.test.ts holds neighbours to
125
+ * ΔE 15, 10 under simulated deuteranopia and protanopia, and every step to
126
+ * 3:1 on every card):
127
+ * neighbours light ΔE 20.9 to 34.2, deuteranopia/protanopia 13.1 or more
128
+ * dark ΔE 17.8 to 34.6, deuteranopia/protanopia 12.6 or more
129
+ * on white 3.33 / 3.55 / 4.20 / 6.34 / 10.47 (3.06 at the least on --muted)
130
+ * on dark's card 11.5 / 8.60 / 7.39 / 5.52 / 4.46
131
+ * on palette cards 3.96 at the least (step 5, Graphite); 3.43 on its raised surface
132
+ * text on the fill 4.71 at the least: black on steps 1-3 in light, white
133
+ * on 4 and 5, black on every step in dark
134
+ */
135
+ --heat-1-700: oklch(0.645 0.13 262); /* blue */
136
+ --heat-1-400: oklch(0.85 0.08 240);
137
+ --heat-2-700: oklch(0.614 0.104 188); /* teal */
138
+ --heat-2-400: oklch(0.758 0.085 185);
139
+ --heat-3-700: oklch(0.584 0.114 97); /* gold */
140
+ --heat-3-400: oklch(0.725 0.148 98);
141
+ --heat-4-700: oklch(0.5 0.133 47); /* orange */
142
+ --heat-4-400: oklch(0.661 0.13 47);
143
+ --heat-5-700: oklch(0.388 0.15 20); /* red */
144
+ --heat-5-400: oklch(0.615 0.16 20); /* a purer red goes nearly black under protanopia */
113
145
  --blue-500: oklch(0.488 0.243 264.376);
114
146
 
115
147
  /*
@@ -349,6 +381,17 @@
349
381
  --category-10: var(--category-10-700);
350
382
  --category-11: var(--category-11-700);
351
383
  --category-12: var(--category-12-700);
384
+ /* The heat scale: an opaque fill, with its own text colour. */
385
+ --heat-1: var(--heat-1-700);
386
+ --heat-1-foreground: var(--black);
387
+ --heat-2: var(--heat-2-700);
388
+ --heat-2-foreground: var(--black);
389
+ --heat-3: var(--heat-3-700);
390
+ --heat-3-foreground: var(--black);
391
+ --heat-4: var(--heat-4-700);
392
+ --heat-4-foreground: var(--white);
393
+ --heat-5: var(--heat-5-700);
394
+ --heat-5-foreground: var(--white);
352
395
  /* The zebra stripe (table.tsx: bg-muted/40 on even rows) mixed onto the
353
396
  page, opaque: what a pinned table cell paints on an even row, so it
354
397
  matches the row without letting scrolled columns show through. Mixed
@@ -517,6 +560,17 @@
517
560
  --category-10: var(--category-10-400);
518
561
  --category-11: var(--category-11-400);
519
562
  --category-12: var(--category-12-400);
563
+ /* The heat scale: lighter steps to clear the dark surfaces, black text on all. */
564
+ --heat-1: var(--heat-1-400);
565
+ --heat-1-foreground: var(--black);
566
+ --heat-2: var(--heat-2-400);
567
+ --heat-2-foreground: var(--black);
568
+ --heat-3: var(--heat-3-400);
569
+ --heat-3-foreground: var(--black);
570
+ --heat-4: var(--heat-4-400);
571
+ --heat-4-foreground: var(--black);
572
+ --heat-5: var(--heat-5-400);
573
+ --heat-5-foreground: var(--black);
520
574
  --table-stripe: color-mix(in srgb, var(--muted) 40%, var(--background));
521
575
  --table-highlight: color-mix(in srgb, var(--info) 20%, var(--background));
522
576
  --table-highlight-muted-foreground: var(--gray-400); /* the usual muted: not var(--muted-foreground), which the row redefines from this */
@@ -547,7 +601,7 @@
547
601
  * the dark theme, so a block below always sits on top of .dark and sets
548
602
  * only what differs from it. The solid fills (--destructive, --success,
549
603
  * --warning, --info, each with white -foreground), --info-text, the
550
- * highlight washes and the categorical slots stay .dark's.
604
+ * highlight washes, the categorical slots and the heat scale stay .dark's.
551
605
  *
552
606
  * --ring is the accent (4.24 to 5.25 on the page), not the guide's
553
607
  * accent deep (2.30 to 2.91, under the 3:1 a focus ring needs).