@yoopta/file 4.9.9 → 6.0.0-beta.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.
@@ -1,5 +1,5 @@
1
- import { YooEditor, YooptaPathIndex } from '@yoopta/editor';
2
- import { FileElement, FileElementProps } from '../types';
1
+ import type { YooEditor, YooptaPathIndex } from '@yoopta/editor';
2
+ import type { FileElement, FileElementProps } from '../types';
3
3
  type FileElementOptions = {
4
4
  props?: Omit<FileElementProps, 'nodeType'>;
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC1G,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEzD,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;CAC5C,CAAC;AAEF,KAAK,iBAAiB,GAAG,kBAAkB,GAAG;IAC5C,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,iBAAiB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,KAAK,WAAW,CAAC;IAC7F,UAAU,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC9E,UAAU,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,UAAU,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC5F,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,YAiB1B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE9D,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;CAC5C,CAAC;AAEF,KAAK,iBAAiB,GAAG,kBAAkB,GAAG;IAC5C,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,iBAAiB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,KAAK,WAAW,CAAC;IAC7F,UAAU,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC9E,UAAU,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,UAAU,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC5F,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,YAsB1B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,11 +1,5 @@
1
1
  import { File } from './plugin';
2
2
  import { FileElement, FileElementProps, FileUploadResponse } from './types';
3
- import './styles.css';
4
- declare module 'slate' {
5
- interface CustomTypes {
6
- Element: FileElement;
7
- }
8
- }
9
3
  export { FileCommands } from './commands';
10
4
  export default File;
11
5
  export { FileElement, FileElementProps, FileUploadResponse };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC5E,OAAO,cAAc,CAAC;AAEtB,OAAO,QAAQ,OAAO,CAAC;IACrB,UAAU,WAAW;QACnB,OAAO,EAAE,WAAW,CAAC;KACtB;CACF;AAED,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,eAAe,IAAI,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE5E,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,eAAe,IAAI,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{generateId as e,buildBlockData as t,Blocks as o,Elements as n,useYooptaPluginOptions as i,useYooptaEditor as r,UI as l,useBlockData as a,useYooptaReadOnly as s,useBlockSelected as f,YooptaPlugin as c}from"@yoopta/editor";import{jsx as p,jsxs as d}from"react/jsx-runtime";import*as u from"react";import{forwardRef as y,createElement as g,useLayoutEffect as h,useEffect as m,useState as x}from"react";import*as b from"react-dom";const w={buildFileElements:(t,o={})=>{const n=Object.assign(Object.assign({},o.props),{nodeType:"void"});return{id:e(),type:"file",children:[{text:""}],props:n}},insertFile:(e,n={})=>{const{at:i,focus:r,props:l}=n,a=w.buildFileElements(e,{props:l}),s=t({value:[a],type:"File"});o.insertBlock(e,s.type,{focus:r,at:i,blockData:s})},deleteFile:(e,t)=>{o.deleteBlock(e,{blockId:t})},updateFile:(e,t,o)=>{n.updateElement(e,t,{props:o})}};function v(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 a(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,a)}s((n=n.apply(e,t||[])).next())}))}function C(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}"function"==typeof SuppressedError&&SuppressedError;var _=["color"],k=y((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,i=C(e,_);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),g("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"}))})),R=["color"],O=y((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,i=C(e,R);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),g("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"}))})),j=["color"],H=y((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,i=C(e,j);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),g("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"}))})),E=["color"],S=y((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,i=C(e,E);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),g("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),L=["color"],N=y((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,i=C(e,L);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),g("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),M=["color"],F=y((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,i=C(e,M);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),g("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}));function T(e){if("number"!=typeof e||isNaN(e))return null;return(e/1024).toFixed(2)+" KB"}const $=({name:e,src:t,size:o,format:n,align:i})=>{if(!t)return null;const r=`yoopta-align-${i||"left"}`;return p("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:d("div",Object.assign({className:`yoo-file-flex ${r} 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:[d("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:[p(H,{width:16,height:16}),p("span",Object.assign({className:"yoo-file-ml-[6px] yoo-file-text-[14px]"},{children:n?`${e}.${n}`:`${e}`}))]})),p("div",Object.assign({className:"yoo-file-ml-[8px] yoo-file-text-[10px] yoo-file-font-normal yoo-file-text-[#37352fa6]"},{children:T(o)}))]}))}))};function z(e){return B(e)?(e.nodeName||"").toLowerCase():"#document"}function P(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function A(e){var t;return null==(t=(B(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function B(e){return e instanceof Node||e instanceof P(e).Node}function V(e){return e instanceof Element||e instanceof P(e).Element}function D(e){return e instanceof HTMLElement||e instanceof P(e).HTMLElement}function Z(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof P(e).ShadowRoot)}function I(e){const{overflow:t,overflowX:o,overflowY:n,display:i}=G(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!["inline","contents"].includes(i)}function W(e){return["table","td","th"].includes(z(e))}function U(e){const t=X(),o=G(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 X(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Y(e){return["html","body","#document"].includes(z(e))}function G(e){return P(e).getComputedStyle(e)}function K(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function q(e){if("html"===z(e))return e;const t=e.assignedSlot||e.parentNode||Z(e)&&e.host||A(e);return Z(t)?t.host:t}function J(e){const t=q(e);return Y(t)?e.ownerDocument?e.ownerDocument.body:e.body:D(t)&&I(t)?t:J(t)}function Q(e,t,o){var n;void 0===t&&(t=[]),void 0===o&&(o=!0);const i=J(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),l=P(i);return r?t.concat(l,l.visualViewport||[],I(i)?i:[],l.frameElement&&o?Q(l.frameElement):[]):t.concat(i,Q(i,[],o))}const ee=Math.min,te=Math.max,oe=Math.round,ne=e=>({x:e,y:e}),ie={left:"right",right:"left",bottom:"top",top:"bottom"},re={start:"end",end:"start"};function le(e,t,o){return te(e,ee(t,o))}function ae(e,t){return"function"==typeof e?e(t):e}function se(e){return e.split("-")[0]}function fe(e){return e.split("-")[1]}function ce(e){return"x"===e?"y":"x"}function pe(e){return"y"===e?"height":"width"}function de(e){return["top","bottom"].includes(se(e))?"y":"x"}function ue(e){return ce(de(e))}function ye(e){return e.replace(/start|end/g,(e=>re[e]))}function ge(e){return e.replace(/left|right|bottom|top/g,(e=>ie[e]))}function he(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 me(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function xe(e,t,o){let{reference:n,floating:i}=e;const r=de(t),l=ue(t),a=pe(l),s=se(t),f="y"===r,c=n.x+n.width/2-i.width/2,p=n.y+n.height/2-i.height/2,d=n[a]/2-i[a]/2;let u;switch(s){case"top":u={x:c,y:n.y-i.height};break;case"bottom":u={x:c,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:p};break;case"left":u={x:n.x-i.width,y:p};break;default:u={x:n.x,y:n.y}}switch(fe(t)){case"start":u[l]-=d*(o&&f?-1:1);break;case"end":u[l]+=d*(o&&f?-1:1)}return u}async function be(e,t){var o;void 0===t&&(t={});const{x:n,y:i,platform:r,rects:l,elements:a,strategy:s}=e,{boundary:f="clippingAncestors",rootBoundary:c="viewport",elementContext:p="floating",altBoundary:d=!1,padding:u=0}=ae(t,e),y=he(u),g=a[d?"floating"===p?"reference":"floating":p],h=me(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(a.floating)),boundary:f,rootBoundary:c,strategy:s})),m="floating"===p?{...l.floating,x:n,y:i}:l.reference,x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.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=me(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:x,strategy:s}):m);return{top:(h.top-w.top+y.top)/b.y,bottom:(w.bottom-h.bottom+y.bottom)/b.y,left:(h.left-w.left+y.left)/b.x,right:(w.right-h.right+y.right)/b.x}}function we(e){const t=ee(...e.map((e=>e.left))),o=ee(...e.map((e=>e.top)));return{x:t,y:o,width:te(...e.map((e=>e.right)))-t,height:te(...e.map((e=>e.bottom)))-o}}const ve=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:a}=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=se(o),a=fe(o),s="y"===de(o),f=["left","top"].includes(l)?-1:1,c=r&&s?-1:1,p=ae(t,e);let{mainAxis:d,crossAxis:u,alignmentAxis:y}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return a&&"number"==typeof y&&(u="end"===a?-1*y:y),s?{x:u*c,y:d*f}:{x:d*f,y:u*c}}(t,e);return l===(null==(o=a.offset)?void 0:o.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:i+s.x,y:r+s.y,data:{...s,placement:l}}}}};function Ce(e){const t=G(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=D(e),r=i?e.offsetWidth:o,l=i?e.offsetHeight:n,a=oe(o)!==r||oe(n)!==l;return a&&(o=r,n=l),{width:o,height:n,$:a}}function _e(e){return V(e)?e:e.contextElement}function ke(e){const t=_e(e);if(!D(t))return ne(1);const o=t.getBoundingClientRect(),{width:n,height:i,$:r}=Ce(t);let l=(r?oe(o.width):o.width)/n,a=(r?oe(o.height):o.height)/i;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const Re=ne(0);function Oe(e){const t=P(e);return X()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Re}function je(e,t,o,n){void 0===t&&(t=!1),void 0===o&&(o=!1);const i=e.getBoundingClientRect(),r=_e(e);let l=ne(1);t&&(n?V(n)&&(l=ke(n)):l=ke(e));const a=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==P(e))&&t}(r,o,n)?Oe(r):ne(0);let s=(i.left+a.x)/l.x,f=(i.top+a.y)/l.y,c=i.width/l.x,p=i.height/l.y;if(r){const e=P(r),t=n&&V(n)?P(n):n;let o=e,i=o.frameElement;for(;i&&n&&t!==o;){const e=ke(i),t=i.getBoundingClientRect(),n=G(i),r=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,l=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,f*=e.y,c*=e.x,p*=e.y,s+=r,f+=l,o=P(i),i=o.frameElement}}return me({width:c,height:p,x:s,y:f})}const He=[":popover-open",":modal"];function Ee(e){return He.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Se(e){return je(A(e)).left+K(e).scrollLeft}function Le(e,t,o){let n;if("viewport"===t)n=function(e,t){const o=P(e),n=A(e),i=o.visualViewport;let r=n.clientWidth,l=n.clientHeight,a=0,s=0;if(i){r=i.width,l=i.height;const e=X();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,s=i.offsetTop)}return{width:r,height:l,x:a,y:s}}(e,o);else if("document"===t)n=function(e){const t=A(e),o=K(e),n=e.ownerDocument.body,i=te(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=te(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let l=-o.scrollLeft+Se(e);const a=-o.scrollTop;return"rtl"===G(n).direction&&(l+=te(t.clientWidth,n.clientWidth)-i),{width:i,height:r,x:l,y:a}}(A(e));else if(V(t))n=function(e,t){const o=je(e,!0,"fixed"===t),n=o.top+e.clientTop,i=o.left+e.clientLeft,r=D(e)?ke(e):ne(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=Oe(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return me(n)}function Ne(e,t){const o=q(e);return!(o===t||!V(o)||Y(o))&&("fixed"===G(o).position||Ne(o,t))}function Me(e,t,o){const n=D(t),i=A(t),r="fixed"===o,l=je(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const s=ne(0);if(n||!n&&!r)if(("body"!==z(t)||I(i))&&(a=K(t)),n){const e=je(t,!0,r,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=Se(i));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function Fe(e,t){return D(e)&&"fixed"!==G(e).position?t?t(e):e.offsetParent:null}function Te(e,t){const o=P(e);if(!D(e)||Ee(e))return o;let n=Fe(e,t);for(;n&&W(n)&&"static"===G(n).position;)n=Fe(n,t);return n&&("html"===z(n)||"body"===z(n)&&"static"===G(n).position&&!U(n))?o:n||function(e){let t=q(e);for(;D(t)&&!Y(t);){if(U(t))return t;t=q(t)}return null}(e)||o}const $e={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:n,strategy:i}=e;const r="fixed"===i,l=A(n),a=!!t&&Ee(t.floating);if(n===l||a&&r)return o;let s={scrollLeft:0,scrollTop:0},f=ne(1);const c=ne(0),p=D(n);if((p||!p&&!r)&&(("body"!==z(n)||I(l))&&(s=K(n)),D(n))){const e=je(n);f=ke(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:o.width*f.x,height:o.height*f.y,x:o.x*f.x-s.scrollLeft*f.x+c.x,y:o.y*f.y-s.scrollTop*f.y+c.y}},getDocumentElement:A,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=Q(e,[],!1).filter((e=>V(e)&&"body"!==z(e))),i=null;const r="fixed"===G(e).position;let l=r?q(e):e;for(;V(l)&&!Y(l);){const t=G(l),o=U(l);o||"fixed"!==t.position||(i=null),(r?!o&&!i:!o&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||I(l)&&!o&&Ne(e,l))?n=n.filter((e=>e!==l)):i=t,l=q(l)}return t.set(e,n),n}(t,this._c):[].concat(o),n],l=r[0],a=r.reduce(((e,o)=>{const n=Le(t,o,i);return e.top=te(n.top,e.top),e.right=ee(n.right,e.right),e.bottom=ee(n.bottom,e.bottom),e.left=te(n.left,e.left),e}),Le(t,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Te,getElementRects:async function(e){const t=this.getOffsetParent||Te,o=this.getDimensions;return{reference:Me(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}=Ce(e);return{width:t,height:o}},getScale:ke,isElement:V,isRTL:function(e){return"rtl"===G(e).direction}},ze=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:a={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...s}=ae(e,t),f={x:o,y:n},c=await be(t,s),p=de(se(i)),d=ce(p);let u=f[d],y=f[p];if(r){const e="y"===d?"bottom":"right";u=le(u+c["y"===d?"top":"left"],u,u-c[e])}if(l){const e="y"===p?"bottom":"right";y=le(y+c["y"===p?"top":"left"],y,y-c[e])}const g=a.fn({...t,[d]:u,[p]:y});return{...g,data:{x:g.x-o,y:g.y-n}}}}},Pe=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:a,platform:s,elements:f}=t,{mainAxis:c=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...h}=ae(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const m=se(i),x=se(a)===a,b=await(null==s.isRTL?void 0:s.isRTL(f.floating)),w=d||(x||!g?[ge(a)]:function(e){const t=ge(e);return[ye(e),t,ye(t)]}(a));d||"none"===y||w.push(...function(e,t,o,n){const i=fe(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[]}}(se(e),"start"===o,n);return i&&(r=r.map((e=>e+"-"+i)),t&&(r=r.concat(r.map(ye)))),r}(a,g,y,b));const v=[a,...w],C=await be(t,h),_=[];let k=(null==(n=r.flip)?void 0:n.overflows)||[];if(c&&_.push(C[m]),p){const e=function(e,t,o){void 0===o&&(o=!1);const n=fe(e),i=ue(e),r=pe(i);let l="x"===i?n===(o?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=ge(l)),[l,ge(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(u){case"bestFit":{var j;const e=null==(j=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:j[0];e&&(o=e);break}case"initialPlacement":o=a}if(i!==o)return{reset:{placement:o}}}return{}}}},Ae=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:a=2,x:s,y:f}=ae(e,t),c=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(n.reference))||[]),p=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=>me(we(e))))}(c),d=me(we(c)),u=he(a);const y=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&p[0].left>p[1].right&&null!=s&&null!=f)return p.find((e=>s>e.left-u.left&&s<e.right+u.right&&f>e.top-u.top&&f<e.bottom+u.bottom))||d;if(p.length>=2){if("y"===de(o)){const e=p[0],t=p[p.length-1],n="top"===se(o),i=e.top,r=t.bottom,l=n?e.left:t.left,a=n?e.right:t.right;return{top:i,bottom:r,left:l,right:a,width:a-l,height:r-i,x:l,y:i}}const e="left"===se(o),t=te(...p.map((e=>e.right))),n=ee(...p.map((e=>e.left))),i=p.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 d}},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}}:{}}}},Be=(e,t,o)=>{const n=new Map,i={platform:$e,...o},r={...i.platform,_c:n};return(async(e,t,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:l}=o,a=r.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:p}=xe(f,n,s),d=n,u={},y=0;for(let o=0;o<a.length;o++){const{name:r,fn:g}=a[o],{x:h,y:m,data:x,reset:b}=await g({x:c,y:p,initialPlacement:n,placement:d,strategy:i,middlewareData:u,rects:f,platform:l,elements:{reference:e,floating:t}});c=null!=h?h:c,p=null!=m?m:p,u={...u,[r]:{...u[r],...x}},b&&y<=50&&(y++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(f=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:i}):b.rects),({x:c,y:p}=xe(f,d,s))),o=-1)}return{x:c,y:p,placement:d,strategy:i,middlewareData:u}})(e,t,{...i,platform:r})};var Ve="undefined"!=typeof document?h:m;function De(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(!De(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)&&!De(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Ze(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ie(e,t){const o=Ze(e);return Math.round(t*o)/o}function We(e){const t=u.useRef(e);return Ve((()=>{t.current=e})),t}const Ue=u["useInsertionEffect".toString()]||(e=>e());var Xe="undefined"!=typeof document?h:m;let Ye=!1,Ge=0;const Ke=()=>"floating-ui-"+Ge++;const qe=u["useId".toString()]||function(){const[e,t]=u.useState((()=>Ye?Ke():void 0));return Xe((()=>{null==e&&t(Ke())}),[]),u.useEffect((()=>{Ye||(Ye=!0)}),[]),e};const Je=u.createContext(null),Qe=u.createContext(null);function et(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:n,nodeId:i}=e,[r,l]=u.useState(null),a=(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:a=!0,whileElementsMounted:s,open:f}=e,[c,p]=u.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[d,y]=u.useState(n);De(d,n)||y(n);const[g,h]=u.useState(null),[m,x]=u.useState(null),w=u.useCallback((e=>{e!==k.current&&(k.current=e,h(e))}),[]),v=u.useCallback((e=>{e!==R.current&&(R.current=e,x(e))}),[]),C=r||g,_=l||m,k=u.useRef(null),R=u.useRef(null),O=u.useRef(c),j=null!=s,H=We(s),E=We(i),S=u.useCallback((()=>{if(!k.current||!R.current)return;const e={placement:t,strategy:o,middleware:d};E.current&&(e.platform=E.current),Be(k.current,R.current,e).then((e=>{const t={...e,isPositioned:!0};L.current&&!De(O.current,t)&&(O.current=t,b.flushSync((()=>{p(t)})))}))}),[d,t,o,E]);Ve((()=>{!1===f&&O.current.isPositioned&&(O.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[f]);const L=u.useRef(!1);Ve((()=>(L.current=!0,()=>{L.current=!1})),[]),Ve((()=>{if(C&&(k.current=C),_&&(R.current=_),C&&_){if(H.current)return H.current(C,_,S);S()}}),[C,_,S,H,j]);const N=u.useMemo((()=>({reference:k,floating:R,setReference:w,setFloating:v})),[w,v]),M=u.useMemo((()=>({reference:C,floating:_})),[C,_]),F=u.useMemo((()=>{const e={position:o,left:0,top:0};if(!M.floating)return e;const t=Ie(M.floating,c.x),n=Ie(M.floating,c.y);return a?{...e,transform:"translate("+t+"px, "+n+"px)",...Ze(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:n}}),[o,a,M.floating,c.x,c.y]);return u.useMemo((()=>({...c,update:S,refs:N,elements:M,floatingStyles:F})),[c,S,N,M,F])}(e),f=u.useContext(Qe),c=null!=((null==(p=u.useContext(Je))?void 0:p.id)||null);var p;const d=function(e){const t=u.useRef((()=>{}));return Ue((()=>{t.current=e})),u.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:c}),null==n||n(e,t,o)})),y=u.useRef(null),g=u.useRef({}),h=u.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],m=qe(),x=u.useCallback((e=>{const t=V(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;s.refs.setReference(t)}),[s.refs]),w=u.useCallback((e=>{(V(e)||null===e)&&(y.current=e,l(e)),(V(s.refs.reference.current)||null===s.refs.reference.current||null!==e&&!V(e))&&s.refs.setReference(e)}),[s.refs]),v=u.useMemo((()=>({...s.refs,setReference:w,setPositionReference:x,domReference:y})),[s.refs,w,x]),C=u.useMemo((()=>({...s.elements,domReference:a})),[s.elements,a]),_=u.useMemo((()=>({...s,refs:v,elements:C,dataRef:g,nodeId:i,floatingId:m,events:h,open:o,onOpenChange:d})),[s,i,m,h,o,d,v,C]);return Xe((()=>{const e=null==f?void 0:f.nodesRef.current.find((e=>e.id===i));e&&(e.context=_)})),u.useMemo((()=>({...s,context:_,refs:v,elements:C})),[s,v,C,_])}const tt=({accept:e="",onClose:t,blockId:o,onSetLoading:l})=>{const a=i("File"),s=r();return p("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:d("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:[p("input",{type:"file",id:"file-uploader",className:"yoo-file-absolute yoo-file-left-0 yoo-file-top-0 yoo-file-invisible",accept:(null==a?void 0:a.accept)||e,onChange:e=>{const i=e.target.files[0];i&&(e=>{v(void 0,void 0,void 0,(function*(){var i;if(!(null==a?void 0:a.onUpload))throw new Error("onUpload not provided in plugin options. Check File.extend({}) method");t(),l(!0);try{const t=yield null==a?void 0:a.onUpload(e);n.updateElement(s,o,{type:"file",props:{src:t.src,name:t.name||e.name,size:t.size||e.size,format:t.format}})}catch(e){null===(i=null==a?void 0:a.onError)||void 0===i||i.call(a,e)}finally{l(!1)}}))})(i)},multiple:!1}),"Upload file"]}))}))},{Overlay:ot,Portal:nt}=l,it=({floatingStyles:e,refs:t,onClose:o,blockId:n,onSetLoading:i})=>p(nt,Object.assign({id:"yoo-file-uploader-portal"},{children:p(ot,Object.assign({lockScroll:!0,className:"yoo-file-z-[100]",onClick:o},{children:p("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:d("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:[p("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:p("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"}))})),p("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:p(tt,{onClose:o,blockId:n,onSetLoading:i})}))]}))}))}))})),rt=({className:e,width:t,height:o,children:n})=>d("div",Object.assign({className:e},{children:[n,p("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:p("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}))]})),lt=({attributes:e,children:t,blockId:o})=>{const[n,i]=x(!1),[r,l]=x(!1),{refs:a,floatingStyles:s}=et({placement:"bottom",open:n,onOpenChange:i,middleware:[Ae(),Pe(),ze(),ve(10)]});return d("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:[d("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:a.setReference},{children:[p(r?rt:O,{className:"yoo-file-mr-2 yoo-file-user-select-none",width:24,height:24}),p("span",Object.assign({className:"yoo-file-font-medium"},{children:r?"Loading...":"Click to add file"})),r&&p("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&&p(it,{blockId:o,floatingStyles:s,refs:a,onClose:()=>i(!1),onSetLoading:e=>l(e)}),t]}))},at={left:N,center:S,right:F},{ExtendedBlockActions:st,BlockOptionsMenuGroup:ft,BlockOptionsMenuItem:ct,BlockOptionsSeparator:pt}=l,dt=({editor:e,block:t,props:n})=>{var i;const r=(null===(i=null==t?void 0:t.meta)||void 0===i?void 0:i.align)||"center",l=at[r];return d(st,Object.assign({onClick:()=>e.setPath({current:t.meta.order})},{children:[p(pt,{}),d(ft,{children:[p(ct,{children:d("button",Object.assign({type:"button",className:"yoopta-block-options-button",onClick:()=>{const n=["left","center","right"];if(!t)return;const i=n[(n.indexOf(r)+1)%n.length];o.updateBlock(e,t.id,{meta:Object.assign(Object.assign({},t.meta),{align:i})})}},{children:[p(l,{width:16,height:16,className:"yoo-file-w-4 yoo-file-h-4 yoo-file-mr-2"}),"Alignment"]}))}),p(ct,{children:d("button",Object.assign({type:"button",className:"yoopta-block-options-button",onClick:()=>{(null==n?void 0:n.src)&&window.open(null==n?void 0:n.src,"_blank")}},{children:[p(k,{width:16,height:16,className:"yoo-file-w-4 yoo-file-h-4 yoo-file-mr-2"}),"Open"]}))})]})]}))},ut={left:"flex-start",center:"center",right:"flex-end"},yt=new c({type:"File",elements:{file:{render:e=>{var{extendRender:t}=e,o=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]])}return o}(e,["extendRender"]);const{element:n,attributes:i,children:l,blockId:c}=o,{name:u,src:y,format:g,size:h}=n.props||{},m=a(c),x=r(),b=s(),w=f({blockId:c});return y?t?t(o):d("div",Object.assign({contentEditable:!1,draggable:!1,className:"yoo-file-mt-4 yoo-file-relative yoo-file-flex yoopta-file"},i,{children:[w&&p("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"}),p($,{name:u,format:g,src:y,size:h,blockId:c,align:m.meta.align}),!b&&p(dt,{block:m,editor:x,props:n.props}),l]})):p(lt,Object.assign({attributes:i,blockId:c},{children:l}))},props:{size:0,name:null,src:null,format:null,nodeType:"void"}}},commands:w,options:{display:{title:"File",description:"For files and more"},accept:""},parsers:{html:{serialize:(e,t,o)=>{const{align:n="left",depth:i=0}=o||{};return`<div style="margin-left: ${20*i}px; display: flex; width: 100%; justify-content: ${ut[n]||"left"}"><a data-meta-align="${n}" data-meta-depth="${i}" href="${e.props.src}" data-size="${e.props.size}" download="${e.props.name}" target="_blank" rel="noopener noreferrer">${e.props.format?`${e.props.name}.${e.props.format}`:`${e.props.name}`}</a></div>`},deserialize:{nodeNames:["A"],parse:t=>{if("A"===t.nodeName){const o=!!t.getAttribute("download"),n=t.getAttribute("href");if(!o)return;if(!n)return;const i=new URL(n),r=t.textContent||"",l=r.split(".").pop(),a=i.href,s=Number(t.dataset.size||0);return{id:e(),type:"file",children:[{text:""}],props:{name:r,format:l,src:a,size:s}}}}}},markdown:{serialize:(e,t)=>`[${e.props.name}](${e.props.src})`},email:{serialize:(e,t,o)=>{const{align:n="left",depth:i=0}=o||{};return`\n <table style="width:100%;">\n <tbody style="width:100%;">\n <tr>\n <td>\n <div style="margin-left: ${20*i}px; display: flex; width: 100%; justify-content: ${ut[n]||"left"}"><a data-meta-align="${n}" data-meta-depth="${i}" href="${e.props.src}" data-size="${e.props.size}" download="${e.props.name}" target="_blank" rel="noopener noreferrer">${e.props.format?`${e.props.name}.${e.props.format}`:`${e.props.name}`}</a></div>\n </td>\n </tr>\n </tbody>\n </table> \n `}}}});!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{w as FileCommands,yt as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{generateId as t,buildBlockData as r,Blocks as n,Elements as a,YooptaPlugin as o}from"@yoopta/editor";const s={buildFileElements:(e,r={})=>{const n=Object.assign(Object.assign({},r.props),{nodeType:"void"});return{id:t(),type:"file",children:[{text:""}],props:n}},insertFile:(e,t={})=>{const{at:a,focus:o,props:p}=t,l=s.buildFileElements(e,{props:p}),i=r({value:[l],type:"File"});n.insertBlock(e,i.type,{focus:o,at:a,blockData:i})},deleteFile:(e,t)=>{n.deleteBlock(e,{blockId:t})},updateFile:(e,t,r)=>{a.updateElement(e,{blockId:t,type:"file",props:r})}},p={left:"flex-start",center:"center",right:"flex-end"},l=new o({type:"File",elements:e("file",{render:t=>e("div",Object.assign({},t.attributes,{children:e("a",Object.assign({href:t.element.props.src,download:t.element.props.name,target:"_blank",rel:"noopener noreferrer"},{children:t.element.props.name}))})),nodeType:"void",props:{size:0,name:null,src:null,format:null}}),commands:s,options:{display:{title:"File",description:"For files and more"},accept:""},parsers:{html:{serialize:(e,t,r)=>{const{align:n="left",depth:a=0}=r||{};return`<div style="margin-left: ${20*a}px; display: flex; width: 100%; justify-content: ${p[n]||"left"}"><a data-meta-align="${n}" data-meta-depth="${a}" href="${e.props.src}" data-size="${e.props.size}" download="${e.props.name}" target="_blank" rel="noopener noreferrer">${e.props.format?`${e.props.name}.${e.props.format}`:`${e.props.name}`}</a></div>`},deserialize:{nodeNames:["A"],parse:e=>{if("A"===e.nodeName){const r=!!e.getAttribute("download"),n=e.getAttribute("href");if(!r)return;if(!n)return;const a=new URL(n),o=e.textContent||"",s=o.split(".").pop(),p=a.href,l=Number(e.dataset.size||0);return{id:t(),type:"file",children:[{text:""}],props:{name:o,format:s,src:p,size:l}}}}}},markdown:{serialize:e=>`[${e.props.name}](${e.props.src})`},email:{serialize:(e,t,r)=>{const{align:n="left",depth:a=0}=r||{};return`\n <table style="width:100%;">\n <tbody style="width:100%;">\n <tr>\n <td>\n <div style="margin-left: ${20*a}px; display: flex; width: 100%; justify-content: ${p[n]||"left"}"><a data-meta-align="${n}" data-meta-depth="${a}" href="${e.props.src}" data-size="${e.props.size}" download="${e.props.name}" target="_blank" rel="noopener noreferrer">${e.props.format?`${e.props.name}.${e.props.format}`:`${e.props.name}`}</a></div>\n </td>\n </tr>\n </tbody>\n </table> \n `}}}});export{s as FileCommands,l as default};
@@ -1,5 +1,5 @@
1
1
  import { YooptaPlugin } from '@yoopta/editor';
2
- import { FileElementMap, FilePluginOptions } from '../types';
2
+ import type { FileElementMap, FilePluginOptions } from '../types';
3
3
  declare const File: YooptaPlugin<FileElementMap, FilePluginOptions>;
4
4
  export { File };
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAS7D,QAAA,MAAM,IAAI,iDAuGR,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAc,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,cAAc,EAAoB,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAepF,QAAA,MAAM,IAAI,iDA8GR,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoopta/file",
3
- "version": "4.9.9",
3
+ "version": "6.0.0-beta.2",
4
4
  "description": "File plugin for Yoopta Editor",
5
5
  "author": "Darginec05 <devopsbanda@gmail.com>",
6
6
  "homepage": "https://github.com/Darginec05/Yoopta-Editor#readme",
@@ -14,12 +14,13 @@
14
14
  "dist/"
15
15
  ],
16
16
  "peerDependencies": {
17
- "@yoopta/editor": ">=4.0.0",
18
- "react": ">=17.0.2",
19
- "react-dom": ">=17.0.2"
17
+ "@yoopta/editor": ">=4.9.9",
18
+ "react": ">=18.2.0",
19
+ "react-dom": ">=18.2.0"
20
20
  },
21
21
  "publishConfig": {
22
- "registry": "https://registry.npmjs.org"
22
+ "registry": "https://registry.npmjs.org",
23
+ "access": "public"
23
24
  },
24
25
  "repository": {
25
26
  "type": "git",
@@ -34,9 +35,5 @@
34
35
  "bugs": {
35
36
  "url": "https://github.com/Darginec05/Yoopta-Editor/issues"
36
37
  },
37
- "dependencies": {
38
- "@floating-ui/react": "^0.26.9",
39
- "@radix-ui/react-icons": "^1.3.0"
40
- },
41
- "gitHead": "e8260945d74e2b26e8c66a3ddf4da8ceb45bc74d"
38
+ "gitHead": "58d2c0e3b3b615017e0adb353b80dc493a571186"
42
39
  }
package/dist/ui/File.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { PluginElementRenderProps } from '@yoopta/editor';
2
- declare const FileRender: ({ extendRender, ...props }: PluginElementRenderProps) => import("react/jsx-runtime").JSX.Element;
3
- export { FileRender };
4
- //# sourceMappingURL=File.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../src/ui/File.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,wBAAwB,EAIzB,MAAM,gBAAgB,CAAC;AAIxB,QAAA,MAAM,UAAU,+BAAgC,wBAAwB,4CAkCvE,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,10 +0,0 @@
1
- import { YooEditor, YooptaBlockData } from '@yoopta/editor';
2
- import { FileElementProps } from '../types';
3
- type Props = {
4
- editor: YooEditor;
5
- block: YooptaBlockData;
6
- props?: FileElementProps;
7
- };
8
- declare const FileBlockOptions: ({ editor, block, props: fileProps }: Props) => import("react/jsx-runtime").JSX.Element;
9
- export { FileBlockOptions };
10
- //# sourceMappingURL=FileBlockOptions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileBlockOptions.d.ts","sourceRoot":"","sources":["../../src/ui/FileBlockOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAU5C,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAEF,QAAA,MAAM,gBAAgB,wCAAyC,KAAK,4CAoCnE,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,8 +0,0 @@
1
- import { FileElementProps } from '../types';
2
- type FileComponentProps = Partial<FileElementProps> & {
3
- blockId: string;
4
- align?: 'left' | 'center' | 'right';
5
- };
6
- declare const FileComponent: ({ name, src, size, format, align }: FileComponentProps) => import("react/jsx-runtime").JSX.Element | null;
7
- export { FileComponent, FileComponentProps };
8
- //# sourceMappingURL=FileComponent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileComponent.d.ts","sourceRoot":"","sources":["../../src/ui/FileComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C,KAAK,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,CAAC,GAAG;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrC,CAAC;AAUF,QAAA,MAAM,aAAa,uCAAwC,kBAAkB,mDA6B5E,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1,11 +0,0 @@
1
- import { CSSProperties } from 'react';
2
- type Props = {
3
- floatingStyles: CSSProperties;
4
- refs: any;
5
- blockId: string;
6
- onClose: () => void;
7
- onSetLoading: (_s: boolean) => void;
8
- };
9
- declare const FilePlaceholderUploader: ({ floatingStyles, refs, onClose, blockId, onSetLoading }: Props) => import("react/jsx-runtime").JSX.Element;
10
- export { FilePlaceholderUploader };
11
- //# sourceMappingURL=FilePlaceholderUploader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilePlaceholderUploader.d.ts","sourceRoot":"","sources":["../../src/ui/FilePlaceholderUploader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,KAAK,KAAK,GAAG;IACX,cAAc,EAAE,aAAa,CAAC;IAC9B,IAAI,EAAE,GAAG,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;CACrC,CAAC;AAIF,QAAA,MAAM,uBAAuB,6DAA8D,KAAK,4CA2B/F,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
@@ -1,9 +0,0 @@
1
- type Props = {
2
- onClose: () => void;
3
- blockId: string;
4
- accept?: string;
5
- onSetLoading: (_s: boolean) => void;
6
- };
7
- declare const FileUploader: ({ accept, onClose, blockId, onSetLoading }: Props) => import("react/jsx-runtime").JSX.Element;
8
- export { FileUploader };
9
- //# sourceMappingURL=FileUploader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileUploader.d.ts","sourceRoot":"","sources":["../../src/ui/FileUploader.tsx"],"names":[],"mappings":"AAGA,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"}
@@ -1,10 +0,0 @@
1
- import { ReactNode } from 'react';
2
- type Props = {
3
- className?: string;
4
- children?: ReactNode;
5
- width?: number;
6
- height?: number;
7
- };
8
- declare const Loader: ({ className, width, height, children }: Props) => import("react/jsx-runtime").JSX.Element;
9
- export { Loader };
10
- //# sourceMappingURL=Loader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Loader.d.ts","sourceRoot":"","sources":["../../src/ui/Loader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,QAAA,MAAM,MAAM,2CAA4C,KAAK,4CAoB5D,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1,7 +0,0 @@
1
- declare const Placeholder: ({ attributes, children, blockId }: {
2
- attributes: any;
3
- children: any;
4
- blockId: any;
5
- }) => import("react/jsx-runtime").JSX.Element;
6
- export { Placeholder };
7
- //# sourceMappingURL=Placeholder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../src/ui/Placeholder.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,WAAW;;;;6CAuDhB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}