@cardenelabs/cdl 0.60.0 → 0.61.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 EdgeRole, f as EdgeHead, g as EdgeHeadFill, h as CdlState, i as CdlEventTarget, j as CdlLang, k as Computed, l as CdlDerivedValue, m as CdlScrollTrigger, L as LaidDiagram, n as CdlDiagramViewProps, o as LaidEdge, p as LaidNode, q as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-MbIjRWdX.cjs';
2
- export { r as CdlDiagramView, s as CdlEventBinding, t as CdlEventKind, u as CdlFormula, v as CdlPhase, w as ChartPieForm, x as ChartSlopeForm, y as EDGE_HEADS, z as EDGE_HEAD_DEFAULT, A as EDGE_HEAD_FILLS, D as EDGE_HEAD_FILL_DEFAULT, F as EDGE_REVEALS, G as EDGE_REVEAL_DEFAULT, H as EDGE_STYLES, I as EdgeReveal, K as InteractiveHandlerMap, M as InteractiveSignalsAccessor, O as LaidLane, P as NODE_KINDS, U as RELATION_FOCUSES, V as RELATION_FOCUS_DEFAULT, W as RelationFocus, X as ScrollProgressHandle, Y as TONES, Z as computeEventBindingKey, _ as computeFormulaKey, $ as computeInputSignalKey, a0 as computeScrollTriggerKey, a1 as computed, a2 as createInteractiveSignalsAccessor, a3 as createScrollProgressHandle, a4 as createScrollProgressSignals, a5 as hasInteractivePrimitives, a6 as resolveLang, a7 as sequenceBoardMetrics, a8 as sequenceStepId, a9 as signal } from './render-MbIjRWdX.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 EdgeRole, f as EdgeHead, g as EdgeHeadFill, h as CdlState, i as CdlInputOption, j as CdlEventTarget, k as CdlLang, l as Computed, m as CdlDerivedValue, n as CdlScrollTrigger, L as LaidDiagram, o as CdlDiagramViewProps, p as LaidEdge, q as LaidNode, r as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-Dk8_6ua6.cjs';
2
+ export { s as CdlDiagramView, t as CdlEventBinding, u as CdlEventKind, v as CdlFormula, w as CdlPhase, x as ChartPieForm, y as ChartSlopeForm, z as EDGE_HEADS, A as EDGE_HEAD_DEFAULT, D as EDGE_HEAD_FILLS, F as EDGE_HEAD_FILL_DEFAULT, G as EDGE_REVEALS, H as EDGE_REVEAL_DEFAULT, I as EDGE_STYLES, K as EdgeReveal, M as InteractiveHandlerMap, O as InteractiveSignalsAccessor, P as LaidLane, U as NODE_KINDS, V as RELATION_FOCUSES, W as RELATION_FOCUS_DEFAULT, X as RelationFocus, Y as ScrollProgressHandle, Z as TONES, _ as computeEventBindingKey, $ as computeFormulaKey, a0 as computeInputSignalKey, a1 as computeScrollTriggerKey, a2 as computed, a3 as createInteractiveSignalsAccessor, a4 as createScrollProgressHandle, a5 as createScrollProgressSignals, a6 as hasInteractivePrimitives, a7 as resolveLang, a8 as sequenceBoardMetrics, a9 as sequenceStepId, aa as signal } from './render-Dk8_6ua6.cjs';
3
3
  import { JSX } from 'react';
4
4
 
5
5
  declare function effect(fn: () => void | (() => void)): () => void;
@@ -917,13 +917,15 @@ type InputChain = {
917
917
  label?: string;
918
918
  }) => DiagramBuilder;
919
919
  dropdown: (id: string, opts: {
920
- options: readonly string[];
920
+ options: readonly CdlInputOption[];
921
921
  defaultValue: string;
922
922
  label?: string;
923
923
  }) => DiagramBuilder;
924
924
  toggle: (id: string, opts: {
925
925
  defaultValue: boolean;
926
926
  label?: string;
927
+ onLabel?: string;
928
+ offLabel?: string;
927
929
  }) => DiagramBuilder;
928
930
  /** 2 軸 slider = XY pad、 単一 id で pointer position を保持 (x/y は同 signal に格納) */
929
931
  xypad: (id: string, opts: {
@@ -945,7 +947,7 @@ type InputChain = {
945
947
  }) => DiagramBuilder;
946
948
  /** 排他選択、 dropdown と同じ semantics だが視覚は横並び button */
947
949
  radio: (id: string, opts: {
948
- options: readonly string[];
950
+ options: readonly CdlInputOption[];
949
951
  defaultValue: string;
950
952
  label?: string;
951
953
  }) => DiagramBuilder;
@@ -975,12 +977,12 @@ type InputChain = {
975
977
  label?: string;
976
978
  }) => DiagramBuilder;
977
979
  multiSelect: (id: string, opts: {
978
- options: readonly string[];
980
+ options: readonly CdlInputOption[];
979
981
  defaultValues: readonly string[];
980
982
  label?: string;
981
983
  }) => DiagramBuilder;
982
984
  tabs: (id: string, opts: {
983
- options: readonly string[];
985
+ options: readonly CdlInputOption[];
984
986
  defaultValue: string;
985
987
  label?: string;
986
988
  }) => DiagramBuilder;
