@cardenelabs/cdl 0.77.0 → 0.78.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 +26 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +3 -3
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +3 -3
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/src/kinds/shape-blockchain.tsx +13 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cardenelabs/cdl",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.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",
|
|
@@ -306,15 +306,25 @@ const 字の幅 = (text: string, size: number): number => 絵の中の字の幅(
|
|
|
306
306
|
* `data-cdl-role` の目印に使う識別子で、言語で変えると差し込みと目印が壊れる。 描く字は
|
|
307
307
|
* 辞書 (`src/lang.ts`) から引く。 16 進の値と数は言語に依らないのでここに残す。
|
|
308
308
|
*/
|
|
309
|
+
/**
|
|
310
|
+
* 5 行の既定値。
|
|
311
|
+
*
|
|
312
|
+
* **16 進の値の長さは打ち消しの上限から決める** (#885)。 行の値に使える幅は
|
|
313
|
+
* `240 - 28 - 名前の幅 - 8` で、名前も打ち消しで一緒に伸びる。 上限いっぱい (1.6 倍) まで
|
|
314
|
+
* 打ち消すと、いちばん長い名前 (`merkle`) の行に残るのは 118.6 しかない。
|
|
315
|
+
*
|
|
316
|
+
* #871 で打ち消しを入れるまでは 12 字 (`0xc1892f4a...`) が入っていたが、字が 1.6 倍に
|
|
317
|
+
* なった分だけ入る字数が減り、`0xc1892f…` に切れていた。 9 字なら 110.4 で収まる。
|
|
318
|
+
*/
|
|
309
319
|
const BLOCK_DEFAULT_FIELDS: readonly {
|
|
310
320
|
key: string;
|
|
311
321
|
label: CdlTextKey;
|
|
312
322
|
/** 言語に依らない既定値 (16 進の値と数) と、辞書から引く既定値 (単位を持つ値) のどちらか */
|
|
313
323
|
value: { text: string } | { 辞書: CdlTextKey };
|
|
314
324
|
}[] = [
|
|
315
|
-
{ key: "hash", label: "blockchainBlock.hash", value: { text: "
|
|
316
|
-
{ key: "prev", label: "blockchainBlock.prev", value: { text: "
|
|
317
|
-
{ key: "merkle", label: "blockchainBlock.merkle", value: { text: "
|
|
325
|
+
{ key: "hash", label: "blockchainBlock.hash", value: { text: "0xaf31..." } },
|
|
326
|
+
{ key: "prev", label: "blockchainBlock.prev", value: { text: "0x7b3f..." } },
|
|
327
|
+
{ key: "merkle", label: "blockchainBlock.merkle", value: { text: "0xc189..." } },
|
|
318
328
|
{ key: "nonce", label: "blockchainBlock.nonce", value: { text: "82,914" } },
|
|
319
329
|
{ key: "tx", label: "blockchainBlock.tx", value: { 辞書: "blockchainBlock.txCount" } },
|
|
320
330
|
];
|