UNPKG

@bettaibi/react-blocknote

Version:

A modern, versatile rich text editor component for React applications with an elegant UI and Notion-like functionality. Supports both React 18 and React 19.

2 lines (1 loc) 19.3 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./blocknote-pWdOw1PK.cjs"),t=require("react"),s=require("@radix-ui/react-popover"),n=require("@radix-ui/react-dropdown-menu");function o(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const s in e)if("default"!==s){const n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:()=>e[s]})}return t.default=e,Object.freeze(t)}const i=o(s),r=o(n),c=e.createLucideIcon("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),l=e.createLucideIcon("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),a=e.createLucideIcon("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),x=e.createLucideIcon("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),u=e.createLucideIcon("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),d=e.createLucideIcon("columns-2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]),m=e.createLucideIcon("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"}]]),p=e.createLucideIcon("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),j=e.createLucideIcon("rows-3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]),h=e.createLucideIcon("subscript",[["path",{d:"m4 5 8 8",key:"1eunvl"}],["path",{d:"m12 5-8 8",key:"1ah0jp"}],["path",{d:"M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07",key:"e8ta8j"}]]),b=e.createLucideIcon("superscript",[["path",{d:"m4 19 8-8",key:"hr47gm"}],["path",{d:"m12 19-8-8",key:"1dhhmo"}],["path",{d:"M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06",key:"1dfcux"}]]),R=e.createLucideIcon("table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]),k=e.createLucideIcon("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function E({editor:s}){const[n,o]=t.useState(""),[r,c]=t.useState(""),[l,a]=t.useState(!1),x=t.useRef(null);return t.useEffect((()=>{l&&x.current&&setTimeout((()=>{var e;null==(e=x.current)||e.focus()}),100);const e=document.querySelector(".blocknote-toolbar");e&&(l?e.classList.add("is-dropdown-active"):e.classList.remove("is-dropdown-active"))}),[l]),e.jsxRuntimeExports.jsxs(i.Root,{open:l,onOpenChange:a,children:[e.jsxRuntimeExports.jsx(i.Trigger,{asChild:!0,children:e.jsxRuntimeExports.jsx("button",{type:"button",className:s.isActive("image")?"is-active":"",title:"Insert Image",children:e.jsxRuntimeExports.jsx(m,{size:20})})}),e.jsxRuntimeExports.jsx(i.Portal,{children:e.jsxRuntimeExports.jsxs(i.Content,{className:"blocknote-popover",sideOffset:5,align:"start",alignOffset:-5,onInteractOutside:e=>{e.target&&e.target.closest(".blocknote-popover-content")&&e.preventDefault()},children:[e.jsxRuntimeExports.jsxs("div",{className:"blocknote-popover-content",children:[e.jsxRuntimeExports.jsx("h3",{className:"blocknote-popover-title",children:"Insert Image"}),e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsxs("div",{className:"blocknote-form-field",children:[e.jsxRuntimeExports.jsx("label",{className:"blocknote-form-label",htmlFor:"image-url",children:"Image URL"}),e.jsxRuntimeExports.jsx("input",{id:"image-url",ref:x,type:"url",value:n,onChange:e=>o(e.target.value),className:"blocknote-form-input",placeholder:"https://example.com/image.jpg",required:!0})]}),e.jsxRuntimeExports.jsxs("div",{className:"blocknote-form-field",children:[e.jsxRuntimeExports.jsx("label",{className:"blocknote-form-label",htmlFor:"image-alt",children:"Alt Text (optional)"}),e.jsxRuntimeExports.jsx("input",{id:"image-alt",type:"text",value:r,onChange:e=>c(e.target.value),className:"blocknote-form-input",placeholder:"Image description"})]}),e.jsxRuntimeExports.jsxs("div",{className:"blocknote-form-actions",children:[e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>a(!1),className:"blocknote-form-button blocknote-form-button-cancel",children:"Cancel"}),e.jsxRuntimeExports.jsx("button",{type:"button",className:"blocknote-form-button blocknote-form-button-submit",onClick:e=>{e.preventDefault(),n&&(s.chain().focus().setImage({src:n,alt:r}).run(),o(""),c(""),a(!1))},children:"Insert Image"})]})]})]}),e.jsxRuntimeExports.jsx(i.Arrow,{className:"blocknote-popover-arrow"})]})})]})}function g({editor:s}){const[n,o]=t.useState(""),[r,c]=t.useState(""),[l,a]=t.useState(!1),x=t.useRef(null);return t.useEffect((()=>{l&&x.current&&setTimeout((()=>{var e;null==(e=x.current)||e.focus()}),100);const e=document.querySelector(".blocknote-toolbar");e&&(l?e.classList.add("is-dropdown-active"):e.classList.remove("is-dropdown-active"))}),[l]),e.jsxRuntimeExports.jsxs(i.Root,{open:l,onOpenChange:a,children:[e.jsxRuntimeExports.jsx(i.Trigger,{asChild:!0,children:e.jsxRuntimeExports.jsx("button",{type:"button",className:s.isActive("link")?"is-active":"",title:"Insert Link",children:e.jsxRuntimeExports.jsx(p,{size:20})})}),e.jsxRuntimeExports.jsx(i.Portal,{children:e.jsxRuntimeExports.jsxs(i.Content,{className:"blocknote-popover",sideOffset:5,align:"start",alignOffset:-5,onInteractOutside:e=>{e.target&&e.target.closest(".blocknote-popover-content")&&e.preventDefault()},children:[e.jsxRuntimeExports.jsxs("div",{className:"blocknote-popover-content",children:[e.jsxRuntimeExports.jsx("h3",{className:"blocknote-popover-title",children:"Insert Link"}),e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsxs("div",{className:"blocknote-form-field",children:[e.jsxRuntimeExports.jsx("label",{className:"blocknote-form-label",htmlFor:"link-url",children:"URL"}),e.jsxRuntimeExports.jsx("input",{id:"link-url",ref:x,type:"url",value:n,onChange:e=>o(e.target.value),className:"blocknote-form-input",placeholder:"https://example.com",required:!0})]}),e.jsxRuntimeExports.jsxs("div",{className:"blocknote-form-field",children:[e.jsxRuntimeExports.jsx("label",{className:"blocknote-form-label",htmlFor:"link-text",children:"Text (optional)"}),e.jsxRuntimeExports.jsx("input",{id:"link-text",type:"text",value:r,onChange:e=>c(e.target.value),className:"blocknote-form-input",placeholder:"Link text"})]}),e.jsxRuntimeExports.jsxs("div",{className:"blocknote-form-actions",children:[e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>a(!1),className:"blocknote-form-button blocknote-form-button-cancel",children:"Cancel"}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:e=>{e.preventDefault(),n&&(s.chain().focus().extendMarkRange("link").setLink({href:n}).run(),o(""),c(""),a(!1))},className:"blocknote-form-button blocknote-form-button-submit",children:"Add Link"})]})]})]}),e.jsxRuntimeExports.jsx(i.Arrow,{className:"blocknote-popover-arrow"})]})})]})}function f({editor:s}){const[n,o]=t.useState(!1);return t.useEffect((()=>{const e=document.querySelector(".blocknote-toolbar");e&&(n?e.classList.add("is-dropdown-active"):e.classList.remove("is-dropdown-active"))}),[n]),e.jsxRuntimeExports.jsxs(r.Root,{open:n,onOpenChange:o,children:[e.jsxRuntimeExports.jsx(r.Trigger,{asChild:!0,children:e.jsxRuntimeExports.jsx("button",{type:"button",className:s.isActive("table")||s.can().addColumnAfter()||s.can().addRowAfter()||s.can().deleteTable()?"is-active":"",title:"Table Options",children:e.jsxRuntimeExports.jsxs("div",{className:"table-button-content",children:[e.jsxRuntimeExports.jsx(R,{size:20}),e.jsxRuntimeExports.jsx(u,{size:14,className:"dropdown-caret"})]})})}),e.jsxRuntimeExports.jsx(r.Portal,{children:e.jsxRuntimeExports.jsxs(r.Content,{className:"blocknote-dropdown",sideOffset:5,align:"start",alignOffset:-5,children:[e.jsxRuntimeExports.jsxs(r.Item,{className:"blocknote-dropdown-item",onClick:()=>s.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run(),disabled:s.isActive("table"),children:[e.jsxRuntimeExports.jsx(R,{size:16}),e.jsxRuntimeExports.jsx("span",{children:"Insert Table"})]}),e.jsxRuntimeExports.jsx(r.Separator,{className:"blocknote-dropdown-separator"}),e.jsxRuntimeExports.jsxs(r.Item,{className:"blocknote-dropdown-item",onClick:()=>s.chain().focus().addColumnBefore().run(),disabled:!s.can().addColumnBefore(),children:[e.jsxRuntimeExports.jsx(l,{size:16}),e.jsxRuntimeExports.jsx("span",{children:"Add Column Before"})]}),e.jsxRuntimeExports.jsxs(r.Item,{className:"blocknote-dropdown-item",onClick:()=>s.chain().focus().addColumnAfter().run(),disabled:!s.can().addColumnAfter(),children:[e.jsxRuntimeExports.jsx(a,{size:16}),e.jsxRuntimeExports.jsx("span",{children:"Add Column After"})]}),e.jsxRuntimeExports.jsxs(r.Item,{className:"blocknote-dropdown-item",onClick:()=>s.chain().focus().deleteColumn().run(),disabled:!s.can().deleteColumn(),children:[e.jsxRuntimeExports.jsx(d,{size:16}),e.jsxRuntimeExports.jsx("span",{children:"Delete Column"})]}),e.jsxRuntimeExports.jsx(r.Separator,{className:"blocknote-dropdown-separator"}),e.jsxRuntimeExports.jsxs(r.Item,{className:"blocknote-dropdown-item",onClick:()=>s.chain().focus().addRowBefore().run(),disabled:!s.can().addRowBefore(),children:[e.jsxRuntimeExports.jsx(x,{size:16}),e.jsxRuntimeExports.jsx("span",{children:"Add Row Before"})]}),e.jsxRuntimeExports.jsxs(r.Item,{className:"blocknote-dropdown-item",onClick:()=>s.chain().focus().addRowAfter().run(),disabled:!s.can().addRowAfter(),children:[e.jsxRuntimeExports.jsx(c,{size:16}),e.jsxRuntimeExports.jsx("span",{children:"Add Row After"})]}),e.jsxRuntimeExports.jsxs(r.Item,{className:"blocknote-dropdown-item",onClick:()=>s.chain().focus().deleteRow().run(),disabled:!s.can().deleteRow(),children:[e.jsxRuntimeExports.jsx(j,{size:16}),e.jsxRuntimeExports.jsx("span",{children:"Delete Row"})]}),e.jsxRuntimeExports.jsx(r.Separator,{className:"blocknote-dropdown-separator"}),e.jsxRuntimeExports.jsxs(r.Item,{className:"blocknote-dropdown-item blocknote-dropdown-item-danger",onClick:()=>s.chain().focus().deleteTable().run(),disabled:!s.can().deleteTable(),children:[e.jsxRuntimeExports.jsx(k,{size:16}),e.jsxRuntimeExports.jsx("span",{children:"Delete Table"})]}),e.jsxRuntimeExports.jsx(r.Arrow,{className:"blocknote-dropdown-arrow"})]})})]})}function v({editor:s}){const[n,o]=t.useState(!1);return t.useEffect((()=>{const e=document.querySelector(".blocknote-toolbar");e&&(n?e.classList.add("is-dropdown-active"):e.classList.remove("is-dropdown-active"))}),[n]),e.jsxRuntimeExports.jsxs(r.Root,{open:n,onOpenChange:o,children:[e.jsxRuntimeExports.jsx(r.Trigger,{asChild:!0,children:e.jsxRuntimeExports.jsx("button",{type:"button",className:s.isActive("heading")?"is-active":"",title:"Headings",children:e.jsxRuntimeExports.jsxs("div",{className:"heading-button-content",children:[e.jsxRuntimeExports.jsx(e.Type,{size:20}),e.jsxRuntimeExports.jsx(u,{size:14,className:"dropdown-caret"})]})})}),e.jsxRuntimeExports.jsx(r.Portal,{children:e.jsxRuntimeExports.jsxs(r.Content,{className:"blocknote-dropdown",sideOffset:5,align:"start",alignOffset:-5,children:[e.jsxRuntimeExports.jsxs(r.Item,{className:"blocknote-dropdown-item",onClick:()=>s.chain().focus().toggleHeading({level:1}).run(),children:[e.jsxRuntimeExports.jsx(e.Heading1,{size:16}),e.jsxRuntimeExports.jsx("span",{children:"Heading 1"})]}),e.jsxRuntimeExports.jsxs(r.Item,{className:"blocknote-dropdown-item",onClick:()=>s.chain().focus().toggleHeading({level:2}).run(),children:[e.jsxRuntimeExports.jsx(e.Heading2,{size:16}),e.jsxRuntimeExports.jsx("span",{children:"Heading 2"})]}),e.jsxRuntimeExports.jsxs(r.Item,{className:"blocknote-dropdown-item",onClick:()=>s.chain().focus().toggleHeading({level:3}).run(),children:[e.jsxRuntimeExports.jsx(e.Heading3,{size:16}),e.jsxRuntimeExports.jsx("span",{children:"Heading 3"})]}),e.jsxRuntimeExports.jsxs(r.Item,{className:"blocknote-dropdown-item",onClick:()=>s.chain().focus().toggleHeading({level:4}).run(),children:[e.jsxRuntimeExports.jsx(e.Heading4,{size:16}),e.jsxRuntimeExports.jsx("span",{children:"Heading 4"})]}),e.jsxRuntimeExports.jsxs(r.Item,{className:"blocknote-dropdown-item",onClick:()=>s.chain().focus().toggleHeading({level:5}).run(),children:[e.jsxRuntimeExports.jsx(e.Heading5,{size:16}),e.jsxRuntimeExports.jsx("span",{children:"Heading 5"})]}),e.jsxRuntimeExports.jsxs(r.Item,{className:"blocknote-dropdown-item",onClick:()=>s.chain().focus().toggleHeading({level:6}).run(),children:[e.jsxRuntimeExports.jsx(e.Heading6,{size:16}),e.jsxRuntimeExports.jsx("span",{children:"Heading 6"})]}),e.jsxRuntimeExports.jsx(r.Separator,{className:"blocknote-dropdown-separator"}),e.jsxRuntimeExports.jsx(r.Item,{className:"blocknote-dropdown-item",onClick:()=>s.chain().focus().setParagraph().run(),children:e.jsxRuntimeExports.jsx("span",{children:"Normal Text"})}),e.jsxRuntimeExports.jsx(r.Arrow,{className:"blocknote-dropdown-arrow"})]})})]})}function y({editor:t}){return t?e.jsxRuntimeExports.jsx("div",{className:"blocknote-toolbar",children:e.jsxRuntimeExports.jsxs("div",{className:"blocknote-toolbar-main",children:[e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().undo().run(),disabled:!t.can().chain().focus().undo().run(),title:"Undo",children:e.jsxRuntimeExports.jsx(e.Undo,{size:20})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().redo().run(),disabled:!t.can().chain().focus().redo().run(),title:"Redo",children:e.jsxRuntimeExports.jsx(e.Redo,{size:20})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleBold().run(),className:t.isActive("bold")?"is-active":"",title:"Bold",children:e.jsxRuntimeExports.jsx(e.Bold,{size:20})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleItalic().run(),className:t.isActive("italic")?"is-active":"",title:"Italic",children:e.jsxRuntimeExports.jsx(e.Italic,{size:20})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleUnderline().run(),className:t.isActive("underline")?"is-active":"",title:"Underline",children:e.jsxRuntimeExports.jsx(e.Underline,{size:20})}),e.jsxRuntimeExports.jsx(g,{editor:t}),e.jsxRuntimeExports.jsx(E,{editor:t}),e.jsxRuntimeExports.jsx(v,{editor:t}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleBulletList().run(),className:t.isActive("bulletList")?"is-active":"",title:"Bullet List",children:e.jsxRuntimeExports.jsx(e.List,{size:20})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleOrderedList().run(),className:t.isActive("orderedList")?"is-active":"",title:"Ordered List",children:e.jsxRuntimeExports.jsx(e.ListOrdered,{size:20})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleTaskList().run(),className:t.isActive("taskList")?"is-active":"",title:"Task List",children:e.jsxRuntimeExports.jsx(e.SquareCheckBig,{size:20})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleCodeBlock().run(),className:t.isActive("codeBlock")?"is-active":"",title:"Code Block",children:e.jsxRuntimeExports.jsx(e.Code,{size:20})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().setTextAlign("left").run(),className:t.isActive({textAlign:"left"})?"is-active":"",title:"Align Left",children:e.jsxRuntimeExports.jsx(e.AlignLeft,{size:20})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().setTextAlign("center").run(),className:t.isActive({textAlign:"center"})?"is-active":"",title:"Align Center",children:e.jsxRuntimeExports.jsx(e.AlignCenter,{size:20})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().setTextAlign("right").run(),className:t.isActive({textAlign:"right"})?"is-active":"",title:"Align Right",children:e.jsxRuntimeExports.jsx(e.AlignRight,{size:20})}),e.jsxRuntimeExports.jsx(f,{editor:t})]})}):null}const N=({editor:t})=>t?e.jsxRuntimeExports.jsxs(e.BubbleMenu,{editor:t,tippyOptions:{duration:100},className:"blocknote-bubble-menu",children:[e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleBold().run(),className:t.isActive("bold")?"is-active":"",title:"Bold",children:e.jsxRuntimeExports.jsx(e.Bold,{size:16})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleItalic().run(),className:t.isActive("italic")?"is-active":"",title:"Italic",children:e.jsxRuntimeExports.jsx(e.Italic,{size:16})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleStrike().run(),className:t.isActive("strike")?"is-active":"",title:"Strikethrough",children:e.jsxRuntimeExports.jsx(e.Strikethrough,{size:16})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleCode().run(),className:t.isActive("code")?"is-active":"",title:"Code",children:e.jsxRuntimeExports.jsx(e.Code,{size:16})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleUnderline().run(),className:t.isActive("underline")?"is-active":"",title:"Underline",children:e.jsxRuntimeExports.jsx(e.Underline,{size:16})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleSubscript().run(),className:t.isActive("subscript")?"is-active":"",title:"Subscript",children:e.jsxRuntimeExports.jsx(h,{size:16})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleSuperscript().run(),className:t.isActive("superscript")?"is-active":"",title:"Superscript",children:e.jsxRuntimeExports.jsx(b,{size:16})}),e.jsxRuntimeExports.jsx("div",{className:"bubble-menu-separator"}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleHeading({level:1}).run(),className:t.isActive("heading",{level:1})?"is-active":"",title:"Heading 1",children:e.jsxRuntimeExports.jsx(e.Heading1,{size:16})}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>t.chain().focus().toggleHeading({level:2}).run(),className:t.isActive("heading",{level:2})?"is-active":"",title:"Heading 2",children:e.jsxRuntimeExports.jsx(e.Heading2,{size:16})})]}):null;exports.BlockNoteProvider=e.BlockNoteProvider,exports.BlockNote=function({className:t="",showToolbar:s=!0,showBubbleMenu:n=!0}){const o=e.useBlockNoteContext();return e.jsxRuntimeExports.jsxs("div",{className:`blocknote-editor ${t}`,children:[e.jsxRuntimeExports.jsx(e.EditorContent,{editor:o}),s&&e.jsxRuntimeExports.jsx(y,{editor:o}),n&&e.jsxRuntimeExports.jsx(N,{editor:o})]})};