@@ -3925,6 +3927,14 @@ interface 関係を持つ線 {
3925
3927
  */
3926
3928
  declare function relatedFocusSet(edges: readonly 関係を持つ線[], nodeId: string): Set<string>;
3927
3929
 
3930
+ /** 1 つの入力欄の値ごとの名前。 `複数` は値を `,` でつないで持つ入力欄 (`multi-select`) */
3931
+ type 入力欄の名前 = {
3932
+ readonly 名前: ReadonlyMap<string, string>;
3933
+ readonly 複数: boolean;
3934
+ };
3935
+ /** 入力欄の id → 値ごとの名前の表。 名前を持つ入力欄だけを載せる */
3936
+ type 値の名前の表 = ReadonlyMap<string, 入力欄の名前>;
3937
+
3928
3938
  /**
3929
3939
  * 全 state の現時点 value を計算 (現在 phase + これまでの phase の最終 tween 値を集約)。
3930
3940
  * - set = 即時切替 (phase 到達で value 上書き、 lerp なし)
@@ -3944,7 +3954,11 @@ declare function computeStateValues(laid: LaidDiagram, phaseIdx: number, progres
3944
3954
  *
3945
3955
  * 名前に使える文字は `template-name.ts` が決める (engine 全体で 1 つ)。 ここだけで
3946
3956
  * 定義すると、 式を書ける側との間で「読めるが書けない」 「書けるが読めない」 名前ができる。
3957
+ *
3958
+ * `名前の表` を渡すと、 付け足しの無い `{id}` の値を入力欄の値ごとの名前で差し込む (#855)。
3959
+ * 渡すのは画面に字を描く所 (箱の題・副題・見出し・値・行) だけ。 表示の出し分けと数の差し込みは
3960
+ * 値を綴りのまま読む必要があるので渡さない。
3947
3961
  */
3948
- declare function interpolate(template: string, values: Record<string, string>): string;
3962
+ declare function interpolate(template: string, values: Record<string, string>, 名前の表?: 値の名前の表): string;
3949
3963
 
3950
- 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, CLASS_RELATION_LOOK, 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, CdlLang, 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, ER_CARDINALITY_HEAD, EdgeHead, EdgeHeadFill, type EdgeLabelLine, type EdgeLabelTextSpec, EdgeStyle, type ErBuilder, type ErColumn, type ErEntity, type ErPreset, type ErRelation, type ErRelationCardinality, type EventAttachHandle, type EventChain, FAN_GAP, FONT_RENDER_TOLERANCE_WORLD, FSM_ACTION_MARK, type FlowBuilder, type FlowPreset, type FlowStepInput, type FlowchartBuilder, type FlowchartEdge, type FlowchartNode, type FlowchartNodeShape, type FlowchartPreset, type FormulaAst, type FormulaContext, type FsmMark, type FsmState, type FsmStateAction, 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 OrderEdge, type OrderNode, type OrderResult, type PageLike, type PhaseBuilder, type QuadrantBuilder, type QuadrantItem, type QuadrantPreset, type QuadrantQuadrantLabel, ROW_GAP_VARIANCE_TOL, type ReferenceContainer, RowMark, SEQUENCE_MESSAGE_LOOK, SPEC_CLEARANCE_POLICY, STAGE_SVG_SELECTOR, type SequenceActor, type SequenceBuilder, type SequenceMessageKind, 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, computeStateValues, computeViewportScale, countEdgeCrossings, countOrderCrossings, createFormulaComputeds, createInputSignals, diagram, effect, er, evaluate as evaluateFormula, extractIdentifiers, flow, flowchart, funnel, gantt, infrastructure, inputDefaultValue, interpolate, isLargeText, labelInitClearance, layout, layoutWithValidation, mindMap, network, orderNodes, parseFormula, pointRectEdgeDistance, pointToSegmentDistance, predictLabelBBoxWorld, predictNodeBBoxWorld, projectEdgeLabel, projectNode, projectPathSegment, pxToWorld, quadrant, rectRectClearance, rectRectOverlapArea, relatedFocusSet, rendersRows, requiredContrastRatio, requiredNearClearance, requiredRowsHeight, requiredRowsWidth, requiredSpecClearance, resolveEdgeLabelOverlapsWithChain, resolveEdgeLabelOverlapsWithChainAndPropagate, resolveLabelClearanceAfterPathPasses, resolveOverlapsWithChain, resolveTarget, resolveTargetAll, segmentsIntersect, sequence, stateMachine, stateMachine2, swimlane, topology, tree, untrack, userJourney, validate, verifyAllDiagramsDom, verifyAuthorIntent, verifyAuthorIntentAll, verifyDiagramDom, visualValidate, visualValidateAll, visualValidateLaid, withDerivedValues, worldToPx, type 関係を持つ線 };
3964
+ 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, CLASS_RELATION_LOOK, CLEARANCE_LABEL_LABEL, CLEARANCE_LANE_LABEL, CLEARANCE_NODE_LABEL, CLEARANCE_PATH_LABEL, COLUMN_GAP_VARIANCE_TOL, CdlDerivedValue, CdlDiagram, CdlDiagramThumbnail, CdlEdge, type CdlEventHandler, CdlEventTarget, CdlInput, CdlInputOption, CdlLane, CdlLang, 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, ER_CARDINALITY_HEAD, EdgeHead, EdgeHeadFill, type EdgeLabelLine, type EdgeLabelTextSpec, EdgeStyle, type ErBuilder, type ErColumn, type ErEntity, type ErPreset, type ErRelation, type ErRelationCardinality, type EventAttachHandle, type EventChain, FAN_GAP, FONT_RENDER_TOLERANCE_WORLD, FSM_ACTION_MARK, type FlowBuilder, type FlowPreset, type FlowStepInput, type FlowchartBuilder, type FlowchartEdge, type FlowchartNode, type FlowchartNodeShape, type FlowchartPreset, type FormulaAst, type FormulaContext, type FsmMark, type FsmState, type FsmStateAction, 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 OrderEdge, type OrderNode, type OrderResult, type PageLike, type PhaseBuilder, type QuadrantBuilder, type QuadrantItem, type QuadrantPreset, type QuadrantQuadrantLabel, ROW_GAP_VARIANCE_TOL, type ReferenceContainer, RowMark, SEQUENCE_MESSAGE_LOOK, SPEC_CLEARANCE_POLICY, STAGE_SVG_SELECTOR, type SequenceActor, type SequenceBuilder, type SequenceMessageKind, 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, computeStateValues, computeViewportScale, countEdgeCrossings, countOrderCrossings, createFormulaComputeds, createInputSignals, diagram, effect, er, evaluate as evaluateFormula, extractIdentifiers, flow, flowchart, funnel, gantt, infrastructure, inputDefaultValue, interpolate, isLargeText, labelInitClearance, layout, layoutWithValidation, mindMap, network, orderNodes, parseFormula, pointRectEdgeDistance, pointToSegmentDistance, predictLabelBBoxWorld, predictNodeBBoxWorld, projectEdgeLabel, projectNode, projectPathSegment, pxToWorld, quadrant, rectRectClearance, rectRectOverlapArea, relatedFocusSet, rendersRows, requiredContrastRatio, requiredNearClearance, requiredRowsHeight, requiredRowsWidth, requiredSpecClearance, resolveEdgeLabelOverlapsWithChain, resolveEdgeLabelOverlapsWithChainAndPropagate, resolveLabelClearanceAfterPathPasses, resolveOverlapsWithChain, resolveTarget, resolveTargetAll, segmentsIntersect, sequence, stateMachine, stateMachine2, swimlane, topology, tree, untrack, userJourney, validate, verifyAllDiagramsDom, verifyAuthorIntent, verifyAuthorIntentAll, verifyDiagramDom, visualValidate, visualValidateAll, visualValidateLaid, withDerivedValues, worldToPx, type 関係を持つ線 };
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 EdgeRole, f as EdgeHead, g as EdgeHeadFill, h as CdlState, i as CdlEventTarget, j as CdlLang, k as Computed, l as CdlDerivedValue, m as CdlScrollTrigger, L as LaidDiagram, n as CdlDiagramViewProps, o as LaidEdge, p as LaidNode, q as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-MbIjRWdX.js';
2
- export { r as CdlDiagramView, s as CdlEventBinding, t as CdlEventKind, u as CdlFormula, v as CdlPhase, w as ChartPieForm, x as ChartSlopeForm, y as EDGE_HEADS, z as EDGE_HEAD_DEFAULT, A as EDGE_HEAD_FILLS, D as EDGE_HEAD_FILL_DEFAULT, F as EDGE_REVEALS, G as EDGE_REVEAL_DEFAULT, H as EDGE_STYLES, I as EdgeReveal, K as InteractiveHandlerMap, M as InteractiveSignalsAccessor, O as LaidLane, P as NODE_KINDS, U as RELATION_FOCUSES, V as RELATION_FOCUS_DEFAULT, W as RelationFocus, X as ScrollProgressHandle, Y as TONES, Z as computeEventBindingKey, _ as computeFormulaKey, $ as computeInputSignalKey, a0 as computeScrollTriggerKey, a1 as computed, a2 as createInteractiveSignalsAccessor, a3 as createScrollProgressHandle, a4 as createScrollProgressSignals, a5 as hasInteractivePrimitives, a6 as resolveLang, a7 as sequenceBoardMetrics, a8 as sequenceStepId, a9 as signal } from './render-MbIjRWdX.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 EdgeRole, f as EdgeHead, g as EdgeHeadFill, h as CdlState, i as CdlInputOption, j as CdlEventTarget, k as CdlLang, l as Computed, m as CdlDerivedValue, n as CdlScrollTrigger, L as LaidDiagram, o as CdlDiagramViewProps, p as LaidEdge, q as LaidNode, r as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-Dk8_6ua6.js';
2
+ export { s as CdlDiagramView, t as CdlEventBinding, u as CdlEventKind, v as CdlFormula, w as CdlPhase, x as ChartPieForm, y as ChartSlopeForm, z as EDGE_HEADS, A as EDGE_HEAD_DEFAULT, D as EDGE_HEAD_FILLS, F as EDGE_HEAD_FILL_DEFAULT, G as EDGE_REVEALS, H as EDGE_REVEAL_DEFAULT, I as EDGE_STYLES, K as EdgeReveal, M as InteractiveHandlerMap, O as InteractiveSignalsAccessor, P as LaidLane, U as NODE_KINDS, V as RELATION_FOCUSES, W as RELATION_FOCUS_DEFAULT, X as RelationFocus, Y as ScrollProgressHandle, Z as TONES, _ as computeEventBindingKey, $ as computeFormulaKey, a0 as computeInputSignalKey, a1 as computeScrollTriggerKey, a2 as computed, a3 as createInteractiveSignalsAccessor, a4 as createScrollProgressHandle, a5 as createScrollProgressSignals, a6 as hasInteractivePrimitives, a7 as resolveLang, a8 as sequenceBoardMetrics, a9 as sequenceStepId, aa as signal } from './render-Dk8_6ua6.js';
3
3
  import { JSX } from 'react';
