@estiva-app/ui 0.98.1 → 0.100.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 (212) hide show
  1. package/README.md +4 -2
  2. package/dist/AppProvider.d.ts +6 -3
  3. package/dist/AppProvider.d.ts.map +1 -1
  4. package/dist/ArchiveDialog.d.ts +35 -0
  5. package/dist/ArchiveDialog.d.ts.map +1 -0
  6. package/dist/AttachedCard.d.ts +13 -2
  7. package/dist/AttachedCard.d.ts.map +1 -1
  8. package/dist/Card.d.ts +6 -1
  9. package/dist/Card.d.ts.map +1 -1
  10. package/dist/ChipInput.d.ts +3 -1
  11. package/dist/ChipInput.d.ts.map +1 -1
  12. package/dist/CollapsibleSection.d.ts +27 -2
  13. package/dist/CollapsibleSection.d.ts.map +1 -1
  14. package/dist/CommentBox.d.ts +2 -2
  15. package/dist/CommentBox.d.ts.map +1 -1
  16. package/dist/ConfirmDialog.d.ts +15 -2
  17. package/dist/ConfirmDialog.d.ts.map +1 -1
  18. package/dist/ConversationCard.d.ts +12 -1
  19. package/dist/ConversationCard.d.ts.map +1 -1
  20. package/dist/ConversationLayout.d.ts +20 -5
  21. package/dist/ConversationLayout.d.ts.map +1 -1
  22. package/dist/ConversationMenu.d.ts +5 -1
  23. package/dist/ConversationMenu.d.ts.map +1 -1
  24. package/dist/ConversationPlace.d.ts +17 -0
  25. package/dist/ConversationPlace.d.ts.map +1 -0
  26. package/dist/DocumentEditor.d.ts +38 -0
  27. package/dist/DocumentEditor.d.ts.map +1 -1
  28. package/dist/DocumentField.d.ts +50 -0
  29. package/dist/DocumentField.d.ts.map +1 -0
  30. package/dist/EditableText.d.ts +38 -4
  31. package/dist/EditableText.d.ts.map +1 -1
  32. package/dist/EmptyState.d.ts +10 -5
  33. package/dist/EmptyState.d.ts.map +1 -1
  34. package/dist/FormDialog.d.ts +38 -0
  35. package/dist/FormDialog.d.ts.map +1 -0
  36. package/dist/InlineText.d.ts.map +1 -1
  37. package/dist/Menu.d.ts +11 -3
  38. package/dist/Menu.d.ts.map +1 -1
  39. package/dist/MoveDialog.d.ts +64 -0
  40. package/dist/MoveDialog.d.ts.map +1 -0
  41. package/dist/NavItem.d.ts +9 -2
  42. package/dist/NavItem.d.ts.map +1 -1
  43. package/dist/NavTree.d.ts +16 -3
  44. package/dist/NavTree.d.ts.map +1 -1
  45. package/dist/PinnedComment.d.ts +3 -1
  46. package/dist/PinnedComment.d.ts.map +1 -1
  47. package/dist/ReactionHorizon.d.ts +3 -1
  48. package/dist/ReactionHorizon.d.ts.map +1 -1
  49. package/dist/RepliesRow.d.ts +5 -3
  50. package/dist/RepliesRow.d.ts.map +1 -1
  51. package/dist/ResolveDialog.d.ts +3 -1
  52. package/dist/ResolveDialog.d.ts.map +1 -1
  53. package/dist/SelectionToolbar.d.ts +2 -2
  54. package/dist/Thread.d.ts +6 -3
  55. package/dist/Thread.d.ts.map +1 -1
  56. package/dist/commentBoxFrame.d.ts.map +1 -1
  57. package/dist/conversation.examples.d.ts +4 -1
  58. package/dist/conversation.examples.d.ts.map +1 -1
  59. package/dist/conversationScroll.d.ts +80 -0
  60. package/dist/conversationScroll.d.ts.map +1 -0
  61. package/dist/editor.d.ts +1 -0
  62. package/dist/editor.d.ts.map +1 -1
  63. package/dist/editor.js +228 -69
  64. package/dist/editor.js.map +4 -4
  65. package/dist/eslint/index.js +2 -2
  66. package/dist/eslint/index.js.map +2 -2
  67. package/dist/eslint/no-field-outside-a-form.d.ts +2 -2
  68. package/dist/eslint/no-field-outside-a-form.d.ts.map +1 -1
  69. package/dist/eslint/no-native-title.d.ts +1 -1
  70. package/dist/eslint/no-native-title.d.ts.map +1 -1
  71. package/dist/formBusy.d.ts +5 -2
  72. package/dist/formBusy.d.ts.map +1 -1
  73. package/dist/index.d.ts +14 -6
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +2242 -1471
  76. package/dist/index.js.map +4 -4
  77. package/dist/looks.d.ts +8 -0
  78. package/dist/looks.d.ts.map +1 -1
  79. package/dist/seenOnScreen.d.ts +27 -0
  80. package/dist/seenOnScreen.d.ts.map +1 -0
  81. package/dist/showInConversation.d.ts +31 -0
  82. package/dist/showInConversation.d.ts.map +1 -0
  83. package/dist/threadCard.d.ts +13 -0
  84. package/dist/threadCard.d.ts.map +1 -1
  85. package/package.json +1 -1
  86. package/registry.json +953 -126
  87. package/src/AppProvider.mdx +4 -0
  88. package/src/AppProvider.test.tsx +34 -2
  89. package/src/AppProvider.tsx +17 -6
  90. package/src/ArchiveDialog.mdx +70 -0
  91. package/src/ArchiveDialog.stories.tsx +64 -0
  92. package/src/ArchiveDialog.test.tsx +90 -0
  93. package/src/ArchiveDialog.tsx +70 -0
  94. package/src/AttachedCard.mdx +6 -0
  95. package/src/AttachedCard.stories.tsx +9 -1
  96. package/src/AttachedCard.test.tsx +111 -2
  97. package/src/AttachedCard.tsx +77 -7
  98. package/src/Card.mdx +20 -1
  99. package/src/Card.stories.tsx +20 -0
  100. package/src/Card.test.tsx +87 -1
  101. package/src/Card.tsx +51 -3
  102. package/src/ChipInput.mdx +7 -1
  103. package/src/ChipInput.stories.tsx +9 -0
  104. package/src/ChipInput.test.tsx +42 -0
  105. package/src/ChipInput.tsx +7 -3
  106. package/src/CollapsibleSection.mdx +20 -1
  107. package/src/CollapsibleSection.stories.tsx +19 -1
  108. package/src/CollapsibleSection.test.tsx +85 -2
  109. package/src/CollapsibleSection.tsx +54 -15
  110. package/src/CommentBox.mdx +2 -1
  111. package/src/CommentBox.test.tsx +81 -1
  112. package/src/CommentBox.tsx +32 -11
  113. package/src/ConfirmDialog.mdx +25 -3
  114. package/src/ConfirmDialog.stories.tsx +27 -0
  115. package/src/ConfirmDialog.test.tsx +87 -1
  116. package/src/ConfirmDialog.tsx +39 -8
  117. package/src/ConversationCard.mdx +7 -0
  118. package/src/ConversationCard.states.test.tsx +67 -0
  119. package/src/ConversationCard.stories.tsx +27 -1
  120. package/src/ConversationCard.test.tsx +76 -0
  121. package/src/ConversationCard.tsx +65 -53
  122. package/src/ConversationLayout.mdx +34 -4
  123. package/src/ConversationLayout.scroll.test.tsx +411 -0
  124. package/src/ConversationLayout.stories.tsx +107 -1
  125. package/src/ConversationLayout.test.tsx +133 -0
  126. package/src/ConversationLayout.tsx +141 -16
  127. package/src/ConversationMenu.mdx +3 -0
  128. package/src/ConversationMenu.stories.tsx +12 -0
  129. package/src/ConversationMenu.test.tsx +17 -0
  130. package/src/ConversationMenu.tsx +7 -3
  131. package/src/ConversationPlace.mdx +53 -0
  132. package/src/ConversationPlace.stories.tsx +48 -0
  133. package/src/ConversationPlace.test.tsx +51 -0
  134. package/src/ConversationPlace.tsx +30 -0
  135. package/src/DocumentEditor.mdx +2 -1
  136. package/src/DocumentEditor.tsx +118 -64
  137. package/src/DocumentField.mdx +83 -0
  138. package/src/DocumentField.stories.tsx +110 -0
  139. package/src/DocumentField.test.tsx +281 -0
  140. package/src/DocumentField.tsx +199 -0
  141. package/src/EditableText.buttons.test.tsx +318 -0
  142. package/src/EditableText.mdx +50 -2
  143. package/src/EditableText.stories.tsx +96 -2
  144. package/src/EditableText.tsx +189 -5
  145. package/src/EmptyState.mdx +33 -8
  146. package/src/EmptyState.stories.tsx +26 -1
  147. package/src/EmptyState.test.tsx +63 -2
  148. package/src/EmptyState.tsx +28 -6
  149. package/src/Form.mdx +3 -1
  150. package/src/FormDialog.mdx +78 -0
  151. package/src/FormDialog.stories.tsx +90 -0
  152. package/src/FormDialog.test.tsx +183 -0
  153. package/src/FormDialog.tsx +93 -0
  154. package/src/InlineText.mdx +1 -0
  155. package/src/InlineText.tsx +2 -1
  156. package/src/Menu.test.tsx +80 -0
  157. package/src/Menu.tsx +35 -14
  158. package/src/MenuItem.mdx +12 -0
  159. package/src/MenuItem.stories.tsx +39 -1
  160. package/src/MoveDialog.mdx +85 -0
  161. package/src/MoveDialog.stories.tsx +134 -0
  162. package/src/MoveDialog.test.tsx +239 -0
  163. package/src/MoveDialog.tsx +186 -0
  164. package/src/NavItem.mdx +15 -0
  165. package/src/NavItem.stories.tsx +15 -0
  166. package/src/NavItem.test.tsx +64 -1
  167. package/src/NavItem.tsx +10 -2
  168. package/src/NavTree.mdx +26 -4
  169. package/src/NavTree.stories.tsx +59 -0
  170. package/src/NavTree.test.tsx +232 -2
  171. package/src/NavTree.tsx +93 -43
  172. package/src/PinnedComment.mdx +6 -1
  173. package/src/PinnedComment.stories.tsx +11 -1
  174. package/src/PinnedComment.tsx +15 -2
  175. package/src/ReactionHorizon.mdx +2 -0
  176. package/src/ReactionHorizon.stories.tsx +3 -0
  177. package/src/ReactionHorizon.test.tsx +32 -0
  178. package/src/ReactionHorizon.tsx +28 -11
  179. package/src/RepliesRow.mdx +6 -3
  180. package/src/RepliesRow.stories.tsx +3 -0
  181. package/src/RepliesRow.test.tsx +24 -0
  182. package/src/RepliesRow.tsx +12 -6
  183. package/src/ReplyCard.mdx +8 -0
  184. package/src/ReplyCard.stories.tsx +45 -1
  185. package/src/ResolveDialog.mdx +2 -0
  186. package/src/ResolveDialog.test.tsx +21 -0
  187. package/src/ResolveDialog.tsx +11 -39
  188. package/src/SelectionToolbar.tsx +2 -2
  189. package/src/Textarea.mdx +1 -0
  190. package/src/Thread.mdx +20 -1
  191. package/src/Thread.stories.tsx +94 -3
  192. package/src/Thread.test.tsx +11 -0
  193. package/src/Thread.tsx +56 -12
  194. package/src/commentBoxFrame.tsx +2 -2
  195. package/src/conversation.examples.tsx +10 -2
  196. package/src/conversationScroll.ts +155 -0
  197. package/src/editor.ts +1 -0
  198. package/src/editorSelection.test.tsx +53 -0
  199. package/src/eslint/no-field-outside-a-form.test.ts +4 -0
  200. package/src/eslint/no-field-outside-a-form.ts +2 -2
  201. package/src/eslint/no-native-title.ts +1 -1
  202. package/src/formBusy.ts +5 -2
  203. package/src/index.ts +16 -6
  204. package/src/looks.ts +10 -0
  205. package/src/registry/registry.test.ts +12 -6
  206. package/src/seenOnScreen.test.tsx +241 -0
  207. package/src/seenOnScreen.ts +146 -0
  208. package/src/showInConversation.test.tsx +168 -0
  209. package/src/showInConversation.ts +93 -0
  210. package/src/threadCard.ts +16 -0
  211. package/stories/Choosing.mdx +8 -3
  212. package/tailwind-preset.js +7 -0
