@nuxtjs/sitemap 5.1.4 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/README.md +1 -9
  2. package/dist/client/200.html +108 -84
  3. package/dist/client/404.html +108 -84
  4. package/dist/client/_nuxt/{BUiSbCMB.js → 4id9yZy9.js} +1 -1
  5. package/dist/client/_nuxt/B3g-KkBK.js +1 -0
  6. package/dist/client/_nuxt/{CRWwmX0L.js → B4ACM-c0.js} +1 -1
  7. package/dist/client/_nuxt/B5NHDIr7.js +353 -0
  8. package/dist/client/_nuxt/{Bz4xi2rU.js → B6ZnTe72.js} +1 -1
  9. package/dist/client/_nuxt/{B6nY7VDA.js → B6bHXiXE.js} +1 -1
  10. package/dist/client/_nuxt/B7rNE5kf.js +1 -0
  11. package/dist/client/_nuxt/BAMIS8DD.js +1 -0
  12. package/dist/client/_nuxt/BEjL32p1.js +5754 -0
  13. package/dist/client/_nuxt/BLD-YeUO.js +36 -0
  14. package/dist/client/_nuxt/BVGdgKAv.js +1 -0
  15. package/dist/client/_nuxt/{wORFcijT.js → BXR915QZ.js} +1 -1
  16. package/dist/client/_nuxt/{DCj4DH6i.js → BYdKNJ10.js} +1 -1
  17. package/dist/client/_nuxt/BZfs-ost.js +1 -0
  18. package/dist/client/_nuxt/{DCdPDLy4.js → BacI6-DX.js} +1 -1
  19. package/dist/client/_nuxt/BcF9sHHc.js +6 -0
  20. package/dist/client/_nuxt/{DCk2z-Tu.js → BdfWgkoX.js} +1 -1
  21. package/dist/client/_nuxt/{A1WiD9SJ.js → Br6ll-O0.js} +1 -1
  22. package/dist/client/_nuxt/BscxmKrE.js +8 -0
  23. package/dist/client/_nuxt/BwXNTs7T.js +1 -0
  24. package/dist/client/_nuxt/Bx89rGXK.js +1 -0
  25. package/dist/client/_nuxt/{DggdVF2v.js → Bxkoe-BC.js} +1 -1
  26. package/dist/client/_nuxt/C3qJFuQy.js +3 -0
  27. package/dist/client/_nuxt/C3qUB5O8.js +301 -0
  28. package/dist/client/_nuxt/C6XIsc4F.js +1 -0
  29. package/dist/client/_nuxt/C9UBdavN.js +1 -0
  30. package/dist/client/_nuxt/CA9nliXM.js +1 -0
  31. package/dist/client/_nuxt/{BsfQk1vf.js → CEfge3mM.js} +1 -1
  32. package/dist/client/_nuxt/CGmujMTu.js +1 -0
  33. package/dist/client/_nuxt/{CQTpvb7m.js → CHCTrc3a.js} +1 -1
  34. package/dist/client/_nuxt/{B9E_xdxs.js → CNkYXcD4.js} +1 -1
  35. package/dist/client/_nuxt/CO5hpdkB.js +1 -0
  36. package/dist/client/_nuxt/{DsudziMp.js → COIrKlfF.js} +1 -1
  37. package/dist/client/_nuxt/{DZ3fVoEH.js → CSPeAESR.js} +1 -1
  38. package/dist/client/_nuxt/C_ZPRiAj.js +26 -0
  39. package/dist/client/_nuxt/{DCAtC51B.js → CarfVElc.js} +1 -1
  40. package/dist/client/_nuxt/{BgBwMnrY.js → CcYwH0AH.js} +1 -1
  41. package/dist/client/_nuxt/Cgl53LJQ.js +1 -0
  42. package/dist/client/_nuxt/{RgJsN3zu.js → ChMCFiS0.js} +1 -1
  43. package/dist/client/_nuxt/CiRxTSAc.js +1 -0
  44. package/dist/client/_nuxt/CpAANOdC.js +1 -0
  45. package/dist/client/_nuxt/{DfUNg_8t.js → CqYeW6XZ.js} +1 -1
  46. package/dist/client/_nuxt/{CL7Ixq1B.js → CrgTADc5.js} +1 -1
  47. package/dist/client/_nuxt/CuJfdYLG.js +1 -0
  48. package/dist/client/_nuxt/D71BffLY.js +1 -0
  49. package/dist/client/_nuxt/D8ltPvRq.js +1 -0
  50. package/dist/client/_nuxt/DAfrLhwG.js +1 -0
  51. package/dist/client/_nuxt/{7fd6vGzb.js → DBeuZS66.js} +1 -1
  52. package/dist/client/_nuxt/{Bd7iooY8.js → DGDuLtS6.js} +1 -1
  53. package/dist/client/_nuxt/DGMFlOLs.js +1 -0
  54. package/dist/client/_nuxt/{j8KhMG0x.js → DGxQkqYo.js} +1 -1
  55. package/dist/client/_nuxt/DKb4lQY2.js +1 -0
  56. package/dist/client/_nuxt/{DIr-ordK.js → DKlGn9uv.js} +1 -1
  57. package/dist/client/_nuxt/{CUVblut_.js → DR5YgmI2.js} +1 -1
  58. package/dist/client/_nuxt/DS9ZWoKD.js +1 -0
  59. package/dist/client/_nuxt/{D-pQtGOP.js → DVLwECkk.js} +1 -1
  60. package/dist/client/_nuxt/DZLoTQm4.js +1 -0
  61. package/dist/client/_nuxt/{ZQC2c-5V.js → D_T9yQUo.js} +3 -3
  62. package/dist/client/_nuxt/Db2-y2xY.js +1 -0
  63. package/dist/client/_nuxt/Dit6kIrv.js +11 -0
  64. package/dist/client/_nuxt/{DXpYegZJ.js → Djqq6n-7.js} +1 -1
  65. package/dist/client/_nuxt/Dkb1Nx48.js +1 -0
  66. package/dist/client/_nuxt/{DywwDckn.js → Du6_OKDb.js} +1 -1
  67. package/dist/client/_nuxt/FJDVp-XM.js +1 -0
  68. package/dist/client/_nuxt/{IHMnEr_d.js → G-Jz5hiA.js} +1 -1
  69. package/dist/client/_nuxt/HrnDn_2Q.js +1 -0
  70. package/dist/client/_nuxt/Icon.CBNAyDNE.css +1 -0
  71. package/dist/client/_nuxt/IconCSS.BjWhc-VD.css +1 -0
  72. package/dist/client/_nuxt/{CPHkTjfH.js → JgH_6NEN.js} +1 -1
  73. package/dist/client/_nuxt/KPqz0Sb3.js +1 -0
  74. package/dist/client/_nuxt/Ksn5IXup.js +1 -0
  75. package/dist/client/_nuxt/{wPLeKH6q.js → Lpdzc9s2.js} +1 -1
  76. package/dist/client/_nuxt/MS3qTAOR.js +1 -0
  77. package/dist/client/_nuxt/P5f3PASf.js +40 -0
  78. package/dist/client/_nuxt/{BILqrcpa.js → YdT6Gj0u.js} +1 -1
  79. package/dist/client/_nuxt/alpzPJ78.js +1 -0
  80. package/dist/client/_nuxt/builds/latest.json +1 -1
  81. package/dist/client/_nuxt/builds/meta/eed887b5-8cf6-4ae2-9094-c95111b61a41.json +1 -0
  82. package/dist/client/_nuxt/{Bdb36Id5.js → dIHJ9UdL.js} +1 -1
  83. package/dist/client/_nuxt/entry.BFped8KZ.css +1 -0
  84. package/dist/client/_nuxt/{Abmmtd_y.js → hm-j440x.js} +1 -1
  85. package/dist/client/_nuxt/o5b8QYQO.js +3 -0
  86. package/dist/client/_nuxt/{doGI2cFk.js → wKgfcFVx.js} +1 -1
  87. package/dist/client/_nuxt/{D3lyRdZ-.js → wwwLBkz3.js} +1 -1
  88. package/dist/client/index.html +108 -84
  89. package/dist/module.d.mts +0 -15
  90. package/dist/module.d.ts +0 -15
  91. package/dist/module.json +1 -1
  92. package/dist/module.mjs +83 -27
  93. package/dist/runtime/nitro/plugins/nuxt-content.d.ts +1 -1
  94. package/dist/runtime/nitro/plugins/nuxt-content.mjs +1 -1
  95. package/dist/runtime/nitro/plugins/warm-up.d.ts +1 -1
  96. package/dist/runtime/nitro/plugins/warm-up.mjs +1 -1
  97. package/dist/runtime/nitro/sitemap/builder/sitemap-index.mjs +5 -1
  98. package/dist/runtime/nitro/sitemap/builder/sitemap.mjs +3 -3
  99. package/dist/runtime/nitro/sitemap/urlset/filter.mjs +1 -27
  100. package/dist/runtime/nitro/sitemap/urlset/i18n.d.ts +3 -5
  101. package/dist/runtime/nitro/sitemap/urlset/i18n.mjs +20 -7
  102. package/dist/runtime/nitro/sitemap/urlset/sources.d.ts +3 -2
  103. package/dist/runtime/nitro/sitemap/urlset/sources.mjs +8 -5
  104. package/dist/runtime/types.d.ts +3 -0
  105. package/dist/runtime/utils-pure.d.ts +6 -0
  106. package/dist/runtime/utils-pure.mjs +40 -1
  107. package/package.json +18 -19
  108. package/dist/client/_nuxt/BBv1LFm6.js +0 -6
  109. package/dist/client/_nuxt/BG_OyJVq.js +0 -1
  110. package/dist/client/_nuxt/BIMuYTWL.js +0 -3
  111. package/dist/client/_nuxt/BSyl5yf0.js +0 -1
  112. package/dist/client/_nuxt/BswfO-CF.js +0 -1
  113. package/dist/client/_nuxt/C3YqBJkQ.js +0 -1
  114. package/dist/client/_nuxt/CCr39IbC.js +0 -1
  115. package/dist/client/_nuxt/CGQbO34C.js +0 -1
  116. package/dist/client/_nuxt/CrjQeCwm.js +0 -1
  117. package/dist/client/_nuxt/D4LhxNOI.js +0 -1
  118. package/dist/client/_nuxt/D4k753MY.js +0 -1
  119. package/dist/client/_nuxt/DnhXxWz-.js +0 -1
  120. package/dist/client/_nuxt/DpNZGmku.js +0 -36
  121. package/dist/client/_nuxt/Dszwcx0o.js +0 -1
  122. package/dist/client/_nuxt/DzPyIVdT.js +0 -9
  123. package/dist/client/_nuxt/Icon.CJPdmOxP.css +0 -1
  124. package/dist/client/_nuxt/IconCSS.DI_jUTCX.css +0 -1
  125. package/dist/client/_nuxt/TQ9oWRfF.js +0 -1
  126. package/dist/client/_nuxt/WoBtJUue.js +0 -1
  127. package/dist/client/_nuxt/bmJ2objS.js +0 -1
  128. package/dist/client/_nuxt/builds/meta/97dc3a07-5950-4817-9cc7-c3f152b35f42.json +0 -1
  129. package/dist/client/_nuxt/entry.CV4WW9Nv.css +0 -1
@@ -1,2 +1,2 @@
1
- declare const _default: import("nitropack/dist/runtime/plugin").NitroAppPlugin;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { defu } from "defu";
2
- import { defineNitroPlugin } from "nitropack/dist/runtime/plugin";
3
2
  import { useSimpleSitemapRuntimeConfig } from "../utils.mjs";