4
4
 
5
5
  declare function effect(fn: () => void | (() => void)): () => void;
@@ -917,13 +917,15 @@ type InputChain = {
917
917
  label?: string;
918
918
  }) => DiagramBuilder;
919
919
  dropdown: (id: string, opts: {
920
- options: readonly string[];
920
+ options: readonly CdlInputOption[];
921
921
  defaultValue: string;
922
922
  label?: string;
923
923
  }) => DiagramBuilder;
924
924
  toggle: (id: string, opts: {
925
925
  defaultValue: boolean;
926
926
  label?: string;
927
+ onLabel?: string;
928
+ offLabel?: string;
927
929
  }) => DiagramBuilder;
928
930
  /** 2 軸 slider = XY pad、 単一 id で pointer position を保持 (x/y は同 signal に格納) */
929
931
  xypad: (id: string, opts: {
@@ -945,7 +947,7 @@ type InputChain = {
945
947
  }) => DiagramBuilder;
946
948
  /** 排他選択、 dropdown と同じ semantics だが視覚は横並び button */
947
949
  radio: (id: string, opts: {
948
- options: readonly string[];
950
+ options: readonly CdlInputOption[];
949
951
  defaultValue: string;
950
952
  label?: string;
951
953
  }) => DiagramBuilder;
@@ -975,12 +977,12 @@ type InputChain = {
975
977
  label?: string;
976
978
  }) => DiagramBuilder;