@@ -0,0 +1,50 @@
1
+ import { type ComponentType, type ReactNode } from 'react';
2
+ import type { AnyExtension } from '@tiptap/core';
3
+ import { type JSONContent } from '@tiptap/react';
4
+ import type { AttachmentViewProps, ReferenceViewProps } from './BlockNodes';
5
+ import { type DocumentCodec, type DocumentMentions, type DocumentReferences } from './DocumentEditor';
6
+ import type { LinkChipsOptions } from './LinkChips';
7
+ export interface DocumentFieldProps {
8
+ /** What the field holds, in `format`; `''` when nothing is written. A value that is not its own edit coming back is loaded into it. */
9
+ value: string;
10
+ /** The format `value` is in, handed to `codec.read`. */
11
+ format: string;
12
+ /** How the app's text and the editor's document turn into each other: `DocumentEditor`'s. */
13
+ codec: DocumentCodec;
14
+ /** Every edit, as it is typed: the text and its format, or `''` once it is emptied or holds only spaces and blank lines. Nothing is saved: the form around it sends. */
15
+ onChange: (value: string, contentFormat: string | undefined) => void;
16
+ /** The editor's accessible name: the label of the `Field` around it. */
17
+ label: string;
18
+ /** Muted words in the empty field. */
19
+ placeholder?: ReactNode;
20
+ /** `[` and `/` → File. */
21
+ references?: DocumentReferences;
22
+ /** `@` and `/` → Mention. */
23
+ mentions?: DocumentMentions;
24
+ /** A pasted app URL drawn as the chip of what it names (`LinkChips`). */
25
+ linkChips?: LinkChipsOptions;
26
+ /** Plain text pasted as the blocks it spells: the app's reader of markdown, as the editor's document. */
27
+ readMarkdown?: (text: string) => JSONContent | undefined;
28
+ /** Draws a link: the app's own, which resolves what it names. */
29
+ referenceView?: ComponentType<ReferenceViewProps>;
30
+ /** Draws a placed file: the app's own card. */
31
+ attachmentView?: ComponentType<AttachmentViewProps>;
32
+ /** More of the app's own extensions. */
33
+ extensions?: readonly AnyExtension[];
34
+ /** Set by a required `Field` around it, for a screen reader. */
35
+ 'aria-required'?: boolean | 'true' | 'false';
36
+ }
37
+ /**
38
+ * A form's field that holds a document: a description written in the form that files it. The document editor's
39
+ * grammar (`DocumentEditor`'s blocks, marks, `[`, `@` and `/`) in a field's box, as a Textarea's beside it. It is the
40
+ * form's: every edit goes back as it is typed, nothing is saved on leaving, Ctrl/Cmd+Enter sends the form, and while
41
+ * the form sends nothing can be written in it.
42
+ *
43
+ * **Told apart by everything it has handed back, not only the last** (Peek's `ProseField`, RIC-13). Keys pressed faster
44
+ * than React renders reach the editor before the value from the previous one comes back. Compared with the last edit
45
+ * alone, that older value looked like one from outside and was loaded over the newer text. A value this field wrote is
46
+ * never an outside value, however late it arrives; each is dropped once the value has shown it, so the queue holds only
47
+ * the edits still in flight. A queue, not a set: `a`, `ab`, `a` (a key and its Backspace) repeats a value.
48
+ */
49
+ export declare function DocumentField({ value, format, codec, onChange, label, placeholder, references, mentions, linkChips, readMarkdown, referenceView, attachmentView, extensions, 'aria-required': required, }: DocumentFieldProps): import("react").JSX.Element;
50
+ //# sourceMappingURL=DocumentField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentField.d.ts","sourceRoot":"","sources":["../src/DocumentField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgD,KAAK,aAAa,EAAmB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACzH,OAAO,KAAK,EAAE,YAAY,EAAU,MAAM,cAAc,CAAA;AACxD,OAAO,EAA4C,KAAK,WAAW,EAAE,MAAM,eAAe,CAAA;AAC1F,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAE3E,OAAO,EAAsB,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAEzH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAOnD,MAAM,WAAW,kBAAkB;IACjC,uIAAuI;IACvI,KAAK,EAAE,MAAM,CAAA;IACb,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAA;IACd,6FAA6F;IAC7F,KAAK,EAAE,aAAa,CAAA;IACpB,wKAAwK;IACxK,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAA;IACpE,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAA;IACb,sCAAsC;IACtC,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,0BAA0B;IAC1B,UAAU,CAAC,EAAE,kBAAkB,CAAA;IAC/B,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAC3B,yEAAyE;IACzE,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,yGAAyG;IACzG,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,WAAW,GAAG,SAAS,CAAA;IACxD,iEAAiE;IACjE,aAAa,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAA;IACjD,+CAA+C;IAC/C,cAAc,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IACnD,wCAAwC;IACxC,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;IACpC,gEAAgE;IAChE,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;CAC7C;AAeD;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,MAAM,EACN,KAAK,EACL,QAAQ,EACR,KAAK,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,aAAa,EACb,cAAc,EACd,UAAiB,EACjB,eAAe,EAAE,QAAQ,GAC1B,EAAE,kBAAkB,+BAiHpB"}
@@ -1,4 +1,12 @@
1
1
  import { type ReactNode } from 'react';
