@taiga-ui/addon-doc 2.24.0 → 2.27.1

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 (82) hide show
  1. package/README.md +121 -121
  2. package/bundles/taiga-ui-addon-doc.umd.js +935 -935
  3. package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
  4. package/bundles/taiga-ui-addon-doc.umd.min.js +2 -2
  5. package/bundles/taiga-ui-addon-doc.umd.min.js.map +1 -1
  6. package/components/code/code.component.d.ts +1 -1
  7. package/components/demo/demo.component.d.ts +8 -8
  8. package/components/documentation/documentation-property-connector.directive.d.ts +1 -1
  9. package/components/navigation/navigation.component.d.ts +1 -1
  10. package/components/page/page.component.d.ts +1 -1
  11. package/esm2015/addon-doc.module.js +1 -1
  12. package/esm2015/components/code/code.component.js +2 -2
  13. package/esm2015/components/code/code.module.js +1 -1
  14. package/esm2015/components/copy/copy.module.js +1 -1
  15. package/esm2015/components/demo/demo.component.js +12 -12
  16. package/esm2015/components/demo/demo.module.js +1 -1
  17. package/esm2015/components/documentation/documentation-property-connector.directive.js +6 -6
  18. package/esm2015/components/documentation/documentation.component.js +2 -2
  19. package/esm2015/components/documentation/documentation.module.js +2 -2
  20. package/esm2015/components/example/example.component.js +1 -1
  21. package/esm2015/components/example/example.module.js +2 -2
  22. package/esm2015/components/main/main.module.js +1 -1
  23. package/esm2015/components/navigation/navigation.component.js +2 -2
  24. package/esm2015/components/navigation/navigation.module.js +1 -1
  25. package/esm2015/components/navigation/navigation.providers.js +1 -1
  26. package/esm2015/components/page/page.component.js +3 -3
  27. package/esm2015/components/page/page.module.js +2 -2
  28. package/esm2015/components/page/page.providers.js +1 -1
  29. package/esm2015/directives/scroll-into-view/scroll-into-view.module.js +1 -1
  30. package/esm2015/internal/header/header.component.js +1 -1
  31. package/esm2015/internal/header/header.module.js +1 -1
  32. package/esm2015/internal/input-opacity/input-opacity.module.js +1 -1
  33. package/esm2015/internal/see-also/see-also.component.js +1 -1
  34. package/esm2015/internal/see-also/see-also.module.js +1 -1
  35. package/esm2015/internal/source-code/source-code.component.js +1 -1
  36. package/esm2015/internal/source-code/source-code.module.js +1 -1
  37. package/esm2015/languages/russian.js +1 -1
  38. package/esm2015/public-api.js +5 -5
  39. package/esm2015/taiga-ui-addon-doc.js +6 -6
  40. package/esm2015/tokens/code-editor.js +1 -1
  41. package/esm2015/tokens/pages.js +1 -1
  42. package/esm2015/tokens/source-code.js +1 -1
  43. package/esm5/addon-doc.module.js +1 -1
  44. package/esm5/components/code/code.component.js +2 -2
  45. package/esm5/components/code/code.module.js +1 -1
  46. package/esm5/components/copy/copy.module.js +1 -1
  47. package/esm5/components/demo/demo.component.js +12 -12
  48. package/esm5/components/demo/demo.module.js +1 -1
  49. package/esm5/components/documentation/documentation-property-connector.directive.js +6 -6
  50. package/esm5/components/documentation/documentation.component.js +2 -2
  51. package/esm5/components/documentation/documentation.module.js +2 -2
  52. package/esm5/components/example/example.component.js +1 -1
  53. package/esm5/components/example/example.module.js +2 -2
  54. package/esm5/components/main/main.module.js +1 -1
  55. package/esm5/components/navigation/navigation.component.js +2 -2
  56. package/esm5/components/navigation/navigation.module.js +1 -1
  57. package/esm5/components/navigation/navigation.providers.js +1 -1
  58. package/esm5/components/page/page.component.js +3 -3
  59. package/esm5/components/page/page.module.js +2 -2
  60. package/esm5/components/page/page.providers.js +1 -1
  61. package/esm5/directives/scroll-into-view/scroll-into-view.module.js +1 -1
  62. package/esm5/internal/header/header.component.js +1 -1
  63. package/esm5/internal/header/header.module.js +1 -1
  64. package/esm5/internal/input-opacity/input-opacity.module.js +1 -1
  65. package/esm5/internal/see-also/see-also.component.js +1 -1
  66. package/esm5/internal/see-also/see-also.module.js +1 -1
  67. package/esm5/internal/source-code/source-code.component.js +1 -1
  68. package/esm5/internal/source-code/source-code.module.js +1 -1
  69. package/esm5/languages/russian.js +1 -1
  70. package/esm5/public-api.js +5 -5
  71. package/esm5/taiga-ui-addon-doc.js +6 -6
  72. package/esm5/tokens/code-editor.js +1 -1
  73. package/esm5/tokens/pages.js +1 -1
  74. package/esm5/tokens/source-code.js +1 -1
  75. package/fesm2015/taiga-ui-addon-doc.js +561 -561
  76. package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
  77. package/fesm5/taiga-ui-addon-doc.js +927 -927
  78. package/fesm5/taiga-ui-addon-doc.js.map +1 -1
  79. package/package.json +6 -5
  80. package/public-api.d.ts +4 -4
  81. package/taiga-ui-addon-doc.d.ts +5 -5
  82. package/taiga-ui-addon-doc.metadata.json +1 -1
