@tagit/ai-client-react 1.4.0-beta.35.1 → 1.4.0-beta.36.1

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 CHANGED
@@ -28,7 +28,8 @@ This README is the source of truth for integrating the React package.
28
28
  - `useAIClient`, `useConversation`, `useClientEvents`, and `useAgents`
29
29
  - `ChatWidget` for a full embeddable chat shell
30
30
  - `ChatConversation` for a lighter conversation surface
31
- - the widget stylesheet for direct import
31
+ - `AIActionClient` for focused, checkpoint-aware agent actions
32
+ - the chat and action stylesheets for direct import
32
33
 
33
34
  ## Provider Contract
34
35
 
@@ -55,6 +56,8 @@ Supported public imports:
55
56
  - `@tagit/ai-client-react`
56
57
  - `@tagit/ai-client-react/chat-widget`
57
58
  - `@tagit/ai-client-react/chat-widget.css`
59
+ - `@tagit/ai-client-react/action`
60
+ - `@tagit/ai-client-react/ai-action-client.css`
58
61
  - `@tagit/ai-client-react/hooks`
59
62
  - `@tagit/ai-client-react/provider`
60
63
  - `@tagit/ai-client-react/conversation`
@@ -106,6 +109,49 @@ export default function App() {
106
109
 
107
110
  If that exact example does not render the default empty state and footer, verify the package install and runtime config before customizing anything.
108
111
 
112
+ ## Focused AI Actions
113
+
114
+ Use `AIActionClient` when a button or page event should run an agent workflow without opening a persistent chat. The component starts the configured request, shows progress, presents human checkpoints only when the workflow asks for input, continues the same workflow, and renders the final Markdown result with copy and download actions.
115
+
116
+ Give the action a dedicated `AIClient` instance. In production apps, use a custom core transport when requests must pass through an authenticated server proxy.
117
+
118
+ ```tsx
119
+ import { useMemo, useState } from 'react';
120
+ import { AIClient, createDefaultConfig } from '@tagit/ai-client-core';
121
+ import { AIActionClient } from '@tagit/ai-client-react';
122
+ import '@tagit/ai-client-react/ai-action-client.css';
123
+
124
+ export function GeneratePackageAction() {
125
+ const [open, setOpen] = useState(false);
126
+ const client = useMemo(
127
+ () => new AIClient(createDefaultConfig(
128
+ 'your-use-case-id',
129
+ 'https://your-orchestrator.example.com',
130
+ )),
131
+ [],
132
+ );
133
+
134
+ return (
135
+ <>
136
+ <button onClick={() => setOpen(true)}>Generate package</button>
137
+ <AIActionClient
138
+ client={client}
139
+ open={open}
140
+ onOpenChange={setOpen}
141
+ title="Package Builder"
142
+ initialMessage="Generate the implementation-ready package."
143
+ loadingMessage="Generating your package."
144
+ continuationLoadingMessage="Applying your response."
145
+ resultTitle="Your package is ready."
146
+ downloadFileName="implementation-package.md"
147
+ />
148
+ </>
149
+ );
150
+ }
151
+ ```
152
+
153
+ For an optional question before the workflow starts, pass `initialPrompt` with `question`, `placeholder`, and `buildMessage`. The host owns the trigger and business context; the SDK owns the focused action surface, progress state, checkpoint continuation, viewport coverage, scroll locking, and result presentation.
154
+
109
155
  ## Core Concepts
110
156
 
111
157
  ### `@tagit/ai-client-core`
@@ -0,0 +1,36 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { AIClient, SendMessageOptions } from '@tagit/ai-client-core';
3
+ export interface AIActionInitialPrompt {
4
+ question: string;
5
+ description?: string;
6
+ placeholder?: string;
7
+ buildMessage: (answer: string) => string;
8
+ }
9
+ export interface AIActionClientRenderContext {
10
+ content: string;
11
+ copy: () => Promise<void>;
12
+ download: () => void;
13
+ }
14
+ export interface AIActionClientProps {
15
+ client: AIClient;
16
+ open: boolean;
17
+ onOpenChange: (open: boolean) => void;
18
+ title?: string;
19
+ initialMessage: string;
20
+ initialPrompt?: AIActionInitialPrompt;
21
+ requestOptions?: SendMessageOptions;
22
+ loadingMessage?: string;
23
+ loadingDetail?: string;
24
+ continuationLoadingMessage?: string;
25
+ resultTitle?: string;
26
+ resultDescription?: string;
27
+ checkpointPlaceholder?: string;
28
+ downloadFileName?: string;
29
+ allowCopy?: boolean;
30
+ allowDownload?: boolean;
31
+ renderResult?: (context: AIActionClientRenderContext) => ReactNode;
32
+ onComplete?: (content: string) => void;
33
+ }
34
+ /** A focused, checkpoint-aware action surface backed by a dedicated AIClient instance. */
35
+ export declare function AIActionClient({ client, ...props }: AIActionClientProps): import("react").JSX.Element;
36
+ //# sourceMappingURL=ai-action-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-action-client.d.ts","sourceRoot":"","sources":["../src/ai-action-client.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGpE,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG1E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CAC1C;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,QAAQ,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,SAAS,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAgRD,0FAA0F;AAC1F,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,+BAEvE"}
@@ -0,0 +1,140 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from 'react';
3
+ import { createPortal } from 'react-dom';
4
+ import { BotMessageSquare, CheckCircle2, Copy, Download, Loader2, Send, X } from 'lucide-react';
5
+ import { ContentBlockRenderer } from './renderers/ContentBlockRenderer.js';
6
+ function WaitingDots() {
7
+ return (_jsxs("span", { className: "tagIt-action-waiting-dots", "aria-hidden": "true", children: [_jsx("span", {}), _jsx("span", {}), _jsx("span", {})] }));
8
+ }
9
+ function AIActionClientBody({ client, open, onOpenChange, title = 'AI Action', initialMessage, initialPrompt, requestOptions, loadingMessage = 'Working on your request.', loadingDetail = 'You can keep working on this page.', continuationLoadingMessage = 'Applying your response.', resultTitle = 'Your result is ready.', resultDescription, checkpointPlaceholder = 'Type your response', downloadFileName = 'ai-action-result.md', allowCopy = true, allowDownload = true, renderResult, onComplete, }) {
10
+ const [conversation, setConversation] = useState(() => client.getState());
11
+ const { messages, isLoading, error, workflowId, workflowStatus, checkpointPrompt, } = conversation;
12
+ const [initialAnswer, setInitialAnswer] = useState('');
13
+ const [checkpointAnswer, setCheckpointAnswer] = useState('');
14
+ const [hasStarted, setHasStarted] = useState(false);
15
+ const completedContentRef = useRef(null);
16
+ const assistantContent = [...messages].reverse().find((message) => message.role === 'assistant')?.content ?? '';
17
+ const isWaitingAtCheckpoint = Boolean(workflowId &&
18
+ checkpointPrompt &&
19
+ /wait|checkpoint|pause/i.test(workflowStatus ?? '') &&
20
+ !isLoading);
21
+ useEffect(() => {
22
+ setConversation(client.getState());
23
+ return client.on(() => setConversation(client.getState()));
24
+ }, [client]);
25
+ useEffect(() => {
26
+ if (!open) {
27
+ setInitialAnswer('');
28
+ setCheckpointAnswer('');
29
+ setHasStarted(false);
30
+ completedContentRef.current = null;
31
+ return;
32
+ }
33
+ if (hasStarted || initialPrompt)
34
+ return;
35
+ client.clearHistory();
36
+ setHasStarted(true);
37
+ void client.sendMessage(initialMessage, requestOptions);
38
+ }, [client, hasStarted, initialMessage, initialPrompt, open, requestOptions]);
39
+ useEffect(() => {
40
+ if (!open || isLoading || isWaitingAtCheckpoint || !assistantContent)
41
+ return;
42
+ if (completedContentRef.current === assistantContent)
43
+ return;
44
+ completedContentRef.current = assistantContent;
45
+ onComplete?.(assistantContent);
46
+ }, [assistantContent, isLoading, isWaitingAtCheckpoint, onComplete, open]);
47
+ useEffect(() => {
48
+ if (!open)
49
+ return;
50
+ const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
51
+ const bodyStyle = document.body.style;
52
+ const rootStyle = document.documentElement.style;
53
+ const previous = {
54
+ bodyOverflow: bodyStyle.overflow,
55
+ bodyPaddingRight: bodyStyle.paddingRight,
56
+ rootOverflow: rootStyle.overflow,
57
+ rootOverscroll: rootStyle.overscrollBehavior,
58
+ };
59
+ bodyStyle.overflow = 'hidden';
60
+ if (scrollbarWidth > 0)
61
+ bodyStyle.paddingRight = `${scrollbarWidth}px`;
62
+ rootStyle.overflow = 'hidden';
63
+ rootStyle.overscrollBehavior = 'none';
64
+ return () => {
65
+ bodyStyle.overflow = previous.bodyOverflow;
66
+ bodyStyle.paddingRight = previous.bodyPaddingRight;
67
+ rootStyle.overflow = previous.rootOverflow;
68
+ rootStyle.overscrollBehavior = previous.rootOverscroll;
69
+ };
70
+ }, [open]);
71
+ if (!open || typeof document === 'undefined')
72
+ return null;
73
+ const close = () => {
74
+ if (isLoading)
75
+ client.cancel();
76
+ onOpenChange(false);
77
+ };
78
+ const startFromPrompt = () => {
79
+ const answer = initialAnswer.trim();
80
+ if (!answer || !initialPrompt || hasStarted)
81
+ return;
82
+ client.clearHistory();
83
+ setHasStarted(true);
84
+ void client.sendMessage(initialPrompt.buildMessage(answer), requestOptions);
85
+ };
86
+ const continueWorkflow = () => {
87
+ const answer = checkpointAnswer.trim();
88
+ if (!answer || !workflowId || isLoading)
89
+ return;
90
+ void client.sendMessage(answer, {
91
+ ...requestOptions,
92
+ workflowId,
93
+ checkpointAction: 'continue',
94
+ }).finally(() => setCheckpointAnswer(''));
95
+ };
96
+ const copy = async () => {
97
+ if (assistantContent)
98
+ await navigator.clipboard.writeText(assistantContent);
99
+ };
100
+ const download = () => {
101
+ if (!assistantContent)
102
+ return;
103
+ const blob = new Blob([assistantContent], { type: 'text/markdown;charset=utf-8' });
104
+ const url = URL.createObjectURL(blob);
105
+ const anchor = document.createElement('a');
106
+ anchor.href = url;
107
+ anchor.download = downloadFileName;
108
+ anchor.click();
109
+ URL.revokeObjectURL(url);
110
+ };
111
+ const phase = !hasStarted && initialPrompt
112
+ ? 'initial-prompt'
113
+ : isLoading
114
+ ? 'loading'
115
+ : isWaitingAtCheckpoint
116
+ ? 'checkpoint'
117
+ : error
118
+ ? 'error'
119
+ : assistantContent
120
+ ? 'complete'
121
+ : 'loading';
122
+ return createPortal(_jsx("div", { className: "tagIt-action-scrim", role: "presentation", children: _jsxs("section", { className: "tagIt-action-surface", role: "dialog", "aria-modal": "true", "aria-label": title, "data-phase": phase, "data-loading": String(isLoading), "data-workflow-status": workflowStatus, children: [_jsxs("header", { className: "tagIt-action-header", children: [_jsxs("div", { className: "tagIt-action-title", children: [_jsx("span", { className: "tagIt-action-title-icon", children: _jsx(BotMessageSquare, { "aria-hidden": "true" }) }), _jsx("h2", { children: title })] }), _jsx("button", { type: "button", className: "tagIt-action-icon-button", onClick: close, "aria-label": "Close action", children: _jsx(X, { "aria-hidden": "true" }) })] }), phase === 'initial-prompt' ? (_jsxs("div", { className: "tagIt-action-prompt-layout", children: [_jsx("div", { className: "tagIt-action-centered-content", children: _jsxs("div", { children: [_jsx("p", { className: "tagIt-action-question", children: initialPrompt?.question }), initialPrompt?.description ? _jsx("p", { className: "tagIt-action-muted", children: initialPrompt.description }) : null] }) }), _jsxs("div", { className: "tagIt-action-composer", children: [_jsx("textarea", { value: initialAnswer, onChange: (event) => setInitialAnswer(event.target.value), onKeyDown: (event) => {
123
+ if (event.key === 'Enter' && !event.shiftKey && initialAnswer.trim()) {
124
+ event.preventDefault();
125
+ startFromPrompt();
126
+ }
127
+ }, placeholder: initialPrompt?.placeholder ?? 'Type your response' }), _jsx("button", { type: "button", onClick: startFromPrompt, disabled: !initialAnswer.trim(), "aria-label": "Send response", children: _jsx(Send, { "aria-hidden": "true" }) })] })] })) : null, phase === 'loading' ? (_jsxs("div", { className: "tagIt-action-centered-content tagIt-action-loading", children: [_jsx("span", { className: "tagIt-action-spinner", children: _jsx(Loader2, { "aria-hidden": "true" }) }), _jsx("p", { className: "tagIt-action-question", children: workflowId ? continuationLoadingMessage : loadingMessage }), _jsxs("div", { className: "tagIt-action-loading-detail", children: [_jsx(WaitingDots, {}), _jsx("span", { children: loadingDetail })] }), _jsx("button", { type: "button", className: "tagIt-action-cancel", onClick: close, children: "Cancel" })] })) : null, phase === 'checkpoint' ? (_jsxs("div", { className: "tagIt-action-prompt-layout", children: [_jsx("div", { className: "tagIt-action-centered-content", children: _jsx("p", { className: "tagIt-action-question", children: checkpointPrompt }) }), _jsxs("div", { className: "tagIt-action-composer", children: [_jsx("textarea", { value: checkpointAnswer, onChange: (event) => setCheckpointAnswer(event.target.value), onKeyDown: (event) => {
128
+ if (event.key === 'Enter' && !event.shiftKey && checkpointAnswer.trim()) {
129
+ event.preventDefault();
130
+ continueWorkflow();
131
+ }
132
+ }, placeholder: checkpointPlaceholder }), _jsx("button", { type: "button", onClick: continueWorkflow, disabled: !checkpointAnswer.trim(), "aria-label": "Send response", children: _jsx(Send, { "aria-hidden": "true" }) })] })] })) : null, phase === 'error' ? (_jsxs("div", { className: "tagIt-action-centered-content", children: [_jsx("p", { className: "tagIt-action-question", children: "The action could not finish." }), _jsx("p", { className: "tagIt-action-muted", children: error })] })) : null, phase === 'complete' ? (_jsxs("div", { className: "tagIt-action-result-layout", children: [_jsxs("div", { className: "tagIt-action-result-scroll", children: [_jsxs("div", { className: "tagIt-action-result-heading", children: [_jsx("span", { children: _jsx(CheckCircle2, { "aria-hidden": "true" }) }), _jsxs("div", { children: [_jsx("p", { children: resultTitle }), resultDescription ? _jsx("small", { children: resultDescription }) : null] })] }), renderResult
133
+ ? renderResult({ content: assistantContent, copy, download })
134
+ : _jsx("div", { className: "tagIt-action-result", children: _jsx(ContentBlockRenderer, { role: "assistant", content: assistantContent }) })] }), allowCopy || allowDownload ? (_jsxs("footer", { className: "tagIt-action-footer", children: [allowCopy ? _jsxs("button", { type: "button", onClick: () => void copy(), children: [_jsx(Copy, { "aria-hidden": "true" }), "Copy"] }) : null, allowDownload ? _jsxs("button", { type: "button", className: "tagIt-action-primary", onClick: download, children: [_jsx(Download, { "aria-hidden": "true" }), "Download"] }) : null] })) : null] })) : null] }) }), document.body);
135
+ }
136
+ /** A focused, checkpoint-aware action surface backed by a dedicated AIClient instance. */
137
+ export function AIActionClient({ client, ...props }) {
138
+ return _jsx(AIActionClientBody, { client: client, ...props });
139
+ }
140
+ //# sourceMappingURL=ai-action-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-action-client.js","sourceRoot":"","sources":["../src/ai-action-client.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEhG,OAAO,EAAE,oBAAoB,E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
28
28
  export { ChatAgentPicker, type ChatAgentPickerProps, } from './chat-agent-picker.js';
29
29
  export { ChatAgentAvatar, type ChatAgentAvatarProps, } from './chat-agent-avatar.js';
30
30
  export { ConversationTransitionDialog, getConversationTransitionCopy, needsConversationTransition, useConversationBoundary, type ConversationTransitionKind, type ConversationTransitionRequest, } from './conversation-boundary.js';
31
+ export { AIActionClient, type AIActionClientProps, type AIActionClientRenderContext, type AIActionInitialPrompt, } from './ai-action-client.js';
31
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,KAAK,wBAAwB,EAC7B,KAAK,UAAU,GAChB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,2BAA2B,EAC3B,uBAAuB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,GACnC,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,KAAK,wBAAwB,EAC7B,KAAK,UAAU,GAChB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,2BAA2B,EAC3B,uBAAuB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,GACnC,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,GAC3B,MAAM,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -28,4 +28,5 @@ export { ChatHistoryPanel, } from './chat-history.js';
28
28
  export { ChatAgentPicker, } from './chat-agent-picker.js';
29
29
  export { ChatAgentAvatar, } from './chat-agent-avatar.js';
30
30
  export { ConversationTransitionDialog, getConversationTransitionCopy, needsConversationTransition, useConversationBoundary, } from './conversation-boundary.js';
31
+ export { AIActionClient, } from './ai-action-client.js';
31
32
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,eAAe,EACf,sBAAsB,EACtB,eAAe,GAGhB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,UAAU,GAQX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,gBAAgB,GAEjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,gBAAgB,GAEjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,eAAe,GAEhB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,eAAe,GAEhB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,2BAA2B,EAC3B,uBAAuB,GAGxB,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,eAAe,EACf,sBAAsB,EACtB,eAAe,GAGhB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,UAAU,GAQX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,gBAAgB,GAEjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,gBAAgB,GAEjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,eAAe,GAEhB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,eAAe,GAEhB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,2BAA2B,EAC3B,uBAAuB,GAGxB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,cAAc,GAIf,MAAM,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagit/ai-client-react",
3
- "version": "1.4.0-beta.35.1",
3
+ "version": "1.4.0-beta.36.1",
4
4
  "description": "Self-contained React chat widget and hooks for TagIt AI client",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -8,7 +8,8 @@
8
8
  "files": [
9
9
  "dist",
10
10
  "!dist/**/*.test.*",
11
- "src/chat-widget.css"
11
+ "src/chat-widget.css",
12
+ "src/ai-action-client.css"
12
13
  ],
13
14
  "publishConfig": {
14
15
  "access": "public"
@@ -23,6 +24,11 @@
23
24
  "default": "./dist/chat-widget.js"
24
25
  },
25
26
  "./chat-widget.css": "./src/chat-widget.css",
27
+ "./ai-action-client.css": "./src/ai-action-client.css",
28
+ "./action": {
29
+ "types": "./dist/ai-action-client.d.ts",
30
+ "default": "./dist/ai-action-client.js"
31
+ },
26
32
  "./hooks": {
27
33
  "types": "./dist/hooks.d.ts",
28
34
  "default": "./dist/hooks.js"
@@ -37,7 +43,7 @@
37
43
  }
38
44
  },
