@rhizomatics/signalk-einklabel-plugin 0.6.4 → 0.7.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +19 -10
  3. package/dist/cli/index.js +129 -96
  4. package/dist/cli/liveContext.d.ts +2 -2
  5. package/dist/cli/liveContext.js +16 -38
  6. package/dist/cli/log.d.ts +1 -1
  7. package/dist/cli/log.js +4 -4
  8. package/dist/config.d.ts +12 -3
  9. package/dist/config.js +71 -49
  10. package/dist/devices/bleDiscovery.d.ts +1 -1
  11. package/dist/devices/bleDiscovery.js +9 -3
  12. package/dist/devices/registry.d.ts +1 -1
  13. package/dist/devices/types.d.ts +4 -4
  14. package/dist/devices/zhsunyco/encode.d.ts +2 -2
  15. package/dist/devices/zhsunyco/index.d.ts +3 -3
  16. package/dist/devices/zhsunyco/index.js +10 -9
  17. package/dist/devices/zhsunyco/metadata.d.ts +1 -1
  18. package/dist/devices/zhsunyco/metadata.js +12 -12
  19. package/dist/devices/zhsunyco/protocol.js +10 -10
  20. package/dist/httpJson.js +3 -3
  21. package/dist/index.d.ts +3 -3
  22. package/dist/pathMeta.d.ts +1 -1
  23. package/dist/pathMeta.js +1 -1
  24. package/dist/plugin.d.ts +1 -1
  25. package/dist/plugin.js +16 -13
  26. package/dist/pluginVersion.d.ts +9 -0
  27. package/dist/pluginVersion.js +12 -2
  28. package/dist/render/assets.d.ts +14 -6
  29. package/dist/render/assets.js +65 -10
  30. package/dist/render/binding.d.ts +9 -2
  31. package/dist/render/binding.js +23 -23
  32. package/dist/render/fonts.js +6 -6
  33. package/dist/render/formatters.d.ts +1 -1
  34. package/dist/render/formatters.js +25 -22
  35. package/dist/render/png.d.ts +1 -1
  36. package/dist/render/svgRenderer.d.ts +9 -8
  37. package/dist/render/svgRenderer.js +33 -27
  38. package/dist/render/types.d.ts +1 -1
  39. package/dist/render/unwrapSignalkTree.d.ts +15 -0
  40. package/dist/render/unwrapSignalkTree.js +28 -0
  41. package/dist/repaintScheduler.d.ts +2 -2
  42. package/dist/repaintScheduler.js +37 -27
  43. package/dist/resolveApiUrl.js +3 -3
  44. package/dist/unitCategories.d.ts +1 -1
  45. package/dist/unitCategories.js +3 -3
  46. package/docs/assets/screenshots/plugin_config.png +0 -0
  47. package/package.json +42 -39
  48. package/templates/assets/lunar_phases/README.md +18 -0
  49. package/templates/tide.svg +11 -11
  50. /package/docs/assets/{inkscape_desc.png → screenshots/inkscape_desc.png} +0 -0
  51. /package/{resources/svg → templates/assets}/lunar_phases/first_quarter.svg +0 -0
  52. /package/{resources/svg → templates/assets}/lunar_phases/full_moon.svg +0 -0
  53. /package/{resources/svg → templates/assets}/lunar_phases/new_moon.svg +0 -0
  54. /package/{resources/svg → templates/assets}/lunar_phases/third_quarter.svg +0 -0
  55. /package/{resources/svg → templates/assets}/lunar_phases/waning_crescent.svg +0 -0
  56. /package/{resources/svg → templates/assets}/lunar_phases/waning_gibbous.svg +0 -0
  57. /package/{resources/svg → templates/assets}/lunar_phases/waxing_crescent.svg +0 -0
  58. /package/{resources/svg → templates/assets}/lunar_phases/waxing_gibbous.svg +0 -0
package/package.json CHANGED
@@ -1,51 +1,51 @@
1
1
  {
2
2
  "name": "@rhizomatics/signalk-einklabel-plugin",
3
- "version": "0.6.4",
3
+ "version": "0.7.1",
4
4
  "description": "Display SignalK data on eInk Electronic Shelf Labels",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
5
+ "keywords": [
6
+ "ble",
7
+ "display",
8
+ "eink",
9
+ "esl",
10
+ "instrument",
11
+ "signalk",
12
+ "signalk-category-hardware",
13
+ "signalk-category-instruments",
14
+ "signalk-node-server-plugin",
15
+ "tides"
16
+ ],
17
+ "homepage": "https://github.com/rhizomatics/signalk-einklabel-plugin#readme",
18
+ "bugs": {
19
+ "url": "https://github.com/rhizomatics/signalk-einklabel-plugin/issues"
20
+ },
21
+ "license": "APACHE-2.0",
22
+ "author": "jey burrows",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/rhizomatics/signalk-einklabel-plugin.git"
26
+ },
7
27
  "bin": {
8
28
  "esl-cli": "dist/cli/index.js"
9
29
  },
