@taiga-ui/addon-doc 3.19.0-dev.main-99a25b1 → 3.19.0-dev.main-9344af8

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 (37) hide show
  1. package/bundles/taiga-ui-addon-doc.umd.js +82 -25
  2. package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
  3. package/components/example/example-options.d.ts +3 -0
  4. package/components/navigation/navigation.providers.d.ts +9 -0
  5. package/components/page/page.providers.d.ts +3 -0
  6. package/esm2015/components/example/example-options.js +5 -2
  7. package/esm2015/components/navigation/navigation.providers.js +13 -4
  8. package/esm2015/components/page/page.providers.js +5 -2
  9. package/esm2015/tokens/code-actions.js +5 -2
  10. package/esm2015/tokens/code-editor.js +5 -2
  11. package/esm2015/tokens/default-tabs.js +5 -2
  12. package/esm2015/tokens/example-content-processor.js +9 -3
  13. package/esm2015/tokens/excluded-properties.js +5 -2
  14. package/esm2015/tokens/i18n.js +11 -8
  15. package/esm2015/tokens/logo.js +5 -2
  16. package/esm2015/tokens/page-loaded.js +5 -2
  17. package/esm2015/tokens/pages.js +5 -2
  18. package/esm2015/tokens/scroll-behavior.js +5 -2
  19. package/esm2015/tokens/see-also.js +5 -2
  20. package/esm2015/tokens/source-code.js +5 -2
  21. package/esm2015/tokens/title.js +5 -2
  22. package/fesm2015/taiga-ui-addon-doc.js +82 -25
  23. package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
  24. package/package.json +1 -1
  25. package/tokens/code-actions.d.ts +3 -0
  26. package/tokens/code-editor.d.ts +3 -0
  27. package/tokens/default-tabs.d.ts +3 -0
  28. package/tokens/example-content-processor.d.ts +6 -0
  29. package/tokens/excluded-properties.d.ts +3 -0
  30. package/tokens/i18n.d.ts +3 -0
  31. package/tokens/logo.d.ts +3 -0
  32. package/tokens/page-loaded.d.ts +3 -0
  33. package/tokens/pages.d.ts +3 -0
  34. package/tokens/scroll-behavior.d.ts +3 -0
  35. package/tokens/see-also.d.ts +3 -0
  36. package/tokens/source-code.d.ts +3 -0
  37. package/tokens/title.d.ts +3 -0
@@ -40,10 +40,16 @@ function tuiTryParseMarkdownCodeBlock(text = ``) {
40
40
  return result.length ? result : [text];
41
41
  }
42
42
 
