@djangocfg/ui-tools 2.1.334 → 2.1.336
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -2
- package/dist/ChatRoot-IIYQEWUU.mjs +5 -0
- package/dist/ChatRoot-IIYQEWUU.mjs.map +1 -0
- package/dist/ChatRoot-PNNGQCYF.css +7 -0
- package/dist/ChatRoot-PNNGQCYF.css.map +1 -0
- package/dist/ChatRoot-UUKTYM4N.cjs +14 -0
- package/dist/ChatRoot-UUKTYM4N.cjs.map +1 -0
- package/dist/{CronScheduler.client-3O3VU4CI.mjs → CronScheduler.client-DLMXCPAJ.mjs} +4 -4
- package/dist/{CronScheduler.client-3O3VU4CI.mjs.map → CronScheduler.client-DLMXCPAJ.mjs.map} +1 -1
- package/dist/{CronScheduler.client-A4GO6YBY.cjs → CronScheduler.client-WEJF4PWQ.cjs} +14 -14
- package/dist/{CronScheduler.client-A4GO6YBY.cjs.map → CronScheduler.client-WEJF4PWQ.cjs.map} +1 -1
- package/dist/{DocsLayout-XLDB6CJ2.cjs → DocsLayout-N5ZJZPBY.cjs} +200 -199
- package/dist/DocsLayout-N5ZJZPBY.cjs.map +1 -0
- package/dist/{DocsLayout-CTJINVBM.mjs → DocsLayout-VFPPNKSQ.mjs} +7 -6
- package/dist/DocsLayout-VFPPNKSQ.mjs.map +1 -0
- package/dist/JsonSchemaForm-DD7CLRIG.cjs +13 -0
- package/dist/{JsonSchemaForm-OSPUUUHM.cjs.map → JsonSchemaForm-DD7CLRIG.cjs.map} +1 -1
- package/dist/JsonSchemaForm-XKUIVELK.mjs +4 -0
- package/dist/{JsonSchemaForm-TSLX2GRO.mjs.map → JsonSchemaForm-XKUIVELK.mjs.map} +1 -1
- package/dist/JsonTree-55625VVH.mjs +5 -0
- package/dist/{JsonTree-F27RMYSI.cjs.map → JsonTree-55625VVH.mjs.map} +1 -1
- package/dist/JsonTree-DCM5QGWF.cjs +11 -0
- package/dist/{JsonTree-QTJYSHCV.mjs.map → JsonTree-DCM5QGWF.cjs.map} +1 -1
- package/dist/{LottiePlayer.client-6WVWDO75.cjs → LottiePlayer.client-2S7ISJ2S.cjs} +6 -6
- package/dist/{LottiePlayer.client-6WVWDO75.cjs.map → LottiePlayer.client-2S7ISJ2S.cjs.map} +1 -1
- package/dist/{LottiePlayer.client-B4I6WNZM.mjs → LottiePlayer.client-5LDSSJWS.mjs} +4 -4
- package/dist/{LottiePlayer.client-B4I6WNZM.mjs.map → LottiePlayer.client-5LDSSJWS.mjs.map} +1 -1
- package/dist/{MapContainer-RYG4HPH4.cjs → MapContainer-76YL2JXL.cjs} +8 -8
- package/dist/{MapContainer-RYG4HPH4.cjs.map → MapContainer-76YL2JXL.cjs.map} +1 -1
- package/dist/{MapContainer-GXQLP5WY.mjs → MapContainer-7HXBI3OH.mjs} +3 -3
- package/dist/{MapContainer-GXQLP5WY.mjs.map → MapContainer-7HXBI3OH.mjs.map} +1 -1
- package/dist/{Mermaid.client-SXRRI2YW.mjs → Mermaid.client-NL4SVR7F.mjs} +4 -4
- package/dist/{Mermaid.client-SXRRI2YW.mjs.map → Mermaid.client-NL4SVR7F.mjs.map} +1 -1
- package/dist/{Mermaid.client-W76R5AKJ.cjs → Mermaid.client-NNTI6DFX.cjs} +26 -26
- package/dist/{Mermaid.client-W76R5AKJ.cjs.map → Mermaid.client-NNTI6DFX.cjs.map} +1 -1
- package/dist/Player-BRV7XTWR.mjs +4 -0
- package/dist/{Player-M3GC3VPE.mjs.map → Player-BRV7XTWR.mjs.map} +1 -1
- package/dist/Player-PM7F7DD7.cjs +13 -0
- package/dist/{Player-ZL2X5LGG.cjs.map → Player-PM7F7DD7.cjs.map} +1 -1
- package/dist/{PrettyCode.client-RPDIE5CH.cjs → PrettyCode.client-KOHDVPPN.cjs} +13 -13
- package/dist/{PrettyCode.client-RPDIE5CH.cjs.map → PrettyCode.client-KOHDVPPN.cjs.map} +1 -1
- package/dist/{PrettyCode.client-SPMTQEG4.mjs → PrettyCode.client-ZGYGKE7G.mjs} +4 -4
- package/dist/{PrettyCode.client-SPMTQEG4.mjs.map → PrettyCode.client-ZGYGKE7G.mjs.map} +1 -1
- package/dist/TreeRoot-N72OYKXU.cjs +19 -0
- package/dist/{TreeRoot-A3J65L6F.mjs.map → TreeRoot-N72OYKXU.cjs.map} +1 -1
- package/dist/TreeRoot-VGAIXCUA.mjs +4 -0
- package/dist/{TreeRoot-DSK5JILT.cjs.map → TreeRoot-VGAIXCUA.mjs.map} +1 -1
- package/dist/chunk-2ZLKZ5VR.mjs +631 -0
- package/dist/chunk-2ZLKZ5VR.mjs.map +1 -0
- package/dist/{chunk-LFWQ36LJ.mjs → chunk-5G5YBFS6.mjs} +4 -4
- package/dist/{chunk-LFWQ36LJ.mjs.map → chunk-5G5YBFS6.mjs.map} +1 -1
- package/dist/{chunk-IHAY6FO6.cjs → chunk-5I5QNGUG.cjs} +17 -17
- package/dist/{chunk-IHAY6FO6.cjs.map → chunk-5I5QNGUG.cjs.map} +1 -1
- package/dist/{chunk-F2CMIIOH.cjs → chunk-76NNDZH6.cjs} +42 -42
- package/dist/{chunk-F2CMIIOH.cjs.map → chunk-76NNDZH6.cjs.map} +1 -1
- package/dist/chunk-B5AWZOHJ.cjs +649 -0
- package/dist/chunk-B5AWZOHJ.cjs.map +1 -0
- package/dist/{chunk-KR6B3LVY.mjs → chunk-B6IR5KSC.mjs} +3 -3
- package/dist/{chunk-KR6B3LVY.mjs.map → chunk-B6IR5KSC.mjs.map} +1 -1
- package/dist/{chunk-5LBDYFWH.mjs → chunk-C6GXVH5J.mjs} +3 -3
- package/dist/{chunk-5LBDYFWH.mjs.map → chunk-C6GXVH5J.mjs.map} +1 -1
- package/dist/{chunk-4IW7GZFQ.cjs → chunk-FEN5S772.cjs} +74 -48
- package/dist/chunk-FEN5S772.cjs.map +1 -0
- package/dist/{chunk-2SMCH62O.cjs → chunk-FP2RLYQZ.cjs} +11 -11
- package/dist/{chunk-2SMCH62O.cjs.map → chunk-FP2RLYQZ.cjs.map} +1 -1
- package/dist/{chunk-MOME6KYD.mjs → chunk-G5IEC7SR.mjs} +3 -3
- package/dist/{chunk-MOME6KYD.mjs.map → chunk-G5IEC7SR.mjs.map} +1 -1
- package/dist/{chunk-EXGXUK2N.mjs → chunk-GYIO7W7M.mjs} +41 -15
- package/dist/chunk-GYIO7W7M.mjs.map +1 -0
- package/dist/{chunk-3Z3A7FHA.cjs → chunk-IEEAENLX.cjs} +48 -48
- package/dist/{chunk-3Z3A7FHA.cjs.map → chunk-IEEAENLX.cjs.map} +1 -1
- package/dist/{chunk-DFTVB66S.cjs → chunk-KNDLV4PI.cjs} +85 -85
- package/dist/{chunk-DFTVB66S.cjs.map → chunk-KNDLV4PI.cjs.map} +1 -1
- package/dist/{chunk-SSUOENAZ.mjs → chunk-KNEQRUBA.mjs} +3 -3
- package/dist/{chunk-SSUOENAZ.mjs.map → chunk-KNEQRUBA.mjs.map} +1 -1
- package/dist/chunk-KRETIZU6.mjs +2218 -0
- package/dist/chunk-KRETIZU6.mjs.map +1 -0
- package/dist/{chunk-CGILA3WO.mjs → chunk-N2XQF2OL.mjs} +5 -3
- package/dist/{chunk-CGILA3WO.mjs.map → chunk-N2XQF2OL.mjs.map} +1 -1
- package/dist/{chunk-EUADAUBQ.mjs → chunk-N4MZYNR4.mjs} +4 -4
- package/dist/{chunk-EUADAUBQ.mjs.map → chunk-N4MZYNR4.mjs.map} +1 -1
- package/dist/chunk-NRXYYO5V.cjs +2257 -0
- package/dist/chunk-NRXYYO5V.cjs.map +1 -0
- package/dist/{chunk-GGKGH5PM.mjs → chunk-OBRSGM64.mjs} +4 -4
- package/dist/{chunk-GGKGH5PM.mjs.map → chunk-OBRSGM64.mjs.map} +1 -1
- package/dist/{chunk-6JTB2X72.mjs → chunk-ODO4GMW7.mjs} +3 -3
- package/dist/{chunk-6JTB2X72.mjs.map → chunk-ODO4GMW7.mjs.map} +1 -1
- package/dist/{chunk-WGEGR3DF.cjs → chunk-OLISEQHS.cjs} +5 -2
- package/dist/{chunk-WGEGR3DF.cjs.map → chunk-OLISEQHS.cjs.map} +1 -1
- package/dist/{chunk-PZKAH7WQ.mjs → chunk-PVAX67JG.mjs} +3 -3
- package/dist/{chunk-PZKAH7WQ.mjs.map → chunk-PVAX67JG.mjs.map} +1 -1
- package/dist/{chunk-PRPG2T2E.cjs → chunk-QJ6GTUCO.cjs} +6 -6
- package/dist/{chunk-PRPG2T2E.cjs.map → chunk-QJ6GTUCO.cjs.map} +1 -1
- package/dist/chunk-QW4RBGHN.cjs +961 -0
- package/dist/chunk-QW4RBGHN.cjs.map +1 -0
- package/dist/{chunk-33AMWFBZ.cjs → chunk-SGP7V2UW.cjs} +15 -15
- package/dist/{chunk-33AMWFBZ.cjs.map → chunk-SGP7V2UW.cjs.map} +1 -1
- package/dist/{chunk-FX2QFYWF.mjs → chunk-VWQ5WOIL.mjs} +3 -3
- package/dist/{chunk-FX2QFYWF.mjs.map → chunk-VWQ5WOIL.mjs.map} +1 -1
- package/dist/{chunk-ZLQHUZDU.cjs → chunk-YDPDTOSP.cjs} +139 -139
- package/dist/{chunk-ZLQHUZDU.cjs.map → chunk-YDPDTOSP.cjs.map} +1 -1
- package/dist/{chunk-77HQWEQ6.cjs → chunk-YW5IVWHQ.cjs} +33 -33
- package/dist/{chunk-77HQWEQ6.cjs.map → chunk-YW5IVWHQ.cjs.map} +1 -1
- package/dist/{chunk-YXBOAGIM.cjs → chunk-YXZ6GU7H.cjs} +7 -7
- package/dist/{chunk-YXBOAGIM.cjs.map → chunk-YXZ6GU7H.cjs.map} +1 -1
- package/dist/{chunk-62Y65TGK.mjs → chunk-ZUFTH5IR.mjs} +8 -631
- package/dist/chunk-ZUFTH5IR.mjs.map +1 -0
- package/dist/components-EHOGXATG.cjs +22 -0
- package/dist/{components-5UXYNAKR.cjs.map → components-EHOGXATG.cjs.map} +1 -1
- package/dist/components-MQ6DR7TX.cjs +26 -0
- package/dist/{components-CFXOEVPN.mjs.map → components-MQ6DR7TX.cjs.map} +1 -1
- package/dist/components-XRX7QGLB.mjs +5 -0
- package/dist/{components-WYEZL5TE.cjs.map → components-XRX7QGLB.mjs.map} +1 -1
- package/dist/components-YATKRWLH.mjs +5 -0
- package/dist/{components-ZAGG2PBO.mjs.map → components-YATKRWLH.mjs.map} +1 -1
- package/dist/file-icon/index.cjs +6 -6
- package/dist/file-icon/index.mjs +1 -1
- package/dist/index.cjs +735 -215
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +972 -39
- package/dist/index.d.ts +972 -39
- package/dist/index.mjs +387 -31
- package/dist/index.mjs.map +1 -1
- package/dist/tree/index.cjs +38 -38
- package/dist/tree/index.d.cts +2 -2
- package/dist/tree/index.d.ts +2 -2
- package/dist/tree/index.mjs +3 -3
- package/package.json +6 -6
- package/src/index.ts +5 -0
- package/src/stories/index.ts +3 -1
- package/src/tools/Chat/Chat.story.tsx +1006 -0
- package/src/tools/Chat/README.md +528 -0
- package/src/tools/Chat/components/Attachments.tsx +192 -0
- package/src/tools/Chat/components/ChatRoot.tsx +201 -0
- package/src/tools/Chat/components/Composer.tsx +134 -0
- package/src/tools/Chat/components/EmptyState.tsx +47 -0
- package/src/tools/Chat/components/ErrorBanner.tsx +47 -0
- package/src/tools/Chat/components/JumpToLatest.tsx +30 -0
- package/src/tools/Chat/components/MessageActions.tsx +72 -0
- package/src/tools/Chat/components/MessageBubble.tsx +228 -0
- package/src/tools/Chat/components/MessageList.tsx +82 -0
- package/src/tools/Chat/components/Sources.tsx +55 -0
- package/src/tools/Chat/components/StreamingIndicator.tsx +29 -0
- package/src/tools/Chat/components/ToolCalls.tsx +172 -0
- package/src/tools/Chat/components/index.ts +24 -0
- package/src/tools/Chat/config.ts +55 -0
- package/src/tools/Chat/context/ChatProvider.tsx +122 -0
- package/src/tools/Chat/context/index.ts +9 -0
- package/src/tools/Chat/core/audio/audioBus.ts +172 -0
- package/src/tools/Chat/core/audio/index.ts +8 -0
- package/src/tools/Chat/core/audio/preferences.ts +68 -0
- package/src/tools/Chat/core/audio/types.ts +49 -0
- package/src/tools/Chat/core/ids.ts +16 -0
- package/src/tools/Chat/core/index.ts +5 -0
- package/src/tools/Chat/core/markdown.ts +56 -0
- package/src/tools/Chat/core/payload-dispatch.ts +54 -0
- package/src/tools/Chat/core/persona.ts +35 -0
- package/src/tools/Chat/core/reducer.ts +335 -0
- package/src/tools/Chat/core/transport/http.ts +167 -0
- package/src/tools/Chat/core/transport/index.ts +13 -0
- package/src/tools/Chat/core/transport/mock.ts +134 -0
- package/src/tools/Chat/core/transport/sse.ts +116 -0
- package/src/tools/Chat/core/transport/types.ts +24 -0
- package/src/tools/Chat/hooks/index.ts +26 -0
- package/src/tools/Chat/hooks/useChat.ts +440 -0
- package/src/tools/Chat/hooks/useChatAudio.ts +191 -0
- package/src/tools/Chat/hooks/useChatComposer.ts +227 -0
- package/src/tools/Chat/hooks/useChatHistory.ts +59 -0
- package/src/tools/Chat/hooks/useChatLayout.ts +111 -0
- package/src/tools/Chat/hooks/useChatLightbox.ts +34 -0
- package/src/tools/Chat/hooks/useChatScroll.ts +132 -0
- package/src/tools/Chat/index.ts +158 -0
- package/src/tools/Chat/lazy.tsx +14 -0
- package/src/tools/Chat/types.ts +237 -0
- package/src/tools/Chat/utils/collectImageAttachments.ts +13 -0
- package/src/tools/JsonForm/JsonSchemaForm.tsx +32 -1
- package/src/tools/Map/README.md +384 -0
- package/dist/DocsLayout-CTJINVBM.mjs.map +0 -1
- package/dist/DocsLayout-XLDB6CJ2.cjs.map +0 -1
- package/dist/JsonSchemaForm-OSPUUUHM.cjs +0 -13
- package/dist/JsonSchemaForm-TSLX2GRO.mjs +0 -4
- package/dist/JsonTree-F27RMYSI.cjs +0 -11
- package/dist/JsonTree-QTJYSHCV.mjs +0 -5
- package/dist/Player-M3GC3VPE.mjs +0 -4
- package/dist/Player-ZL2X5LGG.cjs +0 -13
- package/dist/TreeRoot-A3J65L6F.mjs +0 -4
- package/dist/TreeRoot-DSK5JILT.cjs +0 -19
- package/dist/chunk-4IW7GZFQ.cjs.map +0 -1
- package/dist/chunk-62Y65TGK.mjs.map +0 -1
- package/dist/chunk-EXGXUK2N.mjs.map +0 -1
- package/dist/chunk-TKSFZHCG.cjs +0 -1597
- package/dist/chunk-TKSFZHCG.cjs.map +0 -1
- package/dist/components-5UXYNAKR.cjs +0 -22
- package/dist/components-CFXOEVPN.mjs +0 -5
- package/dist/components-WYEZL5TE.cjs +0 -26
- package/dist/components-ZAGG2PBO.mjs +0 -5
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import react__default, { ReactNode, ComponentType, RefObject, ChangeEvent, KeyboardEvent, ClipboardEvent } from 'react';
|
|
4
4
|
import { Components } from 'react-markdown';
|
|
5
5
|
import { ViewState } from 'react-map-gl/maplibre';
|
|
6
6
|
import { Language } from 'prism-react-renderer';
|
|
@@ -13,11 +13,11 @@ export { CustomJsonSchema7, CustomJsonSchema7Type, CustomJsonUiDisabledWhenRule,
|
|
|
13
13
|
import { CommonExternalProps } from 'react-json-tree';
|
|
14
14
|
import { b as TreeRootProps } from './types-CevSbyfD.cjs';
|
|
15
15
|
export { c as DEFAULT_TREE_APPEARANCE, D as DEFAULT_TREE_LABELS, F as FlatRow, R as ResolvedAppearance, m as TreeAccentIntensity, k as TreeAppearance, e as TreeContextMenuSlot, l as TreeDensity, f as TreeItemId, g as TreeLabels, j as TreeLoadChildren, T as TreeNode, n as TreeRadius, i as TreeRowRenderProps, a as TreeRowSlot, h as TreeSelectionMode, d as appearanceToStyle, r as resolveAppearance } from './types-CevSbyfD.cjs';
|
|
16
|
+
import * as zustand_middleware from 'zustand/middleware';
|
|
17
|
+
import * as zustand from 'zustand';
|
|
16
18
|
import { MediaPlayerInstance } from '@vidstack/react';
|
|
17
19
|
import * as monaco from 'monaco-editor';
|
|
18
20
|
export { ChildCache, ChildEntry, ChildEntryStatus, DemoNode, FlattenInput, PersistedTreeState, TreeRoot as Tree, TreeChevron, TreeChevronProps, TreeContent, TreeContentProps, TreeContextValue, TreeEmpty, TreeEmptyProps, TreeError, TreeErrorProps, TreeIcon, TreeIconProps, TreeIndentGuides, TreeIndentGuidesProps, TreeLabel, TreeLabelProps, TreeProvider, TreeProviderProps, TreeRoot, TreeRow, TreeRowProps, TreeSearchInput, TreeSearchInputProps, TreeSkeleton, TreeSkeletonProps, UseTreeKeyboardOptions, UseTreeTypeAheadOptions, clearTreeState, createChildCache, createDemoTree, flattenTree, loadTreeState, resolveChildren, saveTreeState, useTreeActions, useTreeContext, useTreeExpansion, useTreeFocus, useTreeKeyboard, useTreeLabels, useTreeRows, useTreeSearch, useTreeSelection, useTreeTypeAhead } from './tree/index.cjs';
|
|
19
|
-
import * as zustand_middleware from 'zustand/middleware';
|
|
20
|
-
import * as zustand from 'zustand';
|
|
21
21
|
|
|
22
22
|
interface LoadingFallbackProps {
|
|
23
23
|
/** Minimum height of the loading container */
|
|
@@ -146,9 +146,9 @@ interface LinkRule {
|
|
|
146
146
|
* (markdown-rendered React content). */
|
|
147
147
|
render: (props: {
|
|
148
148
|
href: string;
|
|
149
|
-
children:
|
|
149
|
+
children: react__default.ReactNode;
|
|
150
150
|
isUser: boolean;
|
|
151
|
-
}) =>
|
|
151
|
+
}) => react__default.ReactNode;
|
|
152
152
|
/** URL scheme(s) to whitelist on the sanitize side, e.g. `['cmdop']`.
|
|
153
153
|
* Bare schemes only — no `://`. Optional; omit for `http(s)` rules. */
|
|
154
154
|
protocols?: readonly string[];
|
|
@@ -259,12 +259,12 @@ interface MarkdownMessageProps {
|
|
|
259
259
|
* />
|
|
260
260
|
* ```
|
|
261
261
|
*/
|
|
262
|
-
declare const MarkdownMessage:
|
|
262
|
+
declare const MarkdownMessage: react__default.FC<MarkdownMessageProps>;
|
|
263
263
|
|
|
264
264
|
/** Recursively concatenate the text content of a React.ReactNode tree.
|
|
265
265
|
* Used by the markdown renderers (e.g. `<pre>` extracting code) and
|
|
266
266
|
* by consumers that need a plain-string label out of link children. */
|
|
267
|
-
declare function extractTextFromChildren(children:
|
|
267
|
+
declare function extractTextFromChildren(children: react__default.ReactNode): string;
|
|
268
268
|
|
|
269
269
|
interface UseCollapsibleContentOptions {
|
|
270
270
|
/**
|
|
@@ -363,11 +363,11 @@ interface MapContainerProps {
|
|
|
363
363
|
*
|
|
364
364
|
* Automatically shows loading state while MapLibre GL loads (~800KB)
|
|
365
365
|
*/
|
|
366
|
-
declare const LazyMapContainer:
|
|
366
|
+
declare const LazyMapContainer: react.ComponentType<MapContainerProps>;
|
|
367
367
|
/**
|
|
368
368
|
* LazyMapView - Lazy-loaded map view (alias for MapContainer)
|
|
369
369
|
*/
|
|
370
|
-
declare const LazyMapView:
|
|
370
|
+
declare const LazyMapView: react.ComponentType<Omit<MapContainerProps, "initialViewport">>;
|
|
371
371
|
|
|
372
372
|
/**
|
|
373
373
|
* Mermaid Component - Dynamic Import Wrapper
|
|
@@ -390,14 +390,14 @@ interface MermaidProps {
|
|
|
390
390
|
*/
|
|
391
391
|
scrollIsolation?: boolean;
|
|
392
392
|
}
|
|
393
|
-
declare const Mermaid:
|
|
393
|
+
declare const Mermaid: react__default.FC<MermaidProps>;
|
|
394
394
|
|
|
395
395
|
/**
|
|
396
396
|
* LazyMermaid - Lazy-loaded Mermaid diagram renderer
|
|
397
397
|
*
|
|
398
398
|
* Automatically shows loading state while Mermaid loads (~800KB)
|
|
399
399
|
*/
|
|
400
|
-
declare const LazyMermaid:
|
|
400
|
+
declare const LazyMermaid: react.ComponentType<MermaidProps>;
|
|
401
401
|
|
|
402
402
|
interface PrettyCodeProps$1 {
|
|
403
403
|
data: string | object;
|
|
@@ -419,7 +419,7 @@ interface PrettyCodeProps$1 {
|
|
|
419
419
|
*
|
|
420
420
|
* Automatically shows loading state while Prism loads (~500KB)
|
|
421
421
|
*/
|
|
422
|
-
declare const LazyPrettyCode:
|
|
422
|
+
declare const LazyPrettyCode: react.ComponentType<PrettyCodeProps$1>;
|
|
423
423
|
|
|
424
424
|
interface ApiKey {
|
|
425
425
|
id: string;
|
|
@@ -487,7 +487,7 @@ interface PlaygroundProps$1 {
|
|
|
487
487
|
config: PlaygroundConfig;
|
|
488
488
|
}
|
|
489
489
|
|
|
490
|
-
declare const LazyOpenapiViewer:
|
|
490
|
+
declare const LazyOpenapiViewer: react.FC<PlaygroundProps$1>;
|
|
491
491
|
|
|
492
492
|
/** Visual density for form controls. */
|
|
493
493
|
type JsonFormDensity = 'comfortable' | 'compact';
|
|
@@ -547,7 +547,7 @@ interface JsonSchemaFormProps<T = any> extends Omit<Partial<FormProps<T>>, 'sche
|
|
|
547
547
|
*
|
|
548
548
|
* Automatically shows loading state while RJSF loads (~300KB)
|
|
549
549
|
*/
|
|
550
|
-
declare const LazyJsonSchemaForm:
|
|
550
|
+
declare const LazyJsonSchemaForm: react.ComponentType<JsonSchemaFormProps<any>>;
|
|
551
551
|
|
|
552
552
|
/**
|
|
553
553
|
* JSON Schema Form Component
|
|
@@ -842,7 +842,7 @@ interface LottiePlayerProps {
|
|
|
842
842
|
*
|
|
843
843
|
* Automatically shows loading state while Lottie loads (~200KB)
|
|
844
844
|
*/
|
|
845
|
-
declare const LazyLottiePlayer:
|
|
845
|
+
declare const LazyLottiePlayer: react.ComponentType<LottiePlayerProps>;
|
|
846
846
|
|
|
847
847
|
type WaveformMode = 'peaks' | 'live' | 'bars' | 'progress' | 'none';
|
|
848
848
|
type WaveformConfig = {
|
|
@@ -895,7 +895,7 @@ type PlayerHandle = {
|
|
|
895
895
|
getDuration: () => number;
|
|
896
896
|
};
|
|
897
897
|
|
|
898
|
-
declare const LazyPlayer:
|
|
898
|
+
declare const LazyPlayer: react.ComponentType<PlayerProps>;
|
|
899
899
|
|
|
900
900
|
/**
|
|
901
901
|
* Video source type definitions
|
|
@@ -1042,7 +1042,7 @@ interface VideoPlayerProps extends CommonPlayerSettings, CommonPlayerEvents {
|
|
|
1042
1042
|
/** Preloader timeout in ms */
|
|
1043
1043
|
preloaderTimeout?: number;
|
|
1044
1044
|
/** Custom error fallback UI */
|
|
1045
|
-
errorFallback?:
|
|
1045
|
+
errorFallback?: react__default.ReactNode | ((props: ErrorFallbackProps) => react__default.ReactNode);
|
|
1046
1046
|
}
|
|
1047
1047
|
/** VideoPlayer ref methods */
|
|
1048
1048
|
interface VideoPlayerRef {
|
|
@@ -1080,7 +1080,7 @@ interface VidstackProviderProps extends CommonPlayerSettings, CommonPlayerEvents
|
|
|
1080
1080
|
theme?: 'default' | 'minimal' | 'modern';
|
|
1081
1081
|
showInfo?: boolean;
|
|
1082
1082
|
className?: string;
|
|
1083
|
-
errorFallback?:
|
|
1083
|
+
errorFallback?: react__default.ReactNode | ((props: ErrorFallbackProps) => react__default.ReactNode);
|
|
1084
1084
|
}
|
|
1085
1085
|
/** Props passed to Native provider */
|
|
1086
1086
|
interface NativeProviderProps extends CommonPlayerSettings, CommonPlayerEvents {
|
|
@@ -1099,7 +1099,7 @@ interface StreamProviderProps extends CommonPlayerSettings, CommonPlayerEvents {
|
|
|
1099
1099
|
disableContextMenu?: boolean;
|
|
1100
1100
|
showPreloader?: boolean;
|
|
1101
1101
|
preloaderTimeout?: number;
|
|
1102
|
-
errorFallback?:
|
|
1102
|
+
errorFallback?: react__default.ReactNode | ((props: ErrorFallbackProps) => react__default.ReactNode);
|
|
1103
1103
|
}
|
|
1104
1104
|
/** Options for resolving file source */
|
|
1105
1105
|
interface ResolveFileSourceOptions {
|
|
@@ -1127,7 +1127,7 @@ interface VideoPlayerContextValue {
|
|
|
1127
1127
|
sessionId?: string | null;
|
|
1128
1128
|
}
|
|
1129
1129
|
interface VideoPlayerProviderProps extends VideoPlayerContextValue {
|
|
1130
|
-
children:
|
|
1130
|
+
children: react__default.ReactNode;
|
|
1131
1131
|
}
|
|
1132
1132
|
/** Simplified stream source (uses context for getStreamUrl) */
|
|
1133
1133
|
interface SimpleStreamSource {
|
|
@@ -1147,7 +1147,7 @@ interface SimpleStreamSource {
|
|
|
1147
1147
|
*
|
|
1148
1148
|
* Automatically shows loading state while Vidstack loads (~150KB)
|
|
1149
1149
|
*/
|
|
1150
|
-
declare const LazyVideoPlayer:
|
|
1150
|
+
declare const LazyVideoPlayer: react.ComponentType<VideoPlayerProps>;
|
|
1151
1151
|
|
|
1152
1152
|
type JsonTreeMode = 'full' | 'compact' | 'inline';
|
|
1153
1153
|
interface JsonTreeConfig {
|
|
@@ -1226,7 +1226,7 @@ interface JsonTreeProps {
|
|
|
1226
1226
|
* // Inline mode (minimal, for embedding)
|
|
1227
1227
|
* <LazyJsonTree data={obj} mode="inline" />
|
|
1228
1228
|
*/
|
|
1229
|
-
declare const LazyJsonTree:
|
|
1229
|
+
declare const LazyJsonTree: react.ComponentType<JsonTreeProps>;
|
|
1230
1230
|
|
|
1231
1231
|
/**
|
|
1232
1232
|
* ImageViewer type definitions
|
|
@@ -1269,7 +1269,7 @@ interface ImageViewerProps {
|
|
|
1269
1269
|
*
|
|
1270
1270
|
* Automatically shows loading state while ImageViewer loads (~50KB)
|
|
1271
1271
|
*/
|
|
1272
|
-
declare const LazyImageViewer:
|
|
1272
|
+
declare const LazyImageViewer: react.ComponentType<ImageViewerProps>;
|
|
1273
1273
|
|
|
1274
1274
|
/**
|
|
1275
1275
|
* CronScheduler Types
|
|
@@ -1377,9 +1377,942 @@ interface CronSchedulerProviderProps {
|
|
|
1377
1377
|
* timeFormat="24h"
|
|
1378
1378
|
* />
|
|
1379
1379
|
*/
|
|
1380
|
-
declare const LazyCronScheduler:
|
|
1380
|
+
declare const LazyCronScheduler: react.ComponentType<CronSchedulerProps>;
|
|
1381
|
+
|
|
1382
|
+
declare const LazyTree: react.ComponentType<TreeRootProps<unknown>>;
|
|
1383
|
+
|
|
1384
|
+
/**
|
|
1385
|
+
* Public types for the Chat tool.
|
|
1386
|
+
*
|
|
1387
|
+
* Shapes here are the contract between transport adapters, the reducer,
|
|
1388
|
+
* the hooks layer and the components. Keep serializable (no Date, no Map).
|
|
1389
|
+
*/
|
|
1390
|
+
type ChatRole = 'user' | 'assistant' | 'system';
|
|
1391
|
+
interface ChatToolCall {
|
|
1392
|
+
id: string;
|
|
1393
|
+
name: string;
|
|
1394
|
+
input: unknown;
|
|
1395
|
+
output?: unknown;
|
|
1396
|
+
/** Live buffer accumulated during streaming. Replaced by `output` on completion. */
|
|
1397
|
+
streamingText?: string;
|
|
1398
|
+
status: 'running' | 'success' | 'error' | 'cancelled';
|
|
1399
|
+
startedAt: number;
|
|
1400
|
+
endedAt?: number;
|
|
1401
|
+
/** Optional grouping label for parallel/fan-out execution. */
|
|
1402
|
+
sourceHostname?: string;
|
|
1403
|
+
}
|
|
1404
|
+
interface ChatAttachment {
|
|
1405
|
+
id: string;
|
|
1406
|
+
type: 'image' | 'file' | 'audio' | 'video';
|
|
1407
|
+
url: string;
|
|
1408
|
+
thumbnailUrl?: string;
|
|
1409
|
+
name?: string;
|
|
1410
|
+
mimeType?: string;
|
|
1411
|
+
sizeBytes?: number;
|
|
1412
|
+
status?: 'uploading' | 'ready' | 'error';
|
|
1413
|
+
/** 0..1 while uploading. */
|
|
1414
|
+
progress?: number;
|
|
1415
|
+
/** Extracted text from images (OCR). */
|
|
1416
|
+
ocrText?: string;
|
|
1417
|
+
}
|
|
1418
|
+
interface ChatSource {
|
|
1419
|
+
title: string;
|
|
1420
|
+
url: string;
|
|
1421
|
+
snippet?: string;
|
|
1422
|
+
chunkIndex?: number;
|
|
1423
|
+
}
|
|
1424
|
+
interface ChatPersona {
|
|
1425
|
+
/** Display name. */
|
|
1426
|
+
name?: string;
|
|
1427
|
+
/** Avatar image URL. */
|
|
1428
|
+
avatarUrl?: string;
|
|
1429
|
+
/** Initials fallback when no avatar. Auto-derived from `name` if absent. */
|
|
1430
|
+
initials?: string;
|
|
1431
|
+
/** Tooltip / aria description. */
|
|
1432
|
+
description?: string;
|
|
1433
|
+
}
|
|
1434
|
+
interface ChatMessage {
|
|
1435
|
+
id: string;
|
|
1436
|
+
role: ChatRole;
|
|
1437
|
+
content: string;
|
|
1438
|
+
/** epoch ms — serializable. */
|
|
1439
|
+
createdAt: number;
|
|
1440
|
+
isStreaming?: boolean;
|
|
1441
|
+
isError?: boolean;
|
|
1442
|
+
/** Bumps on edit so memo keys invalidate. */
|
|
1443
|
+
version?: number;
|
|
1444
|
+
/** Per-message persona override (multi-user / multi-bot). Falls back to
|
|
1445
|
+
* `ChatConfig.user` / `ChatConfig.assistant` when absent. */
|
|
1446
|
+
sender?: ChatPersona;
|
|
1447
|
+
/** Simple status indicator above message ("Searching knowledge base..."). */
|
|
1448
|
+
toolActivity?: string;
|
|
1449
|
+
toolCalls?: ChatToolCall[];
|
|
1450
|
+
attachments?: ChatAttachment[];
|
|
1451
|
+
sources?: ChatSource[];
|
|
1452
|
+
tokensIn?: number;
|
|
1453
|
+
tokensOut?: number;
|
|
1454
|
+
}
|
|
1455
|
+
type ChatDisplayMode = 'closed' | 'embedded' | 'floating' | 'sidebar' | 'fullscreen';
|
|
1456
|
+
interface ChatUserContext extends ChatPersona {
|
|
1457
|
+
email?: string;
|
|
1458
|
+
language?: string;
|
|
1459
|
+
role?: string;
|
|
1460
|
+
/** Free-form custom data forwarded to transport metadata. */
|
|
1461
|
+
custom?: Record<string, unknown>;
|
|
1462
|
+
}
|
|
1463
|
+
interface ChatAssistantContext extends ChatPersona {
|
|
1464
|
+
/** Model identifier (gpt-4o, claude-opus, …). */
|
|
1465
|
+
model?: string;
|
|
1466
|
+
}
|
|
1467
|
+
interface ChatPrefs {
|
|
1468
|
+
/** Submit hotkey for the composer. */
|
|
1469
|
+
submitOn?: 'enter' | 'cmd+enter';
|
|
1470
|
+
/** UI density. */
|
|
1471
|
+
density?: 'comfortable' | 'compact';
|
|
1472
|
+
/** Locale forwarded to transport metadata. */
|
|
1473
|
+
locale?: string;
|
|
1474
|
+
/** Show timestamps on each bubble. */
|
|
1475
|
+
showTimestamps?: boolean;
|
|
1476
|
+
}
|
|
1477
|
+
interface ChatConfig {
|
|
1478
|
+
/** Window title / aria-label. */
|
|
1479
|
+
title?: string;
|
|
1480
|
+
/** Composer placeholder. */
|
|
1481
|
+
placeholder?: string;
|
|
1482
|
+
/** Empty-state greeting. */
|
|
1483
|
+
greeting?: string;
|
|
1484
|
+
/** Empty-state description. */
|
|
1485
|
+
description?: string;
|
|
1486
|
+
/** Suggested prompts shown on empty conversation. */
|
|
1487
|
+
suggestions?: Array<{
|
|
1488
|
+
label: string;
|
|
1489
|
+
prompt: string;
|
|
1490
|
+
}>;
|
|
1491
|
+
/** Locale forwarded to the transport via stream metadata. */
|
|
1492
|
+
locale?: string;
|
|
1493
|
+
/** Project / chat slug forwarded to the transport. */
|
|
1494
|
+
slug?: string;
|
|
1495
|
+
/** UI density. Use `prefs.density` for the same effect; this stays for
|
|
1496
|
+
* backwards compatibility. */
|
|
1497
|
+
density?: 'comfortable' | 'compact';
|
|
1498
|
+
/** Identity of the human author. Renders avatar / name on user bubbles
|
|
1499
|
+
* and gets stamped on outgoing messages as `message.sender`. */
|
|
1500
|
+
user?: ChatUserContext;
|
|
1501
|
+
/** Identity of the assistant. Renders avatar / name on assistant bubbles. */
|
|
1502
|
+
assistant?: ChatAssistantContext;
|
|
1503
|
+
/** UI preferences. */
|
|
1504
|
+
prefs?: ChatPrefs;
|
|
1505
|
+
/** Visual labels (i18n is the host's job). */
|
|
1506
|
+
labels?: Partial<ChatLabels>;
|
|
1507
|
+
}
|
|
1508
|
+
interface ChatLabels {
|
|
1509
|
+
send: string;
|
|
1510
|
+
cancel: string;
|
|
1511
|
+
copy: string;
|
|
1512
|
+
regenerate: string;
|
|
1513
|
+
edit: string;
|
|
1514
|
+
delete: string;
|
|
1515
|
+
retry: string;
|
|
1516
|
+
newChat: string;
|
|
1517
|
+
loadMore: string;
|
|
1518
|
+
jumpToLatest: string;
|
|
1519
|
+
attach: string;
|
|
1520
|
+
voice: string;
|
|
1521
|
+
errorGeneric: string;
|
|
1522
|
+
cancelledSuffix: string;
|
|
1523
|
+
}
|
|
1524
|
+
declare const DEFAULT_LABELS: ChatLabels;
|
|
1525
|
+
interface CreateSessionOptions {
|
|
1526
|
+
metadata?: Record<string, unknown>;
|
|
1527
|
+
}
|
|
1528
|
+
interface SessionInfo {
|
|
1529
|
+
sessionId: string;
|
|
1530
|
+
/** If the server resumed an existing session, it may return prior messages. */
|
|
1531
|
+
messages?: ChatMessage[];
|
|
1532
|
+
hasMore?: boolean;
|
|
1533
|
+
cursor?: string | null;
|
|
1534
|
+
resumed?: boolean;
|
|
1535
|
+
}
|
|
1536
|
+
interface HistoryPage {
|
|
1537
|
+
messages: ChatMessage[];
|
|
1538
|
+
hasMore: boolean;
|
|
1539
|
+
nextCursor: string | null;
|
|
1540
|
+
}
|
|
1541
|
+
interface StreamOptions {
|
|
1542
|
+
signal: AbortSignal;
|
|
1543
|
+
attachments?: ChatAttachment[];
|
|
1544
|
+
metadata?: Record<string, unknown>;
|
|
1545
|
+
}
|
|
1546
|
+
interface SendOptions {
|
|
1547
|
+
signal?: AbortSignal;
|
|
1548
|
+
attachments?: ChatAttachment[];
|
|
1549
|
+
metadata?: Record<string, unknown>;
|
|
1550
|
+
}
|
|
1551
|
+
type ChatStreamEvent = {
|
|
1552
|
+
type: 'message_start';
|
|
1553
|
+
messageId: string;
|
|
1554
|
+
sessionId: string;
|
|
1555
|
+
} | {
|
|
1556
|
+
type: 'chunk';
|
|
1557
|
+
delta: string;
|
|
1558
|
+
} | {
|
|
1559
|
+
type: 'tool_activity';
|
|
1560
|
+
tool: string;
|
|
1561
|
+
status: string;
|
|
1562
|
+
} | {
|
|
1563
|
+
type: 'tool_call_start';
|
|
1564
|
+
toolId: string;
|
|
1565
|
+
name: string;
|
|
1566
|
+
input: unknown;
|
|
1567
|
+
sourceHostname?: string;
|
|
1568
|
+
} | {
|
|
1569
|
+
type: 'tool_call_delta';
|
|
1570
|
+
toolId: string;
|
|
1571
|
+
delta: string;
|
|
1572
|
+
} | {
|
|
1573
|
+
type: 'tool_call_end';
|
|
1574
|
+
toolId: string;
|
|
1575
|
+
output: unknown;
|
|
1576
|
+
status: 'success' | 'error';
|
|
1577
|
+
} | {
|
|
1578
|
+
type: 'message_end';
|
|
1579
|
+
tokensIn?: number;
|
|
1580
|
+
tokensOut?: number;
|
|
1581
|
+
sources?: ChatSource[];
|
|
1582
|
+
} | {
|
|
1583
|
+
type: 'error';
|
|
1584
|
+
code: string;
|
|
1585
|
+
message: string;
|
|
1586
|
+
};
|
|
1587
|
+
interface ChatTransport {
|
|
1588
|
+
createSession(opts?: CreateSessionOptions): Promise<SessionInfo>;
|
|
1589
|
+
loadHistory(sessionId: string, cursor?: string | null, limit?: number): Promise<HistoryPage>;
|
|
1590
|
+
stream(sessionId: string, content: string, options: StreamOptions): AsyncGenerator<ChatStreamEvent, void, void>;
|
|
1591
|
+
send(sessionId: string, content: string, options?: SendOptions): Promise<ChatMessage>;
|
|
1592
|
+
closeSession(sessionId: string): Promise<void>;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
type ChatAudioEvent = 'messageSent' | 'messageReceived' | 'streamStart' | 'error' | 'mention' | 'notification';
|
|
1596
|
+
/** Map an event to a sound URL. `false` silences the event explicitly. */
|
|
1597
|
+
type ChatAudioSounds = Partial<Record<ChatAudioEvent, string | false>>;
|
|
1598
|
+
interface ChatAudioConfig {
|
|
1599
|
+
/** Map event → asset URL. Omit (or set `false`) to silence one event. */
|
|
1600
|
+
sounds?: ChatAudioSounds;
|
|
1601
|
+
/** Master volume 0..1. Persisted via the global prefs store. */
|
|
1602
|
+
volume?: number;
|
|
1603
|
+
/** Master mute. */
|
|
1604
|
+
muted?: boolean;
|
|
1605
|
+
/** Custom predicate — return `false` to suppress a play call. */
|
|
1606
|
+
shouldPlay?: (event: ChatAudioEvent) => boolean;
|
|
1607
|
+
/** Default-suppress when user prefers reduced motion. Default: true. */
|
|
1608
|
+
respectReducedMotion?: boolean;
|
|
1609
|
+
/** Default-suppress when user prefers reduced data. Default: true. */
|
|
1610
|
+
respectReducedData?: boolean;
|
|
1611
|
+
/** Mute when host page is hidden (`visibilityState === 'hidden'`). Default: true. */
|
|
1612
|
+
muteWhenHidden?: boolean;
|
|
1613
|
+
}
|
|
1614
|
+
interface UseChatAudioReturn {
|
|
1615
|
+
/** Play a sound for an event. No-ops if the event has no URL or is muted. */
|
|
1616
|
+
play: (event: ChatAudioEvent) => void;
|
|
1617
|
+
/** Eagerly load an event's audio (called automatically on mount). */
|
|
1618
|
+
preload: (event: ChatAudioEvent) => void;
|
|
1619
|
+
/** Manually unlock — useful in stories/tests. */
|
|
1620
|
+
unlock: () => void;
|
|
1621
|
+
/** True after the first user gesture inside the chat root. */
|
|
1622
|
+
isUnlocked: boolean;
|
|
1623
|
+
/** Master mute (persistent). */
|
|
1624
|
+
muted: boolean;
|
|
1625
|
+
setMuted: (m: boolean) => void;
|
|
1626
|
+
/** Master volume 0..1 (persistent). */
|
|
1627
|
+
volume: number;
|
|
1628
|
+
setVolume: (v: number) => void;
|
|
1629
|
+
/** Per-event opt-out (persistent). */
|
|
1630
|
+
isEventEnabled: (event: ChatAudioEvent) => boolean;
|
|
1631
|
+
setEventEnabled: (event: ChatAudioEvent, enabled: boolean) => void;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
/**
|
|
1635
|
+
* Pure chat state machine. Zero React. Zero I/O.
|
|
1636
|
+
*
|
|
1637
|
+
* Invariants:
|
|
1638
|
+
* - At most one message has `isStreaming === true` at any time. It is always
|
|
1639
|
+
* the last message in the array.
|
|
1640
|
+
* - Messages are immutable; updates produce new objects.
|
|
1641
|
+
* - `version` bumps on edit so memo keys invalidate.
|
|
1642
|
+
*/
|
|
1643
|
+
|
|
1644
|
+
interface ChatState {
|
|
1645
|
+
sessionId: string | null;
|
|
1646
|
+
messages: ChatMessage[];
|
|
1647
|
+
/** Initial history load in flight. */
|
|
1648
|
+
isLoading: boolean;
|
|
1649
|
+
/** Assistant is generating a reply. */
|
|
1650
|
+
isStreaming: boolean;
|
|
1651
|
+
/** Older history page in flight. */
|
|
1652
|
+
isLoadingMore: boolean;
|
|
1653
|
+
hasMore: boolean;
|
|
1654
|
+
oldestCursor: string | null;
|
|
1655
|
+
error: string | null;
|
|
1656
|
+
}
|
|
1657
|
+
declare const initialState: ChatState;
|
|
1658
|
+
type ChatAction = {
|
|
1659
|
+
type: 'SESSION_SET';
|
|
1660
|
+
sessionId: string;
|
|
1661
|
+
messages?: ChatMessage[];
|
|
1662
|
+
hasMore?: boolean;
|
|
1663
|
+
cursor?: string | null;
|
|
1664
|
+
} | {
|
|
1665
|
+
type: 'HISTORY_LOAD_START';
|
|
1666
|
+
} | {
|
|
1667
|
+
type: 'HISTORY_LOAD_DONE';
|
|
1668
|
+
messages: ChatMessage[];
|
|
1669
|
+
hasMore: boolean;
|
|
1670
|
+
cursor: string | null;
|
|
1671
|
+
} | {
|
|
1672
|
+
type: 'HISTORY_MORE_START';
|
|
1673
|
+
} | {
|
|
1674
|
+
type: 'HISTORY_MORE_DONE';
|
|
1675
|
+
messages: ChatMessage[];
|
|
1676
|
+
hasMore: boolean;
|
|
1677
|
+
cursor: string | null;
|
|
1678
|
+
} | {
|
|
1679
|
+
type: 'MESSAGE_USER_ADD';
|
|
1680
|
+
message: ChatMessage;
|
|
1681
|
+
} | {
|
|
1682
|
+
type: 'STREAM_START';
|
|
1683
|
+
id: string;
|
|
1684
|
+
createdAt?: number;
|
|
1685
|
+
} | {
|
|
1686
|
+
type: 'STREAM_CHUNK';
|
|
1687
|
+
delta: string;
|
|
1688
|
+
} | {
|
|
1689
|
+
type: 'STREAM_TOOL_ACTIVITY';
|
|
1690
|
+
tool: string;
|
|
1691
|
+
} | {
|
|
1692
|
+
type: 'TOOL_CALL_START';
|
|
1693
|
+
messageId: string;
|
|
1694
|
+
toolCall: ChatToolCall;
|
|
1695
|
+
} | {
|
|
1696
|
+
type: 'TOOL_CALL_DELTA';
|
|
1697
|
+
messageId: string;
|
|
1698
|
+
toolId: string;
|
|
1699
|
+
delta: string;
|
|
1700
|
+
} | {
|
|
1701
|
+
type: 'TOOL_CALL_END';
|
|
1702
|
+
messageId: string;
|
|
1703
|
+
toolId: string;
|
|
1704
|
+
output: unknown;
|
|
1705
|
+
status: 'success' | 'error';
|
|
1706
|
+
} | {
|
|
1707
|
+
type: 'STREAM_DONE';
|
|
1708
|
+
id: string;
|
|
1709
|
+
tokensIn?: number;
|
|
1710
|
+
tokensOut?: number;
|
|
1711
|
+
sources?: ChatSource[];
|
|
1712
|
+
} | {
|
|
1713
|
+
type: 'STREAM_CANCELLED';
|
|
1714
|
+
id: string;
|
|
1715
|
+
partialText: string;
|
|
1716
|
+
label?: string;
|
|
1717
|
+
} | {
|
|
1718
|
+
type: 'STREAM_ERROR';
|
|
1719
|
+
id?: string;
|
|
1720
|
+
message: string;
|
|
1721
|
+
} | {
|
|
1722
|
+
type: 'MESSAGE_EDIT';
|
|
1723
|
+
id: string;
|
|
1724
|
+
content: string;
|
|
1725
|
+
} | {
|
|
1726
|
+
type: 'MESSAGE_DELETE';
|
|
1727
|
+
id: string;
|
|
1728
|
+
} | {
|
|
1729
|
+
type: 'MESSAGES_CLEAR';
|
|
1730
|
+
} | {
|
|
1731
|
+
type: 'ERROR_SET';
|
|
1732
|
+
error: string | null;
|
|
1733
|
+
} | {
|
|
1734
|
+
type: 'ATTACHMENT_PROGRESS';
|
|
1735
|
+
messageId: string;
|
|
1736
|
+
attachmentId: string;
|
|
1737
|
+
progress?: number;
|
|
1738
|
+
status?: ChatAttachment['status'];
|
|
1739
|
+
};
|
|
1740
|
+
declare function reducer(state: ChatState, action: ChatAction): ChatState;
|
|
1741
|
+
|
|
1742
|
+
interface UseChatConfig {
|
|
1743
|
+
transport: ChatTransport;
|
|
1744
|
+
initialSessionId?: string;
|
|
1745
|
+
autoCreateSession?: boolean;
|
|
1746
|
+
streaming?: boolean;
|
|
1747
|
+
pageSize?: number;
|
|
1748
|
+
onError?: (err: Error) => void;
|
|
1749
|
+
/** Fires once an assistant message finishes streaming (or buffered send returns). */
|
|
1750
|
+
onMessageEnd?: (msg: ChatMessage) => void;
|
|
1751
|
+
/** Fires after a user message is added to the state (right before streaming starts). */
|
|
1752
|
+
onMessageSent?: (msg: ChatMessage) => void;
|
|
1753
|
+
/** Fires when the assistant placeholder is created (first byte / pre-stream). */
|
|
1754
|
+
onStreamStart?: (assistantMessageId: string) => void;
|
|
1755
|
+
metadata?: Record<string, unknown>;
|
|
1756
|
+
/** Stamped on outgoing user messages as `message.sender`. */
|
|
1757
|
+
userPersona?: ChatPersona;
|
|
1758
|
+
}
|
|
1759
|
+
interface UseChatReturn extends ChatState {
|
|
1760
|
+
sendMessage: (content: string, attachments?: ChatAttachment[]) => Promise<void>;
|
|
1761
|
+
cancelStream: () => void;
|
|
1762
|
+
regenerate: (messageId?: string) => Promise<void>;
|
|
1763
|
+
editMessage: (id: string, content: string) => Promise<void>;
|
|
1764
|
+
deleteMessage: (id: string) => void;
|
|
1765
|
+
clearMessages: () => void;
|
|
1766
|
+
loadMore: () => Promise<void>;
|
|
1767
|
+
newSession: () => Promise<void>;
|
|
1768
|
+
lastError: Error | null;
|
|
1769
|
+
}
|
|
1770
|
+
declare function useChat(config: UseChatConfig): UseChatReturn;
|
|
1771
|
+
|
|
1772
|
+
interface UseChatLayoutConfig {
|
|
1773
|
+
defaultMode?: ChatDisplayMode;
|
|
1774
|
+
storageKey?: string;
|
|
1775
|
+
sidebarStorageKey?: string;
|
|
1776
|
+
reserveCssVar?: string;
|
|
1777
|
+
defaultSidebarWidth?: number;
|
|
1778
|
+
minSidebarWidth?: number;
|
|
1779
|
+
maxSidebarWidth?: number;
|
|
1780
|
+
/** Mobile breakpoint, e.g. '(max-width: 640px)'. */
|
|
1781
|
+
mobileQuery?: string;
|
|
1782
|
+
}
|
|
1783
|
+
interface UseChatLayoutReturn {
|
|
1784
|
+
mode: ChatDisplayMode;
|
|
1785
|
+
setMode: (m: ChatDisplayMode) => void;
|
|
1786
|
+
open: () => void;
|
|
1787
|
+
close: () => void;
|
|
1788
|
+
toggle: () => void;
|
|
1789
|
+
sidebarWidth: number;
|
|
1790
|
+
setSidebarWidth: (w: number) => void;
|
|
1791
|
+
isMobile: boolean;
|
|
1792
|
+
/** Mode after mobile collapse rules — sidebar/floating become fullscreen on mobile. */
|
|
1793
|
+
effectiveMode: ChatDisplayMode;
|
|
1794
|
+
}
|
|
1795
|
+
declare function useChatLayout(config?: UseChatLayoutConfig): UseChatLayoutReturn;
|
|
1796
|
+
|
|
1797
|
+
interface ChatContextValue extends UseChatReturn {
|
|
1798
|
+
layout: UseChatLayoutReturn;
|
|
1799
|
+
config: ChatConfig;
|
|
1800
|
+
labels: ChatLabels;
|
|
1801
|
+
audio: UseChatAudioReturn;
|
|
1802
|
+
}
|
|
1803
|
+
interface ChatProviderProps {
|
|
1804
|
+
transport: ChatTransport;
|
|
1805
|
+
config?: ChatConfig;
|
|
1806
|
+
initialSessionId?: string;
|
|
1807
|
+
autoCreateSession?: boolean;
|
|
1808
|
+
streaming?: boolean;
|
|
1809
|
+
/** Audio-trigger configuration. Off by default (no `sounds` map). */
|
|
1810
|
+
audio?: ChatAudioConfig;
|
|
1811
|
+
children?: ReactNode;
|
|
1812
|
+
}
|
|
1813
|
+
declare function ChatProvider({ transport, config, initialSessionId, autoCreateSession, streaming, audio, children, }: ChatProviderProps): react_jsx_runtime.JSX.Element;
|
|
1814
|
+
declare function useChatContext(): ChatContextValue;
|
|
1815
|
+
declare function useChatContextOptional(): ChatContextValue | null;
|
|
1816
|
+
|
|
1817
|
+
interface UseChatComposerOptions {
|
|
1818
|
+
onSubmit: (content: string, attachments: ChatAttachment[]) => void | Promise<void>;
|
|
1819
|
+
initialValue?: string;
|
|
1820
|
+
maxLength?: number;
|
|
1821
|
+
maxAttachments?: number;
|
|
1822
|
+
disabled?: boolean;
|
|
1823
|
+
/** 'enter' = Enter sends, Shift+Enter newline. 'cmd+enter' = Enter inserts newline, Cmd/Ctrl+Enter sends. */
|
|
1824
|
+
submitOn?: 'enter' | 'cmd+enter';
|
|
1825
|
+
history?: {
|
|
1826
|
+
enabled?: boolean;
|
|
1827
|
+
size?: number;
|
|
1828
|
+
};
|
|
1829
|
+
onPasteFiles?: (files: File[]) => void;
|
|
1830
|
+
}
|
|
1831
|
+
interface UseChatComposerReturn {
|
|
1832
|
+
value: string;
|
|
1833
|
+
setValue: (next: string) => void;
|
|
1834
|
+
attachments: ChatAttachment[];
|
|
1835
|
+
addAttachment: (a: ChatAttachment) => void;
|
|
1836
|
+
removeAttachment: (id: string) => void;
|
|
1837
|
+
isSubmitting: boolean;
|
|
1838
|
+
canSubmit: boolean;
|
|
1839
|
+
submit: () => Promise<void>;
|
|
1840
|
+
reset: () => void;
|
|
1841
|
+
focus: () => void;
|
|
1842
|
+
textareaRef: RefObject<HTMLTextAreaElement | null>;
|
|
1843
|
+
textareaProps: {
|
|
1844
|
+
ref: RefObject<HTMLTextAreaElement | null>;
|
|
1845
|
+
value: string;
|
|
1846
|
+
disabled: boolean;
|
|
1847
|
+
onChange: (e: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
1848
|
+
onKeyDown: (e: KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
1849
|
+
onPaste: (e: ClipboardEvent<HTMLTextAreaElement>) => void;
|
|
1850
|
+
};
|
|
1851
|
+
recallPrevious: () => void;
|
|
1852
|
+
recallNext: () => void;
|
|
1853
|
+
}
|
|
1854
|
+
declare function useChatComposer(options: UseChatComposerOptions): UseChatComposerReturn;
|
|
1855
|
+
|
|
1856
|
+
interface AttachmentRendererArgs {
|
|
1857
|
+
attachment: ChatAttachment;
|
|
1858
|
+
/** True when shown inside the composer's staging tray (denser layout). */
|
|
1859
|
+
isInComposer: boolean;
|
|
1860
|
+
onClick?: () => void;
|
|
1861
|
+
onRemove?: () => void;
|
|
1862
|
+
}
|
|
1863
|
+
type AttachmentRenderer = (args: AttachmentRendererArgs) => ReactNode;
|
|
1864
|
+
interface AttachmentRendererMap {
|
|
1865
|
+
image?: AttachmentRenderer;
|
|
1866
|
+
audio?: AttachmentRenderer;
|
|
1867
|
+
video?: AttachmentRenderer;
|
|
1868
|
+
file?: AttachmentRenderer;
|
|
1869
|
+
/** Fallback renderer when no per-type entry matched. */
|
|
1870
|
+
default?: AttachmentRenderer;
|
|
1871
|
+
}
|
|
1872
|
+
interface CommonProps {
|
|
1873
|
+
attachments: ChatAttachment[];
|
|
1874
|
+
maxVisible?: number;
|
|
1875
|
+
onClick?: (a: ChatAttachment) => void;
|
|
1876
|
+
onRemove?: (a: ChatAttachment) => void;
|
|
1877
|
+
isInComposer?: boolean;
|
|
1878
|
+
className?: string;
|
|
1879
|
+
}
|
|
1880
|
+
interface AttachmentsGridProps extends CommonProps {
|
|
1881
|
+
layout?: 'wrap' | 'grid';
|
|
1882
|
+
}
|
|
1883
|
+
declare function AttachmentsGrid({ attachments, maxVisible, onClick, onRemove, isInComposer, layout, className, }: AttachmentsGridProps): react_jsx_runtime.JSX.Element;
|
|
1884
|
+
interface AttachmentsListProps extends CommonProps {
|
|
1885
|
+
/** Per-type renderer overrides. Falls back to the default tile. */
|
|
1886
|
+
renderers?: AttachmentRendererMap;
|
|
1887
|
+
}
|
|
1888
|
+
declare function AttachmentsList({ attachments, maxVisible, onClick, onRemove, renderers, isInComposer, className, }: AttachmentsListProps): react_jsx_runtime.JSX.Element;
|
|
1889
|
+
interface AttachmentsProps extends CommonProps {
|
|
1890
|
+
layout?: 'grid' | 'row';
|
|
1891
|
+
renderers?: AttachmentRendererMap;
|
|
1892
|
+
}
|
|
1893
|
+
declare function Attachments(props: AttachmentsProps): react_jsx_runtime.JSX.Element;
|
|
1894
|
+
|
|
1895
|
+
type ToolPayloadKind = 'input' | 'output' | 'streaming';
|
|
1896
|
+
interface ToolCallsProps {
|
|
1897
|
+
calls: ChatToolCall[];
|
|
1898
|
+
/** Open every panel up-front. Default: false (panels are closed). */
|
|
1899
|
+
defaultExpanded?: boolean;
|
|
1900
|
+
/** Auto-open while a tool is running, then auto-close on completion.
|
|
1901
|
+
* User toggles after that are remembered. Default: true. */
|
|
1902
|
+
expandWhileStreaming?: boolean;
|
|
1903
|
+
/** Override how the tool input payload is rendered. Receives the raw value. */
|
|
1904
|
+
renderInput?: (input: unknown, call: ChatToolCall) => ReactNode;
|
|
1905
|
+
/** Override how the tool output payload is rendered. */
|
|
1906
|
+
renderOutput?: (output: unknown, call: ChatToolCall) => ReactNode;
|
|
1907
|
+
/** Override how the live `streamingText` is rendered. */
|
|
1908
|
+
renderStreaming?: (text: string, call: ChatToolCall) => ReactNode;
|
|
1909
|
+
/** Single override for all three; specific renderers above take precedence. */
|
|
1910
|
+
renderPayload?: (value: unknown, kind: ToolPayloadKind, call: ChatToolCall) => ReactNode;
|
|
1911
|
+
className?: string;
|
|
1912
|
+
}
|
|
1913
|
+
declare function ToolCalls({ calls, defaultExpanded, expandWhileStreaming, renderInput, renderOutput, renderStreaming, renderPayload, className, }: ToolCallsProps): react_jsx_runtime.JSX.Element;
|
|
1914
|
+
|
|
1915
|
+
interface ChatRootProps {
|
|
1916
|
+
transport: ChatTransport;
|
|
1917
|
+
config?: ChatConfig;
|
|
1918
|
+
initialSessionId?: string;
|
|
1919
|
+
autoCreateSession?: boolean;
|
|
1920
|
+
streaming?: boolean;
|
|
1921
|
+
/** Audio-trigger configuration. Off by default (no `sounds` map). */
|
|
1922
|
+
audio?: ChatAudioConfig;
|
|
1923
|
+
className?: string;
|
|
1924
|
+
/** Sticky banner above the message list (e.g. quota warning). */
|
|
1925
|
+
banner?: ReactNode;
|
|
1926
|
+
/** Header row below the banner — title / actions / session switcher. */
|
|
1927
|
+
header?: ReactNode;
|
|
1928
|
+
/** Footer slot below the composer (disclaimers, model picker). */
|
|
1929
|
+
footer?: ReactNode;
|
|
1930
|
+
/** Replaces the default `<EmptyState>` rendered when the conversation is empty. */
|
|
1931
|
+
empty?: ReactNode;
|
|
1932
|
+
/** Slot left of the textarea inside `<Composer>`. */
|
|
1933
|
+
composerToolbarStart?: ReactNode;
|
|
1934
|
+
/** Slot right of the textarea inside `<Composer>`. */
|
|
1935
|
+
composerToolbarEnd?: ReactNode;
|
|
1936
|
+
/** Replaces the default attachment tray inside `<Composer>`. */
|
|
1937
|
+
composerAttachmentTray?: ReactNode;
|
|
1938
|
+
/** Replaces the default `<JumpToLatest>` floating pill. */
|
|
1939
|
+
jumpToLatest?: ReactNode;
|
|
1940
|
+
/** Replace `<MessageBubble>` per message. */
|
|
1941
|
+
renderMessage?: (m: ChatMessage, i: number) => ReactNode;
|
|
1942
|
+
/** Render the header lazily — receives the chat context. */
|
|
1943
|
+
renderHeader?: (ctx: ChatContextValue) => ReactNode;
|
|
1944
|
+
/** Render the empty-state lazily — receives a `setValue` to seed the composer. */
|
|
1945
|
+
renderEmpty?: (api: {
|
|
1946
|
+
setValue: (v: string) => void;
|
|
1947
|
+
focus: () => void;
|
|
1948
|
+
}) => ReactNode;
|
|
1949
|
+
/** Forwarded into `<MessageBubble toolCallsProps>` so hosts can swap payload renderers. */
|
|
1950
|
+
toolCallsProps?: Omit<ToolCallsProps, 'calls'>;
|
|
1951
|
+
/** Per-type attachment renderers — `{ image, audio, video, file, default }`. */
|
|
1952
|
+
attachmentRenderers?: AttachmentRendererMap;
|
|
1953
|
+
/** Called when an attachment tile is clicked (e.g. open lightbox). */
|
|
1954
|
+
onAttachmentOpen?: (attachment: ChatAttachment) => void;
|
|
1955
|
+
/** Show the paperclip "attach" button in the composer. */
|
|
1956
|
+
showAttachmentButton?: boolean;
|
|
1957
|
+
/** Called when the user clicks the attach button (host opens its file picker). */
|
|
1958
|
+
onPickFiles?: () => void;
|
|
1959
|
+
}
|
|
1960
|
+
declare function ChatRoot(props: ChatRootProps): react_jsx_runtime.JSX.Element;
|
|
1961
|
+
|
|
1962
|
+
declare const LazyChat: react.ComponentType<ChatRootProps>;
|
|
1963
|
+
|
|
1964
|
+
/**
|
|
1965
|
+
* Chat defaults and constants.
|
|
1966
|
+
*/
|
|
1967
|
+
declare const STORAGE_KEYS: {
|
|
1968
|
+
readonly mode: "djc-chat-mode";
|
|
1969
|
+
readonly sidebarWidth: "djc-chat-sidebar-width";
|
|
1970
|
+
readonly composerHistory: "djc-chat-composer-history";
|
|
1971
|
+
};
|
|
1972
|
+
declare const CSS_VARS: {
|
|
1973
|
+
readonly reserve: "--djc-chat-reserve";
|
|
1974
|
+
};
|
|
1975
|
+
declare const DEFAULT_Z_INDEX = 9000;
|
|
1976
|
+
declare const LIMITS: {
|
|
1977
|
+
/** Max characters per single message. */
|
|
1978
|
+
readonly messageMaxLength: 8000;
|
|
1979
|
+
/** Max attachments per message. */
|
|
1980
|
+
readonly attachmentsMax: 10;
|
|
1981
|
+
/** Composer history slots. */
|
|
1982
|
+
readonly composerHistorySize: 50;
|
|
1983
|
+
/** Coalesce stream tokens within this window before dispatching. */
|
|
1984
|
+
readonly streamCoalesceMs: 16;
|
|
1985
|
+
/** Default history page size. */
|
|
1986
|
+
readonly pageSize: 50;
|
|
1987
|
+
/** Virtualize list when >= this many messages (host-controlled threshold). */
|
|
1988
|
+
readonly virtualizeThreshold: 50;
|
|
1989
|
+
/** SSE idle timeout. */
|
|
1990
|
+
readonly sseIdleMs: 45000;
|
|
1991
|
+
};
|
|
1992
|
+
declare const DEFAULT_SIDEBAR: {
|
|
1993
|
+
readonly width: 420;
|
|
1994
|
+
readonly min: 320;
|
|
1995
|
+
readonly max: 720;
|
|
1996
|
+
};
|
|
1997
|
+
declare const HOTKEYS: {
|
|
1998
|
+
readonly send: "mod+enter";
|
|
1999
|
+
readonly cancel: "esc";
|
|
2000
|
+
readonly newChat: "mod+shift+n";
|
|
2001
|
+
readonly toggleOpen: "mod+/";
|
|
2002
|
+
readonly focusComposer: "mod+l";
|
|
2003
|
+
};
|
|
2004
|
+
declare const CHAT_EVENT_NAME = "djc:chat:send";
|
|
2005
|
+
interface ChatEventDetail {
|
|
2006
|
+
content: string;
|
|
2007
|
+
sessionId?: string;
|
|
2008
|
+
attachments?: unknown[];
|
|
2009
|
+
metadata?: Record<string, unknown>;
|
|
2010
|
+
}
|
|
1381
2011
|
|
|
1382
|
-
|
|
2012
|
+
/**
|
|
2013
|
+
* ID generation. Uses crypto.randomUUID when available with a fallback
|
|
2014
|
+
* for older environments (and SSR bundles that may not have crypto).
|
|
2015
|
+
*/
|
|
2016
|
+
declare function createId(prefix?: string): string;
|
|
2017
|
+
|
|
2018
|
+
/**
|
|
2019
|
+
* Token coalescer. Buffers stream tokens within a small time window before
|
|
2020
|
+
* dispatching a single aggregated chunk. Prevents 60+ re-renders per second
|
|
2021
|
+
* on fast streams.
|
|
2022
|
+
*/
|
|
2023
|
+
interface TokenBuffer {
|
|
2024
|
+
/** Append a delta. Returns immediately. */
|
|
2025
|
+
push(delta: string): void;
|
|
2026
|
+
/** Force flush and resolve any pending timer. */
|
|
2027
|
+
flush(): void;
|
|
2028
|
+
/** Stop accepting tokens; flush whatever is buffered. */
|
|
2029
|
+
close(): void;
|
|
2030
|
+
}
|
|
2031
|
+
declare function createTokenBuffer(onFlush: (delta: string) => void, windowMs?: 16): TokenBuffer;
|
|
2032
|
+
|
|
2033
|
+
declare function resolvePersona(message: Pick<ChatMessage, 'role' | 'sender'>, user?: ChatUserContext, assistant?: ChatAssistantContext): ChatPersona;
|
|
2034
|
+
/** Compute initials for an avatar fallback. */
|
|
2035
|
+
declare function deriveInitials(persona: ChatPersona, role?: string): string;
|
|
2036
|
+
|
|
2037
|
+
/**
|
|
2038
|
+
* HTTP + SSE transport. Default implementation for web hosts.
|
|
2039
|
+
*
|
|
2040
|
+
* Backend contract (see @dev/@refactoring7-chat/06-integration.md):
|
|
2041
|
+
* POST /sessions → SessionInfo (JSON)
|
|
2042
|
+
* GET /sessions/:id/history?cursor= → HistoryPage (JSON)
|
|
2043
|
+
* POST /sessions/:id/messages → SSE stream of ChatStreamEvent
|
|
2044
|
+
* POST /sessions/:id/messages/buffered → ChatMessage (JSON, fallback)
|
|
2045
|
+
* DELETE /sessions/:id → 204
|
|
2046
|
+
*/
|
|
2047
|
+
|
|
2048
|
+
interface HttpTransportConfig {
|
|
2049
|
+
/** Base URL without trailing slash, e.g. '/api/chat' or 'https://api.example.com/v1/chat'. */
|
|
2050
|
+
baseUrl: string;
|
|
2051
|
+
/** Optional slug appended/forwarded as project identifier. */
|
|
2052
|
+
slug?: string;
|
|
2053
|
+
/** Returns headers applied to every request — e.g. Authorization. */
|
|
2054
|
+
getAuthHeader?: () => Record<string, string> | Promise<Record<string, string>>;
|
|
2055
|
+
/** Default fetch timeout (per non-streaming request). */
|
|
2056
|
+
timeoutMs?: number;
|
|
2057
|
+
/** Override fetch implementation (useful for tests or custom retry layers). */
|
|
2058
|
+
fetchImpl?: typeof fetch;
|
|
2059
|
+
}
|
|
2060
|
+
declare function createHttpTransport(config: HttpTransportConfig): ChatTransport;
|
|
2061
|
+
|
|
2062
|
+
/**
|
|
2063
|
+
* In-memory chat transport for stories and tests. Replays scripted replies.
|
|
2064
|
+
*/
|
|
2065
|
+
|
|
2066
|
+
interface MockTransportOptions {
|
|
2067
|
+
/** Each entry is the assistant's reply for one user turn. Strings are split
|
|
2068
|
+
* into chunks; arrays are taken as the exact event sequence (after a
|
|
2069
|
+
* prepended `message_start` and before a synthetic `message_end`). */
|
|
2070
|
+
replies?: Array<string | ChatStreamEvent[]>;
|
|
2071
|
+
latencyMs?: number;
|
|
2072
|
+
/** Initial history returned by `createSession`. */
|
|
2073
|
+
initialMessages?: ChatMessage[];
|
|
2074
|
+
shouldFail?: (attempt: number) => boolean;
|
|
2075
|
+
}
|
|
2076
|
+
declare function createMockTransport(opts?: MockTransportOptions): ChatTransport;
|
|
2077
|
+
|
|
2078
|
+
/**
|
|
2079
|
+
* Server-Sent Events parser as an AsyncGenerator.
|
|
2080
|
+
*
|
|
2081
|
+
* Yields parsed events from a `Response` body. Handles the split-read case
|
|
2082
|
+
* where `event:` and `data:` arrive in separate TCP packets. Skips malformed
|
|
2083
|
+
* JSON gracefully. Honors AbortSignal (caller passes one to fetch).
|
|
2084
|
+
*/
|
|
2085
|
+
|
|
2086
|
+
interface RawEvent {
|
|
2087
|
+
event?: string;
|
|
2088
|
+
data?: string;
|
|
2089
|
+
}
|
|
2090
|
+
interface ParseSSEOptions {
|
|
2091
|
+
signal?: AbortSignal;
|
|
2092
|
+
/** Map a raw SSE event to a ChatStreamEvent. Default: parse `data` as JSON
|
|
2093
|
+
* and assume the JSON shape already matches `ChatStreamEvent`. */
|
|
2094
|
+
map?: (raw: RawEvent) => ChatStreamEvent | null;
|
|
2095
|
+
idleTimeoutMs?: number;
|
|
2096
|
+
}
|
|
2097
|
+
declare function parseSSE(response: Response, options?: ParseSSEOptions): AsyncGenerator<ChatStreamEvent, void, void>;
|
|
2098
|
+
|
|
2099
|
+
/**
|
|
2100
|
+
* Transport surface re-export. Lives in core so transport implementations
|
|
2101
|
+
* never need to reach into the public types module.
|
|
2102
|
+
*/
|
|
2103
|
+
|
|
2104
|
+
declare class TransportError extends Error {
|
|
2105
|
+
code: string;
|
|
2106
|
+
constructor(message: string, code?: string);
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
interface UseChatScrollOptions {
|
|
2110
|
+
containerRef: RefObject<HTMLElement | null>;
|
|
2111
|
+
bottomRef: RefObject<HTMLElement | null>;
|
|
2112
|
+
isStreaming?: boolean;
|
|
2113
|
+
/** Distance from bottom (px) considered "at bottom". */
|
|
2114
|
+
bottomThresholdPx?: number;
|
|
2115
|
+
/** Bump key — increment when a new message arrives so the hook re-evaluates auto-scroll. */
|
|
2116
|
+
messagesCount?: number;
|
|
2117
|
+
}
|
|
2118
|
+
interface UseChatScrollReturn {
|
|
2119
|
+
isAtBottom: boolean;
|
|
2120
|
+
unreadCount: number;
|
|
2121
|
+
scrollToBottom: (smooth?: boolean) => void;
|
|
2122
|
+
resetUnread: () => void;
|
|
2123
|
+
}
|
|
2124
|
+
declare function useChatScroll(options: UseChatScrollOptions): UseChatScrollReturn;
|
|
2125
|
+
|
|
2126
|
+
interface UseChatHistoryOptions {
|
|
2127
|
+
enabled?: boolean;
|
|
2128
|
+
containerRef: RefObject<HTMLElement | null>;
|
|
2129
|
+
topSentinelRef: RefObject<HTMLElement | null>;
|
|
2130
|
+
hasMore: boolean;
|
|
2131
|
+
isLoadingMore: boolean;
|
|
2132
|
+
loadMore: () => Promise<void>;
|
|
2133
|
+
}
|
|
2134
|
+
/** Triggers `loadMore` when the top sentinel enters the container's viewport.
|
|
2135
|
+
* Preserves scroll anchor: if the container's height grows after load, we
|
|
2136
|
+
* bump scrollTop by the delta so the previously-visible message stays put. */
|
|
2137
|
+
declare function useChatHistory(options: UseChatHistoryOptions): void;
|
|
2138
|
+
|
|
2139
|
+
declare function useChatAudio(config?: ChatAudioConfig): UseChatAudioReturn;
|
|
2140
|
+
|
|
2141
|
+
interface ChatLightboxState {
|
|
2142
|
+
gallery: ChatAttachment[];
|
|
2143
|
+
index: number;
|
|
2144
|
+
}
|
|
2145
|
+
interface UseChatLightboxReturn {
|
|
2146
|
+
state: ChatLightboxState | null;
|
|
2147
|
+
open: (att: ChatAttachment, gallery?: ChatAttachment[]) => void;
|
|
2148
|
+
close: () => void;
|
|
2149
|
+
}
|
|
2150
|
+
/** Tiny state container for an image lightbox. The host owns the modal +
|
|
2151
|
+
* `<LazyImageViewer>` mount; we just track which gallery to show. */
|
|
2152
|
+
declare function useChatLightbox(): UseChatLightboxReturn;
|
|
2153
|
+
|
|
2154
|
+
interface ChatAudioPrefsState {
|
|
2155
|
+
/** 0..1 master volume. */
|
|
2156
|
+
volume: number;
|
|
2157
|
+
/** Master mute (overrides per-event toggles). */
|
|
2158
|
+
muted: boolean;
|
|
2159
|
+
/** Per-event opt-out — `false` silences a single trigger. */
|
|
2160
|
+
enabled: Partial<Record<ChatAudioEvent, boolean>>;
|
|
2161
|
+
setVolume: (v: number) => void;
|
|
2162
|
+
setMuted: (m: boolean) => void;
|
|
2163
|
+
setEventEnabled: (event: ChatAudioEvent, enabled: boolean) => void;
|
|
2164
|
+
}
|
|
2165
|
+
declare const useChatAudioPrefs: zustand.UseBoundStore<Omit<zustand.StoreApi<ChatAudioPrefsState>, "setState" | "persist"> & {
|
|
2166
|
+
setState(partial: ChatAudioPrefsState | Partial<ChatAudioPrefsState> | ((state: ChatAudioPrefsState) => ChatAudioPrefsState | Partial<ChatAudioPrefsState>), replace?: false): unknown;
|
|
2167
|
+
setState(state: ChatAudioPrefsState | ((state: ChatAudioPrefsState) => ChatAudioPrefsState), replace: true): unknown;
|
|
2168
|
+
persist: {
|
|
2169
|
+
setOptions: (options: Partial<zustand_middleware.PersistOptions<ChatAudioPrefsState, unknown, unknown>>) => void;
|
|
2170
|
+
clearStorage: () => void;
|
|
2171
|
+
rehydrate: () => Promise<void> | void;
|
|
2172
|
+
hasHydrated: () => boolean;
|
|
2173
|
+
onHydrate: (fn: (state: ChatAudioPrefsState) => void) => () => void;
|
|
2174
|
+
onFinishHydration: (fn: (state: ChatAudioPrefsState) => void) => () => void;
|
|
2175
|
+
getOptions: () => Partial<zustand_middleware.PersistOptions<ChatAudioPrefsState, unknown, unknown>>;
|
|
2176
|
+
};
|
|
2177
|
+
}>;
|
|
2178
|
+
|
|
2179
|
+
interface ToolPayloadMatcher {
|
|
2180
|
+
/** Cheap predicate. First match wins. */
|
|
2181
|
+
match: (value: unknown, kind: ToolPayloadKind, call: ChatToolCall) => boolean;
|
|
2182
|
+
render: (value: unknown, kind: ToolPayloadKind, call: ChatToolCall) => ReactNode;
|
|
2183
|
+
}
|
|
2184
|
+
type ToolPayloadFallback = (value: unknown, kind: ToolPayloadKind, call: ChatToolCall) => ReactNode;
|
|
2185
|
+
declare function dispatchToolPayload(matchers: ToolPayloadMatcher[], fallback: ToolPayloadFallback): ToolPayloadFallback;
|
|
2186
|
+
declare function isPlainObject(v: unknown): v is Record<string, unknown>;
|
|
2187
|
+
declare function isLatLng(v: unknown): v is {
|
|
2188
|
+
lat: number;
|
|
2189
|
+
lng: number;
|
|
2190
|
+
};
|
|
2191
|
+
declare function isGeoJSONFeatureCollection(v: unknown): v is {
|
|
2192
|
+
type: 'FeatureCollection';
|
|
2193
|
+
features: unknown[];
|
|
2194
|
+
};
|
|
2195
|
+
declare function isStringValue(v: unknown): v is string;
|
|
2196
|
+
|
|
2197
|
+
/** Walk the conversation and collect image attachments in chronological order. */
|
|
2198
|
+
declare function collectImageAttachments(messages: ChatMessage[]): ChatAttachment[];
|
|
2199
|
+
|
|
2200
|
+
interface MessageListProps {
|
|
2201
|
+
messages?: ChatMessage[];
|
|
2202
|
+
renderItem?: (m: ChatMessage, i: number) => ReactNode;
|
|
2203
|
+
renderEmpty?: () => ReactNode;
|
|
2204
|
+
isLoadingMore?: boolean;
|
|
2205
|
+
topSentinelRef?: RefObject<HTMLDivElement | null>;
|
|
2206
|
+
bottomRef?: RefObject<HTMLDivElement | null>;
|
|
2207
|
+
className?: string;
|
|
2208
|
+
itemClassName?: string;
|
|
2209
|
+
}
|
|
2210
|
+
declare const MessageList: react.ForwardRefExoticComponent<MessageListProps & react.RefAttributes<HTMLDivElement>>;
|
|
2211
|
+
|
|
2212
|
+
interface MessageBubbleProps {
|
|
2213
|
+
message: ChatMessage;
|
|
2214
|
+
isUser?: boolean;
|
|
2215
|
+
showAvatar?: boolean;
|
|
2216
|
+
/** Override avatar URL (skips persona resolution). */
|
|
2217
|
+
avatarSrc?: string;
|
|
2218
|
+
/** Override avatar fallback (skips persona resolution). */
|
|
2219
|
+
avatarFallback?: ReactNode;
|
|
2220
|
+
/** Personas — when provided, take precedence over context. */
|
|
2221
|
+
user?: ChatUserContext;
|
|
2222
|
+
assistant?: ChatAssistantContext;
|
|
2223
|
+
showTimestamp?: boolean;
|
|
2224
|
+
showActions?: boolean;
|
|
2225
|
+
isCompact?: boolean;
|
|
2226
|
+
className?: string;
|
|
2227
|
+
beforeContent?: ReactNode;
|
|
2228
|
+
afterContent?: ReactNode;
|
|
2229
|
+
toolCallsRenderer?: (calls: ChatToolCall[]) => ReactNode;
|
|
2230
|
+
/** Forwarded to the default `<ToolCalls>` when `toolCallsRenderer` is not set. */
|
|
2231
|
+
toolCallsProps?: Omit<ToolCallsProps, 'calls'>;
|
|
2232
|
+
sourcesRenderer?: (sources: ChatSource[]) => ReactNode;
|
|
2233
|
+
attachmentsRenderer?: (atts: ChatAttachment[]) => ReactNode;
|
|
2234
|
+
/** Per-type attachment renderers forwarded to default `<Attachments>`. */
|
|
2235
|
+
attachmentRenderers?: AttachmentRendererMap;
|
|
2236
|
+
/** Click handler for attachment tiles (e.g. open lightbox). */
|
|
2237
|
+
onAttachmentOpen?: (a: ChatAttachment) => void;
|
|
2238
|
+
onCopy?: () => void;
|
|
2239
|
+
onRegenerate?: () => void;
|
|
2240
|
+
onEdit?: () => void;
|
|
2241
|
+
onDelete?: () => void;
|
|
2242
|
+
}
|
|
2243
|
+
declare const MessageBubble: react.MemoExoticComponent<({ message, isUser: isUserProp, showAvatar, avatarSrc, avatarFallback, user, assistant, showTimestamp, showActions, isCompact, className, beforeContent, afterContent, toolCallsRenderer, toolCallsProps, sourcesRenderer, attachmentsRenderer, attachmentRenderers, onAttachmentOpen, onCopy, onRegenerate, onEdit, onDelete, }: MessageBubbleProps) => react_jsx_runtime.JSX.Element>;
|
|
2244
|
+
|
|
2245
|
+
interface MessageActionsProps {
|
|
2246
|
+
role: ChatRole;
|
|
2247
|
+
onCopy?: () => void;
|
|
2248
|
+
onRegenerate?: () => void;
|
|
2249
|
+
onEdit?: () => void;
|
|
2250
|
+
onDelete?: () => void;
|
|
2251
|
+
hideOn?: Array<ChatRole>;
|
|
2252
|
+
className?: string;
|
|
2253
|
+
}
|
|
2254
|
+
declare function MessageActions({ role, onCopy, onRegenerate, onEdit, onDelete, hideOn, className, }: MessageActionsProps): react_jsx_runtime.JSX.Element;
|
|
2255
|
+
|
|
2256
|
+
interface ComposerProps {
|
|
2257
|
+
composer: UseChatComposerReturn;
|
|
2258
|
+
placeholder?: string;
|
|
2259
|
+
disabled?: boolean;
|
|
2260
|
+
showAttachmentButton?: boolean;
|
|
2261
|
+
onPickFiles?: () => void;
|
|
2262
|
+
toolbarStart?: ReactNode;
|
|
2263
|
+
toolbarEnd?: ReactNode;
|
|
2264
|
+
attachmentTray?: ReactNode;
|
|
2265
|
+
className?: string;
|
|
2266
|
+
textareaClassName?: string;
|
|
2267
|
+
/** Show "Stop" button instead of "Send" while streaming. */
|
|
2268
|
+
isStreaming?: boolean;
|
|
2269
|
+
onCancel?: () => void;
|
|
2270
|
+
}
|
|
2271
|
+
declare const Composer: react.ForwardRefExoticComponent<ComposerProps & react.RefAttributes<HTMLDivElement>>;
|
|
2272
|
+
|
|
2273
|
+
interface SourcesProps {
|
|
2274
|
+
sources: ChatSource[];
|
|
2275
|
+
layout?: 'inline' | 'grid';
|
|
2276
|
+
maxVisible?: number;
|
|
2277
|
+
onClick?: (source: ChatSource) => void;
|
|
2278
|
+
className?: string;
|
|
2279
|
+
}
|
|
2280
|
+
declare function Sources({ sources, layout, maxVisible, onClick, className }: SourcesProps): react_jsx_runtime.JSX.Element;
|
|
2281
|
+
|
|
2282
|
+
interface EmptyStateProps {
|
|
2283
|
+
greeting?: string;
|
|
2284
|
+
description?: string;
|
|
2285
|
+
suggestions?: Array<{
|
|
2286
|
+
label: string;
|
|
2287
|
+
prompt: string;
|
|
2288
|
+
}>;
|
|
2289
|
+
onPickSuggestion?: (prompt: string) => void;
|
|
2290
|
+
className?: string;
|
|
2291
|
+
}
|
|
2292
|
+
declare function EmptyState({ greeting, description, suggestions, onPickSuggestion, className, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
2293
|
+
|
|
2294
|
+
interface ErrorBannerProps {
|
|
2295
|
+
error: string | null;
|
|
2296
|
+
onDismiss?: () => void;
|
|
2297
|
+
onRetry?: () => void;
|
|
2298
|
+
className?: string;
|
|
2299
|
+
}
|
|
2300
|
+
declare function ErrorBanner({ error, onDismiss, onRetry, className }: ErrorBannerProps): react_jsx_runtime.JSX.Element;
|
|
2301
|
+
|
|
2302
|
+
interface JumpToLatestProps {
|
|
2303
|
+
visible?: boolean;
|
|
2304
|
+
unreadCount?: number;
|
|
2305
|
+
onClick?: () => void;
|
|
2306
|
+
className?: string;
|
|
2307
|
+
}
|
|
2308
|
+
declare function JumpToLatest({ visible, unreadCount, onClick, className }: JumpToLatestProps): react_jsx_runtime.JSX.Element;
|
|
2309
|
+
|
|
2310
|
+
interface StreamingIndicatorProps {
|
|
2311
|
+
variant?: 'dots' | 'pulse';
|
|
2312
|
+
label?: string;
|
|
2313
|
+
className?: string;
|
|
2314
|
+
}
|
|
2315
|
+
declare function StreamingIndicator({ variant, label, className }: StreamingIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
1383
2316
|
|
|
1384
2317
|
/**
|
|
1385
2318
|
* PrettyCode Component - Dynamic Import Wrapper
|
|
@@ -1418,7 +2351,7 @@ interface PrettyCodeProps {
|
|
|
1418
2351
|
*/
|
|
1419
2352
|
variant?: 'card' | 'plain';
|
|
1420
2353
|
}
|
|
1421
|
-
declare const PrettyCode:
|
|
2354
|
+
declare const PrettyCode: react__default.FC<PrettyCodeProps>;
|
|
1422
2355
|
|
|
1423
2356
|
/**
|
|
1424
2357
|
* useLottie Hook
|
|
@@ -1501,7 +2434,7 @@ declare function LottiePlayer(props: LottiePlayerProps): react_jsx_runtime.JSX.E
|
|
|
1501
2434
|
interface PlaygroundProps {
|
|
1502
2435
|
config: PlaygroundConfig;
|
|
1503
2436
|
}
|
|
1504
|
-
declare const Playground:
|
|
2437
|
+
declare const Playground: react__default.FC<PlaygroundProps>;
|
|
1505
2438
|
|
|
1506
2439
|
/**
|
|
1507
2440
|
* VideoPlayer - Unified Video Player Component
|
|
@@ -1541,12 +2474,12 @@ declare const Playground: React__default.FC<PlaygroundProps>;
|
|
|
1541
2474
|
* <VideoPlayer source={{ type: 'blob', data: arrayBuffer, mimeType: 'video/mp4' }} />
|
|
1542
2475
|
*/
|
|
1543
2476
|
|
|
1544
|
-
declare const VideoPlayer:
|
|
2477
|
+
declare const VideoPlayer: react__default.ForwardRefExoticComponent<VideoPlayerProps & {
|
|
1545
2478
|
source: VideoSourceUnion | SimpleStreamSource;
|
|
1546
|
-
} &
|
|
2479
|
+
} & react__default.RefAttributes<VideoPlayerRef>>;
|
|
1547
2480
|
|
|
1548
2481
|
interface VideoControlsProps {
|
|
1549
|
-
player:
|
|
2482
|
+
player: react__default.RefObject<MediaPlayerInstance | null>;
|
|
1550
2483
|
className?: string;
|
|
1551
2484
|
}
|
|
1552
2485
|
declare function VideoControls({ player, className }: VideoControlsProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1563,7 +2496,7 @@ interface VideoErrorFallbackProps extends ErrorFallbackProps {
|
|
|
1563
2496
|
/** Custom className */
|
|
1564
2497
|
className?: string;
|
|
1565
2498
|
/** Custom icon */
|
|
1566
|
-
icon?:
|
|
2499
|
+
icon?: react__default.ReactNode;
|
|
1567
2500
|
/** Custom title (defaults to error message) */
|
|
1568
2501
|
title?: string;
|
|
1569
2502
|
/** Custom description */
|
|
@@ -1618,21 +2551,21 @@ interface CreateVideoErrorFallbackOptions {
|
|
|
1618
2551
|
*
|
|
1619
2552
|
* <VideoPlayer source={source} errorFallback={errorFallback} />
|
|
1620
2553
|
*/
|
|
1621
|
-
declare function createVideoErrorFallback(options: CreateVideoErrorFallbackOptions): (props: ErrorFallbackProps, source?: unknown) =>
|
|
2554
|
+
declare function createVideoErrorFallback(options: CreateVideoErrorFallbackOptions): (props: ErrorFallbackProps, source?: unknown) => react__default.ReactNode;
|
|
1622
2555
|
|
|
1623
2556
|
/**
|
|
1624
2557
|
* VidstackProvider - Full-featured video player using Vidstack
|
|
1625
2558
|
* Supports YouTube, Vimeo, HLS, DASH, and direct URLs
|
|
1626
2559
|
*/
|
|
1627
2560
|
|
|
1628
|
-
declare const VidstackProvider:
|
|
2561
|
+
declare const VidstackProvider: react__default.ForwardRefExoticComponent<VidstackProviderProps & react__default.RefAttributes<VideoPlayerRef>>;
|
|
1629
2562
|
|
|
1630
2563
|
/**
|
|
1631
2564
|
* NativeProvider - Lightweight native HTML5 video player
|
|
1632
2565
|
* For demo videos, background videos, autoplay loop muted scenarios
|
|
1633
2566
|
*/
|
|
1634
2567
|
|
|
1635
|
-
declare const NativeProvider:
|
|
2568
|
+
declare const NativeProvider: react__default.ForwardRefExoticComponent<NativeProviderProps & react__default.RefAttributes<VideoPlayerRef>>;
|
|
1636
2569
|
|
|
1637
2570
|
/**
|
|
1638
2571
|
* StreamProvider - HTTP Range streaming and Blob video player
|
|
@@ -1644,7 +2577,7 @@ declare const NativeProvider: React__default.ForwardRefExoticComponent<NativePro
|
|
|
1644
2577
|
* - Custom error fallback
|
|
1645
2578
|
*/
|
|
1646
2579
|
|
|
1647
|
-
declare const StreamProvider:
|
|
2580
|
+
declare const StreamProvider: react__default.ForwardRefExoticComponent<StreamProviderProps & react__default.RefAttributes<VideoPlayerRef>>;
|
|
1648
2581
|
|
|
1649
2582
|
/**
|
|
1650
2583
|
* Provider for VideoPlayer streaming configuration
|
|
@@ -1703,7 +2636,7 @@ declare function resolveStreamSource(source: SimpleStreamSource, context: VideoP
|
|
|
1703
2636
|
*/
|
|
1704
2637
|
declare function resolveFileSource(options: ResolveFileSourceOptions): VideoSourceUnion | null;
|
|
1705
2638
|
|
|
1706
|
-
declare const Player:
|
|
2639
|
+
declare const Player: react.ForwardRefExoticComponent<PlayerProps & react.RefAttributes<PlayerHandle>>;
|
|
1707
2640
|
|
|
1708
2641
|
declare function ImageViewer({ images, initialIndex, inDialog, }: ImageViewerProps): react_jsx_runtime.JSX.Element;
|
|
1709
2642
|
|
|
@@ -2015,7 +2948,7 @@ interface EditorRef {
|
|
|
2015
2948
|
* />
|
|
2016
2949
|
* ```
|
|
2017
2950
|
*/
|
|
2018
|
-
declare const Editor:
|
|
2951
|
+
declare const Editor: react.ForwardRefExoticComponent<EditorProps & react.RefAttributes<EditorRef>>;
|
|
2019
2952
|
|
|
2020
2953
|
/**
|
|
2021
2954
|
* Monaco Diff Editor Component
|
|
@@ -2400,4 +3333,4 @@ declare function useBlobUrlCleanup(key: string | null): void;
|
|
|
2400
3333
|
*/
|
|
2401
3334
|
declare function generateContentKey(content: ArrayBuffer): string;
|
|
2402
3335
|
|
|
2403
|
-
export { type ApiKey, ArrayFieldItemTemplate, ArrayFieldTemplate, type AspectRatioValue, Player as AudioPlayer, type PlayerProps as AudioPlayerProps, BaseInputTemplate, type BlobSource, CardLoadingFallback, CheckboxWidget, ColorWidget, type CreateLazyComponentOptions, type CreateVideoErrorFallbackOptions, CronScheduler, type CronSchedulerContextValue, type CronSchedulerProps, CronSchedulerProvider, type CronSchedulerState, CustomInput, type DASHSource, type DataUrlSource, DayChips, DiffEditor, type DiffEditorProps, type DisabledWhenRule, Editor, type EditorContextValue, type EditorFile, type EditorOptions, type EditorProps, EditorProvider, type EditorRef, type ErrorFallbackProps, ErrorListTemplate, FieldTemplate, type HLSSource, type ImageFile, ImageViewer, type ImageViewerProps, type JsonFormContext, type JsonFormDensity, JsonSchemaForm, type JsonSchemaFormProps, JsonTreeComponent as JsonTree, type JsonTreeConfig, type JsonTreeProps, LazyPlayer as LazyAudioPlayer, LazyCronScheduler, LazyImageViewer, LazyJsonSchemaForm, LazyJsonTree, LazyLottiePlayer, LazyMapContainer, LazyMapView, LazyMermaid, LazyOpenapiViewer, LazyPrettyCode, LazyTree, TreeRootProps as LazyTreeProps, LazyVideoPlayer, LazyWrapper, type LazyWrapperProps, type LinkRule, LoadingFallback, type LoadingFallbackProps, type LottieDirection, LottiePlayer, type LottiePlayerProps, type LottieSize, type LottieSpeed, type MapContainerProps, MapLoadingFallback, type MapStyleKey, type MapViewport, MarkdownEditor, type MarkdownEditorProps, MarkdownMessage, type MarkdownMessageProps, type MarkerData, type MentionAttrs, type MentionConfig, type MentionItem, type MentionMarkdownRenderer, Mermaid, type MermaidProps, type MonthDay, MonthDayGrid, NativeProvider, NumberWidget, ObjectFieldTemplate, Playground as OpenapiViewer, type PlayerMode, type PlaygroundConfig, type PlaygroundProps$1 as PlaygroundProps, PrettyCode, type PrettyCodeProps$1 as PrettyCodeProps, type ResolveFileSourceOptions, SchedulePreview, type ScheduleType, ScheduleTypeSelector, type SchemaSource, SelectWidget, type SimpleStreamSource, SliderWidget, Spinner, StreamProvider, type StreamSource, SwitchWidget, TextWidget, TimeSelector, TreeRootProps, type UiGroup, type UrlSource, type UseCollapsibleContentOptions, type UseCollapsibleContentResult, type UseEditorReturn, type UseLottieOptions, type UseLottieReturn, type UseMonacoReturn, VideoControls, VideoErrorFallback, type VideoErrorFallbackProps, VideoPlayer, type VideoPlayerContextValue, type VideoPlayerProps, VideoPlayerProvider, type VideoPlayerProviderProps, type VideoPlayerRef, type VideoSourceUnion, VidstackProvider, type VimeoSource, type WeekDay, type YouTubeSource, buildCron, createLazyComponent, createVideoErrorFallback, evaluateDisabledWhen, extractTextFromChildren, generateContentKey, getRequiredFields, hasRequiredFields, humanizeCron, isSimpleStreamSource, isValidCron, mentionPresets, mergeDefaults, normalizeFormData, parseCron, resolveFileSource, resolvePlayerMode, resolveStreamSource, safeJsonParse, safeJsonStringify, useAudioCache, useBlobUrlCleanup, useCollapsibleContent, useCronCustom, useCronMonthDays, useCronPreview, useCronScheduler, useCronSchedulerContext, useCronTime, useCronType, useCronWeekDays, useEditor, useEditorContext, useImageCache, useLanguage, useLottie, useMediaCacheStore, useMonaco, useVideoCache, useVideoPlayerContext, useVideoPlayerSettings, validateRequiredFields, validateSchema };
|
|
3336
|
+
export { type ApiKey, ArrayFieldItemTemplate, ArrayFieldTemplate, type AspectRatioValue, type AttachmentRenderer, type AttachmentRendererArgs, type AttachmentRendererMap, Attachments, AttachmentsGrid, type AttachmentsGridProps, AttachmentsList, type AttachmentsListProps, type AttachmentsProps, Player as AudioPlayer, type PlayerProps as AudioPlayerProps, BaseInputTemplate, type BlobSource, CHAT_EVENT_NAME, CSS_VARS, CardLoadingFallback, type ChatAction, type ChatAssistantContext, type ChatAttachment, type ChatAudioConfig, type ChatAudioEvent, type ChatAudioSounds, type ChatConfig, type ChatContextValue, type ChatDisplayMode, type ChatEventDetail, type ChatLabels, type ChatLightboxState, type ChatMessage, type ChatPersona, type ChatPrefs, ChatProvider, type ChatProviderProps, type ChatRole, ChatRoot, type ChatRootProps, type ChatSource, type ChatState, type ChatStreamEvent, type ChatToolCall, type ChatTransport, type ChatUserContext, CheckboxWidget, ColorWidget, Composer, type ComposerProps, type CreateLazyComponentOptions, type CreateSessionOptions, type CreateVideoErrorFallbackOptions, CronScheduler, type CronSchedulerContextValue, type CronSchedulerProps, CronSchedulerProvider, type CronSchedulerState, CustomInput, type DASHSource, DEFAULT_LABELS, DEFAULT_SIDEBAR, DEFAULT_Z_INDEX, type DataUrlSource, DayChips, DiffEditor, type DiffEditorProps, type DisabledWhenRule, Editor, type EditorContextValue, type EditorFile, type EditorOptions, type EditorProps, EditorProvider, type EditorRef, EmptyState, type EmptyStateProps, ErrorBanner, type ErrorBannerProps, type ErrorFallbackProps, ErrorListTemplate, FieldTemplate, type HLSSource, HOTKEYS, type HistoryPage, type HttpTransportConfig, type ImageFile, ImageViewer, type ImageViewerProps, type JsonFormContext, type JsonFormDensity, JsonSchemaForm, type JsonSchemaFormProps, JsonTreeComponent as JsonTree, type JsonTreeConfig, type JsonTreeProps, JumpToLatest, type JumpToLatestProps, LIMITS, LazyPlayer as LazyAudioPlayer, LazyChat, type ChatRootProps as LazyChatProps, LazyCronScheduler, LazyImageViewer, LazyJsonSchemaForm, LazyJsonTree, LazyLottiePlayer, LazyMapContainer, LazyMapView, LazyMermaid, LazyOpenapiViewer, LazyPrettyCode, LazyTree, TreeRootProps as LazyTreeProps, LazyVideoPlayer, LazyWrapper, type LazyWrapperProps, type LinkRule, LoadingFallback, type LoadingFallbackProps, type LottieDirection, LottiePlayer, type LottiePlayerProps, type LottieSize, type LottieSpeed, type MapContainerProps, MapLoadingFallback, type MapStyleKey, type MapViewport, MarkdownEditor, type MarkdownEditorProps, MarkdownMessage, type MarkdownMessageProps, type MarkerData, type MentionAttrs, type MentionConfig, type MentionItem, type MentionMarkdownRenderer, Mermaid, type MermaidProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageList, type MessageListProps, type MockTransportOptions, type MonthDay, MonthDayGrid, NativeProvider, NumberWidget, ObjectFieldTemplate, Playground as OpenapiViewer, type ParseSSEOptions, type PlayerMode, type PlaygroundConfig, type PlaygroundProps$1 as PlaygroundProps, PrettyCode, type PrettyCodeProps$1 as PrettyCodeProps, type ResolveFileSourceOptions, STORAGE_KEYS, SchedulePreview, type ScheduleType, ScheduleTypeSelector, type SchemaSource, SelectWidget, type SendOptions, type SessionInfo, type SimpleStreamSource, SliderWidget, Sources, type SourcesProps, Spinner, type StreamOptions, StreamProvider, type StreamSource, StreamingIndicator, type StreamingIndicatorProps, SwitchWidget, TextWidget, TimeSelector, type TokenBuffer, ToolCalls, type ToolCallsProps, type ToolPayloadFallback, type ToolPayloadKind, type ToolPayloadMatcher, TransportError, TreeRootProps, type UiGroup, type UrlSource, type UseChatAudioReturn, type UseChatComposerOptions, type UseChatComposerReturn, type UseChatConfig, type UseChatHistoryOptions, type UseChatLayoutConfig, type UseChatLayoutReturn, type UseChatLightboxReturn, type UseChatReturn, type UseChatScrollOptions, type UseChatScrollReturn, type UseCollapsibleContentOptions, type UseCollapsibleContentResult, type UseEditorReturn, type UseLottieOptions, type UseLottieReturn, type UseMonacoReturn, VideoControls, VideoErrorFallback, type VideoErrorFallbackProps, VideoPlayer, type VideoPlayerContextValue, type VideoPlayerProps, VideoPlayerProvider, type VideoPlayerProviderProps, type VideoPlayerRef, type VideoSourceUnion, VidstackProvider, type VimeoSource, type WeekDay, type YouTubeSource, buildCron, collectImageAttachments, createHttpTransport, createId, createLazyComponent, createMockTransport, createTokenBuffer, createVideoErrorFallback, deriveInitials, dispatchToolPayload, evaluateDisabledWhen, extractTextFromChildren, generateContentKey, getRequiredFields, hasRequiredFields, humanizeCron, initialState, isGeoJSONFeatureCollection, isLatLng, isPlainObject, isSimpleStreamSource, isStringValue, isValidCron, mentionPresets, mergeDefaults, normalizeFormData, parseCron, parseSSE, reducer, resolveFileSource, resolvePersona, resolvePlayerMode, resolveStreamSource, safeJsonParse, safeJsonStringify, useAudioCache, useBlobUrlCleanup, useChat, useChatAudio, useChatAudioPrefs, useChatComposer, useChatContext, useChatContextOptional, useChatHistory, useChatLayout, useChatLightbox, useChatScroll, useCollapsibleContent, useCronCustom, useCronMonthDays, useCronPreview, useCronScheduler, useCronSchedulerContext, useCronTime, useCronType, useCronWeekDays, useEditor, useEditorContext, useImageCache, useLanguage, useLottie, useMediaCacheStore, useMonaco, useVideoCache, useVideoPlayerContext, useVideoPlayerSettings, validateRequiredFields, validateSchema };
|