@webority/chat-react 0.128.0 → 0.134.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/chat-react.js +14 -11
- package/dist/types/ChatAgentTyping.d.ts +4 -0
- package/dist/types/ChatAuthorBadge.d.ts +4 -0
- package/dist/types/ChatComposer.d.ts +10 -0
- package/dist/types/ChatConversationActions.d.ts +7 -0
- package/dist/types/ChatEmbed.d.ts +5 -0
- package/dist/types/ChatExplain.d.ts +16 -0
- package/dist/types/ChatFooter.d.ts +8 -0
- package/dist/types/ChatFrame.d.ts +26 -0
- package/dist/types/ChatHistory.d.ts +9 -0
- package/dist/types/ChatLauncher.d.ts +5 -0
- package/dist/types/ChatLiveStatus.d.ts +4 -0
- package/dist/types/ChatMessageActions.d.ts +10 -0
- package/dist/types/ChatNudge.d.ts +10 -0
- package/dist/types/ChatOpenTickets.d.ts +9 -0
- package/dist/types/ChatPage.d.ts +49 -0
- package/dist/types/ChatPanel.d.ts +9 -0
- package/dist/types/ChatPastChats.d.ts +9 -0
- package/dist/types/ChatReadAloudButton.d.ts +8 -0
- package/dist/types/ChatShell.d.ts +32 -0
- package/dist/types/ChatStarters.d.ts +8 -0
- package/dist/types/ChatThread.d.ts +15 -0
- package/dist/types/chatLive.d.ts +5 -0
- package/dist/types/chatPrint.d.ts +6 -0
- package/dist/types/chatShared.d.ts +10 -0
- package/dist/types/dictationText.d.ts +31 -0
- package/dist/types/index.d.ts +20 -14
- package/dist/types/loaders/ChatLoader.d.ts +21 -0
- package/dist/types/loaders/OrbLoader.d.ts +11 -0
- package/dist/types/loaders/PhrasesLoader.d.ts +14 -0
- package/dist/types/loaders/SkeletonLoader.d.ts +11 -0
- package/dist/types/loaders/StepsLoader.d.ts +12 -0
- package/dist/types/loaders/TypingPill.d.ts +12 -0
- package/dist/types/recaptcha.d.ts +2 -0
- package/dist/types/renderers/ActionPart.d.ts +4 -0
- package/dist/types/renderers/ChartPart.d.ts +4 -0
- package/dist/types/renderers/ChatLinkContext.d.ts +8 -0
- package/dist/types/renderers/FigureText.d.ts +5 -0
- package/dist/types/renderers/FiguresPart.d.ts +4 -0
- package/dist/types/renderers/FilePart.d.ts +4 -0
- package/dist/types/renderers/HandoffPart.d.ts +4 -0
- package/dist/types/renderers/ImagePart.d.ts +4 -0
- package/dist/types/renderers/InputRequestPart.d.ts +5 -0
- package/dist/types/renderers/NoticePart.d.ts +3 -0
- package/dist/types/renderers/QuickRepliesPart.d.ts +4 -0
- package/dist/types/renderers/RecordCardPart.d.ts +4 -0
- package/dist/types/renderers/SourcesPart.d.ts +4 -0
- package/dist/types/renderers/TablePart.d.ts +4 -0
- package/dist/types/renderers/TextPart.d.ts +5 -0
- package/dist/types/renderers/TicketPart.d.ts +4 -0
- package/dist/types/renderers/VoiceClipPart.d.ts +7 -0
- package/dist/types/renderers/index.d.ts +32 -0
- package/dist/types/useAutoOpen.d.ts +11 -0
- package/dist/types/useChat.d.ts +34 -76
- package/dist/types/useChatDictation.d.ts +24 -0
- package/dist/types/useChatExplain.d.ts +57 -0
- package/dist/types/useChatHandoff.d.ts +19 -0
- package/dist/types/useChatReadAloud.d.ts +16 -0
- package/dist/types/useChatSound.d.ts +7 -0
- package/dist/types/useChatSpeech.d.ts +7 -0
- package/dist/types/useLauncherAvoid.d.ts +1 -0
- package/dist/types/useReducedMotion.d.ts +1 -0
- package/dist/types/useTranscriptActions.d.ts +12 -0
- package/package.json +18 -20
- package/README.md +0 -320
- package/dist/guidance.json +0 -216
- package/dist/types/ChatMarkdown.meta.d.ts +0 -31
- package/dist/types/components/ActionCard.d.ts +0 -27
- package/dist/types/components/ActionCard.meta.d.ts +0 -89
- package/dist/types/components/ChatComposer.d.ts +0 -38
- package/dist/types/components/ChatComposer.meta.d.ts +0 -56
- package/dist/types/components/ChatConversationList.d.ts +0 -20
- package/dist/types/components/ChatConversationList.meta.d.ts +0 -37
- package/dist/types/components/ChatLauncher.d.ts +0 -31
- package/dist/types/components/ChatLauncher.meta.d.ts +0 -50
- package/dist/types/components/ChatMessage.d.ts +0 -61
- package/dist/types/components/ChatMessage.meta.d.ts +0 -173
- package/dist/types/components/ChatPanel.d.ts +0 -74
- package/dist/types/components/ChatPanel.meta.d.ts +0 -228
- package/dist/types/components/ChatThread.d.ts +0 -54
- package/dist/types/components/ChatThread.meta.d.ts +0 -151
- package/dist/types/components/CitationChip.d.ts +0 -15
- package/dist/types/components/CitationChip.meta.d.ts +0 -48
- package/dist/types/components/ComposerAttachments.d.ts +0 -14
- package/dist/types/components/ConfirmCard.d.ts +0 -24
- package/dist/types/components/ConfirmCard.meta.d.ts +0 -43
- package/dist/types/components/ReplyRating.d.ts +0 -16
- package/dist/types/components/ReplyRating.meta.d.ts +0 -34
- package/dist/types/markdown.d.ts +0 -22
- /package/{LICENSE → LICENSE.txt} +0 -0
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
export declare const meta: {
|
|
2
|
-
readonly name: "ChatThread";
|
|
3
|
-
readonly marker: "ChatThread";
|
|
4
|
-
readonly platforms: readonly ["web"];
|
|
5
|
-
readonly acceptsChildren: false;
|
|
6
|
-
readonly props: {
|
|
7
|
-
readonly turns: {
|
|
8
|
-
readonly type: "array";
|
|
9
|
-
readonly required: true;
|
|
10
|
-
readonly description: "The conversation, oldest turn first. With none, the empty state shows.";
|
|
11
|
-
readonly itemFields: {
|
|
12
|
-
readonly id: {
|
|
13
|
-
readonly type: "string";
|
|
14
|
-
readonly required: true;
|
|
15
|
-
readonly description: "Local key for the turn.";
|
|
16
|
-
};
|
|
17
|
-
readonly question: {
|
|
18
|
-
readonly type: "string";
|
|
19
|
-
readonly required: true;
|
|
20
|
-
readonly description: "What the person asked.";
|
|
21
|
-
};
|
|
22
|
-
readonly answer: {
|
|
23
|
-
readonly type: "string";
|
|
24
|
-
readonly required: true;
|
|
25
|
-
readonly description: "The answer shown: the streamed text so far, then the reply of record.";
|
|
26
|
-
};
|
|
27
|
-
readonly streaming: {
|
|
28
|
-
readonly type: "boolean";
|
|
29
|
-
readonly required: true;
|
|
30
|
-
readonly description: "True while the answer is still arriving.";
|
|
31
|
-
};
|
|
32
|
-
readonly step: {
|
|
33
|
-
readonly type: "string";
|
|
34
|
-
readonly required: false;
|
|
35
|
-
readonly description: "The name of the tool the assistant is running. Unset when none is.";
|
|
36
|
-
};
|
|
37
|
-
readonly error: {
|
|
38
|
-
readonly type: "object";
|
|
39
|
-
readonly required: false;
|
|
40
|
-
readonly description: "Set when the turn failed.";
|
|
41
|
-
readonly fields: {
|
|
42
|
-
readonly code: {
|
|
43
|
-
readonly type: "string";
|
|
44
|
-
readonly required: true;
|
|
45
|
-
readonly description: "A short code for the failure.";
|
|
46
|
-
};
|
|
47
|
-
readonly message: {
|
|
48
|
-
readonly type: "string";
|
|
49
|
-
readonly required: true;
|
|
50
|
-
readonly description: "Written for the person.";
|
|
51
|
-
};
|
|
52
|
-
readonly resetsAtUtc: {
|
|
53
|
-
readonly type: "string";
|
|
54
|
-
readonly required: false;
|
|
55
|
-
readonly description: "When a limit resets, as an ISO time.";
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
readonly actions: {
|
|
60
|
-
readonly type: "array";
|
|
61
|
-
readonly required: true;
|
|
62
|
-
readonly description: "Support actions the assistant prepared for this turn.";
|
|
63
|
-
};
|
|
64
|
-
readonly messageId: {
|
|
65
|
-
readonly type: "string";
|
|
66
|
-
readonly required: false;
|
|
67
|
-
readonly description: "The stored reply's id. The rating needs it.";
|
|
68
|
-
};
|
|
69
|
-
readonly questionId: {
|
|
70
|
-
readonly type: "string";
|
|
71
|
-
readonly required: false;
|
|
72
|
-
readonly description: "The stored question's id. Editing the question needs it.";
|
|
73
|
-
};
|
|
74
|
-
readonly stopped: {
|
|
75
|
-
readonly type: "boolean";
|
|
76
|
-
readonly required: false;
|
|
77
|
-
readonly description: "True when the person stopped the answer before it finished.";
|
|
78
|
-
};
|
|
79
|
-
readonly attachments: {
|
|
80
|
-
readonly type: "array";
|
|
81
|
-
readonly required: false;
|
|
82
|
-
readonly description: "The files sent with the question.";
|
|
83
|
-
};
|
|
84
|
-
readonly rating: {
|
|
85
|
-
readonly type: "enum";
|
|
86
|
-
readonly values: readonly ["Up", "Down"];
|
|
87
|
-
readonly required: false;
|
|
88
|
-
readonly description: "The rating already given to the reply.";
|
|
89
|
-
};
|
|
90
|
-
readonly ratingNote: {
|
|
91
|
-
readonly type: "string";
|
|
92
|
-
readonly required: false;
|
|
93
|
-
readonly description: "The note saved with the rating.";
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
readonly empty: {
|
|
98
|
-
readonly type: "node";
|
|
99
|
-
readonly required: false;
|
|
100
|
-
readonly description: "Shown when there are no turns; defaults to a short How can I help state.";
|
|
101
|
-
};
|
|
102
|
-
readonly linkComponent: {
|
|
103
|
-
readonly type: "node";
|
|
104
|
-
readonly required: false;
|
|
105
|
-
readonly description: "A router link component for in-app links in answers; it receives to.";
|
|
106
|
-
};
|
|
107
|
-
readonly labels: {
|
|
108
|
-
readonly type: "object";
|
|
109
|
-
readonly required: false;
|
|
110
|
-
readonly description: "Replacements for the built-in wording, such as the thread name and the empty-state text.";
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
readonly examples: readonly [{
|
|
114
|
-
readonly id: "ChatThread";
|
|
115
|
-
readonly title: "Default";
|
|
116
|
-
readonly props: {
|
|
117
|
-
readonly turns: readonly [{
|
|
118
|
-
readonly id: "t-1";
|
|
119
|
-
readonly question: "What is due?";
|
|
120
|
-
readonly answer: "Two invoices.";
|
|
121
|
-
readonly streaming: false;
|
|
122
|
-
readonly actions: readonly [];
|
|
123
|
-
}, {
|
|
124
|
-
readonly id: "t-2";
|
|
125
|
-
readonly question: "And next?";
|
|
126
|
-
readonly answer: "One more.";
|
|
127
|
-
readonly streaming: false;
|
|
128
|
-
readonly actions: readonly [];
|
|
129
|
-
}];
|
|
130
|
-
};
|
|
131
|
-
}, {
|
|
132
|
-
readonly id: "ChatThread.empty";
|
|
133
|
-
readonly title: "No turns yet";
|
|
134
|
-
readonly props: {
|
|
135
|
-
readonly turns: readonly [];
|
|
136
|
-
};
|
|
137
|
-
}];
|
|
138
|
-
readonly usage: {
|
|
139
|
-
readonly when: readonly ["Show a whole conversation, oldest turn first, in a panel or a page.", "Let the thread follow the newest text as an answer streams."];
|
|
140
|
-
readonly whenNot: readonly [{
|
|
141
|
-
readonly text: "Showing one turn on its own.";
|
|
142
|
-
readonly instead: "ChatMessage";
|
|
143
|
-
}, {
|
|
144
|
-
readonly text: "Showing the full assistant drawer with its header and question box.";
|
|
145
|
-
readonly instead: "ChatPanel";
|
|
146
|
-
}];
|
|
147
|
-
readonly do: readonly [];
|
|
148
|
-
readonly dont: readonly [];
|
|
149
|
-
readonly a11y: readonly ["The turns are an ordered list named by the thread label.", "Each answer is a polite live region; see ChatMessage.", "Only the nearest box that scrolls on its own follows the newest text, so the page itself never jumps."];
|
|
150
|
-
};
|
|
151
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A citation the assistant wrote as `[inner]`: a chip that opens the source it names.
|
|
3
|
-
*
|
|
4
|
-
* @param {object} props
|
|
5
|
-
* @param {string} props.citation
|
|
6
|
-
* @param {string} [props.label]
|
|
7
|
-
* @param {string} [props.ariaLabel]
|
|
8
|
-
* @param {(citation: string) => void} props.onOpen
|
|
9
|
-
*/
|
|
10
|
-
export default function CitationChip({ citation, label, ariaLabel, onOpen }: {
|
|
11
|
-
citation: string;
|
|
12
|
-
label?: string;
|
|
13
|
-
ariaLabel?: string;
|
|
14
|
-
onOpen: (citation: string) => void;
|
|
15
|
-
}): import("react").JSX.Element;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export declare const meta: {
|
|
2
|
-
readonly name: "CitationChip";
|
|
3
|
-
readonly marker: null;
|
|
4
|
-
readonly platforms: readonly ["web"];
|
|
5
|
-
readonly acceptsChildren: false;
|
|
6
|
-
readonly props: {
|
|
7
|
-
readonly citation: {
|
|
8
|
-
readonly type: "string";
|
|
9
|
-
readonly required: true;
|
|
10
|
-
readonly description: "The source the assistant named in its reply, written as [inner] in the text. It is the chip's text and its accessible name unless label or ariaLabel replace them.";
|
|
11
|
-
};
|
|
12
|
-
readonly label: {
|
|
13
|
-
readonly type: "string";
|
|
14
|
-
readonly required: false;
|
|
15
|
-
readonly description: "Text on the chip. Defaults to the citation.";
|
|
16
|
-
};
|
|
17
|
-
readonly ariaLabel: {
|
|
18
|
-
readonly type: "string";
|
|
19
|
-
readonly required: false;
|
|
20
|
-
readonly description: "Accessible label for the chip. Defaults to the citation.";
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
readonly examples: readonly [{
|
|
24
|
-
readonly id: "CitationChip";
|
|
25
|
-
readonly title: "Default";
|
|
26
|
-
readonly props: {
|
|
27
|
-
readonly citation: "Clause 4.2";
|
|
28
|
-
};
|
|
29
|
-
}, {
|
|
30
|
-
readonly id: "CitationChip.label";
|
|
31
|
-
readonly title: "With a label";
|
|
32
|
-
readonly props: {
|
|
33
|
-
readonly citation: "Table 1";
|
|
34
|
-
readonly label: "Table 1, page 3";
|
|
35
|
-
readonly ariaLabel: "Open Table 1";
|
|
36
|
-
};
|
|
37
|
-
}];
|
|
38
|
-
readonly usage: {
|
|
39
|
-
readonly when: readonly ["Show a source the assistant named in a reply as a small chip the person can select to open it.", "Pair it with splitCitations from @webority/markdown-core (re-exported by @webority/chat-react) to turn [source] runs in reply text into chips."];
|
|
40
|
-
readonly whenNot: readonly [{
|
|
41
|
-
readonly text: "Showing a general label or removable token that is not a source.";
|
|
42
|
-
readonly instead: "AppChip";
|
|
43
|
-
}];
|
|
44
|
-
readonly do: readonly [];
|
|
45
|
-
readonly dont: readonly [];
|
|
46
|
-
readonly a11y: readonly ["The chip is a button named by ariaLabel, or by the citation when none is given.", "Selecting it by pointer or keyboard calls onOpen with the citation."];
|
|
47
|
-
};
|
|
48
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The files attached to the question being written. A failed upload stays listed with its
|
|
3
|
-
* error, so the person can remove it.
|
|
4
|
-
*
|
|
5
|
-
* @param {object} props
|
|
6
|
-
* @param {import('@webority/markdown-core/chat').ComposerAttachment[]} props.attachments
|
|
7
|
-
* @param {(key: string) => unknown} props.onRemove Called with the attachment key.
|
|
8
|
-
* @param {import('@webority/markdown-core/chat').ChatLabels} props.labels The merged labels.
|
|
9
|
-
*/
|
|
10
|
-
export default function ComposerAttachments({ attachments, onRemove, labels }: {
|
|
11
|
-
attachments: import('@webority/markdown-core/chat').ComposerAttachment[];
|
|
12
|
-
onRemove: (key: string) => unknown;
|
|
13
|
-
labels: import('@webority/markdown-core/chat').ChatLabels;
|
|
14
|
-
}): import("react").JSX.Element | null;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* One general card for an action the assistant prepared. Nothing happens until the person confirms.
|
|
3
|
-
* The card moves from ready to sending to done, or to dismissed when the person says not now. A
|
|
4
|
-
* failed confirm shows its message and returns to ready, so the person can try again.
|
|
5
|
-
*
|
|
6
|
-
* @param {object} props
|
|
7
|
-
* @param {string} props.title
|
|
8
|
-
* @param {string} [props.subtitle]
|
|
9
|
-
* @param {string[]} [props.lines]
|
|
10
|
-
* @param {string} [props.note]
|
|
11
|
-
* @param {() => Promise<{ message?: string } | void>} props.onConfirm Sends the person's yes; resolves to
|
|
12
|
-
* an optional message for the done state. A rejection's `message` is shown when present.
|
|
13
|
-
* @param {Partial<typeof import('@webority/markdown-core/chat').DEFAULT_CHAT_LABELS>} [props.labels]
|
|
14
|
-
*/
|
|
15
|
-
export default function ConfirmCard({ title, subtitle, lines, note, onConfirm, labels: labelsProp }: {
|
|
16
|
-
title: string;
|
|
17
|
-
subtitle?: string;
|
|
18
|
-
lines?: string[];
|
|
19
|
-
note?: string;
|
|
20
|
-
onConfirm: () => Promise<{
|
|
21
|
-
message?: string;
|
|
22
|
-
} | void>;
|
|
23
|
-
labels?: Partial<typeof import('@webority/markdown-core/chat').DEFAULT_CHAT_LABELS>;
|
|
24
|
-
}): import("react").JSX.Element;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export declare const meta: {
|
|
2
|
-
readonly name: "ConfirmCard";
|
|
3
|
-
readonly marker: null;
|
|
4
|
-
readonly platforms: readonly ["web"];
|
|
5
|
-
readonly acceptsChildren: false;
|
|
6
|
-
readonly props: {
|
|
7
|
-
readonly title: {
|
|
8
|
-
readonly type: "string";
|
|
9
|
-
readonly required: true;
|
|
10
|
-
readonly description: "The action the assistant prepared, written as what happens when the person confirms.";
|
|
11
|
-
};
|
|
12
|
-
readonly subtitle: {
|
|
13
|
-
readonly type: "string";
|
|
14
|
-
readonly description: "A line under the title that says more about the action.";
|
|
15
|
-
};
|
|
16
|
-
readonly lines: {
|
|
17
|
-
readonly type: "array";
|
|
18
|
-
readonly description: "One paragraph per entry, shown above the note.";
|
|
19
|
-
};
|
|
20
|
-
readonly note: {
|
|
21
|
-
readonly type: "string";
|
|
22
|
-
readonly description: "Replaces the default line saying nothing is sent until the person confirms.";
|
|
23
|
-
};
|
|
24
|
-
readonly labels: {
|
|
25
|
-
readonly type: "object";
|
|
26
|
-
readonly description: "Replaces any of the chat texts the card shows, such as the confirm and not now button texts and the done message.";
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
readonly examples: readonly [{
|
|
30
|
-
readonly id: "ConfirmCard";
|
|
31
|
-
readonly title: "Default";
|
|
32
|
-
readonly props: {
|
|
33
|
-
readonly title: "Copy assessment";
|
|
34
|
-
};
|
|
35
|
-
}];
|
|
36
|
-
readonly usage: {
|
|
37
|
-
readonly when: readonly ["The assistant has prepared an action and nothing should happen until the person says yes.", "The action is one step the person can send now or decline."];
|
|
38
|
-
readonly whenNot: readonly [];
|
|
39
|
-
readonly do: readonly [];
|
|
40
|
-
readonly dont: readonly [];
|
|
41
|
-
readonly a11y: readonly ["Confirm and Not now are native buttons, and Confirm shows its loading state while the action is sent.", "The done message is a status message.", "A failed confirm shows its message in an alert above the buttons and returns the card to ready."];
|
|
42
|
-
};
|
|
43
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Thumbs for one reply. Up saves at once. Down also saves at once, then offers an optional note
|
|
3
|
-
* that saves the same rating again with the note. Either choice can be changed.
|
|
4
|
-
*
|
|
5
|
-
* @param {object} props
|
|
6
|
-
* @param {"Up"|"Down"|null} [props.rating]
|
|
7
|
-
* @param {(rating: "Up"|"Down", note?: string) => Promise<unknown>} props.onRate Rejects on failure.
|
|
8
|
-
* @param {number} [props.noteMaxLength]
|
|
9
|
-
* @param {Partial<typeof import('@webority/markdown-core/chat').DEFAULT_CHAT_LABELS>} [props.labels]
|
|
10
|
-
*/
|
|
11
|
-
export default function ReplyRating({ rating, onRate, noteMaxLength, labels: labelOverrides }: {
|
|
12
|
-
rating?: "Up" | "Down" | null;
|
|
13
|
-
onRate: (rating: "Up" | "Down", note?: string) => Promise<unknown>;
|
|
14
|
-
noteMaxLength?: number;
|
|
15
|
-
labels?: Partial<typeof import('@webority/markdown-core/chat').DEFAULT_CHAT_LABELS>;
|
|
16
|
-
}): import("react").JSX.Element;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export declare const meta: {
|
|
2
|
-
readonly name: "ReplyRating";
|
|
3
|
-
readonly marker: null;
|
|
4
|
-
readonly platforms: readonly ["web"];
|
|
5
|
-
readonly acceptsChildren: false;
|
|
6
|
-
readonly props: {
|
|
7
|
-
readonly rating: {
|
|
8
|
-
readonly type: "enum";
|
|
9
|
-
readonly values: readonly ["Up", "Down"];
|
|
10
|
-
readonly description: "The rating already saved for the reply. Leave it out when the reply is not rated yet.";
|
|
11
|
-
};
|
|
12
|
-
readonly noteMaxLength: {
|
|
13
|
-
readonly type: "number";
|
|
14
|
-
readonly default: 1000;
|
|
15
|
-
readonly description: "The most characters the optional note after a not helpful rating takes.";
|
|
16
|
-
};
|
|
17
|
-
readonly labels: {
|
|
18
|
-
readonly type: "object";
|
|
19
|
-
readonly description: "Replaces any of the chat texts the rating buttons, the note field and the thank you line show.";
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
readonly examples: readonly [{
|
|
23
|
-
readonly id: "ReplyRating";
|
|
24
|
-
readonly title: "Default";
|
|
25
|
-
readonly props: {};
|
|
26
|
-
}];
|
|
27
|
-
readonly usage: {
|
|
28
|
-
readonly when: readonly ["A reply can be rated helpful or not helpful, with an optional note after a not helpful rating."];
|
|
29
|
-
readonly whenNot: readonly [];
|
|
30
|
-
readonly do: readonly [];
|
|
31
|
-
readonly dont: readonly [];
|
|
32
|
-
readonly a11y: readonly ["Both rating buttons are native buttons that expose their state through aria-pressed.", "The thank you line is a status message.", "The note field has a visible label and a hint, and the person can send the note or skip it."];
|
|
33
|
-
};
|
|
34
|
-
};
|
package/dist/types/markdown.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A chat reply, drawn by `AppMarkdown` with the chat rules: a link opens only when `resolveLink`
|
|
3
|
-
* maps its `scheme:kind/id` href to an in-app route, and a heading draws as a bold line so a reply
|
|
4
|
-
* never changes the page outline. Any other link shows its label as text, and raw HTML shows as text.
|
|
5
|
-
*
|
|
6
|
-
* @param {object} props
|
|
7
|
-
* @param {string} props.text
|
|
8
|
-
* @param {(href: string) => string|null|undefined} [props.resolveLink] Maps `scheme:kind/id` to a
|
|
9
|
-
* route such as "/support?ticket=3f2a", or null to leave it as text.
|
|
10
|
-
* @param {import('react').ElementType} [props.linkComponent] A router link (it receives `to`).
|
|
11
|
-
* @param {(inner: string) => boolean} [props.isCitation] Which `[inner]` runs draw as citation chips.
|
|
12
|
-
* @param {(citation: string) => void} [props.onOpenCitation] Called with the citation when its chip is selected.
|
|
13
|
-
* @param {string} [props.className]
|
|
14
|
-
*/
|
|
15
|
-
export declare function ChatMarkdown({ text, resolveLink, linkComponent, isCitation, onOpenCitation, className }: {
|
|
16
|
-
text: string;
|
|
17
|
-
resolveLink?: (href: string) => string | null | undefined;
|
|
18
|
-
linkComponent?: import('react').ElementType;
|
|
19
|
-
isCitation?: (inner: string) => boolean;
|
|
20
|
-
onOpenCitation?: (citation: string) => void;
|
|
21
|
-
className?: string;
|
|
22
|
-
}): import("react").JSX.Element;
|
/package/{LICENSE → LICENSE.txt}
RENAMED
|
File without changes
|