@yoopta/file 4.5.0-alpha.2 → 4.5.0
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 +1 -1
- package/dist/ui/FileUploader.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useYooptaPluginOptions as e,useYooptaEditor as t,Elements as o,UI as n,useBlockData as i,useYooptaReadOnly as r,useBlockSelected as l,YooptaPlugin as f}from"@yoopta/editor";import{jsx as s,jsxs as a}from"react/jsx-runtime";import*as c from"react";import{forwardRef as u,createElement as p,useLayoutEffect as d,useEffect as y,useState as g}from"react";import*as m from"react-dom";function h(e,t){if(null==e)return{};var o,n,i={},r=Object.keys(e);for(n=0;n<r.length;n++)o=r[n],t.indexOf(o)>=0||(i[o]=e[o]);return i}var x=["color"],b=u((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,i=h(e,x);return p("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),p("path",{d:"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),w=["color"],v=u((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,i=h(e,w);return p("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),p("path",{d:"M3.5 2C3.22386 2 3 2.22386 3 2.5V12.5C3 12.7761 3.22386 13 3.5 13H11.5C11.7761 13 12 12.7761 12 12.5V6H8.5C8.22386 6 8 5.77614 8 5.5V2H3.5ZM9 2.70711L11.2929 5H9V2.70711ZM2 2.5C2 1.67157 2.67157 1 3.5 1H8.5C8.63261 1 8.75979 1.05268 8.85355 1.14645L12.8536 5.14645C12.9473 5.24021 13 5.36739 13 5.5V12.5C13 13.3284 12.3284 14 11.5 14H3.5C2.67157 14 2 13.3284 2 12.5V2.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),C=["color"],_=u((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,i=h(e,C);return p("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),p("path",{d:"M3 2.5C3 2.22386 3.22386 2 3.5 2H9.08579C9.21839 2 9.34557 2.05268 9.43934 2.14645L11.8536 4.56066C11.9473 4.65443 12 4.78161 12 4.91421V12.5C12 12.7761 11.7761 13 11.5 13H3.5C3.22386 13 3 12.7761 3 12.5V2.5ZM3.5 1C2.67157 1 2 1.67157 2 2.5V12.5C2 13.3284 2.67157 14 3.5 14H11.5C12.3284 14 13 13.3284 13 12.5V4.91421C13 4.51639 12.842 4.13486 12.5607 3.85355L10.1464 1.43934C9.86514 1.15804 9.48361 1 9.08579 1H3.5ZM4.5 4C4.22386 4 4 4.22386 4 4.5C4 4.77614 4.22386 5 4.5 5H7.5C7.77614 5 8 4.77614 8 4.5C8 4.22386 7.77614 4 7.5 4H4.5ZM4.5 7C4.22386 7 4 7.22386 4 7.5C4 7.77614 4.22386 8 4.5 8H10.5C10.7761 8 11 7.77614 11 7.5C11 7.22386 10.7761 7 10.5 7H4.5ZM4.5 10C4.22386 10 4 10.2239 4 10.5C4 10.7761 4.22386 11 4.5 11H10.5C10.7761 11 11 10.7761 11 10.5C11 10.2239 10.7761 10 10.5 10H4.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}));function k(e){if("number"!=typeof e||isNaN(e))return null;return(e/1024).toFixed(2)+" KB"}const R=({name:e,src:t,size:o,format:n})=>{if(!t)return null;return s("div",Object.assign({className:"yoo-file-w-full yoo-file-cursor-pointer",contentEditable:!1,onClick:e=>{t&&(e.preventDefault(),e.stopPropagation(),window.open(t,"_blank"))}},{children:a("div",Object.assign({className:"yoo-file-flex yoo-file-items-center yoo-file-rounded-[4px] yoo-file-py-[8px] yoo-file-px-2 hover:yoo-file-bg-[rgba(55,53,47,0.04)] yoo-file-border-b-[1px] hover:yoo-file-border-[rgba(55,53,47,0.16)] yoo-file-border-[transparent]"},{children:[a("div",Object.assign({className:"yoo-file-flex yoo-file-items-center yoo-file-leading-[1.2] yoo-file-font-medium yoo-file-text-[#000000]"},{children:[s(_,{width:16,height:16}),s("span",Object.assign({className:"yoo-file-ml-[6px] yoo-file-text-[14px]"},{children:n?`${e}.${n}`:`${e}`}))]})),s("div",Object.assign({className:"yoo-file-ml-[8px] yoo-file-text-[10px] yoo-file-font-normal yoo-file-text-[#37352fa6]"},{children:k(o)}))]}))}))};function O(e){return E(e)?(e.nodeName||"").toLowerCase():"#document"}function S(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function L(e){var t;return null==(t=(E(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function E(e){return e instanceof Node||e instanceof S(e).Node}function j(e){return e instanceof Element||e instanceof S(e).Element}function N(e){return e instanceof HTMLElement||e instanceof S(e).HTMLElement}function T(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof S(e).ShadowRoot)}function F(e){const{overflow:t,overflowX:o,overflowY:n,display:i}=A(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!["inline","contents"].includes(i)}function H(e){return["table","td","th"].includes(O(e))}function M(e){const t=V(),o=A(e);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function V(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function P(e){return["html","body","#document"].includes(O(e))}function A(e){return S(e).getComputedStyle(e)}function B(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function z(e){if("html"===O(e))return e;const t=e.assignedSlot||e.parentNode||T(e)&&e.host||L(e);return T(t)?t.host:t}function D(e){const t=z(e);return P(t)?e.ownerDocument?e.ownerDocument.body:e.body:N(t)&&F(t)?t:D(t)}function I(e,t,o){var n;void 0===t&&(t=[]),void 0===o&&(o=!0);const i=D(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),l=S(i);return r?t.concat(l,l.visualViewport||[],F(i)?i:[],l.frameElement&&o?I(l.frameElement):[]):t.concat(i,I(i,[],o))}const W=Math.min,Z=Math.max,$=Math.round,U=e=>({x:e,y:e}),X={left:"right",right:"left",bottom:"top",top:"bottom"},Y={start:"end",end:"start"};function G(e,t,o){return Z(e,W(t,o))}function K(e,t){return"function"==typeof e?e(t):e}function q(e){return e.split("-")[0]}function J(e){return e.split("-")[1]}function Q(e){return"x"===e?"y":"x"}function ee(e){return"y"===e?"height":"width"}function te(e){return["top","bottom"].includes(q(e))?"y":"x"}function oe(e){return Q(te(e))}function ne(e){return e.replace(/start|end/g,(e=>Y[e]))}function ie(e){return e.replace(/left|right|bottom|top/g,(e=>X[e]))}function re(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function le(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function fe(e,t,o){let{reference:n,floating:i}=e;const r=te(t),l=oe(t),f=ee(l),s=q(t),a="y"===r,c=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,p=n[f]/2-i[f]/2;let d;switch(s){case"top":d={x:c,y:n.y-i.height};break;case"bottom":d={x:c,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:u};break;case"left":d={x:n.x-i.width,y:u};break;default:d={x:n.x,y:n.y}}switch(J(t)){case"start":d[l]-=p*(o&&a?-1:1);break;case"end":d[l]+=p*(o&&a?-1:1)}return d}async function se(e,t){var o;void 0===t&&(t={});const{x:n,y:i,platform:r,rects:l,elements:f,strategy:s}=e,{boundary:a="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:p=!1,padding:d=0}=K(t,e),y=re(d),g=f[p?"floating"===u?"reference":"floating":u],m=le(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(g)))||o?g:g.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(f.floating)),boundary:a,rootBoundary:c,strategy:s})),h="floating"===u?{...l.floating,x:n,y:i}:l.reference,x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(f.floating)),b=await(null==r.isElement?void 0:r.isElement(x))&&await(null==r.getScale?void 0:r.getScale(x))||{x:1,y:1},w=le(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:h,offsetParent:x,strategy:s}):h);return{top:(m.top-w.top+y.top)/b.y,bottom:(w.bottom-m.bottom+y.bottom)/b.y,left:(m.left-w.left+y.left)/b.x,right:(w.right-m.right+y.right)/b.x}}function ae(e){const t=W(...e.map((e=>e.left))),o=W(...e.map((e=>e.top)));return{x:t,y:o,width:Z(...e.map((e=>e.right)))-t,height:Z(...e.map((e=>e.bottom)))-o}}const ce=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:i,y:r,placement:l,middlewareData:f}=t,s=await async function(e,t){const{placement:o,platform:n,elements:i}=e,r=await(null==n.isRTL?void 0:n.isRTL(i.floating)),l=q(o),f=J(o),s="y"===te(o),a=["left","top"].includes(l)?-1:1,c=r&&s?-1:1,u=K(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:y}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return f&&"number"==typeof y&&(d="end"===f?-1*y:y),s?{x:d*c,y:p*a}:{x:p*a,y:d*c}}(t,e);return l===(null==(o=f.offset)?void 0:o.placement)&&null!=(n=f.arrow)&&n.alignmentOffset?{}:{x:i+s.x,y:r+s.y,data:{...s,placement:l}}}}};function ue(e){const t=A(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=N(e),r=i?e.offsetWidth:o,l=i?e.offsetHeight:n,f=$(o)!==r||$(n)!==l;return f&&(o=r,n=l),{width:o,height:n,$:f}}function pe(e){return j(e)?e:e.contextElement}function de(e){const t=pe(e);if(!N(t))return U(1);const o=t.getBoundingClientRect(),{width:n,height:i,$:r}=ue(t);let l=(r?$(o.width):o.width)/n,f=(r?$(o.height):o.height)/i;return l&&Number.isFinite(l)||(l=1),f&&Number.isFinite(f)||(f=1),{x:l,y:f}}const ye=U(0);function ge(e){const t=S(e);return V()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ye}function me(e,t,o,n){void 0===t&&(t=!1),void 0===o&&(o=!1);const i=e.getBoundingClientRect(),r=pe(e);let l=U(1);t&&(n?j(n)&&(l=de(n)):l=de(e));const f=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==S(e))&&t}(r,o,n)?ge(r):U(0);let s=(i.left+f.x)/l.x,a=(i.top+f.y)/l.y,c=i.width/l.x,u=i.height/l.y;if(r){const e=S(r),t=n&&j(n)?S(n):n;let o=e,i=o.frameElement;for(;i&&n&&t!==o;){const e=de(i),t=i.getBoundingClientRect(),n=A(i),r=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,l=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,a*=e.y,c*=e.x,u*=e.y,s+=r,a+=l,o=S(i),i=o.frameElement}}return le({width:c,height:u,x:s,y:a})}const he=[":popover-open",":modal"];function xe(e){return he.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function be(e){return me(L(e)).left+B(e).scrollLeft}function we(e,t,o){let n;if("viewport"===t)n=function(e,t){const o=S(e),n=L(e),i=o.visualViewport;let r=n.clientWidth,l=n.clientHeight,f=0,s=0;if(i){r=i.width,l=i.height;const e=V();(!e||e&&"fixed"===t)&&(f=i.offsetLeft,s=i.offsetTop)}return{width:r,height:l,x:f,y:s}}(e,o);else if("document"===t)n=function(e){const t=L(e),o=B(e),n=e.ownerDocument.body,i=Z(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=Z(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let l=-o.scrollLeft+be(e);const f=-o.scrollTop;return"rtl"===A(n).direction&&(l+=Z(t.clientWidth,n.clientWidth)-i),{width:i,height:r,x:l,y:f}}(L(e));else if(j(t))n=function(e,t){const o=me(e,!0,"fixed"===t),n=o.top+e.clientTop,i=o.left+e.clientLeft,r=N(e)?de(e):U(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:i*r.x,y:n*r.y}}(t,o);else{const o=ge(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return le(n)}function ve(e,t){const o=z(e);return!(o===t||!j(o)||P(o))&&("fixed"===A(o).position||ve(o,t))}function Ce(e,t,o){const n=N(t),i=L(t),r="fixed"===o,l=me(e,!0,r,t);let f={scrollLeft:0,scrollTop:0};const s=U(0);if(n||!n&&!r)if(("body"!==O(t)||F(i))&&(f=B(t)),n){const e=me(t,!0,r,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=be(i));return{x:l.left+f.scrollLeft-s.x,y:l.top+f.scrollTop-s.y,width:l.width,height:l.height}}function _e(e,t){return N(e)&&"fixed"!==A(e).position?t?t(e):e.offsetParent:null}function ke(e,t){const o=S(e);if(!N(e)||xe(e))return o;let n=_e(e,t);for(;n&&H(n)&&"static"===A(n).position;)n=_e(n,t);return n&&("html"===O(n)||"body"===O(n)&&"static"===A(n).position&&!M(n))?o:n||function(e){let t=z(e);for(;N(t)&&!P(t);){if(M(t))return t;t=z(t)}return null}(e)||o}const Re={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:n,strategy:i}=e;const r="fixed"===i,l=L(n),f=!!t&&xe(t.floating);if(n===l||f&&r)return o;let s={scrollLeft:0,scrollTop:0},a=U(1);const c=U(0),u=N(n);if((u||!u&&!r)&&(("body"!==O(n)||F(l))&&(s=B(n)),N(n))){const e=me(n);a=de(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:o.width*a.x,height:o.height*a.y,x:o.x*a.x-s.scrollLeft*a.x+c.x,y:o.y*a.y-s.scrollTop*a.y+c.y}},getDocumentElement:L,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:n,strategy:i}=e;const r=[..."clippingAncestors"===o?function(e,t){const o=t.get(e);if(o)return o;let n=I(e,[],!1).filter((e=>j(e)&&"body"!==O(e))),i=null;const r="fixed"===A(e).position;let l=r?z(e):e;for(;j(l)&&!P(l);){const t=A(l),o=M(l);o||"fixed"!==t.position||(i=null),(r?!o&&!i:!o&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||F(l)&&!o&&ve(e,l))?n=n.filter((e=>e!==l)):i=t,l=z(l)}return t.set(e,n),n}(t,this._c):[].concat(o),n],l=r[0],f=r.reduce(((e,o)=>{const n=we(t,o,i);return e.top=Z(n.top,e.top),e.right=W(n.right,e.right),e.bottom=W(n.bottom,e.bottom),e.left=Z(n.left,e.left),e}),we(t,l,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}},getOffsetParent:ke,getElementRects:async function(e){const t=this.getOffsetParent||ke,o=this.getDimensions;return{reference:Ce(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await o(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=ue(e);return{width:t,height:o}},getScale:de,isElement:j,isRTL:function(e){return"rtl"===A(e).direction}},Oe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:i}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:f={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...s}=K(e,t),a={x:o,y:n},c=await se(t,s),u=te(q(i)),p=Q(u);let d=a[p],y=a[u];if(r){const e="y"===p?"bottom":"right";d=G(d+c["y"===p?"top":"left"],d,d-c[e])}if(l){const e="y"===u?"bottom":"right";y=G(y+c["y"===u?"top":"left"],y,y-c[e])}const g=f.fn({...t,[p]:d,[u]:y});return{...g,data:{x:g.x-o,y:g.y-n}}}}},Se=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:i,middlewareData:r,rects:l,initialPlacement:f,platform:s,elements:a}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...m}=K(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const h=q(i),x=q(f)===f,b=await(null==s.isRTL?void 0:s.isRTL(a.floating)),w=p||(x||!g?[ie(f)]:function(e){const t=ie(e);return[ne(e),t,ne(t)]}(f));p||"none"===y||w.push(...function(e,t,o,n){const i=J(e);let r=function(e,t,o){const n=["left","right"],i=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return o?t?i:n:t?n:i;case"left":case"right":return t?r:l;default:return[]}}(q(e),"start"===o,n);return i&&(r=r.map((e=>e+"-"+i)),t&&(r=r.concat(r.map(ne)))),r}(f,g,y,b));const v=[f,...w],C=await se(t,m),_=[];let k=(null==(n=r.flip)?void 0:n.overflows)||[];if(c&&_.push(C[h]),u){const e=function(e,t,o){void 0===o&&(o=!1);const n=J(e),i=oe(e),r=ee(i);let l="x"===i?n===(o?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=ie(l)),[l,ie(l)]}(i,l,b);_.push(C[e[0]],C[e[1]])}if(k=[...k,{placement:i,overflows:_}],!_.every((e=>e<=0))){var R,O;const e=((null==(R=r.flip)?void 0:R.index)||0)+1,t=v[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let o=null==(O=k.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:O.placement;if(!o)switch(d){case"bestFit":{var S;const e=null==(S=k.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:S[0];e&&(o=e);break}case"initialPlacement":o=f}if(i!==o)return{reset:{placement:o}}}return{}}}},Le=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:o,elements:n,rects:i,platform:r,strategy:l}=t,{padding:f=2,x:s,y:a}=K(e,t),c=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(n.reference))||[]),u=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),o=[];let n=null;for(let e=0;e<t.length;e++){const i=t[e];!n||i.y-n.y>n.height/2?o.push([i]):o[o.length-1].push(i),n=i}return o.map((e=>le(ae(e))))}(c),p=le(ae(c)),d=re(f);const y=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=s&&null!=a)return u.find((e=>s>e.left-d.left&&s<e.right+d.right&&a>e.top-d.top&&a<e.bottom+d.bottom))||p;if(u.length>=2){if("y"===te(o)){const e=u[0],t=u[u.length-1],n="top"===q(o),i=e.top,r=t.bottom,l=n?e.left:t.left,f=n?e.right:t.right;return{top:i,bottom:r,left:l,right:f,width:f-l,height:r-i,x:l,y:i}}const e="left"===q(o),t=Z(...u.map((e=>e.right))),n=W(...u.map((e=>e.left))),i=u.filter((o=>e?o.left===n:o.right===t)),r=i[0].top,l=i[i.length-1].bottom;return{top:r,bottom:l,left:n,right:t,width:t-n,height:l-r,x:n,y:r}}return p}},floating:n.floating,strategy:l});return i.reference.x!==y.reference.x||i.reference.y!==y.reference.y||i.reference.width!==y.reference.width||i.reference.height!==y.reference.height?{reset:{rects:y}}:{}}}},Ee=(e,t,o)=>{const n=new Map,i={platform:Re,...o},r={...i.platform,_c:n};return(async(e,t,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:l}=o,f=r.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let a=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:u}=fe(a,n,s),p=n,d={},y=0;for(let o=0;o<f.length;o++){const{name:r,fn:g}=f[o],{x:m,y:h,data:x,reset:b}=await g({x:c,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:d,rects:a,platform:l,elements:{reference:e,floating:t}});c=null!=m?m:c,u=null!=h?h:u,d={...d,[r]:{...d[r],...x}},b&&y<=50&&(y++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(a=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:i}):b.rects),({x:c,y:u}=fe(a,p,s))),o=-1)}return{x:c,y:u,placement:p,strategy:i,middlewareData:d}})(e,t,{...i,platform:r})};var je="undefined"!=typeof document?d:y;function Ne(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let o,n,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;0!=n--;)if(!Ne(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),o=i.length,o!==Object.keys(t).length)return!1;for(n=o;0!=n--;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=o;0!=n--;){const o=i[n];if(("_owner"!==o||!e.$$typeof)&&!Ne(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Te(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fe(e,t){const o=Te(e);return Math.round(t*o)/o}function He(e){const t=c.useRef(e);return je((()=>{t.current=e})),t}const Me=c["useInsertionEffect".toString()]||(e=>e());var Ve="undefined"!=typeof document?d:y;let Pe=!1,Ae=0;const Be=()=>"floating-ui-"+Ae++;const ze=c["useId".toString()]||function(){const[e,t]=c.useState((()=>Pe?Be():void 0));return Ve((()=>{null==e&&t(Be())}),[]),c.useEffect((()=>{Pe||(Pe=!0)}),[]),e};const De=c.createContext(null),Ie=c.createContext(null);function We(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:n,nodeId:i}=e,[r,l]=c.useState(null),f=(null==(t=e.elements)?void 0:t.reference)||r,s=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:i,elements:{reference:r,floating:l}={},transform:f=!0,whileElementsMounted:s,open:a}=e,[u,p]=c.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[d,y]=c.useState(n);Ne(d,n)||y(n);const[g,h]=c.useState(null),[x,b]=c.useState(null),w=c.useCallback((e=>{e!==k.current&&(k.current=e,h(e))}),[]),v=c.useCallback((e=>{e!==R.current&&(R.current=e,b(e))}),[]),C=r||g,_=l||x,k=c.useRef(null),R=c.useRef(null),O=c.useRef(u),S=null!=s,L=He(s),E=He(i),j=c.useCallback((()=>{if(!k.current||!R.current)return;const e={placement:t,strategy:o,middleware:d};E.current&&(e.platform=E.current),Ee(k.current,R.current,e).then((e=>{const t={...e,isPositioned:!0};N.current&&!Ne(O.current,t)&&(O.current=t,m.flushSync((()=>{p(t)})))}))}),[d,t,o,E]);je((()=>{!1===a&&O.current.isPositioned&&(O.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[a]);const N=c.useRef(!1);je((()=>(N.current=!0,()=>{N.current=!1})),[]),je((()=>{if(C&&(k.current=C),_&&(R.current=_),C&&_){if(L.current)return L.current(C,_,j);j()}}),[C,_,j,L,S]);const T=c.useMemo((()=>({reference:k,floating:R,setReference:w,setFloating:v})),[w,v]),F=c.useMemo((()=>({reference:C,floating:_})),[C,_]),H=c.useMemo((()=>{const e={position:o,left:0,top:0};if(!F.floating)return e;const t=Fe(F.floating,u.x),n=Fe(F.floating,u.y);return f?{...e,transform:"translate("+t+"px, "+n+"px)",...Te(F.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:n}}),[o,f,F.floating,u.x,u.y]);return c.useMemo((()=>({...u,update:j,refs:T,elements:F,floatingStyles:H})),[u,j,T,F,H])}(e),a=c.useContext(Ie),u=null!=((null==(p=c.useContext(De))?void 0:p.id)||null);var p;const d=function(e){const t=c.useRef((()=>{}));return Me((()=>{t.current=e})),c.useCallback((function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return null==t.current?void 0:t.current(...o)}),[])}(((e,t,o)=>{e&&(g.current.openEvent=t),h.emit("openchange",{open:e,event:t,reason:o,nested:u}),null==n||n(e,t,o)})),y=c.useRef(null),g=c.useRef({}),h=c.useState((()=>function(){const e=new Map;return{emit(t,o){var n;null==(n=e.get(t))||n.forEach((e=>e(o)))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter((e=>e!==o)))||[])}}}()))[0],x=ze(),b=c.useCallback((e=>{const t=j(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;s.refs.setReference(t)}),[s.refs]),w=c.useCallback((e=>{(j(e)||null===e)&&(y.current=e,l(e)),(j(s.refs.reference.current)||null===s.refs.reference.current||null!==e&&!j(e))&&s.refs.setReference(e)}),[s.refs]),v=c.useMemo((()=>({...s.refs,setReference:w,setPositionReference:b,domReference:y})),[s.refs,w,b]),C=c.useMemo((()=>({...s.elements,domReference:f})),[s.elements,f]),_=c.useMemo((()=>({...s,refs:v,elements:C,dataRef:g,nodeId:i,floatingId:x,events:h,open:o,onOpenChange:d})),[s,i,x,h,o,d,v,C]);return Ve((()=>{const e=null==a?void 0:a.nodesRef.current.find((e=>e.id===i));e&&(e.context=_)})),c.useMemo((()=>({...s,context:_,refs:v,elements:C})),[s,v,C,_])}function Ze(e,t,o,n){return new(o||(o=Promise))((function(i,r){function l(e){try{s(n.next(e))}catch(e){r(e)}}function f(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(l,f)}s((n=n.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const $e=({accept:n="",onClose:i,blockId:r,onSetLoading:l})=>{const f=e("File"),c=t();return s("div",Object.assign({className:"yoo-file-user-select-none yoo-file-transition-bg yoo-file-duration-20 yoo-file-ease-in yoo-file-white-space-nowrap yoo-file-rounded-[4px] yoo-file-h-[32px] yoo-file-px-[12px] yoo-file-border yoo-file-border-solid yoo-file-border-[rgba(55,53,47,0.16)] yoo-file-w-full yoo-file-cursor-pointer"},{children:a("label",Object.assign({htmlFor:"file-uploader",className:"yoo-file-text-[14px] yoo-file-leading-[1.2] yoo-file-font-medium yoo-file-cursor-pointer yoo-file-w-full yoo-file-flex yoo-file-items-center yoo-file-justify-center yoo-file-h-full"},{children:[s("input",{type:"file",id:"file-uploader",className:"yoo-file-absolute yoo-file-left-0 yoo-file-top-0 yoo-file-invisible",accept:(null==f?void 0:f.accept)||n,onChange:e=>{const t=e.target.files[0];t&&(e=>{Ze(void 0,void 0,void 0,(function*(){if(!(null==f?void 0:f.onUpload))throw new Error("onUpload not provided in plugin options. Check File.extend({}) method");i(),l(!0);try{const t=yield null==f?void 0:f.onUpload(e),n=t.format||e.name.split(".").pop()||null;o.updateElement(c,r,"file",{src:t.src,name:t.name||e.name,size:t.size||e.size,format:n})}catch(e){}finally{l(!1)}}))})(t)},multiple:!1}),"Upload file"]}))}))},{Overlay:Ue,Portal:Xe}=n,Ye=({floatingStyles:e,refs:t,onClose:o,blockId:n,onSetLoading:i})=>s(Xe,Object.assign({id:"yoo-file-uploader-portal"},{children:s(Ue,Object.assign({lockScroll:!0,className:"yoo-file-z-[100]",onClick:o},{children:s("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:a("div",Object.assign({className:"yoo-file-flex yoo-file-flex-col yoo-file-min-w-[540px] yoo-file-max-w-[calc(100vw-24px)] yoo-file-h-full yoo-file-max-h-[420px] yoo-file-bg-[#FFFFFF] yoo-file-shadow-[rgb(15_15_15_/5%)_0px_0px_0px_1px,_rgb(15_15_15_/10%)_0px_3px_6px,_rgb(15_15_15_/20%)_0px_9px_24px]"},{children:[s("div",Object.assign({className:"yoo-file-w-full yoo-file-flex yoo-file-text-[14px] yoo-file-p-[0_8px] yoo-file-shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] yoo-file-relative yoo-file-z-10 yoo-file-h-[40px]"},{children:s("button",Object.assign({type:"button",style:{borderBottom:"2px solid #2483e2"},className:"yoopta-button yoo-file-py-[6px] yoo-file-whitespace-nowrap yoo-file-min-w-0 yoo-file-flex-shrink-0 yoo-file-text-[rgb(55,53,47)] yoo-file-relative yoo-file-cursor-pointer yoo-file-user-select-none yoo-file-bg-inherit yoo-file-transition-[height_20ms_ease-in] yoo-file-inline-flex yoo-file-items-center yoo-file-h-full yoo-file-text-[14px] yoo-file-leading-[1.2] yoo-file-px-[8px]"},{children:"Upload"}))})),s("div",Object.assign({className:"yoo-file-pt-[6px] yoo-file-pb-[6px] yoo-file-mt-[4px] yoo-file-flex yoo-file-justify-center yoo-file-mr-[12px] yoo-file-ml-[12px]"},{children:s($e,{onClose:o,blockId:n,onSetLoading:i})}))]}))}))}))})),Ge=({className:e,width:t,height:o,children:n})=>a("div",Object.assign({className:e},{children:[n,s("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:t,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-2 yoo-file-h-4 yoo-file-w-4 yoo-file-animate-spin"},{children:s("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}))]})),Ke=({attributes:e,children:t,blockId:o})=>{const[n,i]=g(!1),[r,l]=g(!1),{refs:f,floatingStyles:c}=We({placement:"bottom",open:n,onOpenChange:i,middleware:[Le(),Se(),Oe(),ce(10)]});return a("div",Object.assign({className:"yoo-file-w-full yoo-file-user-select-none yoo-file-m-[20px_0_10px] yoo-file-relative yoo-file-flex"},e,{contentEditable:!1},{children:[a("button",Object.assign({type:"button",className:"yoopta-button yoo-file-p-[12px_36px_12px_12px] yoo-file-flex yoo-file-items-center yoo-file-text-left yoo-file-w-full yoo-file-overflow-hidden yoo-file-rounded-[3px] yoo-file-text-[14px] yoo-file-text-[rgba(55,53,47,0.65)] yoo-file-relative yoo-file-cursor-pointer yoo-file-border-none yoo-file-bg-[#efefef] yoo-file-transition-[background-color_100ms_ease-in] hover:yoo-file-bg-[#e3e3e3]",onClick:()=>i(!0),ref:f.setReference},{children:[s(r?Ge:v,{className:"yoo-file-mr-2 yoo-file-user-select-none",width:24,height:24}),s("span",Object.assign({className:"yoo-file-font-medium"},{children:r?"Loading...":"Click to add file"})),r&&s("div",{className:"yoopta-button yoo-file-absolute yoo-file-top-0 yoo-file-left-0 yoo-file-h-full yoo-file-bg-[rgba(55,53,47,0.16)]",style:{width:"100%",transition:"width 100ms ease-in"}})]})),n&&s(Ye,{blockId:o,floatingStyles:c,refs:f,onClose:()=>i(!1),onSetLoading:e=>l(e)}),t]}))},{ExtendedBlockActions:qe,BlockOptionsMenuGroup:Je,BlockOptionsMenuItem:Qe,BlockOptionsSeparator:et}=n,tt=({editor:e,block:t,props:o})=>a(qe,Object.assign({onClick:()=>e.setSelection([t.meta.order])},{children:[s(et,{}),s(Je,{children:s(Qe,{children:a("button",Object.assign({type:"button",className:"yoopta-block-options-button",onClick:()=>{(null==o?void 0:o.src)&&window.open(null==o?void 0:o.src,"_blank")}},{children:[s(b,{width:16,height:16,className:"yoo-file-w-4 yoo-file-h-4 yoo-file-mr-2"}),"Open"]}))})})]})),ot=new f({type:"File",elements:{file:{render:({element:e,attributes:o,children:n,blockId:f})=>{const{name:c,src:u,format:p,size:d}=e.props||{},y=i(f),g=t(),m=r(),h=l({blockId:f});return u?a("div",Object.assign({contentEditable:!1,draggable:!1,className:"yoo-file-mt-4 yoo-file-relative yoo-file-flex yoopta-file"},o,{children:[h&&s("div",{className:"yoo-file-absolute yoo-file-pointer-events-none yoo-file-inset-0 yoo-file-bg-[rgba(35,131,226,0.14)] yoo-file-z-[81] yoo-file-rounded-[3px] yoo-file-opacity-100 yoo-file-transition-opacity yoo-file-duration-150 yoo-file-ease-in"}),s(R,{name:c,format:p,src:u,size:d,blockId:f}),!m&&s(tt,{block:y,editor:g,props:e.props}),n]})):s(Ke,Object.assign({attributes:o,blockId:f},{children:n}))},props:{size:0,name:null,src:null,format:null,nodeType:"void"}}},options:{display:{title:"File",description:"For file videos, google maps and more"},accept:""},parsers:{}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".yoo-file-pointer-events-none{pointer-events:none}.yoo-file-invisible{visibility:hidden}.yoo-file-absolute{position:absolute}.yoo-file-relative{position:relative}.yoo-file-inset-0{inset:0}.yoo-file-left-0{left:0}.yoo-file-top-0{top:0}.yoo-file-z-10{z-index:10}.yoo-file-z-\\[100\\]{z-index:100}.yoo-file-z-\\[81\\]{z-index:81}.yoo-file-m-\\[20px_0_10px\\]{margin:20px 0 10px}.yoo-file-ml-\\[12px\\]{margin-left:12px}.yoo-file-ml-\\[6px\\]{margin-left:6px}.yoo-file-ml-\\[8px\\]{margin-left:8px}.yoo-file-mr-2{margin-right:.5rem}.yoo-file-mr-\\[12px\\]{margin-right:12px}.yoo-file-mt-4{margin-top:1rem}.yoo-file-mt-\\[4px\\]{margin-top:4px}.yoo-file-flex{display:flex}.yoo-file-inline-flex{display:inline-flex}.yoo-file-h-4{height:1rem}.yoo-file-h-\\[32px\\]{height:32px}.yoo-file-h-\\[40px\\]{height:40px}.yoo-file-h-full{height:100%}.yoo-file-max-h-\\[420px\\]{max-height:420px}.yoo-file-w-4{width:1rem}.yoo-file-w-full{width:100%}.yoo-file-min-w-0{min-width:0}.yoo-file-min-w-\\[540px\\]{min-width:540px}.yoo-file-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.yoo-file-flex-shrink-0{flex-shrink:0}@keyframes yoo-file-spin{to{transform:rotate(1turn)}}.yoo-file-animate-spin{animation:yoo-file-spin 1s linear infinite}.yoo-file-cursor-pointer{cursor:pointer}.yoo-file-flex-col{flex-direction:column}.yoo-file-items-center{align-items:center}.yoo-file-justify-center{justify-content:center}.yoo-file-overflow-hidden{overflow:hidden}.yoo-file-whitespace-nowrap{white-space:nowrap}.yoo-file-rounded-\\[3px\\]{border-radius:3px}.yoo-file-rounded-\\[4px\\]{border-radius:4px}.yoo-file-border{border-width:1px}.yoo-file-border-b-\\[1px\\]{border-bottom-width:1px}.yoo-file-border-solid{border-style:solid}.yoo-file-border-none{border-style:none}.yoo-file-border-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{border-color:rgba(55,53,47,.16)}.yoo-file-border-\\[transparent\\]{border-color:transparent}.yoo-file-bg-\\[\\#FFFFFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yoo-file-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.yoo-file-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.yoo-file-bg-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{background-color:rgba(55,53,47,.16)}.yoo-file-bg-inherit{background-color:inherit}.yoo-file-p-\\[0_8px\\]{padding:0 8px}.yoo-file-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.yoo-file-px-2{padding-left:.5rem;padding-right:.5rem}.yoo-file-px-\\[12px\\]{padding-left:12px;padding-right:12px}.yoo-file-px-\\[8px\\]{padding-left:8px;padding-right:8px}.yoo-file-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.yoo-file-py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.yoo-file-pb-\\[6px\\]{padding-bottom:6px}.yoo-file-pt-\\[6px\\]{padding-top:6px}.yoo-file-text-left{text-align:left}.yoo-file-text-\\[10px\\]{font-size:10px}.yoo-file-text-\\[14px\\]{font-size:14px}.yoo-file-font-medium{font-weight:500}.yoo-file-font-normal{font-weight:400}.yoo-file-leading-\\[1\\.2\\]{line-height:1.2}.yoo-file-text-\\[\\#000000\\]{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.yoo-file-text-\\[\\#37352fa6\\]{color:#37352fa6}.yoo-file-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.yoo-file-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}.yoo-file-opacity-100{opacity:1}.yoo-file-shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\,_rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\,_rgb\\(15_15_15_\\/20\\%\\)_0px_9px_24px\\]{--tw-shadow:rgb(15 15 15/5%) 0px 0px 0px 1px,hsla(0,0%,6%,.1) 0px 3px 6px,hsla(0,0%,6%,.2) 0px 9px 24px;--tw-shadow-colored:0px 0px 0px 1px var(--tw-shadow-color),0px 3px 6px var(--tw-shadow-color),0px 9px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-file-shadow-\\[rgb\\(55_53_47_\\/9\\%\\)_0px_-1px_0px_inset\\]{--tw-shadow:rgb(55 53 47/9%) 0px -1px 0px inset;--tw-shadow-colored:inset 0px -1px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-file-transition-\\[background-color_100ms_ease-in\\]{transition-duration:.15s;transition-property:background-color .1s ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-file-transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-file-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-file-duration-150{transition-duration:.15s}.yoo-file-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.yoopta-file .yoopta-extended-block-actions{opacity:0;transition:opacity .15s ease-in-out}.yoopta-file:hover .yoopta-extended-block-actions{opacity:1}.hover\\:yoo-file-border-\\[rgba\\(55\\2c 53\\2c 47\\2c 0\\.16\\)\\]:hover{border-color:rgba(55,53,47,.16)}.hover\\:yoo-file-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.hover\\:yoo-file-bg-\\[rgba\\(55\\2c 53\\2c 47\\2c 0\\.04\\)\\]:hover{background-color:rgba(55,53,47,.04)}");export{ot as default};
|
|
1
|
+
import{useYooptaPluginOptions as e,useYooptaEditor as t,Elements as o,UI as n,useBlockData as i,useYooptaReadOnly as r,useBlockSelected as l,YooptaPlugin as f}from"@yoopta/editor";import{jsx as s,jsxs as a}from"react/jsx-runtime";import*as c from"react";import{forwardRef as u,createElement as p,useLayoutEffect as d,useEffect as y,useState as g}from"react";import*as m from"react-dom";function h(e,t){if(null==e)return{};var o,n,i={},r=Object.keys(e);for(n=0;n<r.length;n++)o=r[n],t.indexOf(o)>=0||(i[o]=e[o]);return i}var x=["color"],b=u((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,i=h(e,x);return p("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),p("path",{d:"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),w=["color"],v=u((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,i=h(e,w);return p("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),p("path",{d:"M3.5 2C3.22386 2 3 2.22386 3 2.5V12.5C3 12.7761 3.22386 13 3.5 13H11.5C11.7761 13 12 12.7761 12 12.5V6H8.5C8.22386 6 8 5.77614 8 5.5V2H3.5ZM9 2.70711L11.2929 5H9V2.70711ZM2 2.5C2 1.67157 2.67157 1 3.5 1H8.5C8.63261 1 8.75979 1.05268 8.85355 1.14645L12.8536 5.14645C12.9473 5.24021 13 5.36739 13 5.5V12.5C13 13.3284 12.3284 14 11.5 14H3.5C2.67157 14 2 13.3284 2 12.5V2.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),C=["color"],_=u((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,i=h(e,C);return p("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),p("path",{d:"M3 2.5C3 2.22386 3.22386 2 3.5 2H9.08579C9.21839 2 9.34557 2.05268 9.43934 2.14645L11.8536 4.56066C11.9473 4.65443 12 4.78161 12 4.91421V12.5C12 12.7761 11.7761 13 11.5 13H3.5C3.22386 13 3 12.7761 3 12.5V2.5ZM3.5 1C2.67157 1 2 1.67157 2 2.5V12.5C2 13.3284 2.67157 14 3.5 14H11.5C12.3284 14 13 13.3284 13 12.5V4.91421C13 4.51639 12.842 4.13486 12.5607 3.85355L10.1464 1.43934C9.86514 1.15804 9.48361 1 9.08579 1H3.5ZM4.5 4C4.22386 4 4 4.22386 4 4.5C4 4.77614 4.22386 5 4.5 5H7.5C7.77614 5 8 4.77614 8 4.5C8 4.22386 7.77614 4 7.5 4H4.5ZM4.5 7C4.22386 7 4 7.22386 4 7.5C4 7.77614 4.22386 8 4.5 8H10.5C10.7761 8 11 7.77614 11 7.5C11 7.22386 10.7761 7 10.5 7H4.5ZM4.5 10C4.22386 10 4 10.2239 4 10.5C4 10.7761 4.22386 11 4.5 11H10.5C10.7761 11 11 10.7761 11 10.5C11 10.2239 10.7761 10 10.5 10H4.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}));function k(e){if("number"!=typeof e||isNaN(e))return null;return(e/1024).toFixed(2)+" KB"}const R=({name:e,src:t,size:o,format:n})=>{if(!t)return null;return s("div",Object.assign({className:"yoo-file-w-full yoo-file-cursor-pointer",contentEditable:!1,onClick:e=>{t&&(e.preventDefault(),e.stopPropagation(),window.open(t,"_blank"))}},{children:a("div",Object.assign({className:"yoo-file-flex yoo-file-items-center yoo-file-rounded-[4px] yoo-file-py-[8px] yoo-file-px-2 hover:yoo-file-bg-[rgba(55,53,47,0.04)] yoo-file-border-b-[1px] hover:yoo-file-border-[rgba(55,53,47,0.16)] yoo-file-border-[transparent]"},{children:[a("div",Object.assign({className:"yoo-file-flex yoo-file-items-center yoo-file-leading-[1.2] yoo-file-font-medium yoo-file-text-[#000000]"},{children:[s(_,{width:16,height:16}),s("span",Object.assign({className:"yoo-file-ml-[6px] yoo-file-text-[14px]"},{children:n?`${e}.${n}`:`${e}`}))]})),s("div",Object.assign({className:"yoo-file-ml-[8px] yoo-file-text-[10px] yoo-file-font-normal yoo-file-text-[#37352fa6]"},{children:k(o)}))]}))}))};function O(e){return E(e)?(e.nodeName||"").toLowerCase():"#document"}function S(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function L(e){var t;return null==(t=(E(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function E(e){return e instanceof Node||e instanceof S(e).Node}function j(e){return e instanceof Element||e instanceof S(e).Element}function N(e){return e instanceof HTMLElement||e instanceof S(e).HTMLElement}function T(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof S(e).ShadowRoot)}function F(e){const{overflow:t,overflowX:o,overflowY:n,display:i}=A(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!["inline","contents"].includes(i)}function H(e){return["table","td","th"].includes(O(e))}function M(e){const t=V(),o=A(e);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function V(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function P(e){return["html","body","#document"].includes(O(e))}function A(e){return S(e).getComputedStyle(e)}function B(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function z(e){if("html"===O(e))return e;const t=e.assignedSlot||e.parentNode||T(e)&&e.host||L(e);return T(t)?t.host:t}function D(e){const t=z(e);return P(t)?e.ownerDocument?e.ownerDocument.body:e.body:N(t)&&F(t)?t:D(t)}function I(e,t,o){var n;void 0===t&&(t=[]),void 0===o&&(o=!0);const i=D(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),l=S(i);return r?t.concat(l,l.visualViewport||[],F(i)?i:[],l.frameElement&&o?I(l.frameElement):[]):t.concat(i,I(i,[],o))}const W=Math.min,Z=Math.max,$=Math.round,U=e=>({x:e,y:e}),X={left:"right",right:"left",bottom:"top",top:"bottom"},Y={start:"end",end:"start"};function G(e,t,o){return Z(e,W(t,o))}function K(e,t){return"function"==typeof e?e(t):e}function q(e){return e.split("-")[0]}function J(e){return e.split("-")[1]}function Q(e){return"x"===e?"y":"x"}function ee(e){return"y"===e?"height":"width"}function te(e){return["top","bottom"].includes(q(e))?"y":"x"}function oe(e){return Q(te(e))}function ne(e){return e.replace(/start|end/g,(e=>Y[e]))}function ie(e){return e.replace(/left|right|bottom|top/g,(e=>X[e]))}function re(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function le(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function fe(e,t,o){let{reference:n,floating:i}=e;const r=te(t),l=oe(t),f=ee(l),s=q(t),a="y"===r,c=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,p=n[f]/2-i[f]/2;let d;switch(s){case"top":d={x:c,y:n.y-i.height};break;case"bottom":d={x:c,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:u};break;case"left":d={x:n.x-i.width,y:u};break;default:d={x:n.x,y:n.y}}switch(J(t)){case"start":d[l]-=p*(o&&a?-1:1);break;case"end":d[l]+=p*(o&&a?-1:1)}return d}async function se(e,t){var o;void 0===t&&(t={});const{x:n,y:i,platform:r,rects:l,elements:f,strategy:s}=e,{boundary:a="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:p=!1,padding:d=0}=K(t,e),y=re(d),g=f[p?"floating"===u?"reference":"floating":u],m=le(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(g)))||o?g:g.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(f.floating)),boundary:a,rootBoundary:c,strategy:s})),h="floating"===u?{...l.floating,x:n,y:i}:l.reference,x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(f.floating)),b=await(null==r.isElement?void 0:r.isElement(x))&&await(null==r.getScale?void 0:r.getScale(x))||{x:1,y:1},w=le(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:h,offsetParent:x,strategy:s}):h);return{top:(m.top-w.top+y.top)/b.y,bottom:(w.bottom-m.bottom+y.bottom)/b.y,left:(m.left-w.left+y.left)/b.x,right:(w.right-m.right+y.right)/b.x}}function ae(e){const t=W(...e.map((e=>e.left))),o=W(...e.map((e=>e.top)));return{x:t,y:o,width:Z(...e.map((e=>e.right)))-t,height:Z(...e.map((e=>e.bottom)))-o}}const ce=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:i,y:r,placement:l,middlewareData:f}=t,s=await async function(e,t){const{placement:o,platform:n,elements:i}=e,r=await(null==n.isRTL?void 0:n.isRTL(i.floating)),l=q(o),f=J(o),s="y"===te(o),a=["left","top"].includes(l)?-1:1,c=r&&s?-1:1,u=K(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:y}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return f&&"number"==typeof y&&(d="end"===f?-1*y:y),s?{x:d*c,y:p*a}:{x:p*a,y:d*c}}(t,e);return l===(null==(o=f.offset)?void 0:o.placement)&&null!=(n=f.arrow)&&n.alignmentOffset?{}:{x:i+s.x,y:r+s.y,data:{...s,placement:l}}}}};function ue(e){const t=A(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=N(e),r=i?e.offsetWidth:o,l=i?e.offsetHeight:n,f=$(o)!==r||$(n)!==l;return f&&(o=r,n=l),{width:o,height:n,$:f}}function pe(e){return j(e)?e:e.contextElement}function de(e){const t=pe(e);if(!N(t))return U(1);const o=t.getBoundingClientRect(),{width:n,height:i,$:r}=ue(t);let l=(r?$(o.width):o.width)/n,f=(r?$(o.height):o.height)/i;return l&&Number.isFinite(l)||(l=1),f&&Number.isFinite(f)||(f=1),{x:l,y:f}}const ye=U(0);function ge(e){const t=S(e);return V()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ye}function me(e,t,o,n){void 0===t&&(t=!1),void 0===o&&(o=!1);const i=e.getBoundingClientRect(),r=pe(e);let l=U(1);t&&(n?j(n)&&(l=de(n)):l=de(e));const f=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==S(e))&&t}(r,o,n)?ge(r):U(0);let s=(i.left+f.x)/l.x,a=(i.top+f.y)/l.y,c=i.width/l.x,u=i.height/l.y;if(r){const e=S(r),t=n&&j(n)?S(n):n;let o=e,i=o.frameElement;for(;i&&n&&t!==o;){const e=de(i),t=i.getBoundingClientRect(),n=A(i),r=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,l=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,a*=e.y,c*=e.x,u*=e.y,s+=r,a+=l,o=S(i),i=o.frameElement}}return le({width:c,height:u,x:s,y:a})}const he=[":popover-open",":modal"];function xe(e){return he.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function be(e){return me(L(e)).left+B(e).scrollLeft}function we(e,t,o){let n;if("viewport"===t)n=function(e,t){const o=S(e),n=L(e),i=o.visualViewport;let r=n.clientWidth,l=n.clientHeight,f=0,s=0;if(i){r=i.width,l=i.height;const e=V();(!e||e&&"fixed"===t)&&(f=i.offsetLeft,s=i.offsetTop)}return{width:r,height:l,x:f,y:s}}(e,o);else if("document"===t)n=function(e){const t=L(e),o=B(e),n=e.ownerDocument.body,i=Z(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=Z(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let l=-o.scrollLeft+be(e);const f=-o.scrollTop;return"rtl"===A(n).direction&&(l+=Z(t.clientWidth,n.clientWidth)-i),{width:i,height:r,x:l,y:f}}(L(e));else if(j(t))n=function(e,t){const o=me(e,!0,"fixed"===t),n=o.top+e.clientTop,i=o.left+e.clientLeft,r=N(e)?de(e):U(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:i*r.x,y:n*r.y}}(t,o);else{const o=ge(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return le(n)}function ve(e,t){const o=z(e);return!(o===t||!j(o)||P(o))&&("fixed"===A(o).position||ve(o,t))}function Ce(e,t,o){const n=N(t),i=L(t),r="fixed"===o,l=me(e,!0,r,t);let f={scrollLeft:0,scrollTop:0};const s=U(0);if(n||!n&&!r)if(("body"!==O(t)||F(i))&&(f=B(t)),n){const e=me(t,!0,r,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=be(i));return{x:l.left+f.scrollLeft-s.x,y:l.top+f.scrollTop-s.y,width:l.width,height:l.height}}function _e(e,t){return N(e)&&"fixed"!==A(e).position?t?t(e):e.offsetParent:null}function ke(e,t){const o=S(e);if(!N(e)||xe(e))return o;let n=_e(e,t);for(;n&&H(n)&&"static"===A(n).position;)n=_e(n,t);return n&&("html"===O(n)||"body"===O(n)&&"static"===A(n).position&&!M(n))?o:n||function(e){let t=z(e);for(;N(t)&&!P(t);){if(M(t))return t;t=z(t)}return null}(e)||o}const Re={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:n,strategy:i}=e;const r="fixed"===i,l=L(n),f=!!t&&xe(t.floating);if(n===l||f&&r)return o;let s={scrollLeft:0,scrollTop:0},a=U(1);const c=U(0),u=N(n);if((u||!u&&!r)&&(("body"!==O(n)||F(l))&&(s=B(n)),N(n))){const e=me(n);a=de(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:o.width*a.x,height:o.height*a.y,x:o.x*a.x-s.scrollLeft*a.x+c.x,y:o.y*a.y-s.scrollTop*a.y+c.y}},getDocumentElement:L,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:n,strategy:i}=e;const r=[..."clippingAncestors"===o?function(e,t){const o=t.get(e);if(o)return o;let n=I(e,[],!1).filter((e=>j(e)&&"body"!==O(e))),i=null;const r="fixed"===A(e).position;let l=r?z(e):e;for(;j(l)&&!P(l);){const t=A(l),o=M(l);o||"fixed"!==t.position||(i=null),(r?!o&&!i:!o&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||F(l)&&!o&&ve(e,l))?n=n.filter((e=>e!==l)):i=t,l=z(l)}return t.set(e,n),n}(t,this._c):[].concat(o),n],l=r[0],f=r.reduce(((e,o)=>{const n=we(t,o,i);return e.top=Z(n.top,e.top),e.right=W(n.right,e.right),e.bottom=W(n.bottom,e.bottom),e.left=Z(n.left,e.left),e}),we(t,l,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}},getOffsetParent:ke,getElementRects:async function(e){const t=this.getOffsetParent||ke,o=this.getDimensions;return{reference:Ce(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await o(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=ue(e);return{width:t,height:o}},getScale:de,isElement:j,isRTL:function(e){return"rtl"===A(e).direction}},Oe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:i}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:f={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...s}=K(e,t),a={x:o,y:n},c=await se(t,s),u=te(q(i)),p=Q(u);let d=a[p],y=a[u];if(r){const e="y"===p?"bottom":"right";d=G(d+c["y"===p?"top":"left"],d,d-c[e])}if(l){const e="y"===u?"bottom":"right";y=G(y+c["y"===u?"top":"left"],y,y-c[e])}const g=f.fn({...t,[p]:d,[u]:y});return{...g,data:{x:g.x-o,y:g.y-n}}}}},Se=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:i,middlewareData:r,rects:l,initialPlacement:f,platform:s,elements:a}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...m}=K(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const h=q(i),x=q(f)===f,b=await(null==s.isRTL?void 0:s.isRTL(a.floating)),w=p||(x||!g?[ie(f)]:function(e){const t=ie(e);return[ne(e),t,ne(t)]}(f));p||"none"===y||w.push(...function(e,t,o,n){const i=J(e);let r=function(e,t,o){const n=["left","right"],i=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return o?t?i:n:t?n:i;case"left":case"right":return t?r:l;default:return[]}}(q(e),"start"===o,n);return i&&(r=r.map((e=>e+"-"+i)),t&&(r=r.concat(r.map(ne)))),r}(f,g,y,b));const v=[f,...w],C=await se(t,m),_=[];let k=(null==(n=r.flip)?void 0:n.overflows)||[];if(c&&_.push(C[h]),u){const e=function(e,t,o){void 0===o&&(o=!1);const n=J(e),i=oe(e),r=ee(i);let l="x"===i?n===(o?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=ie(l)),[l,ie(l)]}(i,l,b);_.push(C[e[0]],C[e[1]])}if(k=[...k,{placement:i,overflows:_}],!_.every((e=>e<=0))){var R,O;const e=((null==(R=r.flip)?void 0:R.index)||0)+1,t=v[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let o=null==(O=k.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:O.placement;if(!o)switch(d){case"bestFit":{var S;const e=null==(S=k.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:S[0];e&&(o=e);break}case"initialPlacement":o=f}if(i!==o)return{reset:{placement:o}}}return{}}}},Le=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:o,elements:n,rects:i,platform:r,strategy:l}=t,{padding:f=2,x:s,y:a}=K(e,t),c=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(n.reference))||[]),u=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),o=[];let n=null;for(let e=0;e<t.length;e++){const i=t[e];!n||i.y-n.y>n.height/2?o.push([i]):o[o.length-1].push(i),n=i}return o.map((e=>le(ae(e))))}(c),p=le(ae(c)),d=re(f);const y=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=s&&null!=a)return u.find((e=>s>e.left-d.left&&s<e.right+d.right&&a>e.top-d.top&&a<e.bottom+d.bottom))||p;if(u.length>=2){if("y"===te(o)){const e=u[0],t=u[u.length-1],n="top"===q(o),i=e.top,r=t.bottom,l=n?e.left:t.left,f=n?e.right:t.right;return{top:i,bottom:r,left:l,right:f,width:f-l,height:r-i,x:l,y:i}}const e="left"===q(o),t=Z(...u.map((e=>e.right))),n=W(...u.map((e=>e.left))),i=u.filter((o=>e?o.left===n:o.right===t)),r=i[0].top,l=i[i.length-1].bottom;return{top:r,bottom:l,left:n,right:t,width:t-n,height:l-r,x:n,y:r}}return p}},floating:n.floating,strategy:l});return i.reference.x!==y.reference.x||i.reference.y!==y.reference.y||i.reference.width!==y.reference.width||i.reference.height!==y.reference.height?{reset:{rects:y}}:{}}}},Ee=(e,t,o)=>{const n=new Map,i={platform:Re,...o},r={...i.platform,_c:n};return(async(e,t,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:l}=o,f=r.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let a=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:u}=fe(a,n,s),p=n,d={},y=0;for(let o=0;o<f.length;o++){const{name:r,fn:g}=f[o],{x:m,y:h,data:x,reset:b}=await g({x:c,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:d,rects:a,platform:l,elements:{reference:e,floating:t}});c=null!=m?m:c,u=null!=h?h:u,d={...d,[r]:{...d[r],...x}},b&&y<=50&&(y++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(a=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:i}):b.rects),({x:c,y:u}=fe(a,p,s))),o=-1)}return{x:c,y:u,placement:p,strategy:i,middlewareData:d}})(e,t,{...i,platform:r})};var je="undefined"!=typeof document?d:y;function Ne(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let o,n,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;0!=n--;)if(!Ne(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),o=i.length,o!==Object.keys(t).length)return!1;for(n=o;0!=n--;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=o;0!=n--;){const o=i[n];if(("_owner"!==o||!e.$$typeof)&&!Ne(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Te(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fe(e,t){const o=Te(e);return Math.round(t*o)/o}function He(e){const t=c.useRef(e);return je((()=>{t.current=e})),t}const Me=c["useInsertionEffect".toString()]||(e=>e());var Ve="undefined"!=typeof document?d:y;let Pe=!1,Ae=0;const Be=()=>"floating-ui-"+Ae++;const ze=c["useId".toString()]||function(){const[e,t]=c.useState((()=>Pe?Be():void 0));return Ve((()=>{null==e&&t(Be())}),[]),c.useEffect((()=>{Pe||(Pe=!0)}),[]),e};const De=c.createContext(null),Ie=c.createContext(null);function We(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:n,nodeId:i}=e,[r,l]=c.useState(null),f=(null==(t=e.elements)?void 0:t.reference)||r,s=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:i,elements:{reference:r,floating:l}={},transform:f=!0,whileElementsMounted:s,open:a}=e,[u,p]=c.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[d,y]=c.useState(n);Ne(d,n)||y(n);const[g,h]=c.useState(null),[x,b]=c.useState(null),w=c.useCallback((e=>{e!==k.current&&(k.current=e,h(e))}),[]),v=c.useCallback((e=>{e!==R.current&&(R.current=e,b(e))}),[]),C=r||g,_=l||x,k=c.useRef(null),R=c.useRef(null),O=c.useRef(u),S=null!=s,L=He(s),E=He(i),j=c.useCallback((()=>{if(!k.current||!R.current)return;const e={placement:t,strategy:o,middleware:d};E.current&&(e.platform=E.current),Ee(k.current,R.current,e).then((e=>{const t={...e,isPositioned:!0};N.current&&!Ne(O.current,t)&&(O.current=t,m.flushSync((()=>{p(t)})))}))}),[d,t,o,E]);je((()=>{!1===a&&O.current.isPositioned&&(O.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[a]);const N=c.useRef(!1);je((()=>(N.current=!0,()=>{N.current=!1})),[]),je((()=>{if(C&&(k.current=C),_&&(R.current=_),C&&_){if(L.current)return L.current(C,_,j);j()}}),[C,_,j,L,S]);const T=c.useMemo((()=>({reference:k,floating:R,setReference:w,setFloating:v})),[w,v]),F=c.useMemo((()=>({reference:C,floating:_})),[C,_]),H=c.useMemo((()=>{const e={position:o,left:0,top:0};if(!F.floating)return e;const t=Fe(F.floating,u.x),n=Fe(F.floating,u.y);return f?{...e,transform:"translate("+t+"px, "+n+"px)",...Te(F.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:n}}),[o,f,F.floating,u.x,u.y]);return c.useMemo((()=>({...u,update:j,refs:T,elements:F,floatingStyles:H})),[u,j,T,F,H])}(e),a=c.useContext(Ie),u=null!=((null==(p=c.useContext(De))?void 0:p.id)||null);var p;const d=function(e){const t=c.useRef((()=>{}));return Me((()=>{t.current=e})),c.useCallback((function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return null==t.current?void 0:t.current(...o)}),[])}(((e,t,o)=>{e&&(g.current.openEvent=t),h.emit("openchange",{open:e,event:t,reason:o,nested:u}),null==n||n(e,t,o)})),y=c.useRef(null),g=c.useRef({}),h=c.useState((()=>function(){const e=new Map;return{emit(t,o){var n;null==(n=e.get(t))||n.forEach((e=>e(o)))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter((e=>e!==o)))||[])}}}()))[0],x=ze(),b=c.useCallback((e=>{const t=j(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;s.refs.setReference(t)}),[s.refs]),w=c.useCallback((e=>{(j(e)||null===e)&&(y.current=e,l(e)),(j(s.refs.reference.current)||null===s.refs.reference.current||null!==e&&!j(e))&&s.refs.setReference(e)}),[s.refs]),v=c.useMemo((()=>({...s.refs,setReference:w,setPositionReference:b,domReference:y})),[s.refs,w,b]),C=c.useMemo((()=>({...s.elements,domReference:f})),[s.elements,f]),_=c.useMemo((()=>({...s,refs:v,elements:C,dataRef:g,nodeId:i,floatingId:x,events:h,open:o,onOpenChange:d})),[s,i,x,h,o,d,v,C]);return Ve((()=>{const e=null==a?void 0:a.nodesRef.current.find((e=>e.id===i));e&&(e.context=_)})),c.useMemo((()=>({...s,context:_,refs:v,elements:C})),[s,v,C,_])}function Ze(e,t,o,n){return new(o||(o=Promise))((function(i,r){function l(e){try{s(n.next(e))}catch(e){r(e)}}function f(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(l,f)}s((n=n.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const $e=({accept:n="",onClose:i,blockId:r,onSetLoading:l})=>{const f=e("File"),c=t();return s("div",Object.assign({className:"yoo-file-user-select-none yoo-file-transition-bg yoo-file-duration-20 yoo-file-ease-in yoo-file-white-space-nowrap yoo-file-rounded-[4px] yoo-file-h-[32px] yoo-file-px-[12px] yoo-file-border yoo-file-border-solid yoo-file-border-[rgba(55,53,47,0.16)] yoo-file-w-full yoo-file-cursor-pointer"},{children:a("label",Object.assign({htmlFor:"file-uploader",className:"yoo-file-text-[14px] yoo-file-leading-[1.2] yoo-file-font-medium yoo-file-cursor-pointer yoo-file-w-full yoo-file-flex yoo-file-items-center yoo-file-justify-center yoo-file-h-full"},{children:[s("input",{type:"file",id:"file-uploader",className:"yoo-file-absolute yoo-file-left-0 yoo-file-top-0 yoo-file-invisible",accept:(null==f?void 0:f.accept)||n,onChange:e=>{const t=e.target.files[0];t&&(e=>{Ze(void 0,void 0,void 0,(function*(){if(!(null==f?void 0:f.onUpload))throw new Error("onUpload not provided in plugin options. Check File.extend({}) method");i(),l(!0);try{const t=yield null==f?void 0:f.onUpload(e),n=t.format||e.name.split(".").pop()||null;o.updateElement(c,r,{type:"file",props:{src:t.src,name:t.name||e.name,size:t.size||e.size,format:n}})}catch(e){}finally{l(!1)}}))})(t)},multiple:!1}),"Upload file"]}))}))},{Overlay:Ue,Portal:Xe}=n,Ye=({floatingStyles:e,refs:t,onClose:o,blockId:n,onSetLoading:i})=>s(Xe,Object.assign({id:"yoo-file-uploader-portal"},{children:s(Ue,Object.assign({lockScroll:!0,className:"yoo-file-z-[100]",onClick:o},{children:s("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:a("div",Object.assign({className:"yoo-file-flex yoo-file-flex-col yoo-file-min-w-[540px] yoo-file-max-w-[calc(100vw-24px)] yoo-file-h-full yoo-file-max-h-[420px] yoo-file-bg-[#FFFFFF] yoo-file-shadow-[rgb(15_15_15_/5%)_0px_0px_0px_1px,_rgb(15_15_15_/10%)_0px_3px_6px,_rgb(15_15_15_/20%)_0px_9px_24px]"},{children:[s("div",Object.assign({className:"yoo-file-w-full yoo-file-flex yoo-file-text-[14px] yoo-file-p-[0_8px] yoo-file-shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] yoo-file-relative yoo-file-z-10 yoo-file-h-[40px]"},{children:s("button",Object.assign({type:"button",style:{borderBottom:"2px solid #2483e2"},className:"yoopta-button yoo-file-py-[6px] yoo-file-whitespace-nowrap yoo-file-min-w-0 yoo-file-flex-shrink-0 yoo-file-text-[rgb(55,53,47)] yoo-file-relative yoo-file-cursor-pointer yoo-file-user-select-none yoo-file-bg-inherit yoo-file-transition-[height_20ms_ease-in] yoo-file-inline-flex yoo-file-items-center yoo-file-h-full yoo-file-text-[14px] yoo-file-leading-[1.2] yoo-file-px-[8px]"},{children:"Upload"}))})),s("div",Object.assign({className:"yoo-file-pt-[6px] yoo-file-pb-[6px] yoo-file-mt-[4px] yoo-file-flex yoo-file-justify-center yoo-file-mr-[12px] yoo-file-ml-[12px]"},{children:s($e,{onClose:o,blockId:n,onSetLoading:i})}))]}))}))}))})),Ge=({className:e,width:t,height:o,children:n})=>a("div",Object.assign({className:e},{children:[n,s("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:t,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-2 yoo-file-h-4 yoo-file-w-4 yoo-file-animate-spin"},{children:s("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}))]})),Ke=({attributes:e,children:t,blockId:o})=>{const[n,i]=g(!1),[r,l]=g(!1),{refs:f,floatingStyles:c}=We({placement:"bottom",open:n,onOpenChange:i,middleware:[Le(),Se(),Oe(),ce(10)]});return a("div",Object.assign({className:"yoo-file-w-full yoo-file-user-select-none yoo-file-m-[20px_0_10px] yoo-file-relative yoo-file-flex"},e,{contentEditable:!1},{children:[a("button",Object.assign({type:"button",className:"yoopta-button yoo-file-p-[12px_36px_12px_12px] yoo-file-flex yoo-file-items-center yoo-file-text-left yoo-file-w-full yoo-file-overflow-hidden yoo-file-rounded-[3px] yoo-file-text-[14px] yoo-file-text-[rgba(55,53,47,0.65)] yoo-file-relative yoo-file-cursor-pointer yoo-file-border-none yoo-file-bg-[#efefef] yoo-file-transition-[background-color_100ms_ease-in] hover:yoo-file-bg-[#e3e3e3]",onClick:()=>i(!0),ref:f.setReference},{children:[s(r?Ge:v,{className:"yoo-file-mr-2 yoo-file-user-select-none",width:24,height:24}),s("span",Object.assign({className:"yoo-file-font-medium"},{children:r?"Loading...":"Click to add file"})),r&&s("div",{className:"yoopta-button yoo-file-absolute yoo-file-top-0 yoo-file-left-0 yoo-file-h-full yoo-file-bg-[rgba(55,53,47,0.16)]",style:{width:"100%",transition:"width 100ms ease-in"}})]})),n&&s(Ye,{blockId:o,floatingStyles:c,refs:f,onClose:()=>i(!1),onSetLoading:e=>l(e)}),t]}))},{ExtendedBlockActions:qe,BlockOptionsMenuGroup:Je,BlockOptionsMenuItem:Qe,BlockOptionsSeparator:et}=n,tt=({editor:e,block:t,props:o})=>a(qe,Object.assign({onClick:()=>e.setSelection([t.meta.order])},{children:[s(et,{}),s(Je,{children:s(Qe,{children:a("button",Object.assign({type:"button",className:"yoopta-block-options-button",onClick:()=>{(null==o?void 0:o.src)&&window.open(null==o?void 0:o.src,"_blank")}},{children:[s(b,{width:16,height:16,className:"yoo-file-w-4 yoo-file-h-4 yoo-file-mr-2"}),"Open"]}))})})]})),ot=new f({type:"File",elements:{file:{render:({element:e,attributes:o,children:n,blockId:f})=>{const{name:c,src:u,format:p,size:d}=e.props||{},y=i(f),g=t(),m=r(),h=l({blockId:f});return u?a("div",Object.assign({contentEditable:!1,draggable:!1,className:"yoo-file-mt-4 yoo-file-relative yoo-file-flex yoopta-file"},o,{children:[h&&s("div",{className:"yoo-file-absolute yoo-file-pointer-events-none yoo-file-inset-0 yoo-file-bg-[rgba(35,131,226,0.14)] yoo-file-z-[81] yoo-file-rounded-[3px] yoo-file-opacity-100 yoo-file-transition-opacity yoo-file-duration-150 yoo-file-ease-in"}),s(R,{name:c,format:p,src:u,size:d,blockId:f}),!m&&s(tt,{block:y,editor:g,props:e.props}),n]})):s(Ke,Object.assign({attributes:o,blockId:f},{children:n}))},props:{size:0,name:null,src:null,format:null,nodeType:"void"}}},options:{display:{title:"File",description:"For file videos, google maps and more"},accept:""},parsers:{}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".yoo-file-pointer-events-none{pointer-events:none}.yoo-file-invisible{visibility:hidden}.yoo-file-absolute{position:absolute}.yoo-file-relative{position:relative}.yoo-file-inset-0{inset:0}.yoo-file-left-0{left:0}.yoo-file-top-0{top:0}.yoo-file-z-10{z-index:10}.yoo-file-z-\\[100\\]{z-index:100}.yoo-file-z-\\[81\\]{z-index:81}.yoo-file-m-\\[20px_0_10px\\]{margin:20px 0 10px}.yoo-file-ml-\\[12px\\]{margin-left:12px}.yoo-file-ml-\\[6px\\]{margin-left:6px}.yoo-file-ml-\\[8px\\]{margin-left:8px}.yoo-file-mr-2{margin-right:.5rem}.yoo-file-mr-\\[12px\\]{margin-right:12px}.yoo-file-mt-4{margin-top:1rem}.yoo-file-mt-\\[4px\\]{margin-top:4px}.yoo-file-flex{display:flex}.yoo-file-inline-flex{display:inline-flex}.yoo-file-h-4{height:1rem}.yoo-file-h-\\[32px\\]{height:32px}.yoo-file-h-\\[40px\\]{height:40px}.yoo-file-h-full{height:100%}.yoo-file-max-h-\\[420px\\]{max-height:420px}.yoo-file-w-4{width:1rem}.yoo-file-w-full{width:100%}.yoo-file-min-w-0{min-width:0}.yoo-file-min-w-\\[540px\\]{min-width:540px}.yoo-file-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.yoo-file-flex-shrink-0{flex-shrink:0}@keyframes yoo-file-spin{to{transform:rotate(1turn)}}.yoo-file-animate-spin{animation:yoo-file-spin 1s linear infinite}.yoo-file-cursor-pointer{cursor:pointer}.yoo-file-flex-col{flex-direction:column}.yoo-file-items-center{align-items:center}.yoo-file-justify-center{justify-content:center}.yoo-file-overflow-hidden{overflow:hidden}.yoo-file-whitespace-nowrap{white-space:nowrap}.yoo-file-rounded-\\[3px\\]{border-radius:3px}.yoo-file-rounded-\\[4px\\]{border-radius:4px}.yoo-file-border{border-width:1px}.yoo-file-border-b-\\[1px\\]{border-bottom-width:1px}.yoo-file-border-solid{border-style:solid}.yoo-file-border-none{border-style:none}.yoo-file-border-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{border-color:rgba(55,53,47,.16)}.yoo-file-border-\\[transparent\\]{border-color:transparent}.yoo-file-bg-\\[\\#FFFFFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yoo-file-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.yoo-file-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.yoo-file-bg-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{background-color:rgba(55,53,47,.16)}.yoo-file-bg-inherit{background-color:inherit}.yoo-file-p-\\[0_8px\\]{padding:0 8px}.yoo-file-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.yoo-file-px-2{padding-left:.5rem;padding-right:.5rem}.yoo-file-px-\\[12px\\]{padding-left:12px;padding-right:12px}.yoo-file-px-\\[8px\\]{padding-left:8px;padding-right:8px}.yoo-file-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.yoo-file-py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.yoo-file-pb-\\[6px\\]{padding-bottom:6px}.yoo-file-pt-\\[6px\\]{padding-top:6px}.yoo-file-text-left{text-align:left}.yoo-file-text-\\[10px\\]{font-size:10px}.yoo-file-text-\\[14px\\]{font-size:14px}.yoo-file-font-medium{font-weight:500}.yoo-file-font-normal{font-weight:400}.yoo-file-leading-\\[1\\.2\\]{line-height:1.2}.yoo-file-text-\\[\\#000000\\]{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.yoo-file-text-\\[\\#37352fa6\\]{color:#37352fa6}.yoo-file-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.yoo-file-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}.yoo-file-opacity-100{opacity:1}.yoo-file-shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\,_rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\,_rgb\\(15_15_15_\\/20\\%\\)_0px_9px_24px\\]{--tw-shadow:rgb(15 15 15/5%) 0px 0px 0px 1px,hsla(0,0%,6%,.1) 0px 3px 6px,hsla(0,0%,6%,.2) 0px 9px 24px;--tw-shadow-colored:0px 0px 0px 1px var(--tw-shadow-color),0px 3px 6px var(--tw-shadow-color),0px 9px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-file-shadow-\\[rgb\\(55_53_47_\\/9\\%\\)_0px_-1px_0px_inset\\]{--tw-shadow:rgb(55 53 47/9%) 0px -1px 0px inset;--tw-shadow-colored:inset 0px -1px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-file-transition-\\[background-color_100ms_ease-in\\]{transition-duration:.15s;transition-property:background-color .1s ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-file-transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-file-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-file-duration-150{transition-duration:.15s}.yoo-file-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.yoopta-file .yoopta-extended-block-actions{opacity:0;transition:opacity .15s ease-in-out}.yoopta-file:hover .yoopta-extended-block-actions{opacity:1}.hover\\:yoo-file-border-\\[rgba\\(55\\2c 53\\2c 47\\2c 0\\.16\\)\\]:hover{border-color:rgba(55,53,47,.16)}.hover\\:yoo-file-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.hover\\:yoo-file-bg-\\[rgba\\(55\\2c 53\\2c 47\\2c 0\\.04\\)\\]:hover{background-color:rgba(55,53,47,.04)}");export{ot as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploader.d.ts","sourceRoot":"","sources":["../../src/ui/FileUploader.tsx"],"names":[],"mappings":"AAIA,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,QAAA,MAAM,YAAY,+CAAqD,KAAK,
|
|
1
|
+
{"version":3,"file":"FileUploader.d.ts","sourceRoot":"","sources":["../../src/ui/FileUploader.tsx"],"names":[],"mappings":"AAIA,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,QAAA,MAAM,YAAY,+CAAqD,KAAK,4CAsD3E,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/file",
|
|
3
|
-
"version": "4.5.0
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "File plugin for Yoopta Editor",
|
|
5
5
|
"author": "Darginec05 <devopsbanda@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"@floating-ui/react": "^0.26.9",
|
|
39
39
|
"@radix-ui/react-icons": "^1.3.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "66e50e51cabb22b5f1f0c7d1bf79614f16cec232"
|
|
42
42
|
}
|