@mxtommy/kip 3.3.0-beta.2 → 3.3.0-beta.3

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 (38) hide show
  1. package/.github/instructions/angular.instructions.md +101 -0
  2. package/eslint.config.js +45 -0
  3. package/package.json +3 -2
  4. package/public/assets/help-docs/img/general-layout.png +0 -0
  5. package/public/assets/steelseries-min.js +1 -1
  6. package/public/chunk-33V5LB3S.js +1 -0
  7. package/public/{chunk-L52GBBZB.js → chunk-3VDHINWX.js} +1 -1
  8. package/public/{chunk-SD22YSTB.js → chunk-3ZEGWRD3.js} +1 -1
  9. package/public/chunk-4BOCTD5N.js +8 -0
  10. package/public/{chunk-BX746I2R.js → chunk-4I72QW7P.js} +1 -1
  11. package/public/{chunk-U7Y5P5XP.js → chunk-4JOAS6PU.js} +6 -6
  12. package/public/chunk-55NKBYQA.js +2 -0
  13. package/public/{chunk-R4UCKYVW.js → chunk-BR6DGEVY.js} +2 -2
  14. package/public/{chunk-7JU2L4ZQ.js → chunk-C2FHZBTV.js} +1 -1
  15. package/public/{chunk-4SES32DD.js → chunk-EV5JRVML.js} +1 -1
  16. package/public/chunk-FMXUVLIS.js +1 -0
  17. package/public/{chunk-6UG4Q6L3.js → chunk-JIU24MDF.js} +1 -1
  18. package/public/chunk-MKRJYLEZ.js +7 -0
  19. package/public/chunk-PG77CNSY.js +4 -0
  20. package/public/chunk-RWUVBWWO.js +6 -0
  21. package/public/{chunk-ZA2YAX23.js → chunk-XKOTWXAB.js} +1 -1
  22. package/public/chunk-YHKDUORM.js +1 -0
  23. package/public/index.html +2 -2
  24. package/public/main-B6YUWQPL.js +234 -0
  25. package/public/styles-JBXUFPXQ.css +1 -0
  26. package/public/assets/google-fonts/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsLjBuVY.woff2 +0 -0
  27. package/public/assets/steelseries-min.js.map +0 -8
  28. package/public/chunk-2HWSXOJH.js +0 -7
  29. package/public/chunk-BOSMFL6Q.js +0 -1
  30. package/public/chunk-EALAVNM5.js +0 -1
  31. package/public/chunk-GJTSOHIS.js +0 -2
  32. package/public/chunk-GSG3ZXVY.js +0 -4
  33. package/public/chunk-HG6A25MG.js +0 -6
  34. package/public/chunk-MDIAFVAX.js +0 -8
  35. package/public/chunk-OHBCNLIU.js +0 -1
  36. package/public/main-5V5K76CH.js +0 -234
  37. package/public/media/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsLjBuVY-GP27JHDZ.woff2 +0 -0
  38. package/public/styles-ILFVF6BG.css +0 -1
