@estiva-app/ui 0.98.0 → 0.99.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.
- package/README.md +1 -1
- package/dist/AppProvider.d.ts +6 -3
- package/dist/AppProvider.d.ts.map +1 -1
- package/dist/ArchiveDialog.d.ts +35 -0
- package/dist/ArchiveDialog.d.ts.map +1 -0
- package/dist/AttachedCard.d.ts +13 -2
- package/dist/AttachedCard.d.ts.map +1 -1
- package/dist/Card.d.ts +6 -1
- package/dist/Card.d.ts.map +1 -1
- package/dist/ChipInput.d.ts +3 -1
- package/dist/ChipInput.d.ts.map +1 -1
- package/dist/CollapsibleSection.d.ts +27 -2
- package/dist/CollapsibleSection.d.ts.map +1 -1
- package/dist/CommentBox.d.ts +2 -2
- package/dist/CommentBox.d.ts.map +1 -1
- package/dist/ConfirmDialog.d.ts +15 -2
- package/dist/ConfirmDialog.d.ts.map +1 -1
- package/dist/ConversationCard.d.ts +6 -1
- package/dist/ConversationCard.d.ts.map +1 -1
- package/dist/ConversationLayout.d.ts +19 -4
- package/dist/ConversationLayout.d.ts.map +1 -1
- package/dist/ConversationPlace.d.ts +17 -0
- package/dist/ConversationPlace.d.ts.map +1 -0
- package/dist/DocumentEditor.d.ts +38 -0
- package/dist/DocumentEditor.d.ts.map +1 -1
- package/dist/DocumentField.d.ts +50 -0
- package/dist/DocumentField.d.ts.map +1 -0
- package/dist/EditableText.d.ts +38 -4
- package/dist/EditableText.d.ts.map +1 -1
- package/dist/EmptyState.d.ts +10 -5
- package/dist/EmptyState.d.ts.map +1 -1
- package/dist/FormDialog.d.ts +38 -0
- package/dist/FormDialog.d.ts.map +1 -0
- package/dist/InlineText.d.ts.map +1 -1
- package/dist/MoveDialog.d.ts +61 -0
- package/dist/MoveDialog.d.ts.map +1 -0
- package/dist/NavItem.d.ts +9 -2
- package/dist/NavItem.d.ts.map +1 -1
- package/dist/NavTree.d.ts +16 -3
- package/dist/NavTree.d.ts.map +1 -1
- package/dist/PinnedComment.d.ts +3 -1
- package/dist/PinnedComment.d.ts.map +1 -1
- package/dist/ReactionHorizon.d.ts +5 -1
- package/dist/ReactionHorizon.d.ts.map +1 -1
- package/dist/ResolveDialog.d.ts +3 -1
- package/dist/ResolveDialog.d.ts.map +1 -1
- package/dist/SelectionToolbar.d.ts +2 -2
- package/dist/Thread.d.ts +6 -3
- package/dist/Thread.d.ts.map +1 -1
- package/dist/commentBoxFrame.d.ts.map +1 -1
- package/dist/conversation.examples.d.ts +4 -1
- package/dist/conversation.examples.d.ts.map +1 -1
- package/dist/conversationScroll.d.ts +80 -0
- package/dist/conversationScroll.d.ts.map +1 -0
- package/dist/editor.d.ts +1 -0
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +228 -69
- package/dist/editor.js.map +4 -4
- package/dist/eslint/index.js +2 -2
- package/dist/eslint/index.js.map +2 -2
- package/dist/eslint/no-field-outside-a-form.d.ts +2 -2
- package/dist/eslint/no-field-outside-a-form.d.ts.map +1 -1
- package/dist/eslint/no-native-title.d.ts +1 -1
- package/dist/eslint/no-native-title.d.ts.map +1 -1
- package/dist/formBusy.d.ts +5 -2
- package/dist/formBusy.d.ts.map +1 -1
- package/dist/index.d.ts +14 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2210 -1458
- package/dist/index.js.map +4 -4
- package/dist/looks.d.ts +8 -0
- package/dist/looks.d.ts.map +1 -1
- package/dist/seenOnScreen.d.ts +27 -0
- package/dist/seenOnScreen.d.ts.map +1 -0
- package/dist/showInConversation.d.ts +31 -0
- package/dist/showInConversation.d.ts.map +1 -0
- package/dist/threadCard.d.ts +13 -0
- package/dist/threadCard.d.ts.map +1 -1
- package/package.json +1 -1
- package/registry.json +904 -139
- package/src/AppProvider.mdx +4 -0
- package/src/AppProvider.test.tsx +34 -2
- package/src/AppProvider.tsx +17 -6
- package/src/ArchiveDialog.mdx +70 -0
- package/src/ArchiveDialog.stories.tsx +64 -0
- package/src/ArchiveDialog.test.tsx +90 -0
- package/src/ArchiveDialog.tsx +70 -0
- package/src/AttachedCard.mdx +6 -0
- package/src/AttachedCard.stories.tsx +9 -1
- package/src/AttachedCard.test.tsx +111 -2
- package/src/AttachedCard.tsx +77 -7
- package/src/Card.mdx +20 -1
- package/src/Card.stories.tsx +20 -0
- package/src/Card.test.tsx +87 -1
- package/src/Card.tsx +51 -3
- package/src/ChipInput.mdx +7 -1
- package/src/ChipInput.stories.tsx +9 -0
- package/src/ChipInput.test.tsx +42 -0
- package/src/ChipInput.tsx +7 -3
- package/src/CollapsibleSection.mdx +20 -1
- package/src/CollapsibleSection.stories.tsx +19 -1
- package/src/CollapsibleSection.test.tsx +85 -2
- package/src/CollapsibleSection.tsx +54 -15
- package/src/CommentBox.mdx +2 -1
- package/src/CommentBox.test.tsx +81 -1
- package/src/CommentBox.tsx +32 -11
- package/src/ConfirmDialog.mdx +25 -3
- package/src/ConfirmDialog.stories.tsx +27 -0
- package/src/ConfirmDialog.test.tsx +87 -1
- package/src/ConfirmDialog.tsx +39 -8
- package/src/ConversationCard.mdx +4 -0
- package/src/ConversationCard.stories.tsx +11 -1
- package/src/ConversationCard.test.tsx +116 -0
- package/src/ConversationCard.tsx +53 -36
- package/src/ConversationLayout.mdx +30 -4
- package/src/ConversationLayout.scroll.test.tsx +411 -0
- package/src/ConversationLayout.stories.tsx +79 -1
- package/src/ConversationLayout.test.tsx +79 -0
- package/src/ConversationLayout.tsx +136 -15
- package/src/ConversationPlace.mdx +53 -0
- package/src/ConversationPlace.stories.tsx +48 -0
- package/src/ConversationPlace.test.tsx +51 -0
- package/src/ConversationPlace.tsx +30 -0
- package/src/DocumentEditor.mdx +2 -1
- package/src/DocumentEditor.tsx +118 -64
- package/src/DocumentField.mdx +83 -0
- package/src/DocumentField.stories.tsx +110 -0
- package/src/DocumentField.test.tsx +281 -0
- package/src/DocumentField.tsx +199 -0
- package/src/EditableText.buttons.test.tsx +318 -0
- package/src/EditableText.mdx +50 -2
- package/src/EditableText.stories.tsx +96 -2
- package/src/EditableText.tsx +189 -5
- package/src/EmptyState.mdx +33 -8
- package/src/EmptyState.stories.tsx +26 -1
- package/src/EmptyState.test.tsx +63 -2
- package/src/EmptyState.tsx +28 -6
- package/src/Form.mdx +3 -1
- package/src/FormDialog.mdx +78 -0
- package/src/FormDialog.stories.tsx +90 -0
- package/src/FormDialog.test.tsx +183 -0
- package/src/FormDialog.tsx +93 -0
- package/src/InlineText.mdx +1 -0
- package/src/InlineText.tsx +2 -1
- package/src/MoveDialog.mdx +74 -0
- package/src/MoveDialog.stories.tsx +121 -0
- package/src/MoveDialog.test.tsx +203 -0
- package/src/MoveDialog.tsx +183 -0
- package/src/NavItem.mdx +15 -0
- package/src/NavItem.stories.tsx +15 -0
- package/src/NavItem.test.tsx +64 -1
- package/src/NavItem.tsx +10 -2
- package/src/NavTree.mdx +26 -4
- package/src/NavTree.stories.tsx +59 -0
- package/src/NavTree.test.tsx +232 -2
- package/src/NavTree.tsx +93 -43
- package/src/PinnedComment.mdx +6 -1
- package/src/PinnedComment.stories.tsx +11 -1
- package/src/PinnedComment.tsx +15 -2
- package/src/ReactionHorizon.mdx +3 -0
- package/src/ReactionHorizon.stories.tsx +3 -0
- package/src/ReactionHorizon.test.tsx +55 -0
- package/src/ReactionHorizon.tsx +30 -11
- package/src/ReplyCard.mdx +3 -0
- package/src/ReplyCard.stories.tsx +19 -1
- package/src/ResolveDialog.mdx +2 -0
- package/src/ResolveDialog.test.tsx +21 -0
- package/src/ResolveDialog.tsx +11 -39
- package/src/SelectionToolbar.tsx +2 -2
- package/src/Textarea.mdx +1 -0
- package/src/Thread.mdx +18 -1
- package/src/Thread.stories.tsx +55 -3
- package/src/Thread.test.tsx +11 -0
- package/src/Thread.tsx +53 -11
- package/src/commentBoxFrame.tsx +2 -2
- package/src/conversation.examples.tsx +10 -2
- package/src/conversationScroll.ts +155 -0
- package/src/editor.ts +1 -0
- package/src/editorSelection.test.tsx +53 -0
- package/src/eslint/no-field-outside-a-form.test.ts +4 -0
- package/src/eslint/no-field-outside-a-form.ts +2 -2
- package/src/eslint/no-native-title.ts +1 -1
- package/src/formBusy.ts +5 -2
- package/src/index.ts +16 -6
- package/src/looks.ts +10 -0
- package/src/registry/registry.test.ts +12 -6
- package/src/seenOnScreen.test.tsx +182 -0
- package/src/seenOnScreen.ts +146 -0
- package/src/showInConversation.test.tsx +168 -0
- package/src/showInConversation.ts +93 -0
- package/src/threadCard.ts +16 -0
- package/stories/Choosing.mdx +7 -2
- package/tailwind-preset.js +7 -0
package/dist/EditableText.d.ts
CHANGED
|
@@ -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
|
-
/**
|
|
23
|
-
|
|
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(
|
|
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;
|
|
1
|
+
{"version":3,"file":"EditableText.d.ts","sourceRoot":"","sources":["../src/EditableText.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmD,KAAK,SAAS,EAAkB,MAAM,OAAO,CAAA;AAOvG,OAAO,EAAa,KAAK,aAAa,EAAE,MAAM,SAAS,CAAA;AAKvD,mIAAmI;AACnI,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAA;IACtC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,2GAA2G;AAC3G,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,mBAAmB,CAAA;AAK9D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,wHAAwH;IACxH,WAAW,EAAE,MAAM,CAAA;IACnB;;;;OAIG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAAA;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,6HAA6H;IAC7H,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;IAClB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,8FAA8F;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6GAA6G;IAC7G,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kEAAkE;IAClE,gBAAgB,CAAC,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"}
|
package/dist/EmptyState.d.ts
CHANGED
|
@@ -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
|
|
32
|
-
*
|
|
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;
|
package/dist/EmptyState.d.ts.map
CHANGED
|
@@ -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
|
|
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"}
|
package/dist/InlineText.d.ts.map
CHANGED
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"InlineText.d.ts","sourceRoot":"","sources":["../src/InlineText.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAA;AAO/F;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,eAAe;IAC9B,oGAAoG;IACpG,KAAK,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"}
|
|
@@ -0,0 +1,61 @@
|
|
|
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. A Folder that could not be
|
|
29
|
+
* read says so as the section's empty line does, with its Try again (B8).
|
|
30
|
+
*/
|
|
31
|
+
export interface MoveDialogProps {
|
|
32
|
+
/** The file's name, said above the choice. */
|
|
33
|
+
title: string;
|
|
34
|
+
/** The sentence under the name, in the app's words: "Everyone who can read it now still can." */
|
|
35
|
+
description: string;
|
|
36
|
+
/** The Folder it is in now. */
|
|
37
|
+
from: string;
|
|
38
|
+
/** The Folders it may go to. Undefined while they are still read: the list says "Reading…". */
|
|
39
|
+
folders: readonly MoveFolder[] | undefined;
|
|
40
|
+
/** Where it may go in `from`, already read. Absent with `placesIn`, the Folder it opens on is read at once. */
|
|
41
|
+
places?: readonly MovePlace[];
|
|
42
|
+
/** 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. */
|
|
43
|
+
placesIn?: (folder: string) => Promise<readonly MovePlace[]>;
|
|
44
|
+
/** 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. */
|
|
45
|
+
startAtTop?: boolean;
|
|
46
|
+
/** 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. */
|
|
47
|
+
topLabel?: string;
|
|
48
|
+
/** The Folder it opens on, when that is not the one it is in. */
|
|
49
|
+
startIn?: string;
|
|
50
|
+
/** The dialog's heading. "Move" when absent. */
|
|
51
|
+
heading?: string;
|
|
52
|
+
/** The Folder field's label. "Folder" when absent. */
|
|
53
|
+
folderLabel?: string;
|
|
54
|
+
/** Said when no Folder is offered. "There is no other folder it can be moved to." when absent. */
|
|
55
|
+
noFolder?: string;
|
|
56
|
+
/** Answer `false` to keep the dialog open (you have said why); anything else closes it. */
|
|
57
|
+
onMove: (choice: MoveChoice) => Promise<boolean | void> | boolean | void;
|
|
58
|
+
onClose: () => void;
|
|
59
|
+
}
|
|
60
|
+
export declare function MoveDialog({ title, description, from, folders, places, placesIn, startAtTop, topLabel, startIn, heading, folderLabel, noFolder, onMove, onClose, }: MoveDialogProps): import("react").JSX.Element;
|
|
61
|
+
//# sourceMappingURL=MoveD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A2F;IAC3F,MAAM,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,OAAO,GAAG,IAAI,CAAA;IACxE,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,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
|
package/dist/NavItem.d.ts.map
CHANGED
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"NavItem.d.ts","sourceRoot":"","sources":["../src/NavItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,wBAAwB,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAUvG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5F,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,wBAAwB;IACxB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,4GAA4G;IAC5G,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,oKAAoK;IACpK,MAAM,CAAC,EAAE,aAAa,GAAG;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAA;IAChD,yGAAyG;IACzG,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,8IAA8I;IAC9I,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,uJAAuJ;IACvJ,MAAM,CAAC,EAAE,OAAO,CAAA;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
|
|
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
|
|
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
|
package/dist/NavTree.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTree.d.ts","sourceRoot":"","sources":["../src/NavTree.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"NavTree.d.ts","sourceRoot":"","sources":["../src/NavTree.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0D,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAI/G,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAGnE,kDAAkD;AAClD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,wBAAwB;IACxB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,yGAAyG;IACzG,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,kDAAkD;IAClD,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;;OA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B,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,6HAA6H;IAC7H,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,OAAe,EAAE,OAAe,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,WAAkB,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BAuD3N;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAiB,EAAE,UAAU,EAAE,EAAE,YAAY,+BAkDhK"}
|
package/dist/PinnedComment.d.ts
CHANGED
|
@@ -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;
|
|
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"}
|
|
@@ -5,10 +5,14 @@ export interface ReactionHorizonProps {
|
|
|
5
5
|
omitted: number;
|
|
6
6
|
/** Some reactions may be missing: the read was cut short. */
|
|
7
7
|
cut?: boolean;
|
|
8
|
+
/** What the app calls what is said, in the plural: "messages" in Peek. Default "comments". */
|
|
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;
|
|
8
12
|
}
|
|
9
13
|
/**
|
|
10
14
|
* The line that says reactions are read only so far back, and how many older comments were not checked. Nothing is
|
|
11
15
|
* drawn when every one was. Peek's, moved with the conversation.
|
|
12
16
|
*/
|
|
13
|
-
export declare function ReactionHorizon({ limit, omitted, cut }: ReactionHorizonProps): import("react").JSX.Element | null;
|
|
17
|
+
export declare function ReactionHorizon({ limit, omitted, cut, noun, keepRoom }: ReactionHorizonProps): import("react").JSX.Element | null;
|
|
14
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;
|
|
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"}
|
package/dist/ResolveDialog.d.ts
CHANGED
|
@@ -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":"
|
|
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
|
|
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
|
-
/**
|
|
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
|
+
/** Beside: what `useSeenOnScreen` made for this thread: it watches its replies (each `ReplyCard`'s `id`), 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
|
package/dist/Thread.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Thread.d.ts","sourceRoot":"","sources":["../src/Thread.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Thread.d.ts","sourceRoot":"","sources":["../src/Thread.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAA;AAStH,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAOhE,qEAAqE;AACrE,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,4LAA4L;IAC5L,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B,6QAA6Q;IAC7Q,KAAK,CAAC,EAAE,QAAQ,GAAG,OAA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
};
|
|
21
|
+
/** A moment for a time's exact date under the pointer: 11:08 AM, on a placeholder day. */
|
|
22
|
+
export declare const AT: number;
|
|
21
23
|
export declare const WORDS = "A comment says what its author wrote. Its replies sit in the thread under it, and anyone here can react.";
|
|
22
24
|
export declare const SHORT = "A reply answers the comment above it.";
|
|
23
25
|
export declare const LONG = "A long comment keeps its whole text. It runs on for several lines so the card can be seen at its full height: the face and the name stay at the top, the words wrap under them, and the strip of actions stays in the top right corner while the card is pointed at. Nothing is cut, and the reactions and the replies row sit under the last line, as they do under a short one.";
|
|
@@ -41,9 +43,10 @@ export declare function EditBox({ text, done, refuse }: {
|
|
|
41
43
|
refuse?: boolean;
|
|
42
44
|
}): import("react").JSX.Element;
|
|
43
45
|
/** The box a reply or a comment is written in, with its tools as an app gives them: the paperclip. */
|
|
44
|
-
export declare function WriteBox({ label, closed }: {
|
|
46
|
+
export declare function WriteBox({ label, closed, onSend }: {
|
|
45
47
|
label?: string;
|
|
46
48
|
closed?: string;
|
|
49
|
+
onSend?: (words: string) => void;
|
|
47
50
|
}): import("react").JSX.Element;
|
|
48
51
|
/** A column's width: 384px, every app's right column. */
|
|
49
52
|
export declare function Column({ children }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.examples.d.ts","sourceRoot":"","sources":["../src/conversation.examples.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAShD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAGpE,eAAO,MAAM,OAAO;;;GAMnB,CAAA;AAED,eAAO,MAAM,EAAE,OAAO,CAAA;AAEtB,eAAO,MAAM,MAAM,GAAI,IAAI,MAAM,WAA2B,CAAA;AAE5D,eAAO,MAAM,GAAG;;CAAyB,CAAA;AACzC,eAAO,MAAM,GAAG;;CAAyB,CAAA;AACzC,eAAO,MAAM,KAAK;;CAA2B,CAAA;AAC7C,eAAO,MAAM,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CAAA;CAAE,+BAIlI;AAKD,yDAAyD;AACzD,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAE3D"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Where a conversation scrolls, Peek's way, moved into the kit (C1 of the audit of 2 November): it opens at the newest
|
|
4
|
+
* comment, comes back to where the reader left it, follows what arrives only while the reader is at the bottom, goes
|
|
5
|
+
* down to the reader's own comment as it is sent, and holds still while cards and pictures fill in. ConversationLayout
|
|
6
|
+
* and Thread use it; nothing here is for an app to call but `useLeftAt`.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* How close to the bottom still counts as at the bottom. Not zero: `scrollHeight - scrollTop - clientHeight` is rarely
|
|
10
|
+
* exactly zero (display scaling, zoom and fractional pixel ratios leave a fraction while the last comment is squarely
|
|
11
|
+
* in view), and a strict check would make following work on one machine and not another. 80px is about one comment,
|
|
12
|
+
* so a glance at the line above still counts as watching. Peek's NEAR_BOTTOM_PX.
|
|
13
|
+
*/
|
|
14
|
+
export declare const NEAR_BOTTOM_PX = 80;
|
|
15
|
+
/** Whether the box is close enough to the bottom to follow what arrives. */
|
|
16
|
+
export declare function isNearBottom(el: HTMLElement): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The comment at the top of a conversation's view, and how far below the view's top it is: what "the same spot" means
|
|
19
|
+
* to the reader, whatever above it changed height.
|
|
20
|
+
*/
|
|
21
|
+
export declare function anchorIn(el: HTMLElement): {
|
|
22
|
+
id: string;
|
|
23
|
+
top: number;
|
|
24
|
+
} | undefined;
|
|
25
|
+
/** The card of the comment `id` in `el`: the first child of its `data-conversation-item`. */
|
|
26
|
+
export declare const cardIn: (el: HTMLElement, id: string) => Element | null;
|
|
27
|
+
/**
|
|
28
|
+
* Keeps a conversation where the reader is while what is in it changes size: a card, a chip or a picture filling in, a
|
|
29
|
+
* card shown or hidden (Peek's OPT-10).
|
|
30
|
+
*
|
|
31
|
+
* At the bottom (`atBottom`, the view's own judgement), it stays the same distance from the bottom, so the newest
|
|
32
|
+
* comments stay in view as a card above them loads. Anywhere else, the comment at the top of the view stays at the same
|
|
33
|
+
* height. Browsers that anchor scrolling themselves (Chromium, Firefox) do the second only for what changes above the
|
|
34
|
+
* view, and only roughly; Safari does neither, and a conversation there was pushed thousands of pixels off its bottom
|
|
35
|
+
* by one card.
|
|
36
|
+
*
|
|
37
|
+
* Only once `ready()` says the conversation has been placed: before that, where it lands is the view's to decide.
|
|
38
|
+
* Without `atBottom` (a thread), "at the bottom" is where the last scroll left it. `rebase()` takes it again from where
|
|
39
|
+
* the box is now, at the bottom: a thread that just went down to a new reply.
|
|
40
|
+
*/
|
|
41
|
+
export declare function useSteadyScroll(scrollRef: RefObject<HTMLElement | null>, atBottom: RefObject<boolean> | undefined, ready: () => boolean, key: unknown, enabled: boolean): {
|
|
42
|
+
rebase: () => void;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Where each conversation was left in this tab (Peek's OPT-3), by the name the app gave it (`rememberAs`): at the
|
|
46
|
+
* bottom or at an offset, the comment at the top of the view and how far down it sat, and when (ms). Not per reader:
|
|
47
|
+
* it holds no words.
|
|
48
|
+
*/
|
|
49
|
+
export declare const places: Map<string, {
|
|
50
|
+
atBottom: boolean;
|
|
51
|
+
offset: number;
|
|
52
|
+
anchor?: {
|
|
53
|
+
id: string;
|
|
54
|
+
top: number;
|
|
55
|
+
};
|
|
56
|
+
leftAt: number;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* When the reader last left the conversation `key` (a `ConversationLayout`'s `rememberAs`) away from its newest
|
|
60
|
+
* comment, in ms since 1970: what an app draws its "New" line from, over the first comment written since. `null` when
|
|
61
|
+
* it was left at the newest, or not opened before in this tab. Taken once per visit, as the conversation opens: later
|
|
62
|
+
* scrolling moves the record, not the line.
|
|
63
|
+
*/
|
|
64
|
+
export declare function useLeftAt(key: string | null | undefined): number | null;
|
|
65
|
+
/**
|
|
66
|
+
* Set by ConversationLayout round its own box, read by CommentBox: the reader's own comment brings them down to it as
|
|
67
|
+
* it is drawn, before the relay has answered (Peek's OPT-6), and a refusal leaves where they actually are to decide.
|
|
68
|
+
*/
|
|
69
|
+
export declare const sendsInLayout: import("react").Context<{
|
|
70
|
+
sending: () => void;
|
|
71
|
+
refused: () => void;
|
|
72
|
+
} | null>;
|
|
73
|
+
/**
|
|
74
|
+
* Set by a Thread round its replies, counted by each ReplyCard as it is first drawn in it: a new reply, or another
|
|
75
|
+
* thread's replies, take the thread to its newest; a reply taken away (a delete) is never counted, and moves nothing.
|
|
76
|
+
*/
|
|
77
|
+
export declare const repliesDrawn: import("react").Context<{
|
|
78
|
+
added: number;
|
|
79
|
+
} | null>;
|
|
80
|
+
//# sourceMappingURL=conversationScroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversationScroll.d.ts","sourceRoot":"","sources":["../src/conversationScroll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE1E;;;;;GAKG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,cAAc,KAAK,CAAA;AAEhC,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAErD;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,WAAW,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAWjF;AAED,6FAA6F;AAC7F,eAAO,MAAM,MAAM,GAAI,IAAI,WAAW,EAAE,IAAI,MAAM,mBAAgG,CAAA;AAElJ;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EACxC,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,SAAS,EACxC,KAAK,EAAE,MAAM,OAAO,EACpB,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,OAAO,GACf;IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,CAsDxB;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM;cAA+B,OAAO;YAAU,MAAM;aAAW;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;YAAU,MAAM;EAAK,CAAA;AAEpI;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAWvE;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa;aAA4B,MAAM,IAAI;aAAW,MAAM,IAAI;SAAgB,CAAA;AAErG;;;GAGG;AACH,eAAO,MAAM,YAAY;WAA0B,MAAM;SAAgB,CAAA"}
|
package/dist/editor.d.ts
CHANGED
|
@@ -24,4 +24,5 @@ export { LinkChips, findLinkChips, refreshLinkChips, type LinkChipsOptions, type
|
|
|
24
24
|
export { LinkPlaces, linkPlaceAt, staysChip, type LinkPlace } from './LinkPlaces';
|
|
25
25
|
export { ReferenceMenu, ReferenceMenuView, isReferenceMenuOpen, referenceMenuClick, type ReferenceMenuViewProps } from './ReferenceMenu';
|
|
26
26
|
export { DocumentEditor, type DocumentEditorProps, type DocumentCodec, type DocumentReferences, type DocumentMentions, type HeldTyping, } from './DocumentEditor';
|
|
27
|
+
export { DocumentField, type DocumentFieldProps } from './DocumentField';
|
|
27
28
|
//# sourceMappingURL=editor.d.ts.map
|