@tristan2828/ui-foundation 3.20.0 → 3.21.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 (33) hide show
  1. package/conventions/docs/add-an-entity.md +3 -3
  2. package/conventions/docs/cell-patterns.md +13 -4
  3. package/conventions/docs/design-language.md +22 -0
  4. package/dist/components/app/markdown.js +38 -20
  5. package/dist/components/app/milkdown-editor.js +189 -31
  6. package/dist/components/app/prose-look.d.ts +32 -0
  7. package/dist/components/app/prose-look.js +48 -0
  8. package/dist/components/app/rich-text-format-items.d.ts +13 -1
  9. package/dist/components/app/rich-text-format-items.js +43 -10
  10. package/dist/components/app/rich-text-formats.d.ts +15 -2
  11. package/dist/components/app/rich-text-formats.js +99 -10
  12. package/dist/components/app/rich-text-node-views.d.ts +31 -0
  13. package/dist/components/app/rich-text-node-views.js +79 -0
  14. package/dist/components/app/rich-text-shortcuts.d.ts +12 -0
  15. package/dist/components/app/rich-text-shortcuts.js +52 -0
  16. package/dist/components/app/rich-text-slash-menu.js +4 -1
  17. package/dist/components/app/rich-text-slash.js +26 -10
  18. package/dist/components/app/rich-text-table-menu.d.ts +20 -0
  19. package/dist/components/app/rich-text-table-menu.js +53 -0
  20. package/dist/components/app/rich-text-table.d.ts +19 -0
  21. package/dist/components/app/rich-text-table.js +162 -0
  22. package/dist/components/app/rich-text-toolbar.d.ts +11 -2
  23. package/dist/components/app/rich-text-toolbar.js +14 -23
  24. package/dist/components/app/rich-text-widgets.d.ts +19 -0
  25. package/dist/components/app/rich-text-widgets.js +34 -0
  26. package/dist/components/ui/badge.d.ts +1 -1
  27. package/dist/components/ui/dropdown-menu.d.ts +29 -0
  28. package/dist/components/ui/dropdown-menu.js +51 -0
  29. package/dist/lib/markdown-callout.d.ts +38 -0
  30. package/dist/lib/markdown-callout.js +103 -0
  31. package/package.json +1 -1
  32. package/styles/index.css +17 -0
  33. package/styles/theme.css +24 -0
package/styles/theme.css CHANGED
@@ -123,6 +123,22 @@
123
123
  --type-caption-size: 0.75rem; /* counts, metadata, helper text */
124
124
  --type-caption-leading: 1rem;
125
125
  --type-caption-weight: 400;
126
+ /*
127
+ * Headings inside written text (a record's notes: <Markdown> and the
128
+ * rich-text editor), not the screen's own outline. Three clear steps
129
+ * over the 14px body, roughly Notion's proportions, so `#`, `##` and
130
+ * `###` never look alike. Heading 1 also gets a rule under it (where
131
+ * the roles are used), so it reads as the top of the outline.
132
+ */
133
+ --type-heading-1-size: 1.625rem;
134
+ --type-heading-1-leading: 2rem;
135
+ --type-heading-1-weight: 700;
136
+ --type-heading-2-size: 1.25rem;
137
+ --type-heading-2-leading: 1.75rem;
138
+ --type-heading-2-weight: 600;
139
+ --type-heading-3-size: 1.0625rem;
140
+ --type-heading-3-leading: 1.5rem;
141
+ --type-heading-3-weight: 600;
126
142
 
127
143
  /*
128
144
  * Table density (design-language.md "Density"). The table primitive's
@@ -167,6 +183,12 @@
167
183
  --success-text: var(--green-800);
168
184
  --warning-text: var(--amber-800);
169
185
  --info-text: var(--blue-800);
186
+ /* A link in written text: coloured as well as underlined, so it reads
187
+ as a link at a glance (on white: 5.59). */
188
+ --link: var(--blue-700);
189
+ /* A thematic break (`---`) in written text: a 2px line meant to be
190
+ seen, stronger than --border's hairline (on white: 2.59). */
191
+ --rule: var(--gray-400);
170
192
  /* Categorical slots — a glyph tint, never a fill behind text. */
171
193
  --category-1: var(--category-1-700);
172
194
  --category-2: var(--category-2-700);
@@ -236,6 +258,8 @@
236
258
  --success-text: var(--green-400);
237
259
  --warning-text: var(--amber-400);
238
260
  --info-text: var(--blue-400);
261
+ --link: var(--blue-400); /* on near-black: 8.90 */
262
+ --rule: var(--gray-600); /* on near-black: 2.54 */
239
263
  /* Categorical slots — lighter shades to read against the dark page. */
240
264
  --category-1: var(--category-1-400);
241
265
  --category-2: var(--category-2-400);