skilldrop-cli 0.16.36 → 0.16.37

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 (93) hide show
  1. package/README.md +1 -1
  2. package/catalogue.json +3 -1
  3. package/model-routing.json +8 -0
  4. package/package.json +1 -1
  5. package/packs/ai-engineering/skills/judge-audit/SKILL.md +157 -0
  6. package/packs/ai-engineering/skills/judge-audit/evals/eval_queries.json +11 -0
  7. package/packs/ai-engineering/skills/judge-audit/evals/evals.json +136 -0
  8. package/packs/ai-engineering/skills/judge-audit/evals/files/1/judgements.csv +321 -0
  9. package/packs/ai-engineering/skills/judge-audit/evals/files/1/notes.md +28 -0
  10. package/packs/ai-engineering/skills/judge-audit/evals/files/2/pairwise.csv +101 -0
  11. package/packs/ai-engineering/skills/judge-audit/evals/files/2/run-notes.md +16 -0
  12. package/packs/ai-engineering/skills/judge-audit/evals/files/4/grades.csv +97 -0
  13. package/packs/ai-engineering/skills/judge-audit/evals/files/5/pairwise_judgements.jsonl +120 -0
  14. package/packs/ai-engineering/skills/judge-audit/evals/files/6/rag-judge/README.md +36 -0
  15. package/packs/ai-engineering/skills/judge-audit/evals/files/6/rag-judge/judgments.csv +301 -0
  16. package/packs/ai-engineering/skills/judge-audit/evals/files/7/moderation/gold_labels.csv +101 -0
  17. package/packs/ai-engineering/skills/judge-audit/evals/files/7/moderation/run_1.jsonl +100 -0
  18. package/packs/ai-engineering/skills/judge-audit/evals/files/7/moderation/run_2.jsonl +100 -0
  19. package/packs/ai-engineering/skills/judge-audit/evals/files/8/patches.csv +241 -0
  20. package/packs/ai-engineering/skills/judge-audit/evals/files/9/adequacy_ratings.csv +151 -0
  21. package/packs/ai-engineering/skills/judge-audit/examples/summary-panel.md +70 -0
  22. package/packs/ai-engineering/skills/judge-audit/manifest.json +44 -0
  23. package/packs/ai-engineering/skills/judge-audit/reference.md +176 -0
  24. package/packs/ai-engineering/skills/judge-audit/scripts/judge_stats.py +1735 -0
  25. package/packs/frontend/pack.json +9 -3
  26. package/packs/frontend/skills/bundle-size-review/SKILL.md +114 -0
  27. package/packs/frontend/skills/bundle-size-review/evals/eval_queries.json +12 -0
  28. package/packs/frontend/skills/bundle-size-review/evals/evals.json +108 -0
  29. package/packs/frontend/skills/bundle-size-review/evals/files/1/package.json +28 -0
  30. package/packs/frontend/skills/bundle-size-review/evals/files/1/src/utils/format.js +26 -0
  31. package/packs/frontend/skills/bundle-size-review/evals/files/1/stats.json +1334 -0
  32. package/packs/frontend/skills/bundle-size-review/evals/files/2/PR.md +21 -0
  33. package/packs/frontend/skills/bundle-size-review/evals/files/2/meta-after.json +440 -0
  34. package/packs/frontend/skills/bundle-size-review/evals/files/2/meta-before.json +360 -0
  35. package/packs/frontend/skills/bundle-size-review/evals/files/3/package.json +29 -0
  36. package/packs/frontend/skills/bundle-size-review/evals/files/3/stats.json +1583 -0
  37. package/packs/frontend/skills/bundle-size-review/evals/files/4/src/components/CommentBox.jsx +24 -0
  38. package/packs/frontend/skills/bundle-size-review/evals/files/4/stats/after.json +299 -0
  39. package/packs/frontend/skills/bundle-size-review/evals/files/4/stats/before.json +275 -0
  40. package/packs/frontend/skills/bundle-size-review/evals/files/5/.browserslistrc +3 -0
  41. package/packs/frontend/skills/bundle-size-review/evals/files/5/build/meta.json +371 -0
  42. package/packs/frontend/skills/bundle-size-review/evals/files/5/build.mjs +18 -0
  43. package/packs/frontend/skills/bundle-size-review/evals/files/5/package-lock.json +39 -0
  44. package/packs/frontend/skills/bundle-size-review/evals/files/5/package.json +22 -0
  45. package/packs/frontend/skills/bundle-size-review/evals/files/5/src/components/Icon.jsx +8 -0
  46. package/packs/frontend/skills/bundle-size-review/evals/files/5/src/polyfills.js +7 -0
  47. package/packs/frontend/skills/bundle-size-review/evals/files/5/src/utils/groupRows.js +4 -0
  48. package/packs/frontend/skills/bundle-size-review/evals/files/6/.browserslistrc +3 -0
  49. package/packs/frontend/skills/bundle-size-review/evals/files/6/package.json +25 -0
  50. package/packs/frontend/skills/bundle-size-review/evals/files/6/src/App.tsx +8 -0
  51. package/packs/frontend/skills/bundle-size-review/evals/files/6/src/i18n/chartLocales.ts +16 -0
  52. package/packs/frontend/skills/bundle-size-review/evals/files/6/src/i18n/index.ts +8 -0
  53. package/packs/frontend/skills/bundle-size-review/evals/files/6/src/i18n/messages/de.ts +5 -0
  54. package/packs/frontend/skills/bundle-size-review/evals/files/6/src/i18n/messages/en.ts +5 -0
  55. package/packs/frontend/skills/bundle-size-review/evals/files/6/src/i18n/useLocale.ts +14 -0
  56. package/packs/frontend/skills/bundle-size-review/evals/files/6/src/main.tsx +10 -0
  57. package/packs/frontend/skills/bundle-size-review/evals/files/6/src/pages/Home.tsx +14 -0
  58. package/packs/frontend/skills/bundle-size-review/evals/files/6/src/pages/Reports.tsx +31 -0
  59. package/packs/frontend/skills/bundle-size-review/evals/files/6/src/routes.tsx +17 -0
  60. package/packs/frontend/skills/bundle-size-review/evals/files/6/stats.json +1869 -0
  61. package/packs/frontend/skills/bundle-size-review/evals/files/6/vite.config.ts +13 -0
  62. package/packs/frontend/skills/bundle-size-review/evals/files/7/apps/backoffice/package.json +26 -0
  63. package/packs/frontend/skills/bundle-size-review/evals/files/7/apps/backoffice/src/App.tsx +27 -0
  64. package/packs/frontend/skills/bundle-size-review/evals/files/7/apps/backoffice/src/pages/Analytics.tsx +10 -0
  65. package/packs/frontend/skills/bundle-size-review/evals/files/7/apps/backoffice/src/pages/Users.tsx +13 -0
  66. package/packs/frontend/skills/bundle-size-review/evals/files/7/apps/backoffice/stats.json +1421 -0
  67. package/packs/frontend/skills/bundle-size-review/evals/files/7/apps/backoffice/webpack.config.js +25 -0
  68. package/packs/frontend/skills/bundle-size-review/evals/files/7/apps/storefront/package.json +27 -0
  69. package/packs/frontend/skills/bundle-size-review/evals/files/7/apps/storefront/src/App.tsx +18 -0
  70. package/packs/frontend/skills/bundle-size-review/evals/files/7/apps/storefront/src/index.tsx +4 -0
  71. package/packs/frontend/skills/bundle-size-review/evals/files/7/apps/storefront/src/pages/Home.tsx +10 -0
  72. package/packs/frontend/skills/bundle-size-review/evals/files/7/apps/storefront/src/pages/Product.tsx +13 -0
  73. package/packs/frontend/skills/bundle-size-review/evals/files/7/apps/storefront/stats.json +1496 -0
  74. package/packs/frontend/skills/bundle-size-review/evals/files/7/apps/storefront/webpack.config.js +26 -0
  75. package/packs/frontend/skills/bundle-size-review/evals/files/7/package.json +9 -0
  76. package/packs/frontend/skills/bundle-size-review/evals/files/7/packages/ui/dist/Button.css +3 -0
  77. package/packs/frontend/skills/bundle-size-review/evals/files/7/packages/ui/dist/Button.js +14 -0
  78. package/packs/frontend/skills/bundle-size-review/evals/files/7/packages/ui/dist/Chart.js +21 -0
  79. package/packs/frontend/skills/bundle-size-review/evals/files/7/packages/ui/dist/index.js +22 -0
  80. package/packs/frontend/skills/bundle-size-review/evals/files/7/packages/ui/package.json +20 -0
  81. package/packs/frontend/skills/bundle-size-review/evals/files/7/packages/ui/src/Button.css +3 -0
  82. package/packs/frontend/skills/bundle-size-review/evals/files/7/packages/ui/src/Button.tsx +9 -0
  83. package/packs/frontend/skills/bundle-size-review/evals/files/7/packages/ui/src/Chart.tsx +14 -0
  84. package/packs/frontend/skills/bundle-size-review/evals/files/7/packages/ui/src/index.ts +6 -0
  85. package/packs/frontend/skills/bundle-size-review/evals/files/7/packages/ui/tsconfig.json +14 -0
  86. package/packs/frontend/skills/bundle-size-review/examples/inputs/stats-after.json +1358 -0
  87. package/packs/frontend/skills/bundle-size-review/examples/inputs/stats-before.json +1334 -0
  88. package/packs/frontend/skills/bundle-size-review/examples/larkspur-sparkline.md +52 -0
  89. package/packs/frontend/skills/bundle-size-review/manifest.json +52 -0
  90. package/packs/frontend/skills/bundle-size-review/reference.md +147 -0
  91. package/packs/frontend/skills/bundle-size-review/scripts/bundle_stats.py +1633 -0
  92. package/packs/frontend/skills/web-performance-review/SKILL.md +3 -3
  93. package/packs/frontend/skills/web-performance-review/manifest.json +2 -1