977
979
  multiSelect: (id: string, opts: {
978
- options: readonly string[];
980
+ options: readonly CdlInputOption[];
979
981
  defaultValues: readonly string[];
980
982
  label?: string;
981
983
  }) => DiagramBuilder;
982
984
  tabs: (id: string, opts: {
983
- options: readonly string[];
985
+ options: readonly CdlInputOption[];
984
986
  defaultValue: string;
985
987
  label?: string;
986
988
  }) => DiagramBuilder;
@@ -3925,6 +3927,14 @@ interface 関係を持つ線 {
3925
3927
  */
3926
3928
  declare function relatedFocusSet(edges: readonly 関係を持つ線[], nodeId: string): Set<string>;
3927
3929
 
3930
+ /** 1 つの入力欄の値ごとの名前。 `複数` は値を `,` でつないで持つ入力欄 (`multi-select`) */
3931
+ type 入力欄の名前 = {
3932
+ readonly 名前: ReadonlyMap<string, string>;
3933
+ readonly 複数: boolean;
3934
+ };
3935
+ /** 入力欄の id → 値ごとの名前の表。 名前を持つ入力欄だけを載せる */
3936
+ type 値の名前の表 = ReadonlyMap<string, 入力欄の名前>;
3937
+
3928
3938
  /**
3929
3939
  * 全 state の現時点 value を計算 (現在 phase + これまでの phase の最終 tween 値を集約)。
3930
3940
  * - set = 即時切替 (phase 到達で value 上書き、 lerp なし)
@@ -3944,7 +3954,11 @@ declare function computeStateValues(laid: LaidDiagram, phaseIdx: number, progres
3944
3954
  *
3945
3955
  * 名前に使える文字は `template-name.ts` が決める (engine 全体で 1 つ)。 ここだけで
3946
3956
  * 定義すると、 式を書ける側との間で「読めるが書けない」 「書けるが読めない」 名前ができる。
3957
+ *
3958
+ * `名前の表` を渡すと、 付け足しの無い `{id}` の値を入力欄の値ごとの名前で差し込む (#855)。
3959
+ * 渡すのは画面に字を描く所 (箱の題・副題・見出し・値・行) だけ。 表示の出し分けと数の差し込みは
3960
+ * 値を綴りのまま読む必要があるので渡さない。
3947
3961
  */
3948
- declare function interpolate(template: string, values: Record<string, string>): string;
3962
+ declare function interpolate(template: string, values: Record<string, string>, 名前の表?: 値の名前の表): string;
3949
3963
 
3950
- 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, CLASS_RELATION_LOOK, 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, CdlLang, 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, ER_CARDINALITY_HEAD, EdgeHead, EdgeHeadFill, type EdgeLabelLine, type EdgeLabelTextSpec, EdgeStyle, type ErBuilder, type ErColumn, type ErEntity, type ErPreset, type ErRelation, type ErRelationCardinality, type EventAttachHandle, type EventChain, FAN_GAP, FONT_RENDER_TOLERANCE_WORLD, FSM_ACTION_MARK, type FlowBuilder, type FlowPreset, type FlowStepInput, type FlowchartBuilder, type FlowchartEdge, type FlowchartNode, type FlowchartNodeShape, type FlowchartPreset, type FormulaAst, type FormulaContext, type FsmMark, type FsmState, type FsmStateAction, 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 OrderEdge, type OrderNode, type OrderResult, type PageLike, type PhaseBuilder, type QuadrantBuilder, type QuadrantItem, type QuadrantPreset, type QuadrantQuadrantLabel, ROW_GAP_VARIANCE_TOL, type ReferenceContainer, RowMark, SEQUENCE_MESSAGE_LOOK, SPEC_CLEARANCE_POLICY, STAGE_SVG_SELECTOR, type SequenceActor, type SequenceBuilder, type SequenceMessageKind, 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, computeStateValues, computeViewportScale, countEdgeCrossings, countOrderCrossings, createFormulaComputeds, createInputSignals, diagram, effect, er, evaluate as evaluateFormula, extractIdentifiers, flow, flowchart, funnel, gantt, infrastructure, inputDefaultValue, interpolate, isLargeText, labelInitClearance, layout, layoutWithValidation, mindMap, network, orderNodes, parseFormula, pointRectEdgeDistance, pointToSegmentDistance, predictLabelBBoxWorld, predictNodeBBoxWorld, projectEdgeLabel, projectNode, projectPathSegment, pxToWorld, quadrant, rectRectClearance, rectRectOverlapArea, relatedFocusSet, rendersRows, requiredContrastRatio, requiredNearClearance, requiredRowsHeight, requiredRowsWidth, requiredSpecClearance, resolveEdgeLabelOverlapsWithChain, resolveEdgeLabelOverlapsWithChainAndPropagate, resolveLabelClearanceAfterPathPasses, resolveOverlapsWithChain, resolveTarget, resolveTargetAll, segmentsIntersect, sequence, stateMachine, stateMachine2, swimlane, topology, tree, untrack, userJourney, validate, verifyAllDiagramsDom, verifyAuthorIntent, verifyAuthorIntentAll, verifyDiagramDom, visualValidate, visualValidateAll, visualValidateLaid, withDerivedValues, worldToPx, type 関係を持つ線 };
3964
+ 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, CLASS_RELATION_LOOK, CLEARANCE_LABEL_LABEL, CLEARANCE_LANE_LABEL, CLEARANCE_NODE_LABEL, CLEARANCE_PATH_LABEL, COLUMN_GAP_VARIANCE_TOL, CdlDerivedValue, CdlDiagram, CdlDiagramThumbnail, CdlEdge, type CdlEventHandler, CdlEventTarget, CdlInput, CdlInputOption, CdlLane, CdlLang, 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, ER_CARDINALITY_HEAD, EdgeHead, EdgeHeadFill, type EdgeLabelLine, type EdgeLabelTextSpec, EdgeStyle, type ErBuilder, type ErColumn, type ErEntity, type ErPreset, type ErRelation, type ErRelationCardinality, type EventAttachHandle, type EventChain, FAN_GAP, FONT_RENDER_TOLERANCE_WORLD, FSM_ACTION_MARK, type FlowBuilder, type FlowPreset, type FlowStepInput, type FlowchartBuilder, type FlowchartEdge, type FlowchartNode, type FlowchartNodeShape, type FlowchartPreset, type FormulaAst, type FormulaContext, type FsmMark, type FsmState, type FsmStateAction, 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 OrderEdge, type OrderNode, type OrderResult, type PageLike, type PhaseBuilder, type QuadrantBuilder, type QuadrantItem, type QuadrantPreset, type QuadrantQuadrantLabel, ROW_GAP_VARIANCE_TOL, type ReferenceContainer, RowMark, SEQUENCE_MESSAGE_LOOK, SPEC_CLEARANCE_POLICY, STAGE_SVG_SELECTOR, type SequenceActor, type SequenceBuilder, type SequenceMessageKind, 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, computeStateValues, computeViewportScale, countEdgeCrossings, countOrderCrossings, createFormulaComputeds, createInputSignals, diagram, effect, er, evaluate as evaluateFormula, extractIdentifiers, flow, flowchart, funnel, gantt, infrastructure, inputDefaultValue, interpolate, isLargeText, labelInitClearance, layout, layoutWithValidation, mindMap, network, orderNodes, parseFormula, pointRectEdgeDistance, pointToSegmentDistance, predictLabelBBoxWorld, predictNodeBBoxWorld, projectEdgeLabel, projectNode, projectPathSegment, pxToWorld, quadrant, rectRectClearance, rectRectOverlapArea, relatedFocusSet, rendersRows, requiredContrastRatio, requiredNearClearance, requiredRowsHeight, requiredRowsWidth, requiredSpecClearance, resolveEdgeLabelOverlapsWithChain, resolveEdgeLabelOverlapsWithChainAndPropagate, resolveLabelClearanceAfterPathPasses, resolveOverlapsWithChain, resolveTarget, resolveTargetAll, segmentsIntersect, sequence, stateMachine, stateMachine2, swimlane, topology, tree, untrack, userJourney, validate, verifyAllDiagramsDom, verifyAuthorIntent, verifyAuthorIntentAll, verifyDiagramDom, visualValidate, visualValidateAll, visualValidateLaid, withDerivedValues, worldToPx, type 関係を持つ線 };
package/dist/index.js CHANGED
@@ -1589,6 +1589,34 @@ function warn(message) {
1589
1589
  }
