@angular/language-service 22.0.0-next.4 → 22.0.0-next.6

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 (46) hide show
  1. package/bundles/language-service.js +381 -231
  2. package/package.json +5 -1
  3. package/private.d.ts +8 -0
  4. package/private_bundle.js +507 -0
  5. package/private_bundle.js.map +6 -0
  6. package/src/adapters.d.ts +68 -0
  7. package/src/attribute_completions.d.ts +195 -0
  8. package/src/codefixes/all_codefixes_metas.d.ts +9 -0
  9. package/src/codefixes/code_fixes.d.ts +30 -0
  10. package/src/codefixes/fix_invalid_banana_in_box.d.ts +12 -0
  11. package/src/codefixes/fix_missing_import.d.ts +12 -0
  12. package/src/codefixes/fix_missing_member.d.ts +13 -0
  13. package/src/codefixes/fix_missing_required_inputs.d.ts +12 -0
  14. package/src/codefixes/fix_unused_standalone_imports.d.ts +12 -0
  15. package/src/codefixes/index.d.ts +9 -0
  16. package/src/codefixes/utils.d.ts +67 -0
  17. package/src/compiler_factory.d.ts +29 -0
  18. package/src/completions.d.ts +113 -0
  19. package/src/definitions.d.ts +28 -0
  20. package/src/document_symbols.d.ts +20 -0
  21. package/src/inlay_hints.d.ts +16 -0
  22. package/src/language_service.d.ts +132 -0
  23. package/src/linked_editing_range.d.ts +21 -0
  24. package/src/outlining_spans.d.ts +10 -0
  25. package/src/quick_info.d.ts +34 -0
  26. package/src/quick_info_built_ins.d.ts +13 -0
  27. package/src/refactorings/convert_to_signal_input/apply_input_refactoring.d.ts +13 -0
  28. package/src/refactorings/convert_to_signal_input/decorators.d.ts +11 -0
  29. package/src/refactorings/convert_to_signal_input/full_class_input_refactoring.d.ts +38 -0
  30. package/src/refactorings/convert_to_signal_input/individual_input_refactoring.d.ts +39 -0
  31. package/src/refactorings/convert_to_signal_queries/apply_query_refactoring.d.ts +13 -0
  32. package/src/refactorings/convert_to_signal_queries/decorators.d.ts +11 -0
  33. package/src/refactorings/convert_to_signal_queries/full_class_query_refactoring.d.ts +38 -0
  34. package/src/refactorings/convert_to_signal_queries/individual_query_refactoring.d.ts +39 -0
  35. package/src/refactorings/refactoring.d.ts +45 -0
  36. package/src/references_and_rename.d.ts +28 -0
  37. package/src/references_and_rename_utils.d.ts +72 -0
  38. package/src/semantic_tokens.d.ts +48 -0
  39. package/src/signature_help.d.ts +13 -0
  40. package/src/template_target.d.ts +178 -0
  41. package/src/ts_plugin.d.ts +14 -0
  42. package/src/utils/decorators.d.ts +10 -0
  43. package/src/utils/display_parts.d.ts +62 -0
  44. package/src/utils/format.d.ts +17 -0
  45. package/src/utils/index.d.ts +89 -0
  46. package/src/utils/ts_utils.d.ts +141 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/language-service",
3
- "version": "22.0.0-next.4",
3
+ "version": "22.0.0-next.6",
4
4
  "description": "Angular - language services",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
@@ -23,6 +23,10 @@
23
23
  "./api": {
24
24
  "types": "./api.d.ts",
25
25
  "default": "./api_bundle.js"
26
+ },
27
+ "./private": {
28
+ "types": "./private.d.ts",
29
+ "default": "./private_bundle.js"
26
30
  }
27
31
  },
