@jrapps/my_tickets_chat_ui 0.1.2 → 0.2.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.
Files changed (78) hide show
  1. package/dist/cjs/components/SiteChatComponentNew/index.js +1283 -0
  2. package/dist/cjs/components/SiteChatComponentNew/index.js.map +7 -0
  3. package/dist/cjs/index.js +1249 -1
  4. package/dist/cjs/index.js.map +4 -4
  5. package/dist/esm/chunks/chunk-BDKQK6NT.js +1251 -0
  6. package/dist/esm/chunks/chunk-BDKQK6NT.js.map +7 -0
  7. package/dist/esm/components/SiteChatComponentNew/index.js +9 -0
  8. package/dist/esm/components/SiteChatComponentNew/index.js.map +7 -0
  9. package/dist/esm/index.js +7 -1
  10. package/dist/types/components/SiteChatComponentNew/Footer/Footer.d.ts +6 -0
  11. package/dist/types/components/SiteChatComponentNew/Footer/Footer.d.ts.map +1 -0
  12. package/dist/types/components/SiteChatComponentNew/Footer/index.d.ts +2 -0
  13. package/dist/types/components/SiteChatComponentNew/Footer/index.d.ts.map +1 -0
  14. package/dist/types/components/SiteChatComponentNew/Header/Header.d.ts +6 -0
  15. package/dist/types/components/SiteChatComponentNew/Header/Header.d.ts.map +1 -0
  16. package/dist/types/components/SiteChatComponentNew/Header/index.d.ts +2 -0
  17. package/dist/types/components/SiteChatComponentNew/Header/index.d.ts.map +1 -0
  18. package/dist/types/components/SiteChatComponentNew/Messages/AgentMessage.d.ts +9 -0
  19. package/dist/types/components/SiteChatComponentNew/Messages/AgentMessage.d.ts.map +1 -0
  20. package/dist/types/components/SiteChatComponentNew/Messages/AttachmentMessage.d.ts +9 -0
  21. package/dist/types/components/SiteChatComponentNew/Messages/AttachmentMessage.d.ts.map +1 -0
  22. package/dist/types/components/SiteChatComponentNew/Messages/MessageList.d.ts +9 -0
  23. package/dist/types/components/SiteChatComponentNew/Messages/MessageList.d.ts.map +1 -0
  24. package/dist/types/components/SiteChatComponentNew/Messages/MessageRenderer.d.ts +8 -0
  25. package/dist/types/components/SiteChatComponentNew/Messages/MessageRenderer.d.ts.map +1 -0
  26. package/dist/types/components/SiteChatComponentNew/Messages/SystemMessage.d.ts +9 -0
  27. package/dist/types/components/SiteChatComponentNew/Messages/SystemMessage.d.ts.map +1 -0
  28. package/dist/types/components/SiteChatComponentNew/Messages/TypingIndicator.d.ts +5 -0
  29. package/dist/types/components/SiteChatComponentNew/Messages/TypingIndicator.d.ts.map +1 -0
  30. package/dist/types/components/SiteChatComponentNew/Messages/UserMessage.d.ts +9 -0
  31. package/dist/types/components/SiteChatComponentNew/Messages/UserMessage.d.ts.map +1 -0
  32. package/dist/types/components/SiteChatComponentNew/Messages/index.d.ts +8 -0
  33. package/dist/types/components/SiteChatComponentNew/Messages/index.d.ts.map +1 -0
  34. package/dist/types/components/SiteChatComponentNew/OfflineForm/OfflineForm.d.ts +10 -0
  35. package/dist/types/components/SiteChatComponentNew/OfflineForm/OfflineForm.d.ts.map +1 -0
  36. package/dist/types/components/SiteChatComponentNew/OfflineForm/index.d.ts +2 -0
  37. package/dist/types/components/SiteChatComponentNew/OfflineForm/index.d.ts.map +1 -0
  38. package/dist/types/components/SiteChatComponentNew/Shared/Avatar.d.ts +10 -0
  39. package/dist/types/components/SiteChatComponentNew/Shared/Avatar.d.ts.map +1 -0
  40. package/dist/types/components/SiteChatComponentNew/Shared/Button.d.ts +14 -0
  41. package/dist/types/components/SiteChatComponentNew/Shared/Button.d.ts.map +1 -0
  42. package/dist/types/components/SiteChatComponentNew/Shared/index.d.ts +3 -0
  43. package/dist/types/components/SiteChatComponentNew/Shared/index.d.ts.map +1 -0
  44. package/dist/types/components/SiteChatComponentNew/SiteChatComponentNew.d.ts +5 -0
  45. package/dist/types/components/SiteChatComponentNew/SiteChatComponentNew.d.ts.map +1 -0
  46. package/dist/types/components/SiteChatComponentNew/SiteChatComponentNew.types.d.ts +118 -0
  47. package/dist/types/components/SiteChatComponentNew/SiteChatComponentNew.types.d.ts.map +1 -0
  48. package/dist/types/components/SiteChatComponentNew/States/ChatEndedState.d.ts +5 -0
  49. package/dist/types/components/SiteChatComponentNew/States/ChatEndedState.d.ts.map +1 -0
  50. package/dist/types/components/SiteChatComponentNew/States/LoadingState.d.ts +5 -0
  51. package/dist/types/components/SiteChatComponentNew/States/LoadingState.d.ts.map +1 -0
  52. package/dist/types/components/SiteChatComponentNew/States/OfflineState.d.ts +10 -0
  53. package/dist/types/components/SiteChatComponentNew/States/OfflineState.d.ts.map +1 -0
  54. package/dist/types/components/SiteChatComponentNew/States/StartChatState.d.ts +11 -0
  55. package/dist/types/components/SiteChatComponentNew/States/StartChatState.d.ts.map +1 -0
  56. package/dist/types/components/SiteChatComponentNew/States/index.d.ts +5 -0
  57. package/dist/types/components/SiteChatComponentNew/States/index.d.ts.map +1 -0
  58. package/dist/types/components/SiteChatComponentNew/hooks/index.d.ts +3 -0
  59. package/dist/types/components/SiteChatComponentNew/hooks/index.d.ts.map +1 -0
  60. package/dist/types/components/SiteChatComponentNew/hooks/useAutoScroll.d.ts +15 -0
  61. package/dist/types/components/SiteChatComponentNew/hooks/useAutoScroll.d.ts.map +1 -0
  62. package/dist/types/components/SiteChatComponentNew/hooks/useOfflineForm.d.ts +12 -0
  63. package/dist/types/components/SiteChatComponentNew/hooks/useOfflineForm.d.ts.map +1 -0
  64. package/dist/types/components/SiteChatComponentNew/index.d.ts +4 -0
  65. package/dist/types/components/SiteChatComponentNew/index.d.ts.map +1 -0
  66. package/dist/types/components/SiteChatComponentNew/useSiteChatComponentNew.d.ts +3 -0
  67. package/dist/types/components/SiteChatComponentNew/useSiteChatComponentNew.d.ts.map +1 -0
  68. package/dist/types/components/SiteChatComponentNew/utils/format.d.ts +9 -0
  69. package/dist/types/components/SiteChatComponentNew/utils/format.d.ts.map +1 -0
  70. package/dist/types/components/SiteChatComponentNew/utils/index.d.ts +4 -0
  71. package/dist/types/components/SiteChatComponentNew/utils/index.d.ts.map +1 -0
  72. package/dist/types/components/SiteChatComponentNew/utils/systemMessages.d.ts +4 -0
  73. package/dist/types/components/SiteChatComponentNew/utils/systemMessages.d.ts.map +1 -0
  74. package/dist/types/components/SiteChatComponentNew/utils/theme.d.ts +8 -0
  75. package/dist/types/components/SiteChatComponentNew/utils/theme.d.ts.map +1 -0
  76. package/dist/types/components/index.d.ts +1 -0
  77. package/dist/types/components/index.d.ts.map +1 -1
  78. package/package.json +1 -1
