@yoopta/themes-shadcn 6.0.2 → 6.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/accordion.js +1 -1
  2. package/dist/applyTheme.d.ts.map +1 -1
  3. package/dist/carousel.js +1 -1
  4. package/dist/chunks/button-f335deaa.js +1 -0
  5. package/dist/chunks/{dropdown-menu-eb328f8d.js → dropdown-menu-36750aec.js} +3 -3
  6. package/dist/chunks/{hover-card-d6a71398.js → hover-card-8048e9ce.js} +1 -1
  7. package/dist/chunks/index-371259c9.js +1 -0
  8. package/dist/chunks/{index-f85dae42.js → index-5b487f4e.js} +1 -1
  9. package/dist/chunks/{index-ba3032f8.js → index-a77c7d53.js} +1 -1
  10. package/dist/chunks/{index-23db6fea.js → index-bd6363d4.js} +1 -1
  11. package/dist/chunks/label-35a74462.js +1 -0
  12. package/dist/chunks/{language-select-89735035.js → language-select-ee2698cf.js} +1 -1
  13. package/dist/chunks/pen-d6258303.js +7 -0
  14. package/dist/chunks/popover-dae0ce5f.js +1 -0
  15. package/dist/chunks/{scroll-area-dae47c2c.js → scroll-area-8321348a.js} +1 -1
  16. package/dist/chunks/{select-a8bcd8b5.js → select-a3724728.js} +1 -1
  17. package/dist/chunks/separator-f4e74aca.js +1 -0
  18. package/dist/chunks/{tabs-294764a6.js → tabs-370c3f2c.js} +1 -1
  19. package/dist/chunks/{tooltip-65b9c3a0.js → tooltip-5defff1d.js} +2 -2
  20. package/dist/code-group.js +1 -1
  21. package/dist/code.js +1 -1
  22. package/dist/divider.js +1 -1
  23. package/dist/embed/elements/embed/embed-inline-toolbar.d.ts.map +1 -1
  24. package/dist/embed.js +2 -2
  25. package/dist/emoji.js +1 -1
  26. package/dist/file/elements/file/file-inline-toolbar.d.ts.map +1 -1
  27. package/dist/file.js +3 -3
  28. package/dist/image/elements/image/image-inline-toolbar.d.ts.map +1 -1
  29. package/dist/image.js +2 -2
  30. package/dist/index.d.ts +1 -0
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +1 -1
  33. package/dist/link.js +1 -7
  34. package/dist/math/elements/math/math-edit.d.ts +13 -0
  35. package/dist/math/elements/math/math-edit.d.ts.map +1 -0
  36. package/dist/math/elements/math/math-element.d.ts +3 -0
  37. package/dist/math/elements/math/math-element.d.ts.map +1 -0
  38. package/dist/math/elements/math/math-preview.d.ts +10 -0
  39. package/dist/math/elements/math/math-preview.d.ts.map +1 -0
  40. package/dist/math/elements/math-block/math-block-element.d.ts +3 -0
  41. package/dist/math/elements/math-block/math-block-element.d.ts.map +1 -0
  42. package/dist/math/index.d.ts +15 -0
  43. package/dist/math/index.d.ts.map +1 -0
  44. package/dist/math.js +1 -0
  45. package/dist/mention.js +3 -3
  46. package/dist/steps.js +1 -1
  47. package/dist/table-of-contents/elements/table-of-contents.d.ts.map +1 -1
  48. package/dist/table-of-contents.js +1 -1
  49. package/dist/table.js +3 -3
  50. package/dist/tabs.js +1 -1
  51. package/dist/video/elements/video/video-inline-toolbar.d.ts.map +1 -1
  52. package/dist/video.js +2 -2
  53. package/package.json +21 -14
  54. package/dist/chunks/button-7aec29d6.js +0 -1
  55. package/dist/chunks/index-23c7fb16.js +0 -1
  56. package/dist/chunks/label-21d46c31.js +0 -1
  57. package/dist/chunks/popover-8e6ee2ab.js +0 -1
  58. package/dist/chunks/separator-219dc1f7.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"file-inline-toolbar.d.ts","sourceRoot":"","sources":["../../../../src/file/elements/file/file-inline-toolbar.tsx"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,KAAK,sBAAsB,GAAG;IAC5B,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACzD,YAAY,EAAE,gBAAgB,CAAC;IAC/B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,qEAM3B,sBAAsB,mDAwIxB,CAAC"}
1
+ {"version":3,"file":"file-inline-toolbar.d.ts","sourceRoot":"","sources":["../../../../src/file/elements/file/file-inline-toolbar.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,KAAK,sBAAsB,GAAG;IAC5B,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACzD,YAAY,EAAE,gBAAgB,CAAC;IAC/B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,qEAM3B,sBAAsB,mDAyIxB,CAAC"}
package/dist/file.js CHANGED
@@ -1,13 +1,13 @@
1
- import{a as e}from"./chunks/_tslib-35bb891d.js";import{jsxs as t,jsx as a,Fragment as n}from"react/jsx-runtime";import{useRef as s,useState as r,useLayoutEffect as l,useCallback as i}from"react";import{useElementSelected as o,useBlockSelected as c,useYooptaEditor as d,useYooptaPluginOptions as p,Elements as m,Blocks as h}from"@yoopta/editor";import{getFileType as g,formatFileSize as u,useFileUpload as b,useFileDelete as k}from"@yoopta/file";import{Editor as f,Element as y}from"slate";import{B as v}from"./chunks/button-7aec29d6.js";import{c as x}from"./chunks/utils-3345eade.js";import{L as j,U as w,D as O}from"./chunks/upload-b1dd210d.js";import{c as N}from"./chunks/createLucideIcon-8605f860.js";import{F as C}from"./chunks/file-text-ad3e3ebb.js";import{C as M}from"./chunks/code-d31bdce0.js";import{u as z,F as D,T as F,a as E,b as I,R,c as L}from"./chunks/tooltip-65b9c3a0.js";import{C as P,c as U}from"./chunks/index-0bca29df.js";import{E as V}from"./chunks/external-link-1579dd7f.js";import{T as H}from"./chunks/trash-2-f36597ff.js";import{o as A,f as B,s as S,b as T}from"./chunks/index-23c7fb16.js";import"react-dom";import"./chunks/index-17323747.js";import"./chunks/index-91a5b8d5.js";import"./chunks/index-ce60ba41.js";import"./chunks/index-23db6fea.js";import"./chunks/index-ff0e3962.js";import"./chunks/index-1674c2c8.js";import"./chunks/index-70f4e709.js";
1
+ import{a as e}from"./chunks/_tslib-35bb891d.js";import{jsxs as t,jsx as n,Fragment as a}from"react/jsx-runtime";import{useRef as s,useState as r,useLayoutEffect as l,useCallback as i}from"react";import{useYooptaEditor as o,useElementSelected as c,useBlockSelected as d,useYooptaPluginOptions as p,Elements as m,Blocks as h}from"@yoopta/editor";import{getFileType as g,formatFileSize as u,useFileUpload as b,useFileDelete as k}from"@yoopta/file";import{Editor as f,Element as y}from"slate";import{B as v}from"./chunks/button-f335deaa.js";import{c as x}from"./chunks/utils-3345eade.js";import{L as j,U as w,D as O}from"./chunks/upload-b1dd210d.js";import{c as N}from"./chunks/createLucideIcon-8605f860.js";import{F as C}from"./chunks/file-text-ad3e3ebb.js";import{C as M}from"./chunks/code-d31bdce0.js";import{u as z,F as E,T as F,a as D,b as I,R,c as L}from"./chunks/tooltip-5defff1d.js";import{C as P,c as U}from"./chunks/index-0bca29df.js";import{E as V}from"./chunks/external-link-1579dd7f.js";import{T as B}from"./chunks/trash-2-f36597ff.js";import{o as H,f as A,s as S,b as T}from"./chunks/index-371259c9.js";import"react-dom";import"./chunks/index-17323747.js";import"./chunks/index-91a5b8d5.js";import"./chunks/index-ce60ba41.js";import"./chunks/index-bd6363d4.js";import"./chunks/index-ff0e3962.js";import"./chunks/index-1674c2c8.js";import"./chunks/index-70f4e709.js";
2
2
  /**
3
3
  * @license lucide-react v0.294.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
7
- */const $=N("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]),q=N("FileAudio",[["path",{d:"M17.5 22h.5c.5 0 1-.2 1.4-.6.4-.4.6-.9.6-1.4V7.5L14.5 2H6c-.5 0-1 .2-1.4.6C4.2 3 4 3.5 4 4v3",key:"1013sb"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"M10 20v-1a2 2 0 1 1 4 0v1a2 2 0 1 1-4 0Z",key:"gqt63y"}],["path",{d:"M6 20v-1a2 2 0 1 0-4 0v1a2 2 0 1 0 4 0Z",key:"cf7lqx"}],["path",{d:"M2 19v-3a6 6 0 0 1 12 0v3",key:"1acxgf"}]]),Z=N("FileImage",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["circle",{cx:"10",cy:"13",r:"2",key:"6v46hv"}],["path",{d:"m20 17-1.09-1.09a2 2 0 0 0-2.82 0L10 22",key:"17vly1"}]]),_=N("FileSpreadsheet",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M14 17h2",key:"10kma7"}]]),G=N("FileVideo",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m10 11 5 3-5 3v-6Z",key:"7ntvm4"}]]),J=N("File",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]]),K=N("Presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]),Q=({progress:e})=>a("div",Object.assign({className:"absolute inset-0 z-20 flex flex-col items-center justify-center gap-4 bg-background/95 backdrop-blur-sm p-6 rounded-lg border"},{children:a("div",Object.assign({className:"w-full max-w-md space-y-4"},{children:t("div",Object.assign({className:"space-y-2"},{children:[t("div",Object.assign({className:"flex items-center justify-between text-sm"},{children:[a("span",Object.assign({className:"font-medium"},{children:"Uploading file..."})),t("span",Object.assign({className:"text-muted-foreground"},{children:[e.percentage,"%"]}))]})),a("div",Object.assign({className:"h-2 w-full overflow-hidden rounded-full bg-muted"},{children:a("div",{className:"h-full bg-primary transition-all duration-300 ease-out",style:{width:`${e.percentage}%`}})})),t("div",Object.assign({className:"flex items-center justify-between text-xs text-muted-foreground"},{children:[t("span",{children:[(e.loaded/1024/1024).toFixed(2)," MB / ",(e.total/1024/1024).toFixed(2)," MB"]}),a(j,{className:"h-3.5 w-3.5 animate-spin"})]}))]}))}))})),W=({onUpload:e,accept:n})=>{const r=s(null);return t("div",Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[a("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:a(J,{className:"h-6 w-6 text-muted-foreground"})})),t("div",Object.assign({className:"text-center"},{children:[a("p",Object.assign({className:"text-sm font-medium"},{children:"Upload a file"})),a("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Click to select a file"}))]})),t(v,Object.assign({onClick:()=>{var e;return null===(e=r.current)||void 0===e?void 0:e.click()},variant:"default",className:"gap-2"},{children:[a(w,{className:"h-4 w-4"}),"Choose file"]})),a("input",{ref:r,type:"file",accept:n,onChange:e,className:"hidden"})]}))},X=({onUpload:e,className:n,attributes:s,children:r,progress:l,loading:i,accept:o})=>{const c=i&&l;return t("div",Object.assign({className:x("mt-2 relative rounded-lg border bg-background overflow-hidden",n)},s,{contentEditable:!1},{children:[a(W,{onUpload:e,accept:o}),c&&l&&a(Q,{progress:l}),r]}))},Y={pdf:{icon:C,color:"text-red-600 dark:text-red-400",bgColor:"bg-red-100 dark:bg-red-900/30"},document:{icon:C,color:"text-blue-600 dark:text-blue-400",bgColor:"bg-blue-100 dark:bg-blue-900/30"},spreadsheet:{icon:_,color:"text-green-600 dark:text-green-400",bgColor:"bg-green-100 dark:bg-green-900/30"},presentation:{icon:K,color:"text-orange-600 dark:text-orange-400",bgColor:"bg-orange-100 dark:bg-orange-900/30"},image:{icon:Z,color:"text-purple-600 dark:text-purple-400",bgColor:"bg-purple-100 dark:bg-purple-900/30"},video:{icon:G,color:"text-pink-600 dark:text-pink-400",bgColor:"bg-pink-100 dark:bg-pink-900/30"},audio:{icon:q,color:"text-yellow-600 dark:text-yellow-400",bgColor:"bg-yellow-100 dark:bg-yellow-900/30"},archive:{icon:$,color:"text-amber-600 dark:text-amber-400",bgColor:"bg-amber-100 dark:bg-amber-900/30"},code:{icon:M,color:"text-cyan-600 dark:text-cyan-400",bgColor:"bg-cyan-100 dark:bg-cyan-900/30"},text:{icon:C,color:"text-gray-600 dark:text-gray-400",bgColor:"bg-gray-100 dark:bg-gray-800/50"},unknown:{icon:J,color:"text-muted-foreground",bgColor:"bg-muted"}},ee=({fileType:e,className:t})=>{var n;const s=(null!==(n=Y[e])&&void 0!==n?n:Y.unknown).icon;return a(s,{className:t})},te=({referenceRef:e,elementProps:s,onReplace:i,onDelete:o,onDownload:c})=>{const[d,p]=r(!1),[m,h]=r(!1),{refs:g,floatingStyles:u}=z({placement:"top-end",strategy:"absolute",middleware:[A(8),B({fallbackPlacements:["bottom-end","top-start","bottom-start"],padding:10}),S({padding:10})],whileElementsMounted:T});l(()=>{const t=e.current;t&&(g.setReference(t),h(!0))},[e,g]),l(()=>{if(m){const e=requestAnimationFrame(()=>{p(!0)});return()=>cancelAnimationFrame(e)}},[m]);return m?a(D,{children:a("div",Object.assign({ref:g.setFloating,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:e=>e.stopPropagation(),className:x("pointer-events-auto z-50","flex items-center gap-1 rounded-lg border bg-background/95 backdrop-blur-sm p-1 shadow-lg","transition-opacity duration-200 ease-out",d?"opacity-100 translate-y-0":"opacity-0 translate-y-2"),style:u},{children:t(F,Object.assign({delayDuration:0},{children:[t(E,{children:[a(I,Object.assign({asChild:!0},{children:a(v,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:i},{children:a(R,{className:"h-4 w-4"})}))})),a(L,{children:"Replace"})]}),s.src&&t(n,{children:[t(E,{children:[a(I,Object.assign({asChild:!0},{children:a(v,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{var e;if(c)c();else if(s.src){const t=document.createElement("a");t.href=s.src,t.download=null!==(e=s.name)&&void 0!==e?e:`file-${Date.now()}`,t.click()}}},{children:a(O,{className:"h-4 w-4"})}))})),a(L,{children:"Download"})]}),t(E,{children:[a(I,Object.assign({asChild:!0},{children:a(v,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{s.src&&U(s.src)}},{children:a(P,{className:"h-4 w-4"})}))})),a(L,{children:"Copy URL"})]}),t(E,{children:[a(I,Object.assign({asChild:!0},{children:a(v,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{s.src&&window.open(s.src,"_blank")}},{children:a(V,{className:"h-4 w-4"})}))})),a(L,{children:"Open in new tab"})]})]}),t(E,{children:[a(I,Object.assign({asChild:!0},{children:a(v,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:o},{children:a(H,{className:"h-4 w-4"})}))})),a(L,{children:"Delete"})]})]}))}))}):null},ae=({blockId:e,attributes:n,children:r,elementProps:l,onDelete:i,onReplace:d})=>{const{isElementSelected:p}=o(),m=c({blockId:e}),h=p&&m,b=s(null),{name:k,format:f,size:y,src:j}=l,w=f?`${k}.${f}`:null!=k?k:"Untitled file",N=g(w),C=(e=>{var t;return null!==(t=Y[e])&&void 0!==t?t:Y.unknown})(N),M=()=>{if(!j)return;const e=document.createElement("a");e.href=j,e.download=w,e.click()};return t("div",Object.assign({},n,{className:"group/file mt-2 relative transition-all w-full"},{children:[t("div",Object.assign({className:"relative",contentEditable:!1},{children:[t("div",Object.assign({ref:b,className:x("flex items-center gap-3 p-3 rounded-lg border bg-card transition-all","hover:bg-accent/50",h&&"ring-2 ring-primary ring-offset-2")},{children:[a("div",Object.assign({className:x("flex-shrink-0 rounded-lg p-2.5",C.bgColor)},{children:a(ee,{fileType:N,className:x("h-5 w-5",C.color)})})),t("div",Object.assign({className:"flex-1 min-w-0"},{children:[a("p",Object.assign({className:"text-sm font-medium truncate"},{children:w})),a("p",Object.assign({className:"text-xs text-muted-foreground"},{children:u(y)}))]})),j&&a(v,Object.assign({variant:"ghost",size:"icon",className:"flex-shrink-0 h-8 w-8 opacity-0 group-hover/file:opacity-100 transition-opacity",onClick:M},{children:a(O,{className:"h-4 w-4"})}))]})),h&&a(te,{referenceRef:b,elementProps:l,onReplace:d,onDelete:i,onDownload:M})]})),r]}))},ne={file:{render:({element:t,attributes:n,children:s,blockId:r})=>{const l=d(),o=p("File"),{upload:c,progress:g,loading:u}=b(o.upload),{deleteFile:v}=k(o.delete),x=i(e=>{m.updateElement(l,{blockId:r,type:"file",props:Object.assign(Object.assign({},t.props),e)})},[l,r,t.props]),j=i(()=>e(void 0,void 0,void 0,function*(){if(l.readOnly)return null;yield v(t);const e=h.getBlockSlate(l,{id:r});if(!e)return;const a=m.getElementPath(l,{blockId:r,element:t});if(!a)return;const n=a?f.parent(e,a):void 0;n&&y.isElement(n[0])&&!f.isEditor(n[0])?m.deleteElement(l,{blockId:r,type:"file",path:a}):h.deleteBlock(l,{blockId:r,focus:!0})}),[l,r,t,v]),w=i(()=>{if(l.readOnly)return null;m.updateElement(l,{blockId:r,type:"file",props:Object.assign(Object.assign({},t.props),{id:null,src:null,name:null,size:null,format:null})})},[l,r,t.props]),O=i(t=>e(void 0,void 0,void 0,function*(){var e,a,n;if(l.readOnly)return null;const s=null===(e=t.target.files)||void 0===e?void 0:e[0];if(!s)return;const r=yield c(s);let i=null!==(a=r.name)&&void 0!==a?a:s.name,o=null;const d=i.lastIndexOf(".");d>0&&(o=i.slice(d+1),i=i.slice(0,d)),x({id:r.id,src:r.url,name:i,size:null!==(n=r.size)&&void 0!==n?n:s.size,format:o})}),[c,x,l.readOnly]);return t.props.src?a(ae,Object.assign({blockId:r,onDelete:j,attributes:n,onReplace:w,elementProps:t.props},{children:s})):l.readOnly?null:a(X,Object.assign({onUpload:O,progress:g,loading:u,accept:o.accept,attributes:n},{children:s}))}}};
7
+ */const $=N("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]),q=N("FileAudio",[["path",{d:"M17.5 22h.5c.5 0 1-.2 1.4-.6.4-.4.6-.9.6-1.4V7.5L14.5 2H6c-.5 0-1 .2-1.4.6C4.2 3 4 3.5 4 4v3",key:"1013sb"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"M10 20v-1a2 2 0 1 1 4 0v1a2 2 0 1 1-4 0Z",key:"gqt63y"}],["path",{d:"M6 20v-1a2 2 0 1 0-4 0v1a2 2 0 1 0 4 0Z",key:"cf7lqx"}],["path",{d:"M2 19v-3a6 6 0 0 1 12 0v3",key:"1acxgf"}]]),Z=N("FileImage",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["circle",{cx:"10",cy:"13",r:"2",key:"6v46hv"}],["path",{d:"m20 17-1.09-1.09a2 2 0 0 0-2.82 0L10 22",key:"17vly1"}]]),_=N("FileSpreadsheet",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M14 17h2",key:"10kma7"}]]),J=N("FileVideo",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m10 11 5 3-5 3v-6Z",key:"7ntvm4"}]]),G=N("File",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]]),K=N("Presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]),Q=({progress:e})=>n("div",Object.assign({className:"absolute inset-0 z-20 flex flex-col items-center justify-center gap-4 bg-background/95 backdrop-blur-sm p-6 rounded-lg border"},{children:n("div",Object.assign({className:"w-full max-w-md space-y-4"},{children:t("div",Object.assign({className:"space-y-2"},{children:[t("div",Object.assign({className:"flex items-center justify-between text-sm"},{children:[n("span",Object.assign({className:"font-medium"},{children:"Uploading file..."})),t("span",Object.assign({className:"text-muted-foreground"},{children:[e.percentage,"%"]}))]})),n("div",Object.assign({className:"h-2 w-full overflow-hidden rounded-full bg-muted"},{children:n("div",{className:"h-full bg-primary transition-all duration-300 ease-out",style:{width:`${e.percentage}%`}})})),t("div",Object.assign({className:"flex items-center justify-between text-xs text-muted-foreground"},{children:[t("span",{children:[(e.loaded/1024/1024).toFixed(2)," MB / ",(e.total/1024/1024).toFixed(2)," MB"]}),n(j,{className:"h-3.5 w-3.5 animate-spin"})]}))]}))}))})),W=({onUpload:e,accept:a})=>{const r=s(null);return t("div",Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[n("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:n(G,{className:"h-6 w-6 text-muted-foreground"})})),t("div",Object.assign({className:"text-center"},{children:[n("p",Object.assign({className:"text-sm font-medium"},{children:"Upload a file"})),n("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Click to select a file"}))]})),t(v,Object.assign({onClick:()=>{var e;return null===(e=r.current)||void 0===e?void 0:e.click()},variant:"default",className:"gap-2"},{children:[n(w,{className:"h-4 w-4"}),"Choose file"]})),n("input",{ref:r,type:"file",accept:a,onChange:e,className:"hidden"})]}))},X=({onUpload:e,className:a,attributes:s,children:r,progress:l,loading:i,accept:o})=>{const c=i&&l;return t("div",Object.assign({className:x("mt-2 relative rounded-lg border bg-background overflow-hidden",a)},s,{contentEditable:!1},{children:[n(W,{onUpload:e,accept:o}),c&&l&&n(Q,{progress:l}),r]}))},Y={pdf:{icon:C,color:"text-red-600 dark:text-red-400",bgColor:"bg-red-100 dark:bg-red-900/30"},document:{icon:C,color:"text-blue-600 dark:text-blue-400",bgColor:"bg-blue-100 dark:bg-blue-900/30"},spreadsheet:{icon:_,color:"text-green-600 dark:text-green-400",bgColor:"bg-green-100 dark:bg-green-900/30"},presentation:{icon:K,color:"text-orange-600 dark:text-orange-400",bgColor:"bg-orange-100 dark:bg-orange-900/30"},image:{icon:Z,color:"text-purple-600 dark:text-purple-400",bgColor:"bg-purple-100 dark:bg-purple-900/30"},video:{icon:J,color:"text-pink-600 dark:text-pink-400",bgColor:"bg-pink-100 dark:bg-pink-900/30"},audio:{icon:q,color:"text-yellow-600 dark:text-yellow-400",bgColor:"bg-yellow-100 dark:bg-yellow-900/30"},archive:{icon:$,color:"text-amber-600 dark:text-amber-400",bgColor:"bg-amber-100 dark:bg-amber-900/30"},code:{icon:M,color:"text-cyan-600 dark:text-cyan-400",bgColor:"bg-cyan-100 dark:bg-cyan-900/30"},text:{icon:C,color:"text-gray-600 dark:text-gray-400",bgColor:"bg-gray-100 dark:bg-gray-800/50"},unknown:{icon:G,color:"text-muted-foreground",bgColor:"bg-muted"}},ee=({fileType:e,className:t})=>{var a;const s=(null!==(a=Y[e])&&void 0!==a?a:Y.unknown).icon;return n(s,{className:t})},te=({referenceRef:e,elementProps:s,onReplace:i,onDelete:c,onDownload:d})=>{const[p,m]=r(!1),[h,g]=r(!1),u=o(),{refs:b,floatingStyles:k}=z({placement:"top-end",strategy:"absolute",middleware:[H(8),A({fallbackPlacements:["bottom-end","top-start","bottom-start"],padding:10}),S({padding:10})],whileElementsMounted:T});l(()=>{const t=e.current;t&&(b.setReference(t),g(!0))},[e,b]),l(()=>{if(h){const e=requestAnimationFrame(()=>{m(!0)});return()=>cancelAnimationFrame(e)}},[h]);return h?n(E,Object.assign({id:"file-inline-toolbar",root:u.refElement},{children:n("div",Object.assign({ref:b.setFloating,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:e=>e.stopPropagation(),className:x("pointer-events-auto z-50","flex items-center gap-1 rounded-lg border bg-background/95 backdrop-blur-sm p-1 shadow-lg","transition-opacity duration-200 ease-out",p?"opacity-100 translate-y-0":"opacity-0 translate-y-2"),style:k},{children:t(F,Object.assign({delayDuration:0},{children:[t(D,{children:[n(I,Object.assign({asChild:!0},{children:n(v,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:i},{children:n(R,{className:"h-4 w-4"})}))})),n(L,{children:"Replace"})]}),s.src&&t(a,{children:[t(D,{children:[n(I,Object.assign({asChild:!0},{children:n(v,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{var e;if(d)d();else if(s.src){const t=document.createElement("a");t.href=s.src,t.download=null!==(e=s.name)&&void 0!==e?e:`file-${Date.now()}`,t.click()}}},{children:n(O,{className:"h-4 w-4"})}))})),n(L,{children:"Download"})]}),t(D,{children:[n(I,Object.assign({asChild:!0},{children:n(v,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{s.src&&U(s.src)}},{children:n(P,{className:"h-4 w-4"})}))})),n(L,{children:"Copy URL"})]}),t(D,{children:[n(I,Object.assign({asChild:!0},{children:n(v,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{s.src&&window.open(s.src,"_blank")}},{children:n(V,{className:"h-4 w-4"})}))})),n(L,{children:"Open in new tab"})]})]}),t(D,{children:[n(I,Object.assign({asChild:!0},{children:n(v,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:c},{children:n(B,{className:"h-4 w-4"})}))})),n(L,{children:"Delete"})]})]}))}))})):null},ne=({blockId:e,attributes:a,children:r,elementProps:l,onDelete:i,onReplace:o})=>{const{isElementSelected:p}=c(),m=d({blockId:e}),h=p&&m,b=s(null),{name:k,format:f,size:y,src:j}=l,w=f?`${k}.${f}`:null!=k?k:"Untitled file",N=g(w),C=(e=>{var t;return null!==(t=Y[e])&&void 0!==t?t:Y.unknown})(N),M=()=>{if(!j)return;const e=document.createElement("a");e.href=j,e.download=w,e.click()};return t("div",Object.assign({},a,{className:"group/file mt-2 relative transition-all w-full"},{children:[t("div",Object.assign({className:"relative",contentEditable:!1},{children:[t("div",Object.assign({ref:b,className:x("flex items-center gap-3 p-3 rounded-lg border bg-card transition-all","hover:bg-accent/50",h&&"ring-2 ring-primary ring-offset-2")},{children:[n("div",Object.assign({className:x("flex-shrink-0 rounded-lg p-2.5",C.bgColor)},{children:n(ee,{fileType:N,className:x("h-5 w-5",C.color)})})),t("div",Object.assign({className:"flex-1 min-w-0"},{children:[n("p",Object.assign({className:"text-sm font-medium truncate"},{children:w})),n("p",Object.assign({className:"text-xs text-muted-foreground"},{children:u(y)}))]})),j&&n(v,Object.assign({variant:"ghost",size:"icon",className:"flex-shrink-0 h-8 w-8 opacity-0 group-hover/file:opacity-100 transition-opacity",onClick:M},{children:n(O,{className:"h-4 w-4"})}))]})),h&&n(te,{referenceRef:b,elementProps:l,onReplace:o,onDelete:i,onDownload:M})]})),r]}))},ae={file:{render:({element:t,attributes:a,children:s,blockId:r})=>{const l=o(),c=p("File"),{upload:d,progress:g,loading:u}=b(c.upload),{deleteFile:v}=k(c.delete),x=i(e=>{m.updateElement(l,{blockId:r,type:"file",props:Object.assign(Object.assign({},t.props),e)})},[l,r,t.props]),j=i(()=>e(void 0,void 0,void 0,function*(){if(l.readOnly)return null;yield v(t);const e=h.getBlockSlate(l,{id:r});if(!e)return;const n=m.getElementPath(l,{blockId:r,element:t});if(!n)return;const a=n?f.parent(e,n):void 0;a&&y.isElement(a[0])&&!f.isEditor(a[0])?m.deleteElement(l,{blockId:r,type:"file",path:n}):h.deleteBlock(l,{blockId:r,focus:!0})}),[l,r,t,v]),w=i(()=>{if(l.readOnly)return null;m.updateElement(l,{blockId:r,type:"file",props:Object.assign(Object.assign({},t.props),{id:null,src:null,name:null,size:null,format:null})})},[l,r,t.props]),O=i(t=>e(void 0,void 0,void 0,function*(){var e,n,a;if(l.readOnly)return null;const s=null===(e=t.target.files)||void 0===e?void 0:e[0];if(!s)return;const r=yield d(s);let i=null!==(n=r.name)&&void 0!==n?n:s.name,o=null;const c=i.lastIndexOf(".");c>0&&(o=i.slice(c+1),i=i.slice(0,c)),x({id:r.id,src:r.url,name:i,size:null!==(a=r.size)&&void 0!==a?a:s.size,format:o})}),[d,x,l.readOnly]);return t.props.src?n(ne,Object.assign({blockId:r,onDelete:j,attributes:a,onReplace:w,elementProps:t.props},{children:s})):l.readOnly?null:n(X,Object.assign({onUpload:O,progress:g,loading:u,accept:c.accept,attributes:a},{children:s}))}}};
8
8
  /**
9
9
  * @license lucide-react v0.294.0 - ISC
10
10
  *
11
11
  * This source code is licensed under the ISC license.
12
12
  * See the LICENSE file in the root directory of this source tree.
13
- */export{ne as FileUI};
13
+ */export{ae as FileUI};
@@ -1 +1 @@
1
- {"version":3,"file":"image-inline-toolbar.d.ts","sourceRoot":"","sources":["../../../../src/image/elements/image/image-inline-toolbar.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,KAAK,uBAAuB,GAAG;IAC7B,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACzD,YAAY,EAAE,iBAAiB,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACtD,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,kBAAkB,uFAQ5B,uBAAuB,mDAwJzB,CAAC"}
1
+ {"version":3,"file":"image-inline-toolbar.d.ts","sourceRoot":"","sources":["../../../../src/image/elements/image/image-inline-toolbar.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,KAAK,uBAAuB,GAAG;IAC7B,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACzD,YAAY,EAAE,iBAAiB,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACtD,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,kBAAkB,uFAQ5B,uBAAuB,mDAyJzB,CAAC"}
package/dist/image.js CHANGED
@@ -1,7 +1,7 @@
1
- import{_ as e,a as t}from"./chunks/_tslib-35bb891d.js";import{jsx as n,jsxs as i,Fragment as a}from"react/jsx-runtime";import*as s from"react";import{useRef as r,useState as o,useLayoutEffect as l,useEffect as c,useCallback as d}from"react";import{useElementSelected as m,useBlockSelected as h,useYooptaEditor as u,useYooptaPluginOptions as g,Elements as p,Blocks as f}from"@yoopta/editor";import{useImageUpload as b,useImageDelete as v,useImagePreview as w}from"@yoopta/image";import{Editor as x,Element as j}from"slate";import{B as y}from"./chunks/button-7aec29d6.js";import{a as N,T as O,c as k,b as S}from"./chunks/tabs-294764a6.js";import{I}from"./chunks/input-b2431223.js";import{a as C,b as R,c as D,T as E,u as z,F as P,R as U}from"./chunks/tooltip-65b9c3a0.js";import{c as A}from"./chunks/utils-3345eade.js";import{L as _,U as H,D as M}from"./chunks/upload-b1dd210d.js";import{L as F,A as L,a as B,b as K,R as V}from"./chunks/index-87b75648.js";import{S as W}from"./chunks/sparkles-ae42eae3.js";import{c as T}from"./chunks/createLucideIcon-8605f860.js";import{C as $,c as Y}from"./chunks/index-0bca29df.js";import{L as G}from"./chunks/label-21d46c31.js";import{P as X,a as q,b as J}from"./chunks/popover-8e6ee2ab.js";import{u as Q,S as Z,a as ee,b as te,c as ne,e as ie,d as ae}from"./chunks/select-a8bcd8b5.js";import{S as se}from"./chunks/separator-219dc1f7.js";import{c as re}from"./chunks/index-056e5c06.js";import{c as oe,a as le,P as ce}from"./chunks/index-17323747.js";import{u as de}from"./chunks/index-91a5b8d5.js";import{u as me}from"./chunks/index-ff0e3962.js";import{u as he}from"./chunks/index-13505606.js";import{e as ue,o as ge,f as pe,s as fe,b as be}from"./chunks/index-23c7fb16.js";import{c as ve}from"./chunks/index-f85dae42.js";import{S as we}from"./chunks/settings-2-84fe63d9.js";import{T as xe}from"./chunks/trash-2-f36597ff.js";import"./chunks/index-ba3032f8.js";import"./chunks/index-ce60ba41.js";import"./chunks/index-70f4e709.js";import"./chunks/index-23db6fea.js";import"react-dom";import"./chunks/index-1674c2c8.js";import"./chunks/index-a5cba5f7.js";import"./chunks/Combination-575d4475.js";import"./chunks/chevron-down-28dfb290.js";import"./chunks/check-06bd6a78.js";import"./chunks/chevron-up-9a13532e.js";
1
+ import{_ as e,a as t}from"./chunks/_tslib-35bb891d.js";import{jsx as n,jsxs as i,Fragment as a}from"react/jsx-runtime";import*as s from"react";import{useRef as r,useState as o,useLayoutEffect as l,useEffect as c,useCallback as d}from"react";import{useYooptaEditor as m,useElementSelected as h,useBlockSelected as u,useYooptaPluginOptions as g,Elements as p,Blocks as f}from"@yoopta/editor";import{useImageUpload as b,useImageDelete as v,useImagePreview as w}from"@yoopta/image";import{Editor as x,Element as j}from"slate";import{B as y}from"./chunks/button-f335deaa.js";import{a as O,T as N,c as k,b as S}from"./chunks/tabs-370c3f2c.js";import{I}from"./chunks/input-b2431223.js";import{a as C,b as R,c as D,T as E,u as z,F as P,R as U}from"./chunks/tooltip-5defff1d.js";import{c as A}from"./chunks/utils-3345eade.js";import{L as _,U as H,D as M}from"./chunks/upload-b1dd210d.js";import{L as F,A as L,a as B,b as K,R as V}from"./chunks/index-87b75648.js";import{S as W}from"./chunks/sparkles-ae42eae3.js";import{c as T}from"./chunks/createLucideIcon-8605f860.js";import{C as $,c as Y}from"./chunks/index-0bca29df.js";import{L as G}from"./chunks/label-35a74462.js";import{P as X,a as q,b as J}from"./chunks/popover-dae0ce5f.js";import{u as Q,S as Z,a as ee,b as te,c as ne,e as ie,d as ae}from"./chunks/select-a3724728.js";import{S as se}from"./chunks/separator-f4e74aca.js";import{c as re}from"./chunks/index-056e5c06.js";import{c as oe,a as le,P as ce}from"./chunks/index-17323747.js";import{u as de}from"./chunks/index-91a5b8d5.js";import{u as me}from"./chunks/index-ff0e3962.js";import{u as he}from"./chunks/index-13505606.js";import{e as ue,o as ge,f as pe,s as fe,b as be}from"./chunks/index-371259c9.js";import{c as ve}from"./chunks/index-5b487f4e.js";import{S as we}from"./chunks/settings-2-84fe63d9.js";import{T as xe}from"./chunks/trash-2-f36597ff.js";import"./chunks/index-a77c7d53.js";import"./chunks/index-ce60ba41.js";import"./chunks/index-70f4e709.js";import"./chunks/index-bd6363d4.js";import"react-dom";import"./chunks/index-1674c2c8.js";import"./chunks/index-a5cba5f7.js";import"./chunks/Combination-575d4475.js";import"./chunks/chevron-down-28dfb290.js";import"./chunks/check-06bd6a78.js";import"./chunks/chevron-up-9a13532e.js";
2
2
  /**
3
3
  * @license lucide-react v0.294.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
7
- */const je=T("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),ye=({onInsertFromUnsplash:e})=>n(N,Object.assign({value:"unsplash",className:"mt-4"},{children:i("div",Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[n("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:n("svg",Object.assign({className:"h-6 w-6",viewBox:"0 0 32 32",fill:"currentColor"},{children:n("path",{d:"M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"})}))})),i("div",Object.assign({className:"text-center"},{children:[n("p",Object.assign({className:"text-sm font-medium"},{children:"Browse free photos"})),n("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Powered by Unsplash"}))]})),n(y,Object.assign({onClick:e},{children:"Browse photos"}))]}))})),Ne=({preview:e})=>n("div",Object.assign({className:"absolute inset-0 overflow-hidden",style:{width:e.width,height:e.height}},{children:n("img",{src:e.url,alt:"Preview",className:"h-full w-full object-cover object-center",style:{width:e.width,height:e.height},draggable:!1})})),Oe=({progress:e})=>n("div",Object.assign({className:"absolute inset-0 z-20 flex flex-col items-center justify-center gap-4 bg-black/70 backdrop-blur-sm p-6"},{children:n("div",Object.assign({className:"w-full max-w-md space-y-4"},{children:i("div",Object.assign({className:"space-y-2"},{children:[i("div",Object.assign({className:"flex items-center justify-between text-sm"},{children:[n("span",Object.assign({className:"font-medium text-white"},{children:"Uploading..."})),i("span",Object.assign({className:"text-white/80"},{children:[e.percentage,"%"]}))]})),n("div",Object.assign({className:"h-2 w-full overflow-hidden rounded-full bg-white/20"},{children:n("div",{className:"h-full bg-primary transition-all duration-300 ease-out",style:{width:`${e.percentage}%`}})})),i("div",Object.assign({className:"flex items-center justify-between text-xs text-white/60"},{children:[i("span",{children:[(e.loaded/1024/1024).toFixed(2)," MB /"," ",(e.total/1024/1024).toFixed(2)," MB"]}),n(_,{className:"h-3.5 w-3.5 animate-spin"})]}))]}))}))})),ke=({onUpload:e,hasPreview:t})=>{const a=r(null);return i("div",t?Object.assign({className:"flex flex-col items-center justify-center gap-4 py-8"},{children:[i("div",Object.assign({className:"text-center space-y-2"},{children:[n("p",Object.assign({className:"text-sm font-medium text-white"},{children:"Image preview"})),n("p",Object.assign({className:"text-xs text-white/80"},{children:"Uploading your image..."}))]})),n("input",{ref:a,type:"file",accept:"image/*",onChange:e,className:"hidden"})]}):Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[n("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:n(je,{className:"h-6 w-6 text-muted-foreground"})})),i("div",Object.assign({className:"text-center"},{children:[n("p",Object.assign({className:"text-sm font-medium"},{children:"Upload an image"})),n("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Click or drag and drop"}))]})),n(y,Object.assign({onClick:()=>{var e;return null===(e=a.current)||void 0===e?void 0:e.click()}},{children:"Choose file"})),n("input",{ref:a,type:"file",accept:"image/*",onChange:e,className:"hidden"})]}))},Se=({onInsertUrl:e})=>{const[t,a]=o(""),s=()=>{t.trim()&&(e(t.trim()),a(""))};return i("div",Object.assign({className:"mt-4 space-y-3"},{children:[n(I,{placeholder:"Paste image URL...",value:t,onChange:e=>a(e.target.value),onKeyDown:e=>{"Enter"===e.key&&t.trim()&&s()}}),n(y,Object.assign({className:"w-full",onClick:s,disabled:!t.trim()},{children:"Embed image"}))]}))},Ie=({onInsertFromAI:e})=>{const[t,s]=o(""),[r,l]=o(!1),c=()=>{t.trim()&&!r&&(l(!0),e(t.trim()),l(!1),s(""))};return i("div",Object.assign({className:"mt-4 space-y-3"},{children:[i("div",Object.assign({className:"space-y-2"},{children:[n(I,{placeholder:"Describe the image...",value:t,onChange:e=>s(e.target.value),onKeyDown:e=>{"Enter"===e.key&&c()},disabled:r}),n("p",Object.assign({className:"text-xs text-muted-foreground"},{children:'Example: "A sunset over mountains with dramatic clouds”'}))]})),n(y,Object.assign({className:"w-full gap-2",onClick:c,disabled:!t.trim()||r},{children:i(a,r?{children:[n(_,{className:"h-4 w-4 animate-spin"}),"Generating..."]}:{children:[n(W,{className:"h-4 w-4"}),"Generate image"]})}))]}))},Ce=({onUpload:e,onInsertUrl:t,onInsertFromUnsplash:a,onInsertFromAI:s,hasPreview:r})=>n("div",Object.assign({className:A("relative p-4",r&&"min-h-[300px] flex flex-col")},{children:i(O,Object.assign({defaultValue:"upload",className:"w-full"},{children:[i(k,Object.assign({className:A("grid w-full grid-cols-4",r&&"bg-background/80 backdrop-blur-sm")},{children:[i(S,Object.assign({value:"upload",className:"gap-1.5"},{children:[n(H,{className:"h-3.5 w-3.5"}),"Upload"]})),i(C,{children:[n(R,Object.assign({asChild:!0},{children:i(S,Object.assign({value:"link",disabled:!0,className:"gap-1.5"},{children:[n(F,{className:"h-3.5 w-3.5"}),"Link"]}))})),n(D,{children:"Link is not available yet"})]}),a&&i(C,{children:[n(R,Object.assign({asChild:!0},{children:i(S,Object.assign({value:"unsplash",disabled:!0,className:"gap-1.5"},{children:[n("svg",Object.assign({className:"h-3.5 w-3.5",viewBox:"0 0 32 32",fill:"currentColor"},{children:n("path",{d:"M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"})})),"Unsplash"]}))})),n(D,{children:"Unsplash is not available yet"})]}),s&&i(C,{children:[n(R,Object.assign({asChild:!0},{children:i(S,Object.assign({value:"ai",disabled:!0,className:"gap-1.5"},{children:[n(W,{className:"h-3.5 w-3.5"}),"AI"]}))})),n(D,{children:"AI is not available yet"})]})]})),n(N,Object.assign({value:"upload",className:"mt-4"},{children:n(ke,{onUpload:e,hasPreview:r})})),n(N,Object.assign({value:"link"},{children:n(Se,{onInsertUrl:t})})),a&&n(ye,{onInsertFromUnsplash:a}),s&&n(N,Object.assign({value:"ai"},{children:n(Ie,{onInsertFromAI:s})}))]}))})),Re=({onUpload:e,onInsertUrl:t,onInsertFromUnsplash:a,onInsertFromAI:s,className:r,attributes:o,children:l,preview:c,progress:d,loading:m})=>{const h=null!==c&&!!c.url,u=m&&d;return i("div",Object.assign({className:A("mt-2 relative rounded-lg border bg-background overflow-hidden",h&&"min-h-[300px]",r)},o,{contentEditable:!1},{children:[h&&n(Ne,{preview:c}),!h&&n(Ce,{onUpload:e,onInsertUrl:t,onInsertFromUnsplash:a,onInsertFromAI:s,hasPreview:h}),u&&d&&n(Oe,{progress:d}),l]}))};var De=["PageUp","PageDown"],Ee=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ze={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Pe="Slider",[Ue,Ae,_e]=ve(Pe),[He,Me]=oe(Pe,[_e]),[Fe,Le]=He(Pe),Be=s.forwardRef((e,t)=>{const{name:i,min:a=0,max:r=100,step:o=1,orientation:l="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:m=[a],value:h,onValueChange:u=()=>{},onValueCommit:g=()=>{},inverted:p=!1,form:f,...b}=e,v=s.useRef(new Set),w=s.useRef(0),x="horizontal"===l?We:Te,[j=[],y]=me({prop:h,defaultProp:m,onChange:e=>{const t=[...v.current];t[w.current]?.focus(),u(e)}}),N=s.useRef(j);function O(e,t,{commit:n}={commit:!1}){const i=function(e){return(String(e).split(".")[1]||"").length}(o),s=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-a)/o)*o+a,i),l=re(s,[a,r]);y((e=[])=>{const i=function(e=[],t,n){const i=[...e];return i[n]=t,i.sort((e,t)=>e-t)}(e,l,t);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}(e);return Math.min(...n)>=t}return!0}(i,d*o)){w.current=i.indexOf(l);const t=String(i)!==String(e);return t&&n&&g(i),t?i:e}return e})}return n(Fe,{scope:e.__scopeSlider,name:i,disabled:c,min:a,max:r,valueIndexToChangeRef:w,thumbs:v.current,values:j,orientation:l,form:f,children:n(Ue.Provider,{scope:e.__scopeSlider,children:n(Ue.Slot,{scope:e.__scopeSlider,children:n(x,{"aria-disabled":c,"data-disabled":c?"":void 0,...b,ref:t,onPointerDown:le(b.onPointerDown,()=>{c||(N.current=j)}),min:a,max:r,inverted:p,onSlideStart:c?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map(e=>Math.abs(e-t)),i=Math.min(...n);return n.indexOf(i)}(j,e);O(e,t)},onSlideMove:c?void 0:function(e){O(e,w.current)},onSlideEnd:c?void 0:function(){const e=N.current[w.current];j[w.current]!==e&&g(j)},onHomeKeyDown:()=>!c&&O(a,0,{commit:!0}),onEndKeyDown:()=>!c&&O(r,j.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){const n=De.includes(e.key)||e.shiftKey&&Ee.includes(e.key)?10:1,i=w.current;O(j[i]+o*n*t,i,{commit:!0})}}})})})})});Be.displayName=Pe;var[Ke,Ve]=He(Pe,{startEdge:"left",endEdge:"right",size:"width",direction:1}),We=s.forwardRef((e,t)=>{const{min:i,max:a,dir:r,inverted:o,onSlideStart:l,onSlideMove:c,onSlideEnd:d,onStepKeyDown:m,...h}=e,[u,g]=s.useState(null),p=de(t,e=>g(e)),f=s.useRef(void 0),b=he(r),v="ltr"===b,w=v&&!o||!v&&o;function x(e){const t=f.current||u.getBoundingClientRect(),n=nt([0,t.width],w?[i,a]:[a,i]);return f.current=t,n(e-t.left)}return n(Ke,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:n($e,{dir:b,"data-orientation":"horizontal",...h,ref:p,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=x(e.clientX);l?.(t)},onSlideMove:e=>{const t=x(e.clientX);c?.(t)},onSlideEnd:()=>{f.current=void 0,d?.()},onStepKeyDown:e=>{const t=ze[w?"from-left":"from-right"].includes(e.key);m?.({event:e,direction:t?-1:1})}})})}),Te=s.forwardRef((e,t)=>{const{min:i,max:a,inverted:r,onSlideStart:o,onSlideMove:l,onSlideEnd:c,onStepKeyDown:d,...m}=e,h=s.useRef(null),u=de(t,h),g=s.useRef(void 0),p=!r;function f(e){const t=g.current||h.current.getBoundingClientRect(),n=nt([0,t.height],p?[a,i]:[i,a]);return g.current=t,n(e-t.top)}return n(Ke,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:n($e,{"data-orientation":"vertical",...m,ref:u,style:{...m.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=f(e.clientY);o?.(t)},onSlideMove:e=>{const t=f(e.clientY);l?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{const t=ze[p?"from-bottom":"from-top"].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),$e=s.forwardRef((e,t)=>{const{__scopeSlider:i,onSlideStart:a,onSlideMove:s,onSlideEnd:r,onHomeKeyDown:o,onEndKeyDown:l,onStepKeyDown:c,...d}=e,m=Le(Pe,i);return n(ce.span,{...d,ref:t,onKeyDown:le(e.onKeyDown,e=>{"Home"===e.key?(o(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):De.concat(Ee).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:le(e.onPointerDown,e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),m.thumbs.has(t)?t.focus():a(e)}),onPointerMove:le(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&s(e)}),onPointerUp:le(e.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),r(e))})})}),Ye="SliderTrack",Ge=s.forwardRef((e,t)=>{const{__scopeSlider:i,...a}=e,s=Le(Ye,i);return n(ce.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...a,ref:t})});Ge.displayName=Ye;var Xe="SliderRange",qe=s.forwardRef((e,t)=>{const{__scopeSlider:i,...a}=e,r=Le(Xe,i),o=Ve(Xe,i),l=s.useRef(null),c=de(t,l),d=r.values.length,m=r.values.map(e=>tt(e,r.min,r.max)),h=d>1?Math.min(...m):0,u=100-Math.max(...m);return n(ce.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...a,ref:c,style:{...e.style,[o.startEdge]:h+"%",[o.endEdge]:u+"%"}})});qe.displayName=Xe;var Je="SliderThumb",Qe=s.forwardRef((e,t)=>{const i=Ae(e.__scopeSlider),[a,r]=s.useState(null),o=de(t,e=>r(e)),l=s.useMemo(()=>a?i().findIndex(e=>e.ref.current===a):-1,[i,a]);return n(Ze,{...e,ref:o,index:l})}),Ze=s.forwardRef((e,t)=>{const{__scopeSlider:a,index:r,name:o,...l}=e,c=Le(Je,a),d=Ve(Je,a),[m,h]=s.useState(null),u=de(t,e=>h(e)),g=!m||(c.form||!!m.closest("form")),p=ue(m),f=c.values[r],b=void 0===f?0:tt(f,c.min,c.max),v=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(r,c.values.length),w=p?.[d.size],x=w?function(e,t,n){const i=e/2,a=nt([0,50],[0,i]);return(i-a(t)*n)*n}(w,b,d.direction):0;return s.useEffect(()=>{if(m)return c.thumbs.add(m),()=>{c.thumbs.delete(m)}},[m,c.thumbs]),i("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[d.startEdge]:`calc(${b}% + ${x}px)`},children:[n(Ue.ItemSlot,{scope:e.__scopeSlider,children:n(ce.span,{role:"slider","aria-label":e["aria-label"]||v,"aria-valuemin":c.min,"aria-valuenow":f,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...l,ref:u,style:void 0===f?{display:"none"}:e.style,onFocus:le(e.onFocus,()=>{c.valueIndexToChangeRef.current=r})})}),g&&n(et,{name:o??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:f},r)]})});Qe.displayName=Je;var et=s.forwardRef(({__scopeSlider:e,value:t,...i},a)=>{const r=s.useRef(null),o=de(r,a),l=Q(t);return s.useEffect(()=>{const e=r.current;if(!e)return;const n=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(n,"value").set;if(l!==t&&i){const n=new Event("input",{bubbles:!0});i.call(e,t),e.dispatchEvent(n)}},[l,t]),n(ce.input,{style:{display:"none"},...i,ref:o,defaultValue:t})});function tt(e,t,n){return re(100/(n-t)*(e-t),[0,100])}function nt(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(n-e[0])}}et.displayName="RadioBubbleInput";var it=Be,at=Ge,st=qe,rt=Qe;const ot=t=>{var{className:a,defaultValue:r,value:o,min:l=0,max:c=100}=t,d=e(t,["className","defaultValue","value","min","max"]);const m=s.useMemo(()=>Array.isArray(o)?o:Array.isArray(r)?r:[l,c],[o,r,l,c]);return i(it,Object.assign({"data-slot":"slider",defaultValue:r,value:o,min:l,max:c,className:A("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",a)},d,{children:[n(at,Object.assign({"data-slot":"slider-track",className:A("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5")},{children:n(st,{"data-slot":"slider-range",className:A("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})})),Array.from({length:m.length},(e,t)=>n(rt,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},t))]}))},lt={contain:{label:"Contain",description:"Fit within bounds"},cover:{label:"Cover",description:"Fill and crop"},fill:{label:"Fill",description:"Stretch to fit"}},ct=({fit:e,alt:t,borderRadius:a,onUpdate:s})=>{var r,l,c,d,m,h,u,g;const[p,f]=o(t),[b,v]=o(!1);return i(X,Object.assign({open:b,onOpenChange:v},{children:[n(E,{children:i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(q,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:b?"secondary":"ghost",size:"icon",className:"h-7 w-7"},{children:n(we,{className:"h-4 w-4"})}))}))})),n(D,{children:"Settings"})]})}),n(J,Object.assign({className:"w-80 p-3",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:i("div",Object.assign({className:"space-y-3"},{children:[i("div",{children:[n("h4",Object.assign({className:"font-semibold"},{children:"Image settings"})),n("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Customize how the image appears"}))]}),n(se,{}),i("div",Object.assign({className:"space-y-1"},{children:[n(G,Object.assign({htmlFor:"alt-text",className:"text-sm font-medium"},{children:"Alt text"})),n(I,{id:"alt-text",value:p,onChange:e=>f(e.target.value),onBlur:()=>s({alt:p}),placeholder:"Describe this image...",className:"h-9"}),n("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Important for accessibility and SEO"}))]})),i("div",Object.assign({className:"space-y-1 z-50"},{children:[n(G,Object.assign({htmlFor:"object-fit",className:"text-sm font-medium"},{children:"How image fits"})),i(Z,Object.assign({value:e,onValueChange:e=>s({fit:e})},{children:[n(ee,Object.assign({id:"object-fit",className:"h-9 w-full"},{children:n(te,Object.assign({placeholder:"Select how image fits"},{children:i("div",Object.assign({className:"flex items-center gap-2"},{children:[n("div",Object.assign({className:"font-medium"},{children:null===(r=lt[e])||void 0===r?void 0:r.label})),n("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(l=lt[e])||void 0===l?void 0:l.description}))]}))}))})),n(ne,{children:i(ie,{children:[n(ae,Object.assign({value:"contain",className:"cursor-pointer"},{children:i("div",Object.assign({className:"flex items-center gap-2"},{children:[n("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:n("div",{className:"h-4 w-3 rounded bg-primary"})})),i("div",Object.assign({className:"flex-1"},{children:[n("div",Object.assign({className:"font-medium"},{children:null===(c=lt.contain)||void 0===c?void 0:c.label})),n("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(d=lt.contain)||void 0===d?void 0:d.description}))]}))]}))})),n(ae,Object.assign({value:"cover",className:"cursor-pointer"},{children:i("div",Object.assign({className:"flex items-center gap-2"},{children:[n("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:n("div",{className:"h-8 w-6 rounded bg-primary"})})),i("div",Object.assign({className:"flex-1"},{children:[n("div",Object.assign({className:"font-medium"},{children:null===(m=lt.cover)||void 0===m?void 0:m.label})),n("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(h=lt.cover)||void 0===h?void 0:h.description}))]}))]}))})),n(ae,Object.assign({value:"fill",className:"cursor-pointer"},{children:i("div",Object.assign({className:"flex items-center gap-2"},{children:[n("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:n("div",{className:"h-8 w-8 rounded bg-primary"})})),i("div",Object.assign({className:"flex-1"},{children:[n("div",Object.assign({className:"font-medium"},{children:null===(u=lt.fill)||void 0===u?void 0:u.label})),n("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(g=lt.fill)||void 0===g?void 0:g.description}))]}))]}))}))]})})]}))]})),i("div",Object.assign({className:"space-y-1"},{children:[i("div",Object.assign({className:"flex items-center justify-between"},{children:[n(G,Object.assign({className:"text-sm font-medium"},{children:"Border radius"})),i("span",Object.assign({className:"text-sm text-muted-foreground"},{children:[a,"px"]}))]})),n(ot,{value:[a],onValueChange:([e])=>s({borderRadius:e}),max:50,step:1,className:"w-full"})]}))]}))}))]}))},dt=({referenceRef:e,elementProps:t,onUpdate:a,onReplace:s,onDelete:r,onDownload:c,onCopy:d})=>{var m,h,u;const[g,p]=o(!1),[f,b]=o(!1),{refs:v,floatingStyles:w}=z({placement:"top-end",strategy:"absolute",middleware:[ge(8),pe({fallbackPlacements:["bottom-end","top-start","bottom-start"],padding:10}),fe({padding:10})],whileElementsMounted:be});return l(()=>{const t=e.current;t&&(v.setReference(t),b(!0))},[e,v]),l(()=>{if(f){const e=requestAnimationFrame(()=>{p(!0)});return()=>cancelAnimationFrame(e)}},[f]),f?n(P,{children:n("div",Object.assign({ref:v.setFloating,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:e=>e.stopPropagation(),className:A("pointer-events-auto z-50","flex items-center gap-1 rounded-lg border bg-background/95 backdrop-blur-sm p-1 shadow-lg","transition-opacity duration-200 ease-out",g?"opacity-100 translate-y-0":"opacity-0 translate-y-2"),style:w},{children:i(E,Object.assign({delayDuration:0},{children:[i("div",Object.assign({className:"flex items-center gap-0.5 border-r pr-1"},{children:[i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:"left"===t.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>a({alignment:"left"})},{children:n(L,{className:"h-4 w-4"})}))})),n(D,{children:"Align left"})]}),i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:"center"===t.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>a({alignment:"center"})},{children:n(B,{className:"h-4 w-4"})}))})),n(D,{children:"Align center"})]}),i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:"right"===t.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>a({alignment:"right"})},{children:n(K,{className:"h-4 w-4"})}))})),n(D,{children:"Align right"})]})]})),i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:s},{children:n(U,{className:"h-4 w-4"})}))})),n(D,{children:"Replace"})]}),i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:c},{children:n(M,{className:"h-4 w-4"})}))})),n(D,{children:"Download"})]}),i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:d},{children:n($,{className:"h-4 w-4"})}))})),n(D,{children:"Copy"})]}),n(se,{orientation:"vertical",className:"h-4"}),n(ct,{fit:null!==(m=t.fit)&&void 0!==m?m:"contain",alt:null!==(h=t.alt)&&void 0!==h?h:"",borderRadius:null!==(u=t.borderRadius)&&void 0!==u?u:0,onUpdate:a}),i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:r},{children:n(xe,{className:"h-4 w-4"})}))})),n(D,{children:"Delete"})]})]}))}))}):null},mt=({blockId:e,attributes:a,children:s,elementProps:l,onUpdate:d,onDelete:g,onReplace:p,pluginOptions:f})=>{var b;const[v,w]=o(l.sizes),{isElementSelected:x}=m(),j=h({blockId:e}),y=x&&j,N=r(null),O=u(),[k,S]=o(()=>{var e;const t=(null===(e=O.refElement)||void 0===e?void 0:e.getBoundingClientRect().width)||0,n=null==f?void 0:f.maxSizes;return{maxWidth:(null==n?void 0:n.maxWidth)?"number"==typeof n.maxWidth?n.maxWidth:parseInt(String(n.maxWidth).replace(/[^\d]/g,""),10):t,maxHeight:(null==n?void 0:n.maxHeight)?"number"==typeof n.maxHeight?n.maxHeight:parseInt(String(n.maxHeight).replace(/[^\d]/g,""),10):0}});c(()=>{const e=()=>{var e;const t=(null===(e=O.refElement)||void 0===e?void 0:e.getBoundingClientRect().width)||0,n=null==f?void 0:f.maxSizes;S({maxWidth:(null==n?void 0:n.maxWidth)?"number"==typeof n.maxWidth?n.maxWidth:parseInt(String(n.maxWidth).replace(/[^\d]/g,""),10):t,maxHeight:(null==n?void 0:n.maxHeight)?"number"==typeof n.maxHeight?n.maxHeight:parseInt(String(n.maxHeight).replace(/[^\d]/g,""),10):0})};e();const t=new ResizeObserver(e);return O.refElement&&t.observe(O.refElement),window.addEventListener("resize",e),()=>{t.disconnect(),window.removeEventListener("resize",e)}},[O,f]);const I={left:"justify-start",center:"justify-center",right:"justify-end"}[null!==(b=l.alignment)&&void 0!==b?b:"center"];return i("div",Object.assign({},a,{className:A("group/image mt-4 relative transition-all w-full flex",I)},{children:[i("div",Object.assign({className:"relative",contentEditable:!1,ref:N},{children:[n(V,Object.assign({style:{position:"relative",outline:y?".125rem solid rgba(0, 0, 0, 0)":"none",outlineColor:y?"hsl(var(--primary))":"none",padding:2},onResize:(e,t,n)=>{const i=parseInt(n.style.width,10),a=parseInt(n.style.height,10);w({width:i,height:a})},onResizeStop:(e,t,n)=>{const i=parseInt(n.style.width,10),a=parseInt(n.style.height,10);d({sizes:{width:i,height:a}})},lockAspectRatio:!0,minWidth:100,minHeight:100,maxWidth:k.maxWidth-8||void 0,maxHeight:k.maxHeight||void 0,position:{x:0,y:0},enableResizing:!!y&&{bottom:!1,bottomLeft:!1,bottomRight:!1,left:!0,right:!0,top:!1,topLeft:!1,topRight:!1},disableDragging:!0,resizeHandleStyles:{left:{width:"auto",height:"40px",left:"5px",top:"50%",transform:"translateY(-50%)",cursor:"ew-resize"},right:{width:"auto",height:"40px",right:"5px",top:"50%",transform:"translateY(-50%)",cursor:"ew-resize"}},resizeHandleComponent:{left:n("div",{className:"h-10 w-1.5 rounded-full bg-white border border-border shadow-[0_0_4px_rgba(0,0,0,0.3)]"}),right:n("div",{className:"h-10 w-1.5 rounded-full bg-white border border-border shadow-[0_0_4px_rgba(0,0,0,0.3)]"})},className:A("rounded-sm")},{children:n("img",{src:l.src,alt:l.alt||"",className:"w-full h-full transition-all duration-200",style:{objectFit:l.fit,borderRadius:`${l.borderRadius}px`},draggable:!1})})),y&&n(dt,{referenceRef:N,elementProps:l,onUpdate:d,onReplace:p,onDelete:g,onDownload:()=>t(void 0,void 0,void 0,function*(){try{const e=yield fetch(l.src),t=yield e.blob(),n=URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.download=`image-${Date.now()}.jpg`,i.click(),URL.revokeObjectURL(n)}catch(e){}}),onCopy:()=>t(void 0,void 0,void 0,function*(){try{const e=yield fetch(l.src),t=yield e.blob();navigator.clipboard&&ClipboardItem?yield navigator.clipboard.write([new ClipboardItem({[t.type]:t})]):Y(l.src)}catch(e){Y(l.src)}})})]})),s]}))},ht={image:{render:({element:e,attributes:i,children:a,blockId:s})=>{const r=u(),o=g("Image"),{upload:l,progress:c,loading:m}=b(o.upload),{deleteImage:h}=v(o.delete),{preview:y,generatePreview:N,clearPreview:O}=w(),k=d(t=>{p.updateElement(r,{blockId:s,type:"image",props:Object.assign(Object.assign({},e.props),t)})},[r,s,e.props]),S=d(()=>t(void 0,void 0,void 0,function*(){yield h(e);const t=f.getBlockSlate(r,{id:s});if(!t)return;const n=p.getElementPath(r,{blockId:s,element:e});if(!n)return;const i=n?x.parent(t,n):void 0;i&&j.isElement(i[0])&&!x.isEditor(i[0])?p.deleteElement(r,{blockId:s,type:"image",path:n}):f.deleteBlock(r,{blockId:s,focus:!0})}),[r,s,e,h]),I=d(()=>{p.updateElement(r,{blockId:s,type:"image",props:Object.assign(Object.assign({},e.props),{src:null,alt:null})})},[r,s,e.props]),C=d(e=>t(void 0,void 0,void 0,function*(){var t;const n=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!n)return;N(n);const i=yield l(n);k({id:i.id||i.fileId,src:i.url,alt:n.name,sizes:{width:i.width,height:i.height}}),O(),r.focusBlock(s,{waitExecution:!1})}),[l,k,N,O,r,s]);return e.props.src?n(mt,Object.assign({blockId:s,elementId:e.id,onUpdate:k,onDelete:S,attributes:i,onReplace:I,elementProps:e.props,pluginOptions:o},{children:a})):r.readOnly?null:n(Re,Object.assign({onUpload:C,preview:y,progress:c,loading:m,onInsertUrl:()=>{},onInsertFromUnsplash:()=>{},onInsertFromAI:()=>t(void 0,void 0,void 0,function*(){}),attributes:i},{children:a}))}}};export{ht as ImageUI};
7
+ */const je=T("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),ye=({onInsertFromUnsplash:e})=>n(O,Object.assign({value:"unsplash",className:"mt-4"},{children:i("div",Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[n("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:n("svg",Object.assign({className:"h-6 w-6",viewBox:"0 0 32 32",fill:"currentColor"},{children:n("path",{d:"M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"})}))})),i("div",Object.assign({className:"text-center"},{children:[n("p",Object.assign({className:"text-sm font-medium"},{children:"Browse free photos"})),n("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Powered by Unsplash"}))]})),n(y,Object.assign({onClick:e},{children:"Browse photos"}))]}))})),Oe=({preview:e})=>n("div",Object.assign({className:"absolute inset-0 overflow-hidden",style:{width:e.width,height:e.height}},{children:n("img",{src:e.url,alt:"Preview",className:"h-full w-full object-cover object-center",style:{width:e.width,height:e.height},draggable:!1})})),Ne=({progress:e})=>n("div",Object.assign({className:"absolute inset-0 z-20 flex flex-col items-center justify-center gap-4 bg-black/70 backdrop-blur-sm p-6"},{children:n("div",Object.assign({className:"w-full max-w-md space-y-4"},{children:i("div",Object.assign({className:"space-y-2"},{children:[i("div",Object.assign({className:"flex items-center justify-between text-sm"},{children:[n("span",Object.assign({className:"font-medium text-white"},{children:"Uploading..."})),i("span",Object.assign({className:"text-white/80"},{children:[e.percentage,"%"]}))]})),n("div",Object.assign({className:"h-2 w-full overflow-hidden rounded-full bg-white/20"},{children:n("div",{className:"h-full bg-primary transition-all duration-300 ease-out",style:{width:`${e.percentage}%`}})})),i("div",Object.assign({className:"flex items-center justify-between text-xs text-white/60"},{children:[i("span",{children:[(e.loaded/1024/1024).toFixed(2)," MB /"," ",(e.total/1024/1024).toFixed(2)," MB"]}),n(_,{className:"h-3.5 w-3.5 animate-spin"})]}))]}))}))})),ke=({onUpload:e,hasPreview:t})=>{const a=r(null);return i("div",t?Object.assign({className:"flex flex-col items-center justify-center gap-4 py-8"},{children:[i("div",Object.assign({className:"text-center space-y-2"},{children:[n("p",Object.assign({className:"text-sm font-medium text-white"},{children:"Image preview"})),n("p",Object.assign({className:"text-xs text-white/80"},{children:"Uploading your image..."}))]})),n("input",{ref:a,type:"file",accept:"image/*",onChange:e,className:"hidden"})]}):Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[n("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:n(je,{className:"h-6 w-6 text-muted-foreground"})})),i("div",Object.assign({className:"text-center"},{children:[n("p",Object.assign({className:"text-sm font-medium"},{children:"Upload an image"})),n("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Click or drag and drop"}))]})),n(y,Object.assign({onClick:()=>{var e;return null===(e=a.current)||void 0===e?void 0:e.click()}},{children:"Choose file"})),n("input",{ref:a,type:"file",accept:"image/*",onChange:e,className:"hidden"})]}))},Se=({onInsertUrl:e})=>{const[t,a]=o(""),s=()=>{t.trim()&&(e(t.trim()),a(""))};return i("div",Object.assign({className:"mt-4 space-y-3"},{children:[n(I,{placeholder:"Paste image URL...",value:t,onChange:e=>a(e.target.value),onKeyDown:e=>{"Enter"===e.key&&t.trim()&&s()}}),n(y,Object.assign({className:"w-full",onClick:s,disabled:!t.trim()},{children:"Embed image"}))]}))},Ie=({onInsertFromAI:e})=>{const[t,s]=o(""),[r,l]=o(!1),c=()=>{t.trim()&&!r&&(l(!0),e(t.trim()),l(!1),s(""))};return i("div",Object.assign({className:"mt-4 space-y-3"},{children:[i("div",Object.assign({className:"space-y-2"},{children:[n(I,{placeholder:"Describe the image...",value:t,onChange:e=>s(e.target.value),onKeyDown:e=>{"Enter"===e.key&&c()},disabled:r}),n("p",Object.assign({className:"text-xs text-muted-foreground"},{children:'Example: "A sunset over mountains with dramatic clouds”'}))]})),n(y,Object.assign({className:"w-full gap-2",onClick:c,disabled:!t.trim()||r},{children:i(a,r?{children:[n(_,{className:"h-4 w-4 animate-spin"}),"Generating..."]}:{children:[n(W,{className:"h-4 w-4"}),"Generate image"]})}))]}))},Ce=({onUpload:e,onInsertUrl:t,onInsertFromUnsplash:a,onInsertFromAI:s,hasPreview:r})=>n("div",Object.assign({className:A("relative p-4",r&&"min-h-[300px] flex flex-col")},{children:i(N,Object.assign({defaultValue:"upload",className:"w-full"},{children:[i(k,Object.assign({className:A("grid w-full grid-cols-4",r&&"bg-background/80 backdrop-blur-sm")},{children:[i(S,Object.assign({value:"upload",className:"gap-1.5"},{children:[n(H,{className:"h-3.5 w-3.5"}),"Upload"]})),i(C,{children:[n(R,Object.assign({asChild:!0},{children:i(S,Object.assign({value:"link",disabled:!0,className:"gap-1.5"},{children:[n(F,{className:"h-3.5 w-3.5"}),"Link"]}))})),n(D,{children:"Link is not available yet"})]}),a&&i(C,{children:[n(R,Object.assign({asChild:!0},{children:i(S,Object.assign({value:"unsplash",disabled:!0,className:"gap-1.5"},{children:[n("svg",Object.assign({className:"h-3.5 w-3.5",viewBox:"0 0 32 32",fill:"currentColor"},{children:n("path",{d:"M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"})})),"Unsplash"]}))})),n(D,{children:"Unsplash is not available yet"})]}),s&&i(C,{children:[n(R,Object.assign({asChild:!0},{children:i(S,Object.assign({value:"ai",disabled:!0,className:"gap-1.5"},{children:[n(W,{className:"h-3.5 w-3.5"}),"AI"]}))})),n(D,{children:"AI is not available yet"})]})]})),n(O,Object.assign({value:"upload",className:"mt-4"},{children:n(ke,{onUpload:e,hasPreview:r})})),n(O,Object.assign({value:"link"},{children:n(Se,{onInsertUrl:t})})),a&&n(ye,{onInsertFromUnsplash:a}),s&&n(O,Object.assign({value:"ai"},{children:n(Ie,{onInsertFromAI:s})}))]}))})),Re=({onUpload:e,onInsertUrl:t,onInsertFromUnsplash:a,onInsertFromAI:s,className:r,attributes:o,children:l,preview:c,progress:d,loading:m})=>{const h=null!==c&&!!c.url,u=m&&d;return i("div",Object.assign({className:A("mt-2 relative rounded-lg border bg-background overflow-hidden",h&&"min-h-[300px]",r)},o,{contentEditable:!1},{children:[h&&n(Oe,{preview:c}),!h&&n(Ce,{onUpload:e,onInsertUrl:t,onInsertFromUnsplash:a,onInsertFromAI:s,hasPreview:h}),u&&d&&n(Ne,{progress:d}),l]}))};var De=["PageUp","PageDown"],Ee=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ze={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Pe="Slider",[Ue,Ae,_e]=ve(Pe),[He,Me]=oe(Pe,[_e]),[Fe,Le]=He(Pe),Be=s.forwardRef((e,t)=>{const{name:i,min:a=0,max:r=100,step:o=1,orientation:l="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:m=[a],value:h,onValueChange:u=()=>{},onValueCommit:g=()=>{},inverted:p=!1,form:f,...b}=e,v=s.useRef(new Set),w=s.useRef(0),x="horizontal"===l?We:Te,[j=[],y]=me({prop:h,defaultProp:m,onChange:e=>{const t=[...v.current];t[w.current]?.focus(),u(e)}}),O=s.useRef(j);function N(e,t,{commit:n}={commit:!1}){const i=function(e){return(String(e).split(".")[1]||"").length}(o),s=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-a)/o)*o+a,i),l=re(s,[a,r]);y((e=[])=>{const i=function(e=[],t,n){const i=[...e];return i[n]=t,i.sort((e,t)=>e-t)}(e,l,t);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}(e);return Math.min(...n)>=t}return!0}(i,d*o)){w.current=i.indexOf(l);const t=String(i)!==String(e);return t&&n&&g(i),t?i:e}return e})}return n(Fe,{scope:e.__scopeSlider,name:i,disabled:c,min:a,max:r,valueIndexToChangeRef:w,thumbs:v.current,values:j,orientation:l,form:f,children:n(Ue.Provider,{scope:e.__scopeSlider,children:n(Ue.Slot,{scope:e.__scopeSlider,children:n(x,{"aria-disabled":c,"data-disabled":c?"":void 0,...b,ref:t,onPointerDown:le(b.onPointerDown,()=>{c||(O.current=j)}),min:a,max:r,inverted:p,onSlideStart:c?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map(e=>Math.abs(e-t)),i=Math.min(...n);return n.indexOf(i)}(j,e);N(e,t)},onSlideMove:c?void 0:function(e){N(e,w.current)},onSlideEnd:c?void 0:function(){const e=O.current[w.current];j[w.current]!==e&&g(j)},onHomeKeyDown:()=>!c&&N(a,0,{commit:!0}),onEndKeyDown:()=>!c&&N(r,j.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){const n=De.includes(e.key)||e.shiftKey&&Ee.includes(e.key)?10:1,i=w.current;N(j[i]+o*n*t,i,{commit:!0})}}})})})})});Be.displayName=Pe;var[Ke,Ve]=He(Pe,{startEdge:"left",endEdge:"right",size:"width",direction:1}),We=s.forwardRef((e,t)=>{const{min:i,max:a,dir:r,inverted:o,onSlideStart:l,onSlideMove:c,onSlideEnd:d,onStepKeyDown:m,...h}=e,[u,g]=s.useState(null),p=de(t,e=>g(e)),f=s.useRef(void 0),b=he(r),v="ltr"===b,w=v&&!o||!v&&o;function x(e){const t=f.current||u.getBoundingClientRect(),n=nt([0,t.width],w?[i,a]:[a,i]);return f.current=t,n(e-t.left)}return n(Ke,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:n($e,{dir:b,"data-orientation":"horizontal",...h,ref:p,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=x(e.clientX);l?.(t)},onSlideMove:e=>{const t=x(e.clientX);c?.(t)},onSlideEnd:()=>{f.current=void 0,d?.()},onStepKeyDown:e=>{const t=ze[w?"from-left":"from-right"].includes(e.key);m?.({event:e,direction:t?-1:1})}})})}),Te=s.forwardRef((e,t)=>{const{min:i,max:a,inverted:r,onSlideStart:o,onSlideMove:l,onSlideEnd:c,onStepKeyDown:d,...m}=e,h=s.useRef(null),u=de(t,h),g=s.useRef(void 0),p=!r;function f(e){const t=g.current||h.current.getBoundingClientRect(),n=nt([0,t.height],p?[a,i]:[i,a]);return g.current=t,n(e-t.top)}return n(Ke,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:n($e,{"data-orientation":"vertical",...m,ref:u,style:{...m.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=f(e.clientY);o?.(t)},onSlideMove:e=>{const t=f(e.clientY);l?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{const t=ze[p?"from-bottom":"from-top"].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),$e=s.forwardRef((e,t)=>{const{__scopeSlider:i,onSlideStart:a,onSlideMove:s,onSlideEnd:r,onHomeKeyDown:o,onEndKeyDown:l,onStepKeyDown:c,...d}=e,m=Le(Pe,i);return n(ce.span,{...d,ref:t,onKeyDown:le(e.onKeyDown,e=>{"Home"===e.key?(o(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):De.concat(Ee).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:le(e.onPointerDown,e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),m.thumbs.has(t)?t.focus():a(e)}),onPointerMove:le(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&s(e)}),onPointerUp:le(e.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),r(e))})})}),Ye="SliderTrack",Ge=s.forwardRef((e,t)=>{const{__scopeSlider:i,...a}=e,s=Le(Ye,i);return n(ce.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...a,ref:t})});Ge.displayName=Ye;var Xe="SliderRange",qe=s.forwardRef((e,t)=>{const{__scopeSlider:i,...a}=e,r=Le(Xe,i),o=Ve(Xe,i),l=s.useRef(null),c=de(t,l),d=r.values.length,m=r.values.map(e=>tt(e,r.min,r.max)),h=d>1?Math.min(...m):0,u=100-Math.max(...m);return n(ce.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...a,ref:c,style:{...e.style,[o.startEdge]:h+"%",[o.endEdge]:u+"%"}})});qe.displayName=Xe;var Je="SliderThumb",Qe=s.forwardRef((e,t)=>{const i=Ae(e.__scopeSlider),[a,r]=s.useState(null),o=de(t,e=>r(e)),l=s.useMemo(()=>a?i().findIndex(e=>e.ref.current===a):-1,[i,a]);return n(Ze,{...e,ref:o,index:l})}),Ze=s.forwardRef((e,t)=>{const{__scopeSlider:a,index:r,name:o,...l}=e,c=Le(Je,a),d=Ve(Je,a),[m,h]=s.useState(null),u=de(t,e=>h(e)),g=!m||(c.form||!!m.closest("form")),p=ue(m),f=c.values[r],b=void 0===f?0:tt(f,c.min,c.max),v=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(r,c.values.length),w=p?.[d.size],x=w?function(e,t,n){const i=e/2,a=nt([0,50],[0,i]);return(i-a(t)*n)*n}(w,b,d.direction):0;return s.useEffect(()=>{if(m)return c.thumbs.add(m),()=>{c.thumbs.delete(m)}},[m,c.thumbs]),i("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[d.startEdge]:`calc(${b}% + ${x}px)`},children:[n(Ue.ItemSlot,{scope:e.__scopeSlider,children:n(ce.span,{role:"slider","aria-label":e["aria-label"]||v,"aria-valuemin":c.min,"aria-valuenow":f,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...l,ref:u,style:void 0===f?{display:"none"}:e.style,onFocus:le(e.onFocus,()=>{c.valueIndexToChangeRef.current=r})})}),g&&n(et,{name:o??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:f},r)]})});Qe.displayName=Je;var et=s.forwardRef(({__scopeSlider:e,value:t,...i},a)=>{const r=s.useRef(null),o=de(r,a),l=Q(t);return s.useEffect(()=>{const e=r.current;if(!e)return;const n=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(n,"value").set;if(l!==t&&i){const n=new Event("input",{bubbles:!0});i.call(e,t),e.dispatchEvent(n)}},[l,t]),n(ce.input,{style:{display:"none"},...i,ref:o,defaultValue:t})});function tt(e,t,n){return re(100/(n-t)*(e-t),[0,100])}function nt(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(n-e[0])}}et.displayName="RadioBubbleInput";var it=Be,at=Ge,st=qe,rt=Qe;const ot=t=>{var{className:a,defaultValue:r,value:o,min:l=0,max:c=100}=t,d=e(t,["className","defaultValue","value","min","max"]);const m=s.useMemo(()=>Array.isArray(o)?o:Array.isArray(r)?r:[l,c],[o,r,l,c]);return i(it,Object.assign({"data-slot":"slider",defaultValue:r,value:o,min:l,max:c,className:A("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",a)},d,{children:[n(at,Object.assign({"data-slot":"slider-track",className:A("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5")},{children:n(st,{"data-slot":"slider-range",className:A("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})})),Array.from({length:m.length},(e,t)=>n(rt,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},t))]}))},lt={contain:{label:"Contain",description:"Fit within bounds"},cover:{label:"Cover",description:"Fill and crop"},fill:{label:"Fill",description:"Stretch to fit"}},ct=({fit:e,alt:t,borderRadius:a,onUpdate:s})=>{var r,l,c,d,m,h,u,g;const[p,f]=o(t),[b,v]=o(!1);return i(X,Object.assign({open:b,onOpenChange:v},{children:[n(E,{children:i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(q,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:b?"secondary":"ghost",size:"icon",className:"h-7 w-7"},{children:n(we,{className:"h-4 w-4"})}))}))})),n(D,{children:"Settings"})]})}),n(J,Object.assign({className:"w-80 p-3",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:i("div",Object.assign({className:"space-y-3"},{children:[i("div",{children:[n("h4",Object.assign({className:"font-semibold"},{children:"Image settings"})),n("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Customize how the image appears"}))]}),n(se,{}),i("div",Object.assign({className:"space-y-1"},{children:[n(G,Object.assign({htmlFor:"alt-text",className:"text-sm font-medium"},{children:"Alt text"})),n(I,{id:"alt-text",value:p,onChange:e=>f(e.target.value),onBlur:()=>s({alt:p}),placeholder:"Describe this image...",className:"h-9"}),n("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Important for accessibility and SEO"}))]})),i("div",Object.assign({className:"space-y-1 z-50"},{children:[n(G,Object.assign({htmlFor:"object-fit",className:"text-sm font-medium"},{children:"How image fits"})),i(Z,Object.assign({value:e,onValueChange:e=>s({fit:e})},{children:[n(ee,Object.assign({id:"object-fit",className:"h-9 w-full"},{children:n(te,Object.assign({placeholder:"Select how image fits"},{children:i("div",Object.assign({className:"flex items-center gap-2"},{children:[n("div",Object.assign({className:"font-medium"},{children:null===(r=lt[e])||void 0===r?void 0:r.label})),n("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(l=lt[e])||void 0===l?void 0:l.description}))]}))}))})),n(ne,{children:i(ie,{children:[n(ae,Object.assign({value:"contain",className:"cursor-pointer"},{children:i("div",Object.assign({className:"flex items-center gap-2"},{children:[n("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:n("div",{className:"h-4 w-3 rounded bg-primary"})})),i("div",Object.assign({className:"flex-1"},{children:[n("div",Object.assign({className:"font-medium"},{children:null===(c=lt.contain)||void 0===c?void 0:c.label})),n("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(d=lt.contain)||void 0===d?void 0:d.description}))]}))]}))})),n(ae,Object.assign({value:"cover",className:"cursor-pointer"},{children:i("div",Object.assign({className:"flex items-center gap-2"},{children:[n("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:n("div",{className:"h-8 w-6 rounded bg-primary"})})),i("div",Object.assign({className:"flex-1"},{children:[n("div",Object.assign({className:"font-medium"},{children:null===(m=lt.cover)||void 0===m?void 0:m.label})),n("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(h=lt.cover)||void 0===h?void 0:h.description}))]}))]}))})),n(ae,Object.assign({value:"fill",className:"cursor-pointer"},{children:i("div",Object.assign({className:"flex items-center gap-2"},{children:[n("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:n("div",{className:"h-8 w-8 rounded bg-primary"})})),i("div",Object.assign({className:"flex-1"},{children:[n("div",Object.assign({className:"font-medium"},{children:null===(u=lt.fill)||void 0===u?void 0:u.label})),n("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(g=lt.fill)||void 0===g?void 0:g.description}))]}))]}))}))]})})]}))]})),i("div",Object.assign({className:"space-y-1"},{children:[i("div",Object.assign({className:"flex items-center justify-between"},{children:[n(G,Object.assign({className:"text-sm font-medium"},{children:"Border radius"})),i("span",Object.assign({className:"text-sm text-muted-foreground"},{children:[a,"px"]}))]})),n(ot,{value:[a],onValueChange:([e])=>s({borderRadius:e}),max:50,step:1,className:"w-full"})]}))]}))}))]}))},dt=({referenceRef:e,elementProps:t,onUpdate:a,onReplace:s,onDelete:r,onDownload:c,onCopy:d})=>{var h,u,g;const[p,f]=o(!1),[b,v]=o(!1),w=m(),{refs:x,floatingStyles:j}=z({placement:"top-end",strategy:"absolute",middleware:[ge(8),pe({fallbackPlacements:["bottom-end","top-start","bottom-start"],padding:10}),fe({padding:10})],whileElementsMounted:be});return l(()=>{const t=e.current;t&&(x.setReference(t),v(!0))},[e,x]),l(()=>{if(b){const e=requestAnimationFrame(()=>{f(!0)});return()=>cancelAnimationFrame(e)}},[b]),b?n(P,Object.assign({id:"image-inline-toolbar",root:w.refElement},{children:n("div",Object.assign({ref:x.setFloating,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:e=>e.stopPropagation(),className:A("pointer-events-auto z-50","flex items-center gap-1 rounded-lg border bg-background/95 backdrop-blur-sm p-1 shadow-lg","transition-opacity duration-200 ease-out",p?"opacity-100 translate-y-0":"opacity-0 translate-y-2"),style:j},{children:i(E,Object.assign({delayDuration:0},{children:[i("div",Object.assign({className:"flex items-center gap-0.5 border-r pr-1"},{children:[i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:"left"===t.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>a({alignment:"left"})},{children:n(L,{className:"h-4 w-4"})}))})),n(D,{children:"Align left"})]}),i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:"center"===t.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>a({alignment:"center"})},{children:n(B,{className:"h-4 w-4"})}))})),n(D,{children:"Align center"})]}),i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:"right"===t.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>a({alignment:"right"})},{children:n(K,{className:"h-4 w-4"})}))})),n(D,{children:"Align right"})]})]})),i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:s},{children:n(U,{className:"h-4 w-4"})}))})),n(D,{children:"Replace"})]}),i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:c},{children:n(M,{className:"h-4 w-4"})}))})),n(D,{children:"Download"})]}),i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:d},{children:n($,{className:"h-4 w-4"})}))})),n(D,{children:"Copy"})]}),n(se,{orientation:"vertical",className:"h-4"}),n(ct,{fit:null!==(h=t.fit)&&void 0!==h?h:"contain",alt:null!==(u=t.alt)&&void 0!==u?u:"",borderRadius:null!==(g=t.borderRadius)&&void 0!==g?g:0,onUpdate:a}),i(C,{children:[n(R,Object.assign({asChild:!0},{children:n(y,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:r},{children:n(xe,{className:"h-4 w-4"})}))})),n(D,{children:"Delete"})]})]}))}))})):null},mt=({blockId:e,attributes:a,children:s,elementProps:l,onUpdate:d,onDelete:g,onReplace:p,pluginOptions:f})=>{var b;const[v,w]=o(l.sizes),{isElementSelected:x}=h(),j=u({blockId:e}),y=x&&j,O=r(null),N=m(),[k,S]=o(()=>{var e;const t=(null===(e=N.refElement)||void 0===e?void 0:e.getBoundingClientRect().width)||0,n=null==f?void 0:f.maxSizes;return{maxWidth:(null==n?void 0:n.maxWidth)?"number"==typeof n.maxWidth?n.maxWidth:parseInt(String(n.maxWidth).replace(/[^\d]/g,""),10):t,maxHeight:(null==n?void 0:n.maxHeight)?"number"==typeof n.maxHeight?n.maxHeight:parseInt(String(n.maxHeight).replace(/[^\d]/g,""),10):0}});c(()=>{const e=()=>{var e;const t=(null===(e=N.refElement)||void 0===e?void 0:e.getBoundingClientRect().width)||0,n=null==f?void 0:f.maxSizes;S({maxWidth:(null==n?void 0:n.maxWidth)?"number"==typeof n.maxWidth?n.maxWidth:parseInt(String(n.maxWidth).replace(/[^\d]/g,""),10):t,maxHeight:(null==n?void 0:n.maxHeight)?"number"==typeof n.maxHeight?n.maxHeight:parseInt(String(n.maxHeight).replace(/[^\d]/g,""),10):0})};e();const t=new ResizeObserver(e);return N.refElement&&t.observe(N.refElement),window.addEventListener("resize",e),()=>{t.disconnect(),window.removeEventListener("resize",e)}},[N,f]);const I={left:"justify-start",center:"justify-center",right:"justify-end"}[null!==(b=l.alignment)&&void 0!==b?b:"center"];return i("div",Object.assign({},a,{className:A("group/image mt-4 relative transition-all w-full flex",I)},{children:[i("div",Object.assign({className:"relative",contentEditable:!1,ref:O},{children:[n(V,Object.assign({style:{position:"relative",outline:y?".125rem solid rgba(0, 0, 0, 0)":"none",outlineColor:y?"hsl(var(--primary))":"none",padding:2},onResize:(e,t,n)=>{const i=parseInt(n.style.width,10),a=parseInt(n.style.height,10);w({width:i,height:a})},onResizeStop:(e,t,n)=>{const i=parseInt(n.style.width,10),a=parseInt(n.style.height,10);d({sizes:{width:i,height:a}})},lockAspectRatio:!0,minWidth:100,minHeight:100,maxWidth:k.maxWidth-8||void 0,maxHeight:k.maxHeight||void 0,position:{x:0,y:0},enableResizing:!!y&&{bottom:!1,bottomLeft:!1,bottomRight:!1,left:!0,right:!0,top:!1,topLeft:!1,topRight:!1},disableDragging:!0,resizeHandleStyles:{left:{width:"auto",height:"40px",left:"5px",top:"50%",transform:"translateY(-50%)",cursor:"ew-resize"},right:{width:"auto",height:"40px",right:"5px",top:"50%",transform:"translateY(-50%)",cursor:"ew-resize"}},resizeHandleComponent:{left:n("div",{className:"h-10 w-1.5 rounded-full bg-white border border-border shadow-[0_0_4px_rgba(0,0,0,0.3)]"}),right:n("div",{className:"h-10 w-1.5 rounded-full bg-white border border-border shadow-[0_0_4px_rgba(0,0,0,0.3)]"})},className:A("rounded-sm")},{children:n("img",{src:l.src,alt:l.alt||"",className:"w-full h-full transition-all duration-200",style:{objectFit:l.fit,borderRadius:`${l.borderRadius}px`},draggable:!1})})),y&&n(dt,{referenceRef:O,elementProps:l,onUpdate:d,onReplace:p,onDelete:g,onDownload:()=>t(void 0,void 0,void 0,function*(){try{const e=yield fetch(l.src),t=yield e.blob(),n=URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.download=`image-${Date.now()}.jpg`,i.click(),URL.revokeObjectURL(n)}catch(e){}}),onCopy:()=>t(void 0,void 0,void 0,function*(){try{const e=yield fetch(l.src),t=yield e.blob();navigator.clipboard&&ClipboardItem?yield navigator.clipboard.write([new ClipboardItem({[t.type]:t})]):Y(l.src)}catch(e){Y(l.src)}})})]})),s]}))},ht={image:{render:({element:e,attributes:i,children:a,blockId:s})=>{const r=m(),o=g("Image"),{upload:l,progress:c,loading:h}=b(o.upload),{deleteImage:u}=v(o.delete),{preview:y,generatePreview:O,clearPreview:N}=w(),k=d(t=>{p.updateElement(r,{blockId:s,type:"image",props:Object.assign(Object.assign({},e.props),t)})},[r,s,e.props]),S=d(()=>t(void 0,void 0,void 0,function*(){yield u(e);const t=f.getBlockSlate(r,{id:s});if(!t)return;const n=p.getElementPath(r,{blockId:s,element:e});if(!n)return;const i=n?x.parent(t,n):void 0;i&&j.isElement(i[0])&&!x.isEditor(i[0])?p.deleteElement(r,{blockId:s,type:"image",path:n}):f.deleteBlock(r,{blockId:s,focus:!0})}),[r,s,e,u]),I=d(()=>{p.updateElement(r,{blockId:s,type:"image",props:Object.assign(Object.assign({},e.props),{src:null,alt:null})})},[r,s,e.props]),C=d(e=>t(void 0,void 0,void 0,function*(){var t;const n=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!n)return;O(n);const i=yield l(n);k({id:i.id||i.fileId,src:i.url,alt:n.name,sizes:{width:i.width,height:i.height}}),N(),r.focusBlock(s,{waitExecution:!1})}),[l,k,O,N,r,s]);return e.props.src?n(mt,Object.assign({blockId:s,elementId:e.id,onUpdate:k,onDelete:S,attributes:i,onReplace:I,elementProps:e.props,pluginOptions:o},{children:a})):r.readOnly?null:n(Re,Object.assign({onUpload:C,preview:y,progress:c,loading:h,onInsertUrl:()=>{},onInsertFromUnsplash:()=>{},onInsertFromAI:()=>t(void 0,void 0,void 0,function*(){}),attributes:i},{children:a}))}}};export{ht as ImageUI};
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export { ParagraphUI } from './paragraph';
8
8
  export { CalloutUI } from './callout';
9
9
  export { ListsUI } from './lists';
10
10
  export { LinkUI } from './link';
11
+ export { MathInlineUI, MathBlockUI } from './math';
11
12
  export { MentionUI, MentionDropdown } from './mention';
12
13
  export { EmojiDropdown } from './emoji';
13
14
  export { ImageUI } from './image';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{s as t}from"./chunks/style-inject.es-e87a8d02.js";import{AccordionUI as r}from"./accordion.js";import{BlockquoteUI as o}from"./blockquote.js";import{CalloutUI as e}from"./callout.js";import{CarouselUI as a}from"./carousel.js";import{CodeUI as i}from"./code.js";import{CodeGroupUI as n}from"./code-group.js";import{DividerUI as d}from"./divider.js";import{EmbedUI as s}from"./embed.js";import{FileUI as c}from"./file.js";import{HeadingsUI as l}from"./headings.js";import{ImageUI as g}from"./image.js";import{LinkUI as p}from"./link.js";import{ListsUI as w}from"./lists.js";import{MentionUI as b}from"./mention.js";export{MentionDropdown}from"./mention.js";import{ParagraphUI as h}from"./paragraph.js";import{StepsUI as v}from"./steps.js";import{TableUI as m}from"./table.js";import{TableOfContentsUI as u}from"./table-of-contents.js";import{TabsUI as x}from"./tabs.js";import{VideoUI as f}from"./video.js";export{EmojiDropdown}from"./emoji.js";import"react/jsx-runtime";import"./chunks/_tslib-35bb891d.js";import"react";import"./chunks/index-17323747.js";import"react-dom";import"./chunks/index-91a5b8d5.js";import"./chunks/index-f85dae42.js";import"./chunks/index-ff0e3962.js";import"./chunks/index-23db6fea.js";import"./chunks/index-ce60ba41.js";import"./chunks/index-13505606.js";import"./chunks/utils-3345eade.js";import"@yoopta/editor";import"slate";import"./chunks/plus-840fe920.js";import"./chunks/createLucideIcon-8605f860.js";import"./chunks/trash-2-f36597ff.js";import"./chunks/chevron-down-28dfb290.js";import"@yoopta/ui/element-options";import"./chunks/button-7aec29d6.js";import"./chunks/arrow-right-38c3a9bd.js";import"./chunks/card-05710740.js";import"@yoopta/code";import"./chunks/index-0bca29df.js";import"./chunks/language-select-89735035.js";import"./chunks/select-a8bcd8b5.js";import"./chunks/index-056e5c06.js";import"./chunks/index-23c7fb16.js";import"./chunks/index-70f4e709.js";import"./chunks/Combination-575d4475.js";import"./chunks/index-1674c2c8.js";import"./chunks/check-06bd6a78.js";import"./chunks/chevron-up-9a13532e.js";import"./chunks/sparkles-ae42eae3.js";import"./chunks/tabs-294764a6.js";import"./chunks/index-ba3032f8.js";import"./chunks/x-9bfeb90f.js";import"./chunks/scroll-area-dae47c2c.js";import"./chunks/separator-219dc1f7.js";import"./chunks/index-a5cba5f7.js";import"@yoopta/embed";import"./chunks/input-b2431223.js";import"./chunks/index-87b75648.js";import"./chunks/code-d31bdce0.js";import"./chunks/play-998f23d2.js";import"./chunks/tooltip-65b9c3a0.js";import"./chunks/external-link-1579dd7f.js";import"@yoopta/file";import"./chunks/upload-b1dd210d.js";import"./chunks/file-text-ad3e3ebb.js";import"@yoopta/image";import"./chunks/label-21d46c31.js";import"./chunks/popover-8e6ee2ab.js";import"./chunks/settings-2-84fe63d9.js";import"./chunks/hover-card-d6a71398.js";import"@yoopta/lists";import"@yoopta/steps";import"./chunks/dropdown-menu-eb328f8d.js";import"@yoopta/table";import"@yoopta/ui/portal";import"@yoopta/table-of-contents";import"@yoopta/tabs";import"@yoopta/video";function y(t,y){const k={Accordion:r,Paragraph:h,Blockquote:o,Callout:e,Table:m,TableOfContents:u,Link:p,HeadingOne:l.HeadingOne,HeadingTwo:l.HeadingTwo,HeadingThree:l.HeadingThree,BulletedList:w.BulletedList,NumberedList:w.NumberedList,TodoList:w.TodoList,Image:g,Video:f,Code:i,Tabs:x,CodeGroup:n,Steps:v,Carousel:a,Divider:d,Embed:s,File:c,Mention:b};return t.map(t=>{var r;const o=t.getPlugin.type,e=k[o];if(!e)return t;const a=null==y?void 0:y[o],i=null!==(r=null==a?void 0:a.elements)&&void 0!==r?r:e;return t.extend(Object.assign({elements:i},a&&{injectElementsFromPlugins:a.injectElementsFromPlugins,events:a.events,options:a.options}))})}t(".sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-bottom-12{bottom:-3rem}.-left-12{left:-3rem}.-right-12{right:-3rem}.-top-12{top:-3rem}.left-0{left:0}.left-1\\/2{left:50%}.left-2{left:.5rem}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-3{right:.75rem}.top-0{top:0}.top-1\\/2{top:50%}.top-2{top:.5rem}.top-\\[2\\.75rem\\]{top:2.75rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.m-0{margin:0}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.my-1{margin-bottom:.25rem;margin-top:.25rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.-ml-3\\.5{margin-left:-.875rem}.-ml-4{margin-left:-1rem}.-mt-4{margin-top:-1rem}.ml-1{margin-left:.25rem}.ml-3\\.5{margin-left:.875rem}.ml-6{margin-left:1.5rem}.ml-\\[-13px\\]{margin-left:-13px}.ml-auto{margin-left:auto}.mr-1\\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0{margin-top:0}.mt-0\\.5{margin-top:.125rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.line-clamp-2{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box;overflow:hidden}.\\!block{display:block!important}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.size-2{height:.5rem;width:.5rem}.size-2\\.5{height:.625rem;width:.625rem}.size-3\\.5{height:.875rem;width:.875rem}.size-4{height:1rem;width:1rem}.size-7{height:1.75rem;width:1.75rem}.size-8{height:2rem;width:2rem}.size-full{height:100%;width:100%}.h-10{height:2.5rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[1px\\]{height:1px}.h-\\[2px\\]{height:2px}.h-\\[calc\\(100\\%-2\\.75rem\\)\\]{height:calc(100% - 2.75rem)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-\\[200px\\]{max-height:200px}.max-h-\\[280px\\]{max-height:280px}.max-h-full{max-height:100%}.min-h-16{min-height:4rem}.min-h-\\[300px\\]{min-height:300px}.w-1\\.5{width:.375rem}.w-16{width:4rem}.w-2\\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\\[1px\\]{width:1px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\\[160px\\]{min-width:160px}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[200px\\]{min-width:200px}.min-w-\\[220px\\]{min-width:220px}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[320px\\]{max-width:320px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.table-fixed{table-layout:fixed}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y:0.5rem}.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{--tw-translate-y:calc(-50% - 2px)}.rotate-180,.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.rotate-45{--tw-rotate:45deg}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.scroll-m-20{scroll-margin:5rem}.scroll-my-1{scroll-margin-bottom:.25rem;scroll-margin-top:.25rem}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.125rem*var(--tw-space-y-reverse));margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.375rem*var(--tw-space-y-reverse));margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.text-balance{text-wrap:balance}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-b-lg{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-x-0{border-left-width:0;border-right-width:0}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0}.border-t{border-top-width:1px}.border-t-0{border-top-width:0}.border-t-2{border-top-width:2px}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-border{border-color:hsl(var(--border))}.border-border\\/50{border-color:hsl(var(--border)/.5)}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-input{border-color:hsl(var(--input))}.border-muted-foreground\\/20{border-color:hsl(var(--muted-foreground)/.2)}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.bg-background{background-color:hsl(var(--background))}.bg-background\\/80{background-color:hsl(var(--background)/.8)}.bg-background\\/95{background-color:hsl(var(--background)/.95)}.bg-black\\/5{background-color:rgba(0,0,0,.05)}.bg-black\\/70{background-color:rgba(0,0,0,.7)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-border{background-color:hsl(var(--border))}.bg-border\\/70{background-color:hsl(var(--border)/.7)}.bg-card{background-color:hsl(var(--card))}.bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.bg-cyan-500{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.bg-foreground{background-color:hsl(var(--foreground))}.bg-fuchsia-500{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.bg-lime-500{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity,1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\\/50{background-color:hsl(var(--muted)/.5)}.bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.bg-pink-100{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.bg-pink-500{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity,1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\\/10{background-color:hsl(var(--primary)/.1)}.bg-purple-100{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-rose-500{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-sky-500{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity,1))}.bg-teal-500{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-violet-500{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\\/20{background-color:hsla(0,0%,100%,.2)}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-border{--tw-gradient-from:hsl(var(--border)) var(--tw-gradient-from-position);--tw-gradient-to:hsl(var(--border)/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-80\\%{--tw-gradient-via-position:80%}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-foreground{fill:hsl(var(--foreground))}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-center{-o-object-position:center;object-position:center}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-px{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-8{padding-right:2rem}.pr-px{padding-right:1px}.pt-0{padding-top:0}.pt-0\\.5{padding-top:.125rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.align-baseline{vertical-align:baseline}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\\[10px\\]{font-size:10px}.text-\\[9px\\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.text-background{color:hsl(var(--background))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.text-inherit{color:inherit}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.text-pink-600{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-white\\/60{color:hsla(0,0%,100%,.6)}.text-white\\/80{color:hsla(0,0%,100%,.8)}.text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-\\[0_0_4px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.3\\)\\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[0_0_4px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.3\\)\\]{--tw-shadow:0 0 4px rgba(0,0,0,.3);--tw-shadow-colored:0 0 4px var(--tw-shadow-color)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-0,.ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-primary{--tw-ring-color:hsl(var(--primary))}.ring-ring\\/50{--tw-ring-color:hsl(var(--ring)/0.5)}.ring-offset-2{--tw-ring-offset-width:2px}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-\\[color\\2c box-shadow\\]{transition-duration:.15s;transition-property:color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.yoopta-editor{background-color:hsl(var(--background));color:hsl(var(--foreground))}.yoopta-editor::-moz-selection{background:#c6ddf8}.yoopta-editor::selection{background:#c6ddf8}.yoopta-slate{outline:none}.yoopta-block{margin:2px 0;position:relative}.yoopta-block:before{background-color:#2383e224;border-radius:4px;height:100%;inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .2s;width:100%;z-index:0}.yoopta-block[data-block-selected=true]:before{background-color:#2383e224;content:\"\";opacity:1;transition:opacity .2s}.yoopta-placeholder{position:relative}.yoopta-placeholder:before{color:hsl(var(--foreground));content:attr(data-placeholder);font-size:75%;left:4px;opacity:.4;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.file\\:border-0::file-selector-button{border-width:0}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\\:border-b-0:last-child{border-bottom-width:0}.last\\:border-r-0:last-child{border-right-width:0}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-accent\\/50:hover{background-color:hsl(var(--accent)/.5)}.hover\\:bg-black\\/10:hover{background-color:rgba(0,0,0,.1)}.hover\\:bg-black\\/5:hover{background-color:rgba(0,0,0,.05)}.hover\\:bg-destructive\\/10:hover{background-color:hsl(var(--destructive)/.1)}.hover\\:bg-destructive\\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\\:bg-muted\\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\\:bg-muted\\/80:hover{background-color:hsl(var(--muted)/.8)}.hover\\:bg-primary\\/15:hover{background-color:hsl(var(--primary)/.15)}.hover\\:bg-primary\\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-destructive:hover{color:hsl(var(--destructive))}.hover\\:text-foreground:hover{color:hsl(var(--foreground))}.hover\\:text-primary\\/80:hover{color:hsl(var(--primary)/.8)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\\:ring-4:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\\:text-destructive:focus{color:hsl(var(--destructive))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-1:focus,.focus\\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:border-ring:focus-visible{border-color:hsl(var(--ring))}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:outline-1:focus-visible{outline-width:1px}.focus-visible\\:ring-0:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:hsl(var(--ring)/0.5)}.focus-visible\\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.focus-visible\\:ring-offset-background:focus-visible{--tw-ring-offset-color:hsl(var(--background))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:opacity-100,.group\\/code-block:hover .group-hover\\/code-block\\:opacity-100,.group\\/code-group-content:hover .group-hover\\/code-group-content\\:opacity-100,.group\\/file:hover .group-hover\\/file\\:opacity-100,.group\\/step:hover .group-hover\\/step\\:opacity-100,.group\\/steps-node:hover .group-hover\\/steps-node\\:opacity-100,.group\\/tab:hover .group-hover\\/tab\\:opacity-100{opacity:1}.peer:disabled~.peer-disabled\\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\\:opacity-70{opacity:.7}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal]{height:.375rem}.data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal],.data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical]{height:100%}.data-\\[size\\=default\\]\\:h-9[data-size=default]{height:2.25rem}.data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:2rem}.data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical]{min-height:11rem}.data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal]{width:100%}.data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical]{width:.375rem}.data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical]{width:auto}.data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical]{width:100%}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[state\\=checked\\]\\:translate-x-4[data-state=checked]{--tw-translate-x:1rem}.data-\\[state\\=checked\\]\\:translate-x-4[data-state=checked],.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{--tw-translate-x:0px}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\\[state\\=closed\\]\\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical]{flex-direction:column}.data-\\[align\\=start\\]\\:items-start[data-align=start]{align-items:flex-start}.data-\\[align\\=end\\]\\:items-end[data-align=end]{align-items:flex-end}.data-\\[align\\=center\\]\\:items-center[data-align=center]{align-items:center}.data-\\[state\\=active\\]\\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\\[state\\=checked\\]\\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\\[state\\=selected\\]\\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\\[state\\=unchecked\\]\\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\\[inset\\]\\:pl-8[data-inset]{padding-left:2rem}.data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:hsl(var(--muted-foreground))}.data-\\[state\\=active\\]\\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive]{color:hsl(var(--destructive))}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1[data-slot=select-value]>*{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box;overflow:hidden}.\\*\\:data-\\[slot\\=select-value\\]\\:flex[data-slot=select-value]>*{display:flex}.\\*\\:data-\\[slot\\=select-value\\]\\:items-center[data-slot=select-value]>*{align-items:center}.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2[data-slot=select-value]>*{gap:.5rem}.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10:focus[data-variant=destructive]{background-color:hsl(var(--destructive)/.1)}.data-\\[variant\\=destructive\\]\\:focus\\:text-destructive:focus[data-variant=destructive]{color:hsl(var(--destructive))}.dark\\:border-blue-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.dark\\:border-green-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.dark\\:border-red-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.dark\\:border-yellow-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.dark\\:bg-amber-900\\/30:is(.dark *){background-color:rgba(120,53,15,.3)}.dark\\:bg-blue-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}.dark\\:bg-blue-900\\/30:is(.dark *){background-color:rgba(30,58,138,.3)}.dark\\:bg-blue-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.dark\\:bg-cyan-900\\/30:is(.dark *){background-color:rgba(22,78,99,.3)}.dark\\:bg-gray-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:bg-gray-800\\/50:is(.dark *){background-color:rgba(31,41,55,.5)}.dark\\:bg-green-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}.dark\\:bg-green-900\\/30:is(.dark *){background-color:rgba(20,83,45,.3)}.dark\\:bg-green-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.dark\\:bg-input\\/30:is(.dark *){background-color:hsl(var(--input)/.3)}.dark\\:bg-orange-900\\/30:is(.dark *){background-color:rgba(124,45,18,.3)}.dark\\:bg-pink-900\\/30:is(.dark *){background-color:rgba(131,24,67,.3)}.dark\\:bg-purple-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity,1))}.dark\\:bg-purple-900\\/30:is(.dark *){background-color:rgba(88,28,135,.3)}.dark\\:bg-red-900\\/30:is(.dark *){background-color:rgba(127,29,29,.3)}.dark\\:bg-red-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.dark\\:bg-yellow-900\\/30:is(.dark *){background-color:rgba(113,63,18,.3)}.dark\\:bg-yellow-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.dark\\:text-amber-400:is(.dark *){--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.dark\\:text-blue-100:is(.dark *){--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.dark\\:text-blue-200:is(.dark *){--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}.dark\\:text-blue-400:is(.dark *){--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.dark\\:text-cyan-400:is(.dark *){--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.dark\\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.dark\\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.dark\\:text-green-100:is(.dark *){--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.dark\\:text-green-200:is(.dark *){--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}.dark\\:text-green-400:is(.dark *){--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.dark\\:text-orange-400:is(.dark *){--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.dark\\:text-pink-400:is(.dark *){--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}.dark\\:text-purple-200:is(.dark *){--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity,1))}.dark\\:text-purple-400:is(.dark *){--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.dark\\:text-red-100:is(.dark *){--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.dark\\:text-red-400:is(.dark *){--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.dark\\:text-yellow-100:is(.dark *){--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.dark\\:text-yellow-400:is(.dark *){--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.dark\\:hover\\:bg-input\\/50:hover:is(.dark *){background-color:hsl(var(--input)/.5)}.dark\\:hover\\:bg-white\\/10:hover:is(.dark *){background-color:hsla(0,0%,100%,.1)}.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:focus[data-variant=destructive]:is(.dark *){background-color:hsl(var(--destructive)/.2)}@media (min-width:768px){.md\\:basis-1\\/2{flex-basis:50%}.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:1024px){.lg\\:basis-1\\/3{flex-basis:33.333333%}.lg\\:text-5xl{font-size:3rem;line-height:1}}.\\[\\&\\:has\\(\\[role\\=checkbox\\]\\)\\]\\:pr-0:has([role=checkbox]){padding-right:0}.\\[\\&\\>\\[role\\=checkbox\\]\\]\\:translate-y-\\[2px\\]>[role=checkbox]{--tw-translate-y:2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&\\>div\\]\\:contents>div{display:contents}.\\[\\&\\>li\\]\\:mt-2>li{margin-top:.5rem}.\\[\\&\\>p\\]\\:m-0>p{margin:0}.\\[\\&\\>p\\]\\:text-sm>p{font-size:.875rem;line-height:1.25rem}.\\[\\&\\>tr\\]\\:last\\:border-b-0:last-child>tr{border-bottom-width:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){height:1rem;width:1rem}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'text-\\'\\]\\)\\]\\:text-muted-foreground svg:not([class*=text-]){color:hsl(var(--muted-foreground))}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_tr\\:first-child\\]\\:border-t tr:first-child{border-top-width:1px}.\\[\\&_tr\\]\\:border-b tr{border-bottom-width:1px}.\\[\\&_tr\\]\\:border-border tr{border-color:hsl(var(--border))}");export{r as AccordionUI,o as BlockquoteUI,e as CalloutUI,i as CodeUI,d as DividerUI,s as EmbedUI,c as FileUI,l as HeadingsUI,g as ImageUI,p as LinkUI,w as ListsUI,b as MentionUI,h as ParagraphUI,v as StepsUI,m as TableUI,x as TabsUI,f as VideoUI,y as applyTheme,y as default};
1
+ import{s as t}from"./chunks/style-inject.es-e87a8d02.js";import{AccordionUI as r}from"./accordion.js";import{BlockquoteUI as o}from"./blockquote.js";import{CalloutUI as e}from"./callout.js";import{CarouselUI as a}from"./carousel.js";import{CodeUI as i}from"./code.js";import{CodeGroupUI as n}from"./code-group.js";import{DividerUI as d}from"./divider.js";import{EmbedUI as s}from"./embed.js";import{FileUI as c}from"./file.js";import{HeadingsUI as l}from"./headings.js";import{ImageUI as g}from"./image.js";import{LinkUI as p}from"./link.js";import{ListsUI as w}from"./lists.js";import{MathInlineUI as b,MathBlockUI as h}from"./math.js";import{MentionUI as v}from"./mention.js";export{MentionDropdown}from"./mention.js";import{ParagraphUI as m}from"./paragraph.js";import{StepsUI as u}from"./steps.js";import{TableUI as x}from"./table.js";import{TableOfContentsUI as f}from"./table-of-contents.js";import{TabsUI as y}from"./tabs.js";import{VideoUI as k}from"./video.js";export{EmojiDropdown}from"./emoji.js";import"react/jsx-runtime";import"./chunks/_tslib-35bb891d.js";import"react";import"./chunks/index-17323747.js";import"react-dom";import"./chunks/index-91a5b8d5.js";import"./chunks/index-5b487f4e.js";import"./chunks/index-ff0e3962.js";import"./chunks/index-bd6363d4.js";import"./chunks/index-ce60ba41.js";import"./chunks/index-13505606.js";import"./chunks/utils-3345eade.js";import"@yoopta/editor";import"slate";import"./chunks/plus-840fe920.js";import"./chunks/createLucideIcon-8605f860.js";import"./chunks/trash-2-f36597ff.js";import"./chunks/chevron-down-28dfb290.js";import"@yoopta/ui/element-options";import"./chunks/button-f335deaa.js";import"./chunks/arrow-right-38c3a9bd.js";import"./chunks/card-05710740.js";import"@yoopta/code";import"./chunks/index-0bca29df.js";import"./chunks/language-select-ee2698cf.js";import"./chunks/select-a3724728.js";import"./chunks/index-056e5c06.js";import"./chunks/index-371259c9.js";import"./chunks/index-70f4e709.js";import"./chunks/Combination-575d4475.js";import"./chunks/index-1674c2c8.js";import"./chunks/check-06bd6a78.js";import"./chunks/chevron-up-9a13532e.js";import"./chunks/sparkles-ae42eae3.js";import"./chunks/tabs-370c3f2c.js";import"./chunks/index-a77c7d53.js";import"./chunks/x-9bfeb90f.js";import"./chunks/scroll-area-8321348a.js";import"./chunks/separator-f4e74aca.js";import"./chunks/index-a5cba5f7.js";import"@yoopta/embed";import"./chunks/input-b2431223.js";import"./chunks/index-87b75648.js";import"./chunks/code-d31bdce0.js";import"./chunks/play-998f23d2.js";import"./chunks/tooltip-5defff1d.js";import"./chunks/external-link-1579dd7f.js";import"@yoopta/file";import"./chunks/upload-b1dd210d.js";import"./chunks/file-text-ad3e3ebb.js";import"@yoopta/image";import"./chunks/label-35a74462.js";import"./chunks/popover-dae0ce5f.js";import"./chunks/settings-2-84fe63d9.js";import"./chunks/pen-d6258303.js";import"./chunks/hover-card-8048e9ce.js";import"@yoopta/lists";import"@yoopta/steps";import"./chunks/dropdown-menu-36750aec.js";import"@yoopta/table";import"@yoopta/ui/portal";import"@yoopta/table-of-contents";import"@yoopta/tabs";import"@yoopta/video";function j(t,j){const z={Accordion:r,Paragraph:m,Blockquote:o,Callout:e,Table:x,TableOfContents:f,Link:p,HeadingOne:l.HeadingOne,HeadingTwo:l.HeadingTwo,HeadingThree:l.HeadingThree,BulletedList:w.BulletedList,NumberedList:w.NumberedList,TodoList:w.TodoList,Image:g,Video:k,Code:i,Tabs:y,CodeGroup:n,Steps:u,Carousel:a,Divider:d,Embed:s,File:c,Mention:v,MathInline:b,MathBlock:h};return t.map(t=>{var r;const o=t.getPlugin.type,e=z[o];if(!e)return t;const a=null==j?void 0:j[o],i=null!==(r=null==a?void 0:a.elements)&&void 0!==r?r:e;return t.extend(Object.assign({elements:i},a&&{injectElementsFromPlugins:a.injectElementsFromPlugins,events:a.events,options:a.options}))})}t(".sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-bottom-12{bottom:-3rem}.-left-12{left:-3rem}.-right-12{right:-3rem}.-top-12{top:-3rem}.left-0{left:0}.left-1\\/2{left:50%}.left-2{left:.5rem}.right-0{right:0}.right-1{right:.25rem}.right-1\\.5{right:.375rem}.right-2{right:.5rem}.right-3{right:.75rem}.top-0{top:0}.top-1\\.5{top:.375rem}.top-1\\/2{top:50%}.top-2{top:.5rem}.top-\\[2\\.75rem\\]{top:2.75rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.m-0{margin:0}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.my-1{margin-bottom:.25rem;margin-top:.25rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.-ml-3\\.5{margin-left:-.875rem}.-ml-4{margin-left:-1rem}.-mt-4{margin-top:-1rem}.ml-1{margin-left:.25rem}.ml-3\\.5{margin-left:.875rem}.ml-6{margin-left:1.5rem}.ml-\\[-13px\\]{margin-left:-13px}.ml-auto{margin-left:auto}.mr-1\\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0{margin-top:0}.mt-0\\.5{margin-top:.125rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.line-clamp-2{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box;overflow:hidden}.\\!block{display:block!important}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.size-2{height:.5rem;width:.5rem}.size-2\\.5{height:.625rem;width:.625rem}.size-3\\.5{height:.875rem;width:.875rem}.size-4{height:1rem;width:1rem}.size-7{height:1.75rem;width:1.75rem}.size-8{height:2rem;width:2rem}.size-full{height:100%;width:100%}.h-10{height:2.5rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[1px\\]{height:1px}.h-\\[2px\\]{height:2px}.h-\\[calc\\(100\\%-2\\.75rem\\)\\]{height:calc(100% - 2.75rem)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-\\[200px\\]{max-height:200px}.max-h-\\[280px\\]{max-height:280px}.max-h-full{max-height:100%}.min-h-16{min-height:4rem}.min-h-\\[300px\\]{min-height:300px}.min-h-\\[40px\\]{min-height:40px}.min-h-\\[60px\\]{min-height:60px}.w-1\\.5{width:.375rem}.w-16{width:4rem}.w-2\\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\\[1px\\]{width:1px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\\[160px\\]{min-width:160px}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[200px\\]{min-width:200px}.min-w-\\[220px\\]{min-width:220px}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[320px\\]{max-width:320px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.table-fixed{table-layout:fixed}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y:0.5rem}.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{--tw-translate-y:calc(-50% - 2px)}.rotate-180,.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.rotate-45{--tw-rotate:45deg}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize-y{resize:vertical}.resize{resize:both}.scroll-m-20{scroll-margin:5rem}.scroll-my-1{scroll-margin-bottom:.25rem;scroll-margin-top:.25rem}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.125rem*var(--tw-space-y-reverse));margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.375rem*var(--tw-space-y-reverse));margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.text-balance{text-wrap:balance}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-b-lg{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-x-0{border-left-width:0;border-right-width:0}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0}.border-t{border-top-width:1px}.border-t-0{border-top-width:0}.border-t-2{border-top-width:2px}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-border{border-color:hsl(var(--border))}.border-border\\/50{border-color:hsl(var(--border)/.5)}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-input{border-color:hsl(var(--input))}.border-muted-foreground\\/20{border-color:hsl(var(--muted-foreground)/.2)}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-violet-500\\/40{border-color:rgba(139,92,246,.4)}.border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.bg-background{background-color:hsl(var(--background))}.bg-background\\/80{background-color:hsl(var(--background)/.8)}.bg-background\\/95{background-color:hsl(var(--background)/.95)}.bg-black\\/5{background-color:rgba(0,0,0,.05)}.bg-black\\/70{background-color:rgba(0,0,0,.7)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-border{background-color:hsl(var(--border))}.bg-border\\/70{background-color:hsl(var(--border)/.7)}.bg-card{background-color:hsl(var(--card))}.bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.bg-cyan-500{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\\/10{background-color:hsl(var(--destructive)/.1)}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.bg-foreground{background-color:hsl(var(--foreground))}.bg-fuchsia-500{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.bg-lime-500{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity,1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\\/10{background-color:hsl(var(--muted)/.1)}.bg-muted\\/20{background-color:hsl(var(--muted)/.2)}.bg-muted\\/30{background-color:hsl(var(--muted)/.3)}.bg-muted\\/50{background-color:hsl(var(--muted)/.5)}.bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.bg-pink-100{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.bg-pink-500{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity,1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\\/10{background-color:hsl(var(--primary)/.1)}.bg-purple-100{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-rose-500{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-sky-500{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity,1))}.bg-teal-500{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-violet-500{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}.bg-violet-500\\/10{background-color:rgba(139,92,246,.1)}.bg-violet-500\\/5{background-color:rgba(139,92,246,.05)}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\\/20{background-color:hsla(0,0%,100%,.2)}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-border{--tw-gradient-from:hsl(var(--border)) var(--tw-gradient-from-position);--tw-gradient-to:hsl(var(--border)/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-80\\%{--tw-gradient-via-position:80%}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-foreground{fill:hsl(var(--foreground))}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-center{-o-object-position:center;object-position:center}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-px{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\\.5{padding-bottom:.625rem;padding-top:.625rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-8{padding-right:2rem}.pr-px{padding-right:1px}.pt-0{padding-top:0}.pt-0\\.5{padding-top:.125rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.align-baseline{vertical-align:baseline}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\\[10px\\]{font-size:10px}.text-\\[9px\\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.text-background{color:hsl(var(--background))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.text-inherit{color:inherit}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.text-pink-600{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-white\\/60{color:hsla(0,0%,100%,.6)}.text-white\\/80{color:hsla(0,0%,100%,.8)}.text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-\\[0_0_4px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.3\\)\\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[0_0_4px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.3\\)\\]{--tw-shadow:0 0 4px rgba(0,0,0,.3);--tw-shadow-colored:0 0 4px var(--tw-shadow-color)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-0,.ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-primary{--tw-ring-color:hsl(var(--primary))}.ring-ring\\/50{--tw-ring-color:hsl(var(--ring)/0.5)}.ring-offset-2{--tw-ring-offset-width:2px}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-\\[color\\2c box-shadow\\]{transition-duration:.15s;transition-property:color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.yoopta-editor{background-color:hsl(var(--background));color:hsl(var(--foreground))}.yoopta-editor::-moz-selection{background:#c6ddf8}.yoopta-editor::selection{background:#c6ddf8}.yoopta-slate{outline:none}.yoopta-block{margin:2px 0;position:relative}.yoopta-block:before{background-color:#2383e224;border-radius:4px;height:100%;inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .2s;width:100%;z-index:0}.yoopta-block[data-block-selected=true]:before{background-color:#2383e224;content:\"\";opacity:1;transition:opacity .2s}.yoopta-placeholder{position:relative}.yoopta-placeholder:before{color:hsl(var(--foreground));content:attr(data-placeholder);font-size:75%;left:4px;opacity:.4;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.file\\:border-0::file-selector-button{border-width:0}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\\:border-b-0:last-child{border-bottom-width:0}.last\\:border-r-0:last-child{border-right-width:0}.hover\\:border-violet-500\\/30:hover{border-color:rgba(139,92,246,.3)}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-accent\\/50:hover{background-color:hsl(var(--accent)/.5)}.hover\\:bg-black\\/10:hover{background-color:rgba(0,0,0,.1)}.hover\\:bg-black\\/5:hover{background-color:rgba(0,0,0,.05)}.hover\\:bg-destructive\\/10:hover{background-color:hsl(var(--destructive)/.1)}.hover\\:bg-destructive\\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\\:bg-muted\\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\\:bg-muted\\/80:hover{background-color:hsl(var(--muted)/.8)}.hover\\:bg-primary\\/15:hover{background-color:hsl(var(--primary)/.15)}.hover\\:bg-primary\\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\\:bg-violet-500\\/15:hover{background-color:rgba(139,92,246,.15)}.hover\\:bg-violet-500\\/5:hover{background-color:rgba(139,92,246,.05)}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-destructive:hover{color:hsl(var(--destructive))}.hover\\:text-foreground:hover{color:hsl(var(--foreground))}.hover\\:text-primary\\/80:hover{color:hsl(var(--primary)/.8)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\\:ring-4:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\\:text-destructive:focus{color:hsl(var(--destructive))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-1:focus,.focus\\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:border-ring:focus-visible{border-color:hsl(var(--ring))}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:outline-1:focus-visible{outline-width:1px}.focus-visible\\:ring-0:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:hsl(var(--ring)/0.5)}.focus-visible\\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.focus-visible\\:ring-offset-background:focus-visible{--tw-ring-offset-color:hsl(var(--background))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:opacity-100,.group\\/code-block:hover .group-hover\\/code-block\\:opacity-100,.group\\/code-group-content:hover .group-hover\\/code-group-content\\:opacity-100,.group\\/file:hover .group-hover\\/file\\:opacity-100,.group\\/step:hover .group-hover\\/step\\:opacity-100,.group\\/steps-node:hover .group-hover\\/steps-node\\:opacity-100,.group\\/tab:hover .group-hover\\/tab\\:opacity-100{opacity:1}.peer:disabled~.peer-disabled\\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\\:opacity-70{opacity:.7}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal]{height:.375rem}.data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal],.data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical]{height:100%}.data-\\[size\\=default\\]\\:h-9[data-size=default]{height:2.25rem}.data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:2rem}.data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical]{min-height:11rem}.data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal]{width:100%}.data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical]{width:.375rem}.data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical]{width:auto}.data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical]{width:100%}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[state\\=checked\\]\\:translate-x-4[data-state=checked]{--tw-translate-x:1rem}.data-\\[state\\=checked\\]\\:translate-x-4[data-state=checked],.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{--tw-translate-x:0px}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\\[state\\=closed\\]\\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical]{flex-direction:column}.data-\\[align\\=start\\]\\:items-start[data-align=start]{align-items:flex-start}.data-\\[align\\=end\\]\\:items-end[data-align=end]{align-items:flex-end}.data-\\[align\\=center\\]\\:items-center[data-align=center]{align-items:center}.data-\\[state\\=active\\]\\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\\[state\\=checked\\]\\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\\[state\\=selected\\]\\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\\[state\\=unchecked\\]\\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\\[inset\\]\\:pl-8[data-inset]{padding-left:2rem}.data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:hsl(var(--muted-foreground))}.data-\\[state\\=active\\]\\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive]{color:hsl(var(--destructive))}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1[data-slot=select-value]>*{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box;overflow:hidden}.\\*\\:data-\\[slot\\=select-value\\]\\:flex[data-slot=select-value]>*{display:flex}.\\*\\:data-\\[slot\\=select-value\\]\\:items-center[data-slot=select-value]>*{align-items:center}.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2[data-slot=select-value]>*{gap:.5rem}.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10:focus[data-variant=destructive]{background-color:hsl(var(--destructive)/.1)}.data-\\[variant\\=destructive\\]\\:focus\\:text-destructive:focus[data-variant=destructive]{color:hsl(var(--destructive))}.dark\\:border-blue-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.dark\\:border-green-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.dark\\:border-red-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.dark\\:border-yellow-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.dark\\:bg-amber-900\\/30:is(.dark *){background-color:rgba(120,53,15,.3)}.dark\\:bg-blue-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}.dark\\:bg-blue-900\\/30:is(.dark *){background-color:rgba(30,58,138,.3)}.dark\\:bg-blue-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.dark\\:bg-cyan-900\\/30:is(.dark *){background-color:rgba(22,78,99,.3)}.dark\\:bg-gray-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:bg-gray-800\\/50:is(.dark *){background-color:rgba(31,41,55,.5)}.dark\\:bg-green-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}.dark\\:bg-green-900\\/30:is(.dark *){background-color:rgba(20,83,45,.3)}.dark\\:bg-green-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.dark\\:bg-input\\/30:is(.dark *){background-color:hsl(var(--input)/.3)}.dark\\:bg-orange-900\\/30:is(.dark *){background-color:rgba(124,45,18,.3)}.dark\\:bg-pink-900\\/30:is(.dark *){background-color:rgba(131,24,67,.3)}.dark\\:bg-purple-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity,1))}.dark\\:bg-purple-900\\/30:is(.dark *){background-color:rgba(88,28,135,.3)}.dark\\:bg-red-900\\/30:is(.dark *){background-color:rgba(127,29,29,.3)}.dark\\:bg-red-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.dark\\:bg-yellow-900\\/30:is(.dark *){background-color:rgba(113,63,18,.3)}.dark\\:bg-yellow-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.dark\\:text-amber-400:is(.dark *){--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.dark\\:text-blue-100:is(.dark *){--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.dark\\:text-blue-200:is(.dark *){--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}.dark\\:text-blue-400:is(.dark *){--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.dark\\:text-cyan-400:is(.dark *){--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.dark\\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.dark\\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.dark\\:text-green-100:is(.dark *){--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.dark\\:text-green-200:is(.dark *){--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}.dark\\:text-green-400:is(.dark *){--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.dark\\:text-orange-400:is(.dark *){--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.dark\\:text-pink-400:is(.dark *){--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}.dark\\:text-purple-200:is(.dark *){--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity,1))}.dark\\:text-purple-400:is(.dark *){--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.dark\\:text-red-100:is(.dark *){--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.dark\\:text-red-400:is(.dark *){--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.dark\\:text-violet-300:is(.dark *){--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.dark\\:text-yellow-100:is(.dark *){--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.dark\\:text-yellow-400:is(.dark *){--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.dark\\:hover\\:bg-input\\/50:hover:is(.dark *){background-color:hsl(var(--input)/.5)}.dark\\:hover\\:bg-white\\/10:hover:is(.dark *){background-color:hsla(0,0%,100%,.1)}.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:focus[data-variant=destructive]:is(.dark *){background-color:hsl(var(--destructive)/.2)}@media (min-width:768px){.md\\:basis-1\\/2{flex-basis:50%}.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:1024px){.lg\\:basis-1\\/3{flex-basis:33.333333%}.lg\\:text-5xl{font-size:3rem;line-height:1}}.\\[\\&\\:has\\(\\[role\\=checkbox\\]\\)\\]\\:pr-0:has([role=checkbox]){padding-right:0}.\\[\\&\\>\\[role\\=checkbox\\]\\]\\:translate-y-\\[2px\\]>[role=checkbox]{--tw-translate-y:2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&\\>div\\]\\:contents>div{display:contents}.\\[\\&\\>li\\]\\:mt-2>li{margin-top:.5rem}.\\[\\&\\>p\\]\\:m-0>p{margin:0}.\\[\\&\\>p\\]\\:text-sm>p{font-size:.875rem;line-height:1.25rem}.\\[\\&\\>tr\\]\\:last\\:border-b-0:last-child>tr{border-bottom-width:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){height:1rem;width:1rem}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'text-\\'\\]\\)\\]\\:text-muted-foreground svg:not([class*=text-]){color:hsl(var(--muted-foreground))}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_tr\\:first-child\\]\\:border-t tr:first-child{border-top-width:1px}.\\[\\&_tr\\]\\:border-b tr{border-bottom-width:1px}.\\[\\&_tr\\]\\:border-border tr{border-color:hsl(var(--border))}");export{r as AccordionUI,o as BlockquoteUI,e as CalloutUI,i as CodeUI,d as DividerUI,s as EmbedUI,c as FileUI,l as HeadingsUI,g as ImageUI,p as LinkUI,w as ListsUI,h as MathBlockUI,b as MathInlineUI,v as MentionUI,m as ParagraphUI,u as StepsUI,x as TableUI,y as TabsUI,k as VideoUI,j as applyTheme,j as default};
package/dist/link.js CHANGED
@@ -1,7 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as s,useRef as n,useEffect as r}from"react";import{useYooptaReadOnly as a,useYooptaEditor as i,Elements as o}from"@yoopta/editor";import{C as l,c}from"./chunks/index-0bca29df.js";import{Text as p}from"slate";import{B as d}from"./chunks/button-7aec29d6.js";import{I as u}from"./chunks/input-b2431223.js";import{L as m}from"./chunks/label-21d46c31.js";import{T as h}from"./chunks/trash-2-f36597ff.js";import{E as g}from"./chunks/external-link-1579dd7f.js";import{C as k}from"./chunks/check-06bd6a78.js";import{c as v}from"./chunks/createLucideIcon-8605f860.js";import{H as x,a as f,b as j}from"./chunks/hover-card-d6a71398.js";import"./chunks/_tslib-35bb891d.js";import"./chunks/utils-3345eade.js";import"react-dom";import"./chunks/index-a5cba5f7.js";import"./chunks/index-91a5b8d5.js";import"./chunks/index-17323747.js";import"./chunks/index-ff0e3962.js";import"./chunks/index-23c7fb16.js";import"./chunks/index-70f4e709.js";import"./chunks/index-23db6fea.js";
2
- /**
3
- * @license lucide-react v0.294.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */const b=v("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]),y=({textInputRef:s,urlInputRef:n,editedText:r,editedUrl:a,onChangeText:i,onChangeUrl:o,onKeyDown:l,saveEdit:c,cancelEdit:p,deleteLink:g})=>e("div",Object.assign({className:"p-2 space-y-2"},{children:[e("div",Object.assign({className:"space-y-1"},{children:[t(m,Object.assign({htmlFor:"link-text",className:"text-xs"},{children:"Link text"})),t(u,{id:"link-text",ref:s,value:r,onChange:i,placeholder:"Link text...",className:"h-8 text-sm",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})]})),e("div",Object.assign({className:"space-y-1"},{children:[t(m,Object.assign({htmlFor:"link-url",className:"text-xs"},{children:"URL"})),t(u,{id:"link-url",ref:n,value:a,onChange:o,onKeyDown:l,placeholder:"Enter URL...",className:"h-8 text-sm",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})]})),e("div",Object.assign({className:"flex justify-between items-center"},{children:[e("div",Object.assign({className:"flex items-center gap-2"},{children:[t(d,Object.assign({size:"sm",variant:"default",className:"h-7 text-xs",onClick:c,disabled:0===a.length||0===r.length},{children:"Save"})),t(d,Object.assign({size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:p},{children:"Cancel"}))]})),t(d,Object.assign({size:"sm",variant:"ghost",className:"h-7 text-xs text-destructive hover:text-destructive hover:bg-destructive/10",onClick:g},{children:t(h,{className:"h-3.5 w-3.5"})}))]}))]})),N=({element:s,openLink:n,copyUrl:r,openEdit:i,copied:o})=>{var c;const p=a();return t("div",Object.assign({className:"px-2 py-1"},{children:e("div",Object.assign({className:"flex items-center gap-1"},{children:[t("div",Object.assign({className:"flex-1 min-w-0"},{children:t("div",Object.assign({className:"text-sm truncate text-foreground"},{children:null!==(c=s.props.url)&&void 0!==c?c:"No URL"}))})),t("div",{className:"h-4 w-px bg-border"}),t(d,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:n,disabled:!s.props.url,title:"Open link"},{children:t(g,{className:"h-3.5 w-3.5"})})),t(d,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:r,disabled:!s.props.url,title:o?"Copied!":"Copy URL"},{children:t(o?k:l,{className:"h-3.5 w-3.5"})})),!p&&t(d,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:i,title:"Edit URL"},{children:t(b,{className:"h-3.5 w-3.5"})}))]}))}))},O=e=>{var t;if(p.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const s=e.children;return null!==(t=null==s?void 0:s.map(O).join(""))&&void 0!==t?t:""}return""},C={link:{render:a=>{var l;const{attributes:p,children:d,element:u,blockId:m}=a,h=i(),g=O(u),[k,v]=s(!1),[b,C]=s(null!==(l=u.props.url)&&void 0!==l?l:""),[w,D]=s(g),[E,P]=s(!1),L=n(null),I=n(null);r(()=>{var e;C(null!==(e=u.props.url)&&void 0!==e?e:""),D(g)},[u.props.url,g]),r(()=>{k&&L.current&&(L.current.focus(),L.current.select())},[k]);return e(x,Object.assign({openDelay:100,closeDelay:100},{children:[t(f,Object.assign({asChild:!0},{children:t("a",Object.assign({},p,{href:u.props.url||void 0,target:u.props.target,rel:u.props.rel,title:u.props.title||void 0,className:"text-primary font-medium underline underline-offset-4 cursor-pointer hover:text-primary/80 transition-colors",contentEditable:!1,onClick:e=>{k&&e.preventDefault()}},{children:d}))})),t(j,Object.assign({className:"w-80 p-0",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:!h.readOnly&&k?t(y,{textInputRef:I,urlInputRef:L,editedText:w,editedUrl:b,onChangeText:e=>D(e.target.value),onChangeUrl:e=>C(e.target.value),onKeyDown:e=>{var t;"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),o.updateElement(h,{blockId:m,type:"link",text:w,props:{url:b}}),v(!1)):"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),C(null!==(t=u.props.url)&&void 0!==t?t:""),D(g),v(!1))},saveEdit:e=>{if(h.readOnly)return;e.preventDefault(),e.stopPropagation();const t=o.getElementPath(h,{blockId:m,element:u});t&&(o.updateElement(h,{blockId:m,type:"link",text:w,path:t,props:{url:b}}),v(!1))},cancelEdit:e=>{var t;h.readOnly||(e.preventDefault(),e.stopPropagation(),C(null!==(t=u.props.url)&&void 0!==t?t:""),D(g),v(!1))},deleteLink:e=>{if(h.readOnly)return;e.preventDefault(),e.stopPropagation();const t=o.getElementPath(h,{blockId:m,element:u});t&&(o.deleteElement(h,{mode:"unwrap",type:"link",path:t,blockId:m}),v(!1))}}):t(N,{element:u,openLink:e=>{var t;e.preventDefault(),e.stopPropagation(),u.props.url&&window.open(u.props.url,null!==(t=u.props.target)&&void 0!==t?t:"_blank",u.props.rel)},copyUrl:e=>{if(e.preventDefault(),e.stopPropagation(),u.props.url){c(u.props.url)&&(P(!0),setTimeout(()=>P(!1),1500))}},openEdit:e=>{h.readOnly||(e.preventDefault(),e.stopPropagation(),v(!0))},copied:E})}))]}))}}};export{C as LinkUI};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as s,useRef as n,useEffect as r}from"react";import{useYooptaReadOnly as a,useYooptaEditor as i,Elements as o}from"@yoopta/editor";import{C as l,c}from"./chunks/index-0bca29df.js";import{Text as p}from"slate";import{B as d}from"./chunks/button-f335deaa.js";import{I as u}from"./chunks/input-b2431223.js";import{L as m}from"./chunks/label-35a74462.js";import{T as h}from"./chunks/trash-2-f36597ff.js";import{E as g}from"./chunks/external-link-1579dd7f.js";import{C as k}from"./chunks/check-06bd6a78.js";import{P as v}from"./chunks/pen-d6258303.js";import{H as x,a as f,b as j}from"./chunks/hover-card-8048e9ce.js";import"./chunks/createLucideIcon-8605f860.js";import"./chunks/_tslib-35bb891d.js";import"./chunks/utils-3345eade.js";import"react-dom";import"./chunks/index-a5cba5f7.js";import"./chunks/index-91a5b8d5.js";import"./chunks/index-17323747.js";import"./chunks/index-ff0e3962.js";import"./chunks/index-371259c9.js";import"./chunks/index-70f4e709.js";import"./chunks/index-bd6363d4.js";const b=({textInputRef:s,urlInputRef:n,editedText:r,editedUrl:a,onChangeText:i,onChangeUrl:o,onKeyDown:l,saveEdit:c,cancelEdit:p,deleteLink:g})=>e("div",Object.assign({className:"p-2 space-y-2"},{children:[e("div",Object.assign({className:"space-y-1"},{children:[t(m,Object.assign({htmlFor:"link-text",className:"text-xs"},{children:"Link text"})),t(u,{id:"link-text",ref:s,value:r,onChange:i,placeholder:"Link text...",className:"h-8 text-sm",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})]})),e("div",Object.assign({className:"space-y-1"},{children:[t(m,Object.assign({htmlFor:"link-url",className:"text-xs"},{children:"URL"})),t(u,{id:"link-url",ref:n,value:a,onChange:o,onKeyDown:l,placeholder:"Enter URL...",className:"h-8 text-sm",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})]})),e("div",Object.assign({className:"flex justify-between items-center"},{children:[e("div",Object.assign({className:"flex items-center gap-2"},{children:[t(d,Object.assign({size:"sm",variant:"default",className:"h-7 text-xs",onClick:c,disabled:0===a.length||0===r.length},{children:"Save"})),t(d,Object.assign({size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:p},{children:"Cancel"}))]})),t(d,Object.assign({size:"sm",variant:"ghost",className:"h-7 text-xs text-destructive hover:text-destructive hover:bg-destructive/10",onClick:g},{children:t(h,{className:"h-3.5 w-3.5"})}))]}))]})),y=({element:s,openLink:n,copyUrl:r,openEdit:i,copied:o})=>{var c;const p=a();return t("div",Object.assign({className:"px-2 py-1"},{children:e("div",Object.assign({className:"flex items-center gap-1"},{children:[t("div",Object.assign({className:"flex-1 min-w-0"},{children:t("div",Object.assign({className:"text-sm truncate text-foreground"},{children:null!==(c=s.props.url)&&void 0!==c?c:"No URL"}))})),t("div",{className:"h-4 w-px bg-border"}),t(d,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:n,disabled:!s.props.url,title:"Open link"},{children:t(g,{className:"h-3.5 w-3.5"})})),t(d,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:r,disabled:!s.props.url,title:o?"Copied!":"Copy URL"},{children:t(o?k:l,{className:"h-3.5 w-3.5"})})),!p&&t(d,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:i,title:"Edit URL"},{children:t(v,{className:"h-3.5 w-3.5"})}))]}))}))},N=e=>{var t;if(p.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const s=e.children;return null!==(t=null==s?void 0:s.map(N).join(""))&&void 0!==t?t:""}return""},O={link:{render:a=>{var l;const{attributes:p,children:d,element:u,blockId:m}=a,h=i(),g=N(u),[k,v]=s(!1),[O,C]=s(null!==(l=u.props.url)&&void 0!==l?l:""),[w,E]=s(g),[D,P]=s(!1),L=n(null),I=n(null);r(()=>{var e;C(null!==(e=u.props.url)&&void 0!==e?e:""),E(g)},[u.props.url,g]),r(()=>{k&&L.current&&(L.current.focus(),L.current.select())},[k]);return e(x,Object.assign({openDelay:100,closeDelay:100},{children:[t(f,Object.assign({asChild:!0},{children:t("a",Object.assign({},p,{href:u.props.url||void 0,target:u.props.target,rel:u.props.rel,title:u.props.title||void 0,className:"text-primary font-medium underline underline-offset-4 cursor-pointer hover:text-primary/80 transition-colors",contentEditable:!1,onClick:e=>{k&&e.preventDefault()}},{children:d}))})),t(j,Object.assign({className:"w-80 p-0",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:!h.readOnly&&k?t(b,{textInputRef:I,urlInputRef:L,editedText:w,editedUrl:O,onChangeText:e=>E(e.target.value),onChangeUrl:e=>C(e.target.value),onKeyDown:e=>{var t;"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),o.updateElement(h,{blockId:m,type:"link",text:w,props:{url:O}}),v(!1)):"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),C(null!==(t=u.props.url)&&void 0!==t?t:""),E(g),v(!1))},saveEdit:e=>{if(h.readOnly)return;e.preventDefault(),e.stopPropagation();const t=o.getElementPath(h,{blockId:m,element:u});t&&(o.updateElement(h,{blockId:m,type:"link",text:w,path:t,props:{url:O}}),v(!1))},cancelEdit:e=>{var t;h.readOnly||(e.preventDefault(),e.stopPropagation(),C(null!==(t=u.props.url)&&void 0!==t?t:""),E(g),v(!1))},deleteLink:e=>{if(h.readOnly)return;e.preventDefault(),e.stopPropagation();const t=o.getElementPath(h,{blockId:m,element:u});t&&(o.deleteElement(h,{mode:"unwrap",type:"link",path:t,blockId:m}),v(!1))}}):t(y,{element:u,openLink:e=>{var t;e.preventDefault(),e.stopPropagation(),u.props.url&&window.open(u.props.url,null!==(t=u.props.target)&&void 0!==t?t:"_blank",u.props.rel)},copyUrl:e=>{if(e.preventDefault(),e.stopPropagation(),u.props.url){c(u.props.url)&&(P(!0),setTimeout(()=>P(!1),1500))}},openEdit:e=>{h.readOnly||(e.preventDefault(),e.stopPropagation(),v(!0))},copied:D})}))]}))}}};export{O as LinkUI};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type MathEditProps = {
3
+ textareaRef: React.RefObject<HTMLTextAreaElement>;
4
+ editedLatex: string;
5
+ onChangeLatex: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
6
+ onKeyDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
7
+ saveEdit: (e: React.MouseEvent) => void;
8
+ cancelEdit: (e: React.MouseEvent) => void;
9
+ deleteMath: (e: React.MouseEvent) => void;
10
+ };
11
+ export declare const MathEdit: ({ textareaRef, editedLatex, onChangeLatex, onKeyDown, saveEdit, cancelEdit, deleteMath, }: MathEditProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=math-edit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math-edit.d.ts","sourceRoot":"","sources":["../../../../src/math/elements/math/math-edit.tsx"],"names":[],"mappings":";AAMA,KAAK,aAAa,GAAG;IACnB,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACnE,SAAS,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACjE,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACxC,UAAU,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC1C,UAAU,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,QAAQ,8FAQlB,aAAa,4CAyEf,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PluginElementRenderProps } from '@yoopta/editor';
2
+ export declare const MathElement: (props: PluginElementRenderProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=math-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math-element.d.ts","sourceRoot":"","sources":["../../../../src/math/elements/math/math-element.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAW/D,eAAO,MAAM,WAAW,UAAW,wBAAwB,4CAkL1D,CAAC"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ type MathPreviewProps = {
3
+ latex: string;
4
+ openEdit: (e: React.MouseEvent) => void;
5
+ copyLatex: (e: React.MouseEvent) => void;
6
+ copied: boolean;
7
+ };
8
+ export declare const MathPreview: ({ latex, openEdit, copyLatex, copied, }: MathPreviewProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=math-preview.d.ts.map