@tristan2828/ui-foundation 4.136.0 → 4.137.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 (163) hide show
  1. package/README.md +7 -6
  2. package/bin/ui-foundation.mjs +1 -1
  3. package/conventions/agents/spec-tester.md +3 -3
  4. package/conventions/docs/add-an-entity.md +722 -714
  5. package/conventions/docs/cell-patterns.md +206 -378
  6. package/conventions/docs/column-options.md +6 -12
  7. package/conventions/docs/design-language.md +293 -515
  8. package/conventions/docs/entity-plan-template.md +9 -7
  9. package/conventions/docs/reminders.md +12 -17
  10. package/conventions/docs/timed-screens.md +17 -20
  11. package/dist/components/app/action-error.js +1 -1
  12. package/dist/components/app/action-hint.js +1 -1
  13. package/dist/components/app/app-shell-bottom-bar.js +4 -4
  14. package/dist/components/app/app-shell-nav.d.ts +1 -1
  15. package/dist/components/app/app-shell-nav.js +1 -1
  16. package/dist/components/app/app-shell.d.ts +1 -1
  17. package/dist/components/app/app-shell.js +9 -9
  18. package/dist/components/app/board.d.ts +13 -13
  19. package/dist/components/app/board.js +3 -3
  20. package/dist/components/app/choice-buttons.d.ts +1 -1
  21. package/dist/components/app/data-table-tools.d.ts +3 -3
  22. package/dist/components/app/data-table.d.ts +11 -13
  23. package/dist/components/app/data-table.js +5 -5
  24. package/dist/components/app/date-field.js +1 -1
  25. package/dist/components/app/delete-action.d.ts +1 -1
  26. package/dist/components/app/delete-action.js +4 -4
  27. package/dist/components/app/edit-caret.js +1 -1
  28. package/dist/components/app/edit-in-place-presets.d.ts +4 -4
  29. package/dist/components/app/edit-in-place-store.d.ts +3 -3
  30. package/dist/components/app/edit-in-place-store.js +7 -7
  31. package/dist/components/app/editable-list.js +2 -3
  32. package/dist/components/app/editable-value.d.ts +2 -2
  33. package/dist/components/app/editable-value.js +20 -20
  34. package/dist/components/app/entity-form.js +2 -2
  35. package/dist/components/app/entity-view-facts.d.ts +12 -12
  36. package/dist/components/app/entity-view-facts.js +1 -1
  37. package/dist/components/app/entity-view.d.ts +16 -16
  38. package/dist/components/app/entity-view.js +28 -33
  39. package/dist/components/app/equal-items.js +4 -4
  40. package/dist/components/app/fact-extras.js +5 -5
  41. package/dist/components/app/field-rows.js +5 -5
  42. package/dist/components/app/fill-in-queue.js +2 -3
  43. package/dist/components/app/filter-bar.d.ts +1 -1
  44. package/dist/components/app/filter-date.js +1 -1
  45. package/dist/components/app/filter-name.js +1 -1
  46. package/dist/components/app/form-dialog.js +2 -2
  47. package/dist/components/app/form-leave-guard.js +2 -2
  48. package/dist/components/app/form-section.js +1 -1
  49. package/dist/components/app/icon-action.d.ts +1 -1
  50. package/dist/components/app/icon-action.js +2 -2
  51. package/dist/components/app/image-field.js +0 -1
  52. package/dist/components/app/keep-pencil-room.js +1 -1
  53. package/dist/components/app/key-stats.d.ts +3 -3
  54. package/dist/components/app/line-chart.d.ts +1 -1
  55. package/dist/components/app/line-chart.js +3 -3
  56. package/dist/components/app/list-editor-rows.js +1 -1
  57. package/dist/components/app/list-editor.js +1 -1
  58. package/dist/components/app/list-header.d.ts +6 -6
  59. package/dist/components/app/list-header.js +8 -8
  60. package/dist/components/app/markdown.js +30 -37
  61. package/dist/components/app/milkdown-editor.js +37 -62
  62. package/dist/components/app/module-card.js +6 -7
  63. package/dist/components/app/month-calendar.d.ts +46 -0
  64. package/dist/components/app/month-calendar.js +160 -0
  65. package/dist/components/app/month-day-field.js +0 -1
  66. package/dist/components/app/multi-choice.d.ts +1 -1
  67. package/dist/components/app/multi-choice.js +3 -3
  68. package/dist/components/app/multi-line-chart.js +1 -1
  69. package/dist/components/app/multi-pick.js +9 -10
  70. package/dist/components/app/multi-reference.js +2 -2
  71. package/dist/components/app/notes-outline.js +0 -1
  72. package/dist/components/app/notify.js +2 -2
  73. package/dist/components/app/offline-notice.js +1 -1
  74. package/dist/components/app/option-icon.js +1 -1
  75. package/dist/components/app/option-select.d.ts +1 -1
  76. package/dist/components/app/overview-page.d.ts +2 -2
  77. package/dist/components/app/overview-page.js +1 -1
  78. package/dist/components/app/page-trail-context.js +1 -1
  79. package/dist/components/app/pill-filter.d.ts +2 -2
  80. package/dist/components/app/prose-look.js +1 -1
  81. package/dist/components/app/rating-input.js +1 -1
  82. package/dist/components/app/rating-score.js +1 -1
  83. package/dist/components/app/record-dialog.js +25 -40
  84. package/dist/components/app/recurrence-field.js +6 -6
  85. package/dist/components/app/reference-combobox.js +1 -2
  86. package/dist/components/app/rich-text-box-anchor.js +0 -1
  87. package/dist/components/app/rich-text-edges.js +2 -2
  88. package/dist/components/app/rich-text-editor.d.ts +2 -3
  89. package/dist/components/app/rich-text-editor.js +19 -32
  90. package/dist/components/app/rich-text-empty-paragraph.d.ts +6 -7
  91. package/dist/components/app/rich-text-empty-paragraph.js +6 -7
  92. package/dist/components/app/rich-text-floating-toolbar.js +0 -1
  93. package/dist/components/app/rich-text-formats.js +2 -2
  94. package/dist/components/app/rich-text-input-rules.js +1 -2
  95. package/dist/components/app/rich-text-keyboard-bar.js +6 -7
  96. package/dist/components/app/rich-text-node-views.js +1 -2
  97. package/dist/components/app/rich-text-shortcuts.js +8 -8
  98. package/dist/components/app/rich-text-slash-menu.js +22 -12
  99. package/dist/components/app/rich-text-slash.d.ts +2 -2
  100. package/dist/components/app/rich-text-slash.js +2 -2
  101. package/dist/components/app/rich-text-table-grips.d.ts +1 -1
  102. package/dist/components/app/rich-text-table-grips.js +1 -2
  103. package/dist/components/app/rich-text-tasks.d.ts +1 -1
  104. package/dist/components/app/rich-text-tasks.js +1 -1
  105. package/dist/components/app/rich-text-touch.js +1 -1
  106. package/dist/components/app/search-palette.js +1 -2
  107. package/dist/components/app/secondary-filters.js +2 -3
  108. package/dist/components/app/session-view.js +1 -1
  109. package/dist/components/app/stacked-area-chart.js +1 -1
  110. package/dist/components/app/step-track.d.ts +1 -1
  111. package/dist/components/app/step-track.js +3 -3
  112. package/dist/components/app/widget-card.js +26 -30
  113. package/dist/components/app/widget-layout-sheet.js +1 -1
  114. package/dist/components/ui/calendar.js +2 -2
  115. package/dist/components/ui/combobox.d.ts +1 -1
  116. package/dist/components/ui/combobox.js +2 -2
  117. package/dist/components/ui/field.d.ts +1 -1
  118. package/dist/components/ui/field.js +6 -6
  119. package/dist/components/ui/skeleton.js +1 -1
  120. package/dist/components/ui/sonner.js +1 -1
  121. package/dist/components/ui/tabs.js +1 -1
  122. package/dist/error-reporting/reporter.d.ts +1 -1
  123. package/dist/error-reporting/reporter.js +1 -1
  124. package/dist/hooks/table-url-changes.d.ts +2 -2
  125. package/dist/hooks/table-url-changes.js +5 -6
  126. package/dist/hooks/use-action.js +1 -1
  127. package/dist/hooks/use-record-update.js +1 -1
  128. package/dist/hooks/use-table-url-state.d.ts +1 -1
  129. package/dist/hooks/use-table-url-state.js +2 -2
  130. package/dist/index.d.ts +1 -0
  131. package/dist/index.js +3 -2
  132. package/dist/lib/audio-cues.js +2 -2
  133. package/dist/lib/connection.js +1 -1
  134. package/dist/lib/date-filter.js +1 -1
  135. package/dist/lib/entity-view-tab.js +1 -1
  136. package/dist/lib/field-rows.js +2 -2
  137. package/dist/lib/form-errors.d.ts +1 -1
  138. package/dist/lib/form-errors.js +1 -1
  139. package/dist/lib/keep-audio-alive.js +1 -1
  140. package/dist/lib/line-chart-layout.js +3 -3
  141. package/dist/lib/markdown-inline.js +0 -2
  142. package/dist/lib/markdown-merge.js +2 -2
  143. package/dist/lib/markdown-table-widths.js +1 -1
  144. package/dist/lib/markdown-table.js +1 -2
  145. package/dist/lib/markdown-toggle.js +1 -1
  146. package/dist/lib/page-leaving.js +1 -1
  147. package/dist/lib/recurrence-format.d.ts +2 -2
  148. package/dist/lib/recurrence-format.js +1 -1
  149. package/dist/lib/recurrence-phrase.d.ts +1 -1
  150. package/dist/lib/recurrence-phrase.js +2 -2
  151. package/dist/lib/recurrence.d.ts +1 -1
  152. package/dist/lib/recurrence.js +2 -2
  153. package/dist/lib/stale-chunk-reload.js +1 -1
  154. package/dist/lib/status-kinds.d.ts +1 -1
  155. package/dist/lib/status-kinds.js +2 -2
  156. package/dist/mocks/start-worker.js +2 -2
  157. package/dist/routes/login.js +1 -1
  158. package/dist/testing/index.d.ts +7 -4
  159. package/dist/testing/index.js +10 -13
  160. package/package.json +1 -1
  161. package/styles/index.css +3 -3
  162. package/styles/theme.css +14 -20
  163. package/vite/pwa.js +1 -1
