@estiva-app/ui 0.74.1 → 0.76.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/CardUnder.d.ts +10 -0
- package/dist/CardUnder.d.ts.map +1 -0
- package/dist/CommentBox.d.ts +119 -0
- package/dist/CommentBox.d.ts.map +1 -0
- package/dist/ComposeBox.d.ts +2 -0
- package/dist/ComposeBox.d.ts.map +1 -1
- package/dist/InlineChip.d.ts +2 -0
- package/dist/InlineChip.d.ts.map +1 -1
- package/dist/LinkCard.d.ts +17 -0
- package/dist/LinkCard.d.ts.map +1 -0
- package/dist/LinkChip.d.ts +8 -0
- package/dist/LinkChip.d.ts.map +1 -0
- package/dist/LinkParts.d.ts +45 -0
- package/dist/LinkParts.d.ts.map +1 -0
- package/dist/LinkPreview.d.ts +21 -0
- package/dist/LinkPreview.d.ts.map +1 -0
- package/dist/LinkRow.d.ts +24 -0
- package/dist/LinkRow.d.ts.map +1 -0
- package/dist/PartCard.d.ts +32 -0
- package/dist/PartCard.d.ts.map +1 -0
- package/dist/ReactionRow.d.ts +44 -0
- package/dist/ReactionRow.d.ts.map +1 -0
- package/dist/Skeleton.d.ts +12 -2
- package/dist/Skeleton.d.ts.map +1 -1
- package/dist/editor.d.ts +1 -0
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +2340 -2043
- package/dist/editor.js.map +4 -4
- package/dist/eslint/index.js +1 -0
- package/dist/eslint/index.js.map +2 -2
- package/dist/eslint/no-restyled-part.d.ts.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +546 -72
- package/dist/index.js.map +4 -4
- package/dist/linked.d.ts +168 -0
- package/dist/linked.d.ts.map +1 -0
- package/dist/linked.examples.d.ts +27 -0
- package/dist/linked.examples.d.ts.map +1 -0
- package/package.json +6 -2
- package/registry.json +1129 -37
- package/src/CardUnder.mdx +53 -0
- package/src/CardUnder.stories.tsx +45 -0
- package/src/CardUnder.test.tsx +40 -0
- package/src/CardUnder.tsx +45 -0
- package/src/CommentBox.mdx +83 -0
- package/src/CommentBox.stories.tsx +218 -0
- package/src/CommentBox.test.tsx +265 -0
- package/src/CommentBox.tsx +472 -0
- package/src/ComposeBox.tsx +5 -4
- package/src/InlineChip.tsx +2 -0
- package/src/LinkCard.mdx +58 -0
- package/src/LinkCard.stories.tsx +68 -0
- package/src/LinkCard.test.tsx +103 -0
- package/src/LinkCard.tsx +209 -0
- package/src/LinkChip.mdx +51 -0
- package/src/LinkChip.stories.tsx +40 -0
- package/src/LinkChip.test.tsx +83 -0
- package/src/LinkChip.tsx +51 -0
- package/src/LinkParts.mdx +49 -0
- package/src/LinkParts.stories.tsx +61 -0
- package/src/LinkParts.tsx +147 -0
- package/src/LinkPreview.mdx +47 -0
- package/src/LinkPreview.stories.tsx +38 -0
- package/src/LinkPreview.tsx +55 -0
- package/src/LinkRow.mdx +47 -0
- package/src/LinkRow.stories.tsx +49 -0
- package/src/LinkRow.test.tsx +38 -0
- package/src/LinkRow.tsx +107 -0
- package/src/PartCard.mdx +43 -0
- package/src/PartCard.stories.tsx +35 -0
- package/src/PartCard.test.tsx +30 -0
- package/src/PartCard.tsx +59 -0
- package/src/ReactionRow.mdx +50 -0
- package/src/ReactionRow.stories.tsx +91 -0
- package/src/ReactionRow.test.tsx +68 -0
- package/src/ReactionRow.tsx +118 -0
- package/src/Skeleton.tsx +7 -3
- package/src/editor.ts +11 -0
- package/src/eslint/no-native-title.test.ts +3 -2
- package/src/eslint/no-restyled-part.ts +1 -0
- package/src/index.ts +26 -0
- package/src/linked.examples.ts +107 -0
- package/src/linked.test.ts +58 -0
- package/src/linked.ts +217 -0
- package/src/registry/registry.test.ts +8 -8
- package/stories/Choosing.mdx +10 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LinkState } from './linked';
|
|
2
|
+
export interface CardUnderProps {
|
|
3
|
+
link: LinkState;
|
|
4
|
+
/** Draws the ✕. Without it the card shows with none, as it does to anyone but the author. */
|
|
5
|
+
onRemove?: () => void;
|
|
6
|
+
/** The ✕ waits for hover or focus: under text already sent. Always shown on a screen that cannot hover. */
|
|
7
|
+
revealOnHover?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function CardUnder({ link, onRemove, revealOnHover }: CardUnderProps): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=CardUnder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardUnder.d.ts","sourceRoot":"","sources":["../src/CardUnder.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,SAAS,CAAA;IACf,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,2GAA2G;IAC3G,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAqB,EAAE,EAAE,cAAc,+BAqBlF"}
|
|
@@ -0,0 +1,119 @@
|
|
|
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 ReferenceViewProps } from './BlockNodes';
|
|
5
|
+
import { type CodeFormat, type MentionPerson, type ReferenceSection, type SlashCommand } from './ComposerTriggers';
|
|
6
|
+
/**
|
|
7
|
+
* The one box every app writes a comment, a reply and a chat line in, from the
|
|
8
|
+
* approved prototype (`concept/comments-everywhere`, Miky 17 October): the
|
|
9
|
+
* package's `ComposeBox` with everything each app built around it — `@`,
|
|
10
|
+
* `!@`, `[` and `/`, the keys, drafts, files, the edit mode, sending and a
|
|
11
|
+
* refused send. An app hands over only its people, its `[` sections, its `/`
|
|
12
|
+
* Insert rows and a send that says whether the relay accepted it.
|
|
13
|
+
*
|
|
14
|
+
* It speaks the editor's document. What that document writes as a message,
|
|
15
|
+
* and the document an edit or a draft opens with, are `@estiva-app/conversation`'s
|
|
16
|
+
* (`composerText`, `composerDocument`, `composerDraft`).
|
|
17
|
+
*
|
|
18
|
+
* why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/every-app-writes-and-reacts-with-one-shared-box.md
|
|
19
|
+
*/
|
|
20
|
+
/** What the relay said about a send, an edit or an upload. */
|
|
21
|
+
export type SendAnswer = {
|
|
22
|
+
accepted: true;
|
|
23
|
+
} | {
|
|
24
|
+
accepted: false;
|
|
25
|
+
reason: string;
|
|
26
|
+
};
|
|
27
|
+
/** What an upload answered: the app's own record of the file, or why not. */
|
|
28
|
+
export type UploadAnswer = {
|
|
29
|
+
accepted: true;
|
|
30
|
+
value: unknown;
|
|
31
|
+
} | {
|
|
32
|
+
accepted: false;
|
|
33
|
+
reason: string;
|
|
34
|
+
};
|
|
35
|
+
/** Where a file in the box is: Send waits for one uploading. */
|
|
36
|
+
export type BoxFileState = 'uploading' | 'ready' | 'failed';
|
|
37
|
+
/** A file in the box. */
|
|
38
|
+
export interface BoxFile {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
size?: number;
|
|
42
|
+
contentType?: string;
|
|
43
|
+
state: BoxFileState;
|
|
44
|
+
/** Why it failed, under its name. */
|
|
45
|
+
note?: string;
|
|
46
|
+
/** What `upload` answered for it: the app's own record (an `imeta`, a URL). */
|
|
47
|
+
value?: unknown;
|
|
48
|
+
}
|
|
49
|
+
/** A draft, in the box's terms — `@estiva-app/conversation`'s `composerDraft` is one. */
|
|
50
|
+
export interface CommentBoxDraft {
|
|
51
|
+
read(): JSONContent | undefined;
|
|
52
|
+
write(body: JSONContent): void;
|
|
53
|
+
clear(): void;
|
|
54
|
+
}
|
|
55
|
+
/** Editing something already sent: the same box, with Cancel and Save. */
|
|
56
|
+
export interface CommentBoxEdit {
|
|
57
|
+
/** What it says now, as `composerDocument` opens it. */
|
|
58
|
+
body: JSONContent;
|
|
59
|
+
/** Its files, which can be taken off; none can be added. */
|
|
60
|
+
files?: BoxFile[];
|
|
61
|
+
onCancel: () => void;
|
|
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>;
|
|
64
|
+
}
|
|
65
|
+
export interface CommentBoxProps {
|
|
66
|
+
/** Who `@` and `!@` offer. */
|
|
67
|
+
people: readonly MentionPerson[];
|
|
68
|
+
/** What `[` lists for what was typed, already in the app's order. Absent, `[` opens nothing. */
|
|
69
|
+
references?: (query: string) => readonly ReferenceSection[];
|
|
70
|
+
/** Called with a listener while `[` is open; call it when `references` would answer differently (a search landed). */
|
|
71
|
+
referencesChanged?: (listener: () => void) => () => void;
|
|
72
|
+
/** A `[` row's and chip's 16px icon from what it points at; absent, a neutral square. */
|
|
73
|
+
referenceIcon?: (uri: string | null) => ReactNode | undefined;
|
|
74
|
+
/** The app's own `/` Insert rows, after the shared Format section: {@link commentBoxRows} and its own. */
|
|
75
|
+
insert?: readonly SlashCommand[];
|
|
76
|
+
/** `/` → Code: a mark inside the line, or a block. */
|
|
77
|
+
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>;
|
|
80
|
+
/**
|
|
81
|
+
* The app shows a send before the relay answers: the box empties at once,
|
|
82
|
+
* and a refusal puts the words back. Otherwise the box holds the words, shut,
|
|
83
|
+
* until the answer.
|
|
84
|
+
*/
|
|
85
|
+
showsAtOnce?: boolean;
|
|
86
|
+
/** The editor's accessible name: what the box is for. */
|
|
87
|
+
label: string;
|
|
88
|
+
/** Said in the empty box. */
|
|
89
|
+
placeholder: ReactNode;
|
|
90
|
+
/** Keeps what is written when the box goes away. Give the box a React `key` per destination. */
|
|
91
|
+
draft?: CommentBoxDraft;
|
|
92
|
+
/** Editing something already sent. */
|
|
93
|
+
edit?: CommentBoxEdit;
|
|
94
|
+
/** Offers the paperclip, `/` → File, a pasted picture and a dropped file: uploads one, and answers. */
|
|
95
|
+
upload?: (file: File) => Promise<UploadAnswer>;
|
|
96
|
+
/** The file picker's `accept`. */
|
|
97
|
+
accept?: string;
|
|
98
|
+
/** The box cannot write here (an archived file, signed out): a line saying why takes its place. */
|
|
99
|
+
closed?: {
|
|
100
|
+
reason: ReactNode;
|
|
101
|
+
};
|
|
102
|
+
/** How a `nostr:` reference the box holds is drawn — the app's own chip. Absent, as its URI. */
|
|
103
|
+
referenceView?: ComponentType<ReferenceViewProps>;
|
|
104
|
+
/** The app's own extra editor extensions: link chips, highlights. */
|
|
105
|
+
extensions?: readonly AnyExtension[];
|
|
106
|
+
autoFocus?: boolean;
|
|
107
|
+
/** Called with what was sent once it went out: at once when `showsAtOnce`, else on the answer. */
|
|
108
|
+
onSent?: (body: JSONContent, files: BoxFile[]) => void;
|
|
109
|
+
/** Called when a send shown at once was refused, so the app takes it back. */
|
|
110
|
+
onRefused?: () => void;
|
|
111
|
+
className?: string;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The `/` Insert rows the kit offers. Pass the ones an app can perform, in
|
|
115
|
+
* its order, with its own after them; an edit drops File and Urgent itself.
|
|
116
|
+
*/
|
|
117
|
+
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;
|
|
119
|
+
//# sourceMappingURL=CommentBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommentBox.d.ts","sourceRoot":"","sources":["../src/CommentBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,aAAa,EAAkB,KAAK,SAAS,EAAE,MAA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E,IAAI,KAAK,OAAO,CAAC,YAAY,CAAC,CAAA;IAC9C,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,mGAAmG;IACnG,MAAM,CAAC,EAAE;QAAE,MAAM,EAAE,SAAS,CAAA;KAAE,CAAA;IAC9B,gGAAgG;IAChG,aAAa,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAA;IACjD,qEAAqE;IACrE,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;IACpC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,kGAAkG;IAClG,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;IACtD,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAOD;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,EAAE,YAAY,CAAC,CAKtG,CAAA;AAsBD,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,MAAW,EACX,IAAc,EACd,IAAI,EACJ,WAAmB,EACnB,KAAK,EACL,WAAW,EACX,KAAK,EACL,IAAI,EACJ,MAAM,EACN,MAAM,EACN,MAAM,EACN,aAAa,EACb,UAAe,EACf,SAAS,EACT,MAAM,EACN,SAAS,EACT,SAAS,GACV,EAAE,eAAe,+BAqRjB"}
|
package/dist/ComposeBox.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ type ComposeKeysStorage = {
|
|
|
21
21
|
* open picks a row instead. `ComposeBox` says what sending does.
|
|
22
22
|
*/
|
|
23
23
|
export declare const ComposeKeys: Extension<Record<string, never>, ComposeKeysStorage>;
|
|
24
|
+
/** Nothing written: no text, no chip and no picture — empty lines, spaces, lists or quotes only. */
|
|
25
|
+
export declare function isEmptyDoc(editor: Editor): boolean;
|
|
24
26
|
export interface ComposeBoxProps {
|
|
25
27
|
/** The app's editor, with `ComposeKeys` in its extensions and `COMPOSE_EDITOR_CLASSES` on it. `null` while it loads. */
|
|
26
28
|
editor: Editor | null;
|
package/dist/ComposeBox.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposeBox.d.ts","sourceRoot":"","sources":["../src/ComposeBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,eAAe,CAAA;AAO1D,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAGjF;;;;;;GAMG;AAEH,8HAA8H;AAC9H,eAAO,MAAM,sBAAsB,QAAgG,CAAA;AAEnI,KAAK,kBAAkB,GAAG;IAAE,IAAI,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,IAAI,CAAA;CAAE,CAAA;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,WAAW,sDA4BtB,CAAA;
|
|
1
|
+
{"version":3,"file":"ComposeBox.d.ts","sourceRoot":"","sources":["../src/ComposeBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,eAAe,CAAA;AAO1D,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAGjF;;;;;;GAMG;AAEH,8HAA8H;AAC9H,eAAO,MAAM,sBAAsB,QAAgG,CAAA;AAEnI,KAAK,kBAAkB,GAAG;IAAE,IAAI,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,IAAI,CAAA;CAAE,CAAA;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,WAAW,sDA4BtB,CAAA;AAEF,oGAAoG;AACpG,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CASlD;AAED,MAAM,WAAW,eAAe;IAC9B,wHAAwH;IACxH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB;;;OAGG;IACH,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAA;IAC1C,2FAA2F;IAC3F,WAAW,EAAE,SAAS,CAAA;IACtB,0FAA0F;IAC1F,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,mEAAmE;IACnE,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,wFAAwF;IACxF,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,qFAAqF;IACrF,SAAS,CAAC,EAAE,IAAI,CAAC,qBAAqB,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC,CAAA;IACrE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,KAAa,EAAE,OAAe,EAAE,MAAc,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,eAAe,+BAgFpK"}
|
package/dist/InlineChip.d.ts
CHANGED
|
@@ -39,6 +39,8 @@ export declare const INLINE_CHIP_TONE_CLASSES: {
|
|
|
39
39
|
* copy of this chip still has the 16.8px box).
|
|
40
40
|
*/
|
|
41
41
|
readonly quiet: "h-[19.6px] bg-bg-active text-text-muted font-mono text-caption";
|
|
42
|
+
/** A file this reader cannot open — deleted, or not theirs to see: said in words, quieter than a link. */
|
|
43
|
+
readonly muted: "bg-bg-active text-text-muted";
|
|
42
44
|
};
|
|
43
45
|
export type InlineChipTone = keyof typeof INLINE_CHIP_TONE_CLASSES;
|
|
44
46
|
/** The chip's classes for a tone, with anything the caller adds. For renderers that cannot use the component. */
|
package/dist/InlineChip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineChip.d.ts","sourceRoot":"","sources":["../src/InlineChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAI7D;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,oGAAoG;AACpG,eAAO,MAAM,mBAAmB,kHACiF,CAAA;AAEjH,qDAAqD;AACrD,eAAO,MAAM,wBAAwB;IACnC,0DAA0D;;IAE1D,gBAAgB;;IAEhB,iCAAiC;;IAEjC;;;;;;OAMG;;
|
|
1
|
+
{"version":3,"file":"InlineChip.d.ts","sourceRoot":"","sources":["../src/InlineChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAI7D;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,oGAAoG;AACpG,eAAO,MAAM,mBAAmB,kHACiF,CAAA;AAEjH,qDAAqD;AACrD,eAAO,MAAM,wBAAwB;IACnC,0DAA0D;;IAE1D,gBAAgB;;IAEhB,iCAAiC;;IAEjC;;;;;;OAMG;;IAEH,0GAA0G;;CAElG,CAAA;AAEV,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,wBAAwB,CAAA;AAElE,iHAAiH;AACjH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,MAAM,UAE3E;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC;IACnF,mDAAmD;IACnD,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,mFAAmF;IACnF,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAsB1G"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { LinkedKind, LinkState, LoadingShape } from './linked';
|
|
2
|
+
export interface LinkCardProps {
|
|
3
|
+
link: LinkState;
|
|
4
|
+
/** The values read as words, never pickers: the hover preview. */
|
|
5
|
+
readOnly?: boolean;
|
|
6
|
+
/** No frame of its own: inside a box that draws one, as the hover preview's. */
|
|
7
|
+
bare?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function LinkCard({ link, readOnly, bare }: LinkCardProps): import("react").JSX.Element;
|
|
10
|
+
export interface LinkCardLoadingProps {
|
|
11
|
+
kind: LinkedKind;
|
|
12
|
+
/** What the card will hold (`loadingShapeOf` from the last time it drew); the kind's usual card otherwise. */
|
|
13
|
+
shape?: LoadingShape;
|
|
14
|
+
}
|
|
15
|
+
/** The card it will become, drawn in bars at the card's own height. */
|
|
16
|
+
export declare function LinkCardLoading({ kind, shape }: LinkCardLoadingProps): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=LinkCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkCard.d.ts","sourceRoot":"","sources":["../src/LinkCard.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAU,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAK3E,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAA;IACf,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gFAAgF;IAChF,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAgB,EAAE,IAAY,EAAE,EAAE,aAAa,+BAW/E;AAsGD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAA;IAChB,8GAA8G;IAC9G,KAAK,CAAC,EAAE,YAAY,CAAA;CACrB;AAED,uEAAuE;AACvE,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,oBAAoB,+BA6DpE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LinkState } from './linked';
|
|
2
|
+
export interface LinkChipProps {
|
|
3
|
+
link: LinkState;
|
|
4
|
+
/** Hovering shows its card. Off where a card would cover what the reader is choosing from. */
|
|
5
|
+
preview?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function LinkChip({ link, preview }: LinkChipProps): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=LinkChip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkChip.d.ts","sourceRoot":"","sources":["../src/LinkChip.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAMzC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAA;IACf,8FAA8F;IAC9F,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAc,EAAE,EAAE,aAAa,+BA8B/D"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type LinkedConversation, type LinkedKind, type LinkedPicker, type LinkedStatus } from './linked';
|
|
2
|
+
/** A status as its shape, which reads without colour; its words on hover and to a screen reader. */
|
|
3
|
+
export declare function StatusMark({ status }: {
|
|
4
|
+
status: LinkedStatus;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
/** The icon for what a link stands for. A page of text has its own. */
|
|
7
|
+
export declare function LinkedIcon({ kind, size, tone }: {
|
|
8
|
+
kind: LinkedKind;
|
|
9
|
+
size?: 14 | 16;
|
|
10
|
+
tone?: 'secondary' | 'inherit';
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
/** A key, the way people say it ("ABC-2"): before the title, quieter than it. */
|
|
13
|
+
export declare function LinkKey({ children }: {
|
|
14
|
+
children: string;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
/** Progress as a small ring, with the count beside it. */
|
|
17
|
+
export declare function ProgressRing({ done, total }: {
|
|
18
|
+
done: number;
|
|
19
|
+
total: number;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* The count of what was said, a link to where it is read. With something
|
|
23
|
+
* unread there the words are brighter and a dot follows. It sits above a
|
|
24
|
+
* row's covering link, so the row opens the thing and the count its
|
|
25
|
+
* conversation.
|
|
26
|
+
*/
|
|
27
|
+
export declare function CommentCount({ conversation, noun }: {
|
|
28
|
+
conversation: LinkedConversation;
|
|
29
|
+
noun?: string;
|
|
30
|
+
}): import("react").JSX.Element;
|
|
31
|
+
export interface LinkPickersProps {
|
|
32
|
+
status?: LinkedPicker;
|
|
33
|
+
owner?: LinkedPicker;
|
|
34
|
+
/** The owner's word: "Assignee", "Lead". */
|
|
35
|
+
ownerLabel?: string;
|
|
36
|
+
/** Draws the values as words even where they could be changed: the hover preview. */
|
|
37
|
+
readOnly?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A status and an owner, where the reader can change them from the card. A
|
|
41
|
+
* picker whose app passed no `onChange` reads as words in the same place: the
|
|
42
|
+
* reader may not change it. The hover preview is always words.
|
|
43
|
+
*/
|
|
44
|
+
export declare function LinkPickers({ status, owner, ownerLabel, readOnly }: LinkPickersProps): import("react").JSX.Element;
|
|
45
|
+
//# sourceMappingURL=LinkParts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkParts.d.ts","s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,gBAAgB,+BA0CtG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A link's card, shown on hover over its chip or its row: read only, in the
|
|
3
|
+
* package's one elevated box. A screen that cannot hover draws no preview, and
|
|
4
|
+
* a tap opens the link (Miky, WID-2: "there's no hover on touch").
|
|
5
|
+
*/
|
|
6
|
+
import { type ReactNode } from 'react';
|
|
7
|
+
import type { Linked } from './linked';
|
|
8
|
+
/** Whether this screen can hover. Without `matchMedia` (a test, a server) it is taken to. */
|
|
9
|
+
export declare function useCanHover(): boolean;
|
|
10
|
+
export interface LinkPreviewProps {
|
|
11
|
+
linked: Linked;
|
|
12
|
+
/** The trigger fills its column, as a row does; a chip is inline. */
|
|
13
|
+
block?: boolean;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare function LinkPreview({ linked, block, children }: LinkPreviewProps): import("react").JSX.Element;
|
|
17
|
+
/** The preview drawn open, for a still picture of it: the same box PreviewCard draws. */
|
|
18
|
+
export declare function LinkPreviewOpen({ linked }: {
|
|
19
|
+
linked: Linked;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=LinkPreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkPreview.d.ts","sourceRoot":"","sources":["../src/LinkPreview.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAatC,6FAA6F;AAC7F,wBAAgB,WAAW,IAAI,OAAO,CAMrC;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,qEAAqE;IACrE,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,KAAa,EAAE,QAAQ,EAAE,EAAE,gBAAgB,+BAShF;AAED,yFAAyF;AACzF,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,+BAM7D"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type LinkedKind, type LinkState } from './linked';
|
|
2
|
+
export interface LinkUnavailableProps {
|
|
3
|
+
kind: LinkedKind;
|
|
4
|
+
/** What it is, in a word: "Item". Drawn as "Item — not available.". */
|
|
5
|
+
noun: string;
|
|
6
|
+
/** Where it may still open, for someone who can: its app and address. */
|
|
7
|
+
openIn?: {
|
|
8
|
+
app: string;
|
|
9
|
+
href: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Not available: deleted, or not this reader's to see, which read the same.
|
|
14
|
+
* One line at a row's height, whether a row or a card was to draw. The way
|
|
15
|
+
* out stays, since the app it lives in may still open it for you.
|
|
16
|
+
*/
|
|
17
|
+
export declare function LinkUnavailable({ kind, noun, openIn }: LinkUnavailableProps): import("react").JSX.Element;
|
|
18
|
+
export interface LinkRowProps {
|
|
19
|
+
link: LinkState;
|
|
20
|
+
/** Hovering shows its card. */
|
|
21
|
+
preview?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function LinkRow({ link, preview }: LinkRowProps): import("react").JSX.Element;
|
|
24
|
+
//# sourceMappingURL=LinkRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkRow.d.ts","sourceRoot":"","sources":["../src/LinkRow.tsx"],"names":[],"mappings":"AASA,OAAO,EAAY,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAA;AAKpE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAA;IAChB,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAA;IACZ,yEAAyE;IACzE,MAAM,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CACvC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,oBAAoB,+BAc3E;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,SAAS,CAAA;IACf,+BAA+B;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,OAAc,EAAE,EAAE,YAAY,+BAyD7D"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A part of something longer, shared live: its blocks as they are now, under
|
|
3
|
+
* the header of what it is part of (why:
|
|
4
|
+
* https://github.com/estiva-app/estiva-docs/blob/main/decisions/a-shared-part-of-a-page-is-a-selected-run-of-blocks.md).
|
|
5
|
+
* There is no row or card choice for a part: it draws itself. The app draws
|
|
6
|
+
* the blocks and passes them as `children`.
|
|
7
|
+
*/
|
|
8
|
+
import type { ReactNode } from 'react';
|
|
9
|
+
import type { LinkedKind } from './linked';
|
|
10
|
+
export interface PartCardProps {
|
|
11
|
+
/** Where its lookup stands. Default `ready`. */
|
|
12
|
+
state?: 'ready' | 'loading' | 'unavailable';
|
|
13
|
+
/** What it is part of, by its icon. */
|
|
14
|
+
kind: LinkedKind;
|
|
15
|
+
/** The title of what it is part of. */
|
|
16
|
+
heading?: string;
|
|
17
|
+
/** Opens what it is part of, at the part. */
|
|
18
|
+
href?: string;
|
|
19
|
+
/** The key of what it is part of: "ABC-2". */
|
|
20
|
+
partKey?: string;
|
|
21
|
+
/** What it is part of, in a word, for "A part of this item — not available.". */
|
|
22
|
+
noun?: string;
|
|
23
|
+
/** Where it may still open, for someone who can, when it is not available. */
|
|
24
|
+
openIn?: {
|
|
25
|
+
app: string;
|
|
26
|
+
href: string;
|
|
27
|
+
};
|
|
28
|
+
/** The part's blocks, drawn by the app. */
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export declare function PartCard({ state, kind, heading, href, partKey, noun, openIn, children }: PartCardProps): import("react").JSX.Element;
|
|
32
|
+
//# sourceMappingURL=PartCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PartCard.d.ts","sourceRoot":"","sources":["../src/PartCard.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAI1C,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,aAAa,CAAA;IAC3C,uCAAuC;IACvC,IAAI,EAAE,UAAU,CAAA;IAChB,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,MAAM,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACtC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAe,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,aAAa,+BAwBzH"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type ReactionOption } from './ReactionPicker';
|
|
2
|
+
/**
|
|
3
|
+
* The one reaction row every app draws under a comment or a chat line, from
|
|
4
|
+
* the approved prototype (`concept/comments-everywhere`, Miky 17 October):
|
|
5
|
+
* `Reaction` pills in the order they were first chosen, each saying who
|
|
6
|
+
* reacted on hover, then the add button with `ReactionPicker`. Nobody reacted:
|
|
7
|
+
* no row; the add button sits with the other actions (`AddReactionButton`).
|
|
8
|
+
*
|
|
9
|
+
* What a reaction writes and how reactions are counted stay in
|
|
10
|
+
* `@estiva-app/conversation` (SPEC §6.6): its `groupReactions` answers the
|
|
11
|
+
* `reactions` this takes, and its `REACTION_EMOJI` the five `options`.
|
|
12
|
+
*
|
|
13
|
+
* why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/every-app-writes-and-reacts-with-one-shared-box.md
|
|
14
|
+
*/
|
|
15
|
+
/** One emoji on one target, and who put it there, in the order they reacted. */
|
|
16
|
+
export interface ReactionCount {
|
|
17
|
+
emoji: string;
|
|
18
|
+
by: readonly string[];
|
|
19
|
+
}
|
|
20
|
+
/** "Person one, Person two and you reacted with Makes sense". */
|
|
21
|
+
export declare function whoReacted(reaction: ReactionCount, nameOf: (id: string) => string, options: readonly ReactionOption[], viewer?: string): string;
|
|
22
|
+
export interface AddReactionButtonProps {
|
|
23
|
+
/** The emoji offered, each named. */
|
|
24
|
+
options: readonly ReactionOption[];
|
|
25
|
+
onPick: (emoji: string) => void;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
/** The add button: `ReactionPicker` opens over it. */
|
|
29
|
+
export declare function AddReactionButton({ options, onPick, className }: AddReactionButtonProps): import("react").JSX.Element;
|
|
30
|
+
export interface ReactionRowProps {
|
|
31
|
+
/** Each emoji and who chose it, in the order first chosen. An emoji nobody holds is not drawn. */
|
|
32
|
+
reactions: readonly ReactionCount[];
|
|
33
|
+
/** The emoji offered, each named; also what a pill's name is read from. */
|
|
34
|
+
options: readonly ReactionOption[];
|
|
35
|
+
/** A reactor's name, as "who reacted" says it. */
|
|
36
|
+
nameOf: (id: string) => string;
|
|
37
|
+
/** Who is looking: their pills are lit, and "who reacted" says "you". */
|
|
38
|
+
viewer?: string;
|
|
39
|
+
/** Your reaction on or off. Absent, the row only shows (read-only, signed out). */
|
|
40
|
+
onToggle?: (emoji: string) => void;
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare function ReactionRow({ reactions, options, nameOf, viewer, onToggle, className }: ReactionRowProps): import("react").JSX.Element | null;
|
|
44
|
+
//# sourceMappingURL=ReactionRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactionRow.d.ts","sourceRoot":"","sources":["../src/ReactionRow.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGtE;;;;;;;;;;;;GAYG;AAEH,gFAAgF;AAChF,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,EAAE,SAAS,MAAM,EAAE,CAAA;CACtB;AAOD,iEAAiE;AACjE,wBAAgB,UAAU,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,EAAE,OAAO,EAAE,SAAS,cAAc,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAS/I;AAED,MAAM,WAAW,sBAAsB;IACrC,qCAAqC;IACrC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAA;IAClC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,sDAAsD;AACtD,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,sBAAsB,+BA2BvF;AAED,MAAM,WAAW,gBAAgB;IAC/B,kGAAkG;IAClG,SAAS,EAAE,SAAS,aAAa,EAAE,CAAA;IACnC,2EAA2E;IAC3E,OAAO,EAAE,SAAS,cAAc,EAAE,CAAA;IAClC,kDAAkD;IAClD,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAA;IAC9B,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,mFAAmF;IACnF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,gBAAgB,sCAoBxG"}
|
package/dist/Skeleton.d.ts
CHANGED
|
@@ -8,11 +8,20 @@ import type { CSSProperties } from 'react';
|
|
|
8
8
|
* A list reveals after 150ms (`animate-skeleton-in`, in the preset) so a
|
|
9
9
|
* fast load never flashes a skeleton — Peek's rule.
|
|
10
10
|
*/
|
|
11
|
+
declare const SKELETON_SHAPE: {
|
|
12
|
+
readonly bar: "rounded-sm";
|
|
13
|
+
readonly round: "rounded-full";
|
|
14
|
+
readonly control: "rounded-md";
|
|
15
|
+
};
|
|
11
16
|
/** One pulsing bar at the inset colour: the piece every placeholder here is
|
|
12
|
-
* built from. It draws nothing of its own — give it a width and a height.
|
|
13
|
-
|
|
17
|
+
* built from. It draws nothing of its own — give it a width and a height.
|
|
18
|
+
* `on="inset"` on an inset card, where the inset colour would vanish;
|
|
19
|
+
* `shape` for a line of words, a face or a ring, or a control. */
|
|
20
|
+
export declare function SkeletonBar({ className, style, on, shape }: {
|
|
14
21
|
className?: string;
|
|
15
22
|
style?: CSSProperties;
|
|
23
|
+
on?: 'surface' | 'inset';
|
|
24
|
+
shape?: keyof typeof SKELETON_SHAPE;
|
|
16
25
|
}): import("react").JSX.Element;
|
|
17
26
|
/** A 32px row: a 16px square and a bar, like a row with a face and a name. */
|
|
18
27
|
export declare function SkeletonRow({ barWidth }: {
|
|
@@ -23,4 +32,5 @@ export declare function SkeletonList({ rows, className }: {
|
|
|
23
32
|
rows?: number;
|
|
24
33
|
className?: string;
|
|
25
34
|
}): import("react").JSX.Element;
|
|
35
|
+
export {};
|
|
26
36
|
//# sourceMappingURL=Skeleton.d.ts.map
|
package/dist/Skeleton.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../src/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C;;;;;;;;GAQG;AACH;
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../src/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C;;;;;;;;GAQG;AACH,QAAA,MAAM,cAAc;;;;CAA+E,CAAA;AAEnG;;;mEAGmE;AACnE,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAc,EAAE,KAAa,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,aAAa,CAAC;IAAC,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,OAAO,cAAc,CAAA;CAAE,+BAE5L;AAID,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,EAAE,QAAc,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,+BAOpE;AAED,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,EAAE,IAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAQ1F"}
|
package/dist/editor.d.ts
CHANGED
|
@@ -9,6 +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
13
|
export { InlineText, type InlineTextProps, type InlineTextHandle } from './InlineText';
|
|
13
14
|
export { CommentHighlights, setCommentAnchors, commentPlace, commentElement, anchorOfSelection, quoteText, type CommentAnchor, type CommentHighlightsOptions, type CommentPlace, type CommentQuote, type SelectionAnchor, } from './CommentHighlights';
|
|
14
15
|
export { PastedImages, pastedImages, pastedImageName, type PastedImagesOptions, type ClipboardSource } from './PastedImages';
|
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,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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