schematex 0.9.9 → 0.9.11

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 (87) hide show
  1. package/dist/ai/ai-sdk.cjs +9 -9
  2. package/dist/ai/ai-sdk.d.cts +3 -3
  3. package/dist/ai/ai-sdk.d.ts +3 -3
  4. package/dist/ai/ai-sdk.js +4 -4
  5. package/dist/ai/index.cjs +18 -18
  6. package/dist/ai/index.d.cts +4 -4
  7. package/dist/ai/index.d.ts +4 -4
  8. package/dist/ai/index.js +5 -5
  9. package/dist/{api-D_d-JklT.d.ts → api-DAiP83-P.d.ts} +1 -1
  10. package/dist/{api-DnTyW-6F.d.cts → api-DecITB-t.d.cts} +1 -1
  11. package/dist/browser.cjs +10 -10
  12. package/dist/browser.d.cts +3 -3
  13. package/dist/browser.d.ts +3 -3
  14. package/dist/browser.js +4 -4
  15. package/dist/{chunk-IHX6J4HF.js → chunk-32LOZTNP.js} +178 -4
  16. package/dist/chunk-32LOZTNP.js.map +1 -0
  17. package/dist/{chunk-RCR4UGKV.js → chunk-4QBC4475.js} +35 -20
  18. package/dist/chunk-4QBC4475.js.map +1 -0
  19. package/dist/{chunk-OY2CXLVY.cjs → chunk-5YTFNOKY.cjs} +170 -15
  20. package/dist/{chunk-OY2CXLVY.cjs.map → chunk-5YTFNOKY.cjs.map} +1 -1
  21. package/dist/{chunk-EUN6FEGE.cjs → chunk-6ZTPWE22.cjs} +37 -22
  22. package/dist/chunk-6ZTPWE22.cjs.map +1 -0
  23. package/dist/{chunk-TXWVJAMR.cjs → chunk-HEGDKO2E.cjs} +178 -4
  24. package/dist/chunk-HEGDKO2E.cjs.map +1 -0
  25. package/dist/{chunk-T5QOVX2I.js → chunk-RU3N57OB.js} +168 -13
  26. package/dist/{chunk-T5QOVX2I.js.map → chunk-RU3N57OB.js.map} +1 -1
  27. package/dist/{chunk-MVTYPWHO.js → chunk-WTGABYFK.js} +80 -17
  28. package/dist/chunk-WTGABYFK.js.map +1 -0
  29. package/dist/{chunk-MXV3XJFH.cjs → chunk-YN7EBTWB.cjs} +80 -17
  30. package/dist/chunk-YN7EBTWB.cjs.map +1 -0
  31. package/dist/{diagnostics-D2qkBfFx.d.cts → diagnostics-Bps9pzlF.d.cts} +8 -2
  32. package/dist/{diagnostics-D2qkBfFx.d.ts → diagnostics-Bps9pzlF.d.ts} +8 -2
  33. package/dist/diagrams/blockdiagram/index.d.cts +1 -1
  34. package/dist/diagrams/blockdiagram/index.d.ts +1 -1
  35. package/dist/diagrams/circuit/index.cjs +8 -8
  36. package/dist/diagrams/circuit/index.d.cts +1 -1
  37. package/dist/diagrams/circuit/index.d.ts +1 -1
  38. package/dist/diagrams/circuit/index.js +1 -1
  39. package/dist/diagrams/ecomap/index.d.cts +1 -1
  40. package/dist/diagrams/ecomap/index.d.ts +1 -1
  41. package/dist/diagrams/entity/index.d.cts +1 -1
  42. package/dist/diagrams/entity/index.d.ts +1 -1
  43. package/dist/diagrams/fishbone/index.d.cts +1 -1
  44. package/dist/diagrams/fishbone/index.d.ts +1 -1
  45. package/dist/diagrams/flowchart/index.d.cts +2 -2
  46. package/dist/diagrams/flowchart/index.d.ts +2 -2
  47. package/dist/diagrams/genogram/index.d.cts +1 -1
  48. package/dist/diagrams/genogram/index.d.ts +1 -1
  49. package/dist/diagrams/ladder/index.d.cts +1 -1
  50. package/dist/diagrams/ladder/index.d.ts +1 -1
  51. package/dist/diagrams/logic/index.d.cts +1 -1
  52. package/dist/diagrams/logic/index.d.ts +1 -1
  53. package/dist/diagrams/orgchart/index.d.cts +1 -1
  54. package/dist/diagrams/orgchart/index.d.ts +1 -1
  55. package/dist/diagrams/pedigree/index.d.cts +1 -1
  56. package/dist/diagrams/pedigree/index.d.ts +1 -1
  57. package/dist/diagrams/phylo/index.d.cts +1 -1
  58. package/dist/diagrams/phylo/index.d.ts +1 -1
  59. package/dist/diagrams/sld/index.cjs +7 -7
  60. package/dist/diagrams/sld/index.d.cts +4 -1
  61. package/dist/diagrams/sld/index.d.ts +4 -1
  62. package/dist/diagrams/sld/index.js +1 -1
  63. package/dist/diagrams/sociogram/index.d.cts +1 -1
  64. package/dist/diagrams/sociogram/index.d.ts +1 -1
  65. package/dist/diagrams/timing/index.d.cts +1 -1
  66. package/dist/diagrams/timing/index.d.ts +1 -1
  67. package/dist/diagrams/venn/index.d.cts +1 -1
  68. package/dist/diagrams/venn/index.d.ts +1 -1
  69. package/dist/{index-D9u0YRxL.d.ts → index-F6MCisQe.d.ts} +1 -1
  70. package/dist/{index-JZlLiE6K.d.cts → index-fvBAmlv7.d.cts} +1 -1
  71. package/dist/index.cjs +43 -43
  72. package/dist/index.d.cts +4 -4
  73. package/dist/index.d.ts +4 -4
  74. package/dist/index.js +6 -6
  75. package/dist/react.cjs +4 -4
  76. package/dist/react.d.cts +2 -2
  77. package/dist/react.d.ts +2 -2
  78. package/dist/react.js +3 -3
  79. package/dist/{tools-DM0aLCbc.d.ts → tools-CdzIw2Az.d.ts} +2 -2
  80. package/dist/{tools-DAKYNcPv.d.cts → tools-vyVK2DHa.d.cts} +2 -2
  81. package/package.json +1 -1
  82. package/dist/chunk-EUN6FEGE.cjs.map +0 -1
  83. package/dist/chunk-IHX6J4HF.js.map +0 -1
  84. package/dist/chunk-MVTYPWHO.js.map +0 -1
  85. package/dist/chunk-MXV3XJFH.cjs.map +0 -1
  86. package/dist/chunk-RCR4UGKV.js.map +0 -1
  87. package/dist/chunk-TXWVJAMR.cjs.map +0 -1
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkUHRNFBWY_cjs = require('./chunk-UHRNFBWY.cjs');
4
- var chunkTXWVJAMR_cjs = require('./chunk-TXWVJAMR.cjs');
4
+ var chunkHEGDKO2E_cjs = require('./chunk-HEGDKO2E.cjs');
5
5
  var chunkT55OQILI_cjs = require('./chunk-T55OQILI.cjs');