@@ -0,0 +1,371 @@
1
+ {
2
+ "inputs": {
3
+ "src/main.jsx": {
4
+ "bytes": 1200,
5
+ "imports": [
6
+ {
7
+ "path": "src/polyfills.js",
8
+ "kind": "import-statement",
9
+ "original": "./polyfills"
10
+ },
11
+ {
12
+ "path": "node_modules/react/index.js",
13
+ "kind": "import-statement",
14
+ "original": "react"
15
+ },
16
+ {
17
+ "path": "node_modules/react-dom/client.js",
18
+ "kind": "import-statement",
19
+ "original": "react-dom/client"
20
+ },
21
+ {
22
+ "path": "src/App.jsx",
23
+ "kind": "import-statement",
24
+ "original": "./App"
25
+ }
26
+ ],
27
+ "format": "esm"
28
+ },
29
+ "src/polyfills.js": {
30
+ "bytes": 260,
31
+ "imports": [
32
+ {
33
+ "path": "node_modules/core-js/modules/es.promise.js",
34
+ "kind": "import-statement",
35
+ "original": "core-js/modules/es.promise"
36
+ },
37
+ {
38
+ "path": "node_modules/core-js/modules/es.array.flat.js",
39
+ "kind": "import-statement",
40
+ "original": "core-js/modules/es.array.flat"
41
+ },
42
+ {
43
+ "path": "node_modules/core-js/modules/es.object.from-entries.js",
44
+ "kind": "import-statement",
45
+ "original": "core-js/modules/es.object.from-entries"
46
+ },
47
+ {
48
+ "path": "node_modules/core-js/modules/es.string.replace-all.js",
49
+ "kind": "import-statement",
50
+ "original": "core-js/modules/es.string.replace-all"
51
+ },
52
+ {
53
+ "path": "node_modules/core-js/modules/es.array.at.js",
54
+ "kind": "import-statement",
55
+ "original": "core-js/modules/es.array.at"
56
+ },
57
+ {
58
+ "path": "node_modules/core-js/modules/es.object.group-by.js",
59
+ "kind": "import-statement",
60
+ "original": "core-js/modules/es.object.group-by"
61
+ }
62
+ ],
63
+ "format": "esm"
64
+ },
65
+ "node_modules/core-js/modules/es.promise.js": {
66
+ "bytes": 9400,
67
+ "imports": [],
68
+ "format": "cjs"
69
+ },
70
+ "node_modules/core-js/modules/es.array.flat.js": {
71
+ "bytes": 1100,
72
+ "imports": [],
73
+ "format": "cjs"
74
+ },
75
+ "node_modules/core-js/modules/es.object.from-entries.js": {
76
+ "bytes": 900,
77
+ "imports": [],
78
+ "format": "cjs"
79
+ },
80
+ "node_modules/core-js/modules/es.string.replace-all.js": {
81
+ "bytes": 2300,
82
+ "imports": [],
83
+ "format": "cjs"
84
+ },
85
+ "node_modules/core-js/modules/es.array.at.js": {
86
+ "bytes": 700,
87
+ "imports": [],
88
+ "format": "cjs"
89
+ },
90
+ "node_modules/core-js/modules/es.object.group-by.js": {
91
+ "bytes": 1500,
92
+ "imports": [],
93
+ "format": "cjs"
94
+ },
95
+ "src/App.jsx": {
96
+ "bytes": 3800,
97
+ "imports": [
98
+ {
99
+ "path": "node_modules/react/index.js",
100
+ "kind": "import-statement",
101
+ "original": "react"
102
+ },
103
+ {
104
+ "path": "src/routes/Overview.jsx",
105
+ "kind": "import-statement",
106
+ "original": "./routes/Overview"
107
+ },
108
+ {
109
+ "path": "src/routes/Shipments.jsx",
110
+ "kind": "import-statement",
111
+ "original": "./routes/Shipments"
112
+ },
113
+ {
114
+ "path": "src/routes/Exports.jsx",
115
+ "kind": "dynamic-import",
116
+ "original": "./routes/Exports"
117
+ },
118
+ {
119
+ "path": "src/components/Icon.jsx",
120
+ "kind": "import-statement",
121
+ "original": "./components/Icon"
122
+ }
123
+ ],
124
+ "format": "esm"
125
+ },
126
+ "src/routes/Overview.jsx": {
127
+ "bytes": 6200,
128
+ "imports": [
129
+ {
130
+ "path": "node_modules/plotline/dist/index.js",
131
+ "kind": "import-statement",
132
+ "original": "plotline"
133
+ },
134
+ {
135
+ "path": "node_modules/tempora/dist/index.mjs",
136
+ "kind": "import-statement",
137
+ "original": "tempora"
138
+ },
139
+ {
140
+ "path": "src/components/Icon.jsx",
141
+ "kind": "import-statement",
142
+ "original": "../components/Icon"
143
+ },
144
+ {
145
+ "path": "src/utils/groupRows.js",
146
+ "kind": "import-statement",
147
+ "original": "../utils/groupRows"
148
+ }
149
+ ],
150
+ "format": "esm"
151
+ },
152
+ "src/routes/Shipments.jsx": {
153
+ "bytes": 5400,
154
+ "imports": [
155
+ {
156
+ "path": "node_modules/tempora/dist/index.mjs",
157
+ "kind": "import-statement",
158
+ "original": "tempora"
159
+ },
160
+ {
161
+ "path": "src/components/Icon.jsx",
162
+ "kind": "import-statement",
163
+ "original": "../components/Icon"
164
+ }
165
+ ],
166
+ "format": "esm"
167
+ },
168
+ "src/routes/Exports.jsx": {
169
+ "bytes": 2100,
170
+ "imports": [
171
+ {
172
+ "path": "node_modules/sheetsmith/dist/sheetsmith.js",
173
+ "kind": "import-statement",
174
+ "original": "sheetsmith"
175
+ }
176
+ ],
177
+ "format": "esm"
178
+ },
179
+ "src/components/Icon.jsx": {
180
+ "bytes": 600,
181
+ "imports": [
182
+ {
183
+ "path": "node_modules/glyphset/dist/index.js",
184
+ "kind": "import-statement",
185
+ "original": "glyphset"
186
+ }
187
+ ],
188
+ "format": "esm"
189
+ },
190
+ "src/utils/groupRows.js": {
191
+ "bytes": 400,
192
+ "imports": [],
193
+ "format": "esm"
194
+ },
195
+ "node_modules/plotline/dist/index.js": {
196
+ "bytes": 88000,
197
+ "imports": [
198
+ {
199
+ "path": "node_modules/plotline/node_modules/tempora/index.js",
200
+ "kind": "import-statement",
201
+ "original": "tempora"
202
+ }
203
+ ],
204
+ "format": "esm"
205
+ },
206
+ "node_modules/plotline/node_modules/tempora/index.js": {
207
+ "bytes": 61000,
208
+ "imports": [],
209
+ "format": "cjs"
210
+ },
211
+ "node_modules/tempora/dist/index.mjs": {
212
+ "bytes": 54000,
213
+ "imports": [],
214
+ "format": "esm"
215
+ },
216
+ "node_modules/glyphset/dist/index.js": {
217
+ "bytes": 412000,
218
+ "imports": [],
219
+ "format": "esm"
220
+ },
221
+ "node_modules/sheetsmith/dist/sheetsmith.js": {
222
+ "bytes": 386000,
223
+ "imports": [],
224
+ "format": "cjs"
225
+ },
226
+ "node_modules/react/index.js": {
227
+ "bytes": 190,
228
+ "imports": [
229
+ {
230
+ "path": "node_modules/react/cjs/react.production.min.js",
231
+ "kind": "require-call",
232
+ "original": "./cjs/react.production.min.js"
233
+ }
234
+ ],
235
+ "format": "cjs"
236
+ },
237
+ "node_modules/react/cjs/react.production.min.js": {
238
+ "bytes": 6900,
239
+ "imports": [],
240
+ "format": "cjs"
241
+ },
242
+ "node_modules/react-dom/client.js": {
243
+ "bytes": 620,
244
+ "imports": [
245
+ {
246
+ "path": "node_modules/react-dom/cjs/react-dom.production.min.js",
247
+ "kind": "require-call",
248
+ "original": "./cjs/react-dom.production.min.js"
249
+ }
250
+ ],
251
+ "format": "cjs"
252
+ },
253
+ "node_modules/react-dom/cjs/react-dom.production.min.js": {
254
+ "bytes": 131800,
255
+ "imports": [
256
+ {
257
+ "path": "node_modules/react/index.js",
258
+ "kind": "require-call",
259
+ "original": "react"
260
+ }
261
+ ],
262
+ "format": "cjs"
263
+ }
264
+ },
265
+ "outputs": {
266
+ "dist/assets/main-7QX2KD.js": {
267
+ "imports": [
268
+ {
269
+ "path": "dist/assets/Exports-M4PZ1A.js",
270
+ "kind": "dynamic-import"
271
+ }
272
+ ],
273
+ "exports": [],
274
+ "entryPoint": "src/main.jsx",
275
+ "inputs": {
276
+ "src/main.jsx": {
277
+ "bytesInOutput": 310
278
+ },
279
+ "src/polyfills.js": {
280
+ "bytesInOutput": 0
281
+ },
282
+ "node_modules/core-js/modules/es.promise.js": {
283
+ "bytesInOutput": 3900
284
+ },
285
+ "node_modules/core-js/modules/es.array.flat.js": {
286
+ "bytesInOutput": 420
287
+ },
288
+ "node_modules/core-js/modules/es.object.from-entries.js": {
289
+ "bytesInOutput": 380
290
+ },
291
+ "node_modules/core-js/modules/es.string.replace-all.js": {
292
+ "bytesInOutput": 960
293
+ },
294
+ "node_modules/core-js/modules/es.array.at.js": {
295
+ "bytesInOutput": 290
296
+ },
297
+ "node_modules/core-js/modules/es.object.group-by.js": {
298
+ "bytesInOutput": 610
299
+ },
300
+ "src/App.jsx": {
301
+ "bytesInOutput": 1450
302
+ },
303
+ "src/routes/Overview.jsx": {
304
+ "bytesInOutput": 2600
305
+ },
306
+ "src/routes/Shipments.jsx": {
307
+ "bytesInOutput": 2200
308
+ },
309
+ "src/components/Icon.jsx": {
310
+ "bytesInOutput": 180
311
+ },
312
+ "src/utils/groupRows.js": {
313
+ "bytesInOutput": 120
314
+ },
315
+ "node_modules/plotline/dist/index.js": {
316
+ "bytesInOutput": 41200
317
+ },
318
+ "node_modules/plotline/node_modules/tempora/index.js": {
319
+ "bytesInOutput": 23800
320
+ },
321
+ "node_modules/tempora/dist/index.mjs": {
322
+ "bytesInOutput": 6900
323
+ },
324
+ "node_modules/glyphset/dist/index.js": {
325
+ "bytesInOutput": 198400
326
+ },
327
+ "node_modules/react-dom/client.js": {
328
+ "bytesInOutput": 90
329
+ },
330
+ "node_modules/react-dom/cjs/react-dom.production.min.js": {
331
+ "bytesInOutput": 129600
332
+ },
333
+ "node_modules/react/index.js": {
334
+ "bytesInOutput": 40
335
+ },
336
+ "node_modules/react/cjs/react.production.min.js": {
337
+ "bytesInOutput": 6700
338
+ }
339
+ },
340
+ "bytes": 421400
341
+ },
342
+ "dist/assets/main-7QX2KD.js.map": {
343
+ "imports": [],
344
+ "exports": [],
345
+ "inputs": {},
346
+ "bytes": 1402300
347
+ },
348
+ "dist/assets/Exports-M4PZ1A.js": {
349
+ "imports": [],
350
+ "exports": [
351
+ "default"
352
+ ],
353
+ "entryPoint": "src/routes/Exports.jsx",
354
+ "inputs": {
355
+ "src/routes/Exports.jsx": {
356
+ "bytesInOutput": 820
357
+ },
358
+ "node_modules/sheetsmith/dist/sheetsmith.js": {
359
+ "bytesInOutput": 214300
360
+ }
361
+ },
362
+ "bytes": 215500
363
+ },
364
+ "dist/assets/Exports-M4PZ1A.js.map": {
365
+ "imports": [],
366
+ "exports": [],
367
+ "inputs": {},
368
+ "bytes": 702900
369
+ }
370
+ }
371
+ }
@@ -0,0 +1,18 @@
1
+ import * as esbuild from 'esbuild';
2
+ import { writeFileSync } from 'node:fs';
3
+
4
+ const result = await esbuild.build({
5
+ entryPoints: ['src/main.jsx'],
6
+ bundle: true,
7
+ splitting: true,
8
+ format: 'esm',
9
+ minify: true,
10
+ sourcemap: true,
11
+ target: ['chrome110', 'edge110'],
12
+ outdir: 'dist/assets',
13
+ entryNames: '[name]-[hash]',
14
+ chunkNames: '[name]-[hash]',
15
+ metafile: true,
16
+ });
17
+
18
+ writeFileSync('build/meta.json', JSON.stringify(result.metafile, null, 2));
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "ops-dashboard",
3
+ "version": "2.7.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "ops-dashboard",
9
+ "version": "2.7.0",
10
+ "dependencies": {
11
+ "core-js": "^3.38.1",
12
+ "glyphset": "^5.0.2",
13
+ "plotline": "^4.2.0",
14
+ "react": "^18.3.1",
15
+ "react-dom": "^18.3.1",
16
+ "sheetsmith": "^1.8.0",
17
+ "tempora": "^3.1.0"
18
+ },
19
+ "devDependencies": { "esbuild": "^0.23.1" }
20
+ },
21
+ "node_modules/core-js": { "version": "3.38.1" },
22
+ "node_modules/glyphset": { "version": "5.0.2" },
23
+ "node_modules/plotline": {
24
+ "version": "4.2.0",
25
+ "dependencies": { "tempora": "^2.4.0" }
26
+ },
27
+ "node_modules/plotline/node_modules/tempora": { "version": "2.9.1" },
28
+ "node_modules/react": { "version": "18.3.1" },
29
+ "node_modules/react-dom": {
30
+ "version": "18.3.1",
31
+ "dependencies": { "scheduler": "^0.23.2" },
32
+ "peerDependencies": { "react": "^18.3.1" }
33
+ },
34
+ "node_modules/scheduler": { "version": "0.23.2" },
35
+ "node_modules/sheetsmith": { "version": "1.8.0" },
36
+ "node_modules/tempora": { "version": "3.1.0" },
37
+ "node_modules/esbuild": { "version": "0.23.1", "dev": true }
38
+ }
39
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "ops-dashboard",
3
+ "version": "2.7.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "node build.mjs",
8
+ "dev": "node build.mjs --watch"
9
+ },
10
+ "dependencies": {
11
+ "core-js": "^3.38.1",
12
+ "glyphset": "^5.0.2",
13
+ "plotline": "^4.2.0",
14
+ "react": "^18.3.1",
15
+ "react-dom": "^18.3.1",
16
+ "sheetsmith": "^1.8.0",
17
+ "tempora": "^3.1.0"
18
+ },
19
+ "devDependencies": {
20
+ "esbuild": "^0.23.1"
21
+ }
22
+ }
@@ -0,0 +1,8 @@
1
+ import * as Icons from 'glyphset';
2
+
3
+ // Usage: <Icon name="Truck" />, <Icon name="AlertTriangle" />
4
+ export default function Icon({ name, size = 16, ...rest }) {
5
+ const Glyph = Icons[name];
6
+ if (!Glyph) return null;
7
+ return <Glyph width={size} height={size} aria-hidden="true" {...rest} />;
8
+ }
@@ -0,0 +1,7 @@
1
+ // Added in 2021 when we still supported the old Android kiosks.
2
+ import 'core-js/modules/es.promise';
3
+ import 'core-js/modules/es.array.flat';
4
+ import 'core-js/modules/es.object.from-entries';
5
+ import 'core-js/modules/es.string.replace-all';
6
+ import 'core-js/modules/es.array.at';
7
+ import 'core-js/modules/es.object.group-by';
@@ -0,0 +1,4 @@
1
+ // Groups shipment rows by status for the Overview cards.
2
+ export function groupRows(rows) {
3
+ return Object.groupBy(rows, (row) => row.status);
4
+ }
@@ -0,0 +1,3 @@
1
+ > 0.5% and last 2 versions
2
+ not dead
3
+ not op_mini all
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "tidepool-ops",
3
+ "private": true,
4
+ "version": "1.9.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc -b && vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "echarts": "5.5.1",
13
+ "react": "18.3.1",
14
+ "react-dom": "18.3.1",
15
+ "react-router-dom": "6.26.2"
16
+ },
17
+ "devDependencies": {
18
+ "@types/react": "18.3.5",
19
+ "@types/react-dom": "18.3.0",
20
+ "@vitejs/plugin-react": "4.3.1",
21
+ "rollup-plugin-visualizer": "5.12.0",
22
+ "typescript": "5.5.4",
23
+ "vite": "5.4.6"
24
+ }
25
+ }
@@ -0,0 +1,8 @@
1
+ import { RouterProvider, createBrowserRouter } from 'react-router-dom'
2
+ import { routes } from './routes'
3
+
4
+ const router = createBrowserRouter(routes)
5
+
6
+ export default function App() {
7
+ return <RouterProvider router={router} />
8
+ }
@@ -0,0 +1,16 @@
1
+ // Register ECharts locales up front so chart tooltips/toolbox text match the UI language.
2
+ // Added in TPO-388 when we started the localisation work.
3
+ import { registerLocale } from 'echarts/core'
4
+ import langDE from 'echarts/lib/i18n/langDE.js'
5
+ import langFR from 'echarts/lib/i18n/langFR.js'
6
+ import langES from 'echarts/lib/i18n/langES.js'
7
+ import langJA from 'echarts/lib/i18n/langJA.js'
8
+ import langPTbr from 'echarts/lib/i18n/langPT-br.js'
9
+ import langKO from 'echarts/lib/i18n/langKO.js'
10
+
11
+ registerLocale('DE', langDE)
12
+ registerLocale('FR', langFR)
13
+ registerLocale('ES', langES)
14
+ registerLocale('JA', langJA)
15
+ registerLocale('PT-br', langPTbr)
16
+ registerLocale('KO', langKO)
@@ -0,0 +1,8 @@
1
+ import en from './messages/en'
2
+ import de from './messages/de'
3
+ import './chartLocales'
4
+
5
+ export const SUPPORTED_LANGUAGES = ['en', 'de'] as const
6
+ export type Language = (typeof SUPPORTED_LANGUAGES)[number]
7
+
8
+ export const messages: Record<Language, Record<string, string>> = { en, de }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ 'home.title': 'Flottenübersicht',
3
+ 'home.cta': 'Berichte öffnen',
4
+ 'reports.title': 'Durchsatz nach Liegeplatz',
5
+ }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ 'home.title': 'Fleet overview',
3
+ 'home.cta': 'Open reports',
4
+ 'reports.title': 'Throughput by berth',
5
+ }
@@ -0,0 +1,14 @@
1
+ import { useSyncExternalStore } from 'react'
2
+ import { SUPPORTED_LANGUAGES, type Language } from './index'
3
+
4
+ function read(): Language {
5
+ const stored = localStorage.getItem('tpo.lang')
6
+ return (SUPPORTED_LANGUAGES as readonly string[]).includes(stored ?? '') ? (stored as Language) : 'en'
7
+ }
8
+
9
+ export function useLocale(): Language {
10
+ return useSyncExternalStore((cb) => {
11
+ window.addEventListener('storage', cb)
12
+ return () => window.removeEventListener('storage', cb)
13
+ }, read)
14
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react'
2
+ import ReactDOM from 'react-dom/client'
3
+ import App from './App'
4
+ import './i18n'
5
+
6
+ ReactDOM.createRoot(document.getElementById('root')!).render(
7
+ <React.StrictMode>
8
+ <App />
9
+ </React.StrictMode>,
10
+ )
@@ -0,0 +1,14 @@
1
+ import { Link } from 'react-router-dom'
2
+ import { messages } from '../i18n'
3
+ import { useLocale } from '../i18n/useLocale'
4
+
5
+ export default function Home() {
6
+ const lang = useLocale()
7
+ const t = messages[lang]
8
+ return (
9
+ <main>
10
+ <h1>{t['home.title']}</h1>
11
+ <Link to="/reports">{t['home.cta']}</Link>
12
+ </main>
13
+ )
14
+ }
@@ -0,0 +1,31 @@
1
+ import { useEffect, useRef } from 'react'
2
+ import * as echarts from 'echarts/core'
3
+ import { LineChart, BarChart } from 'echarts/charts'
4
+ import { GridComponent, TooltipComponent, LegendComponent } from 'echarts/components'
5
+ import { CanvasRenderer } from 'echarts/renderers'
6
+ import { useLocale } from '../i18n/useLocale'
7
+
8
+ echarts.use([LineChart, BarChart, GridComponent, TooltipComponent, LegendComponent, CanvasRenderer])
9
+
10
+ export default function Reports() {
11
+ const el = useRef<HTMLDivElement>(null)
12
+ const lang = useLocale()
13
+
14
+ useEffect(() => {
15
+ if (!el.current) return
16
+ const chart = echarts.init(el.current, undefined, { locale: lang === 'de' ? 'DE' : 'EN' })
17
+ chart.setOption({
18
+ tooltip: {},
19
+ legend: {},
20
+ xAxis: { type: 'category', data: ['B1', 'B2', 'B3', 'B4'] },
21
+ yAxis: { type: 'value' },
22
+ series: [
23
+ { type: 'bar', name: 'TEU', data: [420, 380, 515, 290] },
24
+ { type: 'line', name: 'Target', data: [400, 400, 400, 400] },
25
+ ],
26
+ })
27
+ return () => chart.dispose()
28
+ }, [lang])
29
+
30
+ return <div ref={el} style={{ height: 360 }} />
31
+ }
@@ -0,0 +1,17 @@
1
+ import { lazy, Suspense } from 'react'
2
+ import Home from './pages/Home'
3
+
4
+ // Charts moved off the landing page in March (TPO-412) - Reports is lazy now.
5
+ const Reports = lazy(() => import('./pages/Reports'))
6
+
7
+ export const routes = [
8
+ { path: '/', element: <Home /> },
9
+ {
10
+ path: '/reports',
11
+ element: (
12
+ <Suspense fallback={<p>Loading reports…</p>}>
13
+ <Reports />
14
+ </Suspense>
15
+ ),
16
+ },
17
+ ]