osi-cards-lib 1.5.32 → 1.5.34

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 (87) hide show
  1. package/fesm2022/osi-cards-lib.mjs +31889 -0
  2. package/fesm2022/osi-cards-lib.mjs.map +1 -0
  3. package/index.d.ts +11528 -0
  4. package/package.json +25 -13
  5. package/scripts/setup-angular-styles.js +169 -0
  6. package/styles/_components.scss +38 -0
  7. package/styles/_index.scss +25 -0
  8. package/styles/_osi-cards-mixins.scss +459 -0
  9. package/styles/_osi-cards-tokens.scss +333 -0
  10. package/styles/_styles-scoped.scss +81 -0
  11. package/styles/_styles.scss +26 -0
  12. package/styles/bundles/_ai-card.scss +245 -0
  13. package/styles/bundles/_all.scss +68 -0
  14. package/styles/bundles/_base.scss +60 -0
  15. package/styles/bundles/_card-skeleton.scss +290 -0
  16. package/styles/bundles/_index.scss +25 -0
  17. package/styles/bundles/_sections.scss +48 -0
  18. package/styles/bundles/_tokens-only.scss +139 -0
  19. package/styles/components/_ai-card-renderer.scss +104 -0
  20. package/styles/components/_badges.scss +317 -0
  21. package/styles/components/_card-actions.scss +169 -0
  22. package/styles/components/_card-footer.scss +47 -0
  23. package/styles/components/_component-styles.scss +205 -0
  24. package/styles/components/_empty-state.scss +630 -0
  25. package/styles/components/_hero-card.scss +422 -0
  26. package/styles/components/_image-fallback.scss +28 -0
  27. package/styles/components/_streaming-effects.scss +518 -0
  28. package/styles/components/cards/_ai-card.scss +718 -0
  29. package/styles/components/sections/_all-sections.generated.scss +41 -0
  30. package/styles/components/sections/_all-sections.scss +1086 -0
  31. package/styles/components/sections/_balanced-compact-system.scss +186 -0
  32. package/styles/components/sections/_compact-mixins.scss +180 -0
  33. package/styles/components/sections/_component-mixins.scss +454 -0
  34. package/styles/components/sections/_design-system.scss +477 -0
  35. package/styles/components/sections/_design-tokens.scss +308 -0
  36. package/styles/components/sections/_enhanced-design-variables.scss +147 -0
  37. package/styles/components/sections/_master-compact-system.scss +302 -0
  38. package/styles/components/sections/_master-dense-system.scss +239 -0
  39. package/styles/components/sections/_minimalistic-design.scss +268 -0
  40. package/styles/components/sections/_modern-effects.scss +392 -0
  41. package/styles/components/sections/_modern-sections.scss +351 -0
  42. package/styles/components/sections/_perfect-system.scss +204 -0
  43. package/styles/components/sections/_section-animations.scss +331 -0
  44. package/styles/components/sections/_section-shell.scss +337 -0
  45. package/styles/components/sections/_section-types.generated.scss +30 -0
  46. package/styles/components/sections/_sections-all.scss +26 -0
  47. package/styles/components/sections/_sections-base.scss +334 -0
  48. package/styles/components/sections/_typography-system.scss +327 -0
  49. package/styles/components/sections/_ultra-compact-tokens.scss +375 -0
  50. package/styles/components/sections/_unified-section-style.scss +157 -0
  51. package/styles/components/sections/_utility-classes.scss +567 -0
  52. package/styles/components/sections/_visual-effects-library.scss +374 -0
  53. package/styles/core/_animations.scss +1498 -0
  54. package/styles/core/_bootstrap-reset.scss +445 -0
  55. package/styles/core/_color-helpers.scss +46 -0
  56. package/styles/core/_global-unified.scss +118 -0
  57. package/styles/core/_global.scss +73 -0
  58. package/styles/core/_mixins.scss +491 -0
  59. package/styles/core/_surface-layers.scss +76 -0
  60. package/styles/core/_utilities.scss +326 -0
  61. package/styles/core/_variables-unified.scss +57 -0
  62. package/styles/core/_variables.scss +36 -0
  63. package/styles/core/variables/_colors-source.scss +34 -0
  64. package/styles/core/variables/_colors-unified.scss +26 -0
  65. package/styles/core/variables/_colors.scss +21 -0
  66. package/styles/critical.scss +353 -0
  67. package/styles/design-system/_compact-theme.scss +159 -0
  68. package/styles/design-system/_section-base.scss +426 -0
  69. package/styles/design-system/_tokens.scss +237 -0
  70. package/styles/design-system/_unified-sections.scss +215 -0
  71. package/styles/layout/_feature-grid.scss +322 -0
  72. package/styles/layout/_masonry.scss +734 -0
  73. package/styles/layout/_tilt.scss +244 -0
  74. package/styles/micro-interactions.scss +583 -0
  75. package/styles/mixins/_section-mixins.scss +280 -0
  76. package/styles/non-critical.scss +643 -0
  77. package/styles/reset/_framework-reset.scss +457 -0
  78. package/styles/reset/_index.scss +14 -0
  79. package/styles/reset/_shadow-reset.scss +383 -0
  80. package/styles/responsive.scss +326 -0
  81. package/styles/themes.scss +573 -0
  82. package/styles/tokens/_index.scss +92 -0
  83. package/styles/tokens/_master.scss +1404 -0
  84. package/styles/tokens/_section-tokens.generated.scss +140 -0
  85. package/postcss.config.js +0 -81
  86. package/section-registry.json +0 -3864
  87. package/section-registry.schema.json +0 -264
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "osi-cards-lib",
3
- "version": "1.5.32",
3
+ "version": "1.5.34",
4
4
  "description": "Standalone OSI Cards library for Angular applications with CSS Layer support for easy style overrides",