6
6
  var chunkGTCGATOL_cjs = require('./chunk-GTCGATOL.cjs');
7
- var chunkMXV3XJFH_cjs = require('./chunk-MXV3XJFH.cjs');
7
+ var chunkYN7EBTWB_cjs = require('./chunk-YN7EBTWB.cjs');
8
8
  var chunk4MANMKQ4_cjs = require('./chunk-4MANMKQ4.cjs');
9
9
  var chunkYFPDZVB7_cjs = require('./chunk-YFPDZVB7.cjs');
10
10
  var chunk3JN4762U_cjs = require('./chunk-3JN4762U.cjs');
@@ -33516,30 +33516,42 @@ var KIND_ALIASES2 = {
33516
33516
  diode: "diode",
33517
33517
  button: "button",
33518
33518
  dip: "dip",
33519
- header: "header"
33519
+ header: "header",
33520
+ pot: "potentiometer",
33521
+ potentiometer: "potentiometer"
33520
33522
  // multi-token forms handled separately: "mcu uno", "sensor hcsr04", etc.
33521
33523
  };
33522
33524
  var MCU_SUBTYPES = {
33523
33525
  uno: "mcu-uno",
33524
33526
  nano: "mcu-nano",
33525
33527
  esp32: "mcu-esp32",
33528
+ "esp32-devkit": "mcu-esp32",
33529
+ "esp32-c3": "mcu-esp32",
33530
+ "esp32-s3": "mcu-esp32",
33526
33531
  pico: "mcu-pico"
33527
33532
  };
