@cloudflare/realtimekit-ui 2.0.3-staging.8 → 2.0.3-staging.9
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/browser.js +1 -1
- package/dist/cjs/rtk-avatar_26.cjs.entry.js +10 -9
- package/dist/cjs/rtk-breakout-rooms-manager_8.cjs.entry.js +2 -2
- package/dist/cjs/rtk-message-list-view.cjs.entry.js +3 -3
- package/dist/cjs/rtk-sidebar-ui.cjs.entry.js +2 -2
- package/dist/cjs/rtk-spotlight-grid.cjs.entry.js +2 -2
- package/dist/collection/components/rtk-ai/rtk-ai.js +2 -4
- package/dist/collection/components/rtk-broadcast-message-modal/rtk-broadcast-message-modal.js +4 -6
- package/dist/collection/components/rtk-chat-composer-view/rtk-chat-composer-view.js +8 -7
- package/dist/collection/components/rtk-livestream-toggle/rtk-livestream-toggle.js +2 -4
- package/dist/collection/components/rtk-message-list-view/rtk-message-list-view.js +4 -4
- package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.js +4 -4
- package/dist/collection/components/rtk-participants-stage-queue/rtk-participants-stage-queue.js +2 -4
- package/dist/collection/components/rtk-pip-toggle/rtk-pip-toggle.js +2 -4
- package/dist/collection/components/rtk-sidebar-ui/rtk-sidebar-ui.js +4 -6
- package/dist/collection/components/rtk-spotlight-grid/rtk-spotlight-grid.js +3 -3
- package/dist/components/{p-EkUCxpDZ.js → p-BoqfUgTL.js} +1 -1
- package/dist/components/{p-DbBGSlfQ.js → p-C-dwT3mh.js} +1 -1
- package/dist/components/{p-qDy7F0Tr.js → p-C9UuqXCX.js} +1 -1
- package/dist/components/{p-Bmk8auxt.js → p-CAsupO2z.js} +1 -1
- package/dist/components/{p-CXq0ujSg.js → p-CNaazJXM.js} +1 -1
- package/dist/components/{p-DzDWIdoE.js → p-CtSq3DFC.js} +1 -1
- package/dist/components/{p-l-tiOHlG.js → p-Ryaxu6vl.js} +1 -1
- package/dist/components/{p-A83Jz8rO.js → p-VHRH6fkb.js} +1 -1
- package/dist/components/{p-BsgKgxKu.js → p-XaCbiR3F.js} +1 -1
- package/dist/components/rtk-broadcast-message-modal.js +1 -1
- package/dist/components/rtk-chat-composer-view.js +1 -1
- package/dist/components/rtk-chat-header.js +1 -1
- package/dist/components/rtk-chat-messages-ui-paginated.js +1 -1
- package/dist/components/rtk-chat-search-results.js +1 -1
- package/dist/components/rtk-chat-selector.js +1 -1
- package/dist/components/rtk-chat.js +1 -1
- package/dist/components/rtk-dialog-manager.js +1 -1
- package/dist/components/rtk-meeting.js +1 -1
- package/dist/components/rtk-message-list-view.js +1 -1
- package/dist/components/rtk-paginated-list.js +1 -1
- package/dist/components/rtk-participants.js +1 -1
- package/dist/components/rtk-pinned-message-selector.js +1 -1
- package/dist/components/rtk-sidebar-ui.js +1 -1
- package/dist/components/rtk-sidebar.js +1 -1
- package/dist/components/rtk-spotlight-grid.js +1 -1
- package/dist/docs/docs-components.json +11 -11
- package/dist/docs/docs-vscode.json +8 -8
- package/dist/esm/loader.js +19 -18
- package/dist/esm/rtk-avatar_26.entry.js +10 -9
- package/dist/esm/rtk-breakout-rooms-manager_8.entry.js +2 -2
- package/dist/esm/rtk-message-list-view.entry.js +3 -3
- package/dist/esm/rtk-sidebar-ui.entry.js +2 -2
- package/dist/esm/rtk-spotlight-grid.entry.js +2 -2
- package/dist/realtimekit-ui/{p-64bc4514.entry.js → p-20734a3a.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-31c97dcd.entry.js → p-8cdd8307.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-cf7f7d9c.entry.js → p-aea61c98.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-2da96ec3.entry.js → p-b27db286.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-2308568a.entry.js → p-ce81ffaa.entry.js} +1 -1
- package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -1
- package/dist/types/components/rtk-ai/rtk-ai.d.ts +2 -4
- package/dist/types/components/rtk-broadcast-message-modal/rtk-broadcast-message-modal.d.ts +2 -4
- package/dist/types/components/rtk-chat-composer-view/rtk-chat-composer-view.d.ts +1 -0
- package/dist/types/components/rtk-livestream-toggle/rtk-livestream-toggle.d.ts +2 -4
- package/dist/types/components/rtk-message-list-view/rtk-message-list-view.d.ts +1 -1
- package/dist/types/components/rtk-paginated-list/rtk-paginated-list.d.ts +1 -1
- package/dist/types/components/rtk-participants-stage-queue/rtk-participants-stage-queue.d.ts +2 -4
- package/dist/types/components/rtk-pip-toggle/rtk-pip-toggle.d.ts +2 -4
- package/dist/types/components/rtk-sidebar-ui/rtk-sidebar-ui.d.ts +2 -4
- package/dist/types/components/rtk-spotlight-grid/rtk-spotlight-grid.d.ts +1 -1
- package/dist/types/components.d.ts +57 -79
- package/package.json +1 -1
|
@@ -352,9 +352,9 @@ const RtkBroadcastMessageModal = class {
|
|
|
352
352
|
}, 2000);
|
|
353
353
|
}
|
|
354
354
|
render() {
|
|
355
|
-
return (h(Host, { key: '
|
|
355
|
+
return (h(Host, { key: 'd7559b6aadff8f45387ac2f0b67ba20a18d9fed4' }, h("div", { key: '8b14c6d8b673244408b681f50bed87c3ab9af8bf', class: "content-col" }, h("h2", { key: '560e1e2cd73f07776fe670f4412dace898683f7e' }, "Broadcast message to"), h("select", { key: 'f0a8ddbcea08243f0c496cdc14916eea928ad520', onChange: (e) => {
|
|
356
356
|
this.messagePayload = Object.assign(Object.assign({}, this.messagePayload), { to: e.target.value });
|
|
357
|
-
} }, h("option", { key: '
|
|
357
|
+
} }, h("option", { key: 'daa2217e90ccd31d3a7fff136069bebe28b34da3' }, "Everyone"), h("option", { key: '72133e1507e26a555875bba037d2b0cb824a16f9' }, "List of rooms")), h("textarea", { key: 'eb523131f3bbe458cf802db5860029b2ce69c74f', placeholder: "Type message here...", onInput: (e) => {
|
|
358
358
|
this.messagePayload = Object.assign(Object.assign({}, this.messagePayload), { message: e.target.value });
|
|
359
359
|
} }), this.successMessage ? (h("p", null, "Message sent to ", this.messagePayload.to, h("rtk-icon", { icon: this.iconPack.checkmark }))) : (h("div", { class: "content-row" }, h("rtk-button", { onClick: () => this.close(), variant: "secondary" }, "Cancel"), "\u2002", h("rtk-button", { variant: "primary", onClick: () => this.sendMessage() }, "Send"))))));
|
|
360
360
|
}
|
|
@@ -264,11 +264,11 @@ const RtkMessageListView = class {
|
|
|
264
264
|
this.updateTotalHeight();
|
|
265
265
|
}
|
|
266
266
|
render() {
|
|
267
|
-
return (h("div", { key: '
|
|
267
|
+
return (h("div", { key: '8da5ac7ee83f43da54ce1af023e178d206436b80', class: "scrollbar content-wrapper", ref: (el) => (this.$listRef = el), onScroll: this.handleScroll }, h("div", { key: '3aeec25e25aeb2864b7ce0d68a08d58bb2b63cef', class: "scroller" }, h("div", { key: 'b65b2fb4471307f38c08480d268adfaafdb696fb', style: {
|
|
268
268
|
height: `${this.totalHeight}px`,
|
|
269
|
-
} }), h("div", { key: '
|
|
269
|
+
} }), h("div", { key: '08aa1dcf4740ce438b152527e8d60aff28704e8a', class: "smallest-dom-element", id: "list-end", ref: (el) => (this.$listEndRef = el) })), h("div", { key: '48ba3788f83f2329174fb3ddd107eaf4da91699a', class: "content", style: {
|
|
270
270
|
transform: `translateY(${this.getRangeSize(0, this.range.start)}px)`,
|
|
271
|
-
} }, this.isFetching && (h("div", { key: '
|
|
271
|
+
} }, this.isFetching && (h("div", { key: '1a53b6b02899df6ce80c781b44fcd71802105fdf', class: "loader" }, h("rtk-spinner", { key: '222bdf5ad19f45914f48c91afb65075e3fef277f', size: "md" }))), this.getVisibleItems().map((msg, index) => (h("div", { key: msg.id, ref: (el) => this.rendererInternal(el, msg, index) }))))));
|
|
272
272
|
}
|
|
273
273
|
static get watchers() { return {
|
|
274
274
|
"messages": [{
|
|
@@ -71,11 +71,11 @@ const RtkSidebarUi = class {
|
|
|
71
71
|
render() {
|
|
72
72
|
const isFullScreen = this.view === 'full-screen';
|
|
73
73
|
const activeTab = this.tabs.find((tab) => tab.id === this.currentTab);
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: '850aa92eeb61bf2729b12e30be8a43a9ff3a1acf', ref: (el) => (this.hostEl = el), class: this.view }, !this.hideCloseAction && (h("rtk-button", { key: 'f52d00bc36c398403eb7ac8ab5625f3cecd5da4f', ref: (el) => (this.closeButton = el), variant: "ghost", kind: "icon", class: "close", onClick: this.onClose, "aria-label": this.t('close') }, h("rtk-icon", { key: '4d970f5a9f02839dc297ccb2b7c85806025f7ef1', icon: this.iconPack.dismiss }))), activeTab && !this.hideHeader && (h("header", { key: '8c1ae2f6e4a87e2fc66381e70c7053b1b4a4d2b2', class: "main-header" }, h("h3", { key: '6f9faffac3acd82cd4645189459212026b10bf1d' }, activeTab.name), h("slot", { key: '20b3cff89b8805600eafbce17aabc4880e473a56', name: "pinned-state" }))), isFullScreen && (h("header", { key: '86bf499aadbe7b57868a135a35100cc1e430520e', class: "mobile-tabs" }, this.tabs.map((tab) => (h("button", { onClick: () => {
|
|
75
75
|
this.tabChange.emit(tab.id);
|
|
76
76
|
}, class: {
|
|
77
77
|
active: this.currentTab === tab.id,
|
|
78
|
-
} }, tab.name))))), h("slot", { key: '
|
|
78
|
+
} }, tab.name))))), h("slot", { key: 'd19ec28aa918a2bfd9556c64ef758b2faf6a195d', name: this.currentTab })));
|
|
79
79
|
}
|
|
80
80
|
static get watchers() { return {
|
|
81
81
|
"currentTab": [{
|
|
@@ -66,13 +66,13 @@ const RtkSpotlightGrid = class {
|
|
|
66
66
|
t: this.t,
|
|
67
67
|
};
|
|
68
68
|
const nonPinnedParticipants = this.participants.filter((p) => this.pinnedParticipants.some((pt) => pt.id != p.id));
|
|
69
|
-
return (h(Host, { key: '
|
|
69
|
+
return (h(Host, { key: '61c335032f64054d173a44639ab41ead131d0cdf' }, h("main", { key: '6dd23dc9d8b600d1747213396968b9601e04f83e', part: "main" }, h(Render, { key: 'efa5e5be367c3423e7fdd280fd9ec66ce5d50134', element: "rtk-simple-grid", defaults: defaults, props: {
|
|
70
70
|
part: 'main-grid',
|
|
71
71
|
participants: this.pinnedParticipants,
|
|
72
72
|
aspectRatio: this.aspectRatio,
|
|
73
73
|
gap: this.gap,
|
|
74
74
|
size: this.getAdaptiveSize(this.pinnedParticipants.length),
|
|
75
|
-
} })), nonPinnedParticipants.length > 0 && (h("aside", { key: '
|
|
75
|
+
} })), nonPinnedParticipants.length > 0 && (h("aside", { key: '183ea410b2afb776dec7fc9fd2dbcd33d1ae285a', part: "aside", class: this.gridSize.spotlight ? `grid-width-${this.gridSize.spotlight}` : 'grid-width-md' }, h(Render, { key: 'cb763ff9d4c6358f63e974d1984de3c67ffee3b5', element: "rtk-simple-grid", defaults: defaults, props: {
|
|
76
76
|
part: 'aside-grid',
|
|
77
77
|
participants: nonPinnedParticipants,
|
|
78
78
|
aspectRatio: this.aspectRatio,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,e as s,h as i}from"./p-gJCRRBX0.js";import"./p-DxDYE5-a.js";import"./p-C0vp-Q7v.js";import{e as r}from"./p-DI7wP4CL.js";import{S as e}from"./p-BmRffDYW.js";import{d as h}from"./p-MlOz-emx.js";import"./p-Daj_55_i.js";const a=class{constructor(i){t(this,i),this.visibleItemsCount=20,this.estimateItemSize=100,this.iconPack=r,this.isFetching=!1,this.autoScroll=!0,this.totalHeight=0,this.sizes=new Map,this.lastScrollTop=0,this.scrollToBottomRetries=0,this.elementObserver=(()=>{let t=null;const s=()=>t||("undefined"!=typeof ResizeObserver?t=new ResizeObserver((t=>{t.forEach((t=>{this.measureElement(t.target,t)}))})):null);return{disconnect:()=>{var t;return null===(t=s())||void 0===t?void 0:t.disconnect()},observe:t=>{var i;return null===(i=s())||void 0===i?void 0:i.observe(t,{box:"border-box"})},unobserve:t=>{var i;return null===(i=s())||void 0===i?void 0:i.unobserve(t)}}})(),this.measureElement=(t,s)=>{if(!t)return;const i=t.dataset.id;if(this.sizes.has(i))return void this.elementObserver.unobserve(t);if(s){const r=s.borderBoxSize[0];if(r&&r.blockSize>0)return this.saveItemSize(i,r.blockSize),void this.elementObserver.unobserve(t)}const r=t.getBoundingClientRect();r.height>0&&this.saveItemSize(i,r.height)},this.getVisibleItems=()=>this.messages.slice(this.range.start,this.range.end+1),this.updateVisibleItems=(t,s)=>{const i=this.messages.length;let r=t,e=s;i<=this.visibleItemsCount?(r=0,e=i-1):s-t<this.visibleItemsCount-1&&(r=this.range.end-this.visibleItemsCount+1),this.range.start!==r&&(this.range={start:r,end:e},this.totalHeight=this.getRangeSize(0,i))},this.getEstimatedItemSize=()=>this.estimateItemSize,this.getRangeSize=(t,s)=>{let i=0,r=0;for(let e=t;e<s;e++)r=this.sizes.get(this.messages[e].id),i+=r||this.getEstimatedItemSize();return i},this.getScrollTop=()=>this.$listRef?Math.ceil(this.$listRef.scrollTop):0,this.getClientHeight=()=>this.$listRef?Math.ceil(this.$listRef.clientHeight):0,this.getScrollHeight=()=>this.$listRef?Math.ceil(this.$listRef.scrollHeight):0,this.getItemsScrolled=()=>{const t=this.lastScrollTop;if(t<=0)return 0;let s=0,i=0,r=0,e=this.messages.length;for(;s<=e;){if(i=s+e>>>1,r=this.getRangeSize(0,i),r===t)return i;r<t?s=i+1:r>t&&(e=i-1)}return s>0?--s:0},this.getEndByStart=t=>Math.min(t+this.visibleItemsCount,this.messages.length-1),this.scrollToOffset=t=>{this.$listRef&&(this.$listRef.scrollTop=t)},this.scrollToIndex=t=>{if(t>=this.messages.length-1)this.scrollToBottom();else{const s=t<1?0:this.getRangeSize(0,t);this.scrollToOffset(s)}},this.scrollToBottom=()=>{this.$listEndRef&&s((()=>{this.$listEndRef.scrollIntoView(),this.getScrollHeight()-(this.getScrollTop()+this.getClientHeight())>0&&this.scrollToBottomRetries<10?setTimeout((()=>{this.scrollToBottom()}),1e3/60):(this.scrollToBottomRetries=0,this.autoScroll=!0)}))},this.handleScroll=async()=>{if(this.isFetching)return;const t=this.getScrollTop(),s=t<this.lastScrollTop||0===t?"UP":"DOWN";if(this.lastScrollTop=t,this.loadMore&&0===t&&"UP"===s&&!1===this.isFetching){this.isFetching=!0;const t=await this.loadMore(this.messages[0]);t&&t.length&&(this.messages=[...t,...this.messages]),this.isFetching=!1}"UP"===s?this.handleTop():"DOWN"===s&&this.handleBottom()},this.handleTop=()=>{const t=this.getItemsScrolled();if(t<=this.range.end-5&&(this.autoScroll=!1),t>this.range.start+5)return;const s=Math.max(this.range.start-5,0);this.updateVisibleItems(s,this.getEndByStart(s))},this.handleBottom=()=>{if(this.getItemsScrolled()<this.range.start+5)return;const t=this.range.start+5,s=this.getEndByStart(t);this.updateVisibleItems(s===this.messages.length-1?s-this.visibleItemsCount:t,s)},this.updateTotalHeight=h((()=>{this.totalHeight=this.getRangeSize(0,this.messages.length)}),1e3/30,{leading:!0}),this.rendererInternal=(t,s,i)=>{if(!t)return;if(t.dataset.id===s.id)return;const r=this.renderer(s,i);t.hasChildNodes&&(t.innerHTML=""),this.elementObserver.observe(t),t.dataset.id=s.id,t.appendChild(r)}}connectedCallback(){const t=this.messages.length-1;this.range={start:t-this.visibleItemsCount,end:t},this.updateVisibleItems(this.range.start,this.range.end),this.totalHeight=this.getRangeSize(0,t)}componentDidLoad(){this.autoScroll&&this.scrollToBottom()}messagesUpdated(t,s){if(t.length>s.length){const i=t.length-s.length;this.updateVisibleItems(i,this.getEndByStart(i)),this.scrollToIndex(this.range.start)}}saveItemSize(t,s){this.sizes.set(t,Math.round(s)),this.updateTotalHeight()}render(){return i("div",{key:"
|
|
1
|
+
import{r as t,e as s,h as i}from"./p-gJCRRBX0.js";import"./p-DxDYE5-a.js";import"./p-C0vp-Q7v.js";import{e as r}from"./p-DI7wP4CL.js";import{S as e}from"./p-BmRffDYW.js";import{d as h}from"./p-MlOz-emx.js";import"./p-Daj_55_i.js";const a=class{constructor(i){t(this,i),this.visibleItemsCount=20,this.estimateItemSize=100,this.iconPack=r,this.isFetching=!1,this.autoScroll=!0,this.totalHeight=0,this.sizes=new Map,this.lastScrollTop=0,this.scrollToBottomRetries=0,this.elementObserver=(()=>{let t=null;const s=()=>t||("undefined"!=typeof ResizeObserver?t=new ResizeObserver((t=>{t.forEach((t=>{this.measureElement(t.target,t)}))})):null);return{disconnect:()=>{var t;return null===(t=s())||void 0===t?void 0:t.disconnect()},observe:t=>{var i;return null===(i=s())||void 0===i?void 0:i.observe(t,{box:"border-box"})},unobserve:t=>{var i;return null===(i=s())||void 0===i?void 0:i.unobserve(t)}}})(),this.measureElement=(t,s)=>{if(!t)return;const i=t.dataset.id;if(this.sizes.has(i))return void this.elementObserver.unobserve(t);if(s){const r=s.borderBoxSize[0];if(r&&r.blockSize>0)return this.saveItemSize(i,r.blockSize),void this.elementObserver.unobserve(t)}const r=t.getBoundingClientRect();r.height>0&&this.saveItemSize(i,r.height)},this.getVisibleItems=()=>this.messages.slice(this.range.start,this.range.end+1),this.updateVisibleItems=(t,s)=>{const i=this.messages.length;let r=t,e=s;i<=this.visibleItemsCount?(r=0,e=i-1):s-t<this.visibleItemsCount-1&&(r=this.range.end-this.visibleItemsCount+1),this.range.start!==r&&(this.range={start:r,end:e},this.totalHeight=this.getRangeSize(0,i))},this.getEstimatedItemSize=()=>this.estimateItemSize,this.getRangeSize=(t,s)=>{let i=0,r=0;for(let e=t;e<s;e++)r=this.sizes.get(this.messages[e].id),i+=r||this.getEstimatedItemSize();return i},this.getScrollTop=()=>this.$listRef?Math.ceil(this.$listRef.scrollTop):0,this.getClientHeight=()=>this.$listRef?Math.ceil(this.$listRef.clientHeight):0,this.getScrollHeight=()=>this.$listRef?Math.ceil(this.$listRef.scrollHeight):0,this.getItemsScrolled=()=>{const t=this.lastScrollTop;if(t<=0)return 0;let s=0,i=0,r=0,e=this.messages.length;for(;s<=e;){if(i=s+e>>>1,r=this.getRangeSize(0,i),r===t)return i;r<t?s=i+1:r>t&&(e=i-1)}return s>0?--s:0},this.getEndByStart=t=>Math.min(t+this.visibleItemsCount,this.messages.length-1),this.scrollToOffset=t=>{this.$listRef&&(this.$listRef.scrollTop=t)},this.scrollToIndex=t=>{if(t>=this.messages.length-1)this.scrollToBottom();else{const s=t<1?0:this.getRangeSize(0,t);this.scrollToOffset(s)}},this.scrollToBottom=()=>{this.$listEndRef&&s((()=>{this.$listEndRef.scrollIntoView(),this.getScrollHeight()-(this.getScrollTop()+this.getClientHeight())>0&&this.scrollToBottomRetries<10?setTimeout((()=>{this.scrollToBottom()}),1e3/60):(this.scrollToBottomRetries=0,this.autoScroll=!0)}))},this.handleScroll=async()=>{if(this.isFetching)return;const t=this.getScrollTop(),s=t<this.lastScrollTop||0===t?"UP":"DOWN";if(this.lastScrollTop=t,this.loadMore&&0===t&&"UP"===s&&!1===this.isFetching){this.isFetching=!0;const t=await this.loadMore(this.messages[0]);t&&t.length&&(this.messages=[...t,...this.messages]),this.isFetching=!1}"UP"===s?this.handleTop():"DOWN"===s&&this.handleBottom()},this.handleTop=()=>{const t=this.getItemsScrolled();if(t<=this.range.end-5&&(this.autoScroll=!1),t>this.range.start+5)return;const s=Math.max(this.range.start-5,0);this.updateVisibleItems(s,this.getEndByStart(s))},this.handleBottom=()=>{if(this.getItemsScrolled()<this.range.start+5)return;const t=this.range.start+5,s=this.getEndByStart(t);this.updateVisibleItems(s===this.messages.length-1?s-this.visibleItemsCount:t,s)},this.updateTotalHeight=h((()=>{this.totalHeight=this.getRangeSize(0,this.messages.length)}),1e3/30,{leading:!0}),this.rendererInternal=(t,s,i)=>{if(!t)return;if(t.dataset.id===s.id)return;const r=this.renderer(s,i);t.hasChildNodes&&(t.innerHTML=""),this.elementObserver.observe(t),t.dataset.id=s.id,t.appendChild(r)}}connectedCallback(){const t=this.messages.length-1;this.range={start:t-this.visibleItemsCount,end:t},this.updateVisibleItems(this.range.start,this.range.end),this.totalHeight=this.getRangeSize(0,t)}componentDidLoad(){this.autoScroll&&this.scrollToBottom()}messagesUpdated(t,s){if(t.length>s.length){const i=t.length-s.length;this.updateVisibleItems(i,this.getEndByStart(i)),this.scrollToIndex(this.range.start)}}saveItemSize(t,s){this.sizes.set(t,Math.round(s)),this.updateTotalHeight()}render(){return i("div",{key:"8da5ac7ee83f43da54ce1af023e178d206436b80",class:"scrollbar content-wrapper",ref:t=>this.$listRef=t,onScroll:this.handleScroll},i("div",{key:"3aeec25e25aeb2864b7ce0d68a08d58bb2b63cef",class:"scroller"},i("div",{key:"b65b2fb4471307f38c08480d268adfaafdb696fb",style:{height:`${this.totalHeight}px`}}),i("div",{key:"08aa1dcf4740ce438b152527e8d60aff28704e8a",class:"smallest-dom-element",id:"list-end",ref:t=>this.$listEndRef=t})),i("div",{key:"48ba3788f83f2329174fb3ddd107eaf4da91699a",class:"content",style:{transform:`translateY(${this.getRangeSize(0,this.range.start)}px)`}},this.isFetching&&i("div",{key:"1a53b6b02899df6ce80c781b44fcd71802105fdf",class:"loader"},i("rtk-spinner",{key:"222bdf5ad19f45914f48c91afb65075e3fef277f",size:"md"})),this.getVisibleItems().map(((t,s)=>i("div",{key:t.id,ref:i=>this.rendererInternal(i,t,s)})))))}static get watchers(){return{messages:[{messagesUpdated:0}]}}};(function(t,s,i,r){var e,h=arguments.length,a=h<3?s:null===r?r=Object.getOwnPropertyDescriptor(s,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,s,i,r);else for(var o=t.length-1;o>=0;o--)(e=t[o])&&(a=(h<3?e(a):h>3?e(s,i,a):e(s,i))||a);h>3&&a&&Object.defineProperty(s,i,a)})([e()],a.prototype,"iconPack",void 0),a.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60))) var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}.loading{cursor:wait}.content-wrapper{height:100%;overflow-y:auto;position:relative;contain:strict}.scroller{width:1px;opacity:0}.content{position:absolute;top:0;width:100%}.smallest-dom-element{width:100%;height:2px;background:red}.loader{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);display:flex;justify-content:center}";export{a as rtk_message_list_view}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,h as t,a as s,g as e}from"./p-gJCRRBX0.js";import{c as
|
|
1
|
+
import{r as i,h as t,a as s,g as e}from"./p-gJCRRBX0.js";import{c as d,e as h,i as a}from"./p-DI7wP4CL.js";import{d as r}from"./p-CmmyVCoN.js";import{R as o}from"./p-CTFO-5XH.js";import{S as m}from"./p-BmRffDYW.js";var c=function(i,t,s,e){var d,h=arguments.length,a=h<3?t:null===e?e=Object.getOwnPropertyDescriptor(t,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(i,t,s,e);else for(var r=i.length-1;r>=0;r--)(d=i[r])&&(a=(h<3?d(a):h>3?d(t,s,a):d(t,s))||a);return h>3&&a&&Object.defineProperty(t,s,a),a};const f=class{constructor(t){i(this,t),this.layout="row",this.participants=[],this.pinnedParticipants=[],this.aspectRatio="16:9",this.gap=8,this.config=d(),this.iconPack=h,this.t=a(),this.gridSize=r,this.getAdaptiveSize=i=>"sm"===this.size||i>3||"md"===this.size?"sm":"md"}render(){const i={meeting:this.meeting,config:this.config,states:this.states,size:this.size,iconPack:this.iconPack,t:this.t},e=this.participants.filter((i=>this.pinnedParticipants.some((t=>t.id!=i.id))));return t(s,{key:"61c335032f64054d173a44639ab41ead131d0cdf"},t("main",{key:"6dd23dc9d8b600d1747213396968b9601e04f83e",part:"main"},t(o,{key:"efa5e5be367c3423e7fdd280fd9ec66ce5d50134",element:"rtk-simple-grid",defaults:i,props:{part:"main-grid",participants:this.pinnedParticipants,aspectRatio:this.aspectRatio,gap:this.gap,size:this.getAdaptiveSize(this.pinnedParticipants.length)}})),e.length>0&&t("aside",{key:"183ea410b2afb776dec7fc9fd2dbcd33d1ae285a",part:"aside",class:this.gridSize.spotlight?`grid-width-${this.gridSize.spotlight}`:"grid-width-md"},t(o,{key:"cb763ff9d4c6358f63e974d1984de3c67ffee3b5",element:"rtk-simple-grid",defaults:i,props:{part:"aside-grid",participants:e,aspectRatio:this.aspectRatio,gap:this.gap,size:this.getAdaptiveSize(e.length)}})))}get host(){return e(this)}};c([m()],f.prototype,"meeting",void 0),c([m()],f.prototype,"states",void 0),c([m()],f.prototype,"config",void 0),c([m()],f.prototype,"iconPack",void 0),c([m()],f.prototype,"t",void 0),f.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;height:100%;width:100%}main{flex:1 1 0%}.grid-width-sm{width:25%}.grid-width-md{width:50%}.grid-width-lg{width:66.666667%}:host([size='sm']),:host([size='md']){flex-direction:column}:host([size='md']) aside{max-height:var(--rtk-space-96, 384px);width:100%;max-width:100%}:host([size='md']) .grid-width-sm{height:25%}:host([size='md']) .grid-width-md{height:50%}:host([size='md']) .grid-width-lg{height:66.666667%}:host([size='sm']) aside{max-height:var(--rtk-space-96, 384px);width:100%;max-width:100%}:host([size='sm']) .grid-width-sm,:host([size='sm']) .grid-width-md,:host([size='sm']) .grid-width-lg{height:50%}:host([size='xl']) .grid-width-sm,:host([size='xl']) .grid-width-md,:host([size='xl']) .grid-width-lg{width:400px}:host([layout='column']){flex-direction:column}:host([layout='column']) main{flex:4}:host([layout='column']) aside{flex:2;max-width:100%;width:100%}";export{f as rtk_spotlight_grid}
|