@aitronos/freddy-plugins 0.4.0 → 0.4.1

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/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
- ## 0.4.0 (2025-09-10)
1
+ ## 0.4.1 (2025-09-11)
2
2
 
3
- - Manual version bump (minor)
3
+ Releasing liscence
4
+
5
+ ## 0.4.0 (2025-09-11)
6
+
7
+ New web components feature
4
8
 
5
9
  ## 0.3.1 (2025-09-03)
6
10
 
package/README.md CHANGED
@@ -1,273 +1,396 @@
1
- # 🎨 Aitronos Freddy Plugins - Storybook
1
+ # Freddy Plugins
2
2
 
3
- A comprehensive Vue.js component library with Storybook documentation, deployed across multiple environments on Google Cloud Platform.
3
+ A lightweight, dynamic, and feature-rich component library that provides a comprehensive set of UI components, icons, animations, and utilities. Built with Vue 3 and designed to work seamlessly across multiple frameworks including Vue, Angular, React, and vanilla JavaScript applications.
4
4
 
5
- ## 🚀 **Live Environments**
5
+ ## Features
6
6
 
7
- | Environment | URL | Branch | Status |
8
- | --------------- | -------------------------------------------------------------------------- | --------- | ---------- |
9
- | **Development** | [dev-components.aitronos.com](https://dev-components.aitronos.com) | `develop` | Live |
10
- | **Staging** | [staging-components.aitronos.com](https://staging-components.aitronos.com) | `staging` | 🚧 Pending |
11
- | **Production** | [components.aitronos.com](https://components.aitronos.com) | `main` | 🚧 Pending |
7
+ - **🚀 Lightweight**: Optimized bundle size with tree-shaking support
8
+ - **🔄 Dynamic**: Auto-updating components with new features and improvements
9
+ - **🎨 Rich**: 20+ components, 120+ icons, animations, and utilities
10
+ - **🌐 Universal**: Works with Vue, Angular, React, and any JavaScript framework
11
+ - **📱 Responsive**: Mobile-first design with modern CSS
12
+ - **🎯 TypeScript**: Full TypeScript support with type definitions
13
+ - **🎭 Web Components**: Framework-agnostic custom elements
14
+ - **📚 Storybook**: Interactive documentation and live demos
12
15
 
13
- ## 🏗️ **Infrastructure & Costs**
16
+ ## 📦 Installation
14
17
 
15
- ### **Resource Allocation**
16
-
17
- | Environment | Memory | CPU | Max Instances | Estimated Cost/Month |
18
- | --------------- | ------ | --- | ------------- | -------------------- |
19
- | **Development** | 1Gi | 1 | 10 | ~$15-25 |
20
- | **Staging** | 1Gi | 1 | 10 | ~$15-25 |
21
- | **Production** | 2Gi | 2 | 20 | ~$30-50 |
18
+ ```bash
19
+ # npm
20
+ npm install @aitronos/freddy-plugins
22
21
 
23
- ### **Cost Breakdown**
22
+ # yarn
23
+ yarn add @aitronos/freddy-plugins
24
24
 
25
- **Google Cloud Run Pricing (Switzerland - europe-west6):**
25
+ # pnpm
26
+ pnpm add @aitronos/freddy-plugins
27
+ ```
26
28
 
27
- - **CPU**: $0.00002400 per vCPU-second
28
- - **Memory**: $0.00000250 per GiB-second
29
- - **Requests**: $0.40 per million requests
29
+ ## 🔄 Updating to New Version
30
30
 
31
- **Estimated Monthly Costs:**
31
+ To get the latest features, components, and bug fixes, simply update the package:
32
32
 
33
- - **Development**: $15-25 (low traffic, testing)
34
- - **Staging**: $15-25 (pre-production testing)
35
- - **Production**: $30-50 (live traffic)
36
- - **Total Estimated**: $60-100/month
33
+ ```bash
34
+ # npm - Update to latest version
35
+ npm update @aitronos/freddy-plugins
37
36
 
38
- **Additional Costs:**
37
+ # npm - Install specific version
38
+ npm install @aitronos/freddy-plugins@2.1.0
39
39
 
40
- - **Artifact Registry**: ~$5-10/month (Docker images)
41
- - **Cloud Build**: ~$5-15/month (CI/CD builds)
42
- - **Network Egress**: ~$5-10/month (traffic)
40
+ # yarn - Update to latest version
41
+ yarn upgrade @aitronos/freddy-plugins
43
42
 
44
- **Total Estimated Monthly Cost: $75-135**
43
+ # yarn - Install specific version
44
+ yarn add @aitronos/freddy-plugins@2.1.0
45
45
 
46
- ### **Cost Optimization**
46
+ # pnpm - Update to latest version
47
+ pnpm update @aitronos/freddy-plugins
47
48
 
48
- - **Auto-scaling**: Instances scale to 0 when not in use
49
- - **Switzerland region**: Lower latency for European users
50
- - ✅ **Efficient builds**: Single-stage Docker builds
51
- - ✅ **Resource limits**: Conservative max instances
49
+ # pnpm - Install specific version
50
+ pnpm add @aitronos/freddy-plugins@2.1.0
51
+ ```
52
52
 
53
- ## 🔧 **Technology Stack**
53
+ **✨ No code changes needed!** New components and features are automatically available after updating.
54
54
 
55
- - **Framework**: Vue.js 3 + TypeScript
56
- - **Documentation**: Storybook 7
57
- - **Package Manager**: Yarn 4.7.0
58
- - **Web Components**: Vue 3 Custom Elements (Angular/React support)
59
- - **Deployment**: Google Cloud Run
60
- - **CI/CD**: GitHub Actions
61
- - **Container Registry**: Artifact Registry
62
- - **Web Server**: Nginx
63
- - **Region**: Switzerland (europe-west6)
55
+ ## 🎨 Storybook Documentation
64
56
 
65
- ## 📦 **Components**
57
+ Explore all components, icons, and utilities with interactive demos:
66
58
 
67
- ### **Core Components**
59
+ **[📚 View Storybook →](https://aitronos-freddy-plugins.vercel.app/)**
68
60
 
69
- - `Button` - Primary action buttons
70
- - `InputField` - Form input components
71
- - `Modal` - Dialog and modal components
72
- - `Dropdown` - Selection components
73
- - `Pagination` - Navigation components
61
+ The Storybook provides:
74
62
 
75
- ### **Specialized Components**
63
+ - Live component demos
64
+ - Interactive controls and props
65
+ - Code examples for each component
66
+ - Icon gallery with search functionality
67
+ - Animation showcases
68
+ - Utility function documentation
76
69
 
77
- - `ChatInterface` - Real-time chat components
78
- - `ApiInteraction` - API testing interface
79
- - `LoginRegister` - Authentication components
80
- - `IconLibrary` - Complete icon set (100+ icons)
70
+ ## 🅰️ Angular Usage
81
71
 
82
- ### **Utility Components**
72
+ ### Installation & Setup
83
73
 
84
- - `Spinner` - Loading indicators
85
- - `ToastMessage` - Notification system
86
- - `Tooltip` - Information overlays
87
- - `CodeBlock` - Syntax highlighting
74
+ ```bash
75
+ npm install @aitronos/freddy-plugins
76
+ ```
88
77
 
89
- ## 🚀 **Deployment Process**
78
+ ### Import Web Components
90
79
 
91
- ### **Automated CI/CD Pipeline**
80
+ **Option 1: Global Registration (Recommended)**
92
81
 
93
- 1. **Push to branch** triggers GitHub Actions
94
- 2. **Build Storybook** locally in container
95
- 3. **Verify build** success (check storybook-static)
96
- 4. **Build Docker image** with built files
97
- 5. **Push to Artifact Registry**
98
- 6. **Deploy to Cloud Run** with environment config
82
+ ```typescript
83
+ // main.ts
84
+ import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
85
+ import { AppModule } from "./app/app.module";
99
86
 
100
- ### **Environment-Specific Deployments**
87
+ // Import web components and CSS
88
+ import "@aitronos/freddy-plugins/web-components";
89
+ import "@aitronos/freddy-plugins/dist/freddy-plugins.css";
101
90
 
102
- ```bash
103
- # Development (develop branch)
104
- git push origin develop
91
+ platformBrowserDynamic()
92
+ .bootstrapModule(AppModule)
93
+ .catch((err) => console.error(err));
94
+ ```
105
95
 
106
- # Staging (staging branch)
107
- git push origin staging
96
+ **Option 2: Component-level Import**
108
97
 
109
- # Production (main branch)
110
- git push origin main
98
+ ```typescript
99
+ // app.component.ts
100
+ import { Component } from "@angular/core";
101
+ import "@aitronos/freddy-plugins/web-components";
102
+ import "@aitronos/freddy-plugins/dist/freddy-plugins.css";
103
+
104
+ @Component({
105
+ selector: "app-root",
106
+ template: `
107
+ <div>
108
+ <h1>My Angular App</h1>
109
+ <freddy-button>Click me!</freddy-button>
110
+ <icon-search></icon-search>
111
+ </div>
112
+ `,
113
+ })
114
+ export class AppComponent {}
111
115
  ```
112
116
 
113
- ## 🛠️ **Local Development**
117
+ ### Using Components in Templates
114
118
 
115
- ```bash
116
- # Install dependencies
117
- yarn install
119
+ ```html
120
+ <!-- app.component.html -->
121
+ <div class="container">
122
+ <!-- Buttons -->
123
+ <freddy-button>Primary Button</freddy-button>
124
+ <freddy-button [disabled]="true">Disabled Button</freddy-button>
125
+
126
+ <!-- Icons -->
127
+ <icon-search></icon-search>
128
+ <icon-user></icon-user>
129
+ <icon-settings></icon-settings>
130
+
131
+ <!-- Form Components -->
132
+ <freddy-input-field
133
+ [placeholder]="'Enter your name'"
134
+ [value]="name"
135
+ (input)="onNameChange($event)"
136
+ >
137
+ </freddy-input-field>
138
+
139
+ <!-- Modals -->
140
+ <freddy-modal-box [isOpen]="showModal">
141
+ <h2>Modal Title</h2>
142
+ <p>Modal content goes here</p>
143
+ </freddy-modal-box>
144
+ </div>
145
+ ```
146
+
147
+ ### Using Utilities
118
148
 
119
- # Start Storybook locally
120
- yarn storybook
149
+ ```typescript
150
+ // app.component.ts
151
+ import { Component } from "@angular/core";
152
+ import { sanitizeHTML } from "@aitronos/freddy-plugins/web-components";
121
153
 
122
- # Build library
123
- yarn build
154
+ @Component({
155
+ selector: "app-root",
156
+ template: ` <div [innerHTML]="sanitizedHtml"></div> `,
157
+ })
158
+ export class AppComponent {
159
+ rawHtml = "<p>This is <strong>safe</strong> HTML!</p>";
124
160
 
125
- # Build web components
126
- yarn build:webcomponents
161
+ get sanitizedHtml() {
162
+ return sanitizeHTML(this.rawHtml);
163
+ }
164
+ }
165
+ ```
127
166
 
128
- # Build both library and web components
129
- yarn build:all
167
+ ### Styling
130
168
 
131
- # Build Storybook
132
- yarn build-storybook
169
+ ```css
170
+ /* styles.css */
171
+ freddy-button {
172
+ margin: 10px;
173
+ }
133
174
 
134
- # Run tests
135
- yarn test
175
+ icon-search {
176
+ color: #007bff;
177
+ font-size: 24px;
178
+ }
136
179
 
137
- # Type checking
138
- yarn vue-tsc --noEmit
180
+ /* Custom theming with CSS variables */
181
+ .my-custom-freddy-button {
182
+ --freddy-button-bg-color: #28a745;
183
+ --freddy-button-text-color: white;
184
+ }
139
185
  ```
140
186
 
141
- ## 🌐 **Web Components Support**
142
-
143
- This library now supports web components, allowing you to use Vue 3 components in Angular, React, and any other framework that supports custom elements.
187
+ ## ⚛️ React Usage
144
188
 
145
- ### Quick Start
189
+ ### Installation & Setup
146
190
 
147
191
  ```bash
148
192
  npm install @aitronos/freddy-plugins
149
193
  ```
150
194
 
151
- ```javascript
152
- // Import web components
195
+ ### Import Web Components
196
+
197
+ ```tsx
198
+ // App.tsx
199
+ import React from "react";
153
200
  import "@aitronos/freddy-plugins/web-components";
154
- import "@aitronos/freddy-plugins/web-components.css";
201
+ import "@aitronos/freddy-plugins/dist/freddy-plugins.css";
202
+
203
+ function App() {
204
+ return (
205
+ <div>
206
+ <h1>My React App</h1>
207
+ <freddy-button>Click me!</freddy-button>
208
+ <icon-search></icon-search>
209
+ </div>
210
+ );
211
+ }
212
+
213
+ export default App;
155
214
  ```
156
215
 
157
- ```html
158
- <!-- Use as custom elements -->
159
- <freddy-button label="Click me" hierarchy="primary"></freddy-button>
160
- <freddy-input-field label="Email" type="email"></freddy-input-field>
161
- <freddy-icon-search size="24" color="#666"></freddy-icon-search>
216
+ ### Using Components
217
+
218
+ ```tsx
219
+ // components/MyComponent.tsx
220
+ import React from "react";
221
+ import { sanitizeHTML } from "@aitronos/freddy-plugins/web-components";
222
+
223
+ const MyComponent = () => {
224
+ const handleClick = (event: CustomEvent) => {
225
+ console.log("Button clicked:", event.detail);
226
+ };
227
+
228
+ return (
229
+ <div>
230
+ <freddy-button onClick={handleClick}>Click me!</freddy-button>
231
+
232
+ <freddy-input-field
233
+ placeholder="Enter text..."
234
+ onInput={(e) => console.log(e.detail.value)}
235
+ />
236
+
237
+ <div
238
+ dangerouslySetInnerHTML={{
239
+ __html: sanitizeHTML("<p>Safe HTML content</p>"),
240
+ }}
241
+ />
242
+ </div>
243
+ );
244
+ };
245
+
246
+ export default MyComponent;
162
247
  ```
163
248
 
164
- For detailed web components documentation, see [WEB_COMPONENTS.md](./WEB_COMPONENTS.md).
165
-
166
- ## 📋 **Project Structure**
167
-
249
+ ### TypeScript Support
250
+
251
+ ```typescript
252
+ // types.d.ts
253
+ declare namespace JSX {
254
+ interface IntrinsicElements {
255
+ "freddy-button": {
256
+ disabled?: boolean;
257
+ onClick?: (event: CustomEvent) => void;
258
+ children?: React.ReactNode;
259
+ };
260
+ "icon-search": {
261
+ size?: string;
262
+ color?: string;
263
+ };
264
+ // ... other components
265
+ }
266
+ }
168
267
  ```
169
- src/
170
- ├── components/ # Vue components
171
- │ ├── Button.vue
172
- │ ├── InputField.vue
173
- │ └── ...
174
- ├── stories/ # Storybook stories
175
- │ ├── components/
176
- │ └── icons/
177
- ├── icons/ # Icon components
178
- ├── services/ # API services
179
- └── helpers/ # Utility functions
180
-
181
- deployment/
182
- ├── docker/ # Docker configuration
183
- ├── nginx/ # Nginx configuration
184
- ├── scripts/ # Deployment scripts
185
- └── config.json # Environment config
186
- ```
187
-
188
- ## 🔐 **Security & Performance**
189
-
190
- ### **Security Features**
191
268
 
192
- - **HTTPS only** - All traffic encrypted
193
- - ✅ **Security headers** - XSS, CSRF protection
194
- - ✅ **Content Security Policy** - Resource restrictions
195
- - ✅ **No sensitive data** - Public component library
269
+ ## 🟢 Vue Usage
196
270
 
197
- ### **Performance Optimizations**
271
+ ### Installation
198
272
 
199
- - ✅ **Gzip compression** - Reduced transfer size
200
- - **Static asset caching** - 1-year cache headers
201
- - ✅ **CDN distribution** - Global edge locations
202
- - ✅ **Auto-scaling** - Handles traffic spikes
273
+ ```bash
274
+ npm install @aitronos/freddy-plugins
275
+ ```
203
276
 
204
- ## 🌐 **Custom Domains**
277
+ ### Using in Vue 3
205
278
 
206
- ### **DNS Configuration**
279
+ ```vue
280
+ <!-- App.vue -->
281
+ <template>
282
+ <div>
283
+ <h1>My Vue App</h1>
284
+ <freddy-button @click="handleClick">Click me!</freddy-button>
285
+ <icon-search></icon-search>
286
+ </div>
287
+ </template>
207
288
 
208
- Add these CNAME records in Hostpoint.ch:
289
+ <script setup lang="ts">
290
+ import "@aitronos/freddy-plugins/web-components";
291
+ import "@aitronos/freddy-plugins/dist/freddy-plugins.css";
209
292
 
293
+ const handleClick = (event: CustomEvent) => {
294
+ console.log("Button clicked:", event.detail);
295
+ };
296
+ </script>
210
297
  ```
211
- dev-components.aitronos.com → freddy-storybook-dev-147074626467.europe-west6.run.app
212
- staging-components.aitronos.com freddy-storybook-staging-147074626467.europe-west6.run.app
213
- components.aitronos.com → freddy-storybook-prod-147074626467.europe-west6.run.app
298
+
299
+ ### Using Vue Components (Alternative)
300
+
301
+ ```vue
302
+ <!-- MyComponent.vue -->
303
+ <template>
304
+ <div>
305
+ <Button>Vue Component</Button>
306
+ <IconSearch />
307
+ </div>
308
+ </template>
309
+
310
+ <script setup lang="ts">
311
+ import { Button, IconSearch } from "@aitronos/freddy-plugins";
312
+ import "@aitronos/freddy-plugins/dist/freddy-plugins.css";
313
+ </script>
214
314
  ```
215
315
 
216
- ### **SSL Certificates**
316
+ ## 🎯 Available Components
217
317
 
218
- - Automatically managed by Google Cloud
219
- - Custom domains require verification in Google Cloud Console
318
+ ### Core Components
220
319
 
221
- ## 📊 **Monitoring & Analytics**
320
+ - `freddy-button` - Interactive freddy-buttons with multiple variants
321
+ - `freddy-input-field` - Form input fields
322
+ - `freddy-modal-box` - Modal dialogs
323
+ - `freddy-dropdown` - Dropdown menus
324
+ - `freddy-pagination` - Pagination controls
325
+ - `freddy-tab-list` - Tab navigation
326
+ - `freddy-switch` - Toggle switches
327
+ - `freddy-checkbox` - Custom checkboxes
328
+ - `freddy-spinner` - Loading spinners
329
+ - `freddy-skeleton-loader` - Skeleton loading states
222
330
 
223
- ### **Health Checks**
331
+ ### Icons (120+ available)
224
332
 
225
- - **Endpoint**: `/health` - Returns 200 OK
226
- - **Auto-restart**: Failed instances restart automatically
227
- - **Logging**: Cloud Run logs available in Google Cloud Console
333
+ - `icon-search` - Search icon
334
+ - `icon-user` - User icon
335
+ - `icon-settings` - Settings icon
336
+ - `icon-home` - Home icon
337
+ - `icon-arrow-left` - Arrow left
338
+ - `icon-arrow-right` - Arrow right
339
+ - `icon-plus` - Plus icon
340
+ - `icon-edit` - Edit icon
341
+ - `icon-delete` - Delete icon
342
+ - And many more...
228
343
 
229
- ### **Performance Metrics**
344
+ ### Animations
230
345
 
231
- - **Response time**: < 200ms average
232
- - **Uptime**: 99.9% SLA with Cloud Run
233
- - **Availability**: Multi-zone deployment
346
+ - `freddy-anime-spaceman` - Spaceman animation
234
347
 
235
- ## 🚨 **Troubleshooting**
348
+ ### Utilities
236
349
 
237
- ### **Common Issues**
350
+ - `sanitizeHTML()` - HTML sanitization
351
+ - Helper functions for dates, validation, colors
352
+ - Vue directives and plugins
238
353
 
239
- **Build Failures:**
354
+ ## 🎨 Styling
240
355
 
241
- ```bash
242
- # Check TypeScript errors
243
- yarn vue-tsc --noEmit
356
+ **Important**: Always import the CSS file for proper styling:
244
357
 
245
- # Verify Storybook build
246
- yarn build-storybook
358
+ ```javascript
359
+ import "@aitronos/freddy-plugins/dist/freddy-plugins.css";
247
360
  ```
248
361
 
249
- **Deployment Issues:**
362
+ ### Custom Theming
250
363
 
251
- ```bash
252
- # Check GitHub Actions logs
253
- # Verify GCP_SA_KEY secret is set
254
- # Ensure Docker build succeeds locally
364
+ ```css
365
+ /* Using CSS custom properties */
366
+ freddy-button {
367
+ --freddy-button-bg-color: #007bff;
368
+ --freddy-button-text-color: white;
369
+ --freddy-button-border-radius: 8px;
370
+ }
371
+
372
+ icon-search {
373
+ --icon-color: #28a745;
374
+ --icon-size: 24px;
375
+ }
255
376
  ```
256
377
 
257
- **Domain Issues:**
378
+ ## 📚 Documentation
379
+
380
+ - **[Storybook Demo](https://aitronos-freddy-plugins.vercel.app/)** - Interactive component documentation
381
+ - **[GitHub Repository](https://github.com/aitronos/freddy-plugins)** - Source code and issues
382
+ - **[NPM Package](https://www.npmjs.com/package/@aitronos/freddy-plugins)** - Package information
383
+
384
+ ## 🤝 Support & Help
258
385
 
259
- - Verify DNS propagation (can take 24-48 hours)
260
- - Check custom domain verification in Google Cloud Console
261
- - Ensure CNAME records are correct
386
+ - **GitHub Issues**: [Report bugs or request features](https://github.com/aitronos/freddy-plugins/issues)
387
+ - **Discussions**: [Community discussions](https://github.com/aitronos/freddy-plugins/discussions)
388
+ - **Email**: support@aitronos.com
262
389
 
263
- ## 📞 **Support**
390
+ ## 🎉 Hurray!
264
391
 
265
- - **Repository**: [GitHub](https://github.com/Freddy-Development/Aitronos.Freddy.Plugins)
266
- - **Documentation**: [Storybook](https://components.aitronos.com)
267
- - **Issues**: [GitHub Issues](https://github.com/Freddy-Development/Aitronos.Freddy.Plugins/issues)
392
+ You're all set! Freddy Plugins provides everything you need to build beautiful, consistent user interfaces across any framework. Start building amazing apps with our comprehensive component library!
268
393
 
269
394
  ---
270
395
 
271
- **Last Updated**: July 2025
272
- **Version**: 1.0.0
273
- **Maintainer**: Aitronos Development Team
396
+ **Made with ❤️ by the Aitronos team**