@semantic-components/code 0.61.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/README.md +15 -0
- package/eslint.config.mjs +48 -0
- package/ng-package.json +7 -0
- package/package.json +22 -0
- package/project.json +28 -0
- package/src/index.ts +1 -0
- package/src/lib/components/code-editor/README.md +368 -0
- package/src/lib/components/code-editor/code-editor-content.ts +507 -0
- package/src/lib/components/code-editor/code-editor-copy-button.ts +77 -0
- package/src/lib/components/code-editor/code-editor-footer.ts +31 -0
- package/src/lib/components/code-editor/code-editor-header.ts +31 -0
- package/src/lib/components/code-editor/code-editor-label.ts +28 -0
- package/src/lib/components/code-editor/code-editor.ts +31 -0
- package/src/lib/components/code-editor/index.ts +7 -0
- package/src/lib/components/code-viewer/README.md +178 -0
- package/src/lib/components/code-viewer/code-viewer-content.ts +96 -0
- package/src/lib/components/code-viewer/code-viewer-header.ts +31 -0
- package/src/lib/components/code-viewer/code-viewer-label.ts +28 -0
- package/src/lib/components/code-viewer/code-viewer.ts +28 -0
- package/src/lib/components/code-viewer/index.ts +5 -0
- package/src/lib/components/index.ts +2 -0
- package/src/lib/styles/index.css +1 -0
- package/src/lib/styles/shiki.css +48 -0
- package/tsconfig.json +28 -0
- package/tsconfig.lib.json +12 -0
- package/tsconfig.lib.prod.json +7 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { ScCodeEditor } from './code-editor';
|
|
2
|
+
export { ScCodeEditorHeader } from './code-editor-header';
|
|
3
|
+
export { ScCodeEditorLabel } from './code-editor-label';
|
|
4
|
+
export { ScCodeEditorFooter } from './code-editor-footer';
|
|
5
|
+
export { ScCodeEditorContent, detectLanguage } from './code-editor-content';
|
|
6
|
+
export { ScCodeEditorCopyButton } from './code-editor-copy-button';
|
|
7
|
+
export type { ScCodeEditorLanguage } from './code-editor-content';
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Code Viewer Components
|
|
2
|
+
|
|
3
|
+
A read-only code display component with syntax highlighting powered by [Shiki](https://shiki.style/) and shadcn/ui styling. Automatically follows the app's light/dark theme.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { ScCodeViewer, ScCodeViewerHeader, ScCodeViewerLabel, ScCodeViewerContent, ScCodeViewerLanguage } from '@semantic-components/ui-lab';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Architecture
|
|
12
|
+
|
|
13
|
+
The component uses Shiki's dual-theme feature (`github-light` + `github-dark`) with `defaultColor: false` to generate CSS variable-based output. The CSS switches between `--shiki-light` and `--shiki-dark` variables based on the `.dark` class on the document root.
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
ScCodeViewer (Root - div[sc-code-viewer])
|
|
17
|
+
├── ScCodeViewerHeader (Header - div[sc-code-viewer-header])
|
|
18
|
+
│ ├── ScCodeViewerLabel (Label - span[sc-code-viewer-label])
|
|
19
|
+
│ └── ScCopyButton (Copy button)
|
|
20
|
+
└── ScCodeViewerContent (Content - div[sc-code-viewer-content])
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Components
|
|
24
|
+
|
|
25
|
+
| Component | Selector | Description |
|
|
26
|
+
| --------------------- | ----------------------------- | -------------------------------- |
|
|
27
|
+
| `ScCodeViewer` | `div[sc-code-viewer]` | Root container with border |
|
|
28
|
+
| `ScCodeViewerHeader` | `div[sc-code-viewer-header]` | Header bar with border |
|
|
29
|
+
| `ScCodeViewerLabel` | `span[sc-code-viewer-label]` | Label for filename or language |
|
|
30
|
+
| `ScCodeViewerContent` | `div[sc-code-viewer-content]` | Content with syntax highlighting |
|
|
31
|
+
|
|
32
|
+
## Inputs
|
|
33
|
+
|
|
34
|
+
### ScCodeViewer (Root)
|
|
35
|
+
|
|
36
|
+
| Input | Type | Default | Description |
|
|
37
|
+
| ------- | -------- | ------- | ---------------------- |
|
|
38
|
+
| `class` | `string` | `''` | Additional CSS classes |
|
|
39
|
+
|
|
40
|
+
The root container with border and rounded corners.
|
|
41
|
+
|
|
42
|
+
### ScCodeViewerHeader
|
|
43
|
+
|
|
44
|
+
| Input | Type | Default | Description |
|
|
45
|
+
| ------- | -------- | ------- | ---------------------- |
|
|
46
|
+
| `class` | `string` | `''` | Additional CSS classes |
|
|
47
|
+
|
|
48
|
+
Header bar with bottom border for filename/language label and copy button.
|
|
49
|
+
|
|
50
|
+
### ScCodeViewerLabel
|
|
51
|
+
|
|
52
|
+
| Input | Type | Default | Description |
|
|
53
|
+
| ------- | -------- | ------- | ---------------------- |
|
|
54
|
+
| `class` | `string` | `''` | Additional CSS classes |
|
|
55
|
+
|
|
56
|
+
Label for displaying filename or language with muted foreground styling.
|
|
57
|
+
|
|
58
|
+
### ScCodeViewerContent
|
|
59
|
+
|
|
60
|
+
| Input | Type | Default | Description |
|
|
61
|
+
| ----------------- | ---------------------- | ------------- | -------------------------------- |
|
|
62
|
+
| `code` | `string` | **required** | The source code to display |
|
|
63
|
+
| `language` | `ScCodeViewerLanguage` | `'plaintext'` | Language for syntax highlighting |
|
|
64
|
+
| `showLineNumbers` | `boolean` | `false` | Whether to show line numbers |
|
|
65
|
+
| `class` | `string` | `''` | Additional CSS classes |
|
|
66
|
+
|
|
67
|
+
The content component with Shiki syntax highlighting.
|
|
68
|
+
|
|
69
|
+
## Supported Languages
|
|
70
|
+
|
|
71
|
+
`angular-ts` | `typescript` | `javascript` | `html` | `css` | `json` | `python` | `bash` | `shell` | `markdown` | `yaml` | `sql` | `go` | `rust` | `java` | `plaintext`
|
|
72
|
+
|
|
73
|
+
## Usage
|
|
74
|
+
|
|
75
|
+
### Basic Usage
|
|
76
|
+
|
|
77
|
+
```html
|
|
78
|
+
<div sc-code-viewer>
|
|
79
|
+
<div sc-code-viewer-header>
|
|
80
|
+
<span sc-code-viewer-label>TypeScript</span>
|
|
81
|
+
<button sc-copy-button [value]="code"></button>
|
|
82
|
+
</div>
|
|
83
|
+
<div sc-code-viewer-content [code]="code" language="typescript"></div>
|
|
84
|
+
</div>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### With Filename
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<div sc-code-viewer>
|
|
91
|
+
<div sc-code-viewer-header>
|
|
92
|
+
<span sc-code-viewer-label>app.component.ts</span>
|
|
93
|
+
<button sc-copy-button [value]="code"></button>
|
|
94
|
+
</div>
|
|
95
|
+
<div sc-code-viewer-content [code]="code" language="angular-ts"></div>
|
|
96
|
+
</div>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### With Line Numbers
|
|
100
|
+
|
|
101
|
+
```html
|
|
102
|
+
<div sc-code-viewer>
|
|
103
|
+
<div sc-code-viewer-header>
|
|
104
|
+
<span sc-code-viewer-label>{{ filename }}</span>
|
|
105
|
+
<button sc-copy-button [value]="code"></button>
|
|
106
|
+
</div>
|
|
107
|
+
<div sc-code-viewer-content [code]="code" language="typescript" [showLineNumbers]="true"></div>
|
|
108
|
+
</div>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Without Header
|
|
112
|
+
|
|
113
|
+
```html
|
|
114
|
+
<div sc-code-viewer>
|
|
115
|
+
<div sc-code-viewer-content [code]="code" language="json"></div>
|
|
116
|
+
</div>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### With Max Height
|
|
120
|
+
|
|
121
|
+
```html
|
|
122
|
+
<div sc-code-viewer>
|
|
123
|
+
<div sc-code-viewer-header>
|
|
124
|
+
<span sc-code-viewer-label>{{ language }}</span>
|
|
125
|
+
<button sc-copy-button [value]="code"></button>
|
|
126
|
+
</div>
|
|
127
|
+
<div sc-code-viewer-content [code]="longCode" language="typescript" maxHeight="300px"></div>
|
|
128
|
+
</div>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Custom Header Content
|
|
132
|
+
|
|
133
|
+
```html
|
|
134
|
+
<div sc-code-viewer>
|
|
135
|
+
<div sc-code-viewer-header>
|
|
136
|
+
<div class="flex items-center gap-2">
|
|
137
|
+
<svg class="size-4"><!-- icon --></svg>
|
|
138
|
+
<span sc-code-viewer-label>{{ filename }}</span>
|
|
139
|
+
<span class="text-xs text-muted-foreground">({{ lines }} lines)</span>
|
|
140
|
+
</div>
|
|
141
|
+
<div class="flex gap-2">
|
|
142
|
+
<button>Download</button>
|
|
143
|
+
<button sc-copy-button [value]="code"></button>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
<div sc-code-viewer-content [code]="code" [language]="language"></div>
|
|
147
|
+
</div>
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Theming
|
|
151
|
+
|
|
152
|
+
The component automatically follows the app's theme:
|
|
153
|
+
|
|
154
|
+
- **Light mode**: Uses `github-light` Shiki theme
|
|
155
|
+
- **Dark mode**: Uses `github-dark` Shiki theme (activated by `.dark` class on `<html>`)
|
|
156
|
+
|
|
157
|
+
No manual theme configuration is needed. The component renders both theme colors as CSS variables and switches between them with CSS.
|
|
158
|
+
|
|
159
|
+
## Features
|
|
160
|
+
|
|
161
|
+
- **Composable Architecture**: Build custom layouts with separate header and content components
|
|
162
|
+
- **Syntax Highlighting**: Powered by Shiki with 30+ languages supported
|
|
163
|
+
- **Automatic Theming**: Follows app's light/dark mode automatically
|
|
164
|
+
- **Line Numbers**: Optional line number display
|
|
165
|
+
- **Copy Button**: Built-in copy-to-clipboard functionality with ScCopyButton
|
|
166
|
+
- **Customizable**: All components accept custom classes
|
|
167
|
+
- **Accessible**: Proper semantic HTML and ARIA attributes
|
|
168
|
+
|
|
169
|
+
## Styling
|
|
170
|
+
|
|
171
|
+
The components use Tailwind CSS with shadcn/ui design tokens:
|
|
172
|
+
|
|
173
|
+
- **Container** (`ScCodeViewer`): `rounded-lg border border-border overflow-hidden`
|
|
174
|
+
- **Header** (`ScCodeViewerHeader`): `flex items-center justify-between border-b border-border px-4 py-2`
|
|
175
|
+
- **Label** (`ScCodeViewerLabel`): `text-xs font-medium text-muted-foreground`
|
|
176
|
+
- **Content** (`ScCodeViewerContent`): `overflow-auto` with configurable max-height
|
|
177
|
+
- **Code font**: System monospace stack (`ui-monospace, SFMono-Regular, ...`)
|
|
178
|
+
- **Line numbers**: Muted foreground at 50% opacity, non-selectable
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
computed,
|
|
5
|
+
effect,
|
|
6
|
+
inject,
|
|
7
|
+
input,
|
|
8
|
+
signal,
|
|
9
|
+
ViewEncapsulation,
|
|
10
|
+
} from '@angular/core';
|
|
11
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
12
|
+
import { codeToHtml } from 'shiki';
|
|
13
|
+
import { cn } from '@semantic-components/ui';
|
|
14
|
+
|
|
15
|
+
export type ScCodeViewerLanguage =
|
|
16
|
+
| 'angular-ts'
|
|
17
|
+
| 'typescript'
|
|
18
|
+
| 'javascript'
|
|
19
|
+
| 'html'
|
|
20
|
+
| 'css'
|
|
21
|
+
| 'json'
|
|
22
|
+
| 'python'
|
|
23
|
+
| 'bash'
|
|
24
|
+
| 'shell'
|
|
25
|
+
| 'markdown'
|
|
26
|
+
| 'yaml'
|
|
27
|
+
| 'sql'
|
|
28
|
+
| 'go'
|
|
29
|
+
| 'rust'
|
|
30
|
+
| 'java'
|
|
31
|
+
| 'plaintext';
|
|
32
|
+
|
|
33
|
+
@Component({
|
|
34
|
+
selector: 'div[sc-code-viewer-content]',
|
|
35
|
+
template: `
|
|
36
|
+
@if (highlightedHtml()) {
|
|
37
|
+
<div [class]="contentClass()" [innerHTML]="highlightedHtml()"></div>
|
|
38
|
+
} @else {
|
|
39
|
+
<pre
|
|
40
|
+
class="m-0 p-4 text-sm leading-relaxed font-mono text-foreground"
|
|
41
|
+
><code>{{ code() }}</code></pre>
|
|
42
|
+
}
|
|
43
|
+
`,
|
|
44
|
+
host: {
|
|
45
|
+
'data-slot': 'code-viewer-content',
|
|
46
|
+
'[class]': 'wrapperClass()',
|
|
47
|
+
},
|
|
48
|
+
encapsulation: ViewEncapsulation.None,
|
|
49
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
50
|
+
})
|
|
51
|
+
export class ScCodeViewerContent {
|
|
52
|
+
readonly code = input.required<string>();
|
|
53
|
+
readonly language = input<ScCodeViewerLanguage>('plaintext');
|
|
54
|
+
readonly showLineNumbers = input(false);
|
|
55
|
+
readonly classInput = input<string>('', { alias: 'class' });
|
|
56
|
+
|
|
57
|
+
private readonly sanitizer = inject(DomSanitizer);
|
|
58
|
+
|
|
59
|
+
protected readonly highlightedHtml = signal<SafeHtml | null>(null);
|
|
60
|
+
|
|
61
|
+
protected readonly wrapperClass = computed(() =>
|
|
62
|
+
cn('overflow-auto', this.classInput()),
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
protected readonly contentClass = computed(() =>
|
|
66
|
+
cn(this.showLineNumbers() && 'shiki-line-numbers'),
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
constructor() {
|
|
70
|
+
effect(() => {
|
|
71
|
+
const code = this.code();
|
|
72
|
+
const lang = this.language();
|
|
73
|
+
|
|
74
|
+
this.highlight(code, lang);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
private async highlight(
|
|
79
|
+
code: string,
|
|
80
|
+
lang: ScCodeViewerLanguage,
|
|
81
|
+
): Promise<void> {
|
|
82
|
+
try {
|
|
83
|
+
const html = await codeToHtml(code, {
|
|
84
|
+
lang,
|
|
85
|
+
themes: {
|
|
86
|
+
light: 'github-light',
|
|
87
|
+
dark: 'github-dark',
|
|
88
|
+
},
|
|
89
|
+
defaultColor: false,
|
|
90
|
+
});
|
|
91
|
+
this.highlightedHtml.set(this.sanitizer.bypassSecurityTrustHtml(html));
|
|
92
|
+
} catch {
|
|
93
|
+
this.highlightedHtml.set(null);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
computed,
|
|
5
|
+
input,
|
|
6
|
+
ViewEncapsulation,
|
|
7
|
+
} from '@angular/core';
|
|
8
|
+
import { cn } from '@semantic-components/ui';
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: 'div[sc-code-viewer-header]',
|
|
12
|
+
template: `
|
|
13
|
+
<ng-content />
|
|
14
|
+
`,
|
|
15
|
+
host: {
|
|
16
|
+
'data-slot': 'code-viewer-header',
|
|
17
|
+
'[class]': 'class()',
|
|
18
|
+
},
|
|
19
|
+
encapsulation: ViewEncapsulation.None,
|
|
20
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21
|
+
})
|
|
22
|
+
export class ScCodeViewerHeader {
|
|
23
|
+
readonly classInput = input<string>('', { alias: 'class' });
|
|
24
|
+
|
|
25
|
+
protected readonly class = computed(() =>
|
|
26
|
+
cn(
|
|
27
|
+
'flex items-center justify-between border-b border-border px-4 py-2',
|
|
28
|
+
this.classInput(),
|
|
29
|
+
),
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
computed,
|
|
5
|
+
input,
|
|
6
|
+
ViewEncapsulation,
|
|
7
|
+
} from '@angular/core';
|
|
8
|
+
import { cn } from '@semantic-components/ui';
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: 'span[sc-code-viewer-label]',
|
|
12
|
+
template: `
|
|
13
|
+
<ng-content />
|
|
14
|
+
`,
|
|
15
|
+
host: {
|
|
16
|
+
'data-slot': 'code-viewer-label',
|
|
17
|
+
'[class]': 'class()',
|
|
18
|
+
},
|
|
19
|
+
encapsulation: ViewEncapsulation.None,
|
|
20
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21
|
+
})
|
|
22
|
+
export class ScCodeViewerLabel {
|
|
23
|
+
readonly classInput = input<string>('', { alias: 'class' });
|
|
24
|
+
|
|
25
|
+
protected readonly class = computed(() =>
|
|
26
|
+
cn('text-xs font-medium text-muted-foreground', this.classInput()),
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
computed,
|
|
5
|
+
input,
|
|
6
|
+
ViewEncapsulation,
|
|
7
|
+
} from '@angular/core';
|
|
8
|
+
import { cn } from '@semantic-components/ui';
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: 'div[sc-code-viewer]',
|
|
12
|
+
template: `
|
|
13
|
+
<ng-content />
|
|
14
|
+
`,
|
|
15
|
+
host: {
|
|
16
|
+
'data-slot': 'code-viewer',
|
|
17
|
+
'[class]': 'class()',
|
|
18
|
+
},
|
|
19
|
+
encapsulation: ViewEncapsulation.None,
|
|
20
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21
|
+
})
|
|
22
|
+
export class ScCodeViewer {
|
|
23
|
+
readonly classInput = input<string>('', { alias: 'class' });
|
|
24
|
+
|
|
25
|
+
protected readonly class = computed(() =>
|
|
26
|
+
cn('overflow-hidden rounded-lg border border-border', this.classInput()),
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { ScCodeViewerLanguage } from './code-viewer-content';
|
|
2
|
+
export { ScCodeViewer } from './code-viewer';
|
|
3
|
+
export { ScCodeViewerHeader } from './code-viewer-header';
|
|
4
|
+
export { ScCodeViewerLabel } from './code-viewer-label';
|
|
5
|
+
export { ScCodeViewerContent } from './code-viewer-content';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import './shiki.css';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* Shiki syntax highlighting styles - generic and reusable */
|
|
2
|
+
|
|
3
|
+
pre.shiki {
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 1rem;
|
|
6
|
+
overflow-x: auto;
|
|
7
|
+
font-size: 0.875rem;
|
|
8
|
+
line-height: 1.625;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
pre.shiki,
|
|
12
|
+
pre.shiki span {
|
|
13
|
+
color: var(--shiki-light);
|
|
14
|
+
background-color: var(--shiki-light-bg);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dark pre.shiki,
|
|
18
|
+
.dark pre.shiki span {
|
|
19
|
+
color: var(--shiki-dark);
|
|
20
|
+
background-color: var(--shiki-dark-bg);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
pre.shiki code {
|
|
24
|
+
font-family:
|
|
25
|
+
ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono',
|
|
26
|
+
monospace;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Line numbers support */
|
|
30
|
+
.shiki-line-numbers pre.shiki code {
|
|
31
|
+
counter-reset: line;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.shiki-line-numbers pre.shiki code .line {
|
|
35
|
+
display: inline-block;
|
|
36
|
+
width: 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.shiki-line-numbers pre.shiki code .line::before {
|
|
40
|
+
counter-increment: line;
|
|
41
|
+
content: counter(line);
|
|
42
|
+
display: inline-block;
|
|
43
|
+
width: 2rem;
|
|
44
|
+
margin-right: 1rem;
|
|
45
|
+
text-align: right;
|
|
46
|
+
color: oklch(from var(--muted-foreground) l c h / 0.5);
|
|
47
|
+
user-select: none;
|
|
48
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"isolatedModules": true,
|
|
5
|
+
"target": "es2022",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noImplicitOverride": true,
|
|
9
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
10
|
+
"noImplicitReturns": true,
|
|
11
|
+
"noFallthroughCasesInSwitch": true,
|
|
12
|
+
"emitDecoratorMetadata": false,
|
|
13
|
+
"module": "preserve"
|
|
14
|
+
},
|
|
15
|
+
"angularCompilerOptions": {
|
|
16
|
+
"enableI18nLegacyMessageIdFormat": false,
|
|
17
|
+
"strictInjectionParameters": true,
|
|
18
|
+
"strictInputAccessModifiers": true,
|
|
19
|
+
"strictTemplates": true
|
|
20
|
+
},
|
|
21
|
+
"files": [],
|
|
22
|
+
"include": [],
|
|
23
|
+
"references": [
|
|
24
|
+
{
|
|
25
|
+
"path": "./tsconfig.lib.json"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "../../dist/out-tsc",
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"declarationMap": true,
|
|
7
|
+
"inlineSources": true,
|
|
8
|
+
"types": []
|
|
9
|
+
},
|
|
10
|
+
"include": ["src/**/*.ts"],
|
|
11
|
+
"exclude": ["src/**/*.spec.ts", "src/**/*.test.ts"]
|
|
12
|
+
}
|