@cardenelabs/cdl 0.105.0 → 0.106.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 +24 -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/visual-validate.ts +9 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,28 @@ CDL (Chainome Diagram Language) の主要変更履歴。
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.106.0] - 2026-09-30
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **箱の題の幅を、字ごとの実幅で見積もるようにした** (#949)
|
|
13
|
+
|
|
14
|
+
軸 3 (`text-readability`) は字数に 1 字の幅を掛けて見積もっていた。
|
|
15
|
+
英数字は全角の半分ほどしか取らないため、英数字の題を持つ箱で過大に見積もる。
|
|
16
|
+
|
|
17
|
+
| 題 | 種別 | 字数の近似 | 字ごとの実幅 |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| `order_items` | `storage` (34) | 426px | 約 250px |
|
|
20
|
+
|
|
21
|
+
engine は字ごとの実幅を出す `measureTextWidth` を既に持ち、辺の名札の外枠で使っている。
|
|
22
|
+
軸 3 だけが字数の近似を使っていたので、同じものに揃えた。
|
|
23
|
+
|
|
24
|
+
0.105.0 (#946) で 1 字の幅を種別ごとの実寸にした結果、大きく描く種別
|
|
25
|
+
(`storage` 34 / `actor` 32 / `card` 24 / `function` 24) で英数字の題が新しく挙がっていた。
|
|
26
|
+
引く側 (見本帳) で 11 枚を実測している。 本版でその 11 枚が挙がらなくなる。
|
|
27
|
+
|
|
28
|
+
判定の向きは変えていない。 全角の題が箱に収まらない場合は従来どおり挙がる。
|
|
29
|
+
|
|
8
30
|
## [0.105.0] - 2026-09-30
|
|
9
31
|
|
|
10
32
|
### Fixed
|
|
@@ -4263,7 +4285,8 @@ Initial OSS release.
|
|
|
4263
4285
|
使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
|
|
4264
4286
|
行き止まりになる。
|
|
4265
4287
|
|
|
4266
|
-
[Unreleased]: https://github.com/cardene777/cdl/compare/v0.
|
|
4288
|
+
[Unreleased]: https://github.com/cardene777/cdl/compare/v0.106.0...HEAD
|
|
4289
|
+
[0.106.0]: https://github.com/cardene777/cdl/compare/v0.105.0...v0.106.0
|
|
4267
4290
|
[0.105.0]: https://github.com/cardene777/cdl/compare/v0.104.0...v0.105.0
|
|
4268
4291
|
[0.104.0]: https://github.com/cardene777/cdl/compare/v0.103.0...v0.104.0
|
|
4269
4292
|
[0.103.0]: https://github.com/cardene777/cdl/compare/v0.102.0...v0.103.0
|
package/dist/index.cjs
CHANGED
|
@@ -17225,12 +17225,12 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5
|
|
|
17225
17225
|
if (!isRenderedNode(n)) continue;
|
|
17226
17226
|
const titleTrimmed = n.title?.trim() ?? "";
|
|
17227
17227
|
if (!titleTrimmed) continue;
|
|
17228
|
-
const
|
|
17229
|
-
const expectedW = titleLen * titleFontSize(n.kind) + (drawsTitleOutsideBox(n.kind) ? 0 : TITLE_BOX_PADDING);
|
|
17228
|
+
const expectedW = measureTextWidth(titleTrimmed, { fontSize: titleFontSize(n.kind) }) + (drawsTitleOutsideBox(n.kind) ? 0 : TITLE_BOX_PADDING);
|
|
17230
17229
|
if (expectedW > n.w + 8) {
|
|
17231
17230
|
push(
|
|
17232
17231
|
"text-readability",
|
|
17233
|
-
|
|
17232
|
+
// 字ごとの実幅は小数になるので、読む人に出す時だけ丸める (判定は丸めない)
|
|
17233
|
+
`node "${n.id}" title "${n.title}" \u304C node \u5E45 ${n.w}px \u3092\u8D85\u904E\u3059\u308B\u53EF\u80FD\u6027 (\u671F\u5F85 ${Math.round(expectedW)}px)`,
|
|
17234
17234
|
"warn"
|
|
17235
17235
|
);
|
|
17236
17236
|
}
|