@cardenelabs/cdl 0.12.1 → 0.13.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 +17 -1
- package/dist/index.cjs +13 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +12 -3
- 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 +12 -3
- package/dist/react.js.map +1 -1
- package/dist/{render-C7FKvMqq.d.cts → render-B5JHcUrb.d.cts} +8 -0
- package/dist/{render-C7FKvMqq.d.ts → render-B5JHcUrb.d.ts} +8 -0
- package/package.json +1 -1
- package/src/kinds/mind-map.tsx +4 -2
- package/src/presets.ts +3 -0
- package/src/render/payload-binding.ts +14 -4
- package/src/render/template-fields.ts +1 -0
- package/src/types.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ CDL (Chainome Diagram Language) の主要変更履歴。
|
|
|
7
7
|
|
|
8
8
|
予定 ... feedback を反映した patch / minor。
|
|
9
9
|
|
|
10
|
+
## [0.13.0] - 2026-08-22
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **放射図の中心にも補足を渡せるようにした** (#530)
|
|
15
|
+
|
|
16
|
+
枝 (`MindBranchNode`) は元から `subtitle` を持つのに、中心だけ渡す口が無かった。 呼出側が
|
|
17
|
+
名前と補足を連結して `rootTitle` に入れるため 1 行に全部入り、箱幅 120px に対して 163px の
|
|
18
|
+
文字が切られていた。
|
|
19
|
+
|
|
20
|
+
`MindBranchPayload` に `rootSubtitle` を足し、枝と同じ経路で 2 行に積む。 分けて渡せば
|
|
21
|
+
1 行あたりが短くなり (`図を速くする` 90px / `300 ms 短縮` 60px)、同じ箱幅でも収まる。
|
|
22
|
+
|
|
23
|
+
**箱の大きさは変えない**。 配置の計算が箱幅から出ているため。
|
|
24
|
+
|
|
10
25
|
## [0.12.1] - 2026-08-22
|
|
11
26
|
|
|
12
27
|
### Fixed
|
|
@@ -516,7 +531,8 @@ Initial OSS release.
|
|
|
516
531
|
使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
|
|
517
532
|
行き止まりになる。
|
|
518
533
|
|
|
519
|
-
[Unreleased]: https://github.com/cardene777/cdl/compare/v0.
|
|
534
|
+
[Unreleased]: https://github.com/cardene777/cdl/compare/v0.13.0...HEAD
|
|
535
|
+
[0.13.0]: https://github.com/cardene777/cdl/compare/v0.12.1...v0.13.0
|
|
520
536
|
[0.12.1]: https://github.com/cardene777/cdl/compare/v0.12.0...v0.12.1
|
|
521
537
|
[0.12.0]: https://github.com/cardene777/cdl/compare/v0.11.0...v0.12.0
|
|
522
538
|
[0.11.0]: https://github.com/cardene777/cdl/compare/v0.10.0...v0.11.0
|
package/dist/index.cjs
CHANGED
|
@@ -15837,6 +15837,7 @@ function payloadTexts(node) {
|
|
|
15837
15837
|
}
|
|
15838
15838
|
if (node.mindData) {
|
|
15839
15839
|
\u8DB3\u3059(node.mindData.rootTitle);
|
|
15840
|
+
\u8DB3\u3059(node.mindData.rootSubtitle);
|
|
15840
15841
|
for (const b of node.mindData.branches) {
|
|
15841
15842
|
\u8DB3\u3059(b.title);
|
|
15842
15843
|
\u8DB3\u3059(b.subtitle);
|
|
@@ -21275,9 +21276,10 @@ function resolveTreeData(nodes, values) {
|
|
|
21275
21276
|
});
|
|
21276
21277
|
}
|
|
21277
21278
|
function resolveMindData(data, values) {
|
|
21278
|
-
const \u8AAD\u3080 = data.rootTitle.includes("{") || data.branches.some((b) => b.title.includes("{") || (b.subtitle?.includes("{") ?? false));
|
|
21279
|
+
const \u8AAD\u3080 = data.rootTitle.includes("{") || (data.rootSubtitle?.includes("{") ?? false) || data.branches.some((b) => b.title.includes("{") || (b.subtitle?.includes("{") ?? false));
|
|
21279
21280
|
if (!\u8AAD\u3080) return data;
|
|
21280
21281
|
const root = resolveBoundText(data.rootTitle, values);
|
|
21282
|
+
const rootSubtitle = data.rootSubtitle === void 0 ? void 0 : resolveBoundText(data.rootSubtitle, values);
|
|
21281
21283
|
const branches = data.branches.map((b) => {
|
|
21282
21284
|
const title = resolveBoundText(b.title, values);
|
|
21283
21285
|
const subtitle = b.subtitle === void 0 ? void 0 : resolveBoundText(b.subtitle, values);
|
|
@@ -21288,8 +21290,13 @@ function resolveMindData(data, values) {
|
|
|
21288
21290
|
};
|
|
21289
21291
|
return title.ok && (subtitle?.ok ?? true) ? \u89E3\u6C7A\u5F8C2 : { ...\u89E3\u6C7A\u5F8C2, unresolved: true };
|
|
21290
21292
|
});
|
|
21291
|
-
const \u89E3\u6C7A\u5F8C = {
|
|
21292
|
-
|
|
21293
|
+
const \u89E3\u6C7A\u5F8C = {
|
|
21294
|
+
...data,
|
|
21295
|
+
rootTitle: root.value,
|
|
21296
|
+
...rootSubtitle ? { rootSubtitle: rootSubtitle.value } : {},
|
|
21297
|
+
branches
|
|
21298
|
+
};
|
|
21299
|
+
return root.ok && (rootSubtitle?.ok ?? true) ? \u89E3\u6C7A\u5F8C : { ...\u89E3\u6C7A\u5F8C, unresolved: true };
|
|
21293
21300
|
}
|
|
21294
21301
|
|
|
21295
21302
|
// src/kinds/draw-progress.ts
|
|
@@ -22163,6 +22170,8 @@ function computeMindMapLayout(mindData, cx, cy, canvasW, canvasH) {
|
|
|
22163
22170
|
nodes.push({
|
|
22164
22171
|
id: mindData.rootId,
|
|
22165
22172
|
title: mindData.rootTitle,
|
|
22173
|
+
// 中心も枝と同じく 2 行に積める (#530)。 高さ 52 に 15px + 9px の 2 行が入る
|
|
22174
|
+
...mindData.rootSubtitle === void 0 ? {} : { subtitle: mindData.rootSubtitle },
|
|
22166
22175
|
x: cx,
|
|
22167
22176
|
y: cy,
|
|
22168
22177
|
w: rootW,
|
|
@@ -28403,6 +28412,7 @@ function mindMap(preset) {
|
|
|
28403
28412
|
mindData: {
|
|
28404
28413
|
rootId: preset.rootId,
|
|
28405
28414
|
rootTitle: preset.rootTitle,
|
|
28415
|
+
...preset.rootSubtitle === void 0 ? {} : { rootSubtitle: preset.rootSubtitle },
|
|
28406
28416
|
branches: branches.map((br) => ({
|
|
28407
28417
|
id: br.id,
|
|
28408
28418
|
title: br.title,
|