@cardenelabs/cdl 0.5.0 → 0.6.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/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 CdlState, f as CdlEventTarget, g as Computed, h as CdlScrollTrigger, L as LaidDiagram, i as CdlDiagramViewProps, j as LaidEdge, k as LaidNode, l as CdlEdge, B as BBox, N as NodeKind } from './render-C78lIXeC.cjs';
2
- export { m as CdlDiagramView, n as CdlEventBinding, o as CdlEventKind, p as CdlFormula, q as CdlPhase, I as InteractiveHandlerMap, r as InteractiveSignalsAccessor, s as LaidLane, t as NODE_KINDS, u as ScrollProgressHandle, v as TONES, w as computeEventBindingKey, x as computeFormulaKey, y as computeInputSignalKey, z as computeScrollTriggerKey, A as computed, D as createInteractiveSignalsAccessor, F as createScrollProgressHandle, G as createScrollProgressSignals, H as hasInteractivePrimitives, J as signal } from './render-C78lIXeC.cjs';
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 CdlState, f as CdlEventTarget, g as Computed, h as CdlDerivedValue, i as CdlScrollTrigger, L as LaidDiagram, j as CdlDiagramViewProps, k as LaidEdge, l as LaidNode, m as CdlEdge, B as BBox, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-DquCvgOB.cjs';
2
+ export { n as CdlDiagramView, o as CdlEventBinding, p as CdlEventKind, q as CdlFormula, r as CdlPhase, I as InteractiveHandlerMap, s as InteractiveSignalsAccessor, t as LaidLane, u as NODE_KINDS, v as ScrollProgressHandle, w as TONES, x as computeEventBindingKey, y as computeFormulaKey, z as computeInputSignalKey, A as computeScrollTriggerKey, D as computed, F as createInteractiveSignalsAccessor, G as createScrollProgressHandle, H as createScrollProgressSignals, K as hasInteractivePrimitives, M as signal } from './render-DquCvgOB.cjs';
3
3
  import { JSX } from 'react';
4
4
 
5
5
  declare function effect(fn: () => void | (() => void)): () => void;