package/README.md CHANGED
@@ -26,142 +26,142 @@ npm i @taiga-ui/addon-doc
26
26
 
27
27
  1. Include `TuiDocMainModule` in your App module and use in your template:
28
28
 
29
- ```html
30
- <tui-doc-main>You can add content here, it will be shown below navigation in the sidebar</tui-doc-main>
31
- ```
29
+ ```html
30
+ <tui-doc-main>You can add content here, it will be shown below navigation in the sidebar</tui-doc-main>
31
+ ```
32
32
 
33
33
  2. Configure languages to highlight in your main module:
34
34
 
35
- ```typescript
36
- import {NgModule} from '@angular/core';
37
- import {TuiDocMainModule} from '@taiga-ui/addon-doc';
38
- import {hljsLanguages} from './hljsLanguages';
39
- import {HIGHLIGHT_OPTIONS, HighlightLanguage} from 'ngx-highlightjs';
40
- import {AppComponent} from './app.component';
41
-
42
- @NgModule({
43
- bootstrap: [AppComponent],
44
- imports: [TuiDocMainModule],
45
- declarations: [AppComponent],
46
- providers: [
47
- {
48
- provide: HIGHLIGHT_OPTIONS,
49
- useValue: {
50
- coreLibraryLoader: () => import('highlight.js/lib/core' as string),
51
- lineNumbersLoader: () => import('highlightjs-line-numbers.js' as string), // Optional, only if you want the line numbers
52
- languages: {
53
- typescript: () => import('highlight.js/lib/languages/typescript' as string),
54
- less: () => import('highlight.js/lib/languages/less' as string),
55
- xml: () => import('highlight.js/lib/languages/xml' as string),
56
- },
57
- },
58
- },
59
- ],
60
- })
61
- export class AppBrowserModule {}
62
- ```
35
+ ```typescript
36
+ import {NgModule} from '@angular/core';
37
+ import {TuiDocMainModule} from '@taiga-ui/addon-doc';
38
+ import {hljsLanguages} from './hljsLanguages';
39
+ import {HIGHLIGHT_OPTIONS, HighlightLanguage} from 'ngx-highlightjs';
40
+ import {AppComponent} from './app.component';
41
+
42
+ @NgModule({
43
+ bootstrap: [AppComponent],
44
+ imports: [TuiDocMainModule],
45
+ declarations: [AppComponent],
46
+ providers: [
47
+ {
48
+ provide: HIGHLIGHT_OPTIONS,
49
+ useValue: {
50
+ coreLibraryLoader: () => import('highlight.js/lib/core' as string),
51
+ lineNumbersLoader: () => import('highlightjs-line-numbers.js' as string), // Optional, only if you want the line numbers
52
+ languages: {
53
+ typescript: () => import('highlight.js/lib/languages/typescript' as string),
54
+ less: () => import('highlight.js/lib/languages/less' as string),
55
+ xml: () => import('highlight.js/lib/languages/xml' as string),
56
+ },
57
+ },
58
+ },
59
+ ],
60
+ })
61
+ export class AppBrowserModule {}
62
+ ```
63
63
 