10
30
  "files": [
11
31
  "dist",
12
32
  "templates",
13
- "resources",
14
33
  "docs",
15
34
  "CHANGELOG.md",
16
35
  "README.md"
17
36
  ],
37
+ "main": "dist/index.js",
38
+ "types": "dist/index.d.ts",
18
39
  "scripts": {
19
40
  "build": "tsc",
20
41
  "watch": "tsc --watch",
21
42
  "cli": "ts-node src/cli/index.ts",
22
43
  "test": "node scripts/run-tests.js",
23
44
  "coverage": "node scripts/run-tests.js --coverage",
24
- "prettier:check": "prettier --check .",
25
- "prettier:write": "prettier --write .",
26
- "prepublishOnly": "npm run build"
27
- },
28
- "signalk": {
29
- "displayName": "eInk Label Displays",
30
- "appIcon": "docs/assets/icons/icon_tmp.png",
31
- "screenshots": [
32
- "docs/assets/screenshots/example_tidal_clock.png"
33
- ]
34
- },
35
- "keywords": [
36
- "signalk-node-server-plugin",
37
- "signalk-category-instruments",
38
- "signalk-category-hardware",
39
- "signalk",
40
- "eink",
41
- "esl",
42
- "display",
43
- "instrument",
44
- "ble",
45
- "tides"
46
- ],
47
- "engines": {
48
- "node": ">=18"
45
+ "prepublishOnly": "npm run build",
46
+ "fmt": "oxfmt",
47
+ "fmt:check": "oxfmt --check",
48
+ "lint": "oxlint"
49
49
  },
50
50
  "dependencies": {
51
51
  "@fontsource/roboto": "^5.2.10",
@@ -65,18 +65,21 @@
65
65
  "@types/luxon": "^3.7.1",
66
66
  "@types/node": "^20.14.0",
67
67
  "@types/pngjs": "^6.0.5",
68
- "prettier": "^3.8.5",
68
+ "oxfmt": "^0.56.0",
69
+ "oxlint": "^1.71.0",
70
+ "oxlint-tsgolint": "^0.23.0",
69
71
  "ts-node": "^10.9.2",
70
72
  "typescript": "^5.5.0"
71
73
  },
72
- "license": "APACHE-2.0",
73
- "repository": {
74
- "type": "git",
75
- "url": "git+https://github.com/rhizomatics/signalk-einklabel-plugin.git"
76
- },
77
- "author": "jey burrows",
78
- "bugs": {
79
- "url": "https://github.com/rhizomatics/signalk-einklabel-plugin/issues"
74
+ "engines": {
75
+ "node": ">=18"
80
76
  },
81
- "homepage": "https://github.com/rhizomatics/signalk-einklabel-plugin#readme"
77
+ "signalk": {
78
+ "displayName": "eInk Label Displays",
79
+ "appIcon": "docs/assets/icons/icon_tmp.png",
80
+ "screenshots": [
81
+ "docs/assets/screenshots/example_tidal_clock.png",
82
+ "docs/assets/screenshots/plugin_config.png"
83
+ ]
84
+ }
82
85
  }
@@ -0,0 +1,18 @@
1
+ # Lunar Phases
2
+
3
+ ## Source
4
+
5
+ https://commons.wikimedia.org/wiki/Category:SVG_lunar_phases_icons
6
+
7
+ ## Usage
8
+
9
+ Embed any of these in a template as a placeholder and set the `description`
10
+ property to `path=environment.moon.phaseName,assets=lunar_phases`
11
+
12
+ The image will be replaced at rendering time by the one matching the phase name.
13
+ This will automatically adapt from `Waxing Gibbous` to `waxing_gibbous.svg`
14
+
15
+ ## Replacing
16
+
17
+ Define your own template directory in the plugin configuration, and add an `assets/lunar_phases` directory path beneath it. You will need a complete set of phases in
18
+ the new directory, its not possible to override only one of them.
@@ -23,8 +23,8 @@
23
23
  inkscape:pagecheckerboard="0"