@@ -22,8 +22,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
22
22
  // title marked `edit` turns into its form control where it's shown, and
23
23
  // saves when you leave it. This component runs it (one field open at a
24
24
  // time, the leave-page prompt); EditableValue is each value's side, and a
25
- // header badge uses it directly. A field not marked renders exactly as
26
- // before. Edit, in `actions`, stays for everything else. A sub-item list
25
+ // header badge uses it directly. A field not marked is read-only.
26
+ // Edit, in `actions`, stays for everything else. A sub-item list
27
27
  // edits in place too (editInPlace's `list` kind, editable-list.tsx): its
28
28
  // items added, edited, moved and removed on the page. Long text can
29
29
  // autosave as it's typed (`autosave`), and be the editor itself, with no
@@ -45,25 +45,20 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
45
45
  // button, which prints those sections alone under the title and
46
46
  // subtitle, with no rail, shell or buttons, on light paper.
47
47
  //
48
- // Three layouts. `tabs` (the default since 4.98, record standard 1A):
49
- // every section in one column capped at max-w-4xl, with no right rail. The
50
- // short facts (sections placed `rail` with no `tab`) are the record's last
51
- // tab, Details (`detailsTab`), beside its other tabs; a record with no other
52
- // tab shows them in the column, in their place. A section placed `rail`
53
- // *with* a `tab` is a narrow box beside that tab's sections (on a phone,
54
- // under them): short facts only, never free text. `column`: one column,
55
- // `placement` ignored, as before 4.98. `rail` (kept for apps not yet
56
- // moved; consuming.md "4.98"): the page takes the
57
- // content area's whole width, sections placed `rail` go in a narrow column
58
- // on the right that stays in view while the main column scrolls (an issue
59
- // tracker's shape), and the rest fill the main column. Below the width two
60
- // columns need, one column: header, rail, main, or header, main, rail with
61
- // `mobileOrder="main-first"` (a record whose long content is what you open
62
- // it for: notes, a checklist). The DOM is in that order at every width, so
63
- // reading and tab order match the screen: beside each other, the columns'
64
- // places come from the grid, not the DOM.
48
+ // Three layouts. `tabs` (the default, record standard 1A): every section in
49
+ // one column capped at max-w-4xl, with no right rail. The short facts
50
+ // (sections placed `rail` with no `tab`) are the record's last tab, Details
51
+ // (`detailsTab`); a record with no other tab shows them in the column. A
52
+ // section placed `rail` *with* a `tab` is a narrow box beside that tab's
53
+ // sections (on a phone, under them): short facts only, never free text.
54
+ // `column`: one column, `placement` ignored. `rail` (legacy; consuming.md
55
+ // "4.98"): a narrow column on the right that stays in view while the main
56
+ // column scrolls, one column below the width two need (`mobileOrder`). The
57
+ // DOM is in that order at every width, so reading and tab order match the
58
+ // screen: beside each other, the columns' places come from the grid, not
59
+ // the DOM.
65
60
  //
