@mieweb/ui 0.6.1-dev.149 → 0.6.1-dev.150
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/brands/index.cjs +22 -22
- package/dist/brands/index.js +5 -5
- package/dist/chunk-2T4JU5RH.cjs +1156 -0
- package/dist/chunk-2T4JU5RH.cjs.map +1 -0
- package/dist/chunk-3SSXDWD7.js +363 -0
- package/dist/chunk-3SSXDWD7.js.map +1 -0
- package/dist/{chunk-MARLXJQO.cjs → chunk-6R2ZPDN7.cjs} +7 -7
- package/dist/{chunk-MARLXJQO.cjs.map → chunk-6R2ZPDN7.cjs.map} +1 -1
- package/dist/{chunk-WHUD3XHR.cjs → chunk-7PA26KBF.cjs} +15 -3
- package/dist/chunk-7PA26KBF.cjs.map +1 -0
- package/dist/chunk-ASLZUFH4.js +1967 -0
- package/dist/chunk-ASLZUFH4.js.map +1 -0
- package/dist/chunk-FADQVM4M.cjs +2017 -0
- package/dist/chunk-FADQVM4M.cjs.map +1 -0
- package/dist/{chunk-DFT7TYKL.cjs → chunk-H4T5T65N.cjs} +6 -3
- package/dist/chunk-H4T5T65N.cjs.map +1 -0
- package/dist/chunk-I6CY5C6A.js +12 -0
- package/dist/chunk-I6CY5C6A.js.map +1 -0
- package/dist/chunk-JFLC7SHM.cjs +35 -0
- package/dist/chunk-JFLC7SHM.cjs.map +1 -0
- package/dist/chunk-LZPPH5BW.cjs +368 -0
- package/dist/chunk-LZPPH5BW.cjs.map +1 -0
- package/dist/{chunk-3OHVUXDG.js → chunk-M7BLVBL4.js} +6 -3
- package/dist/chunk-M7BLVBL4.js.map +1 -0
- package/dist/chunk-PM2I3QKM.cjs +1419 -0
- package/dist/chunk-PM2I3QKM.cjs.map +1 -0
- package/dist/{chunk-TW6DXMSD.js → chunk-R6PBBPU3.js} +2 -2
- package/dist/{chunk-TW6DXMSD.js.map → chunk-R6PBBPU3.js.map} +1 -1
- package/dist/{chunk-33PO3J4O.js → chunk-RXY5SD3O.js} +15 -3
- package/dist/chunk-RXY5SD3O.js.map +1 -0
- package/dist/{chunk-AEGYWRSL.js → chunk-TXYTMU3K.js} +3 -3
- package/dist/{chunk-AEGYWRSL.js.map → chunk-TXYTMU3K.js.map} +1 -1
- package/dist/chunk-UHPQYBXQ.js +1124 -0
- package/dist/chunk-UHPQYBXQ.js.map +1 -0
- package/dist/chunk-XQE26F3G.js +1383 -0
- package/dist/chunk-XQE26F3G.js.map +1 -0
- package/dist/{chunk-26YNFCOC.cjs → chunk-Z6NRP4Z5.cjs} +2 -2
- package/dist/{chunk-26YNFCOC.cjs.map → chunk-Z6NRP4Z5.cjs.map} +1 -1
- package/dist/components/Dropdown/index.cjs +7 -7
- package/dist/components/Dropdown/index.d.cts +1 -1
- package/dist/components/Dropdown/index.d.ts +1 -1
- package/dist/components/Dropdown/index.js +1 -1
- package/dist/components/RichTextEditor/index.cjs +5 -5
- package/dist/components/RichTextEditor/index.js +2 -2
- package/dist/components/SuperChat/index.cjs +1319 -0
- package/dist/components/SuperChat/index.cjs.map +1 -0
- package/dist/components/SuperChat/index.d.cts +189 -0
- package/dist/components/SuperChat/index.d.ts +189 -0
- package/dist/components/SuperChat/index.js +1282 -0
- package/dist/components/SuperChat/index.js.map +1 -0
- package/dist/components/SuperChat/plugins/index.cjs +1221 -0
- package/dist/components/SuperChat/plugins/index.cjs.map +1 -0
- package/dist/components/SuperChat/plugins/index.d.cts +253 -0
- package/dist/components/SuperChat/plugins/index.d.ts +253 -0
- package/dist/components/SuperChat/plugins/index.js +1181 -0
- package/dist/components/SuperChat/plugins/index.js.map +1 -0
- package/dist/datavis.cjs +18 -362
- package/dist/datavis.cjs.map +1 -1
- package/dist/datavis.js +1 -361
- package/dist/datavis.js.map +1 -1
- package/dist/index.cjs +1297 -5412
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -240
- package/dist/index.d.ts +44 -240
- package/dist/index.js +759 -5037
- package/dist/index.js.map +1 -1
- package/dist/nitroTableGrid-FWRCDE4N.js +22 -0
- package/dist/nitroTableGrid-FWRCDE4N.js.map +1 -0
- package/dist/nitroTableGrid-IY75TQJ2.cjs +44 -0
- package/dist/nitroTableGrid-IY75TQJ2.cjs.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/tailwind-preset.cjs +4 -4
- package/dist/tailwind-preset.js +1 -1
- package/dist/types-BFFgW6qy.d.ts +240 -0
- package/dist/types-BzeY_kYO.d.cts +242 -0
- package/dist/types-BzeY_kYO.d.ts +242 -0
- package/dist/types-CRt5IPNL.d.cts +240 -0
- package/package.json +41 -4
- package/dist/chunk-33PO3J4O.js.map +0 -1
- package/dist/chunk-3OHVUXDG.js.map +0 -1
- package/dist/chunk-DFT7TYKL.cjs.map +0 -1
- package/dist/chunk-WHUD3XHR.cjs.map +0 -1
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { S as SuperChatConversation, a as SuperChatRenderPlugin, A as AttachmentKind, b as SuperChatLinkBuilder, C as ComposerAttachment, c as SuperChatRef } from '../../types-BFFgW6qy.js';
|
|
3
|
+
export { G as GenUIBlockPayload, d as GenUIPrefetchPolicy, e as GenUIRegistry, f as GenUIWidgetEntry, g as GenUIWidgetProps, P as Participant, h as ParticipantKind, i as ParticipantStatus, j as StandardSchemaV1, k as SuperChatChannel, l as SuperChatItemType, m as SuperChatMessage, n as SuperChatPluggable, o as SuperChatPluggableList } from '../../types-BFFgW6qy.js';
|
|
4
|
+
import { b as AIRenderTextContent } from '../../types-BzeY_kYO.js';
|
|
5
|
+
export { A as AIMessageContent, a as AIMessageStatus, c as AITextRenderContext, M as MCPResourceLink } from '../../types-BzeY_kYO.js';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
|
|
8
|
+
interface SuperChatProps {
|
|
9
|
+
/** The conversation to display (host-owned state). */
|
|
10
|
+
conversation: SuperChatConversation;
|
|
11
|
+
/** The participant id representing the local user (alignment + compose). */
|
|
12
|
+
currentParticipantId?: string;
|
|
13
|
+
/** Opt-in rich render plugins (code/math/genui/…). */
|
|
14
|
+
renderPlugins?: SuperChatRenderPlugin[];
|
|
15
|
+
/** Override the entire text renderer (advanced). */
|
|
16
|
+
renderTextContent?: AIRenderTextContent;
|
|
17
|
+
/** Treat content as trusted and skip sanitization (host-authored only). */
|
|
18
|
+
trustedContent?: boolean;
|
|
19
|
+
/** Disable the composer. */
|
|
20
|
+
readOnly?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* File categories the composer accepts for paste and the paperclip picker.
|
|
23
|
+
* Defaults to `['image', 'video', 'audio', 'pdf']`.
|
|
24
|
+
*/
|
|
25
|
+
acceptedFileTypes?: AttachmentKind[];
|
|
26
|
+
/**
|
|
27
|
+
* Thread ordering.
|
|
28
|
+
* - `'asc'` (default): oldest → newest, anchored to the bottom like a
|
|
29
|
+
* classic messenger (auto-scrolls to the newest message).
|
|
30
|
+
* - `'desc'`: newest → oldest, anchored to the top like a social feed
|
|
31
|
+
* (auto-scrolls to the top when a new message arrives).
|
|
32
|
+
*/
|
|
33
|
+
order?: 'asc' | 'desc';
|
|
34
|
+
/**
|
|
35
|
+
* Virtualize the message thread (windowed rendering). Only the rows near the
|
|
36
|
+
* viewport are mounted, so very long threads (hundreds to thousands of
|
|
37
|
+
* messages) stay responsive. Off by default — enable for long histories.
|
|
38
|
+
*/
|
|
39
|
+
virtualized?: boolean;
|
|
40
|
+
/** Build hrefs for `ref` thread items. */
|
|
41
|
+
linkBuilder?: SuperChatLinkBuilder;
|
|
42
|
+
/** Additional class name. */
|
|
43
|
+
className?: string;
|
|
44
|
+
onMessageSent?: (text: string, meta: {
|
|
45
|
+
conversation: SuperChatConversation;
|
|
46
|
+
mentions: string[];
|
|
47
|
+
attachments: ComposerAttachment[];
|
|
48
|
+
}) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Fired when the local user saves an edit to one of their own messages.
|
|
51
|
+
* Providing this enables the inline "Edit" affordance on self-authored
|
|
52
|
+
* messages (the host owns state, so apply the new `text` to the message and
|
|
53
|
+
* typically stamp `editedAt`).
|
|
54
|
+
*/
|
|
55
|
+
onMessageEdited?: (messageId: string, text: string, meta: {
|
|
56
|
+
conversation: SuperChatConversation;
|
|
57
|
+
}) => void;
|
|
58
|
+
onConversationClosed?: (conversation: SuperChatConversation) => void;
|
|
59
|
+
onReferenceClick?: (ref: SuperChatRef) => void;
|
|
60
|
+
/**
|
|
61
|
+
* Show a "back" affordance in the header (used by {@link SuperChatInbox} on
|
|
62
|
+
* small screens to return from the chat panel to the conversation list).
|
|
63
|
+
*/
|
|
64
|
+
onBack?: () => void;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Single-conversation chat panel. See the module `MAINTAINERS.md` for the
|
|
68
|
+
* participant model and render-plugin architecture.
|
|
69
|
+
*/
|
|
70
|
+
declare function SuperChat({ conversation, currentParticipantId, renderPlugins, renderTextContent, trustedContent, readOnly, acceptedFileTypes, order, virtualized, linkBuilder, className, onMessageSent, onMessageEdited, onConversationClosed, onReferenceClick, onBack, }: SuperChatProps): react_jsx_runtime.JSX.Element;
|
|
71
|
+
|
|
72
|
+
interface SuperChatConversationsProps {
|
|
73
|
+
/** All conversations (host-owned state). */
|
|
74
|
+
conversations: SuperChatConversation[];
|
|
75
|
+
/** Controlled active conversation id. */
|
|
76
|
+
activeConversationId?: string;
|
|
77
|
+
/** Uncontrolled initial active conversation id. */
|
|
78
|
+
defaultActiveConversationId?: string;
|
|
79
|
+
/** Additional class name. */
|
|
80
|
+
className?: string;
|
|
81
|
+
onConversationOpened?: (conversation: SuperChatConversation) => void;
|
|
82
|
+
onNewConversation?: () => void;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Conversation list. See the module `MAINTAINERS.md` for the data model.
|
|
86
|
+
*/
|
|
87
|
+
declare function SuperChatConversations({ conversations, activeConversationId, defaultActiveConversationId, className, onConversationOpened, onNewConversation, }: SuperChatConversationsProps): react_jsx_runtime.JSX.Element;
|
|
88
|
+
|
|
89
|
+
interface SuperChatInboxProps {
|
|
90
|
+
/** All conversations (host-owned state). */
|
|
91
|
+
conversations: SuperChatConversation[];
|
|
92
|
+
/** Controlled active conversation id. */
|
|
93
|
+
activeConversationId?: string;
|
|
94
|
+
/** Uncontrolled initial active conversation id. */
|
|
95
|
+
defaultActiveConversationId?: string;
|
|
96
|
+
/** The participant id representing the local user (alignment + compose). */
|
|
97
|
+
currentParticipantId?: string;
|
|
98
|
+
/** Opt-in rich render plugins (code/math/genui/…). */
|
|
99
|
+
renderPlugins?: SuperChatRenderPlugin[];
|
|
100
|
+
/** Override the entire text renderer (advanced). */
|
|
101
|
+
renderTextContent?: AIRenderTextContent;
|
|
102
|
+
/** Treat content as trusted and skip sanitization (host-authored only). */
|
|
103
|
+
trustedContent?: boolean;
|
|
104
|
+
/** Disable the composer. */
|
|
105
|
+
readOnly?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* File categories the composer accepts for paste and the paperclip picker.
|
|
108
|
+
* Defaults to `['image', 'video', 'audio', 'pdf']`.
|
|
109
|
+
*/
|
|
110
|
+
acceptedFileTypes?: AttachmentKind[];
|
|
111
|
+
/** Thread ordering: `'asc'` (oldest→newest, default) or `'desc'` (feed-style). */
|
|
112
|
+
order?: 'asc' | 'desc';
|
|
113
|
+
/** Virtualize the message thread (windowed rendering) for long histories. */
|
|
114
|
+
virtualized?: boolean;
|
|
115
|
+
/** Show the conversation sidebar. */
|
|
116
|
+
showSidebar?: boolean;
|
|
117
|
+
/** Build hrefs for `ref` thread items. */
|
|
118
|
+
linkBuilder?: SuperChatLinkBuilder;
|
|
119
|
+
/** Additional class name. */
|
|
120
|
+
className?: string;
|
|
121
|
+
onMessageSent?: (text: string, meta: {
|
|
122
|
+
conversation: SuperChatConversation;
|
|
123
|
+
mentions: string[];
|
|
124
|
+
attachments: ComposerAttachment[];
|
|
125
|
+
}) => void;
|
|
126
|
+
/** Fired when the local user saves an edit to one of their own messages. */
|
|
127
|
+
onMessageEdited?: (messageId: string, text: string, meta: {
|
|
128
|
+
conversation: SuperChatConversation;
|
|
129
|
+
}) => void;
|
|
130
|
+
onConversationOpened?: (conversation: SuperChatConversation) => void;
|
|
131
|
+
onConversationClosed?: (conversation: SuperChatConversation) => void;
|
|
132
|
+
onNewConversation?: () => void;
|
|
133
|
+
onReferenceClick?: (ref: SuperChatRef) => void;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Combined inbox surface (conversation list + active conversation panel). See
|
|
137
|
+
* the module `MAINTAINERS.md` for the participant model and render-plugin
|
|
138
|
+
* architecture.
|
|
139
|
+
*/
|
|
140
|
+
declare function SuperChatInbox({ conversations, activeConversationId, defaultActiveConversationId, currentParticipantId, renderPlugins, renderTextContent, trustedContent, readOnly, acceptedFileTypes, order, virtualized, showSidebar, linkBuilder, className, onMessageSent, onMessageEdited, onConversationOpened, onConversationClosed, onNewConversation, onReferenceClick, }: SuperChatInboxProps): react_jsx_runtime.JSX.Element;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* SuperChat Markdown render composer.
|
|
144
|
+
*
|
|
145
|
+
* Composes a list of {@link SuperChatRenderPlugin}s into a single
|
|
146
|
+
* {@link AIRenderTextContent} implementation that plugs into the AI module's
|
|
147
|
+
* `renderTextContent` seam. Ships **Markdown core** (GFM) with `rehype-sanitize`
|
|
148
|
+
* applied to untrusted model/agent output. Math / code / GenUI / NITRO / mermaid
|
|
149
|
+
* are added by passing the corresponding opt-in plugins.
|
|
150
|
+
*
|
|
151
|
+
* The host owns the trust boundary: untrusted content is always sanitized via an
|
|
152
|
+
* allow-list schema, extended by each plugin's `sanitizeSchema` so token
|
|
153
|
+
* classNames (syntax highlighting) and KaTeX markup survive.
|
|
154
|
+
*/
|
|
155
|
+
|
|
156
|
+
interface CreateMarkdownRendererOptions {
|
|
157
|
+
/** Opt-in rich plugins (code, math, genui, nitro, mermaid, …). */
|
|
158
|
+
plugins?: SuperChatRenderPlugin[];
|
|
159
|
+
/**
|
|
160
|
+
* Disable sanitization. **Only** set this when the content is fully trusted
|
|
161
|
+
* (e.g. authored by the host, never model output). Defaults to `false`.
|
|
162
|
+
*/
|
|
163
|
+
trusted?: boolean;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Build an {@link AIRenderTextContent} from a set of render plugins.
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* const render = createMarkdownRenderer({ plugins: [createCodePlugin(), createMathPlugin()] });
|
|
170
|
+
* <AIChat renderTextContent={render} … />
|
|
171
|
+
*/
|
|
172
|
+
declare function createMarkdownRenderer(options?: CreateMarkdownRendererOptions): AIRenderTextContent;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Render-time context threaded from the message into custom Markdown nodes
|
|
176
|
+
* (e.g. GenUI widgets need `messageId` + `streaming` for their `meta` and for
|
|
177
|
+
* gating mount/data-fetch while a message is still streaming).
|
|
178
|
+
*/
|
|
179
|
+
|
|
180
|
+
interface SuperChatTextContext {
|
|
181
|
+
/** id of the parent message (stable cache key). */
|
|
182
|
+
messageId: string;
|
|
183
|
+
/** true while the parent message is still streaming. */
|
|
184
|
+
streaming: boolean;
|
|
185
|
+
}
|
|
186
|
+
declare const TextRenderContext: React.Context<SuperChatTextContext>;
|
|
187
|
+
declare const useTextRenderContext: () => SuperChatTextContext;
|
|
188
|
+
|
|
189
|
+
export { AIRenderTextContent, AttachmentKind, ComposerAttachment, type CreateMarkdownRendererOptions, SuperChat, SuperChatConversation, SuperChatConversations, type SuperChatConversationsProps, SuperChatInbox, type SuperChatInboxProps, SuperChatLinkBuilder, type SuperChatProps, SuperChatRef, SuperChatRenderPlugin, type SuperChatTextContext, TextRenderContext, createMarkdownRenderer, useTextRenderContext };
|