vitepress-openapi 0.2.16 → 0.2.17

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.
Files changed (256) hide show
  1. package/dist/{OAJSONEditor-BfaXXObm.js → OAJSONEditor-6uG2SFZK.js} +6 -6
  2. package/dist/{OAJSONEditor-fTqoBDiY.cjs → OAJSONEditor-D-Yhb6db.cjs} +4 -4
  3. package/dist/{angular-html-Dl5L_ndT.js → angular-html-BUsdri4u.js} +2 -2
  4. package/dist/angular-html-BzD9NQW5.cjs +1 -0
  5. package/dist/{angular-ts-ByuE09su.cjs → angular-ts-D1fX05LE.cjs} +1 -1
  6. package/dist/{angular-ts-DATG01QH.js → angular-ts-DLzsnsUB.js} +2 -2
  7. package/dist/{apl-REpE4EOr.cjs → apl-Bo4qJ495.cjs} +1 -1
  8. package/dist/{apl-B903Y1iI.js → apl-D9bD1gNv.js} +5 -5
  9. package/dist/{astro-B6XJ1XzP.js → astro-D8q6Gy7P.js} +5 -5
  10. package/dist/{astro-wd_9JORh.cjs → astro-DCjm-pbh.cjs} +1 -1
  11. package/dist/{blade-CJNVUHnO.cjs → blade-B6fombNo.cjs} +1 -1
  12. package/dist/{blade-DU7K6RH3.js → blade-Sc601tfi.js} +7 -7
  13. package/dist/{c-BFcbaMUO.js → c-CfqZXQ2T.js} +1 -1
  14. package/dist/c-Dn__oIvS.cjs +1 -0
  15. package/dist/{chapel-BDpe9hj3.cjs → chapel-D7VyqyYt.cjs} +1 -1
  16. package/dist/{chapel-CyR2VtwX.js → chapel-xSzmwfXQ.js} +1 -1
  17. package/dist/{cobol-CDgLba1H.cjs → cobol-CAKxSKZT.cjs} +1 -1
  18. package/dist/{cobol-ZUVB5fnm.js → cobol-CHAgZDLS.js} +2 -2
  19. package/dist/{coffee-D9j_lkLc.js → coffee-CeAuLo4O.js} +1 -1
  20. package/dist/{coffee-BxVt1U7S.cjs → coffee-JnCJAydr.cjs} +1 -1
  21. package/dist/{core-DCROFLpl.cjs → core-CNg5cW98.cjs} +3 -3
  22. package/dist/{core-ZiHa6_mm.js → core-s1UIPu_z.js} +114 -114
  23. package/dist/cpp-1aC9AELp.cjs +1 -0
  24. package/dist/{cpp-NN3vBjLe.js → cpp-DAEET6ev.js} +3 -3
  25. package/dist/{crystal-Cg-JMHNA.cjs → crystal-BfArRaXr.cjs} +1 -1
  26. package/dist/{crystal-BCSv9BMD.js → crystal-C1qz7UnE.js} +6 -6
  27. package/dist/css-BVuZPxTF.cjs +1 -0
  28. package/dist/{css-BDew7Z2b.js → css-BZAFXxqD.js} +1 -1
  29. package/dist/{dist-Dsa_0AoM.cjs → dist-CpZb0vTN.cjs} +5 -5
  30. package/dist/{dist-CN9hkg4t.js → dist-DV8PoRsD.js} +1 -1
  31. package/dist/{edge-DXKIJOV7.js → edge-CWZ5MU2M.js} +3 -3
  32. package/dist/{edge-CMIfIdja.cjs → edge-JzsrLjb_.cjs} +1 -1
  33. package/dist/{elixir-BjNct3TS.js → elixir-Crtqxz1W.js} +1 -1
  34. package/dist/{elixir-BmJsBojU.cjs → elixir-QzvqYFsV.cjs} +1 -1
  35. package/dist/{elm-CPQSACRc.js → elm-9rlZJ0du.js} +1 -1
  36. package/dist/{elm-rLsOgMwT.cjs → elm-DTTDc-PO.cjs} +1 -1
  37. package/dist/{engine-javascript-CtAw-nzg.js → engine-javascript-CoT6aZfI.js} +2 -2
  38. package/dist/{engine-javascript-B9hqc1Sn.cjs → engine-javascript-DWPOYZRs.cjs} +2 -2
  39. package/dist/{erb-CQUldNHj.js → erb-C6UwauYe.js} +2 -2
  40. package/dist/{erb-CiTsuMX9.cjs → erb-DPWXQYaP.cjs} +1 -1
  41. package/dist/generate-BAgVJTNQ.js +103 -0
  42. package/dist/generate-BVoluROJ.cjs +1 -0
  43. package/dist/generateMarkdown-BYnrcWs0.js +692 -0
  44. package/dist/generateMarkdown-DyJdABwj.cjs +31 -0
  45. package/dist/{git-rebase-CjFDc1kk.cjs → git-rebase-Cwp0uWvv.cjs} +1 -1
  46. package/dist/{git-rebase-5OapP1hA.js → git-rebase-xIgRvJ_q.js} +1 -1
  47. package/dist/{glimmer-js-DJj4duzR.js → glimmer-js-CNGdvMhA.js} +4 -4
  48. package/dist/{glimmer-js-CPs3ZMWA.cjs → glimmer-js-Df_yNNoE.cjs} +1 -1
  49. package/dist/{glimmer-ts-drtM04VL.js → glimmer-ts-Dq4P7Mkf.js} +4 -4
  50. package/dist/{glimmer-ts-CuERAYsk.cjs → glimmer-ts-DsAOmOGY.cjs} +1 -1
  51. package/dist/glsl-CjiF-xkH.cjs +1 -0
  52. package/dist/{glsl-DPV3oxNS.js → glsl-DZfvb15l.js} +2 -2
  53. package/dist/{graphql-b3MqwVzn.js → graphql-CZmb-US9.js} +5 -5
  54. package/dist/graphql-r7AX53Pp.cjs +1 -0
  55. package/dist/{hack-Dnr29SMc.cjs → hack-Cs2ncrxq.cjs} +1 -1
  56. package/dist/{hack-BV8Fk8S0.js → hack-DIIRgI4h.js} +2 -2
  57. package/dist/haml-3bvHwbYf.cjs +1 -0
  58. package/dist/{haml-DYADyojV.js → haml-aboBnjLl.js} +3 -3
  59. package/dist/{handlebars-XYDCrTNM.cjs → handlebars-C7PZ80pQ.cjs} +1 -1
  60. package/dist/{handlebars-D7Wg8zxD.js → handlebars-Z3oHMxHt.js} +4 -4
  61. package/dist/html-CtaiB3Oi.cjs +1 -0
  62. package/dist/{html-oFWSlHLM.js → html-Cz0Xqdyq.js} +3 -3
  63. package/dist/{html-derivative-B_93GY2L.cjs → html-derivative-BYOQo3PG.cjs} +1 -1
  64. package/dist/{html-derivative-7yg_dBt4.js → html-derivative-BjrHnqif.js} +1 -1
  65. package/dist/{http-BpWcfGzO.cjs → http-BA9nOlAq.cjs} +1 -1
  66. package/dist/{http-C-Hd6Lz4.js → http-ieHS9PeS.js} +4 -4
  67. package/dist/{hurl-D53hSFo7.cjs → hurl-DFGEnvSS.cjs} +1 -1
  68. package/dist/{hurl-DjXOdham.js → hurl-Dg9NkXrC.js} +2 -2
  69. package/dist/{java-CcAzK28d.js → java-DCXCvNHA.js} +1 -1
  70. package/dist/java-DTzZZzv7.cjs +1 -0
  71. package/dist/javascript-DOKgRqe8.cjs +1 -0
  72. package/dist/{javascript-CFpHKvG0.js → javascript-f9cb-Pl7.js} +1 -1
  73. package/dist/{jinja-BzmRQBYE.js → jinja-B2DAjJOY.js} +1 -1
  74. package/dist/{jinja-DhuEKxK7.cjs → jinja-DE8g1bjX.cjs} +1 -1
  75. package/dist/{jison-CfNmROg3.js → jison-5BvvygJS.js} +1 -1
  76. package/dist/{jison-DkP6w3Kb.cjs → jison-BCQciWJO.cjs} +1 -1
  77. package/dist/js-yaml-B-Up3zwX.cjs +28 -0
  78. package/dist/{js-yaml-xxJ42vHJ.js → js-yaml-o4oD1Gp3.js} +1 -1
  79. package/dist/json-BcxNDt_H.cjs +1 -0
  80. package/dist/{json-BUhydBtV.js → json-DZfYi9f2.js} +1 -1
  81. package/dist/{jsx-BgXsA-DL.js → jsx-D0ksVAAA.js} +1 -1
  82. package/dist/jsx-DxOBIFYM.cjs +1 -0
  83. package/dist/{julia-CFY_QNYf.cjs → julia-B3y7weJz.cjs} +1 -1
  84. package/dist/{julia-QFUzXXyx.js → julia-Dk4vCuW5.js} +4 -4
  85. package/dist/{just-unRxJYdl.cjs → just-B7ftAo6t.cjs} +1 -1
  86. package/dist/{just-BQQqo7uc.js → just-BDbjiXnk.js} +5 -5
  87. package/dist/{latex-61rhD9l1.js → latex-CC_8gzv9.js} +1 -1
  88. package/dist/{latex-CMXzYJ7A.cjs → latex-QeOQCy8M.cjs} +1 -1
  89. package/dist/{liquid-Dlc1A5fD.cjs → liquid-BVZIda1i.cjs} +1 -1
  90. package/dist/{liquid-DJCM2ZDj.js → liquid-CJVpPXmh.js} +4 -4
  91. package/dist/llms-DWks2vGp.cjs +26 -0
  92. package/dist/llms-yFQ0insM.js +418 -0
  93. package/dist/lua-BoAqNcbB.cjs +1 -0
  94. package/dist/{lua-CQxTc8eB.js → lua-Bwwgpolt.js} +2 -2
  95. package/dist/{marko-lDIEsg9U.cjs → marko-CX9I4GhY.cjs} +1 -1
  96. package/dist/{marko-Dd0qsahM.js → marko-z-UpeqN9.js} +3 -3
  97. package/dist/{mdc-_80um6kj.js → mdc-ANp6h8jQ.js} +2 -2
  98. package/dist/{mdc-CyWtd_UH.cjs → mdc-BPd7ZDIZ.cjs} +1 -1
  99. package/dist/{nginx-DDrDrYzT.js → nginx-BUK9HsFk.js} +1 -1
  100. package/dist/{nginx-Bys-Mt_F.cjs → nginx-CLECRmW5.cjs} +1 -1
  101. package/dist/{nim-B-WnW_TA.cjs → nim-4G662efB.cjs} +1 -1
  102. package/dist/{nim-BKM9BEwv.js → nim-pupbS7ww.js} +6 -6
  103. package/dist/{useOpenapi-Dr3AneGd.js → normalizeExamples-BFR42ENV.js} +4055 -2184
  104. package/dist/normalizeExamples-DNaOGXm0.cjs +45 -0
  105. package/dist/{org-DFPWKQMZ.js → org-B8vjAQ9v.js} +26 -26
  106. package/dist/{org-BQi9zqMo.cjs → org-XYh7PPQk.cjs} +1 -1
  107. package/dist/{perl-BIiCtWTQ.js → perl-ChiZYWB8.js} +5 -5
  108. package/dist/{perl-CkLK5ExR.cjs → perl-Qi4toP6W.cjs} +1 -1
  109. package/dist/{php-CgjckyHQ.cjs → php-93axekrF.cjs} +1 -1
  110. package/dist/{php-DOw5HPZo.js → php-JTDYSOFN.js} +6 -6
  111. package/dist/{pug-ZRJG_B3i.cjs → pug-BHWWe-s7.cjs} +1 -1
  112. package/dist/{pug-BGkLdaFt.js → pug-BR1NlFnA.js} +3 -3
  113. package/dist/{qml-BHFWpY8E.cjs → qml-71TJR8lk.cjs} +1 -1
  114. package/dist/{qml-Bpj0emxI.js → qml-BBCxB4Da.js} +1 -1
  115. package/dist/r-BVapaf2o.cjs +1 -0
  116. package/dist/{r-beK_-64Q.js → r-u-VAz7bR.js} +1 -1
  117. package/dist/{razor-Q3MoMGDn.js → razor-Cqi5RzG6.js} +1 -1
  118. package/dist/{razor-COBqjWAJ.cjs → razor-DMdT60zm.cjs} +1 -1
  119. package/dist/{regexp-BsdKen3m.js → regexp-9Pkh3Nf7.js} +1 -1
  120. package/dist/regexp-CwHm4hi_.cjs +1 -0
  121. package/dist/{rst-B0t1spY-.cjs → rst-BtwmHjj9.cjs} +1 -1
  122. package/dist/{rst-DpM5_nag.js → rst-CLZRH5oU.js} +6 -6
  123. package/dist/{ruby-kbh8ViY5.js → ruby-BZUQEFGQ.js} +12 -12
  124. package/dist/{ruby-CsFQlb64.cjs → ruby-DuGe7Fs0.cjs} +1 -1
  125. package/dist/{sas-CnYUys8b.cjs → sas-B7hIWqYI.cjs} +1 -1
  126. package/dist/{sas-BgQhrf78.js → sas-BO2zDPuE.js} +1 -1
  127. package/dist/scss-BpK0m8eZ.cjs +1 -0
  128. package/dist/{scss-NPDrxHVt.js → scss-OFCrSwaR.js} +2 -2
  129. package/dist/{shellscript-DhwNgJpI.js → shellscript-BNTFxSmg.js} +1 -1
  130. package/dist/shellscript-KJDkFDLp.cjs +1 -0
  131. package/dist/{shellsession-BzIHueWc.js → shellsession-B5j5FuGA.js} +1 -1
  132. package/dist/{shellsession-D7Pf_B_j.cjs → shellsession-DWalcvtJ.cjs} +1 -1
  133. package/dist/{soy-Bacl__9y.cjs → soy-BQn3ItqC.cjs} +1 -1
  134. package/dist/{soy-xHdJtla5.js → soy-C2Q794LP.js} +1 -1
  135. package/dist/{sql-AGUE5-dk.js → sql-8JHRpHTE.js} +1 -1
  136. package/dist/sql-C5y5nUuw.cjs +1 -0
  137. package/dist/{stata-BpsgLaw1.js → stata-BrNyU7bS.js} +1 -1
  138. package/dist/{stata-ByZ8yj3l.cjs → stata-DyBO95gA.cjs} +1 -1
  139. package/dist/{surrealql-Dfwdqk76.cjs → surrealql-CAAIvFqO.cjs} +1 -1
  140. package/dist/{surrealql-CE6SK0JG.js → surrealql-DgN6gei3.js} +1 -1
  141. package/dist/{svelte-DRtnTFsc.cjs → svelte-DGjw_UH1.cjs} +1 -1
  142. package/dist/{svelte-B8Y6hosE.js → svelte-FhQBX-tv.js} +3 -3
  143. package/dist/{templ-BofvAMnQ.js → templ-BUggPx5p.js} +2 -2
  144. package/dist/{templ-BIgW0e2S.cjs → templ-Cxuj5rzV.cjs} +1 -1
  145. package/dist/tex-B3aY5DbH.cjs +1 -0
  146. package/dist/{tex-CLtxJoaQ.js → tex-BlOdu2Xy.js} +2 -2
  147. package/dist/{ts-tags-Cv2SdymF.cjs → ts-tags-BymwG1F9.cjs} +1 -1
  148. package/dist/{ts-tags-DRRvATIb.js → ts-tags-DZBZzNkR.js} +7 -7
  149. package/dist/tsx-DgA8B92F.cjs +1 -0
  150. package/dist/{tsx--6NZUZt2.js → tsx-mByJmMSt.js} +1 -1
  151. package/dist/{twig-BTg98s4P.js → twig--2v8RtVi.js} +5 -5
  152. package/dist/{twig-C8K9fEv7.cjs → twig-CWwcCfHy.cjs} +1 -1
  153. package/dist/types/src/cli.d.ts +1 -0
  154. package/dist/types/src/components/Common/Highlight/OAShiki.vue.d.ts +2 -2
  155. package/dist/types/src/components/Common/Highlight/OAVueJsonPretty.vue.d.ts +2 -2
  156. package/dist/types/src/components/Common/OACodeBlock.vue.d.ts +2 -2
  157. package/dist/types/src/components/Common/OACodeValue.vue.d.ts +2 -2
  158. package/dist/types/src/components/Common/OAJSONEditor.vue.d.ts +2 -2
  159. package/dist/types/src/components/Parameter/OAParameterAttribute.vue.d.ts +2 -2
  160. package/dist/types/src/components/Playground/OAPlaygroundParameterInput.vue.d.ts +2 -2
  161. package/dist/types/src/components/ui/badge/index.d.ts +1 -1
  162. package/dist/types/src/components/ui/button/index.d.ts +1 -1
  163. package/dist/types/src/index.d.ts +18 -3
  164. package/dist/types/src/lib/codeSamples/buildOperationRequest.d.ts +15 -0
  165. package/dist/types/src/lib/codeSamples/buildRequest.d.ts +6 -0
  166. package/dist/types/src/lib/constants.d.ts +3 -0
  167. package/dist/types/src/lib/markdown/generateMarkdown.d.ts +111 -0
  168. package/dist/types/src/lib/markdown/llmsSite.d.ts +137 -0
  169. package/dist/types/src/lib/markdown/markdownUtils.d.ts +35 -0
  170. package/dist/types/src/lib/markdown/operationToMarkdown.d.ts +66 -0
  171. package/dist/types/src/lib/parser/getSchemaUi.d.ts +1 -0
  172. package/dist/types/src/node/cli.d.ts +5 -0
  173. package/dist/types/src/node/generate.d.ts +38 -0
  174. package/dist/types/src/node/llms.d.ts +99 -0
  175. package/dist/types/src/node/llmsPlugin.d.ts +10 -0
  176. package/dist/typescript-BWfpZQ2O.cjs +1 -0
  177. package/dist/{typescript-DBKp3fLc.js → typescript-DF15DAwn.js} +1 -1
  178. package/dist/{typst-wzR7m38K.cjs → typst-BEqsnZtv.cjs} +1 -1
  179. package/dist/{typst-BMPcWpxF.js → typst-uhRd3eU5.js} +29 -29
  180. package/dist/useSidebar-B2LH297o.cjs +6 -0
  181. package/dist/useSidebar-CoebjdWM.js +313 -0
  182. package/dist/vitepress-openapi.cli.cjs.js +22 -0
  183. package/dist/vitepress-openapi.cli.es.js +67 -0
  184. package/dist/vitepress-openapi.client.cjs.js +1 -1
  185. package/dist/vitepress-openapi.client.es.js +7 -6
  186. package/dist/vitepress-openapi.node.cjs.js +1 -1
  187. package/dist/vitepress-openapi.node.es.js +47 -2
  188. package/dist/vitepress-openapi.vue.cjs.js +1 -1
  189. package/dist/vitepress-openapi.vue.es.js +4 -3
  190. package/dist/{vue-DLzq6csB.cjs → vue-BQl-5Fd6.cjs} +1 -1
  191. package/dist/{vue-DWAybQg2.js → vue-CSJXDMn1.js} +6 -6
  192. package/dist/{vue-CPzdKbEl.js → vue-DIM9jH1x.js} +2483 -4670
  193. package/dist/vue-DwsEa2e4.cjs +7 -0
  194. package/dist/{vue-html-IeY1Py_m.cjs → vue-html-AqZQgz92.cjs} +1 -1
  195. package/dist/{vue-html-BSam2lRJ.js → vue-html-DYm4V3uo.js} +1 -1
  196. package/dist/{vue-vine-icUsAH0H.js → vue-vine-BLrCVeql.js} +3 -3
  197. package/dist/{vue-vine-Db6Q7xvd.cjs → vue-vine-C1QCIUv6.cjs} +1 -1
  198. package/dist/xml-DbN80t5u.cjs +1 -0
  199. package/dist/{xml-Cj_af9Z1.js → xml-Df1jLF7H.js} +2 -2
  200. package/dist/{xsl-DblyyLAc.cjs → xsl-7fKL5NbN.cjs} +1 -1
  201. package/dist/{xsl-D-tBFomZ.js → xsl-C2LJLnIq.js} +1 -1
  202. package/dist/{yaml-D4q2Gm3x.js → yaml-DABI1u00.js} +1 -1
  203. package/dist/yaml-DNB0t8B9.cjs +1 -0
  204. package/package.json +4 -1
  205. package/src/cli.ts +6 -0
  206. package/src/composables/useSidebar.ts +1 -1
  207. package/src/index.ts +26 -5
  208. package/src/lib/codeSamples/buildHarRequest.ts +5 -0
  209. package/src/lib/codeSamples/buildOperationRequest.ts +52 -0
  210. package/src/lib/codeSamples/buildRequest.ts +49 -28
  211. package/src/lib/constants.ts +5 -0
  212. package/src/lib/examples/getSchemaUiJson.ts +1 -1
  213. package/src/lib/markdown/generateMarkdown.ts +451 -0
  214. package/src/lib/markdown/llmsSite.ts +475 -0
  215. package/src/lib/markdown/markdownUtils.ts +104 -0
  216. package/src/lib/markdown/operationToMarkdown.ts +834 -0
  217. package/src/lib/parser/generateCodeSamples.ts +6 -31
  218. package/src/lib/parser/generateMissingOperationIds.ts +1 -1
  219. package/src/lib/parser/generateMissingSummary.ts +1 -1
  220. package/src/lib/parser/generateMissingTags.ts +1 -1
  221. package/src/lib/parser/generateRequestBodyUi.ts +1 -1
  222. package/src/lib/parser/generateResponseUi.ts +1 -1
  223. package/src/lib/parser/generateSecurityUi.ts +1 -1
  224. package/src/lib/parser/getSchemaUi.ts +7 -3
  225. package/src/lib/sidebar/generateSidebarItemsByPaths.ts +1 -1
  226. package/src/lib/spec/createOpenApiSpec.ts +1 -1
  227. package/src/node/cli.ts +107 -0
  228. package/src/node/generate.ts +207 -0
  229. package/src/node/llms.ts +431 -0
  230. package/src/node/llmsPlugin.ts +29 -0
  231. package/dist/angular-html-Dk2XGZ_t.cjs +0 -1
  232. package/dist/c-DkEd8-YD.cjs +0 -1
  233. package/dist/cpp-BPWm4FiD.cjs +0 -1
  234. package/dist/css-Cca861pZ.cjs +0 -1
  235. package/dist/glsl-vKFvWHtP.cjs +0 -1
  236. package/dist/graphql-DG0SCdKc.cjs +0 -1
  237. package/dist/haml-cdCU_QQV.cjs +0 -1
  238. package/dist/html-DOohh95v.cjs +0 -1
  239. package/dist/java-YSQdp8jH.cjs +0 -1
  240. package/dist/javascript-CcZ4Z9Pe.cjs +0 -1
  241. package/dist/js-yaml-D7HstSVO.cjs +0 -28
  242. package/dist/json-BuUbxxHW.cjs +0 -1
  243. package/dist/jsx-LBqujUwg.cjs +0 -1
  244. package/dist/lua-De5jN6Ym.cjs +0 -1
  245. package/dist/r-CP5u50Ge.cjs +0 -1
  246. package/dist/regexp-Cquj00oh.cjs +0 -1
  247. package/dist/scss-FW7lpUTk.cjs +0 -1
  248. package/dist/shellscript-C1Cbf_Wu.cjs +0 -1
  249. package/dist/sql-BCbZO9Vk.cjs +0 -1
  250. package/dist/tex-UEva1VjO.cjs +0 -1
  251. package/dist/tsx-CRyT9Jau.cjs +0 -1
  252. package/dist/typescript-BbUbA8EZ.cjs +0 -1
  253. package/dist/useOpenapi-Bt0dpttK.cjs +0 -50
  254. package/dist/vue-Da82SaTm.cjs +0 -7
  255. package/dist/xml-An_1AySF.cjs +0 -1
  256. package/dist/yaml-BZ7EODQj.cjs +0 -1
