@orion-ds/react 5.1.11 → 5.2.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/AI_COMPONENTS.md +9 -2
- package/dist/blocks/index.cjs +1 -1
- package/dist/blocks/index.mjs +50 -54
- package/dist/blocks/sections/index.d.ts +0 -2
- package/dist/blocks/sections/index.d.ts.map +1 -1
- package/dist/blocks/templates/index.cjs +1 -1
- package/dist/blocks/templates/index.d.ts +0 -5
- package/dist/blocks/templates/index.d.ts.map +1 -1
- package/dist/blocks/templates/index.mjs +12 -14
- package/dist/blocks.css +0 -4
- package/dist/client.d.ts +1 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/components/ThemeController/ThemeController.cjs +1 -1
- package/dist/components/ThemeController/ThemeController.d.ts.map +1 -1
- package/dist/components/ThemeController/ThemeController.mjs +19 -14
- package/dist/components/index.d.ts +0 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/hooks/useTheme.cjs +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/hooks/useTheme.d.ts.map +1 -1
- package/dist/hooks/useTheme.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +189 -199
- package/dist/styles.css +0 -2
- package/dist/tokens/types.d.ts +1 -18
- package/dist/tokens/types.d.ts.map +1 -1
- package/dist/utils/fonts.cjs +1 -1
- package/dist/utils/fonts.d.ts.map +1 -1
- package/dist/utils/fonts.mjs +1 -0
- package/package.json +1 -6
- package/dist/blocks/sections/Chat/Chat.cjs +0 -1
- package/dist/blocks/sections/Chat/Chat.d.ts +0 -5
- package/dist/blocks/sections/Chat/Chat.d.ts.map +0 -1
- package/dist/blocks/sections/Chat/Chat.mjs +0 -93
- package/dist/blocks/sections/Chat/Chat.module.css +0 -1
- package/dist/blocks/sections/Chat/Chat.module.css.cjs +0 -1
- package/dist/blocks/sections/Chat/Chat.module.css.mjs +0 -47
- package/dist/blocks/sections/Chat/Chat.types.d.ts +0 -33
- package/dist/blocks/sections/Chat/Chat.types.d.ts.map +0 -1
- package/dist/blocks/sections/Chat/index.d.ts +0 -3
- package/dist/blocks/sections/Chat/index.d.ts.map +0 -1
- package/dist/blocks/templates/app/ChatPageTemplate/ChatPageTemplate.cjs +0 -1
- package/dist/blocks/templates/app/ChatPageTemplate/ChatPageTemplate.d.ts +0 -5
- package/dist/blocks/templates/app/ChatPageTemplate/ChatPageTemplate.d.ts.map +0 -1
- package/dist/blocks/templates/app/ChatPageTemplate/ChatPageTemplate.mjs +0 -192
- package/dist/blocks/templates/app/ChatPageTemplate/ChatPageTemplate.module.css +0 -1
- package/dist/blocks/templates/app/ChatPageTemplate/ChatPageTemplate.module.css.cjs +0 -1
- package/dist/blocks/templates/app/ChatPageTemplate/ChatPageTemplate.module.css.mjs +0 -81
- package/dist/blocks/templates/app/ChatPageTemplate/ChatPageTemplate.types.d.ts +0 -42
- package/dist/blocks/templates/app/ChatPageTemplate/ChatPageTemplate.types.d.ts.map +0 -1
- package/dist/blocks/templates/app/ChatPageTemplate/index.d.ts +0 -3
- package/dist/blocks/templates/app/ChatPageTemplate/index.d.ts.map +0 -1
- package/dist/components/Chat/Chat.cjs +0 -1
- package/dist/components/Chat/Chat.d.ts +0 -22
- package/dist/components/Chat/Chat.d.ts.map +0 -1
- package/dist/components/Chat/Chat.mjs +0 -56
- package/dist/components/Chat/Chat.module.css +0 -1
- package/dist/components/Chat/Chat.module.css.cjs +0 -1
- package/dist/components/Chat/Chat.module.css.mjs +0 -237
- package/dist/components/Chat/Chat.types.d.ts +0 -387
- package/dist/components/Chat/Chat.types.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatAttachment.cjs +0 -1
- package/dist/components/Chat/components/ChatAttachment.d.ts +0 -5
- package/dist/components/Chat/components/ChatAttachment.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatAttachment.mjs +0 -125
- package/dist/components/Chat/components/ChatAudioPlayer.cjs +0 -1
- package/dist/components/Chat/components/ChatAudioPlayer.d.ts +0 -5
- package/dist/components/Chat/components/ChatAudioPlayer.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatAudioPlayer.mjs +0 -127
- package/dist/components/Chat/components/ChatCodeBlock.cjs +0 -1
- package/dist/components/Chat/components/ChatCodeBlock.d.ts +0 -5
- package/dist/components/Chat/components/ChatCodeBlock.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatCodeBlock.mjs +0 -93
- package/dist/components/Chat/components/ChatFileUpload.cjs +0 -1
- package/dist/components/Chat/components/ChatFileUpload.d.ts +0 -5
- package/dist/components/Chat/components/ChatFileUpload.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatFileUpload.mjs +0 -114
- package/dist/components/Chat/components/ChatHeader.cjs +0 -1
- package/dist/components/Chat/components/ChatHeader.d.ts +0 -5
- package/dist/components/Chat/components/ChatHeader.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatHeader.mjs +0 -36
- package/dist/components/Chat/components/ChatImagePreview.cjs +0 -1
- package/dist/components/Chat/components/ChatImagePreview.d.ts +0 -5
- package/dist/components/Chat/components/ChatImagePreview.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatImagePreview.mjs +0 -69
- package/dist/components/Chat/components/ChatInput.cjs +0 -1
- package/dist/components/Chat/components/ChatInput.d.ts +0 -5
- package/dist/components/Chat/components/ChatInput.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatInput.mjs +0 -188
- package/dist/components/Chat/components/ChatLightbox.cjs +0 -1
- package/dist/components/Chat/components/ChatLightbox.d.ts +0 -5
- package/dist/components/Chat/components/ChatLightbox.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatLightbox.mjs +0 -57
- package/dist/components/Chat/components/ChatMarkdown.cjs +0 -1
- package/dist/components/Chat/components/ChatMarkdown.d.ts +0 -5
- package/dist/components/Chat/components/ChatMarkdown.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatMarkdown.mjs +0 -70
- package/dist/components/Chat/components/ChatMessage.cjs +0 -1
- package/dist/components/Chat/components/ChatMessage.d.ts +0 -5
- package/dist/components/Chat/components/ChatMessage.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatMessage.mjs +0 -173
- package/dist/components/Chat/components/ChatMessages.cjs +0 -1
- package/dist/components/Chat/components/ChatMessages.d.ts +0 -5
- package/dist/components/Chat/components/ChatMessages.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatMessages.mjs +0 -46
- package/dist/components/Chat/components/ChatSidebar.cjs +0 -1
- package/dist/components/Chat/components/ChatSidebar.d.ts +0 -5
- package/dist/components/Chat/components/ChatSidebar.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatSidebar.mjs +0 -217
- package/dist/components/Chat/components/ChatTypingIndicator.cjs +0 -1
- package/dist/components/Chat/components/ChatTypingIndicator.d.ts +0 -5
- package/dist/components/Chat/components/ChatTypingIndicator.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatTypingIndicator.mjs +0 -31
- package/dist/components/Chat/components/ChatVoiceRecorder.cjs +0 -1
- package/dist/components/Chat/components/ChatVoiceRecorder.d.ts +0 -5
- package/dist/components/Chat/components/ChatVoiceRecorder.d.ts.map +0 -1
- package/dist/components/Chat/components/ChatVoiceRecorder.mjs +0 -111
- package/dist/components/Chat/components/index.d.ts +0 -18
- package/dist/components/Chat/components/index.d.ts.map +0 -1
- package/dist/components/Chat/hooks/index.d.ts +0 -12
- package/dist/components/Chat/hooks/index.d.ts.map +0 -1
- package/dist/components/Chat/hooks/useAutoScroll.cjs +0 -1
- package/dist/components/Chat/hooks/useAutoScroll.d.ts +0 -24
- package/dist/components/Chat/hooks/useAutoScroll.d.ts.map +0 -1
- package/dist/components/Chat/hooks/useAutoScroll.mjs +0 -50
- package/dist/components/Chat/hooks/useChatInput.cjs +0 -1
- package/dist/components/Chat/hooks/useChatInput.d.ts +0 -43
- package/dist/components/Chat/hooks/useChatInput.d.ts.map +0 -1
- package/dist/components/Chat/hooks/useChatInput.mjs +0 -44
- package/dist/components/Chat/hooks/useStreamingText.cjs +0 -1
- package/dist/components/Chat/hooks/useStreamingText.d.ts +0 -22
- package/dist/components/Chat/hooks/useStreamingText.d.ts.map +0 -1
- package/dist/components/Chat/hooks/useStreamingText.mjs +0 -21
- package/dist/components/Chat/hooks/useVoiceRecorder.cjs +0 -1
- package/dist/components/Chat/hooks/useVoiceRecorder.d.ts +0 -26
- package/dist/components/Chat/hooks/useVoiceRecorder.d.ts.map +0 -1
- package/dist/components/Chat/hooks/useVoiceRecorder.mjs +0 -74
- package/dist/components/Chat/index.d.ts +0 -28
- package/dist/components/Chat/index.d.ts.map +0 -1
- package/dist/components/Chat/utils.cjs +0 -1
- package/dist/components/Chat/utils.d.ts +0 -16
- package/dist/components/Chat/utils.d.ts.map +0 -1
- package/dist/components/Chat/utils.mjs +0 -12
- package/dist/rich.cjs +0 -1
- package/dist/rich.d.ts +0 -16
- package/dist/rich.d.ts.map +0 -1
- package/dist/rich.mjs +0 -4
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { useRef as h, useState as m, useEffect as i } from "react";
|
|
2
|
-
function x(s, a = {}) {
|
|
3
|
-
const { wordsPerTick: c = 2, intervalMs: o = 60, enabled: t = !0 } = a, e = h([]), [r, n] = m(0);
|
|
4
|
-
i(() => {
|
|
5
|
-
e.current = s.split(/(\s+)/), n(t ? 0 : e.current.length);
|
|
6
|
-
}, [s, t]), i(() => {
|
|
7
|
-
if (!t || r >= e.current.length) return;
|
|
8
|
-
const u = setInterval(() => {
|
|
9
|
-
n((g) => {
|
|
10
|
-
const l = g + c;
|
|
11
|
-
return l >= e.current.length ? (clearInterval(u), e.current.length) : l;
|
|
12
|
-
});
|
|
13
|
-
}, o);
|
|
14
|
-
return () => clearInterval(u);
|
|
15
|
-
}, [t, r, c, o]);
|
|
16
|
-
const d = e.current.slice(0, r).join(""), f = r >= e.current.length;
|
|
17
|
-
return { displayText: d, isComplete: f };
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
x as useStreamingText
|
|
21
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");function B(S={}){const{maxDuration:v=300,mimeType:f="audio/webm",onRecordingComplete:y,onError:i}=S,[p,R]=e.useState(!1),[T,m]=e.useState(0),[h,b]=e.useState(),[C,s]=e.useState(),u=e.useRef(null),d=e.useRef(null),l=e.useRef([]),n=e.useRef(null),M=e.useRef(0),g=typeof window<"u"&&"MediaRecorder"in window,o=e.useCallback(()=>{n.current&&(clearInterval(n.current),n.current=null),d.current&&(d.current.getTracks().forEach(t=>t.stop()),d.current=null),u.current=null,l.current=[]},[]),D=e.useCallback(async()=>{if(!g){const t="Voice recording is not supported in this browser";s(t),i?.(t);return}try{s(void 0),b(void 0),m(0),l.current=[];const t=await navigator.mediaDevices.getUserMedia({audio:!0});d.current=t;let c=f;MediaRecorder.isTypeSupported(f)||(c=["audio/webm","audio/mp4","audio/ogg"].find(I=>MediaRecorder.isTypeSupported(I))||"");const a=new MediaRecorder(t,{mimeType:c||void 0});u.current=a,a.ondataavailable=r=>{r.data.size>0&&l.current.push(r.data)},a.onstop=()=>{const r=new Blob(l.current,{type:c||"audio/webm"});b(r),y?.(r),o()},a.onerror=()=>{const r="Recording failed";s(r),i?.(r),o()},a.start(100),R(!0),M.current=Date.now(),n.current=window.setInterval(()=>{const r=Math.floor((Date.now()-M.current)/1e3);m(r),r>=v&&k()},100)}catch(t){const c=t instanceof Error?t.message:"Failed to access microphone";s(c),i?.(c),o()}},[g,f,v,y,i,o]),k=e.useCallback(()=>{u.current&&p&&(u.current.stop(),R(!1),n.current&&(clearInterval(n.current),n.current=null))},[p]),w=e.useCallback(()=>{o(),R(!1),m(0),b(void 0)},[o]),E=e.useCallback(()=>{w(),s(void 0)},[w]);return e.useEffect(()=>()=>{o()},[o]),{isRecording:p,duration:T,audioBlob:h,error:C,startRecording:D,stopRecording:k,cancelRecording:w,reset:E,isSupported:g}}exports.useVoiceRecorder=B;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { VoiceRecorderState } from '../Chat.types';
|
|
2
|
-
|
|
3
|
-
export interface UseVoiceRecorderOptions {
|
|
4
|
-
/** Maximum recording duration in seconds */
|
|
5
|
-
maxDuration?: number;
|
|
6
|
-
/** Audio MIME type */
|
|
7
|
-
mimeType?: string;
|
|
8
|
-
/** Callback when recording is complete */
|
|
9
|
-
onRecordingComplete?: (blob: Blob) => void;
|
|
10
|
-
/** Callback on error */
|
|
11
|
-
onError?: (error: string) => void;
|
|
12
|
-
}
|
|
13
|
-
export interface UseVoiceRecorderReturn extends VoiceRecorderState {
|
|
14
|
-
/** Start recording */
|
|
15
|
-
startRecording: () => Promise<void>;
|
|
16
|
-
/** Stop recording */
|
|
17
|
-
stopRecording: () => void;
|
|
18
|
-
/** Cancel recording */
|
|
19
|
-
cancelRecording: () => void;
|
|
20
|
-
/** Reset state */
|
|
21
|
-
reset: () => void;
|
|
22
|
-
/** Whether recording is supported */
|
|
23
|
-
isSupported: boolean;
|
|
24
|
-
}
|
|
25
|
-
export declare function useVoiceRecorder(options?: UseVoiceRecorderOptions): UseVoiceRecorderReturn;
|
|
26
|
-
//# sourceMappingURL=useVoiceRecorder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useVoiceRecorder.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/hooks/useVoiceRecorder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,WAAW,uBAAuB;IACtC,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC3C,wBAAwB;IACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE,sBAAsB;IACtB,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,qBAAqB;IACrB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,uBAAuB;IACvB,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,kBAAkB;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,qCAAqC;IACrC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,GAAE,uBAA4B,GACpC,sBAAsB,CA+KxB"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { useState as p, useRef as i, useCallback as a, useEffect as V } from "react";
|
|
2
|
-
function A(D = {}) {
|
|
3
|
-
const {
|
|
4
|
-
maxDuration: y = 300,
|
|
5
|
-
// 5 minutes default
|
|
6
|
-
mimeType: m = "audio/webm",
|
|
7
|
-
onRecordingComplete: h,
|
|
8
|
-
onError: u
|
|
9
|
-
} = D, [R, g] = p(!1), [E, w] = p(0), [I, b] = p(), [S, c] = p(), d = i(null), l = i(null), f = i([]), o = i(null), T = i(0), v = typeof window < "u" && "MediaRecorder" in window, t = a(() => {
|
|
10
|
-
o.current && (clearInterval(o.current), o.current = null), l.current && (l.current.getTracks().forEach((r) => r.stop()), l.current = null), d.current = null, f.current = [];
|
|
11
|
-
}, []), B = a(async () => {
|
|
12
|
-
if (!v) {
|
|
13
|
-
const r = "Voice recording is not supported in this browser";
|
|
14
|
-
c(r), u?.(r);
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
try {
|
|
18
|
-
c(void 0), b(void 0), w(0), f.current = [];
|
|
19
|
-
const r = await navigator.mediaDevices.getUserMedia({ audio: !0 });
|
|
20
|
-
l.current = r;
|
|
21
|
-
let n = m;
|
|
22
|
-
MediaRecorder.isTypeSupported(m) || (n = ["audio/webm", "audio/mp4", "audio/ogg"].find((C) => MediaRecorder.isTypeSupported(C)) || "");
|
|
23
|
-
const s = new MediaRecorder(r, {
|
|
24
|
-
mimeType: n || void 0
|
|
25
|
-
});
|
|
26
|
-
d.current = s, s.ondataavailable = (e) => {
|
|
27
|
-
e.data.size > 0 && f.current.push(e.data);
|
|
28
|
-
}, s.onstop = () => {
|
|
29
|
-
const e = new Blob(f.current, {
|
|
30
|
-
type: n || "audio/webm"
|
|
31
|
-
});
|
|
32
|
-
b(e), h?.(e), t();
|
|
33
|
-
}, s.onerror = () => {
|
|
34
|
-
const e = "Recording failed";
|
|
35
|
-
c(e), u?.(e), t();
|
|
36
|
-
}, s.start(100), g(!0), T.current = Date.now(), o.current = window.setInterval(() => {
|
|
37
|
-
const e = Math.floor((Date.now() - T.current) / 1e3);
|
|
38
|
-
w(e), e >= y && k();
|
|
39
|
-
}, 100);
|
|
40
|
-
} catch (r) {
|
|
41
|
-
const n = r instanceof Error ? r.message : "Failed to access microphone";
|
|
42
|
-
c(n), u?.(n), t();
|
|
43
|
-
}
|
|
44
|
-
}, [
|
|
45
|
-
v,
|
|
46
|
-
m,
|
|
47
|
-
y,
|
|
48
|
-
h,
|
|
49
|
-
u,
|
|
50
|
-
t
|
|
51
|
-
]), k = a(() => {
|
|
52
|
-
d.current && R && (d.current.stop(), g(!1), o.current && (clearInterval(o.current), o.current = null));
|
|
53
|
-
}, [R]), M = a(() => {
|
|
54
|
-
t(), g(!1), w(0), b(void 0);
|
|
55
|
-
}, [t]), x = a(() => {
|
|
56
|
-
M(), c(void 0);
|
|
57
|
-
}, [M]);
|
|
58
|
-
return V(() => () => {
|
|
59
|
-
t();
|
|
60
|
-
}, [t]), {
|
|
61
|
-
isRecording: R,
|
|
62
|
-
duration: E,
|
|
63
|
-
audioBlob: I,
|
|
64
|
-
error: S,
|
|
65
|
-
startRecording: B,
|
|
66
|
-
stopRecording: k,
|
|
67
|
-
cancelRecording: M,
|
|
68
|
-
reset: x,
|
|
69
|
-
isSupported: v
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
export {
|
|
73
|
-
A as useVoiceRecorder
|
|
74
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Chat Component - AI-first chat interface with multimodal support.
|
|
3
|
-
*
|
|
4
|
-
* @example
|
|
5
|
-
* ```tsx
|
|
6
|
-
* import { Chat } from '@orion-ds/react';
|
|
7
|
-
*
|
|
8
|
-
* <Chat>
|
|
9
|
-
* <Chat.Header title="AI Assistant" />
|
|
10
|
-
* <Chat.Messages>
|
|
11
|
-
* {messages.map(msg => (
|
|
12
|
-
* <Chat.Message
|
|
13
|
-
* key={msg.id}
|
|
14
|
-
* role={msg.role}
|
|
15
|
-
* content={msg.content}
|
|
16
|
-
* />
|
|
17
|
-
* ))}
|
|
18
|
-
* {isTyping && <Chat.TypingIndicator />}
|
|
19
|
-
* </Chat.Messages>
|
|
20
|
-
* <Chat.Input onSend={handleSend} />
|
|
21
|
-
* </Chat>
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export { Chat } from './Chat';
|
|
25
|
-
export type { ChatRole, MessageStatus, AttachmentType, MessageReaction, ChatAttachment, ChatMessage, ChatConversation, VoiceRecorderState, ChatProps, ChatHeaderProps, ChatMessagesProps, ChatMessageProps, ChatInputProps, ChatTypingIndicatorProps, ChatCodeBlockProps, ChatMarkdownProps, ChatImagePreviewProps, ChatAudioPlayerProps, ChatVoiceRecorderProps, ChatFileUploadProps, ChatAttachmentPreviewProps, ChatSidebarProps, ChatSectionProps, ChatPageTemplateProps, ChatLightboxProps, } from './Chat.types';
|
|
26
|
-
export { useAutoScroll, useVoiceRecorder, useChatInput, useStreamingText, } from './hooks';
|
|
27
|
-
export type { UseAutoScrollOptions, UseAutoScrollReturn, UseVoiceRecorderOptions, UseVoiceRecorderReturn, UseChatInputOptions, UseChatInputReturn, UseStreamingTextOptions, UseStreamingTextReturn, } from './hooks';
|
|
28
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,YAAY,EAEV,QAAQ,EACR,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAElB,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EAEjB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,0BAA0B,EAE1B,gBAAgB,EAEhB,gBAAgB,EAChB,qBAAqB,EAErB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=t=>{if(!t||t===0)return"0 B";const o=1024,r=["B","KB","MB","GB"],a=Math.floor(Math.log(t)/Math.log(o));return`${parseFloat((t/Math.pow(o,a)).toFixed(1))} ${r[a]}`},i=t=>{const o=Math.floor(t/60),r=Math.floor(t%60);return`${o}:${r.toString().padStart(2,"0")}`};exports.formatFileSize=e;exports.formatTime=i;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Chat Component Shared Utilities
|
|
3
|
-
*
|
|
4
|
-
* Centralized helper functions used across multiple Chat sub-components.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Format a byte count into a human-readable file size string.
|
|
8
|
-
* Used by ChatInput, ChatFileUpload, and ChatAttachment.
|
|
9
|
-
*/
|
|
10
|
-
export declare const formatFileSize: (bytes?: number) => string;
|
|
11
|
-
/**
|
|
12
|
-
* Format seconds into mm:ss display string.
|
|
13
|
-
* Used by ChatAudioPlayer and ChatVoiceRecorder.
|
|
14
|
-
*/
|
|
15
|
-
export declare const formatTime: (seconds: number) => string;
|
|
16
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,KAAG,MAM/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,SAAS,MAAM,KAAG,MAI5C,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const n = (t) => {
|
|
2
|
-
if (!t || t === 0) return "0 B";
|
|
3
|
-
const o = 1024, r = ["B", "KB", "MB", "GB"], a = Math.floor(Math.log(t) / Math.log(o));
|
|
4
|
-
return `${parseFloat((t / Math.pow(o, a)).toFixed(1))} ${r[a]}`;
|
|
5
|
-
}, i = (t) => {
|
|
6
|
-
const o = Math.floor(t / 60), r = Math.floor(t % 60);
|
|
7
|
-
return `${o}:${r.toString().padStart(2, "0")}`;
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
n as formatFileSize,
|
|
11
|
-
i as formatTime
|
|
12
|
-
};
|
package/dist/rich.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components/Chat/Chat.cjs");exports.Chat=t.Chat;
|
package/dist/rich.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @orion-ds/react/rich
|
|
3
|
-
*
|
|
4
|
-
* Heavy component entry point for rich text/content components.
|
|
5
|
-
* This module requires the following peer dependencies:
|
|
6
|
-
* - react-markdown
|
|
7
|
-
* - react-syntax-highlighter
|
|
8
|
-
* - remark-gfm
|
|
9
|
-
*
|
|
10
|
-
* Usage:
|
|
11
|
-
* npm install react-markdown react-syntax-highlighter remark-gfm
|
|
12
|
-
* import { Chat } from '@orion-ds/react/rich';
|
|
13
|
-
*/
|
|
14
|
-
export { Chat } from './components/Chat';
|
|
15
|
-
export type { ChatProps, ChatInputProps, ChatMessagesProps, ChatMessageProps, ChatMessage, } from './components/Chat';
|
|
16
|
-
//# sourceMappingURL=rich.d.ts.map
|
package/dist/rich.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rich.d.ts","sourceRoot":"","sources":["../src/rich.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,YAAY,EACV,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,GACZ,MAAM,mBAAmB,CAAC"}
|
package/dist/rich.mjs
DELETED