@@ -0,0 +1,118 @@
1
+ export interface MessageProps {
2
+ _id?: string;
3
+ resourceId?: string;
4
+ ticketId?: string;
5
+ senderType?: 'user' | 'system' | 'agent';
6
+ senderId?: string;
7
+ message?: string;
8
+ messageType?: 'TEXT' | 'ATTACHMENT';
9
+ attachment?: {
10
+ id: string;
11
+ name: string;
12
+ url: string;
13
+ };
14
+ item?: {
15
+ id: string;
16
+ name: string;
17
+ url: string;
18
+ };
19
+ senderName?: string;
20
+ timestamp?: number;
21
+ teamId?: string;
22
+ }
23
+ export type ChatState = 'LOADING' | 'START' | 'ONLINE' | 'OFFLINE' | 'ENDED';
24
+ export type SystemEventType = 'AGENT_JOINED' | 'AGENT_LEFT' | 'USER_JOINED' | 'USER_LEFT' | 'CHAT_ENDED' | 'CHAT_REOPENED' | 'CHAT_TRANSFERRED' | 'WAITING_FOR_AGENT';
25
+ export interface ChatTheme {
26
+ /** Primary accent colour (header, user bubble, buttons). */
27
+ primary: string;
28
+ /** Main panel background. */
29
+ background: string;
30
+ /** Secondary surface colour (e.g. offline state background). */
31
+ surface: string;
32
+ /** Divider / border colour. */
33
+ border: string;
34
+ /** User message bubble background. */
35
+ userBubble: string;
36
+ /** User message bubble text colour. */
37
+ userText: string;
38
+ /** Agent message bubble background. */
39
+ agentBubble: string;
40
+ /** Agent message bubble text colour. */
41
+ agentText: string;
42
+ /** System / timestamp text colour. */
43
+ systemText: string;
44
+ /** Input field background colour. */
45
+ inputBackground: string;
46
+ /** Input field border colour. */
47
+ inputBorder: string;
48
+ /** Border-radius for buttons (px). */
49
+ buttonRadius: number;
50
+ /** Border-radius for the widget panel and bubbles (px). */
51
+ borderRadius: number;
52
+ }
53
+ export interface OfflineFieldOption {
54
+ label: string;
55
+ value: string;
56
+ }
57
+ export interface OfflineField {
58
+ id: string;
59
+ type: 'text' | 'email' | 'phone' | 'textarea' | 'select' | 'checkbox';
60
+ label: string;
61
+ placeholder?: string;
62
+ required?: boolean;
63
+ options?: OfflineFieldOption[];
64
+ }
65
+ export interface OfflineFormSchema {
66
+ title: string;
67
+ submitButtonText: string;
68
+ fields: OfflineField[];
69
+ }
70
+ export interface HeaderProps {
71
+ image?: string;
72
+ title: string;
73
+ subtitle?: string;
74
+ onClose(): void;
75
+ }
76
+ export interface FooterProps {
77
+ onSend(message: string): void;
78
+ onAttachment(file: File): void;
79
+ disabled?: boolean;
80
+ }
81
+ export interface ChatWidgetProps {
82
+ /** Widget header title. */
83
+ title: string;
84
+ /** Width of the chat panel (e.g. '380px' or 380). Defaults to CSS value. */
85
+ width?: number | string;
86
+ /** Height of the chat panel (e.g. '600px' or 600). Defaults to CSS value. */
87
+ height?: number | string;
88
+ /** Widget header subtitle. */
89
+ subtitle?: string;
90
+ /** Avatar image shown in the header and Start Chat screen. */
91
+ image?: string;
92
+ /** Partial theme overrides — all values are optional. */
93
+ theme?: Partial<ChatTheme>;
94
+ /** Message history to render in the conversation. */
95
+ messages: MessageProps[];
96
+ /** When provided the widget shows the offline form instead of the chat. */
97
+ offlineForm?: OfflineFormSchema;
98
+ /** Open the panel on first render. Defaults to false. */
99
+ defaultOpen?: boolean;
100
+ /** Show the loading/connecting spinner instead of the message list. */
101
+ loading?: boolean;
102
+ /** Show the "Chat Ended" banner below the message list. */
103
+ chatEnded?: boolean;
104
+ /** Called with the message string when the user hits Send or Enter. */
105
+ onSend(message: string): void;
106
+ /** Called with the selected File when the user picks an attachment. */
107
+ onAttachment(file: File): void;
108
+ /** Called with form values when the offline form is submitted. */
109
+ onOfflineSubmit(values: Record<string, unknown>): void;
110
+ /** Called after the panel is dismissed via the header close button. */
111
+ onClose?(): void;
112
+ }
113
+ export interface UseChatWidgetReturn {
114
+ open: boolean;
115
+ openWidget: () => void;
116
+ closeWidget: () => void;
117
+ }
118
+ //# sourceMappingURL=SiteChatComponentNew.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SiteChatComponentNew.types.d.ts","sourceRoot":"","sources":["../../../../src/components/SiteChatComponentNew/SiteChatComponentNew.types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IACpC,UAAU,CAAC,EAAE;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,IAAI,CAAC,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,OAAO,GACP,QAAQ,GACR,SAAS,GACT,OAAO,CAAC;AAIZ,MAAM,MAAM,eAAe,GACvB,cAAc,GACd,YAAY,GACZ,aAAa,GACb,WAAW,GACX,YAAY,GACZ,eAAe,GACf,kBAAkB,GAClB,mBAAmB,CAAC;AAIxB,MAAM,WAAW,SAAS;IACxB,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC;IAChB,6BAA6B;IAC7B,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react';
2
+ import './ChatEndedState.css';
3
+ declare const ChatEndedState: React.FC;
4
+ export default ChatEndedState;
5
+ //# sourceMappingURL=ChatEndedState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatEndedState.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteChatComponentNew/States/ChatEndedState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,sBAAsB,CAAC;AAE9B,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EA4B3B,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './LoadingState.css';
3
+ declare const LoadingState: React.FC;
4
+ export default LoadingState;
5
+ //# sourceMappingURL=LoadingState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingState.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteChatComponentNew/States/LoadingState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,oBAAoB,CAAC;AAE5B,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAgBzB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { OfflineFormSchema } from '../SiteChatComponentNew.types';
3
+ import './OfflineState.css';
4
+ interface OfflineStateProps {
5
+ form?: OfflineFormSchema;
6
+ onSubmit: (values: Record<string, unknown>) => void;
7
+ }
8
+ declare const OfflineState: React.FC<OfflineStateProps>;
9
+ export default OfflineState;
10
+ //# sourceMappingURL=OfflineState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OfflineState.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteChatComponentNew/States/OfflineState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,oBAAoB,CAAC;AAE5B,UAAU,iBAAiB;IACzB,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACrD;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAoC7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import './StartChatState.css';
3
+ interface StartChatStateProps {
4
+ image?: string;
5
+ title: string;
6
+ description?: string;
7
+ onStart: () => void;
8
+ }
9
+ declare const StartChatState: React.FC<StartChatStateProps>;
10
+ export default StartChatState;
11
+ //# sourceMappingURL=StartChatState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StartChatState.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteChatComponentNew/States/StartChatState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,sBAAsB,CAAC;AAE9B,UAAU,mBAAmB;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA4BjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { default as LoadingState } from './LoadingState';
2
+ export { default as StartChatState } from './StartChatState';
3
+ export { default as OfflineState } from './OfflineState';
4
+ export { default as ChatEndedState } from './ChatEndedState';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteChatComponentNew/States/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { useAutoScroll, useAutoScrollWithControl } from './useAutoScroll';
2
+ export { useOfflineForm } from './useOfflineForm';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteChatComponentNew/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Attaches a ref to a scrollable container. Automatically scrolls to the
3
+ * bottom when new content is added, unless the user has manually scrolled up.
4
+ */
5
+ export declare function useAutoScroll<T extends HTMLElement>(dependency: unknown): React.MutableRefObject<T | null>;
6
+ /**
7
+ * Expose a way for the consumer to force-scroll to bottom (e.g. when
8
+ * the user clicks a "scroll to bottom" button).
9
+ */
10
+ export declare function useAutoScrollWithControl<T extends HTMLElement>(dependency: unknown): {
11
+ ref: React.MutableRefObject<T | null>;
12
+ scrollToBottom: () => void;
13
+ isScrolledUp: boolean;
14
+ };
15
+ //# sourceMappingURL=useAutoScroll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAutoScroll.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteChatComponentNew/hooks/useAutoScroll.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,WAAW,EACjD,UAAU,EAAE,OAAO,GAClB,KAAK,CAAC,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAC,CA0BlC;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,WAAW,EAC5D,UAAU,EAAE,OAAO,GAClB;IACD,GAAG,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACtC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;CACvB,CAmCA"}
@@ -0,0 +1,12 @@
1
+ import { OfflineFormSchema } from '../SiteChatComponentNew.types';
2
+ type FieldValues = Record<string, unknown>;
3
+ type FieldErrors = Record<string, string>;
4
+ export declare function useOfflineForm(schema: OfflineFormSchema): {
5
+ values: FieldValues;
6
+ errors: FieldErrors;
7
+ setValue: (id: string, value: unknown) => void;
8
+ handleSubmit: (onSubmit: (values: FieldValues) => void) => void;
9
+ reset: () => void;
10
+ };
11
+ export {};
12
+ //# sourceMappingURL=useOfflineForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOfflineForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteChatComponentNew/hooks/useOfflineForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAEhF,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC3C,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAgC1C,wBAAgB,cAAc,CAAC,MAAM,EAAE,iBAAiB;;;mBAW/C,MAAM,SAAS,OAAO;6BA6BhB,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI;;EAiB3C"}
@@ -0,0 +1,4 @@
1
+ export { SiteChatComponentNew } from './SiteChatComponentNew';
2
+ export type { ChatWidgetProps, UseChatWidgetReturn } from './SiteChatComponentNew.types';
3
+ export { useSiteChatComponentNew } from './useSiteChatComponentNew';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SiteChatComponentNew/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { UseChatWidgetReturn } from './SiteChatComponentNew.types';
2
+ export declare function useSiteChatComponentNew(defaultOpen?: boolean): UseChatWidgetReturn;
3
+ //# sourceMappingURL=useSiteChatComponentNew.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSiteChatComponentNew.d.ts","sourceRoot":"","sources":["../../../../src/components/SiteChatComponentNew/useSiteChatComponentNew.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,wBAAgB,uBAAuB,CAAC,WAAW,UAAQ,GAAG,mBAAmB,CAOhF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Format a Unix timestamp (ms) into a human-readable time string, e.g. "2:34 PM".
3
+ */
4
+ export declare function formatTime(timestamp: number): string;
5
+ /**
6
+ * Generate a simple unique id.
7
+ */
8
+ export declare function generateId(): string;
9
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteChatComponentNew/utils/format.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAKpD;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAEnC"}
@@ -0,0 +1,4 @@
1
+ export { buildThemeVars, defaultTheme } from './theme';
2
+ export { getSystemLabel, isSystemEventType } from './systemMessages';
3
+ export { formatTime, generateId } from './format';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteChatComponentNew/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { SystemEventType } from '../SiteChatComponentNew.types';
2
+ export declare function getSystemLabel(event: string): string;
3
+ export declare function isSystemEventType(value: string): value is SystemEventType;
4
+ //# sourceMappingURL=systemMessages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"systemMessages.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteChatComponentNew/utils/systemMessages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAahE,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,eAAe,CAEzE"}
@@ -0,0 +1,8 @@
1
+ import { ChatTheme } from '../SiteChatComponentNew.types';
2
+ export declare const defaultTheme: ChatTheme;
3
+ /**
4
+ * Merges a partial user theme with the defaults and returns a style object
5
+ * containing CSS custom properties. Layout/font values are always fixed.
6
+ */
7
+ export declare function buildThemeVars(partial?: Partial<ChatTheme>): Record<string, string>;
8
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../src/components/SiteChatComponentNew/utils/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAc1D,eAAO,MAAM,YAAY,EAAE,SAc1B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC3B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA2BxB"}
@@ -1,2 +1,3 @@
1
1
  export * from './SiteChatComponent';
2
+ export * from './SiteChatComponentNew';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jrapps/my_tickets_chat_ui",
3
- "version": "0.1.2",
3
+ "version": "0.2.1",
4
4
  "description": "Chat UI for My Tickets Application",
5
5
  "license": "UNLICENSED",
6
6
  "author": "JRApplications",