5
5
  "keywords": [
6
6
  "angular",
@@ -12,26 +12,35 @@
12
12
  ],
13
13
  "author": "",
14
14
  "license": "MIT",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/Inutilepat83/OSI-Cards.git"
18
+ },
19
+ "bugs": {
20
+ "url": "https://github.com/Inutilepat83/OSI-Cards/issues"
21
+ },
22
+ "homepage": "https://github.com/Inutilepat83/OSI-Cards#readme",
15
23
  "peerDependencies": {
16
- "@angular/common": "^18.0.0 || ^20.0.0",
17
24
  "@angular/core": "^18.0.0 || ^20.0.0",
18
- "@angular/animations": "^18.0.0 || ^20.0.0",
25
+ "@angular/common": "^18.0.0 || ^20.0.0",
26
+ "@angular/forms": "^18.0.0 || ^20.0.0",
27
+ "@angular/router": "^18.0.0 || ^20.0.0",
19
28
  "@angular/platform-browser": "^18.0.0 || ^20.0.0",
29
+ "@ngrx/store": "^17.0.0 || ^18.0.0",
30
+ "@ngrx/effects": "^17.0.0 || ^18.0.0",
31
+ "@ngrx/entity": "^17.0.0 || ^18.0.0",
32
+ "rxjs": "~7.8.0",
33
+ "zone.js": "~0.14.0 || ~0.15.0"
34
+ },
35
+ "dependencies": {
20
36
  "lucide-angular": "^0.548.0",
21
- "rxjs": "~7.8.0"
37
+ "lucide": "^0.548.0",
38
+ "tslib": "^2.3.0"
22
39
  },
23
40
  "optionalDependencies": {
24
41
  "chart.js": "^4.4.0",
25
42
  "leaflet": "^1.9.4"
26
43
  },
27
- "repository": {
28
- "type": "git",
29
- "url": "git+https://github.com/Inutilepat83/OSI-Cards.git"
30
- },
31
- "homepage": "https://github.com/Inutilepat83/OSI-Cards#readme",
32
- "bugs": {
33
- "url": "https://github.com/Inutilepat83/OSI-Cards/issues"
34
- },
35
44
  "exports": {
36
45
  "./package.json": {
37
46
  "default": "./package.json"
@@ -79,8 +88,11 @@
79
88
  "default": "./styles/osi-cards-standalone.css"
80
89
  }
81
90
  },
91
+ "main": "./fesm2022/osi-cards-lib.mjs",
92
+ "module": "./fesm2022/osi-cards-lib.mjs",
93
+ "typings": "./index.d.ts",
82
94
  "sideEffects": [
83
95
  "*.css",
84
96
  "*.scss"
85
97
  ]
