@estiva-app/ui 0.80.0 → 0.82.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/dist/BlockNodes.d.ts.map +1 -1
- package/dist/CardUnder.d.ts +24 -3
- package/dist/CardUnder.d.ts.map +1 -1
- package/dist/CommentBox.d.ts +39 -5
- package/dist/CommentBox.d.ts.map +1 -1
- package/dist/ComposerTriggers.d.ts +24 -0
- package/dist/ComposerTriggers.d.ts.map +1 -1
- package/dist/DocumentEditor.d.ts +138 -0
- package/dist/DocumentEditor.d.ts.map +1 -0
- package/dist/ReferenceMenu.d.ts.map +1 -1
- package/dist/SelectionToolbar.d.ts.map +1 -1
- package/dist/editor.d.ts +3 -2
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +565 -46
- package/dist/editor.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/index.js.map +2 -2
- package/dist/links.d.ts +28 -0
- package/dist/links.d.ts.map +1 -0
- package/package.json +7 -1
- package/registry.json +199 -10
- package/src/BlockNodes.tsx +3 -1
- package/src/CardUnder.mdx +1 -0
- package/src/CardUnder.tsx +10 -6
- package/src/CommentBox.mdx +8 -0
- package/src/CommentBox.stories.tsx +62 -2
- package/src/CommentBox.test.tsx +169 -1
- package/src/CommentBox.tsx +110 -17
- package/src/ComposerTriggers.tsx +65 -0
- package/src/DocumentEditor.mdx +106 -0
- package/src/DocumentEditor.stories.tsx +305 -0
- package/src/DocumentEditor.test.tsx +528 -0
- package/src/DocumentEditor.tsx +568 -0
- package/src/ReferenceMenu.tsx +6 -1
- package/src/SelectionToolbar.tsx +2 -1
- package/src/editor.ts +13 -0
- package/src/gates/create-app.test.ts +3 -1
- package/src/links.ts +151 -0
- package/src/registry/registry.test.ts +6 -6
- package/stories/Choosing.mdx +1 -0
package/dist/BlockNodes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockNodes.d.ts","sourceRoot":"","sources":["../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EF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY,gBAqBvB,CAAA;AAgBF,uEAAuE;AACvE,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC,8FAA8F;IAC9F,IAAI,EAAE,aAAa,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAA;CAChD;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,kCAqCzB,CAAA;AAIF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAEjE;AAsFD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,SAAS,qBA+EpB,CAAA;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,qBAkBlB,CAAA"}
|
package/dist/CardUnder.d.ts
CHANGED
|
@@ -1,10 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one card added under a piece of text, and the ✕ that removes it (why:
|
|
3
|
+
* https://github.com/estiva-app/estiva-docs/blob/main/decisions/a-link-on-words-counts-toward-the-card.md).
|
|
4
|
+
*
|
|
5
|
+
* Under a box being written in, the ✕ always shows. Under text already sent
|
|
6
|
+
* (`revealOnHover`) it shows when the pointer is over the card or the ✕ has
|
|
7
|
+
* focus, and always on a screen that cannot hover, so a tap reaches it (Miky,
|
|
8
|
+
* 16 Oct, kickoff).
|
|
9
|
+
*/
|
|
10
|
+
import type { ReactNode } from 'react';
|
|
1
11
|
import type { LinkState } from './linked';
|
|
2
|
-
|
|
3
|
-
link: LinkState;
|
|
12
|
+
interface CardUnderBase {
|
|
4
13
|
/** Draws the ✕. Without it the card shows with none, as it does to anyone but the author. */
|
|
5
14
|
onRemove?: () => void;
|
|
6
15
|
/** The ✕ waits for hover or focus: under text already sent. Always shown on a screen that cannot hover. */
|
|
7
16
|
revealOnHover?: boolean;
|
|
8
17
|
}
|
|
9
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The card is a `LinkCard` of `link`, or the app's own card as `children`: an
|
|
20
|
+
* app that draws a sent card itself draws the one under its box the same way.
|
|
21
|
+
*/
|
|
22
|
+
export type CardUnderProps = CardUnderBase & ({
|
|
23
|
+
link: LinkState;
|
|
24
|
+
children?: never;
|
|
25
|
+
} | {
|
|
26
|
+
link?: never;
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
});
|
|
29
|
+
export declare function CardUnder({ link, children, onRemove, revealOnHover }: CardUnderProps): import("react").JSX.Element;
|
|
30
|
+
export {};
|
|
10
31
|
//# sourceMappingURL=CardUnder.d.ts.map
|
package/dist/CardUnder.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardUnder.d.ts","sourceRoot":"","sources":["../src/CardUnder.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CardUnder.d.ts","sourceRoot":"","sources":["../src/CardUnder.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,UAAU,aAAa;IACrB,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,2GAA2G;IAC3G,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,CAAC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC,CAAA;AAE5H,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAqB,EAAE,EAAE,cAAc,+BAmB5F"}
|
package/dist/CommentBox.d.ts
CHANGED
|
@@ -60,7 +60,39 @@ export interface CommentBoxEdit {
|
|
|
60
60
|
files?: BoxFile[];
|
|
61
61
|
onCancel: () => void;
|
|
62
62
|
/** Save; the box holds the words until the answer, and a refusal is said under it. */
|
|
63
|
-
onSave: (body: JSONContent, files: BoxFile[]) => Promise<SendAnswer>;
|
|
63
|
+
onSave: (body: JSONContent, files: BoxFile[], under: BoxSentUnder) => Promise<SendAnswer>;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* What a draft shows under the box, as the app reads it from the box's
|
|
67
|
+
* document — `@estiva-app/conversation`'s `boxReadOf`, which reads it as the
|
|
68
|
+
* message will be sent (why:
|
|
69
|
+
* https://github.com/estiva-app/estiva-docs/blob/main/decisions/a-link-on-words-counts-toward-the-card.md).
|
|
70
|
+
*/
|
|
71
|
+
export interface BoxUnderRead {
|
|
72
|
+
/** The one card, before any ✕: what it names, and the app's own view of it, drawn as it draws a sent one. */
|
|
73
|
+
card?: {
|
|
74
|
+
value: string;
|
|
75
|
+
view: ReactNode;
|
|
76
|
+
};
|
|
77
|
+
/** The live parts, drawn as the app draws them under a sent message. An edit carries none, so the edit box shows none. */
|
|
78
|
+
parts?: readonly {
|
|
79
|
+
key: string;
|
|
80
|
+
view: ReactNode;
|
|
81
|
+
}[];
|
|
82
|
+
/** Everything the draft names. A ✕ is forgotten once what it took off is no longer named, so a link put back gets its card again. */
|
|
83
|
+
names: readonly string[];
|
|
84
|
+
}
|
|
85
|
+
/** What the box shows under itself while something is written. */
|
|
86
|
+
export interface BoxUnder {
|
|
87
|
+
/** Read on every change, and once more as it is sent. */
|
|
88
|
+
read: (body: JSONContent) => BoxUnderRead;
|
|
89
|
+
/** Called with a listener; call it when `read` would answer differently (what a link names came back). */
|
|
90
|
+
changed?: (listener: () => void) => () => void;
|
|
91
|
+
}
|
|
92
|
+
/** What was under the box as it was sent or saved. */
|
|
93
|
+
export interface BoxSentUnder {
|
|
94
|
+
/** The card still shown, by what it names: absent when there was none, or ✕ took it off. */
|
|
95
|
+
card?: string;
|
|
64
96
|
}
|
|
65
97
|
export interface CommentBoxProps {
|
|
66
98
|
/** Who `@` and `!@` offer. */
|
|
@@ -75,8 +107,10 @@ export interface CommentBoxProps {
|
|
|
75
107
|
insert?: readonly SlashCommand[];
|
|
76
108
|
/** `/` → Code: a mark inside the line, or a block. */
|
|
77
109
|
code?: CodeFormat;
|
|
78
|
-
/** Send what is written, with the files that are ready; resolves with the relay's answer. */
|
|
79
|
-
send: (body: JSONContent, files: BoxFile[]) => Promise<SendAnswer>;
|
|
110
|
+
/** Send what is written, with the files that are ready and the card still shown; resolves with the relay's answer. */
|
|
111
|
+
send: (body: JSONContent, files: BoxFile[], under: BoxSentUnder) => Promise<SendAnswer>;
|
|
112
|
+
/** The card and parts under the box while something is written, with ✕ on the card. Absent, nothing shows under it. */
|
|
113
|
+
under?: BoxUnder;
|
|
80
114
|
/**
|
|
81
115
|
* The app shows a send before the relay answers: the box empties at once,
|
|
82
116
|
* and a refusal puts the words back. Otherwise the box holds the words, shut,
|
|
@@ -105,7 +139,7 @@ export interface CommentBoxProps {
|
|
|
105
139
|
extensions?: readonly AnyExtension[];
|
|
106
140
|
autoFocus?: boolean;
|
|
107
141
|
/** Called with what was sent once it went out: at once when `showsAtOnce`, else on the answer. */
|
|
108
|
-
onSent?: (body: JSONContent, files: BoxFile[]) => void;
|
|
142
|
+
onSent?: (body: JSONContent, files: BoxFile[], under: BoxSentUnder) => void;
|
|
109
143
|
/** Called when a send shown at once was refused, so the app takes it back. */
|
|
110
144
|
onRefused?: () => void;
|
|
111
145
|
className?: string;
|
|
@@ -115,5 +149,5 @@ export interface CommentBoxProps {
|
|
|
115
149
|
* its order, with its own after them; an edit drops File and Urgent itself.
|
|
116
150
|
*/
|
|
117
151
|
export declare const commentBoxRows: Readonly<Record<'file' | 'mention' | 'urgent' | 'reference', SlashCommand>>;
|
|
118
|
-
export declare function CommentBox({ people, references, referencesChanged, referenceIcon, insert, code, send, showsAtOnce, label, placeholder, draft, edit, upload, accept, closed, referenceView, extensions, autoFocus, onSent, onRefused, className, }: CommentBoxProps): import("react").JSX.Element;
|
|
152
|
+
export declare function CommentBox({ people, references, referencesChanged, referenceIcon, insert, code, send, under, showsAtOnce, label, placeholder, draft, edit, upload, accept, closed, referenceView, extensions, autoFocus, onSent, onRefused, className, }: CommentBoxProps): import("react").JSX.Element;
|
|
119
153
|
//# sourceMappingURL=CommentBox.d.ts.map
|
package/dist/CommentBox.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommentBox.d.ts","sourceRoot":"","sources":["../src/CommentBox.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"CommentBox.d.ts","sourceRoot":"","sources":["../src/CommentBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsD,KAAK,aAAa,EAAkB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAC9H,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAyC,KAAK,WAAW,EAAE,MAAM,eAAe,CAAA;AAGvF,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAMrE,OAAO,EAQL,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAElB,MAAM,oBAAoB,CAAA;AAW3B;;;;;;;;;;;;;GAaG;AAEH,8DAA8D;AAC9D,MAAM,MAAM,UAAU,GAAG;IAAE,QAAQ,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAEjF,6EAA6E;AAC7E,MAAM,MAAM,YAAY,GAAG;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC;IAA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}): string[] | undefined;
|
|
63
|
+
export interface PersonReferenceOptions {
|
|
64
|
+
/** Everyone `@` can offer, asked each time the query changes. */
|
|
65
|
+
people: () => readonly MentionPerson[];
|
|
66
|
+
/** The `nostr:npub…` a person is written as; `null` for someone without one, who is not offered. */
|
|
67
|
+
uriOf: (person: MentionPerson) => string | null;
|
|
68
|
+
/** The node a pick inserts. Default `reference`, `ReferenceNode`'s. */
|
|
69
|
+
nodeName: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* `@` in a document — a person, written as a reference to them: a
|
|
73
|
+
* `ReferenceNode` whose `uri` is their `nostr:npub…` (SPEC §13.1, §13.3). Not
|
|
74
|
+
* {@link PersonMention}'s chip, which is a message's: a document names people
|
|
75
|
+
* the way it names anything else, and a save that newly names someone is what
|
|
76
|
+
* adds them (`@estiva-app/conversation`'s `mentionAddsFor`, which reads only
|
|
77
|
+
* that uri).
|
|
78
|
+
*
|
|
79
|
+
* PersonReference.configure({ people: () => directory, uriOf: (person) => npubUri(person.pubkey) })
|
|
80
|
+
*
|
|
81
|
+
* The chip carries no name: the app's `ReferenceNode` view resolves the uri,
|
|
82
|
+
* so a rename shows everywhere the person is named.
|
|
83
|
+
*
|
|
84
|
+
* why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/a-mention-in-a-files-text-adds-the-person-with-no-unread.md
|
|
85
|
+
*/
|
|
86
|
+
export declare const PersonReference: Extension<PersonReferenceOptions, any>;
|
|
63
87
|
/** Something `[` offers: a reference drawn as who said it and how it opens. */
|
|
64
88
|
export interface CaptionedItem {
|
|
65
89
|
/** The referenced thing's id — the row's key and the chip's `id`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerTriggers.d.ts","sourceRoot":"","sources":["../src/ComposerTriggers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,KAAK,MAAM,EAAE,MAA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G,YAAY,CAavE;AAED,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,CAM9D;AAMD,4FAA4F;AAC5F,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE,CAGpG;AAED,MAAM,WAAW,oBAAoB;IACnC,+EAA+E;IAC/E,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAA;CAClC;AAID;;;;GAIG;AACH,eAAO,MAAM,aAAa,sCAgCxB,CAAA"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
2
|
+
import type { AnyExtension } from '@tiptap/core';
|
|
3
|
+
import { type Editor, type JSONContent } from '@tiptap/react';
|
|
4
|
+
import type { HandleBlock } from './BlockHandle';
|
|
5
|
+
import { type AttachmentViewProps, type ReferenceViewProps } from './BlockNodes';
|
|
6
|
+
import { type SelectionAnchor } from './CommentHighlights';
|
|
7
|
+
import { type MentionPerson, type ReferenceSection } from './ComposerTriggers';
|
|
8
|
+
import { type LinkChipsOptions } from './LinkChips';
|
|
9
|
+
/**
|
|
10
|
+
* How the app's saved text and the editor's document turn into each other. The
|
|
11
|
+
* package speaks only the editor's document; the translation is
|
|
12
|
+
* `@estiva-app/protocol`'s, which the package does not depend on (the record
|
|
13
|
+
* below):
|
|
14
|
+
*
|
|
15
|
+
* { read: (value, format) => toEditorDocument(documentForEditing(value, format), { links: true }),
|
|
16
|
+
* write: (doc) => publishableFromEditor(doc) }
|
|
17
|
+
*/
|
|
18
|
+
export interface DocumentCodec {
|
|
19
|
+
/** The saved text, in its format, as the editor's document. */
|
|
20
|
+
read: (value: string, format: string) => JSONContent;
|
|
21
|
+
/** The editor's document as the text to save, and the format it is in. */
|
|
22
|
+
write: (doc: JSONContent) => {
|
|
23
|
+
value: string;
|
|
24
|
+
contentFormat?: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Where text typed when the sign-in ends is kept through the passkey trip, and
|
|
29
|
+
* put back, unsaved, after it. The app's own store, by key.
|
|
30
|
+
*/
|
|
31
|
+
export interface HeldTyping {
|
|
32
|
+
/** What is held for `key` from the last ending, or `undefined`. */
|
|
33
|
+
text: (key: string) => string | undefined;
|
|
34
|
+
/** Forget what is held for `key`: it was saved. */
|
|
35
|
+
release: (key: string) => void;
|
|
36
|
+
/** While the editor is open, let an ending read its unsaved text. Returns what stops that, as the editor closes. */
|
|
37
|
+
register: (key: string, read: () => string | undefined) => () => void;
|
|
38
|
+
/** Whether the sign-in has ended: nothing is saved then, and the text is held instead. */
|
|
39
|
+
ended: () => boolean;
|
|
40
|
+
}
|
|
41
|
+
/** What `[` lists, and how. Without it `[` is a bracket. */
|
|
42
|
+
export interface DocumentReferences {
|
|
43
|
+
/** The sections for what was typed after `[`, already narrowed and in the app's order. */
|
|
44
|
+
sections: (query: string) => readonly ReferenceSection[];
|
|
45
|
+
/** Called with a listener while the list is open; call it when `sections` would answer differently (a search landed). */
|
|
46
|
+
subscribe?: (listener: () => void) => () => void;
|
|
47
|
+
/** Names the list. */
|
|
48
|
+
ariaLabel: string;
|
|
49
|
+
/** The heading of rows that bring no section of their own. */
|
|
50
|
+
sectionLabel: string;
|
|
51
|
+
/** A row's 16px icon, unless the row brings its own. Default none. */
|
|
52
|
+
icon?: ReactNode;
|
|
53
|
+
}
|
|
54
|
+
/** Whom `@` offers. Without it `@` is an at sign. */
|
|
55
|
+
export interface DocumentMentions {
|
|
56
|
+
/** Everyone `@` can offer, asked as the query changes. */
|
|
57
|
+
people: () => readonly MentionPerson[];
|
|
58
|
+
/** The `nostr:npub…` a person is written as; `null` for someone without one, who is not offered. */
|
|
59
|
+
uriOf: (person: MentionPerson) => string | null;
|
|
60
|
+
}
|
|
61
|
+
export interface DocumentEditorProps {
|
|
62
|
+
/** The saved text. A new value while the editor is open is somebody else's save, or your own coming back. */
|
|
63
|
+
value: string;
|
|
64
|
+
/** The format `value` is in, handed to `codec.read`. */
|
|
65
|
+
format: string;
|
|
66
|
+
codec: DocumentCodec;
|
|
67
|
+
/**
|
|
68
|
+
* Save. Called when you leave, never while typing, with the text, its format,
|
|
69
|
+
* and the saved text this edit started from — so the app can tell whom the
|
|
70
|
+
* save names anew. Answer whether it was saved.
|
|
71
|
+
*/
|
|
72
|
+
onCommit: (value: string, contentFormat: string | undefined, editedFrom: string) => Promise<boolean> | boolean;
|
|
73
|
+
/** The editor's accessible name. */
|
|
74
|
+
label: string;
|
|
75
|
+
/** Muted words over an empty editor. */
|
|
76
|
+
placeholder?: ReactNode;
|
|
77
|
+
/** For reading: nothing is typed or saved; chips open, and comments on a selection work when on. */
|
|
78
|
+
readOnly?: boolean;
|
|
79
|
+
/** Who saved the text last, when it was not you: named in "… saved a newer version". */
|
|
80
|
+
changedBy?: {
|
|
81
|
+
name: string;
|
|
82
|
+
} | null;
|
|
83
|
+
/** A save refused after the editor closed, with nothing left on screen to say it. */
|
|
84
|
+
onLeftUnsaved?: () => void;
|
|
85
|
+
/** Where text typed when the sign-in ends is held, under `holdKey`. */
|
|
86
|
+
hold?: HeldTyping;
|
|
87
|
+
holdKey?: string;
|
|
88
|
+
/** `[` and `/` → *Link to a file*. */
|
|
89
|
+
references?: DocumentReferences;
|
|
90
|
+
/** `@`. */
|
|
91
|
+
mentions?: DocumentMentions;
|
|
92
|
+
/** A pasted app URL drawn as the chip of what it names (`LinkChips`). */
|
|
93
|
+
linkChips?: LinkChipsOptions;
|
|
94
|
+
/** `/` → File, and a pasted picture: upload one file and answer the attachment's attributes (its `imeta` fields). */
|
|
95
|
+
upload?: (file: File) => Promise<Record<string, unknown>>;
|
|
96
|
+
/** Plain text pasted as the blocks it spells: the app's reader of markdown, as the editor's document. */
|
|
97
|
+
readMarkdown?: (text: string) => JSONContent | undefined;
|
|
98
|
+
/** `/` → Table. Default on. */
|
|
99
|
+
table?: boolean;
|
|
100
|
+
/** Comment on what is selected: the selection strip's Comment, and the comment highlights. Without it, neither. */
|
|
101
|
+
onCommentOnSelection?: (anchor: SelectionAnchor) => void;
|
|
102
|
+
/** The app's rows in a block's handle menu, after the editing ones: Copy link, Comment. */
|
|
103
|
+
blockRows?: (block: HandleBlock) => ReactNode;
|
|
104
|
+
/** Draws a chip: the app's own, which resolves what it names. */
|
|
105
|
+
referenceView?: ComponentType<ReferenceViewProps>;
|
|
106
|
+
/** Draws a placed file: the app's own card. */
|
|
107
|
+
attachmentView?: ComponentType<AttachmentViewProps>;
|
|
108
|
+
/** Drawn after the text: the cards chips ask for, as the app draws them. */
|
|
109
|
+
cards?: (editor: Editor | null) => ReactNode;
|
|
110
|
+
/** Around everything the editor draws: the app's providers, which may read the editor. */
|
|
111
|
+
wrap?: (children: ReactNode, editor: Editor | null) => ReactNode;
|
|
112
|
+
/** The editor, once it is there, and `null` as it goes. */
|
|
113
|
+
onEditor?: (editor: Editor | null) => void;
|
|
114
|
+
/** More of the app's own extensions. */
|
|
115
|
+
extensions?: readonly AnyExtension[];
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* One document's text as one surface that is always an editor — Leaf's page,
|
|
119
|
+
* Ship's description and Peek's panel, which each had their own until this.
|
|
120
|
+
* Every app's document can do the same things, wherever it is written.
|
|
121
|
+
*
|
|
122
|
+
* - **Saves when you leave:** on blur, on unmount and on a checklist tick.
|
|
123
|
+
* Never while typing. Escape leaves and keeps the text. A refused save keeps
|
|
124
|
+
* the text and says so; one refused after the editor closed goes to
|
|
125
|
+
* `onLeftUnsaved`.
|
|
126
|
+
* - **Someone else's save arrives** while you are not in it: it is loaded.
|
|
127
|
+
* While you are in it, it waits, and a line says who saved a newer version,
|
|
128
|
+
* with "Load it"; leaving with a change saves yours over it — the later save
|
|
129
|
+
* wins (Miky, LEAF-3's kickoff and 13 October). Your own save coming back is
|
|
130
|
+
* never mistaken for someone else's.
|
|
131
|
+
* - **The sign-in ending** holds what was typed (`hold`), and the editor opens
|
|
132
|
+
* with it, unsaved, after the passkey tap.
|
|
133
|
+
*
|
|
134
|
+
* why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/every-app-edits-a-document-with-one-shared-editor.md
|
|
135
|
+
* why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/the-block-editor-kit-lives-in-protocol-and-ui.md
|
|
136
|
+
*/
|
|
137
|
+
export declare function DocumentEditor({ value, format, codec, onCommit, label, placeholder, readOnly, changedBy, onLeftUnsaved, hold, holdKey, references, mentions, linkChips, upload, readMarkdown, table, onCommentOnSelection, blockRows, referenceView, attachmentView, cards, wrap, onEditor, extensions, }: DocumentEditorProps): import("react").JSX.Element;
|
|
138
|
+
//# sourceMappingURL=DocumentEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentEditor.d.ts","sourceRoot":"","sources":["../src/DocumentEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACpG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEhD,OAAO,EAA4C,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAA;AAGvG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAA6F,KAAK,mBAAmB,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAG3K,OAAO,EAAwC,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAChG,OAAO,EAAgF,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAwC,MAAM,oBAAoB,CAAA;AAKlM,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAU9D;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAA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AkB,CAAC,CAAA;IACjD,+CAA+C;IAC/C,cAAc,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IACnD,4EAA4E;IAC5E,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,SAAS,CAAA;IAC5C,0FAA0F;IAC1F,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,SAAS,CAAA;IAChE,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC1C,wCAAwC;IACxC,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;CACrC;AAcD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,MAAM,EACN,KAAK,EACL,QAAQ,EACR,KAAK,EACL,WAAW,EACX,QAAgB,EAChB,SAAgB,EAChB,aAAa,EACb,IAAI,EACJ,OAAO,EACP,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,YAAY,EACZ,KAAY,EACZ,oBAAoB,EACpB,SAAS,EACT,aAAa,EACb,cAAc,EACd,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,UAAe,GAChB,EAAE,mBAAmB,+BAwWrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceMenu.d.ts","sourceRoot":"","sources":["../src/ReferenceMenu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReferenceMenu.d.ts","sourceRoot":"","sources":["../src/ReferenceMenu.tsx"],"names":[],"mappings":"AAgCA,OAAO,EAAE,SAAS,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAA;AAErD,OAAO,EAAmD,KAAK,WAAW,EAAoB,MAAM,kBAAkB,CAAA;AAmHtH,+GAA+G;AAC/G,wBAAgB,mBAAmB,CAAC,KAAK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AAM,CAAA;IACb,mBAAmB;IACnB,IAAI,EAAE,SAAS,CAAA;IACf,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,iDAAiD;IACjD,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B;AAED,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,KAAuC,EAAE,IAAY,EAAE,QAAQ,EAAE,OAAY,EAAE,EAAE,qBAAqB,sCAwRhJ"}
|
package/dist/editor.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export { KeptSelection, SelectionToolbar, keepSelection, releaseSelection, normalizeHref, type MarkId, type SelectionAction, type SelectionToolbarProps } from './SelectionToolbar';
|
|
11
11
|
export { ComposeBox, ComposeKeys, COMPOSE_EDITOR_CLASSES, type ComposeBoxProps } from './ComposeBox';
|
|
12
|
-
export { CommentBox, commentBoxRows, type CommentBoxProps, type CommentBoxDraft, type CommentBoxEdit, type BoxFile, type BoxFileState, type SendAnswer, type UploadAnswer, } from './CommentBox';
|
|
12
|
+
export { CommentBox, commentBoxRows, type CommentBoxProps, type CommentBoxDraft, type CommentBoxEdit, type BoxFile, type BoxFileState, type BoxUnder, type BoxUnderRead, type BoxSentUnder, type SendAnswer, type UploadAnswer, } from './CommentBox';
|
|
13
13
|
export { InlineText, type InlineTextProps, type InlineTextHandle } from './InlineText';
|
|
14
14
|
export { CommentHighlights, setCommentAnchors, commentPlace, commentElement, anchorOfSelection, quoteText, type CommentAnchor, type CommentHighlightsOptions, type CommentPlace, type CommentQuote, type SelectionAnchor, } from './CommentHighlights';
|
|
15
15
|
export { PastedImages, pastedImages, pastedImageName, type PastedImagesOptions, type ClipboardSource } from './PastedImages';
|
|
@@ -18,9 +18,10 @@ export { CodeBlockColours } from './CodeBlockColours';
|
|
|
18
18
|
export { suggestionPopup, isSuggestionActive, isSuggestionOpen, type SuggestionPopupOptions } from './suggestionPopup';
|
|
19
19
|
export { EditorBlockHandle, blockDropCursor, deleteBlock, moveBlock, duplicateBlock, startBlockDrag, turnIntoRows, turnListInto, turnQuoteInto, type EditorBlockHandleProps, type BlockTurnInto, type ListKind, type QuoteKind, } from './EditorBlockHandle';
|
|
20
20
|
export { EditorTableControls, appendTableRow, appendTableColumn, deleteTableRow, deleteTableColumn, toggleTableHeaderRow, type EditorTableControlsProps } from './EditorTableControls';
|
|
21
|
-
export { PersonMention, UrgentPersonMention, CaptionedReference, ReferenceTrigger, SlashCommands, peopleMenu, referenceMenu, filterPeople, urgentPubkeys, filterReferences, formatSection, applyFormat, typeTrigger, filterSlashSections, FORMATS, type MentionPerson, type PersonMentionOptions, type CaptionedItem, type CaptionedReferenceOptions, type ReferenceTriggerOptions, type ReferenceMenuOptions, type SlashCommand, type SlashSection, type SlashCommandsOptions, type FormatId, type FormatDef, type CodeFormat, } from './ComposerTriggers';
|
|
21
|
+
export { PersonMention, UrgentPersonMention, PersonReference, CaptionedReference, ReferenceTrigger, SlashCommands, peopleMenu, referenceMenu, filterPeople, urgentPubkeys, filterReferences, formatSection, applyFormat, typeTrigger, filterSlashSections, FORMATS, type MentionPerson, type PersonMentionOptions, type PersonReferenceOptions, type CaptionedItem, type CaptionedReferenceOptions, type ReferenceTriggerOptions, type ReferenceMenuOptions, type SlashCommand, type SlashSection, type SlashCommandsOptions, type FormatId, type FormatDef, type CodeFormat, } from './ComposerTriggers';
|
|
22
22
|
export { BlockId, Checklist, Callout, isChecklistTick, UnknownBlock, ReferenceNode, AttachmentNode, type ReferenceNodeOptions, type ReferenceViewProps, type AttachmentNodeOptions, type AttachmentViewProps, } from './BlockNodes';
|
|
23
23
|
export { ReferenceCards, useReferenceCards, referenceAtSelection, referenceCardPlacements, setReferenceCard, setReferenceCardAt, type ReferenceCard, type ReferenceCardLayout, type ReferenceCardSlot, } from './ReferenceCards';
|
|
24
24
|
export { LinkChips, findLinkChips, refreshLinkChips, type LinkChipsOptions, type PastedRange } from './LinkChips';
|
|
25
25
|
export { ReferenceMenu, ReferenceMenuView, isReferenceMenuOpen, referenceMenuClick, type ReferenceMenuViewProps } from './ReferenceMenu';
|
|
26
|
+
export { DocumentEditor, type DocumentEditorProps, type DocumentCodec, type DocumentReferences, type DocumentMentions, type HeldTyping, } from './DocumentEditor';
|
|
26
27
|
//# sourceMappingURL=editor.d.ts.map
|
package/dist/editor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../src/editor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,KAAK,MAAM,EAAE,KAAK,eAAe,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AACnL,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,sBAAsB,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAA;AACpG,OAAO,EACL,UAAU,EACV,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACtF,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,eAAe,GACrB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,KAAK,mBAAmB,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAC5H,OAAO,EAAE,cAAc,EAA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