@macintacos/caret 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +51 -16
- package/commands/discovery.md +1 -1
- package/dist/cli.js +1608 -200
- package/opencode/caret.plugin.ts +238 -14
- package/opencode/index.ts +8 -0
- package/package.json +18 -2
- package/ui/dist/assets/{angular-html-Qbpn1MTX.js → angular-html-kKPIob-B.js} +1 -1
- package/ui/dist/assets/{angular-ts-DOJ1C-2P.js → angular-ts-CKjP4O1R.js} +1 -1
- package/ui/dist/assets/{apl-Y5-ddbi_.js → apl-DCRQgCPD.js} +1 -1
- package/ui/dist/assets/{astro-CT31GiG6.js → astro-BYbWYON5.js} +1 -1
- package/ui/dist/assets/{blade-DstC0Y7u.js → blade-CwhP_dxJ.js} +1 -1
- package/ui/dist/assets/{c-1h9wmDaJ.js → c-CJEVusFw.js} +1 -1
- package/ui/dist/assets/{cobol-BJsqFKRW.js → cobol-DIBOqviT.js} +1 -1
- package/ui/dist/assets/{coffee-lAZsrYrG.js → coffee-BS7TY60J.js} +1 -1
- package/ui/dist/assets/{cpp-BwPvHcji.js → cpp-D1DVYlIO.js} +1 -1
- package/ui/dist/assets/{crystal-C9nhMRLM.js → crystal-1wNBwJ9X.js} +1 -1
- package/ui/dist/assets/{css-zV5baxCq.js → css-DcRg7BqA.js} +1 -1
- package/ui/dist/assets/{dist-DGObAN16.js → dist-BPvuZVb2.js} +1 -1
- package/ui/dist/assets/{dist-CnTQMJTD.js → dist-BeSPrXBn.js} +1 -1
- package/ui/dist/assets/{dist-C94yZ6__.js → dist-Bm-_E_MU.js} +1 -1
- package/ui/dist/assets/{dist-BcfPYvB6.js → dist-Buh6GXb2.js} +1 -1
- package/ui/dist/assets/{dist-BL3PTdx3.js → dist-C0x7GorT.js} +1 -1
- package/ui/dist/assets/{dist-DTwEdaPW.js → dist-C2049AtS.js} +1 -1
- package/ui/dist/assets/{dist-D5aJA_uS.js → dist-C7ysmu-x.js} +1 -1
- package/ui/dist/assets/{dist-ap3lqXWD.js → dist-CA76eI1h.js} +1 -1
- package/ui/dist/assets/{dist-B2afH7tP.js → dist-CZ-hU0oG.js} +1 -1
- package/ui/dist/assets/{dist-ZPJnos5t.js → dist-Cyz1Y8uV.js} +1 -1
- package/ui/dist/assets/{dist-CWdEcyiK.js → dist-CzDZ2KMv.js} +1 -1
- package/ui/dist/assets/{dist-Ba7qEsX8.js → dist-DBvtZoff.js} +1 -1
- package/ui/dist/assets/{dist-D1Xb0cdg.js → dist-DNG5YE4w.js} +1 -1
- package/ui/dist/assets/{dist-CBdstVS8.js → dist-DPr7mnLy.js} +1 -1
- package/ui/dist/assets/{dist-eJbkdDpi.js → dist-Dhe__fm5.js} +1 -1
- package/ui/dist/assets/{dist-EeYINWCK.js → dist-afCEYO1j.js} +1 -1
- package/ui/dist/assets/{dist-Cuw-4MzZ.js → dist-fAkxRpOI.js} +1 -1
- package/ui/dist/assets/{edge-DtPr1ved.js → edge-DhG5RI3d.js} +1 -1
- package/ui/dist/assets/{elixir-DxdQpZmO.js → elixir-k8JKnHNU.js} +1 -1
- package/ui/dist/assets/{elm-PyFaNcFd.js → elm-BCt58sPl.js} +1 -1
- package/ui/dist/assets/{erb-4d0ztAHA.js → erb-gEaFK19o.js} +1 -1
- package/ui/dist/assets/{git-rebase-CF959Xij.js → git-rebase-PGNnuu_q.js} +1 -1
- package/ui/dist/assets/{glimmer-js-DOoPHQhz.js → glimmer-js-BShMa8kS.js} +1 -1
- package/ui/dist/assets/{glimmer-ts-B-wO1BbM.js → glimmer-ts-BBjvNufU.js} +1 -1
- package/ui/dist/assets/{glsl-DhUIrRGp.js → glsl-CVu5XUh6.js} +1 -1
- package/ui/dist/assets/{graphql-DHm0YGdI.js → graphql-CpSUkXDO.js} +1 -1
- package/ui/dist/assets/{hack-KmeknXZp.js → hack-vYYr_EuM.js} +1 -1
- package/ui/dist/assets/{haml-CqH8UVt6.js → haml-aiyqEFS_.js} +1 -1
- package/ui/dist/assets/{handlebars-xVW6rqZc.js → handlebars-vKdd7ZE6.js} +1 -1
- package/ui/dist/assets/{html-Dm0ku22r.js → html-BSDB9v3Y.js} +1 -1
- package/ui/dist/assets/{html-derivative-ByxJ1rMF.js → html-derivative-V8cBpxuT.js} +1 -1
- package/ui/dist/assets/{http--f7CCugj.js → http-DXSNVmLc.js} +1 -1
- package/ui/dist/assets/{hurl-hbsn4uwO.js → hurl-eKV70JUb.js} +1 -1
- package/ui/dist/assets/index-C3YoPLgV.js +896 -0
- package/ui/dist/assets/index-C6mdkhzF.css +1 -0
- package/ui/dist/assets/{java-DIuHCmu6.js → java-DGolWD2l.js} +1 -1
- package/ui/dist/assets/{javascript-gLvwRdLL.js → javascript-DcKrb1R6.js} +1 -1
- package/ui/dist/assets/{jinja-CllNBGTW.js → jinja-O0MduF1V.js} +1 -1
- package/ui/dist/assets/{jison--nGCTsNX.js → jison-BGBc5HtG.js} +1 -1
- package/ui/dist/assets/{json-C56ryB74.js → json-B-Q47BuG.js} +1 -1
- package/ui/dist/assets/{jsx-4Pk1mTn6.js → jsx-B__N5PZx.js} +1 -1
- package/ui/dist/assets/{julia-C0bepdRl.js → julia-BfiIt3AD.js} +1 -1
- package/ui/dist/assets/{just-DZULmPRj.js → just-CN940-eY.js} +1 -1
- package/ui/dist/assets/{latex-D16Jgu4V.js → latex-wUKEeqEd.js} +1 -1
- package/ui/dist/assets/{liquid-C8coUMRS.js → liquid-D2cnd1Ez.js} +1 -1
- package/ui/dist/assets/{lua-Cf5MxbTu.js → lua-BQiIdljT.js} +1 -1
- package/ui/dist/assets/{marko-Cb70KBLA.js → marko-BCqypbre.js} +1 -1
- package/ui/dist/assets/{mdc-C7MhKLIm.js → mdc-105-eiCZ.js} +1 -1
- package/ui/dist/assets/{nginx-BXtCcpzS.js → nginx-C5dkaLo6.js} +1 -1
- package/ui/dist/assets/{nim-DGCttsC9.js → nim-RJQN31Xa.js} +1 -1
- package/ui/dist/assets/{perl-QjSbxj8-.js → perl-DZkWjug_.js} +1 -1
- package/ui/dist/assets/{php-C3F5od73.js → php-OoKYDxlw.js} +1 -1
- package/ui/dist/assets/{pug-C5_Ubyev.js → pug-CDXuXfau.js} +1 -1
- package/ui/dist/assets/{qml-ClOBZo_4.js → qml-BSj8AX1e.js} +1 -1
- package/ui/dist/assets/{r-CRs34ME2.js → r-DlO747T6.js} +1 -1
- package/ui/dist/assets/{razor-Da5e4iwK.js → razor-D1gVuaXL.js} +1 -1
- package/ui/dist/assets/{regexp-CIgnY5KL.js → regexp-CGVqhulu.js} +1 -1
- package/ui/dist/assets/{rst-B8IBFGFC.js → rst-DtURuW7a.js} +1 -1
- package/ui/dist/assets/{ruby-DCWmsWCN.js → ruby-Bc3kUlvr.js} +1 -1
- package/ui/dist/assets/{sas-C6G9MYN0.js → sas-CFQgZChj.js} +1 -1
- package/ui/dist/assets/{scss-CNd_k2F5.js → scss-B8cq7hhb.js} +1 -1
- package/ui/dist/assets/{shellscript-CwXf9FTq.js → shellscript-C_GHS-ym.js} +1 -1
- package/ui/dist/assets/{shellsession-BJzcxmip.js → shellsession-CTplGpC8.js} +1 -1
- package/ui/dist/assets/{soy-KzIeqqPW.js → soy-BgD_ErAN.js} +1 -1
- package/ui/dist/assets/{sql-DBDZ7dWg.js → sql-BnGnr4ii.js} +1 -1
- package/ui/dist/assets/{stata-SsEZ25vz.js → stata-qCQsVpGc.js} +1 -1
- package/ui/dist/assets/{surrealql-C7tSrOv6.js → surrealql-BqH_LSaF.js} +1 -1
- package/ui/dist/assets/{svelte-BHETRygr.js → svelte-Bu1vTtJQ.js} +1 -1
- package/ui/dist/assets/{templ-mCQ9V1Fb.js → templ-B5jQzs9l.js} +1 -1
- package/ui/dist/assets/{tex-DgKGHlQ1.js → tex-BJ-wZPSn.js} +1 -1
- package/ui/dist/assets/{ts-tags-D-31aQRg.js → ts-tags-DuLm-TvJ.js} +1 -1
- package/ui/dist/assets/{tsx-CKRZAYYe.js → tsx-BPiBkGlY.js} +1 -1
- package/ui/dist/assets/{twig-COT1S6WR.js → twig-CdQnHxAS.js} +1 -1
- package/ui/dist/assets/{typescript-IBoewa4A.js → typescript-Dp_zdoqe.js} +1 -1
- package/ui/dist/assets/{vue-44M0YEZN.js → vue-BmKvlxSZ.js} +1 -1
- package/ui/dist/assets/{vue-html-C1gtv8Ck.js → vue-html-CizabNef.js} +1 -1
- package/ui/dist/assets/{vue-vine-DEW0Tzyn.js → vue-vine-JH1Msnx4.js} +1 -1
- package/ui/dist/assets/{xml-CSnYabNH.js → xml-DW7DdZow.js} +1 -1
- package/ui/dist/assets/{xsl-DrkZvWNe.js → xsl-6zDkD8bR.js} +1 -1
- package/ui/dist/assets/{yaml-D6QWa51n.js → yaml-W1qZ5vOg.js} +1 -1
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-2kPU99Wr.css +0 -1
- package/ui/dist/assets/index-CIXjaWlx.js +0 -744
package/opencode/caret.plugin.ts
CHANGED
|
@@ -15,21 +15,64 @@
|
|
|
15
15
|
// config hook restricts the tool to primary agents (experimental.primary_tools +
|
|
16
16
|
// per-agent permission), and the tool body re-checks the caller — defense in depth.
|
|
17
17
|
//
|
|
18
|
-
// This file
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
18
|
+
// This file runs in-process inside OpenCode. It ships in the @macintacos/caret npm
|
|
19
|
+
// package; OpenCode loads it when the package is in the user's `plugin` array, and
|
|
20
|
+
// it resolves its own binary and version at runtime from that package. (The legacy
|
|
21
|
+
// file-deploy path substitutes the two __CARET_*__ markers instead.) It stays
|
|
22
|
+
// self-contained: its only imports are node builtins (child_process, fs, url) and
|
|
23
|
+
// @opencode-ai/plugin (resolved by OpenCode at runtime). Live in-OpenCode
|
|
24
|
+
// verification of the exact ctx/tool/config shapes against the installed OpenCode
|
|
25
|
+
// version is a documented follow-up; the pure logic below is covered by
|
|
26
|
+
// test/opencode/.
|
|
24
27
|
|
|
25
28
|
import { spawn } from "node:child_process";
|
|
29
|
+
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
30
|
+
import { homedir } from "node:os";
|
|
31
|
+
import { dirname } from "node:path";
|
|
32
|
+
import { fileURLToPath } from "node:url";
|
|
26
33
|
import { type Hooks, type Plugin, tool } from "@opencode-ai/plugin";
|
|
27
34
|
|
|
28
|
-
/** Install-time markers
|
|
29
|
-
*
|
|
35
|
+
/** Install-time markers. The legacy file-deploy path substituted these with the
|
|
36
|
+
* resolved caret version and binary path; the array install leaves them as
|
|
37
|
+
* placeholders, so the resolvers below fall back to the package that ships this
|
|
38
|
+
* file. */
|
|
30
39
|
export const CARET_PLUGIN_VERSION = "__CARET_VERSION__";
|
|
31
40
|
const CARET_BIN = "__CARET_BIN__";
|
|
32
41
|
|
|
42
|
+
/** The caret binary the review tool spawns. Env override wins; then a substituted
|
|
43
|
+
* marker (an absolute path, from the legacy file-deploy path); else the binary that
|
|
44
|
+
* ships beside this module in the npm package (the array install). */
|
|
45
|
+
export function resolveCaretBin(opts: {
|
|
46
|
+
env: Record<string, string | undefined>;
|
|
47
|
+
marker: string;
|
|
48
|
+
importMetaUrl: string;
|
|
49
|
+
}): string {
|
|
50
|
+
const override = opts.env.CARET_OPENCODE_BIN?.trim();
|
|
51
|
+
if (override) return override;
|
|
52
|
+
if (opts.marker !== "__CARET_BIN__") return opts.marker;
|
|
53
|
+
return fileURLToPath(new URL("../bin/caret", opts.importMetaUrl));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** The plugin's own caret version, for the update check. A substituted marker wins
|
|
57
|
+
* (file-deploy); else read it from the package.json shipped beside this module (the
|
|
58
|
+
* array install). "unknown" when neither is available — deliberately UNPARSEABLE so
|
|
59
|
+
* `isNewer` compares false and a broken read stays silent ("0.0.0" would parse and
|
|
60
|
+
* nag "update available (you have 0.0.0)" on every start). */
|
|
61
|
+
export function resolveCaretVersion(opts: {
|
|
62
|
+
marker: string;
|
|
63
|
+
importMetaUrl: string;
|
|
64
|
+
readFile: (path: string) => string;
|
|
65
|
+
}): string {
|
|
66
|
+
if (opts.marker !== "__CARET_VERSION__") return opts.marker;
|
|
67
|
+
try {
|
|
68
|
+
const raw = opts.readFile(fileURLToPath(new URL("../package.json", opts.importMetaUrl)));
|
|
69
|
+
const v = (JSON.parse(raw) as { version?: unknown }).version;
|
|
70
|
+
return typeof v === "string" ? v : "unknown";
|
|
71
|
+
} catch {
|
|
72
|
+
return "unknown";
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
33
76
|
/** The plan-review tool the Plan agent calls. */
|
|
34
77
|
export const REVIEW_TOOL = "caret_review_plan";
|
|
35
78
|
|
|
@@ -178,6 +221,164 @@ function showToast(client: ToastClient, body: ToastBody): void {
|
|
|
178
221
|
}
|
|
179
222
|
}
|
|
180
223
|
|
|
224
|
+
// --- version-check toast (EXC-794) -----------------------------------------
|
|
225
|
+
|
|
226
|
+
/** caret's latest-release endpoint. Unauthenticated GitHub API — throttled to at
|
|
227
|
+
* most once a day (see UPDATE_CHECK_INTERVAL_MS), so it never approaches the
|
|
228
|
+
* 60 req/hr/IP limit. */
|
|
229
|
+
const LATEST_RELEASE_URL = "https://api.github.com/repos/macintacos/caret/releases/latest";
|
|
230
|
+
/** How long the update nudge stays up — long enough to read the link. */
|
|
231
|
+
const UPDATE_TOAST_MS = 5_000;
|
|
232
|
+
/** Minimum gap between update checks. The nudge is a convenience, not a security
|
|
233
|
+
* fix, so checking once a day is plenty — and it keeps the network hit off every
|
|
234
|
+
* OpenCode start. The last-check time is persisted in a small throttle file. */
|
|
235
|
+
const UPDATE_CHECK_INTERVAL_MS = 24 * 60 * 60_000;
|
|
236
|
+
|
|
237
|
+
/** Semver triple `[major, minor, patch]`, or null when `v` is not `X.Y.Z` (an
|
|
238
|
+
* optional leading `v` is stripped; trailing prerelease/build metadata ignored). */
|
|
239
|
+
function parseVersionTriple(v: string): [number, number, number] | null {
|
|
240
|
+
const m = v
|
|
241
|
+
.trim()
|
|
242
|
+
.replace(/^v/, "")
|
|
243
|
+
.match(/^(\d+)\.(\d+)\.(\d+)/);
|
|
244
|
+
return m ? [Number(m[1]), Number(m[2]), Number(m[3])] : null;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/** True when `latest` is a strictly higher semver than `current`. Inline (no semver
|
|
248
|
+
* dep) so the deployed plugin stays self-contained; an unparseable version on
|
|
249
|
+
* either side compares false, so the check never nags on something it can't read. */
|
|
250
|
+
export function isNewer(latest: string, current: string): boolean {
|
|
251
|
+
const a = parseVersionTriple(latest);
|
|
252
|
+
const b = parseVersionTriple(current);
|
|
253
|
+
if (!a || !b) return false;
|
|
254
|
+
const [a0, a1, a2] = a;
|
|
255
|
+
const [b0, b1, b2] = b;
|
|
256
|
+
if (a0 !== b0) return a0 > b0;
|
|
257
|
+
if (a1 !== b1) return a1 > b1;
|
|
258
|
+
return a2 > b2;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/** The version (v-stripped) and release-page URL from GitHub's /releases/latest
|
|
262
|
+
* JSON, or null when the shape is unusable. */
|
|
263
|
+
export function parseLatestRelease(json: unknown): { version: string; url: string } | null {
|
|
264
|
+
if (typeof json !== "object" || json === null) return null;
|
|
265
|
+
const o = json as { tag_name?: unknown; html_url?: unknown };
|
|
266
|
+
if (typeof o.tag_name !== "string") return null;
|
|
267
|
+
const url =
|
|
268
|
+
typeof o.html_url === "string"
|
|
269
|
+
? o.html_url
|
|
270
|
+
: "https://github.com/macintacos/caret/releases/latest";
|
|
271
|
+
return { version: o.tag_name.replace(/^v/, ""), url };
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/** The update-available toast body, or null when the user is already current. */
|
|
275
|
+
export function updateToastBody(
|
|
276
|
+
current: string,
|
|
277
|
+
latest: { version: string; url: string },
|
|
278
|
+
): ToastBody | null {
|
|
279
|
+
if (!isNewer(latest.version, current)) return null;
|
|
280
|
+
return {
|
|
281
|
+
title: "caret update available",
|
|
282
|
+
message: `caret ${latest.version} is available (you have ${current}). ${latest.url}`,
|
|
283
|
+
variant: "info",
|
|
284
|
+
duration: UPDATE_TOAST_MS,
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/** The slice of `fetch` the update check needs — narrow so a test can pass a plain
|
|
289
|
+
* stub without reconstructing `fetch`'s `preconnect` sibling. The global `fetch`
|
|
290
|
+
* (and Bun's) is assignable to it. */
|
|
291
|
+
type FetchLike = (
|
|
292
|
+
url: string,
|
|
293
|
+
init?: { headers?: Record<string, string> },
|
|
294
|
+
) => Promise<{ ok: boolean; json: () => Promise<unknown> }>;
|
|
295
|
+
|
|
296
|
+
/** True when the last check is old enough (or absent) to check again. Pure so the
|
|
297
|
+
* 24h throttle is unit-testable without a clock or the filesystem. */
|
|
298
|
+
export function shouldCheckForUpdate(lastCheckMs: number | null, nowMs: number): boolean {
|
|
299
|
+
return lastCheckMs === null || nowMs - lastCheckMs >= UPDATE_CHECK_INTERVAL_MS;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/** Absolute path of the throttle file holding the last-check epoch-ms. Lives under
|
|
303
|
+
* caret's state dir ($XDG_STATE_HOME/caret or ~/.local/state/caret), matching where
|
|
304
|
+
* caret keeps its other small machine-global markers (prefs.json). Pure so the
|
|
305
|
+
* location is testable; the plugin stays self-contained and cannot import
|
|
306
|
+
* src/paths.ts, so the convention is mirrored here by hand. */
|
|
307
|
+
export function updateCheckCachePath(
|
|
308
|
+
env: Record<string, string | undefined>,
|
|
309
|
+
home: string,
|
|
310
|
+
): string {
|
|
311
|
+
const base = env.XDG_STATE_HOME?.trim() || `${home}/.local/state`;
|
|
312
|
+
return `${base}/caret/opencode-update-check`;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/** The throttle seam: read the last-check epoch-ms (null when never / unreadable),
|
|
316
|
+
* and persist a new one. Injected so realUpdateChecker's throttle is testable
|
|
317
|
+
* without touching disk. */
|
|
318
|
+
type UpdateCache = { read: () => number | null; write: (epochMs: number) => void };
|
|
319
|
+
|
|
320
|
+
/** File-backed UpdateCache. Read tolerates a missing or garbage file (→ null, so
|
|
321
|
+
* the check runs); write is best-effort — a failure just means we check again next
|
|
322
|
+
* start rather than crashing plugin load. */
|
|
323
|
+
function fileUpdateCache(path: string): UpdateCache {
|
|
324
|
+
return {
|
|
325
|
+
read: () => {
|
|
326
|
+
try {
|
|
327
|
+
const n = Number.parseInt(readFileSync(path, "utf-8").trim(), 10);
|
|
328
|
+
return Number.isFinite(n) ? n : null;
|
|
329
|
+
} catch {
|
|
330
|
+
return null;
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
write: (epochMs) => {
|
|
334
|
+
try {
|
|
335
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
336
|
+
writeFileSync(path, String(epochMs));
|
|
337
|
+
} catch {
|
|
338
|
+
// best-effort — a throttle-file write must never disrupt load.
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/** Best-effort startup update check: fetch caret's latest GitHub release and, if it
|
|
345
|
+
* is newer than this plugin's version, toast a nudge with a link. Throttled to at
|
|
346
|
+
* most once a day via the injected cache — the check time is stamped up front, so
|
|
347
|
+
* even an offline/failed start backs off a full day rather than hitting the network
|
|
348
|
+
* on every restart. Never throws and never blocks plugin load — a network error, a
|
|
349
|
+
* non-200, an unusable body, the throttle, or the `CARET_OPENCODE_NO_UPDATE_CHECK`
|
|
350
|
+
* opt-out all resolve silently. `fetchImpl`/`url`/`now`/`cache` are injected so it is
|
|
351
|
+
* unit-testable without the network or the filesystem. */
|
|
352
|
+
export async function realUpdateChecker(
|
|
353
|
+
client: ToastClient,
|
|
354
|
+
opts: {
|
|
355
|
+
currentVersion: string;
|
|
356
|
+
env: Record<string, string | undefined>;
|
|
357
|
+
fetchImpl: FetchLike;
|
|
358
|
+
now: () => number;
|
|
359
|
+
cache: UpdateCache;
|
|
360
|
+
url?: string;
|
|
361
|
+
},
|
|
362
|
+
): Promise<void> {
|
|
363
|
+
if (opts.env.CARET_OPENCODE_NO_UPDATE_CHECK) return;
|
|
364
|
+
const nowMs = opts.now();
|
|
365
|
+
if (!shouldCheckForUpdate(opts.cache.read(), nowMs)) return;
|
|
366
|
+
// Stamp the check up front so a failed/offline check still backs off a day.
|
|
367
|
+
opts.cache.write(nowMs);
|
|
368
|
+
try {
|
|
369
|
+
const res = await opts.fetchImpl(opts.url ?? LATEST_RELEASE_URL, {
|
|
370
|
+
headers: { "user-agent": "caret-opencode-plugin", accept: "application/vnd.github+json" },
|
|
371
|
+
});
|
|
372
|
+
if (!res.ok) return;
|
|
373
|
+
const latest = parseLatestRelease(await res.json());
|
|
374
|
+
if (!latest) return;
|
|
375
|
+
const body = updateToastBody(opts.currentVersion, latest);
|
|
376
|
+
if (body) showToast(client, body);
|
|
377
|
+
} catch {
|
|
378
|
+
// best-effort — an update nudge must never disrupt the session.
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
181
382
|
/** The planning-prompt steer appended to the system array so the Plan agent
|
|
182
383
|
* submits its plan to caret instead of calling the native plan_exit. */
|
|
183
384
|
export function planningSteer(): string {
|
|
@@ -316,16 +517,24 @@ const nodeSpawnRunner: SpawnRunner = (bin, env, stdin, onStderr) =>
|
|
|
316
517
|
// The plugin
|
|
317
518
|
// ---------------------------------------------------------------------------
|
|
318
519
|
|
|
319
|
-
/** Build the caret OpenCode plugin. The DI seam (bin/run) keeps the
|
|
320
|
-
* execute() unit-testable; the default export
|
|
321
|
-
|
|
322
|
-
|
|
520
|
+
/** Build the caret OpenCode plugin. The DI seam (bin/run/checkUpdate) keeps the
|
|
521
|
+
* tool's execute() and the startup update check unit-testable; the default export
|
|
522
|
+
* wires the production runner and update checker. */
|
|
523
|
+
export function createCaretPlugin(
|
|
524
|
+
opts: { bin?: string; run?: SpawnRunner; checkUpdate?: (client: ToastClient) => void } = {},
|
|
525
|
+
): Plugin {
|
|
526
|
+
const bin =
|
|
527
|
+
opts.bin ??
|
|
528
|
+
resolveCaretBin({ env: process.env, marker: CARET_BIN, importMetaUrl: import.meta.url });
|
|
323
529
|
const run = opts.run ?? nodeSpawnRunner;
|
|
324
530
|
|
|
325
531
|
return async (input) => {
|
|
326
532
|
// OpenCode gives every plugin its SDK client; caret uses it to surface the
|
|
327
533
|
// review link as a toast (EXC-691). Narrowed structurally for skew-safety.
|
|
328
534
|
const client = (input as { client?: ToastClient }).client;
|
|
535
|
+
// Best-effort startup update nudge (EXC-794); fire-and-forget so it never
|
|
536
|
+
// delays plugin load. Only the production default export wires this.
|
|
537
|
+
if (opts.checkUpdate) opts.checkUpdate(client);
|
|
329
538
|
const hooks: Hooks = {
|
|
330
539
|
// Restrict the review tool to primary agents + allow/deny per agent.
|
|
331
540
|
config: async (config) => {
|
|
@@ -406,6 +615,21 @@ export function createCaretPlugin(opts: { bin?: string; run?: SpawnRunner } = {}
|
|
|
406
615
|
};
|
|
407
616
|
}
|
|
408
617
|
|
|
409
|
-
/** The
|
|
410
|
-
|
|
618
|
+
/** The plugin OpenCode loads (bare default-export function). Wires the production
|
|
619
|
+
* update checker: on load, check caret's latest release and toast if behind. */
|
|
620
|
+
const CaretPlugin: Plugin = createCaretPlugin({
|
|
621
|
+
checkUpdate: (client) => {
|
|
622
|
+
void realUpdateChecker(client, {
|
|
623
|
+
currentVersion: resolveCaretVersion({
|
|
624
|
+
marker: CARET_PLUGIN_VERSION,
|
|
625
|
+
importMetaUrl: import.meta.url,
|
|
626
|
+
readFile: (p) => readFileSync(p, "utf-8"),
|
|
627
|
+
}),
|
|
628
|
+
env: process.env,
|
|
629
|
+
fetchImpl: fetch,
|
|
630
|
+
now: () => Date.now(),
|
|
631
|
+
cache: fileUpdateCache(updateCheckCachePath(process.env, homedir())),
|
|
632
|
+
});
|
|
633
|
+
},
|
|
634
|
+
});
|
|
411
635
|
export default CaretPlugin;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// The published entrypoint OpenCode imports when `@macintacos/caret` appears in a
|
|
2
|
+
// user's `plugin` array. OpenCode's loader iterates a plugin module's exports
|
|
3
|
+
// (Object.values) and rejects the whole module on the FIRST export that isn't a
|
|
4
|
+
// Plugin — and caret.plugin.ts additionally exports test helpers/constants for
|
|
5
|
+
// test/opencode/. So this file re-exports ONLY the default plugin, leaving a module
|
|
6
|
+
// namespace of exactly `{ default }`. (This is why the array path does not need the
|
|
7
|
+
// deploy-time `stripNonDefaultExports` the retired file-deploy relied on.)
|
|
8
|
+
export { default } from "./caret.plugin.ts";
|
package/package.json
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@macintacos/caret",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A Claude Code plugin that replaces the terminal plan-approval prompt with a local web UI for inline review, annotation, and approval.",
|
|
7
|
+
"main": "./opencode/index.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./opencode/index.ts"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"caret": "./bin/caret"
|
|
13
|
+
},
|
|
7
14
|
"homepage": "https://github.com/macintacos/caret",
|
|
8
15
|
"repository": {
|
|
9
16
|
"type": "git",
|
|
@@ -29,9 +36,9 @@
|
|
|
29
36
|
},
|
|
30
37
|
"devDependencies": {
|
|
31
38
|
"@happy-dom/global-registrator": "^20.9.0",
|
|
32
|
-
"@opencode-ai/plugin": "^1.16.2",
|
|
33
39
|
"@playwright/test": "^1.60.0",
|
|
34
40
|
"@sveltejs/vite-plugin-svelte": "^7.1.2",
|
|
41
|
+
"@tailwindcss/vite": "^4.3.2",
|
|
35
42
|
"@types/bun": "^1.3.14",
|
|
36
43
|
"@types/semver": "^7.7.1",
|
|
37
44
|
"happy-dom": "^20.9.0",
|
|
@@ -39,6 +46,8 @@
|
|
|
39
46
|
"pino-pretty": "^13.1.3",
|
|
40
47
|
"svelte": "^5.55.9",
|
|
41
48
|
"svelte-check": "^4.4.8",
|
|
49
|
+
"tailwindcss": "^4.3.2",
|
|
50
|
+
"tw-animate-css": "^1.4.0",
|
|
42
51
|
"typescript": "^6.0.3",
|
|
43
52
|
"vite": "^8.0.14"
|
|
44
53
|
},
|
|
@@ -50,15 +59,22 @@
|
|
|
50
59
|
"@codemirror/state": "^6.6.0",
|
|
51
60
|
"@codemirror/view": "^6.43.0",
|
|
52
61
|
"@commander-js/extra-typings": "^15.0.0",
|
|
62
|
+
"@internationalized/date": "^3.12.2",
|
|
53
63
|
"@lezer/highlight": "^1.2.3",
|
|
64
|
+
"@opencode-ai/plugin": "^1.16.2",
|
|
54
65
|
"@pierre/diffs": "1.2.7",
|
|
66
|
+
"bits-ui": "^2.18.1",
|
|
67
|
+
"clsx": "^2.1.1",
|
|
55
68
|
"commander": "^15.0.0",
|
|
69
|
+
"jsonc-parser": "^3.3.1",
|
|
56
70
|
"marked": "^18.0.4",
|
|
57
71
|
"pino": "^10.3.1",
|
|
58
72
|
"prettier": "3.8.3",
|
|
59
73
|
"semver": "^7.8.1",
|
|
60
74
|
"shiki": "^4.1.0",
|
|
61
75
|
"smol-toml": "1.6.1",
|
|
76
|
+
"tailwind-merge": "^3.6.0",
|
|
77
|
+
"tailwind-variants": "^3.2.2",
|
|
62
78
|
"xss": "^1.0.15",
|
|
63
79
|
"zod": "4.4.3"
|
|
64
80
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O as e}from"./index-CIXjaWlx.js";import{t}from"./html-Dm0ku22r.js";var n=[Object.freeze(JSON.parse('{"injectionSelector":"L:text.html -comment","name":"angular-expression","patterns":[{"include":"#ngExpression"}],"repository":{"arrayLiteral":{"begin":"\\\\[","beginCaptures":{"0":{"name":"meta.brace.square.ts"}},"end":"]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.array.literal.ts","patterns":[{"include":"#ngExpression"},{"include":"#punctuationComma"}]},"booleanLiteral":{"patterns":[{"match":"(?<![$.])\\\\btrue\\\\b(?!\\\\$)","name":"constant.language.boolean.true.ts"},{"match":"(?<![$.])\\\\bfalse\\\\b(?!\\\\$)","name":"constant.language.boolean.false.ts"}]},"expressionOperator":{"patterns":[{"captures":{"1":{"name":"keyword.operator.logical.ts"},"2":{"name":"entity.name.function.pipe.ng"}},"match":"((?<!\\\\|)\\\\|(?!\\\\|))\\\\s?([-$0-9A-Z_a-z]*)"},{"match":"(?<![$.])\\\\b(let)\\\\b(?!\\\\$)","name":"storage.type.ts"},{"match":"(?<![$.])\\\\b(await)\\\\b(?!\\\\$)","name":"keyword.control.flow.ts"},{"match":"(?<![$.])\\\\bdelete\\\\b(?!\\\\$)","name":"keyword.operator.expression.delete.ts"},{"match":"(?<![$.])\\\\bin\\\\b(?!\\\\$)","name":"keyword.operator.expression.in.ts"},{"match":"(?<![$.])\\\\bof\\\\b(?!\\\\$)","name":"keyword.operator.expression.of.ts"},{"match":"(?<![$.])\\\\bif\\\\b(?!\\\\$)","name":"keyword.control.if.ts"},{"match":"(?<![$.])\\\\belse\\\\b(?!\\\\$)","name":"keyword.control.else.ts"},{"match":"(?<![$.])\\\\bthen\\\\b(?!\\\\$)","name":"keyword.control.then.ts"},{"match":"(?<![$.])\\\\binstanceof\\\\b(?!\\\\$)","name":"keyword.operator.expression.instanceof.ts"},{"match":"(?<![$.])\\\\bnew\\\\b(?!\\\\$)","name":"keyword.operator.new.ts"},{"match":"(?<![$.])\\\\bvoid\\\\b(?!\\\\$)","name":"keyword.operator.expression.void.ts"},{"begin":"(?<![$.])\\\\bas\\\\b(?!\\\\$)","beginCaptures":{"0":{"name":"storage.type.as.ts"}},"end":"(?=$|[]\\"\'),:;}])","patterns":[{"include":"#type"}]},{"match":"(?:\\\\*|(?<!\\\\()/|[-%+])=","name":"keyword.operator.assignment.compound.ts"},{"match":"(?:[\\\\&^]|<<|>>>??|\\\\|)=","name":"keyword.operator.assignment.compound.bitwise.ts"},{"match":"<<|>>>?","name":"keyword.operator.bitwise.shift.ts"},{"match":"[!=]==?","name":"keyword.operator.comparison.ts"},{"match":"<=|>=|<>|[<>]","name":"keyword.operator.relational.ts"},{"match":"!|&&|\\\\?\\\\?|\\\\|\\\\|","name":"keyword.operator.logical.ts"},{"match":"[\\\\&^|~]","name":"keyword.operator.bitwise.ts"},{"match":"=","name":"keyword.operator.assignment.ts"},{"match":"--","name":"keyword.operator.decrement.ts"},{"match":"\\\\+\\\\+","name":"keyword.operator.increment.ts"},{"match":"[-%*+/]","name":"keyword.operator.arithmetic.ts"},{"captures":{"1":{"name":"keyword.operator.arithmetic.ts"}},"match":"(?<=[$_[:alnum:]])\\\\s*(/)(?![*/])"},{"include":"#typeofOperator"}]},"functionCall":{"begin":"(?=(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()","end":"(?<=\\\\))(?!(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()","patterns":[{"match":"\\\\?","name":"punctuation.accessor.ts"},{"match":"\\\\.","name":"punctuation.accessor.ts"},{"match":"([$_[:alpha:]][$_[:alnum:]]*)","name":"entity.name.function.ts"},{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#type"},{"include":"#punctuationComma"}]},{"include":"#parenExpression"}]},"functionParameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.ts"}},"name":"meta.parameters.ts","patterns":[{"include":"#decorator"},{"include":"#parameterName"},{"include":"#variableInitializer"},{"match":",","name":"punctuation.separator.parameter.ts"}]},"identifiers":{"patterns":[{"match":"([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*\\\\.\\\\s*prototype\\\\b(?!\\\\$))","name":"support.class.ts"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"constant.other.object.property.ts"},"3":{"name":"variable.other.object.property.ts"}},"match":"([!?]?\\\\.)\\\\s*(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"entity.name.function.ts"}},"match":"(?:([!?]?\\\\.)\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*=\\\\s*((async\\\\s+)|(function\\\\s*[(<])|(function\\\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\\\s*=>)|((<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)(\\\\s*:\\\\s*(.)*)?\\\\s*=>)))"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"constant.other.property.ts"}},"match":"([!?]?\\\\.)\\\\s*(\\\\p{upper}[$_\\\\d[:upper:]]*)(?![$_[:alnum:]])"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"variable.other.property.ts"}},"match":"([!?]?\\\\.)\\\\s*([$_[:alpha:]][$_[:alnum:]]*)"},{"captures":{"1":{"name":"constant.other.object.ts"},"2":{"name":"variable.other.object.ts"}},"match":"(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)"},{"match":"(\\\\p{upper}[$_\\\\d[:upper:]]*)(?![$_[:alnum:]])","name":"constant.character.other"},{"match":"[$_[:alpha:]][$_[:alnum:]]*","name":"variable.other.readwrite.ts"}]},"literal":{"name":"literal.ts","patterns":[{"include":"#numericLiteral"},{"include":"#booleanLiteral"},{"include":"#nullLiteral"},{"include":"#undefinedLiteral"},{"include":"#numericConstantLiteral"},{"include":"#arrayLiteral"},{"include":"#thisLiteral"}]},"ngExpression":{"name":"meta.expression.ng","patterns":[{"include":"#string"},{"include":"#literal"},{"include":"#ternaryExpression"},{"include":"#expressionOperator"},{"include":"#functionCall"},{"include":"#identifiers"},{"include":"#parenExpression"},{"include":"#punctuationComma"},{"include":"#punctuationSemicolon"},{"include":"#punctuationAccessor"}]},"nullLiteral":{"match":"(?<![$.])\\\\bnull\\\\b(?!\\\\$)","name":"constant.language.null.ts"},"numericConstantLiteral":{"patterns":[{"match":"(?<![$.])\\\\bNaN\\\\b(?!\\\\$)","name":"constant.language.nan.ts"},{"match":"(?<![$.])\\\\bInfinity\\\\b(?!\\\\$)","name":"constant.language.infinity.ts"}]},"numericLiteral":{"patterns":[{"match":"\\\\b(?<!\\\\$)0([Xx])\\\\h+\\\\b(?!\\\\$)","name":"constant.numeric.hex.ts"},{"match":"\\\\b(?<!\\\\$)0([Bb])[01]+\\\\b(?!\\\\$)","name":"constant.numeric.binary.ts"},{"match":"\\\\\\\\b(?<!\\\\$)0([Oo])?[0-7]+\\\\b(?!\\\\$)","name":"constant.numeric.octal.ts"},{"captures":{"0":{"name":"constant.numeric.decimal.ts"},"1":{"name":"meta.delimiter.decimal.period.ts"},"2":{"name":"meta.delimiter.decimal.period.ts"},"3":{"name":"meta.delimiter.decimal.period.ts"},"4":{"name":"meta.delimiter.decimal.period.ts"},"5":{"name":"meta.delimiter.decimal.period.ts"},"6":{"name":"meta.delimiter.decimal.period.ts"}},"match":"(?<!\\\\$)(?:\\\\b[0-9]+(\\\\.)[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+(\\\\.)[Ee][-+]?[0-9]+\\\\b|\\\\B(\\\\.)[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+(\\\\.)\\\\B|\\\\B(\\\\.)[0-9]+\\\\b|\\\\b[0-9]+\\\\b(?!\\\\.))(?!\\\\$)"}]},"parameterName":{"patterns":[{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"keyword.operator.rest.ts"},"4":{"name":"entity.name.function.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:\\\\s*\\\\b(readonly)\\\\s+)?(?:\\\\s*\\\\b(p(?:ublic|rivate|rotected))\\\\s+)?(\\\\.\\\\.\\\\.)?\\\\s*(?<![:=])([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(\\\\??)(?=\\\\s*(=\\\\s*((async\\\\s+)|(function\\\\s*[(<])|(function\\\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\\\s*=>)|((<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)(\\\\s*:\\\\s*(.)*)?\\\\s*=>)))|(:\\\\s*((<)|(\\\\(\\\\s*((\\\\))|(\\\\.\\\\.\\\\.)|([$_[:alnum:]]+\\\\s*(([,:=?])|(\\\\)\\\\s*=>))))))))"},{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"keyword.operator.rest.ts"},"4":{"name":"variable.parameter.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:\\\\s*\\\\b(readonly)\\\\s+)?(?:\\\\s*\\\\b(p(?:ublic|rivate|rotected))\\\\s+)?(\\\\.\\\\.\\\\.)?\\\\s*(?<![:=])([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(\\\\??)"}]},"parenExpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#ngExpression"},{"include":"#punctuationComma"}]},"punctuationAccessor":{"match":"(?:\\\\?|!?)\\\\.","name":"punctuation.accessor.ts"},"punctuationComma":{"match":",","name":"punctuation.separator.comma.ts"},"punctuationSemicolon":{"match":";","name":"punctuation.terminator.statement.ts"},"qstringDouble":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ts"}},"end":"(\\")|([^\\\\n\\\\\\\\])$","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"invalid.illegal.newline.ts"}},"name":"string.quoted.double.ts","patterns":[{"include":"#stringCharacterEscape"}]},"qstringSingle":{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ts"}},"end":"(\')|([^\\\\n\\\\\\\\])$","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"invalid.illegal.newline.ts"}},"name":"string.quoted.single.ts","patterns":[{"include":"#stringCharacterEscape"}]},"string":{"patterns":[{"include":"#qstringSingle"},{"include":"#qstringDouble"},{"include":"#templateLiteral"}]},"stringCharacterEscape":{"match":"\\\\\\\\(x\\\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)","name":"constant.character.escape.ts"},"templateLiteral":{"patterns":[{"include":"#templateLiteralCall"},{"begin":"([$_[:alpha:]][$_[:alnum:]]*)?(`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"},"2":{"name":"string.template.ts punctuation.definition.string.template.begin.ts"}},"contentName":"string.template.ts","end":"`","endCaptures":{"0":{"name":"string.template.ts punctuation.definition.string.template.end.ts"}},"patterns":[{"include":"#templateLiteralSubstitutionElement"},{"include":"#stringCharacterEscape"}]}]},"templateLiteralCall":{"patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([$_[:alpha:]][$_[:alnum:]]*)(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","end":"(?=`)","patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([$_[:alpha:]][$_[:alnum:]]*))","end":"(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","patterns":[{"include":"#support-function-call-identifiers"},{"match":"([$_[:alpha:]][$_[:alnum:]]*)","name":"entity.name.function.tagged-template.ts"}]},{"include":"#typeArguments"}]},{"begin":"([$_[:alpha:]][$_[:alnum:]]*)?\\\\s*(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"}},"end":"(?=`)","patterns":[{"include":"#typeArguments"}]}]},"templateLiteralSubstitutionElement":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.ts"}},"contentName":"meta.embedded.line.ts","end":"}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.ts"}},"name":"meta.template.expression.ts","patterns":[{"include":"#ngExpression"}]},"ternaryExpression":{"begin":"(?!\\\\?\\\\.\\\\s*\\\\D)(\\\\?)(?!\\\\?)","beginCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"end":"\\\\s*(:)","endCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"patterns":[{"include":"#ngExpression"}]},"thisLiteral":{"match":"(?<![$.])\\\\bthis\\\\b(?!\\\\$)","name":"variable.language.this.ts"},"type":{"name":"meta.type.ts","patterns":[{"include":"#string"},{"include":"#numericLiteral"},{"include":"#typeBuiltinLiterals"},{"include":"#typeTuple"},{"include":"#typeObject"},{"include":"#typeOperators"},{"include":"#typeFnTypeParameters"},{"include":"#typeParenOrFunctionParameters"},{"include":"#typeName"}]},"typeAnnotation":{"begin":":","beginCaptures":{"0":{"name":"keyword.operator.type.annotation.ts"}},"end":"(?=$|[]),;}]|//|\\")|(?==[^>])|(?<=[]$)>_}[:alpha:]])\\\\s*(?=\\\\{)","name":"meta.type.annotation.ts","patterns":[{"include":"#type"}]},"typeArguments":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#typeArgumentsBody"}]},"typeArgumentsBody":{"patterns":[{"captures":{"0":{"name":"keyword.operator.type.ts"}},"match":"(?<![$_[:alnum:]])(?:(?<=\\\\.\\\\.\\\\.)|(?<!\\\\.))(_)(?![$_[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.))"},{"include":"#type"},{"include":"#punctuationComma"}]},"typeBuiltinLiterals":{"match":"(?<![$.])\\\\b(this|true|false|undefined|null)\\\\b(?!\\\\$)","name":"support.type.builtin.ts"},"typeFnTypeParameters":{"patterns":[{"captures":{"1":{"name":"keyword.control.new.ts"}},"match":"(?<![$.])\\\\b(new)\\\\b(?=\\\\s*<)","name":"meta.type.constructor.ts"},{"begin":"(?<![$.])\\\\b(new)\\\\b\\\\s*(?=\\\\()","beginCaptures":{"1":{"name":"keyword.control.new.ts"}},"end":"(?<=\\\\))","name":"meta.type.constructor.ts","patterns":[{"include":"#functionParameters"}]},{"begin":"(?<=>)\\\\s*(?=\\\\()","end":"(?<=\\\\))","include":"#typeofOperator","name":"meta.type.function.ts","patterns":[{"include":"#functionParameters"}]},{"begin":"((?=\\\\(\\\\s*((\\\\))|(\\\\.\\\\.\\\\.)|([$_[:alnum:]]+\\\\s*(([,:=?])|(\\\\)\\\\s*=>))))))","end":"(?<=\\\\))","name":"meta.type.function.ts","patterns":[{"include":"#functionParameters"}]}]},"typeName":{"patterns":[{"captures":{"1":{"name":"entity.name.type.module.ts"},"2":{"name":"punctuation.accessor.ts"}},"match":"([$_[:alpha:]][$_[:alnum:]]*)\\\\s*([!?]?\\\\.)"},{"match":"[$_[:alpha:]][$_[:alnum:]]*","name":"entity.name.type.ts"}]},"typeObject":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"name":"meta.object.type.ts","patterns":[{"include":"#typeObjectMembers"}]},"typeObjectMembers":{"patterns":[{"include":"#typeAnnotation"},{"include":"#punctuationComma"},{"include":"#punctuationSemicolon"}]},"typeOperators":{"patterns":[{"include":"#typeofOperator"},{"match":"[\\\\&|]","name":"keyword.operator.type.ts"},{"match":"(?<![$.])\\\\bkeyof\\\\b(?!\\\\$)","name":"keyword.operator.expression.keyof.ts"}]},"typeParenOrFunctionParameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"name":"meta.type.paren.cover.ts","patterns":[{"include":"#type"},{"include":"#functionParameters"}]},"typeTuple":{"begin":"\\\\[","beginCaptures":{"0":{"name":"meta.brace.square.ts"}},"end":"]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.type.tuple.ts","patterns":[{"include":"#type"},{"include":"#punctuationComma"}]},"typeofOperator":{"match":"(?<![$.])\\\\btypeof\\\\b(?!\\\\$)","name":"keyword.operator.expression.typeof.ts"},"undefinedLiteral":{"match":"(?<![$.])\\\\bundefined\\\\b(?!\\\\$)","name":"constant.language.undefined.ts"},"variableInitializer":{"begin":"(?<![!=])(=)(?!=)","beginCaptures":{"1":{"name":"keyword.operator.assignment.ts"}},"end":"(?=$|[]),;}])","patterns":[{"include":"#ngExpression"}]}},"scopeName":"expression.ng"}'))],r=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment -expression.ng -meta.tag -source.css -source.js","name":"angular-let-declaration","patterns":[{"include":"#letDeclaration"}],"repository":{"letDeclaration":{"begin":"(@let)\\\\s+([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(=)?","beginCaptures":{"1":{"name":"storage.type.ng"},"2":{"name":"variable.other.constant.ng"},"3":{"name":"keyword.operator.assignment.ng"}},"end":"(?<=;)","name":"meta.definition.variable.ng","patterns":[{"include":"#letInitializer"}]},"letInitializer":{"begin":"\\\\s*","beginCaptures":{"0":{"name":"keyword.operator.assignment.ng"}},"contentName":"meta.definition.variable.initializer.ng","end":";","endCaptures":{"0":{"name":"punctuation.terminator.statement.ng"}},"patterns":[{"include":"expression.ng"}]}},"scopeName":"template.let.ng","embeddedLangs":["angular-expression"]}`)),i=[...n,r],a=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment","name":"angular-template","patterns":[{"include":"#interpolation"}],"repository":{"interpolation":{"begin":"\\\\{\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"contentName":"expression.ng","end":"}}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"patterns":[{"include":"expression.ng"}]}},"scopeName":"template.ng","embeddedLangs":["angular-expression"]}`)),o=[...n,a],s=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment -expression.ng -meta.tag -source.css -source.js","name":"angular-template-blocks","patterns":[{"include":"#block"}],"repository":{"block":{"begin":"(@)(if|else if|else|defer|placeholder|loading|error|switch|case|default|for|empty)\\\\s*","beginCaptures":{"1":{"patterns":[{"include":"#transition"}]},"2":{"name":"keyword.control.block.kind.ng"}},"end":"(?<=})","name":"control.block.ng","patterns":[{"include":"#blockExpression"},{"include":"#blockBody"}]},"blockBody":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"contentName":"control.block.body.ng","end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"patterns":[{"include":"text.html.derivative.ng"},{"include":"template.ng"}]},"blockExpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"contentName":"control.block.expression.ng","end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#blockExpressionOfClause"},{"include":"#blockExpressionLetBinding"},{"include":"#blockExpressionTrackClause"},{"include":"expression.ng"}]},"blockExpressionLetBinding":{"begin":"\\\\blet\\\\b","beginCaptures":{"0":{"name":"storage.type.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"blockExpressionOfClause":{"begin":"([$_[:alpha:]][$_[:alnum:]]*)\\\\s+(of)\\\\b","beginCaptures":{"1":{"name":"variable.other.constant.ng"},"2":{"name":"keyword.operator.expression.of.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"blockExpressionTrackClause":{"begin":"\\\\btrack\\\\b","beginCaptures":{"0":{"name":"keyword.control.track.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"transition":{"match":"@","name":"keyword.control.block.transition.ng"}},"scopeName":"template.blocks.ng","embeddedLangs":["angular-expression","angular-template"]}`)),c=[...n,...o,s],l=e({default:()=>d}),u=Object.freeze(JSON.parse(`{"displayName":"Angular HTML","injections":{"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"angular-html","patterns":[{"include":"text.html.basic#core-minus-invalid"},{"begin":"(</?)(\\\\w[^>\\\\s]*)(?<!/)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.unrecognized.html.derivative","patterns":[{"include":"text.html.basic#attribute"}]}],"scopeName":"text.html.derivative.ng","embeddedLangs":["html","angular-expression","angular-let-declaration","angular-template","angular-template-blocks"]}`)),d=[...t,...n,...i,...o,...c,u];export{i as a,o as i,l as n,n as o,c as r,d as t};
|
|
1
|
+
import{O as e}from"./index-C3YoPLgV.js";import{t}from"./html-BSDB9v3Y.js";var n=[Object.freeze(JSON.parse('{"injectionSelector":"L:text.html -comment","name":"angular-expression","patterns":[{"include":"#ngExpression"}],"repository":{"arrayLiteral":{"begin":"\\\\[","beginCaptures":{"0":{"name":"meta.brace.square.ts"}},"end":"]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.array.literal.ts","patterns":[{"include":"#ngExpression"},{"include":"#punctuationComma"}]},"booleanLiteral":{"patterns":[{"match":"(?<![$.])\\\\btrue\\\\b(?!\\\\$)","name":"constant.language.boolean.true.ts"},{"match":"(?<![$.])\\\\bfalse\\\\b(?!\\\\$)","name":"constant.language.boolean.false.ts"}]},"expressionOperator":{"patterns":[{"captures":{"1":{"name":"keyword.operator.logical.ts"},"2":{"name":"entity.name.function.pipe.ng"}},"match":"((?<!\\\\|)\\\\|(?!\\\\|))\\\\s?([-$0-9A-Z_a-z]*)"},{"match":"(?<![$.])\\\\b(let)\\\\b(?!\\\\$)","name":"storage.type.ts"},{"match":"(?<![$.])\\\\b(await)\\\\b(?!\\\\$)","name":"keyword.control.flow.ts"},{"match":"(?<![$.])\\\\bdelete\\\\b(?!\\\\$)","name":"keyword.operator.expression.delete.ts"},{"match":"(?<![$.])\\\\bin\\\\b(?!\\\\$)","name":"keyword.operator.expression.in.ts"},{"match":"(?<![$.])\\\\bof\\\\b(?!\\\\$)","name":"keyword.operator.expression.of.ts"},{"match":"(?<![$.])\\\\bif\\\\b(?!\\\\$)","name":"keyword.control.if.ts"},{"match":"(?<![$.])\\\\belse\\\\b(?!\\\\$)","name":"keyword.control.else.ts"},{"match":"(?<![$.])\\\\bthen\\\\b(?!\\\\$)","name":"keyword.control.then.ts"},{"match":"(?<![$.])\\\\binstanceof\\\\b(?!\\\\$)","name":"keyword.operator.expression.instanceof.ts"},{"match":"(?<![$.])\\\\bnew\\\\b(?!\\\\$)","name":"keyword.operator.new.ts"},{"match":"(?<![$.])\\\\bvoid\\\\b(?!\\\\$)","name":"keyword.operator.expression.void.ts"},{"begin":"(?<![$.])\\\\bas\\\\b(?!\\\\$)","beginCaptures":{"0":{"name":"storage.type.as.ts"}},"end":"(?=$|[]\\"\'),:;}])","patterns":[{"include":"#type"}]},{"match":"(?:\\\\*|(?<!\\\\()/|[-%+])=","name":"keyword.operator.assignment.compound.ts"},{"match":"(?:[\\\\&^]|<<|>>>??|\\\\|)=","name":"keyword.operator.assignment.compound.bitwise.ts"},{"match":"<<|>>>?","name":"keyword.operator.bitwise.shift.ts"},{"match":"[!=]==?","name":"keyword.operator.comparison.ts"},{"match":"<=|>=|<>|[<>]","name":"keyword.operator.relational.ts"},{"match":"!|&&|\\\\?\\\\?|\\\\|\\\\|","name":"keyword.operator.logical.ts"},{"match":"[\\\\&^|~]","name":"keyword.operator.bitwise.ts"},{"match":"=","name":"keyword.operator.assignment.ts"},{"match":"--","name":"keyword.operator.decrement.ts"},{"match":"\\\\+\\\\+","name":"keyword.operator.increment.ts"},{"match":"[-%*+/]","name":"keyword.operator.arithmetic.ts"},{"captures":{"1":{"name":"keyword.operator.arithmetic.ts"}},"match":"(?<=[$_[:alnum:]])\\\\s*(/)(?![*/])"},{"include":"#typeofOperator"}]},"functionCall":{"begin":"(?=(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()","end":"(?<=\\\\))(?!(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()","patterns":[{"match":"\\\\?","name":"punctuation.accessor.ts"},{"match":"\\\\.","name":"punctuation.accessor.ts"},{"match":"([$_[:alpha:]][$_[:alnum:]]*)","name":"entity.name.function.ts"},{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#type"},{"include":"#punctuationComma"}]},{"include":"#parenExpression"}]},"functionParameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.ts"}},"name":"meta.parameters.ts","patterns":[{"include":"#decorator"},{"include":"#parameterName"},{"include":"#variableInitializer"},{"match":",","name":"punctuation.separator.parameter.ts"}]},"identifiers":{"patterns":[{"match":"([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*\\\\.\\\\s*prototype\\\\b(?!\\\\$))","name":"support.class.ts"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"constant.other.object.property.ts"},"3":{"name":"variable.other.object.property.ts"}},"match":"([!?]?\\\\.)\\\\s*(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"entity.name.function.ts"}},"match":"(?:([!?]?\\\\.)\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*=\\\\s*((async\\\\s+)|(function\\\\s*[(<])|(function\\\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\\\s*=>)|((<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)(\\\\s*:\\\\s*(.)*)?\\\\s*=>)))"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"constant.other.property.ts"}},"match":"([!?]?\\\\.)\\\\s*(\\\\p{upper}[$_\\\\d[:upper:]]*)(?![$_[:alnum:]])"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"variable.other.property.ts"}},"match":"([!?]?\\\\.)\\\\s*([$_[:alpha:]][$_[:alnum:]]*)"},{"captures":{"1":{"name":"constant.other.object.ts"},"2":{"name":"variable.other.object.ts"}},"match":"(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)"},{"match":"(\\\\p{upper}[$_\\\\d[:upper:]]*)(?![$_[:alnum:]])","name":"constant.character.other"},{"match":"[$_[:alpha:]][$_[:alnum:]]*","name":"variable.other.readwrite.ts"}]},"literal":{"name":"literal.ts","patterns":[{"include":"#numericLiteral"},{"include":"#booleanLiteral"},{"include":"#nullLiteral"},{"include":"#undefinedLiteral"},{"include":"#numericConstantLiteral"},{"include":"#arrayLiteral"},{"include":"#thisLiteral"}]},"ngExpression":{"name":"meta.expression.ng","patterns":[{"include":"#string"},{"include":"#literal"},{"include":"#ternaryExpression"},{"include":"#expressionOperator"},{"include":"#functionCall"},{"include":"#identifiers"},{"include":"#parenExpression"},{"include":"#punctuationComma"},{"include":"#punctuationSemicolon"},{"include":"#punctuationAccessor"}]},"nullLiteral":{"match":"(?<![$.])\\\\bnull\\\\b(?!\\\\$)","name":"constant.language.null.ts"},"numericConstantLiteral":{"patterns":[{"match":"(?<![$.])\\\\bNaN\\\\b(?!\\\\$)","name":"constant.language.nan.ts"},{"match":"(?<![$.])\\\\bInfinity\\\\b(?!\\\\$)","name":"constant.language.infinity.ts"}]},"numericLiteral":{"patterns":[{"match":"\\\\b(?<!\\\\$)0([Xx])\\\\h+\\\\b(?!\\\\$)","name":"constant.numeric.hex.ts"},{"match":"\\\\b(?<!\\\\$)0([Bb])[01]+\\\\b(?!\\\\$)","name":"constant.numeric.binary.ts"},{"match":"\\\\\\\\b(?<!\\\\$)0([Oo])?[0-7]+\\\\b(?!\\\\$)","name":"constant.numeric.octal.ts"},{"captures":{"0":{"name":"constant.numeric.decimal.ts"},"1":{"name":"meta.delimiter.decimal.period.ts"},"2":{"name":"meta.delimiter.decimal.period.ts"},"3":{"name":"meta.delimiter.decimal.period.ts"},"4":{"name":"meta.delimiter.decimal.period.ts"},"5":{"name":"meta.delimiter.decimal.period.ts"},"6":{"name":"meta.delimiter.decimal.period.ts"}},"match":"(?<!\\\\$)(?:\\\\b[0-9]+(\\\\.)[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+(\\\\.)[Ee][-+]?[0-9]+\\\\b|\\\\B(\\\\.)[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+(\\\\.)\\\\B|\\\\B(\\\\.)[0-9]+\\\\b|\\\\b[0-9]+\\\\b(?!\\\\.))(?!\\\\$)"}]},"parameterName":{"patterns":[{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"keyword.operator.rest.ts"},"4":{"name":"entity.name.function.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:\\\\s*\\\\b(readonly)\\\\s+)?(?:\\\\s*\\\\b(p(?:ublic|rivate|rotected))\\\\s+)?(\\\\.\\\\.\\\\.)?\\\\s*(?<![:=])([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(\\\\??)(?=\\\\s*(=\\\\s*((async\\\\s+)|(function\\\\s*[(<])|(function\\\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\\\s*=>)|((<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)(\\\\s*:\\\\s*(.)*)?\\\\s*=>)))|(:\\\\s*((<)|(\\\\(\\\\s*((\\\\))|(\\\\.\\\\.\\\\.)|([$_[:alnum:]]+\\\\s*(([,:=?])|(\\\\)\\\\s*=>))))))))"},{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"keyword.operator.rest.ts"},"4":{"name":"variable.parameter.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:\\\\s*\\\\b(readonly)\\\\s+)?(?:\\\\s*\\\\b(p(?:ublic|rivate|rotected))\\\\s+)?(\\\\.\\\\.\\\\.)?\\\\s*(?<![:=])([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(\\\\??)"}]},"parenExpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#ngExpression"},{"include":"#punctuationComma"}]},"punctuationAccessor":{"match":"(?:\\\\?|!?)\\\\.","name":"punctuation.accessor.ts"},"punctuationComma":{"match":",","name":"punctuation.separator.comma.ts"},"punctuationSemicolon":{"match":";","name":"punctuation.terminator.statement.ts"},"qstringDouble":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ts"}},"end":"(\\")|([^\\\\n\\\\\\\\])$","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"invalid.illegal.newline.ts"}},"name":"string.quoted.double.ts","patterns":[{"include":"#stringCharacterEscape"}]},"qstringSingle":{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ts"}},"end":"(\')|([^\\\\n\\\\\\\\])$","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"invalid.illegal.newline.ts"}},"name":"string.quoted.single.ts","patterns":[{"include":"#stringCharacterEscape"}]},"string":{"patterns":[{"include":"#qstringSingle"},{"include":"#qstringDouble"},{"include":"#templateLiteral"}]},"stringCharacterEscape":{"match":"\\\\\\\\(x\\\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)","name":"constant.character.escape.ts"},"templateLiteral":{"patterns":[{"include":"#templateLiteralCall"},{"begin":"([$_[:alpha:]][$_[:alnum:]]*)?(`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"},"2":{"name":"string.template.ts punctuation.definition.string.template.begin.ts"}},"contentName":"string.template.ts","end":"`","endCaptures":{"0":{"name":"string.template.ts punctuation.definition.string.template.end.ts"}},"patterns":[{"include":"#templateLiteralSubstitutionElement"},{"include":"#stringCharacterEscape"}]}]},"templateLiteralCall":{"patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([$_[:alpha:]][$_[:alnum:]]*)(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","end":"(?=`)","patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([$_[:alpha:]][$_[:alnum:]]*))","end":"(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","patterns":[{"include":"#support-function-call-identifiers"},{"match":"([$_[:alpha:]][$_[:alnum:]]*)","name":"entity.name.function.tagged-template.ts"}]},{"include":"#typeArguments"}]},{"begin":"([$_[:alpha:]][$_[:alnum:]]*)?\\\\s*(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"}},"end":"(?=`)","patterns":[{"include":"#typeArguments"}]}]},"templateLiteralSubstitutionElement":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.ts"}},"contentName":"meta.embedded.line.ts","end":"}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.ts"}},"name":"meta.template.expression.ts","patterns":[{"include":"#ngExpression"}]},"ternaryExpression":{"begin":"(?!\\\\?\\\\.\\\\s*\\\\D)(\\\\?)(?!\\\\?)","beginCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"end":"\\\\s*(:)","endCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"patterns":[{"include":"#ngExpression"}]},"thisLiteral":{"match":"(?<![$.])\\\\bthis\\\\b(?!\\\\$)","name":"variable.language.this.ts"},"type":{"name":"meta.type.ts","patterns":[{"include":"#string"},{"include":"#numericLiteral"},{"include":"#typeBuiltinLiterals"},{"include":"#typeTuple"},{"include":"#typeObject"},{"include":"#typeOperators"},{"include":"#typeFnTypeParameters"},{"include":"#typeParenOrFunctionParameters"},{"include":"#typeName"}]},"typeAnnotation":{"begin":":","beginCaptures":{"0":{"name":"keyword.operator.type.annotation.ts"}},"end":"(?=$|[]),;}]|//|\\")|(?==[^>])|(?<=[]$)>_}[:alpha:]])\\\\s*(?=\\\\{)","name":"meta.type.annotation.ts","patterns":[{"include":"#type"}]},"typeArguments":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#typeArgumentsBody"}]},"typeArgumentsBody":{"patterns":[{"captures":{"0":{"name":"keyword.operator.type.ts"}},"match":"(?<![$_[:alnum:]])(?:(?<=\\\\.\\\\.\\\\.)|(?<!\\\\.))(_)(?![$_[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.))"},{"include":"#type"},{"include":"#punctuationComma"}]},"typeBuiltinLiterals":{"match":"(?<![$.])\\\\b(this|true|false|undefined|null)\\\\b(?!\\\\$)","name":"support.type.builtin.ts"},"typeFnTypeParameters":{"patterns":[{"captures":{"1":{"name":"keyword.control.new.ts"}},"match":"(?<![$.])\\\\b(new)\\\\b(?=\\\\s*<)","name":"meta.type.constructor.ts"},{"begin":"(?<![$.])\\\\b(new)\\\\b\\\\s*(?=\\\\()","beginCaptures":{"1":{"name":"keyword.control.new.ts"}},"end":"(?<=\\\\))","name":"meta.type.constructor.ts","patterns":[{"include":"#functionParameters"}]},{"begin":"(?<=>)\\\\s*(?=\\\\()","end":"(?<=\\\\))","include":"#typeofOperator","name":"meta.type.function.ts","patterns":[{"include":"#functionParameters"}]},{"begin":"((?=\\\\(\\\\s*((\\\\))|(\\\\.\\\\.\\\\.)|([$_[:alnum:]]+\\\\s*(([,:=?])|(\\\\)\\\\s*=>))))))","end":"(?<=\\\\))","name":"meta.type.function.ts","patterns":[{"include":"#functionParameters"}]}]},"typeName":{"patterns":[{"captures":{"1":{"name":"entity.name.type.module.ts"},"2":{"name":"punctuation.accessor.ts"}},"match":"([$_[:alpha:]][$_[:alnum:]]*)\\\\s*([!?]?\\\\.)"},{"match":"[$_[:alpha:]][$_[:alnum:]]*","name":"entity.name.type.ts"}]},"typeObject":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"name":"meta.object.type.ts","patterns":[{"include":"#typeObjectMembers"}]},"typeObjectMembers":{"patterns":[{"include":"#typeAnnotation"},{"include":"#punctuationComma"},{"include":"#punctuationSemicolon"}]},"typeOperators":{"patterns":[{"include":"#typeofOperator"},{"match":"[\\\\&|]","name":"keyword.operator.type.ts"},{"match":"(?<![$.])\\\\bkeyof\\\\b(?!\\\\$)","name":"keyword.operator.expression.keyof.ts"}]},"typeParenOrFunctionParameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"name":"meta.type.paren.cover.ts","patterns":[{"include":"#type"},{"include":"#functionParameters"}]},"typeTuple":{"begin":"\\\\[","beginCaptures":{"0":{"name":"meta.brace.square.ts"}},"end":"]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.type.tuple.ts","patterns":[{"include":"#type"},{"include":"#punctuationComma"}]},"typeofOperator":{"match":"(?<![$.])\\\\btypeof\\\\b(?!\\\\$)","name":"keyword.operator.expression.typeof.ts"},"undefinedLiteral":{"match":"(?<![$.])\\\\bundefined\\\\b(?!\\\\$)","name":"constant.language.undefined.ts"},"variableInitializer":{"begin":"(?<![!=])(=)(?!=)","beginCaptures":{"1":{"name":"keyword.operator.assignment.ts"}},"end":"(?=$|[]),;}])","patterns":[{"include":"#ngExpression"}]}},"scopeName":"expression.ng"}'))],r=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment -expression.ng -meta.tag -source.css -source.js","name":"angular-let-declaration","patterns":[{"include":"#letDeclaration"}],"repository":{"letDeclaration":{"begin":"(@let)\\\\s+([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(=)?","beginCaptures":{"1":{"name":"storage.type.ng"},"2":{"name":"variable.other.constant.ng"},"3":{"name":"keyword.operator.assignment.ng"}},"end":"(?<=;)","name":"meta.definition.variable.ng","patterns":[{"include":"#letInitializer"}]},"letInitializer":{"begin":"\\\\s*","beginCaptures":{"0":{"name":"keyword.operator.assignment.ng"}},"contentName":"meta.definition.variable.initializer.ng","end":";","endCaptures":{"0":{"name":"punctuation.terminator.statement.ng"}},"patterns":[{"include":"expression.ng"}]}},"scopeName":"template.let.ng","embeddedLangs":["angular-expression"]}`)),i=[...n,r],a=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment","name":"angular-template","patterns":[{"include":"#interpolation"}],"repository":{"interpolation":{"begin":"\\\\{\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"contentName":"expression.ng","end":"}}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"patterns":[{"include":"expression.ng"}]}},"scopeName":"template.ng","embeddedLangs":["angular-expression"]}`)),o=[...n,a],s=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment -expression.ng -meta.tag -source.css -source.js","name":"angular-template-blocks","patterns":[{"include":"#block"}],"repository":{"block":{"begin":"(@)(if|else if|else|defer|placeholder|loading|error|switch|case|default|for|empty)\\\\s*","beginCaptures":{"1":{"patterns":[{"include":"#transition"}]},"2":{"name":"keyword.control.block.kind.ng"}},"end":"(?<=})","name":"control.block.ng","patterns":[{"include":"#blockExpression"},{"include":"#blockBody"}]},"blockBody":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"contentName":"control.block.body.ng","end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"patterns":[{"include":"text.html.derivative.ng"},{"include":"template.ng"}]},"blockExpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"contentName":"control.block.expression.ng","end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#blockExpressionOfClause"},{"include":"#blockExpressionLetBinding"},{"include":"#blockExpressionTrackClause"},{"include":"expression.ng"}]},"blockExpressionLetBinding":{"begin":"\\\\blet\\\\b","beginCaptures":{"0":{"name":"storage.type.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"blockExpressionOfClause":{"begin":"([$_[:alpha:]][$_[:alnum:]]*)\\\\s+(of)\\\\b","beginCaptures":{"1":{"name":"variable.other.constant.ng"},"2":{"name":"keyword.operator.expression.of.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"blockExpressionTrackClause":{"begin":"\\\\btrack\\\\b","beginCaptures":{"0":{"name":"keyword.control.track.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"transition":{"match":"@","name":"keyword.control.block.transition.ng"}},"scopeName":"template.blocks.ng","embeddedLangs":["angular-expression","angular-template"]}`)),c=[...n,...o,s],l=e({default:()=>d}),u=Object.freeze(JSON.parse(`{"displayName":"Angular HTML","injections":{"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"angular-html","patterns":[{"include":"text.html.basic#core-minus-invalid"},{"begin":"(</?)(\\\\w[^>\\\\s]*)(?<!/)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.unrecognized.html.derivative","patterns":[{"include":"text.html.basic#attribute"}]}],"scopeName":"text.html.derivative.ng","embeddedLangs":["html","angular-expression","angular-let-declaration","angular-template","angular-template-blocks"]}`)),d=[...t,...n,...i,...o,...c,u];export{i as a,o as i,l as n,n as o,c as r,d as t};
|