1590
1590
  }
1591
1591
 
1592
+ // src/input-option.ts
1593
+ function \u9078\u629E\u80A2\u306E\u5024(option) {
1594
+ return typeof option === "string" ? option : option.value;
1595
+ }
1596
+ function \u9078\u629E\u80A2\u306E\u540D\u524D(option) {
1597
+ return typeof option === "string" || option.label === "" ? \u9078\u629E\u80A2\u306E\u5024(option) : option.label;
1598
+ }
1599
+ function \u5024\u306E\u540D\u524D\u306E\u8868\u3092\u4F5C\u308B(inputs) {
1600
+ const \u8868 = /* @__PURE__ */ new Map();
1601
+ for (const input of inputs ?? []) {
1602
+ const \u540D\u524D = /* @__PURE__ */ new Map();
1603
+ if (input.kind === "dropdown" || input.kind === "radio" || input.kind === "tabs" || input.kind === "multi-select") {
1604
+ for (const option of input.options) {
1605
+ if (typeof option !== "string" && option.label !== "") \u540D\u524D.set(option.value, option.label);
1606
+ }
1607
+ } else if (input.kind === "toggle") {
1608
+ if (input.onLabel) \u540D\u524D.set("true", input.onLabel);
1609
+ if (input.offLabel) \u540D\u524D.set("false", input.offLabel);
1610
+ }
1611
+ if (\u540D\u524D.size > 0) \u8868.set(input.id, { \u540D\u524D, \u8907\u6570: input.kind === "multi-select" });
1612
+ }
1613
+ return \u8868;
1614
+ }
1615
+ function \u5024\u3092\u540D\u524D\u3067\u8AAD\u3080(\u5165\u529B\u6B04, \u5024) {
1616
+ if (!\u5165\u529B\u6B04.\u8907\u6570) return \u5165\u529B\u6B04.\u540D\u524D.get(\u5024) ?? \u5024;
1617
+ return \u5024.split(",").map((v) => \u5165\u529B\u6B04.\u540D\u524D.get(v) ?? v).join(",");
1618
+ }
1619
+
1592
1620
  // src/kinds/text-width.ts
