@taiga-ui/addon-doc 4.0.0-rc.8 → 4.0.0
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/esm2022/components/code/index.mjs +3 -3
- package/esm2022/components/documentation/documentation.component.mjs +3 -3
- package/esm2022/components/language-switcher/index.mjs +2 -1
- package/esm2022/components/main/main.component.mjs +3 -3
- package/esm2022/components/navigation/navigation.component.mjs +3 -3
- package/esm2022/components/navigation/navigation.providers.mjs +5 -1
- package/esm2022/index.mjs +1 -2
- package/fesm2022/taiga-ui-addon-doc-components.mjs +13 -9
- package/fesm2022/taiga-ui-addon-doc-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-doc.mjs +0 -1
- package/fesm2022/taiga-ui-addon-doc.mjs.map +1 -1
- package/index.d.ts +0 -1
- package/package.json +18 -27
- package/esm2022/pipes/index.mjs +0 -2
- package/esm2022/pipes/markdown/markdown.pipe.mjs +0 -32
- package/esm2022/pipes/taiga-ui-addon-doc-pipes.mjs +0 -5
- package/fesm2022/taiga-ui-addon-doc-pipes.mjs +0 -38
- package/fesm2022/taiga-ui-addon-doc-pipes.mjs.map +0 -1
- package/pipes/index.d.ts +0 -1
- package/pipes/markdown/markdown.pipe.d.ts +0 -11
- package/styles/index.less +0 -2
- package/styles/mixins/changelog.less +0 -33
- package/styles/mixins/markdown.less +0 -119
|
@@ -2,7 +2,6 @@ import { TuiDocCopy, TuiDocTab, TuiDocDemo, TuiDocCode, TuiDocExample, TuiDocExa
|
|
|
2
2
|
export * from '@taiga-ui/addon-doc/components';
|
|
3
3
|
import { TuiDocText } from '@taiga-ui/addon-doc/directives';
|
|
4
4
|
export * from '@taiga-ui/addon-doc/directives';
|
|
5
|
-
export * from '@taiga-ui/addon-doc/pipes';
|
|
6
5
|
export * from '@taiga-ui/addon-doc/services';
|
|
7
6
|
export * from '@taiga-ui/addon-doc/tokens';
|
|
8
7
|
export * from '@taiga-ui/addon-doc/types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-doc.mjs","sources":["../../../projects/addon-doc/index.ts","../../../projects/addon-doc/taiga-ui-addon-doc.ts"],"sourcesContent":["import {\n TuiDocCode,\n TuiDocCopy,\n TuiDocDemo,\n TuiDocDocumentation,\n TuiDocDocumentationPropertyConnector,\n TuiDocExample,\n TuiDocExampleGetTabsPipe,\n TuiDocMain,\n TuiDocNavigation,\n TuiDocPage,\n TuiDocPageTabConnector,\n TuiDocTab,\n TuiDocTypeReferencePipe,\n} from '@taiga-ui/addon-doc/components';\nimport {TuiDocText} from '@taiga-ui/addon-doc/directives';\n\nexport const TuiAddonDoc = [\n TuiDocCopy,\n TuiDocTab,\n TuiDocDemo,\n TuiDocCode,\n TuiDocExample,\n TuiDocExampleGetTabsPipe,\n TuiDocTypeReferencePipe,\n TuiDocDocumentation,\n TuiDocDocumentationPropertyConnector,\n TuiDocPage,\n TuiDocPageTabConnector,\n TuiDocNavigation,\n TuiDocMain,\n TuiDocText,\n] as const;\n\nexport * from '@taiga-ui/addon-doc/components';\nexport * from '@taiga-ui/addon-doc/directives';\nexport * from '@taiga-ui/addon-doc/
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-doc.mjs","sources":["../../../projects/addon-doc/index.ts","../../../projects/addon-doc/taiga-ui-addon-doc.ts"],"sourcesContent":["import {\n TuiDocCode,\n TuiDocCopy,\n TuiDocDemo,\n TuiDocDocumentation,\n TuiDocDocumentationPropertyConnector,\n TuiDocExample,\n TuiDocExampleGetTabsPipe,\n TuiDocMain,\n TuiDocNavigation,\n TuiDocPage,\n TuiDocPageTabConnector,\n TuiDocTab,\n TuiDocTypeReferencePipe,\n} from '@taiga-ui/addon-doc/components';\nimport {TuiDocText} from '@taiga-ui/addon-doc/directives';\n\nexport const TuiAddonDoc = [\n TuiDocCopy,\n TuiDocTab,\n TuiDocDemo,\n TuiDocCode,\n TuiDocExample,\n TuiDocExampleGetTabsPipe,\n TuiDocTypeReferencePipe,\n TuiDocDocumentation,\n TuiDocDocumentationPropertyConnector,\n TuiDocPage,\n TuiDocPageTabConnector,\n TuiDocNavigation,\n TuiDocMain,\n TuiDocText,\n] as const;\n\nexport * from '@taiga-ui/addon-doc/components';\nexport * from '@taiga-ui/addon-doc/directives';\nexport * from '@taiga-ui/addon-doc/services';\nexport * from '@taiga-ui/addon-doc/tokens';\nexport * from '@taiga-ui/addon-doc/types';\nexport * from '@taiga-ui/addon-doc/utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAiBa,MAAA,WAAW,GAAG;IACvB,UAAU;IACV,SAAS;IACT,UAAU;IACV,UAAU;IACV,aAAa;IACb,wBAAwB;IACxB,uBAAuB;IACvB,mBAAmB;IACnB,oCAAoC;IACpC,UAAU;IACV,sBAAsB;IACtB,gBAAgB;IAChB,UAAU;IACV,UAAU;;;AC/Bd;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { TuiDocText } from '@taiga-ui/addon-doc/directives';
|
|
|
3
3
|
export declare const TuiAddonDoc: readonly [typeof TuiDocCopy, typeof TuiDocTab, typeof TuiDocDemo, typeof TuiDocCode, typeof TuiDocExample, typeof TuiDocExampleGetTabsPipe, typeof TuiDocTypeReferencePipe, typeof TuiDocDocumentation, typeof TuiDocDocumentationPropertyConnector, typeof TuiDocPage, typeof TuiDocPageTabConnector, typeof TuiDocNavigation, typeof TuiDocMain, typeof TuiDocText];
|
|
4
4
|
export * from '@taiga-ui/addon-doc/components';
|
|
5
5
|
export * from '@taiga-ui/addon-doc/directives';
|
|
6
|
-
export * from '@taiga-ui/addon-doc/pipes';
|
|
7
6
|
export * from '@taiga-ui/addon-doc/services';
|
|
8
7
|
export * from '@taiga-ui/addon-doc/tokens';
|
|
9
8
|
export * from '@taiga-ui/addon-doc/types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/addon-doc",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Taiga UI based library for developing documentation portals for Angular libraries.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -13,8 +13,24 @@
|
|
|
13
13
|
"homepage": "https://github.com/taiga-family/taiga-ui",
|
|
14
14
|
"repository": "https://github.com/taiga-family/taiga-ui",
|
|
15
15
|
"license": "Apache-2.0",
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"@angular/cdk": ">=16.0.0",
|
|
18
|
+
"@angular/common": ">=16.0.0",
|
|
19
|
+
"@angular/core": ">=16.0.0",
|
|
20
|
+
"@angular/forms": ">=16.0.0",
|
|
21
|
+
"@angular/router": ">=16.0.0",
|
|
22
|
+
"@ng-web-apis/common": "^4.2.1",
|
|
23
|
+
"@taiga-ui/addon-mobile": "^4.0.0",
|
|
24
|
+
"@taiga-ui/cdk": "^4.0.0",
|
|
25
|
+
"@taiga-ui/core": "^4.0.0",
|
|
26
|
+
"@taiga-ui/kit": "^4.0.0",
|
|
27
|
+
"@taiga-ui/polymorpheus": "^4.6.4",
|
|
28
|
+
"markdown-it": ">=14.1.0",
|
|
29
|
+
"ngx-highlightjs": ">=10.0.0"
|
|
30
|
+
},
|
|
31
|
+
"module": "fesm2022/taiga-ui-addon-doc.mjs",
|
|
32
|
+
"typings": "index.d.ts",
|
|
16
33
|
"exports": {
|
|
17
|
-
"./styles/*": "./styles/*",
|
|
18
34
|
"./package.json": {
|
|
19
35
|
"default": "./package.json"
|
|
20
36
|
},
|
|
@@ -36,12 +52,6 @@
|
|
|
36
52
|
"esm": "./esm2022/directives/taiga-ui-addon-doc-directives.mjs",
|
|
37
53
|
"default": "./fesm2022/taiga-ui-addon-doc-directives.mjs"
|
|
38
54
|
},
|
|
39
|
-
"./pipes": {
|
|
40
|
-
"types": "./pipes/index.d.ts",
|
|
41
|
-
"esm2022": "./esm2022/pipes/taiga-ui-addon-doc-pipes.mjs",
|
|
42
|
-
"esm": "./esm2022/pipes/taiga-ui-addon-doc-pipes.mjs",
|
|
43
|
-
"default": "./fesm2022/taiga-ui-addon-doc-pipes.mjs"
|
|
44
|
-
},
|
|
45
55
|
"./services": {
|
|
46
56
|
"types": "./services/index.d.ts",
|
|
47
57
|
"esm2022": "./esm2022/services/taiga-ui-addon-doc-services.mjs",
|
|
@@ -67,25 +77,6 @@
|
|
|
67
77
|
"default": "./fesm2022/taiga-ui-addon-doc-utils.mjs"
|
|
68
78
|
}
|
|
69
79
|
},
|
|
70
|
-
"peerDependencies": {
|
|
71
|
-
"@angular/cdk": ">=16.0.0",
|
|
72
|
-
"@angular/common": ">=16.0.0",
|
|
73
|
-
"@angular/core": ">=16.0.0",
|
|
74
|
-
"@angular/forms": ">=16.0.0",
|
|
75
|
-
"@angular/router": ">=16.0.0",
|
|
76
|
-
"@ng-web-apis/common": "^4.2.0",
|
|
77
|
-
"@taiga-ui/addon-mobile": "^4.0.0-rc.8",
|
|
78
|
-
"@taiga-ui/cdk": "^4.0.0-rc.8",
|
|
79
|
-
"@taiga-ui/core": "^4.0.0-rc.8",
|
|
80
|
-
"@taiga-ui/kit": "^4.0.0-rc.8",
|
|
81
|
-
"@taiga-ui/polymorpheus": "^4.6.4",
|
|
82
|
-
"markdown-it": ">=14.1.0",
|
|
83
|
-
"marked": ">=13.0.3",
|
|
84
|
-
"marked-gfm-heading-id": ">=4.0.0",
|
|
85
|
-
"ngx-highlightjs": ">=10.0.0"
|
|
86
|
-
},
|
|
87
|
-
"module": "fesm2022/taiga-ui-addon-doc.mjs",
|
|
88
|
-
"typings": "index.d.ts",
|
|
89
80
|
"sideEffects": false,
|
|
90
81
|
"dependencies": {
|
|
91
82
|
"tslib": "^2.6.3"
|
package/esm2022/pipes/index.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export * from './markdown/markdown.pipe';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9hZGRvbi1kb2MvcGlwZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYywwQkFBMEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbWFya2Rvd24vbWFya2Rvd24ucGlwZSc7XG4iXX0=
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { inject, Pipe } from '@angular/core';
|
|
2
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
|
-
import { tuiRawLoad } from '@taiga-ui/addon-doc/utils';
|
|
4
|
-
import { marked } from 'marked';
|
|
5
|
-
import { gfmHeadingId } from 'marked-gfm-heading-id';
|
|
6
|
-
import { identity, map, of, switchMap } from 'rxjs';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
class TuiDocMarkdownPipe {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.sanitizer = inject(DomSanitizer);
|
|
11
|
-
}
|
|
12
|
-
transform(value, mapper = identity) {
|
|
13
|
-
return of(value).pipe(switchMap(tuiRawLoad), map(mapper), switchMap(async (markdown) => marked
|
|
14
|
-
.use({
|
|
15
|
-
async: true,
|
|
16
|
-
pedantic: false,
|
|
17
|
-
gfm: true,
|
|
18
|
-
}, gfmHeadingId())
|
|
19
|
-
.parse(markdown)), map((x) => this.sanitizer.bypassSecurityTrustHtml(x)));
|
|
20
|
-
}
|
|
21
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocMarkdownPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
22
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiDocMarkdownPipe, isStandalone: true, name: "tuiDocMarkdown" }); }
|
|
23
|
-
}
|
|
24
|
-
export { TuiDocMarkdownPipe };
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocMarkdownPipe, decorators: [{
|
|
26
|
-
type: Pipe,
|
|
27
|
-
args: [{
|
|
28
|
-
standalone: true,
|
|
29
|
-
name: 'tuiDocMarkdown',
|
|
30
|
-
}]
|
|
31
|
-
}] });
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFya2Rvd24ucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FkZG9uLWRvYy9waXBlcy9tYXJrZG93bi9tYXJrZG93bi5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBQyxNQUFNLEVBQUUsSUFBSSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSwyQkFBMkIsQ0FBQztBQUV2RCxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sMkJBQTJCLENBQUM7QUFFckQsT0FBTyxFQUFDLE1BQU0sRUFBQyxNQUFNLFFBQVEsQ0FBQztBQUM5QixPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0sdUJBQXVCLENBQUM7QUFFbkQsT0FBTyxFQUFDLFFBQVEsRUFBRSxHQUFHLEVBQUUsRUFBRSxFQUFFLFNBQVMsRUFBQyxNQUFNLE1BQU0sQ0FBQzs7QUFFbEQsTUFJYSxrQkFBa0I7SUFKL0I7UUFLcUIsY0FBUyxHQUFHLE1BQU0sQ0FBQyxZQUFZLENBQUMsQ0FBQztLQXdCckQ7SUF0QlUsU0FBUyxDQUNaLEtBQTBCLEVBQzFCLFNBQW1DLFFBQVE7UUFFM0MsT0FBTyxFQUFFL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UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGVkYW50aWM6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdmbTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBnZm1IZWFkaW5nSWQoKSxcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAucGFyc2UobWFya2Rvd24pLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIG1hcCgoeCkgPT4gdGhpcy5zYW5pdGl6ZXIuYnlwYXNzU2VjdXJpdHlUcnVzdEh0bWwoeCkpLFxuICAgICAgICApO1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFpZ2EtdWktYWRkb24tZG9jLXBpcGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvYWRkb24tZG9jL3BpcGVzL3RhaWdhLXVpLWFkZG9uLWRvYy1waXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Pipe } from '@angular/core';
|
|
3
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
|
-
import { tuiRawLoad } from '@taiga-ui/addon-doc/utils';
|
|
5
|
-
import { marked } from 'marked';
|
|
6
|
-
import { gfmHeadingId } from 'marked-gfm-heading-id';
|
|
7
|
-
import { of, switchMap, map, identity } from 'rxjs';
|
|
8
|
-
|
|
9
|
-
class TuiDocMarkdownPipe {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.sanitizer = inject(DomSanitizer);
|
|
12
|
-
}
|
|
13
|
-
transform(value, mapper = identity) {
|
|
14
|
-
return of(value).pipe(switchMap(tuiRawLoad), map(mapper), switchMap(async (markdown) => marked
|
|
15
|
-
.use({
|
|
16
|
-
async: true,
|
|
17
|
-
pedantic: false,
|
|
18
|
-
gfm: true,
|
|
19
|
-
}, gfmHeadingId())
|
|
20
|
-
.parse(markdown)), map((x) => this.sanitizer.bypassSecurityTrustHtml(x)));
|
|
21
|
-
}
|
|
22
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocMarkdownPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
23
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiDocMarkdownPipe, isStandalone: true, name: "tuiDocMarkdown" }); }
|
|
24
|
-
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocMarkdownPipe, decorators: [{
|
|
26
|
-
type: Pipe,
|
|
27
|
-
args: [{
|
|
28
|
-
standalone: true,
|
|
29
|
-
name: 'tuiDocMarkdown',
|
|
30
|
-
}]
|
|
31
|
-
}] });
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Generated bundle index. Do not edit.
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
export { TuiDocMarkdownPipe };
|
|
38
|
-
//# sourceMappingURL=taiga-ui-addon-doc-pipes.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-doc-pipes.mjs","sources":["../../../projects/addon-doc/pipes/markdown/markdown.pipe.ts","../../../projects/addon-doc/pipes/taiga-ui-addon-doc-pipes.ts"],"sourcesContent":["import type {PipeTransform} from '@angular/core';\nimport {inject, Pipe} from '@angular/core';\nimport {DomSanitizer} from '@angular/platform-browser';\nimport type {TuiRawLoaderContent} from '@taiga-ui/addon-doc/types';\nimport {tuiRawLoad} from '@taiga-ui/addon-doc/utils';\nimport type {TuiSafeHtml, TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {marked} from 'marked';\nimport {gfmHeadingId} from 'marked-gfm-heading-id';\nimport type {Observable} from 'rxjs';\nimport {identity, map, of, switchMap} from 'rxjs';\n\n@Pipe({\n standalone: true,\n name: 'tuiDocMarkdown',\n})\nexport class TuiDocMarkdownPipe implements PipeTransform {\n private readonly sanitizer = inject(DomSanitizer);\n\n public transform(\n value: TuiRawLoaderContent,\n mapper: TuiStringHandler<string> = identity,\n ): Observable<TuiSafeHtml> {\n return of(value).pipe(\n switchMap(tuiRawLoad),\n map(mapper),\n switchMap(async (markdown) =>\n marked\n .use(\n {\n async: true,\n pedantic: false,\n gfm: true,\n },\n gfmHeadingId(),\n )\n .parse(markdown),\n ),\n map((x) => this.sanitizer.bypassSecurityTrustHtml(x)),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAWA,MAIa,kBAAkB,CAAA;AAJ/B,IAAA,WAAA,GAAA;AAKqB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAwBrD,KAAA;AAtBU,IAAA,SAAS,CACZ,KAA0B,EAC1B,MAAA,GAAmC,QAAQ,EAAA;QAE3C,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CACjB,SAAS,CAAC,UAAU,CAAC,EACrB,GAAG,CAAC,MAAM,CAAC,EACX,SAAS,CAAC,OAAO,QAAQ,KACrB,MAAM;AACD,aAAA,GAAG,CACA;AACI,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,QAAQ,EAAE,KAAK;AACf,YAAA,GAAG,EAAE,IAAI;SACZ,EACD,YAAY,EAAE,CACjB;aACA,KAAK,CAAC,QAAQ,CAAC,CACvB,EACD,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CACxD,CAAC;KACL;+GAxBQ,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;6GAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,gBAAA,EAAA,CAAA,CAAA,EAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,gBAAgB;AACzB,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
|
package/pipes/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './markdown/markdown.pipe';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { PipeTransform } from '@angular/core';
|
|
2
|
-
import type { TuiRawLoaderContent } from '@taiga-ui/addon-doc/types';
|
|
3
|
-
import type { TuiSafeHtml, TuiStringHandler } from '@taiga-ui/cdk/types';
|
|
4
|
-
import type { Observable } from 'rxjs';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class TuiDocMarkdownPipe implements PipeTransform {
|
|
7
|
-
private readonly sanitizer;
|
|
8
|
-
transform(value: TuiRawLoaderContent, mapper?: TuiStringHandler<string>): Observable<TuiSafeHtml>;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDocMarkdownPipe, never>;
|
|
10
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TuiDocMarkdownPipe, "tuiDocMarkdown", true>;
|
|
11
|
-
}
|
package/styles/index.less
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
.changelog-styles() {
|
|
2
|
-
&::ng-deep {
|
|
3
|
-
& h3:not([id^='feat']):not([id^='bug']):not([id^='deprecations']) {
|
|
4
|
-
font-size: 1.75rem;
|
|
5
|
-
padding-bottom: 0.5em;
|
|
6
|
-
margin: 2rem 0 0;
|
|
7
|
-
border-bottom: 1px solid var(--tui-border-normal);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
& h3[id^='breaking'] {
|
|
11
|
-
margin-left: 1.25rem;
|
|
12
|
-
color: var(--tui-text-negative);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
& h3[id^='feat']:before {
|
|
16
|
-
content: '🚀';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
& h3[id^='bug']:before {
|
|
20
|
-
content: '🐞';
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
& h3[id^='deprecations']:before {
|
|
24
|
-
content: '⚠️';
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
& h3[id^='feat']:before,
|
|
28
|
-
& h3[id^='bug']:before,
|
|
29
|
-
& h3[id^='deprecations']:before {
|
|
30
|
-
margin-right: 0.5rem;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
.markdown() {
|
|
2
|
-
&::ng-deep {
|
|
3
|
-
display: block;
|
|
4
|
-
max-width: 58.25rem;
|
|
5
|
-
|
|
6
|
-
h1 {
|
|
7
|
-
font: var(--tui-font-heading-1);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
h2 {
|
|
11
|
-
font: var(--tui-font-heading-2);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
h3 {
|
|
15
|
-
font: var(--tui-font-heading-3);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
h4 {
|
|
19
|
-
font: var(--tui-font-heading-4);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
h5 {
|
|
23
|
-
font: var(--tui-font-heading-5);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
h6 {
|
|
27
|
-
font: var(--tui-font-heading-6);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
h1,
|
|
31
|
-
h2,
|
|
32
|
-
h3,
|
|
33
|
-
h4,
|
|
34
|
-
h5,
|
|
35
|
-
h6 {
|
|
36
|
-
margin: 3rem 0 1rem;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
& a {
|
|
40
|
-
text-decoration: none;
|
|
41
|
-
color: var(--tui-text-action);
|
|
42
|
-
|
|
43
|
-
&:hover,
|
|
44
|
-
&:active {
|
|
45
|
-
color: var(--tui-text-action-hover);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
& h2 {
|
|
50
|
-
font-size: 2em;
|
|
51
|
-
padding-bottom: 0.5em;
|
|
52
|
-
margin-left: 0;
|
|
53
|
-
border-bottom: 1px solid var(--tui-border-normal);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
& h3 {
|
|
57
|
-
text-transform: uppercase;
|
|
58
|
-
font-weight: normal;
|
|
59
|
-
font-size: 1.5rem;
|
|
60
|
-
margin: 1rem 0;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
img {
|
|
64
|
-
margin: 0.625rem 3rem 1.5rem 0;
|
|
65
|
-
max-width: 27.5rem;
|
|
66
|
-
|
|
67
|
-
&:nth-child(2n) {
|
|
68
|
-
margin-right: 0;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
ul {
|
|
73
|
-
&:extend(.tui-list);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
li {
|
|
77
|
-
position: relative;
|
|
78
|
-
padding-left: 1.5rem;
|
|
79
|
-
word-wrap: break-word;
|
|
80
|
-
margin-top: 0.75rem;
|
|
81
|
-
|
|
82
|
-
&:before {
|
|
83
|
-
content: '';
|
|
84
|
-
position: absolute;
|
|
85
|
-
left: 0;
|
|
86
|
-
top: 0.5rem;
|
|
87
|
-
width: 0.5rem;
|
|
88
|
-
height: 0.5rem;
|
|
89
|
-
border-radius: 100%;
|
|
90
|
-
background-color: var(--tui-background-accent-1);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
& a {
|
|
95
|
-
text-decoration: none;
|
|
96
|
-
color: var(--tui-text-action);
|
|
97
|
-
|
|
98
|
-
&:hover,
|
|
99
|
-
&:active {
|
|
100
|
-
color: var(--tui-text-action-hover);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
& code {
|
|
105
|
-
color: #d45d8c;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
& blockquote {
|
|
109
|
-
box-shadow: inset 4px 0 #f5f5f5;
|
|
110
|
-
margin-left: 0;
|
|
111
|
-
padding-left: 1.875rem;
|
|
112
|
-
font-style: italic;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
& td {
|
|
116
|
-
padding: 0.375rem 1.5rem 0.375rem 0;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|