@typecad/cuttlefish 1.0.0-alpha.6 → 1.0.0-alpha.8

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 (187) hide show
  1. package/dist/api/config.d.ts +32 -0
  2. package/dist/api/index.d.ts +1 -1
  3. package/dist/api/schema/types.d.ts +15 -0
  4. package/dist/api/shared/async-runtime-static.d.ts +12 -1
  5. package/dist/api/shared/async-runtime-static.js +69 -24
  6. package/dist/api/shared/async-symbol-detector.d.ts +11 -0
  7. package/dist/api/shared/async-symbol-detector.js +140 -0
  8. package/dist/api/shared/async-types.d.ts +24 -0
  9. package/dist/api/shared/coop-scheduler.d.ts +60 -0
  10. package/dist/api/shared/coop-scheduler.js +149 -0
  11. package/dist/api/shared/display-adapter.d.ts +4 -3
  12. package/dist/api/shared/display-adapter.js +15 -118
  13. package/dist/api/shared/display-adapters/sdl.js +38 -31
  14. package/dist/api/shared/display-profile.d.ts +47 -25
  15. package/dist/api/shared/display-profile.js +31 -164
  16. package/dist/api/shared/framework-manifest-registry.d.ts +9 -0
  17. package/dist/api/shared/framework-manifest-registry.js +27 -0
  18. package/dist/api/shared/framework-manifest.d.ts +581 -0
  19. package/dist/api/shared/framework-manifest.js +182 -0
  20. package/dist/api/shared/glcdfont.d.ts +12 -0
  21. package/dist/api/shared/glcdfont.js +124 -0
  22. package/dist/api/shared/graphics-strategy.d.ts +37 -0
  23. package/dist/api/shared/hal-op-ir.d.ts +755 -1
  24. package/dist/api/shared/hal-op-ir.js +129 -1
  25. package/dist/api/shared/index.d.ts +20 -2
  26. package/dist/api/shared/index.js +25 -1
  27. package/dist/api/shared/ir-core.d.ts +4 -0
  28. package/dist/api/shared/ir-declarations.d.ts +6 -0
  29. package/dist/api/shared/native-display-op-resolver.d.ts +10 -0
  30. package/dist/api/shared/native-display-op-resolver.js +64 -0
  31. package/dist/api/shared/platform-strategy.d.ts +113 -2
  32. package/dist/api/shared/polyfill-helper-registry.js +18 -1
  33. package/dist/api/shared/promise-runtime.d.ts +1 -1
  34. package/dist/api/shared/promise-runtime.js +95 -13
  35. package/dist/api/shared/toolchain-types.d.ts +17 -0
  36. package/dist/api/shared/validate-framework-manifest.d.ts +28 -0
  37. package/dist/api/shared/validate-framework-manifest.js +494 -0
  38. package/dist/api/shared/worker-runtime-polyfill.d.ts +22 -0
  39. package/dist/api/shared/worker-runtime-polyfill.js +34 -0
  40. package/dist/api/shared/worker-runtime.d.ts +69 -0
  41. package/dist/api/shared/worker-runtime.js +163 -0
  42. package/dist/cli.js +186 -82
  43. package/dist/config-loader.d.ts +7 -2
  44. package/dist/config-loader.js +23 -3
  45. package/dist/config-schema.d.ts +112 -70
  46. package/dist/config-schema.js +14 -0
  47. package/dist/contract/board-generator.d.ts +17 -0
  48. package/dist/contract/board-generator.js +57 -0
  49. package/dist/contract/contract-parser.d.ts +217 -0
  50. package/dist/contract/contract-parser.js +224 -0
  51. package/dist/contract/index.d.ts +22 -0
  52. package/dist/contract/index.js +68 -0
  53. package/dist/create/board-codegen.js +4 -4
  54. package/dist/create/board-generators.js +4 -5
  55. package/dist/create/board-spec.d.ts +72 -75
  56. package/dist/create/board-spec.js +0 -1
  57. package/dist/create/init-scaffold.d.ts +9 -2
  58. package/dist/create/init-scaffold.js +0 -14
  59. package/dist/create/init-templates.d.ts +2 -0
  60. package/dist/create/init-templates.js +74 -8
  61. package/dist/create/init-wizard.js +31 -7
  62. package/dist/debug/preprocessor.js +178 -39
  63. package/dist/debug/types.d.ts +23 -0
  64. package/dist/diagnostics/mermaid-builder.d.ts +1 -1
  65. package/dist/diagnostics/mermaid-builder.js +34 -24
  66. package/dist/emit/compliance/arxml-writer.d.ts +11 -0
  67. package/dist/emit/compliance/arxml-writer.js +34 -0
  68. package/dist/emit/compliance/compliance-context.d.ts +57 -0
  69. package/dist/emit/compliance/compliance-context.js +113 -0
  70. package/dist/emit/compliance/deviation-ledger.d.ts +27 -0
  71. package/dist/emit/compliance/deviation-ledger.js +47 -0
  72. package/dist/emit/compliance/deviation-writer.d.ts +30 -0
  73. package/dist/emit/compliance/deviation-writer.js +37 -0
  74. package/dist/emit/compliance/index.d.ts +7 -0
  75. package/dist/emit/compliance/index.js +6 -0
  76. package/dist/emit/compliance/rule-engine.d.ts +13 -0
  77. package/dist/emit/compliance/rule-engine.js +101 -0
  78. package/dist/emit/compliance/rules.d.ts +16 -0
  79. package/dist/emit/compliance/rules.js +191 -0
  80. package/dist/emit/compliance/types.d.ts +59 -0
  81. package/dist/emit/compliance/types.js +8 -0
  82. package/dist/emit/cpp-emitter.js +4 -3
  83. package/dist/emit/emitters/class-emitter.js +6 -1
  84. package/dist/emit/emitters/emitter-context.d.ts +28 -1
  85. package/dist/emit/emitters/function-emitter-impl.js +153 -53
  86. package/dist/emit/emitters/line-appender.js +19 -0
  87. package/dist/emit/emitters/line-marker.d.ts +38 -0
  88. package/dist/emit/emitters/line-marker.js +39 -0
  89. package/dist/emit/emitters/output-finalizer.d.ts +6 -0
  90. package/dist/emit/emitters/output-finalizer.js +101 -12
  91. package/dist/emit/emitters/setup.d.ts +17 -0
  92. package/dist/emit/emitters/setup.js +257 -36
  93. package/dist/emit/emitters/top-level-prep.js +8 -0
  94. package/dist/emit/emitters/type-decl-emitter.js +28 -3
  95. package/dist/emit/emitters/ui-emitter.js +33 -9
  96. package/dist/emit/expression-renderer.d.ts +1 -1
  97. package/dist/emit/expression-renderer.js +91 -6
  98. package/dist/emit/route-hal-op.js +18 -5
  99. package/dist/emit/snprintf-helpers.js +15 -4
  100. package/dist/emit/statement-renderer.d.ts +10 -0
  101. package/dist/emit/statement-renderer.js +34 -5
  102. package/dist/emit/utils/async-state-machine.js +221 -125
  103. package/dist/emit/utils/hal-op-cpp-type.d.ts +6 -0
  104. package/dist/emit/utils/hal-op-cpp-type.js +40 -0
  105. package/dist/framework-package.js +2 -0
  106. package/dist/framework-registry.d.ts +17 -0
  107. package/dist/ir/adc-range-validation.js +14 -1
  108. package/dist/ir/build-ir-state.d.ts +1 -0
  109. package/dist/ir/build-ir-state.js +14 -0
  110. package/dist/ir/build-ir.js +9 -5
  111. package/dist/ir/call-graph.js +16 -0
  112. package/dist/ir/expression-to-ir.js +164 -0
  113. package/dist/ir/feature-registry.js +7 -25
  114. package/dist/ir/function-builder.js +22 -0
  115. package/dist/ir/hal/hal-emitter.d.ts +5 -2
  116. package/dist/ir/hal/hal-emitter.js +50 -18
  117. package/dist/ir/hal/hal-parser.d.ts +6 -0
  118. package/dist/ir/hal/hal-parser.js +81 -0
  119. package/dist/ir/hal/hal-plugins.js +723 -1
  120. package/dist/ir/identifier-collector.js +35 -0
  121. package/dist/ir/interrupt-analysis.d.ts +5 -1
  122. package/dist/ir/interrupt-analysis.js +8 -16
  123. package/dist/ir/network-validation.d.ts +4 -0
  124. package/dist/ir/network-validation.js +184 -0
  125. package/dist/ir/ownership-analysis.js +20 -1
  126. package/dist/ir/pin-capability-validation.js +37 -0
  127. package/dist/ir/pin-mode-validation.d.ts +2 -2
  128. package/dist/ir/pin-mode-validation.js +49 -18
  129. package/dist/ir/program-analysis.d.ts +65 -0
  130. package/dist/ir/program-analysis.js +318 -2
  131. package/dist/ir/render-expr.js +11 -0
  132. package/dist/ir/timing-validation.d.ts +6 -1
  133. package/dist/ir/timing-validation.js +60 -13
  134. package/dist/ir/transformers/call-statement.js +105 -0
  135. package/dist/ir/transformers/expressions.js +62 -0
  136. package/dist/ir/transformers/hal-call-resolver.js +21 -0
  137. package/dist/ir/transformers/hal-emit-helpers.js +1 -1
  138. package/dist/ir/transformers/namespace-methods.js +17 -12
  139. package/dist/ir/transformers/ui-reactive.js +2 -2
  140. package/dist/ir/transformers/variables.js +92 -3
  141. package/dist/ir/type-resolution.js +18 -0
  142. package/dist/ir/ui-element-auto-wire.js +7 -5
  143. package/dist/ir/utils/map-statements.d.ts +4 -0
  144. package/dist/ir/utils/map-statements.js +79 -0
  145. package/dist/ir/validation-orchestrator.js +9 -2
  146. package/dist/ir/worker-analysis.d.ts +10 -0
  147. package/dist/ir/worker-analysis.js +261 -0
  148. package/dist/libdef/c-to-decl.d.ts +27 -0
  149. package/dist/libdef/c-to-decl.js +397 -0
  150. package/dist/libdef/component-decls.d.ts +2 -0
  151. package/dist/libdef/component-decls.js +6 -0
  152. package/dist/libdef/component-discovery.d.ts +43 -0
  153. package/dist/libdef/component-discovery.js +83 -0
  154. package/dist/libdef/cpp-to-decl.d.ts +9 -0
  155. package/dist/libdef/cpp-to-decl.js +72 -0
  156. package/dist/libdef/registry.js +5 -2
  157. package/dist/lint-cache.d.ts +59 -0
  158. package/dist/lint-cache.js +257 -0
  159. package/dist/orchestrator/graph-builder.js +14 -9
  160. package/dist/platform/coop-scheduler-runtime.d.ts +19 -0
  161. package/dist/platform/coop-scheduler-runtime.js +41 -0
  162. package/dist/platform/generic-strategy.d.ts +15 -3
  163. package/dist/platform/generic-strategy.js +49 -4
  164. package/dist/safety/safety-bridge.d.ts +11 -0
  165. package/dist/safety/safety-bridge.js +48 -0
  166. package/dist/safety/sidecar-bridge.d.ts +5 -0
  167. package/dist/safety/sidecar-bridge.js +22 -0
  168. package/dist/safety-hook.d.ts +79 -0
  169. package/dist/safety-hook.js +35 -0
  170. package/dist/testing.d.ts +7 -1
  171. package/dist/testing.js +8 -1
  172. package/dist/transpile.d.ts +3 -0
  173. package/dist/transpile.js +175 -41
  174. package/dist/types.d.ts +13 -2
  175. package/dist/ui-hook.d.ts +17 -3
  176. package/dist/utils/cli.js +78 -4
  177. package/dist/utils/fs.d.ts +13 -0
  178. package/dist/utils/fs.js +50 -0
  179. package/package.json +24 -5
  180. package/dist/api/shared/display-adapters/eink-mono.d.ts +0 -2
  181. package/dist/api/shared/display-adapters/eink-mono.js +0 -53
  182. package/dist/api/shared/display-adapters/ssd1309.d.ts +0 -2
  183. package/dist/api/shared/display-adapters/ssd1309.js +0 -136
  184. package/dist/api/shared/display-adapters/st7796.d.ts +0 -2
  185. package/dist/api/shared/display-adapters/st7796.js +0 -132
  186. package/dist/licenses.d.ts +0 -185
  187. package/dist/licenses.js +0 -963
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typecad/cuttlefish",
3
- "version": "1.0.0-alpha.6",
3
+ "version": "1.0.0-alpha.8",
4
4
  "description": "TypeScript to C++ transpiler — native, Arduino, and bare-metal targets",
