@cloudflare/realtimekit-ui 1.0.2 → 1.0.3-staging.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 (113) hide show
  1. package/dist/browser.js +1 -0
  2. package/dist/cjs/{floating-ui.dom.esm-c3c35b98.js → floating-ui.dom.esm-90c5a220.js} +54 -30
  3. package/dist/cjs/rtk-avatar_54.cjs.entry.js +2 -2
  4. package/dist/cjs/rtk-livestream-indicator_3.cjs.entry.js +30892 -23958
  5. package/dist/cjs/rtk-participant_2.cjs.entry.js +1 -1
  6. package/dist/cjs/rtk-setup-screen.cjs.entry.js +4 -4
  7. package/dist/collection/components/rtk-audio-tile/rtk-audio-tile.js +1 -1
  8. package/dist/collection/components/rtk-audio-visualizer/rtk-audio-visualizer.js +1 -1
  9. package/dist/collection/components/rtk-avatar/rtk-avatar.js +1 -1
  10. package/dist/collection/components/rtk-breakout-room-toggle/rtk-breakout-rooms-toggle.js +1 -1
  11. package/dist/collection/components/rtk-breakout-rooms-manager/rtk-breakout-rooms-manager.js +1 -1
  12. package/dist/collection/components/rtk-channel-selector-view/rtk-channel-selector-view.js +2 -2
  13. package/dist/collection/components/rtk-file-picker-button/rtk-file-picker-button.js +1 -1
  14. package/dist/collection/components/rtk-name-tag/rtk-name-tag.js +1 -1
  15. package/dist/collection/components/rtk-network-indicator/rtk-network-indicator.js +1 -1
  16. package/dist/collection/components/rtk-notification/rtk-notification.css +6 -3
  17. package/dist/collection/components/rtk-participant/rtk-participant.js +1 -1
  18. package/dist/collection/components/rtk-participant-setup/rtk-participant-setup.js +1 -1
  19. package/dist/collection/components/rtk-participant-tile/rtk-participant-tile.js +2 -2
  20. package/dist/collection/components/rtk-plugin-main/rtk-plugin-main.js +1 -1
  21. package/dist/collection/components/rtk-poll/rtk-poll.js +1 -1
  22. package/dist/collection/components/rtk-screenshare-view/rtk-screenshare-view.js +1 -1
  23. package/dist/collection/components/rtk-setup-screen/rtk-setup-screen.js +4 -4
  24. package/dist/components/{p-5e5c9b53.js → p-01b76741.js} +1 -1
  25. package/dist/components/{p-c6a4041a.js → p-07c5a2da.js} +1 -1
  26. package/dist/components/{p-94e8d526.js → p-11048ea8.js} +1 -1
  27. package/dist/components/{p-778197ec.js → p-11b00854.js} +1 -1
  28. package/dist/components/{p-70053efe.js → p-1a6ad05c.js} +30892 -23958
  29. package/dist/components/{p-828a11f4.js → p-1c22a3a0.js} +3 -3
  30. package/dist/components/{p-519e8701.js → p-1f0c5462.js} +1 -1
  31. package/dist/components/{p-98d49c8e.js → p-22f2908e.js} +1 -1
  32. package/dist/components/{p-1174d3f4.js → p-2c41819d.js} +2 -2
  33. package/dist/components/{p-ff13d28d.js → p-2e9c3dd2.js} +1 -1
  34. package/dist/components/{p-abdd2a8a.js → p-4b89a5d6.js} +1 -1
  35. package/dist/components/{p-2cc196a8.js → p-6d3c8a73.js} +1 -1
  36. package/dist/components/{p-e2006e05.js → p-8faf31ba.js} +18 -18
  37. package/dist/components/{p-31964573.js → p-94cc1b33.js} +54 -30
  38. package/dist/components/{p-1633eae1.js → p-97ce630d.js} +2 -2
  39. package/dist/components/{p-1d7f3c99.js → p-98cc289f.js} +3 -3
  40. package/dist/components/{p-83a87193.js → p-9b675f4f.js} +1 -1
  41. package/dist/components/{p-8750e2de.js → p-a0000935.js} +2 -2
  42. package/dist/components/{p-9140d5c1.js → p-b29a58cd.js} +1 -1
  43. package/dist/components/{p-de2175ca.js → p-b2b2e917.js} +1 -1
  44. package/dist/components/{p-be584d57.js → p-be45dbd1.js} +2 -2
  45. package/dist/components/{p-af7aea98.js → p-c1f57f6b.js} +1 -1
  46. package/dist/components/{p-c173a513.js → p-cc6ff913.js} +1 -1
  47. package/dist/components/{p-278e6cc0.js → p-d5ce79e0.js} +1 -1
  48. package/dist/components/{p-c226934a.js → p-d8be719c.js} +4 -4
  49. package/dist/components/{p-25738f7b.js → p-db6f9f73.js} +1 -1
  50. package/dist/components/{p-fb31f34b.js → p-e83a6293.js} +1 -1
  51. package/dist/components/{p-a5d2ac22.js → p-eba76ab4.js} +4 -4
  52. package/dist/components/{p-1f6e5501.js → p-ed0df5b1.js} +1 -1
  53. package/dist/components/rtk-breakout-room-manager.js +1 -1
  54. package/dist/components/rtk-breakout-room-participants.js +1 -1
  55. package/dist/components/rtk-breakout-rooms-manager.js +1 -1
  56. package/dist/components/rtk-camera-toggle.js +1 -1
  57. package/dist/components/rtk-channel-header.js +1 -1
  58. package/dist/components/rtk-chat-composer-ui.js +1 -1
  59. package/dist/components/rtk-chat-composer-view.js +1 -1
  60. package/dist/components/rtk-chat-message.js +1 -1
  61. package/dist/components/rtk-chat-messages-ui-paginated.js +1 -1
  62. package/dist/components/rtk-chat-messages-ui.js +1 -1
  63. package/dist/components/rtk-chat-search-results.js +1 -1
  64. package/dist/components/rtk-chat.js +1 -1
  65. package/dist/components/rtk-dialog-manager.js +1 -1
  66. package/dist/components/rtk-draft-attachment-view.js +1 -1
  67. package/dist/components/rtk-emoji-picker-button.js +1 -1
  68. package/dist/components/rtk-file-picker-button.js +1 -1
  69. package/dist/components/rtk-grid-pagination.js +1 -1
  70. package/dist/components/rtk-grid.js +1 -1
  71. package/dist/components/rtk-livestream-player.js +1 -1
  72. package/dist/components/rtk-meeting-title.js +1 -1
  73. package/dist/components/rtk-meeting.js +19 -19
  74. package/dist/components/rtk-menu.js +1 -1
  75. package/dist/components/rtk-message-view.js +1 -1
  76. package/dist/components/rtk-mic-toggle.js +1 -1
  77. package/dist/components/rtk-mixed-grid.js +3 -3
  78. package/dist/components/rtk-mute-all-button.js +1 -1
  79. package/dist/components/rtk-notification.js +1 -1
  80. package/dist/components/rtk-notifications.js +1 -1
  81. package/dist/components/rtk-participant.js +1 -1
  82. package/dist/components/rtk-participants-stage-queue.js +1 -1
  83. package/dist/components/rtk-participants-viewer-list.js +1 -1
  84. package/dist/components/rtk-participants-waiting-list.js +1 -1
  85. package/dist/components/rtk-participants.js +5 -5
  86. package/dist/components/rtk-poll.js +1 -1
  87. package/dist/components/rtk-polls.js +1 -1
  88. package/dist/components/rtk-screen-share-toggle.js +1 -1
  89. package/dist/components/rtk-screenshare-view.js +1 -1
  90. package/dist/components/rtk-setup-screen.js +4 -4
  91. package/dist/components/rtk-sidebar.js +3 -3
  92. package/dist/components/rtk-spotlight-indicator.js +1 -1
  93. package/dist/components/rtk-stage-toggle.js +1 -1
  94. package/dist/components/rtk-tab-bar.js +1 -1
  95. package/dist/components/rtk-tooltip.js +1 -1
  96. package/dist/docs/docs-components.json +118 -118
  97. package/dist/docs/docs-vscode.json +12 -12
  98. package/dist/esm/{floating-ui.dom.esm-cf1488a2.js → floating-ui.dom.esm-a2dc8eef.js} +54 -30
  99. package/dist/esm/loader.js +63224 -4
  100. package/dist/esm/rtk-avatar_54.entry.js +2 -2
  101. package/dist/esm/rtk-livestream-indicator_3.entry.js +30892 -23958
  102. package/dist/esm/rtk-participant_2.entry.js +1 -1
  103. package/dist/esm/rtk-setup-screen.entry.js +4 -4
  104. package/dist/realtimekit-ui/{p-c39a8005.entry.js → p-14350b0d.entry.js} +1 -1
  105. package/dist/realtimekit-ui/p-1abb4841.entry.js +1 -0
  106. package/dist/realtimekit-ui/p-94cc1b33.js +1 -0
  107. package/dist/realtimekit-ui/{p-2db001cf.entry.js → p-dd9ea778.entry.js} +1 -1
  108. package/dist/realtimekit-ui/p-f4105345.entry.js +1 -0
  109. package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -1
  110. package/package.json +2 -3
  111. package/dist/realtimekit-ui/p-0b8b849b.entry.js +0 -1
  112. package/dist/realtimekit-ui/p-31964573.js +0 -1
  113. package/dist/realtimekit-ui/p-b60b229e.entry.js +0 -1