64
64
  3. Configure documentation providers:
65
65
 
66
- `TUI_DOC_PAGES` — an array of pages, see `TuiDocPages` type
66
+ `TUI_DOC_PAGES` — an array of pages, see `TuiDocPages` type
67
67
 
68
- `TUI_DOC_LOGO` — an src for the SVG logo in the sidebar
68
+ `TUI_DOC_LOGO` — an src for the SVG logo in the sidebar
69
69
 
70
- `TUI_DOC_DEFAULT_TABS` — an array of default named for tabs on your typical page
70
+ `TUI_DOC_DEFAULT_TABS` — an array of default named for tabs on your typical page
71
71
 
72
- `TUI_DOC_TITLE` — a title prefix for the browser tab
72
+ `TUI_DOC_TITLE` — a title prefix for the browser tab
73
73
 
74
- `TUI_DOC_SEE_ALSO` — a two dimensional array of related pages by their titles
74
+ `TUI_DOC_SEE_ALSO` — a two dimensional array of related pages by their titles
75
75
 
76
76
  4. Configure routing:
77
77
 
78
- ```typescript
79
- import {Routes} from '@angular/router';
78
+ ```typescript
79
+ import {Routes} from '@angular/router';
80
80
 
81
- const appRoutes: Routes = [
82
- {
83
- path: 'super-page',
84
- loadChildren: '../super-page/super-page.module#SuperModule',
85
- data: {
86
- title: 'Super Page',
87
- },
88
- },
89
- // ...
90
- ];
91
- ```
81
+ const appRoutes: Routes = [
82
+ {
83
+ path: 'super-page',
84
+ loadChildren: '../super-page/super-page.module#SuperModule',
85
+ data: {
86
+ title: 'Super Page',
87
+ },
88
+ },
89
+ // ...
90
+ ];
91
+ ```
92
92
 
93
- > You must have title in route data in order for `TUI_DOC_SEE_ALSO` to work. It would also be automatically added to
94
- > `TUI_DOC_TITLE` for browser tab title when navigating to that route.
93
+ > You must have title in route data in order for `TUI_DOC_SEE_ALSO` to work. It would also be automatically added to
94
+ > `TUI_DOC_TITLE` for browser tab title when navigating to that route.
95
95
 
96
96
  5. Create pages.
97
97
 
