osi-cards-lib 1.0.0 → 1.1.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 +81 -36
- package/fesm2022/osi-cards-lib.mjs +91 -91
- package/index.d.ts +1304 -3
- package/package.json +10 -10
- package/esm2022/lib/components/ai-card-renderer/ai-card-renderer.component.mjs +0 -911
- package/esm2022/lib/components/card-preview/card-preview.component.mjs +0 -74
- package/esm2022/lib/components/card-skeleton/card-skeleton.component.mjs +0 -24
- package/esm2022/lib/components/masonry-grid/masonry-grid.component.mjs +0 -330
- package/esm2022/lib/components/section-renderer/section-renderer.component.mjs +0 -166
- package/esm2022/lib/components/sections/analytics-section/analytics-section.component.mjs +0 -70
- package/esm2022/lib/components/sections/base-section.component.mjs +0 -335
- package/esm2022/lib/components/sections/brand-colors-section/brand-colors-section.component.mjs +0 -89
- package/esm2022/lib/components/sections/chart-section/chart-section.component.mjs +0 -92
- package/esm2022/lib/components/sections/contact-card-section/contact-card-section.component.mjs +0 -70
- package/esm2022/lib/components/sections/event-section/event-section.component.mjs +0 -32
- package/esm2022/lib/components/sections/fallback-section/fallback-section.component.mjs +0 -16
- package/esm2022/lib/components/sections/financials-section/financials-section.component.mjs +0 -53
- package/esm2022/lib/components/sections/info-section.component.mjs +0 -68
- package/esm2022/lib/components/sections/list-section/list-section.component.mjs +0 -36
- package/esm2022/lib/components/sections/map-section/map-section.component.mjs +0 -52
- package/esm2022/lib/components/sections/network-card-section/network-card-section.component.mjs +0 -41
- package/esm2022/lib/components/sections/news-section/news-section.component.mjs +0 -44
- package/esm2022/lib/components/sections/overview-section/overview-section.component.mjs +0 -47
- package/esm2022/lib/components/sections/product-section/product-section.component.mjs +0 -129
- package/esm2022/lib/components/sections/quotation-section/quotation-section.component.mjs +0 -39
- package/esm2022/lib/components/sections/social-media-section/social-media-section.component.mjs +0 -45
- package/esm2022/lib/components/sections/solutions-section/solutions-section.component.mjs +0 -29
- package/esm2022/lib/components/sections/text-reference-section/text-reference-section.component.mjs +0 -42
- package/esm2022/lib/icons/index.mjs +0 -2
- package/esm2022/lib/icons/lucide-icons.module.mjs +0 -91
- package/esm2022/lib/models/card.model.mjs +0 -111
- package/esm2022/lib/models/index.mjs +0 -2
- package/esm2022/lib/services/icon.service.mjs +0 -148
- package/esm2022/lib/services/index.mjs +0 -5
- package/esm2022/lib/services/magnetic-tilt.service.mjs +0 -224
- package/esm2022/lib/services/section-normalization.service.mjs +0 -243
- package/esm2022/lib/services/section-utils.service.mjs +0 -122
- package/esm2022/lib/utils/card-diff.util.mjs +0 -327
- package/esm2022/lib/utils/index.mjs +0 -3
- package/esm2022/lib/utils/responsive.util.mjs +0 -14
- package/esm2022/osi-cards-lib.mjs +0 -5
- package/esm2022/public-api.mjs +0 -57
- package/lib/components/ai-card-renderer/ai-card-renderer.component.d.ts +0 -163
- package/lib/components/card-preview/card-preview.component.d.ts +0 -52
- package/lib/components/card-skeleton/card-skeleton.component.d.ts +0 -8
- package/lib/components/masonry-grid/masonry-grid.component.d.ts +0 -72
- package/lib/components/section-renderer/section-renderer.component.d.ts +0 -25
- package/lib/components/sections/analytics-section/analytics-section.component.d.ts +0 -32
- package/lib/components/sections/base-section.component.d.ts +0 -138
- package/lib/components/sections/brand-colors-section/brand-colors-section.component.d.ts +0 -28
- package/lib/components/sections/chart-section/chart-section.component.d.ts +0 -30
- package/lib/components/sections/contact-card-section/contact-card-section.component.d.ts +0 -35
- package/lib/components/sections/event-section/event-section.component.d.ts +0 -17
- package/lib/components/sections/fallback-section/fallback-section.component.d.ts +0 -7
- package/lib/components/sections/financials-section/financials-section.component.d.ts +0 -27
- package/lib/components/sections/info-section.component.d.ts +0 -33
- package/lib/components/sections/list-section/list-section.component.d.ts +0 -21
- package/lib/components/sections/map-section/map-section.component.d.ts +0 -22
- package/lib/components/sections/network-card-section/network-card-section.component.d.ts +0 -18
- package/lib/components/sections/news-section/news-section.component.d.ts +0 -16
- package/lib/components/sections/overview-section/overview-section.component.d.ts +0 -19
- package/lib/components/sections/product-section/product-section.component.d.ts +0 -57
- package/lib/components/sections/quotation-section/quotation-section.component.d.ts +0 -23
- package/lib/components/sections/social-media-section/social-media-section.component.d.ts +0 -11
- package/lib/components/sections/solutions-section/solutions-section.component.d.ts +0 -19
- package/lib/components/sections/text-reference-section/text-reference-section.component.d.ts +0 -25
- package/lib/icons/index.d.ts +0 -1
- package/lib/icons/lucide-icons.module.d.ts +0 -7
- package/lib/models/card.model.d.ts +0 -289
- package/lib/models/index.d.ts +0 -1
- package/lib/services/icon.service.d.ts +0 -9
- package/lib/services/index.d.ts +0 -4
- package/lib/services/magnetic-tilt.service.d.ts +0 -34
- package/lib/services/section-normalization.service.d.ts +0 -38
- package/lib/services/section-utils.service.d.ts +0 -46
- package/lib/utils/card-diff.util.d.ts +0 -52
- package/lib/utils/index.d.ts +0 -2
- package/lib/utils/responsive.util.d.ts +0 -2
- package/public-api.d.ts +0 -50
package/README.md
CHANGED
|
@@ -7,26 +7,68 @@ A standalone Angular library for rendering beautiful, interactive AI-powered car
|
|
|
7
7
|
### From npm (Recommended)
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install
|
|
10
|
+
npm install osi-cards-lib
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
The package is available on npm and can be installed directly. This is the easiest and recommended way to use the library.
|
|
14
14
|
|
|
15
|
+
**Package published at:** https://www.npmjs.com/package/osi-cards-lib
|
|
16
|
+
|
|
17
|
+
### Installation
|
|
18
|
+
|
|
19
|
+
The library now supports both Angular 18 and Angular 20, which should resolve most peer dependency conflicts. Simply install:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install osi-cards-lib
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If you still encounter conflicts, you can use:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install osi-cards-lib --legacy-peer-deps
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
#### Option 2: Update Incompatible Packages
|
|
32
|
+
|
|
33
|
+
If possible, update packages that require Angular 18 to versions compatible with Angular 20:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Check for Angular 20 compatible versions
|
|
37
|
+
npm view @ng-select/ng-select versions --json
|
|
38
|
+
npm view @angular-slider/ngx-slider versions --json
|
|
39
|
+
|
|
40
|
+
# Install compatible versions if available
|
|
41
|
+
npm install @ng-select/ng-select@latest --legacy-peer-deps
|
|
42
|
+
npm install @angular-slider/ngx-slider@latest --legacy-peer-deps
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Option 3: Use --force (Use with caution)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm install osi-cards-lib --force
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Note:** `osi-cards-lib` supports both Angular 18 and Angular 20, making it compatible with a wider range of projects and reducing peer dependency conflicts.
|
|
52
|
+
|
|
53
|
+
**Package published at:** https://www.npmjs.com/package/osi-cards-lib
|
|
54
|
+
|
|
15
55
|
## Peer Dependencies
|
|
16
56
|
|
|
17
|
-
The library requires the following peer dependencies:
|
|
57
|
+
The library supports both Angular 18 and Angular 20. It requires the following peer dependencies:
|
|
18
58
|
|
|
19
59
|
```json
|
|
20
60
|
{
|
|
21
|
-
"@angular/common": "^20.0.0",
|
|
22
|
-
"@angular/core": "^20.0.0",
|
|
23
|
-
"@angular/animations": "^20.0.0",
|
|
24
|
-
"@angular/platform-browser": "^20.0.0",
|
|
61
|
+
"@angular/common": "^18.0.0 || ^20.0.0",
|
|
62
|
+
"@angular/core": "^18.0.0 || ^20.0.0",
|
|
63
|
+
"@angular/animations": "^18.0.0 || ^20.0.0",
|
|
64
|
+
"@angular/platform-browser": "^18.0.0 || ^20.0.0",
|
|
25
65
|
"lucide-angular": "^0.548.0",
|
|
26
66
|
"rxjs": "~7.8.0"
|
|
27
67
|
}
|
|
28
68
|
```
|
|
29
69
|
|
|
70
|
+
**Note:** The library is compatible with both Angular 18 and Angular 20, which helps avoid peer dependency conflicts with other packages in your project.
|
|
71
|
+
|
|
30
72
|
### Optional Dependencies
|
|
31
73
|
|
|
32
74
|
For enhanced functionality (charts and maps), you can optionally install:
|
|
@@ -44,7 +86,7 @@ These are optional - the library works without them, but chart and map sections
|
|
|
44
86
|
Install the library using npm:
|
|
45
87
|
|
|
46
88
|
```bash
|
|
47
|
-
npm install
|
|
89
|
+
npm install osi-cards-lib
|
|
48
90
|
```
|
|
49
91
|
|
|
50
92
|
**For local development** (if using the library from a local path):
|
|
@@ -58,7 +100,7 @@ Or add to your `package.json`:
|
|
|
58
100
|
```json
|
|
59
101
|
{
|
|
60
102
|
"dependencies": {
|
|
61
|
-
"
|
|
103
|
+
"osi-cards-lib": "file:../OSI-Cards-1/dist/osi-cards-lib"
|
|
62
104
|
}
|
|
63
105
|
}
|
|
64
106
|
```
|
|
@@ -68,6 +110,9 @@ Or add to your `package.json`:
|
|
|
68
110
|
The library requires these peer dependencies. Install them if not already present:
|
|
69
111
|
|
|
70
112
|
```bash
|
|
113
|
+
npm install osi-cards-lib
|
|
114
|
+
npm install @angular/common@^18.0.0 @angular/core@^18.0.0 @angular/animations@^18.0.0 @angular/platform-browser@^18.0.0 lucide-angular@^0.548.0 rxjs@~7.8.0
|
|
115
|
+
# OR for Angular 20:
|
|
71
116
|
npm install @angular/common@^20.0.0 @angular/core@^20.0.0 @angular/animations@^20.0.0 @angular/platform-browser@^20.0.0 lucide-angular@^0.548.0 rxjs@~7.8.0
|
|
72
117
|
```
|
|
73
118
|
|
|
@@ -78,7 +123,7 @@ npm install @angular/common@^20.0.0 @angular/core@^20.0.0 @angular/animations@^2
|
|
|
78
123
|
Add this to your `src/styles.scss` (or `styles.css`):
|
|
79
124
|
|
|
80
125
|
```scss
|
|
81
|
-
@import '
|
|
126
|
+
@import 'osi-cards-lib/styles/_styles';
|
|
82
127
|
```
|
|
83
128
|
|
|
84
129
|
**Option B: Add to angular.json**
|
|
@@ -93,7 +138,7 @@ Add the styles path to your `angular.json`:
|
|
|
93
138
|
"build": {
|
|
94
139
|
"options": {
|
|
95
140
|
"styles": [
|
|
96
|
-
"node_modules
|
|
141
|
+
"node_modules/osi-cards-lib/styles/_styles.scss",
|
|
97
142
|
"src/styles.scss"
|
|
98
143
|
]
|
|
99
144
|
}
|
|
@@ -112,7 +157,7 @@ Add the styles path to your `angular.json`:
|
|
|
112
157
|
|
|
113
158
|
```typescript
|
|
114
159
|
import { Component } from '@angular/core';
|
|
115
|
-
import { AICardRendererComponent, AICardConfig } from '
|
|
160
|
+
import { AICardRendererComponent, AICardConfig } from 'osi-cards-lib';
|
|
116
161
|
|
|
117
162
|
@Component({
|
|
118
163
|
selector: 'app-my-component',
|
|
@@ -153,7 +198,7 @@ import {
|
|
|
153
198
|
AICardRendererComponent,
|
|
154
199
|
AICardConfig,
|
|
155
200
|
CardFieldInteractionEvent
|
|
156
|
-
} from '
|
|
201
|
+
} from 'osi-cards-lib';
|
|
157
202
|
|
|
158
203
|
@Component({
|
|
159
204
|
selector: 'app-card-example',
|
|
@@ -238,14 +283,14 @@ import {
|
|
|
238
283
|
CardAction, // Action configuration type
|
|
239
284
|
CardType, // Card type enum
|
|
240
285
|
SectionType // Section type union
|
|
241
|
-
} from '
|
|
286
|
+
} from 'osi-cards-lib';
|
|
242
287
|
```
|
|
243
288
|
|
|
244
289
|
### Step 6: Verify Installation
|
|
245
290
|
|
|
246
291
|
After completing the steps above, verify everything is working:
|
|
247
292
|
|
|
248
|
-
1. ✅ Check that `node_modules
|
|
293
|
+
1. ✅ Check that `node_modules/osi-cards-lib` exists
|
|
249
294
|
2. ✅ Verify components can be imported without TypeScript errors
|
|
250
295
|
3. ✅ Ensure styles are applied (check browser DevTools)
|
|
251
296
|
4. ✅ Test rendering a simple card in your application
|
|
@@ -260,7 +305,7 @@ import {
|
|
|
260
305
|
AICardRendererComponent,
|
|
261
306
|
MasonryGridComponent,
|
|
262
307
|
CardSkeletonComponent
|
|
263
|
-
} from '
|
|
308
|
+
} from 'osi-cards-lib';
|
|
264
309
|
```
|
|
265
310
|
|
|
266
311
|
#### Importing Services
|
|
@@ -270,7 +315,7 @@ import {
|
|
|
270
315
|
IconService,
|
|
271
316
|
SectionNormalizationService,
|
|
272
317
|
MagneticTiltService
|
|
273
|
-
} from '
|
|
318
|
+
} from 'osi-cards-lib';
|
|
274
319
|
```
|
|
275
320
|
|
|
276
321
|
#### Importing Utilities
|
|
@@ -278,7 +323,7 @@ import {
|
|
|
278
323
|
```typescript
|
|
279
324
|
import {
|
|
280
325
|
// Utility functions are available through the main export
|
|
281
|
-
} from '
|
|
326
|
+
} from 'osi-cards-lib';
|
|
282
327
|
```
|
|
283
328
|
|
|
284
329
|
See [IMPORT_EXAMPLE.md](./IMPORT_EXAMPLE.md) for comprehensive import examples and advanced usage patterns.
|
|
@@ -290,7 +335,7 @@ See [IMPORT_EXAMPLE.md](./IMPORT_EXAMPLE.md) for comprehensive import examples a
|
|
|
290
335
|
The card component accepts a `cardConfig` input of type `AICardConfig`. Here's a basic example:
|
|
291
336
|
|
|
292
337
|
```typescript
|
|
293
|
-
import { AICardConfig } from '
|
|
338
|
+
import { AICardConfig } from 'osi-cards-lib';
|
|
294
339
|
|
|
295
340
|
const card: AICardConfig = {
|
|
296
341
|
cardTitle: 'Company Profile',
|
|
@@ -526,7 +571,7 @@ Use path references in `package.json`:
|
|
|
526
571
|
```json
|
|
527
572
|
{
|
|
528
573
|
"dependencies": {
|
|
529
|
-
"
|
|
574
|
+
"osi-cards-lib": "file:../osi-cards-lib/dist/osi-cards-lib"
|
|
530
575
|
}
|
|
531
576
|
}
|
|
532
577
|
```
|
|
@@ -535,10 +580,10 @@ Use path references in `package.json`:
|
|
|
535
580
|
|
|
536
581
|
### Module Not Found
|
|
537
582
|
|
|
538
|
-
**Error**: `Cannot find module '
|
|
583
|
+
**Error**: `Cannot find module 'osi-cards-lib'`
|
|
539
584
|
|
|
540
585
|
**Solutions**:
|
|
541
|
-
- Ensure the library is installed: `npm install
|
|
586
|
+
- Ensure the library is installed: `npm install osi-cards-lib`
|
|
542
587
|
- If using local path, verify the path in `package.json` is correct
|
|
543
588
|
- Restart your development server after installation
|
|
544
589
|
- Clear `node_modules` and reinstall: `rm -rf node_modules && npm install`
|
|
@@ -549,7 +594,7 @@ Use path references in `package.json`:
|
|
|
549
594
|
|
|
550
595
|
**Solutions**:
|
|
551
596
|
- Verify styles are imported in `styles.scss` or `angular.json`
|
|
552
|
-
- Check the import path: `@import '
|
|
597
|
+
- Check the import path: `@import 'osi-cards-lib/styles/_styles';`
|
|
553
598
|
- Ensure SCSS is configured in your Angular project
|
|
554
599
|
- Restart the development server after adding styles
|
|
555
600
|
|
|
@@ -569,8 +614,8 @@ Use path references in `package.json`:
|
|
|
569
614
|
**Solutions**:
|
|
570
615
|
- Restart TypeScript server in your IDE (VS Code: Cmd/Ctrl + Shift + P → "TypeScript: Restart TS Server")
|
|
571
616
|
- Verify the library was built correctly: `ng build osi-cards-lib`
|
|
572
|
-
- Check that
|
|
573
|
-
- Ensure your Angular version is
|
|
617
|
+
- Check that `osi-cards-lib` is accessible in `node_modules`
|
|
618
|
+
- Ensure your Angular version is 18.0.0 or higher (18.x or 20.x supported)
|
|
574
619
|
|
|
575
620
|
### Build Errors
|
|
576
621
|
|
|
@@ -578,7 +623,7 @@ Use path references in `package.json`:
|
|
|
578
623
|
|
|
579
624
|
**Solutions**:
|
|
580
625
|
- Verify all peer dependencies are installed
|
|
581
|
-
- Check Angular version compatibility (requires Angular 20+)
|
|
626
|
+
- Check Angular version compatibility (requires Angular 18+ or 20+)
|
|
582
627
|
- Ensure all imports use the correct paths
|
|
583
628
|
- Clear build cache: `rm -rf .angular && ng build`
|
|
584
629
|
|
|
@@ -596,7 +641,7 @@ Use path references in `package.json`:
|
|
|
596
641
|
|
|
597
642
|
After importing the library, verify:
|
|
598
643
|
|
|
599
|
-
- [ ] Library is installed in `node_modules
|
|
644
|
+
- [ ] Library is installed in `node_modules/osi-cards-lib`
|
|
600
645
|
- [ ] All peer dependencies are installed
|
|
601
646
|
- [ ] Components can be imported without TypeScript errors
|
|
602
647
|
- [ ] Styles are imported and applied correctly
|
|
@@ -614,10 +659,10 @@ After importing the library, verify:
|
|
|
614
659
|
|
|
615
660
|
### Module Not Found
|
|
616
661
|
|
|
617
|
-
**Error**: `Cannot find module '
|
|
662
|
+
**Error**: `Cannot find module 'osi-cards-lib'`
|
|
618
663
|
|
|
619
664
|
**Solutions**:
|
|
620
|
-
- Ensure the library is installed: `npm install
|
|
665
|
+
- Ensure the library is installed: `npm install osi-cards-lib`
|
|
621
666
|
- If using local path, verify the path in `package.json` is correct
|
|
622
667
|
- Restart your development server after installation
|
|
623
668
|
- Clear `node_modules` and reinstall: `rm -rf node_modules && npm install`
|
|
@@ -628,7 +673,7 @@ After importing the library, verify:
|
|
|
628
673
|
|
|
629
674
|
**Solutions**:
|
|
630
675
|
- Verify styles are imported in `styles.scss` or `angular.json`
|
|
631
|
-
- Check the import path: `@import '
|
|
676
|
+
- Check the import path: `@import 'osi-cards-lib/styles/_styles';`
|
|
632
677
|
- Ensure SCSS is configured in your Angular project
|
|
633
678
|
- Restart the development server after adding styles
|
|
634
679
|
|
|
@@ -648,8 +693,8 @@ After importing the library, verify:
|
|
|
648
693
|
**Solutions**:
|
|
649
694
|
- Restart TypeScript server in your IDE (VS Code: Cmd/Ctrl + Shift + P → "TypeScript: Restart TS Server")
|
|
650
695
|
- Verify the library was built correctly: `ng build osi-cards-lib`
|
|
651
|
-
- Check that
|
|
652
|
-
- Ensure your Angular version is
|
|
696
|
+
- Check that `osi-cards-lib` is accessible in `node_modules`
|
|
697
|
+
- Ensure your Angular version is 18.0.0 or higher (18.x or 20.x supported)
|
|
653
698
|
|
|
654
699
|
### Build Errors
|
|
655
700
|
|
|
@@ -657,7 +702,7 @@ After importing the library, verify:
|
|
|
657
702
|
|
|
658
703
|
**Solutions**:
|
|
659
704
|
- Verify all peer dependencies are installed
|
|
660
|
-
- Check Angular version compatibility (requires Angular 20+)
|
|
705
|
+
- Check Angular version compatibility (requires Angular 18+ or 20+)
|
|
661
706
|
- Ensure all imports use the correct paths
|
|
662
707
|
- Clear build cache: `rm -rf .angular && ng build`
|
|
663
708
|
|
|
@@ -679,7 +724,7 @@ If you're migrating from using the app directly to using the library:
|
|
|
679
724
|
|
|
680
725
|
1. **Install the library**:
|
|
681
726
|
```bash
|
|
682
|
-
npm install
|
|
727
|
+
npm install osi-cards-lib
|
|
683
728
|
```
|
|
684
729
|
|
|
685
730
|
2. **Update imports**:
|
|
@@ -688,12 +733,12 @@ If you're migrating from using the app directly to using the library:
|
|
|
688
733
|
import { AICardRendererComponent } from './shared/components/cards';
|
|
689
734
|
|
|
690
735
|
// After
|
|
691
|
-
import { AICardRendererComponent } from '
|
|
736
|
+
import { AICardRendererComponent } from 'osi-cards-lib';
|
|
692
737
|
```
|
|
693
738
|
|
|
694
739
|
3. **Import styles**:
|
|
695
740
|
```scss
|
|
696
|
-
@import '
|
|
741
|
+
@import 'osi-cards-lib/styles/_styles';
|
|
697
742
|
```
|
|
698
743
|
|
|
699
744
|
4. **Update service usage**:
|
|
@@ -721,7 +766,7 @@ If you're migrating from using the app directly to using the library:
|
|
|
721
766
|
To add custom section types, extend the library components or create your own:
|
|
722
767
|
|
|
723
768
|
```typescript
|
|
724
|
-
import { BaseSectionComponent } from '
|
|
769
|
+
import { BaseSectionComponent } from 'osi-cards-lib';
|
|
725
770
|
|
|
726
771
|
@Component({
|
|
727
772
|
selector: 'app-custom-section',
|