@cardenelabs/dragon 0.20.0 → 0.22.0

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 CHANGED
@@ -7192,7 +7192,7 @@ function \u7D42\u308F\u308B\u4F4D\u7F6E(end, \u59CB\u307E\u308A, \u76EE\u76DB\u3
7192
7192
  return { idx: i, label: end };
7193
7193
  }
7194
7194
  function compileGantt(doc) {
7195
- const b = diagram(slugify(doc.title), { topic: doc.title });
7195
+ const b = diagram(slugify(doc.title), { topic: doc.title, type: "gantt" });
7196
7196
  const CHART_W = 720;
7197
7197
  b.lane("gantt", { width: CHART_W });
7198
7198
  const \u76EE\u76DB\u308A = [];
@@ -7276,7 +7276,8 @@ function compileGantt(doc) {
7276
7276
  }
7277
7277
  function compileClass(doc) {
7278
7278
  const b = classDiagram({ id: slugify(doc.title), topic: doc.title });
7279
- if (doc.actors.length === 0) return diagram(slugify(doc.title), { topic: doc.title }).build();
7279
+ if (doc.actors.length === 0)
7280
+ return diagram(slugify(doc.title), { topic: doc.title, type: "class" }).build();
7280
7281
  const \u5217\u756A\u53F7 = /* @__PURE__ */ new Map();
7281
7282
  for (const a of doc.actors) {
7282
7283
  if (a.lane === void 0) continue;
@@ -7339,7 +7340,7 @@ function \u53C2\u7167\u3059\u308B\u540D\u524D(value) {
7339
7340
  return m ? m[1] : null;
7340
7341
  }
7341
7342
  function compileValueChart(doc, \u578B, kind, onNotice) {
7342
- const b = diagram(slugify(doc.title), { topic: doc.title });
7343
+ const b = diagram(slugify(doc.title), { topic: doc.title, type: "chart" });
7343
7344
  const CHART_W = 640;
7344
7345
  const \u4F4E\u3044\u578B = \u578B === "pie" || \u578B === "gauge" || \u578B === "radial" || \u578B === "waffle" || \u578B === "stat";
7345
7346
  const CHART_H = \u4F4E\u3044\u578B ? 320 : 368;
@@ -7527,7 +7528,7 @@ function \u8A9E\u306E\u72B6\u614B\u3092\u56F3\u306E\u8A9E\u3078\u76F4\u3059(diag
7527
7528
  }
7528
7529
  }
7529
7530
  function compileFunnel(doc, onNotice) {
7530
- const b = diagram(slugify(doc.title), { topic: doc.title });
7531
+ const b = diagram(slugify(doc.title), { topic: doc.title, type: "funnel" });
7531
7532
  const { w: W, h: H } = \u56F3\u8868\u306E\u5927\u304D\u3055.funnel;
7532
7533
  b.lane("chart", { width: W + 64 });
7533
7534
  const data = [];
@@ -7631,7 +7632,7 @@ function \u77E2\u5370\u304B\u3089\u89AA\u3092\u6C7A\u3081\u308B(doc, \u56F3\u7A2
7631
7632
  return \u89AA;
7632
7633
  }
7633
7634
  function compileTree(doc, onNotice) {
7634
- const b = diagram(slugify(doc.title), { topic: doc.title });
7635
+ const b = diagram(slugify(doc.title), { topic: doc.title, type: "tree" });
7635
7636
  const { w: W, h: H } = \u56F3\u8868\u306E\u5927\u304D\u3055.tree;
7636
7637
  b.lane("chart", { width: W + 64 });
7637
7638
  const slug\u5225 = /* @__PURE__ */ new Map();
@@ -7707,7 +7708,7 @@ function reportChartFieldsNotHonored(doc, onNotice) {
7707
7708
  }
7708
7709
  }
7709
7710
  function compileJourney(doc, onNotice) {
7710
- const b = diagram(slugify(doc.title), { topic: doc.title });
7711
+ const b = diagram(slugify(doc.title), { topic: doc.title, type: "journey" });
7711
7712
  const { w: W, h: H } = \u56F3\u8868\u306E\u5927\u304D\u3055.journey;
7712
7713
  b.lane("chart", { width: W + 64 });
7713
7714
  const data = [];
@@ -7793,7 +7794,7 @@ function reportAxesNotHonored(doc, onNotice) {
7793
7794
  });
7794
7795
  }
7795
7796
  function compileQuadrant(doc, onNotice) {
7796
- const b = diagram(slugify(doc.title), { topic: doc.title });
7797
+ const b = diagram(slugify(doc.title), { topic: doc.title, type: "quadrant" });
7797
7798
  const { w: W, h: H } = \u56F3\u8868\u306E\u5927\u304D\u3055.quadrant;
7798
7799
  b.lane("chart", { width: W + 64 });
7799
7800
  const items = [];
@@ -7852,7 +7853,7 @@ function \u6BB5\u3092\u8AAD\u307F\u53D6\u308B(subtitle) {
7852
7853
  return { \u6BB5: Number(m[1]), \u8AAC\u660E: \u6B8B\u308A === "" ? void 0 : \u6B8B\u308A };
7853
7854
  }
7854
7855
  function compileC4(doc) {
7855
- const b = diagram(slugify(doc.title), { topic: doc.title });
7856
+ const b = diagram(slugify(doc.title), { topic: doc.title, type: "infrastructure" });
7856
7857
  const LANE_W = 400;
7857
7858
  const LANE_GAP = 80;
7858
7859
  const \u6BB5\u306E\u540D\u524D = { 1: "System Context", 2: "Container", 3: "Component" };
@@ -7985,7 +7986,7 @@ function \u653E\u5C04\u306B\u51FA\u3059\u6587\u5B57(a) {
7985
7986
  return { title: \u7BB1\u306E\u984C(a), ...\u7D9A\u304D.length > 0 ? { subtitle: \u7D9A\u304D.join(" ") } : {} };
7986
7987
  }
7987
7988
  function compileMind(doc, onNotice) {
7988
- const b = diagram(slugify(doc.title), { topic: doc.title });
7989
+ const b = diagram(slugify(doc.title), { topic: doc.title, type: "mindmap" });
7989
7990
  const { w: W, h: H } = \u56F3\u8868\u306E\u5927\u304D\u3055.mind;
7990
7991
  const \u4F1D\u3048\u308B = (kind, \u540D, message, line = 0) => {
7991
7992
  onNotice?.({ kind, actor: \u540D, line, message });
@@ -8361,7 +8362,7 @@ function compileFlow(doc) {
8361
8362
  return compileGenericWithAnimate(doc, { kind: "flow", laneId: "main", laneWidth: 400 });
8362
8363
  }
8363
8364
  if (doc.actors.length === 0) {
8364
- return diagram(slugify(doc.title), { topic: doc.title }).build();
8365
+ return diagram(slugify(doc.title), { topic: doc.title, type: "flow" }).build();
8365
8366
  }
8366
8367
  const flowBuilder = flow({
8367
8368
  id: slugify(doc.title),
@@ -8510,7 +8511,7 @@ function compileTopology(doc) {
8510
8511
  return compileGenericWithAnimate(doc, { kind: "topology", laneWidth: 460 });
8511
8512
  }
8512
8513
  if (doc.actors.length === 0) {
8513
- return diagram(slugify(doc.title), { topic: doc.title }).build();
8514
+ return diagram(slugify(doc.title), { topic: doc.title, type: "topology" }).build();
8514
8515
  }
8515
8516
  const topo = topology({
8516
8517
  id: slugify(doc.title),
@@ -8600,8 +8601,8 @@ function \u66F8\u3044\u305F\u7E26\u5217\u306B\u7F6E\u304F(kind, doc) {
8600
8601
  return \u5BFE\u8C61.length > 0 && \u5BFE\u8C61.every((a) => a.lane !== void 0);
8601
8602
  }
8602
8603
  function compileGenericWithAnimate(doc, opts) {
8603
- const b = diagram(slugify(doc.title), { topic: doc.title });
8604
8604
  const { kind, laneWidth } = opts;
8605
+ const b = diagram(slugify(doc.title), { topic: doc.title, type: kind });
8605
8606
  const actorToNodeId = /* @__PURE__ */ new Map();
8606
8607
  if (\u66F8\u3044\u305F\u7E26\u5217\u306B\u7F6E\u304F(kind, doc)) {
8607
8608
  const \u4F7F\u3063\u305F = [];