86
- }
98
+ }
@@ -0,0 +1,169 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Setup Script for OSI Cards Library
5
+ *
6
+ * Automatically adds library styles to angular.json
7
+ * This script can be run manually or as a post-install hook
8
+ *
9
+ * Usage:
10
+ * node scripts/setup-angular-styles.js
11
+ * OR
12
+ * npm run setup:styles (if added to package.json)
13
+ */
14
+
15
+ const fs = require('fs');
16
+ const path = require('path');
17
+
18
+ const colors = {
19
+ reset: '\x1b[0m',
20
+ green: '\x1b[32m',
21
+ red: '\x1b[31m',
22
+ yellow: '\x1b[33m',
23
+ blue: '\x1b[34m',
24
+ };
25
+
26
+ function log(msg, color = colors.reset) {
27
+ console.log(`${color}${msg}${colors.reset}`);
28
+ }
29
+
30
+ function findAngularJson(startPath = process.cwd()) {
31
+ let currentPath = startPath;
32
+ const rootPath = path.parse(currentPath).root;
33
+
34
+ while (currentPath !== rootPath) {
35
+ const angularJsonPath = path.join(currentPath, 'angular.json');
36
+ if (fs.existsSync(angularJsonPath)) {
37
+ return angularJsonPath;
38
+ }
39
+ currentPath = path.dirname(currentPath);
40
+ }
41
+
42
+ return null;
43
+ }
44
+
45
+ function updateAngularJson(angularJsonPath) {
46
+ try {
47
+ const angularJson = JSON.parse(fs.readFileSync(angularJsonPath, 'utf8'));
48
+ let modified = false;
49
+
50
+ // Find all projects
51
+ for (const projectName in angularJson.projects) {
52
+ const project = angularJson.projects[projectName];
53
+
54
+ if (project.projectType === 'application' && project.architect?.build?.options) {
55
+ const buildOptions = project.architect.build.options;
56
+
57
+ // Check if styles array exists
58
+ if (!buildOptions.styles) {
59
+ buildOptions.styles = [];
60
+ }
61
+
62
+ // Check if library styles are already added
63
+ const libraryStylePath = 'node_modules/osi-cards-lib/styles/_styles-scoped.scss';
64
+ const hasLibraryStyles = buildOptions.styles.some(
65
+ (style) => style.includes('osi-cards-lib') && style.includes('_styles-scoped')
66
+ );
67
+
68
+ if (!hasLibraryStyles) {
69
+ // Add library styles after the main styles file
70
+ const mainStyleIndex = buildOptions.styles.findIndex(
71
+ (style) =>
72
+ style.includes('styles.sass') ||
73
+ style.includes('styles.scss') ||
74
+ style.includes('styles.css')
75
+ );
76
+
77
+ if (mainStyleIndex >= 0) {
78
+ buildOptions.styles.splice(mainStyleIndex + 1, 0, libraryStylePath);
79
+ } else {
80
+ buildOptions.styles.unshift(libraryStylePath);
81
+ }
82
+ modified = true;
83
+ log(`✓ Added library styles to project: ${projectName}`, colors.green);
84
+ } else {
85
+ log(`ℹ Library styles already configured in project: ${projectName}`, colors.blue);
86
+ }
87
+
88
+ // Ensure stylePreprocessorOptions exists
89
+ if (!buildOptions.stylePreprocessorOptions) {
90
+ buildOptions.stylePreprocessorOptions = {};
91
+ }
92
+
93
+ // Add includePaths if not present
94
+ if (!buildOptions.stylePreprocessorOptions.includePaths) {
95
+ buildOptions.stylePreprocessorOptions.includePaths = [];
96
+ }
97
+
98
+ const hasIncludePath = buildOptions.stylePreprocessorOptions.includePaths.some((path) =>
99
+ path.includes('osi-cards-lib')
100
+ );
101
+
102
+ if (!hasIncludePath) {
103
+ buildOptions.stylePreprocessorOptions.includePaths.push(
104
+ 'node_modules/osi-cards-lib/styles'
105
+ );
106
+ modified = true;
107
+ log(`✓ Added includePaths to project: ${projectName}`, colors.green);
108
+ }
109
+
110
+ // Ensure sass options exist
111
+ if (!buildOptions.stylePreprocessorOptions.sass) {
112
+ buildOptions.stylePreprocessorOptions.sass = {};
113
+ }
114
+
115
+ if (!buildOptions.stylePreprocessorOptions.sass.silenceDeprecations) {
116
+ buildOptions.stylePreprocessorOptions.sass.silenceDeprecations = ['import'];
117
+ modified = true;
118
+ log(`✓ Added SASS deprecation silence to project: ${projectName}`, colors.green);
119
+ }
120
+ }
121
+ }
122
+
123
+ if (modified) {
124
+ // Write back with proper formatting
125
+ fs.writeFileSync(angularJsonPath, JSON.stringify(angularJson, null, 2) + '\n', 'utf8');
126
+ log('\n✅ Successfully updated angular.json!', colors.green);
127
+ log('\nNext steps:', colors.blue);
128
+ log('1. Remove the @import from your styles.sass/scss file if present', colors.yellow);
129
+ log('2. Rebuild your app: ng build or npm start', colors.yellow);
130
+ return true;
131
+ } else {
132
+ log('\nℹ angular.json is already configured correctly.', colors.blue);
133
+ return false;
134
+ }
135
+ } catch (error) {
136
+ log(`\n✗ Error updating angular.json: ${error.message}`, colors.red);
137
+ return false;
138
+ }
139
+ }
140
+
141
+ function main() {
142
+ log('\n═══════════════════════════════════════════════════════', colors.blue);
143
+ log(' OSI Cards Library - Angular Styles Setup', colors.blue);
144
+ log('═══════════════════════════════════════════════════════\n', colors.blue);
145
+
146
+ const angularJsonPath = findAngularJson();
147
+
148
+ if (!angularJsonPath) {
149
+ log("✗ angular.json not found. Make sure you're in an Angular project directory.", colors.red);
150
+ process.exit(1);
151
+ }
152
+
153
+ log(`Found angular.json at: ${angularJsonPath}\n`, colors.blue);
154
+
155
+ const success = updateAngularJson(angularJsonPath);
156
+
157
+ if (success) {
158
+ process.exit(0);
159
+ } else {
160
+ process.exit(0); // Still exit successfully if already configured
161
+ }
162
+ }
163
+
164
+ // Run if called directly
165
+ if (require.main === module) {
166
+ main();
167
+ }
168
+
169
+ module.exports = { updateAngularJson, findAngularJson };
@@ -0,0 +1,38 @@
1
+ /* ===================================================================
2
+ SHARED COMPONENT STYLES BUNDLE
3
+
4
+ This file contains all component imports shared across all entry points:
5
+ - _styles.scss (demo app, :root scope)
6
+ - _styles-scoped.scss (integration, .osi-cards-container scope)
7
+ - _styles-standalone.scss (full isolation with Bootstrap reset)
8
+
9
+ Each entry point imports this bundle after setting up its scope and variables.
10
+
11
+ Note: Using @import here as Sass @use/@forward requires restructuring
12
+ the entire SCSS architecture. These warnings can be safely ignored
13
+ until Dart Sass 3.0.0 when migration will be required.
14
+ =================================================================== */
15
+
16
+ // Core styles (must come first, after variables)
17
+ @import "core/mixins";
18
+ @import "core/surface-layers";
19
+ @import "core/global";
20
+ @import "core/utilities";
21
+ @import "core/animations";
22
+
23
+ // Streaming effects (must come after animations)
24
+ @import "components/streaming-effects";
25
+
26
+ // Layout styles
27
+ @import "layout/tilt";
28
+ @import "layout/masonry";
29
+ @import "layout/feature-grid";
30
+
31
+ // Hero card and feature card styles
32
+ @import "components/hero-card";
33
+
34
+ // Component styles
35
+ @import "components/cards/ai-card";
36
+
37
+ // All section styles (consolidated)
38
+ @import "components/sections/sections-all";
@@ -0,0 +1,25 @@
1
+ /**
2
+ * OSI Cards Style System
3
+ * Single entry point for all styles
4
+ *
5
+ * Usage in applications:
6
+ * @use 'osi-cards-lib/styles' as osi;
7
+ *
8
+ * Or import individual parts:
9
+ * @use 'osi-cards-lib/styles/tokens' as tokens;
10
+ * @use 'osi-cards-lib/styles/mixins' as mixins;
11
+ */
12
+
13
+ // Design tokens (CSS custom properties)
14
+ @forward "osi-cards-tokens";
15
+
16
+ // SCSS mixins and utilities
17
+ @forward "osi-cards-mixins";
18
+
19
+ // Component styles
20
+ @forward "components/card" as card-*;
21
+ @forward "components/section" as section-*;
22
+
23
+ // Optional: Theme utilities
24
+ @forward "themes/light" as light-*;
25
+ @forward "themes/dark" as dark-*;