kimu-core 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/.editorconfig +30 -0
- package/.gitattributes +11 -0
- package/.github/FUNDING.yml +8 -0
- package/.github/copilot-instructions.md +103 -0
- package/.github/kimu-copilot-instructions.md +3779 -0
- package/.github/workflows/deploy-demo.yml +39 -0
- package/AUTHORS.md +20 -0
- package/CHANGELOG.md +20 -0
- package/CODE_GUIDELINES.md +165 -0
- package/CODE_OF_CONDUCT.md +47 -0
- package/CONTRIBUTING.md +62 -0
- package/FUNDING.md +31 -0
- package/ISSUE_GUIDELINES.md +74 -0
- package/LICENSE +17 -0
- package/LICENSE.it.md +17 -0
- package/MPL-2.0.txt +373 -0
- package/NOTICE +65 -0
- package/README-KIMU.md +40 -0
- package/README.it.md +208 -0
- package/README.md +266 -0
- package/SECURITY.md +64 -0
- package/docs/get-started-en.md +207 -0
- package/docs/images/icon.svg +64 -0
- package/docs/images/logo_kimu.png +0 -0
- package/docs/index.md +29 -0
- package/env/dev.config.json +6 -0
- package/env/local.config.json +6 -0
- package/env/prod.config.json +6 -0
- package/env/staging.config.json +6 -0
- package/env/test.config.json +4 -0
- package/icon.svg +10 -0
- package/logo_kimu.png +0 -0
- package/package.json +79 -0
- package/public/favicon.svg +64 -0
- package/public/logo_kimu.svg +1 -0
- package/scripts/build-all-config.js +59 -0
- package/scripts/build-all-core.js +65 -0
- package/scripts/build-all-extensions.js +64 -0
- package/scripts/build-all-modules.js +99 -0
- package/scripts/build-extension.js +60 -0
- package/scripts/clear-kimu-build.js +31 -0
- package/scripts/generate-kimu-build-config.js +79 -0
- package/scripts/install-module.js +162 -0
- package/scripts/list-modules.js +109 -0
- package/scripts/minify-css-assets.js +82 -0
- package/scripts/remove-module.js +122 -0
- package/scripts/utils/fix-imports.js +85 -0
- package/src/assets/index.css +43 -0
- package/src/assets/kimu-style.css +84 -0
- package/src/assets/style.css +116 -0
- package/src/config/kimu-base-config.json +5 -0
- package/src/core/index.ts +47 -0
- package/src/core/kimu-app.ts +76 -0
- package/src/core/kimu-asset-manager.ts +167 -0
- package/src/core/kimu-component-element.ts +325 -0
- package/src/core/kimu-component.ts +33 -0
- package/src/core/kimu-engine.ts +188 -0
- package/src/core/kimu-extension-manager.ts +281 -0
- package/src/core/kimu-global-styles.ts +136 -0
- package/src/core/kimu-module-manager.ts +69 -0
- package/src/core/kimu-module.ts +21 -0
- package/src/core/kimu-path-config.ts +127 -0
- package/src/core/kimu-reactive.ts +196 -0
- package/src/core/kimu-render.ts +91 -0
- package/src/core/kimu-store.ts +147 -0
- package/src/core/kimu-types.ts +65 -0
- package/src/extensions/.gitkeep +0 -0
- package/src/extensions/extensions-manifest.json +13 -0
- package/src/extensions/kimu-home/component.ts +80 -0
- package/src/extensions/kimu-home/lang/en.json +5 -0
- package/src/extensions/kimu-home/lang/it.json +5 -0
- package/src/extensions/kimu-home/style.css +61 -0
- package/src/extensions/kimu-home/view.html +51 -0
- package/src/index.html +26 -0
- package/src/main.ts +68 -0
- package/src/modules/.gitkeep +0 -0
- package/src/modules/README.md +79 -0
- package/src/modules/i18n/README.it.md +63 -0
- package/src/modules/i18n/README.md +63 -0
- package/src/modules/i18n/kimu-global-lang.ts +26 -0
- package/src/modules/i18n/kimu-i18n-service.ts +108 -0
- package/src/modules/i18n/manifest.json +22 -0
- package/src/modules/i18n/module.ts +39 -0
- package/src/modules/modules-manifest.json +12 -0
- package/src/modules-repository/README.md +108 -0
- package/src/modules-repository/api-axios/CHANGELOG.md +48 -0
- package/src/modules-repository/api-axios/QUICK-REFERENCE.md +178 -0
- package/src/modules-repository/api-axios/README.md +304 -0
- package/src/modules-repository/api-axios/api-axios-service.ts +355 -0
- package/src/modules-repository/api-axios/examples.ts +293 -0
- package/src/modules-repository/api-axios/index.ts +19 -0
- package/src/modules-repository/api-axios/interfaces.ts +71 -0
- package/src/modules-repository/api-axios/module.ts +41 -0
- package/src/modules-repository/api-core/CHANGELOG.md +42 -0
- package/src/modules-repository/api-core/QUICK-REFERENCE.md +192 -0
- package/src/modules-repository/api-core/README.md +435 -0
- package/src/modules-repository/api-core/api-core-service.ts +289 -0
- package/src/modules-repository/api-core/examples.ts +432 -0
- package/src/modules-repository/api-core/index.ts +8 -0
- package/src/modules-repository/api-core/interfaces.ts +83 -0
- package/src/modules-repository/api-core/module.ts +30 -0
- package/src/modules-repository/event-bus/README.md +273 -0
- package/src/modules-repository/event-bus/event-bus-service.ts +176 -0
- package/src/modules-repository/event-bus/module.ts +30 -0
- package/src/modules-repository/i18n/README.it.md +63 -0
- package/src/modules-repository/i18n/README.md +63 -0
- package/src/modules-repository/i18n/kimu-global-lang.ts +26 -0
- package/src/modules-repository/i18n/kimu-i18n-service.ts +108 -0
- package/src/modules-repository/i18n/manifest.json +22 -0
- package/src/modules-repository/i18n/module.ts +39 -0
- package/src/modules-repository/notification/README.md +423 -0
- package/src/modules-repository/notification/module.ts +30 -0
- package/src/modules-repository/notification/notification-service.ts +436 -0
- package/src/modules-repository/router/README.it.md +39 -0
- package/src/modules-repository/router/README.md +39 -0
- package/src/modules-repository/router/manifest.json +21 -0
- package/src/modules-repository/router/module.ts +23 -0
- package/src/modules-repository/router/router.ts +144 -0
- package/src/modules-repository/state/README.md +409 -0
- package/src/modules-repository/state/module.ts +30 -0
- package/src/modules-repository/state/state-service.ts +296 -0
- package/src/modules-repository/theme/README.md +267 -0
- package/src/modules-repository/theme/module.ts +30 -0
- package/src/modules-repository/theme/pre-build.js +40 -0
- package/src/modules-repository/theme/theme-service.ts +389 -0
- package/src/modules-repository/theme/themes/theme-cherry-blossom.css +78 -0
- package/src/modules-repository/theme/themes/theme-cozy.css +111 -0
- package/src/modules-repository/theme/themes/theme-cyberpunk.css +150 -0
- package/src/modules-repository/theme/themes/theme-dark.css +79 -0
- package/src/modules-repository/theme/themes/theme-forest.css +171 -0
- package/src/modules-repository/theme/themes/theme-gold.css +100 -0
- package/src/modules-repository/theme/themes/theme-high-contrast.css +126 -0
- package/src/modules-repository/theme/themes/theme-lava.css +101 -0
- package/src/modules-repository/theme/themes/theme-lavender.css +90 -0
- package/src/modules-repository/theme/themes/theme-light.css +79 -0
- package/src/modules-repository/theme/themes/theme-matrix.css +103 -0
- package/src/modules-repository/theme/themes/theme-midnight.css +81 -0
- package/src/modules-repository/theme/themes/theme-nord.css +94 -0
- package/src/modules-repository/theme/themes/theme-ocean.css +84 -0
- package/src/modules-repository/theme/themes/theme-retro80s.css +343 -0
- package/src/modules-repository/theme/themes/theme-sunset.css +62 -0
- package/src/modules-repository/theme/themes-config.d.ts +27 -0
- package/src/modules-repository/theme/themes-config.json +213 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.json +33 -0
- package/vite.config.ts +99 -0
package/.editorconfig
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
indent_style = space
|
|
6
|
+
indent_size = 2
|
|
7
|
+
end_of_line = lf
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.md]
|
|
12
|
+
trim_trailing_whitespace = false
|
|
13
|
+
|
|
14
|
+
[*.json]
|
|
15
|
+
indent_size = 2
|
|
16
|
+
|
|
17
|
+
[*.ts]
|
|
18
|
+
indent_size = 2
|
|
19
|
+
|
|
20
|
+
[*.js]
|
|
21
|
+
indent_size = 2
|
|
22
|
+
|
|
23
|
+
[*.css]
|
|
24
|
+
indent_size = 2
|
|
25
|
+
|
|
26
|
+
[*.scss]
|
|
27
|
+
indent_size = 2
|
|
28
|
+
|
|
29
|
+
[*.html]
|
|
30
|
+
indent_size = 2
|
package/.gitattributes
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Project-Specific Copilot Instructions
|
|
2
|
+
|
|
3
|
+
> **🎯 This File's Purpose:**
|
|
4
|
+
> This file contains **project-specific rules, conventions, and guidelines** for this particular KIMU-based project. You can freely modify this file to add custom workflows, coding standards, or project-specific requirements.
|
|
5
|
+
|
|
6
|
+
> **📚 Framework Documentation:**
|
|
7
|
+
> For complete KIMU framework knowledge, **always read first**: `.github/kimu-copilot-instructions.md`
|
|
8
|
+
> That file contains all framework concepts, APIs, patterns, and best practices.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 🏗️ This Project Uses KIMU Framework
|
|
13
|
+
|
|
14
|
+
This project is built with **KIMU-Core**, a modular TypeScript framework for web applications using Web Components.
|
|
15
|
+
|
|
16
|
+
### 📖 Essential Documentation Files
|
|
17
|
+
|
|
18
|
+
1. **`.github/kimu-copilot-instructions.md`** ← **READ THIS FIRST!**
|
|
19
|
+
- Complete framework reference
|
|
20
|
+
- Extension and module creation guides
|
|
21
|
+
- Router, i18n, security best practices
|
|
22
|
+
- Examples, FAQ, troubleshooting
|
|
23
|
+
- **DO NOT MODIFY** (framework documentation)
|
|
24
|
+
|
|
25
|
+
2. **`.github/copilot-instructions.md`** ← This file
|
|
26
|
+
- Project-specific rules
|
|
27
|
+
- Custom conventions for this project
|
|
28
|
+
- **FREELY MODIFIABLE** for project needs
|
|
29
|
+
|
|
30
|
+
3. **`CODE_GUIDELINES.md`** (if present)
|
|
31
|
+
- Coding style and conventions
|
|
32
|
+
|
|
33
|
+
4. **`README.md`**
|
|
34
|
+
- Project overview and setup
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 🎯 AI Agent Instructions
|
|
39
|
+
|
|
40
|
+
When working on this project:
|
|
41
|
+
|
|
42
|
+
1. **ALWAYS read `.github/kimu-copilot-instructions.md` first** for KIMU framework knowledge
|
|
43
|
+
2. Follow the extension and module creation checklists from that guide
|
|
44
|
+
3. Use KIMU lifecycle methods (`onInit`, `onRender`, `onDestroy`)
|
|
45
|
+
4. Use `this.$()` for DOM selection within components
|
|
46
|
+
5. Follow KIMU security best practices (input validation, safe DOM manipulation)
|
|
47
|
+
6. Apply the project-specific rules below
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 📋 Project-Specific Rules & Conventions
|
|
52
|
+
|
|
53
|
+
> **Note to Developers:** Add your custom project rules below. Examples:
|
|
54
|
+
> - Naming conventions specific to this project
|
|
55
|
+
> - Custom module or extension patterns
|
|
56
|
+
> - API endpoints and data models
|
|
57
|
+
> - Authentication/authorization flows
|
|
58
|
+
> - Deployment procedures
|
|
59
|
+
> - Team workflows
|
|
60
|
+
|
|
61
|
+
### Example: Custom Naming Convention
|
|
62
|
+
```typescript
|
|
63
|
+
// Prefix all custom extensions with project name
|
|
64
|
+
// Good: my-project-dashboard, my-project-login
|
|
65
|
+
// Bad: dashboard, login
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Example: Custom Module Pattern
|
|
69
|
+
```typescript
|
|
70
|
+
// All API calls must use the centralized API service
|
|
71
|
+
// Located in: src/modules/api/api-service.ts
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 🔧 Quick Reference
|
|
77
|
+
|
|
78
|
+
### KIMU Framework Essentials (from kimu-copilot-instructions.md)
|
|
79
|
+
|
|
80
|
+
- **Extension structure**: `component.ts` + `style.css` + `view.html`
|
|
81
|
+
- **Base class**: `KimuComponentElement`
|
|
82
|
+
- **Decorator**: `@KimuComponent({ tag, name, version, ... })`
|
|
83
|
+
- **Lifecycle**: `onInit()`, `onRender()`, `onDestroy()`
|
|
84
|
+
- **DOM selection**: `this.$('#id')` or `this.$('.class')`
|
|
85
|
+
- **Template interpolation**: `${variable}` in `view.html`
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 📝 Notes for AI Agents
|
|
90
|
+
|
|
91
|
+
- This project follows KIMU framework conventions (see `kimu-copilot-instructions.md`)
|
|
92
|
+
- All code must be in TypeScript with strict mode
|
|
93
|
+
- Use English for all comments and documentation
|
|
94
|
+
- Run `npm run lint` and `npm test` before committing
|
|
95
|
+
- Follow semantic versioning for releases
|
|
96
|
+
- Document all new extensions/modules in `docs/` folder
|
|
97
|
+
- Update `README.md` with setup or usage changes
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### Project-Specific
|
|
102
|
+
|
|
103
|
+
_(Add your custom shortcuts here)_
|