@taiga-ui/addon-doc 4.52.0-canary.a4e325d → 4.52.0-canary.bf9131e

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/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  Install main packages:
12
12
 
13
13
  ```
14
- npm i @taiga-ui/{cdk,core,kit,addon-mobile}
14
+ npm i @taiga-ui/{cdk,core,kit}
15
15
  ```
16
16
 
17
17
  Install doc:
@@ -24,24 +24,22 @@ npm i @taiga-ui/addon-doc
24
24
 
25
25
  > You can also see [community made guide](https://habr.com/ru/company/europlan/blog/559804/) in Russian
26
26
 
27
- 1. Include `TuiDocMainModule` in your App module and use in your template:
27
+ 1. Include `TuiDocMain` in your App imports and use in your template:
28
28
 
29
29
  ```html
30
30
  <tui-doc-main>You can add content here, it will be shown below navigation in the sidebar</tui-doc-main>
31
31
  ```
32
32
 
33
- 2. Configure languages to highlight in your main module:
33
+ 2. Configure languages to highlight in your root providers:
34
34
 
35
35
  ```typescript
36
36
  import {Component} from '@angular/core';
37
- import {TuiDocMainModule} from '@taiga-ui/addon-doc';
38
- import {hljsLanguages} from './hljsLanguages';
39
- import {HIGHLIGHT_OPTIONS, HighlightLanguage} from 'ngx-highlightjs';
37
+ import {TuiDocMain} from '@taiga-ui/addon-doc';
38
+ import {HIGHLIGHT_OPTIONS} from 'ngx-highlightjs';
40
39
  import {App} from './app.component';
41
40
 
42
41
  @Component({
43
- standalone: true,
44
- imports: [TuiDocMainModule],
42
+ imports: [TuiDocMain],
45
43
  providers: [
46
44
  {
47
45
  provide: HIGHLIGHT_OPTIONS,
@@ -81,10 +79,10 @@ npm i @taiga-ui/addon-doc
81
79
 
82
80
  const appRoutes: Routes = [
83
81
  {
84
- path: 'super-page',
85
- loadChildren: async () => (await import('../super-page/super-page.module')).SuperModule,
82
+ path: 'doc-page-1',
83
+ loadComponent: async () => (await import('../doc-page-1')).DocPage,
86
84
  data: {
87
- title: 'Super Page',
85
+ title: 'Documentation page #1',
88
86
  },
89
87
  },
90
88
  // ...
@@ -96,42 +94,34 @@ npm i @taiga-ui/addon-doc
96
94
 
97
95
  5. Create pages.
98
96
 
99
- _Module:_
100
-
101
- ```ts
102
- import {TuiAddonDoc} from '@taiga-ui/addon-doc';
103
-
104
- @Component({
105
- standalone: true,
106
- imports: [TuiAddonDoc, SuperComponent],
107
- })
108
- export class App {}
109
- ```
110
-
111
97
  _Component:_
112
98
 
113
99
  ```ts
114
100
  // ..
115
101
 
116
102
  @Component({
117
- standalone: true,
118
- selector: 'super',
103
+ selector: 'first-doc-page',
119
104
  templateUrl: './super.component.html',
105
+ imports: [TuiAddonDoc],
120
106
  })
121
- export class Super {
107
+ export class DocPage {
122
108
  // Keys would be used as tabs for code example
123
109
  readonly example = {
124
110
  // import a file as a string
125
- TypeScript: import('./examples/1/index.ts?raw'),
126
- HTML: import('./examples/1/index.html?raw'),
111
+ TypeScript: import('./examples/1/index.ts?raw', {with: {loader: 'text'}}),
112
+ HTML: import('./examples/1/index.html', {with: {loader: 'text'}}),
113
+ LESS: '.box { color: red }',
127
114
  };
128
115
 
129
116
  readonly inputVariants = ['input 1', 'input 2'];
130
117
  }
131
118
  ```
132
119
 
133
- > You can use any tool to import a file as a string. For example, you can use
134
- > [Webpack Asset Modules](https://webpack.js.org/guides/asset-modules/).
120
+ > You can use any tool to import a file as a string. For example, you can use:
121
+ >
122
+ > - [Esbuild loaders](https://angular.dev/tools/cli/build-system-migration#file-extension-loader-customization)
123
+ > (recommended)
124
+ > - [Webpack Asset Modules](https://webpack.js.org/guides/asset-modules)
135
125
 
136
126
  _Template:_
137
127
 
@@ -139,7 +129,6 @@ npm i @taiga-ui/addon-doc
139
129
  <tui-doc-page
140
130
  header="Super"
141
131
  package="SUPER-PACKAGE"
142
- deprecated
143
132
  >
144
133
  <ng-template pageTab>
145
134
  <!-- default tab name would be used -->
@@ -158,17 +147,18 @@ npm i @taiga-ui/addon-doc
158
147
  <tui-doc-demo>
159
148
  <super-component [input]="input"></super-component>
160
149
  </tui-doc-demo>
161
- <tui-doc-documentation>
162
- <ng-template
163
- documentationPropertyName="input"
164
- documentationPropertyMode="input"
165
- documentationPropertyType="T"
166
- [documentationPropertyValues]="inputVariants"
167
- [(documentationPropertyValue)]="input"
150
+
151
+ <table tuiDocAPI>
152
+ <tr
153
+ name="[input]"
154
+ tuiDocAPIItem
155
+ type="T"
156
+ [items]="inputVariants"
157
+ [(value)]="input"
168
158
  >
169
- Some input
170
- </ng-template>
171
- </tui-doc-documentation>
159
+ Some input description
160
+ </tr>
161
+ </table>
172
162
  </ng-template>
173
163
  </tui-doc-page>
174
164
  ```
@@ -5,10 +5,11 @@ import * as i0 from "@angular/core";
5
5
  export declare class TuiDocCode {
6
6
  private readonly icons;
7
7
  private readonly rawLoader$$;
8
+ private readonly texts;
8
9
  protected readonly isServer: boolean;
9
10
  protected readonly markdownCodeProcessor: TuiHandler<string, readonly string[]>;
10
11
  protected readonly copy$: Subject<void>;
11
- protected readonly copyText: import("@angular/core").Signal<string | undefined>;
12
+ protected readonly copyText: import("@angular/core").Signal<string>;
12
13
  protected readonly icon: import("@angular/core").Signal<string>;
13
14
  protected readonly processor: import("@angular/core").Signal<readonly string[] | readonly []>;
14
15
  filename: string;
@@ -1,7 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class TuiDocCopy {
3
3
  private readonly copy$;
4
- protected readonly texts: import("@angular/core").Signal<readonly [copy: string, copied: string] | readonly ["", ""]>;
4
+ protected readonly texts: import("@angular/core").Signal<readonly [copy: string, copied: string]>;
5
5
  protected readonly copied: import("@angular/core").Signal<boolean>;
6
6
  protected onClick(): void;
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiDocCopy, never>;
@@ -8,7 +8,7 @@ export declare class TuiDocExample {
8
8
  private readonly clipboard;
9
9
  private readonly alerts;
10
10
  private readonly location;
11
- private readonly copyTexts$;
11
+ private readonly copyTexts;
12
12
  private readonly processContent;
13
13
  private readonly rawLoader$$;
14
14
  protected readonly fullscreenEnabled: boolean;
@@ -1,13 +1,12 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class TuiDocHeader {
3
- private readonly stream$;
4
3
  private readonly router;
4
+ private readonly routeEvents;
5
5
  protected readonly icons: import("@taiga-ui/addon-doc/tokens").TuiDocIcons;
6
6
  protected readonly logo: import("@taiga-ui/polymorpheus").PolymorpheusContent;
7
7
  protected readonly menu: string;
8
- protected readonly open: import("@angular/core").Signal<boolean>;
9
- protected onClick(): void;
10
- protected onActiveZone(active: boolean): void;
8
+ protected readonly open: import("@angular/core").WritableSignal<boolean>;
9
+ constructor();
11
10
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiDocHeader, never>;
12
11
  static ɵcmp: i0.ɵɵComponentDeclaration<TuiDocHeader, "header[tuiDocHeader]", never, {}, {}, never, ["*"], true, never>;
13
12
  }
@@ -6,9 +6,8 @@ export declare class TuiDocMain {
6
6
  protected readonly darkMode: import("@angular/core").WritableSignal<boolean> & {
7
7
  reset(): void;
8
8
  };
9
- protected readonly theme: import("@angular/core").Signal<"dark" | null>;
10
9
  protected readonly icon: import("@angular/core").Signal<string>;
11
10
  changeTextDirection(): void;
12
11
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiDocMain, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiDocMain, "tui-doc-main", never, {}, {}, never, ["tuiDocNavigation", "tuiDocHeader", "tuiOverContent", "tuiOverDialogs", "tuiOverAlerts", "tuiOverDropdowns", "tuiOverHints"], true, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<TuiDocMain, "tui-doc-main", never, {}, {}, never, ["tuiDocNavigation", "tuiDocHeader", "tuiOverContent"], true, never>;
14
13
  }
@@ -1,6 +1,6 @@
1
1
  import { FormControl } from '@angular/forms';
2
2
  import { type TuiDocRoutePage, type TuiDocRoutePages } from '@taiga-ui/addon-doc/types';
3
- import { TuiSidebarDirective } from '@taiga-ui/addon-mobile/directives/sidebar';
3
+ import { TuiDrawer } from '@taiga-ui/kit/components/drawer';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class TuiDocNavigation {
6
6
  private readonly searchInput?;
@@ -8,7 +8,7 @@ export declare class TuiDocNavigation {
8
8
  private readonly doc;
9
9
  protected open: import("@angular/core").WritableSignal<boolean>;
10
10
  protected menuOpen: boolean;
11
- protected readonly sidebar: TuiSidebarDirective<any> | null;
11
+ protected readonly drawer: TuiDrawer | null;
12
12
  protected readonly labels: readonly string[];
13
13
  protected readonly items: readonly TuiDocRoutePages[];
14
14
  protected readonly searchText: string;