5
5
  "type": "module",
6
6
  "main": "./dist/transpile.js",
@@ -29,10 +29,22 @@
29
29
  "types": "./dist/ui-hook.d.ts",
30
30
  "default": "./dist/ui-hook.js"
31
31
  },
32
+ "./safety-hook-types": {
33
+ "types": "./dist/safety-hook.d.ts",
34
+ "default": "./dist/safety-hook.js"
35
+ },
36
+ "./build-ir-state": {
37
+ "types": "./dist/ir/build-ir-state.d.ts",
38
+ "default": "./dist/ir/build-ir-state.js"
39
+ },
32
40
  "./config-loader": {
33
41
  "types": "./dist/config-loader.d.ts",
34
42
  "default": "./dist/config-loader.js"
35
43
  },
44
+ "./utils/ui": {
45
+ "types": "./dist/utils/ui.d.ts",
46
+ "default": "./dist/utils/ui.js"
47
+ },
36
48
  "./stores/display-profile-store": {
37
49
  "types": "./dist/stores/display-profile-store.d.ts",
38
50
  "default": "./dist/stores/display-profile-store.js"
@@ -49,6 +61,10 @@
49
61
  "types": "./dist/emit/route-hal-op.d.ts",
50
62
  "default": "./dist/emit/route-hal-op.js"
51
63
  },
