@cardenelabs/cdl 0.63.0 → 0.64.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 +21 -1
- package/dist/index.cjs +8 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -11
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +8 -11
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +8 -11
- package/dist/react.js.map +1 -1
- package/dist/{render-Dk8_6ua6.d.cts → render-DfXCs3Eh.d.cts} +4 -1
- package/dist/{render-Dk8_6ua6.d.ts → render-DfXCs3Eh.d.ts} +4 -1
- package/package.json +12 -9
- package/src/render/interactive-panel.tsx +14 -10
- package/src/types.ts +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,25 @@ CDL (Chainome Diagram Language) の主要変更履歴。
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.64.0] - 2026-09-14
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **札に書いた色の出どころ (`colorSource`) の状態で札の色を引くようにした** (#861)
|
|
13
|
+
|
|
14
|
+
札 (`badge`) の型は `colorSource` を持ち「別 signal で色を切替可能」 と書いていたが、札を描く部品は 1 度も
|
|
15
|
+
読まず、色は札の字 (`source` の値) でしか引いていなかった。 `colorSource` を書くと、その状態の値で `map` を
|
|
16
|
+
引いた色で塗る。 札の字は今どおり `source` の値を描く。
|
|
17
|
+
|
|
18
|
+
| 書き方 | 色を引く鍵 |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `colorSource` を書かない | `source` の値 (変更前と同じ) |
|
|
21
|
+
| `colorSource` を書き、その状態がある | `colorSource` の状態の値 |
|
|
22
|
+
| `colorSource` を書き、その状態が無い | 引かない (色を付けない)。 `source` の値に戻すと書き間違いが効いているように見える |
|
|
23
|
+
|
|
24
|
+
読み出しの型 (`CdlReadout`) の 107 種の欄を、描く部品 (`ReadoutWidget`) が読むかを構文木で突き合わせる
|
|
25
|
+
検査を足した。 読まない欄は `colorSource` の 1 つだけだった。
|
|
26
|
+
|
|
8
27
|
## [0.63.0] - 2026-09-13
|
|
9
28
|
|
|
10
29
|
### Changed
|
|
@@ -2678,7 +2697,8 @@ Initial OSS release.
|
|
|
2678
2697
|
使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
|
|
2679
2698
|
行き止まりになる。
|
|
2680
2699
|
|
|
2681
|
-
[Unreleased]: https://github.com/cardene777/cdl/compare/v0.
|
|
2700
|
+
[Unreleased]: https://github.com/cardene777/cdl/compare/v0.64.0...HEAD
|
|
2701
|
+
[0.64.0]: https://github.com/cardene777/cdl/compare/v0.63.0...v0.64.0
|
|
2682
2702
|
[0.63.0]: https://github.com/cardene777/cdl/compare/v0.62.0...v0.63.0
|
|
2683
2703
|
[0.62.0]: https://github.com/cardene777/cdl/compare/v0.61.0...v0.62.0
|
|
2684
2704
|
[0.61.0]: https://github.com/cardene777/cdl/compare/v0.60.0...v0.61.0
|
package/dist/index.cjs
CHANGED
|
@@ -2697,16 +2697,12 @@ function ReadoutWidget({
|
|
|
2697
2697
|
colors: readout.colors ?? ["#e0e6ef", "#2d6a8f"]
|
|
2698
2698
|
}
|
|
2699
2699
|
);
|
|
2700
|
-
case "badge":
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
value: typeof rawValue === "string" ? rawValue : String(rawValue ?? ""),
|
|
2707
|
-
map: readout.map
|
|
2708
|
-
}
|
|
2709
|
-
);
|
|
2700
|
+
case "badge": {
|
|
2701
|
+
const value = typeof rawValue === "string" ? rawValue : String(rawValue ?? "");
|
|
2702
|
+
const colorRaw = readout.colorSource === void 0 ? void 0 : stateOverrides[readout.colorSource];
|
|
2703
|
+
const colorKey = readout.colorSource === void 0 ? value : colorRaw === void 0 ? void 0 : String(colorRaw);
|
|
2704
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BadgeReadout, { id: readout.id, label, value, colorKey, map: readout.map });
|
|
2705
|
+
}
|
|
2710
2706
|
case "status-dot":
|
|
2711
2707
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2712
2708
|
StatusDotReadout,
|
|
@@ -4428,9 +4424,10 @@ function BadgeReadout({
|
|
|
4428
4424
|
id,
|
|
4429
4425
|
label,
|
|
4430
4426
|
value,
|
|
4427
|
+
colorKey,
|
|
4431
4428
|
map
|
|
4432
4429
|
}) {
|
|
4433
|
-
const entry = map?.find((m) => m.value ===
|
|
4430
|
+
const entry = colorKey === void 0 ? void 0 : map?.find((m) => m.value === colorKey);
|
|
4434
4431
|
const color = entry?.color;
|
|
4435
4432
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cdl-ip-item cdl-ip-readout-badge", "data-cdl-readout": id, children: [
|
|
4436
4433
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "cdl-ip-label", children: label }),
|