zidane-gui 9.0.3 → 9.1.1
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/README.md +1 -1
- package/out/main/chunks/{dev-extension-D5os9z0A.js → dev-extension-CjcEOYly.js} +10 -9
- package/out/main/chunks/extension-watch-Bk_X4gTf.js +93 -0
- package/out/main/chunks/{history-pager-DUFgTrih.js → history-pager-B5iwhWqn.js} +44 -7
- package/out/main/chunks/idle-collect-ZgTY7fw2.js +33 -0
- package/out/main/chunks/{remote-hosts-DlvE2ELX.js → remote-hosts-DmiOiwKi.js} +41 -1
- package/out/main/chunks/{session-search-sql-BrNTuwjH.js → session-search-sql-BaBnjEgm.js} +4 -4
- package/out/main/chunks/{tool-results-sql-C0MqWcQc.js → tool-results-sql-CVleIS51.js} +1 -1
- package/out/main/chunks/transcript-sql-DfsO-a4Q.js +27 -0
- package/out/main/extension-worker.js +52 -0
- package/out/main/git-watch-worker.js +21 -0
- package/out/main/history-worker.js +6 -3
- package/out/main/index.js +7614 -4263
- package/out/main/session-search-worker.js +18 -13
- package/out/main/tool-results-worker.js +18 -13
- package/out/main/update-worker.js +6 -0
- package/out/main/usage-worker.js +4 -1
- package/out/preload/index.mjs +49 -6
- package/out/renderer/assets/2CHDFZHC-B7OS2WPy.js +76 -0
- package/out/renderer/assets/43YPWK3Q-C1KxyhBe.js +297 -0
- package/out/renderer/assets/45MVAN6X-uedsCyvs.js +227 -0
- package/out/renderer/assets/46GJKBLZ-DqRDtmyU.js +362 -0
- package/out/renderer/assets/5THPTBWS-2mBFupjU.js +21 -0
- package/out/renderer/assets/63WH7YNF-E23uJkxY.js +1519 -0
- package/out/renderer/assets/6DDU7VKX-BnYMT-fZ.js +139 -0
- package/out/renderer/assets/7WLXJQOR-C8MM6Bra.js +23 -0
- package/out/renderer/assets/CLQLV5VT-BsAy1F0L.js +1159 -0
- package/out/renderer/assets/CUSPXG5M-BndthcFo.js +233 -0
- package/out/renderer/assets/{CodeEditor-in2F3Rz-.js → CodeEditor-Bc2yVqNr.js} +404 -744
- package/out/renderer/assets/{ComposerEditor-DzKoxH6Z.js → ComposerEditor-B4wmjkXE.js} +6 -7
- package/out/renderer/assets/D3L7O4X2-LfFKkl0g.js +194 -0
- package/out/renderer/assets/D5TW5CPZ-BUXfpU2q.js +21 -0
- package/out/renderer/assets/DKTLEL5E-Dj3316cp.js +42 -0
- package/out/renderer/assets/{DiffsTab-Ceh4E5wW.js → DiffsTab-BHaJc7Ve.js} +43 -26
- package/out/renderer/assets/EGADTWYV-giCCF2cw.js +292 -0
- package/out/renderer/assets/EOJSJZXM-B9xc3U2A.js +1137 -0
- package/out/renderer/assets/{EditorWorkers-Bhv2OJRb.js → EditorWorkers-DABG5YG9.js} +9 -11
- package/out/renderer/assets/FTXIJQGB-BX14b7pN.js +13 -0
- package/out/renderer/assets/{FileIcon-CYgGSQ59.js → FileIcon-acads6Ac.js} +1 -1
- package/out/renderer/assets/{FilesTab-DESQMqGK.js → FilesTab-CyWw9vW2.js} +70 -28
- package/out/renderer/assets/G2OEIG6X-hZmo0wrY.js +519 -0
- package/out/renderer/assets/G3MDBVQH-qZ3yfAIw.js +25 -0
- package/out/renderer/assets/GXJ2T77W-Dx1MA_On.js +445 -0
- package/out/renderer/assets/HX3UMAK7-DcJt6NaE.js +177 -0
- package/out/renderer/assets/IU7WZTP6-BZMu2vL3.js +137 -0
- package/out/renderer/assets/J5J2NR2G-CbQLnnZq.js +673 -0
- package/out/renderer/assets/JRCWTJEL-xEOyWDIN.js +419 -0
- package/out/renderer/assets/KHUP5TOH-032p46g-.js +359 -0
- package/out/renderer/assets/L74FQTH5-CQ_54hNm.js +994 -0
- package/out/renderer/assets/LAV4ZXOS-DvhVMhLR.js +968 -0
- package/out/renderer/assets/LBIZYCRR-CMaDdulz.js +715 -0
- package/out/renderer/assets/LFFXNLRS-BjbqzBYN.js +377 -0
- package/out/renderer/assets/LLLWOAQD-B2zZRpRf.js +409 -0
- package/out/renderer/assets/LTYQZ5U5-DzI-7yJW.js +1223 -0
- package/out/renderer/assets/NDSCUZ25-C9oT6c6G.js +83 -0
- package/out/renderer/assets/NMN3IKWL-9IsXehWp.js +1042 -0
- package/out/renderer/assets/NMUA3R2D-B2ZuyfXA.js +1080 -0
- package/out/renderer/assets/NY5A6PPW-BzmvsXmE.js +523 -0
- package/out/renderer/assets/OHJ2EJXK-BEkFEoxu.js +85 -0
- package/out/renderer/assets/OU2GIT2H-DZQl_5qv.js +32 -0
- package/out/renderer/assets/PDMLSE6I-C3FMl6Ej.js +15 -0
- package/out/renderer/assets/PJ7X32S5-BQ3aTkUy.js +188 -0
- package/out/renderer/assets/RLLQ44NJ-Dq15CCQ6.js +248 -0
- package/out/renderer/assets/RVARI57O-DMrXgtoB.js +10 -0
- package/out/renderer/assets/S6DWMCK5-KeQNStMI.js +817 -0
- package/out/renderer/assets/STIOTUT7-ZnewWXB7.js +509 -0
- package/out/renderer/assets/SXSLPWUD-VIPmiOfk.js +120 -0
- package/out/renderer/assets/TR4WJQGX-CQ3dPMLJ.js +25 -0
- package/out/renderer/assets/UWRPUF3N-CtgKKvKe.js +1276 -0
- package/out/renderer/assets/VSWIZJ7B-BN-hZ_G_.js +205 -0
- package/out/renderer/assets/WM7NR6YK-CghasXna.js +193 -0
- package/out/renderer/assets/WXKV2YEK-C8qjO_OQ.js +499 -0
- package/out/renderer/assets/XLHPVVFU-CoRVO17g.js +56 -0
- package/out/renderer/assets/YNX532HU-DhZCm9iK.js +119 -0
- package/out/renderer/assets/YUPSMAUO-Brx2G_oh.js +39 -0
- package/out/renderer/assets/ZFRCZTLK-Cs8fJIgy.js +150 -0
- package/out/renderer/assets/ZZDR4CN3-DcTVOpcO.js +122 -0
- package/out/renderer/assets/andromeeda-Bx1G2cLE.js +293 -0
- package/out/renderer/assets/andromeeda-vBqMIOkk.js +293 -0
- package/out/renderer/assets/aurora-x-Cm7-xw-C.js +243 -0
- package/out/renderer/assets/aurora-x-DPl7s7lw.js +243 -0
- package/out/renderer/assets/ayu-dark-CwZzE4zG.js +207 -0
- package/out/renderer/assets/ayu-dark-DkHc-GR-.js +207 -0
- package/out/renderer/assets/ayu-light-D8NJUeg2.js +207 -0
- package/out/renderer/assets/ayu-light-DNVhSCsl.js +207 -0
- package/out/renderer/assets/ayu-mirage-C-lSBwzI.js +207 -0
- package/out/renderer/assets/ayu-mirage-JE49iZ2H.js +207 -0
- package/out/renderer/assets/catppuccin-frappe-DU1nAiyx.js +414 -0
- package/out/renderer/assets/catppuccin-frappe-DX6Q-ciL.js +414 -0
- package/out/renderer/assets/catppuccin-latte-CO9onEOF.js +414 -0
- package/out/renderer/assets/catppuccin-latte-CkSyOFfG.js +414 -0
- package/out/renderer/assets/catppuccin-macchiato-OyZDjojj.js +414 -0
- package/out/renderer/assets/catppuccin-macchiato-WINjU_Dw.js +414 -0
- package/out/renderer/assets/catppuccin-mocha-0z8-eFg0.js +414 -0
- package/out/renderer/assets/catppuccin-mocha-DRTSTdRR.js +414 -0
- package/out/renderer/assets/core-COuvbqNs.js +5186 -0
- package/out/renderer/assets/{highlight.worker-gURcNJD7.js → core-Drnj1qQL.js} +404 -4454
- package/out/renderer/assets/{core-xOIU6ifr.js → core-Z_paRVMb.js} +3208 -1946
- package/out/renderer/assets/dark-plus-BaggkchT.js +241 -0
- package/out/renderer/assets/dark-plus-Conw9IRY.js +241 -0
- package/out/renderer/assets/default-CzLFidVE.js +1890 -0
- package/out/renderer/assets/dracula-BKSZoV-6.js +227 -0
- package/out/renderer/assets/dracula-BpiXsqbq.js +227 -0
- package/out/renderer/assets/dracula-soft-BF0b4PXf.js +169 -0
- package/out/renderer/assets/dracula-soft-DIWOT7Wr.js +169 -0
- package/out/renderer/assets/engine-javascript-CtTomO8o.js +3238 -0
- package/out/renderer/assets/engine-javascript-DUvVq6Hk.js +3223 -0
- package/out/renderer/assets/engine-oniguruma-DKBWYAaE.js +482 -0
- package/out/renderer/assets/engine-oniguruma-mZf4aRKS.js +482 -0
- package/out/renderer/assets/everforest-dark-B3n4qCUZ.js +181 -0
- package/out/renderer/assets/everforest-dark-BXgth4bF.js +181 -0
- package/out/renderer/assets/everforest-light-BhaIwhYu.js +181 -0
- package/out/renderer/assets/everforest-light-cbpcbx0E.js +181 -0
- package/out/renderer/assets/{file-tabs-Cozt9Sho.js → file-tabs-BCf1cAWp.js} +10 -12
- package/out/renderer/assets/{ghostty-web-BTHoKwMc.js → ghostty-web-CdNv377h.js} +3 -1
- package/out/renderer/assets/github-dark-BESFF5XO.js +234 -0
- package/out/renderer/assets/github-dark-DNCSzN6m.js +234 -0
- package/out/renderer/assets/github-dark-default-DgFmzzcd.js +168 -0
- package/out/renderer/assets/github-dark-default-ffmDUf0z.js +168 -0
- package/out/renderer/assets/github-dark-dimmed-CLKTYZCg.js +225 -0
- package/out/renderer/assets/github-dark-dimmed-s1SLsKJt.js +225 -0
- package/out/renderer/assets/github-dark-high-contrast-CXehgwDU.js +225 -0
- package/out/renderer/assets/github-dark-high-contrast-KLlCEr3k.js +225 -0
- package/out/renderer/assets/github-light-U3PkvbB_.js +234 -0
- package/out/renderer/assets/github-light-default-BPzGUBgG.js +225 -0
- package/out/renderer/assets/github-light-default-xMLgS_bN.js +225 -0
- package/out/renderer/assets/github-light-high-contrast-C8D72_o0.js +225 -0
- package/out/renderer/assets/github-light-high-contrast-DQhuIFi9.js +225 -0
- package/out/renderer/assets/github-light-jtm9FPHO.js +234 -0
- package/out/renderer/assets/gruvbox-dark-hard-BAboCHnq.js +214 -0
- package/out/renderer/assets/gruvbox-dark-hard-woZR1aVf.js +214 -0
- package/out/renderer/assets/gruvbox-dark-medium-BsoEOmFF.js +214 -0
- package/out/renderer/assets/gruvbox-dark-medium-CNo7daJC.js +214 -0
- package/out/renderer/assets/gruvbox-dark-soft-CaJ_lf0b.js +214 -0
- package/out/renderer/assets/gruvbox-dark-soft-Cg271WAX.js +214 -0
- package/out/renderer/assets/gruvbox-light-hard-CEjA0x_J.js +214 -0
- package/out/renderer/assets/gruvbox-light-hard-D8Ufxp8E.js +214 -0
- package/out/renderer/assets/gruvbox-light-medium-BCS-MX7u.js +214 -0
- package/out/renderer/assets/gruvbox-light-medium-DZkNZdeM.js +214 -0
- package/out/renderer/assets/gruvbox-light-soft-CRdK2Ssn.js +214 -0
- package/out/renderer/assets/gruvbox-light-soft-DEEl98i-.js +214 -0
- package/out/renderer/assets/hastToHtml-AUrFnNH_.js +123 -0
- package/out/renderer/assets/highlight.worker-BYB12Fvh.js +1624 -0
- package/out/renderer/assets/highlights-Cjdp9LIq.js +292 -0
- package/out/renderer/assets/highlights-CpZm9DAR-DaBE50nC.js +2188 -0
- package/out/renderer/assets/highlights-DaYW35iB.js +313 -0
- package/out/renderer/assets/horizon-B492K9Ky.js +165 -0
- package/out/renderer/assets/horizon-DAZuC-xh.js +165 -0
- package/out/renderer/assets/horizon-bright-D2Sfzu7E.js +165 -0
- package/out/renderer/assets/horizon-bright-tGFWGsRc.js +165 -0
- package/out/renderer/assets/houston-BuwDhoUX.js +373 -0
- package/out/renderer/assets/houston-Cp9zzZds.js +373 -0
- package/out/renderer/assets/index-DhpOdP7M.js +882 -0
- package/out/renderer/assets/{index-DkE-xvCG.js → index-_dhRO6Oc.js} +1823 -384
- package/out/renderer/assets/{index-DrLLItLS.css → index-fNK5AY6Q.css} +202 -42
- package/out/renderer/assets/kanagawa-dragon-6NLBJhOz.js +229 -0
- package/out/renderer/assets/kanagawa-dragon-BF7rCHRT.js +229 -0
- package/out/renderer/assets/kanagawa-lotus-Cj8RDQcT.js +229 -0
- package/out/renderer/assets/kanagawa-lotus-uV7FMPcj.js +229 -0
- package/out/renderer/assets/kanagawa-wave-0rvDP1ei.js +229 -0
- package/out/renderer/assets/kanagawa-wave-B6IVm0GO.js +229 -0
- package/out/renderer/assets/{kit-BUt8oFlT.js → kit-E8-H6M0V.js} +45590 -39890
- package/out/renderer/assets/langs-BDUDFyts.js +1333 -0
- package/out/renderer/assets/langs-BtXnoosO.js +1331 -0
- package/out/renderer/assets/laserwave-DXWE1WnK.js +166 -0
- package/out/renderer/assets/laserwave-JLRBtymH.js +166 -0
- package/out/renderer/assets/lazy-DQmrNfMK.js +1188 -0
- package/out/renderer/assets/light-plus-DU2oMqtU.js +244 -0
- package/out/renderer/assets/light-plus-D_GZIzn-.js +244 -0
- package/out/renderer/assets/loader-byWkNl6P.js +83 -0
- package/out/renderer/assets/loader-q6EC19QI.js +80 -0
- package/out/renderer/assets/material-theme-C0rHRk_7.js +171 -0
- package/out/renderer/assets/material-theme-CKzpgSIj.js +171 -0
- package/out/renderer/assets/material-theme-darker-LxtgP-nI.js +171 -0
- package/out/renderer/assets/material-theme-darker-q1PJSGwC.js +171 -0
- package/out/renderer/assets/material-theme-lighter-Bo7q33GI.js +171 -0
- package/out/renderer/assets/material-theme-lighter-DIrXq_cm.js +171 -0
- package/out/renderer/assets/material-theme-ocean-DBoGA257.js +171 -0
- package/out/renderer/assets/material-theme-ocean-DKw0PiZ1.js +171 -0
- package/out/renderer/assets/material-theme-palenight-C6KqY_uf.js +171 -0
- package/out/renderer/assets/material-theme-palenight-DoLm5E7H.js +171 -0
- package/out/renderer/assets/min-dark-C29HEm34.js +166 -0
- package/out/renderer/assets/min-dark-C5zOB6s9.js +166 -0
- package/out/renderer/assets/min-light-BDAdB2zx.js +166 -0
- package/out/renderer/assets/min-light-CCfylF7u.js +166 -0
- package/out/renderer/assets/monokai-CgbJVDnk.js +246 -0
- package/out/renderer/assets/monokai-hi1UnAdE.js +246 -0
- package/out/renderer/assets/night-owl-Cy8ZrWil.js +238 -0
- package/out/renderer/assets/night-owl-Pfm14M0L.js +238 -0
- package/out/renderer/assets/night-owl-light-Cr6ug2dl.js +237 -0
- package/out/renderer/assets/night-owl-light-UewpB7JV.js +237 -0
- package/out/renderer/assets/nord-C68LX7oy.js +200 -0
- package/out/renderer/assets/nord-D68iK8nx.js +200 -0
- package/out/renderer/assets/one-dark-pro-DSih0ZZj.js +196 -0
- package/out/renderer/assets/one-dark-pro-DyTT0T_G.js +196 -0
- package/out/renderer/assets/one-light--fEa3idW.js +232 -0
- package/out/renderer/assets/one-light-BzGf0rQc.js +232 -0
- package/out/renderer/assets/{patch-parse.worker-BAW1QWyk.js → patch-parse.worker-siqPY9wG.js} +24 -4
- package/out/renderer/assets/pierre-dark-1Xh1-lMo.js +4 -0
- package/out/renderer/assets/pierre-dark-7z_hCG7W.js +364 -0
- package/out/renderer/assets/pierre-dark-protanopia-deuteranopia-DjiH32kw.js +364 -0
- package/out/renderer/assets/pierre-dark-protanopia-deuteranopia-GW6g2K_K.js +364 -0
- package/out/renderer/assets/pierre-dark-protanopia-deuteranopia-LDfpPKjm.js +4 -0
- package/out/renderer/assets/pierre-dark-soft-1iBHdNO0.js +364 -0
- package/out/renderer/assets/pierre-dark-soft-C_k_gt55.js +4 -0
- package/out/renderer/assets/pierre-dark-soft-D5-n1AeJ.js +364 -0
- package/out/renderer/assets/pierre-dark-tritanopia-CeWJyYfV.js +4 -0
- package/out/renderer/assets/pierre-dark-tritanopia-ClMvjOGO.js +364 -0
- package/out/renderer/assets/pierre-dark-tritanopia-D9kXXcwP.js +364 -0
- package/out/renderer/assets/pierre-dark-vibrant-6Oqz1PbM.js +4 -0
- package/out/renderer/assets/pierre-dark-vibrant-C8yH51pK.js +364 -0
- package/out/renderer/assets/pierre-dark-vibrant-D_7rJXbX.js +364 -0
- package/out/renderer/assets/pierre-dark-yHUcpElV.js +364 -0
- package/out/renderer/assets/pierre-light-BIebL0yQ.js +4 -0
- package/out/renderer/assets/pierre-light-C34x-mcs.js +364 -0
- package/out/renderer/assets/pierre-light-C9v4GAHb.js +364 -0
- package/out/renderer/assets/pierre-light-protanopia-deuteranopia-BufD2-1n.js +4 -0
- package/out/renderer/assets/pierre-light-protanopia-deuteranopia-DUrvpW2C.js +364 -0
- package/out/renderer/assets/pierre-light-protanopia-deuteranopia-VwXWNPo2.js +364 -0
- package/out/renderer/assets/pierre-light-soft-BmDnpPlM.js +364 -0
- package/out/renderer/assets/pierre-light-soft-Cd6v49hf.js +4 -0
- package/out/renderer/assets/pierre-light-soft-DqFh0kZA.js +364 -0
- package/out/renderer/assets/pierre-light-tritanopia-BVCfgdSF.js +364 -0
- package/out/renderer/assets/pierre-light-tritanopia-RkA2q6k9.js +364 -0
- package/out/renderer/assets/pierre-light-tritanopia-VrCUn-Lh.js +4 -0
- package/out/renderer/assets/pierre-light-vibrant-C5BaqWq3.js +364 -0
- package/out/renderer/assets/pierre-light-vibrant-CCrCMYrB.js +364 -0
- package/out/renderer/assets/pierre-light-vibrant-ClZHsQXl.js +4 -0
- package/out/renderer/assets/{pierre-theme-Bj5EAt1L.js → pierre-theme-CsyO3esE.js} +1022 -913
- package/out/renderer/assets/plastic-7t7HzasC.js +207 -0
- package/out/renderer/assets/plastic-EgWoj0TX.js +207 -0
- package/out/renderer/assets/poimandres-Clm3QHf_.js +186 -0
- package/out/renderer/assets/poimandres-_9ZL-zjP.js +186 -0
- package/out/renderer/assets/red-BGLMOAQA.js +240 -0
- package/out/renderer/assets/red-C7WxuK4s.js +240 -0
- package/out/renderer/assets/rose-pine-CSYOOLQH.js +200 -0
- package/out/renderer/assets/rose-pine-DQTixAK4.js +200 -0
- package/out/renderer/assets/rose-pine-dawn-BsExWFpO.js +200 -0
- package/out/renderer/assets/rose-pine-dawn-DtnCKB3V.js +200 -0
- package/out/renderer/assets/rose-pine-moon-CIVzFPCR.js +200 -0
- package/out/renderer/assets/rose-pine-moon-DUVYttUm.js +200 -0
- package/out/renderer/assets/shiki-Ci4cdHsM-C6d-uTVf.js +681 -0
- package/out/renderer/assets/shiki-DxXti3Bm.js +651 -0
- package/out/renderer/assets/slack-dark-DqfBLzDN.js +156 -0
- package/out/renderer/assets/slack-dark-PDVLPqBV.js +156 -0
- package/out/renderer/assets/slack-ochin-BXb20b9s.js +167 -0
- package/out/renderer/assets/slack-ochin-Bkl8Akj-.js +167 -0
- package/out/renderer/assets/snazzy-light-B-XgRQqH.js +169 -0
- package/out/renderer/assets/snazzy-light-B_Pnr_t3.js +169 -0
- package/out/renderer/assets/solarized-dark-BExlwCgF.js +256 -0
- package/out/renderer/assets/solarized-dark-BWOkBqBk.js +256 -0
- package/out/renderer/assets/solarized-light-B0LC-9ef.js +256 -0
- package/out/renderer/assets/solarized-light-B7xKmc3j.js +256 -0
- package/out/renderer/assets/stream-tokenizer-DK9xp5M5-BkzgPytU.js +2641 -0
- package/out/renderer/assets/stream-tokenizer-sqhinrU5.js +131 -0
- package/out/renderer/assets/synthwave-84-Bz5LYLQI.js +766 -0
- package/out/renderer/assets/synthwave-84-DnB997dV.js +766 -0
- package/out/renderer/assets/themes-DGY5d--g.js +323 -0
- package/out/renderer/assets/themes-KOxcu5sY.js +322 -0
- package/out/renderer/assets/tokyo-night-BFQDXQF9.js +343 -0
- package/out/renderer/assets/tokyo-night-BKV2xFQO.js +343 -0
- package/out/renderer/assets/{useDetachCleanup-Bb7k1ePf.js → useDetachCleanup-DYbCqwX-.js} +95 -51
- package/out/renderer/assets/{useFolderChanges-B4X4n6NV.js → useFolderChanges-Y0OqX_nG.js} +406 -242
- package/out/renderer/assets/utils-BcG7Lqcy.js +90 -0
- package/out/renderer/assets/{vendor-BvslLX9q.js → vendor-BpwX-s_O.js} +16835 -16799
- package/out/renderer/assets/{vendor-editor-Bx3dRdBD.js → vendor-editor-Cx3SvGyZ.js} +2 -2
- package/out/renderer/assets/{vendor-motion-BLeNAEjH.js → vendor-motion-CD5Og8pC.js} +3 -3
- package/out/renderer/assets/{vendor-react-DltKc0Ts.js → vendor-react-bPTwWURR.js} +28 -12
- package/out/renderer/assets/vesper-BVtJs6jF.js +173 -0
- package/out/renderer/assets/vesper-BXSaHQeX.js +173 -0
- package/out/renderer/assets/vitesse-black-Bk4nGSr_.js +388 -0
- package/out/renderer/assets/vitesse-black-DjBh7jMr.js +388 -0
- package/out/renderer/assets/vitesse-dark-BSeRY0TR.js +388 -0
- package/out/renderer/assets/vitesse-dark-Czy_Ejt3.js +388 -0
- package/out/renderer/assets/vitesse-light-BpMpGmeY.js +388 -0
- package/out/renderer/assets/vitesse-light-Cv09MZGR.js +388 -0
- package/out/renderer/assets/worker-CswOd5_T.js +2367 -0
- package/out/renderer/index.html +8 -9
- package/package.json +13 -6
- package/out/main/chunks/transcript-sql-DbZ-a5wb.js +0 -43
- package/out/renderer/assets/index-DogoEzwx.js +0 -10868
- package/out/renderer/assets/vendor-shiki-ba8IDo5s.js +0 -459
- package/out/renderer/assets/worker-DNIQ0wG8.js +0 -12761
|
@@ -0,0 +1,651 @@
|
|
|
1
|
+
import { _ as __vitePreload } from "./core-Z_paRVMb.js";
|
|
2
|
+
import { R as ResolvedLanguages, A as AttachedLanguages, a as appendItems, c as createDiffsThemeResolver, e as resolveLanguages, g as RegisteredCustomLanguages } from "./pierre-theme-CsyO3esE.js";
|
|
3
|
+
import { B as BaseStreamTokenizer, D as DiffsHighlighter } from "./stream-tokenizer-sqhinrU5.js";
|
|
4
|
+
import { d as debounce } from "./utils-BcG7Lqcy.js";
|
|
5
|
+
import { I as INITIAL, E as EncodedTokenMetadata, c as createHighlighterCore, a as createCssVariablesTheme } from "./core-Drnj1qQL.js";
|
|
6
|
+
import "./vendor-BpwX-s_O.js";
|
|
7
|
+
import "./vendor-react-bPTwWURR.js";
|
|
8
|
+
import "./hastToHtml-AUrFnNH_.js";
|
|
9
|
+
import "./index-DhpOdP7M.js";
|
|
10
|
+
function attachResolvedLanguages(resolvedLanguages, highlighter) {
|
|
11
|
+
for (const resolvedLang of Array.isArray(resolvedLanguages) ? resolvedLanguages : [resolvedLanguages]) {
|
|
12
|
+
let lang = ResolvedLanguages.get(resolvedLang.name);
|
|
13
|
+
if (lang == null) {
|
|
14
|
+
lang = resolvedLang;
|
|
15
|
+
ResolvedLanguages.set(resolvedLang.name, lang);
|
|
16
|
+
}
|
|
17
|
+
highlighter.attachLanguages([lang]);
|
|
18
|
+
AttachedLanguages.add(lang.name);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const TOKENIZE_TIME_LIMIT = 0;
|
|
22
|
+
let nextTokenizerId = 0;
|
|
23
|
+
var ShikiEditorTokenizer = class {
|
|
24
|
+
backend;
|
|
25
|
+
#highlighter;
|
|
26
|
+
#grammar;
|
|
27
|
+
#themeName;
|
|
28
|
+
#colorMap;
|
|
29
|
+
#textDocument;
|
|
30
|
+
#tokenizeMaxLineLength;
|
|
31
|
+
#onDeferTokenize;
|
|
32
|
+
#matchBrackets;
|
|
33
|
+
#debug;
|
|
34
|
+
#isCleanedUp = false;
|
|
35
|
+
#stateStack = [INITIAL];
|
|
36
|
+
#comparisonStateStack = [];
|
|
37
|
+
#comparisonStateStackStart = 0;
|
|
38
|
+
#comparisonLineChanges = [];
|
|
39
|
+
#lastLine = -1;
|
|
40
|
+
#isStopped = true;
|
|
41
|
+
#isPaused = false;
|
|
42
|
+
#backgroundJobId = 0;
|
|
43
|
+
#tokenizerId = ++nextTokenizerId;
|
|
44
|
+
#backgroundPrebuildEndLine = -1;
|
|
45
|
+
#pendingPrebuildEndLine = -1;
|
|
46
|
+
#backgroundChangedLineRanges;
|
|
47
|
+
#backgroundChangedRangeIndex = 0;
|
|
48
|
+
#bracketIgnoredRanges = [];
|
|
49
|
+
#isMessageListenerAttached = false;
|
|
50
|
+
#prebuildStateStack = debounce(async (renderRange) => {
|
|
51
|
+
if (this.#isCleanedUp) return;
|
|
52
|
+
const { startingLine = 0, totalLines = Infinity } = renderRange ?? {};
|
|
53
|
+
const endLine = Math.min(totalLines === Infinity ? Infinity : startingLine + totalLines, this.#textDocument.lineCount);
|
|
54
|
+
if (this.#grammar == null && !isGrammarlessLanguage(this.#textDocument.languageId)) {
|
|
55
|
+
await this.backend?.loadLanguages([this.#textDocument.languageId]);
|
|
56
|
+
if (this.#isCleanedUp) return;
|
|
57
|
+
this.#grammar = this.#highlighter.getLanguage(this.#textDocument.languageId);
|
|
58
|
+
}
|
|
59
|
+
this.#ensureActiveTheme();
|
|
60
|
+
this.#scheduleStatePrebuild(endLine);
|
|
61
|
+
}, 500);
|
|
62
|
+
#onMessage = ({ data }) => {
|
|
63
|
+
if (typeof data !== "object" || data === null) return;
|
|
64
|
+
const { type, tokenizerId, jobId } = data;
|
|
65
|
+
if (type === "tokenize" && tokenizerId === this.#tokenizerId && typeof jobId === "number" && jobId === this.#backgroundJobId) {
|
|
66
|
+
if (this.#backgroundPrebuildEndLine >= 0) this.#backgroundPrebuild(jobId);
|
|
67
|
+
else this.#backgroundTokenize(jobId);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
getStringCommentRegexpRangesInLine(lineIndex) {
|
|
71
|
+
if (!this.#matchBrackets || lineIndex < 0 || lineIndex >= this.#textDocument.lineCount) return null;
|
|
72
|
+
this.#ensureGrammar();
|
|
73
|
+
if (this.#grammar == null) return null;
|
|
74
|
+
if (this.#bracketIgnoredRanges[lineIndex] === void 0) {
|
|
75
|
+
this.#buildStateStack(lineIndex);
|
|
76
|
+
const state = this.#stateStack[lineIndex] ?? INITIAL;
|
|
77
|
+
const result = this.#tokenizeLineAt(lineIndex, state);
|
|
78
|
+
this.#stateStack[lineIndex + 1] = result.state;
|
|
79
|
+
}
|
|
80
|
+
return this.#bracketIgnoredRanges[lineIndex] ?? null;
|
|
81
|
+
}
|
|
82
|
+
constructor(highlighter, options, backend) {
|
|
83
|
+
this.backend = backend;
|
|
84
|
+
this.#highlighter = highlighter;
|
|
85
|
+
this.#textDocument = options.textDocument;
|
|
86
|
+
this.#themeName = options.theme;
|
|
87
|
+
this.#colorMap = [];
|
|
88
|
+
this.#tokenizeMaxLineLength = options.tokenizeMaxLineLength ?? 1e3;
|
|
89
|
+
this.#onDeferTokenize = options.onDeferTokenize;
|
|
90
|
+
this.#matchBrackets = options.matchBrackets !== false;
|
|
91
|
+
this.#debug = options.__debug ?? false;
|
|
92
|
+
this.#ensureGrammar();
|
|
93
|
+
this.#ensureActiveTheme();
|
|
94
|
+
}
|
|
95
|
+
setTheme(themeName) {
|
|
96
|
+
if (this.#themeName === themeName) return;
|
|
97
|
+
this.#themeName = themeName;
|
|
98
|
+
this.#ensureActiveTheme();
|
|
99
|
+
this.stopBackgroundTokenize();
|
|
100
|
+
this.#stateStack = [INITIAL];
|
|
101
|
+
this.#comparisonStateStack = [];
|
|
102
|
+
this.#comparisonStateStackStart = 0;
|
|
103
|
+
this.#comparisonLineChanges = [];
|
|
104
|
+
if (this.#grammar != null && this.#textDocument.lineCount > 0) this.#scheduleBackgroundTokenize(0);
|
|
105
|
+
}
|
|
106
|
+
#ensureActiveTheme() {
|
|
107
|
+
if (this.#themeName === "") return;
|
|
108
|
+
this.backend?.getTheme(this.#themeName);
|
|
109
|
+
const { colorMap } = this.#highlighter.setTheme(this.#themeName);
|
|
110
|
+
this.#colorMap = colorMap;
|
|
111
|
+
}
|
|
112
|
+
dispose() {
|
|
113
|
+
this.#isCleanedUp = true;
|
|
114
|
+
this.stopBackgroundTokenize();
|
|
115
|
+
this.#detachMessageListener();
|
|
116
|
+
}
|
|
117
|
+
tokenize(change, renderRange, hostRealignsRows = false) {
|
|
118
|
+
this.#ensureGrammar();
|
|
119
|
+
this.#ensureActiveTheme();
|
|
120
|
+
if (this.#grammar == null && !isGrammarlessLanguage(this.#textDocument.languageId)) throw new Error(`Grammar for language "${this.#textDocument.languageId}" not loaded`);
|
|
121
|
+
const { lineCount } = this.#textDocument;
|
|
122
|
+
const { startingLine = 0, totalLines = Infinity } = renderRange ?? {};
|
|
123
|
+
const renderRangeEndLine = totalLines === Infinity ? lineCount : Math.min(startingLine + totalLines, lineCount);
|
|
124
|
+
const dirtyStart = change.startLine;
|
|
125
|
+
const viewStart = Math.max(startingLine, dirtyStart);
|
|
126
|
+
const crossesRenderRangeEnd = renderRange != null && totalLines !== Infinity && change.lineDelta > 0 && dirtyStart < renderRangeEndLine && change.endLine >= renderRangeEndLine;
|
|
127
|
+
const canReuseCachedStates = change.lineDelta === 0 && (change.changedLineChanges?.every(([, , lineDelta]) => lineDelta === 0) ?? true);
|
|
128
|
+
if (this.#matchBrackets && !canReuseCachedStates) this.#bracketIgnoredRanges.length = Math.min(this.#bracketIgnoredRanges.length, change.startLine);
|
|
129
|
+
const canReuseShiftedStates = hostRealignsRows && change.lineDelta !== 0 && dirtyStart >= startingLine;
|
|
130
|
+
const canCacheTokenizedStates = canReuseCachedStates || renderRange == null || dirtyStart >= viewStart;
|
|
131
|
+
const changedLineRanges = change.changedLineRanges ?? [[dirtyStart, change.endLine]];
|
|
132
|
+
this.#comparisonStateStack = [];
|
|
133
|
+
this.#comparisonStateStackStart = 0;
|
|
134
|
+
this.#comparisonLineChanges = [];
|
|
135
|
+
let offscreenSyncEnd = -1;
|
|
136
|
+
if (dirtyStart < viewStart) {
|
|
137
|
+
for (const [rangeStart, rangeEnd] of changedLineRanges) if (rangeStart < viewStart) offscreenSyncEnd = Math.max(offscreenSyncEnd, Math.min(rangeEnd, viewStart - 1));
|
|
138
|
+
}
|
|
139
|
+
const shouldFlushOffscreenLines = offscreenSyncEnd >= dirtyStart && (canReuseCachedStates || change.lineDelta < 0);
|
|
140
|
+
if (canReuseCachedStates) this.#buildStateStack(dirtyStart);
|
|
141
|
+
else {
|
|
142
|
+
this.#shiftComparisonStateStack(change);
|
|
143
|
+
if (renderRange == null || dirtyStart >= viewStart) this.#buildStateStack(viewStart);
|
|
144
|
+
}
|
|
145
|
+
let changedRangeIndex = 0;
|
|
146
|
+
let currentChangedRangeEnd = changedLineRanges[changedRangeIndex][1];
|
|
147
|
+
let backgroundStartLine;
|
|
148
|
+
let backgroundChangedRangeIndex = 0;
|
|
149
|
+
let line = canReuseCachedStates ? changedLineRanges[changedRangeIndex][0] : viewStart;
|
|
150
|
+
let settled = false;
|
|
151
|
+
const dirtyLines = /* @__PURE__ */ new Map();
|
|
152
|
+
const offscreenDirtyLines = shouldFlushOffscreenLines ? /* @__PURE__ */ new Map() : void 0;
|
|
153
|
+
if (offscreenDirtyLines != null && !canReuseCachedStates) {
|
|
154
|
+
const offscreenEnd = Math.min(offscreenSyncEnd + 1, viewStart, renderRangeEndLine);
|
|
155
|
+
if (offscreenEnd > dirtyStart) {
|
|
156
|
+
this.#buildStateStack(offscreenEnd);
|
|
157
|
+
let offscreenLine = dirtyStart;
|
|
158
|
+
let offscreenState = this.#stateStack[offscreenLine] ?? INITIAL;
|
|
159
|
+
for (; offscreenLine < offscreenEnd; offscreenLine++) {
|
|
160
|
+
const resolved = this.#tokenizeLineAt(offscreenLine, offscreenState);
|
|
161
|
+
offscreenState = resolved.state;
|
|
162
|
+
offscreenDirtyLines.set(offscreenLine, resolved.resolvedTokens);
|
|
163
|
+
}
|
|
164
|
+
this.#stateStack[offscreenEnd] = offscreenState;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
let state = this.#stateStack[line] ?? INITIAL;
|
|
168
|
+
for (; line < renderRangeEndLine; ) {
|
|
169
|
+
const previousNextState = canReuseCachedStates ? this.#stateStack[line + 1] : canReuseShiftedStates ? this.#getPreviousEndState(line + 1) : void 0;
|
|
170
|
+
if (canCacheTokenizedStates) this.#stateStack[line] = state;
|
|
171
|
+
const { resolvedTokens, state: nextState } = this.#tokenizeLineAt(line, state);
|
|
172
|
+
state = nextState;
|
|
173
|
+
if (line >= viewStart) dirtyLines.set(line, resolvedTokens);
|
|
174
|
+
else offscreenDirtyLines?.set(line, resolvedTokens);
|
|
175
|
+
if (canCacheTokenizedStates) this.#stateStack[line + 1] = state;
|
|
176
|
+
settled = line >= currentChangedRangeEnd && (canReuseCachedStates || canReuseShiftedStates) && previousNextState != null && state.equals(previousNextState);
|
|
177
|
+
if (settled) {
|
|
178
|
+
changedRangeIndex++;
|
|
179
|
+
const nextRange = changedLineRanges[changedRangeIndex];
|
|
180
|
+
if (nextRange == null) break;
|
|
181
|
+
if (nextRange[0] >= renderRangeEndLine) {
|
|
182
|
+
backgroundStartLine = nextRange[0];
|
|
183
|
+
backgroundChangedRangeIndex = changedRangeIndex;
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
let nextState2 = this.#stateStack[nextRange[0]];
|
|
187
|
+
if (canReuseShiftedStates) for (let stateLine = line + 2; stateLine <= nextRange[0]; stateLine++) {
|
|
188
|
+
nextState2 = this.#getPreviousEndState(stateLine);
|
|
189
|
+
if (nextState2 == null) break;
|
|
190
|
+
this.#stateStack[stateLine] = nextState2;
|
|
191
|
+
}
|
|
192
|
+
if (nextState2 == null) {
|
|
193
|
+
currentChangedRangeEnd = nextRange[1];
|
|
194
|
+
line++;
|
|
195
|
+
} else {
|
|
196
|
+
line = nextRange[0];
|
|
197
|
+
state = nextState2;
|
|
198
|
+
currentChangedRangeEnd = nextRange[1];
|
|
199
|
+
}
|
|
200
|
+
settled = false;
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
line++;
|
|
204
|
+
}
|
|
205
|
+
if (canCacheTokenizedStates) {
|
|
206
|
+
if (line < renderRangeEndLine) this.#stateStack[line + 1] = state;
|
|
207
|
+
else this.#stateStack[line] = state;
|
|
208
|
+
}
|
|
209
|
+
if (settled && canReuseShiftedStates && backgroundStartLine == null) {
|
|
210
|
+
for (let stateLine = line + 2; stateLine <= lineCount; stateLine++) {
|
|
211
|
+
const previousState = this.#getPreviousEndState(stateLine);
|
|
212
|
+
if (previousState == null) break;
|
|
213
|
+
this.#stateStack[stateLine] = previousState;
|
|
214
|
+
}
|
|
215
|
+
this.#comparisonStateStack = [];
|
|
216
|
+
this.#comparisonStateStackStart = 0;
|
|
217
|
+
this.#comparisonLineChanges = [];
|
|
218
|
+
}
|
|
219
|
+
if (offscreenDirtyLines != null && offscreenDirtyLines.size > 0) this.#onDeferTokenize(offscreenDirtyLines);
|
|
220
|
+
if (backgroundStartLine != null) {
|
|
221
|
+
if (this.#matchBrackets && canReuseCachedStates) this.#bracketIgnoredRanges.length = Math.min(this.#bracketIgnoredRanges.length, backgroundStartLine);
|
|
222
|
+
this.#scheduleBackgroundTokenize(backgroundStartLine, changedLineRanges, backgroundChangedRangeIndex);
|
|
223
|
+
} else if (!settled && line < lineCount) {
|
|
224
|
+
const backgroundLine = crossesRenderRangeEnd && dirtyStart >= viewStart ? renderRangeEndLine : dirtyStart < viewStart && !canReuseCachedStates ? dirtyStart : line;
|
|
225
|
+
if (this.#matchBrackets && canReuseCachedStates) this.#bracketIgnoredRanges.length = Math.min(this.#bracketIgnoredRanges.length, backgroundLine);
|
|
226
|
+
this.#scheduleBackgroundTokenize(backgroundLine, changedLineRanges, changedRangeIndex);
|
|
227
|
+
}
|
|
228
|
+
return dirtyLines;
|
|
229
|
+
}
|
|
230
|
+
prebuildStateStack(renderRange) {
|
|
231
|
+
this.#ensureGrammar();
|
|
232
|
+
this.#prebuildStateStack(renderRange);
|
|
233
|
+
}
|
|
234
|
+
stopBackgroundTokenize() {
|
|
235
|
+
this.#pendingPrebuildEndLine = -1;
|
|
236
|
+
if (this.#isStopped) return;
|
|
237
|
+
this.#isStopped = true;
|
|
238
|
+
this.#isPaused = false;
|
|
239
|
+
this.#lastLine = -1;
|
|
240
|
+
this.#backgroundPrebuildEndLine = -1;
|
|
241
|
+
this.#backgroundChangedLineRanges = void 0;
|
|
242
|
+
this.#backgroundChangedRangeIndex = 0;
|
|
243
|
+
this.#comparisonStateStack = [];
|
|
244
|
+
this.#comparisonStateStackStart = 0;
|
|
245
|
+
this.#comparisonLineChanges = [];
|
|
246
|
+
this.#detachMessageListener();
|
|
247
|
+
}
|
|
248
|
+
pauseBackgroundTokenize() {
|
|
249
|
+
if (this.#isStopped || this.#isPaused) return;
|
|
250
|
+
if (this.#debug) console.log("[diffs/editor] background tokenization paused", { jobId: this.#backgroundJobId });
|
|
251
|
+
this.#isPaused = true;
|
|
252
|
+
}
|
|
253
|
+
resumeBackgroundTokenize() {
|
|
254
|
+
if (this.#isStopped || !this.#isPaused || this.#grammar == null || this.#lastLine < 0) return;
|
|
255
|
+
if (this.#debug) console.log("[diffs/editor] background tokenization resumed", { jobId: this.#backgroundJobId });
|
|
256
|
+
this.#isPaused = false;
|
|
257
|
+
this.#postTokenizeMessage(this.#backgroundJobId);
|
|
258
|
+
}
|
|
259
|
+
#ensureGrammar() {
|
|
260
|
+
if (this.#grammar == null && !isGrammarlessLanguage(this.#textDocument.languageId) && this.#highlighter.getLoadedLanguages().includes(this.#textDocument.languageId)) this.#grammar = this.#highlighter.getLanguage(this.#textDocument.languageId);
|
|
261
|
+
}
|
|
262
|
+
#attachMessageListener() {
|
|
263
|
+
if (this.#isMessageListenerAttached) return;
|
|
264
|
+
globalThis.addEventListener("message", this.#onMessage);
|
|
265
|
+
this.#isMessageListenerAttached = true;
|
|
266
|
+
}
|
|
267
|
+
#detachMessageListener() {
|
|
268
|
+
if (!this.#isMessageListenerAttached) return;
|
|
269
|
+
globalThis.removeEventListener("message", this.#onMessage);
|
|
270
|
+
this.#isMessageListenerAttached = false;
|
|
271
|
+
}
|
|
272
|
+
#postTokenizeMessage(jobId) {
|
|
273
|
+
globalThis.postMessage({
|
|
274
|
+
type: "tokenize",
|
|
275
|
+
tokenizerId: this.#tokenizerId,
|
|
276
|
+
jobId
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
#scheduleBackgroundTokenize(startLine, changedLineRanges, changedRangeIndex = 0) {
|
|
280
|
+
if (isGrammarlessLanguage(this.#textDocument.languageId)) return;
|
|
281
|
+
const jobId = ++this.#backgroundJobId;
|
|
282
|
+
if (this.#debug) console.log("[diffs/editor] background tokenization scheduled", {
|
|
283
|
+
jobId,
|
|
284
|
+
startLine,
|
|
285
|
+
changedLineRanges,
|
|
286
|
+
changedRangeIndex
|
|
287
|
+
});
|
|
288
|
+
this.#isStopped = false;
|
|
289
|
+
this.#isPaused = false;
|
|
290
|
+
this.#lastLine = startLine;
|
|
291
|
+
if (this.#backgroundPrebuildEndLine >= 0) this.#pendingPrebuildEndLine = Math.max(this.#pendingPrebuildEndLine, this.#backgroundPrebuildEndLine);
|
|
292
|
+
this.#backgroundPrebuildEndLine = -1;
|
|
293
|
+
this.#backgroundChangedLineRanges = changedLineRanges;
|
|
294
|
+
this.#backgroundChangedRangeIndex = changedRangeIndex;
|
|
295
|
+
this.#attachMessageListener();
|
|
296
|
+
this.#postTokenizeMessage(jobId);
|
|
297
|
+
}
|
|
298
|
+
#scheduleStatePrebuild(endLine) {
|
|
299
|
+
if (this.#grammar == null || this.#stateStack.length > endLine) return;
|
|
300
|
+
if (!this.#isStopped) {
|
|
301
|
+
if (this.#backgroundPrebuildEndLine >= 0) this.#backgroundPrebuildEndLine = Math.max(this.#backgroundPrebuildEndLine, endLine);
|
|
302
|
+
else this.#pendingPrebuildEndLine = Math.max(this.#pendingPrebuildEndLine, endLine);
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
const jobId = ++this.#backgroundJobId;
|
|
306
|
+
this.#isStopped = false;
|
|
307
|
+
this.#isPaused = false;
|
|
308
|
+
this.#lastLine = this.#stateStack.length - 1;
|
|
309
|
+
this.#backgroundPrebuildEndLine = endLine;
|
|
310
|
+
this.#pendingPrebuildEndLine = -1;
|
|
311
|
+
this.#backgroundChangedLineRanges = void 0;
|
|
312
|
+
this.#backgroundChangedRangeIndex = 0;
|
|
313
|
+
this.#attachMessageListener();
|
|
314
|
+
this.#postTokenizeMessage(jobId);
|
|
315
|
+
}
|
|
316
|
+
#tokenizeLineAt(line, state) {
|
|
317
|
+
const lineText = this.#textDocument.getLineText(line);
|
|
318
|
+
if (lineText.length >= this.#tokenizeMaxLineLength) {
|
|
319
|
+
console.warn(`[diffs] Line(${line}) too long to tokenize: ${lineText.length}`);
|
|
320
|
+
this.#cacheBracketIgnoredRanges(line, null);
|
|
321
|
+
return {
|
|
322
|
+
resolvedTokens: [[
|
|
323
|
+
0,
|
|
324
|
+
"",
|
|
325
|
+
lineText
|
|
326
|
+
]],
|
|
327
|
+
state
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
if (this.#grammar == null || lineText === "" || lineText.trim() === "") {
|
|
331
|
+
this.#cacheBracketIgnoredRanges(line, null);
|
|
332
|
+
return {
|
|
333
|
+
resolvedTokens: [[
|
|
334
|
+
0,
|
|
335
|
+
"",
|
|
336
|
+
lineText
|
|
337
|
+
]],
|
|
338
|
+
state
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
const result = tokenizeLine(this.#grammar, this.#colorMap, lineText, state, TOKENIZE_TIME_LIMIT, this.#matchBrackets);
|
|
342
|
+
this.#cacheBracketIgnoredRanges(line, result.bracketIgnoredRanges);
|
|
343
|
+
return {
|
|
344
|
+
resolvedTokens: result.resolvedTokens,
|
|
345
|
+
state: result.ruleStack
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
#cacheBracketIgnoredRanges(line, ranges) {
|
|
349
|
+
if (this.#matchBrackets) this.#bracketIgnoredRanges[line] = ranges;
|
|
350
|
+
}
|
|
351
|
+
#shiftComparisonStateStack(change) {
|
|
352
|
+
const lineChanges = change.changedLineChanges ?? [[
|
|
353
|
+
change.startLine,
|
|
354
|
+
change.endLine,
|
|
355
|
+
change.lineDelta
|
|
356
|
+
]];
|
|
357
|
+
const comparisonStart = change.startLine + 1;
|
|
358
|
+
if (comparisonStart <= this.#stateStack.length - comparisonStart) {
|
|
359
|
+
this.#comparisonStateStack = this.#stateStack;
|
|
360
|
+
this.#comparisonStateStackStart = 0;
|
|
361
|
+
this.#stateStack = this.#stateStack.slice(0, comparisonStart);
|
|
362
|
+
} else {
|
|
363
|
+
this.#comparisonStateStackStart = comparisonStart;
|
|
364
|
+
this.#comparisonStateStack = this.#stateStack.slice(comparisonStart);
|
|
365
|
+
this.#stateStack.length = Math.min(this.#stateStack.length, comparisonStart);
|
|
366
|
+
}
|
|
367
|
+
this.#comparisonLineChanges = lineChanges;
|
|
368
|
+
}
|
|
369
|
+
#getPreviousEndState(line) {
|
|
370
|
+
let previousLine = line;
|
|
371
|
+
for (let index = this.#comparisonLineChanges.length - 1; index >= 0; index--) {
|
|
372
|
+
const [startLine, endLine, lineDelta] = this.#comparisonLineChanges[index];
|
|
373
|
+
if (lineDelta === 0) continue;
|
|
374
|
+
if (previousLine > endLine) previousLine -= lineDelta;
|
|
375
|
+
else if (previousLine > startLine) return this.#stateStack[line];
|
|
376
|
+
}
|
|
377
|
+
return this.#comparisonStateStack[previousLine - this.#comparisonStateStackStart] ?? this.#stateStack[line];
|
|
378
|
+
}
|
|
379
|
+
#buildStateStack(endAt, timeBudget) {
|
|
380
|
+
const boundedEndAt = Math.min(Math.max(0, endAt), this.#textDocument.lineCount);
|
|
381
|
+
if (this.#stateStack.length > boundedEndAt || this.#grammar == null) return true;
|
|
382
|
+
const startedAt = timeBudget == null ? 0 : performance.now();
|
|
383
|
+
let line = this.#stateStack.length - 1;
|
|
384
|
+
let state = this.#stateStack[line] ?? INITIAL;
|
|
385
|
+
while (line < boundedEndAt) {
|
|
386
|
+
this.#stateStack[line] = state;
|
|
387
|
+
const lineText = this.#textDocument.getLineText(line);
|
|
388
|
+
if (lineText.length < this.#tokenizeMaxLineLength && lineText !== "" && lineText.trim() !== "") {
|
|
389
|
+
const result = tokenizeLine(this.#grammar, this.#colorMap, lineText, state, TOKENIZE_TIME_LIMIT, this.#matchBrackets, false);
|
|
390
|
+
this.#cacheBracketIgnoredRanges(line, result.bracketIgnoredRanges);
|
|
391
|
+
state = result.ruleStack;
|
|
392
|
+
} else this.#cacheBracketIgnoredRanges(line, null);
|
|
393
|
+
line++;
|
|
394
|
+
this.#stateStack[line] = state;
|
|
395
|
+
if (timeBudget != null && performance.now() - startedAt > timeBudget) break;
|
|
396
|
+
}
|
|
397
|
+
return line >= boundedEndAt;
|
|
398
|
+
}
|
|
399
|
+
#backgroundPrebuild(jobId) {
|
|
400
|
+
if (this.#isStopped || this.#isPaused || this.#grammar == null || jobId !== this.#backgroundJobId) return;
|
|
401
|
+
this.#ensureActiveTheme();
|
|
402
|
+
const complete = this.#buildStateStack(this.#backgroundPrebuildEndLine, 1);
|
|
403
|
+
if (this.#isStopped || this.#isPaused || jobId !== this.#backgroundJobId) return;
|
|
404
|
+
if (complete) {
|
|
405
|
+
this.stopBackgroundTokenize();
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
this.#lastLine = this.#stateStack.length - 1;
|
|
409
|
+
this.#postTokenizeMessage(jobId);
|
|
410
|
+
}
|
|
411
|
+
#backgroundTokenize(jobId) {
|
|
412
|
+
if (this.#isStopped || this.#isPaused || this.#grammar == null || jobId !== this.#backgroundJobId) return;
|
|
413
|
+
this.#ensureActiveTheme();
|
|
414
|
+
const t = performance.now();
|
|
415
|
+
const lines = /* @__PURE__ */ new Map();
|
|
416
|
+
const totalLines = this.#textDocument.lineCount;
|
|
417
|
+
const changedLineRanges = this.#backgroundChangedLineRanges;
|
|
418
|
+
let line = this.#lastLine;
|
|
419
|
+
let state = this.#stateStack[line] ?? INITIAL;
|
|
420
|
+
let settled = false;
|
|
421
|
+
let changedRangeIndex = this.#backgroundChangedRangeIndex;
|
|
422
|
+
let currentChangedRangeEnd = changedLineRanges?.[changedRangeIndex]?.[1];
|
|
423
|
+
for (; line < totalLines; ) {
|
|
424
|
+
this.#stateStack[line] = state;
|
|
425
|
+
const previousNextState = currentChangedRangeEnd != null ? this.#getPreviousEndState(line + 1) : void 0;
|
|
426
|
+
const result = this.#tokenizeLineAt(line, state);
|
|
427
|
+
lines.set(line, result.resolvedTokens);
|
|
428
|
+
state = result.state;
|
|
429
|
+
this.#stateStack[line + 1] = state;
|
|
430
|
+
settled = currentChangedRangeEnd != null && line >= currentChangedRangeEnd && previousNextState != null && state.equals(previousNextState);
|
|
431
|
+
line++;
|
|
432
|
+
if (settled) {
|
|
433
|
+
changedRangeIndex++;
|
|
434
|
+
const nextRange = changedLineRanges?.[changedRangeIndex];
|
|
435
|
+
if (nextRange == null) break;
|
|
436
|
+
currentChangedRangeEnd = nextRange[1];
|
|
437
|
+
if (this.#stateStack[nextRange[0]] == null) settled = false;
|
|
438
|
+
else {
|
|
439
|
+
line = nextRange[0];
|
|
440
|
+
state = this.#stateStack[line] ?? state;
|
|
441
|
+
settled = false;
|
|
442
|
+
continue;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
if (performance.now() - t > 1) break;
|
|
446
|
+
}
|
|
447
|
+
this.#onDeferTokenize(lines);
|
|
448
|
+
if (this.#isStopped || this.#isPaused || jobId !== this.#backgroundJobId) return;
|
|
449
|
+
if (settled || line >= totalLines) {
|
|
450
|
+
const pendingPrebuildEndLine = this.#pendingPrebuildEndLine;
|
|
451
|
+
this.stopBackgroundTokenize();
|
|
452
|
+
if (pendingPrebuildEndLine >= 0) this.#scheduleStatePrebuild(pendingPrebuildEndLine);
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
this.#lastLine = line;
|
|
456
|
+
this.#backgroundChangedRangeIndex = changedRangeIndex;
|
|
457
|
+
this.#postTokenizeMessage(jobId);
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
function tokenizeLine(grammar, colorMap, lineText, stateStack, timeLimit, collectBracketIgnoredRanges = true, resolveTokens = true) {
|
|
461
|
+
const result = grammar.tokenizeLine2(lineText, stateStack, timeLimit);
|
|
462
|
+
if (result.stoppedEarly) console.warn(`[diffs] Time limit reached when tokenizing line: ${lineText.substring(0, 100)}`);
|
|
463
|
+
const rawTokens = result.tokens;
|
|
464
|
+
const tokensLength = rawTokens.length / 2;
|
|
465
|
+
const resolvedTokens = [];
|
|
466
|
+
const bracketIgnoredRanges = [];
|
|
467
|
+
if (!resolveTokens && !collectBracketIgnoredRanges) return {
|
|
468
|
+
ruleStack: result.ruleStack,
|
|
469
|
+
resolvedTokens,
|
|
470
|
+
bracketIgnoredRanges
|
|
471
|
+
};
|
|
472
|
+
for (let j = 0; j < tokensLength; j++) {
|
|
473
|
+
const offset = rawTokens[2 * j];
|
|
474
|
+
const nextOffset = j + 1 < tokensLength ? rawTokens[2 * j + 2] : lineText.length;
|
|
475
|
+
if (offset === nextOffset) continue;
|
|
476
|
+
const metadata = rawTokens[2 * j + 1];
|
|
477
|
+
if (resolveTokens) {
|
|
478
|
+
const fg = EncodedTokenMetadata.getForeground(metadata);
|
|
479
|
+
resolvedTokens.push([
|
|
480
|
+
offset,
|
|
481
|
+
colorMap[fg],
|
|
482
|
+
lineText.slice(offset, nextOffset)
|
|
483
|
+
]);
|
|
484
|
+
}
|
|
485
|
+
if (collectBracketIgnoredRanges && EncodedTokenMetadata.getTokenType(metadata) > 0) bracketIgnoredRanges.push([offset, nextOffset]);
|
|
486
|
+
}
|
|
487
|
+
return {
|
|
488
|
+
ruleStack: result.ruleStack,
|
|
489
|
+
resolvedTokens,
|
|
490
|
+
bracketIgnoredRanges
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
function isGrammarlessLanguage(languageId) {
|
|
494
|
+
return languageId === "text" || languageId === "ansi";
|
|
495
|
+
}
|
|
496
|
+
var ShikiStreamTokenizer = class ShikiStreamTokenizer2 extends BaseStreamTokenizer {
|
|
497
|
+
highlighter;
|
|
498
|
+
options;
|
|
499
|
+
#tail = "";
|
|
500
|
+
#grammarState;
|
|
501
|
+
constructor(highlighter, options) {
|
|
502
|
+
super();
|
|
503
|
+
this.highlighter = highlighter;
|
|
504
|
+
this.options = options;
|
|
505
|
+
}
|
|
506
|
+
tokenizeChunk(chunk, stable) {
|
|
507
|
+
const chunkLines = (this.#tail + chunk).split(/(\r\n|\r|\n)/);
|
|
508
|
+
let unstable = [];
|
|
509
|
+
for (let i = 0; i < chunkLines.length; i += 2) {
|
|
510
|
+
const line = chunkLines[i];
|
|
511
|
+
const result = this.highlighter.codeToTokens(line, {
|
|
512
|
+
...this.options,
|
|
513
|
+
grammarState: this.#grammarState
|
|
514
|
+
});
|
|
515
|
+
const tokens = result.tokens[0].map((token) => ({
|
|
516
|
+
...token,
|
|
517
|
+
offset: token.offset + this.stableOffset
|
|
518
|
+
}));
|
|
519
|
+
if (i + 1 < chunkLines.length) {
|
|
520
|
+
appendItems(stable, tokens);
|
|
521
|
+
this.pushLineBreak(stable, line.length, chunkLines[i + 1]);
|
|
522
|
+
this.#grammarState = result.grammarState;
|
|
523
|
+
} else {
|
|
524
|
+
unstable = tokens;
|
|
525
|
+
this.#tail = line;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
return {
|
|
529
|
+
unstable,
|
|
530
|
+
tailLength: this.#tail.length
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
clone() {
|
|
534
|
+
this.assertActive();
|
|
535
|
+
const clone = new ShikiStreamTokenizer2(this.highlighter, this.options);
|
|
536
|
+
this.copyStateTo(clone);
|
|
537
|
+
clone.#tail = this.#tail;
|
|
538
|
+
clone.#grammarState = this.#grammarState;
|
|
539
|
+
return clone;
|
|
540
|
+
}
|
|
541
|
+
resetSource() {
|
|
542
|
+
this.#tail = "";
|
|
543
|
+
this.#grammarState = void 0;
|
|
544
|
+
}
|
|
545
|
+
releaseSource() {
|
|
546
|
+
this.resetSource();
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
var ShikiHighlighter = class ShikiHighlighter2 extends DiffsHighlighter {
|
|
550
|
+
raw;
|
|
551
|
+
loadedThemes = /* @__PURE__ */ new Map();
|
|
552
|
+
attachedLanguages = /* @__PURE__ */ new Set(["text", "ansi"]);
|
|
553
|
+
static async create(name) {
|
|
554
|
+
const engine = name === "shiki-wasm" ? (await __vitePreload(async () => {
|
|
555
|
+
const { createOnigurumaEngine } = await import("./engine-oniguruma-DKBWYAaE.js");
|
|
556
|
+
return { createOnigurumaEngine };
|
|
557
|
+
}, true ? [] : void 0, import.meta.url)).createOnigurumaEngine(__vitePreload(() => import("./wasm-DDgzZJey.js"), true ? [] : void 0, import.meta.url)) : (await __vitePreload(async () => {
|
|
558
|
+
const { createJavaScriptRegexEngine } = await import("./engine-javascript-DUvVq6Hk.js");
|
|
559
|
+
return { createJavaScriptRegexEngine };
|
|
560
|
+
}, true ? [] : void 0, import.meta.url)).createJavaScriptRegexEngine();
|
|
561
|
+
const raw = await createHighlighterCore({
|
|
562
|
+
themes: [],
|
|
563
|
+
langs: [],
|
|
564
|
+
engine
|
|
565
|
+
});
|
|
566
|
+
return new ShikiHighlighter2(name, raw);
|
|
567
|
+
}
|
|
568
|
+
constructor(name, raw) {
|
|
569
|
+
super(name, createDiffsThemeResolver(name));
|
|
570
|
+
this.raw = raw;
|
|
571
|
+
}
|
|
572
|
+
getTheme(themeName) {
|
|
573
|
+
this.assertNotDisposed();
|
|
574
|
+
const loaded = this.loadedThemes.get(themeName);
|
|
575
|
+
const theme = this.themeResolver.getResolvedTheme(themeName) ?? loaded;
|
|
576
|
+
if (theme == null) throw new Error(`Theme "${themeName}" has not been resolved`);
|
|
577
|
+
if (loaded !== theme) {
|
|
578
|
+
const textmate = theme.textmate ?? (theme.cssVariables != null ? createCssVariablesTheme(theme.cssVariables) : void 0);
|
|
579
|
+
if (textmate == null) throw new Error(`Theme "${themeName}" does not support Shiki`);
|
|
580
|
+
this.raw.setTheme({
|
|
581
|
+
...textmate,
|
|
582
|
+
name: themeName
|
|
583
|
+
});
|
|
584
|
+
this.loadedThemes.set(themeName, theme);
|
|
585
|
+
}
|
|
586
|
+
return theme;
|
|
587
|
+
}
|
|
588
|
+
codeToTokens(code, options) {
|
|
589
|
+
return this.raw.codeToTokens(code, this.resolveOptions(options));
|
|
590
|
+
}
|
|
591
|
+
createEditorTokenizer(options) {
|
|
592
|
+
return new ShikiEditorTokenizer(this.raw, options, this);
|
|
593
|
+
}
|
|
594
|
+
createStreamTokenizer(options) {
|
|
595
|
+
return new ShikiStreamTokenizer(this.raw, this.resolveOptions(options));
|
|
596
|
+
}
|
|
597
|
+
async loadLanguages(languages) {
|
|
598
|
+
this.assertNotDisposed();
|
|
599
|
+
const missing = languages.filter((language) => !this.attachedLanguages.has(language));
|
|
600
|
+
attachResolvedLanguages(await resolveLanguages(missing), this);
|
|
601
|
+
}
|
|
602
|
+
hasLoadedLanguages(languages) {
|
|
603
|
+
if (this.disposed) return false;
|
|
604
|
+
let loaded;
|
|
605
|
+
return languages.every((lang) => {
|
|
606
|
+
if (this.attachedLanguages.has(lang)) return true;
|
|
607
|
+
if (RegisteredCustomLanguages.has(lang)) return false;
|
|
608
|
+
loaded ??= this.raw.getLoadedLanguages();
|
|
609
|
+
return loaded.includes(lang);
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
attachLanguages(languages) {
|
|
613
|
+
this.assertNotDisposed();
|
|
614
|
+
for (const lang of languages) {
|
|
615
|
+
if (this.attachedLanguages.has(lang.name)) continue;
|
|
616
|
+
const grammar = lang.data.find((grammar2) => grammar2.name === lang.name || grammar2.aliases?.includes(lang.name) === true);
|
|
617
|
+
if (grammar == null) throw new Error(`attachResolvedLanguages: No returned grammar declares "${lang.name}" as its name or an alias.`);
|
|
618
|
+
this.raw.loadLanguageSync(lang.data);
|
|
619
|
+
try {
|
|
620
|
+
this.raw.getLanguage(lang.name);
|
|
621
|
+
} catch {
|
|
622
|
+
throw new Error(`attachResolvedLanguages: "${grammar.name}" is already loaded without alias "${lang.name}". Load the alias first or give the grammar a unique name.`);
|
|
623
|
+
}
|
|
624
|
+
this.attachedLanguages.add(lang.name);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
releaseResources() {
|
|
628
|
+
this.loadedThemes.clear();
|
|
629
|
+
this.attachedLanguages.clear();
|
|
630
|
+
this.raw.dispose();
|
|
631
|
+
}
|
|
632
|
+
resolveOptions({ theme, themes, ...options }) {
|
|
633
|
+
this.assertNotDisposed();
|
|
634
|
+
if (theme != null) {
|
|
635
|
+
this.getTheme(theme);
|
|
636
|
+
return {
|
|
637
|
+
...options,
|
|
638
|
+
theme
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
if (themes == null) throw new Error("A theme or themes option is required");
|
|
642
|
+
for (const name of Object.values(themes)) this.getTheme(name);
|
|
643
|
+
return {
|
|
644
|
+
...options,
|
|
645
|
+
themes
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
};
|
|
649
|
+
export {
|
|
650
|
+
ShikiHighlighter
|
|
651
|
+
};
|