schematex 0.9.13 → 0.9.14

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.
@@ -29965,7 +29965,23 @@ var FURNITURE_ALIASES = {
29965
29965
  panel: "electrical-panel",
29966
29966
  "breaker-panel": "electrical-panel",
29967
29967
  db: "distribution-board",
29968
- "consumer-unit": "distribution-board"
29968
+ "consumer-unit": "distribution-board",
29969
+ // Common everyday synonyms an LLM reaches for that map cleanly onto an
29970
+ // existing type. Keeps a valid layout from failing on a vocabulary gap.
29971
+ "console-table": "side-table",
29972
+ console: "side-table",
29973
+ "end-table": "side-table",
29974
+ couch: "sofa",
29975
+ settee: "loveseat",
29976
+ "tv-console": "tv-stand",
29977
+ "media-console": "tv-stand",
29978
+ "entertainment-center": "tv-stand",
29979
+ refrigerator: "fridge",
29980
+ cooktop: "stove",
29981
+ stovetop: "stove",
29982
+ armoire: "wardrobe",
29983
+ wc: "toilet",
29984
+ "water-closet": "toilet"
29969
29985
  };
29970
29986
  function parseFurnitureType(t, ln) {
29971
29987
  const word = isWord(t) ? t.word : "";
@@ -36687,6 +36703,9 @@ function parseMermaidErd(lines) {
36687
36703
  const entityMap = /* @__PURE__ */ new Map();
36688
36704
  const order = [];
36689
36705
  const refs = [];
36706
+ let title2;
36707
+ let direction = "LR";
36708
+ let notation = "crowsfoot";
36690
36709
  const ensure = (id) => {
36691
36710
  let e = entityMap.get(id);
36692
36711
  if (!e) {
@@ -36700,6 +36719,33 @@ function parseMermaidErd(lines) {
36700
36719
  while (i < lines.length) {
36701
36720
  const t = lines[i].text;
36702
36721
  const ln = lines[i].lineNumber;
36722
+ const lower = t.toLowerCase();
36723
+ if (lower.startsWith("title:")) {
36724
+ title2 = unquote7(t.slice("title:".length).trim());
36725
+ i++;
36726
+ continue;
36727
+ }
36728
+ if (lower.startsWith("direction:")) {
36729
+ const v = t.slice("direction:".length).trim().toUpperCase();
36730
+ if (v !== "LR" && v !== "TB") {
36731
+ throw new ErdParseError(`Unknown direction '${v}'. Use LR or TB.`, ln);
36732
+ }
36733
+ direction = v;
36734
+ i++;
36735
+ continue;
36736
+ }
36737
+ if (lower.startsWith("notation:")) {
36738
+ const v = t.slice("notation:".length).trim().toLowerCase();
36739
+ if (v !== "crowsfoot") {
36740
+ throw new ErdParseError(
36741
+ `notation '${v}' is documented but not yet implemented in v0.1; use 'crowsfoot'.`,
36742
+ ln
36743
+ );
36744
+ }
36745
+ notation = v;
36746
+ i++;
36747
+ continue;
36748
+ }
36703
36749
  const inlineBlock = new RegExp(`^(${MERMAID_NAME.source})\\s*\\{\\s*(.*?)\\s*\\}$`).exec(t);
36704
36750
  const openBlock = new RegExp(`^(${MERMAID_NAME.source})\\s*\\{$`).exec(t);
36705
36751
  if (inlineBlock) {
@@ -36746,8 +36792,9 @@ function parseMermaidErd(lines) {
36746
36792
  }
36747
36793
  return {
36748
36794
  type: "erd",
36749
- notation: "crowsfoot",
36750
- direction: "LR",
36795
+ notation,
36796
+ direction,
36797
+ title: title2,
36751
36798
  entities: order.map((id) => entityMap.get(id)),
36752
36799
  refs
36753
36800
  };
@@ -42860,5 +42907,5 @@ function renderWithPlugin(prepared, plugin, config) {
42860
42907
  }
42861
42908
 
42862
42909
  export { FLOORPLAN_SYMBOLS, GEOMETRY, bowtie2 as bowtie, causalloop, comparison, decisiontree, drawDeviceIcon, epc, eventtree, faulttree, floorplan, fmea, gitgraph, iconSize, idef0, markov, network, parse, parseResult, pert, petri, pid, playbook, prisma, rbd, render, renderEquip, renderPreview, renderResult, sequence, state, threatmodel, timeline, umlclass, usecase, welding };
42863
- //# sourceMappingURL=chunk-WPNMVV3U.js.map
42864
- //# sourceMappingURL=chunk-WPNMVV3U.js.map
42910
+ //# sourceMappingURL=chunk-JG5CVYXC.js.map
42911
+ //# sourceMappingURL=chunk-JG5CVYXC.js.map