1593
1621
  var WIDE_RATIO = 1.04;
1594
1622
  var NARROW_RATIO = 0.37;
@@ -2097,7 +2125,7 @@ function InputWidget({
2097
2125
  },
2098
2126
  "data-cdl-input": input.id,
2099
2127
  className: "cdl-ip-dropdown-select",
2100
- children: input.options.map((opt) => /* @__PURE__ */ jsx("option", { value: opt, children: opt }, opt))
2128
+ children: input.options.map((opt) => /* @__PURE__ */ jsx("option", { value: \u9078\u629E\u80A2\u306E\u5024(opt), children: \u9078\u629E\u80A2\u306E\u540D\u524D(opt) }, \u9078\u629E\u80A2\u306E\u5024(opt)))
2101
2129
  }
2102
2130
  )
2103
2131
  ] });
@@ -2114,17 +2142,17 @@ function InputWidget({
2114
2142
  {
2115
2143
  type: "radio",
2116
2144
  name: input.id,
2117
- value: opt,
2118
- checked: value === opt,
2145
+ value: \u9078\u629E\u80A2\u306E\u5024(opt),
2146
+ checked: value === \u9078\u629E\u80A2\u306E\u5024(opt),
2119
2147
  onChange: () => {
2120
- signal2.value = opt;
2148
+ signal2.value = \u9078\u629E\u80A2\u306E\u5024(opt);
2121
2149
  },
2122
2150
  "data-cdl-input": input.id,
2123
2151
  className: "cdl-ip-radio-input"
2124
2152
  }
2125
2153
  ),
2126
- /* @__PURE__ */ jsx("span", { className: "cdl-ip-radio-label", children: opt })
2127
- ] }, opt)) })
2154
+ /* @__PURE__ */ jsx("span", { className: "cdl-ip-radio-label", children: \u9078\u629E\u80A2\u306E\u540D\u524D(opt) })
2155
+ ] }, \u9078\u629E\u80A2\u306E\u5024(opt))) })
2128
2156
  ] });
2129
2157
  case "color":
2130
2158
  return /* @__PURE__ */ jsxs("label", { className: "cdl-ip-item cdl-ip-color", "data-cdl-input-kind": "color", children: [
@@ -2174,14 +2202,14 @@ function InputWidget({
2174
2202
  {
2175
2203
  type: "button",
2176
2204
  role: "tab",
2177
- className: `cdl-ip-tabs-btn ${value === opt ? "cdl-ip-tabs-active" : ""}`,
2205
+ className: `cdl-ip-tabs-btn ${value === \u9078\u629E\u80A2\u306E\u5024(opt) ? "cdl-ip-tabs-active" : ""}`,
2178
2206
  onClick: () => {
2179
- signal2.value = opt;
2207
+ signal2.value = \u9078\u629E\u80A2\u306E\u5024(opt);
2180
2208
  },
2181
2209
  "data-cdl-input": input.id,
2182
- children: opt
2210
+ children: \u9078\u629E\u80A2\u306E\u540D\u524D(opt)
2183
2211
  },
2184
- opt
2212
+ \u9078\u629E\u80A2\u306E\u5024(opt)
2185
2213
  )) })
2186
2214
  ] });
2187
2215
  case "datetime":
@@ -4236,13 +4264,13 @@ function MultiSelectWidget({
4236
4264
  "button",
4237
4265
  {
4238
4266
  type: "button",
4239
- className: `cdl-ip-multi-select-chip ${selected.has(opt) ? "cdl-ip-multi-select-active" : ""}`,
4240
- onClick: () => toggle(opt),
4267
+ className: `cdl-ip-multi-select-chip ${selected.has(\u9078\u629E\u80A2\u306E\u5024(opt)) ? "cdl-ip-multi-select-active" : ""}`,
4268
+ onClick: () => toggle(\u9078\u629E\u80A2\u306E\u5024(opt)),
4241
4269
  "data-cdl-input": input.id,
4242
- "data-cdl-multi-value": opt,
4243
- children: opt
4270
+ "data-cdl-multi-value": \u9078\u629E\u80A2\u306E\u5024(opt),
4271
+ children: \u9078\u629E\u80A2\u306E\u540D\u524D(opt)
4244
4272
  },
4245
- opt
4273
+ \u9078\u629E\u80A2\u306E\u5024(opt)
4246
4274
  )) })
4247
4275
  ] });
4248
4276
  }