33528
33533
  var SENSOR_SUBTYPES = {
33529
33534
  hcsr04: "sensor-hcsr04",
33530
33535
  "hc-sr04": "sensor-hcsr04",
33531
33536
  dht11: "sensor-dht11",
33532
- dht22: "sensor-dht22"
33537
+ dht22: "sensor-dht22",
33538
+ vl53l0x: "sensor-vl53l0x",
33539
+ "vl53-l0x": "sensor-vl53l0x",
33540
+ tof: "sensor-vl53l0x"
33533
33541
  };
33534
33542
  var DISPLAY_SUBTYPES = {
33535
33543
  "oled-ssd1306": "display-oled-ssd1306",
33536
33544
  oled: "display-oled-ssd1306",
33537
33545
  "lcd-1602-i2c": "display-lcd-1602-i2c",
33538
- lcd: "display-lcd-1602-i2c"
33546
+ lcd: "display-lcd-1602-i2c",
33547
+ tm1637: "display-tm1637"
33539
33548
  };
33540
33549
  var MODULE_SUBTYPES = {
33541
33550
  "rotary-ky040": "module-rotary-ky040",
33542
- rotary: "module-rotary-ky040"
33551
+ rotary: "module-rotary-ky040",
33552
+ l298n: "module-l298n",
33553
+ "l298": "module-l298n",
33554
+ motor: "module-l298n"
33543
33555
  };