39
45
  "dependencies": {
40
- "@tagit/ai-client-core": "1.4.0-beta.35.1",
46
+ "@tagit/ai-client-core": "1.4.0-beta.36.1",
41
47
  "highlight.js": "^11.11.1",
42
48
  "lucide-react": "^0.539.0",
43
49
  "react-markdown": "^10.1.0",
@@ -0,0 +1,90 @@
1
+ .tagIt-action-scrim {
2
+ --tagIt-action-bg: #edf3fa;
3
+ --tagIt-action-surface: #f8fbff;
4
+ --tagIt-action-result-bg: rgba(255, 255, 255, 0.78);
5
+ --tagIt-action-text: #0f172a;
6
+ --tagIt-action-muted: #59677c;
7
+ --tagIt-action-border: #b8c6d8;
8
+ --tagIt-action-primary: #1d4ed8;
9
+ --tagIt-action-primary-text: #ffffff;
10
+ position: fixed;
11
+ inset: 0;
12
+ z-index: 2147483000;
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ padding: 24px;
17
+ background: rgba(15, 23, 42, 0.42);
18
+ backdrop-filter: blur(1px);
19
+ touch-action: none;
20
+ }
21
+
22
+ .tagIt-action-scrim * { box-sizing: border-box; }
23
+ .tagIt-action-surface {
24
+ display: flex;
25
+ width: min(760px, 100%);
26
+ max-height: min(760px, calc(100dvh - 24px));
27
+ min-height: min(440px, calc(100dvh - 24px));
28
+ flex-direction: column;
29
+ overflow: hidden;
30
+ border: 1px solid var(--tagIt-action-border);
31
+ border-radius: 10px;
32
+ background: var(--tagIt-action-bg);
33
+ color: var(--tagIt-action-text);
34
+ box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32);
35
+ touch-action: pan-y;
36
+ }
37
+ .tagIt-action-header { display:flex; min-height:56px; flex:0 0 auto; align-items:center; justify-content:space-between; gap:12px; padding:0 14px; border-bottom:1px solid var(--tagIt-action-border); background:var(--tagIt-action-surface); }
38
+ .tagIt-action-title { display:flex; min-width:0; align-items:center; gap:9px; }
39
+ .tagIt-action-title h2 { margin:0; overflow:hidden; font-size:15px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
40
+ .tagIt-action-title-icon { display:flex; width:24px; height:24px; align-items:center; justify-content:center; border-radius:6px; background:color-mix(in srgb,var(--tagIt-action-primary) 10%,transparent); color:var(--tagIt-action-primary); }
41
+ .tagIt-action-title-icon svg { width:16px; height:16px; }
42
+ .tagIt-action-icon-button { display:flex; width:34px; height:34px; align-items:center; justify-content:center; border:1px solid var(--tagIt-action-border); border-radius:9px; background:transparent; color:var(--tagIt-action-muted); cursor:pointer; }
43
+ .tagIt-action-icon-button:hover { background:color-mix(in srgb,var(--tagIt-action-border) 35%,transparent); color:var(--tagIt-action-text); }
44
+ .tagIt-action-icon-button svg { width:22px; height:22px; }
45
+ .tagIt-action-centered-content { display:flex; min-height:320px; flex:1 1 auto; flex-direction:column; align-items:center; justify-content:center; overflow-y:auto; overscroll-behavior:contain; padding:32px; text-align:center; }
46
+ .tagIt-action-question { margin:0; font-size:16px; font-weight:700; line-height:1.45; }
47
+ .tagIt-action-muted { max-width:520px; margin:8px 0 0; color:var(--tagIt-action-muted); font-size:14px; line-height:1.55; }
48
+ .tagIt-action-prompt-layout,.tagIt-action-result-layout { display:flex; min-height:0; flex:1 1 auto; flex-direction:column; }
49
+ .tagIt-action-composer { position:relative; flex:0 0 auto; border-top:1px solid var(--tagIt-action-border); background:var(--tagIt-action-surface); padding:12px; }
50
+ .tagIt-action-composer textarea { width:100%; min-height:92px; resize:none; border:1px solid var(--tagIt-action-border); border-radius:14px; outline:0; background:#fff; color:var(--tagIt-action-text); padding:12px 52px 12px 14px; font:inherit; font-size:14px; line-height:1.5; }
51
+ .tagIt-action-composer textarea:focus { border-color:var(--tagIt-action-primary); }
52
+ .tagIt-action-composer button { position:absolute; right:22px; bottom:22px; display:flex; width:36px; height:36px; align-items:center; justify-content:center; border:0; border-radius:50%; background:var(--tagIt-action-primary); color:var(--tagIt-action-primary-text); cursor:pointer; }
53
+ .tagIt-action-composer button:disabled { cursor:not-allowed; opacity:.35; }
54
+ .tagIt-action-composer svg { width:16px; height:16px; }
55
+ .tagIt-action-loading { gap:12px; }
56
+ .tagIt-action-spinner { position:relative; display:flex; width:56px; height:56px; margin-bottom:8px; align-items:center; justify-content:center; border-radius:50%; background:color-mix(in srgb,var(--tagIt-action-primary) 10%,transparent); color:var(--tagIt-action-primary); }
57
+ .tagIt-action-spinner svg { width:28px; height:28px; animation:tagIt-action-spin 1s linear infinite; }
58
+ .tagIt-action-loading-detail { display:flex; align-items:center; gap:8px; color:var(--tagIt-action-muted); font-size:14px; }
59
+ .tagIt-action-waiting-dots { display:inline-flex; align-items:center; gap:4px; }
60
+ .tagIt-action-waiting-dots span { width:6px; height:6px; border-radius:50%; background:var(--tagIt-action-primary); animation:tagIt-action-bounce 1s infinite ease-in-out; }
61
+ .tagIt-action-waiting-dots span:nth-child(2) { animation-delay:160ms; }
62
+ .tagIt-action-waiting-dots span:nth-child(3) { animation-delay:320ms; }
63
+ .tagIt-action-cancel { margin-top:8px; border:0; background:transparent; color:var(--tagIt-action-muted); cursor:pointer; font-size:12px; }
64
+ .tagIt-action-cancel:hover { color:var(--tagIt-action-text); text-decoration:underline; }
65
+ .tagIt-action-result-scroll { min-height:0; flex:1 1 auto; overflow-y:auto; overscroll-behavior:contain; padding:20px; }
66
+ .tagIt-action-result-heading { display:flex; align-items:flex-start; gap:12px; }
67
+ .tagIt-action-result-heading>span { display:flex; width:32px; height:32px; flex:0 0 auto; align-items:center; justify-content:center; border-radius:50%; background:rgba(16,185,129,.12); color:#059669; }
68
+ .tagIt-action-result-heading svg { width:17px; height:17px; }
69
+ .tagIt-action-result-heading p { margin:0; font-size:16px; font-weight:700; }
70
+ .tagIt-action-result-heading small { display:block; margin-top:5px; color:var(--tagIt-action-muted); font-size:14px; line-height:1.5; }
71
+ .tagIt-action-result { margin-top:18px; overflow:hidden; border:1px solid var(--tagIt-action-border); border-radius:7px; background:var(--tagIt-action-result-bg); padding:16px; font-size:14px; line-height:1.55; }
72
+ .tagIt-action-result pre { overflow-x:auto; border-radius:7px; background:#111827; color:#f1f5f9; padding:14px; font-size:12px; line-height:1.55; }
73
+ .tagIt-action-result code { font-size:12px; }
74
+ .tagIt-action-footer { display:flex; flex:0 0 auto; flex-wrap:wrap; justify-content:flex-end; gap:8px; border-top:1px solid var(--tagIt-action-border); background:var(--tagIt-action-surface); padding:12px 16px; }
75
+ .tagIt-action-footer button { display:inline-flex; min-height:34px; align-items:center; gap:7px; border:1px solid var(--tagIt-action-border); border-radius:7px; background:transparent; color:var(--tagIt-action-text); padding:7px 12px; cursor:pointer; font-size:13px; font-weight:700; }
76
+ .tagIt-action-footer button.tagIt-action-primary { border-color:var(--tagIt-action-primary); background:var(--tagIt-action-primary); color:var(--tagIt-action-primary-text); }
77
+ .tagIt-action-footer svg { width:16px; height:16px; }
78
+
79
+ @media (prefers-color-scheme: dark) {
80
+ .tagIt-action-scrim { --tagIt-action-bg:#07111f; --tagIt-action-surface:#0e1a2b; --tagIt-action-result-bg:#101d31; --tagIt-action-text:#e5eefb; --tagIt-action-muted:#a5b4ca; --tagIt-action-border:#365278; --tagIt-action-primary:#60a5fa; --tagIt-action-primary-text:#081225; }
81
+ .tagIt-action-composer textarea { background:#101d31; }
82
+ }
83
+ @media (max-width:639px),(max-height:700px) {
84
+ .tagIt-action-scrim { padding:12px; }
85
+ .tagIt-action-surface { width:100%; min-height:calc(100dvh - 24px); max-height:calc(100dvh - 24px); }
86
+ .tagIt-action-result-scroll { padding:16px; }
87
+ }
88
+ @keyframes tagIt-action-spin { to { transform:rotate(360deg); } }
89
+ @keyframes tagIt-action-bounce { 0%,80%,100% { transform:translateY(0); opacity:.45; } 40% { transform:translateY(-4px); opacity:1; } }
90
+