@esphome/compose 0.0.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.
package/dist/index.js ADDED
@@ -0,0 +1,635 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ ESPCompose: () => ESPCompose,
34
+ ESPHomeRegistry: () => ESPHomeRegistry,
35
+ Fragment: () => Fragment,
36
+ RefHandle: () => RefHandle,
37
+ assertHookCall: () => assertHookCall,
38
+ createContext: () => createContext,
39
+ createElement: () => createElement,
40
+ delay: () => delay,
41
+ findInScope: () => findInScope,
42
+ getCurrentComponentName: () => getCurrentComponentName,
43
+ getCurrentHookIndex: () => getCurrentHookIndex,
44
+ getCurrentHookPath: () => getCurrentHookPath,
45
+ isRef: () => isRef,
46
+ logger: () => logger,
47
+ registerInScope: () => registerInScope,
48
+ render: () => render,
49
+ setCurrentComponentName: () => setCurrentComponentName,
50
+ setCurrentHookIndex: () => setCurrentHookIndex,
51
+ setCurrentHookPath: () => setCurrentHookPath,
52
+ toYAML: () => toYAML,
53
+ useContext: () => useContext,
54
+ useRef: () => useRef,
55
+ useScript: () => useScript,
56
+ withContext: () => withContext,
57
+ withScriptScope: () => withScriptScope
58
+ });
59
+ module.exports = __toCommonJS(index_exports);
60
+
61
+ // src/runtime.ts
62
+ var import_yaml = __toESM(require("yaml"));
63
+
64
+ // src/types.ts
65
+ var RefHandle = class {
66
+ _token;
67
+ constructor() {
68
+ this._token = `r_${Math.random().toString(36).slice(2, 11)}`;
69
+ }
70
+ toString() {
71
+ return this._token;
72
+ }
73
+ toJSON() {
74
+ return this._token;
75
+ }
76
+ };
77
+ function useRef() {
78
+ return new RefHandle();
79
+ }
80
+ function isRef(val) {
81
+ return val instanceof RefHandle;
82
+ }
83
+
84
+ // src/hooks/useState.ts
85
+ var _currentHookPath = null;
86
+ var _currentHookIndex = 0;
87
+ var _currentComponentName = null;
88
+ function setCurrentHookPath(path) {
89
+ _currentHookPath = path;
90
+ _currentHookIndex = 0;
91
+ }
92
+ function getCurrentHookPath() {
93
+ return _currentHookPath;
94
+ }
95
+ function setCurrentHookIndex(index) {
96
+ _currentHookIndex = index;
97
+ }
98
+ function getCurrentHookIndex() {
99
+ return _currentHookIndex;
100
+ }
101
+ function setCurrentComponentName(name) {
102
+ _currentComponentName = name;
103
+ }
104
+ function getCurrentComponentName() {
105
+ return _currentComponentName;
106
+ }
107
+ function assertHookCall() {
108
+ if (!_currentHookPath) {
109
+ throw new Error(
110
+ "Hooks must be called within a function component during render. This error occurs when a hook (useScript, etc.) is called outside of a component render context."
111
+ );
112
+ }
113
+ }
114
+
115
+ // src/hooks/useContext.ts
116
+ var contextMap = /* @__PURE__ */ new Map();
117
+ function createContext(defaultValue) {
118
+ return { id: /* @__PURE__ */ Symbol(), value: defaultValue };
119
+ }
120
+ function withContext(ctx, value, fn) {
121
+ let stack = contextMap.get(ctx.id);
122
+ if (!stack) {
123
+ stack = [];
124
+ contextMap.set(ctx.id, stack);
125
+ }
126
+ stack.push(value);
127
+ try {
128
+ return fn();
129
+ } finally {
130
+ stack.pop();
131
+ }
132
+ }
133
+ function useContext(ctx) {
134
+ const stack = contextMap.get(ctx.id);
135
+ if (stack && stack.length > 0) return stack[stack.length - 1];
136
+ return ctx.value;
137
+ }
138
+
139
+ // src/hooks/useScope.ts
140
+ var scriptScopeContext = createContext({ value: {} });
141
+ function findInScope(id) {
142
+ let frame = useContext(scriptScopeContext);
143
+ let found = frame.value[id];
144
+ while (!found && frame.next) {
145
+ frame = frame.next;
146
+ found = frame.value[id];
147
+ }
148
+ return found;
149
+ }
150
+ function registerInScope(id, entry) {
151
+ const frame = useContext(scriptScopeContext);
152
+ frame.value[id] = entry;
153
+ }
154
+ function withScriptScope(fn) {
155
+ const prev = useContext(scriptScopeContext);
156
+ const scopeFrame = { next: prev, value: {} };
157
+ setCurrentHookPath("espcompose_script_render");
158
+ try {
159
+ const result = withContext(scriptScopeContext, scopeFrame, fn);
160
+ const scripts = Object.values(scopeFrame.value).map((e) => e.def);
161
+ return { result, scripts };
162
+ } finally {
163
+ setCurrentHookPath(null);
164
+ }
165
+ }
166
+
167
+ // src/hooks/useScript.ts
168
+ function useScript(metadata) {
169
+ assertHookCall();
170
+ if (findInScope(metadata.id)) {
171
+ return [{ "script.execute": metadata.id }];
172
+ }
173
+ registerInScope(metadata.id, { def: metadata });
174
+ return [{ "script.execute": metadata.id }];
175
+ }
176
+
177
+ // src/runtime.ts
178
+ function camelToSnake(key) {
179
+ return key.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
180
+ }
181
+ function keysToSnakeCase(obj) {
182
+ const out = {};
183
+ for (const [k, v] of Object.entries(obj)) {
184
+ out[camelToSnake(k)] = serializeValue(v);
185
+ }
186
+ return out;
187
+ }
188
+ function serializeValue(v) {
189
+ if (isRef(v)) return v.toString();
190
+ if (Array.isArray(v)) return v.map(serializeValue);
191
+ if (v !== null && typeof v === "object") {
192
+ return keysToSnakeCase(v);
193
+ }
194
+ return v;
195
+ }
196
+ function createElement(type, props, ...children) {
197
+ const flatChildren = children.flat().filter((c) => c != null);
198
+ return {
199
+ type,
200
+ props: {
201
+ ...props ?? {},
202
+ ...flatChildren.length > 0 ? { children: flatChildren } : {}
203
+ }
204
+ };
205
+ }
206
+ function Fragment(props) {
207
+ const { children } = props;
208
+ if (children == null) return null;
209
+ return Array.isArray(children) ? children : [children];
210
+ }
211
+ function toPlainObject(el) {
212
+ if (el == null) return void 0;
213
+ if (Array.isArray(el)) {
214
+ const mapped = el.map(toPlainObject).filter((v) => v != null);
215
+ return mapped.length === 1 ? mapped[0] : mapped;
216
+ }
217
+ if (typeof el.type === "function") {
218
+ const result = el.type(el.props);
219
+ if (result == null) return void 0;
220
+ return toPlainObject(Array.isArray(result) ? result : result);
221
+ }
222
+ const { children, ref, "x:custom": xCustom, ...ownProps } = el.props;
223
+ const propsWithId = ref != null ? { id: isRef(ref) ? ref.toString() : String(ref), ...ownProps } : ownProps;
224
+ const allProps = xCustom != null ? { ...propsWithId, ...xCustom } : propsWithId;
225
+ if (el.type === "esphome") {
226
+ const childSections = childrenToTopLevelSections(
227
+ children
228
+ );
229
+ return {
230
+ esphome: stripUndefined(keysToSnakeCase(allProps)),
231
+ ...childSections
232
+ };
233
+ }
234
+ const childData = buildChildData(
235
+ children
236
+ );
237
+ const data = stripUndefined(keysToSnakeCase({ ...allProps, ...childData }));
238
+ return { [el.type]: Object.keys(data).length > 0 ? data : null };
239
+ }
240
+ function childrenToTopLevelSections(children) {
241
+ if (!children) return {};
242
+ const normalized = flattenFragments(Array.isArray(children) ? children : [children]);
243
+ const sections = {};
244
+ for (const child of normalized) {
245
+ if (typeof child.type === "function") {
246
+ const result = child.type(child.props);
247
+ if (result == null) continue;
248
+ const rendered = Array.isArray(result) ? result : [result];
249
+ const inner = flattenFragments(rendered);
250
+ for (const c of inner) {
251
+ mergeSection(sections, c);
252
+ }
253
+ } else {
254
+ mergeSection(sections, child);
255
+ }
256
+ }
257
+ const out = {};
258
+ for (const [key, values] of Object.entries(sections)) {
259
+ out[key] = values.length === 1 ? values[0] : values;
260
+ }
261
+ return out;
262
+ }
263
+ function mergeSection(sections, child) {
264
+ const { children: grandchildren, ref, "x:custom": xCustom, ...ownProps } = child.props;
265
+ const propsWithId = ref != null ? { id: isRef(ref) ? ref.toString() : String(ref), ...ownProps } : ownProps;
266
+ const allProps = xCustom != null ? { ...propsWithId, ...xCustom } : propsWithId;
267
+ const childData = buildChildData(
268
+ grandchildren
269
+ );
270
+ const data = stripUndefined(keysToSnakeCase({ ...allProps, ...childData }));
271
+ if (!sections[child.type]) sections[child.type] = [];
272
+ sections[child.type].push(Object.keys(data).length > 0 ? data : null);
273
+ }
274
+ function buildChildData(children) {
275
+ if (!children) return {};
276
+ const arr = Array.isArray(children) ? children : [children];
277
+ const out = {};
278
+ for (const child of arr) {
279
+ const plain = toPlainObject(child);
280
+ if (plain != null && typeof plain === "object" && !Array.isArray(plain)) {
281
+ Object.assign(out, plain);
282
+ }
283
+ }
284
+ return out;
285
+ }
286
+ function flattenFragments(elements) {
287
+ const out = [];
288
+ for (const el of elements) {
289
+ if (el.type === Fragment) {
290
+ const result = Fragment(el.props);
291
+ if (result != null) {
292
+ const nested = Array.isArray(result) ? result : [result];
293
+ out.push(...flattenFragments(nested));
294
+ }
295
+ } else {
296
+ out.push(el);
297
+ }
298
+ }
299
+ return out;
300
+ }
301
+ function stripUndefined(obj) {
302
+ return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== void 0));
303
+ }
304
+ function render(element) {
305
+ return toPlainObject(Array.isArray(element) ? element : element);
306
+ }
307
+ function toYAML(config) {
308
+ return import_yaml.default.stringify(config, { aliasDuplicateObjects: false, nullStr: "" });
309
+ }
310
+ var ESPCompose = {
311
+ createElement,
312
+ Fragment,
313
+ render,
314
+ toYAML,
315
+ useScript,
316
+ withScriptScope
317
+ };
318
+
319
+ // src/actions.ts
320
+ function delay(_ms) {
321
+ }
322
+ var logger = {
323
+ /**
324
+ * Emit a log message at the given level.
325
+ *
326
+ * Compiles to: `logger.log:\n message: <message>\n level: <level>`
327
+ *
328
+ * @espcomposeAction logger.log
329
+ *
330
+ * @param message - The message string to emit.
331
+ * @param level - Log level: "VERBOSE", "DEBUG", "INFO", "WARN", "ERROR".
332
+ * Defaults to "DEBUG" in ESPHome when omitted.
333
+ */
334
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
335
+ log(_message, _level) {
336
+ }
337
+ };
338
+
339
+ // src/generated/registry.ts
340
+ var ESPHomeRegistry = {
341
+ adalight: { yamlKey: "adalight" },
342
+ adc128s102: { yamlKey: "adc128s102" },
343
+ ads1115: { yamlKey: "ads1115" },
344
+ ads1118: { yamlKey: "ads1118" },
345
+ airthings_ble: { yamlKey: "airthings_ble" },
346
+ alarm_control_panel: { yamlKey: "alarm_control_panel" },
347
+ animation: { yamlKey: "animation" },
348
+ apds9960: { yamlKey: "apds9960" },
349
+ api: { yamlKey: "api" },
350
+ as3935_i2c: { yamlKey: "as3935_i2c" },
351
+ as3935_spi: { yamlKey: "as3935_spi" },
352
+ as5600: { yamlKey: "as5600" },
353
+ async_tcp: { yamlKey: "async_tcp" },
354
+ at581x: { yamlKey: "at581x" },
355
+ audio: { yamlKey: "audio" },
356
+ audio_adc: { yamlKey: "audio_adc" },
357
+ audio_dac: { yamlKey: "audio_dac" },
358
+ audio_file: { yamlKey: "audio_file" },
359
+ bedjet: { yamlKey: "bedjet" },
360
+ binary_sensor: { yamlKey: "binary_sensor" },
361
+ bk72xx: { yamlKey: "bk72xx" },
362
+ ble_client: { yamlKey: "ble_client" },
363
+ ble_nus: { yamlKey: "ble_nus" },
364
+ bluetooth_proxy: { yamlKey: "bluetooth_proxy" },
365
+ bme680_bsec: { yamlKey: "bme680_bsec" },
366
+ bme68x_bsec2_i2c: { yamlKey: "bme68x_bsec2_i2c" },
367
+ bp1658cj: { yamlKey: "bp1658cj" },
368
+ bp5758d: { yamlKey: "bp5758d" },
369
+ button: { yamlKey: "button" },
370
+ bytebuffer: { yamlKey: "bytebuffer" },
371
+ camera_encoder: { yamlKey: "camera_encoder" },
372
+ canbus: { yamlKey: "canbus" },
373
+ cap1188: { yamlKey: "cap1188" },
374
+ captive_portal: { yamlKey: "captive_portal" },
375
+ cc1101: { yamlKey: "cc1101" },
376
+ cd74hc4067: { yamlKey: "cd74hc4067" },
377
+ ch422g: { yamlKey: "ch422g" },
378
+ ch423: { yamlKey: "ch423" },
379
+ climate: { yamlKey: "climate" },
380
+ color: { yamlKey: "color" },
381
+ cover: { yamlKey: "cover" },
382
+ custom_component: { yamlKey: "custom_component" },
383
+ dac7678: { yamlKey: "dac7678" },
384
+ dallas: { yamlKey: "dallas" },
385
+ daly_bms: { yamlKey: "daly_bms" },
386
+ dashboard_import: { yamlKey: "dashboard_import" },
387
+ datetime: { yamlKey: "datetime" },
388
+ debug: { yamlKey: "debug" },
389
+ deep_sleep: { yamlKey: "deep_sleep" },
390
+ demo: { yamlKey: "demo" },
391
+ dfplayer: { yamlKey: "dfplayer" },
392
+ dfrobot_sen0395: { yamlKey: "dfrobot_sen0395" },
393
+ display: { yamlKey: "display" },
394
+ dlms_meter: { yamlKey: "dlms_meter" },
395
+ dsmr: { yamlKey: "dsmr" },
396
+ e131: { yamlKey: "e131" },
397
+ emc2101: { yamlKey: "emc2101" },
398
+ esp_ldo: { yamlKey: "esp_ldo" },
399
+ esp32: { yamlKey: "esp32" },
400
+ esp32_ble: { yamlKey: "esp32_ble" },
401
+ esp32_ble_beacon: { yamlKey: "esp32_ble_beacon" },
402
+ esp32_ble_server: { yamlKey: "esp32_ble_server" },
403
+ esp32_ble_tracker: { yamlKey: "esp32_ble_tracker" },
404
+ esp32_camera: { yamlKey: "esp32_camera" },
405
+ esp32_camera_web_server: { yamlKey: "esp32_camera_web_server" },
406
+ esp32_hosted: { yamlKey: "esp32_hosted" },
407
+ esp32_improv: { yamlKey: "esp32_improv" },
408
+ esp32_touch: { yamlKey: "esp32_touch" },
409
+ esp8266: { yamlKey: "esp8266" },
410
+ esphome: { yamlKey: "esphome" },
411
+ espnow: { yamlKey: "espnow" },
412
+ ethernet: { yamlKey: "ethernet" },
413
+ event: { yamlKey: "event" },
414
+ exposure_notifications: { yamlKey: "exposure_notifications" },
415
+ external_components: { yamlKey: "external_components" },
416
+ ezo_pmp: { yamlKey: "ezo_pmp" },
417
+ factory_reset: { yamlKey: "factory_reset" },
418
+ fan: { yamlKey: "fan" },
419
+ fingerprint_grow: { yamlKey: "fingerprint_grow" },
420
+ font: { yamlKey: "font" },
421
+ gdk101: { yamlKey: "gdk101" },
422
+ globals: { yamlKey: "globals" },
423
+ gp8403: { yamlKey: "gp8403" },
424
+ gps: { yamlKey: "gps" },
425
+ graph: { yamlKey: "graph" },
426
+ graphical_display_menu: { yamlKey: "graphical_display_menu" },
427
+ grove_tb6612fng: { yamlKey: "grove_tb6612fng" },
428
+ hlk_fm22x: { yamlKey: "hlk_fm22x" },
429
+ hmac_md5: { yamlKey: "hmac_md5" },
430
+ hmac_sha256: { yamlKey: "hmac_sha256" },
431
+ host: { yamlKey: "host" },
432
+ http_request: { yamlKey: "http_request" },
433
+ i2c: { yamlKey: "i2c" },
434
+ i2c_device: { yamlKey: "i2c_device" },
435
+ i2s_audio: { yamlKey: "i2s_audio" },
436
+ image: { yamlKey: "image" },
437
+ improv_serial: { yamlKey: "improv_serial" },
438
+ infrared: { yamlKey: "infrared" },
439
+ interval: { yamlKey: "interval" },
440
+ json: { yamlKey: "json" },
441
+ key_collector: { yamlKey: "key_collector" },
442
+ lcd_menu: { yamlKey: "lcd_menu" },
443
+ ld2410: { yamlKey: "ld2410" },
444
+ ld2412: { yamlKey: "ld2412" },
445
+ ld2420: { yamlKey: "ld2420" },
446
+ ld2450: { yamlKey: "ld2450" },
447
+ libretiny: { yamlKey: "libretiny" },
448
+ light: { yamlKey: "light" },
449
+ lightwaverf: { yamlKey: "lightwaverf" },
450
+ ln882x: { yamlKey: "ln882x" },
451
+ lock: { yamlKey: "lock" },
452
+ logger: { yamlKey: "logger" },
453
+ lvgl: { yamlKey: "lvgl" },
454
+ m5stack_8angle: { yamlKey: "m5stack_8angle" },
455
+ mapping: { yamlKey: "mapping" },
456
+ matrix_keypad: { yamlKey: "matrix_keypad" },
457
+ max6956: { yamlKey: "max6956" },
458
+ mcp23008: { yamlKey: "mcp23008" },
459
+ mcp23016: { yamlKey: "mcp23016" },
460
+ mcp23017: { yamlKey: "mcp23017" },
461
+ mcp23s08: { yamlKey: "mcp23s08" },
462
+ mcp23s17: { yamlKey: "mcp23s17" },
463
+ mcp3008: { yamlKey: "mcp3008" },
464
+ mcp3204: { yamlKey: "mcp3204" },
465
+ mcp4461: { yamlKey: "mcp4461" },
466
+ mcp4728: { yamlKey: "mcp4728" },
467
+ mdns: { yamlKey: "mdns" },
468
+ media_player: { yamlKey: "media_player" },
469
+ media_source: { yamlKey: "media_source" },
470
+ micro_wake_word: { yamlKey: "micro_wake_word" },
471
+ micronova: { yamlKey: "micronova" },
472
+ microphone: { yamlKey: "microphone" },
473
+ modbus: { yamlKey: "modbus" },
474
+ modbus_controller: { yamlKey: "modbus_controller" },
475
+ mopeka_ble: { yamlKey: "mopeka_ble" },
476
+ mpr121: { yamlKey: "mpr121" },
477
+ mqtt: { yamlKey: "mqtt" },
478
+ msa3xx: { yamlKey: "msa3xx" },
479
+ my9231: { yamlKey: "my9231" },
480
+ network: { yamlKey: "network" },
481
+ nrf52: { yamlKey: "nrf52" },
482
+ number: { yamlKey: "number" },
483
+ one_wire: { yamlKey: "one_wire" },
484
+ online_image: { yamlKey: "online_image" },
485
+ opentherm: { yamlKey: "opentherm" },
486
+ openthread: { yamlKey: "openthread" },
487
+ ota: { yamlKey: "ota" },
488
+ output: { yamlKey: "output" },
489
+ packages: { yamlKey: "packages" },
490
+ packet_transport: { yamlKey: "packet_transport" },
491
+ pca6416a: { yamlKey: "pca6416a" },
492
+ pca9554: { yamlKey: "pca9554" },
493
+ pca9685: { yamlKey: "pca9685" },
494
+ pcf8574: { yamlKey: "pcf8574" },
495
+ pi4ioe5v6408: { yamlKey: "pi4ioe5v6408" },
496
+ pipsolar: { yamlKey: "pipsolar" },
497
+ pn532: { yamlKey: "pn532" },
498
+ pn532_i2c: { yamlKey: "pn532_i2c" },
499
+ pn532_spi: { yamlKey: "pn532_spi" },
500
+ pn7150_i2c: { yamlKey: "pn7150_i2c" },
501
+ pn7160_i2c: { yamlKey: "pn7160_i2c" },
502
+ pn7160_spi: { yamlKey: "pn7160_spi" },
503
+ power_supply: { yamlKey: "power_supply" },
504
+ preferences: { yamlKey: "preferences" },
505
+ prometheus: { yamlKey: "prometheus" },
506
+ psram: { yamlKey: "psram" },
507
+ pylontech: { yamlKey: "pylontech" },
508
+ qr_code: { yamlKey: "qr_code" },
509
+ radon_eye_ble: { yamlKey: "radon_eye_ble" },
510
+ rc522_i2c: { yamlKey: "rc522_i2c" },
511
+ rc522_spi: { yamlKey: "rc522_spi" },
512
+ rd03d: { yamlKey: "rd03d" },
513
+ rdm6300: { yamlKey: "rdm6300" },
514
+ remote_receiver: { yamlKey: "remote_receiver" },
515
+ remote_transmitter: { yamlKey: "remote_transmitter" },
516
+ rf_bridge: { yamlKey: "rf_bridge" },
517
+ rp2040: { yamlKey: "rp2040" },
518
+ rp2040_ble: { yamlKey: "rp2040_ble" },
519
+ rtl87xx: { yamlKey: "rtl87xx" },
520
+ rtttl: { yamlKey: "rtttl" },
521
+ runtime_stats: { yamlKey: "runtime_stats" },
522
+ ruuvi_ble: { yamlKey: "ruuvi_ble" },
523
+ safe_mode: { yamlKey: "safe_mode" },
524
+ script: { yamlKey: "script" },
525
+ seeed_mr24hpc1: { yamlKey: "seeed_mr24hpc1" },
526
+ seeed_mr60bha2: { yamlKey: "seeed_mr60bha2" },
527
+ seeed_mr60fda2: { yamlKey: "seeed_mr60fda2" },
528
+ select: { yamlKey: "select" },
529
+ sensor: { yamlKey: "sensor" },
530
+ serial_proxy: { yamlKey: "serial_proxy" },
531
+ servo: { yamlKey: "servo" },
532
+ sha256: { yamlKey: "sha256" },
533
+ sim800l: { yamlKey: "sim800l" },
534
+ sm16716: { yamlKey: "sm16716" },
535
+ sm2135: { yamlKey: "sm2135" },
536
+ sm2235: { yamlKey: "sm2235" },
537
+ sm2335: { yamlKey: "sm2335" },
538
+ sml: { yamlKey: "sml" },
539
+ sn74hc165: { yamlKey: "sn74hc165" },
540
+ sn74hc595: { yamlKey: "sn74hc595" },
541
+ socket: { yamlKey: "socket" },
542
+ speaker: { yamlKey: "speaker" },
543
+ spi: { yamlKey: "spi" },
544
+ spi_device: { yamlKey: "spi_device" },
545
+ split_buffer: { yamlKey: "split_buffer" },
546
+ sprinkler: { yamlKey: "sprinkler" },
547
+ statsd: { yamlKey: "statsd" },
548
+ status_led: { yamlKey: "status_led" },
549
+ stepper: { yamlKey: "stepper" },
550
+ substitutions: { yamlKey: "substitutions" },
551
+ sun: { yamlKey: "sun" },
552
+ sun_gtil2: { yamlKey: "sun_gtil2" },
553
+ switch: { yamlKey: "switch" },
554
+ sx126x: { yamlKey: "sx126x" },
555
+ sx127x: { yamlKey: "sx127x" },
556
+ sx1509: { yamlKey: "sx1509" },
557
+ sy6970: { yamlKey: "sy6970" },
558
+ syslog: { yamlKey: "syslog" },
559
+ tca9548a: { yamlKey: "tca9548a" },
560
+ tca9555: { yamlKey: "tca9555" },
561
+ teleinfo: { yamlKey: "teleinfo" },
562
+ text: { yamlKey: "text" },
563
+ text_sensor: { yamlKey: "text_sensor" },
564
+ time: { yamlKey: "time" },
565
+ tinyusb: { yamlKey: "tinyusb" },
566
+ tlc59208f: { yamlKey: "tlc59208f" },
567
+ tlc5947: { yamlKey: "tlc5947" },
568
+ tlc5971: { yamlKey: "tlc5971" },
569
+ tm1651: { yamlKey: "tm1651" },
570
+ touchscreen: { yamlKey: "touchscreen" },
571
+ ttp229_bsf: { yamlKey: "ttp229_bsf" },
572
+ ttp229_lsf: { yamlKey: "ttp229_lsf" },
573
+ tuya: { yamlKey: "tuya" },
574
+ uart: { yamlKey: "uart" },
575
+ udp: { yamlKey: "udp" },
576
+ update: { yamlKey: "update" },
577
+ uponor_smatrix: { yamlKey: "uponor_smatrix" },
578
+ usb_cdc_acm: { yamlKey: "usb_cdc_acm" },
579
+ usb_host: { yamlKey: "usb_host" },
580
+ usb_uart: { yamlKey: "usb_uart" },
581
+ valve: { yamlKey: "valve" },
582
+ vbus: { yamlKey: "vbus" },
583
+ voice_assistant: { yamlKey: "voice_assistant" },
584
+ water_heater: { yamlKey: "water_heater" },
585
+ web_server: { yamlKey: "web_server" },
586
+ web_server_base: { yamlKey: "web_server_base" },
587
+ web_server_idf: { yamlKey: "web_server_idf" },
588
+ wiegand: { yamlKey: "wiegand" },
589
+ wifi: { yamlKey: "wifi" },
590
+ wireguard: { yamlKey: "wireguard" },
591
+ wk2132_i2c: { yamlKey: "wk2132_i2c" },
592
+ wk2132_spi: { yamlKey: "wk2132_spi" },
593
+ wk2168_i2c: { yamlKey: "wk2168_i2c" },
594
+ wk2168_spi: { yamlKey: "wk2168_spi" },
595
+ wk2204_i2c: { yamlKey: "wk2204_i2c" },
596
+ wk2204_spi: { yamlKey: "wk2204_spi" },
597
+ wk2212_i2c: { yamlKey: "wk2212_i2c" },
598
+ wk2212_spi: { yamlKey: "wk2212_spi" },
599
+ wled: { yamlKey: "wled" },
600
+ xiaomi_ble: { yamlKey: "xiaomi_ble" },
601
+ xiaomi_rtcgq02lm: { yamlKey: "xiaomi_rtcgq02lm" },
602
+ xl9535: { yamlKey: "xl9535" },
603
+ xpt2046: { yamlKey: "xpt2046" },
604
+ zephyr_ble_server: { yamlKey: "zephyr_ble_server" },
605
+ zigbee: { yamlKey: "zigbee" },
606
+ zwave_proxy: { yamlKey: "zwave_proxy" }
607
+ };
608
+ // Annotate the CommonJS export names for ESM import in node:
609
+ 0 && (module.exports = {
610
+ ESPCompose,
611
+ ESPHomeRegistry,
612
+ Fragment,
613
+ RefHandle,
614
+ assertHookCall,
615
+ createContext,
616
+ createElement,
617
+ delay,
618
+ findInScope,
619
+ getCurrentComponentName,
620
+ getCurrentHookIndex,
621
+ getCurrentHookPath,
622
+ isRef,
623
+ logger,
624
+ registerInScope,
625
+ render,
626
+ setCurrentComponentName,
627
+ setCurrentHookIndex,
628
+ setCurrentHookPath,
629
+ toYAML,
630
+ useContext,
631
+ useRef,
632
+ useScript,
633
+ withContext,
634
+ withScriptScope
635
+ });