@@ -10128,9 +10156,9 @@ function diagram(id, options) {
10128
10156
  if (opts.options.length === 0) {
10129
10157
  throw new Error(`input.dropdown '${inputId}' \u306E options \u304C\u7A7A\u3067\u3059 (\u6700\u4F4E 1 \u4EF6\u5FC5\u8981)`);
10130
10158
  }
10131
- if (!opts.options.includes(opts.defaultValue)) {
10159
+ if (!opts.options.some((o) => \u9078\u629E\u80A2\u306E\u5024(o) === opts.defaultValue)) {
10132
10160
  throw new Error(
10133
- `input.dropdown '${inputId}' \u306E defaultValue '${opts.defaultValue}' \u304C options \u306B\u542B\u307E\u308C\u307E\u305B\u3093 (options: ${opts.options.join(", ")})`
10161
+ `input.dropdown '${inputId}' \u306E defaultValue '${opts.defaultValue}' \u304C options \u306E\u5024\u306B\u542B\u307E\u308C\u307E\u305B\u3093 (options: ${opts.options.map(\u9078\u629E\u80A2\u306E\u5024).join(", ")})`
10134
10162
  );
10135
10163
  }
10136
10164
  inputs.push({
@@ -10148,6 +10176,9 @@ function diagram(id, options) {
10148
10176
  id: inputId,
10149
10177
  kind: "toggle",
10150
10178
  defaultValue: opts.defaultValue,
10179
+ // 名前を渡さない切り替えは変更前と同じ形に保つ (空の名前も渡さないのと同じ)
10180
+ ...opts.onLabel ? { onLabel: opts.onLabel } : {},
10181
+ ...opts.offLabel ? { offLabel: opts.offLabel } : {},
10151
10182
  label: opts.label
10152
10183
  });
10153
10184
  return api;
@@ -10215,9 +10246,9 @@ function diagram(id, options) {
10215
10246
  if (opts.options.length === 0) {
10216
10247
  throw new Error(`input.radio '${inputId}' \u306E options \u304C\u7A7A\u3067\u3059`);
10217
10248
  }
10218
- if (!opts.options.includes(opts.defaultValue)) {
10249
+ if (!opts.options.some((o) => \u9078\u629E\u80A2\u306E\u5024(o) === opts.defaultValue)) {
10219
10250
  throw new Error(
10220
- `input.radio '${inputId}' \u306E defaultValue '${opts.defaultValue}' \u304C options \u306B\u542B\u307E\u308C\u307E\u305B\u3093`
10251
+ `input.radio '${inputId}' \u306E defaultValue '${opts.defaultValue}' \u304C options \u306E\u5024\u306B\u542B\u307E\u308C\u307E\u305B\u3093`
10221
10252
  );
10222
10253
  }
10223
10254
  inputs.push({
@@ -10302,8 +10333,8 @@ function diagram(id, options) {
10302
10333
  if (opts.options.length === 0) {
10303
10334
  throw new Error(`input.tabs '${inputId}' \u306E options \u304C\u7A7A\u3067\u3059`);
10304
10335
  }
10305
- if (!opts.options.includes(opts.defaultValue)) {
10306
- throw new Error(`input.tabs '${inputId}' \u306E defaultValue \u304C options \u306B\u542B\u307E\u308C\u307E\u305B\u3093`);
10336
+ if (!opts.options.some((o) => \u9078\u629E\u80A2\u306E\u5024(o) === opts.defaultValue)) {
10337
+ throw new Error(`input.tabs '${inputId}' \u306E defaultValue \u304C options \u306E\u5024\u306B\u542B\u307E\u308C\u307E\u305B\u3093`);
10307
10338
  }
10308
10339
  inputs.push({
10309
10340
  id: inputId,
@@ -14934,11 +14965,14 @@ function mergeStateValues(base, overrides) {
14934
14965
  }
14935
14966
  return merged;
14936
14967
  }
14937
- function interpolate(template, values) {
14968
+ function interpolate(template, values, \u540D\u524D\u306E\u8868) {
14938
14969
  return template.replace(TEMPLATE_REF_RE, (_, id, accessor) => {
14939
14970
  const raw = Object.hasOwn(values, id) ? values[id] : void 0;
14940
14971
  if (raw === void 0) return `{${id}${accessor ?? ""}}`;
14941
- if (!accessor) return raw;
14972
+ if (!accessor) {
14973
+ const \u5165\u529B\u6B04 = \u540D\u524D\u306E\u8868?.get(id);
14974
+ return \u5165\u529B\u6B04 ? \u5024\u3092\u540D\u524D\u3067\u8AAD\u3080(\u5165\u529B\u6B04, raw) : raw;
14975
+ }
14942
14976
  const arr = parseArraySignal(raw);
14943
14977
  if (!arr) return `{${id}${accessor}}`;
14944
14978
  if (accessor === ".length") return String(arr.length);
@@ -24582,7 +24616,8 @@ function GenericNode({
24582
24616
  node,
24583
24617
  active,
24584
24618
  value,
24585
- stateValues
24619
+ stateValues,
24620
+ \u5024\u306E\u540D\u524D
24586
24621
  }) {
24587
24622
  const base = STYLES[node.kind] ?? FALLBACK;
24588
24623
  const toned = toneColor3(node.tone);
@@ -24668,7 +24703,7 @@ function GenericNode({
24668
24703
  style.look === "ledger" && /* @__PURE__ */ jsx("line", { x1: 1, y1: h - 7, x2: w - 1, y2: h - 7, stroke: paint.stroke, strokeWidth: 1 })
24669
24704
  ] });
24670
24705
  })();
24671
- const resolvedValue = value !== void 0 ? interpolate(value, stateValues) : void 0;
24706
+ const resolvedValue = value !== void 0 ? interpolate(value, stateValues, \u5024\u306E\u540D\u524D) : void 0;
24672
24707
  const hasRows = (node.rows?.length ?? 0) > 0;
24673
24708
  const centered = genericTextCentered(node.kind, hasRows);
24674
24709
  const textAnchor = centered ? "middle" : "start";
@@ -24718,7 +24753,7 @@ function GenericNode({
24718
24753
  }
24719
24754
  ),
24720
24755
  node.rows && node.rows.length > 0 && (() => {
24721
- const resolved = node.rows.map((row) => interpolate(row, stateValues));
24756
+ const resolved = node.rows.map((row) => interpolate(row, stateValues, \u5024\u306E\u540D\u524D));
24722
24757
  const splits = resolved.map(splitRow);
24723
24758
  const leftMaxWidth = splits.reduce(
24724
24759
  (m, s) => Math.max(m, rowColumnWidth(s.left, GENERIC_ROW_LEFT_SIZE_PX, false)),
@@ -31383,10 +31418,11 @@ function CdlNodeView({
31383
31418
  currentPhaseId,
31384
31419
  chartLineScale,
31385
31420
  \u95A2\u4FC2\u306E\u53D7\u3051\u53E3,
31386
- lang
31421
+ lang,
31422
+ \u5024\u306E\u540D\u524D
31387
31423
  }) {
31388
- const value = node.value ? interpolate(node.value, stateValues) : void 0;
31389
- const rows = (node.rows ?? []).map((r) => interpolate(r, stateValues));
31424
+ const value = node.value ? interpolate(node.value, stateValues, \u5024\u306E\u540D\u524D) : void 0;
31425
+ const rows = (node.rows ?? []).map((r) => interpolate(r, stateValues, \u5024\u306E\u540D\u524D));
31390
31426
  const boundW = node.wBind ? resolveNumericAttr(node.wBind, stateValues, node.w) : node.w;
31391
31427
  const boundH = node.hBind ? resolveNumericAttr(node.hBind, stateValues, node.h) : node.h;
31392
31428
  const boundOpacity = node.opacity !== void 0 ? Math.min(1, Math.max(0, resolveNumericAttr(node.opacity, stateValues, 1))) : void 0;
@@ -31400,9 +31436,9 @@ function CdlNodeView({
31400
31436
  }
31401
31437
  const resolvedNode = {
31402
31438
  ...node,
31403
- title: interpolate(node.title, stateValues),
31404
- subtitle: node.subtitle ? interpolate(node.subtitle, stateValues) : node.subtitle,
31405
- eyebrow: node.eyebrow ? interpolate(node.eyebrow, stateValues) : node.eyebrow,
31439
+ title: interpolate(node.title, stateValues, \u5024\u306E\u540D\u524D),
31440
+ subtitle: node.subtitle ? interpolate(node.subtitle, stateValues, \u5024\u306E\u540D\u524D) : node.subtitle,
31441
+ eyebrow: node.eyebrow ? interpolate(node.eyebrow, stateValues, \u5024\u306E\u540D\u524D) : node.eyebrow,
31406
31442
  w: boundW,
31407
31443
  h: boundH
31408
31444
  };
@@ -31683,7 +31719,7 @@ function CdlNodeView({
31683
31719
  case "mark-end":
31684
31720
  return /* @__PURE__ */ jsx(MarkEndNode, { node: resolvedNode, active });
31685
31721
  default:
31686
- return /* @__PURE__ */ jsx(GenericNode, { node: resolvedNode, active, value: node.value, stateValues });
31722
+ return /* @__PURE__ */ jsx(GenericNode, { node: resolvedNode, active, value: node.value, stateValues, \u5024\u306E\u540D\u524D });
31687
31723
  }
31688
31724
  })();
31689
31725
  const offsetX = node.renderOffsetX !== void 0 ? resolveNumericAttr(node.renderOffsetX, stateValues, 0) : 0;
@@ -31765,7 +31801,8 @@ function CdlStage({
31765
31801
  stateValues,
31766
31802
  debug,
31767
31803
  compact = false,
31768
- svgRef
31804
+ svgRef,
31805
+ \u5024\u306E\u540D\u524D
31769
31806
  }) {
31770
31807
  const [\u7126\u70B9, set\u7126\u70B9] = useState(null);
31771
31808
  const \u95A2\u4FC2\u3092\u5149\u3089\u305B\u308B = (laid.relationFocus ?? RELATION_FOCUS_DEFAULT) === "hover";
@@ -32045,6 +32082,7 @@ function CdlStage({
32045
32082
  drawing: \u63CF\u304F,
32046
32083
  progress: \u63CF\u304F ? \u63CF\u304F\u9032\u307F : progress,
32047
32084
  stateValues,
32085
+ \u5024\u306E\u540D\u524D,
32048
32086
  currentPhaseId: currentPhase?.id,
32049
32087
  chartLineScale: chartLineScales.get(node.id)
32050
32088
  }
@@ -32286,6 +32324,7 @@ function CdlDiagramView({ diagram: diagram2, laid: laidProp, hideHeader = false,
32286
32324
  if (!isInteractive) return baseStateValues;
32287
32325
  return mergeStateValues(baseStateValues, interactive.stateOverrides);
32288
32326
  }, [isInteractive, baseStateValues, interactive.stateOverrides]);
32327
+ const \u5024\u306E\u540D\u524D = useMemo(() => \u5024\u306E\u540D\u524D\u306E\u8868\u3092\u4F5C\u308B(diagram2.inputs), [diagram2.inputs]);
32289
32328
  return /* @__PURE__ */ jsxs(
32290
32329
  "div",
32291
32330
  {
@@ -32314,7 +32353,7 @@ function CdlDiagramView({ diagram: diagram2, laid: laidProp, hideHeader = false,
32314
32353
  }
32315
32354
  ),
32316
32355
  isInteractive && interactive.panel,
32317
- /* @__PURE__ */ jsx(CdlStage, { laid, currentPhase, progress, drawProgress, stateValues, debug, compact: hideHeader, svgRef: isInteractive ? interactive.svgRef : void 0 }),
32356
+ /* @__PURE__ */ jsx(CdlStage, { laid, currentPhase, progress, drawProgress, stateValues, \u5024\u306E\u540D\u524D, debug, compact: hideHeader, svgRef: isInteractive ? interactive.svgRef : void 0 }),
32318
32357
  hideHeader && !hideMiniPhaseIndicator && currentPhase && laid.phases.length > 1 && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 border-t border-[var(--cdl-divider,#d4d4d8)]/40 bg-[var(--cdl-stage-bg,#f1f5f9)]/50 px-3 py-2 text-xs", children: [
32319
32358
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
32320
32359
  laid.phases.map((p, i) => /* @__PURE__ */ jsx(