@@ -1 +0,0 @@
1
- const t=["top","right","bottom","left"],n=["start","end"],e=t.reduce(((t,e)=>t.concat(e,e+"-"+n[0],e+"-"+n[1])),[]),r=Math.min,o=Math.max,i=Math.round,a=t=>({x:t,y:t}),c={left:"right",right:"left",bottom:"top",top:"bottom"},l={start:"end",end:"start"};function s(t,n,e){return o(t,r(n,e))}function u(t,n){return"function"==typeof t?t(n):t}function f(t){return t.split("-")[0]}function d(t){return t.split("-")[1]}function m(t){return"x"===t?"y":"x"}function y(t){return"y"===t?"height":"width"}function p(t){return["top","bottom"].includes(f(t))?"y":"x"}function h(t){return m(p(t))}function w(t,n,e){void 0===e&&(e=!1);const r=d(t),o=h(t),i=y(o);let a="x"===o?r===(e?"end":"start")?"right":"left":"start"===r?"bottom":"top";return n.reference[i]>n.floating[i]&&(a=x(a)),[a,x(a)]}function g(t){return t.replace(/start|end/g,(t=>l[t]))}function x(t){return t.replace(/left|right|bottom|top/g,(t=>c[t]))}function v(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function b(t){const{x:n,y:e,width:r,height:o}=t;return{width:r,height:o,top:e,left:n,right:n+r,bottom:e+o,x:n,y:e}}function A(t,n,e){let{reference:r,floating:o}=t;const i=p(n),a=h(n),c=y(a),l=f(n),s="y"===i,u=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,w=r[c]/2-o[c]/2;let g;switch(l){case"top":g={x:u,y:r.y-o.height};break;case"bottom":g={x:u,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:m};break;case"left":g={x:r.x-o.width,y:m};break;default:g={x:r.x,y:r.y}}switch(d(n)){case"start":g[a]-=w*(e&&s?-1:1);break;case"end":g[a]+=w*(e&&s?-1:1)}return g}async function k(t,n){var e;void 0===n&&(n={});const{x:r,y:o,platform:i,rects:a,elements:c,strategy:l}=t,{boundary:s="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:y=0}=u(n,t),p=v(y),h=c[m?"floating"===d?"reference":"floating":d],w=b(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(h)))||e?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:s,rootBoundary:f,strategy:l})),g="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c.floating)),A=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},k=b(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:g,offsetParent:x,strategy:l}):g);return{top:(w.top-k.top+p.top)/A.y,bottom:(k.bottom-w.bottom+p.bottom)/A.y,left:(w.left-k.left+p.left)/A.x,right:(k.right-w.right+p.right)/A.x}}function S(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function P(n){return t.some((t=>n[t]>=0))}function R(){return"undefined"!=typeof window}function D(t){return T(t)?(t.nodeName||"").toLowerCase():"#document"}function C(t){var n;return(null==t||null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function O(t){var n;return null==(n=(T(t)?t.ownerDocument:t.document)||window.document)?void 0:n.documentElement}function T(t){return!!R()&&(t instanceof Node||t instanceof C(t).Node)}function B(t){return!!R()&&(t instanceof Element||t instanceof C(t).Element)}function F(t){return!!R()&&(t instanceof HTMLElement||t instanceof C(t).HTMLElement)}function H(t){return!(!R()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof C(t).ShadowRoot)}function L(t){const{overflow:n,overflowX:e,overflowY:r,display:o}=V(t);return/auto|scroll|overlay|hidden|clip/.test(n+r+e)&&!["inline","contents"].includes(o)}function E(t){return["table","td","th"].includes(D(t))}function M(t){return[":popover-open",":modal"].some((n=>{try{return t.matches(n)}catch(t){return!1}}))}function N(t){const n=j(),e=B(t)?V(t):t;return["transform","translate","scale","rotate","perspective"].some((t=>!!e[t]&&"none"!==e[t]))||!!e.containerType&&"normal"!==e.containerType||!n&&!!e.backdropFilter&&"none"!==e.backdropFilter||!n&&!!e.filter&&"none"!==e.filter||["transform","translate","scale","rotate","perspective","filter"].some((t=>(e.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(e.contain||"").includes(t)))}function j(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function $(t){return["html","body","#document"].includes(D(t))}function V(t){return C(t).getComputedStyle(t)}function W(t){return B(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function X(t){if("html"===D(t))return t;const n=t.assignedSlot||t.parentNode||H(t)&&t.host||O(t);return H(n)?n.host:n}function Y(t){const n=X(t);return $(n)?t.ownerDocument?t.ownerDocument.body:t.body:F(n)&&L(n)?n:Y(n)}function _(t,n,e){var r;void 0===n&&(n=[]),void 0===e&&(e=!0);const o=Y(t),i=o===(null==(r=t.ownerDocument)?void 0:r.body),a=C(o);if(i){const t=q(a);return n.concat(a,a.visualViewport||[],L(o)?o:[],t&&e?_(t):[])}return n.concat(o,_(o,[],e))}function q(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function z(t){const n=V(t);let e=parseFloat(n.width)||0,r=parseFloat(n.height)||0;const o=F(t),a=o?t.offsetWidth:e,c=o?t.offsetHeight:r,l=i(e)!==a||i(r)!==c;return l&&(e=a,r=c),{width:e,height:r,$:l}}function G(t){return B(t)?t:t.contextElement}function I(t){const n=G(t);if(!F(n))return a(1);const e=n.getBoundingClientRect(),{width:r,height:o,$:c}=z(n);let l=(c?i(e.width):e.width)/r,s=(c?i(e.height):e.height)/o;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const J=a(0);function K(t){const n=C(t);return j()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:J}function Q(t,n,e,r){void 0===n&&(n=!1),void 0===e&&(e=!1);const o=t.getBoundingClientRect(),i=G(t);let c=a(1);n&&(r?B(r)&&(c=I(r)):c=I(t));const l=function(t,n,e){return void 0===n&&(n=!1),!(!e||n&&e!==C(t))&&n}(i,e,r)?K(i):a(0);let s=(o.left+l.x)/c.x,u=(o.top+l.y)/c.y,f=o.width/c.x,d=o.height/c.y;if(i){const t=C(i),n=r&&B(r)?C(r):r;let e=t,o=q(e);for(;o&&r&&n!==e;){const t=I(o),n=o.getBoundingClientRect(),r=V(o),i=n.left+(o.clientLeft+parseFloat(r.paddingLeft))*t.x,a=n.top+(o.clientTop+parseFloat(r.paddingTop))*t.y;s*=t.x,u*=t.y,f*=t.x,d*=t.y,s+=i,u+=a,e=C(o),o=q(e)}}return b({width:f,height:d,x:s,y:u})}function U(t,n){const e=W(t).scrollLeft;return n?n.left+e:Q(O(t)).left+e}function Z(t,n,e){void 0===e&&(e=!1);const r=t.getBoundingClientRect();return{x:r.left+n.scrollLeft-(e?0:U(t,r)),y:r.top+n.scrollTop}}function tt(t,n,e){let r;if("viewport"===n)r=function(t,n){const e=C(t),r=O(t),o=e.visualViewport;let i=r.clientWidth,a=r.clientHeight,c=0,l=0;if(o){i=o.width,a=o.height;const t=j();(!t||t&&"fixed"===n)&&(c=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:c,y:l}}(t,e);else if("document"===n)r=function(t){const n=O(t),e=W(t),r=t.ownerDocument.body,i=o(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),a=o(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let c=-e.scrollLeft+U(t);const l=-e.scrollTop;return"rtl"===V(r).direction&&(c+=o(n.clientWidth,r.clientWidth)-i),{width:i,height:a,x:c,y:l}}(O(t));else if(B(n))r=function(t,n){const e=Q(t,!0,"fixed"===n),r=e.top+t.clientTop,o=e.left+t.clientLeft,i=F(t)?I(t):a(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:o*i.x,y:r*i.y}}(n,e);else{const e=K(t);r={x:n.x-e.x,y:n.y-e.y,width:n.width,height:n.height}}return b(r)}function nt(t,n){const e=X(t);return!(e===n||!B(e)||$(e))&&("fixed"===V(e).position||nt(e,n))}function et(t,n,e){const r=F(n),o=O(n),i="fixed"===e,c=Q(t,!0,i,n);let l={scrollLeft:0,scrollTop:0};const s=a(0);if(r||!r&&!i)if(("body"!==D(n)||L(o))&&(l=W(n)),r){const t=Q(n,!0,i,n);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}else o&&(s.x=U(o));const u=!o||r||i?a(0):Z(o,l);return{x:c.left+l.scrollLeft-s.x-u.x,y:c.top+l.scrollTop-s.y-u.y,width:c.width,height:c.height}}function rt(t){return"static"===V(t).position}function ot(t,n){if(!F(t)||"fixed"===V(t).position)return null;if(n)return n(t);let e=t.offsetParent;return O(t)===e&&(e=e.ownerDocument.body),e}function it(t,n){const e=C(t);if(M(t))return e;if(!F(t)){let n=X(t);for(;n&&!$(n);){if(B(n)&&!rt(n))return n;n=X(n)}return e}let r=ot(t,n);for(;r&&E(r)&&rt(r);)r=ot(r,n);return r&&$(r)&&rt(r)&&!N(r)?e:r||function(t){let n=X(t);for(;F(n)&&!$(n);){if(N(n))return n;if(M(n))return null;n=X(n)}return null}(t)||e}const at={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:n,rect:e,offsetParent:r,strategy:o}=t;const i="fixed"===o,c=O(r),l=!!n&&M(n.floating);if(r===c||l&&i)return e;let s={scrollLeft:0,scrollTop:0},u=a(1);const f=a(0),d=F(r);if((d||!d&&!i)&&(("body"!==D(r)||L(c))&&(s=W(r)),F(r))){const t=Q(r);u=I(r),f.x=t.x+r.clientLeft,f.y=t.y+r.clientTop}const m=!c||d||i?a(0):Z(c,s,!0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-s.scrollLeft*u.x+f.x+m.x,y:e.y*u.y-s.scrollTop*u.y+f.y+m.y}},getDocumentElement:O,getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:i,strategy:a}=t;const c=[..."clippingAncestors"===e?M(n)?[]:function(t,n){const e=n.get(t);if(e)return e;let r=_(t,[],!1).filter((t=>B(t)&&"body"!==D(t))),o=null;const i="fixed"===V(t).position;let a=i?X(t):t;for(;B(a)&&!$(a);){const n=V(a),e=N(a);e||"fixed"!==n.position||(o=null),(i?!e&&!o:!e&&"static"===n.position&&o&&["absolute","fixed"].includes(o.position)||L(a)&&!e&&nt(t,a))?r=r.filter((t=>t!==a)):o=n,a=X(a)}return n.set(t,r),r}(n,this._c):[].concat(e),i],l=c.reduce(((t,e)=>{const i=tt(n,e,a);return t.top=o(i.top,t.top),t.right=r(i.right,t.right),t.bottom=r(i.bottom,t.bottom),t.left=o(i.left,t.left),t}),tt(n,c[0],a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:it,getElementRects:async function(t){const n=this.getOffsetParent||it,e=this.getDimensions,r=await e(t.floating);return{reference:et(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:n,height:e}=z(t);return{width:n,height:e}},getScale:I,isElement:B,isRTL:function(t){return"rtl"===V(t).direction}},ct=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(n){var e,r;const{x:o,y:i,placement:a,middlewareData:c}=n,l=await async function(t,n){const{placement:e,platform:r,elements:o}=t,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=f(e),c=d(e),l="y"===p(e),s=["left","top"].includes(a)?-1:1,m=i&&l?-1:1,y=u(n,t);let{mainAxis:h,crossAxis:w,alignmentAxis:g}="number"==typeof y?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return c&&"number"==typeof g&&(w="end"===c?-1*g:g),l?{x:w*m,y:h*s}:{x:h*s,y:w*m}}(n,t);return a===(null==(e=c.offset)?void 0:e.placement)&&null!=(r=c.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},lt=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(n){var r,o,i;const{rects:a,middlewareData:c,placement:l,platform:s,elements:m}=n,{crossAxis:y=!1,alignment:p,allowedPlacements:h=e,autoAlignment:x=!0,...v}=u(t,n),b=void 0!==p||h===e?function(t,n,e){return(t?[...e.filter((n=>d(n)===t)),...e.filter((n=>d(n)!==t))]:e.filter((t=>f(t)===t))).filter((e=>!t||d(e)===t||!!n&&g(e)!==e))}(p||null,x,h):h,A=await k(n,v),S=(null==(r=c.autoPlacement)?void 0:r.index)||0,P=b[S];if(null==P)return{};const R=w(P,a,await(null==s.isRTL?void 0:s.isRTL(m.floating)));if(l!==P)return{reset:{placement:b[0]}};const D=[A[f(P)],A[R[0]],A[R[1]]],C=[...(null==(o=c.autoPlacement)?void 0:o.overflows)||[],{placement:P,overflows:D}],O=b[S+1];if(O)return{data:{index:S+1,overflows:C},reset:{placement:O}};const T=C.map((t=>{const n=d(t.placement);return[t.placement,n&&y?t.overflows.slice(0,2).reduce(((t,n)=>t+n),0):t.overflows[0],t.overflows]})).sort(((t,n)=>t[1]-n[1])),B=(null==(i=T.filter((t=>t[2].slice(0,d(t[0])?2:3).every((t=>t<=0))))[0])?void 0:i[0])||T[0][0];return B!==l?{data:{index:S+1,overflows:C},reset:{placement:B}}:{}}}},st=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(n){const{x:e,y:r,placement:o}=n,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...l}=u(t,n),d={x:e,y:r},y=await k(n,l),h=p(f(o)),w=m(h);let g=d[w],x=d[h];i&&(g=s(g+y["y"===w?"top":"left"],g,g-y["y"===w?"bottom":"right"])),a&&(x=s(x+y["y"===h?"top":"left"],x,x-y["y"===h?"bottom":"right"]));const v=c.fn({...n,[w]:g,[h]:x});return{...v,data:{x:v.x-e,y:v.y-r,enabled:{[w]:i,[h]:a}}}}}},ut=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:c,platform:l,elements:s}=n,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:A=!0,...S}=u(t,n);if(null!=(e=i.arrow)&&e.alignmentOffset)return{};const P=f(o),R=p(c),D=f(c)===c,C=await(null==l.isRTL?void 0:l.isRTL(s.floating)),O=h||(D||!A?[x(c)]:function(t){const n=x(t);return[g(t),n,g(n)]}(c)),T="none"!==b;!h&&T&&O.push(...function(t,n,e,r){const o=d(t);let i=function(t,n,e){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return e?n?o:r:n?r:o;case"left":case"right":return n?i:a;default:return[]}}(f(t),"start"===e,r);return o&&(i=i.map((t=>t+"-"+o)),n&&(i=i.concat(i.map(g)))),i}(c,A,b,C));const B=[c,...O],F=await k(n,S),H=[];let L=(null==(r=i.flip)?void 0:r.overflows)||[];if(m&&H.push(F[P]),y){const t=w(o,a,C);H.push(F[t[0]],F[t[1]])}if(L=[...L,{placement:o,overflows:H}],!H.every((t=>t<=0))){var E,M;const t=((null==(E=i.flip)?void 0:E.index)||0)+1,n=B[t];if(n)return{data:{index:t,overflows:L},reset:{placement:n}};let e=null==(M=L.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:M.placement;if(!e)switch(v){case"bestFit":{var N;const t=null==(N=L.filter((t=>{if(T){const n=p(t.placement);return n===R||"y"===n}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:N[0];t&&(e=t);break}case"initialPlacement":e=c}if(o!==e)return{reset:{placement:e}}}return{}}}},ft=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(n){const{rects:e}=n,{strategy:r="referenceHidden",...o}=u(t,n);switch(r){case"referenceHidden":{const t=S(await k(n,{...o,elementContext:"reference"}),e.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:P(t)}}}case"escaped":{const t=S(await k(n,{...o,altBoundary:!0}),e.floating);return{data:{escapedOffsets:t,escaped:P(t)}}}default:return{}}}}},dt=t=>({name:"arrow",options:t,async fn(n){const{x:e,y:o,placement:i,rects:a,platform:c,elements:l,middlewareData:f}=n,{element:m,padding:p=0}=u(t,n)||{};if(null==m)return{};const w=v(p),g={x:e,y:o},x=h(i),b=y(x),A=await c.getDimensions(m),k="y"===x,S=k?"top":"left",P=k?"bottom":"right",R=k?"clientHeight":"clientWidth",D=a.reference[b]+a.reference[x]-g[x]-a.floating[b],C=g[x]-a.reference[x],O=await(null==c.getOffsetParent?void 0:c.getOffsetParent(m));let T=O?O[R]:0;T&&await(null==c.isElement?void 0:c.isElement(O))||(T=l.floating[R]||a.floating[b]);const B=D/2-C/2,F=T/2-A[b]/2-1,H=r(w[S],F),L=r(w[P],F),E=H,M=T-A[b]-L,N=T/2-A[b]/2+B,j=s(E,N,M),$=!f.arrow&&null!=d(i)&&N!==j&&a.reference[b]/2-(N<E?H:L)-A[b]/2<0,V=$?N<E?N-E:N-M:0;return{[x]:g[x]+V,data:{[x]:j,centerOffset:N-j-V,...$&&{alignmentOffset:V}},reset:$}}}),mt=(t,n,e)=>{const r=new Map,o={platform:at,...e},i={...o.platform,_c:r};return(async(t,n,e)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=e,c=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(n));let s=await a.getElementRects({reference:t,floating:n,strategy:o}),{x:u,y:f}=A(s,r,l),d=r,m={},y=0;for(let e=0;e<c.length;e++){const{name:i,fn:p}=c[e],{x:h,y:w,data:g,reset:x}=await p({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:s,platform:a,elements:{reference:t,floating:n}});u=null!=h?h:u,f=null!=w?w:f,m={...m,[i]:{...m[i],...g}},x&&y<=50&&(y++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(s=!0===x.rects?await a.getElementRects({reference:t,floating:n,strategy:o}):x.rects),({x:u,y:f}=A(s,d,l))),e=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:m}})(t,n,{...o,platform:i})};export{dt as a,lt as b,mt as c,ut as f,ft as h,ct as o,st as s}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as i,F as r,H as o}from"./p-0ee570cd.js";import{s as a}from"./p-338c7261.js";import{d as n,a as c,c as s,k as d}from"./p-d3bf4348.js";import{R as l}from"./p-c8eaa707.js";import{S as p}from"./p-dac97779.js";var b=function(t,e,i,r){var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};const h=class{constructor(i){t(this,i),this.stateUpdate=e(this,"rtkStateUpdate",7),this.config=n,this.iconPack=c,this.t=s(),this.isJoining=!1,this.canEditName=!0,this.canProduceAudio=!0,this.socketStateUpdate=({state:t})=>{this.connectionState=t,"failed"===t&&(this.isJoining=!1)},this.join=async()=>{var t,e,i;if(""!==(null===(t=this.displayName)||void 0===t?void 0:t.trim())&&!this.isJoining){this.isJoining=!0,null===(e=this.meeting)||void 0===e||e.self.setName(this.displayName),d.setItem("rtk-display-name",this.displayName);try{await(null===(i=this.meeting)||void 0===i?void 0:i.joinRoom())}catch(t){this.isJoining=!1}}}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){this.meeting.meta.removeListener("socketConnectionUpdate",this.socketStateUpdate)}componentDidLoad(){var t;null===(t=this.inputEl)||void 0===t||t.focus()}meetingChanged(t){var e,i,r;t&&(this.connectionState=null===(e=t.meta.socketState)||void 0===e?void 0:e.state,this.canEditName=null===(i=t.self.permissions.canEditDisplayName)||void 0===i||i,this.displayName=(null===(r=t.self.name)||void 0===r?void 0:r.trim())||(this.canEditName?"":"Participant"),t.meta.addListener("socketConnectionUpdate",this.socketStateUpdate))}render(){var t,e,n,c;const s=""===(null===(t=this.displayName)||void 0===t?void 0:t.trim())||"connected"!==this.connectionState||this.isJoining,d={meeting:this.meeting,config:this.config,states:this.states,size:this.size,iconPack:this.iconPack,t:this.t},p=null===(e=this.meeting)||void 0===e?void 0:e.meta.meetingTitle.trim();return i(o,{key:"ea88610290c5f721a9fe638928855cc31bcb975f"},i("div",{key:"321f2a690e22c14c627e603b4f7d590800f19911",class:"container"},i("div",{key:"c4501f3c49417145e34024c05e8df52174289138",class:"container-tile"},i(l,{key:"66514020274bb3a6df00c94e75e14785079853c1",element:"rtk-participant-tile",defaults:d,props:{participant:null===(n=this.meeting)||void 0===n?void 0:n.self,size:"md",isPreview:!0},childProps:{participant:null===(c=this.meeting)||void 0===c?void 0:c.self,size:"md"},deepProps:!0}),i("div",{key:"e3f6ec148cc113d3efef3955d9bb96c68c36e9a7",class:"media-selectors"},i("rtk-microphone-selector",Object.assign({key:"450cc901acd253dec2c40c1d2c1ff27441fcbb6c"},d,{variant:"inline"})),i("rtk-camera-selector",Object.assign({key:"cf38bfe66aac01a51845d619521c747727f926ac"},d,{variant:"inline"})),i("rtk-speaker-selector",Object.assign({key:"33357804c4d4ba359f7348f853cd25ef1ee0f442"},d,{variant:"inline"})))),i("div",{key:"bff07c087cb1c5f6db822b38fe9485c4e69d4ecd",class:"metadata"},p&&""!==p&&i("div",{key:"e9d6882f1d79b1687883a9de7a23b9ca89142c0a",class:"meeting-title"},p),this.canEditName?i(r,null,i("div",{class:"join-as"},this.t("setup_screen.join_in_as")),i("input",{placeholder:this.t("setup_screen.your_name"),value:this.displayName,spellcheck:!1,autoFocus:!0,ref:t=>{this.inputEl=t},onInput:t=>{this.displayName=t.target.value},onKeyDown:t=>{"Enter"===t.key&&this.join()}})):i("div",{class:"uneditable-name"},i("span",{class:"text"},this.t("setup_screen.join_in_as")," ")," ",i("div",{class:"name"},a(this.displayName,20))),i("rtk-button",{key:"d6d629f03ccabca7823c6b78e3b4dc42c2db9ecc",size:"lg",kind:"wide",onClick:this.join,disabled:s},this.isJoining?i("rtk-spinner",{iconPack:this.iconPack}):this.t("join")),"connected"!==this.connectionState&&i("div",{key:"92c30fa7cdef877ff80cbc74806e6824c725d284",class:"no-network-badge"},i("rtk-icon",{key:"615e5873958f0e7502e6fbcefdca8b34892d4d2b",size:"md",variant:"danger",icon:this.iconPack.disconnected}),this.t("failed"===this.connectionState?"network.lost_extended":"network.lost")))))}static get watchers(){return{meeting:["meetingChanged"]}}};b([p()],h.prototype,"meeting",void 0),b([p()],h.prototype,"states",void 0),b([p()],h.prototype,"size",void 0),b([p()],h.prototype,"iconPack",void 0),b([p()],h.prototype,"t",void 0),h.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{box-sizing:border-box;padding:var(--rtk-space-4, 16px);height:100%;min-height:100%;width:100%;display:flex;place-items:center;justify-content:center;--rtk-controlbar-button-background-color:rgb(var(--rtk-colors-background-700, 44 44 44))}.container{width:100%;max-width:1080px;display:flex;align-items:center;justify-content:space-evenly;gap:var(--rtk-space-4, 16px)}.container-tile{display:flex;height:100%;width:100%;max-width:584px;flex-direction:column;gap:var(--rtk-space-2, 8px)}.metadata{display:flex;width:100%;max-width:var(--rtk-space-80, 320px);flex-direction:column;align-items:center;text-align:center}.meeting-title{margin-bottom:var(--rtk-space-4, 16px);text-align:center;font-size:24px;font-weight:500}.join-as{margin:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-4, 16px);text-align:center;font-size:16px;letter-spacing:-0.025em;color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.uneditable-name{margin-bottom:var(--rtk-space-6, 24px)}.uneditable-name .text,.uneditable-name .name{display:inline-block}.uneditable-name .name{font-size:16px;font-weight:500}input{margin-bottom:var(--rtk-space-6, 24px);display:block;height:var(--rtk-space-10, 40px);width:100%;max-width:var(--rtk-space-80, 320px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);color:rgb(var(--rtk-colors-text-1000, 255 255 255));box-sizing:border-box;font-size:16px;outline:2px solid transparent;outline-offset:2px;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}input::-moz-placeholder{color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}input::placeholder{color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}input{border:var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60))}input:focus{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-border-opacity))}rtk-spinner{color:rgb(var(--rtk-colors-text-1000, 255 255 255));--icon-size:var(--rtk-space-8, 32px)}:host([size='sm']) .container,:host([size='md']) .container{height:100%;flex-direction:column;justify-content:space-evenly}:host([size='sm']) .container-tile,:host([size='md']) .container-tile{height:-moz-min-content;height:min-content;flex-direction:column;justify-content:center}rtk-participant-tile{height:auto;width:100%;max-width:584px}.media-selectors{display:flex;flex-direction:column;justify-content:space-between}.media-selectors .row{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr))}.no-network-badge{margin-top:var(--rtk-space-2, 8px);display:flex;width:100%;flex-direction:row;align-items:center;justify-content:flex-start;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));background-color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.1);padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px);font-size:12px;color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.75)}.no-network-badge rtk-icon{margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px)}";export{h as rtk_setup_screen}