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