2
+ import { type FieldLineTone } from './Field';
3
+ /** What happened to a save, to say under it: `error` keeps the field open, `warning` saved. Said in a `FieldLine` of that tone. */
4
+ export interface EditableTextOutcome {
5
+ kind: Exclude<FieldLineTone, 'helper'>;
6
+ message: string;
7
+ }
8
+ /** A commit's answer: `true` saved, `false` refused (you have said why), or an outcome to say under it. */
9
+ export type EditableTextAnswer = boolean | EditableTextOutcome;
2
10
  /**
3
11
  * Text you click to edit — Ship's EditableText (2026-09-01), verbatim. Its
4
12
  * own comment always called it a package candidate: nothing here knows what
@@ -18,11 +26,16 @@ import { type ReactNode } from 'react';
18
26
  */
19
27
  export interface EditableTextProps {
20
28
  value: string;
29
+ /** What shows, muted, while the value is empty; in `buttons`, as the kit's empty line for one part of a page (12px). */
21
30
  placeholder: string;
22
- /** Resolve `true` when saved; `false` (or throw) keeps the field open with the text. */
23
- onCommit: (value: string) => Promise<boolean> | boolean;
31
+ /**
32
+ * Resolve `true` when saved; `false` (or throw) keeps the field open with
33
+ * the text. Or an outcome: `error` keeps it open, `warning` saved; `buttons`
34
+ * says either under it, and a throw's own words as an `error`.
35
+ */
36
+ onCommit: (value: string) => Promise<EditableTextAnswer> | EditableTextAnswer;
24
37
  multiline?: boolean;
25
- /** Applied to both the text and the field, so they are the same size. */
38
+ /** Applied to both the text and the field, so they are the same size. In `buttons`, placement only: it goes on the whole. */
26
39
  className?: string;
27
40
  /** The accessible name of the field — "Title", "Description". */
28
41
  label: string;
@@ -57,6 +70,27 @@ export interface EditableTextProps {
57
70
  displayNode?: ReactNode;
58
71
  /** Show the value only — no edit affordance. For a reader who cannot write. */
59
72
  readOnly?: boolean;
73
+ /**
74
+ * How it is edited. `inline`, the default: the text is the button, and
75
+ * leaving the field saves. `buttons`: the text with a button beside it, a
76
+ * field with Save and Cancel, and what happened said under it — an edit to
77
+ * confirm, in a dialog (Peek's Details, 2 November).
78
+ */
79
+ manner?: 'inline' | 'buttons';
80
+ /** `buttons`: the words on the button that opens the field — "Rename". "Edit" when absent. */
81
+ editLabel?: string;
82
+ /** `buttons`: its words while the value is empty, with a plus — "Add a summary". `editLabel` when absent. */
83
+ addLabel?: string;
84
+ /** `buttons`: the field's own placeholder, while it is edited. */
85
+ fieldPlaceholder?: string;
86
+ /** `buttons`: an empty value cannot be saved, as a name cannot. */
87
+ required?: boolean;
88
+ /** `buttons`: what a draft becomes before it is compared and saved — one line, say. Trimmed when absent. */
89
+ clean?: (draft: string) => string;
90
+ /** `buttons`: said between the field and its buttons as it is typed — a count past a limit. */
91
+ draftNote?: (draft: string) => ReactNode;
92
+ /** `buttons`: opens as the field, holding the value — a menu's Rename. */
93
+ defaultEditing?: boolean;
60
94
  }
61
- export declare function EditableText({ value, display, displayNode, placeholder, onCommit, multiline, className, label, readOnly }: EditableTextProps): import("react").JSX.Element;
95
+ export declare function EditableText(props: EditableTextProps): import("react").JSX.Element;
62
96
  //# sourceMappingURL=EditableText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditableText.d.ts","sourceRoot":"","sources":["../src/EditableText.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmD,KAAK,SAAS,EAAkB,MAAM,OAAO,CAAA;AAKvG;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,wFAAwF;IACxF,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAA;IACvD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAA;IACb;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EA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C,EAAE,MAAM,CAAA;IACzB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,4GAA4G;IAC5G,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACjC,+FAA+F;IAC/F,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,SAAS,CAAA;IACxC,0EAA0E;IAC1E,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,+BAEpD"}
@@ -2,7 +2,7 @@ import type { ReactNode } from 'react';
2
2
  import { type ButtonAction } from './Button';
3
3
  /**
4
4
  * The place where content will be once there is some, in two manners
5
- * (Katerina, 2026-09-09):
5
+ * (Katerina, 2026-09-09), and the second in a row's inset:
6
6
  *
7
7
  * - `page` — the whole page is empty: a 16px icon over a centred line of
8
8
  * secondary text, **in the middle of its box both ways** (Katerina,
@@ -16,6 +16,10 @@ import { type ButtonAction } from './Button';
16
16
  * It is the quiet line — caption size in the muted colour, as a Field's
17
17
  * helper line is — so beside rows it reads as "nothing here", not as one
18
18
  * more row (Katerina, 2026-09-15: "not that intense", "smaller font").
19
+ * - `rows` — a list of rows that pad themselves (a sidebar's `NavItem`s) is
20
+ * empty, or could not be read: the `section` line in their place, in a
21
+ * row's inset, 8px in and 4px over and under, so it starts where a row does
22
+ * (Katerina, 2026-09-14). `NavTree`'s own line; the apps wrote its box.
19
23
  *
20
24
  * The message is the caller's — a shared component has no words of its own
21
25
  * for what is missing.
@@ -24,12 +28,13 @@ export interface EmptyStateProps {
24
28
  /** 16px, stroke 1.5. A speech bubble when absent. Drawn for a `page` only. */
25
29
  icon?: ReactNode;
26
30
  message: string;
27
- /** `page` when the whole page is empty; `section` when one part of it is. */
28
- scope?: 'page' | 'section';
31
+ /** `page` when the whole page is empty; `section` when one part of it is; `rows` in place of rows that pad themselves, a sidebar's. */
32
+ scope?: 'page' | 'section' | 'rows';
29
33
  /**
30
34
  * The one thing to do about it — "New topic", "Try again" — drawn 16px under
31
- * the line as the package's Button, outlined (Katerina, 2026-09-18). A `page`
32
- * only: a section's empty line is one line among others, not a stage.
35
+ * the line as the package's Button, outlined (Katerina, 2026-09-18). A
36
+ * `section` carries it at the end of its line, muted: a failure read as the
37
+ * empty line beside it does, with its Try again (Katerina, 2 November).
33
38
  */
34
39
  action?: ButtonAction;
35
40
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../src/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,UAAU,CAAA;AAGpD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAc,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,eAAe,+BAgB/F"}
1
+ {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../src/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,UAAU,CAAA;AAGpD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,uIAAuI;IACvI,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAA;IACnC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAc,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,eAAe,+BAiC/F"}
@@ -0,0 +1,38 @@
1
+ import { type ReactNode } from 'react';
2
+ /**
3
+ * A dialog that sends a form: `DialogShell` holding a `Form`, with Cancel and
4
+ * the button that sends it in the footer — what Peek's Archive, New folder,
5
+ * Move and Start a topic each wired by hand, and `ResolveDialog` too (C10,
6
+ * 2 November). The look is theirs, unchanged.
7
+ *
8
+ * It owns the send: the button says its busy words while it waits, the fields
9
+ * and both buttons are off until the answer comes, and a send that went
10
+ * through closes it. An answer of `false` keeps it open, because the caller
11
+ * has said why; so does a throw.
12
+ *
13
+ * **Cancel waits too** (decided once for all, 2 November; only Peek's Archive
14
+ * did it before): nothing can stop a send already under way, so a Cancel
15
+ * pressed then would close over a write still running, and its answer, a
16
+ * refusal included, would have nowhere to land. `ConfirmDialog` waits the same
17
+ * way. Escape and the ✕ still close it, as they do there.
18
+ */
19
+ export interface FormDialogProps {
20
+ /** The dialog's heading. */
21
+ title: string;
22
+ /** The words on the button that sends the form: "Move", "Create". */
23
+ submitLabel: string;
24
+ /** Its words while the form sends — "Moving…". Absent, they stay as they are. */
25
+ busyLabel?: string;
26
+ /** How the sending button looks: `primary`, or `resolve` for a Resolve. */
27
+ submitVariant?: 'primary' | 'resolve';
28
+ /** Whether there is enough to send. While it is not, the button is greyed and Enter sends nothing. */
29
+ ready?: boolean;
30
+ /** Sends the form. Answer `false` to keep the dialog open (you have said why); anything else closes it. */
31
+ onSubmit: () => Promise<boolean | void> | boolean | void;
32
+ /** Cancel, Escape, the ✕, a press outside, and a send that went through: once, when it was closed while it sent. */
33
+ onClose: () => void;
34
+ /** What the form holds: the words before the fields, then the fields. The form puts 24px between them. */
35
+ children: ReactNode;
36
+ }
37
+ export declare function FormDialog({ title, submitLabel, busyLabel, submitVariant, ready, onSubmit, onClose, children }: FormDialogProps): import("react").JSX.Element;
38
+ //# sourceMappingURL=FormDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormDialog.d.ts","sourceRoot":"","sources":["../src/FormDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAK/D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,qEAAqE;IACrE,WAAW,EAAE,MAAM,CAAA;IACnB,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,2EAA2E;IAC3E,aAAa,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACrC,sGAAsG;IACtG,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,2GAA2G;IAC3G,QAAQ,EAAE,MAAM,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,OAAO,GAAG,IAAI,CAAA;IACxD,oHAAoH;IACpH,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,0GAA0G;IAC1G,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,aAAyB,EAAE,KAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,+BAmDlJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"InlineText.d.ts","sourceRoot":"","sources":["../src/InlineText.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAA;AAM/F;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,eAAe;IAC9B,oGAAoG;IACpG,KAAK,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,EAAE,MAAM,CAAA;IACb,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAA;IACnB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb,4EAA4E;IAC5E,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAA;IACvD,sGAAsG;IACtG,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACtC,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;IACzC,oGAAoG;IACpG,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAC5B;AAED,KAAK,OAAO,GAAG,OAAO,GAAG,KAAK,CAAA;AAE9B,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CAC9B;AAqCD,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAiB,EAAE,SAAiB,EAAE,QAAgB,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,eAAe,+BA6G3K"}
package/dist/Menu.d.ts CHANGED
@@ -146,6 +146,11 @@ export interface MenuItemProps extends Omit<ComponentPropsWithRef<'button'>, 'ch
146
146
  destructive?: boolean;
147
147
  /** The row the menu currently points at (a submenu's chosen value). */
148
148
  selected?: boolean;
149
+ /**
150
+ * Why it cannot be chosen right now: the row is shown, shut, in the disabled colour, with no fill, and says why under
151
+ * the pointer and when the arrow keys reach it, as `Button`'s does. A press runs nothing and the menu stays open.
152
+ */
153
+ disabledReason?: string;
149
154
  }
150
155
  /**
151
156
  * The row's class list, written once because `MenuSub`'s trigger row is the
@@ -159,16 +164,19 @@ export interface MenuItemProps extends Omit<ComponentPropsWithRef<'button'>, 'ch
159
164
  * `Select` puts it on Base UI's `Select.Item`, whose parts (`ItemText`,
160
165
  * `ItemIndicator`) have to stay the element's own. One row, two parts. Not
161
166
  * exported from the package's index. */
162
- export declare function menuItemClassName({ size, selected, className }: {
167
+ export declare function menuItemClassName({ size, selected, shut, className }: {
163
168
  size: 'default' | 'tall';
164
169
  selected?: boolean;
170
+ shut?: boolean;
165
171
  className?: string;
166
172
  }): string;
167
173
  /** Everything inside the row — written once, for the same reason. Shared
168
174
  * inside the package like `menuItemClassName`: `CommandPalette` draws it
169
175
  * inside Base UI's `Autocomplete.Item`. Not exported from the index. */
170
- export declare function MenuItemBody({ label, children, size, description, aside, leading, trailing, hint, shortcut, submenu, destructive, selected }: Pick<MenuItemProps, 'label' | 'children' | 'size' | 'description' | 'aside' | 'leading' | 'trailing' | 'hint' | 'shortcut' | 'submenu' | 'destructive' | 'selected'>): import("react").JSX.Element;
171
- export declare function MenuItem({ label, children, size, description, aside, leading, trailing, hint, shortcut, submenu, destructive, selected, className, ...props }: MenuItemProps): import("react").JSX.Element;
176
+ export declare function MenuItemBody({ label, children, size, description, aside, leading, trailing, hint, shortcut, submenu, destructive, selected, shut }: Pick<MenuItemProps, 'label' | 'children' | 'size' | 'description' | 'aside' | 'leading' | 'trailing' | 'hint' | 'shortcut' | 'submenu' | 'destructive' | 'selected'> & {
177
+ shut?: boolean;
178
+ }): import("react").JSX.Element;
179
+ export declare function MenuItem({ label, children, size, description, aside, leading, trailing, hint, shortcut, submenu, destructive, selected, disabledReason, className, ...props }: MenuItemProps): import("react").JSX.Element;
172
180
  /**
173
181
  * The keyboard hint a picker row shows while highlighted — hand-rolled in
174
182
  * five files before this (2026-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AAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,uFAAuF;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAqB7M;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,gCAE5B;AAED,uEAAuE;AACvE,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAE3F"}
@@ -0,0 +1,64 @@
1
+ /** A Folder a file may be moved to. */
2
+ export interface MoveFolder {
3
+ id: string;
4
+ name: string;
5
+ }
6
+ /** One place a file may be put under, in the Folder the dialog is showing. */
7
+ export interface MovePlace {
8
+ /** What it goes under: that file's address; `''` for the top of the Folder (or, for a file whose parent is one kind, none). */
9
+ id: string;
10
+ /** Its breadcrumb, outermost first, ending in its own title; empty for the top. */
11
+ path: readonly string[];
12
+ }
13
+ /** Where the person put it: the Folder, and, for a file that nests, what it goes under (`''` for the top). */
14
+ export interface MoveChoice {
15
+ folder: string;
16
+ parent?: string;
17
+ }
18
+ /**
19
+ * Move a file: to another Folder, under another file there, or both (FOL-45)
20
+ * — Peek's MoveDialog, moved into the kit (C11, 2 November), which Leaf's
21
+ * and Ship's moves copied. The Folder first, then what it goes under there:
22
+ * two `Select`s, the second read from the first when it is picked, never for
23
+ * every Folder up front. Nothing is chosen for the person but the top, and
24
+ * only when asked (`startAtTop`): a preselected destination is a move nobody
25
+ * chose.
26
+ *
27
+ * A file that nests under nothing (no `placesIn`) is asked only for the
28
+ * Folder, and the one it is in is not offered. One that is not in exactly one
29
+ * Folder passes `from` empty, and no Folder is held back: listed in none, or
30
+ * in two after a move that half-worked, where moving into either takes it out
31
+ * of the other and Move again is the retry (Ship's rule). A Folder that could
32
+ * not be read says so as the section's empty line does, with its Try again (B8).
33
+ */
34
+ export interface MoveDialogProps {
35
+ /** The file's name, said above the choice. */
36
+ title: string;
37
+ /** The sentence under the name, in the app's words: "Everyone who can read it now still can." */
38
+ description: string;
39
+ /** The Folder it is in now, not offered to a file that nests under nothing. `''` when it is not in exactly one: then no Folder is held back. */
40
+ from: string;
41
+ /** The Folders it may go to. Undefined while they are still read: the list says "Reading…". */
42
+ folders: readonly MoveFolder[] | undefined;
43
+ /** Where it may go in `from`, already read. Absent with `placesIn`, the Folder it opens on is read at once. */
44
+ places?: readonly MovePlace[];
45
+ /** Where it may go in another Folder, read when that Folder is picked; a rejection is said beside a Try again. Absent: it nests under nothing. */
46
+ placesIn?: (folder: string) => Promise<readonly MovePlace[]>;
47
+ /** Choose the top for the person when a Folder offers it: where a file that may sit at any Folder's top lands. Off: Move waits for a pick. */
48
+ startAtTop?: boolean;
49
+ /** What the place with an empty `id` says. "The top of" the Folder when absent; "None — under none of these" for a file whose parent is one kind. */
50
+ topLabel?: string;
51
+ /** The Folder it opens on, when that is not the one it is in. */
52
+ startIn?: string;
53
+ /** The dialog's heading. "Move" when absent. */
54
+ heading?: string;
55
+ /** The Folder field's label. "Folder" when absent. */
56
+ folderLabel?: string;
57
+ /** Said when no Folder is offered. "There is no other folder it can be moved to." when absent. */
58
+ noFolder?: string;
59
+ /** Answer `false` to keep the dialog open (you have said why); anything else closes it. */
60
+ onMove: (choice: MoveChoice) => Promise<boolean | void> | boolean | void;
61
+ onClose: () => void;
62
+ }
63
+ export declare function MoveDialog({ title, description, from, folders, places, placesIn, startAtTop, topLabel, startIn, heading, folderLabel, noFolder, onMove, onClose, }: MoveDialogProps): import("react").JSX.Element;
64
+ //# sourceMappingURL=MoveDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MoveDialog.d.ts","sourceRoot":"","sources":["../src/MoveDialog.tsx"],"names":[],"mappings":"AAQA,uCAAuC;AACvC,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CA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EACX,IAAI,EACJ,OAAO,EACP,MAAM,EACN,QAAQ,EACR,UAAkB,EAClB,QAAQ,EACR,OAAO,EACP,OAAgB,EAChB,WAAsB,EACtB,QAAyD,EACzD,MAAM,EACN,OAAO,GACR,EAAE,eAAe,+BAgGjB"}
package/dist/NavItem.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
1
+ import { type ComponentPropsWithoutRef, type MouseEvent, type ReactNode } from 'react';
2
2
  import type { SectionAction } from './SectionHeader';
3
3
  /**
4
4
  * One row of a sidebar: a label, an optional count, an active state
@@ -83,7 +83,14 @@ export interface NavItemProps extends Omit<ComponentPropsWithoutRef<'a'>, 'href'
83
83
  * hand, it stays closed until another opens. `NavTree` passes it.
84
84
  */
85
85
  openFor?: string;
86
+ /**
87
+ * A plain click on the row — the main button, no Ctrl, Cmd, Shift or Alt, to
88
+ * this app's own address: the app opens it its own way, with what it knows,
89
+ * in place of following the link (the row prevents it, and `navigate` is not
90
+ * called). Any other click is still the link's: a new tab. After `onClick`.
91
+ */
92
+ onPlainClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
86
93
  className?: string;
87
94
  }
88
- export declare function NavItem({ label, href, count, countLabel, active, icon, menu, menuLabel, action, hint, tooltip, unread, urgent, children, defaultOpen, open: openProp, onOpenChange, openFor, className, onClick, ...props }: NavItemProps): import("react").JSX.Element;
95
+ export declare function NavItem({ label, href, count, countLabel, active, icon, menu, menuLabel, action, hint, tooltip, unread, urgent, children, defaultOpen, open: openProp, onOpenChange, openFor, onPlainClick, className, onClick, ...props }: NavItemProps): import("react").JSX.Element;
89
96
  //# sourceMappingURL=NavItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavItem.d.ts","sourceRoot":"","sources":["../src/NavItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAUtF,OAAO,KAAK,EAAE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AA;IAChB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,6HAA6H;IAC7H,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,mDAAmD;IACnD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kDAAkD;IAClD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,UAAU,EACV,MAAc,EACd,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,MAAM,EACN,IAAI,EACJ,OAAO,EACP,MAAc,EACd,MAAc,EACd,QAAQ,EACR,WAAkB,EAClB,IAAI,EAAE,QAAQ,EACd,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,YAAY,+BAiLd"}
package/dist/NavTree.d.ts CHANGED
@@ -90,6 +90,16 @@ export interface NavTreeProps {
90
90
  * read, and marks nothing for it.
91
91
  */
92
92
  selectedParent?: string;
93
+ /**
94
+ * The group a link led to — a folder's own link: each time it names a new
95
+ * group, the group opens, as `selected` opens a row's — closed by hand too,
96
+ * once — and is remembered open as a click would be, open already or not,
97
+ * so it stays open when the reader goes on to a row in another group; and
98
+ * the column scrolls to it at once. It marks nothing. A group the app draws
99
+ * itself is found by its `id`, and opened the same way: told through
100
+ * `onOpenChange` when the app holds it.
101
+ */
102
+ selectedGroup?: string;
93
103
  /** A row was clicked. A router app prevents the default and navigates. */
94
104
  onSelect?: (node: NavTreeNode, event: MouseEvent<HTMLAnchorElement>) => void;
95
105
  /** What to say when `groups` is empty. The words are the caller's; absent, nothing is said. */
@@ -101,9 +111,11 @@ export interface NavTreeProps {
101
111
  export declare const NAV_TREE_INTENT_MS = 150;
102
112
  /** How long the column waits to scroll to the current row: the rows above it slide open in 150ms. */
103
113
  export declare const NAV_TREE_REVEAL_MS = 200;
114
+ /** How long a `pending` group waits shut for its rows before it opens on the skeleton (Peek's Folders, OPT-11: a cold read is ~0.9s). */
115
+ export declare const NAV_TREE_PENDING_MS = 2000;
104
116
  export interface NavTreeSectionProps {
105
117
  title: string;
106
- /** Marks the group's box as `data-nav-group`, for tests and photo runs to find it. */
118
+ /** Marks the group's box as `data-nav-group`: the tree finds it by it for `selectedGroup` (opens it, remembers it open, scrolls to it), and tests and photo runs do. */
107
119
  id?: string;
108
120
  /** Said in the rows' place, level with them. The caller's words. */
109
121
  message?: string;
@@ -127,7 +139,8 @@ export interface NavTreeSectionProps {
127
139
  /**
128
140
  * Opened, and its rows are being read: the arrow turns and the group stays
129
141
  * shut until they are in, then opens once — `CollapsibleSection`'s. For a
130
- * read that is usually quick; a slow one is `loading`'s skeleton.
142
+ * read that is usually quick: one still out after `NAV_TREE_PENDING_MS`
143
+ * (2s) opens the group on `loading`'s skeleton after all, until they are in.
131
144
  */
132
145
  pending?: boolean;
133
146
  /** Remember it open or closed in this browser, under this key. */
@@ -161,5 +174,5 @@ export declare function NavTreeSection({ id, title, message, loading, pending, t
161
174
  * and the column scrolls to it. Groups the app draws itself take `openFor`
162
175
  * for that; the scroll is the tree's either way.
163
176
  */
164
- export declare function NavTree({ title, titleActions, groups, children, selected, selectedParent, onSelect, emptyMessage, storageKey }: NavTreeProps): import("react").JSX.Element;
177
+ export declare function NavTree({ title, titleActions, groups, children, selected, selectedParent, selectedGroup, onSelect, emptyMessage, storageKey }: NavTreeProps): import("react").JSX.Element;
165
178
  //# sourceMappingURL=NavTree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavTree.d.ts","sourceRoot":"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AE,YAAiB,EAAE,UAAU,EAAE,EAAE,YAAY,+BAkDhK"}
@@ -4,6 +4,8 @@ export interface PinnedCommentProps {
4
4
  author: ConversationPerson;
5
5
  /** When it was written, in the app's words, with its day: no day line stands above it here. */
6
6
  time: ReactNode;
7
+ /** When it was written, as a moment (ms since 1970): the time then says the exact date and time under the pointer, as a comment's does. */
8
+ at?: number;
7
9
  /** Its words, cut to one line: plain words read best. */
8
10
  words: ReactNode;
9
11
  /** It was deleted; its replies stay. */
@@ -13,5 +15,5 @@ export interface PinnedCommentProps {
13
15
  * The comment a thread answers, pinned at the top of the replies column: who, when, and its first line, on a raised
14
16
  * card. Peek's pinned message, moved with the conversation.
15
17
  */
16
- export declare function PinnedComment({ author, time, words, deleted }: PinnedCommentProps): import("react").JSX.Element;
18
+ export declare function PinnedComment({ author, time, at: given, words, deleted }: PinnedCommentProps): import("react").JSX.Element;
17
19
  //# sourceMappingURL=PinnedComment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PinnedComment.d.ts","sourceRoot":"","sources":["../src/PinnedComment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAG5D,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,kBAAkB,CAAA;IAC1B,+FAA+F;IAC/F,IAAI,EAAE,SAAS,CAAA;IACf,yDAAyD;IACzD,KAAK,EAAE,SAAS,CAAA;IAChB,wCAAwC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAe,EAAE,EAAE,kBAAkB,+BAmBzF"}
1
+ {"version":3,"file":"PinnedComment.d.ts","sourceRoot":"","sources":["../src/PinnedComment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAK5D,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,kBAAkB,CAAA;IAC1B,+FAA+F;IAC/F,IAAI,EAAE,SAAS,CAAA;IACf,2IAA2I;IAC3I,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,yDAAyD;IACzD,KAAK,EAAE,SAAS,CAAA;IAChB,wCAAwC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,OAAe,EAAE,EAAE,kBAAkB,+BA4BpG"}
@@ -7,10 +7,12 @@ export interface ReactionHorizonProps {
7
7
  cut?: boolean;
8
8
  /** What the app calls what is said, in the plural: "messages" in Peek. Default "comments". */
9
9
  noun?: string;
10
+ /** Older comments are still being read and the whole read will need the line: its room is kept, unseen, so nothing moves when it lands. */
11
+ keepRoom?: boolean;
10
12
  }
11
13
  /**
12
14
  * The line that says reactions are read only so far back, and how many older comments were not checked. Nothing is
13
15
  * drawn when every one was. Peek's, moved with the conversation.
14
16
  */
15
- export declare function ReactionHorizon({ limit, omitted, cut, noun }: ReactionHorizonProps): import("react").JSX.Element | null;
17
+ export declare function ReactionHorizon({ limit, omitted, cut, noun, keepRoom }: ReactionHorizonProps): import("react").JSX.Element | null;
16
18
  //# sourceMappingURL=ReactionHorizon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ReactionHorizon.d.ts","sourceRoot":"","sources":["../src/ReactionHorizon.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAA;IACf,6DAA6D;IAC7D,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,8FAA8F;IAC9F,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAW,EAAE,IAAiB,EAAE,EAAE,oBAAoB,sCAavG"}
1
+ {"version":3,"file":"ReactionHorizon.d.ts","sourceRoot":"","sources":["../src/ReactionHorizon.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAA;IACf,6DAA6D;IAC7D,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,8FAA8F;IAC9F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,2IAA2I;IAC3I,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAWD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAW,EAAE,IAAiB,EAAE,QAAgB,EAAE,EAAE,oBAAoB,sCAmBzH"}
@@ -11,6 +11,8 @@ export interface RepliesRowProps {
11
11
  last?: string;
12
12
  /** "1 new": a reply you have not read. */
13
13
  isNew?: boolean;
14
+ /** How many replies you have not read: "2 new", and the row's name says it too. Given, it decides over `isNew`; 0 is none. */
15
+ newCount?: number;
14
16
  /** The "1 new" chip in the warning colour, for an urgent thread. */
15
17
  urgent?: boolean;
16
18
  /** Opens the thread. Absent, the row only says how many (the card around it opens the thread). */
@@ -19,9 +21,9 @@ export interface RepliesRowProps {
19
21
  open?: boolean;
20
22
  }
21
23
  /**
22
- * The way into a thread, under its comment: who replied, "2 replies", the last reply's time, and "1 new" until it is
23
- * read. Peek's, moved with the conversation; in every app the row a thread opens from, the same in every theme
24
+ * The way into a thread, under its comment: who replied, "2 replies", the last reply's time, and how many are new
25
+ * ("2 new") until they are read. Peek's, moved with the conversation; in every app the row a thread opens from, the same in every theme
24
26
  * (Katerina, 31 October), each in its own colours.
25
27
  */
26
- export declare function RepliesRow({ count, faces, last, isNew, urgent, onOpen, open }: RepliesRowProps): import("react").JSX.Element;
28
+ export declare function RepliesRow({ count, faces, last, isNew, newCount, urgent, onOpen, open }: RepliesRowProps): import("react").JSX.Element;
27
29
  //# sourceMappingURL=RepliesRow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RepliesRow.d.ts","sourceRoot":"","sources":["../src/RepliesRow.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,gCAAgC;IAChC,KAAK,CAAC,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;IACpE,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0CAA0C;IAC1C,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,oEAAoE;IACpE,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,kGAAkG;IAClG,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,6IAA6I;IAC7I,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAQD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAa,EAAE,MAAc,EAAE,MAAM,EAAE,IAAY,EAAE,EAAE,eAAe,+BAmDtH"}
1
+ {"version":3,"file":"RepliesRow.d.ts","sourceRoot":"","sources":["../src/RepliesRow.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,gCAAgC;IAChC,KAAK,CAAC,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;IACpE,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0CAA0C;IAC1C,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,8HAA8H;IAC9H,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oEAAoE;IACpE,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,kGAAkG;IAClG,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,6IAA6I;IAC7I,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAQD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAa,EAAE,QAAQ,EAAE,MAAc,EAAE,MAAM,EAAE,IAAY,EAAE,EAAE,eAAe,+BAuDhI"}
@@ -1,13 +1,15 @@
1
1
  export interface ResolveDialogProps {
2
2
  /** Resolve, with what was written (an empty string for none). Answer `false` when it was refused: the dialog stays, with `refused` under the field. */
3
3
  onResolve: (note: string) => Promise<boolean | void> | boolean | void;
4
+ /** Cancel, Escape, the ✕ — and a resolve that was not refused, which closes it. */
4
5
  onCancel: () => void;
5
6
  /** Why the last resolve was refused, in plain words. */
6
7
  refused?: string;
7
8
  }
8
9
  /**
9
10
  * Resolve, with an optional note: the same dialog in every app (Katerina, 31 October). Ctrl+Enter resolves from the
10
- * note; Enter there is a new line. Peek's, moved with the conversation.
11
+ * note; Enter there is a new line. Peek's, moved with the conversation; a `FormDialog` since 2 November, so Cancel waits
12
+ * while it resolves and a resolve that went through closes it.
11
13
  */
12
14
  export declare function ResolveDialog({ onResolve, onCancel, refused }: ResolveDialogProps): import("react").JSX.Element;
13
15
  //# sourceMappingURL=ResolveDialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResolveDialog.d.ts","sourceRoot":"","sources":["../src/ResolveDialog.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,kBAAkB;IACjC,uJAAuJ;IACvJ,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,OAAO,GAAG,IAAI,CAAA;IACrE,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,kBAAkB,+BAsCjF"}
1
+ {"version":3,"file":"ResolveDialog.d.ts","sourceRoot":"","sources":["../src/ResolveDialog.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,uJAAuJ;IACvJ,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,OAAO,GAAG,IAAI,CAAA;IACrE,mFAAmF;IACnF,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,kBAAkB,+BAUjF"}
@@ -12,8 +12,8 @@ import { PluginKey } from '@tiptap/pm/state';
12
12
  * the field opened (measured 2026-09-07). Linear keeps it, and Katerina asked
13
13
  * for the same. The editor's own selection never moved — ProseMirror keeps it
14
14
  * while unfocused — so this only *draws* it: an inline decoration over the
15
- * range, in `bg-selected` — the token Peek's composer paints `::selection` in,
16
- * mapped through edits and cleared when the field closes.
15
+ * range, in `bg-selected` — the token every kit editor paints `::selection` in
16
+ * (`EDITOR_SELECTION_CLASSES`) — mapped through edits and cleared when the field closes.
17
17
  *
18
18
  * A decoration rather than a second selection, because a document has one
19
19
  * and the field needs it. Editor-internal by design (the editor owns its own
package/dist/Thread.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { type ReactNode, type Ref } from 'react';
2
2
  import { type PinnedCommentProps } from './PinnedComment';
3
+ import { type SeenOnScreen } from './seenOnScreen';
3
4
  /** The comment a thread answers, pinned at the top of its column. */
4
5
  export interface ThreadStart extends PinnedCommentProps {
5
6
  /** Its id, on the pinned comment as `data-thread-start`, as each comment of a ConversationLayout carries `data-conversation-item`: what an app scrolls to when a link names the comment. */
@@ -10,7 +11,7 @@ export interface ThreadProps {
10
11
  place?: 'beside' | 'under';
11
12
  /** The comment it answers, pinned at the top of the column. Under its comment it is not repeated. */
12
13
  start?: ThreadStart;
13
- /** Its replies, in time order: `ReplyCard`s. How it was resolved is said on its comment, not among them (Katerina, 1 November). */
14
+ /** Its replies, in time order: `ReplyCard`s, each keyed by its own id. How it was resolved is said on its comment, not among them (Katerina, 1 November). */
14
15
  children?: ReactNode;
15
16
  /** Still reading the replies: placeholders in their place. */
16
17
  loading?: boolean;
@@ -30,8 +31,10 @@ export interface ThreadProps {
30
31
  empty?: ReactNode;
31
32
  /** The column's name. */
32
33
  title?: ReactNode;
33
- /** The column's scrolling box, for opening at the newest reply. */
34
+ /** Beside: the column's scrolling box. Where it scrolls is the thread's: it opens at the newest reply and goes to each new one. */
34
35
  bodyRef?: Ref<HTMLDivElement>;
36
+ /** What `useSeenOnScreen` made for this thread: it watches its replies (each `ReplyCard`'s `id`), beside or under its comment, and says in it which were seen. */
37
+ seen?: SeenOnScreen;
35
38
  /** Placement only. */
36
39
  className?: string;
37
40
  }
@@ -41,5 +44,5 @@ export interface ThreadProps {
41
44
  * column: Ship's and Leaf's), the replies hung from a line, quiet, and the box under them, all one card with the
42
45
  * comment (Ship's way). Peek's replies column, moved with the conversation.
43
46
  */
44
- export declare function Thread({ place, start, children, loading, resolved, box, notice, actions, onClose, closeLabel, empty, title, bodyRef, className, }: ThreadProps): import("react").JSX.Element;
47
+ export declare function Thread({ place, start, children, loading, resolved, box, notice, actions, onClose, closeLabel, empty, title, bodyRef, seen, className, }: ThreadProps): import("react").JSX.Element;
45
48
  //# sourceMappingURL=Thread.d.ts.map
@@ -1 +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