@@ -1259,6 +1259,44 @@ declare function evaluate(ast: FormulaAst, ctxOrResolver: FormulaContext | Formu
1259
1259
  */
1260
1260
  declare function createFormulaComputeds(diagram: CdlDiagram, signals: Record<string, Signal<unknown>>): Record<string, Computed<number | boolean>>;
1261
1261
 
1262
+ /**
1263
+ * 他の値から自動で決まる値を解く層 (cdl#453 / dragon#1161 段 1)。
1264
+ *
1265
+ * 段 (`animation`) が動かす値を出した後に、 参照の関係から順序を決めて式を評価する。
1266
+ * 段の補間中も毎 frame ここを通るため、 掛け算 / 割り算 / 比較 / `min` / `max` のような
1267
+ * 端点 2 点では表せない関係も途中の値が正しくなる。
1268
+ *
1269
+ * 止まった値は結果に載せない。 載せなければ図には `{名前}` が残り、 読み手
1270
+ * (`resolveNumericAttr` / `payload-binding` / `visibleIf`) が既に持っている
1271
+ * 「解決できていない」 の扱いにそのまま乗る。 伝えるための経路を新設しない。
1272
+ *
1273
+ * ただし同じ名前が `states` にもある場合は、 段が出した初期値をそのまま残す
1274
+ * (「まだ計算されていない間の値」 として使う)。
1275
+ */
1276
+ /** 値が止まった理由。 呼び出し側が伝え方を決められるように種類を分けておく */
1277
+ type DerivedNoticeKind = "cycle" | "unknown-reference" | "parse-error" | "eval-error" | "duplicate-id" | "invalid-id";
1278
+ type DerivedNotice = {
1279
+ /** 止まった値の名前 */
1280
+ id: string;
1281
+ kind: DerivedNoticeKind;
1282
+ message: string;
1283
+ };
1284
+ type DerivedResult = {
1285
+ /** 段の値に、 解けた値を足したもの */
1286
+ values: Record<string, string>;
1287
+ /** 止まった値。 解けた値しか無ければ空 */
1288
+ notices: DerivedNotice[];
1289
+ };
1290
+ /**
1291
+ * 段の値に、 他の値から決まる値を足して返す。
1292
+ *
1293
+ * 宣言が無ければ受け取った値をそのまま返す (同じ object をそのまま返すので、
1294
+ * 宣言を持たない図は追加の割当てを 1 つも払わない)。
1295
+ */
1296
+ declare function applyDerivedValues(base: Record<string, string>, derived: readonly CdlDerivedValue[] | undefined): DerivedResult;
1297
+ /** 段の値に、 他の値から決まる値を足した record だけを返す (伝える情報が要らない呼び出し用) */
1298
+ declare function withDerivedValues(base: Record<string, string>, derived: readonly CdlDerivedValue[] | undefined): Record<string, string>;
1299
+
1262
1300
  /**
1263
1301
  * scroll progress 計算 (pure function、 CAR #245)。
1264
1302
  *
@@ -3013,7 +3051,7 @@ type TreeBuilder = {
3013
3051
  * .build();
3014
3052
  */
3015
3053
  declare function tree(preset: TreePreset): TreeBuilder;
3016
- type JourneyEmotion = "delighted" | "happy" | "neutral" | "frustrated" | "angry";
3054
+
3017
3055
  type JourneyStep = {
3018
3056
  id: string;
3019
3057
  title: string;
@@ -3111,7 +3149,7 @@ type FunnelBuilder = {
3111
3149
  * .build();
3112
3150
  */
3113
3151
  declare function funnel(preset: FunnelPreset): FunnelBuilder;
3114
- type QuadrantQuadrantLabel = "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
3152
+ type QuadrantQuadrantLabel = QuadrantKey;
3115
3153
  type QuadrantItem = {
3116
3154
  id: string;
3117
3155
  title: string;
@@ -3368,48 +3406,5 @@ type StateMachine2Builder = {
3368
3406
  * .build();
3369
3407
  */
3370
3408
  declare function stateMachine2(preset: StateMachine2Preset): StateMachine2Builder;
3371
- type MindMapRadialBranch = {
3372
- id: string;
3373
- title: string;
3374
- /** 色 tone (default は defaultTone)。 8 方向で auto rotate も可 */
3375
- tone?: Tone;
3376
- subtitle?: string;
3377
- };
3378
- type MindMapRadialPreset = {
3379
- id: string;
3380
- topic: string;
3381
- /** 中心 node の title (id は builder が "center" で内部生成) */
3382
- centerTitle: string;
3383
- /** 中心 node の id override (default "center") */
3384
- centerId?: string;
3385
- /** 中心から branch までの距離 (world coord、 default 350) */
3386
- radius?: number;
3387
- /** branch node の width (default 260) */
3388
- branchWidth?: number;
3389
- /** 中心 node の width (default 260) */
3390
- centerWidth?: number;
3391
- defaultTone?: Tone;
3392
- };
3393
- type MindMapRadialBuilder = {
3394
- branch: (b: MindMapRadialBranch) => MindMapRadialBuilder;
3395
- build: () => ReturnType<DiagramBuilder["build"]>;
3396
- };
3397
- /**
3398
- * mindMapRadial preset ... 中心 node を軸に 8 方向 (0°/45°/90°/135°/180°/225°/270°/315°)
3399
- * へ branch を放射状に配置する。 現行 mindMap (左から右へ水平 tree) と使い分ける用途。
3400
- *
3401
- * 実装戦略 ... engine の lane × stack grid を活用し、 3 lane (left / center / right) を
3402
- * radius に基づき explicit x で配置、 3 stack row (top / middle / bottom) を stack index 0/1/2 で
3403
- * 割当てる。 branch 順は position 順 (E/SE/S/SW/W/NW/N/NE) に固定し、 index → grid cell mapping。
3404
- *
3405
- * @example
3406
- * mindMapRadial({ id: "mr", topic: "Product Radial", centerTitle: "Product" })
3407
- * .branch({ id: "users", title: "Users" }) // 0° (right)
3408
- * .branch({ id: "road", title: "Roadmap" }) // 45° (bottom-right)
3409
- * .branch({ id: "metrics", title: "Metrics" }) // 90° (bottom)
3410
- * ...
3411
- * .build();
3412
- */
3413
- declare function mindMapRadial(preset: MindMapRadialPreset): MindMapRadialBuilder;
3414
3409
 
3415
- export { ARROW_ANGLE_MAX_DEG, ARROW_ENDPOINT_CENTER_TOL, type AnimationChain, type AuthorIntentOptions, type AuthorIntentReport, type BinaryOp, CHAIN_MIN_CLEARANCE, CHAIN_SHIFT_MAX_ACCUMULATED, CHAIN_SHIFT_MAX_ITER, CLEARANCE_LABEL_LABEL, CLEARANCE_LANE_LABEL, CLEARANCE_NODE_LABEL, CLEARANCE_PATH_LABEL, COLUMN_GAP_VARIANCE_TOL, CdlDiagram, CdlDiagramThumbnail, CdlEdge, type CdlEventHandler, CdlEventTarget, CdlInput, CdlLane, CdlNode, CdlScrollTrigger, CdlState, type ChartBuilder, type ChartDatum, type ChartPreset, type ChartType, type ClassDiagramBuilder, type ClassDiagramPreset, type ClassRelationType, Computed, DETOUR_GAP, DETOUR_SLOT_GAP, DIST_LABEL_PATH_MAX, DIST_LABEL_PATH_MIN, type DiagramAdapter, type DiagramBuilder, type Discrepancy, type DiscrepancyKind, type DomVerifyReport, EDGE_LABEL_TEXT, EDGE_STUB_OUT, type EdgeLabelLine, type EdgeLabelTextSpec, EdgeStyle, type ErBuilder, type ErEntity, type ErPreset, type ErRelation, type ErRelationCardinality, type EventAttachHandle, type EventChain, FAN_GAP, FONT_RENDER_TOLERANCE_WORLD, type FlowBuilder, type FlowPreset, type FlowStepInput, type FlowchartBuilder, type FlowchartEdge, type FlowchartNode, type FlowchartNodeShape, type FlowchartPreset, type FormulaAst, type FormulaContext, type FsmState, type FsmStateNested, type FsmTransition, type FsmTransitionExt, type FunnelBuilder, type FunnelPreset, type FunnelStage, type GanttBuilder, type GanttPreset, type GanttTask, type GenericDiagramSpec, type GenericDiscrepancy, type GenericDiscrepancyKind, type GenericVerifyOptions, type Rect as GeometryRect, type Segment as GeometrySegment, type InfraConnection, type InfraNode, type InfrastructureBuilder, type InfrastructurePreset, type InputChain, type IntentDiscrepancy, type IntentDiscrepancyKind, type JourneyEmotion, type JourneyStep, LABEL_INIT_CLEARANCE, LABEL_INIT_CLEARANCE_DOTTED_FLOW, LABEL_SIZE_TOLERANCE_WORLD, LABEL_TO_PATH_CLEARANCE, LANE_BORDER_CLEARANCE_TOL, LaidDiagram, LaidEdge, LaidNode, type LayoutWithValidationOptions, type LayoutWithValidationResult, MARKER_GLOW_RADIUS, MIN_COLUMN_ALIGNMENT_TOLERANCE, MIN_ROW_ALIGNMENT_TOLERANCE, type MathFnName, type MindBranch, type MindMapBuilder, type MindMapPreset, type MindMapRadialBranch, type MindMapRadialBuilder, type MindMapRadialPreset, NEAR_COLLISION_DEFAULT_MIN, NEAR_COLLISION_POLICY, NODE_FRAME_SELECTOR, type NetworkBuilder, type NetworkDevice, type NetworkDeviceKind, type NetworkLink, type NetworkPreset, NodeKind, type PageLike, type PhaseBuilder, type QuadrantBuilder, type QuadrantItem, type QuadrantPreset, type QuadrantQuadrantLabel, ROW_GAP_VARIANCE_TOL, SPEC_CLEARANCE_POLICY, STAGE_SVG_SELECTOR, type SequenceBuilder, type SequencePreset, type SequenceStep, Side, Signal, type StateMachine2Builder, type StateMachine2Preset, type StateMachineBuilder, type StateMachinePreset, type SweepReport, type SwimlanePreset, TARGET_LABEL_PATH_DIST, Tone, type TopologyBuilder, type TopologyConnection, type TopologyContainer, type TopologyGroupBuilder, type TopologyPreset, type TreeBuilder, type TreeNode, type TreePreset, type UmlClass, type UmlRelation, type UserJourneyBuilder, type UserJourneyPreset, type ValidateOptions, type ValidationProfile, type VerifyOptions, type Violation, type VisualAxis, type VisualValidationReport, WCAG_AA_LARGE, WCAG_AA_NORMAL, assertNever, attachEventHandlers, batch, bboxClearance, bboxDiffWorld, cdlAdapter, chart, classDiagram, compile, computeScrollProgress, computeViewportScale, countEdgeCrossings, createFormulaComputeds, createInputSignals, diagram, effect, er, evaluate as evaluateFormula, extractIdentifiers, flow, flowchart, funnel, gantt, infrastructure, inputDefaultValue, isLargeText, labelInitClearance, layout, layoutWithValidation, mindMap, mindMapRadial, network, parseFormula, pointRectEdgeDistance, pointToSegmentDistance, predictLabelBBoxWorld, predictNodeBBoxWorld, projectEdgeLabel, projectNode, projectPathSegment, pxToWorld, quadrant, rectRectClearance, rectRectOverlapArea, rendersRows, requiredContrastRatio, requiredNearClearance, requiredRowsHeight, requiredRowsWidth, requiredSpecClearance, resolveEdgeLabelOverlapsWithChain, resolveEdgeLabelOverlapsWithChainAndPropagate, resolveOverlapsWithChain, resolveTarget, resolveTargetAll, segmentsIntersect, sequence, stateMachine, stateMachine2, swimlane, topology, tree, untrack, userJourney, validate, verifyAllDiagramsDom, verifyAuthorIntent, verifyAuthorIntentAll, verifyDiagramDom, visualValidate, visualValidateAll, visualValidateLaid, worldToPx };
3410
+ export { ARROW_ANGLE_MAX_DEG, ARROW_ENDPOINT_CENTER_TOL, type AnimationChain, type AuthorIntentOptions, type AuthorIntentReport, type BinaryOp, CHAIN_MIN_CLEARANCE, CHAIN_SHIFT_MAX_ACCUMULATED, CHAIN_SHIFT_MAX_ITER, CLEARANCE_LABEL_LABEL, CLEARANCE_LANE_LABEL, CLEARANCE_NODE_LABEL, CLEARANCE_PATH_LABEL, COLUMN_GAP_VARIANCE_TOL, CdlDerivedValue, CdlDiagram, CdlDiagramThumbnail, CdlEdge, type CdlEventHandler, CdlEventTarget, CdlInput, CdlLane, CdlNode, CdlScrollTrigger, CdlState, type ChartBuilder, type ChartDatum, type ChartPreset, type ChartType, type ClassDiagramBuilder, type ClassDiagramPreset, type ClassRelationType, Computed, DETOUR_GAP, DETOUR_SLOT_GAP, DIST_LABEL_PATH_MAX, DIST_LABEL_PATH_MIN, type DerivedNotice, type DerivedNoticeKind, type DerivedResult, type DiagramAdapter, type DiagramBuilder, type Discrepancy, type DiscrepancyKind, type DomVerifyReport, EDGE_LABEL_TEXT, EDGE_STUB_OUT, type EdgeLabelLine, type EdgeLabelTextSpec, EdgeStyle, type ErBuilder, type ErEntity, type ErPreset, type ErRelation, type ErRelationCardinality, type EventAttachHandle, type EventChain, FAN_GAP, FONT_RENDER_TOLERANCE_WORLD, type FlowBuilder, type FlowPreset, type FlowStepInput, type FlowchartBuilder, type FlowchartEdge, type FlowchartNode, type FlowchartNodeShape, type FlowchartPreset, type FormulaAst, type FormulaContext, type FsmState, type FsmStateNested, type FsmTransition, type FsmTransitionExt, type FunnelBuilder, type FunnelPreset, type FunnelStage, type GanttBuilder, type GanttPreset, type GanttTask, type GenericDiagramSpec, type GenericDiscrepancy, type GenericDiscrepancyKind, type GenericVerifyOptions, type Rect as GeometryRect, type Segment as GeometrySegment, type InfraConnection, type InfraNode, type InfrastructureBuilder, type InfrastructurePreset, type InputChain, type IntentDiscrepancy, type IntentDiscrepancyKind, JourneyEmotion, type JourneyStep, LABEL_INIT_CLEARANCE, LABEL_INIT_CLEARANCE_DOTTED_FLOW, LABEL_SIZE_TOLERANCE_WORLD, LABEL_TO_PATH_CLEARANCE, LANE_BORDER_CLEARANCE_TOL, LaidDiagram, LaidEdge, LaidNode, type LayoutWithValidationOptions, type LayoutWithValidationResult, MARKER_GLOW_RADIUS, MIN_COLUMN_ALIGNMENT_TOLERANCE, MIN_ROW_ALIGNMENT_TOLERANCE, type MathFnName, type MindBranch, type MindMapBuilder, type MindMapPreset, NEAR_COLLISION_DEFAULT_MIN, NEAR_COLLISION_POLICY, NODE_FRAME_SELECTOR, type NetworkBuilder, type NetworkDevice, type NetworkDeviceKind, type NetworkLink, type NetworkPreset, NodeKind, type PageLike, type PhaseBuilder, type QuadrantBuilder, type QuadrantItem, type QuadrantPreset, type QuadrantQuadrantLabel, ROW_GAP_VARIANCE_TOL, SPEC_CLEARANCE_POLICY, STAGE_SVG_SELECTOR, type SequenceBuilder, type SequencePreset, type SequenceStep, Side, Signal, type StateMachine2Builder, type StateMachine2Preset, type StateMachineBuilder, type StateMachinePreset, type SweepReport, type SwimlanePreset, TARGET_LABEL_PATH_DIST, Tone, type TopologyBuilder, type TopologyConnection, type TopologyContainer, type TopologyGroupBuilder, type TopologyPreset, type TreeBuilder, type TreeNode, type TreePreset, type UmlClass, type UmlRelation, type UserJourneyBuilder, type UserJourneyPreset, type ValidateOptions, type ValidationProfile, type VerifyOptions, type Violation, type VisualAxis, type VisualValidationReport, WCAG_AA_LARGE, WCAG_AA_NORMAL, applyDerivedValues, assertNever, attachEventHandlers, batch, bboxClearance, bboxDiffWorld, cdlAdapter, chart, classDiagram, compile, computeScrollProgress, computeViewportScale, countEdgeCrossings, createFormulaComputeds, createInputSignals, diagram, effect, er, evaluate as evaluateFormula, extractIdentifiers, flow, flowchart, funnel, gantt, infrastructure, inputDefaultValue, isLargeText, labelInitClearance, layout, layoutWithValidation, mindMap, network, parseFormula, pointRectEdgeDistance, pointToSegmentDistance, predictLabelBBoxWorld, predictNodeBBoxWorld, projectEdgeLabel, projectNode, projectPathSegment, pxToWorld, quadrant, rectRectClearance, rectRectOverlapArea, rendersRows, requiredContrastRatio, requiredNearClearance, requiredRowsHeight, requiredRowsWidth, requiredSpecClearance, resolveEdgeLabelOverlapsWithChain, resolveEdgeLabelOverlapsWithChainAndPropagate, resolveOverlapsWithChain, resolveTarget, resolveTargetAll, segmentsIntersect, sequence, stateMachine, stateMachine2, swimlane, topology, tree, untrack, userJourney, validate, verifyAllDiagramsDom, verifyAuthorIntent, verifyAuthorIntentAll, verifyDiagramDom, visualValidate, visualValidateAll, visualValidateLaid, withDerivedValues, worldToPx };
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 CdlState, f as CdlEventTarget, g as Computed, h as CdlScrollTrigger, L as LaidDiagram, i as CdlDiagramViewProps, j as LaidEdge, k as LaidNode, l as CdlEdge, B as BBox, N as NodeKind } from './render-C78lIXeC.js';
2
- export { m as CdlDiagramView, n as CdlEventBinding, o as CdlEventKind, p as CdlFormula, q as CdlPhase, I as InteractiveHandlerMap, r as InteractiveSignalsAccessor, s as LaidLane, t as NODE_KINDS, u as ScrollProgressHandle, v as TONES, w as computeEventBindingKey, x as computeFormulaKey, y as computeInputSignalKey, z as computeScrollTriggerKey, A as computed, D as createInteractiveSignalsAccessor, F as createScrollProgressHandle, G as createScrollProgressSignals, H as hasInteractivePrimitives, J as signal } from './render-C78lIXeC.js';
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 CdlState, f as CdlEventTarget, g as Computed, h as CdlDerivedValue, i as CdlScrollTrigger, L as LaidDiagram, j as CdlDiagramViewProps, k as LaidEdge, l as LaidNode, m as CdlEdge, B as BBox, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-DquCvgOB.js';
2
+ export { n as CdlDiagramView, o as CdlEventBinding, p as CdlEventKind, q as CdlFormula, r as CdlPhase, I as InteractiveHandlerMap, s as InteractiveSignalsAccessor, t as LaidLane, u as NODE_KINDS, v as ScrollProgressHandle, w as TONES, x as computeEventBindingKey, y as computeFormulaKey, z as computeInputSignalKey, A as computeScrollTriggerKey, D as computed, F as createInteractiveSignalsAccessor, G as createScrollProgressHandle, H as createScrollProgressSignals, K as hasInteractivePrimitives, M as signal } from './render-DquCvgOB.js';
3
3
  import { JSX } from 'react';
4
4
 
5
5
  declare function effect(fn: () => void | (() => void)): () => void;
@@ -1259,6 +1259,44 @@ declare function evaluate(ast: FormulaAst, ctxOrResolver: FormulaContext | Formu
1259
1259
  */
1260
1260
  declare function createFormulaComputeds(diagram: CdlDiagram, signals: Record<string, Signal<unknown>>): Record<string, Computed<number | boolean>>;
1261
1261
 
1262
+ /**
1263
+ * 他の値から自動で決まる値を解く層 (cdl#453 / dragon#1161 段 1)。
1264
+ *
1265
+ * 段 (`animation`) が動かす値を出した後に、 参照の関係から順序を決めて式を評価する。
1266
+ * 段の補間中も毎 frame ここを通るため、 掛け算 / 割り算 / 比較 / `min` / `max` のような
1267
+ * 端点 2 点では表せない関係も途中の値が正しくなる。
1268
+ *
1269
+ * 止まった値は結果に載せない。 載せなければ図には `{名前}` が残り、 読み手
1270
+ * (`resolveNumericAttr` / `payload-binding` / `visibleIf`) が既に持っている
1271
+ * 「解決できていない」 の扱いにそのまま乗る。 伝えるための経路を新設しない。
1272
+ *
1273
+ * ただし同じ名前が `states` にもある場合は、 段が出した初期値をそのまま残す
1274
+ * (「まだ計算されていない間の値」 として使う)。
1275
+ */
1276
+ /** 値が止まった理由。 呼び出し側が伝え方を決められるように種類を分けておく */
1277
+ type DerivedNoticeKind = "cycle" | "unknown-reference" | "parse-error" | "eval-error" | "duplicate-id" | "invalid-id";
1278
+ type DerivedNotice = {
1279
+ /** 止まった値の名前 */
1280
+ id: string;
1281
+ kind: DerivedNoticeKind;
1282
+ message: string;
1283
+ };
1284
+ type DerivedResult = {
1285
+ /** 段の値に、 解けた値を足したもの */
1286
+ values: Record<string, string>;
1287
+ /** 止まった値。 解けた値しか無ければ空 */
1288
+ notices: DerivedNotice[];
1289
+ };
1290
+ /**
1291
+ * 段の値に、 他の値から決まる値を足して返す。
1292
+ *
1293
+ * 宣言が無ければ受け取った値をそのまま返す (同じ object をそのまま返すので、
1294
+ * 宣言を持たない図は追加の割当てを 1 つも払わない)。
1295
+ */
1296
+ declare function applyDerivedValues(base: Record<string, string>, derived: readonly CdlDerivedValue[] | undefined): DerivedResult;
1297
+ /** 段の値に、 他の値から決まる値を足した record だけを返す (伝える情報が要らない呼び出し用) */
1298
+ declare function withDerivedValues(base: Record<string, string>, derived: readonly CdlDerivedValue[] | undefined): Record<string, string>;
1299
+
1262
1300
  /**
1263
1301
  * scroll progress 計算 (pure function、 CAR #245)。
1264
1302
  *
@@ -3013,7 +3051,7 @@ type TreeBuilder = {
3013
3051
  * .build();
3014
3052
  */
3015
3053
  declare function tree(preset: TreePreset): TreeBuilder;
3016
- type JourneyEmotion = "delighted" | "happy" | "neutral" | "frustrated" | "angry";
3054
+
3017
3055
  type JourneyStep = {
3018
3056
  id: string;
3019
3057
  title: string;
@@ -3111,7 +3149,7 @@ type FunnelBuilder = {
3111
3149
  * .build();
3112
3150
  */
3113
3151
  declare function funnel(preset: FunnelPreset): FunnelBuilder;
3114
- type QuadrantQuadrantLabel = "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
3152
+ type QuadrantQuadrantLabel = QuadrantKey;
3115
3153
  type QuadrantItem = {
3116
3154
  id: string;
3117
3155
  title: string;
@@ -3368,48 +3406,5 @@ type StateMachine2Builder = {
3368
3406
  * .build();
3369
3407
  */
3370
3408
  declare function stateMachine2(preset: StateMachine2Preset): StateMachine2Builder;
3371
- type MindMapRadialBranch = {
3372
- id: string;
3373
- title: string;
3374
- /** 色 tone (default は defaultTone)。 8 方向で auto rotate も可 */
3375
- tone?: Tone;
3376
- subtitle?: string;
3377
- };
3378
- type MindMapRadialPreset = {
3379
- id: string;
3380
- topic: string;
3381
- /** 中心 node の title (id は builder が "center" で内部生成) */
3382
- centerTitle: string;
3383
- /** 中心 node の id override (default "center") */
3384
- centerId?: string;
3385
- /** 中心から branch までの距離 (world coord、 default 350) */
3386
- radius?: number;
3387
- /** branch node の width (default 260) */
3388
- branchWidth?: number;
3389
- /** 中心 node の width (default 260) */
3390
- centerWidth?: number;
3391
- defaultTone?: Tone;
3392
- };
3393
- type MindMapRadialBuilder = {
3394
- branch: (b: MindMapRadialBranch) => MindMapRadialBuilder;
3395
- build: () => ReturnType<DiagramBuilder["build"]>;
3396
- };
3397
- /**
3398
- * mindMapRadial preset ... 中心 node を軸に 8 方向 (0°/45°/90°/135°/180°/225°/270°/315°)
3399
- * へ branch を放射状に配置する。 現行 mindMap (左から右へ水平 tree) と使い分ける用途。
3400
- *
3401
- * 実装戦略 ... engine の lane × stack grid を活用し、 3 lane (left / center / right) を
3402
- * radius に基づき explicit x で配置、 3 stack row (top / middle / bottom) を stack index 0/1/2 で
3403
- * 割当てる。 branch 順は position 順 (E/SE/S/SW/W/NW/N/NE) に固定し、 index → grid cell mapping。
3404
- *
3405
- * @example
3406
- * mindMapRadial({ id: "mr", topic: "Product Radial", centerTitle: "Product" })
3407
- * .branch({ id: "users", title: "Users" }) // 0° (right)
3408
- * .branch({ id: "road", title: "Roadmap" }) // 45° (bottom-right)
3409
- * .branch({ id: "metrics", title: "Metrics" }) // 90° (bottom)
3410
- * ...
3411
- * .build();
3412
- */
3413
- declare function mindMapRadial(preset: MindMapRadialPreset): MindMapRadialBuilder;
3414
3409
 
3415
- export { ARROW_ANGLE_MAX_DEG, ARROW_ENDPOINT_CENTER_TOL, type AnimationChain, type AuthorIntentOptions, type AuthorIntentReport, type BinaryOp, CHAIN_MIN_CLEARANCE, CHAIN_SHIFT_MAX_ACCUMULATED, CHAIN_SHIFT_MAX_ITER, CLEARANCE_LABEL_LABEL, CLEARANCE_LANE_LABEL, CLEARANCE_NODE_LABEL, CLEARANCE_PATH_LABEL, COLUMN_GAP_VARIANCE_TOL, CdlDiagram, CdlDiagramThumbnail, CdlEdge, type CdlEventHandler, CdlEventTarget, CdlInput, CdlLane, CdlNode, CdlScrollTrigger, CdlState, type ChartBuilder, type ChartDatum, type ChartPreset, type ChartType, type ClassDiagramBuilder, type ClassDiagramPreset, type ClassRelationType, Computed, DETOUR_GAP, DETOUR_SLOT_GAP, DIST_LABEL_PATH_MAX, DIST_LABEL_PATH_MIN, type DiagramAdapter, type DiagramBuilder, type Discrepancy, type DiscrepancyKind, type DomVerifyReport, EDGE_LABEL_TEXT, EDGE_STUB_OUT, type EdgeLabelLine, type EdgeLabelTextSpec, EdgeStyle, type ErBuilder, type ErEntity, type ErPreset, type ErRelation, type ErRelationCardinality, type EventAttachHandle, type EventChain, FAN_GAP, FONT_RENDER_TOLERANCE_WORLD, type FlowBuilder, type FlowPreset, type FlowStepInput, type FlowchartBuilder, type FlowchartEdge, type FlowchartNode, type FlowchartNodeShape, type FlowchartPreset, type FormulaAst, type FormulaContext, type FsmState, type FsmStateNested, type FsmTransition, type FsmTransitionExt, type FunnelBuilder, type FunnelPreset, type FunnelStage, type GanttBuilder, type GanttPreset, type GanttTask, type GenericDiagramSpec, type GenericDiscrepancy, type GenericDiscrepancyKind, type GenericVerifyOptions, type Rect as GeometryRect, type Segment as GeometrySegment, type InfraConnection, type InfraNode, type InfrastructureBuilder, type InfrastructurePreset, type InputChain, type IntentDiscrepancy, type IntentDiscrepancyKind, type JourneyEmotion, type JourneyStep, LABEL_INIT_CLEARANCE, LABEL_INIT_CLEARANCE_DOTTED_FLOW, LABEL_SIZE_TOLERANCE_WORLD, LABEL_TO_PATH_CLEARANCE, LANE_BORDER_CLEARANCE_TOL, LaidDiagram, LaidEdge, LaidNode, type LayoutWithValidationOptions, type LayoutWithValidationResult, MARKER_GLOW_RADIUS, MIN_COLUMN_ALIGNMENT_TOLERANCE, MIN_ROW_ALIGNMENT_TOLERANCE, type MathFnName, type MindBranch, type MindMapBuilder, type MindMapPreset, type MindMapRadialBranch, type MindMapRadialBuilder, type MindMapRadialPreset, NEAR_COLLISION_DEFAULT_MIN, NEAR_COLLISION_POLICY, NODE_FRAME_SELECTOR, type NetworkBuilder, type NetworkDevice, type NetworkDeviceKind, type NetworkLink, type NetworkPreset, NodeKind, type PageLike, type PhaseBuilder, type QuadrantBuilder, type QuadrantItem, type QuadrantPreset, type QuadrantQuadrantLabel, ROW_GAP_VARIANCE_TOL, SPEC_CLEARANCE_POLICY, STAGE_SVG_SELECTOR, type SequenceBuilder, type SequencePreset, type SequenceStep, Side, Signal, type StateMachine2Builder, type StateMachine2Preset, type StateMachineBuilder, type StateMachinePreset, type SweepReport, type SwimlanePreset, TARGET_LABEL_PATH_DIST, Tone, type TopologyBuilder, type TopologyConnection, type TopologyContainer, type TopologyGroupBuilder, type TopologyPreset, type TreeBuilder, type TreeNode, type TreePreset, type UmlClass, type UmlRelation, type UserJourneyBuilder, type UserJourneyPreset, type ValidateOptions, type ValidationProfile, type VerifyOptions, type Violation, type VisualAxis, type VisualValidationReport, WCAG_AA_LARGE, WCAG_AA_NORMAL, assertNever, attachEventHandlers, batch, bboxClearance, bboxDiffWorld, cdlAdapter, chart, classDiagram, compile, computeScrollProgress, computeViewportScale, countEdgeCrossings, createFormulaComputeds, createInputSignals, diagram, effect, er, evaluate as evaluateFormula, extractIdentifiers, flow, flowchart, funnel, gantt, infrastructure, inputDefaultValue, isLargeText, labelInitClearance, layout, layoutWithValidation, mindMap, mindMapRadial, network, parseFormula, pointRectEdgeDistance, pointToSegmentDistance, predictLabelBBoxWorld, predictNodeBBoxWorld, projectEdgeLabel, projectNode, projectPathSegment, pxToWorld, quadrant, rectRectClearance, rectRectOverlapArea, rendersRows, requiredContrastRatio, requiredNearClearance, requiredRowsHeight, requiredRowsWidth, requiredSpecClearance, resolveEdgeLabelOverlapsWithChain, resolveEdgeLabelOverlapsWithChainAndPropagate, resolveOverlapsWithChain, resolveTarget, resolveTargetAll, segmentsIntersect, sequence, stateMachine, stateMachine2, swimlane, topology, tree, untrack, userJourney, validate, verifyAllDiagramsDom, verifyAuthorIntent, verifyAuthorIntentAll, verifyDiagramDom, visualValidate, visualValidateAll, visualValidateLaid, worldToPx };
3410
+ export { ARROW_ANGLE_MAX_DEG, ARROW_ENDPOINT_CENTER_TOL, type AnimationChain, type AuthorIntentOptions, type AuthorIntentReport, type BinaryOp, CHAIN_MIN_CLEARANCE, CHAIN_SHIFT_MAX_ACCUMULATED, CHAIN_SHIFT_MAX_ITER, CLEARANCE_LABEL_LABEL, CLEARANCE_LANE_LABEL, CLEARANCE_NODE_LABEL, CLEARANCE_PATH_LABEL, COLUMN_GAP_VARIANCE_TOL, CdlDerivedValue, CdlDiagram, CdlDiagramThumbnail, CdlEdge, type CdlEventHandler, CdlEventTarget, CdlInput, CdlLane, CdlNode, CdlScrollTrigger, CdlState, type ChartBuilder, type ChartDatum, type ChartPreset, type ChartType, type ClassDiagramBuilder, type ClassDiagramPreset, type ClassRelationType, Computed, DETOUR_GAP, DETOUR_SLOT_GAP, DIST_LABEL_PATH_MAX, DIST_LABEL_PATH_MIN, type DerivedNotice, type DerivedNoticeKind, type DerivedResult, type DiagramAdapter, type DiagramBuilder, type Discrepancy, type DiscrepancyKind, type DomVerifyReport, EDGE_LABEL_TEXT, EDGE_STUB_OUT, type EdgeLabelLine, type EdgeLabelTextSpec, EdgeStyle, type ErBuilder, type ErEntity, type ErPreset, type ErRelation, type ErRelationCardinality, type EventAttachHandle, type EventChain, FAN_GAP, FONT_RENDER_TOLERANCE_WORLD, type FlowBuilder, type FlowPreset, type FlowStepInput, type FlowchartBuilder, type FlowchartEdge, type FlowchartNode, type FlowchartNodeShape, type FlowchartPreset, type FormulaAst, type FormulaContext, type FsmState, type FsmStateNested, type FsmTransition, type FsmTransitionExt, type FunnelBuilder, type FunnelPreset, type FunnelStage, type GanttBuilder, type GanttPreset, type GanttTask, type GenericDiagramSpec, type GenericDiscrepancy, type GenericDiscrepancyKind, type GenericVerifyOptions, type Rect as GeometryRect, type Segment as GeometrySegment, type InfraConnection, type InfraNode, type InfrastructureBuilder, type InfrastructurePreset, type InputChain, type IntentDiscrepancy, type IntentDiscrepancyKind, JourneyEmotion, type JourneyStep, LABEL_INIT_CLEARANCE, LABEL_INIT_CLEARANCE_DOTTED_FLOW, LABEL_SIZE_TOLERANCE_WORLD, LABEL_TO_PATH_CLEARANCE, LANE_BORDER_CLEARANCE_TOL, LaidDiagram, LaidEdge, LaidNode, type LayoutWithValidationOptions, type LayoutWithValidationResult, MARKER_GLOW_RADIUS, MIN_COLUMN_ALIGNMENT_TOLERANCE, MIN_ROW_ALIGNMENT_TOLERANCE, type MathFnName, type MindBranch, type MindMapBuilder, type MindMapPreset, NEAR_COLLISION_DEFAULT_MIN, NEAR_COLLISION_POLICY, NODE_FRAME_SELECTOR, type NetworkBuilder, type NetworkDevice, type NetworkDeviceKind, type NetworkLink, type NetworkPreset, NodeKind, type PageLike, type PhaseBuilder, type QuadrantBuilder, type QuadrantItem, type QuadrantPreset, type QuadrantQuadrantLabel, ROW_GAP_VARIANCE_TOL, SPEC_CLEARANCE_POLICY, STAGE_SVG_SELECTOR, type SequenceBuilder, type SequencePreset, type SequenceStep, Side, Signal, type StateMachine2Builder, type StateMachine2Preset, type StateMachineBuilder, type StateMachinePreset, type SweepReport, type SwimlanePreset, TARGET_LABEL_PATH_DIST, Tone, type TopologyBuilder, type TopologyConnection, type TopologyContainer, type TopologyGroupBuilder, type TopologyPreset, type TreeBuilder, type TreeNode, type TreePreset, type UmlClass, type UmlRelation, type UserJourneyBuilder, type UserJourneyPreset, type ValidateOptions, type ValidationProfile, type VerifyOptions, type Violation, type VisualAxis, type VisualValidationReport, WCAG_AA_LARGE, WCAG_AA_NORMAL, applyDerivedValues, assertNever, attachEventHandlers, batch, bboxClearance, bboxDiffWorld, cdlAdapter, chart, classDiagram, compile, computeScrollProgress, computeViewportScale, countEdgeCrossings, createFormulaComputeds, createInputSignals, diagram, effect, er, evaluate as evaluateFormula, extractIdentifiers, flow, flowchart, funnel, gantt, infrastructure, inputDefaultValue, isLargeText, labelInitClearance, layout, layoutWithValidation, mindMap, network, parseFormula, pointRectEdgeDistance, pointToSegmentDistance, predictLabelBBoxWorld, predictNodeBBoxWorld, projectEdgeLabel, projectNode, projectPathSegment, pxToWorld, quadrant, rectRectClearance, rectRectOverlapArea, rendersRows, requiredContrastRatio, requiredNearClearance, requiredRowsHeight, requiredRowsWidth, requiredSpecClearance, resolveEdgeLabelOverlapsWithChain, resolveEdgeLabelOverlapsWithChainAndPropagate, resolveOverlapsWithChain, resolveTarget, resolveTargetAll, segmentsIntersect, sequence, stateMachine, stateMachine2, swimlane, topology, tree, untrack, userJourney, validate, verifyAllDiagramsDom, verifyAuthorIntent, verifyAuthorIntentAll, verifyDiagramDom, visualValidate, visualValidateAll, visualValidateLaid, withDerivedValues, worldToPx };