schematex 0.6.8 → 0.6.9

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.
@@ -14905,7 +14905,6 @@ function layoutUmlClass(ast) {
14905
14905
  n.box.layer = n.rank;
14906
14906
  }
14907
14907
  }
14908
- applyDirectionTransform(direction, nodes, boxes);
14909
14908
  normaliseCoords(nodes, boxes);
14910
14909
  const packages = layoutPackages(ast, boxByID);
14911
14910
  shiftForPackages(nodes, boxes, packages);
@@ -14913,29 +14912,6 @@ function layoutUmlClass(ast) {
14913
14912
  const { edges, trees } = routeEdges(chains, nodes, boxByID, vertical);
14914
14913
  return { ast, boxes, packages, edges, trees, width, height };
14915
14914
  }
14916
- function applyDirectionTransform(direction, nodes, boxes) {
14917
- if (direction === "tb") return;
14918
- const transform = (p) => {
14919
- switch (direction) {
14920
- case "bt":
14921
- return { x: p.x, y: -p.y };
14922
- case "lr":
14923
- return { x: p.y, y: p.x };
14924
- case "rl":
14925
- return { x: -p.y, y: p.x };
14926
- }
14927
- };
14928
- for (const n of nodes) {
14929
- const p = transform({ x: n.cx, y: n.cy });
14930
- n.cx = p.x;
14931
- n.cy = p.y;
14932
- }
14933
- for (const b of boxes) {
14934
- const c = transform({ x: b.x + b.width / 2, y: b.y + b.height / 2 });
14935
- b.x = c.x - b.width / 2;
14936
- b.y = c.y - b.height / 2;
14937
- }
14938
- }
14939
14915
  function topLevelPackageMap(ast) {
14940
14916
  const parentOf = /* @__PURE__ */ new Map();
14941
14917
  for (const p of ast.packages) parentOf.set(p.id, p.parentId);
@@ -16211,14 +16187,12 @@ function parseFaultTree(text2) {
16211
16187
  }
16212
16188
  if (/^layout\s*:/i.test(t)) {
16213
16189
  const v = afterColon2(t).toLowerCase();
16214
- if (v === "tb") ast.direction = v;
16215
- else if (v === "bt") ast.warnings.push(`Line ${lineNo}: layout: bt is reserved but not implemented yet; using layout: tb.`);
16190
+ if (v === "tb" || v === "bt") ast.direction = v;
16216
16191
  continue;
16217
16192
  }
16218
16193
  if (/^style\s*:/i.test(t)) {
16219
16194
  const v = afterColon2(t).toLowerCase();
16220
- if (v === "ansi") ast.gateStyle = v;
16221
- else if (v === "iec") ast.warnings.push(`Line ${lineNo}: style: iec is reserved but not implemented yet; using style: ansi.`);
16195
+ if (v === "ansi" || v === "iec") ast.gateStyle = v;
16222
16196
  continue;
16223
16197
  }
16224
16198
  if (/^transfer\b/i.test(t)) {
@@ -17252,7 +17226,6 @@ function summarise(layout) {
17252
17226
  if (analysis.topProb !== void 0) parts.push(`P(top) = ${fmtProb(analysis.topProb)} (${analysis.method}).`);
17253
17227
  else if (analysis.missingProb.length > 0) parts.push(`P(top) = n/a \u2014 missing p on ${analysis.missingProb.join(", ")}.`);
17254
17228
  }
17255
- for (const w of ast.warnings) parts.push(w);
17256
17229
  for (const n of analysis.notes) parts.push(n);
17257
17230
  for (const w of analysis.warnings) parts.push(w);
17258
17231
  return parts.join(" ");
@@ -17349,8 +17322,7 @@ function parseBowtie(text2) {
17349
17322
  const lineNo = i + 1;
17350
17323
  if (/^layout\s*:/i.test(t)) {
17351
17324
  const v = afterColon3(t).toLowerCase();
17352
- if (v === "symmetric") ast.layout = v;
17353
- else if (v === "compact") ast.warnings.push(`Line ${lineNo}: layout: compact is reserved but not implemented yet; using layout: symmetric.`);
17325
+ if (v === "symmetric" || v === "compact") ast.layout = v;
17354
17326
  continue;
17355
17327
  }
17356
17328
  if (/^legend\s*:/i.test(t)) {
@@ -26740,5 +26712,5 @@ function renderWithPlugin(prepared, plugin, config) {
26740
26712
  }
26741
26713
 
26742
26714
  export { GEOMETRY, bowtie2 as bowtie, decisiontree, drawDeviceIcon, faulttree, iconSize, network, parse, parseResult, pert, petri, pid, prisma, render, renderEquip, renderPreview, renderResult, sequence, state, timeline, umlclass, usecase };
26743
- //# sourceMappingURL=chunk-J2TT7PGI.js.map
26744
- //# sourceMappingURL=chunk-J2TT7PGI.js.map
26715
+ //# sourceMappingURL=chunk-3DPWFWQU.js.map
26716
+ //# sourceMappingURL=chunk-3DPWFWQU.js.map