33544
33556
  var ACTUATOR_SUBTYPES = {
33545
33557
  "servo-sg90": "actuator-servo-sg90",
@@ -34136,12 +34148,16 @@ var PART_CATALOG = {
34136
34148
  "mcu-nano": mcuSpec("mcu-nano", "#0d9488", "Arduino Nano", UNO_SLOTS.slice(0, 18), { width: 90, height: 180, cornerR: 4 }),
34137
34149
  "mcu-esp32": mcuSpec("mcu-esp32", "#1e293b", "ESP32 DevKit", ESP32_SLOTS, { width: 110, height: 180, cornerR: 4 }),
34138
34150
  "mcu-pico": mcuSpec("mcu-pico", "#1e3a8a", "Raspberry Pi Pico", ESP32_SLOTS, { width: 100, height: 180, cornerR: 4 }),
34151
+ potentiometer: moduleSpec("potentiometer", 54, 46, "#eab308", ["1", "2", "3"], "POT"),
34139
34152
  "sensor-hcsr04": moduleSpec("sensor-hcsr04", 100, 60, "#1e3a8a", ["VCC", "TRIG", "ECHO", "GND"], "HC-SR04"),
34140
34153
  "sensor-dht11": moduleSpec("sensor-dht11", 70, 60, "#1e40af", ["VCC", "DATA", "GND"], "DHT11"),
34141
34154
  "sensor-dht22": moduleSpec("sensor-dht22", 70, 60, "#1e40af", ["VCC", "DATA", "GND"], "DHT22"),
34155
+ "sensor-vl53l0x": moduleSpec("sensor-vl53l0x", 80, 56, "#1e3a8a", ["VIN", "GND", "SCL", "SDA"], "VL53L0X"),
34142
34156
  "display-oled-ssd1306": moduleSpec("display-oled-ssd1306", 90, 60, "#0f172a", ["GND", "VCC", "SCL", "SDA"], "OLED 128\xD764"),
34143
34157
  "display-lcd-1602-i2c": moduleSpec("display-lcd-1602-i2c", 130, 60, "#166534", ["GND", "VCC", "SDA", "SCL"], "LCD 1602 I\xB2C"),
34158
+ "display-tm1637": moduleSpec("display-tm1637", 84, 52, "#7c2d12", ["CLK", "DIO", "VCC", "GND"], "TM1637"),
34144
34159
  "module-rotary-ky040": moduleSpec("module-rotary-ky040", 80, 60, "#7c2d12", ["CLK", "DT", "SW", "VCC", "GND"], "KY-040"),
34160
+ "module-l298n": moduleSpec("module-l298n", 150, 72, "#991b1b", ["ENA", "IN1", "IN2", "IN3", "IN4", "ENB", "5V", "GND", "12V"], "L298N"),
34145
34161
  "actuator-servo-sg90": moduleSpec("actuator-servo-sg90", 60, 60, "#475569", ["GND", "VCC", "SIG"], "Servo SG90")
34146
34162
  };
34147
34163
  function partSpec(kind, args = {}) {
@@ -34279,6 +34295,7 @@ function placePart(sub, part, reservedSides) {
34279
34295
  }
34280
34296
  const pins2 = {};
34281
34297
  for (const p of spec.pins) pins2[p.name] = { x: x2 + p.x, y: y2 + p.y };
34298
+ addPinAliases(part.kind, pins2);
34282
34299
  if (placement === "beside-left") reservedSides.left = Math.max(reservedSides.left, spec.width + BB_CONST.MCU_GAP);
34283
34300
  if (placement === "beside-right") reservedSides.right = Math.max(reservedSides.right, spec.width + BB_CONST.MCU_GAP);
34284
34301
  if (placement === "above") reservedSides.above = Math.max(reservedSides.above, spec.height + BB_CONST.MCU_GAP);
@@ -34305,6 +34322,7 @@ function placePart(sub, part, reservedSides) {
34305
34322
  const y2 = anchorXY.y - spec.pins[0].y;
34306
34323
  const pins2 = {};
34307
34324
  for (const p of spec.pins) pins2[p.name] = { x: x2 + p.x, y: y2 + p.y };
34325
+ addPinAliases(part.kind, pins2);
34308
34326
  return { part, x: x2, y: y2, width: spec.width, height: spec.height, rotation: 0, pins: pins2 };
34309
34327
  }
34310
34328
  const x = anchorXY.x;
@@ -34315,14 +34333,69 @@ function placePart(sub, part, reservedSides) {
34315
34333
  }
34316
34334
  const pins = {};
34317
34335
  for (const p of spec.pins) pins[p.name] = { x: x + p.x, y: y + p.y };
34336
+ addPinAliases(part.kind, pins);
34318
34337
  return { part, x, y, width: spec.width, height: spec.height, rotation: 0, pins };
34319
34338
  }
34339
+ function setAlias(pins, alias, xy) {
34340
+ if (!pins[alias]) pins[alias] = xy;
34341
+ }
34342
+ function addPinAliases(kind, pins) {
34343
+ const entries = Object.entries(pins);
34344
+ for (const [name, xy] of entries) {
34345
+ setAlias(pins, name.toUpperCase(), xy);
34346
+ setAlias(pins, name.toLowerCase(), xy);
34347
+ const gpio = /^GPIO(\d+)$/i.exec(name);
34348
+ if (gpio) {
34349
+ const n = gpio[1];
34350
+ setAlias(pins, `D${n}`, xy);
34351
+ setAlias(pins, `IO${n}`, xy);
34352
+ setAlias(pins, `GP${n}`, xy);
34353
+ setAlias(pins, n, xy);
34354
+ }
34355
+ const digital = /^D(\d+)$/i.exec(name);
34356
+ if (digital) {
34357
+ const n = digital[1];
34358
+ setAlias(pins, n, xy);
34359
+ setAlias(pins, `GPIO${n}`, xy);
34360
+ setAlias(pins, `IO${n}`, xy);
34361
+ }
34362
+ }
34363
+ const alias = (canonical, ...aliases) => {
34364
+ const xy = pins[canonical];
34365
+ if (!xy) return;
34366
+ for (const a of aliases) setAlias(pins, a, xy);
34367
+ };
34368
+ alias("3V3", "3.3V", "3V", "VCC3V3", "VDD");
34369
+ alias("5V", "+5V", "VCC", "VBUS", "USB");
34370
+ alias("VIN", "5V", "+5V", "VCC", "VBUS", "USB", "RAW");
34371
+ alias("GND", "0V", "GROUND", "VSS", "COM", "-");
34372
+ alias("RST", "RESET", "EN");
34373
+ alias("A4", "SDA");
34374
+ alias("A5", "SCL");
34375
+ alias("TX", "D1", "GPIO1", "IO1");
34376
+ alias("RX", "D0", "GPIO0", "IO0");
34377
+ alias("VCC", "5V", "+5V", "VIN");
34378
+ alias("DATA", "DAT", "OUT", "SIG", "SIGNAL");
34379
+ alias("DIO", "DATA", "DAT");
34380
+ alias("CLK", "SCK", "SCLK", "CLOCK");
34381
+ alias("TRIG", "TRIGGER");
34382
+ alias("SIG", "SIGNAL", "PWM", "DATA");
34383
+ alias("1", "A", "P1");
34384
+ alias("2", "W", "WIPER", "P2");
34385
+ alias("3", "B", "P3");
34386
+ if (kind === "mcu-esp32" || kind === "mcu-pico") {
34387
+ alias("VIN", "5V", "VBUS", "USB");
34388
+ }
34389
+ }
34320
34390
  function endpointXY(ep, parts, sub) {
34321
34391
  if (ep.kind === "coord") return holeXY(sub, ep.at);
34322
34392
  const part = parts.find((p) => p.part.id === ep.partId);
34323
34393
  if (!part) throw new Error(`Wire references unknown part '${ep.partId}'`);
34324
- const pin = part.pins[ep.pin];
34325
- if (!pin) throw new Error(`Part '${ep.partId}' has no pin named '${ep.pin}'`);
34394
+ const pin = part.pins[ep.pin] ?? part.pins[ep.pin.toUpperCase()] ?? part.pins[ep.pin.toLowerCase()];
34395
+ if (!pin) {
34396
+ const known = Object.keys(part.pins).filter((name, idx, all) => all.indexOf(name) === idx).slice(0, 24).join(", ");
34397
+ throw new Error(`Part '${ep.partId}' has no pin named '${ep.pin}' (known pins: ${known})`);
34398
+ }
34326
34399
  return { x: pin.x, y: pin.y };
34327
34400
  }
34328
34401
  function bezierPath(p1, p2, via) {
@@ -38655,6 +38728,55 @@ function spiralStairs(c) {
38655
38728
  parts.push(dirArrow(c, pts, c.label ?? "UP"));
38656
38729
  return parts.join("");
38657
38730
  }
38731
+ function outletDraw(duplex) {
38732
+ return (c) => {
38733
+ const parts = [];
38734
+ const cx = c.w / 2;
38735
+ const centers = duplex ? [c.h * 0.34, c.h * 0.66] : [c.h / 2];
38736
+ parts.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-nofill", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h), rx: c.px(0.04) }));
38737
+ for (const cy of centers) {
38738
+ parts.push(chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(cx), cy: c.px(cy), r: c.px(Math.min(c.w, c.h) * 0.16) }));
38739
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(cx - c.w * 0.1), y1: c.px(cy), x2: c.px(cx + c.w * 0.1), y2: c.px(cy) }));
38740
+ }
38741
+ return parts.join("");
38742
+ };
38743
+ }
38744
+ function electricalSwitchDraw(c) {
38745
+ return [
38746
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-nofill", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h), rx: c.px(0.04) }),
38747
+ chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(c.w * 0.28), y1: c.px(c.h * 0.65), x2: c.px(c.w * 0.72), y2: c.px(c.h * 0.35) }),
38748
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-dot", cx: c.px(c.w * 0.28), cy: c.px(c.h * 0.65), r: c.px(0.025) })
38749
+ ].join("");
38750
+ }
38751
+ function lightDraw(label = "L") {
38752
+ return (c) => {
38753
+ const r7 = Math.min(c.w, c.h) / 2 - 0.01;
38754
+ const cx = c.w / 2;
38755
+ const cy = c.h / 2;
38756
+ return [
38757
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-nofill", cx: c.px(cx), cy: c.px(cy), r: c.px(r7) }),
38758
+ chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(cx - r7 * 0.65), y1: c.px(cy - r7 * 0.65), x2: c.px(cx + r7 * 0.65), y2: c.px(cy + r7 * 0.65) }),
38759
+ chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(cx + r7 * 0.65), y1: c.px(cy - r7 * 0.65), x2: c.px(cx - r7 * 0.65), y2: c.px(cy + r7 * 0.65) }),
38760
+ chunk3WNW5Y7P_cjs.text({ class: "sx-fp-furn-text", x: c.px(cx), y: c.px(cy + r7 + 0.11), "text-anchor": "middle", "font-size": c.px(0.16) }, label)
38761
+ ].join("");
38762
+ };
38763
+ }
38764
+ function panelDraw(label) {
38765
+ return (c) => {
38766
+ const parts = [
38767
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h), rx: c.px(0.03) }),
38768
+ chunk3WNW5Y7P_cjs.text({
38769
+ class: "sx-fp-furn-text",
38770
+ x: c.px(c.w / 2),
38771
+ y: c.px(c.h / 2),
38772
+ "text-anchor": "middle",
38773
+ "dominant-baseline": "central",
38774
+ "font-size": c.px(Math.min(0.14, c.h * 0.45))
38775
+ }, label)
38776
+ ];
38777
+ return parts.join("");
38778
+ };
38779
+ }
38658
38780
  var FLOORPLAN_SYMBOLS = {
38659
38781
  // ── residential / living ──
38660
38782
  "bed-double": { w: 1.6, h: 2, draw: bedDraw(2) },
@@ -39529,6 +39651,15 @@ var FLOORPLAN_SYMBOLS = {
39529
39651
  return parts.join("");
39530
39652
  }
39531
39653
  },
