@jjlmoya/utils-drones 1.30.0 → 1.32.0

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 (67) hide show
  1. package/package.json +1 -1
  2. package/src/category/i18n/en.ts +1 -1
  3. package/src/category/i18n/fr.ts +1 -1
  4. package/src/category/index.ts +2 -0
  5. package/src/components/PreviewNavSidebar.astro +116 -116
  6. package/src/components/PreviewToolbar.astro +143 -143
  7. package/src/data.ts +1 -1
  8. package/src/entries.ts +4 -0
  9. package/src/env.d.ts +1 -1
  10. package/src/index.ts +1 -1
  11. package/src/layouts/PreviewLayout.astro +118 -118
  12. package/src/pages/[locale].astro +251 -251
  13. package/src/pages/index.astro +4 -4
  14. package/src/tests/faq_count.test.ts +1 -1
  15. package/src/tests/locale_completeness.test.ts +1 -2
  16. package/src/tests/mocks/astro_mock.js +1 -1
  17. package/src/tests/no_h1_in_components.test.ts +1 -1
  18. package/src/tests/tool_validation.test.ts +17 -17
  19. package/src/tool/antenna-length-calculator/bibliography.astro +6 -6
  20. package/src/tool/antenna-length-calculator/component.astro +329 -329
  21. package/src/tool/antenna-length-calculator/seo.astro +15 -15
  22. package/src/tool/drone-battery-c-rating-calculator/i18n/de.ts +192 -192
  23. package/src/tool/drone-battery-c-rating-calculator/i18n/en.ts +192 -192
  24. package/src/tool/drone-battery-c-rating-calculator/i18n/es.ts +192 -192
  25. package/src/tool/drone-battery-c-rating-calculator/i18n/id.ts +192 -192
  26. package/src/tool/drone-battery-c-rating-calculator/i18n/ja.ts +192 -192
  27. package/src/tool/drone-battery-c-rating-calculator/i18n/ko.ts +192 -192
  28. package/src/tool/drone-battery-c-rating-calculator/i18n/nl.ts +192 -192
  29. package/src/tool/drone-battery-c-rating-calculator/i18n/pl.ts +192 -192
  30. package/src/tool/drone-battery-c-rating-calculator/i18n/ru.ts +192 -192
  31. package/src/tool/drone-battery-c-rating-calculator/i18n/sv.ts +192 -192
  32. package/src/tool/drone-battery-c-rating-calculator/i18n/tr.ts +192 -192
  33. package/src/tool/drone-battery-c-rating-calculator/i18n/zh.ts +192 -192
  34. package/src/tool/drone-flight-time/component.astro +187 -187
  35. package/src/tool/drone-flight-time/seo.astro +15 -15
  36. package/src/tool/drone-motor-propeller-calculator/bibliography.astro +6 -0
  37. package/src/tool/drone-motor-propeller-calculator/bibliography.ts +12 -0
  38. package/src/tool/drone-motor-propeller-calculator/component.astro +109 -0
  39. package/src/tool/drone-motor-propeller-calculator/controller.ts +174 -0
  40. package/src/tool/drone-motor-propeller-calculator/dom-views.ts +78 -0
  41. package/src/tool/drone-motor-propeller-calculator/drone-motor-propeller-calculator.css +562 -0
  42. package/src/tool/drone-motor-propeller-calculator/entry.ts +27 -0
  43. package/src/tool/drone-motor-propeller-calculator/evaluator.ts +14 -0
  44. package/src/tool/drone-motor-propeller-calculator/i18n/de.ts +202 -0
  45. package/src/tool/drone-motor-propeller-calculator/i18n/en.ts +202 -0
  46. package/src/tool/drone-motor-propeller-calculator/i18n/es.ts +202 -0
  47. package/src/tool/drone-motor-propeller-calculator/i18n/fr.ts +202 -0
  48. package/src/tool/drone-motor-propeller-calculator/i18n/id.ts +192 -0
  49. package/src/tool/drone-motor-propeller-calculator/i18n/it.ts +192 -0
  50. package/src/tool/drone-motor-propeller-calculator/i18n/ja.ts +192 -0
  51. package/src/tool/drone-motor-propeller-calculator/i18n/ko.ts +192 -0
  52. package/src/tool/drone-motor-propeller-calculator/i18n/nl.ts +192 -0
  53. package/src/tool/drone-motor-propeller-calculator/i18n/pl.ts +192 -0
  54. package/src/tool/drone-motor-propeller-calculator/i18n/pt.ts +192 -0
  55. package/src/tool/drone-motor-propeller-calculator/i18n/ru.ts +192 -0
  56. package/src/tool/drone-motor-propeller-calculator/i18n/sv.ts +192 -0
  57. package/src/tool/drone-motor-propeller-calculator/i18n/tr.ts +192 -0
  58. package/src/tool/drone-motor-propeller-calculator/i18n/zh.ts +192 -0
  59. package/src/tool/drone-motor-propeller-calculator/index.ts +11 -0
  60. package/src/tool/drone-motor-propeller-calculator/logic.test.ts +56 -0
  61. package/src/tool/drone-motor-propeller-calculator/logic.ts +108 -0
  62. package/src/tool/drone-motor-propeller-calculator/seo.astro +15 -0
  63. package/src/tool/drone-motor-propeller-calculator/storage.ts +26 -0
  64. package/src/tool/drone-motor-propeller-calculator/ui.ts +55 -0
  65. package/src/tool/gps-coordinates-converter/component.astro +275 -275
  66. package/src/tool/gps-coordinates-converter/seo.astro +15 -15
  67. package/src/tools.ts +3 -0