64
+ "./lib/component-decls": {
65
+ "types": "./dist/libdef/component-decls.d.ts",
66
+ "default": "./dist/libdef/component-decls.js"
67
+ },
52
68
  "./ir/transformers/ui-lowering": {
53
69
  "types": "./dist/ir/transformers/ui-lowering.d.ts",
54
70
  "default": "./dist/ir/transformers/ui-lowering.js"
@@ -80,19 +96,22 @@
80
96
  "dependencies": {
81
97
  "chalk": "^4.1.2",
82
98
  "typescript": "^5.7.3",
83
- "zod": "^3.24.0",
84
- "@typecad/arduino-cli": "1.0.0-alpha.6"
99
+ "zod": "^3.24.0"
85
100
  },
86
101
  "peerDependencies": {
87
- "@typecad/ui": "1.0.0-alpha.6"
102
+ "@typecad/ui": "1.0.0-alpha.8",
103
+ "@typecad/safety": "1.0.0-alpha.8"
88
104
  },
89
105
  "peerDependenciesMeta": {
90
106
  "@typecad/ui": {
91
107
  "optional": true
108
+ },
109
+ "@typecad/safety": {
110
+ "optional": true
92
111
  }
93
112
  },
94
113
  "optionalDependencies": {
95
- "@typecad/framework-native": "1.0.0-alpha.6"
114
+ "@typecad/framework-native": "1.0.0-alpha.8"
96
115
  },
97
116
  "devDependencies": {
98
117
  "@types/node": "^22.10.7"
@@ -1,2 +0,0 @@
1
- import type { DisplayAdapterGenerator } from "../display-adapter.js";
2
- export declare const einkMonoAdapter: DisplayAdapterGenerator;
@@ -1,53 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- // eink-mono display adapter — 1-bit B&W e-ink panels (SSD1680-class, e.g. the
3
- // common 296×128 / 250×122 breakouts). Deferred refresh: no fillScreen on init
4
- // (a full clear flashes), and a partial-refresh entry point the runtime's dirty-
5
- // rect union calls once per frame.
6
- //
7
- // Library note: targets Adafruit_EPD (Adafruit_SSD168x). The exact partial-
8
- // refresh method name varies by library (Adafruit_EPD: refreshPartial / GxEPD:
9
- // updateWindow). Verify against the target library before flashing — the shim
10
- // shape is correct; the method call is library-specific. TODO Phase 5.
11
- // ---------------------------------------------------------------------------
12
- export const einkMonoAdapter = (display) => {
13
- const cs = display._mountCs;
14
- const dc = display._mountDc;
15
- const rst = display._mountRst;
16
- const rotation = display.rotation ?? 0;
17
- const w = display.width;
18
- const h = display.height;
19
- return {
20
- includes: [
21
- "#include <Adafruit_GFX.h>",
22
- "#include <Adafruit_EPD.h>",
23
- ].join("\n"),
24
- // busy pin = -1 (unused); SRCS+D/C+RST+CS wiring. Adafruit_SSD168x(width, height, dc, rst, cs, busy).
25
- declaration: `Adafruit_SSD168x __tc_display(${w}, ${h}, ${dc}, ${rst}, ${cs}, -1);`,
26
- functions: [
27
- "// --- Display adapter: eink-mono (SSD1680-class, 1-bit, deferred refresh) ---",
28
- "static inline void display_init() {",
29
- " __tc_display.begin();",
30
- ` __tc_display.setRotation(${rotation});`,
31
- " // No full-screen clear here — e-ink flashes on a full clear. The runtime",
32
- " // marks all nodes dirty (UI_REFRESH_DEFERRED) and the first flush repaints",
33
- " // via partial refresh instead.",
34
- "}",
35
- "",
36
- "static inline CuttlefishDisplayTarget* display_defaultTarget() { return &__tc_display; }",
37
- "static inline int16_t display_width() { return __tc_display.width(); }",
38
- "static inline int16_t display_height() { return __tc_display.height(); }",
39
- "static inline void display_startWrite() {}",
40
- "static inline void display_endWrite() {}",
41
- "static inline void display_setAddrWindow(int16_t x, int16_t y, int16_t w, int16_t h) { (void)x; (void)y; (void)w; (void)h; }",
42
- // Partial refresh: push just the dirty region. The runtime draws into the
43
- // EPD's built-in GFX buffer (the display IS the backing store for 1-bit),
44
- // then calls this with the unioned dirty rect. TODO Phase 5: verify the
45
- // exact partial-refresh API for the target EPD library.
46
- "static inline void display_partial_refresh(int16_t x, int16_t y, int16_t w, int16_t h) {",
47
- " __tc_display.refreshPartial(x, y, (uint16_t)w, (uint16_t)h);",
48
- "}",
49
- // drawPixel goes through GFX into the EPD buffer; partial_refresh publishes it.
50
- "static inline void display_fillScreen(uint32_t color) { __tc_display.fillScreen(color ? EPD_WHITE : EPD_BLACK); }",
51
- ].join("\n"),
52
- };
53
- };
@@ -1,2 +0,0 @@
1
- import type { DisplayAdapterGenerator } from "../display-adapter.js";
2
- export declare const ssd1309Adapter: DisplayAdapterGenerator;
@@ -1,136 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- // SSD1309 OLED display adapter — 1-bit monochrome OLED panels over I2C.
3
- //
4
- // Targets the Adafruit_SSD1306 library (which supports SSD1309 via the same
5
- // API). The SSD1306 is a page-buffered Adafruit_GFX subclass: draw into its
6
- // buffer via drawPixel/fillRect, then call display() to flush over I2C.
7
- // Colors are 1-bit (SSD1306_WHITE / SSD1306_BLACK). The runtime's
8
- // UI_NATIVE_MONO snap converts 565 → black/white at the draw choke points.
9
- //
10
- // The SSD1306 IS the backing store (its internal buffer), so this adapter
11
- // follows the e-ink deferred-refresh pattern: the runtime draws dirty rects
12
- // into the buffer, then display_partial_refresh() flushes. The SSD1306 has
13
- // no true partial refresh — display() flushes the full page buffer — but
14
- // the dirty-rect tracking still minimizes draw calls into the buffer.
15
- //
16
- // I2C wiring: SDA/SCL (Wire bus) + reset pin + I2C address (default 0x3C).
17
- // ---------------------------------------------------------------------------
18
- export const ssd1309Adapter = (display) => {
19
- const w = display.width;
20
- const h = display.height;
21
- const reset = display._mountReset;
22
- const address = display._mountAddress;
23
- const rotation = display.rotation ?? 0;
24
- return {
25
- includes: [
26
- `#define CuttlefishDisplayTarget Adafruit_GFX`,
27
- `#define CuttlefishCanvas16 GFXcanvas16`,
28
- `#define SSD1306_NO_SPLASH`,
29
- `#include <Adafruit_GFX.h>`,
30
- `#include <Adafruit_SSD1306.h>`,
31
- `#include <Wire.h>`,
32
- ].join("\n"),
33
- // I2C constructor: Adafruit_SSD1306(width, height, &Wire, resetPin)
34
- declaration: `Adafruit_SSD1306 __tc_display(${w}, ${h}, &Wire, ${reset});`,
35
- functions: [
36
- `// --- Display adapter: SSD1309 OLED (1-bit mono, I2C, page-buffered) ---`,
37
- `static inline void display_init() {`,
38
- ` // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally.`,
39
- ` __tc_display.begin(SSD1306_SWITCHCAPVCC, 0x${address.toString(16)});`,
40
- ` __tc_display.setRotation(${rotation});`,
41
- ` __tc_display.clearDisplay();`,
42
- ` __tc_display.display();`,
43
- `}`,
44
- ``,
45
- `static inline void display_fillScreen(uint32_t color) {`,
46
- ` __tc_display.fillScreen(color ? SSD1306_WHITE : SSD1306_BLACK);`,
47
- `}`,
48
- `static inline CuttlefishDisplayTarget* display_defaultTarget() { return &__tc_display; }`,
49
- `static inline int16_t display_width() { return __tc_display.width(); }`,
50
- `static inline int16_t display_height() { return __tc_display.height(); }`,
51
- `static inline void display_startWrite() {}`,
52
- `static inline void display_endWrite() {}`,
53
- `static int16_t __ssd1309_addr_x = 0;`,
54
- `static int16_t __ssd1309_addr_y = 0;`,
55
- `static int16_t __ssd1309_addr_w = 0;`,
56
- `static int16_t __ssd1309_addr_h = 0;`,
57
- `static uint32_t __ssd1309_addr_cursor = 0;`,
58
- `static inline void display_setAddrWindow(int16_t x, int16_t y, int16_t w, int16_t h) {`,
59
- ` __ssd1309_addr_x = x;`,
60
- ` __ssd1309_addr_y = y;`,
61
- ` __ssd1309_addr_w = w;`,
62
- ` __ssd1309_addr_h = h;`,
63
- ` __ssd1309_addr_cursor = 0;`,
64
- `}`,
65
- `static inline void display_writePixels(UI_COLOR_T* pixels, uint32_t count) {`,
66
- ` // SSD1306 is page-buffered — write into the GFX buffer via drawPixel.`,
67
- ` if (__ssd1309_addr_w <= 0 || __ssd1309_addr_h <= 0) return;`,
68
- ` uint32_t windowPixels = (uint32_t)__ssd1309_addr_w * (uint32_t)__ssd1309_addr_h;`,
69
- ` for (uint32_t i = 0; i < count; i++) {`,
70
- ` if (__ssd1309_addr_cursor >= windowPixels) break;`,
71
- ` uint32_t pos = __ssd1309_addr_cursor++;`,
72
- ` int16_t px = (int16_t)(__ssd1309_addr_x + (int16_t)(pos % (uint32_t)__ssd1309_addr_w));`,
73
- ` int16_t py = (int16_t)(__ssd1309_addr_y + (int16_t)(pos / (uint32_t)__ssd1309_addr_w));`,
74
- ` __tc_display.drawPixel(px, py, pixels[i] ? SSD1306_WHITE : SSD1306_BLACK);`,
75
- ` }`,
76
- `}`,
77
- ``,
78
- `// The SSD1306 has no true partial refresh — display() flushes the full`,
79
- `// page buffer. The runtime's dirty-rect tracking still minimizes the draw`,
80
- `// calls INTO the buffer (only dirty nodes are redrawn); this just publishes`,
81
- `// the result. Called once per frame after the dirty-rect union is drawn.`,
82
- `static inline void display_partial_refresh(int16_t x, int16_t y, int16_t w, int16_t h) {`,
83
- ` (void)x; (void)y; (void)w; (void)h;`,
84
- ` __tc_display.display();`,
85
- `}`,
86
- // ── Canvas (offscreen GFXcanvas16 for AA text / scroll compositing) ──
87
- `static inline uint16_t ssd_mono(uint16_t c);`,
88
- `static inline CuttlefishCanvas16* display_createCanvas(int16_t w, int16_t h) { return new GFXcanvas16(w, h); }`,
89
- `static inline CuttlefishCanvas16* display_createCanvasPsram(int16_t w, int16_t h) {`,
90
- `#if defined(ESP32) && defined(BOARD_HAS_PSRAM)`,
91
- ` return new (ps_malloc(sizeof(GFXcanvas16))) GFXcanvas16(w, h);`,
92
- `#else`,
93
- ` (void)w; (void)h;`,
94
- ` return nullptr;`,
95
- `#endif`,
96
- `}`,
97
- `static inline void display_deleteCanvas(CuttlefishCanvas16* canvas) { delete canvas; }`,
98
- `static inline int16_t display_canvasWidth(CuttlefishCanvas16* c) { return c->width(); }`,
99
- `static inline int16_t display_canvasHeight(CuttlefishCanvas16* c) { return c->height(); }`,
100
- `static inline uint16_t* display_canvasBuffer(CuttlefishCanvas16* c) { return c->getBuffer(); }`,
101
- `static inline uint16_t display_canvasGetPixel(CuttlefishCanvas16* c, int16_t x, int16_t y) { return c->getPixel(x, y); }`,
102
- `static inline void display_canvasFillScreen(CuttlefishCanvas16* c, UI_COLOR_T color) { c->fillScreen(ssd_mono((uint16_t)color)); }`,
103
- `static inline void display_canvasFillRect(CuttlefishCanvas16* c, int16_t x, int16_t y, int16_t w, int16_t h, UI_COLOR_T color) { c->fillRect(x, y, w, h, ssd_mono((uint16_t)color)); }`,
104
- // ── Color conversion: runtime uses 0xffff/0x0000 (565 mono snap), but the
105
- // SSD1306's drawPixel switch only accepts 0/1/2. Convert any nonzero to 1. ──
106
- `static inline uint16_t ssd_mono(uint16_t c) { return c ? SSD1306_WHITE : SSD1306_BLACK; }`,
107
- // ── Target-polymorphic draw (panel + canvas share CuttlefishDisplayTarget*) ──
108
- `static inline void display_targetDrawPixel(CuttlefishDisplayTarget* t, int16_t x, int16_t y, UI_COLOR_T color) { t->drawPixel(x, y, ssd_mono((uint16_t)color)); }`,
109
- `static inline int16_t display_targetWidth(CuttlefishDisplayTarget* t) { return t->width(); }`,
110
- `static inline int16_t display_targetHeight(CuttlefishDisplayTarget* t) { return t->height(); }`,
111
- `static inline void display_targetDrawRGBBitmap(CuttlefishDisplayTarget* t, int16_t x, int16_t y, const UI_COLOR_T* b, int16_t w, int16_t h) {`,
112
- ` if (!b || w <= 0 || h <= 0) return;`,
113
- ` for (int16_t yy = 0; yy < h; yy++) {`,
114
- ` for (int16_t xx = 0; xx < w; xx++) {`,
115
- ` t->drawPixel((int16_t)(x + xx), (int16_t)(y + yy), ssd_mono((uint16_t)b[(int32_t)yy * w + xx]));`,
116
- ` }`,
117
- ` }`,
118
- `}`,
119
- `static inline void display_targetFillRect(CuttlefishDisplayTarget* t, int16_t x, int16_t y, int16_t w, int16_t h, UI_COLOR_T color) { t->fillRect(x, y, w, h, ssd_mono((uint16_t)color)); }`,
120
- `static inline void display_targetDrawFastHLine(CuttlefishDisplayTarget* t, int16_t x, int16_t y, int16_t w, UI_COLOR_T color) { t->drawFastHLine(x, y, w, ssd_mono((uint16_t)color)); }`,
121
- `static inline void display_targetDrawFastVLine(CuttlefishDisplayTarget* t, int16_t x, int16_t y, int16_t h, UI_COLOR_T color) { t->drawFastVLine(x, y, h, ssd_mono((uint16_t)color)); }`,
122
- `static inline void display_targetFillRoundRect(CuttlefishDisplayTarget* t, int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, UI_COLOR_T color) { t->fillRoundRect(x, y, w, h, r, ssd_mono((uint16_t)color)); }`,
123
- `static inline void display_targetDrawRect(CuttlefishDisplayTarget* t, int16_t x, int16_t y, int16_t w, int16_t h, UI_COLOR_T color) { t->drawRect(x, y, w, h, ssd_mono((uint16_t)color)); }`,
124
- `static inline void display_targetDrawRoundRect(CuttlefishDisplayTarget* t, int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, UI_COLOR_T color) { t->drawRoundRect(x, y, w, h, r, ssd_mono((uint16_t)color)); }`,
125
- `static inline void display_targetDrawLine(CuttlefishDisplayTarget* t, int16_t x0, int16_t y0, int16_t x1, int16_t y1, UI_COLOR_T color) { t->drawLine(x0, y0, x1, y1, ssd_mono((uint16_t)color)); }`,
126
- `static inline void display_targetFillCircle(CuttlefishDisplayTarget* t, int16_t x, int16_t y, int16_t r, UI_COLOR_T color) { t->fillCircle(x, y, r, ssd_mono((uint16_t)color)); }`,
127
- `static inline void display_targetDrawCircle(CuttlefishDisplayTarget* t, int16_t x, int16_t y, int16_t r, UI_COLOR_T color) { t->drawCircle(x, y, r, ssd_mono((uint16_t)color)); }`,
128
- `static inline void display_targetSetCursor(CuttlefishDisplayTarget* t, int16_t x, int16_t y) { t->setCursor(x, y); }`,
129
- `static inline void display_targetSetTextColor(CuttlefishDisplayTarget* t, UI_COLOR_T fg) { t->setTextColor(ssd_mono((uint16_t)fg)); }`,
130
- `static inline void display_targetSetTextColorBg(CuttlefishDisplayTarget* t, UI_COLOR_T fg, UI_COLOR_T bg) { t->setTextColor(ssd_mono((uint16_t)fg), ssd_mono((uint16_t)bg)); }`,
131
- `static inline void display_targetSetTextSize(CuttlefishDisplayTarget* t, uint8_t s) { t->setTextSize(s); }`,
132
- `static inline void display_targetSetTextWrap(CuttlefishDisplayTarget* t, bool w) { t->setTextWrap(w); }`,
133
- `static inline void display_targetPrint(CuttlefishDisplayTarget* t, const char* s) { t->print(s); }`,
134
- ].join("\n"),
135
- };
136
- };
@@ -1,2 +0,0 @@
1
- import type { DisplayAdapterGenerator } from "../display-adapter.js";
2
- export declare const st7796Adapter: DisplayAdapterGenerator;
@@ -1,132 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- // ST7796S display adapter — targets the Adafruit_ST7735_and_ST7789_Library
3
- // fork that exposes the Adafruit_ST7796S class (320×480 SPI TFT).
4
- //
5
- // Color mode: RGB565 only. The Adafruit_ST7796S init sequence hardcodes
6
- // ST77XX_COLMOD = 0x55 (16-bit/pixel). RGB666/18-bit would require patching
7
- // the library's init array (0x55 → 0x66) AND overriding Adafruit_SPITFT's
8
- // 565-native writePixels — out of scope for v1. Requesting rgb666 throws.
9
- //
10
- // Init API: Adafruit_ST7796S requires init(w,h,rowOff,colOff,colorOrder) to
11
- // send the panel init sequence. begin(freq) alone would skip it (blank panel).
12
- // SPI frequency handling: init() runs the panel command sequence and initializes
13
- // Adafruit_SPITFT. If the profile requests a frequency, update the transaction
14
- // settings with setSPISpeed() after init; do not call initSPI() a second time.
15
- // ---------------------------------------------------------------------------
16
- export const st7796Adapter = (display) => {
17
- const cs = display._mountCs;
18
- const dc = display._mountDc;
19
- const rst = display._mountRst;
20
- const rotation = display.rotation ?? 1;
21
- const spiFreq = display.spiFrequency;
22
- const invertDisplay = display.invertDisplay;
23
- const colorOrder = display.colorOrder === "bgr" ? "ST7796S_BGR" : "ST7796S_RGB";
24
- if (display.colorFormat === "rgb666" || display.colorFormat === "rgb888") {
25
- throw new Error(`RGB666/RGB888 is not supported by the Adafruit_ST7796S library: ` +
26
- `its init sequence hardcodes COLMOD=0x55 (RGB565). Use colorFormat: "rgb565". ` +
27
- `True 18-bit support requires patching the library init array and overriding ` +
28
- `Adafruit_SPITFT's 565-native writePixels — tracked as a follow-up.`);
29
- }
30
- const includes = [
31
- "#define CuttlefishDisplayTarget Adafruit_GFX",
32
- "#define CuttlefishCanvas16 GFXcanvas16",
33
- "#include <Adafruit_GFX.h>",
34
- "#include <Adafruit_ST7796S.h>",
35
- ].join("\n");
36
- const inversionLines = invertDisplay === undefined
37
- ? []
38
- : [
39
- ` __tc_display.startWrite();`,
40
- ` __tc_display.writeCommand(${invertDisplay ? "ST77XX_INVON" : "ST77XX_INVOFF"});`,
41
- ` __tc_display.endWrite();`,
42
- ];
43
- return {
44
- includes,
45
- declaration: `Adafruit_ST7796S __tc_display = Adafruit_ST7796S(${cs}, ${dc}, ${rst});`,
46
- functions: [
47
- `// --- Display adapter: ST7796S (RGB565) ---`,
48
- `static inline void display_init() {`,
49
- ` __tc_display.init(320, 480, 0, 0, ${colorOrder});`,
50
- spiFreq ? ` __tc_display.setSPISpeed(${spiFreq});` : ``,
51
- ...inversionLines,
52
- ` __tc_display.setRotation(${rotation});`,
53
- ` __tc_display.fillScreen(0x0000);`,
54
- `}`,
55
- ``,
56
- `static inline void display_fillScreen(UI_COLOR_T color) { __tc_display.fillScreen((uint16_t)color); }`,
57
- `static inline CuttlefishDisplayTarget* display_defaultTarget() { return &__tc_display; }`,
58
- `static inline int16_t display_width() { return __tc_display.width(); }`,
59
- `static inline int16_t display_height() { return __tc_display.height(); }`,
60
- ``,
61
- `static inline void display_startWrite() { __tc_display.startWrite(); }`,
62
- `static inline void display_endWrite() { __tc_display.endWrite(); }`,
63
- `static inline void display_setAddrWindow(int16_t x, int16_t y, int16_t w, int16_t h) {`,
64
- ` __tc_display.setAddrWindow(x, y, w, h);`,
65
- `}`,
66
- `static inline void display_writePixels(uint16_t* pixels, uint32_t count) {`,
67
- ` __tc_display.writePixels(pixels, count);`,
68
- `}`,
69
- ``,
70
- `static inline CuttlefishCanvas16* display_createCanvas(int16_t w, int16_t h) {`,
71
- ` return new GFXcanvas16(w, h);`,
72
- `}`,
73
- `static inline CuttlefishCanvas16* display_createCanvasPsram(int16_t w, int16_t h) {`,
74
- `#if defined(ESP32) && defined(BOARD_HAS_PSRAM)`,
75
- ` return new (ps_malloc(sizeof(GFXcanvas16))) GFXcanvas16(w, h);`,
76
- `#else`,
77
- ` (void)w; (void)h;`,
78
- ` return nullptr;`,
79
- `#endif`,
80
- `}`,
81
- `static inline void display_deleteCanvas(CuttlefishCanvas16* canvas) { delete canvas; }`,
82
- `static inline int16_t display_canvasWidth(CuttlefishCanvas16* canvas) { return canvas->width(); }`,
83
- `static inline int16_t display_canvasHeight(CuttlefishCanvas16* canvas) { return canvas->height(); }`,
84
- `static inline uint16_t* display_canvasBuffer(CuttlefishCanvas16* canvas) { return canvas->getBuffer(); }`,
85
- `static inline uint16_t display_canvasGetPixel(CuttlefishCanvas16* canvas, int16_t x, int16_t y) { return canvas->getPixel(x, y); }`,
86
- `static inline void display_canvasFillScreen(CuttlefishCanvas16* canvas, UI_COLOR_T color) { canvas->fillScreen((uint16_t)color); }`,
87
- `static inline void display_canvasFillRect(CuttlefishCanvas16* canvas, int16_t x, int16_t y, int16_t w, int16_t h, UI_COLOR_T color) {`,
88
- ` canvas->fillRect(x, y, w, h, (uint16_t)color);`,
89
- `}`,
90
- ``,
91
- `static inline void display_targetDrawPixel(CuttlefishDisplayTarget* target, int16_t x, int16_t y, UI_COLOR_T color) { target->drawPixel(x, y, (uint16_t)color); }`,
92
- `static inline int16_t display_targetWidth(CuttlefishDisplayTarget* target) { return target->width(); }`,
93
- `static inline int16_t display_targetHeight(CuttlefishDisplayTarget* target) { return target->height(); }`,
94
- `static inline void display_targetDrawRGBBitmap(CuttlefishDisplayTarget* target, int16_t x, int16_t y, const uint16_t* bitmap, int16_t w, int16_t h) {`,
95
- ` target->drawRGBBitmap(x, y, bitmap, w, h);`,
96
- `}`,
97
- `static inline void display_targetFillRect(CuttlefishDisplayTarget* target, int16_t x, int16_t y, int16_t w, int16_t h, UI_COLOR_T color) {`,
98
- ` target->fillRect(x, y, w, h, (uint16_t)color);`,
99
- `}`,
100
- `static inline void display_targetDrawFastHLine(CuttlefishDisplayTarget* target, int16_t x, int16_t y, int16_t w, UI_COLOR_T color) {`,
101
- ` target->drawFastHLine(x, y, w, (uint16_t)color);`,
102
- `}`,
103
- `static inline void display_targetDrawFastVLine(CuttlefishDisplayTarget* target, int16_t x, int16_t y, int16_t h, UI_COLOR_T color) {`,
104
- ` target->drawFastVLine(x, y, h, (uint16_t)color);`,
105
- `}`,
106
- `static inline void display_targetFillRoundRect(CuttlefishDisplayTarget* target, int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, UI_COLOR_T color) {`,
107
- ` target->fillRoundRect(x, y, w, h, r, (uint16_t)color);`,
108
- `}`,
109
- `static inline void display_targetDrawRect(CuttlefishDisplayTarget* target, int16_t x, int16_t y, int16_t w, int16_t h, UI_COLOR_T color) {`,
110
- ` target->drawRect(x, y, w, h, (uint16_t)color);`,
111
- `}`,
112
- `static inline void display_targetDrawRoundRect(CuttlefishDisplayTarget* target, int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, UI_COLOR_T color) {`,
113
- ` target->drawRoundRect(x, y, w, h, r, (uint16_t)color);`,
114
- `}`,
115
- `static inline void display_targetDrawLine(CuttlefishDisplayTarget* target, int16_t x0, int16_t y0, int16_t x1, int16_t y1, UI_COLOR_T color) {`,
116
- ` target->drawLine(x0, y0, x1, y1, (uint16_t)color);`,
117
- `}`,
118
- `static inline void display_targetFillCircle(CuttlefishDisplayTarget* target, int16_t x, int16_t y, int16_t r, UI_COLOR_T color) {`,
119
- ` target->fillCircle(x, y, r, (uint16_t)color);`,
120
- `}`,
121
- `static inline void display_targetDrawCircle(CuttlefishDisplayTarget* target, int16_t x, int16_t y, int16_t r, UI_COLOR_T color) {`,
122
- ` target->drawCircle(x, y, r, (uint16_t)color);`,
123
- `}`,
124
- `static inline void display_targetSetCursor(CuttlefishDisplayTarget* target, int16_t x, int16_t y) { target->setCursor(x, y); }`,
125
- `static inline void display_targetSetTextColor(CuttlefishDisplayTarget* target, UI_COLOR_T fg) { target->setTextColor((uint16_t)fg); }`,
126
- `static inline void display_targetSetTextColorBg(CuttlefishDisplayTarget* target, UI_COLOR_T fg, UI_COLOR_T bg) { target->setTextColor((uint16_t)fg, (uint16_t)bg); }`,
127
- `static inline void display_targetSetTextSize(CuttlefishDisplayTarget* target, uint8_t size) { target->setTextSize(size); }`,
128
- `static inline void display_targetSetTextWrap(CuttlefishDisplayTarget* target, bool wrap) { target->setTextWrap(wrap); }`,
129
- `static inline void display_targetPrint(CuttlefishDisplayTarget* target, const char* text) { target->print(text); }`,
130
- ].join("\n"),
131
- };
132
- };
@@ -1,185 +0,0 @@
1
- export type CopyleftRisk = "permissive" | "weak-copyleft" | "strong-copyleft" | "unknown";
2
- export type LicenseSource = "library.properties" | "license-file" | "source-header" | "none";
3
- export interface LibraryLicenseEntry {
4
- name: string;
5
- version: string | undefined;
6
- /** install_dir as reported by arduino-cli lib list. */
7
- path: string;
8
- /** Normalized SPDX ID (e.g. "BSD-3-Clause"); undefined if not determined. */
9
- spdx: string | undefined;
10
- risk: CopyleftRisk;
11
- source: LicenseSource;
12
- }
13
- export type ScanOutcome = {
14
- ok: true;
15
- libraries: LibraryLicenseEntry[];
16
- } | {
17
- ok: false;
18
- reason: "arduino-cli-not-found" | "arduino-cli-unresponsive" | "no-libraries";
19
- message: string;
20
- };
21
- /**
22
- * Headers the project needs. `source` is "ino" when read from the generated
23
- * .ino (authoritative) or "config" when derived from cuttlefish.config.ts
24
- * (partial: display/touch only).
25
- */
26
- export type ProjectHeaders = {
27
- ok: true;
28
- headers: string[];
29
- source: "ino" | "config";
30
- inoPath?: string;
31
- } | {
32
- ok: false;
33
- reason: "no-config" | "no-entry" | "unreadable-ino";
34
- message: string;
35
- };
36
- /**
37
- * Minimal view of ResolvedCuttlefishConfig that resolveProjectHeaders needs.
38
- * Kept structural so we don't import the full config type (avoids a cycle).
39
- */
40
- interface ProjectConfig {
41
- configPath: string;
42
- entry?: string;
43
- outputOutDir?: string;
44
- /** FQBN, e.g. 'arduino:avr:uno'. Used to resolve the board core for core-bundled libs. */
45
- buildTarget?: string;
46
- display?: {
47
- profile?: string;
48
- driver?: string;
49
- touch?: {
50
- library?: string;
51
- };
52
- } | null;
53
- }
54
- /** Classify a header as a compiler-toolchain C-library header. */
55
- export declare function isToolchainHeader(header: string): boolean;
56
- /**
57
- * Result of resolving the project's board core directory.
58
- */
59
- export type ProjectCore = {
60
- ok: true;
61
- coreDir: string;
62
- } | {
63
- ok: false;
64
- reason: "no-fqbn" | "no-core";
65
- message: string;
66
- };
67
- /**
68
- * Resolve the project's board-core directory from its FQBN, via
69
- * `arduino-cli config dump` (for the packages data dir) and the on-disk
70
- * `<data>/packages/<packager>/hardware/<arch>/<version>/` layout. Returns the
71
- * highest-versioned core dir. Never throws.
72
- *
73
- * `runConfigDump` is an injected seam (returns the `config dump` stdout, or ""
74
- * on failure) so the function is unit-testable without spawning.
75
- */
76
- export declare function resolveProjectCore(fqbn: string | undefined, runConfigDump: () => string, readdir: (d: string) => string[]): ProjectCore;
77
- /**
78
- * Resolve the project's library headers. Prefers the generated .ino
79
- * (authoritative); falls back to display/touch headers derived from config
80
- * (partial picture, no transpile required).
81
- */
82
- export declare function resolveProjectHeaders(config: ProjectConfig | undefined, readFile: (p: string) => string | undefined): ProjectHeaders;
83
- /**
84
- * One project header, joined to its owning library or flagged not-installed.
85
- */
86
- export type ProjectLibrary = {
87
- kind: "resolved";
88
- lib: LibraryLicenseEntry;
89
- } | {
90
- kind: "core";
91
- header: string;
92
- } | {
93
- kind: "not-installed";
94
- header: string;
95
- };
96
- /**
97
- * Build a header-basename -> bundled-library map from a board core's bundled
98
- * libraries. Scans `<coreDir>/libraries/<Lib>/src/` for .h files (e.g. Wire.h,
99
- * SPI.h). Each header maps to a synthetic RawArduinoLibrary so the existing
100
- * resolveLibraryLicense can read its license from the bundled lib's header
101
- * notice or library.properties.
102
- */
103
- export declare function buildCoreHeaderIndex(coreDir: string, readdir: (d: string) => string[]): Map<string, RawArduinoLibrary>;
104
- /**
105
- * Join each project header to its owning library or classify it. Pipeline:
106
- * 1. user library (arduino-cli lib list) -> resolved (license)
107
- * 2. core library (project's own core) -> resolved (license, e.g. LGPL-2.1)
108
- * 3. toolchain header (avr/*, util/*) -> core (gray, no license)
109
- * 4. else -> not-installed
110
- *
111
- * `coreDir` is optional; when absent, step 2 is skipped.
112
- */
113
- export declare function joinHeadersToLibraries(headers: string[], libs: RawArduinoLibrary[], readdir: (d: string) => string[], readFile: (p: string) => string | undefined, coreDir?: string): ProjectLibrary[];
114
- /**
115
- * Resolve a raw license input (either the short `library.properties` `license=`
116
- * value, the full text of a LICENSE file, or a source-file header comment) to a
117
- * canonical SPDX ID.
118
- *
119
- * Matching priority:
120
- * 1. SPDX-License-Identifier: <id> marker (authoritative when present)
121
- * 2. exact alias match (suits the short properties value)
122
- * 3. substring markers match, ALL markers required (suits full LICENSE text)
123
- * 4. shortMarkers match, ANY one sufficient (suits sparse header comments
124
- * like Adafruit's "BSD license, all text here must be included")
125
- *
126
- * Returns the SPDX ID string, or undefined if nothing matched.
127
- */
128
- export declare function identifySpdx(input: string): string | undefined;
129
- /**
130
- * Classify the copyleft risk of a known SPDX ID. Returns "unknown" for
131
- * unrecognized ids.
132
- */
133
- export declare function classifyRisk(spdx: string): CopyleftRisk;
134
- /** Raw library entry as it appears in `arduino-cli lib list --format json`. */
135
- export interface RawArduinoLibrary {
136
- name: string;
137
- version?: string;
138
- install_dir?: string;
139
- }
140
- /**
141
- * Options for `scanLicenses`. Production calls omit this object entirely; tests
142
- * inject `fakeLibList` and `fakeReadFile` to avoid spawning and disk I/O.
143
- */
144
- export interface ScanOptions {
145
- /** Override the `arduino-cli lib list` call. Return null to simulate spawn failure. */
146
- fakeLibList?: () => RawArduinoLibrary[] | null;
147
- /** Override disk reads of library.properties and LICENSE files. */
148
- fakeReadFile?: (p: string) => string | undefined;
149
- /** Override directory listings. */
150
- fakeReaddir?: (d: string) => string[];
151
- }
152
- /**
153
- * Normalize either JSON shape (wrapped or bare array) to a flat library list.
154
- * Exported for direct unit testing of the dual-shape parsing.
155
- */
156
- export declare function coerceLibList(parsed: unknown): RawArduinoLibrary[];
157
- /**
158
- * Module-level runner override used by presenter tests so `scanLicenses()`
159
- * (with no args) does not spawn. Mirrors __setArduinoCliRunnerForTest.
160
- */
161
- export interface LicensesRunner {
162
- listLibraries: () => RawArduinoLibrary[] | null;
163
- readFile: (p: string) => string | undefined;
164
- readdir: (d: string) => string[];
165
- }
166
- /** @internal Test-only override of the default runner. */
167
- export declare function __setLicensesRunnerForTest(runner: LicensesRunner | undefined): void;
168
- /**
169
- * Scan installed Arduino libraries and resolve each one's license. Never throws.
170
- */
171
- export declare function scanLicenses(options?: ScanOptions): ScanOutcome;
172
- /** @internal Test-only override of the project config (normally loaded via loadCuttlefishConfig). */
173
- export declare function __setProjectConfigForTest(config: ProjectConfig | undefined): void;
174
- /** @internal Test-only override of `arduino-cli config dump` stdout. */
175
- export declare function __setConfigDumpForTest(fn: (() => string) | undefined): void;
176
- /**
177
- * `cuttlefish licenses` presenter. `all === false` (default, project scope)
178
- * resolves this project's libraries from the generated .ino (or config
179
- * fallback), joins each to an installed library, and reports only those.
180
- * `all === true` reports every installed library (the original behavior).
181
- * Warns on unknown licenses; flags NOT INSTALLED headers in project scope; sets
182
- * process.exitCode under --strict. Never calls process.exit().
183
- */
184
- export declare function runLicensesPresenter(strict: boolean, all: boolean): void;
185
- export {};