@chat-leo/chatleo 0.0.0-stage → 2.0.2

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 (144) hide show
  1. package/LICENSE +21 -0
  2. package/dist/chatleo/chatleo.esm.js +1 -0
  3. package/dist/chatleo/index.esm.js +1 -0
  4. package/dist/chatleo/p-43ada232.entry.js +1 -0
  5. package/dist/chatleo/p-4485e141.entry.js +1 -0
  6. package/dist/chatleo/p-BnCPdbII.js +1 -0
  7. package/dist/chatleo/p-C-l90Wre.js +1 -0
  8. package/dist/chatleo/p-DQuL1Twl.js +1 -0
  9. package/dist/chatleo/p-DmL518NK.js +3 -0
  10. package/dist/chatleo/p-aed60255.entry.js +1 -0
  11. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  12. package/dist/cjs/chatleo-avatar_13.cjs.entry.js +2986 -0
  13. package/dist/cjs/chatleo-call-adapter-B2OfC0VZ.js +35 -0
  14. package/dist/cjs/chatleo-chat-input.cjs.entry.js +67 -0
  15. package/dist/cjs/chatleo.cjs.js +25 -0
  16. package/dist/cjs/index-DkSDLR0y.js +56 -0
  17. package/dist/cjs/index-Dxw4YCA_.js +1741 -0
  18. package/dist/cjs/index.cjs.js +7 -0
  19. package/dist/cjs/loader.cjs.js +13 -0
  20. package/dist/cjs/my-component.cjs.entry.js +33 -0
  21. package/dist/collection/__mocks__/stencil-core.js +26 -0
  22. package/dist/collection/collection-manifest.json +27 -0
  23. package/dist/collection/components/chatleo-avatar/chatleo-avatar.css +40 -0
  24. package/dist/collection/components/chatleo-avatar/chatleo-avatar.js +116 -0
  25. package/dist/collection/components/chatleo-chat/chatleo-chat.css +108 -0
  26. package/dist/collection/components/chatleo-chat/chatleo-chat.js +459 -0
  27. package/dist/collection/components/chatleo-chat-header/chatleo-chat-header.css +22 -0
  28. package/dist/collection/components/chatleo-chat-header/chatleo-chat-header.js +105 -0
  29. package/dist/collection/components/chatleo-chat-input/chatleo-chat-input.css +84 -0
  30. package/dist/collection/components/chatleo-chat-input/chatleo-chat-input.js +141 -0
  31. package/dist/collection/components/chatleo-chat-message/chatleo-chat-message.css +149 -0
  32. package/dist/collection/components/chatleo-chat-message/chatleo-chat-message.js +259 -0
  33. package/dist/collection/components/chatleo-component/chatleo-component.css +271 -0
  34. package/dist/collection/components/chatleo-component/chatleo-component.js +1366 -0
  35. package/dist/collection/components/chatleo-new-message-selector/chatleo-new-message-selector.css +96 -0
  36. package/dist/collection/components/chatleo-new-message-selector/chatleo-new-message-selector.js +231 -0
  37. package/dist/collection/components/chatleo-rich-input/chatleo-rich-input.css +352 -0
  38. package/dist/collection/components/chatleo-rich-input/chatleo-rich-input.js +976 -0
  39. package/dist/collection/components/chatleo-rich-message-renderer/chatleo-rich-message-renderer.css +169 -0
  40. package/dist/collection/components/chatleo-rich-message-renderer/chatleo-rich-message-renderer.js +400 -0
  41. package/dist/collection/components/chatleo-room-list/chatleo-room-list.css +111 -0
  42. package/dist/collection/components/chatleo-room-list/chatleo-room-list.js +180 -0
  43. package/dist/collection/components/chatleo-room-tile-component/chatleo-room-tile-component.css +110 -0
  44. package/dist/collection/components/chatleo-room-tile-component/chatleo-room-tile-component.js +241 -0
  45. package/dist/collection/components/chatleo-room-view/chatleo-room-view.css +93 -0
  46. package/dist/collection/components/chatleo-room-view/chatleo-room-view.js +593 -0
  47. package/dist/collection/components/chatleo-tray-component/chatleo-tray-component.css +284 -0
  48. package/dist/collection/components/chatleo-tray-component/chatleo-tray-component.js +391 -0
  49. package/dist/collection/components/chatleo-user-tile/chatleo-user-tile.css +56 -0
  50. package/dist/collection/components/chatleo-user-tile/chatleo-user-tile.js +149 -0
  51. package/dist/collection/components/my-component/my-component.css +4 -0
  52. package/dist/collection/components/my-component/my-component.js +95 -0
  53. package/dist/collection/index.js +10 -0
  54. package/dist/collection/utils/call-entry.js +34 -0
  55. package/dist/collection/utils/delivery.js +7 -0
  56. package/dist/collection/utils/utils.js +51 -0
  57. package/dist/components/chatleo-avatar.d.ts +11 -0
  58. package/dist/components/chatleo-avatar.js +1 -0
  59. package/dist/components/chatleo-chat-header.d.ts +11 -0
  60. package/dist/components/chatleo-chat-header.js +1 -0
  61. package/dist/components/chatleo-chat-input.d.ts +11 -0
  62. package/dist/components/chatleo-chat-input.js +1 -0
  63. package/dist/components/chatleo-chat-message.d.ts +11 -0
  64. package/dist/components/chatleo-chat-message.js +1 -0
  65. package/dist/components/chatleo-chat.d.ts +11 -0
  66. package/dist/components/chatleo-chat.js +1 -0
  67. package/dist/components/chatleo-component.d.ts +11 -0
  68. package/dist/components/chatleo-component.js +1 -0
  69. package/dist/components/chatleo-new-message-selector.d.ts +11 -0
  70. package/dist/components/chatleo-new-message-selector.js +1 -0
  71. package/dist/components/chatleo-rich-input.d.ts +11 -0
  72. package/dist/components/chatleo-rich-input.js +1 -0
  73. package/dist/components/chatleo-rich-message-renderer.d.ts +11 -0
  74. package/dist/components/chatleo-rich-message-renderer.js +1 -0
  75. package/dist/components/chatleo-room-list.d.ts +11 -0
  76. package/dist/components/chatleo-room-list.js +1 -0
  77. package/dist/components/chatleo-room-tile-component.d.ts +11 -0
  78. package/dist/components/chatleo-room-tile-component.js +1 -0
  79. package/dist/components/chatleo-room-view.d.ts +11 -0
  80. package/dist/components/chatleo-room-view.js +1 -0
  81. package/dist/components/chatleo-tray-component.d.ts +11 -0
  82. package/dist/components/chatleo-tray-component.js +1 -0
  83. package/dist/components/chatleo-user-tile.d.ts +11 -0
  84. package/dist/components/chatleo-user-tile.js +1 -0
  85. package/dist/components/index.d.ts +35 -0
  86. package/dist/components/index.js +1 -0
  87. package/dist/components/my-component.d.ts +11 -0
  88. package/dist/components/my-component.js +1 -0
  89. package/dist/components/p-8kvQ-Uh-.js +1 -0
  90. package/dist/components/p-B7cdqAgv.js +1 -0
  91. package/dist/components/p-BdiOcOYZ.js +1 -0
  92. package/dist/components/p-BlbDSb7D.js +1 -0
  93. package/dist/components/p-BnCPdbII.js +1 -0
  94. package/dist/components/p-C-v19aUJ.js +1 -0
  95. package/dist/components/p-C1mF0s8g.js +1 -0
  96. package/dist/components/p-CRtBdzP3.js +1 -0
  97. package/dist/components/p-CfayCm9O.js +1 -0
  98. package/dist/components/p-DGjAxoQy.js +1 -0
  99. package/dist/components/p-Exj_2-yI.js +1 -0
  100. package/dist/components/p-XlwGxsqT.js +1 -0
  101. package/dist/components/p-fjMaTJam.js +1 -0
  102. package/dist/components/p-xt4kzz3B.js +1 -0
  103. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  104. package/dist/esm/chatleo-avatar_13.entry.js +2972 -0
  105. package/dist/esm/chatleo-call-adapter-BnCPdbII.js +33 -0
  106. package/dist/esm/chatleo-chat-input.entry.js +65 -0
  107. package/dist/esm/chatleo.js +21 -0
  108. package/dist/esm/index-C-l90Wre.js +53 -0
  109. package/dist/esm/index-DmL518NK.js +1733 -0
  110. package/dist/esm/index.js +1 -0
  111. package/dist/esm/loader.js +11 -0
  112. package/dist/esm/my-component.entry.js +31 -0
  113. package/dist/index.cjs.js +1 -0
  114. package/dist/index.js +1 -0
  115. package/dist/types/__mocks__/stencil-core.d.ts +24 -0
  116. package/dist/types/components/chatleo-avatar/chatleo-avatar.d.ts +27 -0
  117. package/dist/types/components/chatleo-chat/chatleo-chat.d.ts +75 -0
  118. package/dist/types/components/chatleo-chat-header/chatleo-chat-header.d.ts +27 -0
  119. package/dist/types/components/chatleo-chat-input/chatleo-chat-input.d.ts +31 -0
  120. package/dist/types/components/chatleo-chat-message/chatleo-chat-message.d.ts +22 -0
  121. package/dist/types/components/chatleo-component/chatleo-component.d.ts +278 -0
  122. package/dist/types/components/chatleo-new-message-selector/chatleo-new-message-selector.d.ts +68 -0
  123. package/dist/types/components/chatleo-rich-input/chatleo-rich-input.d.ts +216 -0
  124. package/dist/types/components/chatleo-rich-message-renderer/chatleo-rich-message-renderer.d.ts +77 -0
  125. package/dist/types/components/chatleo-room-list/chatleo-room-list.d.ts +52 -0
  126. package/dist/types/components/chatleo-room-tile-component/chatleo-room-tile-component.d.ts +59 -0
  127. package/dist/types/components/chatleo-room-view/chatleo-room-view.d.ts +91 -0
  128. package/dist/types/components/chatleo-tray-component/chatleo-tray-component.d.ts +112 -0
  129. package/dist/types/components/chatleo-user-tile/chatleo-user-tile.d.ts +36 -0
  130. package/dist/types/components/my-component/my-component.d.ts +16 -0
  131. package/dist/types/components.d.ts +1593 -0
  132. package/dist/types/index.d.ts +12 -0
  133. package/dist/types/stencil-public-runtime.d.ts +1879 -0
  134. package/dist/types/utils/call-entry.d.ts +9 -0
  135. package/dist/types/utils/delivery.d.ts +7 -0
  136. package/dist/types/utils/utils.d.ts +24 -0
  137. package/loader/cdn.js +1 -0
  138. package/loader/index.cjs.js +1 -0
  139. package/loader/index.d.ts +24 -0
  140. package/loader/index.es2017.js +1 -0
  141. package/loader/index.js +2 -0
  142. package/package.json +70 -3
  143. package/readme.md +111 -0
  144. package/README.md +0 -3
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-DkSDLR0y.js');
4
+
5
+
6
+
7
+ exports.format = index.format;
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-Dxw4YCA_.js');
4
+ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
+
6
+ const defineCustomElements = async (win, options) => {
7
+ if (typeof window === 'undefined') return undefined;
8
+ await appGlobals.globalScripts();
9
+ return index.bootstrapLazy([["chatleo-chat-input.cjs",[[513,"chatleo-chat-input",{"disabled":[4],"sendOnModifierEnter":[4,"send-on-modifier-enter"],"inputValue":[32]}]]],["my-component.cjs",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["chatleo-avatar_13.cjs",[[513,"chatleo-component",{"username":[1],"ticket":[1],"useTray":[4,"use-tray"],"useMain":[4,"use-main"],"useRoomView":[4,"use-room-view"],"roomId":[1,"room-id"],"chatLeoLib":[16],"chatStore":[16],"serverUrl":[1,"server-url"],"transport":[1],"calls":[1],"push":[1],"pushSwPath":[1,"push-sw-path"],"isLoggedIn":[32],"loading":[32],"isSessionExpired":[32],"connectionStatus":[32],"callsAvailable":[32],"incomingCall":[32],"callView":[32],"showCall":[32],"pushState":[32],"pushPromptDismissed":[32],"getConnectionStatus":[64],"openRoom":[64],"closeRoom":[64],"getActiveRoomId":[64],"getDraft":[64],"setDraft":[64],"addFiles":[64],"focusComposer":[64],"openDirectMessageWithUser":[64],"openNewChatDraft":[64]},[[0,"callError","onCallError"],[0,"callLeft","onCallLeft"],[0,"callRequested","onCallRequested"],[0,"newChatClicked","onNewChatClicked"],[0,"messageChatSent","onChatMessage"],[0,"userSelected","onUserSelectedForChat"]],{"chatLeoLib":[{"onChatLeoLibChange":0}],"chatStore":[{"onChatStoreChange":0}],"ticket":[{"onTicketChange":0}],"calls":[{"onCallsChange":0}],"incomingCall":[{"onIncomingCallChange":0}]}],[513,"chatleo-chat",{"chatStore":[16],"isOnline":[4,"is-online"],"pending":[4],"callsAvailable":[4,"calls-available"],"inCall":[4,"in-call"],"selectedRoomId":[32],"_version":[32],"_showRoomDetail":[32],"openRoom":[64],"closeRoom":[64],"getDraft":[64],"setDraft":[64],"addFiles":[64],"focusComposer":[64]},[[0,"messageInputSent","handleSendMessage"],[0,"messageSend","messageSendHandler"],[0,"roomClicked","handleRoomClicked"]],{"chatStore":[{"onChatStoreChange":0}]}],[513,"chatleo-tray-component",{"chatStore":[16],"isChatOpen":[32],"isNewChatSelectorOpen":[32],"isMessagesOpen":[32],"selectedRoomId":[32],"isPending":[32],"_version":[32],"isSessionExpired":[32],"connectionStatus":[32],"openChatPanel":[64]},[[0,"roomClicked","roomClickedHandler"],[0,"messageSend","messageSendHandler"]],{"chatStore":[{"onChatStoreChange":0}],"selectedRoomId":[{"onSelectedRoomIdChanged":0}]}],[513,"chatleo-room-view",{"chatStore":[16],"roomId":[1,"room-id"],"isOnline":[4,"is-online"],"pending":[4],"callsAvailable":[4,"calls-available"],"inCall":[4,"in-call"],"_version":[32],"getDraft":[64],"setDraft":[64],"addFiles":[64],"focusComposer":[64]},[[0,"messageRetry","messageRetryHandler"],[0,"messageDiscard","messageDiscardHandler"],[0,"messageSend","messageSendHandler"]],{"chatStore":[{"onChatStoreChange":0}],"roomId":[{"onRoomIdChanged":0}]}],[513,"chatleo-room-list",{"rooms":[16],"chatStore":[16],"selectedRoomId":[1,"selected-room-id"],"_version":[32],"isNewChatOpen":[32]},[[0,"userSelected","onUserSelected"]],{"chatStore":[{"onChatStoreChange":0}]}],[513,"chatleo-chat-message",{"message":[16],"sender":[16],"senderIsOnline":[4,"sender-is-online"],"isOwnMessage":[4,"is-own-message"],"locale":[1],"translations":[16]}],[513,"chatleo-new-message-selector",{"chatStore":[16],"placeholder":[1],"filterText":[32],"filteredUsers":[32],"_version":[32]},null,{"chatStore":[{"onChatStoreChange":0}]}],[513,"chatleo-chat-header",{"name":[1],"avatar":[1],"isOnline":[4,"is-online"]}],[513,"chatleo-room-tile-component",{"room":[16],"chatStore":[16],"onlineUserIds":[16],"lastMessage":[1,"last-message"],"timestamp":[1],"unreadCount":[2,"unread-count"],"isActive":[4,"is-active"]}],[513,"chatleo-rich-input",{"disabled":[4],"placeholder":[1],"maxHeight":[1,"max-height"],"acceptFiles":[1,"accept-files"],"isDragOver":[32],"hasContent":[32],"getText":[64],"setText":[64],"addFiles":[64],"focusEditor":[64]}],[513,"chatleo-user-tile",{"profile":[16],"isOnline":[4,"is-online"],"lastSeen":[1,"last-seen"]}],[513,"chatleo-rich-message-renderer",{"content":[16],"downloadUrls":[16],"alignment":[1],"translations":[16],"attachmentStates":[32]}],[513,"chatleo-avatar",{"name":[1],"url":[1],"isOnline":[4,"is-online"]}]]]], options);
10
+ };
11
+
12
+ exports.setNonce = index.setNonce;
13
+ exports.defineCustomElements = defineCustomElements;
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-Dxw4YCA_.js');
4
+ var index$1 = require('./index-DkSDLR0y.js');
5
+
6
+ const myComponentCss = () => `:host{--display:block;display:var(--display)}`;
7
+
8
+ const MyComponent = class {
9
+ constructor(hostRef) {
10
+ index.registerInstance(this, hostRef);
11
+ }
12
+ /**
13
+ * The first name
14
+ */
15
+ first;
16
+ /**
17
+ * The middle name
18
+ */
19
+ middle;
20
+ /**
21
+ * The last name
22
+ */
23
+ last;
24
+ getText() {
25
+ return index$1.format(this.first, this.middle, this.last);
26
+ }
27
+ render() {
28
+ return index.h("div", { key: '190c7c8bc8333f9d1b4934fd633f7cf9820c7523' }, "Hello, World! I'm ", this.getText());
29
+ }
30
+ };
31
+ MyComponent.style = myComponentCss();
32
+
33
+ exports.my_component = MyComponent;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * No-op shim for @stencil/core decorators used in unit tests.
3
+ *
4
+ * When tests run via plain jest (not the Stencil test runner), the Stencil
5
+ * decorator functions (@Prop, @State, @Method, etc.) would otherwise fail
6
+ * because the Stencil runtime is not bootstrapped. This shim replaces them
7
+ * with identity/noop decorators so the class can be instantiated normally
8
+ * and the logic methods can be tested in isolation.
9
+ */
10
+ /** A no-op class/property/method decorator factory */
11
+ const noop = () => () => { };
12
+ export const Component = noop;
13
+ export const Prop = noop;
14
+ export const State = noop;
15
+ export const Method = noop;
16
+ export const Event = noop;
17
+ export const Listen = noop;
18
+ export const Watch = noop;
19
+ export const Element = noop;
20
+ export const Host = noop;
21
+ /** Minimal no-op h (hyperscript) function */
22
+ export const h = (..._args) => null;
23
+ /** EventEmitter stub */
24
+ export class EventEmitter {
25
+ emit(_value) { }
26
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "entries": [
3
+ "components/chatleo-component/chatleo-component.js",
4
+ "components/chatleo-avatar/chatleo-avatar.js",
5
+ "components/chatleo-chat/chatleo-chat.js",
6
+ "components/chatleo-chat-header/chatleo-chat-header.js",
7
+ "components/chatleo-chat-input/chatleo-chat-input.js",
8
+ "components/chatleo-chat-message/chatleo-chat-message.js",
9
+ "components/chatleo-new-message-selector/chatleo-new-message-selector.js",
10
+ "components/chatleo-rich-input/chatleo-rich-input.js",
11
+ "components/chatleo-rich-message-renderer/chatleo-rich-message-renderer.js",
12
+ "components/chatleo-room-list/chatleo-room-list.js",
13
+ "components/chatleo-room-tile-component/chatleo-room-tile-component.js",
14
+ "components/chatleo-room-view/chatleo-room-view.js",
15
+ "components/chatleo-tray-component/chatleo-tray-component.js",
16
+ "components/chatleo-user-tile/chatleo-user-tile.js",
17
+ "components/my-component/my-component.js"
18
+ ],
19
+ "mixins": [],
20
+ "compiler": {
21
+ "name": "@stencil/core",
22
+ "version": "4.45.2",
23
+ "typescriptVersion": "5.8.3"
24
+ },
25
+ "collections": [],
26
+ "bundles": []
27
+ }
@@ -0,0 +1,40 @@
1
+
2
+ :host {
3
+ /* Component-specific variables */
4
+ --avatar-bg: #dddddd;
5
+ --status-size: 12px;
6
+ --status-border: 2px;
7
+ --status-position: 2px;
8
+ }
9
+
10
+ .user-avatar {
11
+ position: relative;
12
+ flex-shrink: 0;
13
+ }
14
+
15
+ .user-avatar img {
16
+ width: var(--avatar-size, 48px);
17
+ height: var(--avatar-size, 48px);
18
+ border-radius: 50%;
19
+ object-fit: cover;
20
+ background-color: var(--avatar-bg);
21
+ overflow: hidden;
22
+ }
23
+
24
+ .status-indicator {
25
+ position: absolute;
26
+ bottom: var(--status-position);
27
+ right: var(--status-position);
28
+ width: var(--status-size);
29
+ height: var(--status-size);
30
+ border-radius: 50%;
31
+ border: var(--status-border) solid var(--bg-primary);
32
+ }
33
+
34
+ .status-indicator.online {
35
+ background-color: var(--status-online);
36
+ }
37
+
38
+ .status-indicator.offline {
39
+ background-color: var(--status-offline);
40
+ }
@@ -0,0 +1,116 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * @component ChatleoAvatar
4
+ * @description This component is responsible for rendering a user's avatar. It can display an image from a URL if one is provided. If no URL is given, it generates a colorful SVG avatar with the user's initials. It also displays a status indicator showing whether the user is online or offline.
5
+ * @property {string} name - The full name of the user. This is used to generate the initials for the SVG fallback avatar.
6
+ * @property {string} url - The URL for the user's avatar image. If this is not provided, the component will render a generated SVG avatar.
7
+ * @property {boolean} isOnline - A boolean that determines the color of the status indicator. `true` for online (green), `false` for offline (gray).
8
+ */
9
+ export class ChatleoAvatar {
10
+ /**
11
+ * The full name of the user, which is used to generate the initials for the SVG fallback avatar.
12
+ */
13
+ name;
14
+ /**
15
+ * The URL for the user's avatar image. If this is not provided, the component will render a generated SVG avatar.
16
+ */
17
+ url;
18
+ /**
19
+ * A boolean that determines the color of the status indicator. `true` for online (green), `false` for offline (gray).
20
+ */
21
+ isOnline = false;
22
+ /**
23
+ * @function render
24
+ * @description The render method for the `ChatleoAvatar` component. It conditionally renders either the user's image from the `url` prop or a generated SVG avatar if the URL is not available. It also renders a status indicator.
25
+ * @returns {any} A VNode representing the component's UI.
26
+ */
27
+ render() {
28
+ // 1. Define dynamic properties
29
+ const fillColor = 'royalblue';
30
+ const circleRadius = 45;
31
+ // 2. Create the SVG markup as a string
32
+ const svgString = `
33
+ <svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
34
+ <circle cx="50" cy="50" r="${circleRadius}" fill="${fillColor}" />
35
+ <text x="50" y="55" font-size="12" text-anchor="middle" fill="white">${this.name.substring(0, 2)}</text>
36
+ </svg>
37
+ `;
38
+ // 3. URL-encode the SVG string and create the Data URI
39
+ const dataUri = 'data:image/svg+xml,' + encodeURIComponent(svgString);
40
+ return (h("div", { key: 'e7b5846df55e2088312546869f50c32fc1b3f809', class: "user-avatar" }, h("img", { key: 'ef7af555265926a194ce8f972286ca3be5746b40', src: this.url ?? dataUri, alt: this.name, title: this.name }), h("div", { key: '46e7627446b02d7f1e42d110cbb5fd5a55ff333b', class: `status-indicator ${this.isOnline ? 'online' : 'offline'}` })));
41
+ }
42
+ static get is() { return "chatleo-avatar"; }
43
+ static get encapsulation() { return "shadow"; }
44
+ static get originalStyleUrls() {
45
+ return {
46
+ "$": ["chatleo-avatar.css"]
47
+ };
48
+ }
49
+ static get styleUrls() {
50
+ return {
51
+ "$": ["chatleo-avatar.css"]
52
+ };
53
+ }
54
+ static get properties() {
55
+ return {
56
+ "name": {
57
+ "type": "string",
58
+ "mutable": false,
59
+ "complexType": {
60
+ "original": "string",
61
+ "resolved": "string",
62
+ "references": {}
63
+ },
64
+ "required": false,
65
+ "optional": false,
66
+ "docs": {
67
+ "tags": [],
68
+ "text": "The full name of the user, which is used to generate the initials for the SVG fallback avatar."
69
+ },
70
+ "getter": false,
71
+ "setter": false,
72
+ "reflect": false,
73
+ "attribute": "name"
74
+ },
75
+ "url": {
76
+ "type": "string",
77
+ "mutable": false,
78
+ "complexType": {
79
+ "original": "string",
80
+ "resolved": "string",
81
+ "references": {}
82
+ },
83
+ "required": false,
84
+ "optional": false,
85
+ "docs": {
86
+ "tags": [],
87
+ "text": "The URL for the user's avatar image. If this is not provided, the component will render a generated SVG avatar."
88
+ },
89
+ "getter": false,
90
+ "setter": false,
91
+ "reflect": false,
92
+ "attribute": "url"
93
+ },
94
+ "isOnline": {
95
+ "type": "boolean",
96
+ "mutable": false,
97
+ "complexType": {
98
+ "original": "boolean",
99
+ "resolved": "boolean",
100
+ "references": {}
101
+ },
102
+ "required": false,
103
+ "optional": false,
104
+ "docs": {
105
+ "tags": [],
106
+ "text": "A boolean that determines the color of the status indicator. `true` for online (green), `false` for offline (gray)."
107
+ },
108
+ "getter": false,
109
+ "setter": false,
110
+ "reflect": false,
111
+ "attribute": "is-online",
112
+ "defaultValue": "false"
113
+ }
114
+ };
115
+ }
116
+ }
@@ -0,0 +1,108 @@
1
+
2
+
3
+
4
+ :host {
5
+ display: flex;
6
+ flex-direction: column;
7
+ flex: 1;
8
+ min-height: 0;
9
+ overflow: hidden;
10
+ }
11
+
12
+ .chat-container-list-and-chat {
13
+ display: flex;
14
+ flex-direction: row;
15
+ height: 100%;
16
+ max-width: 100%;
17
+ min-height: 0;
18
+ overflow: hidden;
19
+ padding: 2px;
20
+ border: 1px solid var(--border-light);
21
+ box-sizing: border-box;
22
+ background: var(--bg-primary);
23
+ position: relative;
24
+ }
25
+
26
+ chatleo-room-view {
27
+ flex: 1;
28
+ min-width: 0;
29
+ min-height: 0;
30
+ border-left: 1px solid var(--border-light);
31
+ transition: transform 0.3s ease-out;
32
+ }
33
+
34
+ chatleo-room-list {
35
+ flex: 0 0 auto;
36
+ min-height: 0;
37
+ transition: transform 0.3s ease-out;
38
+ }
39
+
40
+ .toggle-btn {
41
+ display: none;
42
+ position: absolute;
43
+ top: 50%;
44
+ left: 50%;
45
+ transform: translate(-50%, -50%);
46
+ z-index: 100;
47
+ width: 48px;
48
+ height: 48px;
49
+ border-radius: 50%;
50
+ border: 1px solid var(--border-light);
51
+ background: var(--bg-primary);
52
+ cursor: pointer;
53
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
54
+ align-items: center;
55
+ justify-content: center;
56
+ padding: 0;
57
+ }
58
+
59
+ .toggle-btn svg {
60
+ width: 24px;
61
+ height: 24px;
62
+ fill: var(--text-primary);
63
+ }
64
+
65
+ @media (max-width: 768px) {
66
+ .chat-container-list-and-chat {
67
+ overflow-x: hidden;
68
+ }
69
+
70
+ .toggle-btn {
71
+ display: flex;
72
+ right: 8px;
73
+ left: auto;
74
+ top: 8px;
75
+ transform: none;
76
+ }
77
+
78
+ chatleo-room-list {
79
+ width: 100%;
80
+ flex: 1;
81
+ }
82
+
83
+ chatleo-room-view {
84
+ width: 100%;
85
+ position: absolute;
86
+ top: 0;
87
+ left: 0;
88
+ right: 0;
89
+ bottom: 0;
90
+ border-left: none;
91
+ }
92
+
93
+ .show-room-list chatleo-room-list {
94
+ transform: translateX(0);
95
+ }
96
+
97
+ .show-room-list chatleo-room-view {
98
+ transform: translateX(100%);
99
+ }
100
+
101
+ .show-room-view chatleo-room-list {
102
+ transform: translateX(-100%);
103
+ }
104
+
105
+ .show-room-view chatleo-room-view {
106
+ transform: translateX(0);
107
+ }
108
+ }