@asgard-js/react 0.0.3 → 0.0.4
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/dist/index.js +532 -349
- package/dist/style.css +1 -1
- package/package.json +5 -1
- package/dist/components/chatbot/chatbot-body.d.ts +0 -4
- package/dist/components/chatbot/chatbot-body.d.ts.map +0 -1
- package/dist/components/chatbot/chatbot-footer.d.ts +0 -4
- package/dist/components/chatbot/chatbot-footer.d.ts.map +0 -1
- package/dist/components/chatbot/chatbot-header.d.ts +0 -8
- package/dist/components/chatbot/chatbot-header.d.ts.map +0 -1
- package/dist/components/chatbot/chatbot.d.ts +0 -17
- package/dist/components/chatbot/chatbot.d.ts.map +0 -1
- package/dist/components/chatbot/profile-icon.d.ts +0 -8
- package/dist/components/chatbot/profile-icon.d.ts.map +0 -1
- package/dist/components/conversation-message-renderer/conversation-message-renderer.d.ts +0 -9
- package/dist/components/conversation-message-renderer/conversation-message-renderer.d.ts.map +0 -1
- package/dist/components/conversation-message-renderer/index.d.ts +0 -2
- package/dist/components/conversation-message-renderer/index.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/templates/avatar/avatar.d.ts +0 -4
- package/dist/components/templates/avatar/avatar.d.ts.map +0 -1
- package/dist/components/templates/avatar/index.d.ts +0 -2
- package/dist/components/templates/avatar/index.d.ts.map +0 -1
- package/dist/components/templates/bot-typing-box/bot-typing-box.d.ts +0 -9
- package/dist/components/templates/bot-typing-box/bot-typing-box.d.ts.map +0 -1
- package/dist/components/templates/bot-typing-box/index.d.ts +0 -2
- package/dist/components/templates/bot-typing-box/index.d.ts.map +0 -1
- package/dist/components/templates/bot-typing-box/resize-observer-box.d.ts +0 -9
- package/dist/components/templates/bot-typing-box/resize-observer-box.d.ts.map +0 -1
- package/dist/components/templates/button-template/button-template.d.ts +0 -9
- package/dist/components/templates/button-template/button-template.d.ts.map +0 -1
- package/dist/components/templates/button-template/card.d.ts +0 -9
- package/dist/components/templates/button-template/card.d.ts.map +0 -1
- package/dist/components/templates/button-template/index.d.ts +0 -2
- package/dist/components/templates/button-template/index.d.ts.map +0 -1
- package/dist/components/templates/carousel-template/carousel-template.d.ts +0 -9
- package/dist/components/templates/carousel-template/carousel-template.d.ts.map +0 -1
- package/dist/components/templates/carousel-template/index.d.ts +0 -2
- package/dist/components/templates/carousel-template/index.d.ts.map +0 -1
- package/dist/components/templates/hint-template/hint-template.d.ts +0 -9
- package/dist/components/templates/hint-template/hint-template.d.ts.map +0 -1
- package/dist/components/templates/hint-template/index.d.ts +0 -2
- package/dist/components/templates/hint-template/index.d.ts.map +0 -1
- package/dist/components/templates/index.d.ts +0 -8
- package/dist/components/templates/index.d.ts.map +0 -1
- package/dist/components/templates/quick-replies/index.d.ts +0 -2
- package/dist/components/templates/quick-replies/index.d.ts.map +0 -1
- package/dist/components/templates/quick-replies/quick-replies.d.ts +0 -10
- package/dist/components/templates/quick-replies/quick-replies.d.ts.map +0 -1
- package/dist/components/templates/template-box/index.d.ts +0 -3
- package/dist/components/templates/template-box/index.d.ts.map +0 -1
- package/dist/components/templates/template-box/template-box-content.d.ts +0 -12
- package/dist/components/templates/template-box/template-box-content.d.ts.map +0 -1
- package/dist/components/templates/template-box/template-box.d.ts +0 -14
- package/dist/components/templates/template-box/template-box.d.ts.map +0 -1
- package/dist/components/templates/text-template/index.d.ts +0 -2
- package/dist/components/templates/text-template/index.d.ts.map +0 -1
- package/dist/components/templates/text-template/text-template.d.ts +0 -9
- package/dist/components/templates/text-template/text-template.d.ts.map +0 -1
- package/dist/components/templates/time/index.d.ts +0 -2
- package/dist/components/templates/time/index.d.ts.map +0 -1
- package/dist/components/templates/time/time.d.ts +0 -9
- package/dist/components/templates/time/time.d.ts.map +0 -1
- package/dist/context/asgard-service-context.d.ts +0 -30
- package/dist/context/asgard-service-context.d.ts.map +0 -1
- package/dist/hooks/index.d.ts +0 -4
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/use-asgard-service-client.d.ts +0 -8
- package/dist/hooks/use-asgard-service-client.d.ts.map +0 -1
- package/dist/hooks/use-channel.d.ts +0 -20
- package/dist/hooks/use-channel.d.ts.map +0 -1
- package/dist/hooks/use-debounce.d.ts +0 -2
- package/dist/hooks/use-debounce.d.ts.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/utils/format-time.d.ts +0 -2
- package/dist/utils/format-time.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.d.ts.map +0 -1
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._chatbot_header_f3p4c_1 ._chatbot_header__content_f3p4c_1{margin:0 auto;max-width:1200px;padding:16px;display:flex;justify-content:space-between}._chatbot_header__title_f3p4c_9{display:flex;flex-direction:row;align-items:center;gap:8px}._chatbot_header__title_f3p4c_9>h4{margin:0;color:#fff}._chatbot_header__extra_f3p4c_20{display:flex;flex-direction:row;align-items:center;gap:12px}._chatbot_header__extra_f3p4c_20>div{width:24px;height:24px;display:flex;justify-content:center;align-items:center}._chatbot_header__extra_f3p4c_20>div>svg{width:15px;height:15px;cursor:pointer}._chatbot_header__extra_f3p4c_20>div>svg:hover{opacity:.5}._chatbot_body_1f0gq_1{border-top:1px solid #434343;border-bottom:1px solid #434343;overflow-x:hidden;overflow-y:scroll}._chatbot_body_1f0gq_1 ._chatbot_body__content_1f0gq_7{margin:0 auto;display:flex;flex-direction:column;padding:16px;gap:16px;max-width:1200px}._template_box_1ozig_1{width:100%;display:flex;gap:8px}._template_box--bot_1ozig_7._template_box--horizontal_1ozig_7{flex-direction:row}._template_box--bot_1ozig_7._template_box--vertical_1ozig_10{flex-direction:column}._template_box--user_1ozig_14{flex-direction:row-reverse}._template_box_content_12ojl_1{display:flex;flex-direction:column;gap:8px}._content_12ojl_7{display:flex;flex-direction:row;gap:8px}._quick_replies_box_zoq7y_1{display:flex;flex-wrap:wrap;gap:8px}._quick_reply_zoq7y_7{font:inherit;font-size:13px;padding:4px 8px;border-radius:8px;border:1px solid #434343;background:#58585833;color:#fff;cursor:pointer}._time_rgg92_1{display:flex;align-items:flex-end;font-size:12px;color:#8c8c8c}._bot_avatar_xrs9x_1{flex:0 0 auto;width:24px;height:24px;border-radius:50%}._text_1djgp_1{padding:8px 12px;border-radius:8px;color:#fff}._text--bot_1djgp_7{max-width:70%;background:#585858;border-top-left-radius:0}._typing-indicator_1djgp_13{display:inline-flex;align-items:flex-end;justify-content:center}._typing-indicator_1djgp_13 ._dot_1djgp_18{width:2px;height:2px;margin:0 2px;background-color:#fff;border-radius:50%;animation:_blink_1djgp_1 1.4s infinite ease-in-out both}._typing-indicator_1djgp_13 ._dot_1djgp_18:nth-child(1){animation-delay:0s}._typing-indicator_1djgp_13 ._dot_1djgp_18:nth-child(2){animation-delay:.2s}._typing-indicator_1djgp_13 ._dot_1djgp_18:nth-child(3){animation-delay:.4s}@keyframes _blink_1djgp_1{0%,80%,to{opacity:.2;transform:translateY(0)}40%{opacity:1;transform:translateY(-5px)}}._card_root_1ygom_1{width:255px;height:368px;max-height:380px;border-radius:8px;background:#333;overflow:hidden}._card_content_1ygom_10{display:flex;flex-direction:column;gap:8px;padding:12px}._card_title_1ygom_17{color:#fff;margin:0;font-size:15px}._card_description_1ygom_23{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;color:#8c8c8c;font-size:13px;font-weight:400;line-height:20px;text-underline-position:from-font;text-decoration-skip-ink:none;text-overflow:ellipsis}._card_actions_1ygom_37{display:flex;flex-direction:column;gap:8px}._card_actions_1ygom_37>button{width:100%;height:32px;line-height:32px;text-align:center;border:none;border-radius:4px;background:#4767eb;color:#fff;font-size:15px;cursor:pointer}._text_sbjtw_1{padding:8px 12px;border-radius:8px;color:#fff}._text--user_sbjtw_7{max-width:75%;background:#4767eb;border-top-right-radius:0}._text--bot_sbjtw_13{max-width:70%;background:#585858;border-top-left-radius:0}._content_sbjtw_19{display:flex;flex-direction:column;gap:8px}._carousel_root_sv1hc_1{width:100%;display:flex;flex-wrap:nowrap;overflow-x:scroll;gap:8px}._carousel_root_sv1hc_1>div{flex:0 0 auto}._carousel_time_sv1hc_12{justify-content:flex-end}._hint_root_g119q_1{margin:0 auto;display:flex;flex-direction:column;align-items:center;padding:4px 12px;gap:4px;border-radius:2px;background:#58585833;font-size:13px;color:#fff}._time_g119q_14{font-size:12px;color:#8c8c8c}._chatbot_footer_aa5it_1 ._chatbot_footer__content_aa5it_1{display:grid;gap:8px;align-items:flex-end;grid-template-columns:auto 24px;margin:0 auto;max-width:1200px;padding:16px;gap:16px}._chatbot_textarea_aa5it_12{font:inherit;font-size:16px;height:20px;max-height:240px;padding:8px 8px 8px 12px;background:#1f1f1f;border:1px solid rgb(67,67,67);border-radius:2px;color:#8c8c8c;resize:none;overflow:hidden}._chatbot_submit_button_aa5it_27{font:inherit;width:24px;height:100%;max-height:38px;display:flex;justify-content:center;align-items:center;font-size:16px;border:none;background:transparent;border-radius:50%;color:#fff;cursor:pointer}._chatbot_submit_button_aa5it_27>svg{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;width:auto;min-width:16px;height:60%;max-height:38px;min-height:16px}._chatbot_submit_button_aa5it_27._chatbot_submit_button__disabled_aa5it_52>svg>path{fill:#8c8c8c}._chatbot_root_18brc_1{width:100%;height:100%;min-width:375px;min-height:400px;background-color:#141414;border-radius:8px;font-size:15px;display:grid;grid-template-rows:max-content auto max-content}._chatbot_root__fullScreen_18brc_13{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999;border-radius:0}._loading_16ajc_1{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#ffffff80;display:flex;justify-content:center;align-items:center;z-index:1000}._spinner_16ajc_14{width:50px;height:50px}._spinner_svg_16ajc_19{width:100%;height:100%;animation:_rotate_16ajc_1 .5s linear infinite}._spinner_circle_16ajc_25{fill:none;stroke:#000;stroke-width:4;stroke-linecap:round;animation:_dash_16ajc_1 .5s linear infinite}@keyframes _rotate_16ajc_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _dash_16ajc_1{0%{stroke-dasharray:94.25 125.66}to{stroke-dasharray:125.66 125.66}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asgard-js/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -27,5 +27,9 @@
|
|
|
27
27
|
"main": "./dist/index.js",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"clsx": "^2.1.1"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/dom-speech-recognition": "^0.0.4",
|
|
33
|
+
"vite-plugin-svgr": "^4.3.0"
|
|
30
34
|
}
|
|
31
35
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chatbot-body.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot-body.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAM7C,wBAAgB,WAAW,IAAI,SAAS,CA0BvC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chatbot-footer.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot-footer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EAGV,MAAM,OAAO,CAAC;AAIf,wBAAgB,aAAa,IAAI,SAAS,CAiDzC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chatbot-header.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAgBlE"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ClientConfig, ConversationMessage } from '@asgard-js/core';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
interface ChatbotProps {
|
|
5
|
-
title: string;
|
|
6
|
-
config: ClientConfig;
|
|
7
|
-
customChannelId: string;
|
|
8
|
-
initMessages?: ConversationMessage[];
|
|
9
|
-
fullScreen?: boolean;
|
|
10
|
-
avatar?: string;
|
|
11
|
-
options?: {
|
|
12
|
-
showDebugMessage?: boolean;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export declare function Chatbot(props: ChatbotProps): ReactNode;
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=chatbot.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chatbot.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAQpE,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC1C;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CA4BtD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile-icon.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/profile-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,CA+C9D"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ConversationMessage } from '@asgard-js/core';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
interface ConversationMessageRendererProps {
|
|
5
|
-
conversationMessage: ConversationMessage;
|
|
6
|
-
}
|
|
7
|
-
export declare function ConversationMessageRenderer(props: ConversationMessageRendererProps): ReactNode;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=conversation-message-renderer.d.ts.map
|
package/dist/components/conversation-message-renderer/conversation-message-renderer.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-message-renderer.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-message-renderer/conversation-message-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAuB,MAAM,iBAAiB,CAAC;AAQ3E,UAAU,gCAAgC;IACxC,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,gCAAgC,GACtC,SAAS,CAqBX"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-message-renderer/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,wBAAgB,MAAM,IAAI,SAAS,CA0BlC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/avatar/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ConversationBotMessage } from '@asgard-js/core';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
interface BotTypingBoxProps {
|
|
5
|
-
typingMessage: ConversationBotMessage;
|
|
6
|
-
}
|
|
7
|
-
export declare function BotTypingBox(props: BotTypingBoxProps): ReactNode;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=bot-typing-box.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bot-typing-box.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/bot-typing-box/bot-typing-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAO/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,UAAU,iBAAiB;IACzB,aAAa,EAAE,sBAAsB,CAAC;CACvC;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CA+BhE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/bot-typing-box/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
interface ResizeObserverBoxProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
onResize: (width: number, height: number) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare function ResizeObserverBox(props: ResizeObserverBoxProps): ReactNode;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=resize-observer-box.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resize-observer-box.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/bot-typing-box/resize-observer-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AAErD,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,SAAS,CAsB1E"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { ConversationBotMessage } from '@asgard-js/core';
|
|
3
|
-
|
|
4
|
-
interface ButtonTemplateProps {
|
|
5
|
-
conversationMessage: ConversationBotMessage;
|
|
6
|
-
}
|
|
7
|
-
export declare function ButtonTemplate(props: ButtonTemplateProps): ReactNode;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=button-template.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/button-template/button-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,UAAU,mBAAmB;IAC3B,mBAAmB,EAAE,sBAAsB,CAAC;CAC7C;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,SAAS,CAiBpE"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ButtonMessageTemplate, CarouselMessageTemplate } from '@asgard-js/core';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
interface CardProps {
|
|
5
|
-
template: ButtonMessageTemplate | CarouselMessageTemplate['columns'][number];
|
|
6
|
-
}
|
|
7
|
-
export declare function Card(props: CardProps): ReactNode;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=card.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/button-template/card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,SAAS,EAAwB,MAAM,OAAO,CAAC;AAE3E,OAAO,EAEL,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,iBAAiB,CAAC;AAGzB,UAAU,SAAS;IACjB,QAAQ,EAAE,qBAAqB,GAAG,uBAAuB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;CAC9E;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAqEhD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/button-template/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ConversationBotMessage } from '@asgard-js/core';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
interface CarouselTemplateProps {
|
|
5
|
-
conversationMessage: ConversationBotMessage;
|
|
6
|
-
}
|
|
7
|
-
export declare function CarouselTemplate(props: CarouselTemplateProps): ReactNode;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=carousel-template.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"carousel-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/carousel-template/carousel-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAEL,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AAGzB,UAAU,qBAAqB;IAC7B,mBAAmB,EAAE,sBAAsB,CAAC;CAC7C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,SAAS,CAiBxE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/carousel-template/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ConversationMessage } from '@asgard-js/core';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
interface HintTemplateProps {
|
|
5
|
-
conversationMessage: ConversationMessage;
|
|
6
|
-
}
|
|
7
|
-
export declare function HintTemplate(props: HintTemplateProps): ReactNode;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=hint-template.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hint-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/hint-template/hint-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAE,mBAAmB,EAAuB,MAAM,iBAAiB,CAAC;AAE3E,UAAU,iBAAiB;IACzB,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAehE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/hint-template/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './template-box';
|
|
2
|
-
export * from './bot-typing-box';
|
|
3
|
-
export * from './button-template';
|
|
4
|
-
export * from './text-template';
|
|
5
|
-
export * from './carousel-template';
|
|
6
|
-
export * from './hint-template';
|
|
7
|
-
export * from './quick-replies';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAEjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/quick-replies/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quick-replies.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/quick-replies/quick-replies.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAI/C,UAAU,iBAAiB;IACzB,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAClC;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CA8BhE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/template-box/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
interface TemplateBoxContentProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
time?: Date;
|
|
6
|
-
quickReplies?: {
|
|
7
|
-
text: string;
|
|
8
|
-
}[];
|
|
9
|
-
}
|
|
10
|
-
export declare function TemplateBoxContent(props: TemplateBoxContentProps): ReactNode;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=template-box-content.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-box-content.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/template-box/template-box-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,YAAY,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACnC;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,SAAS,CAY5E"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
type TemplateBoxProps = {
|
|
4
|
-
type: 'user';
|
|
5
|
-
direction: 'horizontal';
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
} | {
|
|
8
|
-
type: 'bot';
|
|
9
|
-
direction: 'horizontal' | 'vertical';
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
};
|
|
12
|
-
export declare function TemplateBox(props: TemplateBoxProps): ReactNode;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=template-box.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-box.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/template-box/template-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAI3C,KAAK,gBAAgB,GACjB;IACE,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,YAAY,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;CACrB,GACD;IACE,IAAI,EAAE,KAAK,CAAC;IACZ,SAAS,EAAE,YAAY,GAAG,UAAU,CAAC;IACrC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEN,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,CAoB9D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ConversationMessage } from '@asgard-js/core';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
interface TextTemplateProps {
|
|
5
|
-
conversationMessage: ConversationMessage;
|
|
6
|
-
}
|
|
7
|
-
export declare function TextTemplate(props: TextTemplateProps): ReactNode;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=text-template.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/text-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAMtD,UAAU,iBAAiB;IACzB,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CA2BhE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/time/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/time/time.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,UAAU,SAAS;IACjB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAMhD"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { UseChannelReturn } from '../hooks';
|
|
2
|
-
import { DetailedHTMLProps, HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
3
|
-
import { AsgardServiceClient, ClientConfig, ConversationBotMessage, ConversationMessage } from '@asgard-js/core';
|
|
4
|
-
|
|
5
|
-
interface AsgardServiceContextType {
|
|
6
|
-
avatar?: string;
|
|
7
|
-
client: AsgardServiceClient | null;
|
|
8
|
-
isConnecting: boolean;
|
|
9
|
-
messages: Map<string, ConversationMessage> | null;
|
|
10
|
-
typingMessages: Map<string, ConversationBotMessage> | null;
|
|
11
|
-
messageBoxBottomRef: RefObject<HTMLDivElement>;
|
|
12
|
-
sendMessage: UseChannelReturn['sendMessage'];
|
|
13
|
-
}
|
|
14
|
-
export declare const AsgardServiceContext: import('react').Context<AsgardServiceContextType>;
|
|
15
|
-
interface AsgardServiceContextProviderProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
16
|
-
children: ReactNode;
|
|
17
|
-
avatar?: string;
|
|
18
|
-
config: ClientConfig;
|
|
19
|
-
customChannelId: string;
|
|
20
|
-
customMessageId?: string;
|
|
21
|
-
delayTime?: number;
|
|
22
|
-
options?: {
|
|
23
|
-
showDebugMessage?: boolean;
|
|
24
|
-
};
|
|
25
|
-
initMessages?: ConversationMessage[];
|
|
26
|
-
}
|
|
27
|
-
export declare function AsgardServiceContextProvider(props: AsgardServiceContextProviderProps): ReactNode;
|
|
28
|
-
export declare function useAsgardContext(): AsgardServiceContextType;
|
|
29
|
-
export {};
|
|
30
|
-
//# sourceMappingURL=asgard-service-context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"asgard-service-context.d.ts","sourceRoot":"","sources":["../../src/context/asgard-service-context.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,SAAS,EAIV,MAAM,OAAO,CAAC;AACf,OAAO,EAGL,gBAAgB,EACjB,MAAM,WAAW,CAAC;AAEnB,UAAU,wBAAwB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,IAAI,CAAC;IAClD,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,GAAG,IAAI,CAAC;IAC3D,mBAAmB,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC/C,WAAW,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;CAC9C;AAED,eAAO,MAAM,oBAAoB,mDAQ/B,CAAC;AAEH,UAAU,iCACR,SAAQ,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IACzE,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACzC,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACtC;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,iCAAiC,GACvC,SAAS,CA0CX;AAED,wBAAgB,gBAAgB,IAAI,wBAAwB,CAE3D"}
|
package/dist/hooks/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ClientConfig, AsgardServiceClient } from '@asgard-js/core';
|
|
2
|
-
|
|
3
|
-
interface UseAsgardServiceClientProps {
|
|
4
|
-
config: ClientConfig;
|
|
5
|
-
}
|
|
6
|
-
export declare function useAsgardServiceClient(props: UseAsgardServiceClientProps): AsgardServiceClient | null;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=use-asgard-service-client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-asgard-service-client.d.ts","sourceRoot":"","sources":["../../src/hooks/use-asgard-service-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGpE,UAAU,2BAA2B;IACnC,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,2BAA2B,GACjC,mBAAmB,GAAG,IAAI,CAmB5B"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { AsgardServiceClient, ConversationBotMessage, ConversationMessage, EventType, SseResponse } from '@asgard-js/core';
|
|
2
|
-
|
|
3
|
-
interface UseChannelProps {
|
|
4
|
-
client: AsgardServiceClient | null;
|
|
5
|
-
customChannelId: string;
|
|
6
|
-
initMessages?: ConversationMessage[];
|
|
7
|
-
options?: {
|
|
8
|
-
showDebugMessage?: boolean;
|
|
9
|
-
};
|
|
10
|
-
onResetChannelInit?: (event: SseResponse<EventType.INIT>) => void;
|
|
11
|
-
}
|
|
12
|
-
export interface UseChannelReturn {
|
|
13
|
-
isConnecting: boolean;
|
|
14
|
-
messages: Map<string, ConversationMessage> | null;
|
|
15
|
-
typingMessages: Map<string, ConversationBotMessage> | null;
|
|
16
|
-
sendMessage: (text: string, customMessageId?: string) => void;
|
|
17
|
-
}
|
|
18
|
-
export declare function useChannel(props: UseChannelProps): UseChannelReturn;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=use-channel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-channel.d.ts","sourceRoot":"","sources":["../../src/hooks/use-channel.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAEnB,sBAAsB,EACtB,mBAAmB,EACnB,SAAS,EACT,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAGzB,UAAU,eAAe;IACvB,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACrC,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACzC,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;CACnE;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,IAAI,CAAC;IAClD,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,GAAG,IAAI,CAAC;IAC3D,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,gBAAgB,CA+EnE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-debounce.d.ts","sourceRoot":"","sources":["../../src/hooks/use-debounce.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,SAAS,EACnC,KAAK,EAAE,SAAS,EAChB,KAAK,CAAC,EAAE,MAAM,GACb,SAAS,CAYX"}
|
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-time.d.ts","sourceRoot":"","sources":["../../src/utils/format-time.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAO7C"}
|
package/dist/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|