@@ -0,0 +1,431 @@
1
+ import type { MarkdownFile } from '../lib/markdown/generateMarkdown'
2
+ import type { LlmsPageMode, LlmsSiteEntry, LlmsSiteOptions } from '../lib/markdown/llmsSite'
3
+ import type { OpenAPIDocument } from '../types'
4
+ import type { SpecSource } from './generate'
5
+ import { buildLlmsSiteEntry, getLlmsContentType, getLlmsRequestPath, joinUrl, normalizeRoute, renderLlmsPage } from '../lib/markdown/llmsSite'
6
+ import { escapeLinkLabel } from '../lib/markdown/markdownUtils'
7
+ import { parseSpec } from '../lib/utils/parseSpec'
8
+ import { loadNodeModules, loadSpec, writeFilesSafely } from './generate'
9
+
10
+ /** A built page, as passed to `resolvePage`. */
11
+ export interface LlmsPage {
12
+ /** Route relative to the site root, without extension, e.g. `tests/schemas`. */
13
+ route: string
14
+ /** Params of a dynamic route (`[param].paths.js`). */
15
+ params?: Record<string, any>
16
+ }
17
+
18
+ /** What a page renders: its spec (or the entry's spec) and which part of it. */
19
+ export interface LlmsResolvedPage extends SpecSource {
20
+ /**
21
+ * `'spec'`: every operation; `'operation'`: `operationId`; `'introduction'`: the overview; `'tag'`: `tag`.
22
+ * @default 'spec'
23
+ */
24
+ mode?: LlmsPageMode
25
+ operationId?: string
26
+ tag?: string
27
+ /** Overrides the entry's `maxSize` for this page. */
28
+ maxSize?: number | false
29
+ }
30
+
31
+ export interface LlmsFilesOptions extends Omit<LlmsSiteOptions, 'operationRoute'>, SpecSource {
32
+ /** Route of the operation pages of `spec`, with an `{operationId}` placeholder. */
33
+ operationRoute?: string
34
+ /**
35
+ * Called for every built page. Return what the page renders to write `{route}.{extension}`,
36
+ * or `undefined` to skip it. For pages that render their own spec (e.g. from route params).
37
+ */
38
+ resolvePage?: (page: LlmsPage) => LlmsResolvedPage | undefined | Promise<LlmsResolvedPage | undefined>
39
+ /**
40
+ * Heading of the `llms.txt` section listing the pages of `resolvePage`.
41
+ * @default 'Pages'
42
+ */
43
+ title?: string
44
+ }
45
+
46
+ /** One options object, or several (each with its own spec), merged into one `llms.txt`. */
47
+ export type LlmsFilesInput = LlmsFilesOptions | LlmsFilesOptions[]
48
+
49
+ /**
50
+ * The parts of VitePress' `SiteConfig` used here (`buildEnd` receives the full one).
51
+ */
52
+ export interface LlmsSiteConfig {
53
+ outDir: string
54
+ /** Source pages, e.g. `operations/getPet.md` (dynamic routes included). */
55
+ pages?: string[]
56
+ /** Resolved dynamic routes: `path` is the page (e.g. `tests/schemas.md`). */
57
+ dynamicRoutes?: { routes?: Array<{ path: string, params?: Record<string, any> }> }
58
+ rewrites?: { map?: Record<string, string | undefined> }
59
+ site?: { base?: string }
60
+ }
61
+
62
+ export interface LlmsMiddlewareRequest {
63
+ url?: string
64
+ /** Set by Connect before any middleware: the URL as sent, before rewrites change `url`. */
65
+ originalUrl?: string
66
+ method?: string
67
+ headers?: Record<string, string | string[] | undefined>
68
+ }
69
+ interface MiddlewareResponse {
70
+ statusCode: number
71
+ setHeader: (name: string, value: string) => unknown
72
+ end: (body?: string) => unknown
73
+ }
74
+
75
+ interface ResolvedPageFile extends MarkdownFile {
76
+ title: string
77
+ url: string
78
+ entry: number
79
+ }
80
+
81
+ interface BuildContext {
82
+ siteConfig: LlmsSiteConfig | undefined
83
+ base: string
84
+ extension: 'md' | 'txt'
85
+ hasPage: (route: string) => boolean | Promise<boolean>
86
+ loadSpec: (source: SpecSource) => Promise<OpenAPIDocument>
87
+ }
88
+
89
+ const RE_LLMS_FILE = /\.(?:md|txt)$/
90
+ const RE_RAW_ACCEPT = /text\/markdown|text\/plain|text\/html|\*\/\*/
91
+ // Fetch destinations of a raw file request: navigation, `fetch()`/curl-like, or frames.
92
+ const RAW_FETCH_DESTS = new Set(['document', 'empty', 'iframe', 'frame'])
93
+
94
+ function getHeader(req: LlmsMiddlewareRequest, name: string): string | undefined {
95
+ const value = req.headers?.[name]
96
+ return Array.isArray(value) ? value[0] : value
97
+ }
98
+
99
+ /**
100
+ * The path of a request for a raw `.md`/`.txt` file, or `undefined` for anything else.
101
+ * In dev, VitePress loads each page as a module from the same `.md` URL (always with a `?t=`
102
+ * query, see `pathToFile`), and Vite adds queries like `?import` or `?v=`: requests with a query,
103
+ * script-like fetch destinations or a non-text `Accept` are left to Vite.
104
+ * Uses `originalUrl` (the URL as sent), since VitePress rewrites change `url`.
105
+ */
106
+ export function getRawFileRequestUrl(req: LlmsMiddlewareRequest): string | undefined {
107
+ const url = req.originalUrl ?? req.url
108
+ if ((req.method !== 'GET' && req.method !== 'HEAD') || !url || url.includes('?')) {
109
+ return undefined
110
+ }
111
+ const pathname = url.split('#')[0]
112
+ if (!RE_LLMS_FILE.test(pathname)) {
113
+ return undefined
114
+ }
115
+ const dest = getHeader(req, 'sec-fetch-dest')
116
+ if (dest && !RAW_FETCH_DESTS.has(dest)) {
117
+ return undefined
118
+ }
119
+ const accept = getHeader(req, 'accept')
120
+ if (accept && !RE_RAW_ACCEPT.test(accept)) {
121
+ return undefined
122
+ }
123
+ return pathname
124
+ }
125
+ const LLMS_FILES = new Set(['llms.txt', 'llms-full.txt'])
126
+
127
+ function toEntries(input: LlmsFilesInput): LlmsFilesOptions[] {
128
+ const entries = Array.isArray(input) ? input : [input]
129
+ if (!entries.length) {
130
+ throw new Error('[vitepress-openapi] At least one llms options object is required.')
131
+ }
132
+ for (const entry of entries) {
133
+ if (!entry.operationRoute && !entry.resolvePage) {
134
+ throw new Error('[vitepress-openapi] Each llms options object needs `operationRoute` or `resolvePage`.')
135
+ }
136
+ }
137
+ return entries
138
+ }
139
+
140
+ function hasSpecSource(source: SpecSource): boolean {
141
+ return !!(source.spec || source.specPath || source.specUrl)
142
+ }
143
+
144
+ /**
145
+ * Built pages with their dynamic route params (rewrites applied), or `undefined` when the config lists no pages.
146
+ */
147
+ export function getSitePages(siteConfig: LlmsSiteConfig | undefined): LlmsPage[] | undefined {
148
+ if (!siteConfig?.pages?.length) {
149
+ return undefined
150
+ }
151
+ const rewrites = siteConfig.rewrites?.map ?? {}
152
+ const params = new Map((siteConfig.dynamicRoutes?.routes ?? []).map(route => [route.path, route.params]))
153
+ return siteConfig.pages.map(page => ({ route: normalizeRoute(rewrites[page] ?? page), params: params.get(page) }))
154
+ }
155
+
156
+ /**
157
+ * Routes of the built pages (rewrites applied), or `undefined` when the config lists no pages.
158
+ */
159
+ export function getPageRoutes(siteConfig: LlmsSiteConfig | undefined): Set<string> | undefined {
160
+ const pages = getSitePages(siteConfig)
161
+ return pages ? new Set(pages.map(page => page.route)) : undefined
162
+ }
163
+
164
+ /**
165
+ * Loads specs once per URL or path. A failed load stays cached, so it is not retried.
166
+ */
167
+ function createSpecLoader(modules: Awaited<ReturnType<typeof loadNodeModules>>) {
168
+ const cache = new Map<string, Promise<OpenAPIDocument>>()
169
+ return (source: SpecSource): Promise<OpenAPIDocument> => {
170
+ if (source.spec) {
171
+ return Promise.resolve(parseSpec(source.spec))
172
+ }
173
+ const key = source.specUrl ? `url:${source.specUrl}` : `path:${modules.path.resolve(source.specPath ?? '')}`
174
+ if (!cache.has(key)) {
175
+ cache.set(key, loadSpec(source, modules))
176
+ }
177
+ return cache.get(key)!
178
+ }
179
+ }
180
+
181
+ /** Options of an entry that apply to rendering (no routes, spec sources or `llms.txt` settings). */
182
+ function getRenderOptions(entry: LlmsFilesOptions) {
183
+ const {
184
+ spec: _spec,
185
+ specPath: _specPath,
186
+ specUrl: _specUrl,
187
+ operationRoute: _operationRoute,
188
+ specRoutes: _specRoutes,
189
+ introductionRoute: _introductionRoute,
190
+ tagRoute: _tagRoute,
191
+ tagParam: _tagParam,
192
+ extension: _extension,
193
+ llmsTxt: _llmsTxt,
194
+ resolvePage: _resolvePage,
195
+ title: _title,
196
+ ...renderOptions
197
+ } = entry
198
+ return renderOptions
199
+ }
200
+
201
+ async function renderResolvedPage(entry: LlmsFilesOptions, index: number, page: LlmsPage, ctx: BuildContext): Promise<ResolvedPageFile | undefined> {
202
+ try {
203
+ const resolved = await entry.resolvePage?.(page)
204
+ if (!resolved) {
205
+ return undefined
206
+ }
207
+ const source = hasSpecSource(resolved) ? resolved : entry
208
+ if (!hasSpecSource(source)) {
209
+ console.warn(`[vitepress-openapi] No spec for page "${page.route}": skipped.`)
210
+ return undefined
211
+ }
212
+ const rendered = await renderLlmsPage(await ctx.loadSpec(source), {
213
+ ...getRenderOptions(entry),
214
+ mode: resolved.mode,
215
+ operationId: resolved.operationId,
216
+ tag: resolved.tag,
217
+ maxSize: resolved.maxSize !== undefined ? resolved.maxSize : entry.maxSize,
218
+ specUrl: source.specUrl,
219
+ label: `${page.route}.${ctx.extension}`,
220
+ })
221
+ if (!rendered) {
222
+ return undefined
223
+ }
224
+ const path = `${page.route}.${ctx.extension}`
225
+ return { path, content: rendered.content, title: rendered.title, url: joinUrl(ctx.base, path), entry: index }
226
+ }
227
+ catch (error) {
228
+ console.warn(`[vitepress-openapi] Could not generate Markdown for page "${page.route}": skipped.`, (error as Error)?.message ?? error)
229
+ return undefined
230
+ }
231
+ }
232
+
233
+ async function buildSiteEntries(entries: LlmsFilesOptions[], ctx: BuildContext): Promise<LlmsSiteEntry[]> {
234
+ const results: LlmsSiteEntry[] = []
235
+ for (const entry of entries) {
236
+ if (!entry.operationRoute) {
237
+ continue
238
+ }
239
+ if (!hasSpecSource(entry)) {
240
+ throw new Error('[vitepress-openapi] `operationRoute` needs `spec`, `specPath` or `specUrl`.')
241
+ }
242
+ results.push(await buildLlmsSiteEntry(await ctx.loadSpec(entry), {
243
+ ...entry,
244
+ operationRoute: entry.operationRoute,
245
+ extension: ctx.extension,
246
+ base: ctx.base,
247
+ hasPage: ctx.hasPage,
248
+ }))
249
+ }
250
+ return results
251
+ }
252
+
253
+ /**
254
+ * Every file: page files of each entry, then `llms.txt` and `llms-full.txt` merging all entries.
255
+ * `extension` and `llmsTxt` are read from the first entry. `llms-full.txt` only includes the
256
+ * specs of entries with `operationRoute`; pages of `resolvePage` are only linked from `llms.txt`.
257
+ */
258
+ async function buildLlmsFiles(entries: LlmsFilesOptions[], ctx: BuildContext): Promise<MarkdownFile[]> {
259
+ const siteEntries = await buildSiteEntries(entries, ctx)
260
+
261
+ const pageFiles: ResolvedPageFile[] = []
262
+ const pages = getSitePages(ctx.siteConfig) ?? []
263
+ for (const [index, entry] of entries.entries()) {
264
+ if (!entry.resolvePage) {
265
+ continue
266
+ }
267
+ for (const page of pages) {
268
+ const file = await renderResolvedPage(entry, index, page, ctx)
269
+ if (file) {
270
+ pageFiles.push(file)
271
+ }
272
+ }
273
+ }
274
+
275
+ // First file for a path wins: entry order.
276
+ const files = new Map<string, MarkdownFile>()
277
+ for (const file of [...siteEntries.flatMap(entry => entry.files), ...pageFiles]) {
278
+ if (!files.has(file.path)) {
279
+ files.set(file.path, { path: file.path, content: file.content })
280
+ }
281
+ }
282
+
283
+ if (entries[0].llmsTxt !== false) {
284
+ const pageSections = entries.flatMap((entry, index) => {
285
+ const linked = pageFiles.filter(file => file.entry === index && files.get(file.path)?.content === file.content)
286
+ return linked.length
287
+ ? [`## ${entry.title ?? 'Pages'}\n\n${linked.map(file => `- [${escapeLinkLabel(file.title)}](${file.url})`).join('\n')}`]
288
+ : []
289
+ })
290
+ const extraSections = [...siteEntries.slice(1).map(entry => entry.renderLlmsSection()), ...pageSections]
291
+
292
+ if (siteEntries.length) {
293
+ siteEntries.forEach(entry => entry.warnFull())
294
+ files.set('llms.txt', { path: 'llms.txt', content: siteEntries[0].renderLlmsTxt(extraSections) })
295
+ files.set('llms-full.txt', { path: 'llms-full.txt', content: siteEntries.map(entry => entry.full).join('\n---\n\n') })
296
+ }
297
+ else if (extraSections.length) {
298
+ files.set('llms.txt', { path: 'llms.txt', content: `# Documentation\n\n${extraSections.join('\n\n')}\n` })
299
+ }
300
+ }
301
+
302
+ return [...files.values()]
303
+ }
304
+
305
+ /**
306
+ * Writes `{route}.{extension}` next to each built page an entry covers (operation, whole-spec,
307
+ * introduction, tag and `resolvePage` pages), plus `llms.txt`/`llms-full.txt`, into
308
+ * `siteConfig.outDir`. Meant for VitePress `buildEnd`. Returns the absolute paths of the written files.
309
+ */
310
+ export async function generateLlmsFiles(siteConfig: LlmsSiteConfig, input: LlmsFilesInput): Promise<string[]> {
311
+ if (!siteConfig?.outDir) {
312
+ throw new Error('[vitepress-openapi] `siteConfig.outDir` is required.')
313
+ }
314
+
315
+ const entries = toEntries(input)
316
+ const modules = await loadNodeModules()
317
+ const { fs, path } = modules
318
+ const outDir = path.resolve(siteConfig.outDir)
319
+ const routes = getPageRoutes(siteConfig)
320
+
321
+ const files = await buildLlmsFiles(entries, {
322
+ siteConfig,
323
+ base: siteConfig.site?.base ?? '/',
324
+ extension: entries[0].extension ?? 'md',
325
+ // Without a page list, a route has a page when its HTML was built.
326
+ hasPage: routes
327
+ ? route => routes.has(route)
328
+ : route => fs.stat(path.join(outDir, `${route}.html`)).then(stats => stats.isFile(), () => false),
329
+ loadSpec: createSpecLoader(modules),
330
+ })
331
+
332
+ return writeFilesSafely(outDir, files, modules)
333
+ }
334
+
335
+ /**
336
+ * Connect middleware serving the same files on the fly (dev server). Pages of `resolvePage` are
337
+ * rendered on request, with the params of VitePress' dynamic routes; the other files are generated
338
+ * on the first request. Everything is cached: restart the server after changing a spec.
339
+ */
340
+ export function createLlmsDevMiddleware(
341
+ input: LlmsFilesInput,
342
+ getSiteConfig: () => LlmsSiteConfig | undefined = () => undefined,
343
+ fallbackBase = '/',
344
+ ) {
345
+ const entries = toEntries(input)
346
+ const extension = entries[0].extension ?? 'md'
347
+ let loader: ((source: SpecSource) => Promise<OpenAPIDocument>) | undefined
348
+ let siteFiles: Promise<MarkdownFile[]> | undefined
349
+ let allFiles: Promise<MarkdownFile[]> | undefined
350
+ const pageFiles = new Map<string, Promise<MarkdownFile | undefined>>()
351
+
352
+ const getContext = async (): Promise<BuildContext> => {
353
+ loader ??= createSpecLoader(await loadNodeModules())
354
+ const siteConfig = getSiteConfig()
355
+ const routes = getPageRoutes(siteConfig)
356
+ return {
357
+ siteConfig,
358
+ base: siteConfig?.site?.base ?? fallbackBase,
359
+ extension,
360
+ hasPage: route => routes ? routes.has(route) : true,
361
+ loadSpec: loader,
362
+ }
363
+ }
364
+
365
+ const findPageFile = async (path: string): Promise<MarkdownFile | undefined> => {
366
+ if (!path.endsWith(`.${extension}`)) {
367
+ return undefined
368
+ }
369
+ const route = path.slice(0, -extension.length - 1)
370
+ const page = getSitePages(getSiteConfig())?.find(page => page.route === route)
371
+ if (!page) {
372
+ return undefined
373
+ }
374
+ const ctx = await getContext()
375
+ for (const [index, entry] of entries.entries()) {
376
+ if (entry.resolvePage) {
377
+ const file = await renderResolvedPage(entry, index, page, ctx)
378
+ if (file) {
379
+ return file
380
+ }
381
+ }
382
+ }
383
+ return undefined
384
+ }
385
+
386
+ const findFile = async (path: string): Promise<MarkdownFile | undefined> => {
387
+ if (LLMS_FILES.has(path)) {
388
+ allFiles ??= getContext().then(ctx => buildLlmsFiles(entries, ctx))
389
+ return (await allFiles).find(file => file.path === path)
390
+ }
391
+
392
+ // Files of `operationRoute` entries first, like in the build.
393
+ siteFiles ??= getContext().then(ctx => buildSiteEntries(entries, ctx)).then(results => results.flatMap(result => result.files))
394
+ const file = (await siteFiles).find(file => file.path === path)
395
+ if (file) {
396
+ return file
397
+ }
398
+
399
+ if (!pageFiles.has(path)) {
400
+ pageFiles.set(path, findPageFile(path))
401
+ }
402
+ return pageFiles.get(path)
403
+ }
404
+
405
+ return async (req: LlmsMiddlewareRequest, res: MiddlewareResponse, next: (error?: unknown) => void) => {
406
+ const url = getRawFileRequestUrl(req)
407
+ if (!url) {
408
+ return next()
409
+ }
410
+
411
+ const path = getLlmsRequestPath(url, getSiteConfig()?.site?.base ?? fallbackBase)
412
+ if (path === undefined) {
413
+ return next()
414
+ }
415
+
416
+ try {
417
+ const file = await findFile(path)
418
+ if (!file) {
419
+ return next()
420
+ }
421
+ res.statusCode = 200
422
+ res.setHeader('Content-Type', getLlmsContentType(file.path))
423
+ res.end(req.method === 'HEAD' ? undefined : file.content)
424
+ }
425
+ catch (error) {
426
+ siteFiles = undefined
427
+ allFiles = undefined
428
+ next(error)
429
+ }
430
+ }
431
+ }
@@ -0,0 +1,29 @@
1
+ import type { Plugin } from 'vite'
2
+ import type { LlmsFilesInput, LlmsSiteConfig } from './llms'
3
+
4
+ /**
5
+ * Vite plugin for the VitePress dev server: answers `{base}{route}.{extension}`,
6
+ * `{base}llms.txt` and `{base}llms-full.txt` with the generated Markdown. For builds,
7
+ * call `generateLlmsFiles` from VitePress `buildEnd` with the same options.
8
+ *
9
+ * Register it before `vitepress-plugin-llms` so operation routes are served from here.
10
+ */
11
+ export function llmsDevServer(options: LlmsFilesInput): Plugin {
12
+ let siteConfig: LlmsSiteConfig | undefined
13
+ let base = '/'
14
+
15
+ return {
16
+ name: 'vitepress-openapi:llms-dev-server',
17
+ apply: 'serve',
18
+ configResolved(config) {
19
+ // VitePress exposes its site config to Vite plugins as `config.vitepress`.
20
+ siteConfig = (config as { vitepress?: LlmsSiteConfig }).vitepress
21
+ base = config.base
22
+ },
23
+ async configureServer(server) {
24
+ // Loaded lazily: the package root entry can end up in browser bundles.
25
+ const { createLlmsDevMiddleware } = await import('./llms')
26
+ server.middlewares.use(createLlmsDevMiddleware(options, () => siteConfig, base))
27
+ },
28
+ }
29
+ }
@@ -1 +0,0 @@
1
- const e=require("./useOpenapi-Bt0dpttK.cjs"),t=require("./html-DOohh95v.cjs");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.et({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.t,...n,...i,...o,...c,u];Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return d}});