@moonshot-ai/kimi-code 0.29.2 → 0.31.0
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/main.mjs +99855 -86513
- package/dist-web/assets/CodeBlockNode-Doj0S5Qm.js +28 -0
- package/dist-web/assets/{DesignSystemView-BnyYC1m0.js → DesignSystemView-vhCcqafK.js} +1 -1
- package/dist-web/assets/{Tooltip-CsrTX-eT.js → Tooltip-BoDrXlWQ.js} +1 -1
- package/dist-web/assets/arc-HbtY4z3B.js +1 -0
- package/dist-web/assets/{architectureDiagram-3BPJPVTR-bSps5znF.js → architectureDiagram-3BPJPVTR-BAmuBHqF.js} +1 -1
- package/dist-web/assets/{blockDiagram-GPEHLZMM-CilEmNW0.js → blockDiagram-GPEHLZMM-DB3vN4xE.js} +1 -1
- package/dist-web/assets/{c4Diagram-AAUBKEIU-DjQbQYqy.js → c4Diagram-AAUBKEIU-CZbqDAkl.js} +1 -1
- package/dist-web/assets/channel-CU58lQ_S.js +1 -0
- package/dist-web/assets/{chunk-2J33WTMH-BlbqWzB_.js → chunk-2J33WTMH-BscD-1Bg.js} +1 -1
- package/dist-web/assets/{chunk-4BX2VUAB-Bjjry6OZ.js → chunk-4BX2VUAB-CFKKaSjy.js} +1 -1
- package/dist-web/assets/{chunk-55IACEB6-mUr9lxTD.js → chunk-55IACEB6-DbBsFQ-y.js} +1 -1
- package/dist-web/assets/{chunk-727SXJPM-hp-BfASB.js → chunk-727SXJPM-DYO-4Meq.js} +1 -1
- package/dist-web/assets/{chunk-AQP2D5EJ-DbRpkGly.js → chunk-AQP2D5EJ-D6jF8sjg.js} +1 -1
- package/dist-web/assets/{chunk-FMBD7UC4-_3v8zWlF.js → chunk-FMBD7UC4-DsHK87xk.js} +1 -1
- package/dist-web/assets/{chunk-ND2GUHAM-D-Pih1kA.js → chunk-ND2GUHAM-DIwTtEns.js} +1 -1
- package/dist-web/assets/{chunk-QZHKN3VN-Dyzf1Pwd.js → chunk-QZHKN3VN-CuLzG4Y7.js} +1 -1
- package/dist-web/assets/classDiagram-4FO5ZUOK-CGUxw8pC.js +1 -0
- package/dist-web/assets/classDiagram-v2-Q7XG4LA2-CGUxw8pC.js +1 -0
- package/dist-web/assets/{cose-bilkent-S5V4N54A-FADnp6Lk.js → cose-bilkent-S5V4N54A-Bp0vQcJ1.js} +1 -1
- package/dist-web/assets/{dagre-BM42HDAG-D1rsVyHJ.js → dagre-BM42HDAG-bItLk1GT.js} +1 -1
- package/dist-web/assets/{diagram-2AECGRRQ-BSy9xCZO.js → diagram-2AECGRRQ-BHyt2Sg_.js} +1 -1
- package/dist-web/assets/{diagram-5GNKFQAL-BsckzYNE.js → diagram-5GNKFQAL-BBCo61BE.js} +1 -1
- package/dist-web/assets/{diagram-KO2AKTUF-C4GWXOE2.js → diagram-KO2AKTUF-DoHEBKBQ.js} +1 -1
- package/dist-web/assets/{diagram-LMA3HP47-WWKSVuAU.js → diagram-LMA3HP47-DBz0dyT9.js} +1 -1
- package/dist-web/assets/{diagram-OG6HWLK6-B6TtcB01.js → diagram-OG6HWLK6-DFrLnVp0.js} +1 -1
- package/dist-web/assets/{erDiagram-TEJ5UH35-BiQkmfSz.js → erDiagram-TEJ5UH35-BBSZg_IG.js} +1 -1
- package/dist-web/assets/floating-ui.dom-xGUaHE3m.js +1 -0
- package/dist-web/assets/{flowDiagram-I6XJVG4X-ChzNYmSi.js → flowDiagram-I6XJVG4X-BtzrctJW.js} +1 -1
- package/dist-web/assets/{ganttDiagram-6RSMTGT7-DQcybq4U.js → ganttDiagram-6RSMTGT7-Rct-HdJu.js} +1 -1
- package/dist-web/assets/{gitGraphDiagram-PVQCEYII-XdaI0ZOj.js → gitGraphDiagram-PVQCEYII-CIcCOtkG.js} +1 -1
- package/dist-web/assets/index-LE6Cy54W.css +1 -0
- package/dist-web/assets/index-Nwori_8N.js +337 -0
- package/dist-web/assets/index10-DPW9hHwA.js +2 -0
- package/dist-web/assets/index11-BLlVIBCh.js +8 -0
- package/dist-web/assets/index5-DKcWNKrg.js +1 -0
- package/dist-web/assets/index6-p0NcquyY.js +1 -0
- package/dist-web/assets/index7-BSYWAfC9.js +1 -0
- package/dist-web/assets/index8-rpBPk4Do.js +1 -0
- package/dist-web/assets/{infoDiagram-5YYISTIA-B1S64SqR.js → infoDiagram-5YYISTIA-Bhpn0mW8.js} +1 -1
- package/dist-web/assets/{ishikawaDiagram-YF4QCWOH-O5IEMrWO.js → ishikawaDiagram-YF4QCWOH-DAOuLEX-.js} +1 -1
- package/dist-web/assets/{journeyDiagram-JHISSGLW-BhwFOFOc.js → journeyDiagram-JHISSGLW-yHUiaaDQ.js} +1 -1
- package/dist-web/assets/{kanban-definition-UN3LZRKU-Dh0udSeO.js → kanban-definition-UN3LZRKU-B3kDKb1C.js} +1 -1
- package/dist-web/assets/{linear-JZGc9yht.js → linear--OXOnpnD.js} +1 -1
- package/dist-web/assets/{mermaid.core-zKrc8Ye9.js → mermaid.core-DAOd3KoM.js} +5 -5
- package/dist-web/assets/{mindmap-definition-RKZ34NQL-B2x0JCB3.js → mindmap-definition-RKZ34NQL-ChCxAI9W.js} +1 -1
- package/dist-web/assets/{pieDiagram-4H26LBE5-DA34Bt67.js → pieDiagram-4H26LBE5-CrPFtitk.js} +2 -2
- package/dist-web/assets/{quadrantDiagram-W4KKPZXB-DToe-wqP.js → quadrantDiagram-W4KKPZXB-C_gARk7v.js} +1 -1
- package/dist-web/assets/{requirementDiagram-4Y6WPE33-CgOSnyR8.js → requirementDiagram-4Y6WPE33-D_o55gu8.js} +1 -1
- package/dist-web/assets/{sankeyDiagram-5OEKKPKP-DBhf2qeh.js → sankeyDiagram-5OEKKPKP-wKm43hSH.js} +1 -1
- package/dist-web/assets/{sequenceDiagram-3UESZ5HK-BwZabocW.js → sequenceDiagram-3UESZ5HK-2RzKgEZf.js} +1 -1
- package/dist-web/assets/stateDiagram-AJRCARHV-Hw8hv14l.js +1 -0
- package/dist-web/assets/stateDiagram-v2-BHNVJYJU-Dw1h0bx6.js +1 -0
- package/dist-web/assets/{timeline-definition-PNZ67QCA-DRsCTcc3.js → timeline-definition-PNZ67QCA-Dg7etDfW.js} +1 -1
- package/dist-web/assets/{vennDiagram-CIIHVFJN-B95s0NJK.js → vennDiagram-CIIHVFJN-Cb4wNSt1.js} +1 -1
- package/dist-web/assets/{vue.runtime.esm-bundler-DNukiHq4.js → vue.runtime.esm-bundler-DivoU6l0.js} +1 -1
- package/dist-web/assets/{wardley-L42UT6IY-gSV1j6uw.js → wardley-L42UT6IY-DUKkueSc.js} +1 -1
- package/dist-web/assets/{wardleyDiagram-YWT4CUSO-CnvLrs5Q.js → wardleyDiagram-YWT4CUSO-CxO_ve6G.js} +1 -1
- package/dist-web/assets/{xychartDiagram-2RQKCTM6-zsCch4aR.js → xychartDiagram-2RQKCTM6-Da49nivv.js} +1 -1
- package/dist-web/index.html +2 -2
- package/package.json +11 -11
- package/dist-web/assets/CodeBlockNode-BZ3nIcUJ.js +0 -22
- package/dist-web/assets/CodeBlockShell.vue_vue_type_style_index_0_lang-CdMaGbWN.js +0 -1
- package/dist-web/assets/abap-BdImnpbu.js +0 -1
- package/dist-web/assets/actionscript-3-CoDkCxhg.js +0 -1
- package/dist-web/assets/ada-bCR0ucgS.js +0 -1
- package/dist-web/assets/andromeeda-C4gqWexZ.js +0 -1
- package/dist-web/assets/angular-html-DA-rfuFy.js +0 -1
- package/dist-web/assets/angular-ts-BrjP3tb8.js +0 -1
- package/dist-web/assets/apache-Pmp26Uib.js +0 -1
- package/dist-web/assets/apex-Dqspr-GT.js +0 -1
- package/dist-web/assets/apl-CORt7UWP.js +0 -1
- package/dist-web/assets/applescript-Co6uUVPk.js +0 -1
- package/dist-web/assets/ara-BRHolxvo.js +0 -1
- package/dist-web/assets/arc-DtCnpCZe.js +0 -1
- package/dist-web/assets/asciidoc-Ve4PFQV2.js +0 -1
- package/dist-web/assets/asm-D_Q5rh1f.js +0 -1
- package/dist-web/assets/astro-HNnZUWAn.js +0 -1
- package/dist-web/assets/aurora-x-D-2ljcwZ.js +0 -1
- package/dist-web/assets/awk-DMzUqQB5.js +0 -1
- package/dist-web/assets/ayu-dark-DYE7WIF3.js +0 -1
- package/dist-web/assets/ayu-light-BA47KaF1.js +0 -1
- package/dist-web/assets/ayu-mirage-32ctXXKs.js +0 -1
- package/dist-web/assets/ballerina-BFfxhgS-.js +0 -1
- package/dist-web/assets/bat-BkioyH1T.js +0 -1
- package/dist-web/assets/beancount-k_qm7-4y.js +0 -1
- package/dist-web/assets/berry-uYugtg8r.js +0 -1
- package/dist-web/assets/bibtex-CHM0blh-.js +0 -1
- package/dist-web/assets/bicep-Bmn6On1c.js +0 -1
- package/dist-web/assets/bird2-BIv1doCn.js +0 -1
- package/dist-web/assets/blade-2xfisSek.js +0 -1
- package/dist-web/assets/bsl-BO_Y6i37.js +0 -1
- package/dist-web/assets/c-BIGW1oBm.js +0 -1
- package/dist-web/assets/c3-MRO5bC_T.js +0 -1
- package/dist-web/assets/cadence-Bv_4Rxtq.js +0 -1
- package/dist-web/assets/cairo-KRGpt6FW.js +0 -1
- package/dist-web/assets/catppuccin-frappe-DFWUc33u.js +0 -1
- package/dist-web/assets/catppuccin-latte-C9dUb6Cb.js +0 -1
- package/dist-web/assets/catppuccin-macchiato-DQyhUUbL.js +0 -1
- package/dist-web/assets/catppuccin-mocha-D87Tk5Gz.js +0 -1
- package/dist-web/assets/channel-Bt325_7a.js +0 -1
- package/dist-web/assets/clarity-D53aC0YG.js +0 -1
- package/dist-web/assets/classDiagram-4FO5ZUOK-DpkPh8gn.js +0 -1
- package/dist-web/assets/classDiagram-v2-Q7XG4LA2-DpkPh8gn.js +0 -1
- package/dist-web/assets/clojure-P80f7IUj.js +0 -1
- package/dist-web/assets/cmake-D1j8_8rp.js +0 -1
- package/dist-web/assets/cobol-nBiQ_Alo.js +0 -1
- package/dist-web/assets/codeowners-Bp6g37R7.js +0 -1
- package/dist-web/assets/codeql-DsOJ9woJ.js +0 -1
- package/dist-web/assets/coffee-Ch7k5sss.js +0 -1
- package/dist-web/assets/common-lisp-Cg-RD9OK.js +0 -1
- package/dist-web/assets/coq-DkFqJrB1.js +0 -1
- package/dist-web/assets/cpp-UfJy6YNI.js +0 -1
- package/dist-web/assets/crystal-DGywbUpC.js +0 -1
- package/dist-web/assets/csharp-DSvCPggb.js +0 -1
- package/dist-web/assets/css-CLj8gQPS.js +0 -1
- package/dist-web/assets/csv-fuZLfV_i.js +0 -1
- package/dist-web/assets/cue-D82EKSYY.js +0 -1
- package/dist-web/assets/cypher-COkxafJQ.js +0 -1
- package/dist-web/assets/d-85-TOEBH.js +0 -1
- package/dist-web/assets/dark-plus-C3mMm8J8.js +0 -1
- package/dist-web/assets/dart-bE4Kk8sk.js +0 -1
- package/dist-web/assets/dax-CEL-wOlO.js +0 -1
- package/dist-web/assets/desktop-BmXAJ9_W.js +0 -1
- package/dist-web/assets/diff-D97Zzqfu.js +0 -1
- package/dist-web/assets/docker-BcOcwvcX.js +0 -1
- package/dist-web/assets/dotenv-Da5cRb03.js +0 -1
- package/dist-web/assets/dracula-BzJJZx-M.js +0 -1
- package/dist-web/assets/dracula-soft-BXkSAIEj.js +0 -1
- package/dist-web/assets/dream-maker-BtqSS_iP.js +0 -1
- package/dist-web/assets/edge-FbVlp4U3.js +0 -1
- package/dist-web/assets/elixir-CkH2-t6x.js +0 -1
- package/dist-web/assets/elm-DbKCFpqz.js +0 -1
- package/dist-web/assets/emacs-lisp-CXvaQtF9.js +0 -1
- package/dist-web/assets/erb-Dm6A9KJ5.js +0 -1
- package/dist-web/assets/erlang-DsQrWhSR.js +0 -1
- package/dist-web/assets/everforest-dark-BgDCqdQA.js +0 -1
- package/dist-web/assets/everforest-light-C8M2exoo.js +0 -1
- package/dist-web/assets/fennel-BYunw83y.js +0 -1
- package/dist-web/assets/fish-BvzEVeQv.js +0 -1
- package/dist-web/assets/floating-ui.dom-CDU05fwN.js +0 -1
- package/dist-web/assets/fluent-C4IJs8-o.js +0 -1
- package/dist-web/assets/fortran-fixed-form-CkoXwp7k.js +0 -1
- package/dist-web/assets/fortran-free-form-BxgE0vQu.js +0 -1
- package/dist-web/assets/fsharp-CXgrBDvD.js +0 -1
- package/dist-web/assets/gdresource-BOOCDP_w.js +0 -1
- package/dist-web/assets/gdscript-C5YyOfLZ.js +0 -1
- package/dist-web/assets/gdshader-DkwncUOv.js +0 -1
- package/dist-web/assets/genie-D0YGMca9.js +0 -1
- package/dist-web/assets/gherkin-DyxjwDmM.js +0 -1
- package/dist-web/assets/git-commit-F4YmCXRG.js +0 -1
- package/dist-web/assets/git-rebase-r7XF79zn.js +0 -1
- package/dist-web/assets/github-dark-DHJKELXO.js +0 -1
- package/dist-web/assets/github-dark-default-Cuk6v7N8.js +0 -1
- package/dist-web/assets/github-dark-dimmed-DH5Ifo-i.js +0 -1
- package/dist-web/assets/github-dark-high-contrast-E3gJ1_iC.js +0 -1
- package/dist-web/assets/github-light-DAi9KRSo.js +0 -1
- package/dist-web/assets/github-light-default-D7oLnXFd.js +0 -1
- package/dist-web/assets/github-light-high-contrast-BfjtVDDH.js +0 -1
- package/dist-web/assets/gleam-BspZqrRM.js +0 -1
- package/dist-web/assets/glimmer-js-ByusRIyA.js +0 -1
- package/dist-web/assets/glimmer-ts-BfAWNZQY.js +0 -1
- package/dist-web/assets/glsl-DplSGwfg.js +0 -1
- package/dist-web/assets/gn-n2N0HUVH.js +0 -1
- package/dist-web/assets/gnuplot-DdkO51Og.js +0 -1
- package/dist-web/assets/go-C27-OAKa.js +0 -1
- package/dist-web/assets/graphql-ChdNCCLP.js +0 -1
- package/dist-web/assets/groovy-gcz8RCvz.js +0 -1
- package/dist-web/assets/gruvbox-dark-hard-CFHQjOhq.js +0 -1
- package/dist-web/assets/gruvbox-dark-medium-GsRaNv29.js +0 -1
- package/dist-web/assets/gruvbox-dark-soft-CVdnzihN.js +0 -1
- package/dist-web/assets/gruvbox-light-hard-CH1njM8p.js +0 -1
- package/dist-web/assets/gruvbox-light-medium-DRw_LuNl.js +0 -1
- package/dist-web/assets/gruvbox-light-soft-hJgmCMqR.js +0 -1
- package/dist-web/assets/hack-DbPARsA_.js +0 -1
- package/dist-web/assets/haml-D5jkg6IW.js +0 -1
- package/dist-web/assets/handlebars-BpdQsYii.js +0 -1
- package/dist-web/assets/haskell-Df6bDoY_.js +0 -1
- package/dist-web/assets/haxe-CzTSHFRz.js +0 -1
- package/dist-web/assets/hcl-BWvSN4gD.js +0 -1
- package/dist-web/assets/hjson-D5-asLiD.js +0 -1
- package/dist-web/assets/hlsl-D3lLCCz7.js +0 -1
- package/dist-web/assets/horizon-BUw7H-hv.js +0 -1
- package/dist-web/assets/horizon-bright-CUuTKBJd.js +0 -1
- package/dist-web/assets/houston-DnULxvSX.js +0 -1
- package/dist-web/assets/html-derivative-DlHx6ybY.js +0 -1
- package/dist-web/assets/html-pp8916En.js +0 -1
- package/dist-web/assets/http-jrhK8wxY.js +0 -1
- package/dist-web/assets/hurl-irOxFIW8.js +0 -1
- package/dist-web/assets/hxml-Bvhsp5Yf.js +0 -1
- package/dist-web/assets/hy-DFXneXwc.js +0 -1
- package/dist-web/assets/imba-DGztddWO.js +0 -1
- package/dist-web/assets/index-BsKKzRv6.js +0 -9
- package/dist-web/assets/index-ByWw02oy.css +0 -1
- package/dist-web/assets/index-COMYI0Oj.js +0 -153
- package/dist-web/assets/index-Cm9Q4xVi.js +0 -3
- package/dist-web/assets/index-DtRfJ0vw.js +0 -325
- package/dist-web/assets/index10-DTJJNuIm.js +0 -2
- package/dist-web/assets/index11-CwW_hjK7.js +0 -8
- package/dist-web/assets/index5-D6hAiKdZ.js +0 -1
- package/dist-web/assets/index6-BXVNgB_e.js +0 -1
- package/dist-web/assets/index7-XmRlMUpI.js +0 -1
- package/dist-web/assets/index8-BSZNwbg_.js +0 -2
- package/dist-web/assets/ini-BEwlwnbL.js +0 -1
- package/dist-web/assets/java-CylS5w8V.js +0 -1
- package/dist-web/assets/javascript-wDzz0qaB.js +0 -1
- package/dist-web/assets/jinja-f2NsQr07.js +0 -1
- package/dist-web/assets/jison-wvAkD_A8.js +0 -1
- package/dist-web/assets/json-Cp-IABpG.js +0 -1
- package/dist-web/assets/json5-C9tS-k6U.js +0 -1
- package/dist-web/assets/jsonc-Des-eS-w.js +0 -1
- package/dist-web/assets/jsonl-DcaNXYhu.js +0 -1
- package/dist-web/assets/jsonnet-DFQXde-d.js +0 -1
- package/dist-web/assets/jssm-C2t-YnRu.js +0 -1
- package/dist-web/assets/jsx-g9-lgVsj.js +0 -1
- package/dist-web/assets/julia-D7OTSIA_.js +0 -1
- package/dist-web/assets/just-CUsbIsdP.js +0 -1
- package/dist-web/assets/kanagawa-dragon-CkXjmgJE.js +0 -1
- package/dist-web/assets/kanagawa-lotus-CfQXZHmo.js +0 -1
- package/dist-web/assets/kanagawa-wave-DWedfzmr.js +0 -1
- package/dist-web/assets/kdl-DV7GczEv.js +0 -1
- package/dist-web/assets/kotlin-BdnUsdx6.js +0 -1
- package/dist-web/assets/kusto-wEQ09or8.js +0 -1
- package/dist-web/assets/laserwave-DUszq2jm.js +0 -1
- package/dist-web/assets/latex-CaSxy8MP.js +0 -1
- package/dist-web/assets/lean-BZvkOJ9d.js +0 -1
- package/dist-web/assets/less-B1dDrJ26.js +0 -1
- package/dist-web/assets/light-plus-B7mTdjB0.js +0 -1
- package/dist-web/assets/liquid-C0sCDyMI.js +0 -1
- package/dist-web/assets/llvm-DjAJT7YJ.js +0 -1
- package/dist-web/assets/log-2UxHyX5q.js +0 -1
- package/dist-web/assets/logo-BtOb2qkB.js +0 -1
- package/dist-web/assets/lua-BaeVxFsk.js +0 -1
- package/dist-web/assets/luau-KW6xsasC.js +0 -1
- package/dist-web/assets/make-CHLpvVh8.js +0 -1
- package/dist-web/assets/markdown-Cvjx9yec.js +0 -1
- package/dist-web/assets/marko-DjSrsDqO.js +0 -1
- package/dist-web/assets/material-theme-D5KoaKCx.js +0 -1
- package/dist-web/assets/material-theme-darker-BfHTSMKl.js +0 -1
- package/dist-web/assets/material-theme-lighter-B0m2ddpp.js +0 -1
- package/dist-web/assets/material-theme-ocean-CyktbL80.js +0 -1
- package/dist-web/assets/material-theme-palenight-Csfq5Kiy.js +0 -1
- package/dist-web/assets/matlab-D7o27uSR.js +0 -1
- package/dist-web/assets/mdc-DTYItulj.js +0 -1
- package/dist-web/assets/mdx-Cmh6b_Ma.js +0 -1
- package/dist-web/assets/mermaid-mWjccvbQ.js +0 -1
- package/dist-web/assets/min-dark-CafNBF8u.js +0 -1
- package/dist-web/assets/min-light-CTRr51gU.js +0 -1
- package/dist-web/assets/mipsasm-CKIfxQSi.js +0 -1
- package/dist-web/assets/mojo-rZm6bMo-.js +0 -1
- package/dist-web/assets/monokai-D4h5O-jR.js +0 -1
- package/dist-web/assets/moonbit-_H4v1dQx.js +0 -1
- package/dist-web/assets/move-IF9eRakj.js +0 -1
- package/dist-web/assets/narrat-DRg8JJMk.js +0 -1
- package/dist-web/assets/nextflow-C-mBbutL.js +0 -1
- package/dist-web/assets/nextflow-groovy-vE_lwT2v.js +0 -1
- package/dist-web/assets/nginx-BpAMiNFr.js +0 -1
- package/dist-web/assets/night-owl-C39BiMTA.js +0 -1
- package/dist-web/assets/night-owl-light-CMTm3GFP.js +0 -1
- package/dist-web/assets/nim-BIad80T-.js +0 -1
- package/dist-web/assets/nix-CwoSXNpI.js +0 -1
- package/dist-web/assets/nord-Ddv68eIx.js +0 -1
- package/dist-web/assets/nushell-Cz2AlsmD.js +0 -1
- package/dist-web/assets/objective-c-DXmwc3jG.js +0 -1
- package/dist-web/assets/objective-cpp-CLxacb5B.js +0 -1
- package/dist-web/assets/ocaml-C0hk2d4L.js +0 -1
- package/dist-web/assets/odin-BBf5iR-q.js +0 -1
- package/dist-web/assets/one-dark-pro-DVMEJ2y_.js +0 -1
- package/dist-web/assets/one-light-C3Wv6jpd.js +0 -1
- package/dist-web/assets/openscad-C4EeE6gA.js +0 -1
- package/dist-web/assets/pascal-D93ZcfNL.js +0 -1
- package/dist-web/assets/perl-B9cMNwum.js +0 -1
- package/dist-web/assets/php-Csjmro_R.js +0 -1
- package/dist-web/assets/pkl-u5AG7uiY.js +0 -1
- package/dist-web/assets/plastic-3e1v2bzS.js +0 -1
- package/dist-web/assets/plsql-ChMvpjG-.js +0 -1
- package/dist-web/assets/po-BTJTHyun.js +0 -1
- package/dist-web/assets/poimandres-CS3Unz2-.js +0 -1
- package/dist-web/assets/polar-C0HS_06l.js +0 -1
- package/dist-web/assets/postcss-CXtECtnM.js +0 -1
- package/dist-web/assets/powerquery-CEu0bR-o.js +0 -1
- package/dist-web/assets/powershell-Dpen1YoG.js +0 -1
- package/dist-web/assets/prisma-Dd19v3D-.js +0 -1
- package/dist-web/assets/prolog-CbFg5uaA.js +0 -1
- package/dist-web/assets/proto-C7zT0LnQ.js +0 -1
- package/dist-web/assets/pug-DKIMFp6K.js +0 -1
- package/dist-web/assets/puppet-BMWR74SV.js +0 -1
- package/dist-web/assets/purescript-CklMAg4u.js +0 -1
- package/dist-web/assets/python-B6aJPvgy.js +0 -1
- package/dist-web/assets/qml-3beO22l8.js +0 -1
- package/dist-web/assets/qmldir-C8lEn-DE.js +0 -1
- package/dist-web/assets/qss-IeuSbFQv.js +0 -1
- package/dist-web/assets/r-Dspwwk_N.js +0 -1
- package/dist-web/assets/racket-BqYA7rlc.js +0 -1
- package/dist-web/assets/raku-DXvB9xmW.js +0 -1
- package/dist-web/assets/razor-BjBPvh-w.js +0 -1
- package/dist-web/assets/red-bN70gL4F.js +0 -1
- package/dist-web/assets/reg-C-SQnVFl.js +0 -1
- package/dist-web/assets/regexp-CDVJQ6XC.js +0 -1
- package/dist-web/assets/rel-C3B-1QV4.js +0 -1
- package/dist-web/assets/riscv-BM1_JUlF.js +0 -1
- package/dist-web/assets/ron-D8l8udqQ.js +0 -1
- package/dist-web/assets/rose-pine-dawn-DHQR4-dF.js +0 -1
- package/dist-web/assets/rose-pine-moon-D4_iv3hh.js +0 -1
- package/dist-web/assets/rose-pine-qdsjHGoJ.js +0 -1
- package/dist-web/assets/rosmsg-BJDFO7_C.js +0 -1
- package/dist-web/assets/rst-CpCqk9r5.js +0 -1
- package/dist-web/assets/ruby-DyJCeAvU.js +0 -1
- package/dist-web/assets/rust-B1yitclQ.js +0 -1
- package/dist-web/assets/sas-DEy46yEz.js +0 -1
- package/dist-web/assets/sass-Cj5Yp3dK.js +0 -1
- package/dist-web/assets/scala-C151Ov-r.js +0 -1
- package/dist-web/assets/scheme-C98Dy4si.js +0 -1
- package/dist-web/assets/scss-D5BDwBP9.js +0 -1
- package/dist-web/assets/sdbl-DVxCFoDh.js +0 -1
- package/dist-web/assets/shaderlab-Dg9Lc6iA.js +0 -1
- package/dist-web/assets/shellscript-Yzrsuije.js +0 -1
- package/dist-web/assets/shellsession-BADoaaVG.js +0 -1
- package/dist-web/assets/slack-dark-BthQWCQV.js +0 -1
- package/dist-web/assets/slack-ochin-DqwNpetd.js +0 -1
- package/dist-web/assets/smalltalk-BERRCDM3.js +0 -1
- package/dist-web/assets/snazzy-light-Bw305WKR.js +0 -1
- package/dist-web/assets/solarized-dark-DXbdFlpD.js +0 -1
- package/dist-web/assets/solarized-light-L9t79GZl.js +0 -1
- package/dist-web/assets/solidity-rGO070M0.js +0 -1
- package/dist-web/assets/soy-8wufbnw4.js +0 -1
- package/dist-web/assets/sparql-rVzFXLq3.js +0 -1
- package/dist-web/assets/splunk-BtCnVYZw.js +0 -1
- package/dist-web/assets/sql-CRqJ_cUM.js +0 -1
- package/dist-web/assets/ssh-config-_ykCGR6B.js +0 -1
- package/dist-web/assets/stata-DI20mbqo.js +0 -1
- package/dist-web/assets/stateDiagram-AJRCARHV-BJcdTFrX.js +0 -1
- package/dist-web/assets/stateDiagram-v2-BHNVJYJU-DpW8Zeth.js +0 -1
- package/dist-web/assets/stylus-BEDo0Tqx.js +0 -1
- package/dist-web/assets/surrealql-Bq5Q-fJD.js +0 -1
- package/dist-web/assets/svelte-Cy7k_4gC.js +0 -1
- package/dist-web/assets/swift-D82vCrfD.js +0 -1
- package/dist-web/assets/synthwave-84-CbfX1IO0.js +0 -1
- package/dist-web/assets/system-verilog-CnnmHF94.js +0 -1
- package/dist-web/assets/systemd-4A_iFExJ.js +0 -1
- package/dist-web/assets/talonscript-CkByrt1z.js +0 -1
- package/dist-web/assets/tasl-QIJgUcNo.js +0 -1
- package/dist-web/assets/tcl-dwOrl1Do.js +0 -1
- package/dist-web/assets/templ-DhtptRzy.js +0 -1
- package/dist-web/assets/terraform-BETggiCN.js +0 -1
- package/dist-web/assets/tex-idrVyKtj.js +0 -1
- package/dist-web/assets/tokyo-night-hegEt444.js +0 -1
- package/dist-web/assets/toml-vGWfd6FD.js +0 -1
- package/dist-web/assets/ts-tags-D351s5mN.js +0 -1
- package/dist-web/assets/tsv-B_m7g4N7.js +0 -1
- package/dist-web/assets/tsx-COt5Ahok.js +0 -1
- package/dist-web/assets/turtle-BsS91CYL.js +0 -1
- package/dist-web/assets/twig-CW1WmMYd.js +0 -1
- package/dist-web/assets/typescript-BPQ3VLAy.js +0 -1
- package/dist-web/assets/typespec-CAFt9gP4.js +0 -1
- package/dist-web/assets/typst-DHCkPAjA.js +0 -1
- package/dist-web/assets/v-BcVCzyr7.js +0 -1
- package/dist-web/assets/vala-CsfeWuGM.js +0 -1
- package/dist-web/assets/vb-D17OF-Vu.js +0 -1
- package/dist-web/assets/verilog-BQ8w6xss.js +0 -1
- package/dist-web/assets/vesper-DRje8inN.js +0 -1
- package/dist-web/assets/vhdl-CeAyd5Ju.js +0 -1
- package/dist-web/assets/viml-CJc9bBzg.js +0 -1
- package/dist-web/assets/vitesse-black-Bkuqu6BP.js +0 -1
- package/dist-web/assets/vitesse-dark-D0r3Knsf.js +0 -1
- package/dist-web/assets/vitesse-light-CVO1_9PV.js +0 -1
- package/dist-web/assets/vue-D2xRrEX4.js +0 -1
- package/dist-web/assets/vue-html-AaS7Mt5G.js +0 -1
- package/dist-web/assets/vue-vine-BoDAl6tE.js +0 -1
- package/dist-web/assets/vyper-CDx5xZoG.js +0 -1
- package/dist-web/assets/wasm-CG6Dc4jp.js +0 -1
- package/dist-web/assets/wasm-MzD3tlZU.js +0 -1
- package/dist-web/assets/wenyan-BV7otONQ.js +0 -1
- package/dist-web/assets/wgsl-Dx-B1_4e.js +0 -1
- package/dist-web/assets/wikitext-BhOHFoWU.js +0 -1
- package/dist-web/assets/wit-5i3qLPDT.js +0 -1
- package/dist-web/assets/wolfram-lXgVvXCa.js +0 -1
- package/dist-web/assets/xml-sdJ4AIDG.js +0 -1
- package/dist-web/assets/xsl-CtQFsRM5.js +0 -1
- package/dist-web/assets/yaml-Buea-lGh.js +0 -1
- package/dist-web/assets/zenscript-DVFEvuxE.js +0 -1
- package/dist-web/assets/zig-VOosw3JB.js +0 -1
- /package/dist-web/assets/{__vite-optional-peer-dep_stream-monaco_markstream-vue-BIHI7g3E.js → __vite-optional-peer-dep_stream-diffs_markstream-vue-BIHI7g3E.js} +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{bR as wi,cb as bi,bQ as Lo,M as cl,bl as ki,af as ul,bY as xi,cc as Si,b$ as fl,aU as $,c0 as Ci,c1 as Mi,c2 as Bi,a0 as ko,aD as $o,bE as ae,az as Ei,cd as hn,c8 as vt,aI as Oo,aL as G,s as bn,aw as It,au as mt,bk as V,ce as xo,u as oe,I as zo,A as Fi,bJ as Ut,aY as pt,bL as sl,v as b,t as ye,bB as dl,bb as Me,q as k,b7 as Pi,cf as Li,cg as gn,ch as $i,ci as Oi,cj as zi,ck as Hi,as as j,cl as So,cm as Ni,cn as Ti,co as jt,cp as Co,bO as Ho,T as Ri,G as Di,F as Mo,g as Ai,c7 as ji,b_ as qi}from"./index-Nwori_8N.js";import{i as fe,t as yn}from"./safeRaf-DGuzXxDK.js";var wn=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});let Bo=!1,qt=null,Wt=null,_t=null;function Wi(){return wn(this,null,function*(){if(_t)return _t;_t=wn(null,null,function*(){if(!Wt)try{if(Wt=(function(x){const M=x;if(typeof M?.useMonaco=="function")return M;const w=x?.default;return typeof w?.useMonaco=="function"?w:null})(yield wi(()=>import("./__vite-optional-peer-dep_stream-diffs_markstream-vue-BIHI7g3E.js"),[])),!Wt)return null}catch{return null}try{return yield(function(x){return wn(this,null,function*(){return Bo?void 0:qt||(qt=wn(null,null,function*(){const w=globalThis?.MonacoEnvironment;w&&(typeof w.getWorker=="function"||typeof w.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Bo=!0}).finally(()=>{qt=null}),qt)})})(Wt),bi(),Wt}catch{return null}});try{return yield _t}finally{_t=null}})}var _i=Object.defineProperty,Ii=Object.defineProperties,Ui=Object.getOwnPropertyDescriptors,Eo=Object.getOwnPropertySymbols,Vi=Object.prototype.hasOwnProperty,Gi=Object.prototype.propertyIsEnumerable,Fo=(x,M,w)=>M in x?_i(x,M,{enumerable:!0,configurable:!0,writable:!0,value:w}):x[M]=w,I=(x,M)=>{for(var w in M||(M={}))Vi.call(M,w)&&Fo(x,w,M[w]);if(Eo)for(var w of Eo(M))Gi.call(M,w)&&Fo(x,w,M[w]);return x},Ce=(x,M)=>Ii(x,Ui(M)),q=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});const Ji={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Yi={class:"flex items-center gap-0.5"},Qi=["aria-label"],Xi={class:"code-diff-stat removed"},Ki={class:"code-diff-stat added"},Zi=["aria-label"],er={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},tr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},nr=["aria-pressed"],lr={key:3,class:"relative"},or=["aria-expanded"],ir=["disabled"],rr=["disabled"],ar=["disabled"],ur={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},sr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},dr={class:"code-loading-placeholder"},cr={class:"sr-only","aria-live":"polite",role:"status"},fr=cl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(x,{emit:M}){const w=x,te=M,ne=$(!1),we=$(null),be=$(null);function r(){vt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",z,{once:!0,capture:!0})}function E(){vt(!0),ne.value=!1}function z(Y){var f,O;const yt=Y.target;(f=we.value)!=null&&f.contains(yt)||(O=be.value)!=null&&O.contains(yt)?document.addEventListener("click",z,{once:!0,capture:!0}):E()}const ie=k(()=>w.showFontSizeButtons&&w.enableFontSizeControl||w.showExpandButton||w.isPreviewable&&w.showPreviewButton),{t:N}=fl(),ht=k(()=>w.showTooltips!==!1);function Ve(Y,f){ht.value&&ji(Y.currentTarget,f,"top",!1,void 0,w.isDark)}function Be(){ht.value&&vt()}function gt(Y){Ve(Y,w.copyText?N("common.copied")||"Copied":N("common.copy")||"Copy")}const vl=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)<=((f=w.codeFontMin)!=null?f:0)}),Vt=k(()=>!w.fontBaselineReady||w.codeFontSize===w.defaultCodeFontSize),Gt=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)>=((f=w.codeFontMax)!=null?f:100)});return(Y,f)=>(G(),oe(Mo,null,[w.showHeader?(G(),oe("div",Ji,[pt(Y.$slots,"header-left"),pt(Y.$slots,"header-right",{},()=>[b("div",Yi,[x.diffStats?(G(),oe("div",{key:0,class:"code-diff-stats","aria-label":x.diffStatsAriaLabel},[b("span",Xi,"-"+Me(x.diffStats.removed),1),b("span",Ki,"+"+Me(x.diffStats.added),1)],8,Qi)):ye("",!0),w.showCopyButton?(G(),oe("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":x.copyText?V(N)("common.copied")||"Copied":V(N)("common.copy")||"Copy",onClick:f[0]||(f[0]=O=>te("copy")),onMouseenter:f[1]||(f[1]=O=>gt(O)),onFocus:f[2]||(f[2]=O=>gt(O)),onMouseleave:Be,onBlur:Be},[x.copyText?(G(),oe("svg",tr,[...f[14]||(f[14]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(G(),oe("svg",er,[...f[13]||(f[13]=[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),b("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,Zi)):ye("",!0),w.showCollapseButton?(G(),oe("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":x.isCollapsed,onClick:f[3]||(f[3]=O=>te("toggleCollapse")),onMouseenter:f[4]||(f[4]=O=>Ve(O,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onFocus:f[5]||(f[5]=O=>Ve(O,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onMouseleave:Be,onBlur:Be},[(G(),oe("svg",{style:It({rotate:x.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...f[15]||(f[15]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,nr)):ye("",!0),ie.value?(G(),oe("div",lr,[b("button",{ref_key:"moreBtnRef",ref:be,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Ho(r,["stop"]),onMouseenter:f[6]||(f[6]=O=>Ve(O,V(N)("common.more")||"More")),onFocus:f[7]||(f[7]=O=>Ve(O,V(N)("common.more")||"More")),onMouseleave:Be,onBlur:Be},[...f[16]||(f[16]=[Di('<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="1em" height="1em" viewBox="0 0 24 24" class="action-icon"><g fill="currentColor"><circle cx="12" cy="5" r="1.5"></circle><circle cx="12" cy="12" r="1.5"></circle><circle cx="12" cy="19" r="1.5"></circle></g></svg>',1)])],40,or),zo(Ai,{name:"code-menu"},{default:Ut(()=>[ne.value?(G(),oe("div",{key:0,ref_key:"moreMenuRef",ref:we,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[w.showFontSizeButtons&&w.enableFontSizeControl?(G(),oe(Mo,{key:0},[b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:vl.value,onClick:f[8]||(f[8]=O=>{V(vt)(!0),te("decreaseFont")})},[f[17]||(f[17]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),b("span",null,Me(V(N)("common.fontSmaller")||"Font size −"),1)],8,ir),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Vt.value,onClick:f[9]||(f[9]=O=>{V(vt)(!0),te("resetFont")})},[f[18]||(f[18]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),b("path",{d:"M3 3v5h5"})])],-1)),b("span",null,Me(V(N)("common.fontReset")||"Font size reset"),1)],8,rr),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Gt.value,onClick:f[10]||(f[10]=O=>{V(vt)(!0),te("increaseFont")})},[f[19]||(f[19]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),b("span",null,Me(V(N)("common.fontLarger")||"Font size +"),1)],8,ar)],64)):ye("",!0),w.showExpandButton?(G(),oe("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[11]||(f[11]=O=>{E(),te("toggleExpand")})},[x.isExpanded?(G(),oe("svg",ur,[...f[20]||(f[20]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(G(),oe("svg",sr,[...f[21]||(f[21]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),b("span",null,Me(x.isExpanded?V(N)("common.collapse")||"Collapse":V(N)("common.expand")||"Expand"),1)])):ye("",!0),x.isPreviewable&&w.showPreviewButton?(G(),oe("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[12]||(f[12]=O=>{E(),te("preview")})},[f[22]||(f[22]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),b("circle",{cx:"12",cy:"12",r:"3"})])],-1)),b("span",null,Me(V(N)("common.preview")||"Preview"),1)])):ye("",!0)],512)):ye("",!0)]),_:1})])):ye("",!0)])])])):ye("",!0),sl(b("div",{class:mt(["code-block-shell-content",{"code-block-shell-content--collapsed":x.isCollapsed}])},[pt(Y.$slots,"default")],2),[[dl,!!x.stream||!x.loading]]),sl(b("div",dr,[pt(Y.$slots,"loading",{},()=>[f[23]||(f[23]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))])],512),[[dl,!x.stream&&x.loading]]),b("span",cr,Me(x.copyText?V(N)("common.copied")||"Copied":""),1)],64))}}),vr={class:"html-preview-frame__header"},mr={class:"html-preview-frame__title"},pr={class:"html-preview-frame__label"},hr=["sandbox","srcdoc"],gr=Lo(cl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const M=x,w=import.meta!==void 0&&!1;let te=null;const{t:ne}=fl(),we=k(()=>{const E=M.code||"",z=E.trim().toLowerCase();return z.startsWith("<!doctype")||z.startsWith("<html")||z.startsWith("<body")?E:`<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<style>
|
|
7
|
+
html, body {
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
height: 100%;
|
|
11
|
+
background-color: ${M.isDark?"#020617":"#ffffff"};
|
|
12
|
+
color: ${M.isDark?"#e5e7eb":"#020617"};
|
|
13
|
+
}
|
|
14
|
+
body {
|
|
15
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;
|
|
16
|
+
}
|
|
17
|
+
</style>
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
${E}
|
|
21
|
+
</body>
|
|
22
|
+
</html>`}),be=k(()=>{return E=M.htmlPreviewSandbox,z=M.htmlPreviewAllowScripts,typeof E=="string"?((function(ie){if(!w||typeof console>"u"||te===ie)return;const N=(function(ht){return new Set(ht.trim().toLowerCase().split(/\s+/).filter(Boolean))})(ie);N.has("allow-scripts")&&N.has("allow-same-origin")&&(te=ie,console.warn("[markstream-vue] htmlPreviewSandbox contains both allow-scripts and allow-same-origin. Use this only for fully trusted content served from an isolated origin."))})(E),E):E!==void 0?"":z===!0?"allow-scripts":"";var E,z});function r(E){var z;E.key!=="Escape"&&E.key!=="Esc"||(z=M.onClose)==null||z.call(M)}return $o(()=>{typeof window<"u"&&window.addEventListener("keydown",r)}),Oo(()=>{typeof window<"u"&&window.removeEventListener("keydown",r)}),(E,z)=>(G(),bn(Ri,{to:"body"},[b("div",{class:mt(["markstream-vue",{dark:M.isDark}])},[b("div",{class:"html-preview-frame__backdrop",onClick:z[2]||(z[2]=ie=>{var N;return(N=M.onClose)==null?void 0:N.call(M)})},[b("div",{class:"html-preview-frame",onClick:z[1]||(z[1]=Ho(()=>{},["stop"]))},[b("div",vr,[b("div",mr,[z[3]||(z[3]=b("span",{class:"html-preview-frame__dot"},null,-1)),b("span",pr,Me(M.title||V(ne)("common.preview")||"Preview"),1)]),b("button",{type:"button",class:"html-preview-frame__close",onClick:z[0]||(z[0]=ie=>{var N;return(N=M.onClose)==null?void 0:N.call(M)})}," × ")]),b("iframe",{class:"html-preview-frame__iframe",sandbox:be.value,referrerpolicy:"no-referrer",srcdoc:we.value},null,8,hr)])])],2)]))}}),[["__scopeId","data-v-24e66176"]]),yr=["data-markstream-enhanced","data-markstream-enhancement-state","data-markstream-code-block-state","data-markstream-pending","data-markstream-viewport-pending"],wr={class:"code-header-main"},br=["innerHTML"],kr={class:"code-header-copy"},xr={class:"code-header-title"},Sr={key:0,class:"code-header-caption"},Cr=["data-markstream-host-hidden"],Po="__markstreamMonacoPassiveTouchState__",Er=Lo(cl({__name:"CodeBlockNode",props:{node:{},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},theme:{},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isShowPreview:{type:Boolean,default:!0},monacoOptions:{},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},customId:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},estimatedHeightPx:{},estimatedContentHeightPx:{},estimatedDiffInline:{type:Boolean}},emits:["previewCode","copy"],setup(x,{emit:M}){var w,te,ne,we,be;const r=x,E=M,z=ki(),ie=ul(xi,null),N=ul("markstreamHostScrollManaged",null),ht=ul(Si,void 0),Ve=k(()=>qi(r,z)),Be=new Set;function gt(e){return q(this,null,function*(){var t;if(typeof window>"u")return yield e();const n=(t=window.Element)==null?void 0:t.prototype,l=n?.addEventListener;if(!n||!l)return yield e();const o=(function(){const d=window,u=d[Po];if(u)return u;const a={depth:0,original:null};return d[Po]=a,a})();let i=null;try{o.depth===0&&(o.original=l,n.addEventListener=function(u,a,c){var s;const v=(s=o.original)!=null?s:l;return u==="touchstart"&&(function(p,y){if(!p)return!1;const h=p;return!(typeof h.closest!="function"||!h.closest(".monaco-editor, .monaco-diff-editor")||y&&typeof y=="object"&&"passive"in y)})(this,c)?v.call(this,u,a,(function(p){return p==null?{passive:!0}:typeof p=="boolean"?{capture:p,passive:!0}:typeof p=="object"?"passive"in p?p:Ce(I({},p),{passive:!0}):{passive:!0}})(c)):v.call(this,u,a,c)}),o.depth++;let d=!1;i=()=>{d||(d=!0,Be.delete(i),o.depth=Math.max(0,o.depth-1),o.depth===0&&o.original&&n.addEventListener!==o.original&&(n.addEventListener=o.original,o.original=null))},Be.add(i)}catch{return yield e()}try{return yield e()}finally{i?.()}})}function vl(e,t){}const Vt=ko(),Gt=k(()=>{const e=Vt?.vnode.props;return!(!e||!e.onPreviewCode&&!e["onPreview-code"])}),{t:Y}=fl(),f=$(null),O=$(null),yt=$(!1),ke=$(to(r.node.language,r.node.code,Ie())),kn=k(()=>So(ke.value)),Ee=k(()=>kn.value==="plaintext"?"text":kn.value),xn=k(()=>kn.value==="plaintext"),Fe=$(!1),xe=$(!1),Q=$(!1),Se=$(!1),W=$(!1),wt=$(!1);let B=!1,bt=null,Bt=null,Ge=null,Je=0,Ye=!1,qe="";const Qe=$(null),ve=$(null);let Sn=null,Cn=0;const No=Ci(),Jt=Mi(),Mn=Bi(),We=Pi(null),Z=$(typeof window>"u"||!Mn.value),To=(ne=(te=(w=ko())==null?void 0:w.vnode.el)==null?void 0:te.textContent)!=null?ne:"",Ro=typeof window<"u"&&String((we=r.node.code)!=null?we:"").length>0&&To.includes(String(r.node.code)),ml=$(!Ro);$o(()=>{ml.value=!0}),typeof window<"u"&&ae([()=>O.value,Mn],([e,t],n,l)=>{var o,i,d;if((o=We.value)==null||o.destroy(),We.value=null,!t||Z.value)return void(Z.value=!0);if(!e)return void(Z.value=!1);let u=!0;const a=(d=(i=Jt?.value.heavyBlockMargin)!=null?i:Jt?.value.rootMargin)!=null?d:"0px",c=No(e,{rootMargin:a,allowIdle:!1});We.value=c,Z.value=Z.value||c.isVisible.value,c.whenVisible.then(()=>{u&&We.value===c&&(Z.value=!0)}).catch(()=>{}),l(()=>{u=!1,c.destroy(),We.value===c&&(We.value=null)})},{immediate:!0}),Ei(()=>{var e;B=!0;for(const t of Array.from(Be))t();(function(){const t=qe;ie&&t&&(qe="",ie.markSettled(t))})(),(e=We.value)==null||e.destroy(),We.value=null});let ue=null,Yt=null,Bn=()=>{},Qt=()=>{},kt=()=>null,se=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),U=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),En=()=>{},Xe=()=>{},Fn=()=>{},Ke=null,Oe=null,Et=null,Ft=null,pl=()=>{var e;return String((e=r.node.language)!=null?e:"plaintext")},Pn=()=>q(null,null,function*(){}),Ln=!1,Xt=null;const ze=[],$n=[];let He=null;const m=k(()=>Li(r.node)),Ze=$({removed:0,added:0}),Do=k(()=>`-${Ze.value.removed} +${Ze.value.added}`),hl=Object.freeze(Ce(I({},jt),{enabled:!1,revealLineCount:0}));function gl(e){var t,n,l;const o=((n=(t=O.value)==null?void 0:t.getBoundingClientRect)==null?void 0:n.call(t).width)||((l=O.value)==null?void 0:l.clientWidth)||(typeof window>"u"?0:window.innerWidth);return Ni(e,o)}function Pt(e,t){return{original:Kt(e),updated:Kt(t)}}function Kt(e){return String(e??"").replace(/\r\n$|\n$|\r$/,"")}function Lt(e){var t;return String((t=e?.message)!=null?t:e).includes("no diff result available")}function xt(){if(!$e())try{const e=Fn();e&&typeof e.catch=="function"&&e.catch(t=>{Lt(t)})}catch(e){Lt(e)}}const re=k(()=>{var e,t,n,l;const o=r.monacoOptions?I({},r.monacoOptions):{};if(!m.value)return I({lineDecorationsWidth:0,lineNumbersMinChars:2,glyphMargin:!1},o);const i=o.diffHideUnchangedRegions===void 0?I({},jt):gn(o.diffHideUnchangedRegions),d=o.hideUnchangedRegions===void 0?void 0:gn(o.hideUnchangedRegions),u=r.stream!==!1&&r.loading!==!1,a=u?I({},hl):i,c=u?I({},hl):d,s=(function(g){return g.diffWordWrap!==void 0?g.diffWordWrap:"off"})(o),v=I({},(e=o.experimental)!=null?e:{}),p=(t=o.diffUnchangedRegionStyle)!=null?t:"line-info",y=(function(g){const X=g.scrollbar&&typeof g.scrollbar=="object"?g.scrollbar:{};return I(Ce(I({},X),{verticalScrollbarSize:0,horizontalScrollbarSize:0}),gl(g)?{horizontal:"hidden"}:{})})(o),h={maxComputationTime:0,diffAlgorithm:"legacy",ignoreTrimWhitespace:!1,renderIndicators:!0,diffUpdateThrottleMs:120,renderLineHighlight:"none",renderLineHighlightOnlyWhenFocus:!0,selectionHighlight:!1,occurrencesHighlight:"off",matchBrackets:"never",lineDecorationsWidth:4,lineNumbersMinChars:2,glyphMargin:!1,padding:{top:0,bottom:0},minimap:{enabled:!1},renderOverviewRuler:!1,overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,scrollBeyondLastLine:!1,diffWordWrap:s,renderSideBySide:(n=o.renderSideBySide)==null||n,diffHideUnchangedRegions:a,useInlineViewWhenSpaceIsLimited:(l=o.useInlineViewWhenSpaceIsLimited)!=null&&l,diffLineStyle:"background",diffAppearance:"auto",diffUnchangedRegionStyle:p,diffHunkActionsOnHover:!1,experimental:v};return Ce(I(Ce(I(I({},h),o),{experimental:v}),c===void 0?{}:{hideUnchangedRegions:c}),{diffHideUnchangedRegions:a,diffWordWrap:s,scrollbar:y})}),On=k(()=>(r.theme!==void 0?!uo(r.theme):so(r.darkTheme,r.lightTheme))?(function(e){var t,n;if(e&&typeof e=="object"&&((t=e.colors)!=null&&t["editor.background"])){const o=Xn(e.colors["editor.background"]);if(o!=null)return o<128}const l=((n=rt(e))!=null?n:"").toLowerCase();return l?["dark","night","moon","black","dracula","mocha","frappe","macchiato","palenight","ocean","poimandres","monokai","laserwave","tokyo","slack-dark","rose-pine","github-dark","material-theme","one-dark","catppuccin-mocha","catppuccin-frappe","catppuccin-macchiato"].some(o=>l.includes(o))&&!["light","latte","dawn","lotus"].some(o=>l.includes(o)):!!r.isDark})(Tt()):!!r.isDark),zn=k(()=>{var e;if(!m.value)return On.value?"dark":"light";const t=(e=re.value)==null?void 0:e.diffAppearance;return t==="light"||t==="dark"?t:On.value?"dark":"light"}),yl=k(()=>m.value?zn.value==="dark":On.value),$t=k(()=>m.value?"diff":"single"),wl=$($t.value),ge=$(!1),D=$(!1),Ot=$(!1),me=$(!1),et=$(null),Hn=$(0),bl=$(0),Zt=$(!1);let zt=null,tt=!1,Nn=null,Tn=!1;const Rn=k(()=>{var e,t,n;if(m.value){const o=(e=re.value)==null?void 0:e.diffWordWrap;if(o==="inherit"){const i=(t=r.monacoOptions)==null?void 0:t.wordWrap;return i==null||String(i)!=="off"}return o==="on"}const l=(n=r.monacoOptions)==null?void 0:n.wordWrap;return l==null||String(l)!=="off"}),_e=k(()=>{var e;return!!m.value&&gl((e=re.value)!=null?e:{})}),Dn=k(()=>{var e;const t=(e=r.monacoOptions)==null?void 0:e.diffHideUnchangedRegions;return t===void 0?I({},jt):gn(t)});function kl(e){return N?.value===!0||!!e&&(!!e.closest('[data-markstream-virtual-timeline="1"], .markstream-virtual-timeline')||!!e.closest(".vue-recycle-scroller, [data-virtualizer], [data-virtual-scroll-root]"))}const Ao=k(()=>kl(O.value)),Ne=k(()=>!(ge.value||!me.value&&D.value)),xl=k(()=>Ne.value),jo=k(()=>Ne.value&&!Ot.value),qo=k(()=>!ge.value&&!me.value&&Ne.value),Wo=k(()=>D.value&&!ge.value?"ready":me.value?"fallback":"pending"),en=$(!1),Te=k(()=>Kt(r.node.code)),Sl=k(()=>m.value?r.node.diff===!0?r.node:Ce(I({},r.node),{diff:!0}):Te.value===r.node.code?r.node:Ce(I({},r.node),{code:Te.value})),pe=$(typeof((be=r.monacoOptions)==null?void 0:be.fontSize)=="number"?r.monacoOptions.fontSize:Number.NaN),_=$(pe.value),An=$(null),tn=$(null),nn=$(null),_o=k(()=>{const e=pe.value,t=_.value;return typeof e=="number"&&Number.isFinite(e)&&e>0&&typeof t=="number"&&Number.isFinite(t)&&t>0}),ln=k(()=>{var e;const t=An.value;if(typeof t=="number"&&Number.isFinite(t)&&t>0)return t;const n=(e=r.monacoOptions)==null?void 0:e.fontSize;if(typeof n=="number"&&Number.isFinite(n)&&n>0)return n;const l=_.value;return typeof l=="number"&&Number.isFinite(l)&&l>0?l:12}),Io=k(()=>{var e;const t=tn.value;if(typeof t=="number"&&Number.isFinite(t)&&t>0)return t;const n=(e=r.monacoOptions)==null?void 0:e.lineHeight;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:ln.value===12?18:Math.max(12,Math.round(1.5*ln.value))}),on=k(()=>Io.value),Uo=k(()=>{var e;const t=(e=r.monacoOptions)==null?void 0:e.tabSize;return typeof t=="number"&&Number.isFinite(t)&&t>0?t:4}),jn=k(()=>{var e;const t=(e=r.monacoOptions)==null?void 0:e.padding,n=m.value?0:8;return{top:typeof t?.top=="number"&&Number.isFinite(t.top)&&t.top>=0?t.top:n,bottom:typeof t?.bottom=="number"&&Number.isFinite(t.bottom)&&t.bottom>=0?t.bottom:n}}),rn=k(()=>{const e=r.estimatedContentHeightPx;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:null});function an(e){if(e==null)return null;const t=Math.ceil(e);return!Number.isFinite(t)||t<=0?null:Math.min(t,Math.ceil(Ct()))}function qn(){return!m.value&&r.stream!==!1&&r.loading!==!1}const Cl=k(()=>m.value?null:rn.value==null||qn()?Math.ceil((e=>{const t=String(e??"");return t?Math.max(1,t.split(/\r\n|\n|\r/).length):1})(Te.value)*on.value+1):null),Ml=k(()=>{if(m.value)return null;const e=rn.value;return e==null||qn()?an(Cl.value):an(e)}),Vo=k(()=>{const e=r.estimatedHeightPx;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:null}),Wn=$(null);function nt(){const e=Wn.value;return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.round(e):null}const _n=k(()=>{const e=nt();return e??(!m.value&&Zt.value?null:Ne.value||!D.value?Ml.value:null)});function Bl(e){const t=e?"hsl(152 42% 60%)":"var(--diff-added-fg)",n=e?"hsl(0 58% 58%)":"var(--diff-removed-fg)",l=e?"hsl(152 42% 60% / 0.18)":"var(--diff-added-bg)",o=e?"hsl(0 58% 58% / 0.18)":"var(--diff-removed-bg)",i=e?"hsl(152 42% 60% / 0.28)":"var(--diff-added-inline-bg)",d=e?"hsl(0 58% 58% / 0.28)":"var(--diff-removed-inline-bg)",u=`linear-gradient(90deg, ${t} 0 4px, transparent 4px 100%)`,a=`linear-gradient(90deg, ${n} 0 4px, transparent 4px 100%)`,c=e?"hsl(0 0% 7% / 0.98)":"hsl(var(--ms-muted) / 0.45)",s="var(--markstream-code-layout-character-width, 1ch)",v=`calc(${s} + ${s})`,p=`calc(${s} + ${s} + ${s} + ${s} + ${s} + 2px)`,y=`calc(${p} + ${s})`;return{"--markstream-diff-line-number-bg":c,"--markstream-diff-added-fg":t,"--markstream-diff-removed-fg":n,"--markstream-diff-added-line":l,"--markstream-diff-removed-line":o,"--markstream-diff-added-line-fill":l,"--markstream-diff-removed-line-fill":o,"--markstream-diff-added-gutter":u,"--markstream-diff-removed-gutter":a,"--markstream-diff-added-inline":i,"--markstream-diff-removed-inline":d,"--stream-monaco-added-fg":t,"--stream-monaco-removed-fg":n,"--stream-monaco-added-line":l,"--stream-monaco-removed-line":o,"--stream-monaco-added-line-fill":l,"--stream-monaco-removed-line-fill":o,"--stream-monaco-added-gutter":u,"--stream-monaco-removed-gutter":a,"--stream-monaco-added-inline":i,"--stream-monaco-removed-inline":d,"--stream-monaco-gutter-marker-width":"4px","--stream-monaco-gutter-gap":"1ch","--stream-monaco-line-number-left":"0px","--stream-monaco-line-number-width":v,"--stream-monaco-line-number-padding-left":v,"--stream-monaco-line-number-padding-right":s,"--stream-monaco-line-number-separator-width":"2px","--stream-monaco-layout-character-width":s,"--stream-monaco-line-number-box-width":p,"--stream-monaco-line-number-gap-to-code":s,"--stream-monaco-line-number-bg":c,"--stream-monaco-diff-code-gap":s,"--stream-monaco-diff-code-padding":"0px","--stream-monaco-original-margin-width":y,"--stream-monaco-original-scrollable-left":y,"--stream-monaco-original-scrollable-width":`calc(100% - ${y})`,"--stream-monaco-modified-margin-width":y,"--stream-monaco-modified-scrollable-left":y,"--stream-monaco-modified-scrollable-width":`calc(100% - ${y})`}}const El=k(()=>{var e;const t=(e=r.monacoOptions)==null?void 0:e.fontFamily,n=an(rn.value),l=an(Cl.value),o=qn(),i=I(I({fontSize:`${ln.value}px`,lineHeight:`${on.value}px`,tabSize:Uo.value,boxSizing:"border-box",maxHeight:`${Ct()}px`,overflow:"auto",paddingTop:`${jn.value.top}px`,paddingBottom:`${jn.value.bottom}px`},m.value||n==null||o?m.value||l==null?{}:{minHeight:`${l}px`}:{height:`${n}px`,minHeight:`${n}px`}),typeof t=="string"&&t.trim()?{"--markstream-code-font-family":t.trim()}:{});return i["--markstream-pre-line-number-top"]=`${jn.value.top}px`,i["--markstream-code-padding-left"]="calc(2ch + 2ch + 1ch + 2px + 1ch)",i["--markstream-pre-line-number-left"]="0px",i["--markstream-pre-line-number-width"]="2ch",i["--markstream-pre-line-number-padding-left"]="2ch",i["--markstream-pre-line-number-padding-right"]="1ch",i["--markstream-pre-line-number-separator-width"]="2px",m.value&&(i["--markstream-pre-diff-line-height"]=`${on.value}px`,i["--markstream-pre-diff-pane-bottom-padding"]=(_e.value,"0px"),Object.assign(i,Bl(yl.value))),i}),Fl=k(()=>_n.value!=null&&(!D.value||nt()!=null)),Go=k(()=>{const e=_n.value;if(e==null)return null;if(m.value)return Math.ceil(e);const t=Vo.value,n=rn.value;if(t==null||n==null)return Math.ceil(e);const l=Math.max(0,Math.ceil(t)-Math.ceil(n));return Math.ceil(e+l)}),Jo=k(()=>{if(m.value&&Ne.value)return{};const e=_n.value;return Fl.value&&e!=null?{minHeight:`${e}px`}:{}});function Pl(){var e,t,n,l,o,i,d,u;const a=(e=O.value)==null?void 0:e.querySelector("pre.code-pre-fallback"),c=U(),s=(t=a?.scrollTop)!=null?t:0;(o=(l=(n=c?.getOriginalEditor)==null?void 0:n.call(c))==null?void 0:l.setScrollTop)==null||o.call(l,s),(u=(d=(i=c?.getModifiedEditor)==null?void 0:i.call(c))==null?void 0:d.setScrollTop)==null||u.call(d,s)}function Ll(){return q(this,null,function*(){return m.value?(Kn()!=null||un(),ee(!0),Pl(),he(),Ot.value=!0,yield j(),ee(!0),yield Pe(),ee(!0),!(Ke&&!(yield Ke())||(Nt(),un(),ee(!0),D.value=!0,yield j(),un(),ee(!0),Nt(),he(),de(),0))):!(Ke&&!(yield Ke())||(D.value=!0,yield j(),le(!1),ee(),0))})}function un(){const e=f.value;return e&&cn(e)?(he(),le({preferModelDiffHeight:!0}),it(),Number.parseFloat(e.style.height||"")||null):Kn()}function $l(){if(!m.value||!W.value||!D.value||Ne.value)return!1;const e=f.value;return!!e&&Ht(e)}function Ol(e,t=!1,n={}){const l=Math.ceil(e),o=nt();if(o==null)return l;const i=n.allowBelowEstimatedFloor===!0||$l();return l>=o||i?((t||i)&&W.value&&(Wn.value=null),l):o}function Pe(){return new Promise(e=>{let t=!1,n=null,l=null;const o=()=>{t||(t=!0,l!=null&&globalThis.clearTimeout(l),n!=null&&yn(n),e())};l=globalThis.setTimeout(o,50),n=fe(o)})}function zl(){try{const e=f.value;if(!e)return null;const t=e.querySelector(".view-lines .view-line");if(t){const n=Math.ceil(t.getBoundingClientRect().height);if(n>0)return n}}catch{}return null}function In(){var e,t,n,l,o;try{const i=m.value?(n=(t=(e=U())==null?void 0:e.getModifiedEditor)==null?void 0:t.call(e))!=null?n:U():se(),d=kt(),u=(l=d?.EditorOption)==null?void 0:l.fontInfo;if(i&&u!=null){const a=(o=i.getOption)==null?void 0:o.call(i,u),c=a?.fontSize;if(typeof c=="number"&&Number.isFinite(c)&&c>0)return c}}catch{}try{const i=f.value;if(i){const d=i.querySelector(".view-lines .view-line");if(d)try{if(typeof window<"u"&&typeof window.getComputedStyle=="function"){const u=window.getComputedStyle(d).fontSize,a=u&&u.match(/^(\d+(?:\.\d+)?)/);if(a)return Number.parseFloat(a[1])}}catch{}}}catch{}return null}function St(e){var t,n;try{const i=kt(),d=(t=i?.EditorOption)==null?void 0:t.lineHeight;if(d!=null){const u=(n=e?.getOption)==null?void 0:n.call(e,d);if(typeof u=="number"&&u>0)return u}}catch{}const l=zl();if(l&&l>0)return l;const o=Number.isFinite(_.value)&&_.value>0?_.value:14;return Math.max(12,Math.round(1.35*o))}function sn(e){var t,n,l;try{const i=kt(),d=(t=i?.EditorOption)==null?void 0:t.padding;if(d!=null){const u=(n=e?.getOption)==null?void 0:n.call(e,d);if(typeof u?.top=="number"||typeof u?.bottom=="number")return(typeof u?.top=="number"&&Number.isFinite(u.top)?Math.max(0,u.top):0)+(typeof u?.bottom=="number"&&Number.isFinite(u.bottom)?Math.max(0,u.bottom):0)}}catch{}const o=(l=re.value)==null?void 0:l.padding;return typeof o?.top=="number"||typeof o?.bottom=="number"?(typeof o?.top=="number"&&Number.isFinite(o.top)?Math.max(0,o.top):0)+(typeof o?.bottom=="number"&&Number.isFinite(o.bottom)?Math.max(0,o.bottom):0):m.value?24:0}function Hl(e,t){return typeof e!="number"||typeof t!="number"||e<1||t<e?0:t-e+1}function Nl(e){if(!e)return[];const t=e.split(/\r?\n/);return t.length===1&&t[0]===""?[]:t}function dn(e,t){const n=Nl(e),l=Nl(t);let o=0,i=n.length-1,d=l.length-1;for(;o<=i&&o<=d&&n[o]===l[o];)o++;for(;i>=o&&d>=o&&n[i]===l[d];)i--,d--;const u=Math.max(0,i-o+1),a=Math.max(0,d-o+1);if(u===0||a===0)return{removed:u,added:a};if((u+1)*(a+1)<=15e5){const c=a+1;let s=new Uint32Array(c),v=new Uint32Array(c);for(let y=u-1;y>=0;y--){v[a]=0;for(let g=a-1;g>=0;g--)v[g]=n[o+y]===l[o+g]?s[g+1]+1:Math.max(s[g],v[g+1]);const h=s;s=v,v=h}const p=s[0];return{removed:u-p,added:a-p}}return{removed:u,added:a}}function Tl(e){var t;if(!(function(){var d,u,a;return!(!m.value||!_e.value)&&(r.node.originalCode!=null||r.node.updatedCode!=null?dn(String((d=r.node.originalCode)!=null?d:""),String((u=r.node.updatedCode)!=null?u:"")).removed>0:String((a=r.node.code)!=null?a:"").split(/\r\n|\n|\r/).some(c=>(function(s){return s.startsWith("-")&&!s.startsWith("---")})(c)))})())return!0;const n=e?.querySelector(".stream-monaco-fallback-inline-delete-line");if((t=n?.textContent)!=null&&t.trim()&&(n.hasAttribute("data-stream-monaco-colorize-signature")||n.querySelector('[class*="mtk"]')))return!0;const l=e?.querySelector([".editor.modified .view-zones .view-lines.line-delete",".editor.modified .view-lines .view-line.line-delete",".editor.original .view-zones .view-lines.line-delete",".editor.original .view-lines .view-line.line-delete"].join(","));if(!l||!l.matches(".view-line")&&!l.querySelector(".view-line"))return!1;const o=l.getBoundingClientRect(),i=e?.getBoundingClientRect();return i?.width===0&&i.height===0||o.width>0&&o.height>0}function Rl(e,t){if(!e)return!1;const n=t.added<=0||!!e.querySelector([".line-insert",".gutter-insert",".stream-monaco-fallback-line-insert",".stream-monaco-fallback-gutter-insert",".stream-monaco-fallback-line-number-insert"].join(",")),l=t.removed<=0||!!e.querySelector([".line-delete",".gutter-delete",".inline-deleted-margin-view-zone",".stream-monaco-fallback-line-delete",".stream-monaco-fallback-gutter-delete",".stream-monaco-fallback-line-number-delete",".stream-monaco-fallback-inline-delete-line",".stream-monaco-fallback-inline-delete-margin"].join(","));return n&&l}function Un(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?typeof window>"u"||typeof window.getComputedStyle!="function"?n:window.getComputedStyle(n).display==="none"?null:n:null}function Dl(e,t){return Un(e,t)!==null}function Al(e,t){if(!e)return!1;const n=t.added<=0||[".gutter-insert",".stream-monaco-fallback-gutter-insert"].some(o=>Dl(e,o)),l=t.removed<=0||[".gutter-delete",".inline-deleted-margin-view-zone",".stream-monaco-fallback-gutter-delete",".stream-monaco-fallback-inline-delete-margin"].some(o=>Dl(e,o));return n&&l}function jl(e){var t;const n=Array.from((t=e?.querySelectorAll(".monaco-diff-editor .margin-view-overlays .line-numbers"))!=null?t:[]);return!!n.length&&n.some(l=>{var o;if(!((o=l.textContent)!=null&&o.trim()))return!1;if(typeof window>"u"||typeof window.getComputedStyle!="function")return!0;const i=window.getComputedStyle(l);if(i.display==="none")return!1;const d=l.getBoundingClientRect();if(d.width<=0&&d.height<=0)return!0;const u=Number.parseFloat(i.width||""),a=Number.parseFloat(i.paddingLeft||""),c=Number.parseFloat(i.paddingRight||""),s=Math.max(d.width,Number.isFinite(u)?u:0)>=8,v=Number.isFinite(a)&&a>=1&&Number.isFinite(c)&&c>=1;return s&&v})}function ql(e){const t=Un(e,".monaco-diff-editor .view-lines .view-line");if(!t)return!1;if(!Gn())return!0;const n=Un(e,".monaco-diff-editor .margin-view-overlays .line-numbers");if(!n)return!1;if(typeof window>"u"||typeof window.getComputedStyle!="function")return!0;const l=t.getBoundingClientRect(),o=n.getBoundingClientRect();if(l.width<=0&&l.height<=0||o.width<=0&&o.height<=0)return!0;const i=l.left-o.right;return i>=0&&i<=32}function Yo(e,t){return!_e.value||!(t||e?.querySelector([".line-insert",".line-delete",".gutter-insert",".gutter-delete",".stream-monaco-line-number-insert",".stream-monaco-line-number-delete",".stream-monaco-line-insert-fill",".stream-monaco-line-delete-fill",".stream-monaco-fallback-line-insert",".stream-monaco-fallback-line-delete",".stream-monaco-fallback-inline-delete-line"].join(",")))||!!(e?.classList.contains("stream-monaco-diff-inline-native-ready")&&!e.classList.contains("stream-monaco-diff-native-stale"))}function Wl(e,t,n,l){const o=e?.querySelector(`.monaco-diff-editor .editor.${t}`);if(!o)return!1;const i=Array.from(o.querySelectorAll(`.margin-view-overlays .line-numbers.${n}`));if(!i.length)return!0;const d=Array.from(o.querySelectorAll(".lines-content > .view-lines:not(.line-delete) > .view-line"));return!!d.length&&i.every(u=>{const a=u.getBoundingClientRect();let c=null;for(const s of d){const v=s.getBoundingClientRect(),p=Math.abs(v.top-a.top);(!c||p<c.distance)&&(c={node:s,distance:p})}return!c||c.distance>1.25||c.node.classList.contains(l)})}function Qo(e,t){if(!e)return!1;const n=t.added<=0||Wl(e,"modified","stream-monaco-line-number-insert","stream-monaco-line-insert-fill"),l=t.removed<=0||(_e.value?!!e.classList.contains("stream-monaco-diff-inline-native-ready"):Wl(e,"original","stream-monaco-line-number-delete","stream-monaco-line-delete-fill"));return n&&l}function Vn(e){if(xn.value)return!0;if(!e)return!1;const t=Array.from(e.querySelectorAll(".monaco-diff-editor .view-lines .view-line, .monaco-editor .view-lines .view-line")).filter(l=>{var o;if(!((o=l.textContent)!=null&&o.trim()))return!1;const i=l.getBoundingClientRect();return i.width>0||i.height>0});if(!t.length)return!1;const n=t.filter(l=>{var o,i;return i=(o=l.textContent)!=null?o:"",/['"`{}()[\]:;=<>.,]|\/\/|\/\*|\b(?:async|await|class|const|enum|export|for|function|if|import|interface|let|return|switch|type|var|while)\b/.test(i.replace(/\u00A0/g," ").trim())});return!n.length||n.filter(l=>Array.from(l.querySelectorAll("span")).filter(o=>{var i;return(i=o.textContent)==null?void 0:i.trim()}).some(o=>String(o.className||"").split(/\s+/).some(i=>/^mtk\d+$/.test(i)&&i!=="mtk1"))).length>0}function Gn(){const e=re.value;return e?.lineNumbers!=="off"}function Jn(){var e,t;m.value?Ze.value=dn(String((e=r.node.originalCode)!=null?e:""),String((t=r.node.updatedCode)!=null?t:"")):Ze.value={removed:0,added:0}}function lt(){var e;if(m.value)try{const t=U(),n=(e=t?.getLineChanges)==null?void 0:e.call(t);if(!Array.isArray(n))return void Jn();let l=0,o=0;for(const i of n)l+=Hl(i.originalStartLineNumber,i.originalEndLineNumber),o+=Hl(i.modifiedStartLineNumber,i.modifiedEndLineNumber);Ze.value={removed:l,added:o}}catch{Jn()}else Ze.value={removed:0,added:0}}function Yn(){var e;if(Number.isFinite(_.value)&&_.value>0&&Number.isFinite(pe.value))return _.value;const t=In();return typeof((e=r.monacoOptions)==null?void 0:e.fontSize)=="number"?(pe.value=r.monacoOptions.fontSize,_.value=r.monacoOptions.fontSize,_.value):t&&t>0?(pe.value=t,_.value=t,t):(pe.value=12,_.value=12,12)}function Xo(){const e=Yn(),t=Math.min(36,e+1);_.value=t}function Ko(){const e=Yn(),t=Math.max(10,e-1);_.value=t}function Zo(){Yn(),Number.isFinite(pe.value)&&(_.value=pe.value)}function _l(){var e,t,n,l,o,i,d,u,a,c,s,v,p,y;try{const h=m.value?U():null,g=m.value?h:se();if(!g)return null;if(h?.getOriginalEditor&&h?.getModifiedEditor){const C=(e=h.getOriginalEditor)==null?void 0:e.call(h),S=(t=h.getModifiedEditor)==null?void 0:t.call(h);(n=C?.layout)==null||n.call(C),(l=S?.layout)==null||l.call(S);const F=((o=C?.getContentHeight)==null?void 0:o.call(C))||0,P=((i=S?.getContentHeight)==null?void 0:i.call(S))||0,T=Math.max(F,P);if(T>0)return Math.ceil(T);const R=((a=(u=(d=C?.getModel)==null?void 0:d.call(C))==null?void 0:u.getLineCount)==null?void 0:a.call(u))||1,A=((v=(s=(c=S?.getModel)==null?void 0:c.call(S))==null?void 0:s.getLineCount)==null?void 0:v.call(s))||1,H=Math.max(R,A),J=Math.max(St(C),St(S)),K=Math.max(sn(C),sn(S));return Math.ceil(H*J+K+0)}if(g?.getContentHeight){(p=g?.layout)==null||p.call(g);const C=g.getContentHeight();if(C>0)return m.value||(Zt.value=!0),Math.ceil(C)}const X=(y=g?.getModel)==null?void 0:y.call(g);let ce=1;X&&typeof X.getLineCount=="function"&&(ce=X.getLineCount());const L=St(g);return Math.ceil(ce*(L+1.5)+0)}catch{return null}}function Il(){var e,t;if(m.value)return!1;try{const n=(t=(e=se())==null?void 0:e.getContentHeight)==null?void 0:t.call(e),l=typeof n=="number"&&Number.isFinite(n)&&n>0;return l&&(Zt.value=!0),l}catch{return!1}}function Qn(e){var t,n,l;if(typeof window>"u")return null;try{const o=e.getBoundingClientRect(),i=window.getComputedStyle(e);if(i.display==="none"||i.visibility==="hidden")return null;const d=e.querySelector("diffs-container");if(d instanceof HTMLElement){const c=d.getBoundingClientRect();if(c.height>0&&c.bottom>o.top)return Math.ceil(c.bottom-o.top)}const u=[".editor.original .view-lines .view-line",".editor.modified .view-lines .view-line",".editor.original .view-zones > div",".editor.modified .view-zones > div",".editor.original .margin-view-zones > div",".editor.modified .margin-view-zones > div",".editor.original .diff-hidden-lines",".editor.modified .diff-hidden-lines",".stream-monaco-diff-unchanged-bridge"];let a=0;for(const c of Array.from(e.querySelectorAll(u.join(",")))){if(!(c instanceof HTMLElement)||((t=c.parentElement)!=null&&t.classList.contains("view-zones")||(n=c.parentElement)!=null&&n.classList.contains("margin-view-zones"))&&!((l=c.textContent)!=null&&l.trim()||c.matches(".line-delete, .line-insert, .cdr")||c.querySelector(".diff-hidden-lines, .stream-monaco-diff-unchanged-bridge, .line-delete, .line-insert, .cdr")))continue;const s=window.getComputedStyle(c);if(s.display==="none"||s.visibility==="hidden"||Number.parseFloat(s.opacity||"1")<=.01)continue;const v=c.getBoundingClientRect();v.height<=0||v.bottom<=o.top||(a=Math.max(a,v.bottom-o.top))}return a>0?Math.ceil(a):null}catch{return null}}function Ht(e){if(typeof window>"u")return!1;const t=e.getBoundingClientRect();if(t.width<=0||t.height<=0)return!1;const n=e.querySelectorAll(".editor.modified .diff-hidden-lines, .editor.original .diff-hidden-lines, .stream-monaco-diff-unchanged-bridge");for(const l of Array.from(n)){if(!(l instanceof HTMLElement))continue;const o=window.getComputedStyle(l);if(o.display==="none"||o.visibility==="hidden"||Number.parseFloat(o.opacity||"1")<=.01)continue;const i=l.getBoundingClientRect();if(!(i.width<=0||i.height<=0||i.bottom<=t.top||i.top>=t.bottom))return!0}return!1}function Xn(e){var t;const n=String(e??"").trim(),l=(t=n.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i))==null?void 0:t[1];if(l){const a=l.length===3?l.split("").map(c=>`${c}${c}`).join(""):l;return .2126*Number.parseInt(a.slice(0,2),16)+.7152*Number.parseInt(a.slice(2,4),16)+.0722*Number.parseInt(a.slice(4,6),16)}const o=n.match(/\d+(?:\.\d+)?/g);if(!o||o.length<3)return null;const[i,d,u]=o.slice(0,3).map(Number);return .2126*i+.7152*d+.0722*u}function Nt(){var e,t,n;if(Ul())return;const l=In();l&&l>0&&(An.value=l,_.value=l,pe.value=l);try{const o=St(m.value?(n=(t=(e=U())==null?void 0:e.getModifiedEditor)==null?void 0:t.call(e))!=null?n:U():se());o&&o>0&&(tn.value=o)}catch{}try{const o=zl();o&&o>0&&(tn.value=o)}catch{}}function Ul(){return m.value&&xl.value}function Kn(){var e;if(!m.value||!Ne.value)return null;const t=f.value,n=(e=O.value)==null?void 0:e.querySelector("pre.code-pre-fallback");if(!t||!n)return null;const l=Math.ceil(n.getBoundingClientRect().height);return!Number.isFinite(l)||l<=0?null:(t.style.height=`${l}px`,t.style.minHeight=`${l}px`,t.style.maxHeight=`${Math.ceil(Ct())}px`,t.style.overflow="hidden",l)}function Zn(){var e,t,n,l,o,i,d,u;const a=f.value,c=O.value;if(!a||!c)return;const s=a,v=a.querySelector(".monaco-editor")||a,p=v.querySelector(".monaco-editor-background")||v,y=v.querySelector(".view-lines")||v;let h=null,g=null,X=null;try{typeof window<"u"&&typeof window.getComputedStyle=="function"&&(h=window.getComputedStyle(v),g=p===v?h:window.getComputedStyle(p),X=y===v?h:window.getComputedStyle(y))}catch{h=null,g=null,X=null}const ce=String((e=h?.getPropertyValue("--vscode-editor-foreground"))!=null?e:"").trim(),L=String((t=h?.getPropertyValue("--vscode-editor-background"))!=null?t:"").trim(),C=String((l=(n=h?.getPropertyValue("--vscode-editor-selectionBackground"))!=null?n:h?.getPropertyValue("--vscode-editor-hoverHighlightBackground"))!=null?l:"").trim(),S=ce||String((i=(o=X?.color)!=null?o:h?.color)!=null?i:"").trim(),F=L||String((u=(d=g?.backgroundColor)!=null?d:h?.backgroundColor)!=null?u:"").trim(),P=(function(){var T,R,A,H,J;try{const K=m.value?(A=(R=(T=U())==null?void 0:T.getModifiedEditor)==null?void 0:R.call(T))!=null?A:U():se(),st=kt(),Dt=(H=st?.EditorOption)==null?void 0:H.fontInfo;if(K&&Dt!=null){const At=(J=K.getOption)==null?void 0:J.call(K,Dt),Ue=At?.typicalHalfwidthCharacterWidth;if(typeof Ue=="number"&&Number.isFinite(Ue)&&Ue>0)return Ue}}catch{}return null})();if(P!=null&&(nn.value=P),m.value){const T=(R,A)=>{A?(c.style.setProperty(R,A),s.style.setProperty(R,A)):(c.style.removeProperty(R),s.style.removeProperty(R))};for(const[R,A]of Object.entries(Bl(c.classList.contains("is-dark"))))T(R,A);return S?(c.style.setProperty("--markstream-diff-editor-fg",S),s.style.setProperty("--vscode-editor-foreground",S),s.style.setProperty("--stream-monaco-editor-fg",S)):(c.style.removeProperty("--markstream-diff-editor-fg"),s.style.removeProperty("--vscode-editor-foreground"),s.style.removeProperty("--stream-monaco-editor-fg")),F?(c.style.setProperty("--markstream-diff-editor-bg",F),c.style.setProperty("--markstream-diff-panel-bg",F),c.style.setProperty("--markstream-diff-panel-bg-soft",F),c.style.setProperty("--markstream-diff-panel-bg-strong",F),s.style.setProperty("--vscode-editor-background",F),s.style.setProperty("--stream-monaco-editor-bg",F),s.style.setProperty("--stream-monaco-fixed-editor-bg",F),s.style.setProperty("--stream-monaco-panel-bg",F),s.style.setProperty("--stream-monaco-panel-bg-soft",F),s.style.setProperty("--stream-monaco-panel-bg-strong",F),s.style.backgroundColor=F):(c.style.removeProperty("--markstream-diff-editor-bg"),c.style.removeProperty("--markstream-diff-panel-bg"),c.style.removeProperty("--markstream-diff-panel-bg-soft"),c.style.removeProperty("--markstream-diff-panel-bg-strong"),s.style.removeProperty("--vscode-editor-background"),s.style.removeProperty("--stream-monaco-editor-bg"),s.style.removeProperty("--stream-monaco-fixed-editor-bg"),s.style.removeProperty("--stream-monaco-panel-bg"),s.style.removeProperty("--stream-monaco-panel-bg-soft"),s.style.removeProperty("--stream-monaco-panel-bg-strong"),s.style.backgroundColor=""),void(C?s.style.setProperty("--vscode-editor-selectionBackground",C):s.style.removeProperty("--vscode-editor-selectionBackground"))}if((function(T,R,A){if(!xn.value)return!1;const H=Xn(T),J=Xn(R);return A?H!=null&&H>170||J!=null&&J<110:H!=null&&H<85||J!=null&&J>190})(F,S,c.classList.contains("is-dark")))return s.style.removeProperty("--vscode-editor-foreground"),s.style.removeProperty("--vscode-editor-background"),void s.style.removeProperty("--vscode-editor-selectionBackground");S&&s.style.setProperty("--vscode-editor-foreground",S),F&&s.style.setProperty("--vscode-editor-background",F),C&&s.style.setProperty("--vscode-editor-selectionBackground",C)}let el=0,tl=0;const Vl=/auto|scroll|overlay/i;function Le(e,t,n){var l;if(typeof window>"u"||m.value||(function(s){return Ao.value||kl(s)})(e))return;const o=Math.ceil(t),i=Math.ceil(n)-o;if(Math.abs(i)<=1)return;const d=(function(s){var v,p;if(typeof window>"u")return null;const y=(v=s?.ownerDocument)!=null?v:document,h=y.scrollingElement||y.documentElement||y.body;let g=(p=s?.parentElement)!=null?p:null;for(;g&&g!==y.body&&g!==h;){const X=window.getComputedStyle(g),ce=(X.overflowY||"").toLowerCase(),L=(X.overflow||"").toLowerCase();if(Vl.test(ce)||Vl.test(L))return g;g=g.parentElement}return h})(e);if(!d)return;const u=(l=e.ownerDocument)!=null?l:document,a=d===u.body||d===u.documentElement||d===u.scrollingElement,c=a?0:d.getBoundingClientRect().top;e.getBoundingClientRect().top-c>=0||(a&&typeof window.scrollBy=="function"?window.scrollBy(0,i):d.scrollTop+=i)}function nl(){try{const e=f.value;if(!e)return;const t=e.getBoundingClientRect().height,n=_l();if(n!=null&&n>0){const o=Ol(n,!0,{allowBelowEstimatedFloor:!m.value&&W.value&&Il()}),i=nt();return e.style.minHeight=i!=null?`${i}px`:"0px",e.style.height=`${o}px`,e.style.maxHeight="none",e.style.overflow="visible",void Le(e,t,o)}const l=nt();l!=null&&(e.style.minHeight=`${l}px`,e.style.height=`${l}px`,e.style.maxHeight="none",e.style.overflow="visible",Le(e,t,l))}catch{}}function ot(){for(var e,t;ze.length>0;)try{(t=(e=ze.pop())==null?void 0:e.dispose)==null||t.call(e)}catch{}bt!=null&&(yn(bt),bt=null),Bt!=null&&(yn(Bt),Bt=null),Ge!=null&&(yn(Ge),Ge=null),Je=0,Ye=!1}function Re(){for(var e;$n.length>0;)try{(e=$n.pop())==null||e()}catch{}}function le(e=!1){xe.value||(Fe.value?nl():(function(t={}){var n,l,o;try{const i=f.value;if(!i)return;const d=i.getBoundingClientRect().height,u=Ct(),a=Math.ceil(((n=i.getBoundingClientRect)==null?void 0:n.call(i).height)||0),c=Number.parseFloat(i.style.height||""),s=a>0?a:Number.isFinite(c)&&c>0?Math.ceil(c):0,v=m.value?(function(){var H,J,K,st,Dt,At,Ue,ho,go,yo,wo,bo;if($e())return null;try{const dt=U(),ct=(H=dt?.getOriginalEditor)==null?void 0:H.call(dt),ft=(J=dt?.getModifiedEditor)==null?void 0:J.call(dt);if(!ct||!ft)return null;const vi=((Dt=(st=(K=ct.getModel)==null?void 0:K.call(ct))==null?void 0:st.getLineCount)==null?void 0:Dt.call(st))||1,mi=((ho=(Ue=(At=ft.getModel)==null?void 0:At.call(ft))==null?void 0:Ue.getLineCount)==null?void 0:ho.call(Ue))||1,pi=Math.max(vi,mi),hi=Math.max(St(ct),St(ft)),gi=Math.max(sn(ct),sn(ft)),yi=Math.max((yo=(go=ct.getContentHeight)==null?void 0:go.call(ct))!=null?yo:0,(bo=(wo=ft.getContentHeight)==null?void 0:wo.call(ft))!=null?bo:0);return Math.ceil(Math.max(yi,pi*hi+gi+0))}catch{return null}})():null,p=m.value&&Ht(i),y=m.value&&cn(i),h=m.value&&i.classList.contains("stream-monaco-diff-native-stale"),g=p&&W.value&&D.value&&!Ne.value;if(p||(ve.value=null),Cn>0&&(Cn--,Qe.value!=null))return void Le(i,d,De(i,Qe.value,u,{allowBelowEstimatedFloor:g}));if(m.value&&!y&&!p&&Ne.value){const H=Kn();if(H!=null){const J=De(i,H,u,{allowBelowEstimatedFloor:!0});return ee(!0),void Le(i,d,J)}}const X=m.value&&t.preferModelDiffHeight===!0,ce=m.value?Qn(i):null,L=ce,C=!m.value&&W.value&&Il(),S=m.value&&r.loading!==!1&&(L!=null||v!=null&&a>0&&v<a-1),F=v!=null&&!g;let P;if(m.value)if(X){const H=v!=null&&r.loading===!1&&s>0&&v<s-1;P=r.loading===!1&&L!=null?p||v==null?L:Math.max(L,v):H?v:L!=null&&v!=null?Math.max(L,v,r.loading!==!1?s:0):Math.max(L??0,v??0,r.loading!==!1?s:0)||null}else P=p?ce:_e.value&&L!=null||L!=null?F?Math.max(L,v):L:m.value&&r.loading!==!1?v!=null&&s>0&&v<s-1?v:s>0?s:null:v;else P=_l();if(m.value&&r.loading===!1&&h&&!g&&P!=null&&v!=null&&(P=Math.min(P,v)),m.value&&P!=null&&s>0&&(r.loading!==!1||r.loading===!1&&h&&!g||t.holdCurrentDiffHeight===!0&&!g)&&(P=Math.max(P,s)),P!=null&&P>0){const H=p&&ve.value!=null,J=p&&a>0&&a<u-1&&P>=u-1,K=De(i,H?Math.max(ve.value,P):J?a:P,u,{clearEstimatedFloor:!0,allowBelowEstimatedFloor:g||C||S});return p&&K<u-1&&(ve.value=Math.max((l=ve.value)!=null?l:0,K)),ll(i),void Le(i,d,K)}if(Qe.value!=null)return void Le(i,d,De(i,Qe.value,u,{allowBelowEstimatedFloor:g}));const T=m.value&&r.loading!==!1||p?a:Math.max(a,v!=null&&v>0?v:0);if(T>0){const H=p&&ve.value!=null,J=p&&a>0&&a<u-1&&T>=u-1,K=De(i,H?Math.max(ve.value,T):J?a:T,u,{allowBelowEstimatedFloor:g});return p&&K<u-1&&(ve.value=Math.max((o=ve.value)!=null?o:0,K)),ll(i),void Le(i,d,K)}const R=nt();if(!(R==null||m.value&&r.loading!==!1&&y))return void Le(i,d,De(i,R,u,{allowBelowEstimatedFloor:g}));const A=Number.parseFloat(i.style.height);!Number.isNaN(A)&&A>0?Le(i,d,De(i,A,u,{allowBelowEstimatedFloor:g})):m.value||Le(i,d,De(i,u,u))}catch{}})(typeof e=="object"?e:{}))}function Gl(){el=0,tl=0}function ee(e=!1){var t,n,l;if(xe.value)return;const o=f.value;if(!o)return;const i=m.value?U():se();if(i&&typeof i.layout=="function")try{const d=(t=o.getBoundingClientRect)==null?void 0:t.call(o),u=Math.ceil(((n=d?.width)!=null?n:0)||o.clientWidth||0),a=Math.ceil(((l=d?.height)!=null?l:0)||o.clientHeight||Number.parseFloat(o.style.height||"")||0);if(u>0&&a>0){if(!e&&u===el&&a===tl)return;el=u,tl=a,i.layout({width:u,height:a})}else Gl(),i.layout()}catch{}}function he(){if(!m.value)return void Re();const e=f.value;if(!e)return void Re();const t=e.querySelector(".monaco-diff-editor");if(!t||t.classList.contains("side-by-side"))return void Re();const n=Array.from(t.querySelectorAll(".editor.original .diff-hidden-lines")),l=Array.from(t.querySelectorAll(".editor.modified .diff-hidden-lines")),o=Math.min(n.length,l.length);for(let i=0;i<o;i++){const d=l[i],u=d.querySelector("a"),a=d.querySelector(".center > div:first-child"),c=d.querySelector(".center");if(!u||!a||!c||c.querySelector(".markstream-inline-fold-proxy"))continue;const s=document.createElement("button");s.type="button",s.className="markstream-inline-fold-proxy",s.dataset.markstreamInlineFoldProxy="true";const v=u.getAttribute("title")||"Show Unchanged Region";s.title=v,s.setAttribute("aria-label",v);const p=g=>{g.preventDefault(),g.stopPropagation()},y=g=>{g.preventDefault(),g.stopPropagation(),u.click(),fe(()=>de())},h=g=>{g.key!=="Enter"&&g.key!==" "||(g.preventDefault(),g.stopPropagation(),u.click(),fe(()=>de()))};s.addEventListener("mousedown",p),s.addEventListener("click",y),s.addEventListener("keydown",h),c.appendChild(s),$n.push(()=>{s.removeEventListener("mousedown",p),s.removeEventListener("click",y),s.removeEventListener("keydown",h),s.parentElement===c&&c.removeChild(s)})}}function de(e=!1){if(B||bt!=null)return;const t=()=>{B||(he(),le(e),ee())};bt=fe(()=>{bt=null,t(),Bt=fe(()=>{Bt=null,t()})}),it()}function it(e=!1){if(!m.value||B||!e&&r.loading===!1||(Ye=Ye||e,Je=Math.max(Je,e?18:6),Ge!=null))return;const t=()=>{if(Ge=null,!m.value||B||Je<=0||!Ye&&r.loading===!1)return Je=0,void(Ye=!1);Je--,he(),le({preferModelDiffHeight:!0,holdCurrentDiffHeight:Ye}),ee(),Je>0?Ge=fe(t):Ye=!1};Ge=fe(t)}function De(e,t,n,l={}){const o=m.value&&r.loading!==!1?Qn(e):null,i=o!=null&&o>t+1?o:t,d=Math.min(i,n),u=l.allowBelowEstimatedFloor===!0||$l(),a=Ol(d,l.clearEstimatedFloor===!0,{allowBelowEstimatedFloor:u}),c=nt();if(e.style.minHeight=c==null||u?"0px":`${Math.min(c,Math.ceil(n))}px`,e.style.height=`${a}px`,e.style.maxHeight=`${Math.ceil(n)}px`,m.value)e.style.overflow="hidden";else{const s=t>n+1;e.style.overflow=s?"auto":"hidden"}return a}function ll(e){var t,n,l,o,i,d,u,a;if(!m.value)return;const c=Fe.value||!Ht(e)||e.getBoundingClientRect().height>=Ct()-1;if(Sn===c)return;Sn=c;const s=Ce(I({},(n=(t=r.monacoOptions)==null?void 0:t.scrollbar)!=null?n:{}),{handleMouseWheel:c}),v=U();try{(i=(o=(l=v?.getOriginalEditor)==null?void 0:l.call(v))==null?void 0:o.updateOptions)==null||i.call(o,{scrollbar:s}),(a=(u=(d=v?.getModifiedEditor)==null?void 0:d.call(v))==null?void 0:u.updateOptions)==null||a.call(u,{scrollbar:s})}catch{}}function cn(e=f.value){return!!$e(e)||!!e?.querySelector(".monaco-diff-editor .view-lines .view-line")}function Jl(e=f.value){return!!$e(e)||!!e?.querySelector(".monaco-editor .view-lines .view-line")}function Yl(){var e,t;if($e())return!0;const n=(t=(e=se())==null?void 0:e.getModel)==null?void 0:t.call(e);return typeof n?.getValue=="function"&&n.getValue()===Te.value}function Ql(e=f.value){return!!$e(e)||!!e?.classList.contains("stream-monaco-diff-root")&&!(_e.value&&!e.classList.contains("stream-monaco-diff-inline"))}function $e(e=f.value){return!!e?.querySelector("diffs-container")}function Xl(e){return r.loading!==!1||D.value||e.classList.contains("stream-monaco-diff-native-stale")||Ht(e)}function ei(){const e=U();return typeof e?.getOriginalEditor=="function"||typeof e?.getModifiedEditor=="function"||typeof e?.getLineChanges=="function"}function Kl(){return q(this,arguments,function*(e={}){var t,n,l;if(!m.value)return!0;if($e())return yield j(),yield Pe(),$e();const o=e.requireHighlight!==!1;let i=0,d=Pt(String((t=r.node.originalCode)!=null?t:""),String((n=r.node.updatedCode)!=null?n:"")),u=dn(d.original,d.updated),a=u.added>0||u.removed>0;const c=()=>{var s,v;const p=Pt(String((s=r.node.originalCode)!=null?s:""),String((v=r.node.updatedCode)!=null?v:""));p.original===d.original&&p.updated===d.updated||(d=p,u=dn(d.original,d.updated),a=u.added>0||u.removed>0)};for(let s=0;s<30;s++){if(B)return!1;c();const v=f.value,p=U(),y=Gn();let h=!1;try{const S=(l=p?.getLineChanges)==null?void 0:l.call(p);h=Array.isArray(S)&&(!a||S.length>0)}catch{h=!1}const g=!!v?.querySelector(".monaco-diff-editor"),X=cn(v),ce=!a||Rl(v,u),L=!a||Al(v,u),C=!y||jl(v);if(g&&X&&h&&ce&&L&&C&&Tl(v)){try{xt(),he(),lt(),de()}catch{}if(yield j(),yield Pe(),B)return!1;const S=f.value,F=!Gn()||jl(S),P=!a||Rl(S,u),T=!a||Al(S,u),R=Yo(S,a),A=Qo(S,u),H=!o||Vn(S),J=Ql(S)&&F&&ql(S)&&P&&T&&R&&A&&H,K=Ql(S)&&F&&ql(S)&&P&&T&&Tl(S)&&H;if(J||K){if(i++,i>=2)return!0}else i=0}yield j(),yield Pe()}return B||(xt(),he(),lt(),de(),c()),!1})}function Zl(e,t,n){return q(this,null,function*(){try{return void(yield Qt(e,t,n))}catch(l){if(!Lt(l))throw l}if(yield j(),yield Pe(),!B&&m.value)try{yield Qt(e,t,n)}catch(l){if(!Lt(l))throw l}})}function Ct(){var e,t;const n=(t=(e=r.monacoOptions)==null?void 0:e.MAX_HEIGHT)!=null?t:500;if(typeof n=="number")return n;const l=String(n).match(/^(\d+(?:\.\d+)?)/);return l?Number.parseFloat(l[1]):500}const ol=k(()=>r.isShowPreview&&(ke.value==="html"||ke.value==="svg"));function Ie(){return typeof r.node.loading=="boolean"?r.node.loading:r.loading===!0}function eo(){var e,t,n;if(!Ie())return!0;const l=String((e=r.node.raw)!=null?e:""),o=(n=(t=l.split(/\r\n|\n|\r/,1)[0])==null?void 0:t.trimStart())!=null?n:"";return!/^(?:`{3,}|~{3,})/.test(o)||/\r\n|\n|\r/.test(l)}function to(e,t,n){return!n||eo()&&String(t??"")?hn(String(e??"")):"plain"}function fn(){return Ie()}let Mt=null,il=!1,vn=0;function no(){Mt=null,vn++}function lo(){return q(this,arguments,function*(e=vn){if(!il){il=!0;try{for(;Mt&&!B&&!m.value&&e===vn;){const t=Mt;Mt=null;try{yield Promise.resolve(Bn(t.code,t.language)),yield j(),B||m.value||(le(!1),ee())}catch{}}}finally{il=!1,!Mt||B||m.value||lo()}}})}function oo(e,t){Mt={code:e,language:t},lo(vn)}ae(()=>[r.node.language,r.node.code,r.node.raw,r.node.loading,r.loading],([e,t,n,l,o])=>{ke.value=to(e,t,typeof l=="boolean"?l:o===!0)}),ae(()=>[r.node.originalCode,r.node.updatedCode,m.value],()=>{ve.value=null,Jn(),fe(()=>lt())},{immediate:!0});let mn=0;ae(()=>[r.node.originalCode,r.node.updatedCode,Ee.value,m.value,r.stream],e=>q(null,[e],function*([,,,t,n]){var l,o;const i=++mn;if(!t||Ie()||n===!1&&!Q.value)return;if(n!==!1&&ue&&!Q.value&&f.value)try{yield Ae(f.value)}catch{}const d=Et;if(d&&!Se.value){try{yield d}catch{}if(B||!m.value||i!==mn)return}if(i!==mn)return;const u=Pt(String((l=r.node.originalCode)!=null?l:""),String((o=r.node.updatedCode)!=null?o:"")),a=r.loading===!1;a&&at();try{if(yield Zl(u.original,u.updated,Ee.value),B||!m.value||i!==mn)return;yield j(),ee(!0),he(),le(r.loading===!1||{preferModelDiffHeight:!0}),ee(!0),de(!0)}catch{return}if(a){if(B||!m.value)return;xt(),he(),lt(),de(),it(!0)}Fe.value&&fe(()=>nl())})),ae(()=>r.node.code,e=>q(null,null,function*(){if(Ie()||r.stream===!1||(ke.value||(ke.value=hn(pl(e))),m.value))return;const t=Et;if(t&&!Se.value){try{yield t}catch{}if(B||m.value)return}if(ue&&!Q.value&&f.value)try{yield Ae(f.value)}catch{}oo(Kt(r.node.code),Ee.value),Fe.value&&fe(()=>nl())}));const ti=k(()=>{const e=ke.value;return e?Co[e]||e.charAt(0).toUpperCase()+e.slice(1):Co[""]}),io=k(()=>{var e;return Ti(String((e=r.node.raw)!=null?e:""),ti.value,m.value)}),ni=k(()=>io.value.title),ro=k(()=>io.value.caption),li=k(()=>($i.value,(function(e,t){if(t===void 0)return Oi(e);if(t){const l=t(e);if(l!=null&&l!=="")return l}const n=hn(e);return zi(n)||Hi()})(ke.value||"",ht))),oi=k(()=>{const e={};e["--markstream-code-layout-character-width"]=nn.value==null?"1ch":`${nn.value}px`;const t=o=>{if(o!=null)return typeof o=="number"?`${o}px`:String(o)},n=t(r.minWidth),l=t(r.maxWidth);if(n&&(e.minWidth=n),l&&(e.maxWidth=l),Fl.value&&!m.value&&!xe.value){const o=Go.value;o!=null&&(e.minHeight=`${o}px`)}return m.value||(e.color="var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))",e.backgroundColor="var(--vscode-editor-background, var(--markstream-code-fallback-bg))",e.borderColor="var(--markstream-code-border-color)"),e}),ii=k(()=>r.showTooltips!==!1);function ri(){return q(this,null,function*(){try{typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(r.node.code)),yt.value=!0,E("copy",r.node.code),setTimeout(()=>{yt.value=!1},1e3)}catch(e){console.error("复制失败:",e)}})}function ai(){Fe.value=!Fe.value;const e=m.value?U():se(),t=f.value;e&&t&&(Fe.value?(pn(!0),t.style.maxHeight="none",t.style.overflow="visible",le(!0)):(pn(!1),t.style.overflow=m.value?"hidden":"auto",le(!0)),ll(t))}function ui(){var e,t;if(xe.value=!xe.value,xe.value){if(f.value){const n=Math.ceil(((t=(e=f.value).getBoundingClientRect)==null?void 0:t.call(e).height)||0);n>0&&(Qe.value=n)}pn(!1)}else Fe.value&&pn(!0),f.value&&Qe.value!=null&&(f.value.style.height=`${Qe.value}px`),Cn=2,j(()=>{xe.value||B||(le(!0),ee(!0))})}function si(){if(!ol.value)return;const e=ke.value;if(Gt.value){const t=e==="html"?"text/html":"image/svg+xml",n=e==="html"?Y("artifacts.htmlPreviewTitle")||"HTML Preview":Y("artifacts.svgPreviewTitle")||"SVG Preview";return void E("previewCode",{node:r.node,artifactType:t,artifactTitle:n,id:`temp-${e}-${Date.now()}`})}e==="html"&&(en.value=!en.value)}function pn(e){var t,n;try{if(m.value){const l=U();(t=l?.updateOptions)==null||t.call(l,{automaticLayout:e})}else{const l=se();(n=l?.updateOptions)==null||n.call(l,{automaticLayout:e})}}catch{}}function di(e){return q(this,null,function*(){var t;if(!ue||B)return;const n=$t.value;if(Tn=!1,me.value=!1,et.value=null,Se.value=!1,D.value=!1,Ot.value=!1,Sn=null,An.value=null,tn.value=null,nn.value=null,(function(){const a=(function(){var c;const s=(c=f.value)==null?void 0:c.parentElement;return s instanceof HTMLElement?s:null})();a&&(a.style.removeProperty("--stream-monaco-line-number-left"),a.style.removeProperty("--stream-monaco-line-number-width"),a.style.removeProperty("--stream-monaco-line-number-gap-to-code"),a.style.removeProperty("--stream-monaco-original-line-number-gap-to-code"),a.style.removeProperty("--stream-monaco-modified-line-number-gap-to-code"),a.style.removeProperty("--stream-monaco-original-scrollable-left"),a.style.removeProperty("--stream-monaco-modified-scrollable-left"))})(),Gl(),(function(){Zt.value=!1;const a=Ml.value;Wn.value=W.value||a==null?null:a})(),ot(),Re(),(function(a){a.replaceChildren()})(e),at(),B)return;const l=q(null,null,function*(){var a,c;if(n==="diff"){(function(){if(Ln||typeof window>"u")return;Ln=!0;const v=p=>{var y;Lt("reason"in p?p.reason:(y=p.error)!=null?y:p.message)&&(p.preventDefault(),p.stopImmediatePropagation())};window.addEventListener("error",v,!0),window.addEventListener("unhandledrejection",v,!0),Xt=()=>{window.removeEventListener("error",v,!0),window.removeEventListener("unhandledrejection",v,!0),Ln=!1,Xt=null}})(),Xe();const s=Pt(String((a=r.node.originalCode)!=null?a:""),String((c=r.node.updatedCode)!=null?c:""));Yt?yield gt(()=>Yt(e,s.original,s.updated,Ee.value)):yield gt(()=>ue(e,r.node.code,Ee.value))}else yield gt(()=>ue(e,Te.value,Ee.value));Se.value=!0}),o=l.finally(()=>{Et===o&&(Et=null)});if(Et=o,yield(function(a){return q(this,null,function*(){if(!m.value)return void(yield a);let c,s=!1;for(a.then(()=>{s=!0},v=>{s=!0,c=v});;){if(B)return;if(s){if(c)throw c;return}if(cn()&&ei())return;yield j(),yield Pe()}})})(o),B||$t.value!==n)return;Se.value=!0;const i=n==="diff"?U():se();if(typeof((t=r.monacoOptions)==null?void 0:t.fontSize)=="number")i?.updateOptions({fontSize:r.monacoOptions.fontSize,automaticLayout:!1}),pe.value=r.monacoOptions.fontSize,_.value=r.monacoOptions.fontSize;else if(!Ul()){const a=In();a&&a>0?(pe.value=a,_.value=a):(pe.value=12,_.value=12)}Nt(),yield co(),Fe.value||xe.value||le(!1),W.value=!0,wl.value=n,(function(){var a,c,s,v,p;if(ot(),m.value){const h=U(),g=(a=h?.getOriginalEditor)==null?void 0:a.call(h),X=(c=h?.getModifiedEditor)==null?void 0:c.call(h),ce=(C,S)=>{try{const F=C?.[S];if(typeof F!="function")return;const P=F.call(C,()=>de());P&&ze.push(P)}catch{}};try{const C=(s=h?.onDidUpdateDiff)==null?void 0:s.call(h,()=>{de(),fe(()=>lt())});C&&ze.push(C)}catch{}ce(g,"onDidContentSizeChange"),ce(X,"onDidContentSizeChange");const L=f.value;if(L&&typeof MutationObserver<"u"){const C=[".view-line",".view-lines",".view-zones",".margin-view-zones",".diff-hidden-lines",".stream-monaco-diff-unchanged-bridge",".stream-monaco-fallback-inline-delete-zone",".stream-monaco-fallback-inline-delete-margin"].join(","),S=T=>{var R;const A=T instanceof HTMLElement?T:T.parentElement;return!!((R=A?.closest)!=null&&R.call(A,C))},F=T=>{var R,A;const H=T instanceof HTMLElement?T:T.parentElement;return!!((R=H?.closest)!=null&&R.call(H,C)||(A=H?.querySelector)!=null&&A.call(H,C))},P=new MutationObserver(T=>{m.value&&Xl(L)&&T.some(R=>S(R.target)||Array.from(R.addedNodes).some(F)||Array.from(R.removedNodes).some(S))&&(he(),le({preferModelDiffHeight:!0}),ee(),it())});P.observe(L,{attributeFilter:["class"],attributes:!0,childList:!0,characterData:!0,subtree:!0}),ze.push({dispose:()=>P.disconnect()})}if(L){const C=S=>{const F=S.target instanceof Element?S.target:null;if(!F?.closest([".stream-monaco-unchanged-summary",".stream-monaco-unchanged-reveal",".stream-monaco-unchanged-expand",".markstream-inline-fold-proxy",".diff-hidden-lines .center"].join(",")))return;const P=Math.ceil(L.getBoundingClientRect().height||0);P>0&&(ve.value=P)};L.addEventListener("click",C,!0),ze.push({dispose:()=>L.removeEventListener("click",C,!0)})}if(L&&typeof ResizeObserver<"u"){const C=new ResizeObserver(()=>{if(!m.value||(ee(),!Xl(L)))return;const S=Qn(L);if(S==null)return;const F=Math.ceil(L.getBoundingClientRect().height||0),P=ve.value;if(Ht(L)&&P!=null){if(F>P+1)ve.value=F;else if(F<P-1)return De(L,P,Ct()),void ee()}F<=S+1||(he(),le({preferModelDiffHeight:!0}),ee())});C.observe(L),ze.push({dispose:()=>C.disconnect()})}return}const y=se();try{const h=(v=y?.onDidContentSizeChange)==null?void 0:v.call(y,()=>de());h&&ze.push(h)}catch{}try{const h=(p=y?.onDidLayoutChange)==null?void 0:p.call(y,()=>de());h&&ze.push(h)}catch{}})(),Zn(),Nt(),he(),lt(),de(),yield j();let d=null;Ke&&(d=yield Ke(),d&&(yield j(),yield Pe()));const u=d??(n==="diff"?yield Kl({requireHighlight:!0}):yield(function(){return q(this,null,function*(){if($e())return yield j(),yield Pe(),$e();for(let a=0;a<30;a++){if(B||m.value)return!1;const c=f.value,s=Yl(),v=Jl(c),p=!Te.value.trim()||Vn(c);if(s&&v&&p&&(yield j(),yield Pe(),!B&&!m.value&&Yl()&&Jl(f.value)&&(!Te.value.trim()||Vn(f.value))))return!0;yield j(),yield Pe()}return!1})})());B||(u?(Nt(),un(),(yield Ll())||je()):je())})}function Ae(e,t={}){if(!ue||B||r.stream===!1&&r.loading!==!1||(al(),po())||ge.value||f.value!==e||fn())return null;if(Oe)return Oe;if(Q.value&&W.value)return Promise.resolve();const n=rl(),l=Hn.value;let o=!1;Q.value=!0,(function(){const d=Ve.value;ie&&d&&qe!==d&&(qe&&ie.markSettled(qe),qe=d,ie.markPending(d))})();const i=q(null,null,function*(){try{yield di(e),zt=null}catch(d){const u=rl(),a=l!==Hn.value,c=t.allowStaleContentRetry!==!1&&a&&zt!==u;if(n!==u||c)return c&&(zt=u),o=!0,Q.value=!1,W.value=!1,Se.value=!1,void(D.value=!1);throw je(n),d}}).finally(()=>{Oe===i&&(Oe=null),(function(){const d=qe;ie&&d&&(qe="",j(()=>{var u,a;if(!B){const c=(a=(u=O.value)==null?void 0:u.offsetHeight)!=null?a:0;c>0&&ie.reportHeight(d,c)}ie.markSettled(d)}))})(),o&&!B&&queueMicrotask(()=>{var d;const u=f.value;u&&!B&&((d=Ae(u))==null||d.catch(a=>{W.value=!1,D.value=!1,je()}))})});return Oe=i,i}ae(ii,e=>{e||vt()}),ae(()=>_.value,(e,t)=>{const n=m.value?U():se();n&&typeof e=="number"&&Number.isFinite(e)&&e>0&&(n.updateOptions({fontSize:e}),xe.value||le(!0))},{flush:"post",immediate:!1});let ao=0;const ci=ae(()=>[f.value,m.value,r.stream,r.loading,wt.value,Z.value,r.node.language,r.node.raw,r.node.code,r.node.loading],e=>q(null,[e],function*([t,n,l,o,i,d]){const u=++ao;if(!t||!d||Ie()||tt||l===!1&&o!==!1||!ue&&(yield(function(){return q(this,null,function*(){if(typeof window>"u"||B||wt.value||ge.value)return;if(Ft)return Ft;const c=q(null,null,function*(){try{const s=yield Wi();if(B)return;if(!s)return void(ge.value=!0);const v=s.useMonaco,p=s.detectLanguage;if(typeof p=="function"&&(pl=p),typeof v!="function")return;He=fo();const y=v(He);ue=y.createEditor||ue,Yt=y.createDiffEditor||Yt,Bn=y.updateCode||Bn,Qt=y.updateDiff||Qt,kt=y.getEditor||kt,se=y.getEditorView||se,U=y.getDiffEditorView||U,En=y.cleanupEditor||En,Xe=y.safeClean||y.cleanupEditor||Xe,Fn=y.refreshDiffPresentation||Fn,Pn=y.setTheme||Pn,Ke=y.whenVisualReady||null,wt.value=!0}catch{if(B)return;ge.value=!0}}).finally(()=>{Ft===c&&(Ft=null)});return Ft=c,c})})(),u!==ao||r.stream===!1&&r.loading!==!1||fn()||!Z.value||!ue||ge.value||Q.value||po()||B||f.value!==t)||fn())return;const a=Ae(t);if(a){try{yield a}catch{W.value=!1,D.value=!1,je()}W.value&&D.value&&ci()}}));function uo(e){return!!e&&typeof e=="object"&&"light"in e&&"dark"in e}function rt(e){return typeof e=="string"?e:e&&typeof e=="object"&&"name"in e?String(e.name):null}function so(e,t){if(e===t)return!0;const n=rt(e),l=rt(t);return!!n&&n===l}function Tt(){var e;const t=(function(){if(r.theme!==void 0){const a=r.theme;return uo(a)?r.isDark?a.dark:a.light:a}return r.isDark?r.darkTheme:r.lightTheme})(),n=(e=re.value)==null?void 0:e.theme,l=t??n;if(l!=null&&typeof l=="object")return l;const o=Array.isArray(r.themes)?r.themes:[];if(!o.length||l==null)return l;const i=rt(l),d=o.map(a=>rt(a)).filter(a=>!!a);if(!i||d.includes(i))return l;const u=rt(n);return n!=null&&u&&d.includes(u)?n:o[0]}function co(){return q(this,arguments,function*(e={}){at();const t=()=>{m.value&&xt(),fe(()=>{Zn(),de()})};if(e.appearanceOnly)return void t();const n=Tt();if(n)try{yield Pn(n),t()}catch{}else t()})}function Rt(e,t){if(typeof t!="string")return;const n=hn(t),l=So(n),o=["plain","objectivec","objectivecpp"].includes(n)?l:n;for(const i of[o,l])i&&!e.includes(i)&&e.push(i)}ae($t,(e,t)=>q(null,null,function*(){if(e===t||me.value||tt||(no(),!ue||!f.value)||!Q.value||r.stream===!1&&r.loading!==!1||!Z.value)return;const n=Oe;if(n){try{yield n}catch{}if(B||!f.value)return}if(wl.value!==e||!Q.value||!W.value)try{W.value=!1,D.value=!1,Q.value=!1,Se.value=!1,ot(),Re(),Xe(),yield j(),yield Ae(f.value)}catch{W.value=!1,D.value=!1,je()}}));const fi=k(()=>{var e;const t=[],n=(e=re.value)==null?void 0:e.languages;if(Array.isArray(n))for(const l of n)Rt(t,l);return eo()&&Rt(t,r.node.language),Rt(t,ke.value),Rt(t,Ee.value),Rt(t,"plaintext"),t});function fo(){const e=Ce(I(Ce(I({wordWrap:"on",wrappingIndent:"same",themes:r.themes},re.value||{}),{languages:fi.value,stream:!1,fontSize:ln.value,lineHeight:on.value,theme:Tt(),disableFileHeader:!0}),m.value?{diffAppearance:zn.value}:{}),{onThemeChange(){Zn()}}),t=(function(){var n;const l=(n=re.value)==null?void 0:n.fontFamily;return typeof l=="string"&&l.trim()?l.trim():m.value?(function(){var o;if(typeof window>"u")return;const i=(o=O.value)==null?void 0:o.querySelector("pre.code-pre-fallback");if(i)return window.getComputedStyle(i).fontFamily.trim()||void 0})():void 0})();if(t&&(e.fontFamily!=null||(e.fontFamily=t)),m.value){e.wordWrap=Rn.value?"on":"off";const n=typeof e.unsafeCSS=="string"?`${e.unsafeCSS}
|
|
23
|
+
`:"",l=(function(){var o,i;const d=Dn.value;if(d===!1||typeof d=="object"&&d.enabled===!1)return null;const u=typeof d=="object"?d:jt,a=Math.max(0,Math.floor((o=u.contextLineCount)!=null?o:2));return{contextLineCount:a,collapsedContextThreshold:a+Math.max(1,Math.floor((i=u.minimumLineCount)!=null?i:4))-1}})();e.unsafeCSS=`${n}
|
|
24
|
+
pre { column-gap: 0; }
|
|
25
|
+
pre > code { column-gap: 0; padding-block: 0; }
|
|
26
|
+
[data-separator="line-info"] { margin-top: 0; }
|
|
27
|
+
`,l?(e.parseDiffOptions=Ce(I({},e.parseDiffOptions),{context:l.contextLineCount}),e.collapsedContextThreshold=l.collapsedContextThreshold,e.expandUnchanged=!1,e.hunkSeparators="line-info",e.unsafeCSS+=`[data-separator="line-info"][data-separator-last] { height: 28px; }
|
|
28
|
+
`):(e.expandUnchanged=!0,e.hunkSeparators="simple")}return e}function at(){const e=fo();if(!He)return He=e,He;for(const t of Object.keys(He))t in e||delete He[t];return Object.assign(He,e),He}const vo=k(()=>{var e,t,n,l,o,i,d,u,a,c,s,v,p,y,h;return JSON.stringify({diffLineStyle:(t=(e=re.value)==null?void 0:e.diffLineStyle)!=null?t:"background",diffUnchangedRegionStyle:(l=(n=re.value)==null?void 0:n.diffUnchangedRegionStyle)!=null?l:"line-info",diffHideUnchangedRegions:((o=r.monacoOptions)==null?void 0:o.diffHideUnchangedRegions)===void 0?I({},jt):gn(r.monacoOptions.diffHideUnchangedRegions),renderSideBySide:(d=(i=re.value)==null?void 0:i.renderSideBySide)==null||d,useInlineViewWhenSpaceIsLimited:(a=(u=re.value)==null?void 0:u.useInlineViewWhenSpaceIsLimited)!=null&&a,enableSplitViewResizing:(s=(c=re.value)==null?void 0:c.enableSplitViewResizing)==null||s,ignoreTrimWhitespace:(p=(v=re.value)==null?void 0:v.ignoreTrimWhitespace)==null||p,originalEditable:(h=(y=re.value)==null?void 0:y.originalEditable)!=null&&h})}),mo=$(0);function rl(){var e;const t=Tt();return JSON.stringify({kind:$t.value,language:Ee.value,structural:vo.value,optionsRevision:mo.value,settledContentGeneration:bl.value,theme:(e=rt(t))!=null?e:t==null?null:"custom",isDark:r.isDark})}ae(()=>[r.monacoOptions,r.theme,r.themes,r.lightTheme,r.darkTheme],()=>{mo.value+=1},{deep:!0}),ae(()=>[Te.value,r.node.originalCode,r.node.updatedCode],()=>{Hn.value+=1,Ie()||(bl.value+=1)});const ut=k(()=>rl());function al(){me.value&&et.value!==ut.value&&(me.value=!1,et.value=null,zt=null,Nn=null,Q.value=!1,W.value=!1,Se.value=!1,D.value=!1,Ot.value=!1)}function po(){return al(),me.value&&et.value===ut.value}function je(e=ut.value){et.value=e,me.value=!0,Ot.value=!1}return ae(ut,()=>q(null,null,function*(){if(tt||!me.value||et.value===ut.value||!ue||!f.value||ge.value||B||!Z.value||r.stream===!1&&r.loading!==!1||fn())return;const e=ut.value;tt=!0;try{if(al(),me.value)return;yield Ae(f.value)}catch{W.value=!1,D.value=!1,je()}finally{Nn=e,yield j(),tt=!1}})),ae(()=>[r.monacoOptions,Z.value],()=>{var e,t;if(at(),!ue||!Z.value)return;const n=m.value?U():se(),l=typeof((e=r.monacoOptions)==null?void 0:e.fontSize)=="number"?r.monacoOptions.fontSize:Number.isFinite(_.value)?_.value:void 0;typeof l=="number"&&Number.isFinite(l)&&l>0&&((t=n?.updateOptions)==null||t.call(n,{fontSize:l})),le(!1)},{deep:!0}),ae(()=>[Tt(),zn.value,wt.value,Q.value,Z.value],([e],t)=>{wt.value&&W.value&&Z.value&&co({appearanceOnly:t!=null&&so(e,t[0])})},{flush:"post"}),ae(()=>[vo.value,wt.value,Z.value],(e,t)=>q(null,[e,t],function*([n,l,o],[i]){if(at(),!l||!o||!ue||!f.value||!Q.value||n===i||r.stream===!1&&r.loading!==!1)return;const d=Oe;if(d){try{yield d}catch{}if(B||!f.value)return}try{W.value=!1,D.value=!1,Q.value=!1,Se.value=!1,ot(),Re(),Xe(),yield j(),yield Ae(f.value,{allowStaleContentRetry:!1})}catch{W.value=!1,D.value=!1,je()}}),{flush:"post"}),ae(()=>[r.loading,Z.value],(e,t)=>q(null,[e,t],function*([n,l],o){if(!l)return;const i=o?.[0];if(i===!1&&n!==!1&&m.value&&Q.value&&(yield j(),fe(()=>{q(null,null,function*(){const u=Oe;if(u)try{yield u}catch{}!B&&m.value&&r.loading!==!1&&(at(),xt(),de())})})),n)return;const d=i!==void 0&&i!==!1;yield j(),fe(()=>{q(null,null,function*(){var u,a;try{if(d&&(yield(function(){return q(this,null,function*(){if(!me.value||!ue||!f.value||ge.value||B||!Z.value)return!1;if(Nn===ut.value)return!0;tt=!0;try{me.value=!1,et.value=null,zt=null,Q.value=!1,W.value=!1,Se.value=!1,D.value=!1,ot(),Re(),Xe(),yield j();try{yield Ae(f.value)}catch{W.value=!1,D.value=!1,je()}}finally{yield j(),tt=!1}return!0})})()))return void le(!1);if(d&&m.value&&Q.value&&Tn&&f.value)return Tn=!1,W.value=!1,D.value=!1,Q.value=!1,Se.value=!1,ot(),Re(),Xe(),yield j(),yield Ae(f.value,{allowStaleContentRetry:!1}),void it(!0);if(d&&Q.value)if(m.value&&f.value){const c=Oe;if(c)try{yield c}catch{}at();const s=Pt(String((u=r.node.originalCode)!=null?u:""),String((a=r.node.updatedCode)!=null?a:""));if(yield Zl(s.original,s.updated,Ee.value),B||!m.value)return;xt(),ee(!0),Pl(),he(),lt();const v=yield Kl({requireHighlight:!0});B||!v||D.value||(yield Ll()),de(),it(!0)}else no(),oo(Te.value,Ee.value);d&&m.value?(le({preferModelDiffHeight:!0,holdCurrentDiffHeight:!0}),it(!0)):le(!1)}catch{}})})}),{immediate:!0,flush:"post"}),Oo(()=>{ot(),Re(),En(),Xt?.()}),(e,t)=>ge.value?(G(),bn(V(xo),{key:0,class:mt(["code-pre-fallback",{"is-wrap":Rn.value}]),style:It(El.value),node:Sl.value,loading:r.loading,"show-line-numbers":!0,"diff-inline":_e.value,"diff-hide-unchanged-regions":Dn.value},null,8,["class","style","node","loading","diff-inline","diff-hide-unchanged-regions"])):(G(),oe("div",{key:1,ref_key:"container",ref:O,style:It(oi.value),class:mt(["code-block-container rounded-lg border",[{dark:r.isDark,"is-rendering":r.loading,"is-dark":yl.value,"is-diff":m.value,"is-plain-text":xn.value}]]),"data-markstream-code-block":"1","data-markstream-enhanced":D.value&&!ge.value?"true":"false","data-markstream-enhancement-state":Wo.value,"data-markstream-code-block-state":Ie()?"streaming":"settled","data-markstream-pending":qo.value?"true":void 0,"data-markstream-viewport-pending":ml.value&&V(Mn)&&!Z.value?"true":void 0},[zo(fr,{"show-header":r.showHeader,"show-collapse-button":r.showCollapseButton,"show-font-size-buttons":r.showFontSizeButtons,"enable-font-size-control":r.enableFontSizeControl,"show-copy-button":r.showCopyButton,"show-expand-button":r.showExpandButton,"show-preview-button":r.showPreviewButton,"show-tooltips":r.showTooltips,"is-dark":r.isDark,loading:r.loading,stream:x.stream,"is-collapsed":xe.value,"is-expanded":Fe.value,"copy-text":yt.value,"is-previewable":ol.value,"code-font-size":_.value,"code-font-min":10,"code-font-max":36,"default-code-font-size":pe.value,"font-baseline-ready":_o.value,"diff-stats":m.value?Ze.value:null,"diff-stats-aria-label":Do.value,onToggleCollapse:ui,onDecreaseFont:Ko,onResetFont:Zo,onIncreaseFont:Xo,onCopy:ri,onToggleExpand:ai,onPreview:si},Fi({"header-left":Ut(()=>[pt(e.$slots,"header-left",{},()=>[b("div",wr,[b("span",{class:"icon-slot h-4 w-4 flex-shrink-0",innerHTML:li.value},null,8,br),b("div",kr,[b("div",xr,Me(ni.value),1),ro.value?(G(),oe("div",Sr,Me(ro.value),1)):ye("",!0)])])],!0)]),loading:Ut(()=>[pt(e.$slots,"loading",{loading:x.loading,stream:x.stream},()=>[t[0]||(t[0]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))],!0)]),default:Ut(()=>[sl(b("div",{class:mt(["code-editor-layer",{"code-editor-layer--collapsed":xe.value}])},[b("div",{ref_key:"codeEditor",ref:f,class:mt(["code-editor-container",x.stream?"":"code-height-placeholder"]),"data-markstream-host-hidden":jo.value?"true":void 0,style:It(Jo.value)},null,14,Cr),xl.value?(G(),bn(V(xo),{key:0,class:mt(["code-pre-fallback",{"is-wrap":Rn.value}]),style:It(El.value),node:Sl.value,"show-line-numbers":!0,"diff-inline":_e.value,"diff-hide-unchanged-regions":Dn.value},null,8,["class","style","node","diff-inline","diff-hide-unchanged-regions"])):ye("",!0)],2),[[dl,!!x.stream||!x.loading]]),en.value&&!Gt.value&&ol.value&&ke.value==="html"?(G(),bn(gr,{key:0,code:r.node.code,"html-preview-allow-scripts":r.htmlPreviewAllowScripts,"html-preview-sandbox":r.htmlPreviewSandbox,"is-dark":r.isDark,"on-close":()=>en.value=!1},null,8,["code","html-preview-allow-scripts","html-preview-sandbox","is-dark","on-close"])):ye("",!0)]),_:2},[e.$slots["header-right"]?{name:"header-right",fn:Ut(()=>[pt(e.$slots,"header-right",{},void 0,!0)]),key:"0"}:void 0]),1032,["show-header","show-collapse-button","show-font-size-buttons","enable-font-size-control","show-copy-button","show-expand-button","show-preview-button","show-tooltips","is-dark","loading","stream","is-collapsed","is-expanded","copy-text","is-previewable","code-font-size","default-code-font-size","font-baseline-ready","diff-stats","diff-stats-aria-label"])],14,yr))}}),[["__scopeId","data-v-a7a1abdd"]]);export{Er as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{M as w,aD as y,aI as x,aL as t,u as d,v as e,G as s,H as i,F as r,aX as u,bb as g,I as k,cu as C,bk as z,cv as q,cw as S}from"./index-DtRfJ0vw.js";const T={class:"ds-page"},B={class:"layout"},A={class:"content"},I={class:"content-inner"},M={id:"tokens"},H={class:"icon-sizes"},L={class:"sz"},V={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},D={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},W={class:"sz"},P={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},R={class:"icon-grid"},N={class:"icon-group-label"},K={class:"ic-name"},O={id:"primitives"},j={class:"stage-wrap"},E={class:"stage p col"},F={class:"demo-row"},_={class:"p-btn primary disabled"},G={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},J={class:"stage-wrap"},Q={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},Y={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},X={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},Z={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},$={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},aa={id:"chat"},ea={class:"stage-wrap"},ta={class:"stage p col",style:{"align-items":"center",background:"#fff"}},da={class:"demo-chat"},sa={class:"p-action"},oa={class:"p-action-head"},ia={class:"p-ic",style:{color:"var(--p-accent)"},viewBox:"0 0 24 24",fill:"currentColor"},la={class:"p-action warn"},na={class:"p-action-head"},va={class:"p-ic",style:{color:"var(--p-warning)"},viewBox:"0 0 24 24",fill:"currentColor"},ca=w({__name:"DesignSystemView",emits:["close"],setup(ra,{emit:m}){const f=m;function b(){f("close")}let c=null;function p(v){v.key==="Escape"&&b()}return y(()=>{document.addEventListener("keydown",p);const v=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;v.forEach(n=>{const o=n.getAttribute("href");if(!o)return;const h=document.getElementById(o.slice(1));h&&a.set(h,n)});let l=null;c=new IntersectionObserver(n=>{n.forEach(o=>{o.isIntersecting&&(l&&l.classList.remove("active"),l=a.get(o.target)??null,l&&l.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((n,o)=>c.observe(o)),v.length&&v[0].classList.add("active")}),x(()=>{document.removeEventListener("keydown",p),c&&(c.disconnect(),c=null)}),(v,a)=>(t(),d("div",T,[e("div",{class:"ds-topbar"},[e("button",{class:"ds-back",type:"button",onClick:b},"← Back"),a[0]||(a[0]=e("span",{class:"ds-topbar-title"},"Design system",-1))]),e("div",B,[a[38]||(a[38]=s('<aside class="sidebar" data-v-b86e59ea><div class="brand" data-v-b86e59ea><div class="brand-mark" data-v-b86e59ea>K</div><div class="brand-name" data-v-b86e59ea>Kimi Web</div></div><div class="brand-sub" data-v-b86e59ea>Design System · v1.0</div><div class="nav-group" data-v-b86e59ea>Navigate</div><nav class="nav" id="nav" data-v-b86e59ea><a href="#overview" data-v-b86e59ea><span class="num" data-v-b86e59ea>00</span>Overview</a><a href="#principles" data-v-b86e59ea><span class="num" data-v-b86e59ea>01</span>Design Principles</a><a href="#tokens" data-v-b86e59ea><span class="num" data-v-b86e59ea>02</span>Design Tokens</a><a href="#primitives" data-v-b86e59ea><span class="num" data-v-b86e59ea>03</span>Primitives</a><a href="#chat" data-v-b86e59ea><span class="num" data-v-b86e59ea>04</span>Chat Interface</a><a href="#themes" data-v-b86e59ea><span class="num" data-v-b86e59ea>05</span>Theming</a><a href="#rules" data-v-b86e59ea><span class="num" data-v-b86e59ea>06</span>Style Rules</a><a href="#shell" data-v-b86e59ea><span class="num" data-v-b86e59ea>07</span>App Shell & Sidebar</a><a href="#a11y" data-v-b86e59ea><span class="num" data-v-b86e59ea>08</span>Accessibility</a></nav><div class="nav-group" data-v-b86e59ea>Companion output</div><nav class="nav" data-v-b86e59ea><a href="#tokens" data-v-b86e59ea><span class="num" data-v-b86e59ea>↗</span>Token list</a><a href="#primitives" data-v-b86e59ea><span class="num" data-v-b86e59ea>↗</span>Component API</a><a href="#rules" data-v-b86e59ea><span class="num" data-v-b86e59ea>↗</span>Style rules</a></nav></aside>',1)),e("main",A,[e("div",I,[a[36]||(a[36]=s('<section id="overview" data-v-b86e59ea><div class="hero" data-v-b86e59ea><span class="eyebrow" data-v-b86e59ea>● Design System · v1.0</span><h1 data-v-b86e59ea>Kimi Web <span class="grad" data-v-b86e59ea>Design System</span></h1><p class="lead" data-v-b86e59ea> This document defines the visual language and component specification for Kimi Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable. </p><div class="hero-meta" data-v-b86e59ea><span class="meta-chip" data-v-b86e59ea><span class="dot" data-v-b86e59ea></span> Scope <b data-v-b86e59ea>apps/kimi-web</b></span><span class="meta-chip" data-v-b86e59ea>Component primitives</span><span class="meta-chip" data-v-b86e59ea>Theme <b data-v-b86e59ea>1 set · 4 customizable colors</b></span><span class="meta-chip" data-v-b86e59ea>Light / dark mode</span></div></div><div class="callout info" data-v-b86e59ea><span class="ico" data-v-b86e59ea>i</span><div data-v-b86e59ea><b data-v-b86e59ea>This spec is the single reference when changing the web UI.</b> Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed. </div></div></section><section id="principles" data-v-b86e59ea><div class="sec-head" data-v-b86e59ea><span class="sec-num" data-v-b86e59ea>01</span><h2 class="sec-title" data-v-b86e59ea>Design Principles</h2></div><p class="sec-desc" data-v-b86e59ea> Every UI decision traces back to the following principles. Kimi Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first. </p><ul class="clean check" data-v-b86e59ea><li data-v-b86e59ea><b data-v-b86e59ea>Consistency</b> —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.</li><li data-v-b86e59ea><b data-v-b86e59ea>Hierarchy</b> —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".</li><li data-v-b86e59ea><b data-v-b86e59ea>Proximity</b> —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.</li><li data-v-b86e59ea><b data-v-b86e59ea>Feedback</b> —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.</li><li data-v-b86e59ea><b data-v-b86e59ea>Breathing room</b> —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.</li><li data-v-b86e59ea><b data-v-b86e59ea>Accessibility (A11y)</b> —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.</li><li data-v-b86e59ea><b data-v-b86e59ea>Reduction</b> —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.</li></ul><div class="callout good" data-v-b86e59ea><span class="ico" data-v-b86e59ea>✓</span><div data-v-b86e59ea><b data-v-b86e59ea>Brand tone (the do-not list)</b>: calm, clinical, never exaggerated. <span class="pill red" style="margin:0 4px;" data-v-b86e59ea>Reject</span> purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons — <b data-v-b86e59ea>the moon phases 🌑…🌘 are the sole exception</b>, used only in the "waiting for the Agent to respond" chat state, as a brand signature. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided. </div></div><div class="callout info" data-v-b86e59ea><span class="ico" data-v-b86e59ea>i</span><div data-v-b86e59ea><b data-v-b86e59ea>Declare design intent first (Design Read)</b>: before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style. </div></div></section>',2)),e("section",M,[a[7]||(a[7]=s(`<div class="sec-head" data-v-b86e59ea><span class="sec-num" data-v-b86e59ea>02</span><h2 class="sec-title" data-v-b86e59ea>Design Tokens</h2></div><p class="sec-desc" data-v-b86e59ea> Collapse every visual decision into tokens. <b data-v-b86e59ea>Color tokens keep the existing short names and fill out the semantics</b> (lowering migration cost), while <b data-v-b86e59ea>spacing, z-index, motion, and font-weight</b> fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage. </p><div class="callout info" data-v-b86e59ea><span class="ico" data-v-b86e59ea>i</span><div data-v-b86e59ea><b data-v-b86e59ea>Naming convention</b>: <code data-v-b86e59ea>--<category>-<role>-<state></code>. For example <code data-v-b86e59ea>--color-text-muted</code>, <code data-v-b86e59ea>--radius-md</code>, <code data-v-b86e59ea>--space-4</code>. To reduce churn, the existing short names (<code data-v-b86e59ea>--bg</code> / <code data-v-b86e59ea>--ink</code> / <code data-v-b86e59ea>--line</code> / <code data-v-b86e59ea>--blue</code> …) are kept as <b data-v-b86e59ea>compatibility aliases</b> for one release cycle. </div></div><h3 class="sub" data-v-b86e59ea>Color</h3><p data-v-b86e59ea>Semantic-first, in three layers: <b data-v-b86e59ea>background / text / border</b> + <b data-v-b86e59ea>accent</b> + <b data-v-b86e59ea>status colors</b>. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.</p><div class="callout info" data-v-b86e59ea><span class="ico" data-v-b86e59ea>i</span><div data-v-b86e59ea>The table below shows the <b data-v-b86e59ea>derived semantic tokens</b>. The <b data-v-b86e59ea>neutrals and the accent</b> are derived from the 4 color seeds in §05 — for example <code data-v-b86e59ea>--color-accent</code> comes from <code data-v-b86e59ea>--accent-primary</code>, and <code data-v-b86e59ea>--color-bg</code> comes from the current light / dark surface. The <b data-v-b86e59ea>semantic status colors</b> (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.</div></div><div class="palette" data-v-b86e59ea><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#ffffff;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>bg</div><div class="cv" data-v-b86e59ea>#ffffff / #0d1117</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#fafbfc;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>surface</div><div class="cv" data-v-b86e59ea>#fafbfc / #161b22</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#f3f5f8;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>surface-sunken</div><div class="cv" data-v-b86e59ea>#f3f5f8 / #0d1117</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#eceff3;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>selected</div><div class="cv" data-v-b86e59ea>#eceff3 / #2d333b</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#14171c;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>fg</div><div class="cv" data-v-b86e59ea>#14171c / #e8eaed</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#6b7280;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>fg-muted</div><div class="cv" data-v-b86e59ea>#6b7280 / #9aa0a8</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#e7eaee;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>line</div><div class="cv" data-v-b86e59ea>#e7eaee / #2d333b</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#1783ff;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>accent (KMBlue)</div><div class="cv" data-v-b86e59ea>#1783ff / #58a6ff</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#e8f3ff;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>accent-soft</div><div class="cv" data-v-b86e59ea>#e8f3ff / rgba(88,166,255,.14)</div></div></div></div><table class="dt" data-v-b86e59ea><thead data-v-b86e59ea><tr data-v-b86e59ea><th data-v-b86e59ea>Token</th><th data-v-b86e59ea>Light</th><th data-v-b86e59ea>Dark</th><th data-v-b86e59ea>Usage</th></tr></thead><tbody data-v-b86e59ea><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-bg</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#fff;" data-v-b86e59ea></span>#ffffff</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#0d1117;" data-v-b86e59ea></span>#0d1117</td><td data-v-b86e59ea>Page background</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-surface</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#fafbfc;" data-v-b86e59ea></span>#fafbfc</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#161b22;" data-v-b86e59ea></span>#161b22</td><td data-v-b86e59ea>Panel / sidebar / card head</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-surface-raised</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#fff;" data-v-b86e59ea></span>#ffffff</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#1c2128;" data-v-b86e59ea></span>#1c2128</td><td data-v-b86e59ea>Raised card / dialog / input</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-text</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#14171c;" data-v-b86e59ea></span>#14171c</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#e8eaed;" data-v-b86e59ea></span>#e8eaed</td><td data-v-b86e59ea>Body text / headings</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-text-muted</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#6b7280;" data-v-b86e59ea></span>#6b7280</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#9aa0a8;" data-v-b86e59ea></span>#9aa0a8</td><td data-v-b86e59ea>Secondary text / placeholder</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-line</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#e7eaee;" data-v-b86e59ea></span>#e7eaee</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#2d333b;" data-v-b86e59ea></span>#2d333b</td><td data-v-b86e59ea>Divider / card border</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-selected</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#00000014;" data-v-b86e59ea></span>#00000014</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#ffffff14;" data-v-b86e59ea></span>#ffffff14</td><td data-v-b86e59ea>Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-hover</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#0000000d;" data-v-b86e59ea></span>#0000000d</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#ffffff0d;" data-v-b86e59ea></span>#ffffff0d</td><td data-v-b86e59ea>Row hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-media-alpha-bg-1</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#858585;" data-v-b86e59ea></span>≈#858585</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#676b72;" data-v-b86e59ea></span>≈#676b72</td><td data-v-b86e59ea>Checkerboard square A of the <code data-v-b86e59ea><img></code> alpha canvas — color-mix of <code data-v-b86e59ea>--color-bg</code>/<code data-v-b86e59ea>--color-text</code> (52/48); applied via <code data-v-b86e59ea>--media-alpha-canvas</code> (16px period)</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-media-alpha-bg-2</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#6b6b6b;" data-v-b86e59ea></span>≈#6b6b6b</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#7a7e85;" data-v-b86e59ea></span>≈#7a7e85</td><td data-v-b86e59ea>Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-sidebar-bg</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#fbfaf9;" data-v-b86e59ea></span>#fbfaf9</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#181817;" data-v-b86e59ea></span>#181817</td><td data-v-b86e59ea>Sidebar surface — one step off <code data-v-b86e59ea>--color-bg</code> so the session column reads as its own plane</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-accent</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#1783ff;" data-v-b86e59ea></span>#1783ff</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#58a6ff;" data-v-b86e59ea></span>#58a6ff</td><td data-v-b86e59ea>Primary action / link / focus</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-success</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#0e7a38;" data-v-b86e59ea></span>#0e7a38</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#3fb950;" data-v-b86e59ea></span>#3fb950</td><td data-v-b86e59ea>Success / pass</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-warning</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#a9610a;" data-v-b86e59ea></span>#a9610a</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#d29922;" data-v-b86e59ea></span>#d29922</td><td data-v-b86e59ea>Warning / pending</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-danger</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#c0392b;" data-v-b86e59ea></span>#c0392b</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#f85149;" data-v-b86e59ea></span>#f85149</td><td data-v-b86e59ea>Danger / error / abort</td></tr></tbody></table><h4 class="mini" data-v-b86e59ea>Surface usage</h4><p data-v-b86e59ea>The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating <code data-v-b86e59ea>--p-surface-raised</code> as a universal background.</p><table class="dt" data-v-b86e59ea><thead data-v-b86e59ea><tr data-v-b86e59ea><th data-v-b86e59ea>Token</th><th data-v-b86e59ea>Light</th><th data-v-b86e59ea>Dark</th><th data-v-b86e59ea>Usage</th></tr></thead><tbody data-v-b86e59ea><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--p-surface-raised</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#fff;" data-v-b86e59ea></span>#ffffff</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#1c2128;" data-v-b86e59ea></span>#1c2128</td><td data-v-b86e59ea>Raised card / dialog / input (raised layer)</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--p-surface</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#fafbfc;" data-v-b86e59ea></span>#fafbfc</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#161b22;" data-v-b86e59ea></span>#161b22</td><td data-v-b86e59ea>Panel / sidebar / card head (default flat layer)</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--p-surface-sunken</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#f3f5f8;" data-v-b86e59ea></span>#f3f5f8</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#0d1117;" data-v-b86e59ea></span>#0d1117</td><td data-v-b86e59ea>Code block / inline input / recessed area (sunken layer)</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--p-bg</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#fff;" data-v-b86e59ea></span>#ffffff</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#0d1117;" data-v-b86e59ea></span>#0d1117</td><td data-v-b86e59ea>Page background</td></tr></tbody></table><h4 class="mini" data-v-b86e59ea>Focus ring</h4><p data-v-b86e59ea>All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a <code data-v-b86e59ea>box-shadow</code> focus ring.</p><table class="dt" data-v-b86e59ea><thead data-v-b86e59ea><tr data-v-b86e59ea><th data-v-b86e59ea>Token</th><th data-v-b86e59ea>Value</th><th data-v-b86e59ea>Usage</th></tr></thead><tbody data-v-b86e59ea><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--p-focus-ring</td><td class="val" data-v-b86e59ea>0 0 0 3px var(--p-accent-soft)</td><td data-v-b86e59ea>Default focus ring (link, menu item, switch, checkbox)</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--p-focus-ring-strong</td><td class="val" data-v-b86e59ea>0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)</td><td data-v-b86e59ea>Strong focus ring (button, primary action)</td></tr></tbody></table><h4 class="mini" data-v-b86e59ea>Text selection</h4><p data-v-b86e59ea>The text-selection color uses <code data-v-b86e59ea>--p-selection</code> uniformly (light <code data-v-b86e59ea>rgba(23,131,255,.18)</code> / dark <code data-v-b86e59ea>rgba(88,166,255,.32)</code>), applied by the global <code data-v-b86e59ea>::selection</code> rule; do not set a separate highlight background.</p><h4 class="mini" data-v-b86e59ea>Disabled state</h4><p data-v-b86e59ea>All disabled controls use <code data-v-b86e59ea>opacity:.5</code> + <code data-v-b86e59ea>cursor:not-allowed</code> uniformly; do not separately grey out or recolor.</p><h3 class="sub" data-v-b86e59ea>Font families</h3><p data-v-b86e59ea>Kimi Web uses two font families: <b data-v-b86e59ea>--font-ui</b> (UI and body, Inter first) and <b data-v-b86e59ea>--font-mono</b> (code and monospace). Components always reference the variables; do not hard-code font names.</p><h4 class="mini" data-v-b86e59ea>--font-ui · UI & body (Inter first)</h4><p data-v-b86e59ea>Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:</p><div class="code" data-v-b86e59ea><div class="code-bar" data-v-b86e59ea><span class="d" data-v-b86e59ea></span><span class="d" data-v-b86e59ea></span><span class="d" data-v-b86e59ea></span><span class="fn" data-v-b86e59ea>--font-ui</span></div><pre data-v-b86e59ea>--font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
|
|
1
|
+
import{M as w,aD as y,aI as x,aL as t,u as d,v as e,G as s,H as i,F as r,aX as u,bb as g,I as k,cx as C,bk as z,cy as q,cz as S}from"./index-Nwori_8N.js";const T={class:"ds-page"},B={class:"layout"},A={class:"content"},I={class:"content-inner"},M={id:"tokens"},H={class:"icon-sizes"},L={class:"sz"},V={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},D={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},W={class:"sz"},P={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},R={class:"icon-grid"},N={class:"icon-group-label"},K={class:"ic-name"},O={id:"primitives"},j={class:"stage-wrap"},E={class:"stage p col"},F={class:"demo-row"},_={class:"p-btn primary disabled"},G={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},J={class:"stage-wrap"},Q={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},Y={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},X={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},Z={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},$={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},aa={id:"chat"},ea={class:"stage-wrap"},ta={class:"stage p col",style:{"align-items":"center",background:"#fff"}},da={class:"demo-chat"},sa={class:"p-action"},oa={class:"p-action-head"},ia={class:"p-ic",style:{color:"var(--p-accent)"},viewBox:"0 0 24 24",fill:"currentColor"},la={class:"p-action warn"},na={class:"p-action-head"},va={class:"p-ic",style:{color:"var(--p-warning)"},viewBox:"0 0 24 24",fill:"currentColor"},ca=w({__name:"DesignSystemView",emits:["close"],setup(ra,{emit:m}){const f=m;function b(){f("close")}let c=null;function p(v){v.key==="Escape"&&b()}return y(()=>{document.addEventListener("keydown",p);const v=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;v.forEach(n=>{const o=n.getAttribute("href");if(!o)return;const h=document.getElementById(o.slice(1));h&&a.set(h,n)});let l=null;c=new IntersectionObserver(n=>{n.forEach(o=>{o.isIntersecting&&(l&&l.classList.remove("active"),l=a.get(o.target)??null,l&&l.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((n,o)=>c.observe(o)),v.length&&v[0].classList.add("active")}),x(()=>{document.removeEventListener("keydown",p),c&&(c.disconnect(),c=null)}),(v,a)=>(t(),d("div",T,[e("div",{class:"ds-topbar"},[e("button",{class:"ds-back",type:"button",onClick:b},"← Back"),a[0]||(a[0]=e("span",{class:"ds-topbar-title"},"Design system",-1))]),e("div",B,[a[38]||(a[38]=s('<aside class="sidebar" data-v-b86e59ea><div class="brand" data-v-b86e59ea><div class="brand-mark" data-v-b86e59ea>K</div><div class="brand-name" data-v-b86e59ea>Kimi Web</div></div><div class="brand-sub" data-v-b86e59ea>Design System · v1.0</div><div class="nav-group" data-v-b86e59ea>Navigate</div><nav class="nav" id="nav" data-v-b86e59ea><a href="#overview" data-v-b86e59ea><span class="num" data-v-b86e59ea>00</span>Overview</a><a href="#principles" data-v-b86e59ea><span class="num" data-v-b86e59ea>01</span>Design Principles</a><a href="#tokens" data-v-b86e59ea><span class="num" data-v-b86e59ea>02</span>Design Tokens</a><a href="#primitives" data-v-b86e59ea><span class="num" data-v-b86e59ea>03</span>Primitives</a><a href="#chat" data-v-b86e59ea><span class="num" data-v-b86e59ea>04</span>Chat Interface</a><a href="#themes" data-v-b86e59ea><span class="num" data-v-b86e59ea>05</span>Theming</a><a href="#rules" data-v-b86e59ea><span class="num" data-v-b86e59ea>06</span>Style Rules</a><a href="#shell" data-v-b86e59ea><span class="num" data-v-b86e59ea>07</span>App Shell & Sidebar</a><a href="#a11y" data-v-b86e59ea><span class="num" data-v-b86e59ea>08</span>Accessibility</a></nav><div class="nav-group" data-v-b86e59ea>Companion output</div><nav class="nav" data-v-b86e59ea><a href="#tokens" data-v-b86e59ea><span class="num" data-v-b86e59ea>↗</span>Token list</a><a href="#primitives" data-v-b86e59ea><span class="num" data-v-b86e59ea>↗</span>Component API</a><a href="#rules" data-v-b86e59ea><span class="num" data-v-b86e59ea>↗</span>Style rules</a></nav></aside>',1)),e("main",A,[e("div",I,[a[36]||(a[36]=s('<section id="overview" data-v-b86e59ea><div class="hero" data-v-b86e59ea><span class="eyebrow" data-v-b86e59ea>● Design System · v1.0</span><h1 data-v-b86e59ea>Kimi Web <span class="grad" data-v-b86e59ea>Design System</span></h1><p class="lead" data-v-b86e59ea> This document defines the visual language and component specification for Kimi Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable. </p><div class="hero-meta" data-v-b86e59ea><span class="meta-chip" data-v-b86e59ea><span class="dot" data-v-b86e59ea></span> Scope <b data-v-b86e59ea>apps/kimi-web</b></span><span class="meta-chip" data-v-b86e59ea>Component primitives</span><span class="meta-chip" data-v-b86e59ea>Theme <b data-v-b86e59ea>1 set · 4 customizable colors</b></span><span class="meta-chip" data-v-b86e59ea>Light / dark mode</span></div></div><div class="callout info" data-v-b86e59ea><span class="ico" data-v-b86e59ea>i</span><div data-v-b86e59ea><b data-v-b86e59ea>This spec is the single reference when changing the web UI.</b> Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed. </div></div></section><section id="principles" data-v-b86e59ea><div class="sec-head" data-v-b86e59ea><span class="sec-num" data-v-b86e59ea>01</span><h2 class="sec-title" data-v-b86e59ea>Design Principles</h2></div><p class="sec-desc" data-v-b86e59ea> Every UI decision traces back to the following principles. Kimi Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first. </p><ul class="clean check" data-v-b86e59ea><li data-v-b86e59ea><b data-v-b86e59ea>Consistency</b> —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.</li><li data-v-b86e59ea><b data-v-b86e59ea>Hierarchy</b> —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".</li><li data-v-b86e59ea><b data-v-b86e59ea>Proximity</b> —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.</li><li data-v-b86e59ea><b data-v-b86e59ea>Feedback</b> —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.</li><li data-v-b86e59ea><b data-v-b86e59ea>Breathing room</b> —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.</li><li data-v-b86e59ea><b data-v-b86e59ea>Accessibility (A11y)</b> —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.</li><li data-v-b86e59ea><b data-v-b86e59ea>Reduction</b> —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.</li></ul><div class="callout good" data-v-b86e59ea><span class="ico" data-v-b86e59ea>✓</span><div data-v-b86e59ea><b data-v-b86e59ea>Brand tone (the do-not list)</b>: calm, clinical, never exaggerated. <span class="pill red" style="margin:0 4px;" data-v-b86e59ea>Reject</span> purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons — <b data-v-b86e59ea>the moon phases 🌑…🌘 are the sole exception</b>, used only in the "waiting for the Agent to respond" chat state, as a brand signature. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided. </div></div><div class="callout info" data-v-b86e59ea><span class="ico" data-v-b86e59ea>i</span><div data-v-b86e59ea><b data-v-b86e59ea>Declare design intent first (Design Read)</b>: before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style. </div></div></section>',2)),e("section",M,[a[7]||(a[7]=s(`<div class="sec-head" data-v-b86e59ea><span class="sec-num" data-v-b86e59ea>02</span><h2 class="sec-title" data-v-b86e59ea>Design Tokens</h2></div><p class="sec-desc" data-v-b86e59ea> Collapse every visual decision into tokens. <b data-v-b86e59ea>Color tokens keep the existing short names and fill out the semantics</b> (lowering migration cost), while <b data-v-b86e59ea>spacing, z-index, motion, and font-weight</b> fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage. </p><div class="callout info" data-v-b86e59ea><span class="ico" data-v-b86e59ea>i</span><div data-v-b86e59ea><b data-v-b86e59ea>Naming convention</b>: <code data-v-b86e59ea>--<category>-<role>-<state></code>. For example <code data-v-b86e59ea>--color-text-muted</code>, <code data-v-b86e59ea>--radius-md</code>, <code data-v-b86e59ea>--space-4</code>. To reduce churn, the existing short names (<code data-v-b86e59ea>--bg</code> / <code data-v-b86e59ea>--ink</code> / <code data-v-b86e59ea>--line</code> / <code data-v-b86e59ea>--blue</code> …) are kept as <b data-v-b86e59ea>compatibility aliases</b> for one release cycle. </div></div><h3 class="sub" data-v-b86e59ea>Color</h3><p data-v-b86e59ea>Semantic-first, in three layers: <b data-v-b86e59ea>background / text / border</b> + <b data-v-b86e59ea>accent</b> + <b data-v-b86e59ea>status colors</b>. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.</p><div class="callout info" data-v-b86e59ea><span class="ico" data-v-b86e59ea>i</span><div data-v-b86e59ea>The table below shows the <b data-v-b86e59ea>derived semantic tokens</b>. The <b data-v-b86e59ea>neutrals and the accent</b> are derived from the 4 color seeds in §05 — for example <code data-v-b86e59ea>--color-accent</code> comes from <code data-v-b86e59ea>--accent-primary</code>, and <code data-v-b86e59ea>--color-bg</code> comes from the current light / dark surface. The <b data-v-b86e59ea>semantic status colors</b> (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.</div></div><div class="palette" data-v-b86e59ea><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#ffffff;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>bg</div><div class="cv" data-v-b86e59ea>#ffffff / #0d1117</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#fafbfc;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>surface</div><div class="cv" data-v-b86e59ea>#fafbfc / #161b22</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#f3f5f8;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>surface-sunken</div><div class="cv" data-v-b86e59ea>#f3f5f8 / #0d1117</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#eceff3;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>selected</div><div class="cv" data-v-b86e59ea>#eceff3 / #2d333b</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#14171c;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>fg</div><div class="cv" data-v-b86e59ea>#14171c / #e8eaed</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#6b7280;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>fg-muted</div><div class="cv" data-v-b86e59ea>#6b7280 / #9aa0a8</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#e7eaee;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>line</div><div class="cv" data-v-b86e59ea>#e7eaee / #2d333b</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#1783ff;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>accent (KMBlue)</div><div class="cv" data-v-b86e59ea>#1783ff / #58a6ff</div></div></div><div class="color-card" data-v-b86e59ea><div class="color-chip" style="background:#e8f3ff;" data-v-b86e59ea></div><div class="color-meta" data-v-b86e59ea><div class="cn" data-v-b86e59ea>accent-soft</div><div class="cv" data-v-b86e59ea>#e8f3ff / rgba(88,166,255,.14)</div></div></div></div><table class="dt" data-v-b86e59ea><thead data-v-b86e59ea><tr data-v-b86e59ea><th data-v-b86e59ea>Token</th><th data-v-b86e59ea>Light</th><th data-v-b86e59ea>Dark</th><th data-v-b86e59ea>Usage</th></tr></thead><tbody data-v-b86e59ea><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-bg</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#fff;" data-v-b86e59ea></span>#ffffff</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#0d1117;" data-v-b86e59ea></span>#0d1117</td><td data-v-b86e59ea>Page background</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-surface</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#fafbfc;" data-v-b86e59ea></span>#fafbfc</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#161b22;" data-v-b86e59ea></span>#161b22</td><td data-v-b86e59ea>Panel / sidebar / card head</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-surface-raised</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#fff;" data-v-b86e59ea></span>#ffffff</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#1c2128;" data-v-b86e59ea></span>#1c2128</td><td data-v-b86e59ea>Raised card / dialog / input</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-text</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#14171c;" data-v-b86e59ea></span>#14171c</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#e8eaed;" data-v-b86e59ea></span>#e8eaed</td><td data-v-b86e59ea>Body text / headings</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-text-muted</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#6b7280;" data-v-b86e59ea></span>#6b7280</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#9aa0a8;" data-v-b86e59ea></span>#9aa0a8</td><td data-v-b86e59ea>Secondary text / placeholder</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-line</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#e7eaee;" data-v-b86e59ea></span>#e7eaee</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#2d333b;" data-v-b86e59ea></span>#2d333b</td><td data-v-b86e59ea>Divider / card border</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-selected</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#00000014;" data-v-b86e59ea></span>#00000014</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#ffffff14;" data-v-b86e59ea></span>#ffffff14</td><td data-v-b86e59ea>Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-hover</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#0000000d;" data-v-b86e59ea></span>#0000000d</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#ffffff0d;" data-v-b86e59ea></span>#ffffff0d</td><td data-v-b86e59ea>Row hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-media-alpha-bg-1</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#858585;" data-v-b86e59ea></span>≈#858585</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#676b72;" data-v-b86e59ea></span>≈#676b72</td><td data-v-b86e59ea>Checkerboard square A of the <code data-v-b86e59ea><img></code> alpha canvas — color-mix of <code data-v-b86e59ea>--color-bg</code>/<code data-v-b86e59ea>--color-text</code> (52/48); applied via <code data-v-b86e59ea>--media-alpha-canvas</code> (16px period)</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-media-alpha-bg-2</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#6b6b6b;" data-v-b86e59ea></span>≈#6b6b6b</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#7a7e85;" data-v-b86e59ea></span>≈#7a7e85</td><td data-v-b86e59ea>Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-sidebar-bg</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#fbfaf9;" data-v-b86e59ea></span>#fbfaf9</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#181817;" data-v-b86e59ea></span>#181817</td><td data-v-b86e59ea>Sidebar surface — one step off <code data-v-b86e59ea>--color-bg</code> so the session column reads as its own plane</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-accent</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#1783ff;" data-v-b86e59ea></span>#1783ff</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#58a6ff;" data-v-b86e59ea></span>#58a6ff</td><td data-v-b86e59ea>Primary action / link / focus</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-success</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#0e7a38;" data-v-b86e59ea></span>#0e7a38</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#3fb950;" data-v-b86e59ea></span>#3fb950</td><td data-v-b86e59ea>Success / pass</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-warning</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#a9610a;" data-v-b86e59ea></span>#a9610a</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#d29922;" data-v-b86e59ea></span>#d29922</td><td data-v-b86e59ea>Warning / pending</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--color-danger</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#c0392b;" data-v-b86e59ea></span>#c0392b</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#f85149;" data-v-b86e59ea></span>#f85149</td><td data-v-b86e59ea>Danger / error / abort</td></tr></tbody></table><h4 class="mini" data-v-b86e59ea>Surface usage</h4><p data-v-b86e59ea>The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating <code data-v-b86e59ea>--p-surface-raised</code> as a universal background.</p><table class="dt" data-v-b86e59ea><thead data-v-b86e59ea><tr data-v-b86e59ea><th data-v-b86e59ea>Token</th><th data-v-b86e59ea>Light</th><th data-v-b86e59ea>Dark</th><th data-v-b86e59ea>Usage</th></tr></thead><tbody data-v-b86e59ea><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--p-surface-raised</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#fff;" data-v-b86e59ea></span>#ffffff</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#1c2128;" data-v-b86e59ea></span>#1c2128</td><td data-v-b86e59ea>Raised card / dialog / input (raised layer)</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--p-surface</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#fafbfc;" data-v-b86e59ea></span>#fafbfc</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#161b22;" data-v-b86e59ea></span>#161b22</td><td data-v-b86e59ea>Panel / sidebar / card head (default flat layer)</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--p-surface-sunken</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#f3f5f8;" data-v-b86e59ea></span>#f3f5f8</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#0d1117;" data-v-b86e59ea></span>#0d1117</td><td data-v-b86e59ea>Code block / inline input / recessed area (sunken layer)</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--p-bg</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#fff;" data-v-b86e59ea></span>#ffffff</td><td class="val" data-v-b86e59ea><span class="swatch" style="background:#0d1117;" data-v-b86e59ea></span>#0d1117</td><td data-v-b86e59ea>Page background</td></tr></tbody></table><h4 class="mini" data-v-b86e59ea>Focus ring</h4><p data-v-b86e59ea>All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a <code data-v-b86e59ea>box-shadow</code> focus ring.</p><table class="dt" data-v-b86e59ea><thead data-v-b86e59ea><tr data-v-b86e59ea><th data-v-b86e59ea>Token</th><th data-v-b86e59ea>Value</th><th data-v-b86e59ea>Usage</th></tr></thead><tbody data-v-b86e59ea><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--p-focus-ring</td><td class="val" data-v-b86e59ea>0 0 0 3px var(--p-accent-soft)</td><td data-v-b86e59ea>Default focus ring (link, menu item, switch, checkbox)</td></tr><tr data-v-b86e59ea><td class="tk" data-v-b86e59ea>--p-focus-ring-strong</td><td class="val" data-v-b86e59ea>0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)</td><td data-v-b86e59ea>Strong focus ring (button, primary action)</td></tr></tbody></table><h4 class="mini" data-v-b86e59ea>Text selection</h4><p data-v-b86e59ea>The text-selection color uses <code data-v-b86e59ea>--p-selection</code> uniformly (light <code data-v-b86e59ea>rgba(23,131,255,.18)</code> / dark <code data-v-b86e59ea>rgba(88,166,255,.32)</code>), applied by the global <code data-v-b86e59ea>::selection</code> rule; do not set a separate highlight background.</p><h4 class="mini" data-v-b86e59ea>Disabled state</h4><p data-v-b86e59ea>All disabled controls use <code data-v-b86e59ea>opacity:.5</code> + <code data-v-b86e59ea>cursor:not-allowed</code> uniformly; do not separately grey out or recolor.</p><h3 class="sub" data-v-b86e59ea>Font families</h3><p data-v-b86e59ea>Kimi Web uses two font families: <b data-v-b86e59ea>--font-ui</b> (UI and body, Inter first) and <b data-v-b86e59ea>--font-mono</b> (code and monospace). Components always reference the variables; do not hard-code font names.</p><h4 class="mini" data-v-b86e59ea>--font-ui · UI & body (Inter first)</h4><p data-v-b86e59ea>Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:</p><div class="code" data-v-b86e59ea><div class="code-bar" data-v-b86e59ea><span class="d" data-v-b86e59ea></span><span class="d" data-v-b86e59ea></span><span class="d" data-v-b86e59ea></span><span class="fn" data-v-b86e59ea>--font-ui</span></div><pre data-v-b86e59ea>--font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
|
|
2
2
|
"PingFang SC", "Microsoft YaHei", "Noto Sans SC",
|
|
3
3
|
-apple-system, BlinkMacSystemFont, "Segoe UI",
|
|
4
4
|
Roboto, Ubuntu, sans-serif,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-
|
|
1
|
+
import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-Nwori_8N.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{W as ln,X as an,Y as B,$ as q,a0 as Y,a1 as un,a2 as y,a3 as tn,a4 as G,a5 as _,a6 as rn,a7 as o,a8 as on,a9 as sn,aa as fn}from"./mermaid.core-DAOd3KoM.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,$,a){var O=I-l,i=D-h,n=$-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function N(l,h,I,D,v,A,$){var a=l-I,O=h-D,i=($?A:-A)/G(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,j=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*G(on(0,T*T*R-P*P)),W=(P*g-m*S)/R,X=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=W-j,e=X-t,r=w-j,z=p-t;return x*x+e*e>r*r+z*z&&(W=w,X=p),{cx:W,cy:X,x01:-n,y01:-d,x11:W*(v/T-1),y11:X*(v/T-1)}}function hn(){var l=cn,h=yn,I=Y(0),D=null,v=gn,A=dn,$=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,j=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(j>tn-y)a.moveTo(s*B(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*B(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=j,S=j,W=$.apply(this,arguments)/2,X=W>y&&(D?+D.apply(this,arguments):G(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(X>y){var z=sn(X/u*q(W)),H=sn(X/s*q(W));(P-=z*2)>y?(z*=t?1:-1,R+=z,T-=z):(P=0,R=T=(f+c)/2),(S-=H*2)>y?(H*=t?1:-1,m+=H,g-=H):(S=0,m=g=(f+c)/2)}var C=s*B(m),F=s*q(m),J=u*B(T),K=u*q(T);if(w>y){var L=s*B(g),M=s*q(g),Q=u*B(R),U=u*q(R),E;if(j<an)if(E=pn(C,F,Q,U,L,M,J,K)){var V=C-E[0],Z=F-E[1],k=L-E[0],b=M-E[1],nn=1/q(fn((V*k+Z*b)/(G(V*V+Z*Z)*G(k*k+b*b)))/2),en=G(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=N(Q,U,C,F,s,x,t),r=N(L,M,J,K,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(C,F),a.arc(0,0,s,m,g,!t)):a.moveTo(C,F),!(u>y)||!(P>y)?a.lineTo(J,K):p>y?(e=N(J,K,L,M,u,-p,t),r=N(C,F,Q,U,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[B(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:Y(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:Y(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:Y(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:Y(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:Y(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:Y(+n),i):A},i.padAngle=function(n){return arguments.length?($=typeof n=="function"?n:Y(+n),i):$},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|