@courseecho/ai-widget-react 1.0.20 → 1.0.21

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.
@@ -6,4 +6,3 @@ import React from 'react';
6
6
  export declare const ShadowWrapper: React.FC<{
7
7
  children: React.ReactNode;
8
8
  }>;
9
- //# sourceMappingURL=ShadowWrapper.d.ts.map
@@ -166,4 +166,3 @@ export const ShadowWrapper = ({ children }) => {
166
166
  }, []);
167
167
  return (_jsxs(_Fragment, { children: [_jsx("div", { ref: hostRef }), portalTarget && createPortal(children, portalTarget)] }));
168
168
  };
169
- //# sourceMappingURL=ShadowWrapper.js.map
@@ -23,4 +23,3 @@ export interface AiChatWidgetProps {
23
23
  }
24
24
  export declare const AiChatWidget: React.FC<AiChatWidgetProps>;
25
25
  export default AiChatWidget;
26
- //# sourceMappingURL=components.d.ts.map
@@ -224,4 +224,3 @@ export const AiChatWidget = ({ config, apiKey, jwtToken, title = 'AI Assistant',
224
224
  }), isLoading && (_jsxs("div", { className: "aiwg-msg aiwg-msg--bot", children: [_jsx("div", { className: "aiwg-msg-avatar" }), _jsx("div", { className: "aiwg-msg-body", children: _jsx("div", { className: "aiwg-msg-bubble aiwg-typing", children: _jsxs("div", { className: "aiwg-typing-dots", children: [_jsx("span", {}), _jsx("span", {}), _jsx("span", {})] }) }) })] })), error && _jsxs("div", { className: "aiwg-error", style: { display: 'block' }, children: [" ", error] }), _jsx("div", { ref: messagesEndRef })] }), chipsVisible && messages.length === 0 && (_jsx("div", { className: "aiwg-chip-row", children: allSugs.slice(0, 4).map(s => (_jsxs("button", { className: "aiwg-chip", onClick: () => selectSuggestion(s.text), children: [s.icon, " ", s.text] }, s.id))) })), _jsxs("div", { className: "aiwg-input-area", children: [showSuggestions && filteredSugs.length > 0 && (_jsxs("div", { className: "aiwg-suggestions", children: [_jsx("div", { className: "aiwg-suggestions-header", children: "Suggestions" }), _jsx("div", { className: "aiwg-suggestions-list", children: filteredSugs.map((s, i) => (_jsxs("div", { className: `aiwg-suggestion-item${i === activeIdx ? ' aiwg-active' : ''}`, onMouseEnter: () => setActiveIdx(i), onClick: () => selectSuggestion(s.text), children: [s.icon && _jsx("span", { className: "aiwg-suggestion-icon", children: s.icon }), _jsxs("div", { className: "aiwg-suggestion-main", children: [_jsx("div", { className: "aiwg-suggestion-text", children: s.text }), s.description && _jsx("div", { className: "aiwg-suggestion-desc", children: s.description })] }), s.category && _jsx("span", { className: "aiwg-suggestion-badge", children: s.category })] }, s.id))) }), _jsxs("div", { className: "aiwg-kbd-hint", children: [_jsxs("span", { children: [_jsx("kbd", {}), " navigate"] }), _jsxs("span", { children: [_jsx("kbd", {}), " select"] }), _jsxs("span", { children: [_jsx("kbd", { children: "Esc" }), " close"] })] })] })), _jsxs("div", { className: "aiwg-input-row", children: [_jsx("textarea", { ref: inputRef, className: "aiwg-input", placeholder: placeholder, value: userInput, rows: 1, onChange: handleInputChange, onFocus: () => filterSugs(userInput), onKeyDown: handleKeyDown, disabled: isLoading, "aria-label": "Chat message input" }), _jsx("button", { className: "aiwg-send-btn", type: "button", disabled: isLoading || !userInput.trim(), onClick: () => doSend(userInput), "aria-label": "Send", children: _jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("line", { x1: "22", y1: "2", x2: "11", y2: "13" }), _jsx("polygon", { points: "22 2 15 22 11 13 2 9 22 2" })] }) })] })] }), _jsxs("div", { className: "aiwg-powered", children: ["Powered by", ' ', _jsx("a", { href: poweredByUrl, target: "_blank", rel: "noopener noreferrer", children: poweredByLabel })] })] }) }));
225
225
  };
226
226
  export default AiChatWidget;
227
- //# sourceMappingURL=components.js.map
package/dist/hooks.d.ts CHANGED
@@ -62,4 +62,3 @@ export declare function useAiWidget(config: AiContextConfig, jwtToken?: string):
62
62
  suggestions: AiSuggestion[];
63
63
  filterSuggestions: (query: string) => AiSuggestion[];
64
64
  };
65
- //# sourceMappingURL=hooks.d.ts.map
package/dist/hooks.js CHANGED
@@ -179,4 +179,3 @@ export function useAiWidget(config, jwtToken) {
179
179
  filterSuggestions,
180
180
  };
181
181
  }
182
- //# sourceMappingURL=hooks.js.map
package/dist/index.d.ts CHANGED
@@ -5,4 +5,3 @@ export { AiChatWidget } from './components';
5
5
  export type { AiChatWidgetProps } from './components';
6
6
  export { useAiChat, useAiMessages, useAiLoading, useAiError, useAiContext, useAiWidget, } from './hooks';
7
7
  export type { AiContextConfig, AiContext, AiMessage, AiChart, AiQueryResponse, } from '@courseecho/ai-core-sdk';
8
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export { AiChatWidget } from './components';
5
5
  export { useAiChat, useAiMessages, useAiLoading, useAiError, useAiContext, useAiWidget, } from './hooks';
6
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@courseecho/ai-widget-react",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "React AI chat widget component for CourseEcho.",
5
5
  "license": "MIT",
6
6
  "author": "CourseEcho",