Commit graph

80 commits

Author SHA1 Message Date
Joey Perrott
84b66f3b04 build: migrate adev shared-docs package to use ts_project (#61217)
Migrate the build rules for shared docs to use ts_project

PR Close #61217
2025-05-09 16:32:06 +00:00
Paul Gschwendtner
0e3d4546b9 build: migrate compiler-cli/src/ngtsc to ts_project (#61237)
Migrates all of `compiler-cli/src/ngtsc` to `ts_project`. This change
was generated using Gemini.

PR Close #61237
2025-05-09 16:01:49 +00:00
Paul Gschwendtner
1bfd7bbd1c build: prepare for compiler-cli to be using ts_project (#61237)
Prepare the compiler-cli package for being ready for migration
to `ts_project`.

PR Close #61237
2025-05-09 16:01:49 +00:00
Miles Malerba
974b2462a8 docs: update rendering to use generated repo link (#61143)
PR Close #61143
2025-05-06 14:09:46 -07:00
Miles Malerba
5765905b81 docs: update API generation to include repo name (#61143)
PR Close #61143
2025-05-06 14:09:46 -07:00
Miles Malerba
6ce2672e65 docs: hide entries that are marked @docs-private (#61105)
PR Close #61105
2025-05-05 08:44:05 -07:00
hawkgs
578041bf3a docs(docs-infra): fix function api ref header width (#61022)
Fix the width of the function API reference header when the viewport width is for-desktop-down.

PR Close #61022
2025-04-28 10:01:41 -07:00
hawkgs
181fd67759 docs(docs-infra): use a custom scrollbar for the examples using HighlightTypeScript (#60981)
The examples used to render the native scrollbar.

PR Close #60981
2025-04-23 17:24:30 +02:00
Matthieu Riegler
7d2980982c docs(docs-infra): Improve doc support for pipes. (#60926)
This commits adds the pipe usage and the impure pipe mention.

PR Close #60926
2025-04-23 08:46:12 +02:00
Miles Malerba
4fec563f7f docs: Restructure example build rules (#60778)
Restructures the examples build rules so that all examples are exposed
through a single file group in adev/src/content/examples.

Also adds a separate filegroup in the same location for just the
embeddable examples and adds it to the APPLICATION_FILES for the docs
app.

This uncovered the fact that some of our examples have broken
non-compiling code. I've excluded these ones from being embeddable for
now, until the breakages can be addressed

PR Close #60778
2025-04-11 17:19:35 -04:00
Miles Malerba
1c6a209c7a docs: Add back script to generate example previews map (#60778)
Restores the ability to have example components rendered alongside the
code. This functionality was broken a while back by #53511.

To enable the embedded preview for an example, add `preview` and
`path=adev/src/content/expamples/component/to/render.ts` attributes to
the `<docs-code>` or `<docs-code-multifile>` tag.

Tested with one of the accessibility examples and it seems to work now.

PR Close #60778
2025-04-11 17:19:34 -04:00
Alan Agius
77c60414a2 fix(docs-infra): update docs-alert and tests (#60829)
Before this commit, the docs-alert tests were failing. This also ensures that `NOTE:`, `TIP:` and others are always capitalized.

(cherry picked from commit ab5986dd5685d36e209972916cddb9dca8e0a557)

PR Close #60829
2025-04-10 11:19:53 -04:00
Alan Agius
a0327bb596 docs(docs-infra): add support for @example (#60443)
In TSDoc, we currently handle the `@usageNotes` annotation, but this is not a standard TSDoc tag. Instead, the `@example` annotation is the correct standard, which is used in the Angular CLI repo and on the SSR package.

This change ensures that `@example` is treated the same as `@usageNotes` during the transform process and also handle multiple instances of `@example` on the same tag.

PR Close #60443
2025-03-18 18:14:11 +01:00
Matthieu Riegler
442ef134b8 docs(docs-infra): Extract class constructors (#60302)
fixes #59180

PR Close #60302
2025-03-10 16:05:03 -07:00
Matthieu Riegler
31bbbe9665 docs(docs-infra): Throw error at build time for invalid links (#59162)
PR Close #59162
2025-03-04 20:07:24 +00:00
hawkgs
1c31c0d141 docs(docs-infra): API doc content rendering fixes (#60116)
The PR introduces a few doc content rendering fixes:
- Fix highlighted section heading styles (regression from #59965).
- Convert JSDoc links within 'Usage Notes' sections to HTML and render them.
- Add IDs to doc content headings. This, by itself, makes these headings available in the page ToC.

PR Close #60116
2025-03-04 17:46:31 +00:00
Miles Malerba
c615bdcde9 docs(docs-infra): Improve support for @link within the jsdoc. (#60201)
PR Close #60201
2025-03-04 17:13:43 +00:00
Matthieu Riegler
1149686da5 docs(docs-infra): hide github link for external repos. (#60114)
fixes #60113

PR Close #60114
2025-03-04 17:02:37 +00:00
Charles Lyding
02a768e1d2 docs: use @angular/build directly in example/tutorial projects (#60046)
By using the `@angular/build` package directly within projects for each
example and tutorial, the total install size can be reduced. This lowers the amount
of time required to be spent setting up the dependencies in browser
before the example is displayed.

The `@angular/build@19.2.0-next.2` package currently has a total unpacked size of ~115 MB.
The `@angular-devkit/build-angular@19.2.0-next.2` package currently has a total unpacked size of ~291 MB.

This also removes the now unneeded `NG_BUILD_PARALLEL_TS=0` environment variable usage.

PR Close #60046
2025-02-24 10:14:18 -05:00
hawkgs
ea5b7371e5 docs(docs-infra): fix card highlighting in the API reference details page (#59965)
Drop `pointer-events: none` and update the member card highlighting mechanism.

PR Close #59965
2025-02-18 14:56:48 +00:00
Matthieu Riegler
c3e95ef1d5 docs(docs-infra): attemp to fix flaky mermaid test (#59994)
This test has 2 async parts, loading the markdown file and the marked parsing.
First attempt to fix the flakiness is by inline the markdown file.

If this test timeouts again in the future it means the timeout is related to marked itself (and the dynamic import of mermaid).

PR Close #59994
2025-02-18 14:55:49 +00:00
hawkgs
b6733eeea4 docs(docs-infra): drop tabs layout from the API reference details page (#59068)
Drop the tabs in favor of a single page separated by sections.

PR Close #59068
2025-02-13 14:58:33 +00:00
Matthieu Riegler
0d88463a66 docs(docs-infra): inline example in description (#59908)
fixes #59905

PR Close #59908
2025-02-12 09:21:49 -08:00
Matthieu Riegler
e4dd1773db docs: update examples to the application builder (#59539)
fixes #59538

PR Close #59539
2025-01-16 08:08:36 -08:00
hawkgs
220608e4cc docs(docs-infra): generate errors and extended-diagnostics route NavigationItem-s (#59355)
Generate the `NavigationItem`-s as part of adev/shared-docs pipeline and use the output JSON files instead of the hardcoded objects in the `sub-navigation-data.ts`.

PR Close #59355
2025-01-14 11:00:06 -05:00
Matthieu Riegler
fd073004bb docs(docs-infra): fix entry labels. (#59384)
fixes #59382

PR Close #59384
2025-01-08 15:22:43 +00:00
RafaelJCamara
fabd642826 docs: update README to reflect correct Angular repository branch in rendering regions (#59421)
PR Close #59421
2025-01-08 15:22:07 +00:00
Matthieu Riegler
139f61913c docs: remove data attributes from api-item-label (#59273)
Perf measurments have revealed that `data-*` attributes are slower to set than classes.

PR Close #59273
2025-01-06 16:03:42 +00:00
Matthieu Riegler
cf27cbb1f8 docs(docs-infra): remove costly localeCompare (#59106)
This function wasn't necessary, the items where already sorted.

fixes #59069d

PR Close #59106
2024-12-16 15:18:39 -08:00
Matthieu Riegler
f15ccb94b9 docs(docs-infra): enable tslint (#58961)
PR Close #58961
2024-12-05 16:03:35 -08:00
hawkgs
77a0ee85c1 feat(docs-infra): use angular-ts and angular-html shiki highlighting (#59004)
Use `angular-ts` instead of `typescript` and `angular-html` instead of `html`.

PR Close #59004
2024-12-04 18:05:59 +01:00
hawkgs
0a399e7f9c refactor(docs-infra): update comments (#59004)
Add missing file header comments and update others.

PR Close #59004
2024-12-04 18:05:59 +01:00
hawkgs
c13528b1b9 test(docs-infra): interpolation mechanism (#59004)
Test all use cases that are supported by the interpolation mechanism.

PR Close #59004
2024-12-04 18:05:58 +01:00
hawkgs
d40967c356 fix(docs-infra): minor bug fixes (#59004)
Minor bug fixes found and implemented during testing.

PR Close #59004
2024-12-04 18:05:58 +01:00
hawkgs
b97b92024d test(docs-infra): add initial test (#59004)
Setup the test suite and add the initial test.

PR Close #59004
2024-12-04 18:05:58 +01:00
hawkgs
9ca8ddb265 fix(docs-infra): markdown code block highlighting for the different file types (#59004)
Set the code block language highlighting based on the file type.

PR Close #59004
2024-12-04 18:05:58 +01:00
hawkgs
f13f52f70f feat(docs-infra): remove redundant JSDoc transform related to code examples (#59004)
The transform is no longer relevant nor it served any functional purpose.

PR Close #59004
2024-12-04 18:05:58 +01:00
hawkgs
e1009f09c0 fix(docs-infra): handle regions overlap and multiple-regions examples (#59004)
It seems that there are overlapping region markers and an example can be composed by multiple regions.

PR Close #59004
2024-12-04 18:05:58 +01:00
hawkgs
e0beb27581 fix(docs-infra): interpolation script nesting (#59004)
Add support for nested #docregion-s and modify the examples caching.

PR Close #59004
2024-12-04 18:05:58 +01:00
hawkgs
8b93e3c90d feat(docs-infra): implement interpolation script (#59004)
The script substitutes the JSDoc example tags with the respective code sample.

PR Close #59004
2024-12-04 18:05:58 +01:00
hawkgs
a4ee2d90e6 feat(docs-infra): include code examples files in the API gen (#59004)
The code examples in `package/examples` are now passed to the API JSON generator.

PR Close #59004
2024-12-04 18:05:58 +01:00
Matthieu Riegler
d0ea622040 docs(docs-infra): read jsdoctags from function overloads (#58994)
Functions like `linkedSignal` have there `@developerPreview` tags on the overload signature. This commit adds the support for them.

This commit also removes the logic for multiple entries, as now overloads are a single entry.

fixes #58817

PR Close #58994
2024-12-02 16:17:02 +01:00
kirjs
6ff53b7437 docs(docs-infra): Drop standalone: true (#58914)
This is now the default value, so safe to remove

PR Close #58914
2024-11-28 09:43:28 +01:00
Paul Gschwendtner
0ce15c6b5e docs: update tutorials and playground to v19.0.0 (#58742)
Updates boilerplate for tutorial and playground to use v19

PR Close #58742
2024-11-19 17:26:47 +00:00
Alan Agius
c2a9b75045 fix(docs-infra): retain function keyword in API definitions (#58561)
**Before:**
```ts
animate(
  timings: string | number,
  styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null
): AnimationAnimateMetadata;
```

**Now:**
```ts
function animate(
  timings: string | number,
  styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null
): AnimationAnimateMetadata;
```

PR Close #58561
2024-11-08 17:16:04 +00:00
Alan Agius
d271c4422a fix(compiler-cli): correct extraction of generics from type aliases (#58548)
**Before:**
```ts
type HttpEvent = | HttpSentEvent
  | HttpHeaderResponse
  | HttpResponse<T>
  | HttpProgressEvent
  | HttpUserEvent<T>
```

**After:**
```ts
type HttpEvent<T> = | HttpSentEvent
  | HttpHeaderResponse
  | HttpResponse<T>
  | HttpProgressEvent
  | HttpUserEvent<T>
```

PR Close #58548
2024-11-08 17:15:06 +00:00
Alan Agius
c95aca1f17 docs(docs-infra): update default generic values and add constraints for type parameters in functions (#58548)
Before
```typescript
createNodeRequestHandler(
  handler: T
): T;
```

```typescript
class NgIf<T> {
  @Input() set ngIf(value: T);
  @Input() set ngIfThen(value: TemplateRef<NgIfContext<T>> | null);
  @Input() set ngIfElse(value: TemplateRef<NgIfContext<T>> | null);
  static ngTemplateGuard_ngIf: "binding";
  static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): boolean;
}
```

Now
```typescript
createNodeRequestHandler<T extends NodeRequestHandlerFunction>(
  handler: T
): T;
```

```typescript
class NgIf<T = unknown> {
  @Input() set ngIf(value: T);
  @Input() set ngIfThen(value: TemplateRef<NgIfContext<T>> | null);
  @Input() set ngIfElse(value: TemplateRef<NgIfContext<T>> | null);
  static ngTemplateGuard_ngIf: "binding";
  static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): boolean;
}
```

PR Close #58548
2024-11-08 17:15:06 +00:00
Alan Agius
3ecf0f6701 docs: add hybrid rendering API guide (#58445)
This commit introduces a new guide for hybrid rendering APIs, which are currently in developer preview. This documentation provides insights into the usage and features of the APIs, helping developers understand their capabilities and limitations during the preview phase.

PR Close #58445
2024-11-07 21:28:54 +00:00
Alan Agius
c5ce302e0b docs(docs-infra): add support for @remarks (#58523)
In TSDoc, we currently handle the `@usageNotes` annotation, but this is not a standard TSDoc tag. Instead, the `@remarks` annotation is the correct standard, which is used in the Angular CLI repo and on the SSR package.

This change ensures that `@remarks` is treated the same as `@usageNotes` during the transform process.

PR Close #58523
2024-11-07 15:49:13 +00:00
Matthieu Riegler
c1aa9c6041 docs(docs-infra): fix CLI commands (#58294)
With this commit the CLI doc will display the correct arguments for the subcommands

fixes #58279

PR Close #58294
2024-10-22 07:42:21 -07:00