39654
+ // ── electrical overlay fixtures ──
39655
+ outlet: { w: 0.22, h: 0.22, underlay: true, draw: outletDraw(false) },
39656
+ "duplex-outlet": { w: 0.24, h: 0.36, underlay: true, draw: outletDraw(true) },
39657
+ switch: { w: 0.24, h: 0.3, underlay: true, draw: electricalSwitchDraw },
39658
+ light: { w: 0.35, h: 0.35, underlay: true, draw: lightDraw("L") },
39659
+ "ceiling-light": { w: 0.45, h: 0.45, underlay: true, draw: lightDraw("CL") },
39660
+ "data-outlet": { w: 0.28, h: 0.24, underlay: true, draw: panelDraw("D") },
39661
+ "electrical-panel": { w: 0.55, h: 0.24, underlay: true, draw: panelDraw("PANEL") },
39662
+ "distribution-board": { w: 0.6, h: 0.28, underlay: true, draw: panelDraw("DB") },
39532
39663
  // ── site / outdoor ──
39533
39664
  // Tree in plan: a canopy disc with a foliage ring and a trunk dot.
39534
39665
  tree: {
@@ -39599,7 +39730,12 @@ function parseCoord2(t, what, ln) {
39599
39730
  }
39600
39731
  function parseDims(t, what, ln) {
39601
39732
  if (!isWord(t)) throw new FloorplanParseError(`expected "WxH" for ${what}`, ln);
39602
- const m = /^(\d*\.?\d+)x(\d*\.?\d+)$/i.exec(t.word);
39733
+ const normalized = t.word.replace("\xD7", "x");
39734
+ const m = /^(\d*\.?\d+)x(\d*\.?\d+)$/i.exec(normalized);
39735
+ if (!m && /^(\d*\.?\d+)$/.test(normalized)) {
39736
+ const v = Number(normalized);
39737
+ return { w: v, h: v };
39738
+ }
39603
39739
  if (!m) throw new FloorplanParseError(`expected "WxH" for ${what}, got "${t.word}"`, ln);
39604
39740
  return { w: Number(m[1]), h: Number(m[2]) };
39605
39741
  }
@@ -39615,15 +39751,34 @@ function parseId(t, what, ln) {
39615
39751
  }
39616
39752
  var SIDES = ["north", "south", "east", "west"];
39617
39753
  var REL_HOW = ["right-of", "left-of", "above", "below"];
39754
+ var FURNITURE_ALIASES = {
39755
+ section: "sectional",
39756
+ sectional_sofa: "sectional",
39757
+ cabinet: "wall-cabinet",
39758
+ socket: "outlet",
39759
+ receptacle: "duplex-outlet",
39760
+ "power-outlet": "duplex-outlet",
39761
+ "duplex-receptacle": "duplex-outlet",
39762
+ "light-fixture": "ceiling-light",
39763
+ "ceiling-lamp": "ceiling-light",
39764
+ lamp: "light",
39765
+ "data-socket": "data-outlet",
39766
+ "ethernet-outlet": "data-outlet",
39767
+ panel: "electrical-panel",
39768
+ "breaker-panel": "electrical-panel",
39769
+ db: "distribution-board",
39770
+ "consumer-unit": "distribution-board"
39771
+ };
39618
39772
  function parseFurnitureType(t, ln) {
39619
39773
  const word = isWord(t) ? t.word : "";
39620
- if (!FURNITURE_TYPES.includes(word)) {
39774
+ const canonical = FURNITURE_ALIASES[word] ?? word;
39775
+ if (!FURNITURE_TYPES.includes(canonical)) {
39621
39776
  throw new FloorplanParseError(
39622
39777
  `unknown furniture type "${word}". Valid types: ${FURNITURE_TYPES.join(", ")}`,
39623
39778
  ln
39624
39779
  );
39625
39780
  }
39626
- return word;
39781
+ return canonical;
39627
39782
  }
39628
39783
  function parseHeader3(tok, ast, ln) {
39629
39784
  while (tok.length) {
@@ -42514,10 +42669,10 @@ var plugins = [
42514
42669
  chunkKYE7CRED_cjs.sociogram,
42515
42670
  chunkJHJJT5H5_cjs.timing,
42516
42671
  chunkYDEQZSPQ_cjs.logic,
42517
- chunkTXWVJAMR_cjs.circuit,
42672
+ chunkHEGDKO2E_cjs.circuit,
42518
42673
  chunkT55OQILI_cjs.blockdiagram,
42519
42674
  chunkGTCGATOL_cjs.ladder,
42520
- chunkMXV3XJFH_cjs.sld,
42675
+ chunkYN7EBTWB_cjs.sld,
42521
42676
  chunk4MANMKQ4_cjs.entity,
42522
42677
  chunkYFPDZVB7_cjs.fishbone,
42523
42678
  chunk3JN4762U_cjs.venn,
@@ -42737,5 +42892,5 @@ exports.timeline = timeline;
42737
42892
  exports.umlclass = umlclass;
42738
42893
  exports.usecase = usecase;
42739
42894
  exports.welding = welding;
42740
- //# sourceMappingURL=chunk-OY2CXLVY.cjs.map
42741
- //# sourceMappingURL=chunk-OY2CXLVY.cjs.map
42895
+ //# sourceMappingURL=chunk-5YTFNOKY.cjs.map
42896
+ //# sourceMappingURL=chunk-5YTFNOKY.cjs.map