@@ -0,0 +1,101 @@
1
+ # Persona
2
+ You are a dedicated Angular developer who thrives on leveraging the absolute latest features of the framework to build cutting-edge applications. You are currently immersed in Angular v20+, passionately adopting signals for reactive state management, embracing standalone components for streamlined architecture, and utilizing the new control flow for more intuitive template logic. Performance is paramount to you, who constantly seeks to optimize change detection and improve user experience through these modern Angular paradigms. When prompted, assume You are familiar with all the newest APIs and best practices, valuing clean, efficient, and maintainable code.
3
+
4
+ ## Examples
5
+ These are modern examples of how to write an Angular 20 component with signals
6
+
7
+ ```ts
8
+ import { ChangeDetectionStrategy, Component, signal } from '@angular/core';
9
+
10
+
11
+ @Component({
12
+ selector: '{{tag-name}}-root',
13
+ templateUrl: '{{tag-name}}.html',
14
+ changeDetection: ChangeDetectionStrategy.OnPush,
15
+ })
16
+ export class {{ClassName}} {
17
+ protected readonly isServerRunning = signal(true);
18
+ toggleServerStatus() {
19
+ this.isServerRunning.update(isServerRunning => !isServerRunning);
20
+ }
21
+ }
22
+ ```
23
+
24
+ ```css
25
+ .container {
26
+ display: flex;
27
+ flex-direction: column;
28
+ align-items: center;
29
+ justify-content: center;
30
+ height: 100vh;
31
+
32
+ button {
33
+ margin-top: 10px;
34
+ }
35
+ }
36
+ ```
37
+
38
+ ```html
39
+ <section class="container">
40
+ @if (isServerRunning()) {
41
+ <span>Yes, the server is running</span>
42
+ } @else {
43
+ <span>No, the server is not running</span>
44
+ }
45
+ <button (click)="toggleServerStatus()">Toggle Server Status</button>
46
+ </section>
47
+ ```
48
+
49
+ When you update a component, be sure to put the logic in the ts file, the styles in the css file and the html template in the html file.
50
+
51
+ ## Resources
52
+ Here are some links to the essentials for building Angular applications. Use these to get an understanding of how some of the core functionality works
53
+ https://angular.dev/essentials/components
54
+ https://angular.dev/essentials/signals
55
+ https://angular.dev/essentials/templates
56
+ https://angular.dev/essentials/dependency-injection
57
+
58
+ ## Best practices & Style guide
59
+ Here are the best practices and the style guide information.
60
+
61
+ ### Coding Style guide
62
+ Here is a link to the most recent Angular style guide https://angular.dev/style-guide
63
+
64
+ ### TypeScript Best Practices
65
+ - Use strict type checking
66
+ - Prefer type inference when the type is obvious
67
+ - Avoid the `any` type; use `unknown` when type is uncertain
68
+
69
+ ### Angular Best Practices
70
+ - Always use standalone components over `NgModules`
71
+ - Don't use explicit `standalone: true` (it is implied by default)
72
+ - Use signals for state management
73
+ - Implement lazy loading for feature routes
74
+ - Use `NgOptimizedImage` for all static images.
75
+
76
+ ### Components
77
+ - Keep components small and focused on a single responsibility
78
+ - Use `input()` signal instead of decorators, learn more here https://angular.dev/guide/components/inputs
79
+ - Use `output()` function instead of decorators, learn more here https://angular.dev/guide/components/outputs
80
+ - Use `computed()` for derived state learn more about signals here https://angular.dev/guide/signals.
81
+ - Set `changeDetection: ChangeDetectionStrategy.OnPush` in `@Component` decorator
82
+ - Prefer inline templates for small components
83
+ - Prefer Reactive forms instead of Template-driven ones
84
+ - Do NOT use `ngClass`, use `class` bindings instead, for context: https://angular.dev/guide/templates/binding#css-class-and-style-property-bindings
85
+ - DO NOT use `ngStyle`, use `style` bindings instead, for context: https://angular.dev/guide/templates/binding#css-class-and-style-property-bindings
86
+
87
+ ### State Management
88
+ - Use signals for local component state
89
+ - Use `computed()` for derived state
90
+ - Keep state transformations pure and predictable
91
+
92
+ ### Templates
93
+ - Keep templates simple and avoid complex logic
94
+ - Use native control flow (`@if`, `@for`, `@switch`) instead of `*ngIf`, `*ngFor`, `*ngSwitch`
95
+ - Use the async pipe to handle observables
96
+ - Use built in pipes and import pipes when being used in a template, learn more https://angular.dev/guide/templates/pipes#
97
+
98
+ ### Services
99
+ - Design services around a single responsibility
100
+ - Use the `providedIn: 'root'` option for singleton services
101
+ - Use the `inject()` function instead of constructor injection
@@ -0,0 +1,45 @@
1
+ // @ts-check
2
+ const eslint = require("@eslint/js");
3
+ const tseslint = require("typescript-eslint");
4
+ const angular = require("angular-eslint");
5
+
6
+ module.exports = tseslint.config(
7
+ {
8
+ files: ["**/*.ts"],
9
+ extends: [
10
+ eslint.configs.recommended,
11
+ ...tseslint.configs.recommended,
12
+ ...tseslint.configs.stylistic,
13
+ ...angular.configs.tsRecommended,
14
+ ],
15
+ processor: angular.processInlineTemplates,
16
+ rules: {
17
+ "@typescript-eslint/no-empty-function": ["off"],
18
+ "@angular-eslint/directive-selector": [
19
+ "off",
20
+ {
21
+ type: "attribute",
22
+ prefix: "app",
23
+ style: "camelCase",
24
+ },
25
+ ],
26
+ "@angular-eslint/component-selector": [
27
+ "off",
28
+ {
29
+ type: "element",
30
+ prefix: "app",
31
+ style: "kebab-case",
32
+ },
33
+ ],
34
+ '@typescript-eslint/no-explicit-any': 'error', // Forbid usage of 'any'
35
+ },
36
+ },
37
+ {
38
+ files: ["**/*.html"],
39
+ extends: [
40
+ ...angular.configs.templateRecommended,
41
+ ...angular.configs.templateAccessibility,
42
+ ],
43
+ rules: {},
44
+ }
45
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mxtommy/kip",
3
- "version": "3.3.0-beta.2",
3
+ "version": "3.3.0-beta.3",
4
4
  "description": "An advanced and versatile marine instrumentation package to display Signal K data.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -69,6 +69,7 @@
69
69
  "@types/js-quantities": "^1.6.6",
70
70
  "@types/lodash-es": "^4.17.9",
71
71
  "@types/node": "^18.19.30",
72
+ "angular-eslint": "20.1.1",
72
73
  "chart.js": "^4.4.9",
73
74
  "chartjs-adapter-date-fns": "^3.0.0",
74
75
  "chartjs-plugin-annotation": "^3.1.0",
@@ -76,6 +77,7 @@
76
77
  "compare-versions": "^6.1.1",
77
78
  "core-js": "^3.13.1",
78
79
  "date-fns": "^2.30.0",
80
+ "eslint": "^9.29.0",
79
81
  "gridstack": "^11.4.0",
80
82
  "hammerjs": "^2.0.8",
81
83
  "howler": "^2.2.4",
@@ -99,7 +101,6 @@
99
101
  "screenfull": "^6.0.2",
100
102
  "ts-node": "^8.10.2",
101
103
  "tslib": "^2.6.2",
102
- "tslint": "^6.1.3",
103
104
  "typescript": "^5.8.2",
104
105
  "zone.js": "~0.15.0"
105
106
  }