react-reason-editor 1.0.76 → 1.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Ai-CfgczVyp.cjs +1 -0
- package/dist/Ai-DsWeNKXF.js +1 -0
- package/dist/Ai.cjs +1 -1
- package/dist/Ai.js +1 -1
- package/dist/{Attachment-bBEf8uOc.js → Attachment-BmQoshq_.js} +1 -1
- package/dist/Attachment.cjs +1 -1
- package/dist/Attachment.js +1 -1
- package/dist/{Blockquote-Cw5Zty9X.js → Blockquote-cNS4L62L.js} +1 -1
- package/dist/Blockquote.cjs +1 -1
- package/dist/Blockquote.js +1 -1
- package/dist/{Bold-BwuX7fZs.js → Bold-DiKXbC2z.js} +1 -1
- package/dist/Bold.cjs +1 -1
- package/dist/Bold.js +1 -1
- package/dist/BubbleMenus-CIOMgQ-M.js +216 -0
- package/dist/BubbleMenus-vqNuXWlm.cjs +1 -0
- package/dist/BulletList.cjs +1 -1
- package/dist/BulletList.js +1 -1
- package/dist/{Callout-CJofZEpX.js → Callout-BLkbFKjv.js} +1 -1
- package/dist/{Callout-wjo2BYZi.cjs → Callout-CpkjGEBS.cjs} +1 -1
- package/dist/Callout.cjs +1 -1
- package/dist/Callout.js +1 -1
- package/dist/Clear.cjs +1 -1
- package/dist/Clear.js +1 -1
- package/dist/{Code-CtIvf6_L.js → Code-DvYJ892R.js} +1 -1
- package/dist/Code.cjs +1 -1
- package/dist/Code.js +1 -1
- package/dist/{CodeBlock-DoIb7GC2.js → CodeBlock-B3dLyClh.js} +1 -1
- package/dist/CodeBlock.cjs +1 -1
- package/dist/CodeBlock.js +1 -1
- package/dist/CodeView.cjs +1 -1
- package/dist/CodeView.js +1 -1
- package/dist/{Color-DSs2MkQU.js → Color-Cng09GRR.js} +1 -1
- package/dist/{Color-B9PloDr5.cjs → Color-ZjBs7t7J.cjs} +1 -1
- package/dist/Color.cjs +1 -1
- package/dist/Color.js +1 -1
- package/dist/{Column-BXSoMVXw.cjs → Column-BaMOYvoO.cjs} +1 -1
- package/dist/{Column-CrT9596v.js → Column-DO6MfrOQ.js} +1 -1
- package/dist/Column.cjs +1 -1
- package/dist/Column.js +1 -1
- package/dist/{Drawer-CfcCPGCn.cjs → Drawer-CC24iVYp.cjs} +1 -1
- package/dist/{Drawer-DuQ5tw2t.js → Drawer-CL5Rhqw4.js} +1 -1
- package/dist/Drawer.cjs +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/{Drawio-DQEgw3du.cjs → Drawio-CD_Tea_o.cjs} +1 -1
- package/dist/{Drawio-P620K_Ps.js → Drawio-LEtUoVAY.js} +1 -1
- package/dist/Drawio.cjs +1 -1
- package/dist/Drawio.js +1 -1
- package/dist/{Emoji-CYM4tY7s.js → Emoji-DN3yfwz_.js} +1 -1
- package/dist/Emoji.cjs +1 -1
- package/dist/Emoji.js +1 -1
- package/dist/{ExportPdf-BoD_D91q.js → ExportPdf-CrQVmD4l.js} +1 -1
- package/dist/ExportPdf.cjs +1 -1
- package/dist/ExportPdf.js +1 -1
- package/dist/{ExportWord-Bj9q_cyK.js → ExportWord-BM4ogH_i.js} +1 -1
- package/dist/ExportWord.cjs +1 -1
- package/dist/ExportWord.js +1 -1
- package/dist/FontFamily.cjs +1 -1
- package/dist/FontFamily.js +1 -1
- package/dist/FontSize.cjs +1 -1
- package/dist/FontSize.js +1 -1
- package/dist/{Heading-BHOPoy3X.js → Heading-Bcrl3eKU.js} +1 -1
- package/dist/Heading.cjs +1 -1
- package/dist/Heading.js +1 -1
- package/dist/{Highlight-BxKQNHmT.cjs → Highlight-cO9V18Me.cjs} +1 -1
- package/dist/{Highlight-3SpxpGDw.js → Highlight-uXDlNgw3.js} +1 -1
- package/dist/Highlight.cjs +1 -1
- package/dist/Highlight.js +1 -1
- package/dist/{History-CmI6jUTV.js → History-BoHiw0Bn.js} +1 -1
- package/dist/History.cjs +1 -1
- package/dist/History.js +1 -1
- package/dist/{HorizontalRule-BeLfU92F.js → HorizontalRule-C7mAKdzL.js} +1 -1
- package/dist/HorizontalRule.cjs +1 -1
- package/dist/HorizontalRule.js +1 -1
- package/dist/{Iframe-D-WaYtdF.cjs → Iframe-DGL_MOLf.cjs} +1 -1
- package/dist/{Iframe-C0ozlEX4.js → Iframe-D_IjezyZ.js} +1 -1
- package/dist/Iframe.cjs +1 -1
- package/dist/Iframe.js +1 -1
- package/dist/Image.cjs +1 -1
- package/dist/Image.js +1 -1
- package/dist/{ImageCropper-BVl7AuRL.js → ImageCropper-ChOGJuHZ.js} +1 -1
- package/dist/{ImageCropper-DqHxEOtN.cjs → ImageCropper-DDWnFI2-.cjs} +1 -1
- package/dist/{ImageGif-BSVyqEv6.cjs → ImageGif-3dik7FeU.cjs} +1 -1
- package/dist/{ImageGif-BvthT-Lc.js → ImageGif-D_kKkBU5.js} +1 -1
- package/dist/ImageGif.cjs +1 -1
- package/dist/ImageGif.js +1 -1
- package/dist/{ImportWord-C6EnXbyR.js → ImportWord-CtFBb_n4.js} +1 -1
- package/dist/ImportWord.cjs +1 -1
- package/dist/ImportWord.js +1 -1
- package/dist/{Indent-BuzxHbMb.js → Indent-BIk98fDV.js} +1 -1
- package/dist/{Indent-eL-WNEF4.cjs → Indent-BVMl9zKV.cjs} +1 -1
- package/dist/Indent.cjs +1 -1
- package/dist/Indent.js +1 -1
- package/dist/{Italic-D8ZI09FZ.js → Italic-3mlmsxqN.js} +1 -1
- package/dist/Italic.cjs +1 -1
- package/dist/Italic.js +1 -1
- package/dist/{Katex-46mDLDuw.cjs → Katex-C2AcX_Un.cjs} +1 -1
- package/dist/{Katex-B-lo5eMz.js → Katex-DRPWO2AM.js} +1 -1
- package/dist/Katex.cjs +1 -1
- package/dist/Katex.js +1 -1
- package/dist/LineHeight.cjs +1 -1
- package/dist/LineHeight.js +1 -1
- package/dist/{Link-CDtipqwb.js → Link-D5y_0ekP.js} +1 -1
- package/dist/Link.cjs +1 -1
- package/dist/Link.js +1 -1
- package/dist/{LinkEditBlock-D0V9PwbF.cjs → LinkEditBlock-D78J06F7.cjs} +1 -1
- package/dist/MarkdownPaste.cjs +1 -1
- package/dist/MarkdownPaste.js +1 -1
- package/dist/{Mermaid-DDV93CBT.cjs → Mermaid-B6SL3cf5.cjs} +1 -1
- package/dist/{Mermaid-Cb8MiE1N.js → Mermaid-BaTtCsrD.js} +1 -1
- package/dist/Mermaid.cjs +1 -1
- package/dist/Mermaid.js +1 -1
- package/dist/{MoreMark-CJ3nTD1T.js → MoreMark-Bfsa3STU.js} +1 -1
- package/dist/MoreMark.cjs +1 -1
- package/dist/MoreMark.js +1 -1
- package/dist/OrderedList.cjs +1 -1
- package/dist/OrderedList.js +1 -1
- package/dist/{ReasonDocs-BliNN1Tt.cjs → ReasonDocs-Bjefr26w.cjs} +1 -1
- package/dist/{ReasonDocs-4vxZ3zY7.js → ReasonDocs-_hTAa8-q.js} +1 -1
- package/dist/{RichTextProvider-Dl77gVJI.cjs → RichTextProvider-BuTrDlZY.cjs} +1 -1
- package/dist/{RichTextProvider-E6rbc_J2.js → RichTextProvider-D9EtjDKS.js} +1 -1
- package/dist/SearchAndReplace.cjs +1 -1
- package/dist/SearchAndReplace.js +1 -1
- package/dist/{SlashCommand-DtlUkwyM.js → SlashCommand-Cg-Rvv3o.js} +1 -1
- package/dist/SlashCommand.js +1 -1
- package/dist/{Strike-CWYl45VK.js → Strike-CSxbYwpk.js} +1 -1
- package/dist/Strike.cjs +1 -1
- package/dist/Strike.js +1 -1
- package/dist/{Table-DCLsW5DJ.js → Table-CFcOg-4n.js} +1 -1
- package/dist/{Table-C9RAHNEk.cjs → Table-Do_kTawS.cjs} +1 -1
- package/dist/Table.cjs +1 -1
- package/dist/Table.js +1 -1
- package/dist/TaskList.cjs +1 -1
- package/dist/TaskList.js +1 -1
- package/dist/{TextAlign-D4UgbJ7F.cjs → TextAlign-CcsTIs-9.cjs} +1 -1
- package/dist/{TextAlign-9ezg8E99.js → TextAlign-Dun3_Ozv.js} +1 -1
- package/dist/TextAlign.cjs +1 -1
- package/dist/TextAlign.js +1 -1
- package/dist/TextDirection.cjs +1 -1
- package/dist/TextDirection.js +1 -1
- package/dist/{TextUnderline-C5A078R0.js → TextUnderline-Cqm5NQVW.js} +1 -1
- package/dist/TextUnderline.cjs +1 -1
- package/dist/TextUnderline.js +1 -1
- package/dist/{Twitter-D7ulyHFD.cjs → Twitter-B4IYTs3E.cjs} +1 -1
- package/dist/{Twitter-ByGJ4v1K.js → Twitter-CZHAICpz.js} +1 -1
- package/dist/Twitter.cjs +1 -1
- package/dist/Twitter.js +1 -1
- package/dist/{Video-hhw77FP4.js → Video-5nw_Zeob.js} +1 -1
- package/dist/{Video-ConJGjxP.cjs → Video-CtGR5VVD.cjs} +1 -1
- package/dist/Video.cjs +1 -1
- package/dist/Video.js +1 -1
- package/dist/WordCount.cjs +1 -1
- package/dist/WordCount.js +1 -1
- package/dist/bubble-BhkjoWdo.js +79 -0
- package/dist/bubble.cjs +1 -1
- package/dist/bubble.js +1 -1
- package/dist/{cdn-loader-BGIuN138-wkFA6jnE.cjs → cdn-loader-BGIuN138-7PrAg-Ef.cjs} +1 -1
- package/dist/docs-agent.cjs +1 -1
- package/dist/docs-agent.js +1 -1
- package/dist/editor-kit.cjs +1 -1
- package/dist/editor-kit.js +1 -1
- package/dist/editorConfig-BR7z-P0e.js +18 -0
- package/dist/editorConfig-CHBSp2KG.cjs +1 -0
- package/dist/extensions/Ai/Ai.d.ts +22 -5
- package/dist/extensions/Ai/commands.d.ts +6 -1
- package/dist/extensions/Ai/components/AiMenu.d.ts +6 -5
- package/dist/extensions/Ai/components/RichTextAi.d.ts +12 -0
- package/dist/extensions/Ai/index.d.ts +9 -3
- package/dist/extensions/Ai/lib/completionToContent.d.ts +35 -0
- package/dist/extensions/Ai/lib/createStreamingCompletion.d.ts +27 -0
- package/dist/extensions/Ai/lib/prompt.d.ts +38 -0
- package/dist/extensions/Ai/lib/sanitizeCompletion.d.ts +37 -0
- package/dist/extensions/Ai/types.d.ts +47 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/marked.esm-B7mQ2Kzc.cjs +1 -0
- package/dist/marked.esm-CNm6O672.js +1 -0
- package/dist/{react-BQVDEMs2.cjs → react-Bfe0Tko8.cjs} +1 -1
- package/dist/reason-docs.cjs +1 -1
- package/dist/reason-docs.js +1 -1
- package/dist/{reason-toolbar-skin-9xQLtzeK.js → reason-toolbar-skin-BNYK97ET.js} +1 -1
- package/dist/{reason-toolbar-skin-DyYu9ywU.cjs → reason-toolbar-skin-CD4T53He.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/useButtonProps-BBiR6DPI.cjs +1 -0
- package/dist/useButtonProps-Codtb0k0.js +1 -0
- package/package.json +1 -1
- package/dist/Ai-BGpnAE8s.js +0 -1
- package/dist/Ai-CORhNCSN.cjs +0 -1
- package/dist/BubbleMenus-QlttKSIN.cjs +0 -1
- package/dist/BubbleMenus-mwxYB3IU.js +0 -195
- package/dist/MarkdownPaste-C5jQ33SR.js +0 -1
- package/dist/bubble-CpeBzXMe.js +0 -78
- package/dist/editorConfig-D-Tlrdwj.js +0 -18
- package/dist/editorConfig-Du7YaEDm.cjs +0 -1
- package/dist/useButtonProps-BFfsKvCi.cjs +0 -1
- package/dist/useButtonProps-BZwO1Of-.js +0 -1
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import{o as e}from"./dist-DmY5xFkC.js";import{n as t}from"./toggle-BnR5VE66.js";import{n as r,t as a}from"./locales-rT_qjKW9.js";import{i as n,o,r as l,s as i}from"./floating-ui.dom-CdG_EzIc.js";import{n as s}from"./Callout-BLkbFKjv.js";import{i as d}from"./ImageCropper-ChOGJuHZ.js";import{c,d as m,f as g,l as u,t as h}from"./useButtonProps-Codtb0k0.js";import{n as p}from"./Video-5nw_Zeob.js";import{themeActions as b}from"./theme.js";import{n as x}from"./Highlight-uXDlNgw3.js";import{n as y}from"./HorizontalRule-C7mAKdzL.js";import{n as f}from"./Link-D5y_0ekP.js";import{n as v,r as k}from"./History-BoHiw0Bn.js";import{n as N}from"./TextUnderline-Cqm5NQVW.js";import{n as w}from"./Blockquote-cNS4L62L.js";import{n as C}from"./Bold-DiKXbC2z.js";import{n as S}from"./Code-DvYJ892R.js";import{n as L}from"./CodeBlock-B3dLyClh.js";import{n as z}from"./Heading-Bcrl3eKU.js";import{n as A}from"./Italic-3mlmsxqN.js";import{n as j}from"./Strike-CSxbYwpk.js";import{n as P}from"./ExportWord-BM4ogH_i.js";import{RichTextOrderedList as M}from"./OrderedList.js";import{RichTextBulletList as T}from"./BulletList.js";import{RichTextTaskList as B}from"./TaskList.js";import{RichTextClear as D}from"./Clear.js";import{RichTextFontFamily as E}from"./FontFamily.js";import{RichTextFontSize as I}from"./FontSize.js";import{n as H}from"./Color-Cng09GRR.js";import{n as W}from"./Indent-BIk98fDV.js";import{n as R}from"./TextAlign-Dun3_Ozv.js";import{RichTextLineHeight as $}from"./LineHeight.js";import{r as O}from"./Emoji-DN3yfwz_.js";import{n as F}from"./Attachment-BmQoshq_.js";import{n as G}from"./Katex-DRPWO2AM.js";import{n as K}from"./ImageGif-D_kKkBU5.js";import{n as V}from"./Table-CFcOg-4n.js";import{i as J}from"./Column-DO6MfrOQ.js";import{n as q}from"./Twitter-CZHAICpz.js";import{n as U}from"./Mermaid-BaTtCsrD.js";import{RichTextSearchAndReplace as Z}from"./SearchAndReplace.js";import{RichTextCodeView as _}from"./CodeView.js";import{n as Y}from"./ImportWord-CtFBb_n4.js";import{n as Q}from"./ExportPdf-CrQVmD4l.js";import{r as X}from"./Harper-BMTF3gpj.js";import{a as ee,c as te,d as re,i as ae,l as ne,r as oe}from"./Ai-DsWeNKXF.js";import{n as le}from"./Drawio-LEtUoVAY.js";import{getReadAloudStorage as ie,getReadAloudText as se,subscribeReadAloud as de}from"./ReadAloud.js";import{getTranscribeStorage as ce,isTranscriptionSupported as me,subscribeTranscribe as ge}from"./Transcribe.js";import{selectSimilarPluginKey as ue}from"./SelectSimilar.js";import{a as he,c as pe,d as be,g as xe,h as ye,i as fe,l as ve,m as ke,n as Ne,o as we,r as Ce,s as Se,t as Le,u as ze}from"./bubble-BhkjoWdo.js";import{n as Ae}from"./SlashCommand-Cg-Rvv3o.js";import{getWordCountStats as je}from"./WordCount.js";import{posToDOMRect as Pe,useCurrentEditor as Me,useEditorState as Te}from"@tiptap/react";import Be,{cloneElement as De,isValidElement as Ee,useCallback as Ie,useEffect as He,useLayoutEffect as We,useMemo as Re,useRef as $e,useState as Oe,useSyncExternalStore as Fe}from"react";import{Fragment as Ge,jsx as Ke,jsxs as Ve}from"react/jsx-runtime";import{ArrowLeft as Je,Check as qe,ChevronDown as Ue,Clipboard as Ze,ClipboardPaste as _e,ClipboardType as Ye,Copy as Qe,CornerDownRight as Xe,Download as et,Edit3 as tt,Eye as rt,File as at,FileText as nt,Globe as ot,ListTree as lt,Loader2 as it,Lock as st,Mail as dt,MessageSquare as ct,MessageSquarePlus as mt,Mic as gt,Paintbrush as ut,Palette as ht,Plus as pt,RotateCcw as bt,Scissors as xt,Search as yt,Settings as ft,Share2 as vt,Sparkles as kt,SpellCheck as Nt,Square as wt,TextCursorInput as Ct,TextSelect as St,Trash2 as Lt,Type as zt,Users as At,Volume2 as jt,VolumeX as Pt,X as Mt,ZoomIn as Tt,ZoomOut as Bt}from"lucide-react";import{createPortal as Dt}from"react-dom";import{SpokenPhraseOverlay as Et}from"use-voice-control/react";function It({children:t,label:r,className:a,icon:n,shortcut:o}){const l=$e(null),i=Ee(t)?De(t,{tooltip:r?void 0:t.props?.tooltip,tooltipOptions:r?void 0:t.props?.tooltipOptions}):t;/* @__PURE__ */
|
|
2
|
+
return Ve("div",{ref:l,className:e("flex items-center gap-2 px-2 py-0.5 rounded cursor-pointer w-full text-left","hover:bg-gray-100/80 dark:hover:bg-slate-800/80","transition-colors",a),onClick:e=>{e.stopPropagation(),e.target.closest('button, [role="button"], a')||(l.current?.querySelector("button"))?.click()},children:[n&&/* @__PURE__ */Ke("span",{className:"w-5 flex items-center justify-center text-gray-500 dark:text-gray-400 shrink-0",children:n}),/* @__PURE__ */Ve("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[i,r&&/* @__PURE__ */Ke("span",{className:"text-xs whitespace-nowrap truncate",children:r}),o&&/* @__PURE__ */Ke("span",{className:"text-[10px] text-gray-400 dark:text-gray-500 ml-auto whitespace-nowrap shrink-0",children:o})]})]})}function Ht(){const e=h("subscript"),{icon:r,tooltip:a,shortcutKeys:n,tooltipOptions:o={},action:l,isActive:i}=e?.componentProps??{},{dataState:s,disabled:d,update:m}=c(i);return e?/* @__PURE__ */Ke(t,{action:()=>{d||l&&(l(),m())},dataState:s,disabled:d,icon:r,shortcutKeys:n,tooltip:a,tooltipOptions:o}):/* @__PURE__ */Ke(Ge,{})}function Wt(){const e=h("superscript"),{icon:r,tooltip:a,shortcutKeys:n,tooltipOptions:o={},action:l,isActive:i}=e?.componentProps??{},{dataState:s,disabled:d,update:m}=c(i);return e?/* @__PURE__ */Ke(t,{action:()=>{d||l&&(l(),m())},dataState:s,disabled:d,icon:r,shortcutKeys:n,tooltip:a,tooltipOptions:o}):/* @__PURE__ */Ke(Ge,{})}function Rt({message:e}){const[t,r]=Oe(!0);return He(()=>{const e=setTimeout(()=>r(!1),2e3);return()=>clearTimeout(e)},[]),t?Dt(/* @__PURE__ */Ke("div",{className:"fixed bottom-4 right-4 z-[100] animate-in fade-in slide-in-from-bottom-2",children:/* @__PURE__ */Ke("div",{className:"bg-gray-900 dark:bg-gray-800 text-white px-4 py-2.5 rounded-lg shadow-lg text-sm font-medium",children:e})}),document.body):null}function $t(){const{editor:e}=Me(),[t,r]=Oe(1.25),[a,n]=Oe(null),o=e=>{n(e)},l=Ie(t=>{const r=e?.view?.dom??document.querySelector(".ProseMirror");if(!r)return;const a=r;a.style.zoom=String(t),a.style.transform="",a.style.transformOrigin=""},[e]);return He(()=>{l(t)},[l,t]),/* @__PURE__ */Ve(Ge,{children:[/* @__PURE__ */Ve("div",{className:"richtext-flex richtext-items-center richtext-gap-0.5",children:[/* @__PURE__ */Ke("button",{onClick:()=>{const e=Math.max(t-.25,.5);r(e),l(e),o(`Zoom: ${Math.round(100*e)}%`)},title:`Zoom Out (${Math.round(100*t)}%)`,className:"richtext-p-1 richtext-h-8 richtext-flex richtext-items-center richtext-justify-center richtext-rounded text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-slate-800 hover:text-gray-900 dark:hover:text-white transition-colors",children:/* @__PURE__ */Ke(Bt,{size:16})}),/* @__PURE__ */Ke("button",{onClick:()=>{const e=Math.min(t+.25,2);r(e),l(e),o(`Zoom: ${Math.round(100*e)}%`)},title:`Zoom In (${Math.round(100*t)}%)`,className:"richtext-p-1 richtext-h-8 richtext-flex richtext-items-center richtext-justify-center richtext-rounded text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-slate-800 hover:text-gray-900 dark:hover:text-white transition-colors",children:/* @__PURE__ */Ke(Tt,{size:16})})]}),a&&/* @__PURE__ */Ke(Rt,{message:a})]})}var Ot={a4:{name:"A4",pageHeight:1123,pageWidth:794,marginTop:72,marginBottom:72,marginLeft:72,marginRight:72},a3:{name:"A3",pageHeight:1591,pageWidth:1123,marginTop:72,marginBottom:72,marginLeft:72,marginRight:72},letter:{name:"Letter",pageHeight:1100,pageWidth:850,marginTop:72,marginBottom:72,marginLeft:72,marginRight:72},legal:{name:"Legal",pageHeight:1400,pageWidth:850,marginTop:72,marginBottom:72,marginLeft:72,marginRight:72}};function Ft(){const{editor:e}=Me(),[t,r]=Oe(!1),[a,n]=Oe("page"),[o,l]=Oe({pageHeight:1056,pageWidth:816,pageGap:50,pageGapBorderSize:1,pageGapBorderColor:"#e5e5e5",pageBreakBackground:"#ffffff",marginTop:48,marginBottom:48,marginLeft:72,marginRight:72,contentMarginTop:10,contentMarginBottom:10,headerLeft:"",headerRight:"Page {page}",footerLeft:"",footerRight:""}),i=$e(null),s=$e(null),[d,c]=Oe({top:0,left:-9999,visibility:"hidden"});if(He(()=>{if(!t)return;const e=e=>{const t=e.target;t?.isConnected&&(i.current?.contains(t)||s.current?.contains(t)||r(!1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[t]),We(()=>{if(!t)return;const e=()=>{const e=s.current,t=i.current;if(!e||!t)return;const r=window.innerWidth,a=window.innerHeight,n=t.getBoundingClientRect(),o=t.closest(".dropdown-portal")?.getBoundingClientRect()??n,{offsetWidth:l,offsetHeight:d}=e;let m=o.right+8;m+l>r-8&&(m=o.left-l-8),m=Math.max(8,Math.min(m,r-l-8));const g=Math.max(8,Math.min(n.top,a-d-8));c({top:g,left:m,maxHeight:a-g-8})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[t,a]),!e)return null;const m=t=>{const r={...o,...t};l(r),t.pageHeight&&e.commands.updatePageHeight?.(t.pageHeight),t.pageWidth&&e.commands.updatePageWidth?.(t.pageWidth),t.pageGap&&e.commands.updatePageGap?.(t.pageGap),(t.marginTop||t.marginBottom||t.marginLeft||t.marginRight)&&e.commands.updateMargins?.({top:t.marginTop??o.marginTop,bottom:t.marginBottom??o.marginBottom,left:t.marginLeft??o.marginLeft,right:t.marginRight??o.marginRight}),(t.contentMarginTop||t.contentMarginBottom)&&e.commands.updateContentMargins?.({top:t.contentMarginTop??o.contentMarginTop,bottom:t.contentMarginBottom??o.contentMarginBottom}),(t.headerLeft||t.headerRight)&&e.commands.updateHeaderContent?.(t.headerLeft??o.headerLeft,t.headerRight??o.headerRight),(t.footerLeft||t.footerRight)&&e.commands.updateFooterContent?.(t.footerLeft??o.footerLeft,t.footerRight??o.footerRight),t.pageBreakBackground&&e.commands.updatePageBreakBackground?.(t.pageBreakBackground)};/* @__PURE__ */
|
|
3
|
+
return Ve("div",{className:"relative",ref:i,children:[/* @__PURE__ */Ve("button",{onClick:()=>r(!t),className:"flex items-center gap-1 px-2 py-1.5 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors",title:"Page settings",children:[/* @__PURE__ */Ke(ft,{className:"w-4 h-4"}),/* @__PURE__ */Ke(Ue,{className:"w-3 h-3"})]}),t&&Dt(/* @__PURE__ */Ve("div",{ref:s,"data-richtext-portal":!0,className:"dropdown-portal fixed flex flex-col overflow-hidden bg-white dark:bg-gray-900 border dark:border-gray-700 rounded-lg shadow-2xl z-50 w-96 max-w-[calc(100vw-16px)]",style:d,children:[/* @__PURE__ */Ke("div",{className:"flex border-b dark:border-gray-700 shrink-0",children:["page","spacing","header-footer"].map(e=>/* @__PURE__ */Ve("button",{onClick:()=>n(e),className:"flex-1 px-3 py-2 text-sm font-medium transition-colors "+(a===e?"border-b-2 border-blue-500 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"),children:["page"===e&&"Page","spacing"===e&&"Spacing","header-footer"===e&&"Header/Footer"]},e))}),/* @__PURE__ */Ve("div",{className:"flex-1 min-h-0 p-4 space-y-4 overflow-y-auto",children:["page"===a&&/* @__PURE__ */Ve(Ge,{children:[
|
|
4
|
+
/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("label",{className:"block text-xs font-semibold mb-2 text-gray-700 dark:text-gray-300",children:"Presets"}),/* @__PURE__ */Ke("div",{className:"grid grid-cols-4 gap-2",children:Object.entries(Ot).map(([e,t])=>/* @__PURE__ */Ke("button",{onClick:()=>(e=>{m({pageHeight:e.pageHeight,pageWidth:e.pageWidth,marginTop:e.marginTop,marginBottom:e.marginBottom,marginLeft:e.marginLeft,marginRight:e.marginRight})})(t),className:"px-2 py-1 text-xs bg-gray-50 dark:bg-gray-800 border dark:border-gray-700 rounded hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.name},e))})]}),
|
|
5
|
+
/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("label",{className:"block text-xs font-semibold mb-1 text-gray-700 dark:text-gray-300",children:"Page Height (px)"}),/* @__PURE__ */Ke("input",{type:"number",value:o.pageHeight,onChange:e=>m({pageHeight:Number(e.target.value)}),className:"w-full px-2 py-1 border dark:border-gray-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100",min:400,max:2e3})]}),
|
|
6
|
+
/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("label",{className:"block text-xs font-semibold mb-1 text-gray-700 dark:text-gray-300",children:"Page Width (px)"}),/* @__PURE__ */Ke("input",{type:"number",value:o.pageWidth,onChange:e=>m({pageWidth:Number(e.target.value)}),className:"w-full px-2 py-1 border dark:border-gray-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100",min:400,max:2e3})]}),
|
|
7
|
+
/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("label",{className:"block text-xs font-semibold mb-1 text-gray-700 dark:text-gray-300",children:"Page Gap (px)"}),/* @__PURE__ */Ke("input",{type:"number",value:o.pageGap,onChange:e=>m({pageGap:Number(e.target.value)}),className:"w-full px-2 py-1 border dark:border-gray-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100",min:0,max:100})]}),
|
|
8
|
+
/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("label",{className:"block text-xs font-semibold mb-1 text-gray-700 dark:text-gray-300",children:"Gap Border Color"}),/* @__PURE__ */Ve("div",{className:"flex gap-2",children:[/* @__PURE__ */Ke("input",{type:"color",value:o.pageGapBorderColor,onChange:e=>m({pageGapBorderColor:e.target.value}),className:"w-10 h-9 rounded cursor-pointer"}),/* @__PURE__ */Ke("input",{type:"text",value:o.pageGapBorderColor,onChange:e=>m({pageGapBorderColor:e.target.value}),className:"flex-1 px-2 py-1 border dark:border-gray-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100"})]})]})]}),"spacing"===a&&/* @__PURE__ */Ve(Ge,{children:[/* @__PURE__ */Ve("div",{className:"space-y-2",children:[/* @__PURE__ */Ke("label",{className:"block text-xs font-semibold text-gray-700 dark:text-gray-300",children:"Page Margins (px)"}),/* @__PURE__ */Ve("div",{className:"grid grid-cols-2 gap-2",children:[
|
|
9
|
+
/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("label",{className:"block text-xs text-gray-600 dark:text-gray-400 mb-1",children:"Top"}),/* @__PURE__ */Ke("input",{type:"number",value:o.marginTop,onChange:e=>m({marginTop:Number(e.target.value)}),className:"w-full px-2 py-1 border dark:border-gray-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100",min:0,max:200})]}),
|
|
10
|
+
/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("label",{className:"block text-xs text-gray-600 dark:text-gray-400 mb-1",children:"Bottom"}),/* @__PURE__ */Ke("input",{type:"number",value:o.marginBottom,onChange:e=>m({marginBottom:Number(e.target.value)}),className:"w-full px-2 py-1 border dark:border-gray-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100",min:0,max:200})]}),
|
|
11
|
+
/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("label",{className:"block text-xs text-gray-600 dark:text-gray-400 mb-1",children:"Left"}),/* @__PURE__ */Ke("input",{type:"number",value:o.marginLeft,onChange:e=>m({marginLeft:Number(e.target.value)}),className:"w-full px-2 py-1 border dark:border-gray-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100",min:0,max:200})]}),
|
|
12
|
+
/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("label",{className:"block text-xs text-gray-600 dark:text-gray-400 mb-1",children:"Right"}),/* @__PURE__ */Ke("input",{type:"number",value:o.marginRight,onChange:e=>m({marginRight:Number(e.target.value)}),className:"w-full px-2 py-1 border dark:border-gray-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100",min:0,max:200})]})]})]}),/* @__PURE__ */Ve("div",{className:"space-y-2",children:[/* @__PURE__ */Ke("label",{className:"block text-xs font-semibold text-gray-700 dark:text-gray-300",children:"Content Margins (px)"}),/* @__PURE__ */Ve("div",{className:"grid grid-cols-2 gap-2",children:[/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("label",{className:"block text-xs text-gray-600 dark:text-gray-400 mb-1",children:"Top"}),/* @__PURE__ */Ke("input",{type:"number",value:o.contentMarginTop,onChange:e=>m({contentMarginTop:Number(e.target.value)}),className:"w-full px-2 py-1 border dark:border-gray-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100",min:0,max:50})]}),/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("label",{className:"block text-xs text-gray-600 dark:text-gray-400 mb-1",children:"Bottom"}),/* @__PURE__ */Ke("input",{type:"number",value:o.contentMarginBottom,onChange:e=>m({contentMarginBottom:Number(e.target.value)}),className:"w-full px-2 py-1 border dark:border-gray-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100",min:0,max:50})]})]})]})]}),"header-footer"===a&&/* @__PURE__ */Ve(Ge,{children:[
|
|
13
|
+
/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("label",{className:"block text-xs font-semibold mb-1 text-gray-700 dark:text-gray-300",children:"Header Left (supports HTML)"}),/* @__PURE__ */Ke("textarea",{value:o.headerLeft,onChange:e=>m({headerLeft:e.target.value}),className:"w-full px-2 py-1 border dark:border-gray-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 font-mono",rows:3,placeholder:"e.g., <strong>Company Name</strong>"})]}),
|
|
14
|
+
/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ve("label",{className:"block text-xs font-semibold mb-1 text-gray-700 dark:text-gray-300",children:["Header Right (use ","{page}"," for page number)"]}),/* @__PURE__ */Ke("textarea",{value:o.headerRight,onChange:e=>m({headerRight:e.target.value}),className:"w-full px-2 py-1 border dark:border-gray-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 font-mono",rows:3,placeholder:"e.g., Page {page}"})]}),
|
|
15
|
+
/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("label",{className:"block text-xs font-semibold mb-1 text-gray-700 dark:text-gray-300",children:"Footer Left (supports HTML)"}),/* @__PURE__ */Ke("textarea",{value:o.footerLeft,onChange:e=>m({footerLeft:e.target.value}),className:"w-full px-2 py-1 border dark:border-gray-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 font-mono",rows:3,placeholder:"e.g., <em>Confidential</em>"})]}),
|
|
16
|
+
/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ve("label",{className:"block text-xs font-semibold mb-1 text-gray-700 dark:text-gray-300",children:["Footer Right (use ","{page}"," for page number)"]}),/* @__PURE__ */Ke("textarea",{value:o.footerRight,onChange:e=>m({footerRight:e.target.value}),className:"w-full px-2 py-1 border dark:border-gray-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 font-mono",rows:3,placeholder:"e.g., Page {page} of {total}"})]})]})]})]}),document.body)]})}var Gt=[1,2,3,4];function Kt({editor:e,onClose:t,defaultLevel:r=3}){const[a,n]=Oe([]),[o,l]=Oe(""),[i,s]=Oe(r),[d,c]=Oe(null);He(()=>{if(!e)return;const t=()=>{const t=[];e.state.doc.descendants((e,r)=>{"heading"===e.type.name&&t.push({level:e.attrs.level,text:e.textContent,pos:r,index:t.length})}),n(t)};return t(),e.on("update",t),()=>e.off("update",t)},[e]);const m=Re(()=>{const e=o.trim().toLowerCase();return a.filter(t=>t.level<=i&&(""===e||t.text.toLowerCase().includes(e)))},[a,o,i]),g=Ie(t=>{if(!e)return;const r=e.view.nodeDOM(t);r&&"function"==typeof r.scrollIntoView&&r.scrollIntoView({behavior:"smooth",block:"start"}),e.chain().focus().setTextSelection(t+1).run(),c(t)},[e]);return Dt(/* @__PURE__ */Ve("div",{className:"fixed right-4 top-24 z-50 flex w-72 max-h-[70vh] flex-col rounded-lg border border-gray-200/60 bg-white/80 shadow-xl backdrop-blur-md dark:border-slate-700/60 dark:bg-slate-900/80",children:[
|
|
17
|
+
/* @__PURE__ */Ve("div",{className:"flex items-center justify-between border-b border-gray-100 px-3 py-2 dark:border-slate-700",children:[/* @__PURE__ */Ve("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */Ke(lt,{size:15,className:"text-blue-500"}),/* @__PURE__ */Ke("span",{className:"text-sm font-semibold text-gray-800 dark:text-gray-100",children:"Table of Contents"})]}),/* @__PURE__ */Ke("button",{onClick:t,title:"Hide table of contents",className:"rounded p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-slate-800",children:/* @__PURE__ */Ke(Mt,{size:14})})]}),
|
|
18
|
+
/* @__PURE__ */Ve("div",{className:"border-b border-gray-100 px-3 py-2 dark:border-slate-700",children:[/* @__PURE__ */Ve("div",{className:"flex items-center gap-2 rounded-md border border-gray-200 bg-white px-2 py-1.5 dark:border-slate-700 dark:bg-slate-800",children:[
|
|
19
|
+
/* @__PURE__ */Ke(yt,{size:13,className:"shrink-0 text-gray-400"}),
|
|
20
|
+
/* @__PURE__ */Ke("input",{type:"text",value:o,onChange:e=>l(e.target.value),placeholder:"Filter headings…",className:"w-full bg-transparent text-xs text-gray-700 outline-none placeholder:text-gray-400 dark:text-gray-200"}),o&&/* @__PURE__ */Ke("button",{onClick:()=>l(""),className:"shrink-0 text-gray-400 hover:text-gray-600",title:"Clear filter",children:/* @__PURE__ */Ke(Mt,{size:12})})]}),/* @__PURE__ */Ve("div",{className:"mt-2 flex items-center gap-1",children:[/* @__PURE__ */Ke("span",{className:"mr-1 text-[10px] font-semibold uppercase tracking-wide text-gray-400",children:"Level"}),Gt.map(e=>/* @__PURE__ */Ve("button",{onClick:()=>s(e),title:`Unfold headings up to H${e}`,className:"flex-1 rounded px-1.5 py-1 text-[11px] font-medium transition-colors "+(i===e?"bg-blue-500 text-white":"border border-gray-200 text-gray-600 hover:bg-gray-100 dark:border-slate-700 dark:text-gray-300 dark:hover:bg-slate-800"),children:["H",e]},e))]})]}),
|
|
21
|
+
/* @__PURE__ */Ke("nav",{className:"flex-1 space-y-0.5 overflow-y-auto p-2",children:0===m.length?/* @__PURE__ */Ke("div",{className:"px-2 py-6 text-center text-xs text-gray-400",children:0===a.length?"No headings yet.":"No headings match your filter."}):m.map(e=>/* @__PURE__ */Ke("button",{onClick:()=>g(e.pos),style:{paddingLeft:12*(e.level-1)+8+"px"},className:"block w-full truncate rounded py-1.5 pr-2 text-left text-xs transition-colors "+(d===e.pos?"bg-blue-50 font-medium text-blue-700 dark:bg-blue-900/30 dark:text-blue-300":"text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-slate-800"),children:e.text||`Heading ${e.level}`},e.pos))})]}),document.body)}function Vt({editor:t,className:r}){const[a,n]=Oe(null),o=$e(null),l=Ie(()=>{o.current&&(clearTimeout(o.current),o.current=null)},[]),i=Ie(()=>{l(),o.current=setTimeout(()=>n(null),120)},[l]),s=Ie(e=>{if(!t)return;const r=e.getAttribute("data-harper-id");if(!r)return;const a=X(t.state)?.issues.get(r);if(!a)return;const o=e.getBoundingClientRect();l(),n({issue:a,top:o.bottom+6,left:o.left})},[t,l]);if(He(()=>{if(!t)return;const e=t.view.dom,r=e=>{const t=e.target?.closest("[data-harper-id]");t&&s(t)},a=e=>{e.relatedTarget?.closest("[data-harper-id]")||i()};return e.addEventListener("mouseover",r),e.addEventListener("mouseout",a),()=>{e.removeEventListener("mouseover",r),e.removeEventListener("mouseout",a)}},[t,s,i]),!t||!a)return null;const{issue:d,top:c,left:m}=a;/* @__PURE__ */
|
|
22
|
+
return Ve("div",{role:"dialog","aria-label":"Proofing suggestion",className:e("harper-tooltip",r),style:{position:"fixed",top:c,left:m,zIndex:60},onMouseEnter:l,onMouseLeave:i,children:[
|
|
23
|
+
/* @__PURE__ */Ke("div",{className:"harper-tooltip-header",children:/* @__PURE__ */Ke("span",{className:"harper-tooltip-kind",children:d.kind})}),
|
|
24
|
+
/* @__PURE__ */Ke("p",{className:"harper-tooltip-message",children:d.message}),
|
|
25
|
+
/* @__PURE__ */Ve("div",{className:"harper-tooltip-actions",children:[0===d.suggestions.length?/* @__PURE__ */Ke("span",{className:"harper-tooltip-empty",children:"No suggestions"}):d.suggestions.map((e,r)=>/* @__PURE__ */Ke("button",{type:"button",className:"harper-tooltip-suggestion",onClick:()=>(e=>{t.chain().focus().applyHarperSuggestion(d.id,e).run(),n(null)})(r),children:e.label||"(empty)"},`${e.kind}-${e.replacement}-${r}`)),/* @__PURE__ */Ke("button",{type:"button",className:"harper-tooltip-ignore",onClick:()=>{t.chain().focus().ignoreHarperSuggestion(d.id).run(),n(null)},children:"Ignore"})]})]})}var Jt={status:"closed"};function qt({icon:e,label:t,onClick:r,disabled:a,title:n}){/* @__PURE__ */
|
|
26
|
+
return Ve("button",{type:"button",disabled:a,onClick:r,title:n,className:"ai-menu-row",children:[/* @__PURE__ */Ke(e,{className:"ai-menu-row-icon"}),t]})}function Ut(){const e=m(),t=u(),r=$e(null),a=$e(null),[s,d]=Oe(""),[c,g]=Oe(-1),[h,p]=Oe(null),[b,x]=Oe(!1),[y,f]=Oe(null),v=Te({editor:e,selector:({editor:e})=>e?ae(e.state)?.panel??Jt:Jt}),k=Re(()=>"closed"===v.status?null:"reviewing"===v.status?{from:v.suggestion.from,to:v.suggestion.to}:{from:v.from,to:v.to},[v]),N="closed"!==v.status,w=!!k&&k.to>k.from,C=k?k.to-k.from:0,S=e?oe(e)?.commands??[]:[],L=s.trim().toLowerCase(),z=Re(()=>{const e=te(S,w);return L?e.filter(e=>`${e.label} ${e.description??""}`.toLowerCase().includes(L)):e},[S,L,w]),A=Re(()=>ne(z),[z]);if(He(()=>{if("menu"===v.status){const e=requestAnimationFrame(()=>a.current?.focus());return()=>cancelAnimationFrame(e)}"closed"===v.status&&(d(""),p(null),g(-1),x(!1))},[v.status]),He(()=>{g(e=>e>=z.length?z.length-1:e)},[z.length]),He(()=>{if(!e||!k||!r.current)return void f(null);const t={getBoundingClientRect:()=>Pe(e.view,k.from,k.to)},a=()=>{r.current&&l(t,r.current,{placement:"bottom-start",strategy:"fixed",middleware:[o(8),n(),i({padding:8})]}).then(({x:e,y:t})=>f({x:e,y:t}))};return a(),window.addEventListener("resize",a),window.addEventListener("scroll",a,!0),()=>{window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0)}},[e,k?.from,k?.to,v]),He(()=>{if(!N||!e)return;const t=t=>{r.current&&!r.current.contains(t.target)&&e.commands.closeAiMenu()},a=t=>{if("Escape"===t.key)return h?void p(null):void e.commands.closeAiMenu();if("Enter"===t.key&&(t.metaKey||t.ctrlKey)){const r=ae(e.state)?.panel;"reviewing"!==r?.status||r.suggestion.isStreaming||(t.preventDefault(),e.commands.acceptAiSuggestion())}};return document.addEventListener("mousedown",t),document.addEventListener("keydown",a),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("keydown",a)}},[N,e,h]),!(t&&e&&N&&y))return null;const j=t=>{t.options?.length?p(t):e.commands.runAiCommand(t.id)};return Dt(/* @__PURE__ */Ve("div",{ref:r,role:"dialog","aria-label":"Ask AI",className:"ai-menu",style:{position:"fixed",top:y.y,left:y.x,zIndex:60},children:[
|
|
27
|
+
/* @__PURE__ */Ve("div",{className:"ai-menu-input-row",children:[/* @__PURE__ */Ke(kt,{className:"ai-menu-input-icon"}),/* @__PURE__ */Ke("input",{ref:a,value:s,onChange:e=>{d(e.target.value),g(e.target.value.trim()?0:-1)},onKeyDown:t=>{if("ArrowDown"===t.key)return t.preventDefault(),void g(e=>z.length?(e+1)%z.length:-1);if("ArrowUp"===t.key)return t.preventDefault(),void g(e=>z.length?e<=0?z.length-1:e-1:-1);if("Enter"===t.key){t.preventDefault();const r=c>=0?z[c]:void 0;if(r)return void j(r);s.trim()&&e.commands.submitAiPrompt(s)}},placeholder:w?"Ask AI to change the selection…":"Ask AI anything…",className:"ai-menu-input","aria-label":"Ask AI"})]}),"menu"===v.status&&h&&/* @__PURE__ */Ve("div",{className:"ai-menu-commands",children:[/* @__PURE__ */Ve("button",{type:"button",className:"ai-menu-row",onClick:()=>p(null),children:[/* @__PURE__ */Ke(Je,{className:"ai-menu-row-icon"}),h.label]}),h.options?.map(t=>/* @__PURE__ */Ke("button",{type:"button",className:"ai-menu-command",onClick:()=>{p(null),e.commands.runAiCommand(h.id,t.label)},children:/* @__PURE__ */Ke("span",{className:"ai-menu-command-text",children:/* @__PURE__ */Ke("span",{className:"ai-menu-command-label",children:t.label})})},t.id))]}),"menu"===v.status&&!h&&/* @__PURE__ */Ve(Ge,{children:[/* @__PURE__ */Ke("div",{className:"ai-menu-hint",children:w?`${C.toLocaleString()} characters selected`:"Nothing selected — select text for rewrite actions"}),/* @__PURE__ */Ve("div",{className:"ai-menu-commands",children:[0===A.length&&/* @__PURE__ */Ke("div",{className:"ai-menu-empty",children:"No matching actions"}),A.map(e=>/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("div",{className:"ai-menu-group-label",children:re[e.group]}),e.commands.map(e=>{const t=z.indexOf(e);/* @__PURE__ */
|
|
28
|
+
return Ve("button",{type:"button","data-active":t===c?"true":void 0,onMouseEnter:()=>g(t),onClick:()=>j(e),className:"ai-menu-command",children:[
|
|
29
|
+
/* @__PURE__ */Ke(e.icon,{className:"ai-menu-row-icon"}),
|
|
30
|
+
/* @__PURE__ */Ve("span",{className:"ai-menu-command-text",children:[/* @__PURE__ */Ke("span",{className:"ai-menu-command-label",children:e.label}),e.description&&/* @__PURE__ */Ke("span",{className:"ai-menu-command-description",children:e.description})]}),e.options?.length?/* @__PURE__ */Ke("span",{className:"ai-menu-command-more",children:"›"}):null]},e.id)})]},e.group))]})]}),"loading"===v.status&&/* @__PURE__ */Ve("div",{className:"ai-menu-loading",children:[
|
|
31
|
+
/* @__PURE__ */Ke(it,{className:"ai-menu-row-icon ai-menu-spin"}),
|
|
32
|
+
/* @__PURE__ */Ke("span",{className:"ai-menu-loading-label",children:"Custom"===v.commandLabel?"Generating…":`${v.commandLabel}…`}),
|
|
33
|
+
/* @__PURE__ */Ve("button",{type:"button",className:"ai-menu-stop",onClick:()=>e.commands.stopAiGeneration(),children:[/* @__PURE__ */Ke(wt,{className:"ai-menu-row-icon"}),"Stop"]})]}),"error"===v.status&&/* @__PURE__ */Ve("div",{className:"ai-menu-error",children:[/* @__PURE__ */Ke("p",{className:"ai-menu-error-message",children:v.message}),/* @__PURE__ */Ve("div",{className:"ai-menu-review",children:[/* @__PURE__ */Ke(qt,{icon:bt,label:"Try again",onClick:()=>e.commands.retryAiSuggestion()}),/* @__PURE__ */Ke(qt,{icon:Mt,label:"Dismiss",onClick:()=>e.commands.closeAiMenu()})]})]}),"reviewing"===v.status&&/* @__PURE__ */Ve(Ge,{children:[/* @__PURE__ */Ke("div",{className:"ai-menu-preview","aria-live":"polite",children:v.suggestion.suggestedText||"…"}),v.suggestion.isStreaming?/* @__PURE__ */Ve("div",{className:"ai-menu-loading",children:[
|
|
34
|
+
/* @__PURE__ */Ke(it,{className:"ai-menu-row-icon ai-menu-spin"}),
|
|
35
|
+
/* @__PURE__ */Ve("span",{className:"ai-menu-loading-label",children:[v.commandLabel,"…"]}),
|
|
36
|
+
/* @__PURE__ */Ve("button",{type:"button",className:"ai-menu-stop",onClick:()=>e.commands.stopAiGeneration(),children:[/* @__PURE__ */Ke(wt,{className:"ai-menu-row-icon"}),"Stop"]})]}):/* @__PURE__ */Ve("div",{className:"ai-menu-review",children:[
|
|
37
|
+
/* @__PURE__ */Ke(qt,{icon:qe,label:"replace"===v.suggestion.mode?"Replace selection":"Insert",title:"⌘/Ctrl + Enter",onClick:()=>e.commands.acceptAiSuggestion()}),
|
|
38
|
+
/* @__PURE__ */Ke(qt,{icon:Xe,label:"Insert below",onClick:()=>e.commands.insertAiSuggestionBelow()}),
|
|
39
|
+
/* @__PURE__ */Ke(qt,{icon:bt,label:"Try again",onClick:()=>e.commands.retryAiSuggestion()}),
|
|
40
|
+
/* @__PURE__ */Ke(qt,{icon:Qe,label:b?"Copied":"Copy",onClick:()=>(async e=>{try{await navigator.clipboard.writeText(e),x(!0),setTimeout(()=>x(!1),1500)}catch{}})(v.suggestion.suggestedText)}),
|
|
41
|
+
/* @__PURE__ */Ke(qt,{icon:Mt,label:"Discard",onClick:()=>e.commands.discardAiSuggestion()})]})]})]}),document.body)}function Zt({editor:e,label:t="AI"}){const{editor:r}=g(e),a=$e(null),s=$e(null),[d,c]=Oe(!1),[m,u]=Oe(null),[h,p]=Oe(null),{hasSelection:b,isBusy:x}=Te({editor:r,selector:({editor:e})=>{if(!e)return{hasSelection:!1,isBusy:!1};const t=ae(e.state)?.panel.status;return{hasSelection:!e.state.selection.empty,isBusy:"loading"===t||"reviewing"===t}}})??{hasSelection:!1,isBusy:!1},y=r?oe(r)?.commands??[]:[],f=Re(()=>ne(te(y,b)),[y,b]);if(He(()=>{if(!d||!a.current||!s.current)return;const e=a.current,t=()=>{s.current&&l(e,s.current,{placement:"bottom-start",strategy:"fixed",middleware:[o(6),n(),i({padding:8})]}).then(({x:e,y:t})=>p({x:e,y:t}))};return t(),window.addEventListener("resize",t),window.addEventListener("scroll",t,!0),()=>{window.removeEventListener("resize",t),window.removeEventListener("scroll",t,!0)}},[d,f.length,m]),He(()=>{if(!d)return u(null),void p(null);const e=e=>{const t=e.target;s.current?.contains(t)||a.current?.contains(t)||c(!1)},t=e=>{"Escape"===e.key&&c(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[d]),!ee(r))return null;const v=(e,t)=>{!e.options?.length||t?(c(!1),r?.chain().focus().run(),r?.commands.runAiCommand(e.id,t)):u(e)};/* @__PURE__ */
|
|
42
|
+
return Ve(Ge,{children:[/* @__PURE__ */Ve("button",{ref:a,type:"button",title:"AI writing assistant (Ctrl/⌘ + J)","aria-haspopup":"menu","aria-expanded":d,"data-state":d?"open":"closed",className:"ai-toolbar-button",onMouseDown:e=>e.preventDefault(),onClick:()=>c(e=>!e),children:[x?/* @__PURE__ */Ke(it,{className:"ai-toolbar-icon ai-menu-spin"}):/* @__PURE__ */Ke(kt,{className:"ai-toolbar-icon"}),t&&/* @__PURE__ */Ke("span",{className:"ai-toolbar-label",children:t}),
|
|
43
|
+
/* @__PURE__ */Ke(Ue,{className:"ai-toolbar-chevron"})]}),d&&Dt(/* @__PURE__ */Ke("div",{ref:s,role:"menu","aria-label":"AI actions",className:"ai-menu ai-toolbar-menu",style:{position:"fixed",top:h?.y??-9999,left:h?.x??-9999,visibility:h?"visible":"hidden",zIndex:60},children:m?/* @__PURE__ */Ve("div",{className:"ai-menu-commands",children:[/* @__PURE__ */Ve("button",{type:"button",className:"ai-menu-row",onClick:()=>u(null),children:[/* @__PURE__ */Ke(Je,{className:"ai-menu-row-icon"}),m.label]}),m.options?.map(e=>/* @__PURE__ */Ke("button",{type:"button",className:"ai-menu-command",onClick:()=>v(m,e.label),children:/* @__PURE__ */Ke("span",{className:"ai-menu-command-text",children:/* @__PURE__ */Ke("span",{className:"ai-menu-command-label",children:e.label})})},e.id))]}):/* @__PURE__ */Ve(Ge,{children:[
|
|
44
|
+
/* @__PURE__ */Ve("button",{type:"button",className:"ai-menu-command ai-menu-ask",onClick:()=>{c(!1),r?.chain().focus().run(),r?.commands.openAiMenu()},children:[
|
|
45
|
+
/* @__PURE__ */Ke(kt,{className:"ai-menu-row-icon"}),
|
|
46
|
+
/* @__PURE__ */Ve("span",{className:"ai-menu-command-text",children:[/* @__PURE__ */Ke("span",{className:"ai-menu-command-label",children:"Ask AI anything…"}),/* @__PURE__ */Ke("span",{className:"ai-menu-command-description",children:"Write your own instruction"})]}),
|
|
47
|
+
/* @__PURE__ */Ke("span",{className:"ai-menu-command-shortcut",children:"⌘J"})]}),
|
|
48
|
+
/* @__PURE__ */Ke("div",{className:"ai-menu-hint",children:b?"Runs on the selected text":"Select text to rewrite it, or generate from the caret"}),
|
|
49
|
+
/* @__PURE__ */Ke("div",{className:"ai-menu-commands",children:f.map(e=>/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("div",{className:"ai-menu-group-label",children:re[e.group]}),e.commands.map(e=>/* @__PURE__ */Ve("button",{type:"button",className:"ai-menu-command",onClick:()=>v(e),children:[
|
|
50
|
+
/* @__PURE__ */Ke(e.icon,{className:"ai-menu-row-icon"}),
|
|
51
|
+
/* @__PURE__ */Ve("span",{className:"ai-menu-command-text",children:[/* @__PURE__ */Ke("span",{className:"ai-menu-command-label",children:e.label}),e.description&&/* @__PURE__ */Ke("span",{className:"ai-menu-command-description",children:e.description})]}),e.options?.length?/* @__PURE__ */Ke("span",{className:"ai-menu-command-more",children:"›"}):null]},e.id))]},e.group))})]})}),document.body)]})}var _t={available:!1,state:"idle",isActive:!1,isSpeaking:!1,isPaused:!1,currentChunk:null,error:null};var Yt={available:!1,isListening:!1,partial:"",lastPhrase:"",phraseId:0,error:null};function Qt(e){const t=Ie(t=>e?ge(e,t):()=>{},[e]);if("none"===Fe(t,()=>{const t=e?ce(e):void 0;return t?`${t.listening}|${t.phraseId}|${t.error?.message??""}`:"none"},()=>"none")||!e)return Yt;const r=ce(e);return r?{available:!0,isListening:r.listening,partial:r.partial,lastPhrase:r.lastPhrase,phraseId:r.phraseId,error:r.error}:Yt}function Xt({editor:e,durationMs:t=2e3}){const{isListening:r,lastPhrase:a,phraseId:n}=Qt(e);/* @__PURE__ */
|
|
52
|
+
return Ke(Et,{durationMs:t,phrase:a,phraseId:n,visible:r})}var er=[".dropdown-container",".dropdown-portal","[data-richtext-portal]","[data-radix-popper-content-wrapper]","[data-radix-portal]",'[role="dialog"]','[role="menu"]','[role="listbox"]'].join(",");var tr="rte-custom-styles",rr="rte-custom-style-presets",ar="rte-active-style-preset";function nr(e){(function(e){const t=e;return!!t?.closest&&!t.closest('input, textarea, select, [contenteditable="true"], [role="textbox"]')&&!!t.closest('button, [role="button"], [role="menuitem"], [role="menuitemcheckbox"]')})(e.target)&&e.preventDefault()}function or(e){const t=$e(!1);return{onMouseDown:e=>{t.current=e.target===e.currentTarget},onClick:r=>{t.current&&r.target===r.currentTarget&&(t.current=!1,e())}}}function lr({onClose:e}){const[t,r]=Oe(()=>{try{const e=localStorage.getItem(rr);return e?JSON.parse(e):[{id:"1",name:"Default",rules:[{id:1,selector:".ProseMirror p",property:"font-size",value:"16px"},{id:2,selector:".ProseMirror h1",property:"color",value:"#111827"}],active:!0}]}catch{return[]}}),[a,n]=Oe(()=>{try{return localStorage.getItem(ar)||t[0]?.id||"1"}catch{return"1"}}),[o,l]=Oe(null),[i,s]=Oe(""),d=t.find(e=>e.id===a)||t[0],[c,m]=Oe(d?.rules||[]),g=$e(c.length?Math.max(...c.map(e=>e.id),0)+1:1),u=e=>{let t=document.getElementById(tr);t||(t=document.createElement("style"),t.id=tr,document.head.appendChild(t)),t.textContent=e.filter(e=>e.selector&&e.property&&e.value).map(e=>`${e.selector} { ${e.property}: ${e.value}; }`).join("\n")},h=e=>{const r=t.find(t=>t.id===e);r&&(n(e),m([...r.rules]),u(r.rules),localStorage.setItem(ar,e))},p=()=>{if(t.length>=10)return void alert("Maximum 10 style presets allowed");if(!i.trim())return void alert("Please enter a name for the preset");const e=Math.max(...t.map(e=>parseInt(e.id)),0)+1,a={id:String(e),name:i,rules:[{id:1,selector:".ProseMirror p",property:"font-size",value:"16px"}],active:!1},n=[...t,a];r(n),localStorage.setItem(rr,JSON.stringify(n)),s(""),h(a.id)},b=(e,a)=>{if(!a.trim())return;const n=t.map(t=>t.id===e?{...t,name:a}:t);r(n),localStorage.setItem(rr,JSON.stringify(n)),l(null)},x=(e,t,r)=>m(a=>a.map(a=>a.id===e?{...a,[t]:r}:a)),y=or(e);return Dt(/* @__PURE__ */Ve("div",{className:"fixed inset-0 z-[100] flex items-center justify-center",children:[/* @__PURE__ */Ke("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",...y}),/* @__PURE__ */Ve("div",{className:"relative bg-white dark:bg-slate-900 border border-gray-200 dark:border-slate-700 rounded-xl shadow-2xl w-[640px] max-h-[85vh] flex flex-col",onClick:e=>e.stopPropagation(),children:[
|
|
53
|
+
/* @__PURE__ */Ve("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-100 dark:border-slate-700",children:[/* @__PURE__ */Ve("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */Ke(ut,{size:16,className:"text-blue-500"}),/* @__PURE__ */Ke("span",{className:"text-sm font-semibold",children:"Customize Editor Styles"})]}),/* @__PURE__ */Ke("button",{onClick:e,className:"p-1 rounded hover:bg-gray-100 dark:hover:bg-slate-800",children:/* @__PURE__ */Ke(Mt,{size:14})})]}),
|
|
54
|
+
/* @__PURE__ */Ve("div",{className:"px-4 py-3 border-b border-gray-100 dark:border-slate-700 space-y-2",children:[
|
|
55
|
+
/* @__PURE__ */Ke("div",{className:"text-xs font-semibold text-gray-700 dark:text-gray-300",children:"Style Presets"}),
|
|
56
|
+
/* @__PURE__ */Ke("div",{className:"flex gap-2 flex-wrap",children:t.map(e=>/* @__PURE__ */Ve("div",{className:"flex items-center gap-1",children:[/* @__PURE__ */Ke("button",{onClick:()=>h(e.id),className:"px-3 py-1.5 text-xs rounded transition-colors "+(a===e.id?"bg-blue-500 text-white border-blue-600":"border border-gray-200 dark:border-slate-700 hover:bg-gray-50 dark:hover:bg-slate-800"),children:o===e.id?/* @__PURE__ */Ke("input",{autoFocus:!0,type:"text",value:i,onChange:e=>s(e.target.value),onBlur:()=>b(e.id,i),onKeyDown:t=>"Enter"===t.key&&b(e.id,i),className:"w-20 px-1 py-0.5 text-xs bg-transparent border-b border-current outline-none"}):/* @__PURE__ */Ke("span",{onDoubleClick:()=>{l(e.id),s(e.name)},children:e.name})}),t.length>1&&/* @__PURE__ */Ke("button",{onClick:()=>(e=>{if(t.length<=1)return void alert("Cannot delete the last preset");if(!confirm("Are you sure you want to delete this preset?"))return;const n=t.filter(t=>t.id!==e);r(n),localStorage.setItem(rr,JSON.stringify(n)),a===e&&h(n[0].id)})(e.id),className:"p-0.5 rounded text-gray-400 hover:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:/* @__PURE__ */Ke(Mt,{size:12})})]},e.id))}),t.length<10&&/* @__PURE__ */Ve("div",{className:"flex gap-2 pt-2",children:[/* @__PURE__ */Ke("input",{type:"text",value:i,onChange:e=>s(e.target.value),placeholder:"New preset name...",onKeyDown:e=>"Enter"===e.key&&p(),className:"flex-1 px-2 py-1.5 text-xs border rounded bg-white dark:bg-slate-800 border-gray-200 dark:border-slate-700"}),/* @__PURE__ */Ve("button",{onClick:p,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs border rounded hover:bg-gray-50 dark:hover:bg-slate-800",children:[/* @__PURE__ */Ke(pt,{size:12}),"Add"]})]})]}),
|
|
57
|
+
/* @__PURE__ */Ve("div",{className:"px-4 py-2 text-xs text-gray-500 dark:text-gray-400 border-b border-gray-100 dark:border-slate-700",children:["CSS rules applied live to the editor. Target ",
|
|
58
|
+
/* @__PURE__ */Ke("code",{className:"bg-gray-100 dark:bg-slate-800 px-1 rounded",children:".ProseMirror"})," elements."]}),
|
|
59
|
+
/* @__PURE__ */Ve("div",{className:"overflow-y-auto flex-1 p-4 space-y-2",children:[0===c.length&&/* @__PURE__ */Ke("div",{className:"text-center text-xs text-gray-400 py-6",children:"No rules yet. Click + Add Rule to begin."}),c.map(e=>/* @__PURE__ */Ve("div",{className:"flex items-center gap-2 group",children:[
|
|
60
|
+
/* @__PURE__ */Ke("input",{className:"flex-1 min-w-0 px-2 py-1.5 text-xs border rounded bg-white dark:bg-slate-800 border-gray-200 dark:border-slate-700 font-mono",placeholder:".ProseMirror p",value:e.selector,onChange:t=>x(e.id,"selector",t.target.value)}),
|
|
61
|
+
/* @__PURE__ */Ke("input",{className:"w-32 px-2 py-1.5 text-xs border rounded bg-white dark:bg-slate-800 border-gray-200 dark:border-slate-700 font-mono",placeholder:"font-size",value:e.property,onChange:t=>x(e.id,"property",t.target.value)}),
|
|
62
|
+
/* @__PURE__ */Ke("input",{className:"w-28 px-2 py-1.5 text-xs border rounded bg-white dark:bg-slate-800 border-gray-200 dark:border-slate-700 font-mono",placeholder:"16px",value:e.value,onChange:t=>x(e.id,"value",t.target.value)}),
|
|
63
|
+
/* @__PURE__ */Ke("button",{onClick:()=>{return t=e.id,m(e=>e.filter(e=>e.id!==t));var t},className:"p-1 rounded text-gray-300 hover:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 opacity-0 group-hover:opacity-100 transition-opacity",children:/* @__PURE__ */Ke(Lt,{size:13})})]},e.id))]}),
|
|
64
|
+
/* @__PURE__ */Ve("div",{className:"px-4 py-3 border-t border-gray-100 dark:border-slate-700 flex items-center justify-between",children:[/* @__PURE__ */Ve("button",{onClick:()=>{const e={id:g.current++,selector:"",property:"",value:""};m(t=>[...t,e])},className:"flex items-center gap-1.5 px-3 py-1.5 text-xs border rounded hover:bg-gray-50 dark:hover:bg-slate-800",children:[/* @__PURE__ */Ke(pt,{size:12}),"Add Rule"]}),/* @__PURE__ */Ve("div",{className:"flex gap-2",children:[/* @__PURE__ */Ke("button",{onClick:e,className:"px-3 py-1.5 text-xs border rounded hover:bg-gray-50 dark:hover:bg-slate-800",children:"Cancel"}),/* @__PURE__ */Ke("button",{onClick:()=>{const e=t.map(e=>e.id===a?{...e,rules:[...c]}:e);r(e),localStorage.setItem(rr,JSON.stringify(e)),u(c)},className:"px-3 py-1.5 text-xs bg-blue-500 text-white rounded hover:bg-blue-600",children:"Save Style"})]})]})]})]}),document.body)}function ir({children:e,label:t,shortcut:r,icon:a,displayIcon:n}){const o=$e(null);/* @__PURE__ */
|
|
65
|
+
return Ve("div",{ref:o,onClick:e=>{e.target.closest('button, [role="button"], a, select')||(o.current?.querySelector('button, [role="button"]'))?.click()},className:"relative flex items-center gap-3 px-3 py-1.5 rounded cursor-pointer hover:bg-gray-100 dark:hover:bg-slate-800 transition-colors",children:[(a||n)&&/* @__PURE__ */Ke("span",{className:"w-5 flex items-center justify-center text-gray-500 dark:text-gray-400 shrink-0 text-sm font-mono",children:n||a}),
|
|
66
|
+
/* @__PURE__ */Ke("span",{className:"flex-1 text-sm text-gray-700 dark:text-gray-200",children:t}),r&&/* @__PURE__ */Ke("span",{className:"text-xs text-gray-400 dark:text-gray-500 ml-4 whitespace-nowrap",children:r}),
|
|
67
|
+
/* @__PURE__ */Ke("span",{className:"absolute inset-0 opacity-0 pointer-events-none","aria-hidden":!0,children:e}),
|
|
68
|
+
/* @__PURE__ */Ke("span",{className:"hidden",children:e})]})}function sr({icon:e,label:t,shortcut:r,onClick:a,disabled:n}){/* @__PURE__ */
|
|
69
|
+
return Ve("button",{onClick:a,disabled:n,className:"flex items-center gap-3 w-full px-3 py-1.5 rounded cursor-pointer hover:bg-gray-100 dark:hover:bg-slate-800 transition-colors disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",children:[e&&/* @__PURE__ */Ke("span",{className:"w-5 flex items-center justify-center text-gray-500 dark:text-gray-400 shrink-0",children:e}),
|
|
70
|
+
/* @__PURE__ */Ke("span",{className:"flex-1 text-left text-sm text-gray-700 dark:text-gray-200",children:t}),r&&/* @__PURE__ */Ke("span",{className:"text-xs text-gray-400 dark:text-gray-500 ml-4 whitespace-nowrap",children:r})]})}function dr({icon:e,label:t,checked:r,onChange:a}){/* @__PURE__ */
|
|
71
|
+
return Ve("button",{type:"button",role:"menuitemcheckbox","aria-checked":r,onClick:()=>a(!r),className:"flex items-center gap-3 w-full px-3 py-1.5 rounded cursor-pointer hover:bg-gray-100 dark:hover:bg-slate-800 transition-colors",children:[e&&/* @__PURE__ */Ke("span",{className:"w-5 flex items-center justify-center text-gray-500 dark:text-gray-400 shrink-0",children:e}),
|
|
72
|
+
/* @__PURE__ */Ke("span",{className:"flex-1 text-left text-sm text-gray-700 dark:text-gray-200",children:t}),
|
|
73
|
+
/* @__PURE__ */Ke("span",{className:"flex h-4 w-4 items-center justify-center rounded border shrink-0 transition-colors "+(r?"bg-blue-500 border-blue-500 text-white":"border-gray-300 dark:border-slate-600"),children:r&&/* @__PURE__ */Ke(qe,{size:12,strokeWidth:3})})]})}function cr({children:e,label:t,name:r,active:a,onClick:n}){/* @__PURE__ */
|
|
74
|
+
return Ve("button",{title:t,onClick:e=>n(r,e),className:"flex items-center gap-0.5 px-1.5 py-1 rounded text-sm font-medium transition-colors "+(a?"bg-gray-200 dark:bg-slate-700 text-gray-900 dark:text-white":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-slate-800 hover:text-gray-900 dark:hover:text-white"),children:[e,/* @__PURE__ */Ke(Ue,{size:10,className:"opacity-40 mt-0.5"})]})}function mr({top:e,left:t,right:r,className:a="",children:n}){const o=$e(null),[l,i]=Oe({top:e,left:-9999,visibility:"hidden"});return We(()=>{const a=()=>{const a=o.current;if(!a)return;const n=window.innerWidth,l=window.innerHeight,s=Math.max(160,l-e-8);if(n<=640)return void i({top:e,left:8,right:8,width:"auto",minWidth:0,maxWidth:"none",maxHeight:s,overflowY:"auto"});const d=a.offsetWidth,c=null!=r?n-r-d:t??8,m=Math.max(8,Math.min(c,n-d-8));i({top:e,left:m,maxWidth:n-16,maxHeight:s,overflowY:"auto"})};return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[e,t,r]),/* @__PURE__ */Ke("div",{className:`fixed bg-white/70 dark:bg-slate-900/70 backdrop-blur-md border border-gray-200/60 dark:border-slate-700/60 rounded-lg shadow-xl py-1 z-50 min-w-[220px] dropdown-portal ${a}`,onMouseDown:nr,ref:o,style:l,children:n})}function gr({onClose:e,documentTitle:t,editor:r,initialTab:a="info"}){const[n,o]=Oe(a),[l,i]=Oe(()=>je(r));He(()=>{if(!r)return;const e=()=>i(je(r));return e(),r.on("update",e),()=>{r.off("update",e)}},[r]);const{createdDate:s,modifiedDate:d}=Re(()=>({createdDate:/* @__PURE__ */new Date(Date.now()-2592e6),modifiedDate:/* @__PURE__ */new Date}),[]),[c,m]=Oe(""),[g,u]=Oe("viewer"),[h,p]=Oe({isPublic:!1,sharedWith:[{email:"alice@example.com",role:"editor",sharedAt:/* @__PURE__ */(new Date).toISOString(),name:"Alice"},{email:"bob@example.com",role:"viewer",sharedAt:/* @__PURE__ */(new Date).toISOString(),name:"Bob"}],shareLink:null}),b=()=>{c.trim()&&(h.sharedWith.find(e=>e.email===c)?alert("Already shared with this email"):(p(e=>({...e,sharedWith:[...e.sharedWith,{email:c,role:g,sharedAt:/* @__PURE__ */(new Date).toISOString()}]})),m("")))},x=e=>{switch(e){case"editor":/* @__PURE__ */return Ke(tt,{size:14});case"commentor":/* @__PURE__ */return Ke(ct,{size:14});case"viewer":/* @__PURE__ */return Ke(rt,{size:14});default:return null}},y=[{label:"Words",value:l.words},{label:"Characters (with spaces)",value:l.charactersWithSpaces},{label:"Characters (no spaces)",value:l.charactersNoSpaces},{label:"Sentences",value:l.sentences},{label:"Paragraphs",value:l.paragraphs},{label:"Links",value:l.links},{label:"Images",value:l.images}],f=e=>"px-3 py-1.5 text-sm rounded-md transition-colors "+(n===e?"bg-white dark:bg-slate-900 text-gray-900 dark:text-white shadow-sm font-medium":"text-gray-500 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"),v=or(e);return Dt(/* @__PURE__ */Ve("div",{className:"fixed inset-0 z-[100] flex items-center justify-center",children:[/* @__PURE__ */Ke("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",...v}),/* @__PURE__ */Ve("div",{className:"relative bg-white dark:bg-slate-900 border border-gray-200 dark:border-slate-700 rounded-xl shadow-2xl w-[600px] max-h-[85vh] flex flex-col",onClick:e=>e.stopPropagation(),children:[
|
|
75
|
+
/* @__PURE__ */Ve("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-100 dark:border-slate-700",children:[/* @__PURE__ */Ve("div",{className:"flex items-center gap-3 min-w-0",children:[/* @__PURE__ */Ke(nt,{size:18,className:"text-blue-500 shrink-0"}),/* @__PURE__ */Ve("div",{className:"min-w-0",children:[/* @__PURE__ */Ke("h2",{className:"font-semibold text-gray-900 dark:text-white truncate",children:t}),/* @__PURE__ */Ke("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:"info"===n?"Document details and statistics":"Manage who can access this document"})]})]}),/* @__PURE__ */Ke("button",{onClick:e,className:"p-1 rounded hover:bg-gray-100 dark:hover:bg-slate-800",children:/* @__PURE__ */Ke(Mt,{size:16})})]}),
|
|
76
|
+
/* @__PURE__ */Ke("div",{className:"px-6 pt-3",children:/* @__PURE__ */Ve("div",{className:"inline-flex gap-1 p-1 rounded-lg bg-gray-100 dark:bg-slate-800",children:[/* @__PURE__ */Ke("button",{className:f("info"),onClick:()=>o("info"),type:"button",children:"Info & word count"}),/* @__PURE__ */Ke("button",{className:f("share"),onClick:()=>o("share"),type:"button",children:"Sharing"})]})}),
|
|
77
|
+
/* @__PURE__ */Ve("div",{className:"overflow-y-auto flex-1 p-6 space-y-6 "+("info"===n?"":"hidden"),children:[
|
|
78
|
+
/* @__PURE__ */Ve("div",{className:"space-y-4",children:[
|
|
79
|
+
/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("p",{className:"text-xs font-semibold uppercase text-gray-500 dark:text-gray-400 mb-2",children:"Document Name"}),/* @__PURE__ */Ke("p",{className:"text-sm text-gray-900 dark:text-white break-words",children:t})]}),
|
|
80
|
+
/* @__PURE__ */Ve("div",{className:"grid grid-cols-2 gap-4",children:[/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("p",{className:"text-xs font-semibold uppercase text-gray-500 dark:text-gray-400 mb-2",children:"Created"}),/* @__PURE__ */Ke("p",{className:"text-sm text-gray-900 dark:text-white",children:s.toLocaleDateString()})]}),/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("p",{className:"text-xs font-semibold uppercase text-gray-500 dark:text-gray-400 mb-2",children:"Last Modified"}),/* @__PURE__ */Ke("p",{className:"text-sm text-gray-900 dark:text-white",children:d.toLocaleDateString()})]})]}),
|
|
81
|
+
/* @__PURE__ */Ve("div",{className:"grid grid-cols-2 gap-4",children:[/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("p",{className:"text-xs font-semibold uppercase text-gray-500 dark:text-gray-400 mb-2",children:"Access"}),/* @__PURE__ */Ke("p",{className:"text-sm text-gray-900 dark:text-white",children:h.isPublic?"Public":"Private"})]}),/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("p",{className:"text-xs font-semibold uppercase text-gray-500 dark:text-gray-400 mb-2",children:"Shared with"}),/* @__PURE__ */Ke("p",{className:"text-sm text-gray-900 dark:text-white",children:1===h.sharedWith.length?"1 person":`${h.sharedWith.length} people`})]})]})]}),
|
|
82
|
+
/* @__PURE__ */Ve("div",{className:"space-y-2",children:[/* @__PURE__ */Ke("h3",{className:"text-xs font-semibold uppercase text-gray-500 dark:text-gray-400",children:"Word Count"}),/* @__PURE__ */Ke("table",{className:"w-full text-sm",children:/* @__PURE__ */Ke("tbody",{children:y.map(e=>/* @__PURE__ */Ve("tr",{className:"border-b border-gray-100 dark:border-slate-700 last:border-b-0",children:[/* @__PURE__ */Ke("td",{className:"py-1.5 pr-2 text-gray-500 dark:text-gray-400",children:e.label}),/* @__PURE__ */Ke("td",{className:"py-1.5 text-right font-semibold tabular-nums text-gray-900 dark:text-white",children:e.value.toLocaleString()})]},e.label))})})]}),
|
|
83
|
+
/* @__PURE__ */Ve("button",{onClick:()=>o("share"),className:"flex items-center gap-2 px-3 py-2 text-sm border border-gray-200 dark:border-slate-700 rounded-lg hover:bg-gray-50 dark:hover:bg-slate-800 text-gray-700 dark:text-gray-200",children:[/* @__PURE__ */Ke(vt,{size:14}),"Manage sharing"]})]}),
|
|
84
|
+
/* @__PURE__ */Ve("div",{className:"overflow-y-auto flex-1 p-6 space-y-6 "+("share"===n?"":"hidden"),children:[
|
|
85
|
+
/* @__PURE__ */Ve("div",{className:"flex items-center justify-between p-4 rounded-lg border border-gray-200 dark:border-slate-700 bg-gray-50 dark:bg-slate-800/50",children:[/* @__PURE__ */Ve("div",{className:"flex items-center gap-3",children:[h.isPublic?/* @__PURE__ */Ke(ot,{size:18,className:"text-blue-500"}):/* @__PURE__ */Ke(st,{size:18,className:"text-gray-400"}),/* @__PURE__ */Ve("div",{children:[/* @__PURE__ */Ke("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:h.isPublic?"Public":"Private"}),/* @__PURE__ */Ke("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:h.isPublic?"Anyone with link can view":"Only invited people can access"})]})]}),/* @__PURE__ */Ve("div",{className:"flex items-center gap-3",children:[h.isPublic&&h.shareLink&&/* @__PURE__ */Ke("button",{onClick:()=>{h.shareLink&&(navigator.clipboard.writeText(h.shareLink),alert("Link copied to clipboard"))},className:"px-2 py-1 text-xs border border-gray-300 dark:border-slate-600 rounded hover:bg-gray-100 dark:hover:bg-slate-700 transition-colors",children:"Copy link"}),/* @__PURE__ */Ke("button",{onClick:()=>{p(e=>({...e,isPublic:!e.isPublic,shareLink:e.isPublic?null:`https://docs.example.com/share/${Math.random().toString(36).slice(2,9)}`}))},className:"relative inline-flex h-6 w-11 items-center rounded-full transition-colors "+(h.isPublic?"bg-blue-500":"bg-gray-300 dark:bg-slate-700"),children:/* @__PURE__ */Ke("span",{className:"inline-block h-4 w-4 transform rounded-full bg-white transition "+(h.isPublic?"translate-x-6":"translate-x-1")})})]})]}),
|
|
86
|
+
/* @__PURE__ */Ve("div",{className:"space-y-2",children:[/* @__PURE__ */Ke("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Add people"}),/* @__PURE__ */Ve("div",{className:"flex gap-2",children:[
|
|
87
|
+
/* @__PURE__ */Ve("div",{className:"relative flex-1",children:[/* @__PURE__ */Ke(dt,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),/* @__PURE__ */Ke("input",{type:"email",placeholder:"email@example.com",value:c,onChange:e=>m(e.target.value),onKeyDown:e=>"Enter"===e.key&&b(),className:"w-full pl-9 pr-3 py-2 text-sm border border-gray-200 dark:border-slate-700 rounded-lg bg-white dark:bg-slate-800 text-gray-900 dark:text-white placeholder-gray-500"})]}),
|
|
88
|
+
/* @__PURE__ */Ve("select",{value:g,onChange:e=>u(e.target.value),className:"px-3 py-2 text-sm border border-gray-200 dark:border-slate-700 rounded-lg bg-white dark:bg-slate-800 text-gray-900 dark:text-white",children:[
|
|
89
|
+
/* @__PURE__ */Ke("option",{value:"viewer",children:"Viewer"}),
|
|
90
|
+
/* @__PURE__ */Ke("option",{value:"commentor",children:"Commentor"}),
|
|
91
|
+
/* @__PURE__ */Ke("option",{value:"editor",children:"Editor"})]}),
|
|
92
|
+
/* @__PURE__ */Ke("button",{onClick:b,className:"px-4 py-2 text-sm bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors",children:"Share"})]})]}),
|
|
93
|
+
/* @__PURE__ */Ve("div",{className:"space-y-2",children:[/* @__PURE__ */Ke("h3",{className:"text-sm font-medium text-gray-900 dark:text-white",children:"People with access"}),/* @__PURE__ */Ke("div",{className:"space-y-1 max-h-[280px] overflow-y-auto",children:h.sharedWith.length>0?h.sharedWith.map(e=>/* @__PURE__ */Ve("div",{className:"flex items-center justify-between p-3 rounded-lg hover:bg-gray-50 dark:hover:bg-slate-800/50 transition-colors",children:[/* @__PURE__ */Ve("div",{className:"flex items-center gap-3 flex-1",children:[/* @__PURE__ */Ke("div",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-gradient-to-br from-blue-400 to-blue-600 text-white text-xs font-medium",children:e.email.substring(0,2).toUpperCase()}),/* @__PURE__ */Ve("div",{className:"min-w-0",children:[/* @__PURE__ */Ke("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:e.email}),/* @__PURE__ */Ve("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:["Added ",new Date(e.sharedAt).toLocaleDateString()]})]})]}),/* @__PURE__ */Ve("div",{className:"flex items-center gap-2",children:[
|
|
94
|
+
/* @__PURE__ */Ke("span",{className:"text-gray-400 dark:text-gray-500",children:x(e.role)}),
|
|
95
|
+
/* @__PURE__ */Ve("select",{value:e.role,onChange:t=>{return r=e.email,a=t.target.value,void p(e=>({...e,sharedWith:e.sharedWith.map(e=>e.email===r?{...e,role:a}:e)}));var r,a},className:"px-2 py-1 text-xs border border-gray-200 dark:border-slate-700 rounded bg-white dark:bg-slate-800 text-gray-900 dark:text-white",children:[
|
|
96
|
+
/* @__PURE__ */Ke("option",{value:"viewer",children:"Viewer"}),
|
|
97
|
+
/* @__PURE__ */Ke("option",{value:"commentor",children:"Commentor"}),
|
|
98
|
+
/* @__PURE__ */Ke("option",{value:"editor",children:"Editor"})]}),
|
|
99
|
+
/* @__PURE__ */Ke("button",{onClick:()=>{return t=e.email,void p(e=>({...e,sharedWith:e.sharedWith.filter(e=>e.email!==t)}));var t},className:"p-1 text-gray-400 hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 rounded transition-colors",children:/* @__PURE__ */Ke(Mt,{size:14})})]})]},e.email)):/* @__PURE__ */Ve("div",{className:"text-center py-8",children:[/* @__PURE__ */Ke(At,{size:24,className:"mx-auto text-gray-300 mb-2 opacity-50"}),/* @__PURE__ */Ke("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"No one else has access yet"})]})})]})]})]})]}),document.body)}function ur({onClose:e,currentName:t}){const[r,a]=Oe(t),n=()=>{r.trim()&&r!==t&&alert(`File renamed to: ${r}`),e()},o=or(e);return Dt(/* @__PURE__ */Ve("div",{className:"fixed inset-0 z-[100] flex items-center justify-center",children:[/* @__PURE__ */Ke("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",...o}),/* @__PURE__ */Ve("div",{className:"relative bg-white dark:bg-slate-900 border border-gray-200 dark:border-slate-700 rounded-xl shadow-2xl w-[400px]",onClick:e=>e.stopPropagation(),children:[
|
|
100
|
+
/* @__PURE__ */Ve("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-100 dark:border-slate-700",children:[/* @__PURE__ */Ke("h2",{className:"font-semibold text-gray-900 dark:text-white",children:"Rename document"}),/* @__PURE__ */Ke("button",{onClick:e,className:"p-1 rounded hover:bg-gray-100 dark:hover:bg-slate-800",children:/* @__PURE__ */Ke(Mt,{size:16})})]}),
|
|
101
|
+
/* @__PURE__ */Ke("div",{className:"p-6 space-y-4",children:/* @__PURE__ */Ke("input",{type:"text",value:r,onChange:e=>a(e.target.value),onKeyDown:e=>"Enter"===e.key&&n(),autoFocus:!0,className:"w-full px-3 py-2 text-sm border border-gray-200 dark:border-slate-700 rounded-lg bg-white dark:bg-slate-800 text-gray-900 dark:text-white"})}),
|
|
102
|
+
/* @__PURE__ */Ve("div",{className:"flex gap-2 px-6 py-4 border-t border-gray-100 dark:border-slate-700 justify-end",children:[/* @__PURE__ */Ke("button",{onClick:e,className:"px-4 py-2 text-sm border border-gray-200 dark:border-slate-700 rounded-lg hover:bg-gray-50 dark:hover:bg-slate-800",children:"Cancel"}),/* @__PURE__ */Ke("button",{onClick:n,className:"px-4 py-2 text-sm bg-blue-500 text-white rounded-lg hover:bg-blue-600",children:"Rename"})]})]})]}),document.body)}var hr=({theme:e,setTheme:t,onOpenSettings:n,onAddComment:o,commentDisabled:l,showComments:i,onToggleComments:c,commentCount:m})=>{const[g,u]=Oe(null),[h,X]=Oe(null),[ee,te]=Oe(!1),[re,ae]=Oe(!1),[ne,oe]=Oe(!1),[ce,ge]=Oe(!1),[he,pe]=Oe(null),be=!!n,xe=$e(null),ye=r(),{editor:fe}=Me(),ve="Untitled Document",ke=!!fe?.extensionManager.extensions.some(e=>"harper"===e.name);He(()=>{fe&&ke&&(ne?fe.chain().focus().runProofing().run():fe.commands.clearProofing())},[ne,fe,ke]);const Ne=function(e){const t=Ie(t=>e?de(e,t):()=>{},[e]);if("none"===Fe(t,()=>{const t=e?ie(e):void 0;return t?`${t.state}|${t.currentChunk?.index??-1}|${t.error?.message??""}`:"none"},()=>"none")||!e)return _t;const r=ie(e);return r?{available:!0,state:r.state,isActive:"idle"!==r.state,isSpeaking:"speaking"===r.state,isPaused:"paused"===r.state,currentChunk:r.currentChunk,error:r.error}:_t}(fe??null),we=Qt(fe??null),Ce=fe&&!fe.state.selection.empty?"selection":"document",Se=!!fe&&se(fe).length>0,Le=!!fe?.extensionManager.extensions.some(e=>"PaginationPlus"===e.name),[ze,Ae]=Oe(!0);He(()=>{if(!fe||!Le)return;const e=fe.storage?.PaginationPlus?.enabled;"boolean"==typeof e&&Ae(e)},[fe,Le]);const je=Ie(e=>{fe&&(e?fe.commands.enablePagination?.():fe.commands.disablePagination?.(),Ae(e))},[fe]),Pe=Ie(()=>{fe?.chain().focus().run(),document.execCommand("cut")},[fe]),Te=Ie(()=>{fe?.chain().focus().run(),document.execCommand("copy")},[fe]),Be=Ie(async()=>{fe?.chain().focus().run();try{const e=await navigator.clipboard.readText();fe?.commands.insertContent(e)}catch{document.execCommand("paste")}},[fe]),De=Ie(async()=>{fe?.chain().focus().run();try{const e=await navigator.clipboard.readText();fe?.chain().focus().insertContent(e,{parseOptions:{preserveWhitespace:!0}}).run()}catch{document.execCommand("paste")}},[fe]),Ee=Ie(()=>{fe?.commands.deleteSelection()},[fe]),We=Ie(()=>{fe?.chain().focus().selectAll().run()},[fe]),Re=!!fe?.extensionManager.extensions.some(e=>"selectSimilar"===e.name),[Je,qe]=Oe(0);He(()=>{if(!fe||!Re)return;const e=()=>qe(ue.getState(fe.state)?.ranges.length??0);return e(),fe.on("transaction",e),()=>{fe.off("transaction",e)}},[fe,Re]);const Ue=Ie(e=>{fe?.chain().focus().selectSimilar(e).run()},[fe]),Xe=Ie(()=>{fe?.chain().focus().clearSimilarSelection().run()},[fe]);He(()=>{try{const e=localStorage.getItem(ar),t=JSON.parse(localStorage.getItem(rr)||"[]");if(t.length>0){const r=t.find(t=>t.id===e)||t[0];if(r&&r.rules.length>0){let e=document.getElementById(tr);e||(e=document.createElement("style"),e.id=tr,document.head.appendChild(e)),e.textContent=r.rules.filter(e=>e.selector&&e.property&&e.value).map(e=>`${e.selector} { ${e.property}: ${e.value}; }`).join("\n")}}}catch{}},[]);const rt=(e,t)=>{if(g===e)return u(null),void X(null);const r=t.currentTarget.getBoundingClientRect();X({top:r.bottom+4,left:r.left}),u(e)},it=()=>{u(null),X(null)};return He(()=>{if(!g)return;const e=e=>{(function(e,t=document){const r=e;return!!r?.isConnected&&!r.closest(er)&&!t.querySelector('[role="dialog"],[role="menu"],[role="listbox"]')})(e.target)&&it()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[g]),/* @__PURE__ */Ve(Ge,{children:[
|
|
103
|
+
/* @__PURE__ */Ve("div",{className:"flex items-center gap-0.5 border-b border-gray-200 dark:border-slate-700 px-2 py-1 flex-wrap",onMouseDown:nr,children:[
|
|
104
|
+
/* @__PURE__ */Ke(k,{hideWhenDisabled:!0}),
|
|
105
|
+
/* @__PURE__ */Ke(v,{hideWhenDisabled:!0}),
|
|
106
|
+
/* @__PURE__ */Ke("div",{className:"border-l border-gray-200 dark:border-slate-700 mx-0.5 px-0.5",children:/* @__PURE__ */Ke($t,{})}),
|
|
107
|
+
/* @__PURE__ */Ke(E,{}),
|
|
108
|
+
/* @__PURE__ */Ke(I,{}),
|
|
109
|
+
/* @__PURE__ */Ke(C,{}),
|
|
110
|
+
/* @__PURE__ */Ke(A,{}),
|
|
111
|
+
/* @__PURE__ */Ke(N,{}),
|
|
112
|
+
/* @__PURE__ */Ke(x,{}),
|
|
113
|
+
/* @__PURE__ */Ke(Zt,{}),
|
|
114
|
+
/* @__PURE__ */Ve("div",{className:"dropdown-container",children:[/* @__PURE__ */Ke(cr,{name:"block",label:"Block Format",active:"block"===g,onClick:rt,children:/* @__PURE__ */Ve("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[
|
|
115
|
+
/* @__PURE__ */Ke("line",{x1:"2",y1:"4",x2:"14",y2:"4"}),
|
|
116
|
+
/* @__PURE__ */Ke("line",{x1:"2",y1:"8",x2:"11",y2:"8"}),
|
|
117
|
+
/* @__PURE__ */Ke("line",{x1:"2",y1:"12",x2:"8",y2:"12"})]})}),"block"===g&&h&&Dt(/* @__PURE__ */Ve(mr,{className:"min-w-[400px]",left:h.left,top:h.top,children:[
|
|
118
|
+
/* @__PURE__ */Ve("div",{className:"grid grid-cols-2 gap-0.5 px-1 py-1",children:[
|
|
119
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(ir,{icon:"H1",label:"Heading 1",shortcut:"Ctrl+Alt+1",children:/* @__PURE__ */Ke(z,{level:1})})}),
|
|
120
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(ir,{icon:"H2",label:"Heading 2",shortcut:"Ctrl+Alt+2",children:/* @__PURE__ */Ke(z,{level:2})})}),
|
|
121
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(ir,{icon:"H3",label:"Heading 3",shortcut:"Ctrl+Alt+3",children:/* @__PURE__ */Ke(z,{level:3})})}),
|
|
122
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(ir,{icon:"H4",label:"Heading 4",shortcut:"Ctrl+Alt+4",children:/* @__PURE__ */Ke(z,{level:4})})}),
|
|
123
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(ir,{icon:"H5",label:"Heading 5",shortcut:"Ctrl+Alt+5",children:/* @__PURE__ */Ke(z,{level:5})})}),
|
|
124
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(ir,{icon:"H6",label:"Heading 6",shortcut:"Ctrl+Alt+6",children:/* @__PURE__ */Ke(z,{level:6})})})]}),
|
|
125
|
+
/* @__PURE__ */Ke("div",{className:"my-1 border-t border-gray-100 dark:border-slate-700"}),
|
|
126
|
+
/* @__PURE__ */Ve("div",{className:"grid grid-cols-2 gap-0.5 px-1",children:[
|
|
127
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Bullet List",shortcut:"Ctrl+Shift+8",children:/* @__PURE__ */Ke(T,{})})}),
|
|
128
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Ordered List",shortcut:"Ctrl+Shift+7",children:/* @__PURE__ */Ke(M,{})})}),
|
|
129
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Check List",shortcut:"Ctrl+Shift+9",children:/* @__PURE__ */Ke(B,{})})})]}),
|
|
130
|
+
/* @__PURE__ */Ke("div",{className:"my-1 border-t border-gray-100 dark:border-slate-700"}),
|
|
131
|
+
/* @__PURE__ */Ve("div",{className:"grid grid-cols-2 gap-0.5 px-1",children:[/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Blockquote",shortcut:"Ctrl+Shift+B",children:/* @__PURE__ */Ke(w,{})})}),/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Code Block",shortcut:"Ctrl+Alt+C",children:/* @__PURE__ */Ke(L,{})})})]}),
|
|
132
|
+
/* @__PURE__ */Ke("div",{className:"my-1 border-t border-gray-100 dark:border-slate-700"}),
|
|
133
|
+
/* @__PURE__ */Ke("div",{className:"px-1",children:/* @__PURE__ */Ke(It,{label:"Clear Format",children:/* @__PURE__ */Ke(D,{})})}),
|
|
134
|
+
/* @__PURE__ */Ve("button",{onClick:()=>{it(),te(!0)},className:"flex items-center gap-3 w-full px-3 py-1.5 text-sm text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-slate-800 rounded transition-colors",children:[/* @__PURE__ */Ke(ut,{size:14,className:"text-gray-400 shrink-0"}),"Customize default styles…"]})]}),document.body)]}),
|
|
135
|
+
/* @__PURE__ */Ve("div",{className:"dropdown-container",children:[/* @__PURE__ */Ke(cr,{name:"textstyles",label:"Text Styles",active:"textstyles"===g,onClick:rt,children:/* @__PURE__ */Ke("span",{className:"text-sm font-mono",children:"Tt"})}),"textstyles"===g&&h&&Dt(/* @__PURE__ */Ve(mr,{className:"min-w-[400px]",left:h.left,top:h.top,children:[/* @__PURE__ */Ke("div",{className:"px-2 py-1 text-[10px] font-semibold uppercase text-gray-400 tracking-wide",children:"Text Styles"}),/* @__PURE__ */Ve("div",{className:"grid grid-cols-2 gap-0.5 px-1 py-1",children:[
|
|
136
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Strikethrough",shortcut:"Ctrl+Shift+S",children:/* @__PURE__ */Ke(j,{})})}),
|
|
137
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Inline Code",shortcut:"Ctrl+E",children:/* @__PURE__ */Ke(S,{})})}),
|
|
138
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Text Color",shortcut:"Alt+Shift+C",children:/* @__PURE__ */Ke(H,{})})}),
|
|
139
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Superscript",shortcut:"Ctrl+.",children:/* @__PURE__ */Ke(Wt,{})})}),
|
|
140
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Subscript",shortcut:"Ctrl+,",children:/* @__PURE__ */Ke(Ht,{})})}),
|
|
141
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Indent",children:/* @__PURE__ */Ke(W,{})})}),
|
|
142
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Line Spacing",children:/* @__PURE__ */Ke($,{})})}),
|
|
143
|
+
/* @__PURE__ */Ke("div",{className:"col-span-2",children:/* @__PURE__ */Ke(It,{label:"Alignment",children:/* @__PURE__ */Ke(R,{})})})]})]}),document.body)]}),
|
|
144
|
+
/* @__PURE__ */Ve("div",{className:"dropdown-container",children:[/* @__PURE__ */Ke(cr,{name:"insert",label:"Insert",active:"insert"===g,onClick:rt,children:/* @__PURE__ */Ke(pt,{size:16})}),"insert"===g&&h&&Dt(/* @__PURE__ */Ve(mr,{className:"min-w-[300px]",left:h.left,top:h.top,children:[/* @__PURE__ */Ke("div",{className:"px-2 py-1 text-[10px] font-semibold uppercase text-gray-400 tracking-wide",children:"Insert"}),/* @__PURE__ */Ve("div",{className:"grid grid-cols-2 gap-0.5 px-1",children:[
|
|
145
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Link",children:/* @__PURE__ */Ke(f,{})})}),
|
|
146
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Emoji",children:/* @__PURE__ */Ke(O,{})})}),
|
|
147
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Table",children:/* @__PURE__ */Ke(V,{})})}),
|
|
148
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Image",children:/* @__PURE__ */Ke(d,{})})}),
|
|
149
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Meme",children:/* @__PURE__ */Ke(K,{})})}),
|
|
150
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Document",children:/* @__PURE__ */Ke(F,{})})}),
|
|
151
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Columns",shortcut:"Ctrl+Alt+G",children:/* @__PURE__ */Ke(J,{})})}),
|
|
152
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Callout",children:/* @__PURE__ */Ke(s,{})})}),
|
|
153
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Twitter",children:/* @__PURE__ */Ke(q,{})})}),
|
|
154
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Divider",shortcut:"Ctrl+Alt+S",children:/* @__PURE__ */Ke(y,{})})}),
|
|
155
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Video",children:/* @__PURE__ */Ke(p,{})})}),
|
|
156
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Math",children:/* @__PURE__ */Ke(G,{})})}),
|
|
157
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Flowchart",children:/* @__PURE__ */Ke(U,{})})}),
|
|
158
|
+
/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ke(It,{label:"Drawio",children:/* @__PURE__ */Ke(le,{})})}),o&&/* @__PURE__ */Ke("div",{children:/* @__PURE__ */Ve("button",{type:"button",disabled:l,onClick:()=>{it(),o()},className:"flex items-center gap-2 px-2 py-0.5 rounded cursor-pointer w-full text-left hover:bg-gray-100/80 dark:hover:bg-slate-800/80 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:[/* @__PURE__ */Ke("span",{className:"w-5 flex items-center justify-center text-gray-500 dark:text-gray-400 shrink-0",children:/* @__PURE__ */Ke(mt,{size:14})}),/* @__PURE__ */Ke("span",{className:"text-xs whitespace-nowrap truncate",children:"Comment"})]})})]})]}),document.body)]}),
|
|
159
|
+
/* @__PURE__ */Ve("div",{className:"dropdown-container",children:[/* @__PURE__ */Ke(cr,{name:"edit",label:"Edit",active:"edit"===g,onClick:rt,children:/* @__PURE__ */Ke(Ze,{size:16})}),"edit"===g&&h&&Dt(/* @__PURE__ */Ve(mr,{left:h.left,top:h.top,children:[
|
|
160
|
+
/* @__PURE__ */Ke("div",{className:"px-2 py-1 text-[10px] font-semibold uppercase text-gray-400 tracking-wide",children:"Clipboard"}),
|
|
161
|
+
/* @__PURE__ */Ke(sr,{icon:/* @__PURE__ */Ke(xt,{size:14}),label:"Cut",shortcut:"Ctrl+X",onClick:()=>{it(),Pe()}}),
|
|
162
|
+
/* @__PURE__ */Ke(sr,{icon:/* @__PURE__ */Ke(Ze,{size:14}),label:"Copy",shortcut:"Ctrl+C",onClick:()=>{it(),Te()}}),
|
|
163
|
+
/* @__PURE__ */Ke(sr,{icon:/* @__PURE__ */Ke(_e,{size:14}),label:"Paste",shortcut:"Ctrl+V",onClick:()=>{it(),Be()}}),
|
|
164
|
+
/* @__PURE__ */Ke(sr,{icon:/* @__PURE__ */Ke(Ye,{size:14}),label:"Paste Plain",shortcut:"Ctrl+Shift+V",onClick:()=>{it(),De()}}),
|
|
165
|
+
/* @__PURE__ */Ke(sr,{icon:/* @__PURE__ */Ke(Lt,{size:14}),label:"Delete",shortcut:"Del",onClick:()=>{it(),Ee()}}),
|
|
166
|
+
/* @__PURE__ */Ke("div",{className:"my-1 border-t border-gray-100 dark:border-slate-700"}),
|
|
167
|
+
/* @__PURE__ */Ke("div",{className:"px-2 py-1 text-[10px] font-semibold uppercase text-gray-400 tracking-wide",children:"Selection"}),
|
|
168
|
+
/* @__PURE__ */Ke(sr,{icon:/* @__PURE__ */Ke(Ct,{size:14}),label:"Select All",shortcut:"Ctrl+A",onClick:()=>{it(),We()}}),Re&&/* @__PURE__ */Ve(Ge,{children:[
|
|
169
|
+
/* @__PURE__ */Ke(sr,{icon:/* @__PURE__ */Ke(zt,{size:14}),label:"Select All Similar Fonts",onClick:()=>{it(),Ue("font")}}),
|
|
170
|
+
/* @__PURE__ */Ke(sr,{icon:/* @__PURE__ */Ke(ht,{size:14}),label:"Select All Similar Styles",onClick:()=>{it(),Ue("style")}}),
|
|
171
|
+
/* @__PURE__ */Ke(sr,{icon:/* @__PURE__ */Ke(St,{size:14}),label:"Select All Similar Formatting",onClick:()=>{it(),Ue("formatting")}}),
|
|
172
|
+
/* @__PURE__ */Ke(sr,{disabled:0===Je,icon:/* @__PURE__ */Ke(Mt,{size:14}),label:Je?`Clear Multi-Selection (${Je})`:"Clear Multi-Selection",shortcut:"Esc",onClick:()=>{it(),Xe()}}),
|
|
173
|
+
/* @__PURE__ */Ke("div",{className:"px-3 pb-1.5 pt-0.5 text-[10px] leading-snug text-gray-400 dark:text-gray-500",children:"Formatting applied afterwards lands on every highlighted run at once."})]})]}),document.body)]}),
|
|
174
|
+
/* @__PURE__ */Ve("div",{className:"dropdown-container",children:[/* @__PURE__ */Ke(cr,{name:"tools",label:"Tools",active:"tools"===g,onClick:rt,children:/* @__PURE__ */Ke("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:/* @__PURE__ */Ke("path",{d:"M14.7 6.3a1 1 0 000 1.4l1.6 1.6a1 1 0 001.4 0l3.77-3.77a6 6 0 01-7.94 7.94l-6.91 6.91a2.12 2.12 0 01-3-3l6.91-6.91a6 6 0 017.94-7.94l-3.76 3.76z"})})}),"tools"===g&&h&&Dt(/* @__PURE__ */Ve(mr,{left:h.left,top:h.top,children:[
|
|
175
|
+
/* @__PURE__ */Ke("div",{className:"px-2 py-1 text-[10px] font-semibold uppercase text-gray-400 tracking-wide",children:"Document"}),
|
|
176
|
+
/* @__PURE__ */Ke(sr,{icon:/* @__PURE__ */Ke(nt,{size:14}),label:"Document info & word count",onClick:()=>{it(),pe("info")}}),
|
|
177
|
+
/* @__PURE__ */Ke(sr,{icon:/* @__PURE__ */Ke(vt,{size:14}),label:"Share",onClick:()=>{it(),pe("share")}}),
|
|
178
|
+
/* @__PURE__ */Ke(sr,{icon:/* @__PURE__ */Ke(tt,{size:14}),label:"Rename",onClick:()=>{it(),ge(!0)}}),
|
|
179
|
+
/* @__PURE__ */Ke(sr,{icon:/* @__PURE__ */Ke(Qe,{size:14}),label:"Make a copy",onClick:()=>{it(),alert("Document copied to your drive")}}),
|
|
180
|
+
/* @__PURE__ */Ke(sr,{icon:/* @__PURE__ */Ke(et,{size:14}),label:"Download",onClick:()=>{it(),alert("Downloading document...")}}),
|
|
181
|
+
/* @__PURE__ */Ke("div",{className:"my-1 border-t border-gray-100 dark:border-slate-700"}),
|
|
182
|
+
/* @__PURE__ */Ke("div",{className:"px-2 py-1 text-[10px] font-semibold uppercase text-gray-400 tracking-wide",children:"Tools"}),c&&/* @__PURE__ */Ke(dr,{icon:/* @__PURE__ */Ke(ct,{size:14}),label:m?`Comments Panel (${m})`:"Comments Panel",checked:!!i,onChange:()=>c()}),c&&/* @__PURE__ */Ke("div",{className:"my-1 border-t border-gray-100 dark:border-slate-700"}),
|
|
183
|
+
/* @__PURE__ */Ke(It,{label:"Find / Replace",children:/* @__PURE__ */Ke(Z,{})}),
|
|
184
|
+
/* @__PURE__ */Ke(It,{label:"View Source",children:/* @__PURE__ */Ke(_,{})}),
|
|
185
|
+
/* @__PURE__ */Ke("div",{className:"my-1 border-t border-gray-100 dark:border-slate-700"}),
|
|
186
|
+
/* @__PURE__ */Ke(dr,{icon:/* @__PURE__ */Ke(lt,{size:14}),label:"Table of Contents",checked:re,onChange:ae}),ke&&/* @__PURE__ */Ke(dr,{icon:/* @__PURE__ */Ke(Nt,{size:14}),label:"Spelling & Grammar",checked:ne,onChange:oe}),(Ne.available||we.available)&&/* @__PURE__ */Ke("div",{className:"my-1 border-t border-gray-100 dark:border-slate-700"}),Ne.available&&/* @__PURE__ */Ke(sr,{disabled:!Ne.isActive&&!Se,icon:Ne.isActive?/* @__PURE__ */Ke(Pt,{size:14}):/* @__PURE__ */Ke(jt,{size:14}),label:Ne.isActive?"Stop reading":"selection"===Ce?"Read selection aloud":"Read document aloud",shortcut:"Ctrl+Shift+S",onClick:()=>{it(),fe?.commands.toggleReadAloud()}}),we.available&&/* @__PURE__ */Ke(dr,{icon:/* @__PURE__ */Ke(gt,{size:14}),label:me()?we.isListening?"Dictating — click to stop":"Dictate into the document":"Dictation unavailable in this browser",checked:we.isListening,onChange:()=>{me()&&fe?.commands.toggleTranscribe()}}),
|
|
187
|
+
/* @__PURE__ */Ke("div",{className:"my-1 border-t border-gray-100 dark:border-slate-700"}),Le&&/* @__PURE__ */Ke(dr,{icon:/* @__PURE__ */Ke(ze?at:ot,{size:14}),label:ze?"Page Layout: A4":"Page Layout: Web",checked:ze,onChange:je}),
|
|
188
|
+
/* @__PURE__ */Ke(It,{label:"Page Settings",shortcut:"Ctrl+Shift+P",children:/* @__PURE__ */Ke(Ft,{})}),
|
|
189
|
+
/* @__PURE__ */Ke("div",{className:"my-1 border-t border-gray-100 dark:border-slate-700"}),
|
|
190
|
+
/* @__PURE__ */Ke(It,{label:"Import Word",children:/* @__PURE__ */Ke(Y,{})}),
|
|
191
|
+
/* @__PURE__ */Ke(It,{label:"Export Word",children:/* @__PURE__ */Ke(P,{})}),
|
|
192
|
+
/* @__PURE__ */Ke(It,{label:"Export PDF",children:/* @__PURE__ */Ke(Q,{})})]}),document.body)]}),
|
|
193
|
+
/* @__PURE__ */Ve("div",{className:"ml-auto dropdown-container",children:[/* @__PURE__ */Ke("button",{ref:xe,title:"Settings",onClick:e=>{be?(u(null),X(null),n()):((e,t)=>{if(g===e)return u(null),void X(null);const r=t.currentTarget.getBoundingClientRect();X({top:r.bottom+4,left:r.left,right:window.innerWidth-r.right}),u(e)})("settings",e)},className:"flex items-center gap-0.5 p-1.5 rounded transition-colors "+("settings"===g?"bg-gray-200 dark:bg-slate-700":"text-gray-500 hover:bg-gray-100 dark:hover:bg-slate-800"),children:/* @__PURE__ */Ke(ft,{size:16})}),!be&&"settings"===g&&h&&Dt(/* @__PURE__ */Ve(mr,{className:"w-[260px] px-2 py-2 shadow-2xl",right:h.right,top:h.top,children:[
|
|
194
|
+
/* @__PURE__ */Ke("div",{className:"text-[10px] font-semibold mb-1 text-gray-500 dark:text-gray-400 uppercase px-1",children:"Theme"}),
|
|
195
|
+
/* @__PURE__ */Ve("div",{className:"flex gap-1 mb-2 px-1",children:[/* @__PURE__ */Ke("button",{onClick:()=>t("light"),className:"flex-1 px-2 py-1 text-xs border rounded "+("light"===e?"bg-blue-500 text-white border-blue-600":"hover:bg-gray-100 dark:hover:bg-slate-800"),children:"☀️ Light"}),/* @__PURE__ */Ke("button",{onClick:()=>t("dark"),className:"flex-1 px-2 py-1 text-xs border rounded "+("dark"===e?"bg-blue-500 text-white border-blue-600":"hover:bg-gray-100 dark:hover:bg-slate-800"),children:"🌙 Dark"})]}),
|
|
196
|
+
/* @__PURE__ */Ke("div",{className:"text-[10px] font-semibold mb-1 text-gray-500 dark:text-gray-400 uppercase px-1",children:"Accent Color"}),
|
|
197
|
+
/* @__PURE__ */Ke("div",{className:"grid grid-cols-4 gap-0.5 px-1 mb-2",children:["default","red","blue","green","orange","rose","violet","yellow"].map(e=>/* @__PURE__ */Ke("button",{onClick:()=>b.setColor(e),className:"px-1.5 py-1 text-[10px] border rounded hover:bg-gray-100 dark:hover:bg-slate-800 capitalize",children:e},e))}),
|
|
198
|
+
/* @__PURE__ */Ke("div",{className:"border-t border-gray-100 dark:border-slate-700 my-1"}),
|
|
199
|
+
/* @__PURE__ */Ke("div",{className:"text-[10px] font-semibold mb-1 text-gray-500 dark:text-gray-400 uppercase px-1",children:"Language"}),
|
|
200
|
+
/* @__PURE__ */Ke("div",{className:"grid grid-cols-2 gap-0.5 px-1 max-h-[180px] overflow-y-auto",children:[{code:"en",flag:"🇺🇸",label:"English"},{code:"es",flag:"🇪🇸",label:"Español"},{code:"de",flag:"🇩🇪",label:"Deutsch"},{code:"zh_CN",flag:"🇨🇳",label:"中文"},{code:"ja",flag:"🇯🇵",label:"日本語"},{code:"ar",flag:"🇸🇦",label:"العربية"},{code:"fr",flag:"🇫🇷",label:"Français"},{code:"pt_BR",flag:"🇧🇷",label:"Português"},{code:"ru",flag:"🇷🇺",label:"Русский"},{code:"tr",flag:"🇹🇷",label:"Türkçe"},{code:"it",flag:"🇮🇹",label:"Italiano"},{code:"fa",flag:"🇮🇷",label:"فارسی"},{code:"nl",flag:"🇳🇱",label:"Nederlands"},{code:"ko",flag:"🇰🇷",label:"한국어"},{code:"hi",flag:"🇮🇳",label:"हिन्दी"},{code:"hu_HU",flag:"🇭🇺",label:"Magyar"},{code:"vi",flag:"🇻🇳",label:"Tiếng Việt"},{code:"fi",flag:"🇫🇮",label:"Suomi"}].map(({code:e,flag:t,label:r})=>/* @__PURE__ */Ve("button",{onClick:()=>a.setLang(e),className:"px-1.5 py-1 text-[10px] border rounded text-left hover:bg-gray-100 dark:hover:bg-slate-800 "+(ye.lang===e?"bg-blue-500/20 border-blue-500":""),children:[t," ",r]},e))})]}),document.body)]})]}),ee&&/* @__PURE__ */Ke(lr,{onClose:()=>te(!1)}),re&&fe&&/* @__PURE__ */Ke(Kt,{editor:fe,onClose:()=>ae(!1)}),ke&&ne&&fe&&/* @__PURE__ */Ke(Vt,{editor:fe}),we.available&&/* @__PURE__ */Ke(Xt,{editor:fe??null}),ce&&/* @__PURE__ */Ke(ur,{onClose:()=>ge(!1),currentName:ve}),he&&/* @__PURE__ */Ke(gr,{documentTitle:ve,editor:fe,initialTab:he,onClose:()=>pe(null)})]})},pr=()=>/* @__PURE__ */Ve(Ge,{children:[
|
|
201
|
+
/* @__PURE__ */Ke(xe,{}),
|
|
202
|
+
/* @__PURE__ */Ke(ye,{}),
|
|
203
|
+
/* @__PURE__ */Ke(ke,{}),
|
|
204
|
+
/* @__PURE__ */Ke(be,{}),
|
|
205
|
+
/* @__PURE__ */Ke(ze,{}),
|
|
206
|
+
/* @__PURE__ */Ke(Se,{}),
|
|
207
|
+
/* @__PURE__ */Ke(ve,{}),
|
|
208
|
+
/* @__PURE__ */Ke(pe,{}),
|
|
209
|
+
/* @__PURE__ */Ke(we,{}),
|
|
210
|
+
/* @__PURE__ */Ke(he,{}),
|
|
211
|
+
/* @__PURE__ */Ke(fe,{}),
|
|
212
|
+
/* @__PURE__ */Ke(Ce,{}),
|
|
213
|
+
/* @__PURE__ */Ke(Le,{}),
|
|
214
|
+
/* @__PURE__ */Ke(Ne,{}),
|
|
215
|
+
/* @__PURE__ */Ke(Ae,{}),
|
|
216
|
+
/* @__PURE__ */Ke(Ut,{})]});export{hr as n,pr as t};
|