@cardenelabs/dragon 0.14.0 → 0.15.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
@@ -4754,6 +4754,21 @@ function describeOversizeSource(src) {
4754
4754
  }
4755
4755
 
4756
4756
  // src/compile.ts
4757
+ var \u8A18\u6CD5\u3060\u3051\u306E\u7A2E\u985E\u306E\u8AAD\u307F\u66FF\u3048 = {
4758
+ entity: "storage",
4759
+ state: "card",
4760
+ contract: "card",
4761
+ proxy: "card",
4762
+ library: "card",
4763
+ interface: "card",
4764
+ eoa: "person",
4765
+ multisig: "signer"
4766
+ };
4767
+ function \u63CF\u3051\u308B\u7A2E\u5225(kind) {
4768
+ if (kind === void 0) return "actor";
4769
+ const \u8AAD\u307F\u66FF\u3048\u5148 = \u8A18\u6CD5\u3060\u3051\u306E\u7A2E\u985E\u306E\u8AAD\u307F\u66FF\u3048[kind];
4770
+ return \u8AAD\u307F\u66FF\u3048\u5148 ?? kind;
4771
+ }
4757
4772
  function compileToCdl(doc, opts) {
4758
4773
  const oversize = describeOversize({ elements: countDocElements(doc), bytes: 0 });
4759
4774
  if (oversize) throw new Error(oversize);
@@ -7572,7 +7587,7 @@ function compileC4(doc) {
7572
7587
  b.node(x.id, {
7573
7588
  lane: lid,
7574
7589
  stack,
7575
- kind: x.actor.kind,
7590
+ kind: \u63CF\u3051\u308B\u7A2E\u5225(x.actor.kind),
7576
7591
  title: x.actor.name
7577
7592
  });
7578
7593
  }
@@ -8156,7 +8171,7 @@ function compileFlow(doc) {
8156
8171
  flowBuilder.step(
8157
8172
  {
8158
8173
  id: slugify(a.name),
8159
- kind: a.kind,
8174
+ kind: \u63CF\u3051\u308B\u7A2E\u5225(a.kind),
8160
8175
  title: \u7BB1\u306E\u984C(a)
8161
8176
  },
8162
8177
  edgeLabel
@@ -8186,7 +8201,7 @@ function compileSwimlane(doc) {
8186
8201
  swim.node(nodeId, {
8187
8202
  lane: laneId,
8188
8203
  stack,
8189
- kind: actor?.kind ?? "actor",
8204
+ kind: \u63CF\u3051\u308B\u7A2E\u5225(actor?.kind),
8190
8205
  title: actorName
8191
8206
  });
8192
8207
  laneStackCount.set(laneId, stack + 1);
@@ -8208,7 +8223,7 @@ function compileSwimlane(doc) {
8208
8223
  swim.node(slugify(a.name), {
8209
8224
  lane: swim.laneId(a.name),
8210
8225
  stack: 0,
8211
- kind: a.kind ?? "actor",
8226
+ kind: \u63CF\u3051\u308B\u7A2E\u5225(a.kind),
8212
8227
  title: \u7BB1\u306E\u984C(a)
8213
8228
  });
8214
8229
  });
@@ -8297,7 +8312,7 @@ function compileTopology(doc) {
8297
8312
  for (const a of doc.actors) {
8298
8313
  groupBuilder.add({
8299
8314
  id: slugify(a.name),
8300
- kind: a.kind,
8315
+ kind: \u63CF\u3051\u308B\u7A2E\u5225(a.kind),
8301
8316
  title: \u7BB1\u306E\u984C(a)
8302
8317
  });
8303
8318
  }
@@ -8363,7 +8378,12 @@ function compileGenericWithAnimate(doc, opts) {
8363
8378
  while (\u96C6\u5408?.has(stack)) stack += 1;
8364
8379
  \u57CB\u3081\u308B(lid, stack);
8365
8380
  }
8366
- b.node(id, { lane: lid, stack, kind: a.kind, title: \u7BB1\u306E\u984C(a) });
8381
+ b.node(id, {
8382
+ lane: lid,
8383
+ stack,
8384
+ kind: \u63CF\u3051\u308B\u7A2E\u5225(a.kind),
8385
+ title: \u7BB1\u306E\u984C(a)
8386
+ });
8367
8387
  });
8368
8388
  } else if (kind === "flow" || kind === "topology") {
8369
8389
  const lid = opts.laneId ?? "main";
@@ -8375,7 +8395,12 @@ function compileGenericWithAnimate(doc, opts) {
8375
8395
  doc.actors.forEach((a, idx) => {
8376
8396
  const id = slugify(a.name);
8377
8397
  actorToNodeId.set(a.name, id);
8378
- b.node(id, { lane: lid, stack: idx, kind: a.kind, title: \u7BB1\u306E\u984C(a) });
8398
+ b.node(id, {
8399
+ lane: lid,
8400
+ stack: idx,
8401
+ kind: \u63CF\u3051\u308B\u7A2E\u5225(a.kind),
8402
+ title: \u7BB1\u306E\u984C(a)
8403
+ });
8379
8404
  });
8380
8405
  } else {
8381
8406
  const \u898B\u51FA\u3057\u3092\u4ED8\u3051\u308B = kind === "swimlane";
@@ -8390,7 +8415,7 @@ function compileGenericWithAnimate(doc, opts) {
8390
8415
  b.node(id, {
8391
8416
  lane: lid,
8392
8417
  stack: 0,
8393
- kind: a.kind,
8418
+ kind: \u63CF\u3051\u308B\u7A2E\u5225(a.kind),
8394
8419
  title: \u7BB1\u306E\u984C(a),
8395
8420
  ...isInitial ? { eyebrow: "\u521D\u671F" } : {},
8396
8421
  ...isFinal ? { eyebrow: "\u6700\u7D42" } : {}