mn-angular-lib 0.0.0 → 0.0.2
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 +19 -15
- package/fesm2022/mn-angular-lib.mjs +46 -0
- package/fesm2022/mn-angular-lib.mjs.map +1 -0
- package/index.d.ts +26 -0
- package/package.json +23 -36
- package/src/lib/styles/styles.css +9 -0
- package/.editorconfig +0 -17
- package/.idea/MnLib.iml +0 -13
- package/.idea/material_theme_project_new.xml +0 -12
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/.vscode/extensions.json +0 -4
- package/.vscode/launch.json +0 -20
- package/.vscode/tasks.json +0 -42
- package/angular.json +0 -7
- package/tsconfig.json +0 -27
package/README.md
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MnAngularLib
|
|
2
2
|
|
|
3
|
-
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version
|
|
4
|
-
|
|
5
|
-
## Development server
|
|
6
|
-
|
|
7
|
-
To start a local development server, run:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
ng serve
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.3.0.
|
|
14
4
|
|
|
15
5
|
## Code scaffolding
|
|
16
6
|
|
|
@@ -28,13 +18,27 @@ ng generate --help
|
|
|
28
18
|
|
|
29
19
|
## Building
|
|
30
20
|
|
|
31
|
-
To build the
|
|
21
|
+
To build the library, run:
|
|
32
22
|
|
|
33
23
|
```bash
|
|
34
|
-
ng build
|
|
24
|
+
ng build mn-lib
|
|
35
25
|
```
|
|
36
26
|
|
|
37
|
-
This will compile your project and
|
|
27
|
+
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
+
|
|
29
|
+
### Publishing the Library
|
|
30
|
+
|
|
31
|
+
Once the project is built, you can publish your library by following these steps:
|
|
32
|
+
|
|
33
|
+
1. Navigate to the `dist` directory:
|
|
34
|
+
```bash
|
|
35
|
+
cd dist/mn-lib
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
39
|
+
```bash
|
|
40
|
+
npm publish
|
|
41
|
+
```
|
|
38
42
|
|
|
39
43
|
## Running unit tests
|
|
40
44
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, InjectionToken } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class MnAngularLib {
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnAngularLib, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: MnAngularLib, isStandalone: true, selector: "lib-mn-lib", ngImport: i0, template: `
|
|
7
|
+
<p>
|
|
8
|
+
mn-angular-lib works!
|
|
9
|
+
</p>
|
|
10
|
+
`, isInline: true, styles: [""] });
|
|
11
|
+
}
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnAngularLib, decorators: [{
|
|
13
|
+
type: Component,
|
|
14
|
+
args: [{ selector: 'lib-mn-lib', imports: [], template: `
|
|
15
|
+
<p>
|
|
16
|
+
mn-angular-lib works!
|
|
17
|
+
</p>
|
|
18
|
+
` }]
|
|
19
|
+
}] });
|
|
20
|
+
|
|
21
|
+
const MN_THEME = new InjectionToken('MN_THEME', {
|
|
22
|
+
providedIn: 'root',
|
|
23
|
+
factory: () => ({
|
|
24
|
+
primary: '#0d6efd',
|
|
25
|
+
radius: '0.375rem',
|
|
26
|
+
padding: '0.5rem 0.75rem',
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
29
|
+
function provideMnTheme(partial) {
|
|
30
|
+
return {
|
|
31
|
+
provide: MN_THEME,
|
|
32
|
+
useFactory: (defaults) => ({ ...defaults, ...partial }),
|
|
33
|
+
deps: [MN_THEME],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/*
|
|
38
|
+
* Public API Surface of mn-lib
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Generated bundle index. Do not edit.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
export { MN_THEME, MnAngularLib, provideMnTheme };
|
|
46
|
+
//# sourceMappingURL=mn-angular-lib.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mn-angular-lib.mjs","sources":["../../../projects/mn-angular-lib/src/lib/mn-angular-lib.ts","../../../projects/mn-angular-lib/src/lib/styles/themes.ts","../../../projects/mn-angular-lib/src/public-api.ts","../../../projects/mn-angular-lib/src/mn-angular-lib.ts"],"sourcesContent":["import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'lib-mn-lib',\r\n imports: [],\r\n template: `\r\n <p>\r\n mn-angular-lib works!\r\n </p>\r\n `,\r\n styles: ``,\r\n})\r\nexport class MnAngularLib {\r\n\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\n\r\nexport interface MnTheme {\r\n primary: string;\r\n radius: string;\r\n padding: string;\r\n}\r\n\r\nexport const MN_THEME = new InjectionToken<MnTheme>('MN_THEME', {\r\n providedIn: 'root',\r\n factory: () => ({\r\n primary: '#0d6efd',\r\n radius: '0.375rem',\r\n padding: '0.5rem 0.75rem',\r\n }),\r\n});\r\n\r\nexport function provideMnTheme(partial: Partial<MnTheme>) {\r\n return {\r\n provide: MN_THEME,\r\n useFactory: (defaults: MnTheme) => ({ ...defaults, ...partial }),\r\n deps: [MN_THEME],\r\n } as const;\r\n}\r\n","/*\r\n * Public API Surface of mn-lib\r\n */\r\n\r\nexport * from './lib/mn-angular-lib';\r\nexport * from './lib/styles/themes';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAYa,YAAY,CAAA;uGAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAPb,CAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAGU,YAAY,EAAA,UAAA,EAAA,CAAA;kBAVxB,SAAS;+BACE,YAAY,EAAA,OAAA,EACb,EAAE,EAAA,QAAA,EACD,CAAA;;;;AAIT,EAAA,CAAA,EAAA;;;MCDU,QAAQ,GAAG,IAAI,cAAc,CAAU,UAAU,EAAE;AAC9D,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,OAAO;AACd,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,MAAM,EAAE,UAAU;AAClB,QAAA,OAAO,EAAE,gBAAgB;KAC1B,CAAC;AACH,CAAA;AAEK,SAAU,cAAc,CAAC,OAAyB,EAAA;IACtD,OAAO;AACL,QAAA,OAAO,EAAE,QAAQ;AACjB,QAAA,UAAU,EAAE,CAAC,QAAiB,MAAM,EAAE,GAAG,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC;QAChE,IAAI,EAAE,CAAC,QAAQ,CAAC;KACR;AACZ;;ACvBA;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
declare class MnAngularLib {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MnAngularLib, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MnAngularLib, "lib-mn-lib", never, {}, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface MnTheme {
|
|
10
|
+
primary: string;
|
|
11
|
+
radius: string;
|
|
12
|
+
padding: string;
|
|
13
|
+
}
|
|
14
|
+
declare const MN_THEME: InjectionToken<MnTheme>;
|
|
15
|
+
declare function provideMnTheme(partial: Partial<MnTheme>): {
|
|
16
|
+
readonly provide: InjectionToken<MnTheme>;
|
|
17
|
+
readonly useFactory: (defaults: MnTheme) => {
|
|
18
|
+
primary: string;
|
|
19
|
+
radius: string;
|
|
20
|
+
padding: string;
|
|
21
|
+
};
|
|
22
|
+
readonly deps: readonly [InjectionToken<MnTheme>];
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { MN_THEME, MnAngularLib, provideMnTheme };
|
|
26
|
+
export type { MnTheme };
|
package/package.json
CHANGED
|
@@ -1,36 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mn-angular-lib",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@angular/cli": "^19.2.15",
|
|
26
|
-
"@angular/compiler-cli": "^19.2.0",
|
|
27
|
-
"@types/jasmine": "~5.1.0",
|
|
28
|
-
"jasmine-core": "~5.6.0",
|
|
29
|
-
"karma": "~6.4.0",
|
|
30
|
-
"karma-chrome-launcher": "~3.2.0",
|
|
31
|
-
"karma-coverage": "~2.2.0",
|
|
32
|
-
"karma-jasmine": "~5.1.0",
|
|
33
|
-
"karma-jasmine-html-reporter": "~2.1.0",
|
|
34
|
-
"typescript": "~5.7.2"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "mn-angular-lib",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^20.3.0",
|
|
6
|
+
"@angular/core": "^20.3.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"module": "fesm2022/mn-angular-lib.mjs",
|
|
13
|
+
"typings": "index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"default": "./fesm2022/mn-angular-lib.mjs"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
package/.editorconfig
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Editor configuration, see https://editorconfig.org
|
|
2
|
-
root = true
|
|
3
|
-
|
|
4
|
-
[*]
|
|
5
|
-
charset = utf-8
|
|
6
|
-
indent_style = space
|
|
7
|
-
indent_size = 2
|
|
8
|
-
insert_final_newline = true
|
|
9
|
-
trim_trailing_whitespace = true
|
|
10
|
-
|
|
11
|
-
[*.ts]
|
|
12
|
-
quote_type = single
|
|
13
|
-
ij_typescript_use_double_quotes = false
|
|
14
|
-
|
|
15
|
-
[*.md]
|
|
16
|
-
max_line_length = off
|
|
17
|
-
trim_trailing_whitespace = false
|
package/.idea/MnLib.iml
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
4
|
-
<content url="file://$MODULE_DIR$">
|
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
-
<excludeFolder url="file://$MODULE_DIR$/dist" />
|
|
7
|
-
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
8
|
-
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
9
|
-
</content>
|
|
10
|
-
<orderEntry type="inheritedJdk" />
|
|
11
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
12
|
-
</component>
|
|
13
|
-
</module>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="MaterialThemeProjectNewConfig">
|
|
4
|
-
<option name="metadata">
|
|
5
|
-
<MTProjectMetadataState>
|
|
6
|
-
<option name="migrated" value="true" />
|
|
7
|
-
<option name="pristineConfig" value="false" />
|
|
8
|
-
<option name="userId" value="1dc6c736:19234a3783a:-7ffe" />
|
|
9
|
-
</MTProjectMetadataState>
|
|
10
|
-
</option>
|
|
11
|
-
</component>
|
|
12
|
-
</project>
|
package/.idea/modules.xml
DELETED
package/.idea/vcs.xml
DELETED
package/.vscode/extensions.json
DELETED
package/.vscode/launch.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
3
|
-
"version": "0.2.0",
|
|
4
|
-
"configurations": [
|
|
5
|
-
{
|
|
6
|
-
"name": "ng serve",
|
|
7
|
-
"type": "chrome",
|
|
8
|
-
"request": "launch",
|
|
9
|
-
"preLaunchTask": "npm: start",
|
|
10
|
-
"url": "http://localhost:4200/"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"name": "ng test",
|
|
14
|
-
"type": "chrome",
|
|
15
|
-
"request": "launch",
|
|
16
|
-
"preLaunchTask": "npm: test",
|
|
17
|
-
"url": "http://localhost:9876/debug.html"
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
package/.vscode/tasks.json
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
|
|
3
|
-
"version": "2.0.0",
|
|
4
|
-
"tasks": [
|
|
5
|
-
{
|
|
6
|
-
"type": "npm",
|
|
7
|
-
"script": "start",
|
|
8
|
-
"isBackground": true,
|
|
9
|
-
"problemMatcher": {
|
|
10
|
-
"owner": "typescript",
|
|
11
|
-
"pattern": "$tsc",
|
|
12
|
-
"background": {
|
|
13
|
-
"activeOnStart": true,
|
|
14
|
-
"beginsPattern": {
|
|
15
|
-
"regexp": "(.*?)"
|
|
16
|
-
},
|
|
17
|
-
"endsPattern": {
|
|
18
|
-
"regexp": "bundle generation complete"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"type": "npm",
|
|
25
|
-
"script": "test",
|
|
26
|
-
"isBackground": true,
|
|
27
|
-
"problemMatcher": {
|
|
28
|
-
"owner": "typescript",
|
|
29
|
-
"pattern": "$tsc",
|
|
30
|
-
"background": {
|
|
31
|
-
"activeOnStart": true,
|
|
32
|
-
"beginsPattern": {
|
|
33
|
-
"regexp": "(.*?)"
|
|
34
|
-
},
|
|
35
|
-
"endsPattern": {
|
|
36
|
-
"regexp": "bundle generation complete"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
}
|
package/angular.json
DELETED
package/tsconfig.json
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
-
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
-
{
|
|
4
|
-
"compileOnSave": false,
|
|
5
|
-
"compilerOptions": {
|
|
6
|
-
"outDir": "./dist/out-tsc",
|
|
7
|
-
"strict": true,
|
|
8
|
-
"noImplicitOverride": true,
|
|
9
|
-
"noPropertyAccessFromIndexSignature": true,
|
|
10
|
-
"noImplicitReturns": true,
|
|
11
|
-
"noFallthroughCasesInSwitch": true,
|
|
12
|
-
"skipLibCheck": true,
|
|
13
|
-
"isolatedModules": true,
|
|
14
|
-
"esModuleInterop": true,
|
|
15
|
-
"experimentalDecorators": true,
|
|
16
|
-
"moduleResolution": "bundler",
|
|
17
|
-
"importHelpers": true,
|
|
18
|
-
"target": "ES2022",
|
|
19
|
-
"module": "ES2022"
|
|
20
|
-
},
|
|
21
|
-
"angularCompilerOptions": {
|
|
22
|
-
"enableI18nLegacyMessageIdFormat": false,
|
|
23
|
-
"strictInjectionParameters": true,
|
|
24
|
-
"strictInputAccessModifiers": true,
|
|
25
|
-
"strictTemplates": true
|
|
26
|
-
}
|
|
27
|
-
}
|