@aitronos/freddy-plugins 0.3.1 → 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,3 +1,11 @@
1
+ ## 0.4.1 (2025-09-11)
2
+
3
+ Releasing liscence
4
+
5
+ ## 0.4.0 (2025-09-11)
6
+
7
+ New web components feature
8
+
1
9
  ## 0.3.1 (2025-09-03)
2
10
 
3
11
  - Manual version bump (patch)
package/README.md CHANGED
@@ -1,223 +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**
18
+ ```bash
19
+ # npm
20
+ npm install @aitronos/freddy-plugins
16
21
 
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 |
22
+ # yarn
23
+ yarn add @aitronos/freddy-plugins
22
24
 
23
- ### **Cost Breakdown**
25
+ # pnpm
26
+ pnpm add @aitronos/freddy-plugins
27
+ ```
24
28
 
25
- **Google Cloud Run Pricing (Switzerland - europe-west6):**
26
- - **CPU**: $0.00002400 per vCPU-second
27
- - **Memory**: $0.00000250 per GiB-second
28
- - **Requests**: $0.40 per million requests
29
+ ## 🔄 Updating to New Version
29
30
 
30
- **Estimated Monthly Costs:**
31
- - **Development**: $15-25 (low traffic, testing)
32
- - **Staging**: $15-25 (pre-production testing)
33
- - **Production**: $30-50 (live traffic)
34
- - **Total Estimated**: $60-100/month
31
+ To get the latest features, components, and bug fixes, simply update the package:
35
32
 
36
- **Additional Costs:**
37
- - **Artifact Registry**: ~$5-10/month (Docker images)
38
- - **Cloud Build**: ~$5-15/month (CI/CD builds)
39
- - **Network Egress**: ~$5-10/month (traffic)
33
+ ```bash
34
+ # npm - Update to latest version
35
+ npm update @aitronos/freddy-plugins
40
36
 
41
- **Total Estimated Monthly Cost: $75-135**
37
+ # npm - Install specific version
38
+ npm install @aitronos/freddy-plugins@2.1.0
42
39
 
43
- ### **Cost Optimization**
40
+ # yarn - Update to latest version
41
+ yarn upgrade @aitronos/freddy-plugins
44
42
 
45
- - **Auto-scaling**: Instances scale to 0 when not in use
46
- - **Switzerland region**: Lower latency for European users
47
- - ✅ **Efficient builds**: Single-stage Docker builds
48
- - ✅ **Resource limits**: Conservative max instances
43
+ # yarn - Install specific version
44
+ yarn add @aitronos/freddy-plugins@2.1.0
49
45
 
50
- ## 🔧 **Technology Stack**
46
+ # pnpm - Update to latest version
47
+ pnpm update @aitronos/freddy-plugins
51
48
 
52
- - **Framework**: Vue.js 3 + TypeScript
53
- - **Documentation**: Storybook 7
54
- - **Package Manager**: Yarn 4.7.0
55
- - **Deployment**: Google Cloud Run
56
- - **CI/CD**: GitHub Actions
57
- - **Container Registry**: Artifact Registry
58
- - **Web Server**: Nginx
59
- - **Region**: Switzerland (europe-west6)
49
+ # pnpm - Install specific version
50
+ pnpm add @aitronos/freddy-plugins@2.1.0
51
+ ```
60
52
 
61
- ## 📦 **Components**
53
+ **✨ No code changes needed!** New components and features are automatically available after updating.
62
54
 
63
- ### **Core Components**
64
- - `Button` - Primary action buttons
65
- - `InputField` - Form input components
66
- - `Modal` - Dialog and modal components
67
- - `Dropdown` - Selection components
68
- - `Pagination` - Navigation components
55
+ ## 🎨 Storybook Documentation
69
56
 
70
- ### **Specialized Components**
71
- - `ChatInterface` - Real-time chat components
72
- - `ApiInteraction` - API testing interface
73
- - `LoginRegister` - Authentication components
74
- - `IconLibrary` - Complete icon set (100+ icons)
57
+ Explore all components, icons, and utilities with interactive demos:
75
58
 
