@cardenelabs/cdl 0.74.0 → 0.75.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/CHANGELOG.md +38 -1
- package/dist/index.cjs +253 -181
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +253 -181
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +253 -181
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +253 -181
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/src/kinds/shape-blockchain.tsx +94 -17
- package/src/kinds/shape-commerce.tsx +45 -14
- package/src/kinds/shape-finance.tsx +73 -19
- package/src/kinds/shape-people.tsx +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cardenelabs/cdl",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.75.0",
|
|
4
4
|
"description": "CDL (Chainome Diagram Language). Mermaid-like declarative DSL that compiles to animated SVG diagrams. Built for blockchain / Solidity flows, generic enough for sequence / flow / state / ER / topology diagrams.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "cardene777",
|
|
@@ -56,6 +56,19 @@ const CHAIN_BLOCK_H = 66;
|
|
|
56
56
|
const CHAIN_LINK_W = 12;
|
|
57
57
|
const CHAIN_SHADOW = 3;
|
|
58
58
|
const CHAIN_BLOCK_SW = 2.5;
|
|
59
|
+
/** 連鎖の箱の頭の帯の高さ。 番号がここに乗る (#887 で打ち消しの帯に使うため定数へ出した) */
|
|
60
|
+
const CHAIN_HEAD_H = 16;
|
|
61
|
+
/** 箱の中で字が使える幅。 左右に 4 ずつ余白を置く */
|
|
62
|
+
const CHAIN_TEXT_W = CHAIN_BLOCK_W - 8;
|
|
63
|
+
/** 箱の中の 2 行 (中央の記号と下の字) の baseline の間隔 */
|
|
64
|
+
const CHAIN_ROW_GAP = 14;
|
|
65
|
+
/** 連鎖の箱の中の字の指定 (#887 で打ち消しの計算に使うため定数へ出した) */
|
|
66
|
+
const CHAIN_NO_SIZE = 10;
|
|
67
|
+
const CONTRACT_CALL_SIZE = 11;
|
|
68
|
+
const NFT_ID_SIZE = 15;
|
|
69
|
+
const CHAIN_HASH_SIZE = 7;
|
|
70
|
+
const BTC_NO_SIZE = 9;
|
|
71
|
+
const ETH_NO_SIZE = 9;
|
|
59
72
|
|
|
60
73
|
const NODE_HEX_R = 44;
|
|
61
74
|
const NODE_PEER_R = 12;
|
|
@@ -223,7 +236,23 @@ export function ShapeSmartContractNode({ node, active, lang }: ShapeProps): JSX.
|
|
|
223
236
|
gearPts.push(`${gearCx + Math.cos(a3) * gearTipR},${gearCy + Math.sin(a3) * gearTipR}`);
|
|
224
237
|
gearPts.push(`${gearCx + Math.cos(a4) * gearBodyR},${gearCy + Math.sin(a4) * gearBodyR}`);
|
|
225
238
|
}
|
|
226
|
-
|
|
239
|
+
/*
|
|
240
|
+
* 打ち消しの上限を出す帯 (#887)。 呼び出し行は書類の下寄りに 1 行だけ置くので、
|
|
241
|
+
* 幅は書類の内側 (左右 16 ずつ)、高さは行を並べる間隔 18 を使う。
|
|
242
|
+
*
|
|
243
|
+
* 字引きで日英が切り替わる (`function execute()` 18 字 と 自動で実行する 7 字) ため、
|
|
244
|
+
* 描く字そのものを渡して幅を数える。
|
|
245
|
+
*/
|
|
246
|
+
const 打ち消す字ら: 打ち消す字[] = [
|
|
247
|
+
{
|
|
248
|
+
text: 字引("smartContract.call"),
|
|
249
|
+
size: CONTRACT_CALL_SIZE,
|
|
250
|
+
帯: { 幅: docW - 32, 高さ: 18 },
|
|
251
|
+
},
|
|
252
|
+
];
|
|
253
|
+
const art = (倍率: number): JSX.Element => {
|
|
254
|
+
const 倍 = 打ち消しの倍率(倍率, 打ち消す字ら);
|
|
255
|
+
return (
|
|
227
256
|
<g>
|
|
228
257
|
<path data-cdl-role="node-body" d={path} {...frame} strokeLinejoin="round" />
|
|
229
258
|
<path d={foldPath} fill="none" stroke={frame.stroke} strokeWidth={frame.strokeWidth} strokeLinejoin="round" />
|
|
@@ -232,7 +261,7 @@ export function ShapeSmartContractNode({ node, active, lang }: ShapeProps): JSX.
|
|
|
232
261
|
<rect key={i} x={x + 16} y={ly - 3} width={docW - 32 - i * 22} height={5} rx={1} fill="var(--cdl-divider, #d4d4d8)" fillOpacity={0.7} stroke="none" />
|
|
233
262
|
))}
|
|
234
263
|
{/* function signature */}
|
|
235
|
-
<text x={x + 16} y={y + docH - 46} fontSize={
|
|
264
|
+
<text data-cdl-counter-scaled="1" x={x + 16} y={y + docH - 46} fontSize={CONTRACT_CALL_SIZE * 倍} fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fill="var(--cdl-tone-accent, #2d6a8f)">
|
|
236
265
|
{字引("smartContract.call")}
|
|
237
266
|
</text>
|
|
238
267
|
{/* gear (auto-execution 記号) */}
|
|
@@ -247,7 +276,8 @@ export function ShapeSmartContractNode({ node, active, lang }: ShapeProps): JSX.
|
|
|
247
276
|
</polygon>
|
|
248
277
|
<circle cx={gearCx} cy={gearCy} r={gearBodyR * 0.4} fill="var(--cdl-node-fill, #ffffff)" stroke="none" />
|
|
249
278
|
</g>
|
|
250
|
-
|
|
279
|
+
);
|
|
280
|
+
};
|
|
251
281
|
return (
|
|
252
282
|
<g>
|
|
253
283
|
{fitArt(r, smartContractExtent(frame.strokeWidth), art)}
|
|
@@ -413,7 +443,19 @@ export function ShapeBlockchainNode({ node, active }: ShapeProps): JSX.Element {
|
|
|
413
443
|
const linkW = CHAIN_LINK_W;
|
|
414
444
|
const totalW = blockCount * blockW + (blockCount - 1) * linkW;
|
|
415
445
|
const startX = cx - totalW / 2;
|
|
416
|
-
|
|
446
|
+
/*
|
|
447
|
+
* 打ち消しの上限を出す帯 (#887)。 番号は頭の帯 (高さ 16) に乗り、下の字は中央の記号との
|
|
448
|
+
* 間隔 14 に収まる。 幅はどちらも箱の内側。
|
|
449
|
+
*
|
|
450
|
+
* **中央の記号 (`#`) は打ち消さない**。 箱の中央に大きく置いた飾りで、戻すと箱から出る。
|
|
451
|
+
*/
|
|
452
|
+
const 打ち消す字ら: 打ち消す字[] = [
|
|
453
|
+
{ text: "#420", size: CHAIN_NO_SIZE, 帯: { 幅: CHAIN_TEXT_W, 高さ: CHAIN_HEAD_H } },
|
|
454
|
+
{ text: "0x…", size: CHAIN_HASH_SIZE, 帯: { 幅: CHAIN_TEXT_W, 高さ: CHAIN_ROW_GAP } },
|
|
455
|
+
];
|
|
456
|
+
const art = (倍率: number): JSX.Element => {
|
|
457
|
+
const 倍 = 打ち消しの倍率(倍率, 打ち消す字ら);
|
|
458
|
+
return (
|
|
417
459
|
<g>
|
|
418
460
|
{Array.from({ length: blockCount }, (_, i) => i).map((i) => {
|
|
419
461
|
const bx = startX + i * (blockW + linkW);
|
|
@@ -440,21 +482,22 @@ export function ShapeBlockchainNode({ node, active }: ShapeProps): JSX.Element {
|
|
|
440
482
|
stroke={frame.stroke}
|
|
441
483
|
strokeWidth={isCurrent ? 2.5 : 1.5}
|
|
442
484
|
/>
|
|
443
|
-
<rect x={bx} y={cy - blockH / 2} width={blockW} height={
|
|
444
|
-
<text x={bx + blockW / 2} y={cy - blockH / 2 + 12} fontSize={
|
|
485
|
+
<rect x={bx} y={cy - blockH / 2} width={blockW} height={CHAIN_HEAD_H} rx={4} fill={isCurrent ? "#1a4a68" : "var(--cdl-divider, #d4d4d8)"} fillOpacity={isCurrent ? 1 : 0.4} stroke="none" />
|
|
486
|
+
<text data-cdl-counter-scaled="1" x={bx + blockW / 2} y={cy - blockH / 2 + 12} fontSize={CHAIN_NO_SIZE * 倍} fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontWeight={700} textAnchor="middle" fill={isCurrent ? "#ffffff" : "var(--cdl-text-dim, #5a6270)"}>
|
|
445
487
|
#{420 + i}
|
|
446
488
|
</text>
|
|
447
|
-
<text x={bx + blockW / 2} y={cy + 8} fontSize={14} fontWeight={700} textAnchor="middle" fill={isCurrent ? "#ffffff" : "var(--cdl-tone-accent, #2d6a8f)"} fontFamily="Georgia, serif">
|
|
489
|
+
<text data-cdl-counter-scaled="0" x={bx + blockW / 2} y={cy + 8} fontSize={14} fontWeight={700} textAnchor="middle" fill={isCurrent ? "#ffffff" : "var(--cdl-tone-accent, #2d6a8f)"} fontFamily="Georgia, serif">
|
|
448
490
|
#
|
|
449
491
|
</text>
|
|
450
|
-
<text x={bx + blockW / 2} y={cy + 22} fontSize={
|
|
492
|
+
<text data-cdl-counter-scaled="1" x={bx + blockW / 2} y={cy + 22} fontSize={CHAIN_HASH_SIZE * 倍} fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" textAnchor="middle" fill={isCurrent ? "#ffffff" : "var(--cdl-text-dim, #5a6270)"} opacity={0.9}>
|
|
451
493
|
0x…
|
|
452
494
|
</text>
|
|
453
495
|
</g>
|
|
454
496
|
);
|
|
455
497
|
})}
|
|
456
498
|
</g>
|
|
457
|
-
|
|
499
|
+
);
|
|
500
|
+
};
|
|
458
501
|
return (
|
|
459
502
|
<g>
|
|
460
503
|
{fitArt(r, chainExtent(), art)}
|
|
@@ -476,7 +519,17 @@ export function ShapeBitcoinChainNode({ node, active }: ShapeProps): JSX.Element
|
|
|
476
519
|
const linkW = CHAIN_LINK_W;
|
|
477
520
|
const totalW = blockCount * blockW + (blockCount - 1) * linkW;
|
|
478
521
|
const startX = cx - totalW / 2;
|
|
479
|
-
|
|
522
|
+
/*
|
|
523
|
+
* 打ち消しの上限を出す帯 (#887)。 番号は箱の下半分に置き、中央の `₿` との間隔 20 に収まる。
|
|
524
|
+
*
|
|
525
|
+
* **`₿` は打ち消さない** (指定 30 の飾りで、箱の高さ 66 に対して既に大きい)。
|
|
526
|
+
*/
|
|
527
|
+
const 打ち消す字ら: 打ち消す字[] = [
|
|
528
|
+
{ text: "#820", size: BTC_NO_SIZE, 帯: { 幅: CHAIN_TEXT_W, 高さ: 20 } },
|
|
529
|
+
];
|
|
530
|
+
const art = (倍率: number): JSX.Element => {
|
|
531
|
+
const 倍 = 打ち消しの倍率(倍率, 打ち消す字ら);
|
|
532
|
+
return (
|
|
480
533
|
<g>
|
|
481
534
|
{Array.from({ length: blockCount }, (_, i) => i).map((i) => {
|
|
482
535
|
const bx = startX + i * (blockW + linkW);
|
|
@@ -496,17 +549,18 @@ export function ShapeBitcoinChainNode({ node, active }: ShapeProps): JSX.Element
|
|
|
496
549
|
stroke={btcOrange}
|
|
497
550
|
strokeWidth={isCurrent ? 2.5 : 1.5}
|
|
498
551
|
/>
|
|
499
|
-
<text x={bx + blockW / 2} y={cy - 4} fontSize={30} fontWeight={700} textAnchor="middle" fill={isCurrent ? "#ffffff" : btcOrange} fontFamily="Georgia, serif">
|
|
552
|
+
<text data-cdl-counter-scaled="0" x={bx + blockW / 2} y={cy - 4} fontSize={30} fontWeight={700} textAnchor="middle" fill={isCurrent ? "#ffffff" : btcOrange} fontFamily="Georgia, serif">
|
|
500
553
|
₿
|
|
501
554
|
</text>
|
|
502
|
-
<text x={bx + blockW / 2} y={cy + 16} fontSize={
|
|
555
|
+
<text data-cdl-counter-scaled="1" x={bx + blockW / 2} y={cy + 16} fontSize={BTC_NO_SIZE * 倍} fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontWeight={700} textAnchor="middle" fill={isCurrent ? "#ffffff" : "var(--cdl-text-dim, #5a6270)"}>
|
|
503
556
|
#{820 + i}
|
|
504
557
|
</text>
|
|
505
558
|
</g>
|
|
506
559
|
);
|
|
507
560
|
})}
|
|
508
561
|
</g>
|
|
509
|
-
|
|
562
|
+
);
|
|
563
|
+
};
|
|
510
564
|
return (
|
|
511
565
|
<g>
|
|
512
566
|
{fitArt(r, chainExtent(), art)}
|
|
@@ -528,6 +582,15 @@ export function ShapeEthereumChainNode({ node, active }: ShapeProps): JSX.Elemen
|
|
|
528
582
|
const linkW = CHAIN_LINK_W;
|
|
529
583
|
const totalW = blockCount * blockW + (blockCount - 1) * linkW;
|
|
530
584
|
const startX = cx - totalW / 2;
|
|
585
|
+
/*
|
|
586
|
+
* **番号は打ち消さない** (#887)。 6 桁の番号は指定 9 でも幅の見積りが 46 になり、
|
|
587
|
+
* 箱の中で字が使える幅 42 (`CHAIN_TEXT_W`) を縮む前から超えている = 打ち消す余地が無い
|
|
588
|
+
* (`textWidth` は等幅の指定を無視して比例の書体で測る。 dragon の `cdl-theme.css` が
|
|
589
|
+
* `--d-body` を `!important` で当てるため、描かれるのは比例の書体になる)。
|
|
590
|
+
*
|
|
591
|
+
* 4 桁の `shape-bitcoin-chain` は同じ帯に収まるので打ち消しに乗っている。
|
|
592
|
+
* 縮む前から帯を超えていること自体は別の課題 (cardene777/cdl#885 と同じ形)。
|
|
593
|
+
*/
|
|
531
594
|
const art = (
|
|
532
595
|
<g>
|
|
533
596
|
{Array.from({ length: blockCount }, (_, i) => i).map((i) => {
|
|
@@ -553,7 +616,7 @@ export function ShapeEthereumChainNode({ node, active }: ShapeProps): JSX.Elemen
|
|
|
553
616
|
/>
|
|
554
617
|
{/* Ethereum Diamond ロゴ */}
|
|
555
618
|
<EthereumDiamond cx={bx + blockW / 2} cy={cy - 6} h={16} colors={iconColors} />
|
|
556
|
-
<text x={bx + blockW / 2} y={cy + 22} fontSize={
|
|
619
|
+
<text data-cdl-counter-scaled="0" x={bx + blockW / 2} y={cy + 22} fontSize={ETH_NO_SIZE} fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontWeight={700} textAnchor="middle" fill={isCurrent ? "#ffffff" : "var(--cdl-text-dim, #5a6270)"}>
|
|
557
620
|
#{21_400 + i}
|
|
558
621
|
</text>
|
|
559
622
|
</g>
|
|
@@ -776,7 +839,19 @@ export function ShapeNftNode({ node, active }: ShapeProps): JSX.Element {
|
|
|
776
839
|
const artH = cardH * 0.72;
|
|
777
840
|
const artCx = x + cardW / 2;
|
|
778
841
|
const artCy = y + artH / 2;
|
|
779
|
-
|
|
842
|
+
/*
|
|
843
|
+
* 打ち消しの上限を出す帯 (#887)。 番号は下の帯に置く。 高さは帯 (cardH - artH = 67)、
|
|
844
|
+
* 幅は左の余白 16 と右の丸 (半径 10、中心が cardW - 20) を避けた分。
|
|
845
|
+
*
|
|
846
|
+
* **絵の中央の `NFT` (指定 68) は打ち消さない**。 上の帯いっぱいに置いた飾りで、
|
|
847
|
+
* 戻すと帯から出る (実測 = 余り 0.92 で既に使い切っている)。
|
|
848
|
+
*/
|
|
849
|
+
const 打ち消す字ら: 打ち消す字[] = [
|
|
850
|
+
{ text: "#1024", size: NFT_ID_SIZE, 帯: { 幅: cardW - 16 - 34, 高さ: cardH - artH } },
|
|
851
|
+
];
|
|
852
|
+
const art = (倍率: number): JSX.Element => {
|
|
853
|
+
const 倍 = 打ち消しの倍率(倍率, 打ち消す字ら);
|
|
854
|
+
return (
|
|
780
855
|
<g>
|
|
781
856
|
{/* shadow */}
|
|
782
857
|
<rect x={x + 4} y={y + 4} width={cardW} height={cardH} rx={14} fill={frame.stroke} opacity={0.2} stroke="none" />
|
|
@@ -791,6 +866,7 @@ export function ShapeNftNode({ node, active }: ShapeProps): JSX.Element {
|
|
|
791
866
|
/>
|
|
792
867
|
{/* 巨大 NFT 文字 (art 中央、 accent 色) */}
|
|
793
868
|
<text
|
|
869
|
+
data-cdl-counter-scaled="0"
|
|
794
870
|
x={artCx}
|
|
795
871
|
y={artCy + 24}
|
|
796
872
|
fontSize={68}
|
|
@@ -805,7 +881,7 @@ export function ShapeNftNode({ node, active }: ShapeProps): JSX.Element {
|
|
|
805
881
|
{/* 下部 info bar */}
|
|
806
882
|
<line x1={x} y1={y + artH} x2={x + cardW} y2={y + artH} stroke={frame.stroke} strokeWidth={1} opacity={0.5} />
|
|
807
883
|
{/* token id (左) */}
|
|
808
|
-
<text x={x + 16} y={y + artH + 30} fontSize={
|
|
884
|
+
<text data-cdl-counter-scaled="1" x={x + 16} y={y + artH + 30} fontSize={NFT_ID_SIZE * 倍} fontWeight={700} fill="var(--cdl-text, #1a1f2a)" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace">
|
|
809
885
|
#1024
|
|
810
886
|
</text>
|
|
811
887
|
{/* verified check (右) */}
|
|
@@ -814,7 +890,8 @@ export function ShapeNftNode({ node, active }: ShapeProps): JSX.Element {
|
|
|
814
890
|
<path d="M -4 0 L -1 3 L 4 -3" fill="none" stroke="#ffffff" strokeWidth={2.5} strokeLinecap="round" strokeLinejoin="round" />
|
|
815
891
|
</g>
|
|
816
892
|
</g>
|
|
817
|
-
|
|
893
|
+
);
|
|
894
|
+
};
|
|
818
895
|
return (
|
|
819
896
|
<g>
|
|
820
897
|
{fitArt(r, nftExtent(frame.strokeWidth), art)}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { JSX } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
shapeRegion,
|
|
4
|
+
labelPlan,
|
|
5
|
+
fitArt,
|
|
6
|
+
textWidth,
|
|
7
|
+
打ち消しの倍率,
|
|
8
|
+
type 打ち消す字,
|
|
9
|
+
} from "./shape-region";
|
|
3
10
|
import { MONO_ADVANCE_RATIO, displayWidth } from "./row-align";
|
|
4
11
|
import type { LaidNode } from "../types";
|
|
5
12
|
import { 字引きを作る, type CdlLang } from "../lang";
|
|
@@ -304,7 +311,7 @@ export function ShapeWarehouseNode({ node, active, lang }: ShapeProps): JSX.Elem
|
|
|
304
311
|
<rect data-cdl-role="node-body" x={x} y={y + roofH} width={bw} height={bh - roofH - 12} fill="#a89d8f" stroke="#5a6270" strokeWidth={frame.strokeWidth} />
|
|
305
312
|
{/* WAREHOUSE 看板 (赤帯) */}
|
|
306
313
|
<rect x={x} y={y + roofH} width={bw} height={signH} fill="#c15a4a" stroke="#8b3f2f" strokeWidth={1.5} />
|
|
307
|
-
<text x={cx} y={y + roofH + 17} fontSize={12} fontWeight={900} letterSpacing={6} textAnchor="middle" fill="#ffffff">{字引("warehouse.sign")}</text>
|
|
314
|
+
<text data-cdl-counter-scaled="0" x={cx} y={y + roofH + 17} fontSize={12} fontWeight={900} letterSpacing={6} textAnchor="middle" fill="#ffffff">{字引("warehouse.sign")}</text>
|
|
308
315
|
{/* 中央大 shutter (rib 縞) */}
|
|
309
316
|
<rect x={shutterX} y={shutterY} width={shutterW} height={shutterH} fill="#8b949e" stroke={accentDarker} strokeWidth={2} />
|
|
310
317
|
{/* shutter 上部 shade (立体感) */}
|
|
@@ -501,6 +508,12 @@ const API_ROWS = 3;
|
|
|
501
508
|
/** 板の大きさ。 高さの下限は行が最小の間隔で 3 本入る高さ。 */
|
|
502
509
|
const API_H_MIN =
|
|
503
510
|
API_ROW_TOP + (API_ROWS - 1) * API_ROW_PITCH_MIN + API_ROW_H + API_ROW_BOTTOM_PAD;
|
|
511
|
+
/** 要求の道と天井看板の字の指定 (#887 で打ち消しの計算に使うため定数へ出した) */
|
|
512
|
+
const API_PATH_SIZE = 12;
|
|
513
|
+
const API_SIGN_SIZE = 14;
|
|
514
|
+
/** 種類の箱の幅と、その中で字が使える幅 (左右 3 ずつ空ける) */
|
|
515
|
+
const API_METHOD_BOX_W = 54;
|
|
516
|
+
const API_METHOD_TEXT_W = 48;
|
|
504
517
|
const API_W_MIN = 200;
|
|
505
518
|
const API_W_MAX = 300;
|
|
506
519
|
|
|
@@ -522,31 +535,48 @@ export function ShapeApiGatewayNode({ node, active, lang }: ShapeProps): JSX.Ele
|
|
|
522
535
|
// 11 のまま入り、長い綴り (日本語の辞書の `DELETE`) だけを縮める。 見積りは等幅と比例の大きい方
|
|
523
536
|
// (`shape-blockchain.tsx` の `字の幅` と同じ考え方で、どちらの書体で描かれても箱からはみ出さない)
|
|
524
537
|
const 種類の字 = (s: string): number =>
|
|
525
|
-
Math.min(11, (11 *
|
|
538
|
+
Math.min(11, (11 * API_METHOD_TEXT_W) / Math.max(displayWidth(s) * 11 * MONO_ADVANCE_RATIO, textWidth(s, 11)));
|
|
526
539
|
const rowPitch = Math.max(
|
|
527
540
|
API_ROW_PITCH_MIN,
|
|
528
541
|
(bh - API_ROW_TOP - API_ROW_H - API_ROW_BOTTOM_PAD) / (API_ROWS - 1),
|
|
529
542
|
);
|
|
530
|
-
const
|
|
543
|
+
const 行ら = [
|
|
544
|
+
{ method: "GET", path: 字引("apiGateway.users"), color: "#27c93f" },
|
|
545
|
+
{ method: "POST", path: 字引("apiGateway.orders"), color: "#e5c07b" },
|
|
546
|
+
{ method: 字引("apiGateway.delete"), path: 字引("apiGateway.session"), color: "#c9302c" },
|
|
547
|
+
];
|
|
548
|
+
/*
|
|
549
|
+
* 打ち消しの上限を出す帯 (#887)。 要求の道の字が使える幅は、行の箱 (bw - 32) から
|
|
550
|
+
* 種類の箱までの 64 と、右端で点滅する印の丸の 16 を除いた残り。
|
|
551
|
+
*
|
|
552
|
+
* **種類の字 (`GET` / `POST`) は打ち消さない**。 `種類の字` が箱の幅 48 に合わせて指定を
|
|
553
|
+
* 決めているので余白が 0 で、打ち消す余地が無い (長い綴りでは上限がちょうど 1.0 になる)。
|
|
554
|
+
* 打ち消しは絵ごとに 1 つの倍率で、最も狭い字が全体を縛る = これを入れると要求の道の字も
|
|
555
|
+
* 戻せなくなる。
|
|
556
|
+
*/
|
|
557
|
+
const 打ち消す字ら: 打ち消す字[] = 行ら.map((e) => ({
|
|
558
|
+
text: e.path,
|
|
559
|
+
size: API_PATH_SIZE,
|
|
560
|
+
帯: { 幅: bw - 32 - 64 - 16, 高さ: API_ROW_H },
|
|
561
|
+
}));
|
|
562
|
+
const 絵 = (倍率: number): JSX.Element => {
|
|
563
|
+
const 倍 = 打ち消しの倍率(倍率, 打ち消す字ら);
|
|
564
|
+
return (
|
|
531
565
|
<g>
|
|
532
566
|
<rect x={x + DROP_SHADOW_D} y={y + DROP_SHADOW_D} width={bw} height={bh} rx={10} fill={frame.stroke} opacity={0.2} stroke="none" />
|
|
533
567
|
<rect data-cdl-role="node-body" x={x} y={y} width={bw} height={bh} rx={10} fill="#1a2332" stroke={frame.stroke} strokeWidth={frame.strokeWidth} />
|
|
534
568
|
<rect x={x} y={y} width={bw} height={36} rx={10} fill="var(--cdl-tone-accent, #2d6a8f)" stroke="none" />
|
|
535
|
-
<text x={cx} y={y + 24} fontSize={
|
|
569
|
+
<text data-cdl-counter-scaled="0" x={cx} y={y + 24} fontSize={API_SIGN_SIZE} fontWeight={700} letterSpacing={3} textAnchor="middle" fill="#ffffff" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace">
|
|
536
570
|
{字引("apiGateway.sign")}
|
|
537
571
|
</text>
|
|
538
|
-
{
|
|
539
|
-
{ method: "GET", path: 字引("apiGateway.users"), color: "#27c93f" },
|
|
540
|
-
{ method: "POST", path: 字引("apiGateway.orders"), color: "#e5c07b" },
|
|
541
|
-
{ method: 字引("apiGateway.delete"), path: 字引("apiGateway.session"), color: "#c9302c" },
|
|
542
|
-
].map((e, i) => (
|
|
572
|
+
{行ら.map((e, i) => (
|
|
543
573
|
<g key={i} transform={`translate(${x + 16}, ${y + API_ROW_TOP + i * rowPitch})`}>
|
|
544
574
|
<rect x={0} y={0} width={bw - 32} height={API_ROW_H} rx={4} fill="#0f1419" stroke="none" />
|
|
545
|
-
<rect x={0} y={0} width={
|
|
546
|
-
<text x={27} y={16} fontSize={種類の字(e.method)} fontWeight={700} textAnchor="middle" fill="#ffffff" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace">
|
|
575
|
+
<rect x={0} y={0} width={API_METHOD_BOX_W} height={API_ROW_H} rx={4} fill={e.color} stroke="none" />
|
|
576
|
+
<text data-cdl-counter-scaled="0" x={27} y={16} fontSize={種類の字(e.method)} fontWeight={700} textAnchor="middle" fill="#ffffff" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace">
|
|
547
577
|
{e.method}
|
|
548
578
|
</text>
|
|
549
|
-
<text x={64} y={16} fontSize={
|
|
579
|
+
<text data-cdl-counter-scaled="1" x={64} y={16} fontSize={API_PATH_SIZE * 倍} fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fill="#e6edf3">
|
|
550
580
|
{e.path}
|
|
551
581
|
</text>
|
|
552
582
|
<circle cx={bw - 44} cy={12} r={4} fill="#27c93f" stroke="none">
|
|
@@ -555,7 +585,8 @@ export function ShapeApiGatewayNode({ node, active, lang }: ShapeProps): JSX.Ele
|
|
|
555
585
|
</g>
|
|
556
586
|
))}
|
|
557
587
|
</g>
|
|
558
|
-
|
|
588
|
+
);
|
|
589
|
+
};
|
|
559
590
|
return (
|
|
560
591
|
<g>
|
|
561
592
|
{fitArt(r, 広がり, 絵)}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { JSX } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
shapeRegion,
|
|
4
|
+
labelPlan,
|
|
5
|
+
fitArt,
|
|
6
|
+
打ち消しの倍率,
|
|
7
|
+
type 打ち消す字,
|
|
8
|
+
} from "./shape-region";
|
|
3
9
|
import type { LaidNode } from "../types";
|
|
4
10
|
import { 字引きを作る, type CdlLang } from "../lang";
|
|
5
11
|
|
|
@@ -193,7 +199,7 @@ export function ShapeBankNode({ node, active }: ShapeProps): JSX.Element {
|
|
|
193
199
|
})}
|
|
194
200
|
<path d={`M ${x - BANK_BODY_OUT} ${y + pedimentH} L ${r.cx} ${y - BANK_PEDIMENT_RISE} L ${x + bldW + BANK_BODY_OUT} ${y + pedimentH} Z`} fill="var(--cdl-node-fill, #ffffff)" stroke={frame.stroke} strokeWidth={frame.strokeWidth} strokeLinejoin="round" />
|
|
195
201
|
<circle cx={r.cx} cy={y + pedimentH / 2 + 4} r={14} fill="var(--cdl-tone-accent, #2d6a8f)" stroke={frame.stroke} strokeWidth={1.5} />
|
|
196
|
-
<text x={r.cx} y={y + pedimentH / 2 + 10} fontSize={18} fontWeight={700} textAnchor="middle" fill="#ffffff" fontFamily="Georgia, serif">
|
|
202
|
+
<text data-cdl-counter-scaled="0" x={r.cx} y={y + pedimentH / 2 + 10} fontSize={18} fontWeight={700} textAnchor="middle" fill="#ffffff" fontFamily="Georgia, serif">
|
|
197
203
|
$
|
|
198
204
|
</text>
|
|
199
205
|
<rect x={x - 4} y={y + pedimentH} width={bldW + 8} height={architraveH} fill="var(--cdl-divider, #d4d4d8)" fillOpacity={0.4} stroke={frame.stroke} strokeWidth={frame.strokeWidth} />
|
|
@@ -278,7 +284,7 @@ export function ShapeTrustBankNode({ node, active, lang }: ShapeProps): JSX.Elem
|
|
|
278
284
|
return <rect key={i} x={r.cx - w / 2} y={y + bldH + i * BANK_STEP_DY} width={w} height={BANK_STEP_H} fill="var(--cdl-divider, #d4d4d8)" fillOpacity={0.5 + i * 0.15} stroke={frame.stroke} strokeWidth={BANK_STEP_SW} />;
|
|
279
285
|
})}
|
|
280
286
|
<path d={`M ${x - 6} ${y + pedimentH} L ${r.cx} ${y + 2} L ${x + bldW + 6} ${y + pedimentH} Z`} fill="var(--cdl-node-fill, #ffffff)" stroke={frame.stroke} strokeWidth={frame.strokeWidth} strokeLinejoin="round" />
|
|
281
|
-
<text x={r.cx} y={y + pedimentH - 8} fontSize={15} fontWeight={700} letterSpacing={2} textAnchor="middle" fill="var(--cdl-tone-accent, #2d6a8f)" fontFamily="Georgia, serif">
|
|
287
|
+
<text data-cdl-counter-scaled="0" x={r.cx} y={y + pedimentH - 8} fontSize={15} fontWeight={700} letterSpacing={2} textAnchor="middle" fill="var(--cdl-tone-accent, #2d6a8f)" fontFamily="Georgia, serif">
|
|
282
288
|
{字引("trustBank.sign")}
|
|
283
289
|
</text>
|
|
284
290
|
<rect x={x - 4} y={y + pedimentH} width={bldW + 8} height={architraveH} fill="var(--cdl-divider, #d4d4d8)" fillOpacity={0.4} stroke={frame.stroke} strokeWidth={frame.strokeWidth} />
|
|
@@ -394,6 +400,11 @@ export function ShapeCreditCardNode({ node, active }: ShapeProps): JSX.Element {
|
|
|
394
400
|
*/
|
|
395
401
|
const BROKERAGE_TICK_H = 12;
|
|
396
402
|
const BROKERAGE_LOGO_H = 26;
|
|
403
|
+
/** 電光掲示板の内側の帯と、そこに流れる相場の字の指定。 */
|
|
404
|
+
const BROKERAGE_TICK_INNER_H = 8;
|
|
405
|
+
const BROKERAGE_TICKER_SIZE = 5.5;
|
|
406
|
+
/** ロゴ帯の看板の字の指定。 */
|
|
407
|
+
const BROKERAGE_SIGN_SIZE = 12;
|
|
397
408
|
/** 窓の格子。 上端はロゴ帯の下、 下端は基壇の上。 */
|
|
398
409
|
const BROKERAGE_GRID_TOP = 62;
|
|
399
410
|
const BROKERAGE_CELL_W = 14;
|
|
@@ -454,7 +465,22 @@ export function ShapeBrokerageNode({ node, active, lang }: ShapeProps): JSX.Elem
|
|
|
454
465
|
);
|
|
455
466
|
const gridStartX = x + (w - (cols * cellW + (cols - 1) * gapX)) / 2;
|
|
456
467
|
const goldCells = new Set([`0,1`, `0,4`, `1,2`, `2,3`, `3,5`]); // ランダム点灯 window
|
|
457
|
-
|
|
468
|
+
/*
|
|
469
|
+
* 打ち消しの上限を出す帯 (#887)。 相場の字は電光掲示板の内側 (幅 w - 4、高さ 8) に入る。
|
|
470
|
+
*
|
|
471
|
+
* **看板 `$ SECURITIES` は打ち消さない**。 字間 2.5 を持ち幅が字数に比例するため、言語で
|
|
472
|
+
* 字数が変われば帯を超える (#886 の記号と同じ扱い)。
|
|
473
|
+
*/
|
|
474
|
+
const 打ち消す字ら: 打ち消す字[] = [
|
|
475
|
+
{
|
|
476
|
+
text: 字引("brokerage.ticker"),
|
|
477
|
+
size: BROKERAGE_TICKER_SIZE,
|
|
478
|
+
帯: { 幅: w - 4, 高さ: BROKERAGE_TICK_INNER_H },
|
|
479
|
+
},
|
|
480
|
+
];
|
|
481
|
+
const 絵 = (倍率: number): JSX.Element => {
|
|
482
|
+
const 倍 = 打ち消しの倍率(倍率, 打ち消す字ら);
|
|
483
|
+
return (
|
|
458
484
|
<g>
|
|
459
485
|
{/* drop shadow */}
|
|
460
486
|
<ellipse cx={cx} cy={y + h + BROKERAGE_SHADOW_DY} rx={w * BROKERAGE_SHADOW_RX_RATIO} ry={BROKERAGE_SHADOW_RY} fill={frame.stroke} opacity={0.2} stroke="none" />
|
|
@@ -465,12 +491,12 @@ export function ShapeBrokerageNode({ node, active, lang }: ShapeProps): JSX.Elem
|
|
|
465
491
|
{/* 上部電光掲示板 tick */}
|
|
466
492
|
<rect x={x} y={y} width={w} height={BROKERAGE_TICK_H} fill="#0f1830" stroke="none" />
|
|
467
493
|
<rect x={x + 2} y={y + 2} width={w - 4} height={8} fill="#1a2340" stroke="none" />
|
|
468
|
-
<text x={cx} y={y + 9} fontSize={
|
|
494
|
+
<text data-cdl-counter-scaled="1" x={cx} y={y + 9} fontSize={BROKERAGE_TICKER_SIZE * 倍} fontWeight={700} textAnchor="middle" fill="#4ea36a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace">
|
|
469
495
|
{字引("brokerage.ticker")}
|
|
470
496
|
</text>
|
|
471
497
|
{/* $ SECURITIES ロゴ帯 */}
|
|
472
498
|
<rect x={x} y={y + BROKERAGE_TICK_H} width={w} height={BROKERAGE_LOGO_H} fill="#e5c07b" stroke="none" />
|
|
473
|
-
<text x={cx} y={y + 30} fontSize={
|
|
499
|
+
<text data-cdl-counter-scaled="0" x={cx} y={y + 30} fontSize={BROKERAGE_SIGN_SIZE} fontWeight={700} letterSpacing={2.5} textAnchor="middle" fill="#0f1830">
|
|
474
500
|
{字引("brokerage.sign")}
|
|
475
501
|
</text>
|
|
476
502
|
{/* window grid (段数は高さ次第、 列は 6 固定) */}
|
|
@@ -492,7 +518,8 @@ export function ShapeBrokerageNode({ node, active, lang }: ShapeProps): JSX.Elem
|
|
|
492
518
|
{/* 底部床 (ATM のように狭め) */}
|
|
493
519
|
<rect x={x - BROKERAGE_FLOOR_OUT} y={y + h + BROKERAGE_FLOOR_DY} width={w + BROKERAGE_FLOOR_OUT * 2} height={BROKERAGE_FLOOR_H} fill="#5a6270" stroke="none" />
|
|
494
520
|
</g>
|
|
495
|
-
|
|
521
|
+
);
|
|
522
|
+
};
|
|
496
523
|
return (
|
|
497
524
|
<g>
|
|
498
525
|
{fitArt(r, 広がり, 絵)}
|
|
@@ -502,6 +529,9 @@ export function ShapeBrokerageNode({ node, active, lang }: ShapeProps): JSX.Elem
|
|
|
502
529
|
}
|
|
503
530
|
|
|
504
531
|
/** shape-exchange = E2-A 中央 clearing house (hexagon EXCHANGE + 放射 8 node + 双方向 tx dots) */
|
|
532
|
+
/** 六角形の下に置く清算の字の指定。 */
|
|
533
|
+
const EXCHANGE_SUB_SIZE = 8;
|
|
534
|
+
|
|
505
535
|
export function ShapeExchangeNode({ node, active, lang }: ShapeProps): JSX.Element {
|
|
506
536
|
const 字引 = 字引きを作る(lang);
|
|
507
537
|
const frame = commonFrame(active);
|
|
@@ -540,7 +570,7 @@ export function ShapeExchangeNode({ node, active, lang }: ShapeProps): JSX.Eleme
|
|
|
540
570
|
*/
|
|
541
571
|
const 節点 = Math.max(0, nodeR) + 8 + 1.5 / 2;
|
|
542
572
|
const 六角 = hexR + frame.strokeWidth / 2;
|
|
543
|
-
const 字下 = 26 +
|
|
573
|
+
const 字下 = 26 + EXCHANGE_SUB_SIZE * 0.25;
|
|
544
574
|
const 外 = Math.max(節点, 六角);
|
|
545
575
|
const ずれ = cy - r.cy;
|
|
546
576
|
const 広がり = {
|
|
@@ -549,7 +579,19 @@ export function ShapeExchangeNode({ node, active, lang }: ShapeProps): JSX.Eleme
|
|
|
549
579
|
左: 外,
|
|
550
580
|
右: 外,
|
|
551
581
|
};
|
|
552
|
-
|
|
582
|
+
/*
|
|
583
|
+
* 打ち消しの上限を出す帯 (#887)。 清算の字は六角形の下の空いた所に置くので、幅は絵の横幅を
|
|
584
|
+
* そのまま使える。 高さは字の下の余り (`字下`) に合わせて 14 を採る。
|
|
585
|
+
*
|
|
586
|
+
* **看板 `EXCHANGE` と記号 `⇄` は打ち消さない**。 前者は字間 2 を持ち幅が字数に比例し、
|
|
587
|
+
* 後者は六角形の中に余白を持たない。
|
|
588
|
+
*/
|
|
589
|
+
const 打ち消す字ら: 打ち消す字[] = [
|
|
590
|
+
{ text: 字引("exchange.sub"), size: EXCHANGE_SUB_SIZE, 帯: { 幅: 外 * 2, 高さ: 14 } },
|
|
591
|
+
];
|
|
592
|
+
const 絵 = (倍率: number): JSX.Element => {
|
|
593
|
+
const 倍 = 打ち消しの倍率(倍率, 打ち消す字ら);
|
|
594
|
+
return (
|
|
553
595
|
<g>
|
|
554
596
|
{/* 8 dashed radial lines */}
|
|
555
597
|
{nodes.map((n, i) => (
|
|
@@ -567,17 +609,18 @@ export function ShapeExchangeNode({ node, active, lang }: ShapeProps): JSX.Eleme
|
|
|
567
609
|
})}
|
|
568
610
|
{/* 中央 hexagon EXCHANGE (単色 #255a7a、 縦向き正六角形) */}
|
|
569
611
|
<path d={hexPath} fill="#255a7a" stroke={accentDarker} strokeWidth={frame.strokeWidth} strokeLinejoin="round" />
|
|
570
|
-
<text x={cx} y={cy - 8} fontSize={10} fontWeight={700} letterSpacing={2} textAnchor="middle" fill="#e5c07b">{字引("exchange.sign")}</text>
|
|
612
|
+
<text data-cdl-counter-scaled="0" x={cx} y={cy - 8} fontSize={10} fontWeight={700} letterSpacing={2} textAnchor="middle" fill="#e5c07b">{字引("exchange.sign")}</text>
|
|
571
613
|
{/* swap 記号 */}
|
|
572
|
-
<text data-cdl-role="node-body" x={cx} y={cy + 12} fontSize={22} fontWeight={700} textAnchor="middle" fill="#e5c07b">⇄</text>
|
|
614
|
+
<text data-cdl-counter-scaled="0" data-cdl-role="node-body" x={cx} y={cy + 12} fontSize={22} fontWeight={700} textAnchor="middle" fill="#e5c07b">⇄</text>
|
|
573
615
|
{/* clearing label */}
|
|
574
|
-
<text x={cx} y={cy + 26} fontSize={
|
|
616
|
+
<text data-cdl-counter-scaled="1" x={cx} y={cy + 26} fontSize={EXCHANGE_SUB_SIZE * 倍} fontWeight={700} textAnchor="middle" fill="#a4b5f2">{字引("exchange.sub")}</text>
|
|
575
617
|
{/* 8 外周 node (buyer/seller) */}
|
|
576
618
|
{nodes.map((n, i) => (
|
|
577
619
|
<circle key={`n${i}`} cx={n.cx} cy={n.cy} r={8} fill={n.fill} stroke={accentDarker} strokeWidth={1.5} />
|
|
578
620
|
))}
|
|
579
621
|
</g>
|
|
580
|
-
|
|
622
|
+
);
|
|
623
|
+
};
|
|
581
624
|
return (
|
|
582
625
|
<g>
|
|
583
626
|
{fitArt(r, 広がり, 絵)}
|
|
@@ -654,21 +697,32 @@ export function ShapeAtmNode({ node, active, lang }: ShapeProps): JSX.Element {
|
|
|
654
697
|
// 画面と 10 キーが潰れて読めなくなる
|
|
655
698
|
const 面 = Math.min(1, atmW / ATM_PANEL_W, atmH / ATM_PANEL_H);
|
|
656
699
|
const 面左 = -ATM_PANEL_W / 2;
|
|
700
|
+
/*
|
|
701
|
+
* **操作面の字は打ち消さない** (#887)。 画面は高さ 52 に 3 行 (指定 10 / 8 / 10) を詰めており、
|
|
702
|
+
* 行の間隔が 12 から 14 しか無い = 指定 10 の字に対して行の間隔の 8 割を割る
|
|
703
|
+
* (12 * 0.8 / 10 = 0.96)。 打ち消すと上下の行か画面の枠に触れる。
|
|
704
|
+
*
|
|
705
|
+
* 1 行だけ除いて残りを戻す形も採らない = 画面の 3 行は 1 つのまとまりなので、`¥ 20,000` だけ
|
|
706
|
+
* 戻さないと金額が見出しより小さくなる。 鍵盤の数字 (18x10 の鍵に入る絵) と天井看板
|
|
707
|
+
* (字間 2 を持ち幅が字数に比例する) も据え置く。
|
|
708
|
+
*
|
|
709
|
+
* 縮む前から画面の字が読める大きさに届かないこと自体は別の課題 (cardene777/cdl#888)。
|
|
710
|
+
*/
|
|
657
711
|
const 絵 = (
|
|
658
712
|
<g>
|
|
659
713
|
{/* drop shadow */}
|
|
660
714
|
<ellipse cx={cx} cy={y + totalH + ATM_SHADOW_DY} rx={totalW * ATM_SHADOW_RX_RATIO} ry={ATM_SHADOW_RY} fill={frame.stroke} opacity={0.15} stroke="none" />
|
|
661
715
|
{/* 天井 ATM CORNER 看板 */}
|
|
662
716
|
<rect x={centerX - totalW / 2} y={signY} width={totalW} height={signH} fill={accentDarker} stroke="#000" strokeWidth={ATM_SIGN_SW} />
|
|
663
|
-
<text x={centerX} y={signY + 17} fontSize={11} fontWeight={700} letterSpacing={2} textAnchor="middle" fill="#e5c07b">{字引("atm.sign")}</text>
|
|
717
|
+
<text data-cdl-counter-scaled="0" x={centerX} y={signY + 17} fontSize={11} fontWeight={700} letterSpacing={2} textAnchor="middle" fill="#e5c07b">{字引("atm.sign")}</text>
|
|
664
718
|
{/* ATM body */}
|
|
665
719
|
<rect data-cdl-role="node-body" x={atmX} y={atmY} width={atmW} height={atmH} rx={6} fill="#255a7a" stroke={accentDarker} strokeWidth={frame.strokeWidth} />
|
|
666
720
|
<g transform={`translate(${centerX} ${atmY}) scale(${面})`}>
|
|
667
721
|
{/* screen */}
|
|
668
722
|
<rect x={面左 + 8} y={10} width={ATM_PANEL_W - 16} height={52} rx={3} fill="#0f1830" stroke="#000" strokeWidth={1.5} />
|
|
669
|
-
<text x={0} y={30} fontSize={10} fontWeight={700} letterSpacing={1} textAnchor="middle" fill="#e5c07b">お引出し</text>
|
|
670
|
-
<text x={0} y={44} fontSize={8} fontWeight={700} textAnchor="middle" fill="#a4b5f2">{字引("atm.screen")}</text>
|
|
671
|
-
<text x={0} y={56} fontSize={10} fontWeight={700} textAnchor="middle" fill="#4ea36a">¥ 20,000</text>
|
|
723
|
+
<text data-cdl-counter-scaled="0" x={0} y={30} fontSize={10} fontWeight={700} letterSpacing={1} textAnchor="middle" fill="#e5c07b">お引出し</text>
|
|
724
|
+
<text data-cdl-counter-scaled="0" x={0} y={44} fontSize={8} fontWeight={700} textAnchor="middle" fill="#a4b5f2">{字引("atm.screen")}</text>
|
|
725
|
+
<text data-cdl-counter-scaled="0" x={0} y={56} fontSize={10} fontWeight={700} textAnchor="middle" fill="#4ea36a">¥ 20,000</text>
|
|
672
726
|
{/* keypad 5x2 */}
|
|
673
727
|
<rect x={面左 + 8} y={68} width={ATM_PANEL_W - 16} height={42} rx={2} fill="#8b949e" stroke="#5a6270" strokeWidth={1} />
|
|
674
728
|
{(() => {
|
|
@@ -688,7 +742,7 @@ export function ShapeAtmNode({ node, active, lang }: ShapeProps): JSX.Element {
|
|
|
688
742
|
return (
|
|
689
743
|
<g key={`k${i}`}>
|
|
690
744
|
<rect x={kx} y={ky} width={keyW} height={keyH} fill={k[1]} stroke="#0f1830" strokeWidth={0.8} />
|
|
691
|
-
<text x={kx + keyW / 2} y={ky + 7} fontSize={/* 決める鍵 (末尾) は 2 字あるので小さく描く。 字は言語で変わるため位置で見分ける */ i === keys.length - 1 ? 6 : 7} fontWeight={700} textAnchor="middle" fill="#ffffff">{k[0]}</text>
|
|
745
|
+
<text data-cdl-counter-scaled="0" x={kx + keyW / 2} y={ky + 7} fontSize={/* 決める鍵 (末尾) は 2 字あるので小さく描く。 字は言語で変わるため位置で見分ける */ i === keys.length - 1 ? 6 : 7} fontWeight={700} textAnchor="middle" fill="#ffffff">{k[0]}</text>
|
|
692
746
|
</g>
|
|
693
747
|
);
|
|
694
748
|
});
|
|
@@ -696,7 +750,7 @@ export function ShapeAtmNode({ node, active, lang }: ShapeProps): JSX.Element {
|
|
|
696
750
|
{/* card slot */}
|
|
697
751
|
<rect x={面左 + 12} y={116} width={ATM_PANEL_W - 24} height={8} rx={1.5} fill="#0f1830" stroke={accentDarker} strokeWidth={1} />
|
|
698
752
|
<rect x={面左 + 15} y={118} width={ATM_PANEL_W - 30} height={4} rx={0.5} fill="#e5c07b" />
|
|
699
|
-
<text x={0} y={132} fontSize={6} fontWeight={700} letterSpacing={1} textAnchor="middle" fill="#e5c07b">{字引("atm.cardSlot")}</text>
|
|
753
|
+
<text data-cdl-counter-scaled="0" x={0} y={132} fontSize={6} fontWeight={700} letterSpacing={1} textAnchor="middle" fill="#e5c07b">{字引("atm.cardSlot")}</text>
|
|
700
754
|
{/* cash slot */}
|
|
701
755
|
<rect x={面左 + 12} y={136} width={ATM_PANEL_W - 24} height={4} rx={1} fill="#0f1830" />
|
|
702
756
|
</g>
|
|
@@ -334,7 +334,7 @@ export function ShapeNotaryNode({ node, active }: ShapeProps): JSX.Element {
|
|
|
334
334
|
<line x1={chestX - 14} y1={chestY + 14} x2={chestX + 14} y2={chestY + 14} stroke="#8b949e" strokeWidth={1} />
|
|
335
335
|
<line x1={chestX - 14} y1={chestY + 22} x2={chestX + 8} y2={chestY + 22} stroke="#8b949e" strokeWidth={1} />
|
|
336
336
|
<line x1={chestX - 14} y1={chestY + 34} x2={chestX + 2} y2={chestY + 34} stroke="#0f3450" strokeWidth={1.5} />
|
|
337
|
-
<text x={chestX + 6} y={chestY + 37} fontSize={8} fill="#0f3450" fontFamily="cursive" fontStyle="italic">
|
|
337
|
+
<text data-cdl-counter-scaled="0" x={chestX + 6} y={chestY + 37} fontSize={8} fill="#0f3450" fontFamily="cursive" fontStyle="italic">
|
|
338
338
|
✓
|
|
339
339
|
</text>
|
|
340
340
|
{/* 右下 印章 badge */}
|
|
@@ -342,7 +342,7 @@ export function ShapeNotaryNode({ node, active }: ShapeProps): JSX.Element {
|
|
|
342
342
|
<g>
|
|
343
343
|
<circle cx={0} cy={0} r={12} fill="#c15a4a" stroke="none" />
|
|
344
344
|
<circle cx={0} cy={0} r={8} fill="none" stroke="#ffffff" strokeWidth={1.2} />
|
|
345
|
-
<text x={0} y={4} fontFamily="Georgia, serif" fontSize={10} fontWeight={700} fill="#ffffff" textAnchor="middle">
|
|
345
|
+
<text data-cdl-counter-scaled="0" x={0} y={4} fontFamily="Georgia, serif" fontSize={10} fontWeight={700} fill="#ffffff" textAnchor="middle">
|
|
346
346
|
印
|
|
347
347
|
</text>
|
|
348
348
|
</g>
|
|
@@ -420,7 +420,7 @@ export function ShapeCustomerServiceNode({ node, active }: ShapeProps): JSX.Elem
|
|
|
420
420
|
{collarV(cx, cy, p.strokeColor)}
|
|
421
421
|
{/* 体内 24H badge */}
|
|
422
422
|
<rect x={chestX - 22} y={chestY + 5} width={44} height={22} rx={11} fill="#e5c07b" stroke="#a67c00" strokeWidth={2} />
|
|
423
|
-
<text x={chestX} y={chestY + 20} fontSize={12} fontWeight={900} fill="#5a3a10" textAnchor="middle" letterSpacing={2}>
|
|
423
|
+
<text data-cdl-counter-scaled="0" x={chestX} y={chestY + 20} fontSize={12} fontWeight={900} fill="#5a3a10" textAnchor="middle" letterSpacing={2}>
|
|
424
424
|
24H
|
|
425
425
|
</text>
|
|
426
426
|
{/* 右下 headset badge */}
|