28
32
  "repository": {
package/private.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ export * from './src/template_target';
@@ -0,0 +1,507 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var __publicField = (obj, key, value) => {
30
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
31
+ return value;
32
+ };
33
+
34
+ // packages/language-service/private.ts
35
+ var private_exports = {};
36
+ __export(private_exports, {
37
+ TargetNodeKind: () => TargetNodeKind,
38
+ getTargetAtPosition: () => getTargetAtPosition,
39
+ getTcbNodesOfTemplateAtPosition: () => getTcbNodesOfTemplateAtPosition
40
+ });
41
+ module.exports = __toCommonJS(private_exports);
42
+
43
+ // packages/language-service/src/template_target.js
44
+ var import_compiler2 = require("@angular/compiler");
45
+ var import_comments = require("@angular/compiler-cli/src/ngtsc/typecheck/src/comments");
46
+ var import_typescript5 = __toESM(require("typescript"));
47
+
48
+ // packages/language-service/src/utils/index.js
49
+ var import_compiler = require("@angular/compiler");
50
+ var import_file_system = require("@angular/compiler-cli/src/ngtsc/file_system");
51
+ var import_metadata = require("@angular/compiler-cli/src/ngtsc/metadata");
52
+ var import_typescript4 = __toESM(require("typescript"));
53
+
54
+ // packages/language-service/src/utils/display_parts.js
55
+ var import_reflection = require("@angular/compiler-cli/src/ngtsc/reflection");
56
+ var import_api = require("@angular/compiler-cli/src/ngtsc/typecheck/api");
57
+ var import_typescript = __toESM(require("typescript"));
58
+ var ALIAS_NAME = import_typescript.default.SymbolDisplayPartKind[import_typescript.default.SymbolDisplayPartKind.aliasName];
59
+ var SYMBOL_INTERFACE = import_typescript.default.SymbolDisplayPartKind[import_typescript.default.SymbolDisplayPartKind.interfaceName];
60
+ var SYMBOL_PUNC = import_typescript.default.SymbolDisplayPartKind[import_typescript.default.SymbolDisplayPartKind.punctuation];
61
+ var SYMBOL_SPACE = import_typescript.default.SymbolDisplayPartKind[import_typescript.default.SymbolDisplayPartKind.space];
62
+ var SYMBOL_TEXT = import_typescript.default.SymbolDisplayPartKind[import_typescript.default.SymbolDisplayPartKind.text];
63
+ var DisplayInfoKind;
64
+ (function(DisplayInfoKind2) {
65
+ DisplayInfoKind2["ATTRIBUTE"] = "attribute";
66
+ DisplayInfoKind2["BLOCK"] = "block";
67
+ DisplayInfoKind2["TRIGGER"] = "trigger";
68
+ DisplayInfoKind2["COMPONENT"] = "component";
69
+ DisplayInfoKind2["DIRECTIVE"] = "directive";
70
+ DisplayInfoKind2["EVENT"] = "event";
71
+ DisplayInfoKind2["REFERENCE"] = "reference";
72
+ DisplayInfoKind2["ELEMENT"] = "element";
73
+ DisplayInfoKind2["VARIABLE"] = "variable";
74
+ DisplayInfoKind2["PIPE"] = "pipe";
75
+ DisplayInfoKind2["PROPERTY"] = "property";
76
+ DisplayInfoKind2["METHOD"] = "method";
77
+ DisplayInfoKind2["TEMPLATE"] = "template";
78
+ DisplayInfoKind2["KEYWORD"] = "keyword";
79
+ DisplayInfoKind2["LET"] = "let";
80
+ })(DisplayInfoKind || (DisplayInfoKind = {}));
81
+
82
+ // packages/language-service/src/utils/ts_utils.js
83
+ var import_api2 = require("@angular/compiler-cli/src/ngtsc/typecheck/api");
84
+ var import_typescript3 = __toESM(require("typescript"));
85
+
86
+ // packages/language-service/src/utils/format.js
87
+ var import_typescript2 = __toESM(require("typescript"));
88
+
89
+ // packages/language-service/src/utils/index.js
90
+ function isTemplateNodeWithKeyAndValue(node) {
91
+ return isTemplateNode(node) && node.hasOwnProperty("keySpan");
92
+ }
93
+ function isWithinKeyValue(position, node) {
94
+ let { keySpan, valueSpan } = node;
95
+ if (valueSpan === void 0 && node instanceof import_compiler.TmplAstBoundEvent) {
96
+ valueSpan = node.handlerSpan;
97
+ }
98
+ const isWithinKeyValue2 = isWithin(position, keySpan) || !!(valueSpan && isWithin(position, valueSpan));
99
+ return isWithinKeyValue2;
100
+ }
101
+ function isTemplateNode(node) {
102
+ return node.sourceSpan instanceof import_compiler.ParseSourceSpan;
103
+ }
104
+ function isWithin(position, span) {
105
+ let start, end;
106
+ if (span instanceof import_compiler.ParseSourceSpan) {
107
+ start = span.start.offset;
108
+ end = span.end.offset;
109
+ } else {
110
+ start = span.start;
111
+ end = span.end;
112
+ }
113
+ return start <= position && position <= end;
114
+ }
115
+ function isBoundEventWithSyntheticHandler(event) {
116
+ let handler = event.handler;
117
+ if (handler instanceof import_compiler.ASTWithSource) {
118
+ handler = handler.ast;
119
+ }
120
+ if (handler instanceof import_compiler.LiteralPrimitive && handler.value === "ERROR") {
121
+ return true;
122
+ }
123
+ return false;
124
+ }
125
+
126
+ // packages/language-service/src/template_target.js
127
+ var TargetNodeKind;
128
+ (function(TargetNodeKind2) {
129
+ TargetNodeKind2[TargetNodeKind2["RawExpression"] = 0] = "RawExpression";
130
+ TargetNodeKind2[TargetNodeKind2["CallExpressionInArgContext"] = 1] = "CallExpressionInArgContext";
131
+ TargetNodeKind2[TargetNodeKind2["RawTemplateNode"] = 2] = "RawTemplateNode";
132
+ TargetNodeKind2[TargetNodeKind2["ElementInTagContext"] = 3] = "ElementInTagContext";
133
+ TargetNodeKind2[TargetNodeKind2["ElementInBodyContext"] = 4] = "ElementInBodyContext";
134
+ TargetNodeKind2[TargetNodeKind2["AttributeInKeyContext"] = 5] = "AttributeInKeyContext";
135
+ TargetNodeKind2[TargetNodeKind2["AttributeInValueContext"] = 6] = "AttributeInValueContext";
136
+ TargetNodeKind2[TargetNodeKind2["TwoWayBindingContext"] = 7] = "TwoWayBindingContext";
137
+ TargetNodeKind2[TargetNodeKind2["ComponentInTagContext"] = 8] = "ComponentInTagContext";
138
+ TargetNodeKind2[TargetNodeKind2["ComponentInBodyContext"] = 9] = "ComponentInBodyContext";
139
+ TargetNodeKind2[TargetNodeKind2["DirectiveInNameContext"] = 10] = "DirectiveInNameContext";
140
+ TargetNodeKind2[TargetNodeKind2["DirectiveInBodyContext"] = 11] = "DirectiveInBodyContext";
141
+ })(TargetNodeKind || (TargetNodeKind = {}));
142
+ var OutsideKeyValueMarkerAst = class extends import_compiler2.AST {
143
+ visit() {
144
+ return null;
145
+ }
146
+ };
147
+ var OUTSIDE_K_V_MARKER = new OutsideKeyValueMarkerAst(new import_compiler2.ParseSpan(-1, -1), new import_compiler2.AbsoluteSourceSpan(-1, -1));
148
+ function getTargetAtPosition(template, position) {
149
+ const path = TemplateTargetVisitor.visitTemplate(template, position);
150
+ if (path.length === 0) {
151
+ return null;
152
+ }
153
+ const candidate = path[path.length - 1];
154
+ let context = null;
155
+ for (let i = path.length - 2; i >= 0; i--) {
156
+ const node = path[i];
157
+ if (node instanceof import_compiler2.TmplAstTemplate) {
158
+ context = node;
159
+ break;
160
+ }
161
+ }
162
+ let nodeInContext;
163
+ if ((candidate instanceof import_compiler2.Call || candidate instanceof import_compiler2.SafeCall) && isWithin(position, candidate.argumentSpan)) {
164
+ nodeInContext = {
165
+ kind: TargetNodeKind.CallExpressionInArgContext,
166
+ node: candidate
167
+ };
168
+ } else if (candidate instanceof import_compiler2.AST) {
169
+ const parents = path.filter((value) => value instanceof import_compiler2.AST);
170
+ parents.pop();
171
+ nodeInContext = {
172
+ kind: TargetNodeKind.RawExpression,
173
+ node: candidate,
174
+ parents
175
+ };
176
+ } else if (candidate instanceof import_compiler2.TmplAstElement) {
177
+ nodeInContext = {
178
+ kind: isWithinTagBody(position, candidate) ? TargetNodeKind.ElementInBodyContext : TargetNodeKind.ElementInTagContext,
179
+ node: candidate
180
+ };
181
+ } else if (candidate instanceof import_compiler2.TmplAstComponent) {
182
+ nodeInContext = {
183
+ kind: isWithinTagBody(position, candidate) ? TargetNodeKind.ComponentInBodyContext : TargetNodeKind.ComponentInTagContext,
184
+ node: candidate
185
+ };
186
+ } else if (candidate instanceof import_compiler2.TmplAstDirective) {
187
+ const startSpan = candidate.startSourceSpan;
188
+ const endOffset = startSpan.end.offset - (startSpan.toString().endsWith("(") ? 1 : 0);
189
+ nodeInContext = {
190
+ kind: position >= startSpan.start.offset && position <= endOffset ? TargetNodeKind.DirectiveInNameContext : TargetNodeKind.DirectiveInBodyContext,
191
+ node: candidate
192
+ };
193
+ } else if ((candidate instanceof import_compiler2.TmplAstBoundAttribute || candidate instanceof import_compiler2.TmplAstBoundEvent || candidate instanceof import_compiler2.TmplAstTextAttribute) && candidate.keySpan !== void 0) {
194
+ const previousCandidate = path[path.length - 2];
195
+ if (candidate instanceof import_compiler2.TmplAstBoundEvent && previousCandidate instanceof import_compiler2.TmplAstBoundAttribute && candidate.name === previousCandidate.name + "Change") {
196
+ const boundAttribute = previousCandidate;
197
+ const boundEvent = candidate;
198
+ nodeInContext = {
199
+ kind: TargetNodeKind.TwoWayBindingContext,
200
+ nodes: [boundAttribute, boundEvent]
201
+ };
202
+ } else if (isWithin(position, candidate.keySpan)) {
203
+ nodeInContext = {
204
+ kind: TargetNodeKind.AttributeInKeyContext,
205
+ node: candidate
206
+ };
207
+ } else {
208
+ nodeInContext = {
209
+ kind: TargetNodeKind.AttributeInValueContext,
210
+ node: candidate
211
+ };
212
+ }
213
+ } else {
214
+ nodeInContext = {
215
+ kind: TargetNodeKind.RawTemplateNode,
216
+ node: candidate
217
+ };
218
+ }
219
+ let parent = null;
220
+ if (nodeInContext.kind === TargetNodeKind.TwoWayBindingContext && path.length >= 3) {
221
+ parent = path[path.length - 3];
222
+ } else if (path.length >= 2) {
223
+ parent = path[path.length - 2];
224
+ }
225
+ return { position, context: nodeInContext, template: context, parent };
226
+ }
227
+ function findFirstMatchingNodeForSourceSpan(tcb, sourceSpan) {
228
+ return (0, import_comments.findFirstMatchingNode)(tcb, {
229
+ withSpan: sourceSpan,
230
+ filter: (node) => true
231
+ });
232
+ }
233
+ function getTcbNodesOfTemplateAtPosition(templateNodes, position, tcb) {
234
+ var _a;
235
+ const target = getTargetAtPosition(templateNodes, position);
236
+ if (target === null) {
237
+ return null;
238
+ }
239
+ const tcbNodes = [];
240
+ if (target.context.kind === TargetNodeKind.RawExpression) {
241
+ const targetNode = target.context.node;
242
+ if (targetNode instanceof import_compiler2.PropertyRead) {
243
+ const tsNode = (0, import_comments.findFirstMatchingNode)(tcb, {
244
+ withSpan: targetNode.nameSpan,
245
+ filter: (node) => import_typescript5.default.isPropertyAccessExpression(node)
246
+ });
247
+ tcbNodes.push((_a = tsNode == null ? void 0 : tsNode.name) != null ? _a : null);
248
+ } else {
249
+ tcbNodes.push(findFirstMatchingNodeForSourceSpan(tcb, target.context.node.sourceSpan));
250
+ }
251
+ } else if (target.context.kind === TargetNodeKind.TwoWayBindingContext) {
252
+ const targetNodes = target.context.nodes.map((n) => n.sourceSpan).map((node) => {
253
+ return findFirstMatchingNodeForSourceSpan(tcb, node);
254
+ });
255
+ tcbNodes.push(...targetNodes);
256
+ } else {
257
+ tcbNodes.push(findFirstMatchingNodeForSourceSpan(tcb, target.context.node.sourceSpan));
258
+ }
259
+ return {
260
+ nodes: tcbNodes.filter((n) => n !== null),
261
+ componentTcbNode: tcb
262
+ };
263
+ }
264
+ var TemplateTargetVisitor = class _TemplateTargetVisitor {
265
+ // Position must be absolute in the source file.
266
+ constructor(position) {
267
+ __publicField(this, "position");
268
+ // We need to keep a path instead of the last node because we might need more
269
+ // context for the last node, for example what is the parent node?
270
+ __publicField(this, "path", []);
271
+ this.position = position;
272
+ }
273
+ static visitTemplate(template, position) {
274
+ const visitor = new _TemplateTargetVisitor(position);
275
+ visitor.visitAll(template);
276
+ const { path } = visitor;
277
+ const strictPath = path.filter((v) => v !== OUTSIDE_K_V_MARKER);
278
+ const candidate = strictPath[strictPath.length - 1];
279
+ const matchedASourceSpanButNotAKvSpan = path.some((v) => v === OUTSIDE_K_V_MARKER);
280
+ if (matchedASourceSpanButNotAKvSpan && (candidate instanceof import_compiler2.TmplAstTemplate || candidate instanceof import_compiler2.TmplAstElement)) {
281
+ return [];
282
+ }
283
+ return strictPath;
284
+ }
285
+ visit(node) {
286
+ if (!isWithinNode(this.position, node)) {
287
+ return;
288
+ }
289
+ const last = this.path[this.path.length - 1];
290
+ const withinKeySpanOfLastNode = last && isTemplateNodeWithKeyAndValue(last) && isWithin(this.position, last.keySpan);
291
+ const withinKeySpanOfCurrentNode = isTemplateNodeWithKeyAndValue(node) && isWithin(this.position, node.keySpan);
292
+ if (withinKeySpanOfLastNode && !withinKeySpanOfCurrentNode) {
293
+ return;
294
+ }
295
+ if (last instanceof import_compiler2.TmplAstUnknownBlock && isWithin(this.position, last.nameSpan)) {
296
+ return;
297
+ }
298
+ if (isTemplateNodeWithKeyAndValue(node) && !isWithinKeyValue(this.position, node)) {
299
+ this.path.push(OUTSIDE_K_V_MARKER);
300
+ } else if (node instanceof import_compiler2.TmplAstHostElement) {
301
+ this.path.push(node);
302
+ this.visitAll(node.bindings);
303
+ this.visitAll(node.listeners);
304
+ } else {
305
+ this.path.push(node);
306
+ node.visit(this);
307
+ }
308
+ }
309
+ visitElement(element) {
310
+ this.visitDirectiveHost(element);
311
+ }
312
+ visitTemplate(template) {
313
+ this.visitDirectiveHost(template);
314
+ }
315
+ visitComponent(component) {
316
+ this.visitDirectiveHost(component);
317
+ }
318
+ visitDirective(directive) {
319
+ this.visitDirectiveHost(directive);
320
+ }
321
+ visitDirectiveHost(node) {
322
+ const isTemplate = node instanceof import_compiler2.TmplAstTemplate;
323
+ const isDirective = node instanceof import_compiler2.TmplAstDirective;
324
+ this.visitAll(node.attributes);
325
+ if (!isDirective) {
326
+ this.visitAll(node.directives);
327
+ }
328
+ this.visitAll(node.inputs);
329
+ if (this.path[this.path.length - 1] !== node && !(this.path[this.path.length - 1] instanceof import_compiler2.TmplAstBoundAttribute)) {
330
+ return;
331
+ }
332
+ this.visitAll(node.outputs);
333
+ if (isTemplate) {
334
+ this.visitAll(node.templateAttrs);
335
+ }
336
+ this.visitAll(node.references);
337
+ if (isTemplate) {
338
+ this.visitAll(node.variables);
339
+ }
340
+ if (this.path[this.path.length - 1] !== node) {
341
+ return;
342
+ }
343
+ if (!isDirective) {
344
+ this.visitAll(node.children);
345
+ }
346
+ }
347
+ visitContent(content) {
348
+ (0, import_compiler2.tmplAstVisitAll)(this, content.attributes);
349
+ this.visitAll(content.children);
350
+ }
351
+ visitVariable(variable) {
352
+ }
353
+ visitReference(reference) {
354
+ }
355
+ visitTextAttribute(attribute) {
356
+ }
357
+ visitBoundAttribute(attribute) {
358
+ if (attribute.valueSpan !== void 0) {
359
+ this.visitBinding(attribute.value);
360
+ }
361
+ }
362
+ visitBoundEvent(event) {
363
+ if (!isBoundEventWithSyntheticHandler(event)) {
364
+ this.visitBinding(event.handler);
365
+ }
366
+ }
367
+ visitText(text) {
368
+ }
369
+ visitBoundText(text) {
370
+ this.visitBinding(text.value);
371
+ }
372
+ visitIcu(icu) {
373
+ for (const boundText of Object.values(icu.vars)) {
374
+ this.visit(boundText);
375
+ }
376
+ for (const boundTextOrText of Object.values(icu.placeholders)) {
377
+ this.visit(boundTextOrText);
378
+ }
379
+ }
380
+ visitDeferredBlock(deferred) {
381
+ deferred.visitAll(this);
382
+ }
383
+ visitDeferredBlockPlaceholder(block) {
384
+ this.visitAll(block.children);
385
+ }
386
+ visitDeferredBlockError(block) {
387
+ this.visitAll(block.children);
388
+ }
389
+ visitDeferredBlockLoading(block) {
390
+ this.visitAll(block.children);
391
+ }
392
+ visitDeferredTrigger(trigger) {
393
+ if (trigger instanceof import_compiler2.TmplAstBoundDeferredTrigger) {
394
+ this.visitBinding(trigger.value);
395
+ } else if (trigger instanceof import_compiler2.TmplAstViewportDeferredTrigger && trigger.options !== null) {
396
+ this.visitBinding(trigger.options);
397
+ }
398
+ }
399
+ visitSwitchBlock(block) {
400
+ this.visitBinding(block.expression);
401
+ this.visitAll(block.groups);
402
+ this.visitAll(block.unknownBlocks);
403
+ if (block.exhaustiveCheck) {
404
+ this.visit(block.exhaustiveCheck);
405
+ }
406
+ }
407
+ visitSwitchBlockCase(block) {
408
+ block.expression && this.visitBinding(block.expression);
409
+ }
410
+ visitSwitchBlockCaseGroup(block) {
411
+ this.visitAll(block.cases);
412
+ this.visitAll(block.children);
413
+ }
414
+ visitSwitchExhaustiveCheck(block) {
415
+ block.expression && this.visitBinding(block.expression);
416
+ }
417
+ visitForLoopBlock(block) {
418
+ this.visit(block.item);
419
+ this.visitAll(block.contextVariables);
420
+ this.visitBinding(block.expression);
421
+ this.visitBinding(block.trackBy);
422
+ this.visitAll(block.children);
423
+ block.empty && this.visit(block.empty);
424
+ }
425
+ visitForLoopBlockEmpty(block) {
426
+ this.visitAll(block.children);
427
+ }
428
+ visitIfBlock(block) {
429
+ this.visitAll(block.branches);
430
+ }
431
+ visitIfBlockBranch(block) {
432
+ block.expression && this.visitBinding(block.expression);
433
+ block.expressionAlias && this.visit(block.expressionAlias);
434
+ this.visitAll(block.children);
435
+ }
436
+ visitUnknownBlock(block) {
437
+ }
438
+ visitLetDeclaration(decl) {
439
+ this.visitBinding(decl.value);
440
+ }
441
+ visitAll(nodes) {
442
+ for (const node of nodes) {
443
+ this.visit(node);
444
+ }
445
+ }
446
+ visitBinding(expression) {
447
+ const visitor = new ExpressionVisitor(this.position);
448
+ visitor.visit(expression, this.path);
449
+ }
450
+ };
451
+ var ExpressionVisitor = class extends import_compiler2.RecursiveAstVisitor {
452
+ // Position must be absolute in the source file.
453
+ constructor(position) {
454
+ super();
455
+ __publicField(this, "position");
456
+ this.position = position;
457
+ }
458
+ visit(node, path) {
459
+ if (node instanceof import_compiler2.ASTWithSource) {
460
+ node = node.ast;
461
+ }
462
+ if (isWithin(this.position, node.sourceSpan) && !(node instanceof import_compiler2.ImplicitReceiver) && !(node instanceof import_compiler2.ThisReceiver)) {
463
+ path.push(node);
464
+ node.visit(this, path);
465
+ }
466
+ }
467
+ };
468
+ function getSpanIncludingEndTag(ast) {
469
+ const result = {
470
+ start: ast.sourceSpan.start.offset,
471
+ end: ast.sourceSpan.end.offset
472
+ };
473
+ if (ast instanceof import_compiler2.TmplAstElement || ast instanceof import_compiler2.TmplAstTemplate) {
474
+ if (ast.endSourceSpan) {
475
+ result.end = ast.endSourceSpan.end.offset;
476
+ } else if (ast.children.length > 0) {
477
+ result.end = getSpanIncludingEndTag(ast.children[ast.children.length - 1]).end;
478
+ } else {
479
+ }
480
+ }
481
+ return result;
482
+ }
483
+ function isWithinNode(position, node) {
484
+ if (!(node instanceof import_compiler2.TmplAstHostElement)) {
485
+ return isWithin(position, getSpanIncludingEndTag(node));
486
+ }
487
+ return node.bindings.length > 0 && node.bindings.some((binding) => isWithin(position, binding.sourceSpan)) || node.listeners.length > 0 && node.listeners.some((listener) => isWithin(position, listener.sourceSpan));
488
+ }
489
+ function isWithinTagBody(position, node) {
490
+ const name = node instanceof import_compiler2.TmplAstComponent ? node.fullName : node.name;
491
+ const tagEndPos = node.sourceSpan.start.offset + 1 + name.length;
492
+ return position > tagEndPos;
493
+ }
494
+ // Annotate the CommonJS export names for ESM import in node:
495
+ 0 && (module.exports = {
496
+ TargetNodeKind,
497
+ getTargetAtPosition,
498
+ getTcbNodesOfTemplateAtPosition
499
+ });
500
+ /**
501
+ * @license
502
+ * Copyright Google LLC All Rights Reserved.
503
+ *
504
+ * Use of this source code is governed by an MIT-style license that can be
505
+ * found in the LICENSE file at https://angular.dev/license
506
+ */
507
+ //# sourceMappingURL=private_bundle.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["private.ts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AAO,gBAAgB,oCAAmB,KAAK,WAAW,KAAK;AACrE,QAAM,YACJ,KAAK,WAAW,MAAM,SAAS,IAAuC,KAAK;AAC7E,SAAO,WAAW;AACpB;",
5
+ "names": ["import_compiler", "import_typescript", "import_typescript", "ts", "DisplayInfoKind", "import_api", "import_typescript", "import_typescript", "isWithinKeyValue", "TargetNodeKind", "tss"]
6
+ }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ /** @fileoverview provides adapters for communicating with the ng compiler */
9
+ import { ConfigurationHost } from '@angular/compiler-cli';
10
+ import { NgCompilerAdapter } from '@angular/compiler-cli/src/ngtsc/core/api';
11
+ import { AbsoluteFsPath, FileStats, PathSegment, PathString } from '@angular/compiler-cli/src/ngtsc/file_system';
12
+ import ts from 'typescript';
13
+ export declare class LanguageServiceAdapter implements NgCompilerAdapter {
14
+ private readonly project;
15
+ readonly entryPoint: null;
16
+ readonly constructionDiagnostics: ts.Diagnostic[];
17
+ readonly ignoreForEmit: Set<ts.SourceFile>;
18
+ readonly unifiedModulesHost: null;
19
+ readonly rootDirs: AbsoluteFsPath[];
20
+ /**
21
+ * Map of resource filenames to the version of the file last read via `readResource`.
22
+ *
23
+ * Used to implement `getModifiedResourceFiles`.
24
+ */
25
+ private readonly lastReadResourceVersion;
26
+ constructor(project: ts.server.Project);
27
+ getSourceFile(fileName: string, languageVersion: ts.ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): ts.SourceFile | undefined;
28
+ resourceNameToFileName(url: string, fromFile: string, fallbackResolve?: (url: string, fromFile: string) => string | null): string | null;
29
+ isShim(sf: ts.SourceFile): boolean;
30
+ isResource(sf: ts.SourceFile): boolean;
31
+ fileExists(fileName: string): boolean;
32
+ readFile(fileName: string): string | undefined;
33
+ getCurrentDirectory(): string;
34
+ getCanonicalFileName(fileName: string): string;
35
+ /**
36
+ * Return the real path of a symlink. This method is required in order to
37
+ * resolve symlinks in node_modules.
38
+ */
39
+ realpath(path: string): string;
40
+ /**
41
+ * readResource() is an Angular-specific method for reading files that are not
42
+ * managed by the TS compiler host, namely templates and stylesheets.
43
+ * It is a method on ExtendedTsCompilerHost, see
44
+ * packages/compiler-cli/src/ngtsc/core/api/src/interfaces.ts
45
+ */
46
+ readResource(fileName: string): string;
47
+ getModifiedResourceFiles(): Set<string> | undefined;
48
+ }
49
+ /**
50
+ * Used to read configuration files.
51
+ *
52
+ * A language service parse configuration host is independent of the adapter
53
+ * because signatures of calls like `FileSystem#readFile` are a bit stricter
54
+ * than those on the adapter.
55
+ */
56
+ export declare class LSParseConfigHost implements ConfigurationHost {
57
+ private readonly serverHost;
58
+ constructor(serverHost: ts.server.ServerHost);
59
+ exists(path: AbsoluteFsPath): boolean;
60
+ readFile(path: AbsoluteFsPath): string;
61
+ lstat(path: AbsoluteFsPath): FileStats;
62
+ readdir(path: AbsoluteFsPath): PathSegment[];
63
+ pwd(): AbsoluteFsPath;
64
+ extname(path: AbsoluteFsPath | PathSegment): string;
65
+ resolve(...paths: string[]): AbsoluteFsPath;
66
+ dirname<T extends PathString>(file: T): T;
67
+ join<T extends PathString>(basePath: T, ...paths: string[]): T;
68
+ }