@cardenelabs/cdl 0.17.1 → 0.18.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 +29 -1
- package/dist/index.cjs +22 -3
- 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 +21 -4
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +19 -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 +19 -3
- package/dist/react.js.map +1 -1
- package/dist/{render-Dc5Pdf7e.d.cts → render-Czv0tUon.d.cts} +25 -1
- package/dist/{render-Dc5Pdf7e.d.ts → render-Czv0tUon.d.ts} +25 -1
- package/package.json +1 -1
- package/src/index.ts +3 -0
- package/src/layout.ts +2 -0
- package/src/render/stage.tsx +38 -4
- package/src/types.ts +27 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,33 @@ CDL (Chainome Diagram Language) の主要変更履歴。
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.18.0] - 2026-08-29
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **段が来るまで矢印を描かないようにした** (#582)
|
|
13
|
+
|
|
14
|
+
段を進めるごとに関係が 1 本ずつ増える図で、**全ての矢印が 1 段目から見えていた**。
|
|
15
|
+
段が矢印を光らせるとその線だけ引き直されるが、既に見えているので「増えた」 とは読めず、
|
|
16
|
+
無関係な線がちらついたようにしか見えない (user 実機確認)。
|
|
17
|
+
|
|
18
|
+
判定は **段が矢印を名指ししているか** で行う。 段のどこかで `activate` に載る矢印は、
|
|
19
|
+
その段が来るまで描かない。 1 度出たら以降は出したままにする = 消える向きの動きは、
|
|
20
|
+
読み手が「戻った」 と読む。
|
|
21
|
+
|
|
22
|
+
**段が矢印を 1 度も名指ししない図では隠さない**。 そういう図では矢印が骨格そのもので、
|
|
23
|
+
隠すと図が読めなくなる = 既定を変えても既存の図は動かない。
|
|
24
|
+
|
|
25
|
+
著者が切り替えられるよう `CdlDiagram.edgeReveal` を足した。
|
|
26
|
+
|
|
27
|
+
| 値 | 何が起きるか |
|
|
28
|
+
|---|---|
|
|
29
|
+
| `phase` (既定) | 段が名指しする矢印は、その段が来るまで描かない |
|
|
30
|
+
| `all` | 段に関わらず最初から全部描く |
|
|
31
|
+
|
|
32
|
+
書ける値の一覧 (`EDGE_REVEALS`) と既定 (`EDGE_REVEAL_DEFAULT`) を公開する。
|
|
33
|
+
利用側が手で並べると、値を足した時に書けないまま取り残される。
|
|
34
|
+
|
|
8
35
|
## [0.17.1] - 2026-08-29
|
|
9
36
|
|
|
10
37
|
### Changed
|
|
@@ -918,7 +945,8 @@ Initial OSS release.
|
|
|
918
945
|
使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
|
|
919
946
|
行き止まりになる。
|
|
920
947
|
|
|
921
|
-
[Unreleased]: https://github.com/cardene777/cdl/compare/v0.
|
|
948
|
+
[Unreleased]: https://github.com/cardene777/cdl/compare/v0.18.0...HEAD
|
|
949
|
+
[0.18.0]: https://github.com/cardene777/cdl/compare/v0.17.1...v0.18.0
|
|
922
950
|
[0.17.1]: https://github.com/cardene777/cdl/compare/v0.17.0...v0.17.1
|
|
923
951
|
[0.17.0]: https://github.com/cardene777/cdl/compare/v0.16.0...v0.17.0
|
|
924
952
|
[0.16.0]: https://github.com/cardene777/cdl/compare/v0.15.0...v0.16.0
|
package/dist/index.cjs
CHANGED
|
@@ -15373,6 +15373,8 @@ function layout(diag) {
|
|
|
15373
15373
|
states: diag.states,
|
|
15374
15374
|
phases: diag.phases,
|
|
15375
15375
|
...diag.derived ? { derived: diag.derived } : {},
|
|
15376
|
+
// 矢印をいつ出すか (#582)。 描き手が読む欄なので、そのまま持ち越す
|
|
15377
|
+
...diag.edgeReveal ? { edgeReveal: diag.edgeReveal } : {},
|
|
15376
15378
|
bboxes,
|
|
15377
15379
|
collisions,
|
|
15378
15380
|
nearCollisions,
|
|
@@ -15531,6 +15533,8 @@ var EDGE_HEADS = [
|
|
|
15531
15533
|
];
|
|
15532
15534
|
var EDGE_HEAD_FILL_DEFAULT = "solid";
|
|
15533
15535
|
var EDGE_HEAD_FILLS = ["solid", "hollow"];
|
|
15536
|
+
var EDGE_REVEALS = ["phase", "all"];
|
|
15537
|
+
var EDGE_REVEAL_DEFAULT = "phase";
|
|
15534
15538
|
|
|
15535
15539
|
// src/anim/core/easing.ts
|
|
15536
15540
|
function cubicBezier(x1, y1, x2, y2) {
|
|
@@ -28803,6 +28807,19 @@ function CdlStage({
|
|
|
28803
28807
|
svgRef
|
|
28804
28808
|
}) {
|
|
28805
28809
|
const activeSet = new Set(currentPhase?.activate ?? []);
|
|
28810
|
+
const \u51FA\u756A\u306E\u6765\u305F\u77E2\u5370 = react.useMemo(() => {
|
|
28811
|
+
if ((laid.edgeReveal ?? EDGE_REVEAL_DEFAULT) === "all") return () => true;
|
|
28812
|
+
const \u521D\u51FA = /* @__PURE__ */ new Map();
|
|
28813
|
+
laid.phases.forEach((p, i) => {
|
|
28814
|
+
for (const id of p.activate ?? []) if (!\u521D\u51FA.has(id)) \u521D\u51FA.set(id, i);
|
|
28815
|
+
});
|
|
28816
|
+
const \u4ECA = currentPhase === void 0 ? -1 : laid.phases.findIndex((p) => p.id === currentPhase.id);
|
|
28817
|
+
return (edgeId) => {
|
|
28818
|
+
const first = \u521D\u51FA.get(edgeId);
|
|
28819
|
+
if (first === void 0) return true;
|
|
28820
|
+
return \u4ECA < 0 || \u4ECA >= first;
|
|
28821
|
+
};
|
|
28822
|
+
}, [laid.phases, currentPhase]);
|
|
28806
28823
|
const drawSet = new Set(currentPhase?.draw ?? []);
|
|
28807
28824
|
const \u63CF\u304F\u9032\u307F = \u63CF\u304F\u9032\u307F\u306B\u76F4\u3059(progress, currentPhase?.drawRatio);
|
|
28808
28825
|
const { lifelineStarts, uniformFooterTop } = react.useMemo(() => {
|
|
@@ -28962,7 +28979,7 @@ function CdlStage({
|
|
|
28962
28979
|
},
|
|
28963
28980
|
lane.id
|
|
28964
28981
|
)),
|
|
28965
|
-
laid.edges.map((edge) => /* @__PURE__ */ jsxRuntime.jsx(CdlEdgeView, { edge, active: activeSet.has(edge.id), progress, stateValues }, edge.id)),
|
|
28982
|
+
laid.edges.filter((edge) => \u51FA\u756A\u306E\u6765\u305F\u77E2\u5370(edge.id)).map((edge) => /* @__PURE__ */ jsxRuntime.jsx(CdlEdgeView, { edge, active: activeSet.has(edge.id), progress, stateValues }, edge.id)),
|
|
28966
28983
|
laid.nodes.map((node) => {
|
|
28967
28984
|
const \u63CF\u304F = drawSet.has(node.id);
|
|
28968
28985
|
const view = /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -28978,8 +28995,8 @@ function CdlStage({
|
|
|
28978
28995
|
);
|
|
28979
28996
|
return /* @__PURE__ */ jsxRuntime.jsx("g", { children: view }, node.id);
|
|
28980
28997
|
}),
|
|
28981
|
-
laid.edges.filter((edge) => Boolean(edge.dThrough)).map((edge) => /* @__PURE__ */ jsxRuntime.jsx(CdlEdgeGlowView, { edge, active: activeSet.has(edge.id) }, `glow-${edge.id}`)),
|
|
28982
|
-
laid.edges.map((edge) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
28998
|
+
laid.edges.filter((edge) => Boolean(edge.dThrough) && \u51FA\u756A\u306E\u6765\u305F\u77E2\u5370(edge.id)).map((edge) => /* @__PURE__ */ jsxRuntime.jsx(CdlEdgeGlowView, { edge, active: activeSet.has(edge.id) }, `glow-${edge.id}`)),
|
|
28999
|
+
laid.edges.filter((edge) => \u51FA\u756A\u306E\u6765\u305F\u77E2\u5370(edge.id)).map((edge) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
28983
29000
|
CdlEdgeLabelView,
|
|
28984
29001
|
{
|
|
28985
29002
|
edge,
|
|
@@ -30565,6 +30582,8 @@ exports.EDGE_HEAD_DEFAULT = EDGE_HEAD_DEFAULT;
|
|
|
30565
30582
|
exports.EDGE_HEAD_FILLS = EDGE_HEAD_FILLS;
|
|
30566
30583
|
exports.EDGE_HEAD_FILL_DEFAULT = EDGE_HEAD_FILL_DEFAULT;
|
|
30567
30584
|
exports.EDGE_LABEL_TEXT = EDGE_LABEL_TEXT;
|
|
30585
|
+
exports.EDGE_REVEALS = EDGE_REVEALS;
|
|
30586
|
+
exports.EDGE_REVEAL_DEFAULT = EDGE_REVEAL_DEFAULT;
|
|
30568
30587
|
exports.EDGE_STUB_OUT = EDGE_STUB_OUT;
|
|
30569
30588
|
exports.EDGE_STYLES = EDGE_STYLES;
|
|
30570
30589
|
exports.ER_CARDINALITY_HEAD = ER_CARDINALITY_HEAD;
|