66
- // Tabs (4.76, #303): a main section with a `tab` goes under a tab list at
61
+ // Tabs: a main section with a `tab` goes under a tab list at
67
62
  // the top of the main column, one tab per distinct name in the order the
68
63
  // sections first give it, and only the selected tab's sections show. The
69
64
  // rest of the main column stays above the list, and the rail always shows.
@@ -73,10 +68,10 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
73
68
  // sections stay mounted, hidden, so a field open in place survives a
74
69
  // switch. With no `tab` on any section, nothing changes.
75
70
  //
76
- // The tab bar (4.101, record standard 3B): bigger underline tabs (16px
77
- // semibold, 14px on a phone), the open one plainly marked (4.111): a 3px
71
+ // The tab bar (record standard 3B): bigger underline tabs (16px
72
+ // semibold, 14px on a phone), the open one plainly marked: a 3px
78
73
  // primary line, a primary tint behind it (ui/tabs' line look) and its name
79
- // bold in the theme colour (`text-primary-text`, 4.105), each
74
+ // bold in the theme colour (`text-primary-text`), each
80
75
  // tab's count beside its name (`tabCounts`; none for zero). The bar sticks
81
76
  // to the top of whatever scrolls (the page, or a record dialog's body) as
82
77
  // the record scrolls under it, `tabsStickyTop` below the top, and once
@@ -86,11 +81,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
86
81
  //
87
82
  // `leading`, left of the title: the record's mark or avatar, with the
88
83
  // title, subtitle and badges beside it at every width. A rail field's
89
- // label sits to the left of its value (`railFields`, `beside` by default
90
- // since 4.81), as in an issue tracker's sidebar, stacked again where the
84
+ // label sits to the left of its value (`railFields`, `beside` by default),
85
+ // as in an issue tracker's sidebar, stacked again where the
91
86
  // rail's list is too narrow for both.
92
87
  //
93
- // The record page standard (4.81): `badges` sit on the title's line,
88
+ // The record page standard: `badges` sit on the title's line,
94
89
  // wrapping under a long title; Print notes is an icon (`IconAction`, its
95
90
  // words the tooltip and name); an empty value reads as a dash
96
91
  // (`emptyText`), and `emptyFields="fold"` folds each fields card's empty
@@ -125,11 +120,11 @@ import { factsAsFields, statusSectionFirst, useWideParent } from './entity-view-
125
120
  // The view's empty text and whether fields cards fold their empty ones,
126
121
  // for every section without threading them through each layout.
127
122
  const EmptyContext = createContext({ text: EMPTY_DASH, fold: false });
128
- // Whether the facts rail is drawn (4.112): the record's column then fills
123
+ // Whether the facts rail is drawn: the record's column then fills
129
124
  // the room up to the rail (Details' reading-width cap off), and its fields
130
125
  // rows keep a compact label (`FIELD_ROW.wide`) so the values get the rest.
131
126
  const BesideFactsRailContext = createContext(false);
132
- // The record's trail (#R2): the crumbs above it, then its own title
127
+ // The record's trail: the crumbs above it, then its own title
133
128
  // once it has loaded; the list's crumb is the last until then.
