@tangle-network/ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/LICENSE +21 -0
- package/README.md +33 -0
- package/dist/active-sessions-store-CeOmXgv5.d.ts +85 -0
- package/dist/artifact-pane-DvJyPWV4.d.ts +24 -0
- package/dist/auth.d.ts +74 -0
- package/dist/auth.js +15 -0
- package/dist/button-CMQuQEW_.d.ts +17 -0
- package/dist/chat.d.ts +232 -0
- package/dist/chat.js +30 -0
- package/dist/chunk-2NFQRQOD.js +1009 -0
- package/dist/chunk-2VH6PUXD.js +186 -0
- package/dist/chunk-34A66VBG.js +214 -0
- package/dist/chunk-3OI2QKFD.js +0 -0
- package/dist/chunk-4CLN43XT.js +45 -0
- package/dist/chunk-54SQQMMM.js +156 -0
- package/dist/chunk-5Z5ZYMOJ.js +0 -0
- package/dist/chunk-66BNMOVT.js +167 -0
- package/dist/chunk-6BGQA4BQ.js +0 -0
- package/dist/chunk-7UO2ZMRQ.js +133 -0
- package/dist/chunk-BX6AQMUS.js +183 -0
- package/dist/chunk-CD53GZOM.js +59 -0
- package/dist/chunk-CSAIKY36.js +54 -0
- package/dist/chunk-EEE55AVS.js +1201 -0
- package/dist/chunk-GYPQXTJU.js +230 -0
- package/dist/chunk-HFL6R6IF.js +37 -0
- package/dist/chunk-HJKCSXCH.js +737 -0
- package/dist/chunk-LISXUB4D.js +1222 -0
- package/dist/chunk-LQS34IGP.js +0 -0
- package/dist/chunk-MKTSMWVD.js +109 -0
- package/dist/chunk-NKDZ7GZE.js +192 -0
- package/dist/chunk-OEX7NZE3.js +321 -0
- package/dist/chunk-Q56BYXQF.js +61 -0
- package/dist/chunk-Q7EIIWTC.js +0 -0
- package/dist/chunk-REJESC5U.js +117 -0
- package/dist/chunk-RQGKSCEZ.js +0 -0
- package/dist/chunk-RQHJBTEU.js +10 -0
- package/dist/chunk-TMFOPHHN.js +299 -0
- package/dist/chunk-XGKULLYE.js +40 -0
- package/dist/chunk-XIHMJ7ZQ.js +614 -0
- package/dist/chunk-YJ2G3XO5.js +1048 -0
- package/dist/chunk-YNN4O57I.js +754 -0
- package/dist/code-block-DjXf8eOG.d.ts +19 -0
- package/dist/document-editor-pane-A5LT5H4N.js +12 -0
- package/dist/document-editor-pane-DyDEX_Zm.d.ts +124 -0
- package/dist/editor.d.ts +120 -0
- package/dist/editor.js +34 -0
- package/dist/files.d.ts +175 -0
- package/dist/files.js +20 -0
- package/dist/hooks.d.ts +56 -0
- package/dist/hooks.js +41 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +446 -0
- package/dist/markdown.d.ts +15 -0
- package/dist/markdown.js +14 -0
- package/dist/message-BHWbxBtT.d.ts +15 -0
- package/dist/openui.d.ts +115 -0
- package/dist/openui.js +12 -0
- package/dist/parts-dj7AcUg0.d.ts +36 -0
- package/dist/primitives.d.ts +332 -0
- package/dist/primitives.js +191 -0
- package/dist/run-PfLmDAox.d.ts +41 -0
- package/dist/run.d.ts +69 -0
- package/dist/run.js +36 -0
- package/dist/sdk-hooks.d.ts +285 -0
- package/dist/sdk-hooks.js +31 -0
- package/dist/stores.d.ts +17 -0
- package/dist/stores.js +76 -0
- package/dist/tool-call-feed-Bs3MyQMT.d.ts +68 -0
- package/dist/tool-display-z4JcDmMQ.d.ts +32 -0
- package/dist/tool-previews.d.ts +48 -0
- package/dist/tool-previews.js +21 -0
- package/dist/types.d.ts +19 -0
- package/dist/types.js +1 -0
- package/dist/utils.d.ts +45 -0
- package/dist/utils.js +32 -0
- package/package.json +193 -0
- package/src/auth/auth.tsx +228 -0
- package/src/auth/index.ts +13 -0
- package/src/auth/login-layout.tsx +46 -0
- package/src/chat/agent-timeline.stories.tsx +429 -0
- package/src/chat/agent-timeline.tsx +360 -0
- package/src/chat/chat-container.tsx +486 -0
- package/src/chat/chat-input.stories.tsx +142 -0
- package/src/chat/chat-input.tsx +389 -0
- package/src/chat/chat-message.stories.tsx +237 -0
- package/src/chat/chat-message.tsx +129 -0
- package/src/chat/index.ts +18 -0
- package/src/chat/message-list.stories.tsx +336 -0
- package/src/chat/message-list.tsx +79 -0
- package/src/chat/thinking-indicator.stories.tsx +56 -0
- package/src/chat/thinking-indicator.tsx +30 -0
- package/src/chat/user-message.stories.tsx +92 -0
- package/src/chat/user-message.tsx +43 -0
- package/src/editor/document-editor-pane.tsx +351 -0
- package/src/editor/editor-provider.tsx +428 -0
- package/src/editor/editor-toolbar.tsx +130 -0
- package/src/editor/index.ts +31 -0
- package/src/editor/markdown-conversion.ts +21 -0
- package/src/editor/markdown-document-editor.tsx +137 -0
- package/src/editor/tiptap-editor.tsx +331 -0
- package/src/editor/use-editor.ts +221 -0
- package/src/files/file-artifact-pane.tsx +183 -0
- package/src/files/file-preview.tsx +342 -0
- package/src/files/file-tabs.tsx +71 -0
- package/src/files/file-tree.tsx +258 -0
- package/src/files/index.ts +17 -0
- package/src/files/rich-file-tree.stories.tsx +104 -0
- package/src/files/rich-file-tree.test.tsx +42 -0
- package/src/files/rich-file-tree.tsx +232 -0
- package/src/hooks/index.ts +10 -0
- package/src/hooks/use-auth.ts +153 -0
- package/src/hooks/use-auto-scroll.ts +59 -0
- package/src/hooks/use-dropdown-menu.ts +40 -0
- package/src/hooks/use-live-time.test.tsx +40 -0
- package/src/hooks/use-live-time.ts +27 -0
- package/src/hooks/use-realtime-session.ts +319 -0
- package/src/hooks/use-run-collapse-state.ts +25 -0
- package/src/hooks/use-run-groups.ts +111 -0
- package/src/hooks/use-sdk-session.ts +575 -0
- package/src/hooks/use-sse-stream.ts +475 -0
- package/src/hooks/use-tool-call-stream.ts +96 -0
- package/src/index.ts +14 -0
- package/src/lib/utils.ts +6 -0
- package/src/markdown/code-block.tsx +198 -0
- package/src/markdown/index.ts +2 -0
- package/src/markdown/markdown.stories.tsx +190 -0
- package/src/markdown/markdown.tsx +62 -0
- package/src/openui/index.ts +20 -0
- package/src/openui/openui-artifact-renderer.tsx +542 -0
- package/src/primitives/artifact-pane.tsx +91 -0
- package/src/primitives/avatar.stories.tsx +95 -0
- package/src/primitives/avatar.tsx +47 -0
- package/src/primitives/badge.stories.tsx +57 -0
- package/src/primitives/badge.tsx +97 -0
- package/src/primitives/button.stories.tsx +48 -0
- package/src/primitives/button.tsx +115 -0
- package/src/primitives/card.stories.tsx +53 -0
- package/src/primitives/card.tsx +98 -0
- package/src/primitives/code-block.stories.tsx +115 -0
- package/src/primitives/code-block.tsx +22 -0
- package/src/primitives/design-tokens.stories.tsx +162 -0
- package/src/primitives/dialog.stories.tsx +176 -0
- package/src/primitives/dialog.tsx +137 -0
- package/src/primitives/drop-zone.stories.tsx +123 -0
- package/src/primitives/drop-zone.tsx +131 -0
- package/src/primitives/dropdown-menu.stories.tsx +122 -0
- package/src/primitives/dropdown-menu.tsx +214 -0
- package/src/primitives/empty-state.stories.tsx +81 -0
- package/src/primitives/empty-state.tsx +40 -0
- package/src/primitives/index.ts +118 -0
- package/src/primitives/input.stories.tsx +113 -0
- package/src/primitives/input.tsx +136 -0
- package/src/primitives/label.stories.tsx +84 -0
- package/src/primitives/label.tsx +24 -0
- package/src/primitives/progress.stories.tsx +93 -0
- package/src/primitives/progress.tsx +50 -0
- package/src/primitives/segmented-control.test.tsx +328 -0
- package/src/primitives/segmented-control.tsx +154 -0
- package/src/primitives/select.stories.tsx +164 -0
- package/src/primitives/select.tsx +158 -0
- package/src/primitives/sidebar-drop-zone.stories.tsx +100 -0
- package/src/primitives/sidebar-drop-zone.tsx +149 -0
- package/src/primitives/skeleton.stories.tsx +79 -0
- package/src/primitives/skeleton.tsx +55 -0
- package/src/primitives/stat-card.stories.tsx +137 -0
- package/src/primitives/stat-card.tsx +97 -0
- package/src/primitives/switch.stories.tsx +85 -0
- package/src/primitives/switch.tsx +28 -0
- package/src/primitives/table.stories.tsx +170 -0
- package/src/primitives/table.tsx +116 -0
- package/src/primitives/tabs.stories.tsx +180 -0
- package/src/primitives/tabs.tsx +71 -0
- package/src/primitives/terminal-display.stories.tsx +191 -0
- package/src/primitives/terminal-display.tsx +189 -0
- package/src/primitives/theme-toggle.stories.tsx +32 -0
- package/src/primitives/theme-toggle.tsx +96 -0
- package/src/primitives/toast.stories.tsx +155 -0
- package/src/primitives/toast.tsx +190 -0
- package/src/primitives/upload-progress.stories.tsx +120 -0
- package/src/primitives/upload-progress.tsx +110 -0
- package/src/run/expanded-tool-detail.stories.tsx +182 -0
- package/src/run/expanded-tool-detail.tsx +186 -0
- package/src/run/index.ts +13 -0
- package/src/run/inline-thinking-item.stories.tsx +136 -0
- package/src/run/inline-thinking-item.tsx +120 -0
- package/src/run/inline-tool-item.stories.tsx +222 -0
- package/src/run/inline-tool-item.tsx +190 -0
- package/src/run/run-group.stories.tsx +322 -0
- package/src/run/run-group.tsx +569 -0
- package/src/run/run-item-primitives.tsx +17 -0
- package/src/run/tool-call-feed.stories.tsx +294 -0
- package/src/run/tool-call-feed.tsx +192 -0
- package/src/run/tool-call-step.stories.tsx +198 -0
- package/src/run/tool-call-step.tsx +240 -0
- package/src/sdk-hooks.ts +38 -0
- package/src/stores/active-sessions-store.ts +455 -0
- package/src/stores/chat-store.ts +43 -0
- package/src/stores/index.ts +2 -0
- package/src/tool-previews/command-preview.tsx +116 -0
- package/src/tool-previews/diff-preview.tsx +85 -0
- package/src/tool-previews/glob-results-preview.tsx +98 -0
- package/src/tool-previews/grep-results-preview.tsx +157 -0
- package/src/tool-previews/index.ts +22 -0
- package/src/tool-previews/preview-primitives.tsx +84 -0
- package/src/tool-previews/question-preview.tsx +101 -0
- package/src/tool-previews/web-search-preview.tsx +117 -0
- package/src/tool-previews/write-file-preview.tsx +80 -0
- package/src/types/branding.ts +11 -0
- package/src/types/index.ts +5 -0
- package/src/types/message.ts +13 -0
- package/src/types/parts.ts +51 -0
- package/src/types/run.ts +56 -0
- package/src/types/tool-display.ts +41 -0
- package/src/utils/copy-text.ts +30 -0
- package/src/utils/format.test.ts +43 -0
- package/src/utils/format.ts +56 -0
- package/src/utils/index.ts +10 -0
- package/src/utils/time-ago.ts +9 -0
- package/src/utils/tool-display.ts +238 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
interface CodeBlockProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
code: string;
|
|
7
|
+
language?: string;
|
|
8
|
+
showLineNumbers?: boolean;
|
|
9
|
+
/** Force light theme; defaults to dark */
|
|
10
|
+
light?: boolean;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const CodeBlock: React.MemoExoticComponent<({ code, language, showLineNumbers, light: lightProp, className, children, ...props }: CodeBlockProps) => react_jsx_runtime.JSX.Element>;
|
|
14
|
+
/** Copy-to-clipboard button for use inside CodeBlock. */
|
|
15
|
+
declare const CopyButton: React.MemoExoticComponent<({ text }: {
|
|
16
|
+
text: string;
|
|
17
|
+
}) => react_jsx_runtime.JSX.Element>;
|
|
18
|
+
|
|
19
|
+
export { CodeBlock as C, type CodeBlockProps as a, CopyButton as b };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
DocumentEditorPane
|
|
4
|
+
} from "./chunk-EEE55AVS.js";
|
|
5
|
+
import "./chunk-Q56BYXQF.js";
|
|
6
|
+
import "./chunk-CSAIKY36.js";
|
|
7
|
+
import "./chunk-CD53GZOM.js";
|
|
8
|
+
import "./chunk-66BNMOVT.js";
|
|
9
|
+
import "./chunk-RQHJBTEU.js";
|
|
10
|
+
export {
|
|
11
|
+
DocumentEditorPane
|
|
12
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { a as ArtifactPaneProps } from './artifact-pane-DvJyPWV4.js';
|
|
4
|
+
import { HocuspocusProvider } from '@hocuspocus/provider';
|
|
5
|
+
import * as Y from 'yjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Connection state for the Hocuspocus provider.
|
|
9
|
+
*/
|
|
10
|
+
type ConnectionState = "disconnected" | "connecting" | "connected" | "synced";
|
|
11
|
+
/**
|
|
12
|
+
* Collaborator information from awareness.
|
|
13
|
+
*/
|
|
14
|
+
interface Collaborator {
|
|
15
|
+
clientId: number;
|
|
16
|
+
user: {
|
|
17
|
+
name: string;
|
|
18
|
+
color: string;
|
|
19
|
+
userId?: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Editor context value exposed to children.
|
|
24
|
+
*/
|
|
25
|
+
interface EditorContextValue {
|
|
26
|
+
/** The Y.Doc instance for collaboration */
|
|
27
|
+
doc: Y.Doc;
|
|
28
|
+
/** The Hocuspocus provider instance */
|
|
29
|
+
provider: HocuspocusProvider | null;
|
|
30
|
+
/** Current connection state */
|
|
31
|
+
connectionState: ConnectionState;
|
|
32
|
+
/** List of active collaborators */
|
|
33
|
+
collaborators: Collaborator[];
|
|
34
|
+
/** Whether the document is synced with the server */
|
|
35
|
+
isSynced: boolean;
|
|
36
|
+
/** Connect to the collaboration server */
|
|
37
|
+
connect: () => void;
|
|
38
|
+
/** Disconnect from the collaboration server */
|
|
39
|
+
disconnect: () => void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* User information for presence/awareness.
|
|
43
|
+
*/
|
|
44
|
+
interface EditorUser {
|
|
45
|
+
name: string;
|
|
46
|
+
color?: string;
|
|
47
|
+
userId?: string;
|
|
48
|
+
}
|
|
49
|
+
interface EditorTokenRefreshResult {
|
|
50
|
+
token: string;
|
|
51
|
+
expiresAt?: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Props for EditorProvider.
|
|
55
|
+
*/
|
|
56
|
+
interface EditorProviderProps {
|
|
57
|
+
/** WebSocket URL for the Hocuspocus server */
|
|
58
|
+
websocketUrl: string;
|
|
59
|
+
/** Document name (e.g., "doc:my-document") */
|
|
60
|
+
documentName: string;
|
|
61
|
+
/** JWT token for authentication */
|
|
62
|
+
token: string;
|
|
63
|
+
/** Unix timestamp (seconds) when the current token expires */
|
|
64
|
+
tokenExpiresAt?: number;
|
|
65
|
+
/** Current user information for awareness */
|
|
66
|
+
user: EditorUser;
|
|
67
|
+
/** Auto-connect on mount (default: true) */
|
|
68
|
+
autoConnect?: boolean;
|
|
69
|
+
/** Reconnect on disconnect (default: true) */
|
|
70
|
+
autoReconnect?: boolean;
|
|
71
|
+
/** Max reconnect attempts (default: 5) */
|
|
72
|
+
maxReconnectAttempts?: number;
|
|
73
|
+
/** Callback when connection state changes */
|
|
74
|
+
onConnectionChange?: (state: ConnectionState) => void;
|
|
75
|
+
/** Callback when sync completes */
|
|
76
|
+
onSync?: () => void;
|
|
77
|
+
/** Callback on authentication error */
|
|
78
|
+
onAuthError?: (error: Error) => void;
|
|
79
|
+
/** Optional token refresh callback used before reconnect/auth retry */
|
|
80
|
+
onRefreshToken?: () => Promise<EditorTokenRefreshResult | string>;
|
|
81
|
+
/** Children components */
|
|
82
|
+
children: ReactNode;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* EditorProvider wraps children with Hocuspocus collaboration context.
|
|
86
|
+
* Manages WebSocket connection, Y.Doc, and awareness state.
|
|
87
|
+
*/
|
|
88
|
+
declare function EditorProvider({ websocketUrl, documentName, token, tokenExpiresAt, user, autoConnect, autoReconnect, maxReconnectAttempts, onConnectionChange, onSync, onAuthError, onRefreshToken, children, }: EditorProviderProps): react_jsx_runtime.JSX.Element;
|
|
89
|
+
/**
|
|
90
|
+
* Hook to access the editor context.
|
|
91
|
+
* Must be used within an EditorProvider.
|
|
92
|
+
*/
|
|
93
|
+
declare function useEditorContext(): EditorContextValue;
|
|
94
|
+
|
|
95
|
+
type DocumentEditorMode = "preview" | "edit";
|
|
96
|
+
type DocumentEditorBackend = "local" | "collaborative";
|
|
97
|
+
interface DocumentEditorPaneCollaborationConfig extends Omit<EditorProviderProps, "children"> {
|
|
98
|
+
}
|
|
99
|
+
interface DocumentEditorPaneProps extends Omit<ArtifactPaneProps, "children" | "tabs" | "toolbar" | "emptyState"> {
|
|
100
|
+
tabs?: ArtifactPaneProps["tabs"];
|
|
101
|
+
toolbar?: ReactNode;
|
|
102
|
+
markdown?: string;
|
|
103
|
+
mode?: DocumentEditorMode;
|
|
104
|
+
defaultMode?: DocumentEditorMode;
|
|
105
|
+
onModeChange?: (mode: DocumentEditorMode) => void;
|
|
106
|
+
backend?: DocumentEditorBackend;
|
|
107
|
+
placeholder?: string;
|
|
108
|
+
autoFocus?: boolean;
|
|
109
|
+
readOnly?: boolean;
|
|
110
|
+
onChange?: (markdown: string) => void;
|
|
111
|
+
onSave?: (markdown: string) => Promise<void> | void;
|
|
112
|
+
saving?: boolean;
|
|
113
|
+
saveLabel?: string;
|
|
114
|
+
previewClassName?: string;
|
|
115
|
+
editorClassName?: string;
|
|
116
|
+
collaboration?: DocumentEditorPaneCollaborationConfig;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* DocumentEditorPane — reusable markdown document surface with preview/edit
|
|
120
|
+
* modes and optional collaborative editing backed by Yjs/Hocuspocus.
|
|
121
|
+
*/
|
|
122
|
+
declare function DocumentEditorPane({ eyebrow, title, subtitle, meta, headerActions, footer, className, contentClassName, tabs, toolbar, markdown, mode, defaultMode, onModeChange, backend, placeholder, autoFocus, readOnly, onChange, onSave, saving, saveLabel, previewClassName, editorClassName, collaboration, }: DocumentEditorPaneProps): react_jsx_runtime.JSX.Element;
|
|
123
|
+
|
|
124
|
+
export { type Collaborator as C, type DocumentEditorBackend as D, type EditorContextValue as E, type ConnectionState as a, type DocumentEditorMode as b, DocumentEditorPane as c, type DocumentEditorPaneCollaborationConfig as d, type DocumentEditorPaneProps as e, EditorProvider as f, type EditorProviderProps as g, type EditorTokenRefreshResult as h, type EditorUser as i, useEditorContext as u };
|
package/dist/editor.d.ts
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { C as Collaborator, a as ConnectionState } from './document-editor-pane-DyDEX_Zm.js';
|
|
2
|
+
export { D as DocumentEditorBackend, b as DocumentEditorMode, c as DocumentEditorPane, d as DocumentEditorPaneCollaborationConfig, e as DocumentEditorPaneProps, E as EditorContextValue, f as EditorProvider, g as EditorProviderProps, h as EditorTokenRefreshResult, i as EditorUser, u as useEditorContext } from './document-editor-pane-DyDEX_Zm.js';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import { Editor } from '@tiptap/react';
|
|
5
|
+
import { HocuspocusProvider } from '@hocuspocus/provider';
|
|
6
|
+
import 'react';
|
|
7
|
+
import './artifact-pane-DvJyPWV4.js';
|
|
8
|
+
import 'yjs';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Editor toolbar component.
|
|
12
|
+
* Provides basic formatting controls.
|
|
13
|
+
*/
|
|
14
|
+
declare function EditorToolbar({ editor, className, }: {
|
|
15
|
+
editor: Editor | null;
|
|
16
|
+
className?: string;
|
|
17
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Props for TiptapEditor component.
|
|
21
|
+
*/
|
|
22
|
+
interface TiptapEditorProps {
|
|
23
|
+
/** Initial content for new documents (markdown string) */
|
|
24
|
+
initialContent?: string;
|
|
25
|
+
/** Placeholder text when editor is empty */
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
/** Whether the editor is read-only */
|
|
28
|
+
readOnly?: boolean;
|
|
29
|
+
/** Whether to auto-focus on mount */
|
|
30
|
+
autoFocus?: boolean;
|
|
31
|
+
/** Custom className for the editor wrapper */
|
|
32
|
+
className?: string;
|
|
33
|
+
/** Custom className for the editor content area */
|
|
34
|
+
contentClassName?: string;
|
|
35
|
+
/** Callback when content changes */
|
|
36
|
+
onUpdate?: (editor: Editor) => void;
|
|
37
|
+
/** Callback when selection changes */
|
|
38
|
+
onSelectionUpdate?: (editor: Editor) => void;
|
|
39
|
+
/** Callback when editor is ready */
|
|
40
|
+
onReady?: (editor: Editor) => void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* TiptapEditor - Collaborative markdown editor with Y.js sync.
|
|
44
|
+
* Must be used within an EditorProvider.
|
|
45
|
+
*/
|
|
46
|
+
declare function TiptapEditor({ initialContent, placeholder, readOnly, autoFocus, className, contentClassName, onUpdate, onSelectionUpdate, onReady, }: TiptapEditorProps): react_jsx_runtime.JSX.Element;
|
|
47
|
+
/**
|
|
48
|
+
* Collaborators list component.
|
|
49
|
+
* Shows active users in the document.
|
|
50
|
+
*/
|
|
51
|
+
declare function CollaboratorsList({ collaborators, className, }: {
|
|
52
|
+
collaborators: Collaborator[];
|
|
53
|
+
className?: string;
|
|
54
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Hook to get the current connection state and helpers.
|
|
58
|
+
*/
|
|
59
|
+
declare function useEditorConnection(): {
|
|
60
|
+
/** Current connection state string */
|
|
61
|
+
state: ConnectionState;
|
|
62
|
+
/** Whether connected to the server (connected or synced) */
|
|
63
|
+
isConnected: boolean;
|
|
64
|
+
/** Whether currently attempting to connect */
|
|
65
|
+
isConnecting: boolean;
|
|
66
|
+
/** Whether disconnected from the server */
|
|
67
|
+
isDisconnected: boolean;
|
|
68
|
+
/** Whether the document is synced with the server */
|
|
69
|
+
isSynced: boolean;
|
|
70
|
+
/** Connect to the collaboration server */
|
|
71
|
+
connect: () => void;
|
|
72
|
+
/** Disconnect from the collaboration server */
|
|
73
|
+
disconnect: () => void;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Hook to get the list of active collaborators.
|
|
77
|
+
*/
|
|
78
|
+
declare function useCollaborators(): {
|
|
79
|
+
/** List of active collaborators (excluding self) */
|
|
80
|
+
collaborators: Collaborator[];
|
|
81
|
+
/** Number of other collaborators */
|
|
82
|
+
count: number;
|
|
83
|
+
/** Whether there are other collaborators present */
|
|
84
|
+
hasOthers: boolean;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Hook to track a specific collaborator's presence.
|
|
88
|
+
*/
|
|
89
|
+
declare function useCollaboratorPresence(userId: string): Collaborator | null;
|
|
90
|
+
/**
|
|
91
|
+
* Hook to sync local state with the Y.Doc.
|
|
92
|
+
* Useful for persisting editor metadata.
|
|
93
|
+
*/
|
|
94
|
+
declare function useYjsState<T>(key: string, initialValue: T): [T, (value: T) => void];
|
|
95
|
+
/**
|
|
96
|
+
* Hook to track document changes.
|
|
97
|
+
* Returns true if there are unsaved changes since the last save.
|
|
98
|
+
*/
|
|
99
|
+
declare function useDocumentChanges(onSave?: () => Promise<void>): {
|
|
100
|
+
/** Whether there are unsaved changes */
|
|
101
|
+
isDirty: boolean;
|
|
102
|
+
/** Whether save is in progress */
|
|
103
|
+
isSaving: boolean;
|
|
104
|
+
/** When the document was last saved */
|
|
105
|
+
lastSaved: Date | null;
|
|
106
|
+
/** Save the document */
|
|
107
|
+
save: () => Promise<void>;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Hook to get awareness state for presence features.
|
|
111
|
+
* Provides lower-level access to the Hocuspocus awareness.
|
|
112
|
+
*/
|
|
113
|
+
declare function useAwareness(): {
|
|
114
|
+
localState: Record<string, unknown>;
|
|
115
|
+
setLocalState: (state: Record<string, unknown>) => void;
|
|
116
|
+
setLocalStateField: (field: string, value: unknown) => void;
|
|
117
|
+
awareness: HocuspocusProvider["awareness"] | undefined;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export { Collaborator, CollaboratorsList, ConnectionState, EditorToolbar, TiptapEditor, type TiptapEditorProps, useAwareness, useCollaboratorPresence, useCollaborators, useDocumentChanges, useEditorConnection, useYjsState };
|
package/dist/editor.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import "./chunk-Q7EIIWTC.js";
|
|
2
|
+
import {
|
|
3
|
+
CollaboratorsList,
|
|
4
|
+
DocumentEditorPane,
|
|
5
|
+
EditorProvider,
|
|
6
|
+
EditorToolbar,
|
|
7
|
+
TiptapEditor,
|
|
8
|
+
useAwareness,
|
|
9
|
+
useCollaboratorPresence,
|
|
10
|
+
useCollaborators,
|
|
11
|
+
useDocumentChanges,
|
|
12
|
+
useEditorConnection,
|
|
13
|
+
useEditorContext,
|
|
14
|
+
useYjsState
|
|
15
|
+
} from "./chunk-EEE55AVS.js";
|
|
16
|
+
import "./chunk-Q56BYXQF.js";
|
|
17
|
+
import "./chunk-CSAIKY36.js";
|
|
18
|
+
import "./chunk-CD53GZOM.js";
|
|
19
|
+
import "./chunk-66BNMOVT.js";
|
|
20
|
+
import "./chunk-RQHJBTEU.js";
|
|
21
|
+
export {
|
|
22
|
+
CollaboratorsList,
|
|
23
|
+
DocumentEditorPane,
|
|
24
|
+
EditorProvider,
|
|
25
|
+
EditorToolbar,
|
|
26
|
+
TiptapEditor,
|
|
27
|
+
useAwareness,
|
|
28
|
+
useCollaboratorPresence,
|
|
29
|
+
useCollaborators,
|
|
30
|
+
useDocumentChanges,
|
|
31
|
+
useEditorConnection,
|
|
32
|
+
useEditorContext,
|
|
33
|
+
useYjsState
|
|
34
|
+
};
|
package/dist/files.d.ts
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { GitStatusEntry, ContextMenuItem, ContextMenuOpenContext, GitStatus } from '@pierre/trees';
|
|
3
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
4
|
+
import { b as DocumentEditorMode, D as DocumentEditorBackend, d as DocumentEditorPaneCollaborationConfig } from './document-editor-pane-DyDEX_Zm.js';
|
|
5
|
+
import { a as ArtifactPaneProps } from './artifact-pane-DvJyPWV4.js';
|
|
6
|
+
import '@hocuspocus/provider';
|
|
7
|
+
import 'yjs';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* FileTree — directory browser with file type icons.
|
|
11
|
+
*
|
|
12
|
+
* Renders a hierarchical file system view. Clicking a file
|
|
13
|
+
* triggers onSelect with the full path.
|
|
14
|
+
*/
|
|
15
|
+
interface FileNode {
|
|
16
|
+
name: string;
|
|
17
|
+
path: string;
|
|
18
|
+
type: "file" | "directory";
|
|
19
|
+
children?: FileNode[];
|
|
20
|
+
size?: number;
|
|
21
|
+
mimeType?: string;
|
|
22
|
+
}
|
|
23
|
+
interface FileTreeProps {
|
|
24
|
+
root: FileNode;
|
|
25
|
+
selectedPath?: string;
|
|
26
|
+
onSelect?: (path: string, node: FileNode) => void;
|
|
27
|
+
className?: string;
|
|
28
|
+
defaultExpanded?: boolean;
|
|
29
|
+
visibility?: FileTreeVisibilityOptions;
|
|
30
|
+
}
|
|
31
|
+
interface FileTreeVisibilityOptions {
|
|
32
|
+
hiddenPaths?: string[];
|
|
33
|
+
hiddenPathPrefixes?: string[];
|
|
34
|
+
isVisible?: (node: FileNode) => boolean;
|
|
35
|
+
}
|
|
36
|
+
declare function filterFileTree(root: FileNode, visibility?: FileTreeVisibilityOptions): FileNode | null;
|
|
37
|
+
declare function FileTree({ root, selectedPath, onSelect, className, defaultExpanded, visibility, }: FileTreeProps): react_jsx_runtime.JSX.Element | null;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Re-export Pierre's git-status union under a stable name so consumers
|
|
41
|
+
* don't import directly from the dep. If we ever swap the underlying
|
|
42
|
+
* implementation, only this file changes.
|
|
43
|
+
*/
|
|
44
|
+
type RichFileTreeGitStatus = GitStatus;
|
|
45
|
+
type RichFileTreeGitEntry = GitStatusEntry;
|
|
46
|
+
interface RichFileTreeProps {
|
|
47
|
+
/**
|
|
48
|
+
* Either a recursive `FileNode` tree (matches the existing FileTree
|
|
49
|
+
* input) or a flat list of canonical paths. Pass exactly one.
|
|
50
|
+
*/
|
|
51
|
+
root?: FileNode;
|
|
52
|
+
paths?: ReadonlyArray<string>;
|
|
53
|
+
/** Currently-selected path. Pierre supports multi-select internally; the
|
|
54
|
+
* wrapper exposes a single string for parity with FileTree. */
|
|
55
|
+
selectedPath?: string;
|
|
56
|
+
/** Called whenever the selection changes (single-select fan-out). */
|
|
57
|
+
onSelect?: (path: string) => void;
|
|
58
|
+
/** Show the inline search input. Defaults to true. */
|
|
59
|
+
search?: boolean;
|
|
60
|
+
/** Open / closed initial expansion. Defaults to "open" — match FileTree. */
|
|
61
|
+
initialExpansion?: "open" | "closed";
|
|
62
|
+
/** Optional git-status decorations per path. */
|
|
63
|
+
gitStatus?: ReadonlyArray<RichFileTreeGitEntry>;
|
|
64
|
+
/**
|
|
65
|
+
* Right-click / button-lane menu content. Receives the row and the
|
|
66
|
+
* trigger context (which interaction opened the menu).
|
|
67
|
+
*/
|
|
68
|
+
renderContextMenu?: (item: ContextMenuItem, context: ContextMenuOpenContext) => ReactNode;
|
|
69
|
+
/** Optional header rendered above the tree rows. */
|
|
70
|
+
header?: ReactNode;
|
|
71
|
+
/**
|
|
72
|
+
* Theme override map for shadow-DOM CSS variables. Most consumers can
|
|
73
|
+
* leave this — defaults derive from the host element's computed
|
|
74
|
+
* tokens via `cssVarFromToken()`.
|
|
75
|
+
*/
|
|
76
|
+
themeOverrides?: Partial<RichFileTreeThemeVars>;
|
|
77
|
+
className?: string;
|
|
78
|
+
style?: CSSProperties;
|
|
79
|
+
/** Inline height (or set via `style.height`). Defaults to 100% of parent. */
|
|
80
|
+
height?: number | string;
|
|
81
|
+
}
|
|
82
|
+
interface RichFileTreeThemeVars {
|
|
83
|
+
/** Selected-row background. */
|
|
84
|
+
selectedBg: string;
|
|
85
|
+
/** Selected-row foreground. */
|
|
86
|
+
selectedFg: string;
|
|
87
|
+
/** Default row foreground. */
|
|
88
|
+
fg: string;
|
|
89
|
+
/** Hover background. */
|
|
90
|
+
hoverBg: string;
|
|
91
|
+
/** Border / divider color. */
|
|
92
|
+
border: string;
|
|
93
|
+
/** Muted (parent path, breadcrumb) foreground. */
|
|
94
|
+
mutedFg: string;
|
|
95
|
+
}
|
|
96
|
+
declare function RichFileTree({ root, paths, selectedPath, onSelect, search, initialExpansion, gitStatus, renderContextMenu, header, themeOverrides, className, style, height, }: RichFileTreeProps): react_jsx_runtime.JSX.Element;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* FilePreview — universal file renderer.
|
|
100
|
+
*
|
|
101
|
+
* Renders any file type beautifully:
|
|
102
|
+
* - PDF: embedded viewer
|
|
103
|
+
* - CSV/XLSX: tabular preview
|
|
104
|
+
* - Code (py/json/yaml/ts/js): line-numbered viewer
|
|
105
|
+
* - Markdown: rendered prose
|
|
106
|
+
* - Images: inline display
|
|
107
|
+
* - Text: monospace preview
|
|
108
|
+
*/
|
|
109
|
+
interface FilePreviewProps {
|
|
110
|
+
filename: string;
|
|
111
|
+
content?: string;
|
|
112
|
+
blobUrl?: string;
|
|
113
|
+
mimeType?: string;
|
|
114
|
+
onClose?: () => void;
|
|
115
|
+
onDownload?: () => void;
|
|
116
|
+
hideHeader?: boolean;
|
|
117
|
+
className?: string;
|
|
118
|
+
}
|
|
119
|
+
declare function FilePreview({ filename, content, blobUrl, mimeType, onClose, onDownload, hideHeader, className, }: FilePreviewProps): react_jsx_runtime.JSX.Element;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* FileTabs — tab bar for open files in the preview panel.
|
|
123
|
+
*/
|
|
124
|
+
interface FileTabData {
|
|
125
|
+
id: string;
|
|
126
|
+
name: string;
|
|
127
|
+
path: string;
|
|
128
|
+
dirty?: boolean;
|
|
129
|
+
}
|
|
130
|
+
interface FileTabsProps {
|
|
131
|
+
tabs: FileTabData[];
|
|
132
|
+
activeId?: string;
|
|
133
|
+
onSelect: (id: string) => void;
|
|
134
|
+
onClose: (id: string) => void;
|
|
135
|
+
className?: string;
|
|
136
|
+
}
|
|
137
|
+
declare function FileTabs({ tabs, activeId, onSelect, onClose, className }: FileTabsProps): react_jsx_runtime.JSX.Element | null;
|
|
138
|
+
|
|
139
|
+
interface FileArtifactPaneEditorOptions {
|
|
140
|
+
enabled?: boolean;
|
|
141
|
+
mode?: DocumentEditorMode;
|
|
142
|
+
defaultMode?: DocumentEditorMode;
|
|
143
|
+
onModeChange?: (mode: DocumentEditorMode) => void;
|
|
144
|
+
backend?: DocumentEditorBackend;
|
|
145
|
+
collaboration?: DocumentEditorPaneCollaborationConfig;
|
|
146
|
+
placeholder?: string;
|
|
147
|
+
autoFocus?: boolean;
|
|
148
|
+
readOnly?: boolean;
|
|
149
|
+
saving?: boolean;
|
|
150
|
+
saveLabel?: string;
|
|
151
|
+
onChange?: (markdown: string) => void;
|
|
152
|
+
onSave?: (markdown: string) => Promise<void> | void;
|
|
153
|
+
previewClassName?: string;
|
|
154
|
+
editorClassName?: string;
|
|
155
|
+
}
|
|
156
|
+
interface FileArtifactPaneProps extends Omit<FilePreviewProps, "className"> {
|
|
157
|
+
path?: string;
|
|
158
|
+
tabs?: FileTabData[];
|
|
159
|
+
activeTabId?: string;
|
|
160
|
+
onTabSelect?: (id: string) => void;
|
|
161
|
+
onTabClose?: (id: string) => void;
|
|
162
|
+
eyebrow?: ArtifactPaneProps["eyebrow"];
|
|
163
|
+
meta?: ArtifactPaneProps["meta"];
|
|
164
|
+
toolbar?: ArtifactPaneProps["toolbar"];
|
|
165
|
+
footer?: ArtifactPaneProps["footer"];
|
|
166
|
+
className?: string;
|
|
167
|
+
editor?: FileArtifactPaneEditorOptions;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* FileArtifactPane — opinionated artifact frame for file previews with tabs and
|
|
171
|
+
* header actions.
|
|
172
|
+
*/
|
|
173
|
+
declare function FileArtifactPane({ filename, content, blobUrl, mimeType, onClose, onDownload, path, tabs, activeTabId, onTabSelect, onTabClose, eyebrow, meta, toolbar, footer, className, editor, }: FileArtifactPaneProps): react_jsx_runtime.JSX.Element;
|
|
174
|
+
|
|
175
|
+
export { FileArtifactPane, type FileArtifactPaneProps, type FileNode, FilePreview, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps, type FileTreeVisibilityOptions, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars, filterFileTree };
|
package/dist/files.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FileArtifactPane,
|
|
3
|
+
FilePreview,
|
|
4
|
+
FileTabs,
|
|
5
|
+
FileTree,
|
|
6
|
+
RichFileTree,
|
|
7
|
+
filterFileTree
|
|
8
|
+
} from "./chunk-HJKCSXCH.js";
|
|
9
|
+
import "./chunk-CSAIKY36.js";
|
|
10
|
+
import "./chunk-CD53GZOM.js";
|
|
11
|
+
import "./chunk-66BNMOVT.js";
|
|
12
|
+
import "./chunk-RQHJBTEU.js";
|
|
13
|
+
export {
|
|
14
|
+
FileArtifactPane,
|
|
15
|
+
FilePreview,
|
|
16
|
+
FileTabs,
|
|
17
|
+
FileTree,
|
|
18
|
+
RichFileTree,
|
|
19
|
+
filterFileTree
|
|
20
|
+
};
|
package/dist/hooks.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export { AgentStreamEvent, AppendUserMessageOptions, ApplySdkEventOptions, AutomationStreamEvent, BeginAssistantMessageOptions, BotStreamEvent, CompleteAssistantMessageOptions, ConnectionState, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, TaskStreamEvent, TerminalStreamEvent, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useToolCallStream } from './sdk-hooks.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import './run-PfLmDAox.js';
|
|
4
|
+
import './message-BHWbxBtT.js';
|
|
5
|
+
import './parts-dj7AcUg0.js';
|
|
6
|
+
import './active-sessions-store-CeOmXgv5.js';
|
|
7
|
+
import 'nanostores';
|
|
8
|
+
import './tool-call-feed-Bs3MyQMT.js';
|
|
9
|
+
import 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Returns `Date.now()` and re-renders every `intervalMs` so derived
|
|
13
|
+
* values like "uptime" tick forward without polling upstream data.
|
|
14
|
+
*/
|
|
15
|
+
declare function useLiveTime(intervalMs?: number): number;
|
|
16
|
+
|
|
17
|
+
interface AuthUser {
|
|
18
|
+
customer_id: string;
|
|
19
|
+
email: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
tier: string;
|
|
22
|
+
github?: {
|
|
23
|
+
login: string;
|
|
24
|
+
connected: boolean;
|
|
25
|
+
} | null;
|
|
26
|
+
session_expires_at?: string;
|
|
27
|
+
}
|
|
28
|
+
interface UseAuthOptions {
|
|
29
|
+
apiBaseUrl: string;
|
|
30
|
+
revalidateOnFocus?: boolean;
|
|
31
|
+
shouldRetryOnError?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface UseAuthResult {
|
|
34
|
+
user: AuthUser | null;
|
|
35
|
+
isLoading: boolean;
|
|
36
|
+
isError: boolean;
|
|
37
|
+
error: Error | null;
|
|
38
|
+
mutate: () => Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Hook for managing authentication state.
|
|
42
|
+
* Fetches user session from the API and provides loading/error states.
|
|
43
|
+
*/
|
|
44
|
+
declare function useAuth({ apiBaseUrl, revalidateOnFocus, shouldRetryOnError, }: UseAuthOptions): UseAuthResult;
|
|
45
|
+
/**
|
|
46
|
+
* Creates a fetcher function that includes auth credentials.
|
|
47
|
+
* Uses both cookie-based session and localStorage API key for backwards compatibility.
|
|
48
|
+
*/
|
|
49
|
+
declare function createAuthFetcher(_apiBaseUrl: string): <T = unknown>(url: string, options?: RequestInit) => Promise<T>;
|
|
50
|
+
/**
|
|
51
|
+
* Hook to get the API key from localStorage.
|
|
52
|
+
* For backwards compatibility with API key-based auth.
|
|
53
|
+
*/
|
|
54
|
+
declare function useApiKey(): string | null;
|
|
55
|
+
|
|
56
|
+
export { type AuthUser, type UseAuthOptions, type UseAuthResult, createAuthFetcher, useApiKey, useAuth, useLiveTime };
|
package/dist/hooks.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAuthFetcher,
|
|
3
|
+
useApiKey,
|
|
4
|
+
useAuth,
|
|
5
|
+
useLiveTime
|
|
6
|
+
} from "./chunk-REJESC5U.js";
|
|
7
|
+
import {
|
|
8
|
+
RealtimeSessionRegistry,
|
|
9
|
+
useDropdownMenu,
|
|
10
|
+
useRealtimeSession,
|
|
11
|
+
useSSEStream,
|
|
12
|
+
useSdkSession,
|
|
13
|
+
useToolCallStream
|
|
14
|
+
} from "./chunk-YJ2G3XO5.js";
|
|
15
|
+
import "./chunk-OEX7NZE3.js";
|
|
16
|
+
import {
|
|
17
|
+
useAutoScroll,
|
|
18
|
+
useRunCollapseState,
|
|
19
|
+
useRunGroups
|
|
20
|
+
} from "./chunk-54SQQMMM.js";
|
|
21
|
+
import "./chunk-7UO2ZMRQ.js";
|
|
22
|
+
import "./chunk-2VH6PUXD.js";
|
|
23
|
+
import "./chunk-BX6AQMUS.js";
|
|
24
|
+
import "./chunk-CD53GZOM.js";
|
|
25
|
+
import "./chunk-66BNMOVT.js";
|
|
26
|
+
import "./chunk-RQHJBTEU.js";
|
|
27
|
+
export {
|
|
28
|
+
RealtimeSessionRegistry,
|
|
29
|
+
createAuthFetcher,
|
|
30
|
+
useApiKey,
|
|
31
|
+
useAuth,
|
|
32
|
+
useAutoScroll,
|
|
33
|
+
useDropdownMenu,
|
|
34
|
+
useLiveTime,
|
|
35
|
+
useRealtimeSession,
|
|
36
|
+
useRunCollapseState,
|
|
37
|
+
useRunGroups,
|
|
38
|
+
useSSEStream,
|
|
39
|
+
useSdkSession,
|
|
40
|
+
useToolCallStream
|
|
41
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export { B as Button, a as ButtonProps, b as buttonVariants } from './button-CMQuQEW_.js';
|
|
2
|
+
export { Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropZone, DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStateProps, InlineCode, InlineCodeProps, Input, InputProps, Label, Progress, SegmentedControl, SegmentedControlOption, SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SidebarDropZone, SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, StatCard, StatCardProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, Textarea, TextareaProps, Toast, ToastContainer, ToastProvider, UploadFile, UploadProgress, UploadProgressProps, badgeVariants, useToast } from './primitives.js';
|
|
3
|
+
export { Logo, LogoProps, TangleKnot } from '@tangle-network/brand';
|
|
4
|
+
export { A as ArtifactPane, a as ArtifactPaneProps } from './artifact-pane-DvJyPWV4.js';
|
|
5
|
+
export { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem, ChatContainer, ChatContainerProps, ChatInput, ChatInputProps, ChatMessage, ChatMessageProps, MessageList, MessageListProps, MessageRole, PendingFile, ThinkingIndicator, ThinkingIndicatorProps, UserMessage, UserMessageProps } from './chat.js';
|
|
6
|
+
export { ExpandedToolDetail, ExpandedToolDetailProps, InlineThinkingItem, InlineThinkingItemProps, InlineToolItem, InlineToolItemProps, LiveDuration, RunGroup, RunGroupProps } from './run.js';
|
|
7
|
+
export { F as FeedSegment, T as ToolCallData, a as ToolCallFeed, b as ToolCallFeedProps, c as ToolCallGroup, d as ToolCallGroupProps, e as ToolCallStatus, f as ToolCallStep, g as ToolCallStepProps, h as ToolCallType, p as parseToolEvent } from './tool-call-feed-Bs3MyQMT.js';
|
|
8
|
+
export { OpenUIAction, OpenUIActionsNode, OpenUIArtifactRenderer, OpenUIArtifactRendererProps, OpenUIBadgeNode, OpenUICardNode, OpenUICodeNode, OpenUIComponentNode, OpenUIGridNode, OpenUIHeadingNode, OpenUIKeyValueNode, OpenUIMarkdownNode, OpenUIPrimitive, OpenUISeparatorNode, OpenUIStackNode, OpenUIStatNode, OpenUITableNode, OpenUITextNode } from './openui.js';
|
|
9
|
+
export { FileArtifactPane, FileArtifactPaneProps, FileNode, FilePreview, FilePreviewProps, FileTabData, FileTabs, FileTabsProps, FileTree, FileTreeProps, FileTreeVisibilityOptions, RichFileTree, RichFileTreeGitEntry, RichFileTreeGitStatus, RichFileTreeProps, RichFileTreeThemeVars, filterFileTree } from './files.js';
|
|
10
|
+
export { C as Collaborator, a as ConnectionState, D as DocumentEditorBackend, b as DocumentEditorMode, c as DocumentEditorPane, d as DocumentEditorPaneCollaborationConfig, e as DocumentEditorPaneProps, E as EditorContextValue, f as EditorProvider, g as EditorProviderProps, h as EditorTokenRefreshResult, i as EditorUser, u as useEditorContext } from './document-editor-pane-DyDEX_Zm.js';
|
|
11
|
+
export { CollaboratorsList, EditorToolbar, TiptapEditor, TiptapEditorProps, useAwareness, useCollaboratorPresence, useCollaborators, useDocumentChanges, useEditorConnection, useYjsState } from './editor.js';
|
|
12
|
+
export { Markdown, MarkdownProps } from './markdown.js';
|
|
13
|
+
export { C as CodeBlock, a as CodeBlockProps, b as CopyButton } from './code-block-DjXf8eOG.js';
|
|
14
|
+
export { AuthHeader, AuthHeaderProps, GitHubLoginButton, GitHubLoginButtonProps, LoginLayout, LoginLayoutProps, SessionUser, UserMenu, UserMenuProps } from './auth.js';
|
|
15
|
+
export { AgentStreamEvent, AppendUserMessageOptions, ApplySdkEventOptions, AutomationStreamEvent, BeginAssistantMessageOptions, BotStreamEvent, CompleteAssistantMessageOptions, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, TaskStreamEvent, TerminalStreamEvent, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useToolCallStream } from './sdk-hooks.js';
|
|
16
|
+
export { AuthUser, UseAuthOptions, UseAuthResult, createAuthFetcher, useApiKey, useAuth, useLiveTime } from './hooks.js';
|
|
17
|
+
export { A as ActiveProjectActivity, a as ActiveSessionActivityOptions, b as ActiveSessionConnectionOptions, c as ActiveSessionConnectionState, d as ActiveSessionReconnectState, e as ActiveSessionRecord, f as ActiveSessionStatus, g as ActiveSessionTransportMode, h as ActiveSessionsState, R as RegisterActiveSessionOptions, S as SessionProjectKey, i as activeSessionsAtom, j as bumpActiveSessionActivity, k as getActiveSession, l as getAllActiveSessions, m as getAllProjectActivity, n as getSessionsByActivity, o as getSessionsForNavbar, p as getSessionsForProject, q as getTotalRunningSessionCount, r as hasBackgroundRunningSessions, s as registerActiveSession, t as resetActiveSessions, u as setActiveSessionAttention, v as setActiveSessionConnection, w as setActiveSessionError, x as setActiveSessionRunning, y as setForegroundActiveSession, z as unregisterActiveSession, B as updateActiveSessionMeta, C as useActiveSession, D as useActiveSessions, E as useActiveSessionsState, F as useHasBackgroundRunningSessions, G as useNavbarSessions, H as useProjectActivity, I as useProjectSessions, J as useSessionsByActivity, K as useTotalRunningSessions } from './active-sessions-store-CeOmXgv5.js';
|
|
18
|
+
export { addMessage, addParts, clearChat, isStreamingAtom, messagesAtom, partMapAtom, updatePart } from './stores.js';
|
|
19
|
+
export { AgentBranding } from './types.js';
|
|
20
|
+
export { S as SessionMessage } from './message-BHWbxBtT.js';
|
|
21
|
+
export { R as ReasoningPart, S as SessionPart, T as TextPart, a as ToolPart, b as ToolState, c as ToolStatus, d as ToolTime } from './parts-dj7AcUg0.js';
|
|
22
|
+
export { F as FinalTextPart, G as GroupedMessage, M as MessageRun, a as MessageUser, R as Run, b as RunStats, T as ToolCategory } from './run-PfLmDAox.js';
|
|
23
|
+
export { C as CustomToolRenderer, D as DisplayVariant, T as ToolDisplayMetadata } from './tool-display-z4JcDmMQ.js';
|
|
24
|
+
export { TOOL_CATEGORY_ICONS, cn, copyText, formatBytes, formatDuration, formatUptime, getToolCategory, getToolDisplayMetadata, getToolErrorText, timeAgo, truncateText } from './utils.js';
|
|
25
|
+
export { CommandPreview, CommandPreviewProps, DiffPreview, DiffPreviewProps, GlobResultsPreview, GlobResultsPreviewProps, GrepResultsPreview, GrepResultsPreviewProps, QuestionPreview, QuestionPreviewProps, WebSearchPreview, WebSearchPreviewProps, WriteFilePreview, WriteFilePreviewProps } from './tool-previews.js';
|
|
26
|
+
import 'class-variance-authority/types';
|
|
27
|
+
import 'react';
|
|
28
|
+
import 'react/jsx-runtime';
|
|
29
|
+
import '@radix-ui/react-dialog';
|
|
30
|
+
import 'class-variance-authority';
|
|
31
|
+
import '@radix-ui/react-avatar';
|
|
32
|
+
import '@radix-ui/react-dropdown-menu';
|
|
33
|
+
import '@radix-ui/react-select';
|
|
34
|
+
import '@radix-ui/react-tabs';
|
|
35
|
+
import '@radix-ui/react-progress';
|
|
36
|
+
import '@radix-ui/react-switch';
|
|
37
|
+
import '@radix-ui/react-label';
|
|
38
|
+
import '@pierre/trees';
|
|
39
|
+
import '@hocuspocus/provider';
|
|
40
|
+
import 'yjs';
|
|
41
|
+
import '@tiptap/react';
|
|
42
|
+
import 'nanostores';
|
|
43
|
+
import 'clsx';
|