@@ -1,118 +1,118 @@
1
- ---
2
- import "@jjlmoya/utils-shared/theme.css";
3
- import PreviewToolbar from "../components/PreviewToolbar.astro";
4
- import type { KnownLocale } from "../types";
5
-
6
- interface Props {
7
- title: string;
8
- currentLocale?: KnownLocale;
9
- localeUrls?: Partial<Record<KnownLocale, string>>;
10
- hasSidebar?: boolean;
11
- }
12
-
13
- const { title, currentLocale = "es", localeUrls = {}, hasSidebar = false } = Astro.props;
14
- ---
15
-
16
- <!doctype html>
17
- <html lang={currentLocale}>
18
- <head>
19
- <meta charset="UTF-8" />
20
- <meta name="viewport" content="width=device-width" />
21
- <title>{title} · preview</title>
22
- <link rel="preconnect" href="https://fonts.googleapis.com" />
23
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
24
- <link
25
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap"
26
- rel="stylesheet"
27
- />
28
-
29
- <script is:inline>
30
- (function () {
31
- const saved = localStorage.getItem("theme") || "theme-dark";
32
- document.documentElement.classList.add(saved);
33
- })();
34
- </script>
35
- <slot name="head" />
36
- </head>
37
- <body>
38
- <PreviewToolbar currentLocale={currentLocale} localeUrls={localeUrls} />
39
- <div class:list={["page-wrapper", { "with-sidebar": hasSidebar }]}>
40
- {
41
- hasSidebar && (
42
- <aside class="sidebar-area">
43
- <slot name="sidebar" />
44
- </aside>
45
- )
46
- }
47
- <main>
48
- <slot />
49
- </main>
50
- </div>
51
- </body>
52
- </html>
53
-
54
- <style is:global>
55
- :root {
56
- --accent: #f43f5e;
57
- --primary-base: #9f1239;
58
- --cyan: #06b6d4;
59
- }
60
-
61
- .theme-dark,
62
- .theme-light {
63
- --text-main: var(--text-base);
64
- --border-color: var(--border-base);
65
- }
66
-
67
- *,
68
- *::before,
69
- *::after {
70
- box-sizing: border-box;
71
- }
72
-
73
- body {
74
- background-color: var(--bg-page);
75
- color: var(--text-base);
76
- margin: 0;
77
- min-height: 100vh;
78
- transition:
79
- background-color 0.3s ease,
80
- color 0.3s ease;
81
- font-family: Inter, sans-serif;
82
- }
83
-
84
- main {
85
- padding: 0 2rem;
86
- }
87
-
88
- .page-wrapper {
89
- display: flex;
90
- flex-direction: column;
91
- }
92
-
93
- .page-wrapper.with-sidebar {
94
- display: grid;
95
- grid-template-columns: 240px 1fr;
96
- min-height: 100vh;
97
- }
98
-
99
- .sidebar-area {
100
- position: sticky;
101
- top: 0;
102
- height: 100vh;
103
- overflow-y: auto;
104
- border-right: 1px solid var(--border-color);
105
- background: var(--bg-page);
106
- }
107
-
108
- @media (max-width: 768px) {
109
- .page-wrapper.with-sidebar {
110
- grid-template-columns: 1fr;
111
- }
112
-
113
- .sidebar-area {
114
- display: none;
115
- }
116
- }
117
- </style>
118
-
1
+ ---
2
+ import "@jjlmoya/utils-shared/theme.css";
3
+ import PreviewToolbar from "../components/PreviewToolbar.astro";
4
+ import type { KnownLocale } from "../types";
5
+
6
+ interface Props {
7
+ title: string;
8
+ currentLocale?: KnownLocale;
9
+ localeUrls?: Partial<Record<KnownLocale, string>>;
10
+ hasSidebar?: boolean;
11
+ }
12
+
13
+ const { title, currentLocale = "es", localeUrls = {}, hasSidebar = false } = Astro.props;
14
+ ---
15
+
16
+ <!doctype html>
17
+ <html lang={currentLocale}>
18
+ <head>
19
+ <meta charset="UTF-8" />
20
+ <meta name="viewport" content="width=device-width" />
21
+ <title>{title} · preview</title>
22
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
23
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
24
+ <link
25
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap"
26
+ rel="stylesheet"
27
+ />
28
+
29
+ <script is:inline>
30
+ (function () {
31
+ const saved = localStorage.getItem("theme") || "theme-dark";
32
+ document.documentElement.classList.add(saved);
33
+ })();
34
+ </script>
35
+ <slot name="head" />
36
+ </head>
37
+ <body>
38
+ <PreviewToolbar currentLocale={currentLocale} localeUrls={localeUrls} />
39
+ <div class:list={["page-wrapper", { "with-sidebar": hasSidebar }]}>
40
+ {
41
+ hasSidebar && (
42
+ <aside class="sidebar-area">
43
+ <slot name="sidebar" />
44
+ </aside>
45
+ )
46
+ }
47
+ <main>
48
+ <slot />
49
+ </main>
50
+ </div>
51
+ </body>
52
+ </html>
53
+
54
+ <style is:global>
55
+ :root {
56
+ --accent: #f43f5e;
57
+ --primary-base: #9f1239;
58
+ --cyan: #06b6d4;
59
+ }
60
+
61
+ .theme-dark,
62
+ .theme-light {
63
+ --text-main: var(--text-base);
64
+ --border-color: var(--border-base);
65
+ }
66
+
67
+ *,
68
+ *::before,
69
+ *::after {
70
+ box-sizing: border-box;
71
+ }
72
+
73
+ body {
74
+ background-color: var(--bg-page);
75
+ color: var(--text-base);
76
+ margin: 0;
77
+ min-height: 100vh;
78
+ transition:
79
+ background-color 0.3s ease,
80
+ color 0.3s ease;
81
+ font-family: Inter, sans-serif;
82
+ }
83
+
84
+ main {
85
+ padding: 0 2rem;
86
+ }
87
+
88
+ .page-wrapper {
89
+ display: flex;
90
+ flex-direction: column;
91
+ }
92
+
93
+ .page-wrapper.with-sidebar {
94
+ display: grid;
95
+ grid-template-columns: 240px 1fr;
96
+ min-height: 100vh;
97
+ }
98
+
99
+ .sidebar-area {
100
+ position: sticky;
101
+ top: 0;
102
+ height: 100vh;
103
+ overflow-y: auto;
104
+ border-right: 1px solid var(--border-color);
105
+ background: var(--bg-page);
106
+ }
107
+
108
+ @media (max-width: 768px) {
109
+ .page-wrapper.with-sidebar {
110
+ grid-template-columns: 1fr;
111
+ }
112
+
113
+ .sidebar-area {
114
+ display: none;
115
+ }
116
+ }
117
+ </style>
118
+