@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/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as EdgeHead, f as EdgeHeadFill, g as CdlState, h as CdlEventTarget, i as Computed, j as CdlDerivedValue, k as CdlScrollTrigger, L as LaidDiagram, l as CdlDiagramViewProps, m as LaidEdge, n as LaidNode, o as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-
|
|
2
|
-
export { p as CdlDiagramView, q as CdlEventBinding, r as CdlEventKind, s as CdlFormula, t as CdlPhase, u as EDGE_HEADS, v as EDGE_HEAD_DEFAULT, w as EDGE_HEAD_FILLS, x as EDGE_HEAD_FILL_DEFAULT, y as EDGE_STYLES, I as InteractiveHandlerMap,
|
|
1
|
+
import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as EdgeHead, f as EdgeHeadFill, g as CdlState, h as CdlEventTarget, i as Computed, j as CdlDerivedValue, k as CdlScrollTrigger, L as LaidDiagram, l as CdlDiagramViewProps, m as LaidEdge, n as LaidNode, o as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-Czv0tUon.cjs';
|
|
2
|
+
export { p as CdlDiagramView, q as CdlEventBinding, r as CdlEventKind, s as CdlFormula, t as CdlPhase, u as EDGE_HEADS, v as EDGE_HEAD_DEFAULT, w as EDGE_HEAD_FILLS, x as EDGE_HEAD_FILL_DEFAULT, y as EDGE_REVEALS, z as EDGE_REVEAL_DEFAULT, A as EDGE_STYLES, D as EdgeReveal, I as InteractiveHandlerMap, F as InteractiveSignalsAccessor, G as LaidLane, H as NODE_KINDS, K as ScrollProgressHandle, M as TONES, O as computeEventBindingKey, P as computeFormulaKey, U as computeInputSignalKey, V as computeScrollTriggerKey, W as computed, X as createInteractiveSignalsAccessor, Y as createScrollProgressHandle, Z as createScrollProgressSignals, _ as hasInteractivePrimitives, $ as sequenceBoardMetrics, a0 as sequenceStepId, a1 as signal } from './render-Czv0tUon.cjs';
|
|
3
3
|
import { JSX } from 'react';
|
|
4
4
|
|
|
5
5
|
declare function effect(fn: () => void | (() => void)): () => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as EdgeHead, f as EdgeHeadFill, g as CdlState, h as CdlEventTarget, i as Computed, j as CdlDerivedValue, k as CdlScrollTrigger, L as LaidDiagram, l as CdlDiagramViewProps, m as LaidEdge, n as LaidNode, o as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-
|
|
2
|
-
export { p as CdlDiagramView, q as CdlEventBinding, r as CdlEventKind, s as CdlFormula, t as CdlPhase, u as EDGE_HEADS, v as EDGE_HEAD_DEFAULT, w as EDGE_HEAD_FILLS, x as EDGE_HEAD_FILL_DEFAULT, y as EDGE_STYLES, I as InteractiveHandlerMap,
|
|
1
|
+
import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as EdgeHead, f as EdgeHeadFill, g as CdlState, h as CdlEventTarget, i as Computed, j as CdlDerivedValue, k as CdlScrollTrigger, L as LaidDiagram, l as CdlDiagramViewProps, m as LaidEdge, n as LaidNode, o as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-Czv0tUon.js';
|
|
2
|
+
export { p as CdlDiagramView, q as CdlEventBinding, r as CdlEventKind, s as CdlFormula, t as CdlPhase, u as EDGE_HEADS, v as EDGE_HEAD_DEFAULT, w as EDGE_HEAD_FILLS, x as EDGE_HEAD_FILL_DEFAULT, y as EDGE_REVEALS, z as EDGE_REVEAL_DEFAULT, A as EDGE_STYLES, D as EdgeReveal, I as InteractiveHandlerMap, F as InteractiveSignalsAccessor, G as LaidLane, H as NODE_KINDS, K as ScrollProgressHandle, M as TONES, O as computeEventBindingKey, P as computeFormulaKey, U as computeInputSignalKey, V as computeScrollTriggerKey, W as computed, X as createInteractiveSignalsAccessor, Y as createScrollProgressHandle, Z as createScrollProgressSignals, _ as hasInteractivePrimitives, $ as sequenceBoardMetrics, a0 as sequenceStepId, a1 as signal } from './render-Czv0tUon.js';
|
|
3
3
|
import { JSX } from 'react';
|
|
4
4
|
|
|
5
5
|
declare function effect(fn: () => void | (() => void)): () => void;
|
package/dist/index.js
CHANGED
|
@@ -15371,6 +15371,8 @@ function layout(diag) {
|
|
|
15371
15371
|
states: diag.states,
|
|
15372
15372
|
phases: diag.phases,
|
|
15373
15373
|
...diag.derived ? { derived: diag.derived } : {},
|
|
15374
|
+
// 矢印をいつ出すか (#582)。 描き手が読む欄なので、そのまま持ち越す
|
|
15375
|
+
...diag.edgeReveal ? { edgeReveal: diag.edgeReveal } : {},
|
|
15374
15376
|
bboxes,
|
|
15375
15377
|
collisions,
|
|
15376
15378
|
nearCollisions,
|
|
@@ -15529,6 +15531,8 @@ var EDGE_HEADS = [
|
|
|
15529
15531
|
];
|
|
15530
15532
|
var EDGE_HEAD_FILL_DEFAULT = "solid";
|
|
15531
15533
|
var EDGE_HEAD_FILLS = ["solid", "hollow"];
|
|
15534
|
+
var EDGE_REVEALS = ["phase", "all"];
|
|
15535
|
+
var EDGE_REVEAL_DEFAULT = "phase";
|
|
15532
15536
|
|
|
15533
15537
|
// src/anim/core/easing.ts
|
|
15534
15538
|
function cubicBezier(x1, y1, x2, y2) {
|
|
@@ -28801,6 +28805,19 @@ function CdlStage({
|
|
|
28801
28805
|
svgRef
|
|
28802
28806
|
}) {
|
|
28803
28807
|
const activeSet = new Set(currentPhase?.activate ?? []);
|
|
28808
|
+
const \u51FA\u756A\u306E\u6765\u305F\u77E2\u5370 = useMemo(() => {
|
|
28809
|
+
if ((laid.edgeReveal ?? EDGE_REVEAL_DEFAULT) === "all") return () => true;
|
|
28810
|
+
const \u521D\u51FA = /* @__PURE__ */ new Map();
|
|
28811
|
+
laid.phases.forEach((p, i) => {
|
|
28812
|
+
for (const id of p.activate ?? []) if (!\u521D\u51FA.has(id)) \u521D\u51FA.set(id, i);
|
|
28813
|
+
});
|
|
28814
|
+
const \u4ECA = currentPhase === void 0 ? -1 : laid.phases.findIndex((p) => p.id === currentPhase.id);
|
|
28815
|
+
return (edgeId) => {
|
|
28816
|
+
const first = \u521D\u51FA.get(edgeId);
|
|
28817
|
+
if (first === void 0) return true;
|
|
28818
|
+
return \u4ECA < 0 || \u4ECA >= first;
|
|
28819
|
+
};
|
|
28820
|
+
}, [laid.phases, currentPhase]);
|
|
28804
28821
|
const drawSet = new Set(currentPhase?.draw ?? []);
|
|
28805
28822
|
const \u63CF\u304F\u9032\u307F = \u63CF\u304F\u9032\u307F\u306B\u76F4\u3059(progress, currentPhase?.drawRatio);
|
|
28806
28823
|
const { lifelineStarts, uniformFooterTop } = useMemo(() => {
|
|
@@ -28960,7 +28977,7 @@ function CdlStage({
|
|
|
28960
28977
|
},
|
|
28961
28978
|
lane.id
|
|
28962
28979
|
)),
|
|
28963
|
-
laid.edges.map((edge) => /* @__PURE__ */ jsx(CdlEdgeView, { edge, active: activeSet.has(edge.id), progress, stateValues }, edge.id)),
|
|
28980
|
+
laid.edges.filter((edge) => \u51FA\u756A\u306E\u6765\u305F\u77E2\u5370(edge.id)).map((edge) => /* @__PURE__ */ jsx(CdlEdgeView, { edge, active: activeSet.has(edge.id), progress, stateValues }, edge.id)),
|
|
28964
28981
|
laid.nodes.map((node) => {
|
|
28965
28982
|
const \u63CF\u304F = drawSet.has(node.id);
|
|
28966
28983
|
const view = /* @__PURE__ */ jsx(
|
|
@@ -28976,8 +28993,8 @@ function CdlStage({
|
|
|
28976
28993
|
);
|
|
28977
28994
|
return /* @__PURE__ */ jsx("g", { children: view }, node.id);
|
|
28978
28995
|
}),
|
|
28979
|
-
laid.edges.filter((edge) => Boolean(edge.dThrough)).map((edge) => /* @__PURE__ */ jsx(CdlEdgeGlowView, { edge, active: activeSet.has(edge.id) }, `glow-${edge.id}`)),
|
|
28980
|
-
laid.edges.map((edge) => /* @__PURE__ */ jsx(
|
|
28996
|
+
laid.edges.filter((edge) => Boolean(edge.dThrough) && \u51FA\u756A\u306E\u6765\u305F\u77E2\u5370(edge.id)).map((edge) => /* @__PURE__ */ jsx(CdlEdgeGlowView, { edge, active: activeSet.has(edge.id) }, `glow-${edge.id}`)),
|
|
28997
|
+
laid.edges.filter((edge) => \u51FA\u756A\u306E\u6765\u305F\u77E2\u5370(edge.id)).map((edge) => /* @__PURE__ */ jsx(
|
|
28981
28998
|
CdlEdgeLabelView,
|
|
28982
28999
|
{
|
|
28983
29000
|
edge,
|
|
@@ -30541,6 +30558,6 @@ function slugify(s) {
|
|
|
30541
30558
|
return s.toLowerCase().replace(/[^a-z0-9-ゟ゠-ヿ一-龯]+/g, "-").replace(/^-|-$/g, "");
|
|
30542
30559
|
}
|
|
30543
30560
|
|
|
30544
|
-
export { ARROW_ANGLE_MAX_DEG, ARROW_ENDPOINT_CENTER_TOL, CHAIN_MIN_CLEARANCE, CHAIN_SHIFT_MAX_ACCUMULATED, CHAIN_SHIFT_MAX_ITER, CLASS_RELATION_LOOK, CLEARANCE_LABEL_LABEL, CLEARANCE_LANE_LABEL, CLEARANCE_NODE_LABEL, CLEARANCE_PATH_LABEL, COLUMN_GAP_VARIANCE_TOL, CdlDiagramThumbnail, CdlDiagramView, DETOUR_GAP, DETOUR_SLOT_GAP, DIST_LABEL_PATH_MAX, DIST_LABEL_PATH_MIN, EDGE_HEADS, EDGE_HEAD_DEFAULT, EDGE_HEAD_FILLS, EDGE_HEAD_FILL_DEFAULT, EDGE_LABEL_TEXT, EDGE_STUB_OUT, EDGE_STYLES, ER_CARDINALITY_HEAD, FAN_GAP, FONT_RENDER_TOLERANCE_WORLD, FSM_ACTION_MARK, LABEL_INIT_CLEARANCE, LABEL_INIT_CLEARANCE_DOTTED_FLOW, LABEL_SIZE_TOLERANCE_WORLD, LABEL_TO_PATH_CLEARANCE, LANE_BORDER_CLEARANCE_TOL, MARKER_GLOW_RADIUS, MIN_COLUMN_ALIGNMENT_TOLERANCE, MIN_ROW_ALIGNMENT_TOLERANCE, NEAR_COLLISION_DEFAULT_MIN, NEAR_COLLISION_POLICY, NODE_FRAME_SELECTOR, NODE_KINDS, ROW_GAP_VARIANCE_TOL, SEQUENCE_MESSAGE_LOOK, SPEC_CLEARANCE_POLICY, STAGE_SVG_SELECTOR, TARGET_LABEL_PATH_DIST, TONES, WCAG_AA_LARGE, WCAG_AA_NORMAL, applyDerivedValues, assertNever, attachEventHandlers, batch, bboxClearance, bboxDiffWorld, cdlAdapter, chart, classDiagram, compile, computeEventBindingKey, computeFormulaKey, computeInputSignalKey, computeScrollProgress, computeScrollTriggerKey, computeStateValues, computeViewportScale, computed, countEdgeCrossings, createFormulaComputeds, createInputSignals, createInteractiveSignalsAccessor, createScrollProgressHandle, createScrollProgressSignals, diagram, effect, er, evaluate as evaluateFormula, extractIdentifiers, flow, flowchart, funnel, gantt, hasInteractivePrimitives, infrastructure, inputDefaultValue, interpolate, isLargeText, labelInitClearance, layout, layoutWithValidation, mindMap, network, parseFormula, pointRectEdgeDistance, pointToSegmentDistance2 as pointToSegmentDistance, predictLabelBBoxWorld, predictNodeBBoxWorld, projectEdgeLabel, projectNode, projectPathSegment, pxToWorld, quadrant, rectRectClearance, rectRectOverlapArea, rendersRows, requiredContrastRatio, requiredNearClearance, requiredRowsHeight, requiredRowsWidth, requiredSpecClearance, resolveEdgeLabelOverlapsWithChain, resolveEdgeLabelOverlapsWithChainAndPropagate, resolveOverlapsWithChain, resolveTarget, resolveTargetAll, segmentsIntersect2 as segmentsIntersect, sequence, sequenceBoardMetrics, sequenceStepId, signal, stateMachine, stateMachine2, swimlane, topology, tree, untrack, userJourney, validate, verifyAllDiagramsDom, verifyAuthorIntent, verifyAuthorIntentAll, verifyDiagramDom, visualValidate, visualValidateAll, visualValidateLaid, withDerivedValues, worldToPx };
|
|
30561
|
+
export { ARROW_ANGLE_MAX_DEG, ARROW_ENDPOINT_CENTER_TOL, CHAIN_MIN_CLEARANCE, CHAIN_SHIFT_MAX_ACCUMULATED, CHAIN_SHIFT_MAX_ITER, CLASS_RELATION_LOOK, CLEARANCE_LABEL_LABEL, CLEARANCE_LANE_LABEL, CLEARANCE_NODE_LABEL, CLEARANCE_PATH_LABEL, COLUMN_GAP_VARIANCE_TOL, CdlDiagramThumbnail, CdlDiagramView, DETOUR_GAP, DETOUR_SLOT_GAP, DIST_LABEL_PATH_MAX, DIST_LABEL_PATH_MIN, EDGE_HEADS, EDGE_HEAD_DEFAULT, EDGE_HEAD_FILLS, EDGE_HEAD_FILL_DEFAULT, EDGE_LABEL_TEXT, EDGE_REVEALS, EDGE_REVEAL_DEFAULT, EDGE_STUB_OUT, EDGE_STYLES, ER_CARDINALITY_HEAD, FAN_GAP, FONT_RENDER_TOLERANCE_WORLD, FSM_ACTION_MARK, LABEL_INIT_CLEARANCE, LABEL_INIT_CLEARANCE_DOTTED_FLOW, LABEL_SIZE_TOLERANCE_WORLD, LABEL_TO_PATH_CLEARANCE, LANE_BORDER_CLEARANCE_TOL, MARKER_GLOW_RADIUS, MIN_COLUMN_ALIGNMENT_TOLERANCE, MIN_ROW_ALIGNMENT_TOLERANCE, NEAR_COLLISION_DEFAULT_MIN, NEAR_COLLISION_POLICY, NODE_FRAME_SELECTOR, NODE_KINDS, ROW_GAP_VARIANCE_TOL, SEQUENCE_MESSAGE_LOOK, SPEC_CLEARANCE_POLICY, STAGE_SVG_SELECTOR, TARGET_LABEL_PATH_DIST, TONES, WCAG_AA_LARGE, WCAG_AA_NORMAL, applyDerivedValues, assertNever, attachEventHandlers, batch, bboxClearance, bboxDiffWorld, cdlAdapter, chart, classDiagram, compile, computeEventBindingKey, computeFormulaKey, computeInputSignalKey, computeScrollProgress, computeScrollTriggerKey, computeStateValues, computeViewportScale, computed, countEdgeCrossings, createFormulaComputeds, createInputSignals, createInteractiveSignalsAccessor, createScrollProgressHandle, createScrollProgressSignals, diagram, effect, er, evaluate as evaluateFormula, extractIdentifiers, flow, flowchart, funnel, gantt, hasInteractivePrimitives, infrastructure, inputDefaultValue, interpolate, isLargeText, labelInitClearance, layout, layoutWithValidation, mindMap, network, parseFormula, pointRectEdgeDistance, pointToSegmentDistance2 as pointToSegmentDistance, predictLabelBBoxWorld, predictNodeBBoxWorld, projectEdgeLabel, projectNode, projectPathSegment, pxToWorld, quadrant, rectRectClearance, rectRectOverlapArea, rendersRows, requiredContrastRatio, requiredNearClearance, requiredRowsHeight, requiredRowsWidth, requiredSpecClearance, resolveEdgeLabelOverlapsWithChain, resolveEdgeLabelOverlapsWithChainAndPropagate, resolveOverlapsWithChain, resolveTarget, resolveTargetAll, segmentsIntersect2 as segmentsIntersect, sequence, sequenceBoardMetrics, sequenceStepId, signal, stateMachine, stateMachine2, swimlane, topology, tree, untrack, userJourney, validate, verifyAllDiagramsDom, verifyAuthorIntent, verifyAuthorIntentAll, verifyDiagramDom, visualValidate, visualValidateAll, visualValidateLaid, withDerivedValues, worldToPx };
|
|
30545
30562
|
//# sourceMappingURL=index.js.map
|
|
30546
30563
|
//# sourceMappingURL=index.js.map
|