98
- _Module:_
99
-
100
- ```typescript
101
- import {NgModule} from '@angular/core';
102
- import {RouterModule} from '@angular/router';
103
- import {generateRoutes, TuiAddonDocModule} from '@taiga-ui/addon-doc';
104
- import {SuperComponent} from './super.component';
105
-
106
- @NgModule({
107
- imports: [TuiAddonDocModule, RouterModule.forChild(generateRoutes(SuperComponent))],
108
- declarations: [SuperComponent],
109
- exports: [SuperComponent],
110
- })
111
- export class SuperModule {}
112
- ```
113
-
114
- _Component:_
115
-
116
- ```typescript
117
- import {Component} from '@angular/core';
118
-
119
- import {default as exampleHtml} from '!!raw-loader!./examples/1/index.html';
120
- import {default as exampleTs} from '!!raw-loader!./examples/1/index.ts';
121
-
122
- @Component({
123
- selector: 'super-component',
124
- templateUrl: './account.template.html',
125
- })
126
- export class SuperComponent {
127
- // Keys would be used as tabs for code example
128
- readonly example = {
129
- TypeScript: exampleTs,
130
- HTML: exampleHtml,
131
- };
132
-
133
- readonly inputVariants = ['input 1', 'input 2'];
134
- }
135
- ```
136
-
137
- _Template:_
138
-
139
- ```html
140
- <tui-doc-page header="Super" package="SUPER-PACKAGE" deprecated>
141
- <ng-template pageTab>
142
- <!-- default tab name would be used -->
143
- This would be the content of a first tab
144
-
145
- <tui-doc-example id="basic-example" heading="Example of usage" [content]="example">
146
- <example-1></example-1>
147
- </tui-doc-example>
148
- </ng-template>
149
-
150
- <ng-template pageTab="Documentation">
151
- <tui-doc-demo>
152
- <super-component [input]="input"></super-component>
153
- </tui-doc-demo>
154
- <tui-doc-documentation>
155
- <ng-template
156
- documentationPropertyName="input"
157
- documentationPropertyMode="input"
158
- documentationPropertyType="T"
159
- [documentationPropertyValues]="inputVariants"
160
- [(documentationPropertyValue)]="input"
161
- >
162
- Some input
163
- </ng-template>
164
- </tui-doc-documentation>
165
- </ng-template>
166
- </tui-doc-page>
167
- ```
98
+ _Module:_
99
+
100
+ ```typescript
101
+ import {NgModule} from '@angular/core';
102
+ import {RouterModule} from '@angular/router';
103
+ import {generateRoutes, TuiAddonDocModule} from '@taiga-ui/addon-doc';
104
+ import {SuperComponent} from './super.component';
105
+
106
+ @NgModule({
107
+ imports: [TuiAddonDocModule, RouterModule.forChild(generateRoutes(SuperComponent))],
108
+ declarations: [SuperComponent],
109
+ exports: [SuperComponent],
110
+ })
111
+ export class SuperModule {}
112
+ ```
113
+
114
+ _Component:_
115
+
116
+ ```typescript
117
+ import {Component} from '@angular/core';
118
+
119
+ import {default as exampleHtml} from '!!raw-loader!./examples/1/index.html';
120
+ import {default as exampleTs} from '!!raw-loader!./examples/1/index.ts';
121
+
122
+ @Component({
123
+ selector: 'super-component',
124
+ templateUrl: './account.template.html',
125
+ })
126
+ export class SuperComponent {
127
+ // Keys would be used as tabs for code example
128
+ readonly example = {
129
+ TypeScript: exampleTs,
130
+ HTML: exampleHtml,
131
+ };
132
+
133
+ readonly inputVariants = ['input 1', 'input 2'];
134
+ }
135
+ ```
136
+
137
+ _Template:_
138
+
139
+ ```html
140
+ <tui-doc-page header="Super" package="SUPER-PACKAGE" deprecated>
141
+ <ng-template pageTab>
142
+ <!-- default tab name would be used -->
143
+ This would be the content of a first tab
144
+
145
+ <tui-doc-example id="basic-example" heading="Example of usage" [content]="example">
146
+ <example-1></example-1>
147
+ </tui-doc-example>
148
+ </ng-template>
149
+
150
+ <ng-template pageTab="Documentation">
151
+ <tui-doc-demo>
152
+ <super-component [input]="input"></super-component>
153
+ </tui-doc-demo>
154
+ <tui-doc-documentation>
155
+ <ng-template
156
+ documentationPropertyName="input"
157
+ documentationPropertyMode="input"
158
+ documentationPropertyType="T"
159
+ [documentationPropertyValues]="inputVariants"
160
+ [(documentationPropertyValue)]="input"
161
+ >
162
+ Some input
163
+ </ng-template>
164
+ </tui-doc-documentation>
165
+ </ng-template>
166
+ </tui-doc-page>
167
+ ```