134
129
  function recordTrail(back, title) {
135
130
  if (!back.trail)
@@ -147,12 +142,12 @@ function OrEmpty({ value, emptyLabel }) {
147
142
  const fieldValue = (field) => (field.value !== undefined ? field.value : field.edit?.shown);
148
143
  function FieldRow({ field, place }) {
149
144
  const value = fieldValue(field);
150
- // An editable row is the target as a whole (4.88, F15/F18): the list's
145
+ // An editable row is the target as a whole: the list's
151
146
  // row hover, its pencil at the end, a chevron on a phone.
152
147
  const editable = Boolean(field.edit);
153
148
  const shown = field.edit ? (_jsx(EditableValue, { label: field.label, edit: field.edit, look: "row", children: _jsx(OrEmpty, { value: value, emptyLabel: field.emptyLabel }) })) : (_jsx(OrEmpty, { value: value, emptyLabel: field.emptyLabel }));
154
149
  return (_jsxs("div", { className: cn(FIELD_ROW_BASE, FIELD_ROW[place], editable && cn(editRowClass, '-mx-2 px-2 first:pt-2 last:pb-2'),
155
- // Stars to tap (RatingInput, 4.127) are five 44px targets on a
150
+ // Stars to tap (RatingInput) are five 44px targets on a
156
151
  // touch screen: wider than a narrow row's value column, so the
157
152
  // label goes above them there.
158
153
  'pointer-coarse:has-[[data-slot=rating-input]]:flex!'), onClick: editable ? onEditRowClick : undefined, children: [_jsx("dt", { className: FIELD_LABEL, children: field.label }), _jsxs("dd", { className: cn(FIELD_VALUE, field.action && 'flex flex-col items-start gap-1.5'), "data-record-status": field.recordStatus ? '' : undefined, children: [field.hint ? (_jsxs("span", { className: "inline-flex max-w-full flex-wrap items-center gap-x-1", children: [_jsx("span", { className: "min-w-0 max-w-full", children: shown }), _jsx(FactHint, { label: field.label, hint: field.hint })] })) : (shown), field.action && _jsx(FactAction, { action: field.action })] })] }));
@@ -211,7 +206,7 @@ const RAIL_LAYOUT = {
211
206
  // (max-w-4xl) and a 300px rail beside it. The strip stays above both, at
212
207
  // full width; the rail starts level with the first content under it: the
213
208
  // first section of the open tab (beside the tab's content, never its bar),
214
- // or the first card when the record's first content isn't the tabs (4.108).
209
+ // or the first card when the record's first content isn't the tabs.
215
210
  const FACTS_RAIL = {
216
211
  // Page width wide (data-width="wide" on <html>): no cap, the column fills the page.
217
212
  page: 'max-w-[calc(var(--container-4xl)+var(--spacing)*6+300px)] page-wide:max-w-none',
@@ -301,7 +296,7 @@ function TabBody({ tab, railFields }) {
301
296
  if (tab.details) {
302
297
  // The facts on their own: a reading width, never the whole page. Beside
303
298
  // the facts rail the column is already that (the page's own cap), so
304
- // they fill it up to the rail, level with the tab bar (4.112).
299
+ // they fill it up to the rail, level with the tab bar.
305
300
  return (_jsx("div", { "data-slot": "entity-view-details", className: cn('flex w-full min-w-0 flex-col gap-6', !besideFactsRail && 'max-w-2xl'), children: tab.sections.map((section) => (_jsx(ViewSection, { section: section, inRail: true, railFields: railFields }, section.title))) }));
306
301
  }
307
302
  const main = tab.sections.map((section) => _jsx(ViewSection, { section: section }, section.title));
@@ -391,7 +386,7 @@ function tabsLayout(sections, detailsTab) {
391
386
  return { above: main.filter((section) => section.tab === undefined), tabs, factsInColumn: false };
392
387
  }
393
388
  export function EntityView({ title, documentTitle, titleEdit, leading, subtitle, badges, actions, notice, strip, cardStrip = false, sections: givenSections, footer, layout = 'tabs', detailsTab = 'Details', tabCounts, tabsStickyTop, mobileOrder = 'rail-first', railLabel, factsRail = false, factsRailLabel, railFields = 'beside', emptyFields = 'show', emptyText = EMPTY_DASH, printLabel = 'Print Notes', printLook = 'icon', isLoading, error, onRetry, back, }) {
394
- // The record's status first among the sections in its place (4.115).
389
+ // The record's status first among the sections in its place.
395
390
  const sections = statusSectionFirst(givenSections);
396
391
  // Editing in place: one store per view, and the leave-page prompt only
397
392
  // while a field is open (or one is always editable).
@@ -15,14 +15,14 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
15
15
  // - `panels`: a panel per item side by side, every detail labelled above
16
16
  // its value, stacking on a phone. For things with several details each
17
17
  // that need to read as separate.
18
- // - `stepper` (4.127): the items in order as a row of numbered steps, each
18
+ // - `stepper`: the items in order as a row of numbered steps, each
19
19
  // done, current or upcoming (an item's `step`), picking the one item
20
20
  // whose panel shows under it; it opens on the current step. For a
21
21
  // sequence where one is running and the others are looked at in turn (a
22
22
  // plan's phases). The steps are a tablist: arrow keys, Home and End move
23
23
  // and pick; on a phone the row scrolls sideways in its own box, as the
24
- // record's tab bar does. Its marks are StepTrack's (step-track.tsx,
25
- // 4.128), the same row read only, for a display with no panels.
24
+ // record's tab bar does. Its marks are StepTrack's (step-track.tsx),
25
+ // the same row read only, for a display with no panels.
26
26
  //
27
27
  // The parts are the record's own: a state is a `Badge` in the outline
28
28
  // style (design-language.md "The three badge styles"), a field is the
@@ -31,7 +31,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
31
31
  // no items reads `emptyText` ("Nothing yet"), an item with no fields
32
32
  // `noFieldsText` ("No details").
33
33
  //
34
- // An item can carry its own parts too (4.94): `content`, anything of the
34
+ // An item can carry its own parts too: `content`, anything of the
35
35
  // app's (an editor of several fields, a note, a chart), drawn under its
36
36
  // fields at the item's full width, never in the label/value grid; and
37
37
  // `actions`, its own buttons (Edit, Remove), at the end of its title line,
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- // A fact's extras (4.115), shared by the facts rail, Details and the
3
- // strip's values (KeyStats, 4.120): a hint behind an info button, and a
4
- // small action button under the value. And a `switch` fact's switch (4.120).
2
+ // A fact's extras, shared by the facts rail, Details and the
3
+ // strip's values (KeyStats): a hint behind an info button, and a
4
+ // small action button under the value. And a `switch` fact's switch.
5
5
  import { useId, useState } from 'react';
6
6
  import { InfoIcon } from 'lucide-react';
7
7
  import { cn } from 'cn';
@@ -9,7 +9,7 @@ import { Button } from '../ui/button.js';
9
9
  import { Switch } from '../ui/switch.js';
10
10
  import { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip.js';
11
11
  import { usePrinting } from './print-context.js';
12
- // A fact's hint (4.115): an info button after the value, its words in a
12
+ // A fact's hint: an info button after the value, its words in a
13
13
  // tooltip on hover and on keyboard focus. On a touch screen, where a
14
14
  // tooltip has no hover to open it, the words are a line under the value
15
15
  // instead (and the button goes). A screen reader reads the words with the
@@ -19,7 +19,7 @@ export function FactHint({ label, hint }) {
19
19
  const id = useId();
20
20
  return (_jsxs(_Fragment, { children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx("button", { type: "button", "data-slot": "entity-view-fact-hint", "aria-label": `About ${label}`, "aria-describedby": id, className: "inline-flex size-6 shrink-0 items-center justify-center rounded-sm text-muted-foreground outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 pointer-coarse:hidden" }), children: _jsx(InfoIcon, { "aria-hidden": "true", className: "size-3.5" }) }), _jsx(TooltipContent, { children: hint })] }), _jsx("span", { id: id, "data-slot": "entity-view-fact-hint-text", className: "sr-only basis-full type-caption text-muted-foreground pointer-coarse:not-sr-only", children: hint })] }));
21
21
  }
22
- // A fact's action (4.115): a small button under its value, or the app's
22
+ // A fact's action: a small button under its value, or the app's
23
23
  // own action given that button (`render`), so its dialog opens from it.
24
24
  export function FactAction({ action }) {
25
25
  const Icon = action.icon;
@@ -5,12 +5,12 @@
5
5
  // Label beside value from `sm` up, once the list itself is 24rem wide;
6
6
  // below either (a phone, or a narrow box on a wide screen: a panel, a
7
7
  // dialog's column) the label sits above its value, so nothing is squeezed
8
- // into a narrow second column (4.97: a value column squeezed to nothing
9
- // cut off an editor's controls, ChoiceButtons' among them). In
8
+ // into a narrow second column (a value column squeezed to nothing
9
+ // cuts off an editor's controls, ChoiceButtons' among them). In
10
10
  // the rail the list's own width decides instead (a container query on the
11
11
  // <dl>): label above value in the narrow rail, beside it once the rail's
12
12
  // sections stack full width under the header.
13
- // `railFields="beside"` (4.76) puts them side by side in the rail too,
13
+ // `railFields="beside"` puts them side by side in the rail too,
14
14
  // from an 18rem list (a rail card beside the main column is ~19rem
15
15
  // inside), with a narrower label column, and stacked below that. Each
16
16
  // container query needs an `@container/fields` on the <dl>.
@@ -18,10 +18,10 @@ export const FIELD_ROW = {
18
18
  page: 'sm:@sm/fields:grid sm:@sm/fields:grid-cols-[minmax(--spacing(32),--spacing(48))_minmax(0,1fr)] sm:@sm/fields:gap-6',
19
19
  rail: '@lg/fields:grid @lg/fields:grid-cols-[minmax(--spacing(32),--spacing(48))_1fr] @lg/fields:gap-6',
20
20
  railBeside: '@2xs/fields:grid @2xs/fields:grid-cols-[minmax(--spacing(24),--spacing(28))_minmax(0,1fr)] @2xs/fields:items-baseline @2xs/fields:gap-4 @2xs/fields:py-2.5 @lg/fields:grid-cols-[minmax(--spacing(32),--spacing(48))_1fr] @lg/fields:gap-6',
21
- // The facts rail (4.106, A1): a 300px card, so side by side from a
21
+ // The facts rail: a 300px card, so side by side from a
22
22
  // 16rem list, the label column a little narrower again.
23
23
  facts: '@3xs/fields:grid @3xs/fields:grid-cols-[--spacing(24)_minmax(0,1fr)] @3xs/fields:items-baseline @3xs/fields:gap-3 @3xs/fields:py-2.5',
24
- // Beside the facts rail (4.112): the cards fill the column up to the
24
+ // Beside the facts rail: the cards fill the column up to the
25
25
  // rail, so the label keeps a compact 10rem and the value takes the rest
26
26
  // (a 12rem label, a third of a 36rem card, wrapped most values onto two
27
27
  // lines). Stacked below `sm` or a 24rem list, as on the page.
@@ -26,8 +26,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
26
26
  // and, when the group has its own `progress`, "3 of 12 filled" beside
27
27
  // it. With more than one group counted, each one's count is listed
28
28
  // under the bar.
29
- // - States: `loading` (skeletons), `error` (ErrorState, with `onRetry`),
30
- // and an empty queue (`empty`, default "Nothing left to fill in").
29
+ // - States: `loading`, `error` (with `onRetry`) and an empty queue
30
+ // (`empty`).
31
31
  //
32
32
  // The record is a centred column, 40rem at most; the buttons sit under it,
33
33
  // Skip at the start and Save and next at the end.
@@ -96,7 +96,6 @@ export function FillInQueue({ items, getKey, renderItem, onSave, canSave = true,
96
96
  // (adjusting state while rendering, so nothing draws the old one).
97
97
  if (index !== -1 && (held.key !== currentKey || held.index !== index))
98
98
  setHeld({ key: currentKey, index });
99
- // The app moving the queue to an index.
100
99
  const appliedIndex = useRef(indexProp);
101
100
  useEffect(() => {
102
101
  if (indexProp === undefined || indexProp === appliedIndex.current)
@@ -8,7 +8,7 @@ export type FilterBarSearch = {
8
8
  /** The box's accessible name: "Search" unless set. */
9
9
  label?: string;
10
10
  /**
11
- * A key pressed in the box (4.123): Enter opening the one match, or
11
+ * A key pressed in the box: Enter opening the one match, or
12
12
  * "#12" going straight to record 12. Called before the box's own
13
13
  * handling; `event.preventDefault()` keeps the key from it.
14
14
  */
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- // A list's date filter (4.110), for FilterBar: a select that names itself
2
+ // A list's date filter, for FilterBar: a select that names itself
3
3
  // like FilterSelect ("Any due date" while off, "Due: Before today" on),
4
4
  // with the relative presets (lib/date-filter.ts) and Between dates, which
5
5
  // shows a From and a To day beside it. Its value is one string, so it's a
@@ -1,4 +1,4 @@
1
- // A filter select's accessible name (4.123, FilterSelect and FilterDate):
1
+ // A filter select's accessible name (FilterSelect and FilterDate):
2
2
  // what it filters first, so it's found by its label ("Status") whatever it
3
3
  // shows, then the words shown unless they already say the label, so voice
4
4
  // control can say them too. "Status" while it shows "Any status", "Status:
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- // A small form in a dialog (4.82): a new record of up to about eight
2
+ // A small form in a dialog: a new record of up to about eight
3
3
  // fields over its list, or any short form a page opens (a weak spot, a
4
4
  // quick add). The title and the buttons stay put and the fields scroll
5
5
  // between them; 640px wide (DialogContent `size="form"`), the whole screen
@@ -16,7 +16,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  // `dirty` (react-hook-form's `formState.isDirty`) makes Esc, the close
17
17
  // button, a click outside and Cancel ask "Discard your changes?" first.
18
18
  // As a list's `new` route, `dirty` also guards leaving by a link, Back or
19
- // the sidebar (FormLeaveGuard, 4.85), as EntityForm's does.
19
+ // the sidebar (FormLeaveGuard), as EntityForm's does.
20
20
  // A failed save is a Notice above the buttons with Try again, which
21
21
  // submits again unless `onRetry` says otherwise; what was typed stays.
22
22
  // An edit refused because the record changed elsewhere (`conflict`, from
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- // Leaving a form with something typed (4.85, the form standard's F8):
2
+ // Leaving a form with something typed (the form standard):
3
3
  // "Discard your changes?" (Keep editing, Discard), the prompt a dialog
4
4
  // and a value edited in place ask with, before a link, Back or the
5
5
  // sidebar moves to another page; the browser's own prompt before a reload
@@ -21,7 +21,7 @@ export function FormLeaveGuard({ dirty, letThrough }) {
21
21
  useLayoutEffect(() => {
22
22
  latest.current = { dirty, letThrough };
23
23
  });
24
- // Typing a rich-text field holds back (F6) is reported first; the form
24
+ // A rich-text field's held-back typing is reported first; the form
25
25
  // marks itself dirty from it as it does from any change.
26
26
  const blocker = useBlocker(({ currentLocation, nextLocation }) => {
27
27
  flushPendingEdits();
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- // A group of a form's fields in a card (4.85, the form standard's F2),
2
+ // A group of a form's fields in a card (the form standard),
3
3
  // drawn as a record's section is (EntityView): the card surface, its title
4
4
  // on the heading band. Only on a form of eight fields or more, and never
5
5
  // in a dialog; a short form is one run of fields. Its fields are a
@@ -7,7 +7,7 @@ export type IconActionProps = Omit<ComponentProps<typeof Button>, 'children' | '
7
7
  /** What the action does ("Delete", "Print notes"): its tooltip and accessible name. */
8
8
  label: string;
9
9
  /**
10
- * The accessible name, when it says more than the tooltip (4.123):
10
+ * The accessible name, when it says more than the tooltip:
11
11
  * "Delete The Long Walk" for a tooltip of "Delete", so several on a page
12
12
  * are told apart. Start it with `label`, so what's seen is what's said.
13
13
  */
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- // A command drawn as its icon alone (record page standard 3.2, #R3): an
2
+ // A command drawn as its icon alone (record page standard 3.2): an
3
3
  // outline icon button at the header's button size, its `label` both the
4
4
  // tooltip shown on hover or focus and the button's accessible name. For
5
5
  // the universal actions only (Delete, Print notes, Copy link, Pin, Open
@@ -9,7 +9,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  // It takes every Button prop, so it can be a dialog's trigger as it is:
10
10
  // `<DialogTrigger render={<IconAction icon={Trash2Icon} label="Delete" tone="destructive" />} />`.
11
11
  //
12
- // A link (4.123): `render={<Link to="/print" />}` or `render={<a href=… />}`
12
+ // A link: `render={<Link to="/print" />}` or `render={<a href=… />}`
13
13
  // draws the icon as that link, its tooltip and name kept: the link is the
14
14
  // tooltip's trigger itself, drawn as the button, so it stays a link with
15
15
  // its href. A link takes no Button props.
@@ -25,7 +25,6 @@ export function ImageField({ id, value, thumbUrl, onChange, upload, accept = DEF
25
25
  const input = useRef(null);
26
26
  const main = useRef(null);
27
27
  const [busy, setBusy] = useState(false);
28
- // Why the last file picked isn't the field's image.
29
28
  const [problem, setProblem] = useState(null);
30
29
  // What a screen reader hears of an upload: started, done.
31
30
  const [status, setStatus] = useState('');
@@ -1,5 +1,5 @@
1
1
  // Set by a container whose inline <EditableValue>s must keep their
2
- // pencil's room at rest (KeyStats, 4.115), as `keepPencilRoom` does for
2
+ // pencil's room at rest (KeyStats), as `keepPencilRoom` does for
3
3
  // one: a value growing on hover moved the values after it along a
4
4
  // wrapping row, and a nearly full row wrapped, so the hovered value slid
5
5
  // out from under the mouse and a click opened the next one.
@@ -9,12 +9,12 @@ export type KeyStat = {
9
9
  /** The concept's icon, drawn at 13px before the label (decorative: the label still says it). */
10
10
  icon?: IconComponent;
11
11
  /**
12
- * A few words on the value (4.120), behind an info button after it: a
12
+ * A few words on the value, behind an info button after it: a
13
13
  * tooltip on hover and keyboard focus, a line under the value on a touch
14
14
  * screen. A screen reader reads it with the value.
15
15
  */
16
16
  info?: string;
17
- /** A small button under the value (4.120), as a rail fact's `action`. */
17
+ /** A small button under the value, as a rail fact's `action`. */
18
18
  action?: EntityViewFactAction;
19
19
  };
20
20
  /** A strip value's action: the same shape as a rail fact's. */
@@ -23,7 +23,7 @@ export type KeyStatsProps = {
23
23
  stats: readonly KeyStat[];
24
24
  /** What an empty value reads as. Defaults to a dash, read as "Not set". */
25
25
  emptyLabel?: string;
26
- /** `content` (the default since 4.98): as wide as its numbers. `full`: across the page. */
26
+ /** `content` (the default): as wide as its numbers. `full`: across the page. */
27
27
  width?: 'content' | 'full';
28
28
  className?: string;
29
29
  };
@@ -24,7 +24,7 @@ export type LineChartProps = {
24
24
  /**
25
25
  * Named steps, lowest first: `['Very low', 'Low', 'Moderate', 'High']`.
26
26
  * Each point's y is its step's index. The steps are named on the plot's
27
- * left, the range is all of them, and the line steps (4.64).
27
+ * left, the range is all of them, and the line steps.
28
28
  */
29
29
  levels?: readonly string[];
30
30
  /** A value as shown: `usd`. Defaults to the number as the browser writes it. */
@@ -1,5 +1,5 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- // A small value-over-time chart for a record's page (#238): one series (a
2
+ // A small value-over-time chart for a record's page: one series (a
3
3
  // price checked daily, a weight, a balance) against an optional dashed
4
4
  // target, with its lowest, highest or latest point marked. Plain SVG, no
5
5
  // chart library: one line, a few dozen points, nothing to zoom.
@@ -15,12 +15,12 @@ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-run
15
15
  // a summary (first, last, lowest, highest, the target) and a table of
16
16
  // every point, all visually hidden.
17
17
  //
18
- // A `projection` (4.51) carries the line on past its last point, dashed in
18
+ // A `projection` carries the line on past its last point, dashed in
19
19
  // the same colour: where a balance may go, not where it went. It shares
20
20
  // the plot's x and y ranges, so the target and the projection meet where
21
21
  // they would.
22
22
  //
23
- // `levels` (4.64) is for a value that is one of a few named steps (a
23
+ // `levels` is for a value that is one of a few named steps (a
24
24
  // confidence, Very low to High): each y is its step's index. The steps
25
25
  // are named down the plot's left with a faint rule at each, the range is
26
26
  // every step, and the line holds each value until the next point, then
@@ -1,5 +1,5 @@
1
1
  // Which of ListEditor's items are open, when its items show as summary
2
- // lines (`summary`, #222). One item is open at a time, held by its stable
2
+ // lines (`summary`). One item is open at a time, held by its stable
3
3
  // id (useFieldArray's `field.id`), so it stays open while rows move and
4
4
  // closes when it's removed. An item that was just added or duplicated
5
5
  // opens, and one with a validation error is open whatever else is.
@@ -10,7 +10,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
10
10
  // useFieldArray `fields`, `append`, `remove` and `move`, so the items save
11
11
  // with the parent's form and their errors bind like any other field.
12
12
  //
13
- // A long list of rich items (#222) can show each item as one line instead
13
+ // A long list of rich items can show each item as one line instead
14
14
  // (`summary`): the line is a button that opens the item to its fields,
15
15
  // one item at a time (list-editor-rows.ts), with the row buttons beside
16
16
  // it. And `onDuplicate` puts a Duplicate button beside Remove, for lists
@@ -9,17 +9,17 @@ export type ListHeaderAction = {
9
9
  label: string;
10
10
  onSelect: () => void;
11
11
  icon?: IconComponent;
12
- /** Can't be used now (4.123): an import already running, nothing to export. The item stays in ⋯, greyed. */
12
+ /** Can't be used now: an import already running, nothing to export. The item stays in ⋯, greyed. */
13
13
  disabled?: boolean;
14
14
  };
15
- /** The one button beside New (4.117): a link to a page, or a function. */
15
+ /** The one button beside New: a link to a page, or a function. */
16
16
  export type ListHeaderSecondaryAction = {
17
17
  label: string;
18
18
  /** Drawn before the words, in the button and in ⋯. */
19
19
  icon?: IconComponent;
20
20
  /** Can't be used now (a refresh in flight): the button and its menu item are disabled. */
21
21
  disabled?: boolean;
22
- /** A few words under the button (4.120): "12 searches left". In ⋯ on a phone, under its words. */
22
+ /** A few words under the button: "12 searches left". In ⋯ on a phone, under its words. */
23
23
  hint?: string;
24
24
  } & ({
25
25
  to: To;
@@ -47,7 +47,7 @@ export type ListHeaderProps = {
47
47
  /** How many records there are, beside the title in the muted tone. Left out while loading. */
48
48
  count?: number;
49
49
  /**
50
- * One short line under the title (4.120), in the muted tone: a sentence
50
+ * One short line under the title, in the muted tone: a sentence
51
51
  * of context for a list that needs it. Wraps in the header's width.
52
52
  */
53
53
  description?: string;
@@ -64,7 +64,7 @@ export type ListHeaderProps = {
64
64
  to?: never;
65
65
  };
66
66
  /**
67
- * One more button beside New (4.117), for the list's second most common
67
+ * One more button beside New, for the list's second most common
68
68
  * action ("Refresh Now", "Add from Catalog"). An outline button before
69
69
  * New, which stays the primary. On a phone it's the first item in ⋯.
70
70
  */
@@ -82,7 +82,7 @@ export type ListHeaderProps = {
82
82
  noun?: string;
83
83
  };
84
84
  /**
85
- * Lists that are this one's peers (4.100): a switch beside the title,
85
+ * Lists that are this one's peers: a switch beside the title,
86
86
  * this list among them. Two or more; fewer draws nothing.
87
87
  */
88
88
  siblings?: readonly ListHeaderSibling[];
@@ -12,21 +12,21 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
12
12
  // are routes, `more` are the app's own actions. The ⋯ button has an
13
13
  // accessible name and is left out when the menu would be empty.
14
14
  //
15
- // `siblings` (4.100) is a switch beside the title between lists that are
15
+ // `siblings` is a switch beside the title between lists that are
16
16
  // one thing seen three ways (Exercises / Targets / Weak spots): links in a
17
17
  // segmented row, the one on marked as the current page. They're the
18
18
  // page's own peers, so they aren't in ⋯, which keeps only what's left
19
19
  // (Show deleted). On a phone the switch takes its own line under the
20
20
  // title and scrolls sideways if it must.
21
21
  //
22
- // `secondaryAction` (4.117) is one more button, beside New and before it,
23
- // for a list's second most common action ("Refresh Now", "Add from
24
- // Catalog"): an outline button, so New stays the primary. On a phone it
25
- // folds into ⋯, the menu's first item, so the row keeps the title, ⋯ and
26
- // New. Its `hint` (4.120) is a short line under the button ("12 searches
27
- // left", ActionHint), and the line under its words in ⋯ on a phone.
22
+ // `secondaryAction` is one more button, beside New and before it, for a
23
+ // list's second most common action ("Refresh Now", "Add from Catalog"): an
24
+ // outline button, so New stays the primary. On a phone it folds into ⋯,
25
+ // the menu's first item, so the row keeps the title, ⋯ and New. Its `hint`
26
+ // is a short line under the button ("12 searches left", ActionHint), and
27
+ // the line under its words in ⋯ on a phone.
28
28
  //
29
- // `description` (4.120) is one short muted line under the title, for a
29
+ // `description` is one short muted line under the title, for a
30
30
  // list that needs a sentence of context ("Searches run against the
31
31
  // catalog once a day."). It wraps in the header's width (under a framed
32
32
  // table's, where DataTable's `pageHeader` shares it), never widening it,
@@ -24,30 +24,26 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
24
24
  // sit: `#` and `##` on a tinted band, `###` a small uppercase label, and
25
25
  // the text under them lined up with the words in the band (prose-look.ts).
26
26
  //
27
- // A table's columns fit their words (a cell wraps at 18rem; a right-
28
- // aligned column, numbers, never wraps), in one of two looks
29
- // (`tableLook`, as on RichTextEditor: styles/index.css "Tables in written
30
- // text"). A cell whose whole text is one highlight is painted in it, and
31
- // a first column of bold cells is row headers (src/lib/markdown-table.ts).
32
- // A column the rich-text editor set a width for keeps it, from the comment
33
- // after the table (src/lib/markdown-table-widths.ts); on a phone columns
34
- // still fit their words, and on paper the widths scale to the page.
35
- // A table wider than the text scrolls sideways, and while it does, its
36
- // box is a tab stop, named for its columns, that the arrow keys scroll
37
- // (prose-table-scroll.ts). Its cells wrap first, so that's only a table
38
- // with many columns, or a long word in one.
27
+ // A table's columns fit their words (a cell wraps at 18rem; a right-aligned
28
+ // column never wraps), in one of two looks (`tableLook`, as on
29
+ // RichTextEditor: styles/index.css "Tables in written text"). A cell whose
30
+ // whole text is one highlight is painted in it, and a first column of bold
31
+ // cells is row headers (src/lib/markdown-table.ts). Column widths the
32
+ // rich-text editor set are read from the comment after the table
33
+ // (src/lib/markdown-table-widths.ts); a phone still fits columns to their
34
+ // words, and on paper the widths scale to the page. A table wider than the
35
+ // text scrolls sideways in a tab stop, named for its columns, that the
36
+ // arrow keys scroll (prose-table-scroll.ts).
39
37
  //
40
- // An image (`![alt](url)`, one the rich-text editor uploaded) stays inside
41
- // the text's width, loads only as it nears the screen, and keeps its alt
42
- // text; with none (`![](url)`) it's decorative to a screen reader. Its
43
- // address goes through the same urlTransform: a web address or a path on
44
- // the site (`/api/files/7/content`), never `javascript:` or `data:`.
38
+ // An image stays inside the text's width, loads as it nears the screen and
39
+ // keeps its alt text; with none (`![](url)`) it's decorative to a screen
40
+ // reader. Its address goes through the same urlTransform: a web address or
41
+ // a path on the site (`/api/files/7/content`), never `javascript:` or
42
+ // `data:`.
45
43
  //
46
- // A quote that starts `[!NOTE]` (GitHub's alert syntax) is a callout: a
47
- // tinted box with its kind's icon (src/lib/markdown-callout.ts).
48
- //
49
- // `==words==` is highlighted words (amber, or `=={green}words==`: yellow,
50
- // green, red): a <mark> on the colour's wash (src/lib/markdown-highlight.ts).
44
+ // A quote that starts `[!NOTE]` (GitHub's alert syntax) is a callout
45
+ // (src/lib/markdown-callout.ts); `==words==` is highlighted words, or
46
+ // `=={green}words==` (src/lib/markdown-highlight.ts).
51
47
  //
52
48
  // With `foldKey`, each toggle heading (`## Safety {toggle="true"}`,
53
49
  // src/lib/markdown-toggle.ts) at the text's top level has a button before
@@ -59,27 +55,24 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
59
55
  // Printed (EntityView's Print notes, PrintingContext), it's the whole
60
56
  // text: nothing folded, no fold buttons, task boxes as glyphs.
61
57
  //
62
- // With `pageLink`, a link the app says is one of its pages (a child page
63
- // of the record, or of a page, to any depth: src/lib/page-link.ts) is a
64
- // page link: the page icon and the page's title, opening the page in this
65
- // tab. Alone in its paragraph, it's a page line, a row of its own. A page
66
- // the app reports removed shows "Page removed", with Restore when the app
67
- // gives one. Every other link is as it was; the text is never changed.
58
+ // With `pageLink`, a link the app says is one of its pages (src/lib/page-link.ts)
59
+ // is a page link: the page icon and the page's title, opening the page in
60
+ // this tab, a row of its own when alone in a paragraph. A page the app
61
+ // reports removed shows "Page removed", with Restore when the app gives
62
+ // one. Every other link is untouched, and so is the text.
68
63
  //
69
64
  // With `inline`, it's a one-line value's Markdown (a table cell, a card's
70
65
  // line): bold, italic, code and links on one run of words, in the font and
71
66
  // colour of wherever it sits, with no block margins, so a row it's in
72
67
  // keeps its height. Blocks written in it become their words, joined so
73
- // they still read (a list's items with " · ", a table's rows as
74
- // `Header: value` pairs: src/lib/markdown-inline.ts). A link's click and
75
- // Enter stay its own: they never reach a row or card it sits in.
68
+ // they still read (src/lib/markdown-inline.ts). A link's click and Enter
69
+ // stay its own: they never reach a row or card it sits in.
76
70
  //
77
- // A task item (`- [ ] to do`, `- [x] done`) shows its box as a glyph
78
- // with its state in words: read-only text has nothing to tick. With
79
- // `onTasksChange`, each box is a real checkbox, named for its item's
80
- // words, that ticks or unticks the item in the text and hands the whole
81
- // new text over to save (src/lib/markdown-tasks.ts): only that item's
82
- // `[ ]` or `[x]` changes, the rest stays exactly as written.
71
+ // A task item (`- [ ] to do`) shows its box as a glyph with its state in
72
+ // words: read-only text has nothing to tick. With `onTasksChange`, each box
73
+ // is a real checkbox, named for its item's words, that ticks or unticks the
74
+ // item and hands the whole new text over to save (src/lib/markdown-tasks.ts):
75
+ // only that item's `[ ]` or `[x]` changes.
83
76
  import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
84
77
  import ReactMarkdown, {} from 'react-markdown';
85
78
  import remarkGfm from 'remark-gfm';