product-doc 0.13.2 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -22
- package/guide/previews.md +64 -0
- package/guide/ui.md +13 -0
- package/guide.md +20 -17
- package/lib/changes.d.ts +4 -0
- package/lib/changes.js +5 -0
- package/lib/cli.js +99 -12
- package/lib/diffmapConfig.d.ts +41 -0
- package/lib/diffmapConfig.js +71 -0
- package/lib/git.d.ts +9 -4
- package/lib/git.js +42 -7
- package/lib/github/route.d.ts +1 -0
- package/lib/github/route.js +14 -5
- package/lib/parseFence.d.ts +30 -0
- package/lib/parseFence.js +62 -0
- package/lib/parseViewer.js +15 -0
- package/lib/preview/PreviewRoute.d.ts +20 -0
- package/lib/preview/PreviewRoute.js +279 -0
- package/lib/preview/index.d.ts +3 -0
- package/lib/preview/index.js +2 -0
- package/lib/preview/protocol.d.ts +85 -0
- package/lib/preview/protocol.js +114 -0
- package/lib/readDiffmapConfig.d.ts +12 -0
- package/lib/readDiffmapConfig.js +25 -0
- package/lib/serve.d.ts +2 -0
- package/lib/serve.js +41 -7
- package/lib/share.js +5 -1
- package/package.json +21 -4
- package/viewer-dist/assets/angular-html-C4LeXCe-.js +1 -0
- package/viewer-dist/assets/angular-ts-CRxW7p1W.js +1 -0
- package/viewer-dist/assets/{apl-Dio8Ke0X.js → apl-D60kkz--.js} +1 -1
- package/viewer-dist/assets/astro-3Zgg9XqN.js +1 -0
- package/viewer-dist/assets/{bat-HFWzIrao.js → bat-qdxAdBWQ.js} +1 -1
- package/viewer-dist/assets/{bibtex-Conh3HYz.js → bibtex-Ci_nEsc7.js} +1 -1
- package/viewer-dist/assets/blade-B5YUZNEG.js +1 -0
- package/viewer-dist/assets/bsl-_VjlB9mv.js +1 -0
- package/viewer-dist/assets/c-BNQJhXlP.js +1 -0
- package/viewer-dist/assets/cairo-DLTphjLi.js +1 -0
- package/viewer-dist/assets/{chapel-C1sUNn9S.js → chapel-CFMD-Djs.js} +1 -1
- package/viewer-dist/assets/{clojure-zIjcJonk.js → clojure-DqKBuwfJ.js} +1 -1
- package/viewer-dist/assets/{cmake-T_kMSWuN.js → cmake-Bj61d0ZC.js} +1 -1
- package/viewer-dist/assets/{cobol-BvqUwMCV.js → cobol-DY6IFdmX.js} +1 -1
- package/viewer-dist/assets/{coffee-BSYIIMkB.js → coffee-BP03ytLP.js} +1 -1
- package/viewer-dist/assets/{core-A38CGsfQ.js → core-BkcJpkJE.js} +2 -2
- package/viewer-dist/assets/cpp-CUBNVKxn.js +1 -0
- package/viewer-dist/assets/{crystal-D0XIDmeW.js → crystal-NSr8mDkd.js} +1 -1
- package/viewer-dist/assets/{csharp-B3DbjJyj.js → csharp-dmMxLVLW.js} +1 -1
- package/viewer-dist/assets/css-BiJUKRHp.js +1 -0
- package/viewer-dist/assets/{csv-B_R7vXwK.js → csv-Dx-8-gkx.js} +1 -1
- package/viewer-dist/assets/{dart-_dH3dQdM.js → dart-CHZY9Xhz.js} +1 -1
- package/viewer-dist/assets/{diff-CR4ZX0DC.js → diff-woXpYk--.js} +1 -1
- package/viewer-dist/assets/{docker-CAzcIhYn.js → docker-IyjqRm3v.js} +1 -1
- package/viewer-dist/assets/edge-DznSXZdq.js +1 -0
- package/viewer-dist/assets/{elixir-BL8v4QDr.js → elixir-D1HcpP2u.js} +1 -1
- package/viewer-dist/assets/{elm-CC1TmzeR.js → elm-Bmx6Fs0i.js} +1 -1
- package/viewer-dist/assets/{erb-CHbMJpQy.js → erb-CdvLbCTI.js} +1 -1
- package/viewer-dist/assets/erlang-Cphh6RMH.js +1 -0
- package/viewer-dist/assets/fortran-fixed-form-DEKoE2YW.js +1 -0
- package/viewer-dist/assets/{fortran-free-form-uHOymLAb.js → fortran-free-form-CYNrtFtB.js} +1 -1
- package/viewer-dist/assets/fsharp-D13ZGOAj.js +1 -0
- package/viewer-dist/assets/gdresource-xMC7jr7x.js +1 -0
- package/viewer-dist/assets/{gdscript-DJFPOtzS.js → gdscript-DYvRD3hg.js} +1 -1
- package/viewer-dist/assets/{gdshader-kiBtQlv1.js → gdshader-CBce3t8t.js} +1 -1
- package/viewer-dist/assets/git-commit-BSykSTBG.js +1 -0
- package/viewer-dist/assets/{git-rebase-Bh7mDoAc.js → git-rebase-C-RR1FSc.js} +1 -1
- package/viewer-dist/assets/{glimmer-js-CIdbWayl.js → glimmer-js-BUse42ki.js} +1 -1
- package/viewer-dist/assets/{glimmer-ts-B16xCo2k.js → glimmer-ts-zH_nSjyx.js} +1 -1
- package/viewer-dist/assets/glsl-CyFpZtQv.js +1 -0
- package/viewer-dist/assets/{go-CFMhVTkq.js → go-rLFTqkRN.js} +1 -1
- package/viewer-dist/assets/graphql-BIyAKkG2.js +1 -0
- package/viewer-dist/assets/{groovy-Dj7WCBJM.js → groovy-CacY0gHj.js} +1 -1
- package/viewer-dist/assets/{hack-C30D-q0p.js → hack-qk6BiceN.js} +1 -1
- package/viewer-dist/assets/haml-BkBm6IgF.js +1 -0
- package/viewer-dist/assets/{handlebars-g-3gLrXt.js → handlebars-FMeV8O-Z.js} +1 -1
- package/viewer-dist/assets/{haxe-CD8O8Ul0.js → haxe-C8oCnwJJ.js} +1 -1
- package/viewer-dist/assets/{highlights-B57wCzB5.js → highlights-NUSPeu9U.js} +2 -2
- package/viewer-dist/assets/{hlsl-ajL2FB-w.js → hlsl-Cvrh5tZx.js} +1 -1
- package/viewer-dist/assets/html-CvoVzlT3.js +1 -0
- package/viewer-dist/assets/{html-derivative-DyzJkWO6.js → html-derivative-CmO0_REm.js} +1 -1
- package/viewer-dist/assets/{http-BjrBtiM6.js → http-c4_vT9ST.js} +1 -1
- package/viewer-dist/assets/{hurl-B4P9s9G3.js → hurl-BqZA9I9Q.js} +1 -1
- package/viewer-dist/assets/hxml-Dcm88srW.js +1 -0
- package/viewer-dist/assets/index-C8Oxwcs8.js +264 -0
- package/viewer-dist/assets/{ini-0B7NLFlx.js → ini-B5eOa1yu.js} +1 -1
- package/viewer-dist/assets/java-D7h0NA_A.js +1 -0
- package/viewer-dist/assets/javascript-DcMHgNcu.js +1 -0
- package/viewer-dist/assets/{jinja-dRcm23Ea.js → jinja-IxhZJXij.js} +1 -1
- package/viewer-dist/assets/{jison-D3aJooqo.js → jison-Ru_S5AEn.js} +1 -1
- package/viewer-dist/assets/json-DePJdKYk.js +1 -0
- package/viewer-dist/assets/{jsonc-dcnCvL0G.js → jsonc-CYpm1nAK.js} +1 -1
- package/viewer-dist/assets/jsx-BUUYi3qs.js +1 -0
- package/viewer-dist/assets/julia-BuaSHoYZ.js +1 -0
- package/viewer-dist/assets/just-BJW1YJYB.js +1 -0
- package/viewer-dist/assets/langs-Di6vPLUk.js +2 -0
- package/viewer-dist/assets/{latex-B_Ztlc7G.js → latex-B6yY1rfM.js} +1 -1
- package/viewer-dist/assets/{less-B64L-FWb.js → less-DVTAwKKz.js} +1 -1
- package/viewer-dist/assets/{liquid-CQNtsgCr.js → liquid-DNgNMjPq.js} +1 -1
- package/viewer-dist/assets/loader-Cvp9wZb2.js +1 -0
- package/viewer-dist/assets/{log-BvtJ4bSl.js → log-BNLmms1o.js} +1 -1
- package/viewer-dist/assets/lua-Z49wBRLR.js +1 -0
- package/viewer-dist/assets/{make-URElk0GJ.js → make-Dixweg8N.js} +1 -1
- package/viewer-dist/assets/{markdown-CboqBxpY.js → markdown-BYOwaDjH.js} +1 -1
- package/viewer-dist/assets/marko-i5cBncq8.js +1 -0
- package/viewer-dist/assets/mdc-C3wRYKz5.js +1 -0
- package/viewer-dist/assets/nextflow-CSgcYZcx.js +1 -0
- package/viewer-dist/assets/{nextflow-groovy-C770ykRh.js → nextflow-groovy-D7IRt6Pp.js} +1 -1
- package/viewer-dist/assets/{nginx-BxRBJ-Af.js → nginx-BrbrEdla.js} +1 -1
- package/viewer-dist/assets/nim-BCe7ZKXY.js +1 -0
- package/viewer-dist/assets/{objective-c-D_ECFp-D.js → objective-c-D1A_Heim.js} +1 -1
- package/viewer-dist/assets/{ocaml-D6dNsUd0.js → ocaml-O90oeIOV.js} +1 -1
- package/viewer-dist/assets/org-DDCXkPsd.js +1 -0
- package/viewer-dist/assets/{perl-sgZsTtaf.js → perl-DLhC7S_Q.js} +1 -1
- package/viewer-dist/assets/{php-D9QpVhjP.js → php-CDzTReqR.js} +1 -1
- package/viewer-dist/assets/{postcss-D_Wz94rJ.js → postcss-BXeXVLqQ.js} +1 -1
- package/viewer-dist/assets/{powershell-CItYMEtV.js → powershell-QtSnmXcu.js} +1 -1
- package/viewer-dist/assets/{pug-nGRwXpob.js → pug-COoI2o4U.js} +1 -1
- package/viewer-dist/assets/{python-CzFU0dpx.js → python-gzcpVVnB.js} +1 -1
- package/viewer-dist/assets/{qml-BxleM7bJ.js → qml-g4UDed-8.js} +1 -1
- package/viewer-dist/assets/r-CvCSiWB_.js +1 -0
- package/viewer-dist/assets/{raku-BtFKomnU.js → raku-B3gFvitq.js} +1 -1
- package/viewer-dist/assets/{razor-UAq-8THt.js → razor-BRLDaw7i.js} +1 -1
- package/viewer-dist/assets/regexp-I2jnduhj.js +1 -0
- package/viewer-dist/assets/rst-BEQnCgL0.js +1 -0
- package/viewer-dist/assets/{ruby-B6sU6EpJ.js → ruby-COXzLN2W.js} +1 -1
- package/viewer-dist/assets/{rust-DBZE5Si3.js → rust-DpiIf5JO.js} +1 -1
- package/viewer-dist/assets/{sas-BowjnAvi.js → sas-Cr47JhdL.js} +1 -1
- package/viewer-dist/assets/{scala-o2NiCLJc.js → scala-BiFt_7mu.js} +1 -1
- package/viewer-dist/assets/scss-BuNb6cgZ.js +1 -0
- package/viewer-dist/assets/{sdbl-CpzYUp7e.js → sdbl-bTVj8UrX.js} +1 -1
- package/viewer-dist/assets/shaderlab-TOUzSsQk.js +1 -0
- package/viewer-dist/assets/shellscript-B51zB43X.js +1 -0
- package/viewer-dist/assets/{shellsession-DDrivR0a.js → shellsession-B-KBpmJs.js} +1 -1
- package/viewer-dist/assets/shiki-CTIyHrkn.js +2 -0
- package/viewer-dist/assets/{soy-CUUUw2U6.js → soy-B-X4e_cm.js} +1 -1
- package/viewer-dist/assets/sparql-D_iOobhT.js +1 -0
- package/viewer-dist/assets/sql-CrePkbX5.js +1 -0
- package/viewer-dist/assets/{stata-Dj4sbAEx.js → stata-LQMPNdRb.js} +1 -1
- package/viewer-dist/assets/{stream-tokenizer-a_hv0fYK.js → stream-tokenizer-8imCpDcl.js} +2 -2
- package/viewer-dist/assets/{stylus-LiTfbrWi.js → stylus-B6D30XZt.js} +1 -1
- package/viewer-dist/assets/{surrealql-NoXzmj18.js → surrealql-DalIYx4r.js} +1 -1
- package/viewer-dist/assets/svelte-CutSaB0m.js +1 -0
- package/viewer-dist/assets/{swift-DQ24oLw9.js → swift-CyEgAFGc.js} +1 -1
- package/viewer-dist/assets/{system-verilog-Dp2k_mze.js → system-verilog-Dh5ihWbf.js} +1 -1
- package/viewer-dist/assets/templ-STIZV9cS.js +1 -0
- package/viewer-dist/assets/tex-JPaUWOrn.js +1 -0
- package/viewer-dist/assets/themes-CGzFOfgV.js +2 -0
- package/viewer-dist/assets/{ts-tags-DLz2GTd3.js → ts-tags-DugY2c1f.js} +1 -1
- package/viewer-dist/assets/tsx-DvWhG4dC.js +1 -0
- package/viewer-dist/assets/{turtle-CcN57yC0.js → turtle-ByJddavk.js} +1 -1
- package/viewer-dist/assets/twig-CAQ2meH1.js +1 -0
- package/viewer-dist/assets/typescript-BTGs5etX.js +1 -0
- package/viewer-dist/assets/typst-D2auzO0m.js +1 -0
- package/viewer-dist/assets/{vb-3nVziYZS.js → vb-DOwzaHZ0.js} +1 -1
- package/viewer-dist/assets/{verilog-kL8Dwv27.js → verilog-B2gwz-sJ.js} +1 -1
- package/viewer-dist/assets/vue-Bu9nv_eN.js +1 -0
- package/viewer-dist/assets/{vue-html-CGMs_6qn.js → vue-html-BXjKVtKk.js} +1 -1
- package/viewer-dist/assets/vue-vine-Ci2qndh_.js +1 -0
- package/viewer-dist/assets/xml-C01ajBW7.js +1 -0
- package/viewer-dist/assets/{xsl-Czhm44Ae.js → xsl-CCLNyvR3.js} +1 -1
- package/viewer-dist/assets/yaml-BWCS3NLV.js +1 -0
- package/viewer-dist/assets/{zig-B7sSDI6F.js → zig-CMLA9XwU.js} +1 -1
- package/viewer-dist/index.html +1 -7
- package/viewer-dist/assets/angular-html-BswFT_28.js +0 -1
- package/viewer-dist/assets/angular-html-Cwa-lTMy.js +0 -1
- package/viewer-dist/assets/angular-ts-DOMhGxLQ.js +0 -1
- package/viewer-dist/assets/appendItems-BRdTC5zu.js +0 -3
- package/viewer-dist/assets/astro-CN6YWUG3.js +0 -1
- package/viewer-dist/assets/bat-Di-EdOIU.js +0 -1
- package/viewer-dist/assets/bibtex-CimSBJhw.js +0 -1
- package/viewer-dist/assets/blade-BrDpNfUX.js +0 -1
- package/viewer-dist/assets/bsl-gRq8cI6V.js +0 -1
- package/viewer-dist/assets/c-DWGmR78Y.js +0 -1
- package/viewer-dist/assets/c-SSSlmE39.js +0 -1
- package/viewer-dist/assets/cairo-D66nqRlU.js +0 -1
- package/viewer-dist/assets/clojure-BrC3BItl.js +0 -1
- package/viewer-dist/assets/cmake-BRht3inD.js +0 -1
- package/viewer-dist/assets/coffee-drHG6SJT.js +0 -1
- package/viewer-dist/assets/constants-CmGPilXJ.js +0 -1
- package/viewer-dist/assets/core-B86SFyc0.js +0 -1
- package/viewer-dist/assets/cpp-BDT6bThX.js +0 -1
- package/viewer-dist/assets/cpp-CcLCVKG_.js +0 -1
- package/viewer-dist/assets/csharp-DtuFCOLR.js +0 -1
- package/viewer-dist/assets/css-BGIxQoYs.js +0 -1
- package/viewer-dist/assets/css-DUjzNfgv.js +0 -1
- package/viewer-dist/assets/csv-D6mwZ2PH.js +0 -1
- package/viewer-dist/assets/dart-B8JJT_EX.js +0 -1
- package/viewer-dist/assets/diff-B0S3HUPm.js +0 -1
- package/viewer-dist/assets/docker-B3DZKTds.js +0 -1
- package/viewer-dist/assets/edge-B_SBzXGF.js +0 -1
- package/viewer-dist/assets/elixir-B0EKSUNS.js +0 -1
- package/viewer-dist/assets/erlang-CCXss5H6.js +0 -1
- package/viewer-dist/assets/erlang-DAWODyxE.js +0 -1
- package/viewer-dist/assets/formatCSSVariablePrefix-KRh9vnZf.js +0 -1
- package/viewer-dist/assets/fortran-fixed-form-1cK5gXa1.js +0 -1
- package/viewer-dist/assets/fortran-free-form-9zh5t3u2.js +0 -1
- package/viewer-dist/assets/fsharp-C37UASp4.js +0 -1
- package/viewer-dist/assets/fsharp-D8ZPuVlk.js +0 -1
- package/viewer-dist/assets/gdresource-LxjHb83i.js +0 -1
- package/viewer-dist/assets/gdscript-C2iVvkL_.js +0 -1
- package/viewer-dist/assets/gdshader-BpaOOKdG.js +0 -1
- package/viewer-dist/assets/git-commit-BAuDFD-1.js +0 -1
- package/viewer-dist/assets/git-commit-rNeRxB9Y.js +0 -1
- package/viewer-dist/assets/git-rebase-Cpv8mbcu.js +0 -1
- package/viewer-dist/assets/glsl-CaPTrB3a.js +0 -1
- package/viewer-dist/assets/glsl-ThNHWs2E.js +0 -1
- package/viewer-dist/assets/go-BrE3Phef.js +0 -1
- package/viewer-dist/assets/graphql-DAzSVzvB.js +0 -1
- package/viewer-dist/assets/graphql-DEIChqxY.js +0 -1
- package/viewer-dist/assets/groovy-D_Q3n-An.js +0 -1
- package/viewer-dist/assets/haml-C1zHJAQt.js +0 -1
- package/viewer-dist/assets/haml-mwfMQlUs.js +0 -1
- package/viewer-dist/assets/handlebars-CEZndQNl.js +0 -1
- package/viewer-dist/assets/haxe-j5FdAS1V.js +0 -1
- package/viewer-dist/assets/hlsl-C3sg_olF.js +0 -1
- package/viewer-dist/assets/html-DSw1lh5G.js +0 -1
- package/viewer-dist/assets/html-WQKKblVZ.js +0 -1
- package/viewer-dist/assets/html-derivative-CjJKezcp.js +0 -1
- package/viewer-dist/assets/hxml-DPF7XkXa.js +0 -1
- package/viewer-dist/assets/index-CVKGwJkR.js +0 -255
- package/viewer-dist/assets/ini-DxURaTxO.js +0 -1
- package/viewer-dist/assets/java-BtIQNnN0.js +0 -1
- package/viewer-dist/assets/java-DxlWrXwe.js +0 -1
- package/viewer-dist/assets/javascript-BzbQS41l.js +0 -1
- package/viewer-dist/assets/javascript-Yelw-5ZN.js +0 -1
- package/viewer-dist/assets/json-B88Oqtu5.js +0 -1
- package/viewer-dist/assets/json-CaljABEy.js +0 -1
- package/viewer-dist/assets/jsonc-CTI_jrid.js +0 -1
- package/viewer-dist/assets/jsx-D3KKoC5L.js +0 -1
- package/viewer-dist/assets/jsx-hEbJ82HF.js +0 -1
- package/viewer-dist/assets/julia-BCOw4cyx.js +0 -1
- package/viewer-dist/assets/julia-hqywDEUR.js +0 -1
- package/viewer-dist/assets/just-Br47BmIC.js +0 -1
- package/viewer-dist/assets/langs-JgP7EaER.js +0 -2
- package/viewer-dist/assets/latex-Djh9Fg1h.js +0 -1
- package/viewer-dist/assets/less-GWsDhusf.js +0 -1
- package/viewer-dist/assets/lib-IuaA1a0_.js +0 -9
- package/viewer-dist/assets/loader-D4gJynmd.js +0 -1
- package/viewer-dist/assets/log-DSUv6hjM.js +0 -1
- package/viewer-dist/assets/lua-BJObVtAx.js +0 -1
- package/viewer-dist/assets/lua-DjuecEsk.js +0 -1
- package/viewer-dist/assets/make-BLT6fICl.js +0 -1
- package/viewer-dist/assets/markdown-Cla8Gbs6.js +0 -1
- package/viewer-dist/assets/marko-DPS0EkZ1.js +0 -1
- package/viewer-dist/assets/mdc-C6srEd4p.js +0 -1
- package/viewer-dist/assets/nextflow-groovy-1acFxZ7Y.js +0 -1
- package/viewer-dist/assets/nextflow-uA5IJerx.js +0 -1
- package/viewer-dist/assets/nim-Dr8hIC6Y.js +0 -1
- package/viewer-dist/assets/nim-ZjzS1dcU.js +0 -1
- package/viewer-dist/assets/objective-c-DMLMCfZd.js +0 -1
- package/viewer-dist/assets/ocaml-oSZO9LTw.js +0 -1
- package/viewer-dist/assets/org-B3Y3gBCc.js +0 -1
- package/viewer-dist/assets/perl-Di9CLCS0.js +0 -1
- package/viewer-dist/assets/php-DXPvgw5o.js +0 -1
- package/viewer-dist/assets/postcss-e3XvZOFQ.js +0 -1
- package/viewer-dist/assets/powershell-DyPZnz5v.js +0 -1
- package/viewer-dist/assets/preload-helper-BZ1Pz5am.js +0 -1
- package/viewer-dist/assets/pug-BlofpNpK.js +0 -1
- package/viewer-dist/assets/python-ORI17Sev.js +0 -1
- package/viewer-dist/assets/r-DWzjseEo.js +0 -1
- package/viewer-dist/assets/r-Dr1JUpHl.js +0 -1
- package/viewer-dist/assets/raku-B6hKIqfP.js +0 -1
- package/viewer-dist/assets/regexp-B4pBNbU3.js +0 -1
- package/viewer-dist/assets/regexp-BWpGejPw.js +0 -1
- package/viewer-dist/assets/rst-DT-C-5fA.js +0 -1
- package/viewer-dist/assets/ruby-BwIxDKXu.js +0 -1
- package/viewer-dist/assets/rust-tUOVui2B.js +0 -1
- package/viewer-dist/assets/scala-Dcd77NNm.js +0 -1
- package/viewer-dist/assets/scss-CWs8DVSa.js +0 -1
- package/viewer-dist/assets/scss-Dec6wfVg.js +0 -1
- package/viewer-dist/assets/sdbl-DFPhMlBm.js +0 -1
- package/viewer-dist/assets/shaderlab-DY7g_Ava.js +0 -1
- package/viewer-dist/assets/shellscript-BiGZg9Om.js +0 -1
- package/viewer-dist/assets/shellscript-CqHdAlCp.js +0 -1
- package/viewer-dist/assets/shiki-BYYByAlk.js +0 -2
- package/viewer-dist/assets/sparql-Dy5Sx-zJ.js +0 -1
- package/viewer-dist/assets/sql-BOsskAmu.js +0 -1
- package/viewer-dist/assets/sql-CNu3Or2W.js +0 -1
- package/viewer-dist/assets/stylus-BOYZFyl7.js +0 -1
- package/viewer-dist/assets/svelte-BaCIHHWd.js +0 -1
- package/viewer-dist/assets/swift-CpxeRS9H.js +0 -1
- package/viewer-dist/assets/system-verilog-CIGW6CHD.js +0 -1
- package/viewer-dist/assets/templ-BfgLc4ra.js +0 -1
- package/viewer-dist/assets/tex-C9L8xJex.js +0 -1
- package/viewer-dist/assets/tex-CeakZqzU.js +0 -1
- package/viewer-dist/assets/themes-DP0gt5jG.js +0 -2
- package/viewer-dist/assets/tsx-5f3ulCja.js +0 -1
- package/viewer-dist/assets/tsx-BOvsFOI6.js +0 -1
- package/viewer-dist/assets/turtle-B2uMLKuz.js +0 -1
- package/viewer-dist/assets/twig-BuizuR2K.js +0 -1
- package/viewer-dist/assets/twig-p9meEoSL.js +0 -1
- package/viewer-dist/assets/typescript-Utq2Cl8c.js +0 -1
- package/viewer-dist/assets/typescript-j_1H8WHN.js +0 -1
- package/viewer-dist/assets/typst-qZ7a-KdK.js +0 -1
- package/viewer-dist/assets/unwrapDefault-ByDmBtHB.js +0 -1
- package/viewer-dist/assets/vb-Dcr14nCw.js +0 -1
- package/viewer-dist/assets/verilog-DUw2aqD4.js +0 -1
- package/viewer-dist/assets/vue-qH43U_rv.js +0 -1
- package/viewer-dist/assets/vue-vine-6XI2pIvQ.js +0 -1
- package/viewer-dist/assets/xml-CoDIzWF0.js +0 -1
- package/viewer-dist/assets/xml-WY0zc4PG.js +0 -1
- package/viewer-dist/assets/xsl-ChYNfH-b.js +0 -1
- package/viewer-dist/assets/yaml-CxbubiML.js +0 -1
- package/viewer-dist/assets/yaml-DijMHRDA.js +0 -1
- package/viewer-dist/assets/zig-VWdiCTxG.js +0 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
export const PREVIEW_PROTOCOL = 1;
|
|
2
|
+
/** The pages that may frame the page: the local viewer, which listens on any port, and diffmap.dev. */
|
|
3
|
+
export function isViewerOrigin(origin) {
|
|
4
|
+
if (origin === "https://www.diffmap.dev")
|
|
5
|
+
return true;
|
|
6
|
+
let url;
|
|
7
|
+
try {
|
|
8
|
+
url = new URL(origin);
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
return (url.protocol === "http:" &&
|
|
14
|
+
(url.hostname === "127.0.0.1" || url.hostname === "localhost"));
|
|
15
|
+
}
|
|
16
|
+
/** The `Content-Security-Policy` the page should be served with, so only the viewer can frame it. */
|
|
17
|
+
export const previewFrameAncestors = "frame-ancestors 'self' http://127.0.0.1:* http://localhost:* https://www.diffmap.dev";
|
|
18
|
+
export function parseViewerMessage(data) {
|
|
19
|
+
if (typeof data !== "object" || data === null)
|
|
20
|
+
return undefined;
|
|
21
|
+
const message = data;
|
|
22
|
+
switch (message.type) {
|
|
23
|
+
case "preview-connect":
|
|
24
|
+
return { type: "preview-connect" };
|
|
25
|
+
case "preview-show": {
|
|
26
|
+
if (typeof message.story !== "string")
|
|
27
|
+
return undefined;
|
|
28
|
+
const path = parsePath(message.path, message.story);
|
|
29
|
+
return {
|
|
30
|
+
type: "preview-show",
|
|
31
|
+
story: message.story,
|
|
32
|
+
how: message.how === "play" ? "play" : "render",
|
|
33
|
+
...(path === undefined ? {} : { path }),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
case "preview-mode":
|
|
37
|
+
if (message.mode !== "live" && message.mode !== "thumbnail")
|
|
38
|
+
return undefined;
|
|
39
|
+
return { type: "preview-mode", mode: message.mode };
|
|
40
|
+
default:
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/** A path is kept only when it is a list of story IDs that ends at `story`. */
|
|
45
|
+
export function parsePath(value, story) {
|
|
46
|
+
if (!Array.isArray(value) ||
|
|
47
|
+
value.length === 0 ||
|
|
48
|
+
!value.every((id) => typeof id === "string") ||
|
|
49
|
+
value.at(-1) !== story)
|
|
50
|
+
return undefined;
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
/** FNV-1a of the story's rendered HTML: it changes when the markup or its classes do, so review marks can tell a story changed. */
|
|
54
|
+
export function fingerprint(html) {
|
|
55
|
+
let hash = 0x811c9dc5;
|
|
56
|
+
for (let index = 0; index < html.length; index++) {
|
|
57
|
+
hash ^= html.charCodeAt(index);
|
|
58
|
+
hash = Math.imul(hash, 0x01000193);
|
|
59
|
+
}
|
|
60
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
61
|
+
}
|
|
62
|
+
export function resolveStories(modules, composeStories) {
|
|
63
|
+
const stories = new Map();
|
|
64
|
+
const problems = [];
|
|
65
|
+
for (const [file, value] of Object.entries(modules)) {
|
|
66
|
+
if (typeof value !== "object" || value === null)
|
|
67
|
+
continue;
|
|
68
|
+
const module = value;
|
|
69
|
+
const meta = module.default;
|
|
70
|
+
if (typeof meta !== "object" || meta === null) {
|
|
71
|
+
problems.push(`${file} has no default export with the story's meta.`);
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
const title = meta.title;
|
|
75
|
+
if (typeof title !== "string" || title === "") {
|
|
76
|
+
problems.push(`${file} needs a \`title\` in its meta, so its story IDs match Storybook's.`);
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
let composed;
|
|
80
|
+
try {
|
|
81
|
+
composed = composeStories(module);
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
problems.push(`${file} could not be composed: ${errorMessage(error)}`);
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
for (const Story of Object.values(composed)) {
|
|
88
|
+
if (stories.has(Story.id)) {
|
|
89
|
+
problems.push(`${file} reuses the story ID "${Story.id}".`);
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
stories.set(Story.id, {
|
|
93
|
+
id: Story.id,
|
|
94
|
+
title,
|
|
95
|
+
name: Story.storyName,
|
|
96
|
+
description: storyDescription(Story.parameters),
|
|
97
|
+
hasPlay: Story.play !== undefined,
|
|
98
|
+
Story,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return { stories, problems };
|
|
103
|
+
}
|
|
104
|
+
export function storyInfo({ Story: _Story, ...info }) {
|
|
105
|
+
return info;
|
|
106
|
+
}
|
|
107
|
+
function storyDescription(parameters) {
|
|
108
|
+
const docs = parameters.docs;
|
|
109
|
+
const story = docs?.description?.story;
|
|
110
|
+
return typeof story === "string" ? story : undefined;
|
|
111
|
+
}
|
|
112
|
+
export function errorMessage(error) {
|
|
113
|
+
return error instanceof Error ? error.message : String(error);
|
|
114
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type DiffmapConfig } from "./diffmapConfig.js";
|
|
2
|
+
export type ConfigRead = {
|
|
3
|
+
file: string;
|
|
4
|
+
config: DiffmapConfig;
|
|
5
|
+
} | {
|
|
6
|
+
file: string;
|
|
7
|
+
error: string;
|
|
8
|
+
} | {
|
|
9
|
+
file: undefined;
|
|
10
|
+
config: DiffmapConfig;
|
|
11
|
+
};
|
|
12
|
+
export declare function readDiffmapConfig(specDir: string): Promise<ConfigRead>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { parseDiffmapConfig } from "./diffmapConfig.js";
|
|
4
|
+
export async function readDiffmapConfig(specDir) {
|
|
5
|
+
let dir = path.resolve(specDir);
|
|
6
|
+
for (;;) {
|
|
7
|
+
const file = path.join(dir, ".diffmap", "config.json");
|
|
8
|
+
const text = await fs.readFile(file, "utf8").catch(() => undefined);
|
|
9
|
+
if (text !== undefined) {
|
|
10
|
+
try {
|
|
11
|
+
return { file, config: parseDiffmapConfig(text) };
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
return {
|
|
15
|
+
file,
|
|
16
|
+
error: error instanceof Error ? error.message : String(error),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const parent = path.dirname(dir);
|
|
21
|
+
if (parent === dir)
|
|
22
|
+
return { file: undefined, config: {} };
|
|
23
|
+
dir = parent;
|
|
24
|
+
}
|
|
25
|
+
}
|
package/lib/serve.d.ts
CHANGED
|
@@ -47,6 +47,8 @@ export type StartServerInput = {
|
|
|
47
47
|
port?: number;
|
|
48
48
|
/** Called for each event the viewer page reports; the CLI forwards them to telemetry. */
|
|
49
49
|
onViewerEvent?: (event: ViewerEvent) => void;
|
|
50
|
+
/** How often the reload socket pings each page. */
|
|
51
|
+
pingIntervalMs?: number;
|
|
50
52
|
};
|
|
51
53
|
export declare function startServer(input: StartServerInput): Promise<Error | {
|
|
52
54
|
url: string;
|
package/lib/serve.js
CHANGED
|
@@ -6,11 +6,12 @@ import net from "node:net";
|
|
|
6
6
|
import { pipeline } from "node:stream";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
9
|
+
import { readDiffmapConfig } from "./readDiffmapConfig.js";
|
|
9
10
|
import { DiffmapFileError, DiffmapServeError } from "./errors.js";
|
|
10
11
|
import { findPage, isMarkdownFile } from "./spec.js";
|
|
11
12
|
import { parseViewerDocument } from "./parseViewer.js";
|
|
12
13
|
import { parseSpec, readSpec } from "./readSpec.js";
|
|
13
|
-
import { findUnlistedFiles, listDeltas, readChanges, readDocumentChanges, } from "./git.js";
|
|
14
|
+
import { findUnlistedFiles, listDeltas, readChanges, readDocumentChanges, readSnapshotReference, } from "./git.js";
|
|
14
15
|
import { registerRunningDiffmap, unregisterRunningDiffmap, } from "./registry.js";
|
|
15
16
|
/** What the local viewer may report to `/__diffmap/telemetry`, with each property's allowed values; nothing from the spec. */
|
|
16
17
|
const viewerEventSchema = {
|
|
@@ -27,6 +28,10 @@ const viewerEventSchema = {
|
|
|
27
28
|
viewer_error: { kind: ["document", "source", "excerpt", "changes"] },
|
|
28
29
|
server_closed: {},
|
|
29
30
|
};
|
|
31
|
+
// Proxies and port forwards close a WebSocket that carries nothing for about a minute, and the reload socket is quiet until a page changes.
|
|
32
|
+
const RELOAD_PING_MS = 25_000;
|
|
33
|
+
/** A WebSocket ping frame with no payload; browsers answer it on their own. */
|
|
34
|
+
const PING_FRAME = Buffer.from([0x89, 0x00]);
|
|
30
35
|
const packageRoot = path.resolve(fileURLToPath(new URL("..", import.meta.url)));
|
|
31
36
|
/** Written by `npm run build:viewer`; published with the package. */
|
|
32
37
|
const viewerDist = path.join(packageRoot, "viewer-dist");
|
|
@@ -99,6 +104,11 @@ export async function startServer(input) {
|
|
|
99
104
|
// As with Vite's HMR token, only a page this server sent can open the reload socket from a browser.
|
|
100
105
|
const reloadToken = randomBytes(16).toString("base64url");
|
|
101
106
|
let reloadTimer;
|
|
107
|
+
const pingTimer = setInterval(() => {
|
|
108
|
+
for (const client of reloadClients)
|
|
109
|
+
client.write(PING_FRAME);
|
|
110
|
+
}, input.pingIntervalMs ?? RELOAD_PING_MS);
|
|
111
|
+
pingTimer.unref();
|
|
102
112
|
let watcher;
|
|
103
113
|
let outline = pageOutline(read.spec.pages);
|
|
104
114
|
const changedPages = new Set();
|
|
@@ -178,6 +188,7 @@ export async function startServer(input) {
|
|
|
178
188
|
shuttingDown = true;
|
|
179
189
|
clearTimeout(inactivityTimer);
|
|
180
190
|
clearTimeout(reloadTimer);
|
|
191
|
+
clearInterval(pingTimer);
|
|
181
192
|
watcher?.close();
|
|
182
193
|
for (const client of reloadClients)
|
|
183
194
|
client.destroy();
|
|
@@ -228,6 +239,13 @@ export async function startServer(input) {
|
|
|
228
239
|
await serveSpec({ filePath, res });
|
|
229
240
|
return;
|
|
230
241
|
}
|
|
242
|
+
if (req.method === "GET" && pathname === "/__diffmap/config") {
|
|
243
|
+
const configRead = await readDiffmapConfig(specDir);
|
|
244
|
+
sendJson(res, JSON.stringify("error" in configRead
|
|
245
|
+
? { error: `${configRead.file}: ${configRead.error}` }
|
|
246
|
+
: { config: configRead.config }));
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
231
249
|
if (req.method === "GET" && pathname === "/__diffmap/document") {
|
|
232
250
|
await serveDocument({
|
|
233
251
|
filePath,
|
|
@@ -266,6 +284,7 @@ export async function startServer(input) {
|
|
|
266
284
|
workspaceRoot,
|
|
267
285
|
title,
|
|
268
286
|
filePath,
|
|
287
|
+
reloadToken,
|
|
269
288
|
shutdown,
|
|
270
289
|
res,
|
|
271
290
|
});
|
|
@@ -598,7 +617,9 @@ async function serveSpec(input) {
|
|
|
598
617
|
async function serveDocument(input) {
|
|
599
618
|
const page = await readPage(input.filePath, input.page);
|
|
600
619
|
if (page instanceof Error) {
|
|
601
|
-
sendJson(input.res, JSON.stringify(
|
|
620
|
+
sendJson(input.res, JSON.stringify(page instanceof DiffmapServeError
|
|
621
|
+
? { missingPage: input.page }
|
|
622
|
+
: { specError: page.message }));
|
|
602
623
|
return;
|
|
603
624
|
}
|
|
604
625
|
let cached = input.cache.get(page.file);
|
|
@@ -641,11 +662,22 @@ async function handleDiffmapRequest(input) {
|
|
|
641
662
|
if ((parsed.pathname === "/__diffmap/definition" ||
|
|
642
663
|
parsed.pathname === "/__diffmap/source") &&
|
|
643
664
|
input.method === "GET") {
|
|
644
|
-
|
|
645
|
-
const
|
|
646
|
-
const
|
|
647
|
-
|
|
648
|
-
|
|
665
|
+
const params = parsed.searchParams;
|
|
666
|
+
const rev = params.get("rev");
|
|
667
|
+
const snapshot = parsed.pathname === "/__diffmap/source" && rev !== null;
|
|
668
|
+
// Historical text does not need the TypeScript compiler or the worktree.
|
|
669
|
+
const definition = snapshot
|
|
670
|
+
? await readSnapshotReference(input.workspaceRoot, {
|
|
671
|
+
rev,
|
|
672
|
+
path: params.get("path") ?? "",
|
|
673
|
+
...(params.has("start")
|
|
674
|
+
? { start: Number(params.get("start")) }
|
|
675
|
+
: {}),
|
|
676
|
+
...(params.has("end") ? { end: Number(params.get("end")) } : {}),
|
|
677
|
+
})
|
|
678
|
+
: await import("./definitions.js").then(({ findDefinition, readSourceReference }) => parsed.pathname === "/__diffmap/source"
|
|
679
|
+
? readSourceReference(input.workspaceRoot, params)
|
|
680
|
+
: findDefinition(input.workspaceRoot, params));
|
|
649
681
|
input.res.statusCode = definition instanceof Error ? 400 : 200;
|
|
650
682
|
input.res.setHeader("content-type", "application/json; charset=utf-8");
|
|
651
683
|
input.res.end(JSON.stringify(definition instanceof Error
|
|
@@ -686,6 +718,8 @@ async function handleDiffmapRequest(input) {
|
|
|
686
718
|
title,
|
|
687
719
|
file: input.filePath,
|
|
688
720
|
pid: process.pid,
|
|
721
|
+
// The page holds the token from its HTML; a different one means this is a new server, so the page reloads.
|
|
722
|
+
reloadToken: input.reloadToken,
|
|
689
723
|
}));
|
|
690
724
|
return;
|
|
691
725
|
}
|
package/lib/share.js
CHANGED
|
@@ -35,8 +35,12 @@ export async function shareMarkdownFile(input) {
|
|
|
35
35
|
const pageChanges = await readDocumentChanges(input.workspaceRoot, page.document);
|
|
36
36
|
if (pageChanges instanceof Error)
|
|
37
37
|
return pageChanges;
|
|
38
|
-
for (const [rev, value] of pageChanges)
|
|
38
|
+
for (const [rev, value] of pageChanges) {
|
|
39
|
+
const previous = changes.get(rev);
|
|
40
|
+
if (previous?.sources !== undefined)
|
|
41
|
+
value.sources = { ...previous.sources, ...value.sources };
|
|
39
42
|
changes.set(rev, value);
|
|
43
|
+
}
|
|
40
44
|
// An uncommitted changes card shows the tree as it is when you share.
|
|
41
45
|
for (const { rev } of page.document.changeCards) {
|
|
42
46
|
if (changes.has(rev))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "product-doc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "Visual documents to explain systems, plan work, and review changes",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Tanishq Kancharla",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"bin.js",
|
|
16
16
|
"guide.md",
|
|
17
|
+
"guide",
|
|
17
18
|
"lib",
|
|
18
19
|
"viewer-dist"
|
|
19
20
|
],
|
|
@@ -22,6 +23,10 @@
|
|
|
22
23
|
".": {
|
|
23
24
|
"types": "./lib/index.d.ts",
|
|
24
25
|
"default": "./lib/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./preview": {
|
|
28
|
+
"types": "./lib/preview/index.d.ts",
|
|
29
|
+
"default": "./lib/preview/index.js"
|
|
25
30
|
}
|
|
26
31
|
},
|
|
27
32
|
"publishConfig": {
|
|
@@ -38,7 +43,7 @@
|
|
|
38
43
|
"prepublishOnly": "npm run typecheck && npm run lint && npm run format:check",
|
|
39
44
|
"release": "npm stage publish --access public",
|
|
40
45
|
"pretest": "npm run build:viewer && npm run build:lib",
|
|
41
|
-
"test": "DIFFMAP_TELEMETRY=0 tsx --test src/spec.test.ts src/cli.test.ts src/update.test.ts src/parseViewer.test.ts src/git.test.ts src/serve.test.ts src/gist/route.test.ts src/github/route.test.ts src/github/patch.test.ts src/github/fetchRepo.test.ts src/viewer/sourceHeader.test.ts src/viewer/comments.test.ts",
|
|
46
|
+
"test": "DIFFMAP_TELEMETRY=0 tsx --test src/spec.test.ts src/cli.test.ts src/update.test.ts src/parseViewer.test.ts src/git.test.ts src/serve.test.ts src/gist/route.test.ts src/github/route.test.ts src/github/patch.test.ts src/host/githubFailure.test.ts src/github/fetchRepo.test.ts src/viewer/sourceHeader.test.ts src/viewer/comments.test.ts src/preview/preview.test.tsx src/viewer/previews/previews.test.ts",
|
|
42
47
|
"typecheck": "tsc --noEmit",
|
|
43
48
|
"build": "vite build",
|
|
44
49
|
"build:gist": "vite build",
|
|
@@ -50,16 +55,17 @@
|
|
|
50
55
|
"@pierre/diffs": "1.6.1",
|
|
51
56
|
"beautiful-mermaid": "^1.1.3",
|
|
52
57
|
"errore": "^0.14.1",
|
|
53
|
-
"incur": "^0.
|
|
58
|
+
"incur": "^0.6.1",
|
|
54
59
|
"md4x": "^0.0.29"
|
|
55
60
|
},
|
|
56
61
|
"devDependencies": {
|
|
62
|
+
"@storybook/react": "^10.6.7",
|
|
57
63
|
"@types/node": "^22.20.1",
|
|
58
64
|
"@types/react": "19.2.18",
|
|
59
65
|
"@types/react-dom": "19.2.5",
|
|
60
66
|
"@vitejs/plugin-react": "^6.1.1",
|
|
61
67
|
"elkjs": "^0.11.1",
|
|
62
|
-
"maui": "npm:@tanishqkancharla/maui
|
|
68
|
+
"maui": "npm:@tanishqkancharla/maui@^0.0.72",
|
|
63
69
|
"motion": "^13.4.0",
|
|
64
70
|
"oxfmt": "^0.65.0",
|
|
65
71
|
"oxlint": "^1.80.0",
|
|
@@ -67,13 +73,24 @@
|
|
|
67
73
|
"react": "^19.2.8",
|
|
68
74
|
"react-aria-components": "^1.22.1",
|
|
69
75
|
"react-dom": "^19.2.8",
|
|
76
|
+
"storybook": "^10.6.7",
|
|
70
77
|
"tsx": "^4.23.13",
|
|
71
78
|
"typescript": "7.0.2",
|
|
72
79
|
"vite": "^8.2.2"
|
|
73
80
|
},
|
|
74
81
|
"peerDependencies": {
|
|
82
|
+
"@storybook/react": ">=8",
|
|
83
|
+
"react": ">=18",
|
|
75
84
|
"typescript": "^7.0.2"
|
|
76
85
|
},
|
|
86
|
+
"peerDependenciesMeta": {
|
|
87
|
+
"@storybook/react": {
|
|
88
|
+
"optional": true
|
|
89
|
+
},
|
|
90
|
+
"react": {
|
|
91
|
+
"optional": true
|
|
92
|
+
}
|
|
93
|
+
},
|
|
77
94
|
"engines": {
|
|
78
95
|
"node": ">=22"
|
|
79
96
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./html-CvoVzlT3.js";var n=[Object.freeze(JSON.parse('{"injectionSelector":"L:text.html -comment","name":"angular-expression","patterns":[{"include":"#ngExpression"}],"repository":{"arrayLiteral":{"begin":"\\\\[","beginCaptures":{"0":{"name":"meta.brace.square.ts"}},"end":"]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.array.literal.ts","patterns":[{"include":"#ngExpression"},{"include":"#punctuationComma"}]},"booleanLiteral":{"patterns":[{"match":"(?<![$.])\\\\btrue\\\\b(?!\\\\$)","name":"constant.language.boolean.true.ts"},{"match":"(?<![$.])\\\\bfalse\\\\b(?!\\\\$)","name":"constant.language.boolean.false.ts"}]},"expressionOperator":{"patterns":[{"captures":{"1":{"name":"keyword.operator.logical.ts"},"2":{"name":"entity.name.function.pipe.ng"}},"match":"((?<!\\\\|)\\\\|(?!\\\\|))\\\\s?([-$0-9A-Z_a-z]*)"},{"match":"(?<![$.])\\\\b(let)\\\\b(?!\\\\$)","name":"storage.type.ts"},{"match":"(?<![$.])\\\\b(await)\\\\b(?!\\\\$)","name":"keyword.control.flow.ts"},{"match":"(?<![$.])\\\\bdelete\\\\b(?!\\\\$)","name":"keyword.operator.expression.delete.ts"},{"match":"(?<![$.])\\\\bin\\\\b(?!\\\\$)","name":"keyword.operator.expression.in.ts"},{"match":"(?<![$.])\\\\bof\\\\b(?!\\\\$)","name":"keyword.operator.expression.of.ts"},{"match":"(?<![$.])\\\\bif\\\\b(?!\\\\$)","name":"keyword.control.if.ts"},{"match":"(?<![$.])\\\\belse\\\\b(?!\\\\$)","name":"keyword.control.else.ts"},{"match":"(?<![$.])\\\\bthen\\\\b(?!\\\\$)","name":"keyword.control.then.ts"},{"match":"(?<![$.])\\\\binstanceof\\\\b(?!\\\\$)","name":"keyword.operator.expression.instanceof.ts"},{"match":"(?<![$.])\\\\bnew\\\\b(?!\\\\$)","name":"keyword.operator.new.ts"},{"match":"(?<![$.])\\\\bvoid\\\\b(?!\\\\$)","name":"keyword.operator.expression.void.ts"},{"begin":"(?<![$.])\\\\bas\\\\b(?!\\\\$)","beginCaptures":{"0":{"name":"storage.type.as.ts"}},"end":"(?=$|[]\\"\'),:;}])","patterns":[{"include":"#type"}]},{"match":"(?:\\\\*|(?<!\\\\()/|[-%+])=","name":"keyword.operator.assignment.compound.ts"},{"match":"(?:[\\\\&^]|<<|>>>??|\\\\|)=","name":"keyword.operator.assignment.compound.bitwise.ts"},{"match":"<<|>>>?","name":"keyword.operator.bitwise.shift.ts"},{"match":"[!=]==?","name":"keyword.operator.comparison.ts"},{"match":"<=|>=|<>|[<>]","name":"keyword.operator.relational.ts"},{"match":"!|&&|\\\\?\\\\?|\\\\|\\\\|","name":"keyword.operator.logical.ts"},{"match":"[\\\\&^|~]","name":"keyword.operator.bitwise.ts"},{"match":"=","name":"keyword.operator.assignment.ts"},{"match":"--","name":"keyword.operator.decrement.ts"},{"match":"\\\\+\\\\+","name":"keyword.operator.increment.ts"},{"match":"[-%*+/]","name":"keyword.operator.arithmetic.ts"},{"captures":{"1":{"name":"keyword.operator.arithmetic.ts"}},"match":"(?<=[$_[:alnum:]])\\\\s*(/)(?![*/])"},{"include":"#typeofOperator"}]},"functionCall":{"begin":"(?=(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()","end":"(?<=\\\\))(?!(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()","patterns":[{"match":"\\\\?","name":"punctuation.accessor.ts"},{"match":"\\\\.","name":"punctuation.accessor.ts"},{"match":"([$_[:alpha:]][$_[:alnum:]]*)","name":"entity.name.function.ts"},{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#type"},{"include":"#punctuationComma"}]},{"include":"#parenExpression"}]},"functionParameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.ts"}},"name":"meta.parameters.ts","patterns":[{"include":"#decorator"},{"include":"#parameterName"},{"include":"#variableInitializer"},{"match":",","name":"punctuation.separator.parameter.ts"}]},"identifiers":{"patterns":[{"match":"([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*\\\\.\\\\s*prototype\\\\b(?!\\\\$))","name":"support.class.ts"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"constant.other.object.property.ts"},"3":{"name":"variable.other.object.property.ts"}},"match":"([!?]?\\\\.)\\\\s*(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"entity.name.function.ts"}},"match":"(?:([!?]?\\\\.)\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*=\\\\s*((async\\\\s+)|(function\\\\s*[(<])|(function\\\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\\\s*=>)|((<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)(\\\\s*:\\\\s*(.)*)?\\\\s*=>)))"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"constant.other.property.ts"}},"match":"([!?]?\\\\.)\\\\s*(\\\\p{upper}[$_\\\\d[:upper:]]*)(?![$_[:alnum:]])"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"variable.other.property.ts"}},"match":"([!?]?\\\\.)\\\\s*([$_[:alpha:]][$_[:alnum:]]*)"},{"captures":{"1":{"name":"constant.other.object.ts"},"2":{"name":"variable.other.object.ts"}},"match":"(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)"},{"match":"(\\\\p{upper}[$_\\\\d[:upper:]]*)(?![$_[:alnum:]])","name":"constant.character.other"},{"match":"[$_[:alpha:]][$_[:alnum:]]*","name":"variable.other.readwrite.ts"}]},"literal":{"name":"literal.ts","patterns":[{"include":"#numericLiteral"},{"include":"#booleanLiteral"},{"include":"#nullLiteral"},{"include":"#undefinedLiteral"},{"include":"#numericConstantLiteral"},{"include":"#arrayLiteral"},{"include":"#thisLiteral"}]},"ngExpression":{"name":"meta.expression.ng","patterns":[{"include":"#string"},{"include":"#literal"},{"include":"#ternaryExpression"},{"include":"#expressionOperator"},{"include":"#functionCall"},{"include":"#identifiers"},{"include":"#parenExpression"},{"include":"#punctuationComma"},{"include":"#punctuationSemicolon"},{"include":"#punctuationAccessor"}]},"nullLiteral":{"match":"(?<![$.])\\\\bnull\\\\b(?!\\\\$)","name":"constant.language.null.ts"},"numericConstantLiteral":{"patterns":[{"match":"(?<![$.])\\\\bNaN\\\\b(?!\\\\$)","name":"constant.language.nan.ts"},{"match":"(?<![$.])\\\\bInfinity\\\\b(?!\\\\$)","name":"constant.language.infinity.ts"}]},"numericLiteral":{"patterns":[{"match":"\\\\b(?<!\\\\$)0([Xx])\\\\h+\\\\b(?!\\\\$)","name":"constant.numeric.hex.ts"},{"match":"\\\\b(?<!\\\\$)0([Bb])[01]+\\\\b(?!\\\\$)","name":"constant.numeric.binary.ts"},{"match":"\\\\\\\\b(?<!\\\\$)0([Oo])?[0-7]+\\\\b(?!\\\\$)","name":"constant.numeric.octal.ts"},{"captures":{"0":{"name":"constant.numeric.decimal.ts"},"1":{"name":"meta.delimiter.decimal.period.ts"},"2":{"name":"meta.delimiter.decimal.period.ts"},"3":{"name":"meta.delimiter.decimal.period.ts"},"4":{"name":"meta.delimiter.decimal.period.ts"},"5":{"name":"meta.delimiter.decimal.period.ts"},"6":{"name":"meta.delimiter.decimal.period.ts"}},"match":"(?<!\\\\$)(?:\\\\b[0-9]+(\\\\.)[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+(\\\\.)[Ee][-+]?[0-9]+\\\\b|\\\\B(\\\\.)[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+(\\\\.)\\\\B|\\\\B(\\\\.)[0-9]+\\\\b|\\\\b[0-9]+\\\\b(?!\\\\.))(?!\\\\$)"}]},"parameterName":{"patterns":[{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"keyword.operator.rest.ts"},"4":{"name":"entity.name.function.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:\\\\s*\\\\b(readonly)\\\\s+)?(?:\\\\s*\\\\b(p(?:ublic|rivate|rotected))\\\\s+)?(\\\\.\\\\.\\\\.)?\\\\s*(?<![:=])([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(\\\\??)(?=\\\\s*(=\\\\s*((async\\\\s+)|(function\\\\s*[(<])|(function\\\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\\\s*=>)|((<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)(\\\\s*:\\\\s*(.)*)?\\\\s*=>)))|(:\\\\s*((<)|(\\\\(\\\\s*((\\\\))|(\\\\.\\\\.\\\\.)|([$_[:alnum:]]+\\\\s*(([,:=?])|(\\\\)\\\\s*=>))))))))"},{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"keyword.operator.rest.ts"},"4":{"name":"variable.parameter.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:\\\\s*\\\\b(readonly)\\\\s+)?(?:\\\\s*\\\\b(p(?:ublic|rivate|rotected))\\\\s+)?(\\\\.\\\\.\\\\.)?\\\\s*(?<![:=])([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(\\\\??)"}]},"parenExpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#ngExpression"},{"include":"#punctuationComma"}]},"punctuationAccessor":{"match":"(?:\\\\?|!?)\\\\.","name":"punctuation.accessor.ts"},"punctuationComma":{"match":",","name":"punctuation.separator.comma.ts"},"punctuationSemicolon":{"match":";","name":"punctuation.terminator.statement.ts"},"qstringDouble":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ts"}},"end":"(\\")|([^\\\\n\\\\\\\\])$","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"invalid.illegal.newline.ts"}},"name":"string.quoted.double.ts","patterns":[{"include":"#stringCharacterEscape"}]},"qstringSingle":{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ts"}},"end":"(\')|([^\\\\n\\\\\\\\])$","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"invalid.illegal.newline.ts"}},"name":"string.quoted.single.ts","patterns":[{"include":"#stringCharacterEscape"}]},"string":{"patterns":[{"include":"#qstringSingle"},{"include":"#qstringDouble"},{"include":"#templateLiteral"}]},"stringCharacterEscape":{"match":"\\\\\\\\(x\\\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)","name":"constant.character.escape.ts"},"templateLiteral":{"patterns":[{"include":"#templateLiteralCall"},{"begin":"([$_[:alpha:]][$_[:alnum:]]*)?(`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"},"2":{"name":"string.template.ts punctuation.definition.string.template.begin.ts"}},"contentName":"string.template.ts","end":"`","endCaptures":{"0":{"name":"string.template.ts punctuation.definition.string.template.end.ts"}},"patterns":[{"include":"#templateLiteralSubstitutionElement"},{"include":"#stringCharacterEscape"}]}]},"templateLiteralCall":{"patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([$_[:alpha:]][$_[:alnum:]]*)(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","end":"(?=`)","patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([$_[:alpha:]][$_[:alnum:]]*))","end":"(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","patterns":[{"include":"#support-function-call-identifiers"},{"match":"([$_[:alpha:]][$_[:alnum:]]*)","name":"entity.name.function.tagged-template.ts"}]},{"include":"#typeArguments"}]},{"begin":"([$_[:alpha:]][$_[:alnum:]]*)?\\\\s*(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"}},"end":"(?=`)","patterns":[{"include":"#typeArguments"}]}]},"templateLiteralSubstitutionElement":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.ts"}},"contentName":"meta.embedded.line.ts","end":"}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.ts"}},"name":"meta.template.expression.ts","patterns":[{"include":"#ngExpression"}]},"ternaryExpression":{"begin":"(?!\\\\?\\\\.\\\\s*\\\\D)(\\\\?)(?!\\\\?)","beginCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"end":"\\\\s*(:)","endCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"patterns":[{"include":"#ngExpression"}]},"thisLiteral":{"match":"(?<![$.])\\\\bthis\\\\b(?!\\\\$)","name":"variable.language.this.ts"},"type":{"name":"meta.type.ts","patterns":[{"include":"#string"},{"include":"#numericLiteral"},{"include":"#typeBuiltinLiterals"},{"include":"#typeTuple"},{"include":"#typeObject"},{"include":"#typeOperators"},{"include":"#typeFnTypeParameters"},{"include":"#typeParenOrFunctionParameters"},{"include":"#typeName"}]},"typeAnnotation":{"begin":":","beginCaptures":{"0":{"name":"keyword.operator.type.annotation.ts"}},"end":"(?=$|[]),;}]|//|\\")|(?==[^>])|(?<=[]$)>_}[:alpha:]])\\\\s*(?=\\\\{)","name":"meta.type.annotation.ts","patterns":[{"include":"#type"}]},"typeArguments":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#typeArgumentsBody"}]},"typeArgumentsBody":{"patterns":[{"captures":{"0":{"name":"keyword.operator.type.ts"}},"match":"(?<![$_[:alnum:]])(?:(?<=\\\\.\\\\.\\\\.)|(?<!\\\\.))(_)(?![$_[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.))"},{"include":"#type"},{"include":"#punctuationComma"}]},"typeBuiltinLiterals":{"match":"(?<![$.])\\\\b(this|true|false|undefined|null)\\\\b(?!\\\\$)","name":"support.type.builtin.ts"},"typeFnTypeParameters":{"patterns":[{"captures":{"1":{"name":"keyword.control.new.ts"}},"match":"(?<![$.])\\\\b(new)\\\\b(?=\\\\s*<)","name":"meta.type.constructor.ts"},{"begin":"(?<![$.])\\\\b(new)\\\\b\\\\s*(?=\\\\()","beginCaptures":{"1":{"name":"keyword.control.new.ts"}},"end":"(?<=\\\\))","name":"meta.type.constructor.ts","patterns":[{"include":"#functionParameters"}]},{"begin":"(?<=>)\\\\s*(?=\\\\()","end":"(?<=\\\\))","include":"#typeofOperator","name":"meta.type.function.ts","patterns":[{"include":"#functionParameters"}]},{"begin":"((?=\\\\(\\\\s*((\\\\))|(\\\\.\\\\.\\\\.)|([$_[:alnum:]]+\\\\s*(([,:=?])|(\\\\)\\\\s*=>))))))","end":"(?<=\\\\))","name":"meta.type.function.ts","patterns":[{"include":"#functionParameters"}]}]},"typeName":{"patterns":[{"captures":{"1":{"name":"entity.name.type.module.ts"},"2":{"name":"punctuation.accessor.ts"}},"match":"([$_[:alpha:]][$_[:alnum:]]*)\\\\s*([!?]?\\\\.)"},{"match":"[$_[:alpha:]][$_[:alnum:]]*","name":"entity.name.type.ts"}]},"typeObject":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"name":"meta.object.type.ts","patterns":[{"include":"#typeObjectMembers"}]},"typeObjectMembers":{"patterns":[{"include":"#typeAnnotation"},{"include":"#punctuationComma"},{"include":"#punctuationSemicolon"}]},"typeOperators":{"patterns":[{"include":"#typeofOperator"},{"match":"[\\\\&|]","name":"keyword.operator.type.ts"},{"match":"(?<![$.])\\\\bkeyof\\\\b(?!\\\\$)","name":"keyword.operator.expression.keyof.ts"}]},"typeParenOrFunctionParameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"name":"meta.type.paren.cover.ts","patterns":[{"include":"#type"},{"include":"#functionParameters"}]},"typeTuple":{"begin":"\\\\[","beginCaptures":{"0":{"name":"meta.brace.square.ts"}},"end":"]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.type.tuple.ts","patterns":[{"include":"#type"},{"include":"#punctuationComma"}]},"typeofOperator":{"match":"(?<![$.])\\\\btypeof\\\\b(?!\\\\$)","name":"keyword.operator.expression.typeof.ts"},"undefinedLiteral":{"match":"(?<![$.])\\\\bundefined\\\\b(?!\\\\$)","name":"constant.language.undefined.ts"},"variableInitializer":{"begin":"(?<![!=])(=)(?!=)","beginCaptures":{"1":{"name":"keyword.operator.assignment.ts"}},"end":"(?=$|[]),;}])","patterns":[{"include":"#ngExpression"}]}},"scopeName":"expression.ng"}'))],r=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment -expression.ng -meta.tag -source.css -source.js","name":"angular-let-declaration","patterns":[{"include":"#letDeclaration"}],"repository":{"letDeclaration":{"begin":"(@let)\\\\s+([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(=)?","beginCaptures":{"1":{"name":"storage.type.ng"},"2":{"name":"variable.other.constant.ng"},"3":{"name":"keyword.operator.assignment.ng"}},"end":"(?<=;)","name":"meta.definition.variable.ng","patterns":[{"include":"#letInitializer"}]},"letInitializer":{"begin":"\\\\s*","beginCaptures":{"0":{"name":"keyword.operator.assignment.ng"}},"contentName":"meta.definition.variable.initializer.ng","end":";","endCaptures":{"0":{"name":"punctuation.terminator.statement.ng"}},"patterns":[{"include":"expression.ng"}]}},"scopeName":"template.let.ng","embeddedLangs":["angular-expression"]}`)),i=[...n,r],a=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment","name":"angular-template","patterns":[{"include":"#interpolation"}],"repository":{"interpolation":{"begin":"\\\\{\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"contentName":"expression.ng","end":"}}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"patterns":[{"include":"expression.ng"}]}},"scopeName":"template.ng","embeddedLangs":["angular-expression"]}`)),o=[...n,a],s=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment -expression.ng -meta.tag -source.css -source.js","name":"angular-template-blocks","patterns":[{"include":"#block"}],"repository":{"block":{"begin":"(@)(if|else if|else|defer|placeholder|loading|error|switch|case|default|for|empty)\\\\s*","beginCaptures":{"1":{"patterns":[{"include":"#transition"}]},"2":{"name":"keyword.control.block.kind.ng"}},"end":"(?<=})","name":"control.block.ng","patterns":[{"include":"#blockExpression"},{"include":"#blockBody"}]},"blockBody":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"contentName":"control.block.body.ng","end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"patterns":[{"include":"text.html.derivative.ng"},{"include":"template.ng"}]},"blockExpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"contentName":"control.block.expression.ng","end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#blockExpressionOfClause"},{"include":"#blockExpressionLetBinding"},{"include":"#blockExpressionTrackClause"},{"include":"expression.ng"}]},"blockExpressionLetBinding":{"begin":"\\\\blet\\\\b","beginCaptures":{"0":{"name":"storage.type.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"blockExpressionOfClause":{"begin":"([$_[:alpha:]][$_[:alnum:]]*)\\\\s+(of)\\\\b","beginCaptures":{"1":{"name":"variable.other.constant.ng"},"2":{"name":"keyword.operator.expression.of.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"blockExpressionTrackClause":{"begin":"\\\\btrack\\\\b","beginCaptures":{"0":{"name":"keyword.control.track.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"transition":{"match":"@","name":"keyword.control.block.transition.ng"}},"scopeName":"template.blocks.ng","embeddedLangs":["angular-expression","angular-template"]}`)),c=[...n,...o,s],l=e({default:()=>d}),u=Object.freeze(JSON.parse(`{"displayName":"Angular HTML","injections":{"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"angular-html","patterns":[{"include":"text.html.basic#core-minus-invalid"},{"begin":"(</?)(\\\\w[^>\\\\s]*)(?<!/)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.unrecognized.html.derivative","patterns":[{"include":"text.html.basic#attribute"}]}],"scopeName":"text.html.derivative.ng","embeddedLangs":["html","angular-expression","angular-let-declaration","angular-template","angular-template-blocks"]}`)),d=[...t,...n,...i,...o,...c,u];export{i as a,o as i,l as n,n as o,c as r,d as t};
|