24
24
  inkscape:deskcolor="#d1d1d1"
25
25
  inkscape:zoom="1.3906433"
26
- inkscape:cx="144.89697"
27
- inkscape:cy="197.39066"
26
+ inkscape:cx="180.85155"
27
+ inkscape:cy="134.11059"
28
28
  inkscape:window-width="1488"
29
29
  inkscape:window-height="674"
30
30
  inkscape:window-x="24"
@@ -182,16 +182,16 @@
182
182
  style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:37.3333px;font-family:monospace;-inkscape-font-specification:'\'Roboto Mono, Bold\', monospace';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:1.78893">3.3m</tspan><desc
183
183
  id="desc6">source=resources,resource=tides,path=extremes[2].level,category=depth</desc></text><text
184
184
  id="extremes.2.time"
185
- x="194.47879"
185
+ x="203.77321"
186
186
  y="146.1584"
187
187
  font-size="14"
188
188
  font-family="monospace"
189
189
  fill="red"
190
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:37.3333px;font-family:monospace;-inkscape-font-specification:'Roboto Mono, Bold',monospace;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke-width:1.51352"
190
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:37.3333px;font-family:monospace;-inkscape-font-specification:'\'Roboto Mono, Bold\', monospace';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke-width:1.51352"
191
191
  transform="scale(0.70226239,1.4239692)">15:53<desc
192
192
  id="desc10">source=resources,resource=tides,path=extremes[2].time,format=local_time</desc></text><text
193
193
  id="extremes.1.level"
194
- x="328.79895"
194
+ x="334.30084"
195
195
  y="109.17664"
196
196
  font-size="14"
197
197
  font-family="monospace"
@@ -202,17 +202,17 @@
202
202
  inkscape:transform-center-x="-0.00038058817"><tspan
203
203
  sodipodi:role="line"
204
204
  id="tspan2-1"
205
- x="328.79895"
205
+ x="334.30084"
206
206
  y="109.17664"
207
207
  style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:37.3333px;font-family:monospace;-inkscape-font-specification:'\'Roboto Mono, Bold\', monospace';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:1.701">1.6m</tspan><desc
208
208
  id="desc5">source=resources,resource=tides,path=extremes[1].level,category=depth</desc></text><text
209
209
  id="extremes.1.time"
210
- x="187.55594"
210
+ x="188.63072"
211
211
  y="108.65867"
212
212
  font-size="14"
213
213
  font-family="monospace"
214
214
  fill="red"
215
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:37.3333px;font-family:monospace;-inkscape-font-specification:'Roboto Mono, Bold',monospace;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke-width:1.48364"
215
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:37.3333px;font-family:monospace;-inkscape-font-specification:'\'Roboto Mono, Bold\', monospace';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke-width:1.48364"
216
216
  transform="scale(0.7345432,1.3613903)">09:36<desc
217
217
  id="desc8">source=resources,resource=tides,path=extremes[1].time,format=local_time</desc></text><text
218
218
  id="extremes.0.time"
@@ -252,7 +252,7 @@
252
252
  transform="scale(0.74623156,1.3400666)"><desc
253
253
  id="desc9">source=resources,resource=tides,path=extremes[2].time,format=day_mon</desc>27 Jun</text><text
254
254
  id="extremes.0.level"
255
- x="322.34219"
255
+ x="324.0769"
256
256
  y="64.82357"
257
257
  font-size="14"
258
258
  font-family="monospace"
@@ -261,7 +261,7 @@
261
261
  transform="scale(0.7703174,1.2981662)"><tspan
262
262
  sodipodi:role="line"
263
263
  id="tspan2"
264
- x="322.34219"
264
+ x="324.0769"
265
265
  y="64.82357"
266
266
  style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:37.3333px;font-family:monospace;-inkscape-font-specification:'\'Roboto Mono, Bold\', monospace';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:1.71992">3.4m</tspan><desc
267
267
  id="desc4">source=resources,resource=tides,path=extremes[0].level,category=depth</desc></text><text
@@ -282,4 +282,4 @@
282
282
  id="moon_phase"
283
283
  x="340.3974"
284
284
  y="90.153488"><desc
285
- id="desc22">path=environment.moon.phaseName,assets=../resources/svg/lunar_phases</desc></image></svg>
285
+ id="desc22">path=environment.moon.phaseName,assets=lunar_phases</desc></image></svg>