76
- ### **Utility Components**
77
- - `Spinner` - Loading indicators
78
- - `ToastMessage` - Notification system
79
- - `Tooltip` - Information overlays
80
- - `CodeBlock` - Syntax highlighting
59
+ **[📚 View Storybook →](https://aitronos-freddy-plugins.vercel.app/)**
81
60
 
82
- ## 🚀 **Deployment Process**
61
+ The Storybook provides:
83
62
 
84
- ### **Automated CI/CD Pipeline**
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
85
69
 
86
- 1. **Push to branch** triggers GitHub Actions
87
- 2. **Build Storybook** locally in container
88
- 3. **Verify build** success (check storybook-static)
89
- 4. **Build Docker image** with built files
90
- 5. **Push to Artifact Registry**
91
- 6. **Deploy to Cloud Run** with environment config
70
+ ## 🅰️ Angular Usage
92
71
 
93
- ### **Environment-Specific Deployments**
72
+ ### Installation & Setup
94
73
 
95
74
  ```bash
96
- # Development (develop branch)
97
- git push origin develop
75
+ npm install @aitronos/freddy-plugins
76
+ ```
98
77
 
99
- # Staging (staging branch)
100
- git push origin staging
78
+ ### Import Web Components
101
79
 
102
- # Production (main branch)
103
- git push origin main
80
+ **Option 1: Global Registration (Recommended)**
81
+
82
+ ```typescript
83
+ // main.ts
84
+ import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
85
+ import { AppModule } from "./app/app.module";
86
+
87
+ // Import web components and CSS
88
+ import "@aitronos/freddy-plugins/web-components";
89
+ import "@aitronos/freddy-plugins/dist/freddy-plugins.css";
90
+
91
+ platformBrowserDynamic()
92
+ .bootstrapModule(AppModule)
93
+ .catch((err) => console.error(err));
104
94
  ```
105
95
 
106
- ## 🛠️ **Local Development**
96
+ **Option 2: Component-level Import**
97
+
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 {}
115
+ ```
107
116
 
108
- ```bash
109
- # Install dependencies
110
- yarn install
117
+ ### Using Components in Templates
118
+
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
148
+
149
+ ```typescript
150
+ // app.component.ts
151
+ import { Component } from "@angular/core";
152
+ import { sanitizeHTML } from "@aitronos/freddy-plugins/web-components";
111
153
 
112
- # Start Storybook locally
113
- yarn storybook
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>";
114
160
 
115
- # Build Storybook
116
- yarn build-storybook
161
+ get sanitizedHtml() {
162
+ return sanitizeHTML(this.rawHtml);
163
+ }
164
+ }
165
+ ```
166
+
167
+ ### Styling
117
168
 
118
- # Run tests
119
- yarn test
169
+ ```css
170
+ /* styles.css */
171
+ freddy-button {
172
+ margin: 10px;
173
+ }
120
174
 
121
- # Type checking
122
- yarn vue-tsc --noEmit
175
+ icon-search {
176
+ color: #007bff;
177
+ font-size: 24px;
178
+ }
179
+
180
+ /* Custom theming with CSS variables */
181
+ .my-custom-freddy-button {
182
+ --freddy-button-bg-color: #28a745;
183
+ --freddy-button-text-color: white;
184
+ }
123
185
  ```
124
186
 
125
- ## 📋 **Project Structure**
187
+ ## ⚛️ React Usage
188
+
189
+ ### Installation & Setup
126
190
 
191
+ ```bash
192
+ npm install @aitronos/freddy-plugins
127
193
  ```
128
- src/
129
- ├── components/ # Vue components
130
- │ ├── Button.vue
131
- │ ├── InputField.vue
132
- │ └── ...
133
- ├── stories/ # Storybook stories
134
- │ ├── components/
135
- │ └── icons/
136
- ├── icons/ # Icon components
137
- ├── services/ # API services
138
- └── helpers/ # Utility functions
139
194
 
140
- deployment/
141
- ├── docker/ # Docker configuration
142
- ├── nginx/ # Nginx configuration
143
- ├── scripts/ # Deployment scripts
144
- └── config.json # Environment config
195
+ ### Import Web Components
196
+
197
+ ```tsx
198
+ // App.tsx
199
+ import React from "react";
200
+ import "@aitronos/freddy-plugins/web-components";
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;
145
214
  ```
146
215
 
147
- ## 🔐 **Security & Performance**
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;
247
+ ```
148
248
 
149
- ### **Security Features**
150
- - ✅ **HTTPS only** - All traffic encrypted
151
- - ✅ **Security headers** - XSS, CSRF protection
152
- - ✅ **Content Security Policy** - Resource restrictions
153
- - **No sensitive data** - Public component library
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
+ }
267
+ ```
154
268
 
155
- ### **Performance Optimizations**
156
- - ✅ **Gzip compression** - Reduced transfer size
157
- - ✅ **Static asset caching** - 1-year cache headers
158
- - ✅ **CDN distribution** - Global edge locations
159
- - ✅ **Auto-scaling** - Handles traffic spikes
269
+ ## 🟢 Vue Usage
160
270
 
161
- ## 🌐 **Custom Domains**
271
+ ### Installation
162
272
 
163
- ### **DNS Configuration**
164
- Add these CNAME records in Hostpoint.ch:
273
+ ```bash
274
+ npm install @aitronos/freddy-plugins
275
+ ```
165
276
 
277
+ ### Using in Vue 3
278
+
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>
288
+
289
+ <script setup lang="ts">
290
+ import "@aitronos/freddy-plugins/web-components";
291
+ import "@aitronos/freddy-plugins/dist/freddy-plugins.css";
292
+
293
+ const handleClick = (event: CustomEvent) => {
294
+ console.log("Button clicked:", event.detail);
295
+ };
296
+ </script>
166
297
  ```
167
- dev-components.aitronos.com → freddy-storybook-dev-147074626467.europe-west6.run.app
168
- staging-components.aitronos.com freddy-storybook-staging-147074626467.europe-west6.run.app
169
- 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>
170
314
  ```
171
315
 
172
- ### **SSL Certificates**
173
- - Automatically managed by Google Cloud
174
- - Custom domains require verification in Google Cloud Console
316
+ ## 🎯 Available Components
175
317
 
176
- ## 📊 **Monitoring & Analytics**
318
+ ### Core Components
177
319
 
178
- ### **Health Checks**
179
- - **Endpoint**: `/health` - Returns 200 OK
180
- - **Auto-restart**: Failed instances restart automatically
181
- - **Logging**: Cloud Run logs available in Google Cloud Console
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
182
330
 
183
- ### **Performance Metrics**
184
- - **Response time**: < 200ms average
185
- - **Uptime**: 99.9% SLA with Cloud Run
186
- - **Availability**: Multi-zone deployment
331
+ ### Icons (120+ available)
187
332
 
188
- ## 🚨 **Troubleshooting**
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...
189
343
 
190
- ### **Common Issues**
344
+ ### Animations
191
345
 
192
- **Build Failures:**
193
- ```bash
194
- # Check TypeScript errors
195
- yarn vue-tsc --noEmit
346
+ - `freddy-anime-spaceman` - Spaceman animation
347
+
348
+ ### Utilities
349
+
350
+ - `sanitizeHTML()` - HTML sanitization
351
+ - Helper functions for dates, validation, colors
352
+ - Vue directives and plugins
196
353
 
197
- # Verify Storybook build
198
- yarn build-storybook
354
+ ## 🎨 Styling
355
+
356
+ **Important**: Always import the CSS file for proper styling:
357
+
358
+ ```javascript
359
+ import "@aitronos/freddy-plugins/dist/freddy-plugins.css";
199
360
  ```
200
361
 
201
- **Deployment Issues:**
202
- ```bash
203
- # Check GitHub Actions logs
204
- # Verify GCP_SA_KEY secret is set
205
- # Ensure Docker build succeeds locally
362
+ ### Custom Theming
363
+
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
+ }
206
376
  ```
207
377
 
208
- **Domain Issues:**
209
- - Verify DNS propagation (can take 24-48 hours)
210
- - Check custom domain verification in Google Cloud Console
211
- - Ensure CNAME records are correct
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
385
+
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
212
389
 
213
- ## 📞 **Support**
390
+ ## 🎉 Hurray!
214
391
 
215
- - **Repository**: [GitHub](https://github.com/Freddy-Development/Aitronos.Freddy.Plugins)
216
- - **Documentation**: [Storybook](https://components.aitronos.com)
217
- - **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!
218
393
 
219
394
  ---
220
395
 
221
- **Last Updated**: July 2025
222
- **Version**: 1.0.0
223
- **Maintainer**: Aitronos Development Team
396
+ **Made with ❤️ by the Aitronos team**