3
+ import { defineNitroPlugin } from "#imports";
4
4
  export default defineNitroPlugin((nitroApp) => {
5
5
  const { discoverImages, isNuxtContentDocumentDriven } = useSimpleSitemapRuntimeConfig();
6
6
  nitroApp.hooks.hook("content:file:afterParse", async (content) => {
@@ -1,2 +1,2 @@
1
- declare const _default: import("nitropack/dist/runtime/plugin").NitroAppPlugin;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1,6 +1,6 @@
1
- import { defineNitroPlugin } from "nitropack/dist/runtime/plugin";
2
1
  import { withLeadingSlash } from "ufo";
3
2
  import { useSimpleSitemapRuntimeConfig } from "../utils.mjs";
3
+ import { defineNitroPlugin } from "#imports";
4
4
  export default defineNitroPlugin((nitroApp) => {
5
5
  const { sitemaps } = useSimpleSitemapRuntimeConfig();
6
6
  const queue = [];
@@ -6,6 +6,7 @@ import { applyI18nEnhancements } from "../urlset/i18n.mjs";
6
6
  import { filterSitemapUrls } from "../urlset/filter.mjs";
7
7
  import { sortSitemapUrls } from "../urlset/sort.mjs";
8
8
  import { escapeValueForXml, wrapSitemapXml } from "./xml.mjs";
9
+ import { useNitroApp } from "#imports";
9
10
  export async function buildSitemapIndex(resolvers, runtimeConfig) {
10
11
  const {
11
12
  sitemaps,
@@ -74,7 +75,10 @@ export async function buildSitemapIndex(resolvers, runtimeConfig) {
74
75
  return typeof entry === "string" ? { sitemap: entry } : entry;
75
76
  }));
76
77
  }
77
- const sitemapXml = entries.map((e) => [
78
+ const ctx = { sitemaps: entries };
79
+ const nitro = useNitroApp();
80
+ await nitro.hooks.callHook("sitemap:index-resolved", ctx);
81
+ const sitemapXml = ctx.sitemaps.map((e) => [
78
82
  " <sitemap>",
79
83
  ` <loc>${escapeValueForXml(e.sitemap)}</loc>`,
80
84
  // lastmod is optional
@@ -52,9 +52,9 @@ export async function buildSitemap(sitemap, resolvers, runtimeConfig) {
52
52
  }
53
53
  const sources = sitemap.includeAppSources ? await globalSitemapSources() : [];
54
54
  sources.push(...await childSitemapSources(sitemap));
55
- let resolvedSources = await resolveSitemapSources(sources);
55
+ let resolvedSources = await resolveSitemapSources(sources, resolvers.event);
56
56
  if (autoI18n)
57
- resolvedSources = normaliseI18nSources(resolvedSources, { autoI18n, isI18nMapped });
57
+ resolvedSources = normaliseI18nSources(resolvedSources, { autoI18n, isI18nMapped, ...sitemap });
58
58
  const normalisedUrls = normaliseSitemapUrls(resolvedSources.map((e) => e.urls).flat(), resolvers);
59
59
  const routeRuleMatcher = createNitroRouteRuleMatcher();
60
60
  let enhancedUrls = normalisedUrls.map((e) => defu(e, sitemap.defaults)).map((e) => {
@@ -76,7 +76,7 @@ export async function buildSitemap(sitemap, resolvers, runtimeConfig) {
76
76
  return routeRules.sitemap ? defu(e, routeRules.sitemap) : e;
77
77
  }).filter(Boolean);
78
78
  if (autoI18n?.locales)
79
- enhancedUrls = applyI18nEnhancements(enhancedUrls, { isI18nMapped, autoI18n, sitemapName: sitemap.sitemapName });
79
+ enhancedUrls = applyI18nEnhancements(enhancedUrls, { isI18nMapped, autoI18n, ...sitemap });
80
80
  const filteredUrls = filterSitemapUrls(enhancedUrls, { event: resolvers.event, isMultiSitemap, autoI18n, ...sitemap });
81
81
  const sortedUrls = maybeSort(filteredUrls);
82
82
  const slicedUrls = maybeSlice(sortedUrls);
@@ -1,32 +1,6 @@
1
1
  import { parseURL } from "ufo";
2
- import { createRouter, toRouteMatcher } from "radix3";
2
+ import { createFilter } from "../../../utils-pure.mjs";
3
3
  import { getPathRobotConfig } from "#imports";
4
- function createFilter(options = {}) {
5
- const include = options.include || [];
6
- const exclude = options.exclude || [];
7
- if (include.length === 0 && exclude.length === 0)
8
- return () => true;
9
- return function(path) {
10
- for (const v of [{ rules: exclude, result: false }, { rules: include, result: true }]) {
11
- const regexRules = v.rules.filter((r) => r instanceof RegExp);
12
- if (regexRules.some((r) => r.test(path)))
13
- return v.result;
14
- const stringRules = v.rules.filter((r) => typeof r === "string");
15
- if (stringRules.length > 0) {
16
- const routes = {};
17
- for (const r of stringRules) {
18
- if (r === path)
19
- return v.result;
20
- routes[r] = true;
21
- }
22
- const routeRulesMatcher = toRouteMatcher(createRouter({ routes, strictTrailingSlash: false }));
23
- if (routeRulesMatcher.matchAll(path).length > 0)
24
- return Boolean(v.result);
25
- }
26
- }
27
- return include.length === 0;
28
- };
29
- }
30
4
  export function filterSitemapUrls(_urls, options) {
31
5
  const urlFilter = createFilter({
32
6
  include: options.include,
@@ -1,8 +1,6 @@
1
1
  import type { ModuleRuntimeConfig, ResolvedSitemapUrl, SitemapSourceResolved } from '../../../types';
2
- export declare function normaliseI18nSources(sources: SitemapSourceResolved[], { autoI18n, isI18nMapped }: {
2
+ export declare function normaliseI18nSources(sources: SitemapSourceResolved[], { autoI18n, isI18nMapped, include, exclude }: {
3
3
  autoI18n: ModuleRuntimeConfig['autoI18n'];
4
4
  isI18nMapped: boolean;
5
- }): SitemapSourceResolved[];
6
- export declare function applyI18nEnhancements(_urls: ResolvedSitemapUrl[], options: Pick<Required<ModuleRuntimeConfig>, 'autoI18n' | 'isI18nMapped'> & {
7
- sitemapName: string;
8
- }): ResolvedSitemapUrl[];
5
+ } & Pick<ModuleRuntimeConfig['sitemaps'][string], 'sitemapName' | 'include' | 'exclude'>): SitemapSourceResolved[];
6
+ export declare function applyI18nEnhancements(_urls: ResolvedSitemapUrl[], options: Pick<Required<ModuleRuntimeConfig>, 'autoI18n' | 'isI18nMapped'> & Pick<ModuleRuntimeConfig['sitemaps'][string], 'sitemapName' | 'include' | 'exclude'>): ResolvedSitemapUrl[];
@@ -1,18 +1,23 @@
1
- import { joinURL, parseURL, withHttps, withLeadingSlash } from "ufo";
2
- import { splitForLocales } from "../../../utils-pure.mjs";
3
- export function normaliseI18nSources(sources, { autoI18n, isI18nMapped }) {
1
+ import { hasProtocol, joinURL, parseURL, withHttps, withLeadingSlash } from "ufo";
2
+ import { createPathFilter, splitForLocales } from "../../../utils-pure.mjs";
3
+ export function normaliseI18nSources(sources, { autoI18n, isI18nMapped, include, exclude }) {
4
+ const filterPath = createPathFilter({
5
+ include,
6
+ exclude
7
+ });
4
8
  if (autoI18n && isI18nMapped) {
5
9
  return sources.map((s) => {
6
10
  const urls = (s.urls || []).map((_url) => {
7
11
  const url = typeof _url === "string" ? { loc: _url } : _url;
8
12
  url.loc = url.loc || url.url;
9
- url.loc = withLeadingSlash(url.loc);
13
+ if (!hasProtocol(url.loc, { acceptRelative: true }))
14
+ url.loc = withLeadingSlash(url.loc);
10
15
  return url;
11
16
  });
12
17
  s.urls = urls.map((url) => {
13
18
  if (url._sitemap || url._i18nTransform)
14
19
  return url;
15
- if (url.loc) {
20
+ if (url.loc && !hasProtocol(url.loc, { acceptRelative: true })) {
16
21
  const match = splitForLocales(url.loc, autoI18n.locales.map((l) => l.code));
17
22
  const localeCode = match[0] || autoI18n.defaultLocale;
18
23
  const pathWithoutPrefix = match[1];
@@ -23,6 +28,8 @@ export function normaliseI18nSources(sources, { autoI18n, isI18nMapped }) {
23
28
  if (u._sitemap || u._i18nTransform)
24
29
  return false;
25
30
  if (u?.loc) {
31
+ if (!filterPath(u.loc))
32
+ return false;
26
33
  const [_localeCode, _pathWithoutPrefix] = splitForLocales(u.loc, autoI18n.locales.map((l) => l.code));
27
34
  if (pathWithoutPrefix === _pathWithoutPrefix) {
28
35
  const entries = [];
@@ -58,7 +65,11 @@ export function normaliseI18nSources(sources, { autoI18n, isI18nMapped }) {
58
65
  return sources;
59
66
  }
60
67
  export function applyI18nEnhancements(_urls, options) {
61
- const { autoI18n } = options;
68
+ const { autoI18n, include, exclude } = options;
69
+ const filterPath = createPathFilter({
70
+ include,
71
+ exclude
72
+ });
62
73
  return _urls.map((e) => {
63
74
  if (!e._i18nTransform)
64
75
  return e;
@@ -118,11 +129,13 @@ export function applyI18nEnhancements(_urls, options) {
118
129
  }
119
130
  }
120
131
  const hreflang = locale2.iso || locale2.code;
132
+ if (!filterPath(href))
133
+ return false;
121
134
  return {
122
135
  hreflang,
123
136
  href
124
137
  };
125
- })
138
+ }).filter(Boolean)
126
139
  };
127
140
  });
128
141
  }).flat();
@@ -1,5 +1,6 @@
1
+ import { type H3Event } from 'h3';
1
2
  import type { ModuleRuntimeConfig, SitemapSourceBase, SitemapSourceResolved } from '../../../types';
2
- export declare function fetchDataSource(input: SitemapSourceBase | SitemapSourceResolved): Promise<SitemapSourceResolved>;
3
+ export declare function fetchDataSource(input: SitemapSourceBase | SitemapSourceResolved, event?: H3Event): Promise<SitemapSourceResolved>;
3
4
  export declare function globalSitemapSources(): Promise<(SitemapSourceBase | SitemapSourceResolved)[]>;
4
5
  export declare function childSitemapSources(definition: ModuleRuntimeConfig['sitemaps'][string]): Promise<(SitemapSourceBase | SitemapSourceResolved)[]>;
5
- export declare function resolveSitemapSources(sources: (SitemapSourceBase | SitemapSourceResolved)[]): Promise<SitemapSourceResolved[]>;
6
+ export declare function resolveSitemapSources(sources: (SitemapSourceBase | SitemapSourceResolved)[], event?: H3Event): Promise<SitemapSourceResolved[]>;
@@ -1,4 +1,6 @@
1
- export async function fetchDataSource(input) {
1
+ import { getRequestHost } from "h3";
2
+ import { defu } from "defu";
3
+ export async function fetchDataSource(input, event) {
2
4
  const context = typeof input.context === "string" ? { name: input.context } : input.context || { name: "fetch" };
3
5
  context.tips = context.tips || [];
4
6
  const url = typeof input.fetch === "string" ? input.fetch : input.fetch[0];
@@ -10,11 +12,12 @@ export async function fetchDataSource(input) {
10
12
  let isHtmlResponse = false;
11
13
  try {
12
14
  const urls = await globalThis.$fetch(url, {
15
+ ...options,
13
16
  responseType: "json",
14
17
  signal: timeoutController.signal,
15
- headers: {
18
+ headers: defu(options?.headers, {
16
19
  Accept: "application/json"
17
- },
20
+ }, event ? { Host: getRequestHost(event, { xForwardedHost: true }) } : {}),
18
21
  // @ts-expect-error untyped
19
22
  onResponse({ response }) {
20
23
  if (typeof response._data === "string" && response._data.startsWith("<!DOCTYPE html>"))
@@ -61,7 +64,7 @@ export function globalSitemapSources() {
61
64
  export function childSitemapSources(definition) {
62
65
  return definition?._hasSourceChunk ? import("#sitemap/child-sources.mjs").then((m) => m.sources[definition.sitemapName] || []) : Promise.resolve([]);
63
66
  }
64
- export async function resolveSitemapSources(sources) {
67
+ export async function resolveSitemapSources(sources, event) {
65
68
  return (await Promise.all(
66
69
  sources.map((source) => {
67
70
  if (typeof source === "object" && "urls" in source) {
@@ -72,7 +75,7 @@ export async function resolveSitemapSources(sources) {
72
75
  };
73
76
  }
74
77
  if (source.fetch)
75
- return fetchDataSource(source);
78
+ return fetchDataSource(source, event);
76
79
  return {
77
80
  ...source,
78
81
  error: "Invalid source"
@@ -256,6 +256,9 @@ export interface SitemapDefinition {
256
256
  */
257
257
  _route?: string;
258
258
  }
259
+ export interface SitemapIndexRenderCtx {
260
+ sitemaps: SitemapIndexEntry[];
261
+ }
259
262
  export interface SitemapRenderCtx {
260
263
  sitemapName: string;
261
264
  urls: ResolvedSitemapUrl[];
@@ -5,3 +5,9 @@ export declare function splitForLocales(path: string, locales: string[]): (strin
5
5
  * Transform a literal notation string regex to RegExp
6
6
  */
7
7
  export declare function normalizeRuntimeFilters(input?: FilterInput[]): (RegExp | string)[];
8
+ export interface CreateFilterOptions {
9
+ include?: (FilterInput | string | RegExp)[];
10
+ exclude?: (FilterInput | string | RegExp)[];
11
+ }
12
+ export declare function createPathFilter(options?: CreateFilterOptions): (loc: string) => boolean;
13
+ export declare function createFilter(options?: CreateFilterOptions): (path: string) => boolean;
@@ -1,5 +1,6 @@
1
1
  import { createDefu } from "defu";
2
- import { withLeadingSlash } from "ufo";
2
+ import { parseURL, withLeadingSlash } from "ufo";
3
+ import { createRouter, toRouteMatcher } from "radix3";
3
4
  const merger = createDefu((obj, key, value) => {
4
5
  if (Array.isArray(obj[key]) && Array.isArray(value))
5
6
  obj[key] = Array.from(/* @__PURE__ */ new Set([...obj[key], ...value]));
@@ -30,3 +31,41 @@ export function normalizeRuntimeFilters(input) {
30
31
  return false;
31
32
  }).filter(Boolean);
32
33
  }
34
+ export function createPathFilter(options = {}) {
35
+ const urlFilter = createFilter(options);
36
+ return (loc) => {
37
+ let path = loc;
38
+ try {
39
+ path = parseURL(loc).pathname;
40
+ } catch {
41
+ return false;
42
+ }
43
+ return urlFilter(path);
44
+ };
45
+ }
46
+ export function createFilter(options = {}) {
47
+ const include = options.include || [];
48
+ const exclude = options.exclude || [];
49
+ if (include.length === 0 && exclude.length === 0)
50
+ return () => true;
51
+ return function(path) {
52
+ for (const v of [{ rules: exclude, result: false }, { rules: include, result: true }]) {
53
+ const regexRules = v.rules.filter((r) => r instanceof RegExp);
54
+ if (regexRules.some((r) => r.test(path)))
55
+ return v.result;
56
+ const stringRules = v.rules.filter((r) => typeof r === "string");
57
+ if (stringRules.length > 0) {
58
+ const routes = {};
59
+ for (const r of stringRules) {
60
+ if (r === path)
61
+ return v.result;
62
+ routes[r] = true;
63
+ }
64
+ const routeRulesMatcher = toRouteMatcher(createRouter({ routes, strictTrailingSlash: false }));
65
+ if (routeRulesMatcher.matchAll(path).length > 0)
66
+ return Boolean(v.result);
67
+ }
68
+ }
69
+ return include.length === 0;
70
+ };
71
+ }
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@nuxtjs/sitemap",
3
3
  "type": "module",
4
- "version": "5.1.4",
5
- "packageManager": "pnpm@8.15.5",
4
+ "version": "5.2.0",
6
5
  "description": "Powerfully flexible XML Sitemaps that integrate seamlessly, for Nuxt.",
7
6
  "author": {
8
7
  "name": "Harlan Wilton",
@@ -32,8 +31,8 @@
32
31
  "dist"
33
32
  ],
34
33
  "dependencies": {
35
- "@nuxt/devtools-kit": "^1.1.5",
36
- "@nuxt/devtools-ui-kit": "^1.1.5",
34
+ "@nuxt/devtools-kit": "^1.3.1",
35
+ "@nuxt/devtools-ui-kit": "^1.3.1",
37
36
  "@nuxt/kit": "^3.11.2",
38
37
  "@vueuse/core": "^10.9.0",
39
38
  "chalk": "^5.3.0",
@@ -44,31 +43,31 @@
44
43
  "nuxt-site-config-kit": "^2.2.12",
45
44
  "ofetch": "^1.3.4",
46
45
  "pathe": "^1.1.2",
47
- "pkg-types": "^1.0.3",
46
+ "pkg-types": "^1.1.1",
48
47
  "radix3": "^1.1.2",
49
- "semver": "^7.6.0",
50
- "shiki": "1.2.4",
48
+ "semver": "^7.6.2",
49
+ "shiki": "1.6.0",
51
50
  "sirv": "^2.0.4",
52
51
  "site-config-stack": "^2.2.12",
53
52
  "ufo": "^1.5.3"
54
53
  },
55
54
  "devDependencies": {
56
- "@antfu/eslint-config": "^2.12.2",
55
+ "@antfu/eslint-config": "^2.18.1",
57
56
  "@nuxt/content": "^2.12.1",
58
- "@nuxt/kit": "^3.11.1",
59
- "@nuxt/module-builder": "^0.5.5",
60
- "@nuxt/test-utils": "^3.12.0",
61
- "@nuxt/ui": "^2.15.1",
57
+ "@nuxt/kit": "^3.11.2",
58
+ "@nuxt/module-builder": "0.5.5",
59
+ "@nuxt/test-utils": "^3.13.1",
60
+ "@nuxt/ui": "^2.16.0",
62
61
  "@nuxtjs/eslint-config-typescript": "^12.1.0",
63
- "@nuxtjs/i18n": "8.3.0",
64
- "bumpp": "^9.4.0",
65
- "eslint": "9.0.0",
66
- "execa": "^8.0.1",
62
+ "@nuxtjs/i18n": "8.3.1",
63
+ "bumpp": "^9.4.1",
64
+ "eslint": "9.3.0",
65
+ "execa": "^9.1.0",
67
66
  "nuxt": "^3.11.2",
68
67
  "nuxt-icon": "^0.6.10",
69
- "nuxt-simple-robots": "^4.0.0-rc.16",
70
- "typescript": "^5.4.4",
71
- "vitest": "^1.4.0"
68
+ "nuxt-simple-robots": "^4.0.0-rc.17",
69
+ "typescript": "^5.4.5",
70
+ "vitest": "^1.6.0"
72
71
  },
73
72
  "build": {
74
73
  "externals": [
@@ -1,6 +0,0 @@
1
- import t from"./CbViG2Xw.js";import n from"./DCk2z-Tu.js";import a from"./DhFF74a2.js";import i from"./DSrLtGYv.js";import s from"./CMDmr8et.js";import u from"./CbYhyuC0.js";import m from"./BeX7Iu5M.js";import r from"./DywwDckn.js";import e from"./Dch3xQiY.js";import o from"./DC8MraHL.js";import c from"./CsyrCbsw.js";import l from"./BlxWTfDV.js";import d from"./CupVZNk8.js";import g from"./DYI1rfmx.js";import p from"./Bh8mriwU.js";import b from"./C5gCGmDW.js";import v from"./BT9ZzGyQ.js";import f from"./BN4LRXf6.js";import h from"./BR6CMsBL.js";import"./Bg0wAK5a.js";const y=Object.freeze({fileTypes:[],injectTo:["text.html.markdown"],injectionSelector:"L:text.html.markdown",name:"markdown-vue",patterns:[{include:"#vue-code-block"}],repository:{"vue-code-block":{begin:"(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(vue)((\\s+|:|,|\\{|\\?)[^`~]*)?$)",beginCaptures:{3:{name:"punctuation.definition.markdown"},4:{name:"fenced_code.block.language.markdown"},5:{name:"fenced_code.block.language.attributes.markdown"}},end:"(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",endCaptures:{3:{name:"punctuation.definition.markdown"}},name:"markup.fenced_code.block.markdown",patterns:[{include:"source.vue"}]}},scopeName:"markdown.vue.codeblock"});var C=[y];const $=Object.freeze({fileTypes:[],injectTo:["source.vue","text.html.markdown","text.html.derivative","text.pug"],injectionSelector:"L:meta.tag -meta.attribute -meta.ng-binding -entity.name.tag.pug -attribute_value -source.tsx -source.js.jsx, L:meta.element -meta.attribute",name:"vue-directives",patterns:[{include:"source.vue#vue-directives"}],scopeName:"vue.directives"});var j=[$];const x=Object.freeze({fileTypes:[],injectTo:["source.vue","text.html.markdown","text.html.derivative","text.pug"],injectionSelector:"L:text.pug -comment -string.comment, L:text.html.derivative -comment.block, L:text.html.markdown -comment.block",name:"vue-interpolations",patterns:[{include:"source.vue#vue-interpolations"}],scopeName:"vue.interpolations"});var k=[x];const z=Object.freeze({fileTypes:[],injectTo:["source.vue"],injectionSelector:"L:source.css -comment, L:source.postcss -comment, L:source.sass -comment, L:source.stylus -comment",name:"vue-sfc-style-variable-injection",patterns:[{include:"#vue-sfc-style-variable-injection"}],repository:{"vue-sfc-style-variable-injection":{begin:"\\b(v-bind)\\s*\\(",beginCaptures:{1:{name:"entity.name.function"}},end:"\\)",name:"vue.sfc.style.variable.injection.v-bind",patterns:[{begin:`('|")`,beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"}},end:"(\\1)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},name:"source.ts.embedded.html.vue",patterns:[{include:"source.js"}]},{include:"source.js"}]}},scopeName:"vue.sfc.style.variable.injection",embeddedLangs:["javascript"]});var A=[...e,z];const Z=Object.freeze({displayName:"Vue",name:"vue",patterns:[{include:"text.html.basic#comment"},{include:"#self-closing-tag"},{begin:"(<)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"}},end:"(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html.vue"}},patterns:[{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)md\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"text.html.markdown",patterns:[{include:"text.html.markdown"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)html\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"text.html.derivative",patterns:[{include:"#html-stuff"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)pug\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"text.pug",patterns:[{include:"text.pug"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)stylus\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.stylus",patterns:[{include:"source.stylus"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)postcss\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.postcss",patterns:[{include:"source.postcss"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)sass\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.sass",patterns:[{include:"source.sass"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)css\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.css",patterns:[{include:"source.css"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)scss\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.css.scss",patterns:[{include:"source.css.scss"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)less\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.css.less",patterns:[{include:"source.css.less"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)js\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.js",patterns:[{include:"source.js"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)ts\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.ts",patterns:[{include:"source.ts"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)jsx\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.js.jsx",patterns:[{include:"source.js.jsx"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)tsx\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.tsx",patterns:[{include:"source.tsx"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)json\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.json",patterns:[{include:"source.json"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)jsonc\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.json.comments",patterns:[{include:"source.json.comments"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)json5\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.json5",patterns:[{include:"source.json5"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)yaml\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.yaml",patterns:[{include:"source.yaml"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)toml\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.toml",patterns:[{include:"source.toml"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)(gql|graphql)\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.graphql",patterns:[{include:"source.graphql"}]}]},{begin:`([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)vue\\b\\2)`,beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"source.vue",patterns:[{include:"source.vue"}]}]},{begin:"(template)\\b",beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/template\\b)",name:"text.html.derivative",patterns:[{include:"#html-stuff"}]}]},{begin:"(script)\\b",beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/script\\b)",name:"source.js",patterns:[{include:"source.js"}]}]},{begin:"(style)\\b",beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/style\\b)",name:"source.css",patterns:[{include:"source.css"}]}]},{begin:"([a-zA-Z0-9:-]+)",beginCaptures:{1:{name:"entity.name.tag.$1.html.vue"}},end:"(</)(\\1)\\s*(?=>)",endCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},patterns:[{include:"#tag-stuff"},{begin:"(?<=>)",end:"(?=<\\/)",name:"text"}]}]}],repository:{"html-stuff":{patterns:[{include:"#template-tag"},{include:"text.html.derivative"},{include:"text.html.basic"}]},"self-closing-tag":{begin:"(<)([a-zA-Z0-9:-]+)(?=([^>]+/>))",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},end:"(/>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html.vue"}},name:"self-closing-tag",patterns:[{include:"#tag-stuff"}]},"tag-stuff":{begin:"\\G",end:"(?=/>)|(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html.vue"}},name:"meta.tag-stuff",patterns:[{include:"#vue-directives"},{include:"text.html.basic#attribute"}]},"template-tag":{patterns:[{include:"#template-tag-1"},{include:"#template-tag-2"}]},"template-tag-1":{begin:"(<)(template)\\b(>)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"},3:{name:"punctuation.definition.tag.end.html.vue"}},end:"(/?>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html.vue"}},name:"meta.template-tag.start",patterns:[{begin:"\\G",end:"(?=/>)|((</)(template)\\b)",endCaptures:{2:{name:"punctuation.definition.tag.begin.html.vue"},3:{name:"entity.name.tag.$3.html.vue"}},name:"meta.template-tag.end",patterns:[{include:"#html-stuff"}]}]},"template-tag-2":{begin:"(<)(template)\\b",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html.vue"},2:{name:"entity.name.tag.$2.html.vue"}},end:"(/?>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html.vue"}},name:"meta.template-tag.start",patterns:[{begin:"\\G",end:"(?=/>)|((</)(template)\\b)",endCaptures:{2:{name:"punctuation.definition.tag.begin.html.vue"},3:{name:"entity.name.tag.$3.html.vue"}},name:"meta.template-tag.end",patterns:[{include:"#tag-stuff"},{include:"#html-stuff"}]}]},"vue-directives":{patterns:[{include:"#vue-directives-control"},{include:"#vue-directives-style-attr"},{include:"#vue-directives-original"},{include:"#vue-directives-generic-attr"}]},"vue-directives-control":{begin:"(v-for)|(v-if|v-else-if|v-else)",captures:{1:{name:"keyword.control.loop.vue"},2:{name:"keyword.control.conditional.vue"}},end:"(?=\\s*+[^=\\s])",name:"meta.attribute.directive.control.vue",patterns:[{include:"#vue-directives-expression"}]},"vue-directives-expression":{patterns:[{begin:"(=)\\s*('|\"|`)",beginCaptures:{1:{name:"punctuation.separator.key-value.html.vue"},2:{name:"punctuation.definition.string.begin.html.vue"}},end:"(\\2)",endCaptures:{1:{name:"punctuation.definition.string.end.html.vue"}},patterns:[{begin:"(?<=('|\"|`))",end:"(?=\\1)",name:"source.ts.embedded.html.vue",patterns:[{include:"source.ts"}]}]},{begin:"(=)\\s*(?=[^'\"`])",beginCaptures:{1:{name:"punctuation.separator.key-value.html.vue"}},end:"(?=(\\s|>|\\/>))",patterns:[{begin:"(?=[^'\"`])",end:"(?=(\\s|>|\\/>))",name:"source.ts.embedded.html.vue",patterns:[{include:"source.ts"}]}]}]},"vue-directives-generic-attr":{begin:"\\b(generic)\\s*(=)",captures:{1:{name:"entity.other.attribute-name.html.vue"},2:{name:"punctuation.separator.key-value.html.vue"}},end:`(?<='|")`,name:"meta.attribute.generic.vue",patterns:[{begin:`('|")`,beginCaptures:{1:{name:"punctuation.definition.string.begin.html.vue"}},comment:"https://github.com/microsoft/vscode/blob/fd4346210f59135fad81a8b8c4cea7bf5a9ca6b4/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json#L4002-L4020",end:"(\\1)",endCaptures:{1:{name:"punctuation.definition.string.end.html.vue"}},name:"meta.type.parameters.vue",patterns:[{include:"source.ts#comment"},{match:"(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",name:"storage.modifier.ts"},{include:"source.ts#type"},{include:"source.ts#punctuation-comma"},{match:"(=)(?!>)",name:"keyword.operator.assignment.ts"}]}]},"vue-directives-original":{begin:"(?:\\b(v-)|([:\\.])|(@)|(#))(\\[?)([\\w\\-]*)(\\]?)(?:\\.([\\w\\-]*))*",beginCaptures:{1:{name:"entity.other.attribute-name.html.vue"},2:{name:"punctuation.attribute-shorthand.bind.html.vue"},3:{name:"punctuation.attribute-shorthand.event.html.vue"},4:{name:"punctuation.attribute-shorthand.slot.html.vue"},5:{name:"punctuation.separator.key-value.html.vue"},6:{name:"entity.other.attribute-name.html.vue"},7:{name:"punctuation.separator.key-value.html.vue"},8:{name:"entity.other.attribute-name.html.vue"},9:{name:"punctuation.separator.key-value.html.vue"}},end:"(?=\\s*+[^=\\s])",endCaptures:{1:{name:"punctuation.definition.string.end.html.vue"}},name:"meta.attribute.directive.vue",patterns:[{include:"#vue-directives-expression"}]},"vue-directives-style-attr":{begin:"\\b(style)\\s*(=)",captures:{1:{name:"entity.other.attribute-name.html.vue"},2:{name:"punctuation.separator.key-value.html.vue"}},end:`(?<='|")`,name:"meta.attribute.style.vue",patterns:[{begin:`('|")`,beginCaptures:{1:{name:"punctuation.definition.string.begin.html.vue"}},comment:"Copy from source.css#rule-list-innards",end:"(\\1)",endCaptures:{1:{name:"punctuation.definition.string.end.html.vue"}},name:"source.css.embedded.html.vue",patterns:[{include:"source.css#comment-block"},{include:"source.css#escapes"},{include:"source.css#font-features"},{match:`(?x) (?<![\\w-])
2
- --
3
- (?:[-a-zA-Z_] | [^\\x00-\\x7F])
4
- (?:[-a-zA-Z0-9_] | [^\\x00-\\x7F]
5
- |\\\\(?:[0-9a-fA-F]{1,6}|.)
6
- )*`,name:"variable.css"},{begin:"(?<![-a-zA-Z])(?=[-a-zA-Z])",end:"$|(?![-a-zA-Z])",name:"meta.property-name.css",patterns:[{include:"source.css#property-names"}]},{begin:"(:)\\s*",beginCaptures:{1:{name:"punctuation.separator.key-value.css"}},comment:"Modify end to fix #199. TODO: handle ' character.",contentName:"meta.property-value.css",end:`\\s*(;)|\\s*(?='|")`,endCaptures:{1:{name:"punctuation.terminator.rule.css"}},patterns:[{include:"source.css#comment-block"},{include:"source.css#property-values"}]},{match:";",name:"punctuation.terminator.rule.css"}]}]},"vue-interpolations":{patterns:[{begin:"(\\{\\{)",beginCaptures:{1:{name:"punctuation.definition.interpolation.begin.html.vue"}},end:"(\\}\\})",endCaptures:{1:{name:"punctuation.definition.interpolation.end.html.vue"}},name:"expression.embedded.vue",patterns:[{begin:"\\G",end:"(?=\\}\\})",name:"source.ts.embedded.html.vue",patterns:[{include:"source.ts"}]}]}]}},scopeName:"source.vue",embeddedLangs:["html","markdown","pug","stylus","sass","css","scss","less","javascript","typescript","jsx","tsx","json","jsonc","json5","yaml","toml","graphql","html-derivative","markdown-vue","vue-directives","vue-interpolations","vue-sfc-style-variable-injection"]});var Q=[...t,...n,...a,...i,...s,...u,...m,...r,...e,...o,...c,...l,...d,...g,...p,...b,...v,...f,...h,...C,...j,...k,...A,Z];export{Q as default};
@@ -1 +0,0 @@
1
- const e=Object.freeze({displayName:"HashiCorp HCL",fileTypes:["hcl"],name:"hcl",patterns:[{include:"#comments"},{include:"#attribute_definition"},{include:"#block"},{include:"#expressions"}],repository:{attribute_access:{begin:"\\.(?!\\*)",beginCaptures:{0:{name:"keyword.operator.accessor.hcl"}},comment:"Matches traversal attribute access such as .attr",end:"[[:alpha:]][\\w-]*|\\d*",endCaptures:{0:{patterns:[{comment:"Attribute name",match:"(?!null|false|true)[[:alpha:]][\\w-]*",name:"variable.other.member.hcl"},{comment:"Optional attribute index",match:"\\d+",name:"constant.numeric.integer.hcl"}]}}},attribute_definition:{captures:{1:{name:"punctuation.section.parens.begin.hcl"},2:{name:"variable.other.readwrite.hcl"},3:{name:"punctuation.section.parens.end.hcl"},4:{name:"keyword.operator.assignment.hcl"}},comment:'Identifier "=" with optional parens',match:"(\\()?(\\b(?!null\\b|false\\b|true\\b)[[:alpha:]][[:alnum:]_-]*)(\\))?\\s*(\\=(?!\\=|\\>))\\s*",name:"variable.declaration.hcl"},attribute_splat:{begin:"\\.",beginCaptures:{0:{name:"keyword.operator.accessor.hcl"}},comment:"Legacy attribute-only splat",end:"\\*",endCaptures:{0:{name:"keyword.operator.splat.hcl"}}},block:{begin:"([\\w][\\-\\w]*)([^?{\\r\\n]*)(\\{)",beginCaptures:{1:{patterns:[{comment:"Block type",match:"\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b",name:"entity.name.type.hcl"}]},2:{patterns:[{comment:"Block label (String Literal)",match:'\\"[^\\"\\r\\n]*\\"',name:"variable.other.enummember.hcl"},{comment:"Block label (Indentifier)",match:"[[:alpha:]][[:alnum:]_-]*",name:"variable.other.enummember.hcl"}]},3:{name:"punctuation.section.block.begin.hcl"}},comment:'This will match HCL blocks like `thing1 "one" "two" {` or `thing2 {`',end:"\\}",endCaptures:{0:{name:"punctuation.section.block.end.hcl"}},name:"meta.block.hcl",patterns:[{include:"#comments"},{include:"#attribute_definition"},{include:"#expressions"},{include:"#block"}]},block_inline_comments:{begin:"/\\*",captures:{0:{name:"punctuation.definition.comment.hcl"}},comment:"Inline comments start with the /* sequence and end with the */ sequence, and may have any characters within except the ending sequence. An inline comment is considered equivalent to a whitespace sequence",end:"\\*/",name:"comment.block.hcl"},brackets:{begin:"\\[",beginCaptures:{0:{name:"punctuation.section.brackets.begin.hcl"}},end:"\\]",endCaptures:{0:{name:"punctuation.section.brackets.end.hcl"}},patterns:[{comment:"Splat operator",match:"\\*",name:"keyword.operator.splat.hcl"},{include:"#comma"},{include:"#comments"},{include:"#inline_for_expression"},{include:"#inline_if_expression"},{include:"#expressions"},{include:"#local_identifiers"}]},char_escapes:{comment:"Character Escapes",match:'\\\\[nrt"\\\\]|\\\\u(\\h{8}|\\h{4})',name:"constant.character.escape.hcl"},comma:{comment:"Commas - used in certain expressions",match:"\\,",name:"punctuation.separator.hcl"},comments:{patterns:[{include:"#hash_line_comments"},{include:"#double_slash_line_comments"},{include:"#block_inline_comments"}]},double_slash_line_comments:{begin:"//",captures:{0:{name:"punctuation.definition.comment.hcl"}},comment:"Line comments start with // sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence",end:"$\\n?",name:"comment.line.double-slash.hcl"},expressions:{patterns:[{include:"#literal_values"},{include:"#operators"},{include:"#tuple_for_expression"},{include:"#object_for_expression"},{include:"#brackets"},{include:"#objects"},{include:"#attribute_access"},{include:"#attribute_splat"},{include:"#functions"},{include:"#parens"}]},for_expression_body:{patterns:[{comment:"in keyword",match:"\\bin\\b",name:"keyword.operator.word.hcl"},{comment:"if keyword",match:"\\bif\\b",name:"keyword.control.conditional.hcl"},{match:"\\:",name:"keyword.operator.hcl"},{include:"#expressions"},{include:"#comments"},{include:"#comma"},{include:"#local_identifiers"}]},functions:{begin:"([:\\-\\w]+)(\\()",beginCaptures:{1:{patterns:[{match:"\\b[[:alpha:]][\\w_-]*::([[:alpha:]][\\w_-]*::)?[[:alpha:]][\\w_-]*\\b",name:"support.function.namespaced.hcl"},{match:"\\b[[:alpha:]][\\w_-]*\\b",name:"support.function.builtin.hcl"}]},2:{name:"punctuation.section.parens.begin.hcl"}},comment:"Built-in function calls",end:"\\)",endCaptures:{0:{name:"punctuation.section.parens.end.hcl"}},name:"meta.function-call.hcl",patterns:[{include:"#comments"},{include:"#expressions"},{include:"#comma"}]},hash_line_comments:{begin:"#",captures:{0:{name:"punctuation.definition.comment.hcl"}},comment:"Line comments start with # sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence",end:"$\\n?",name:"comment.line.number-sign.hcl"},hcl_type_keywords:{comment:"Type keywords known to HCL.",match:"\\b(any|string|number|bool|list|set|map|tuple|object)\\b",name:"storage.type.hcl"},heredoc:{begin:"(\\<\\<\\-?)\\s*(\\w+)\\s*$",beginCaptures:{1:{name:"keyword.operator.heredoc.hcl"},2:{name:"keyword.control.heredoc.hcl"}},comment:"String Heredoc",end:"^\\s*\\2\\s*$",endCaptures:{0:{name:"keyword.control.heredoc.hcl"}},name:"string.unquoted.heredoc.hcl",patterns:[{include:"#string_interpolation"}]},inline_for_expression:{begin:"(for)\\b",beginCaptures:{1:{name:"keyword.control.hcl"}},end:"\\n",patterns:[{match:"\\=\\>",name:"storage.type.function.hcl"},{include:"#for_expression_body"}]},inline_if_expression:{begin:"(if)\\b",beginCaptures:{1:{name:"keyword.control.conditional.hcl"}},end:"\\n",patterns:[{include:"#expressions"},{include:"#comments"},{include:"#comma"},{include:"#local_identifiers"}]},language_constants:{comment:"Language Constants",match:"\\b(true|false|null)\\b",name:"constant.language.hcl"},literal_values:{patterns:[{include:"#numeric_literals"},{include:"#language_constants"},{include:"#string_literals"},{include:"#heredoc"},{include:"#hcl_type_keywords"}]},local_identifiers:{comment:"Local Identifiers",match:"\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b",name:"variable.other.readwrite.hcl"},numeric_literals:{patterns:[{captures:{1:{name:"punctuation.separator.exponent.hcl"}},comment:"Integer, no fraction, optional exponent",match:"\\b\\d+([Ee][+-]?)\\d+\\b",name:"constant.numeric.float.hcl"},{captures:{1:{name:"punctuation.separator.decimal.hcl"},2:{name:"punctuation.separator.exponent.hcl"}},comment:"Integer, fraction, optional exponent",match:"\\b\\d+(\\.)\\d+(?:([Ee][+-]?)\\d+)?\\b",name:"constant.numeric.float.hcl"},{comment:"Integers",match:"\\b\\d+\\b",name:"constant.numeric.integer.hcl"}]},object_for_expression:{begin:"(\\{)\\s?(for)\\b",beginCaptures:{1:{name:"punctuation.section.braces.begin.hcl"},2:{name:"keyword.control.hcl"}},end:"\\}",endCaptures:{0:{name:"punctuation.section.braces.end.hcl"}},patterns:[{match:"\\=\\>",name:"storage.type.function.hcl"},{include:"#for_expression_body"}]},object_key_values:{patterns:[{include:"#comments"},{include:"#literal_values"},{include:"#operators"},{include:"#tuple_for_expression"},{include:"#object_for_expression"},{include:"#heredoc"},{include:"#functions"}]},objects:{begin:"\\{",beginCaptures:{0:{name:"punctuation.section.braces.begin.hcl"}},end:"\\}",endCaptures:{0:{name:"punctuation.section.braces.end.hcl"}},name:"meta.braces.hcl",patterns:[{include:"#comments"},{include:"#objects"},{include:"#inline_for_expression"},{include:"#inline_if_expression"},{captures:{1:{name:"meta.mapping.key.hcl variable.other.readwrite.hcl"},2:{name:"keyword.operator.assignment.hcl"}},comment:"Literal, named object key",match:"\\b((?!null|false|true)[[:alpha:]][[:alnum:]_-]*)\\s*(\\=(?!=))\\s*"},{captures:{1:{name:"meta.mapping.key.hcl string.quoted.double.hcl"},2:{name:"punctuation.definition.string.begin.hcl"},3:{name:"punctuation.definition.string.end.hcl"},4:{name:"keyword.operator.hcl"}},comment:"String object key",match:'^\\s*((").*("))\\s*(\\=)\\s*'},{begin:"^\\s*\\(",beginCaptures:{0:{name:"punctuation.section.parens.begin.hcl"}},comment:"Computed object key (any expression between parens)",end:"(\\))\\s*(=|:)\\s*",endCaptures:{1:{name:"punctuation.section.parens.end.hcl"},2:{name:"keyword.operator.hcl"}},name:"meta.mapping.key.hcl",patterns:[{include:"#attribute_access"},{include:"#attribute_splat"}]},{include:"#object_key_values"}]},operators:{patterns:[{match:"\\>\\=",name:"keyword.operator.hcl"},{match:"\\<\\=",name:"keyword.operator.hcl"},{match:"\\=\\=",name:"keyword.operator.hcl"},{match:"\\!\\=",name:"keyword.operator.hcl"},{match:"\\+",name:"keyword.operator.arithmetic.hcl"},{match:"\\-",name:"keyword.operator.arithmetic.hcl"},{match:"\\*",name:"keyword.operator.arithmetic.hcl"},{match:"\\/",name:"keyword.operator.arithmetic.hcl"},{match:"\\%",name:"keyword.operator.arithmetic.hcl"},{match:"\\&\\&",name:"keyword.operator.logical.hcl"},{match:"\\|\\|",name:"keyword.operator.logical.hcl"},{match:"\\!",name:"keyword.operator.logical.hcl"},{match:"\\>",name:"keyword.operator.hcl"},{match:"\\<",name:"keyword.operator.hcl"},{match:"\\?",name:"keyword.operator.hcl"},{match:"\\.\\.\\.",name:"keyword.operator.hcl"},{match:"\\:",name:"keyword.operator.hcl"},{match:"\\=\\>",name:"keyword.operator.hcl"}]},parens:{begin:"\\(",beginCaptures:{0:{name:"punctuation.section.parens.begin.hcl"}},comment:"Parens - matched *after* function syntax",end:"\\)",endCaptures:{0:{name:"punctuation.section.parens.end.hcl"}},patterns:[{include:"#comments"},{include:"#expressions"}]},string_interpolation:{begin:"(?<![%$])([%$]{)",beginCaptures:{1:{name:"keyword.other.interpolation.begin.hcl"}},comment:"String interpolation",end:"\\}",endCaptures:{0:{name:"keyword.other.interpolation.end.hcl"}},name:"meta.interpolation.hcl",patterns:[{comment:"Trim left whitespace",match:"\\~\\s",name:"keyword.operator.template.left.trim.hcl"},{comment:"Trim right whitespace",match:"\\s\\~",name:"keyword.operator.template.right.trim.hcl"},{comment:"if/else/endif and for/in/endfor directives",match:"\\b(if|else|endif|for|in|endfor)\\b",name:"keyword.control.hcl"},{include:"#expressions"},{include:"#local_identifiers"}]},string_literals:{begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.hcl"}},comment:"Strings",end:'"',endCaptures:{0:{name:"punctuation.definition.string.end.hcl"}},name:"string.quoted.double.hcl",patterns:[{include:"#string_interpolation"},{include:"#char_escapes"}]},tuple_for_expression:{begin:"(\\[)\\s?(for)\\b",beginCaptures:{1:{name:"punctuation.section.brackets.begin.hcl"},2:{name:"keyword.control.hcl"}},end:"\\]",endCaptures:{0:{name:"punctuation.section.brackets.end.hcl"}},patterns:[{include:"#for_expression_body"}]}},scopeName:"source.hcl"});var n=[e];export{n as default};
@@ -1,3 +0,0 @@
1
- import e from"./CGQbO34C.js";import n from"./CbYhyuC0.js";import t from"./DAGYewaG.js";import a from"./CbViG2Xw.js";import i from"./CsYA0RN7.js";import o from"./ClXEvkw9.js";import u from"./DnhXxWz-.js";import r from"./ZQC2c-5V.js";import l from"./DCAtC51B.js";import c from"./Dch3xQiY.js";import m from"./DC8MraHL.js";import s from"./DwuVtWc2.js";import p from"./C5gCGmDW.js";import d from"./j8KhMG0x.js";import b from"./vMsNTMhM.js";import g from"./nclm9rTJ.js";import"./BXfENWL6.js";import"./RCJZWN-0.js";import"./BOnd8D4O.js";import"./DouzTJIq.js";import"./DbK06e1c.js";import"./D4k753MY.js";const x=Object.freeze({displayName:"LaTeX",name:"latex",patterns:[{comment:"This scope identifies partially typed commands such as `\\tab`. We use this to trigger “Command Completion” only when it makes sense.",match:"(?<=\\\\[\\w@]|\\\\[\\w@]{2}|\\\\[\\w@]{3}|\\\\[\\w@]{4}|\\\\[\\w@]{5}|\\\\[\\w@]{6})\\s",name:"meta.space-after-command.latex"},{begin:"((\\\\)(?:usepackage|documentclass))\\b(?=\\[|\\{)",beginCaptures:{1:{name:"keyword.control.preamble.latex"},2:{name:"punctuation.definition.function.latex"}},end:"(?<=\\})",endCaptures:{0:{name:"punctuation.definition.arguments.end.latex"}},name:"meta.preamble.latex",patterns:[{include:"#multiline-optional-arg"},{begin:"((?:\\G|(?<=\\]))\\{)",beginCaptures:{0:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"support.class.latex",end:"(\\})",endCaptures:{0:{name:"punctuation.definition.arguments.end.latex"}},patterns:[{include:"$self"}]}]},{begin:"((\\\\)(?:include|input))(\\{)",beginCaptures:{1:{name:"keyword.control.include.latex"},2:{name:"punctuation.definition.function.latex"},3:{name:"punctuation.definition.arguments.begin.latex"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.arguments.end.latex"}},name:"meta.include.latex",patterns:[{include:"$self"}]},{begin:"((\\\\)((?:sub){0,2}section|(?:sub)?paragraph|chapter|part|addpart|addchap|addsec|minisec|frametitle)(?:\\*)?)((?:\\[[^\\[]*?\\]){0,2})(\\{)",beginCaptures:{1:{name:"support.function.section.latex"},2:{name:"punctuation.definition.function.latex"},4:{patterns:[{include:"#optional-arg"}]},5:{name:"punctuation.definition.arguments.begin.latex"}},comment:"this works OK with all kinds of crazy stuff as long as section is one line",contentName:"entity.name.section.latex",end:"\\}",endCaptures:{0:{name:"punctuation.definition.arguments.end.latex"}},name:"meta.function.section.$3.latex",patterns:[{include:"text.tex#braces"},{include:"$base"}]},{begin:"((?:\\s*)\\\\begin\\{songs\\}\\{.*\\})",captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},contentName:"meta.data.environment.songs.latex",end:"(\\\\end\\{songs\\}(?:\\s*\\n)?)",name:"meta.function.environment.songs.latex",patterns:[{begin:"\\\\\\[",end:"\\]",name:"meta.chord.block.latex support.class.chord.block.environment.latex",patterns:[{include:"$base"}]},{match:"\\^",name:"meta.chord.block.latex support.class.chord.block.environment.latex"},{include:"$self"}]},{begin:"(?:^\\s*)?\\\\begin\\{(lstlisting|minted|pyglist)\\}(?=\\[|\\{)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\\\end\\{\\1\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)((?:c|cpp))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"source.cpp.embedded.latex",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"source.cpp.embedded.latex"}]},{begin:"(?:\\G|(?<=\\]))(\\{)((?:asy|asymptote))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"source.asy",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"source.asy"}]},{begin:"(?:\\G|(?<=\\]))(\\{)((?:css))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"source.css",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"source.css"}]},{begin:"(?:\\G|(?<=\\]))(\\{)((?:hs|haskell))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"source.haskell",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"source.haskell"}]},{begin:"(?:\\G|(?<=\\]))(\\{)((?:html))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"text.html",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"text.html.basic"}]},{begin:"(?:\\G|(?<=\\]))(\\{)((?:xml))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"text.xml",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"text.xml"}]},{begin:"(?:\\G|(?<=\\]))(\\{)((?:java))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"source.java",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"source.java"}]},{begin:"(?:\\G|(?<=\\]))(\\{)((?:lua))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"source.lua",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"source.lua"}]},{begin:"(?:\\G|(?<=\\]))(\\{)((?:jl|julia))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"source.julia",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"source.julia"}]},{begin:"(?:\\G|(?<=\\]))(\\{)((?:rb|ruby))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"source.ruby",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"source.ruby"}]},{begin:"(?:\\G|(?<=\\]))(\\{)((?:js|javascript))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"source.js",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"source.js"}]},{begin:"(?:\\G|(?<=\\]))(\\{)((?:ts|typescript))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"source.ts",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"source.ts"}]},{begin:"(?:\\G|(?<=\\]))(\\{)((?:py|python))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"source.python",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"source.python"}]},{begin:"(?:\\G|(?<=\\]))(\\{)((?:yaml))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"source.yaml",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"source.yaml"}]},{begin:"(?:\\G|(?<=\\]))(\\{)((?:rust))(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"source.rust",end:"^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",patterns:[{include:"source.rust"}]},{begin:"(?:\\G|(?<=\\]))(\\{)([a-zA-Z]*)(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"meta.function.embedded.latex",end:"^\\s*(?=\\\\end\\{(?:lstlisting|minted|pyglist)\\})",name:"meta.embedded.block.generic.latex"}]},{begin:"\\s*\\\\begin\\{(?:cppcode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\s*\\\\end\\{(?:cppcode)\\*?\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"variable.parameter.function.latex",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.arguments.end.latex"}}},{begin:"^(?=\\s*)",contentName:"source.cpp.embedded.latex",end:"^\\s*(?=\\\\end\\{(?:cppcode)\\*?\\})",patterns:[{include:"source.cpp.embedded.latex"}]}]},{begin:"\\s*\\\\begin\\{(?:hscode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\s*\\\\end\\{(?:hscode)\\*?\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"variable.parameter.function.latex",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.arguments.end.latex"}}},{begin:"^(?=\\s*)",contentName:"source.haskell",end:"^\\s*(?=\\\\end\\{(?:hscode)\\*?\\})",patterns:[{include:"source.haskell"}]}]},{begin:"\\s*\\\\begin\\{(?:luacode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\s*\\\\end\\{(?:luacode)\\*?\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"variable.parameter.function.latex",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.arguments.end.latex"}}},{begin:"^(?=\\s*)",contentName:"source.lua",end:"^\\s*(?=\\\\end\\{(?:luacode)\\*?\\})",patterns:[{include:"source.lua"}]}]},{begin:"\\s*\\\\begin\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\s*\\\\end\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"variable.parameter.function.latex",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.arguments.end.latex"}}},{begin:"^(?=\\s*)",contentName:"source.julia",end:"^\\s*(?=\\\\end\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\})",patterns:[{include:"source.julia"}]}]},{begin:"\\s*\\\\begin\\{(?:juliacode|juliaverbatim|juliablock|juliaconcode|juliaconsole|juliaconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\s*\\\\end\\{(?:juliacode|juliaverbatim|juliablock|juliaconcode|juliaconsole|juliaconverbatim)\\*?\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"variable.parameter.function.latex",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.arguments.end.latex"}}},{begin:"^(?=\\s*)",contentName:"source.julia",end:"^\\s*(?=\\\\end\\{(?:juliacode|juliaverbatim|juliablock|juliaconcode|juliaconsole|juliaconverbatim)\\*?\\})",patterns:[{include:"source.julia"}]}]},{begin:"\\s*\\\\begin\\{(?:sageblock|sagesilent|sageverbatim|sageexample|sagecommandline|python|pythonq|pythonrepl)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\s*\\\\end\\{(?:sageblock|sagesilent|sageverbatim|sageexample|sagecommandline|python|pythonq|pythonrepl)\\*?\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"variable.parameter.function.latex",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.arguments.end.latex"}}},{begin:"^(?=\\s*)",contentName:"source.python",end:"^\\s*(?=\\\\end\\{(?:sageblock|sagesilent|sageverbatim|sageexample|sagecommandline|python|pythonq|pythonrepl)\\*?\\})",patterns:[{include:"source.python"}]}]},{begin:"\\s*\\\\begin\\{(?:pycode|pyverbatim|pyblock|pyconcode|pyconsole|pyconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\s*\\\\end\\{(?:pycode|pyverbatim|pyblock|pyconcode|pyconsole|pyconverbatim)\\*?\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"variable.parameter.function.latex",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.arguments.end.latex"}}},{begin:"^(?=\\s*)",contentName:"source.python",end:"^\\s*(?=\\\\end\\{(?:pycode|pyverbatim|pyblock|pyconcode|pyconsole|pyconverbatim)\\*?\\})",patterns:[{include:"source.python"}]}]},{begin:"\\s*\\\\begin\\{(?:pylabcode|pylabverbatim|pylabblock|pylabconcode|pylabconsole|pylabconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\s*\\\\end\\{(?:pylabcode|pylabverbatim|pylabblock|pylabconcode|pylabconsole|pylabconverbatim)\\*?\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"variable.parameter.function.latex",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.arguments.end.latex"}}},{begin:"^(?=\\s*)",contentName:"source.python",end:"^\\s*(?=\\\\end\\{(?:pylabcode|pylabverbatim|pylabblock|pylabconcode|pylabconsole|pylabconverbatim)\\*?\\})",patterns:[{include:"source.python"}]}]},{begin:"\\s*\\\\begin\\{(?:sympycode|sympyverbatim|sympyblock|sympyconcode|sympyconsole|sympyconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\s*\\\\end\\{(?:sympycode|sympyverbatim|sympyblock|sympyconcode|sympyconsole|sympyconverbatim)\\*?\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"variable.parameter.function.latex",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.arguments.end.latex"}}},{begin:"^(?=\\s*)",contentName:"source.python",end:"^\\s*(?=\\\\end\\{(?:sympycode|sympyverbatim|sympyblock|sympyconcode|sympyconsole|sympyconverbatim)\\*?\\})",patterns:[{include:"source.python"}]}]},{begin:"\\s*\\\\begin\\{(?:scalacode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\s*\\\\end\\{(?:scalacode)\\*?\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"variable.parameter.function.latex",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.arguments.end.latex"}}},{begin:"^(?=\\s*)",contentName:"source.scala",end:"^\\s*(?=\\\\end\\{(?:scalacode)\\*?\\})",patterns:[{include:"source.scala"}]}]},{begin:"\\s*\\\\begin\\{(?:asy|asycode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\s*\\\\end\\{(?:asy|asycode)\\*?\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"variable.parameter.function.latex",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.arguments.end.latex"}}},{begin:"^(?=\\s*)",contentName:"source.asymptote",end:"^\\s*(?=\\\\end\\{(?:asy|asycode)\\*?\\})",patterns:[{include:"source.asymptote"}]}]},{begin:"\\s*\\\\begin\\{(?:dot2tex|dotcode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\s*\\\\end\\{(?:dot2tex|dotcode)\\*?\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"variable.parameter.function.latex",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.arguments.end.latex"}}},{begin:"^(?=\\s*)",contentName:"source.dot",end:"^\\s*(?=\\\\end\\{(?:dot2tex|dotcode)\\*?\\})",patterns:[{include:"source.dot"}]}]},{begin:"\\s*\\\\begin\\{(?:gnuplot)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\s*\\\\end\\{(?:gnuplot)\\*?\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"variable.parameter.function.latex",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.arguments.end.latex"}}},{begin:"^(?=\\s*)",contentName:"source.gnuplot",end:"^\\s*(?=\\\\end\\{(?:gnuplot)\\*?\\})",patterns:[{include:"source.gnuplot"}]}]},{begin:"\\s*\\\\begin\\{([a-zA-Z]*code|lstlisting|minted|pyglist)\\*?\\}(?:\\[.*\\])?(?:\\{.*\\})?",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},contentName:"meta.function.embedded.latex",end:"\\\\end\\{\\1\\}(?:\\s*\\n)?",name:"meta.embedded.block.generic.latex"},{begin:"(?:^\\s*)?\\\\begin\\{(terminal\\*?)\\}(?=\\[|\\{)",captures:{0:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"\\\\end\\{\\1\\}",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)([a-zA-Z]*)(\\})",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.end.latex"}},contentName:"meta.function.embedded.latex",end:"^\\s*(?=\\\\end\\{terminal\\*?\\})",name:"meta.embedded.block.generic.latex"}]},{begin:"((\\\\)addplot)(?:\\+?)((?:\\[[^\\[]*\\]))*\\s*(gnuplot)\\s*((?:\\[[^\\[]*\\]))*\\s*(\\{)",captures:{1:{name:"support.function.be.latex"},2:{name:"punctuation.definition.function.latex"},3:{patterns:[{include:"#optional-arg"}]},4:{name:"variable.parameter.function.latex"},5:{patterns:[{include:"#optional-arg"}]},6:{name:"punctuation.definition.arguments.begin.latex"}},end:"\\s*(\\};)",patterns:[{begin:"%",beginCaptures:{0:{name:"punctuation.definition.comment.latex"}},end:"$\\n?",name:"comment.line.percentage.latex"},{include:"source.gnuplot"}]},{begin:"(\\s*\\\\begin\\{((?:fboxv|boxedv|V|v|spv)erbatim\\*?)\\})",captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},contentName:"markup.raw.verbatim.latex",end:"(\\\\end\\{\\2\\})",name:"meta.function.verbatim.latex"},{begin:"(\\s*\\\\begin\\{VerbatimOut\\}\\{[^\\}]*\\})",captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},contentName:"markup.raw.verbatim.latex",end:"(\\\\end\\{\\VerbatimOut\\})",name:"meta.function.verbatim.latex"},{begin:"(\\s*\\\\begin\\{alltt\\})",captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},contentName:"markup.raw.verbatim.latex",end:"(\\\\end\\{alltt\\})",name:"meta.function.alltt.latex",patterns:[{captures:{1:{name:"punctuation.definition.function.latex"}},match:"(\\\\)[A-Za-z]+",name:"support.function.general.latex"}]},{begin:"(\\s*\\\\begin\\{([Cc]omment)\\})",captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},contentName:"punctuation.definition.comment.latex",end:"(\\\\end\\{\\2\\})",name:"meta.function.verbatim.latex"},{begin:"(?:\\s*)((\\\\)(?:href|hyperref|hyperimage))(?=\\[|\\{)",beginCaptures:{1:{name:"support.function.url.latex"}},comment:"Captures \\command[option]{url}{optional category}{optional name}{text}",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.arguments.end.latex"}},name:"meta.function.hyperlink.latex",patterns:[{include:"#multiline-optional-arg-no-highlight"},{begin:"(?:\\G|(?<=\\]))(\\{)([^}]*)(\\})(?:\\{[^}]*\\}){2}?(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"markup.underline.link.latex"},3:{name:"punctuation.definition.arguments.end.latex"},4:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"meta.variable.parameter.function.latex",end:"(?=\\})",patterns:[{include:"$base"}]},{begin:"(?:\\G|(?<=\\]))(?:(\\{)[^}]*(\\}))?(\\{)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.latex"},2:{name:"punctuation.definition.arguments.end.latex"},3:{name:"punctuation.definition.arguments.begin.latex"}},contentName:"meta.variable.parameter.function.latex",end:"(?=\\})",patterns:[{include:"$base"}]}]},{captures:{1:{name:"support.function.url.latex"},2:{name:"punctuation.definition.function.latex"},3:{name:"punctuation.definition.arguments.begin.latex"},5:{name:"punctuation.definition.arguments.end.latex"},"'":{name:"markup.underline.link.latex"}},match:"(?:\\s*)((\\\\)url)(\\{)([^}]*)(\\})",name:"meta.function.link.url.latex"},{captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},comment:"These two patterns match the \\begin{document} and \\end{document} commands, so that the environment matching pattern following them will ignore those commands.",match:"(\\s*\\\\begin\\{document\\})",name:"meta.function.begin-document.latex"},{captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},match:"(\\s*\\\\end\\{document\\})",name:"meta.function.end-document.latex"},{begin:"(?:\\s*)((\\\\)begin)(\\{)((?:\\+?array|equation|(?:IEEE)?eqnarray|multline|align|aligned|alignat|alignedat|flalign|flaligned|flalignat|split|gather|gathered|\\+?cases|(?:display)?math|\\+?[a-zA-Z]*matrix|[pbBvV]?NiceMatrix|[pbBvV]?NiceArray|(?:(?:arg)?(?:mini|maxi)))(?:\\*|!)?)(\\})(\\s*\\n)?",captures:{1:{name:"support.function.be.latex"},2:{name:"punctuation.definition.function.latex"},3:{name:"punctuation.definition.arguments.begin.latex"},4:{name:"variable.parameter.function.latex"},5:{name:"punctuation.definition.arguments.end.latex"}},contentName:"meta.math.block.latex support.class.math.block.environment.latex",end:"(?:\\s*)((\\\\)end)(\\{)(\\4)(\\})(?:\\s*\\n)?",name:"meta.function.environment.math.latex",patterns:[{match:"(?<!\\\\)&",name:"keyword.control.equation.align.latex"},{match:"\\\\\\\\",name:"keyword.control.equation.newline.latex"},{include:"#definition-label"},{include:"text.tex#math"},{include:"$base"}]},{begin:"(?:\\s*)(\\\\begin\\{empheq\\}(?:\\[.*\\])?)",captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},contentName:"meta.math.block.latex support.class.math.block.environment.latex",end:"(?:\\s*)(\\\\end\\{empheq\\})",name:"meta.function.environment.math.latex",patterns:[{match:"(?<!\\\\)&",name:"keyword.control.equation.align.latex"},{match:"\\\\\\\\",name:"keyword.control.equation.newline.latex"},{include:"#definition-label"},{include:"text.tex#math"},{include:"$base"}]},{begin:"(\\s*\\\\begin\\{(tabular[xy*]?|xltabular|longtable|(?:long)?tabu|(?:long|tall)?tblr|NiceTabular[X*]?|booktabs)\\}(\\s*\\n)?)",captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},contentName:"meta.data.environment.tabular.latex",end:"(\\s*\\\\end\\{(\\2)\\}(?:\\s*\\n)?)",name:"meta.function.environment.tabular.latex",patterns:[{match:"(?<!\\\\)&",name:"keyword.control.table.cell.latex"},{match:"\\\\\\\\",name:"keyword.control.table.newline.latex"},{include:"$base"}]},{begin:"(\\s*\\\\begin\\{(itemize|enumerate|description|list)\\})",captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"(\\\\end\\{\\2\\}(?:\\s*\\n)?)",name:"meta.function.environment.list.latex",patterns:[{include:"$base"}]},{begin:"(\\s*\\\\begin\\{tikzpicture\\})",captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"(\\\\end\\{tikzpicture\\}(?:\\s*\\n)?)",name:"meta.function.environment.latex.tikz",patterns:[{include:"$base"}]},{begin:"(\\s*\\\\begin\\{frame\\})",captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"(\\\\end\\{frame\\})",name:"meta.function.environment.frame.latex",patterns:[{include:"$base"}]},{begin:"(\\s*\\\\begin\\{(mpost\\*?)\\})",captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"(\\\\end\\{\\2\\}(?:\\s*\\n)?)",name:"meta.function.environment.latex.mpost"},{begin:"(\\s*\\\\begin\\{markdown\\})",captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},contentName:"meta.embedded.markdown_latex_combined",end:"(\\\\end\\{markdown\\})",patterns:[{include:"text.tex.markdown_latex_combined"}]},{begin:"(\\s*\\\\begin\\{(\\w+\\*?)\\})",captures:{1:{patterns:[{include:"#begin-env-tokenizer"}]}},end:"(\\\\end\\{\\2\\}(?:\\s*\\n)?)",name:"meta.function.environment.general.latex",patterns:[{include:"$base"}]},{captures:{1:{name:"storage.type.function.latex"},2:{name:"punctuation.definition.function.latex"},3:{name:"punctuation.definition.begin.latex"},4:{name:"support.function.general.latex"},5:{name:"punctuation.definition.function.latex"},6:{name:"punctuation.definition.end.latex"}},match:"((\\\\)(?:newcommand|renewcommand|(?:re)?newrobustcmd|DeclareRobustCommand))\\*?({)((\\\\)[^}]*)(})"},{begin:"((\\\\)marginpar)((?:\\[[^\\[]*?\\])*)(\\{)",beginCaptures:{1:{name:"support.function.marginpar.latex"},2:{name:"punctuation.definition.function.latex"},3:{patterns:[{include:"#optional-arg"}]},4:{name:"punctuation.definition.marginpar.begin.latex"}},contentName:"meta.paragraph.margin.latex",end:"\\}",endCaptures:{0:{name:"punctuation.definition.marginpar.end.latex"}},patterns:[{include:"text.tex#braces"},{include:"$base"}]},{begin:"((\\\\)footnote)((?:\\[[^\\[]*?\\])*)(\\{)",beginCaptures:{1:{name:"support.function.footnote.latex"},2:{name:"punctuation.definition.function.latex"},3:{patterns:[{include:"#optional-arg"}]},4:{name:"punctuation.definition.footnote.begin.latex"}},contentName:"entity.name.footnote.latex",end:"\\}",endCaptures:{0:{name:"punctuation.definition.footnote.end.latex"}},patterns:[{include:"text.tex#braces"},{include:"$base"}]},{begin:"((\\\\)emph)(\\{)",beginCaptures:{1:{name:"support.function.emph.latex"},2:{name:"punctuation.definition.function.latex"},3:{name:"punctuation.definition.emph.begin.latex"}},contentName:"markup.italic.emph.latex",end:"\\}",endCaptures:{0:{name:"punctuation.definition.emph.end.latex"}},name:"meta.function.emph.latex",patterns:[{include:"text.tex#braces"},{include:"$base"}]},{begin:"((\\\\)textit)(\\{)",captures:{1:{name:"support.function.textit.latex"},2:{name:"punctuation.definition.function.latex"},3:{name:"punctuation.definition.textit.begin.latex"}},comment:`We put the keyword in a capture and name this capture, so that disabling spell checking for “keyword” won't be inherited by the argument to \\textit{...}.
2
-
3
- Put specific matches for particular LaTeX keyword.functions before the last two more general functions`,contentName:"markup.italic.textit.latex",end:"\\}",endCaptures:{0:{name:"punctuation.definition.textit.end.latex"}},name:"meta.function.textit.latex",patterns:[{include:"text.tex#braces"},{include:"$base"}]},{begin:"((\\\\)textbf)(\\{)",captures:{1:{name:"support.function.textbf.latex"},2:{name:"punctuation.definition.function.latex"},3:{name:"punctuation.definition.textbf.begin.latex"}},contentName:"markup.bold.textbf.latex",end:"\\}",endCaptures:{0:{name:"punctuation.definition.textbf.end.latex"}},name:"meta.function.textbf.latex",patterns:[{include:"text.tex#braces"},{include:"$base"}]},{begin:"((\\\\)texttt)(\\{)",captures:{1:{name:"support.function.texttt.latex"},2:{name:"punctuation.definition.function.latex"},3:{name:"punctuation.definition.texttt.begin.latex"}},contentName:"markup.raw.texttt.latex",end:"\\}",endCaptures:{0:{name:"punctuation.definition.texttt.end.latex"}},name:"meta.function.texttt.latex",patterns:[{include:"text.tex#braces"},{include:"$base"}]},{captures:{0:{name:"keyword.other.item.latex"},1:{name:"punctuation.definition.keyword.latex"}},match:"(\\\\)item\\b",name:"meta.scope.item.latex"},{begin:"((\\\\)(?:[aA]uto|foot|full|no|ref|short|[tT]ext|[pP]aren|[sS]mart)?[cC]ite(?:al)?(?:p|s|t|author|year(?:par)?|title)?[ANP]*\\*?)((?:(?:\\([^\\)]*\\)){0,2}(?:\\[[^\\]]*\\]){0,2}\\{[\\p{Alphabetic}:.]*\\})*)(?:([<\\[])[^\\]<>]*([>\\]]))?(?:(\\[)[^\\]]*(\\]))?(\\{)",captures:{1:{name:"keyword.control.cite.latex"},2:{name:"punctuation.definition.keyword.latex"},3:{patterns:[{include:"#autocites-arg"}]},4:{name:"punctuation.definition.arguments.optional.begin.latex"},5:{name:"punctuation.definition.arguments.optional.end.latex"},6:{name:"punctuation.definition.arguments.optional.begin.latex"},7:{name:"punctuation.definition.arguments.optional.end.latex"},8:{name:"punctuation.definition.arguments.begin.latex"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.arguments.end.latex"}},name:"meta.citation.latex",patterns:[{captures:{1:{name:"comment.line.percentage.tex"},2:{name:"punctuation.definition.comment.tex"}},match:"((%).*)$"},{match:"[\\p{Alphabetic}\\p{Number}:.-]+",name:"constant.other.reference.citation.latex"}]},{begin:"((\\\\)bibentry)(\\{)",captures:{1:{name:"keyword.control.cite.latex"},2:{name:"punctuation.definition.keyword.latex"},3:{name:"punctuation.definition.arguments.begin.latex"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.arguments.end.latex"}},name:"meta.citation.latex",patterns:[{match:"[\\p{Alphabetic}\\p{Number}:.]+",name:"constant.other.reference.citation.latex"}]},{begin:"((\\\\)(?:\\w*[rR]ef\\*?))(\\{)",beginCaptures:{1:{name:"keyword.control.ref.latex"},2:{name:"punctuation.definition.keyword.latex"},3:{name:"punctuation.definition.arguments.begin.latex"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.arguments.end.latex"}},name:"meta.reference.label.latex",patterns:[{match:"[\\p{Alphabetic}\\p{Number}\\.,:/*!^_-]",name:"constant.other.reference.label.latex"}]},{include:"#definition-label"},{begin:"((\\\\)(?:verb|Verb|spverb)\\*?)\\s*((\\\\)scantokens)(\\{)",beginCaptures:{1:{name:"support.function.verb.latex"},2:{name:"punctuation.definition.function.latex"},3:{name:"support.function.verb.latex"},4:{name:"punctuation.definition.verb.latex"},5:{name:"punctuation.definition.begin.latex"}},contentName:"markup.raw.verb.latex",end:"(\\})",endCaptures:{1:{name:"punctuation.definition.end.latex"}},name:"meta.function.verb.latex",patterns:[{include:"$self"}]},{captures:{1:{name:"support.function.verb.latex"},2:{name:"punctuation.definition.function.latex"},3:{name:"punctuation.definition.verb.latex"},4:{name:"markup.raw.verb.latex"},5:{name:"punctuation.definition.verb.latex"}},match:"((\\\\)(?:verb|Verb|spverb)\\*?)\\s*((?<=\\s)\\S|[^a-zA-Z])(.*?)(\\3|$)",name:"meta.function.verb.latex"},{captures:{1:{name:"support.function.verb.latex"},2:{name:"punctuation.definition.function.latex"},3:{patterns:[{include:"#optional-arg"}]},4:{name:"punctuation.definition.arguments.begin.latex"},5:{name:"punctuation.definition.arguments.end.latex"},6:{name:"punctuation.definition.verb.latex"},7:{name:"markup.raw.verb.latex"},8:{name:"punctuation.definition.verb.latex"},9:{name:"punctuation.definition.verb.latex"},10:{name:"markup.raw.verb.latex"},11:{name:"punctuation.definition.verb.latex"}},match:"((\\\\)(?:mint|mintinline))((?:\\[[^\\[]*?\\])?)(\\{)[a-zA-Z]*(\\})(?:(?:([^a-zA-Z\\{])(.*?)(\\6))|(?:(\\{)(.*?)(\\})))",name:"meta.function.verb.latex"},{captures:{1:{name:"support.function.verb.latex"},2:{name:"punctuation.definition.function.latex"},3:{patterns:[{include:"#optional-arg"}]},4:{name:"punctuation.definition.verb.latex"},5:{name:"markup.raw.verb.latex"},6:{name:"punctuation.definition.verb.latex"},7:{name:"punctuation.definition.verb.latex"},8:{name:"markup.raw.verb.latex"},9:{name:"punctuation.definition.verb.latex"}},match:"((\\\\)[a-z]+inline)((?:\\[[^\\[]*?\\])?)(?:(?:([^a-zA-Z\\{])(.*?)(\\4))|(?:(\\{)(.*?)(\\})))",name:"meta.function.verb.latex"},{captures:{1:{name:"support.function.verb.latex"},2:{name:"punctuation.definition.function.latex"},3:{patterns:[{include:"#optional-arg"}]},4:{name:"punctuation.definition.verb.latex"},5:{name:"source.python",patterns:[{include:"source.python"}]},6:{name:"punctuation.definition.verb.latex"},7:{name:"punctuation.definition.verb.latex"},8:{name:"source.python",patterns:[{include:"source.python"}]},9:{name:"punctuation.definition.verb.latex"}},match:"((\\\\)(?:(?:py|pycon|pylab|pylabcon|sympy|sympycon)[cv]?|pyq|pycq|pyif))((?:\\[[^\\[]*?\\])?)(?:(?:([^a-zA-Z\\{])(.*?)(\\4))|(?:(\\{)(.*?)(\\})))",name:"meta.function.verb.latex"},{captures:{1:{name:"support.function.verb.latex"},2:{name:"punctuation.definition.function.latex"},3:{patterns:[{include:"#optional-arg"}]},4:{name:"punctuation.definition.verb.latex"},5:{name:"source.julia",patterns:[{include:"source.julia"}]},6:{name:"punctuation.definition.verb.latex"},7:{name:"punctuation.definition.verb.latex"},8:{name:"source.julia",patterns:[{include:"source.julia"}]},9:{name:"punctuation.definition.verb.latex"}},match:"((\\\\)(?:jl|julia)[cv]?)((?:\\[[^\\[]*?\\])?)(?:(?:([^a-zA-Z\\{])(.*?)(\\4))|(?:(\\{)(.*?)(\\})))",name:"meta.function.verb.latex"},{match:"\\\\(?:newline|pagebreak|clearpage|linebreak|pause)(?:\\b)",name:"keyword.control.layout.latex"},{begin:"\\\\\\(",beginCaptures:{0:{name:"punctuation.definition.string.begin.latex"}},end:"\\\\\\)",endCaptures:{0:{name:"punctuation.definition.string.end.latex"}},name:"meta.math.block.latex support.class.math.block.environment.latex",patterns:[{include:"text.tex#math"},{include:"$base"}]},{begin:"\\$\\$",beginCaptures:{0:{name:"punctuation.definition.string.begin.latex"}},end:"\\$\\$",endCaptures:{0:{name:"punctuation.definition.string.end.latex"}},name:"meta.math.block.latex support.class.math.block.environment.latex",patterns:[{match:"\\\\\\$",name:"constant.character.escape.latex"},{include:"text.tex#math"},{include:"$base"}]},{begin:"\\$",beginCaptures:{0:{name:"punctuation.definition.string.begin.tex"}},end:"\\$",endCaptures:{0:{name:"punctuation.definition.string.end.tex"}},name:"meta.math.block.tex support.class.math.block.tex",patterns:[{match:"\\\\\\$",name:"constant.character.escape.latex"},{include:"text.tex#math"},{include:"$base"}]},{begin:"\\\\\\[",beginCaptures:{0:{name:"punctuation.definition.string.begin.latex"}},end:"\\\\\\]",endCaptures:{0:{name:"punctuation.definition.string.end.latex"}},name:"meta.math.block.latex support.class.math.block.environment.latex",patterns:[{include:"text.tex#math"},{include:"$base"}]},{captures:{1:{name:"punctuation.definition.constant.latex"}},match:"(\\\\)(text(s(terling|ixoldstyle|urd|e(ction|venoldstyle|rvicemark))|yen|n(ineoldstyle|umero|aira)|c(ircledP|o(py(left|right)|lonmonetary)|urrency|e(nt(oldstyle)?|lsius))|t(hree(superior|oldstyle|quarters(emdash)?)|i(ldelow|mes)|w(o(superior|oldstyle)|elveudash)|rademark)|interrobang(down)?|zerooldstyle|o(hm|ne(superior|half|oldstyle|quarter)|penbullet|rd(feminine|masculine))|d(i(scount|ed|v(orced)?)|o(ng|wnarrow|llar(oldstyle)?)|egree|agger(dbl)?|blhyphen(char)?)|uparrow|p(ilcrow|e(so|r(t(housand|enthousand)|iodcentered))|aragraph|m)|e(stimated|ightoldstyle|uro)|quotes(traight(dblbase|base)|ingle)|f(iveoldstyle|ouroldstyle|lorin|ractionsolidus)|won|l(not|ira|e(ftarrow|af)|quill|angle|brackdbl)|a(s(cii(caron|dieresis|acute|grave|macron|breve)|teriskcentered)|cutedbl)|r(ightarrow|e(cipe|ferencemark|gistered)|quill|angle|brackdbl)|g(uarani|ravedbl)|m(ho|inus|u(sicalnote)?|arried)|b(igcircle|orn|ullet|lank|a(ht|rdbl)|rokenbar)))\\b",name:"constant.character.latex"},{captures:{1:{name:"punctuation.definition.column-specials.begin.latex"},2:{name:"punctuation.definition.column-specials.end.latex"}},match:"(?:<|>)(\\{)\\$(\\})",name:"meta.column-specials.latex"},{include:"text.tex"}],repository:{"autocites-arg":{patterns:[{captures:{1:{name:"punctuation.definition.arguments.optional.begin.latex"},2:{name:"punctuation.definition.arguments.optional.end.latex"},3:{name:"punctuation.definition.arguments.optional.begin.latex"},4:{name:"punctuation.definition.arguments.optional.end.latex"},5:{name:"punctuation.definition.arguments.begin.latex"},6:{name:"constant.other.reference.citation.latex"},7:{name:"punctuation.definition.arguments.end.latex"},8:{patterns:[{include:"#autocites-arg"}]}},match:"(?:(\\()[^\\)]*(\\))){0,2}(?:(\\[)[^\\]]*(\\])){0,2}(\\{)([\\p{Alphabetic}\\p{Number}:.]+)(\\})(.*)"}]},"begin-env-tokenizer":{captures:{1:{name:"support.function.be.latex"},2:{name:"punctuation.definition.function.latex"},3:{name:"punctuation.definition.arguments.begin.latex"},4:{name:"variable.parameter.function.latex"},5:{name:"punctuation.definition.arguments.end.latex"},6:{name:"punctuation.definition.arguments.optional.begin.latex"},7:{patterns:[{include:"$base"}]},8:{name:"punctuation.definition.arguments.optional.end.latex"},9:{name:"punctuation.definition.arguments.begin.latex"},10:{name:"variable.parameter.function.latex"},11:{name:"punctuation.definition.arguments.end.latex"}},match:"\\s*((\\\\)(?:begin|end))(\\{)([a-zA-Z]*\\*?)(\\})(?:(\\[)(.*)(\\]))?(?:(\\{)([^{}]*)(\\}))?"},"definition-label":{begin:"((\\\\)label)((?:\\[[^\\[]*?\\])*)(\\{)",beginCaptures:{1:{name:"keyword.control.label.latex"},2:{name:"punctuation.definition.keyword.latex"},3:{patterns:[{include:"#optional-arg"}]},4:{name:"punctuation.definition.arguments.begin.latex"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.arguments.end.latex"}},name:"meta.definition.label.latex",patterns:[{match:"[\\p{Alphabetic}\\p{Number}\\.,:/*!^_-]",name:"variable.parameter.definition.label.latex"}]},"multiline-optional-arg":{begin:"\\G\\[",beginCaptures:{0:{name:"punctuation.definition.arguments.optional.begin.latex"}},contentName:"variable.parameter.function.latex",end:"\\]",endCaptures:{0:{name:"punctuation.definition.arguments.optional.end.latex"}},name:"meta.parameter.optional.latex",patterns:[{include:"$self"}]},"multiline-optional-arg-no-highlight":{begin:"\\G\\[",beginCaptures:{0:{name:"punctuation.definition.arguments.optional.begin.latex"}},end:"\\]",endCaptures:{0:{name:"punctuation.definition.arguments.optional.end.latex"}},name:"meta.parameter.optional.latex",patterns:[{include:"$self"}]},"optional-arg":{patterns:[{captures:{1:{name:"punctuation.definition.arguments.optional.begin.latex"},2:{name:"variable.parameter.function.latex"},3:{name:"punctuation.definition.arguments.optional.end.latex"}},match:"(\\[)([^\\[]*?)(\\])",name:"meta.parameter.optional.latex"}]}},scopeName:"text.tex.latex",embeddedLangs:["tex","css","haskell","html","xml","java","lua","julia","ruby","javascript","typescript","python","yaml","rust","scala","gnuplot"]});var L=[...e,...n,...t,...a,...i,...o,...u,...r,...l,...c,...m,...s,...p,...d,...b,...g,x];export{L as default};