43
- const TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken(`[TUI_DOC_EXAMPLE_CONTENT_PROCESSOR]: Processes content in example`, {
43
+ /**
44
+ * Processes content in example
45
+ */
46
+ const TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken(`[TUI_DOC_EXAMPLE_CONTENT_PROCESSOR]`, {
44
47
  factory: () => identity,
45
48
  });
46
- const TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR = new InjectionToken(`[TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR]: Processes markdown in code block`, {
49
+ /**
50
+ * Processes markdown in code block
51
+ */
52
+ const TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR = new InjectionToken(`[TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR]`, {
47
53
  factory: () => tuiTryParseMarkdownCodeBlock,
48
54
  });
49
55
 
@@ -153,13 +159,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
153
159
  * TODO: think about reorganization in @taiga-ui/i18n way
154
160
  */
155
161
  /**
162
+ * tui-doc-demo i18n texts
156
163
  * Works with a tuple
157
164
  * [@string tuiMode tooltip content, @string word 'background', @string 'form value']
158
165
  */
159
- const TUI_DOC_DEMO_TEXTS = new InjectionToken(`[TUI_DOC_DEMO_TEXTS]: tui-doc-demo i18n texts`, {
166
+ const TUI_DOC_DEMO_TEXTS = new InjectionToken(`[TUI_DOC_DEMO_TEXTS]`, {
160
167
  factory: () => [`Read more more about modes: `, `Background`, `Form value`],
161
168
  });
162
169
  /**
170
+ * tui-doc-documentation i18n texts
163
171
  * Works with a tuple
164
172
  * [
165
173
  * @string word 'argument',
@@ -169,7 +177,7 @@ const TUI_DOC_DEMO_TEXTS = new InjectionToken(`[TUI_DOC_DEMO_TEXTS]: tui-doc-dem
169
177
  * @string message for tooltip about ng-polymorpheus
170
178
  * ]
171
179
  */
172
- const TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken(`[TUI_DOC_DOCUMENTATION_TEXTS]: tui-doc-documentation i18n texts`, {
180
+ const TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken(`[TUI_DOC_DOCUMENTATION_TEXTS]`, {
173
181
  factory: () => [
174
182
  `Argument`,
175
183
  `Type`,
@@ -179,6 +187,7 @@ const TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken(`[TUI_DOC_DOCUMENTATION_T
179
187
  ],
180
188
  });
181
189
  /**
190
+ * tui-doc-example i18n texts
182
191
  * Works with a tuple
183
192
  * [
184
193
  * @string default tab name,
@@ -186,19 +195,19 @@ const TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken(`[TUI_DOC_DOCUMENTATION_T
186
195
  * @string link to a sample copied message label
187
196
  * ]
188
197
  */
189
- const TUI_DOC_EXAMPLE_TEXTS = new InjectionToken(`[TUI_DOC_EXAMPLE_TEXTS]: tui-doc-example i18n texts`, {
198
+ const TUI_DOC_EXAMPLE_TEXTS = new InjectionToken(`[TUI_DOC_EXAMPLE_TEXTS]`, {
190
199
  factory: () => [`Preview`, `Link to a sample was successfully copied`, `Done`],
191
200
  });
192
- const TUI_DOC_MENU_TEXT = new InjectionToken(`[TUI_DOC_MENU_TEXT]: menu i18n text`, {
201
+ const TUI_DOC_MENU_TEXT = new InjectionToken(`[TUI_DOC_MENU_TEXT]`, {
193
202
  factory: () => `Menu`,
194
203
  });
195
- const TUI_DOC_SEARCH_TEXT = new InjectionToken(`[TUI_DOC_SEARCH_TEXT]: search i18n text`, {
204
+ const TUI_DOC_SEARCH_TEXT = new InjectionToken(`[TUI_DOC_SEARCH_TEXT]`, {
196
205
  factory: () => `Search`,
197
206
  });
198
- const TUI_DOC_SEE_ALSO_TEXT = new InjectionToken(`[TUI_DOC_SEE_ALSO_TEXT]: tui-doc-see-also i18n text`, {
207
+ const TUI_DOC_SEE_ALSO_TEXT = new InjectionToken(`[TUI_DOC_SEE_ALSO_TEXT]`, {
199
208
  factory: () => `See also`,
200
209
  });
201
- const TUI_DOC_SOURCE_CODE_TEXT = new InjectionToken(`[TUI_DOC_SOURCE_CODE_TEXT]: tui-doc-source-code i18n text`, {
210
+ const TUI_DOC_SOURCE_CODE_TEXT = new InjectionToken(`[TUI_DOC_SOURCE_CODE_TEXT]`, {
202
211
  factory: () => `Source code`,
203
212
  });
204
213
 
@@ -417,7 +426,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
417
426
  }]
418
427
  }] });
419
428
 
420
- const TUI_DOC_EXCLUDED_PROPERTIES = new InjectionToken(`[TUI_DOC_EXCLUDED_PROPERTIES]: Token to exclude inherited documentation properties`, { factory: () => new Set([]) });
429
+ /**
430
+ * Token to exclude inherited documentation properties
431
+ */
432
+ const TUI_DOC_EXCLUDED_PROPERTIES = new InjectionToken(`[TUI_DOC_EXCLUDED_PROPERTIES]`, { factory: () => new Set([]) });
421
433
  function tuiDocExcludeProperties(properties) {
422
434
  return { provide: TUI_DOC_EXCLUDED_PROPERTIES, useValue: new Set(properties) };
423
435
  }
@@ -1012,11 +1024,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1012
1024
  }]
1013
1025
  }] });
1014
1026
 
1015
- const TUI_DOC_CODE_ACTIONS = new InjectionToken(`[TUI_DOC_CODE_ACTIONS]: Code actions for the opened tab with code example`, {
1027
+ /**
1028
+ * Code actions for the opened tab with code example
1029
+ */
1030
+ const TUI_DOC_CODE_ACTIONS = new InjectionToken(`[TUI_DOC_CODE_ACTIONS]`, {
1016
1031
  factory: () => ``,
1017
1032
  });
1018
1033
 
1019
- const TUI_DOC_CODE_EDITOR = new InjectionToken(`[TUI_DOC_CODE_EDITOR]: Contains service for opening online IDE e.g. Stackblitz`);
1034
+ /**
1035
+ * Service for opening online IDE e.g. Stackblitz
1036
+ */
1037
+ const TUI_DOC_CODE_EDITOR = new InjectionToken(`[TUI_DOC_CODE_EDITOR]`);
1020
1038
 
1021
1039
  function tuiRawLoadRecord(example) {
1022
1040
  return __awaiter(this, void 0, void 0, function* () {
@@ -1040,7 +1058,10 @@ const TUI_DOC_EXAMPLE_DEFAULT_OPTIONS = {
1040
1058
  codeEditorVisibilityHandler: files => Boolean(files[TUI_EXAMPLE_PRIMARY_FILE_NAME.TS] &&
1041
1059
  files[TUI_EXAMPLE_PRIMARY_FILE_NAME.HTML]),
1042
1060
  };
1043
- const TUI_DOC_EXAMPLE_OPTIONS = new InjectionToken(`[TUI_DOC_EXAMPLE_OPTIONS]: Default parameters for DocExample component`, {
1061
+ /**
1062
+ * Default parameters for DocExample component
1063
+ */
1064
+ const TUI_DOC_EXAMPLE_OPTIONS = new InjectionToken(`[TUI_DOC_EXAMPLE_OPTIONS]`, {
1044
1065
  factory: () => TUI_DOC_EXAMPLE_DEFAULT_OPTIONS,
1045
1066
  });
1046
1067
  function tuiDocExampleOptionsProvider(options) {
@@ -1331,9 +1352,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1331
1352
  }]
1332
1353
  }] });
1333
1354
 
1334
- const TUI_DOC_PAGE_LOADED = new InjectionToken(`[TUI_DOC_PAGE_LOADED] Stream that emits if loading of page is over (for example, to begin scrollIntoView)`, { factory: () => defer(() => timer(200).pipe(switchMap(() => of(true)))) });
1355
+ /**
1356
+ * Stream that emits if loading of page is over (for example, to begin scrollIntoView)
1357
+ */
1358
+ const TUI_DOC_PAGE_LOADED = new InjectionToken(`[TUI_DOC_PAGE_LOADED]`, { factory: () => defer(() => timer(200).pipe(switchMap(() => of(true)))) });
1335
1359
 
1336
- const TUI_DOC_SCROLL_BEHAVIOR = new InjectionToken(`[TUI_DOC_SCROLL_BEHAVIOR] Defines the transition animation for scroll`, { factory: () => `smooth` });
1360
+ /**
1361
+ * Defines the transition animation for scroll
1362
+ */
1363
+ const TUI_DOC_SCROLL_BEHAVIOR = new InjectionToken(`[TUI_DOC_SCROLL_BEHAVIOR]`, { factory: () => `smooth` });
1337
1364
 
1338
1365
  const MAP = {
1339
1366
  а: `f`,
@@ -1382,17 +1409,32 @@ function tuiTransliterateKeyboardLayout(string) {
1382
1409
  return newStr;
1383
1410
  }
1384
1411
 
1385
- const TUI_DOC_PAGES = new InjectionToken(`[TUI_DOC_PAGES]: Documentation pages`, {
1412
+ /**
1413
+ * Documentation pages
1414
+ */
1415
+ const TUI_DOC_PAGES = new InjectionToken(`[TUI_DOC_PAGES]`, {
1386
1416
  factory: () => [],
1387
1417
  });
1388
1418
 
1389
- const TUI_DOC_TITLE = new InjectionToken(`[TUI_DOC_TITLE]: Page title`, {
1419
+ /**
1420
+ * Page title prefix
1421
+ */
1422
+ const TUI_DOC_TITLE = new InjectionToken(`[TUI_DOC_TITLE]`, {
1390
1423
  factory: () => ``,
1391
1424
  });
1392
1425
 
1393
- const NAVIGATION_TITLE = new InjectionToken(`[NAVIGATION_TITLE]: Page title`);
1394
- const NAVIGATION_LABELS = new InjectionToken(`[NAVIGATION_LABELS]: Navigation sections labels for search`);
1395
- const NAVIGATION_ITEMS = new InjectionToken(`[NAVIGATION_ITEMS]: Navigation pages`);
1426
+ /**
1427
+ * Page title
1428
+ */
1429
+ const NAVIGATION_TITLE = new InjectionToken(`[NAVIGATION_TITLE]`);
1430
+ /**
1431
+ * Navigation sections labels for search
1432
+ */
1433
+ const NAVIGATION_LABELS = new InjectionToken(`[NAVIGATION_LABELS]`);
1434
+ /**
1435
+ * Navigation pages
1436
+ */
1437
+ const NAVIGATION_ITEMS = new InjectionToken(`[NAVIGATION_ITEMS]`);
1396
1438
  const NAVIGATION_PROVIDERS = [
1397
1439
  TuiDestroyService,
1398
1440
  {
@@ -1648,7 +1690,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1648
1690
  args: ['class._open']
1649
1691
  }], filterItems: [], flattenSubPages: [] } });
1650
1692
 
1651
- const TUI_DOC_LOGO = new InjectionToken(`[TUI_DOC_LOGO]: Main logo`, {
1693
+ /**
1694
+ * Main logo
1695
+ */
1696
+ const TUI_DOC_LOGO = new InjectionToken(`[TUI_DOC_LOGO]`, {
1652
1697
  factory: () => ``,
1653
1698
  });
1654
1699
 
@@ -1915,15 +1960,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1915
1960
  }]
1916
1961
  }] });
1917
1962
 
1918
- const TUI_DOC_DEFAULT_TABS = new InjectionToken(`[TUI_DOC_DEFAULT_TABS]: Array of default tab names`, {
1963
+ /**
1964
+ * Array of default tab names
1965
+ */
1966
+ const TUI_DOC_DEFAULT_TABS = new InjectionToken(`[TUI_DOC_DEFAULT_TABS]`, {
1919
1967
  factory: () => [],
1920
1968
  });
1921
1969
 
1922
- const TUI_DOC_SEE_ALSO = new InjectionToken(`[TUI_DOC_SEE_ALSO]: Array of arrays of related pages`, {
1970
+ /**
1971
+ * Array of arrays of related pages
1972
+ */
1973
+ const TUI_DOC_SEE_ALSO = new InjectionToken(`[TUI_DOC_SEE_ALSO]`, {
1923
1974
  factory: () => [],
1924
1975
  });
1925
1976
 
1926
- const PAGE_SEE_ALSO = new InjectionToken(`[PAGE_SEE_ALSO]: Page see also`);
1977
+ /**
1978
+ * Array if related page titles
1979
+ */
1980
+ const PAGE_SEE_ALSO = new InjectionToken(`[PAGE_SEE_ALSO]`);
1927
1981
  const PAGE_PROVIDERS = [
1928
1982
  {
1929
1983
  provide: PAGE_SEE_ALSO,
@@ -1962,7 +2016,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1962
2016
  type: Input
1963
2017
  }] } });
1964
2018
 
1965
- const TUI_DOC_SOURCE_CODE = new InjectionToken(`[TUI_DOC_SOURCE_CODE]: Source code link`, {
2019
+ /**
2020
+ * Source code link
2021
+ */
2022
+ const TUI_DOC_SOURCE_CODE = new InjectionToken(`[TUI_DOC_SOURCE_CODE]`, {
1966
2023
  factory: () => null,
1967
2024
  });
1968
2025