vibelet 1.2.249 → 1.2.251
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -1
- package/dist/inventory-scan-worker.cjs +1 -1
- package/dist/runtime-version.cjs +1 -1
- package/dist/web/assets/App-Bx92ZYqP.js +2 -0
- package/dist/web/assets/App-C7OILF5b.css +97 -0
- package/dist/web/assets/{BrowserControlPanel-ChZyiZg8.js → BrowserControlPanel-BSBCQsTC.js} +1 -1
- package/dist/web/assets/ChatPane-CNkEpPZD.js +1 -0
- package/dist/web/assets/{ChipGroup-0exv9rzn.js → ChipGroup-BGteDQAS.js} +1 -1
- package/dist/web/assets/ComposerMenus-7XnPTSod.js +1 -0
- package/dist/web/assets/{DiffDrawer-D4eELjEe.js → DiffDrawer-DLUBB9ig.js} +1 -1
- package/dist/web/assets/FilesControlPanel-BC8Kvjf2.js +1 -0
- package/dist/web/assets/GlobalPendingDialog-ZjYyhVoG.js +1 -0
- package/dist/web/assets/{ImageViewer-BojwpCb-.js → ImageViewer-D_-eK1aP.js} +1 -1
- package/dist/web/assets/InteractionPolish-CQwU9CEi.css +1 -0
- package/dist/web/assets/{LanguageSettingsPanel-C1ZHQpVG.js → LanguageSettingsPanel-Btyc58mw.js} +1 -1
- package/dist/web/assets/{MarkdownModePanel-B4iVncFO.js → MarkdownModePanel-q63q8r9N.js} +1 -1
- package/dist/web/assets/{NewSessionDialog-eX_6NPbk.css → NewSessionDialog-CWW1T1s7.css} +1 -1
- package/dist/web/assets/NewSessionDialog-Cqymzgm4.js +1 -0
- package/dist/web/assets/{NotificationSettingsPanel-BA0Lj4kT.js → NotificationSettingsPanel-CKYNiUya.js} +1 -1
- package/dist/web/assets/{PanelFind-D_pRPFBN.js → PanelFind-BA1eUXgS.js} +1 -1
- package/dist/web/assets/{RemoteLifeOSBlock-CZkQLmE5.js → RemoteLifeOSBlock-Bq3YQBy7.js} +2 -2
- package/dist/web/assets/RemoteWorkspaceSettings-Cs_zzqpf.css +1 -0
- package/dist/web/assets/RemoteWorkspaceSettings-D8_jQ7Wt.js +1 -0
- package/dist/web/assets/{SessionTerminalPanel-B-TvX4Fz.js → SessionTerminalPanel-Dmt2m_B6.js} +2 -2
- package/dist/web/assets/{SpeechInputSettingsPanel-Buqwjrth.js → SpeechInputSettingsPanel-9qu4_cQx.js} +1 -1
- package/dist/web/assets/{ThemeSettingsPanel-Bph9zVcN.js → ThemeSettingsPanel-zefRQEDV.js} +1 -1
- package/dist/web/assets/{__vite-browser-external-2447137e-Dbwxx6PZ.js → __vite-browser-external-2447137e-BMiSckAV.js} +1 -1
- package/dist/web/assets/_baseMerge-CwDZKfvJ.js +1 -0
- package/dist/web/assets/{_initCloneObject-CgHgrY9n.js → _initCloneObject-C781OlVa.js} +1 -1
- package/dist/web/assets/{abnfDiagram-VRR7QNED-dJfL32qR.js → abnfDiagram-VRR7QNED-THI3SIgB.js} +1 -1
- package/dist/web/assets/arc-DgeTKeM5.js +1 -0
- package/dist/web/assets/{architectureDiagram-ZJ3FMSHR-LXgKoYZv.js → architectureDiagram-ZJ3FMSHR-CPVnaW5G.js} +1 -1
- package/dist/web/assets/{arrow-left-CagvtJU8.js → arrow-left-dANl3leX.js} +1 -1
- package/dist/web/assets/{arrow-right-CW797wzk.js → arrow-right-DTaF5t16.js} +1 -1
- package/dist/web/assets/{blockDiagram-677ZJIJ3-BOLqwY0y.js → blockDiagram-677ZJIJ3-BDME3ZFA.js} +1 -1
- package/dist/web/assets/{c4Diagram-LMCZKHZV-BvwC7DIr.js → c4Diagram-LMCZKHZV-CMY3o7XE.js} +1 -1
- package/dist/web/assets/channel-BE7FnnNv.js +1 -0
- package/dist/web/assets/chevron-up-C3_IR2td.js +1 -0
- package/dist/web/assets/{chunk-2Q5K7J3B-D2B_BdaG.js → chunk-2Q5K7J3B-Brbuto5C.js} +1 -1
- package/dist/web/assets/{chunk-32BRIVSS-B93XkYif.js → chunk-32BRIVSS-BGCuhDXk.js} +1 -1
- package/dist/web/assets/{chunk-5VM5RSS4-Uv1D4oA2.js → chunk-5VM5RSS4-D85xFHwk.js} +1 -1
- package/dist/web/assets/{chunk-EX3LRPZG-xZrFFOcj.js → chunk-EX3LRPZG-W6U7GsD7.js} +1 -1
- package/dist/web/assets/{chunk-JWPE2WC7-1--FpPFR.js → chunk-JWPE2WC7-CKdx8e0r.js} +1 -1
- package/dist/web/assets/{chunk-MOJQB5TN-BLOL5fhw.js → chunk-MOJQB5TN-Cjf1dDyf.js} +1 -1
- package/dist/web/assets/{chunk-RYQCIY6F-z7wmcSRp.js → chunk-RYQCIY6F-DFxqNYlG.js} +1 -1
- package/dist/web/assets/{chunk-V7JOEXUC-DPvobQwd.js → chunk-V7JOEXUC-lwXYy3Zq.js} +1 -1
- package/dist/web/assets/{chunk-VR4S4FIN-DD3Gj91z.js → chunk-VR4S4FIN-BxiP-OR0.js} +1 -1
- package/dist/web/assets/{chunk-XXDRQBXY-DoVRk31D.js → chunk-XXDRQBXY-BhED1rK6.js} +1 -1
- package/dist/web/assets/classDiagram-OUVF2IWQ-C0-VAw-b.js +1 -0
- package/dist/web/assets/classDiagram-v2-EOCWNBFH-C0-VAw-b.js +1 -0
- package/dist/web/assets/{clsx-DoZLeicy.js → clsx-Dy3K9oBb.js} +1 -1
- package/dist/web/assets/{collectMessageImages-B2EAkrhU.js → collectMessageImages-DEnoDhBs.js} +1 -1
- package/dist/web/assets/composerOptions-0DZvXA1-.js +1 -0
- package/dist/web/assets/{cose-bilkent-JH36ORCC-BQknAy25.js → cose-bilkent-JH36ORCC-DC9M3QOS.js} +1 -1
- package/dist/web/assets/{cynefin-VYW2F7L2-09uNSfvT.js → cynefin-VYW2F7L2-D1LRWQeS.js} +1 -1
- package/dist/web/assets/{cynefinDiagram-TSTJHNR4-CgKhj0m5.js → cynefinDiagram-TSTJHNR4-BJvzO8nK.js} +1 -1
- package/dist/web/assets/{dagre-VKFMJZFB-CLCxvrOo.js → dagre-VKFMJZFB-u4EU1mWb.js} +1 -1
- package/dist/web/assets/{diagram-FQU43EPY-B4VfNgsF.js → diagram-FQU43EPY-DfvPNd6F.js} +1 -1
- package/dist/web/assets/{diagram-G47NLZAW-CQC0I6zX.js → diagram-G47NLZAW-DlJwWs1J.js} +1 -1
- package/dist/web/assets/{diagram-NH7WQ7WH-CSBbTiMh.js → diagram-NH7WQ7WH-DcgpOjQV.js} +1 -1
- package/dist/web/assets/{diagram-OA4YK3LP-CkUx0v34.js → diagram-OA4YK3LP-BrNCuljO.js} +1 -1
- package/dist/web/assets/{diagram-WEI45ONY-dlEY_W2R.js → diagram-WEI45ONY-DxT28KUR.js} +1 -1
- package/dist/web/assets/{ebnfDiagram-CCIWWBDH-BsxdwE2E.js → ebnfDiagram-CCIWWBDH-FD63emzf.js} +1 -1
- package/dist/web/assets/{erDiagram-Q63AITRT-CE8BUsrY.js → erDiagram-Q63AITRT-COEH4rgh.js} +1 -1
- package/dist/web/assets/{file-editor-FileCodeEditor-HR6Wsm5I.js → file-editor-FileCodeEditor-B0qv9YKs.js} +2 -2
- package/dist/web/assets/{file-editor-ObsidianCodeEditor-BMcU5Aqo.js → file-editor-ObsidianCodeEditor-q_YWJSDk.js} +1 -1
- package/dist/web/assets/file-editor-ObsidianFileEditor-bdzeuwke.js +2 -0
- package/dist/web/assets/{file-editor-index-BXupf89-.js → file-editor-index-B6XepRuc.js} +1 -1
- package/dist/web/assets/{file-editor-index-DuqNWTkz.js → file-editor-index-BUPn4zC8.js} +1 -1
- package/dist/web/assets/{file-editor-index-Dc4mA3Mx.js → file-editor-index-BmcxkKR_.js} +1 -1
- package/dist/web/assets/{file-editor-index-ORJkxheE.js → file-editor-index-C-sivrT3.js} +1 -1
- package/dist/web/assets/{file-editor-index-D3hWXNQc.js → file-editor-index-C8hW6Muj.js} +1 -1
- package/dist/web/assets/{file-editor-index-CP7DVsyc.js → file-editor-index-CthnNAMC.js} +1 -1
- package/dist/web/assets/{file-editor-index-Ce_Hrot9.js → file-editor-index-DOP_6x0k.js} +1 -1
- package/dist/web/assets/{file-editor-index-BEhJJ-2S.js → file-editor-index-Db8cbNln.js} +1 -1
- package/dist/web/assets/{file-editor-index-CIj8OyuX.js → file-editor-index-Dg5e3Cpy.js} +1 -1
- package/dist/web/assets/{file-editor-index-DX8Fwz0S.js → file-editor-index-DqKTONJ4.js} +1 -1
- package/dist/web/assets/{file-editor-index-CrvkFqLZ.js → file-editor-index-JhH0nqee.js} +1 -1
- package/dist/web/assets/{file-editor-index-7BDUBERb.js → file-editor-index-WDJmssCC.js} +1 -1
- package/dist/web/assets/{file-editor-index-DL4CfMoo.js → file-editor-index-YBbEVrxT.js} +1 -1
- package/dist/web/assets/{flowDiagram-23GEKE2U-DUiI830l.js → flowDiagram-23GEKE2U-kWBomx5I.js} +1 -1
- package/dist/web/assets/{folder-plus-Byi2WQUY.js → folder-plus-ChLrua3z.js} +1 -1
- package/dist/web/assets/ganttDiagram-NO4QXBWP-bd158wNu.js +1 -0
- package/dist/web/assets/{gitGraphDiagram-IHSO6WYX-BJA7zQjW.js → gitGraphDiagram-IHSO6WYX-BsWMZB1T.js} +1 -1
- package/dist/web/assets/{highlighted-body-TPN3WLV5-lW0JmP5H.js → highlighted-body-TPN3WLV5-BcvTxHra.js} +1 -1
- package/dist/web/assets/index-kcB9N5v8.js +2 -0
- package/dist/web/assets/{infoDiagram-FWYZ7A6U-BfA2fWjL.js → infoDiagram-FWYZ7A6U-DtvGyYt0.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-FXEZZL3T-B7WW0j7E.js → ishikawaDiagram-FXEZZL3T-CHsj8iVR.js} +1 -1
- package/dist/web/assets/{journeyDiagram-5HDEW3XC-BEMtGLhR.js → journeyDiagram-5HDEW3XC-Ben3XW9L.js} +1 -1
- package/dist/web/assets/{kanban-definition-HUTT4EX6-DqIkrGPA.js → kanban-definition-HUTT4EX6-w1H0lvRK.js} +1 -1
- package/dist/web/assets/{key-round-y1oxWXOB.js → key-round-Csanuqei.js} +1 -1
- package/dist/web/assets/{layout-CAp4KseL.js → layout-DvVF2R1Q.js} +1 -1
- package/dist/web/assets/{linear-DRFQGBEA.js → linear-CYqpDCXS.js} +1 -1
- package/dist/web/assets/{map-XtUTTYLw.js → map-yP9qyz-l.js} +1 -1
- package/dist/web/assets/{mermaid-O7DHMXV3-9HC6mORt.js → mermaid-O7DHMXV3-DUoHFycq.js} +2 -2
- package/dist/web/assets/{mermaid-O7DHMXV3-DHmcgJGk.css → mermaid-O7DHMXV3-rMhXRrUE.css} +1 -1
- package/dist/web/assets/{mermaid.core-LEKKQwXZ.js → mermaid.core-CSuHyCbU.js} +2 -2
- package/dist/web/assets/{mic-BOKcmdUn.js → mic-D6yq4BVC.js} +1 -1
- package/dist/web/assets/{mindmap-definition-LN4V7U3C-Bt6LtGWO.js → mindmap-definition-LN4V7U3C-BariZ1mC.js} +1 -1
- package/dist/web/assets/newSessionDefaults-DY7-PuSf.js +1 -0
- package/dist/web/assets/pegDiagram-2B236MQR-DsjvsiG-.js +1 -0
- package/dist/web/assets/{pieDiagram-ENE6RG2P-CeQnXIl7.js → pieDiagram-ENE6RG2P-CVDkx6T3.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-ABIIQ3AL-DNGl4Hse.js → quadrantDiagram-ABIIQ3AL-CZfhv8B5.js} +1 -1
- package/dist/web/assets/{railroadDiagram-RFXS5EU6-BiFr0x3V.js → railroadDiagram-RFXS5EU6-DPiV-o4k.js} +1 -1
- package/dist/web/assets/{requirementDiagram-TGXJPOKE-DIx4dpS7.js → requirementDiagram-TGXJPOKE-ifd3KNkN.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-HTMAVEWB-D_zRhmQ_.js → sankeyDiagram-HTMAVEWB-BTgBAMv9.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-DBY2YBRQ-ChMRMmPd.js → sequenceDiagram-DBY2YBRQ-6-7v8n8u.js} +1 -1
- package/dist/web/assets/{sizeCapture-X5ZJPWSS-CLVxFMDT.js → sizeCapture-X5ZJPWSS-BRFGoPEh.js} +1 -1
- package/dist/web/assets/{square-K9kFBDil.js → square-Dl4fOYPP.js} +1 -1
- package/dist/web/assets/{stateDiagram-2N3HPSRC-Dn7yCHtf.js → stateDiagram-2N3HPSRC-BBiXuN7R.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-6OUMAXLB-DRJJe0JN.js +1 -0
- package/dist/web/assets/{swimlanes-5IMT3BWC-Dhut6RY-.js → swimlanes-5IMT3BWC-C40_UKFy.js} +2 -2
- package/dist/web/assets/swimlanesDiagram-G3AALYLV-DEaTTKbV.js +1 -0
- package/dist/web/assets/{timeline-definition-FHXFAJF6-D_9aY3SL.js → timeline-definition-FHXFAJF6-cuYaryrF.js} +1 -1
- package/dist/web/assets/useComposerCompletion-DBl1CTPC.js +1 -0
- package/dist/web/assets/{vennDiagram-L72KCM5P-Bxsjs1td.js → vennDiagram-L72KCM5P-BjSt5IQl.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-EHGQE667-B8vO0orG.js → wardleyDiagram-EHGQE667-DAJYQgOm.js} +1 -1
- package/dist/web/assets/{xychartDiagram-FW5EYKEG-CUBLdGVB.js → xychartDiagram-FW5EYKEG-DwQxHkEv.js} +1 -1
- package/dist/web/assets/zap-D3JafXHq.js +1 -0
- package/dist/web/index.html +1 -1
- package/dist/web/obsidian-editor-assets.json +1 -1
- package/package.json +1 -1
- package/dist/web/assets/App-CqANyaMK.css +0 -97
- package/dist/web/assets/App-gwVbOIB1.js +0 -2
- package/dist/web/assets/ChatPane-fH0IY48w.js +0 -1
- package/dist/web/assets/ComposerMenus-DhMX49q9.js +0 -1
- package/dist/web/assets/FilesControlPanel-Bz4i0bf2.js +0 -1
- package/dist/web/assets/GlobalPendingDialog-tews3DVC.js +0 -1
- package/dist/web/assets/InteractionPolish-Nkww8pqM.css +0 -1
- package/dist/web/assets/NewSessionDialog-CsOHExrY.js +0 -1
- package/dist/web/assets/RemoteWorkspaceSettings-7jz8oX59.css +0 -1
- package/dist/web/assets/RemoteWorkspaceSettings-tDqbDqj4.js +0 -1
- package/dist/web/assets/_baseMerge-YHvLFG89.js +0 -1
- package/dist/web/assets/arc-BYAxnPQ_.js +0 -1
- package/dist/web/assets/channel-DpGkajT1.js +0 -1
- package/dist/web/assets/chevron-up-DfL2d5fV.js +0 -1
- package/dist/web/assets/classDiagram-OUVF2IWQ-oZMIKKng.js +0 -1
- package/dist/web/assets/classDiagram-v2-EOCWNBFH-oZMIKKng.js +0 -1
- package/dist/web/assets/file-editor-ObsidianFileEditor-BuzsfQwA.js +0 -2
- package/dist/web/assets/ganttDiagram-NO4QXBWP-x0WR7K4r.js +0 -1
- package/dist/web/assets/index-c9Eb0rEZ.js +0 -2
- package/dist/web/assets/pegDiagram-2B236MQR-DVdodUA1.js +0 -1
- package/dist/web/assets/shield-check-DM9poYLJ.js +0 -1
- package/dist/web/assets/stateDiagram-v2-6OUMAXLB-DkgnQPrP.js +0 -1
- package/dist/web/assets/swimlanesDiagram-G3AALYLV-D62G5R34.js +0 -1
- package/dist/web/assets/useComposerCompletion-DcHhaHlX.js +0 -1
- package/dist/web/assets/zap-4rbaTb6R.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/file-editor-index-
|
|
2
|
-
import{_ as e,r as t,j as n}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/file-editor-index-BmcxkKR_.js","assets/file-editor-CodeHighlight-aQ9kP3Wv.js","assets/CodeHighlight-aMZr054w.css","assets/file-editor-index-Db8cbNln.js","assets/file-editor-index-JhH0nqee.js","assets/file-editor-index-Br9mmThB.js","assets/file-editor-index-zEnXm9gB.js","assets/file-editor-index-B6XepRuc.js","assets/file-editor-index-CjS11v2I.js","assets/file-editor-index-YBbEVrxT.js","assets/file-editor-rust-D_fhUrrt.js","assets/file-editor-simple-mode-CjHKX61j.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as e,r as t,j as n}from"./index-kcB9N5v8.js";import{a6 as r,E as a,X as s,aj as i,aq as c,ah as o,k as u,ag as l,a4 as f,av as d,as as _,at as m,aw as p}from"./file-editor-CodeHighlight-aQ9kP3Wv.js";async function w(t){const n=t.split(/[\\/]/).at(-1)?.toLowerCase()??"",r=n.split(".").at(-1)??"";if((e=>/\.(md|markdown)$/i.test(e))(t))return{name:"Markdown",extension:(await e(async()=>{const{markdown:e}=await import("./file-editor-index-BmcxkKR_.js");return{markdown:e}},__vite__mapDeps([0,1,2,3,4,5,6,7]))).markdown()};if(/^(ts|tsx|mts|cts|js|jsx|mjs|cjs)$/.test(r)){const t=/^(ts|tsx|mts|cts)$/.test(r);return{name:t?"TypeScript":"JavaScript",extension:(await e(async()=>{const{javascript:e}=await import("./file-editor-index-B6XepRuc.js");return{javascript:e}},__vite__mapDeps([7,5,1,2,3]))).javascript({typescript:t,jsx:"tsx"===r||"jsx"===r})}}if("json"===r||"jsonc"===r)return{name:"JSON",extension:(await e(async()=>{const{json:e}=await import("./file-editor-index-CjS11v2I.js");return{json:e}},__vite__mapDeps([8,5,1,2]))).json()};if("css"===r)return{name:"CSS",extension:(await e(async()=>{const{css:e}=await import("./file-editor-index-zEnXm9gB.js");return{css:e}},__vite__mapDeps([6,5,1,2]))).css()};if("html"===r||"htm"===r||"svg"===r)return{name:"HTML",extension:(await e(async()=>{const{html:e}=await import("./file-editor-index-JhH0nqee.js");return{html:e}},__vite__mapDeps([4,5,1,2,6,7,3]))).html()};if("py"===r||"pyw"===r)return{name:"Python",extension:(await e(async()=>{const{python:e}=await import("./file-editor-index-YBbEVrxT.js");return{python:e}},__vite__mapDeps([9,5,1,2,3]))).python()};const{StreamLanguage:a}=await e(async()=>{const{StreamLanguage:e}=await import("./file-editor-CodeHighlight-aQ9kP3Wv.js").then(e=>e.aC);return{StreamLanguage:e}},__vite__mapDeps([1,2]));if(/^(c|h|cpp|cc|cxx|hpp|cs|java|kt|kts|m|mm)$/.test(r)){const t=await e(()=>import("./file-editor-clike-dMs5i294.js"),[]),n={c:["C",t.c],h:["C",t.c],cpp:["C++",t.cpp],cc:["C++",t.cpp],cxx:["C++",t.cpp],hpp:["C++",t.cpp],cs:["C#",t.csharp],java:["Java",t.java],kt:["Kotlin",t.kotlin],kts:["Kotlin",t.kotlin],m:["Objective-C",t.objectiveC],mm:["Objective-C++",t.objectiveCpp]}[r];return{name:n[0],extension:a.define(n[1])}}return"go"===r?{name:"Go",extension:a.define((await e(async()=>{const{go:e}=await import("./file-editor-go-CGJsFCUa.js");return{go:e}},[])).go)}:"rs"===r?{name:"Rust",extension:a.define((await e(async()=>{const{rust:e}=await import("./file-editor-rust-D_fhUrrt.js");return{rust:e}},__vite__mapDeps([10,11]))).rust)}:"swift"===r?{name:"Swift",extension:a.define((await e(async()=>{const{swift:e}=await import("./file-editor-swift-B_XXVlXX.js");return{swift:e}},[])).swift)}:"sql"===r?{name:"SQL",extension:a.define((await e(async()=>{const{standardSQL:e}=await import("./file-editor-sql-B3SPsWL6.js");return{standardSQL:e}},[])).standardSQL)}:/^(sh|bash|zsh)$/.test(r)||[".bashrc",".zshrc",".bash_profile"].includes(n)?{name:"Shell",extension:a.define((await e(async()=>{const{shell:e}=await import("./file-editor-shell-D65E6JiF.js");return{shell:e}},[])).shell)}:"toml"===r?{name:"TOML",extension:a.define((await e(async()=>{const{toml:e}=await import("./file-editor-toml-BVJm5Fzd.js");return{toml:e}},[])).toml)}:"yaml"===r||"yml"===r?{name:"YAML",extension:a.define((await e(async()=>{const{yaml:e}=await import("./file-editor-yaml-DF1wUx07.js");return{yaml:e}},[])).yaml)}:{name:"Plain text",extension:[]}}function h({path:e,text:h,readOnly:g=!1,onChange:j,extensions:x=[],livePreview:y=!1,documentId:E}){const L=t.useRef(new r),R=t.useRef(new r),v=t.useRef(new r),O=t.useRef(null),S=t.useRef(e),P=t.useRef(x);P.current=x;const A=t.useRef(null),C=t.useRef(null),T=t.useRef(j),I=t.useRef(!1),D=t.useRef(new Set),V=t.useRef(h);return T.current=j,V.current=h,t.useEffect(()=>{if(!A.current)return;D.current.clear();const t=new r;O.current=t,S.current=e,A.current.dataset.language="Plain text";const n=new a({parent:A.current,state:s.create({doc:V.current,extensions:[t.of([]),R.current.of(y?[]:[l(),f(p)]),L.current.of(P.current),a.lineWrapping,s.readOnly.of(g),a.editable.of(!g),v.current.of(a.contentAttributes.of({"aria-label":e,"aria-readonly":String(g)})),...g?[]:[i(),c(),o(),u.of([d,..._,...m])],a.updateListener.of(e=>{if(e.docChanged&&!I.current){const t=e.state.doc.toString();D.current.add(t),T.current?.(t)}})]})});return C.current=n,w(e).then(r=>{C.current===n&&S.current===e&&(n.dispatch({effects:t.reconfigure(r.extension)}),A.current&&(A.current.dataset.language=r.name))}).catch(()=>{}),()=>{C.current=null,n.destroy()}},[E??e,g]),t.useEffect(()=>{const t=C.current,n=O.current;if(!E||!t||!n||S.current===e)return;S.current=e,t.dispatch({effects:v.current.reconfigure(a.contentAttributes.of({"aria-label":e,"aria-readonly":String(g)}))});let r=!0;return w(e).then(e=>{r&&C.current===t&&(t.dispatch({effects:n.reconfigure(e.extension)}),A.current&&(A.current.dataset.language=e.name))}).catch(()=>{}),()=>{r=!1}},[e,E,g]),t.useEffect(()=>{const e=C.current;if(e)if(e.state.doc.toString()!==h){if(!D.current.delete(h)){D.current.clear(),I.current=!0;try{const t=e.state.doc.toString();let n=0;for(;n<t.length&&n<h.length&&t[n]===h[n];)n++;let r=0;for(;r<t.length-n&&r<h.length-n&&t[t.length-1-r]===h[h.length-1-r];)r++;e.dispatch({changes:{from:n,to:t.length-r,insert:h.slice(n,h.length-r)}})}finally{I.current=!1}}}else D.current.clear()},[h]),t.useEffect(()=>{C.current?.dispatch({effects:[L.current.reconfigure(x),R.current.reconfigure(y?[]:[l(),f(p)])]})},[x,y]),n.jsx("div",{"data-live-preview":y,ref:A,className:"file-code-editor remote-editor"+(y?" live-preview-editor":""),"data-readonly":g})}export{h as FileCodeEditor};
|