@cardenelabs/cdl 0.44.0 → 0.46.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
@@ -1597,10 +1597,30 @@ type VisualAxis = "node-visibility" | "edge-label-overlap" | "edge-label-proximi
1597
1597
  * 「見本に SEO の軸を課さない」 契約を先に置くもの。
1598
1598
  */
1599
1599
  type ValidationProfile = "production" | "catalog";
1600
+ /**
1601
+ * 図を描く器 (px)。 軸 23 `responsive-viewport` が画面上の字の大きさを出す時に使う。
1602
+ *
1603
+ * **高さは省ける**。 幅にだけ合わせて縦は巻き取る器があるため = 0 や無限大で表すと
1604
+ * 「上限が無い」 と「潰れている」 が同じ値になる (`rules/quality.md § 判定できなかったことを
1605
+ * 値に潰さない` と同じ形)。
1606
+ */
1607
+ interface ReferenceContainer {
1608
+ /** 器の幅 (px)。 正の有限値。 */
1609
+ readonly width: number;
1610
+ /** 器の高さ (px)。 正の有限値。 **上限が無い器では省く**。 */
1611
+ readonly height?: number;
1612
+ }
1600
1613
  /** 検査の設定。 */
1601
1614
  interface ValidateOptions {
1602
1615
  /** 検査の用途。 既定は `production` (全ての軸を見る)。 */
1603
1616
  profile?: ValidationProfile;
1617
+ /**
1618
+ * 軸 23 `responsive-viewport` が基準にする器。
1619
+ *
1620
+ * 既定は下流の見本帳の拡大表示を画面で測った値 (1150 × 630px)。
1621
+ * 実際の器は呼び出し側が決めるものなので、別の見せ方を測る時はここで渡す。
1622
+ */
1623
+ container?: ReferenceContainer;
1604
1624
  }
1605
1625
  interface VisualValidationReport {
1606
1626
  diagramId: string;
@@ -3871,4 +3891,4 @@ declare function computeStateValues(laid: LaidDiagram, phaseIdx: number, progres
3871
3891
  */
3872
3892
  declare function interpolate(template: string, values: Record<string, string>): string;
3873
3893
 
3874
- 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, 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, 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, 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 };
3894
+ 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, 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, 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 };
package/dist/index.d.ts CHANGED
@@ -1597,10 +1597,30 @@ type VisualAxis = "node-visibility" | "edge-label-overlap" | "edge-label-proximi
1597
1597
  * 「見本に SEO の軸を課さない」 契約を先に置くもの。
1598
1598
  */
1599
1599
  type ValidationProfile = "production" | "catalog";
1600
+ /**
1601
+ * 図を描く器 (px)。 軸 23 `responsive-viewport` が画面上の字の大きさを出す時に使う。
1602
+ *
1603
+ * **高さは省ける**。 幅にだけ合わせて縦は巻き取る器があるため = 0 や無限大で表すと
1604
+ * 「上限が無い」 と「潰れている」 が同じ値になる (`rules/quality.md § 判定できなかったことを
1605
+ * 値に潰さない` と同じ形)。
1606
+ */
1607
+ interface ReferenceContainer {
1608
+ /** 器の幅 (px)。 正の有限値。 */
1609
+ readonly width: number;
1610
+ /** 器の高さ (px)。 正の有限値。 **上限が無い器では省く**。 */
1611
+ readonly height?: number;
1612
+ }
1600
1613
  /** 検査の設定。 */
1601
1614
  interface ValidateOptions {
1602
1615
  /** 検査の用途。 既定は `production` (全ての軸を見る)。 */
1603
1616
  profile?: ValidationProfile;
1617
+ /**
1618
+ * 軸 23 `responsive-viewport` が基準にする器。
1619
+ *
1620
+ * 既定は下流の見本帳の拡大表示を画面で測った値 (1150 × 630px)。
1621
+ * 実際の器は呼び出し側が決めるものなので、別の見せ方を測る時はここで渡す。
1622
+ */
1623
+ container?: ReferenceContainer;
1604
1624
  }
1605
1625
  interface VisualValidationReport {
1606
1626
  diagramId: string;
@@ -3871,4 +3891,4 @@ declare function computeStateValues(laid: LaidDiagram, phaseIdx: number, progres
3871
3891
  */
3872
3892
  declare function interpolate(template: string, values: Record<string, string>): string;
3873
3893
 
3874
- 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, 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, 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, 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 };
3894
+ 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, 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, 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 };
package/dist/index.js CHANGED
@@ -15498,6 +15498,27 @@ var SKIPPED_AXES = {
15498
15498
  production: /* @__PURE__ */ new Set(),
15499
15499
  catalog: /* @__PURE__ */ new Set(["seo-metadata-quality", "structured-data-extraction"])
15500
15500
  };
15501
+ var \u65E2\u5B9A\u306E\u5668 = {
15502
+ /**
15503
+ * 拡大表示の枠は `min(1200px, 94vw)` で、中身は 1px の縁と 24px の余白の内側に描かれる。
15504
+ * 画面が 1280px 以上なら 1200 が効くので、そこから縁 2 枚と余白 2 枚を引く。
15505
+ */
15506
+ width: 1200 - 1 * 2 - 24 * 2,
15507
+ /** 同じ拡大表示の高さの頭打ち (`90vh − 180px`) を、基準の画面の高さ 900px で評価した値。 */
15508
+ height: 900 * 0.9 - 180
15509
+ };
15510
+ function \u5668\u3092\u78BA\u304B\u3081\u308B(c) {
15511
+ if (c === void 0) return { \u5E45: \u65E2\u5B9A\u306E\u5668.width, \u9AD8\u3055: \u65E2\u5B9A\u306E\u5668.height };
15512
+ if (!(c.width > 0) || !Number.isFinite(c.width)) {
15513
+ throw new Error(`container.width \u304C\u63CF\u753B\u4E0D\u80FD (\u6B63\u306E\u6709\u9650\u5024\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308B): ${c.width}`);
15514
+ }
15515
+ if (c.height !== void 0 && (!(c.height > 0) || !Number.isFinite(c.height))) {
15516
+ throw new Error(
15517
+ `container.height \u304C\u63CF\u753B\u4E0D\u80FD (\u6B63\u306E\u6709\u9650\u5024\u3067\u6E21\u3059\u304B\u3001\u4E0A\u9650\u304C\u7121\u3044\u306A\u3089\u7701\u304F): ${c.height}`
15518
+ );
15519
+ }
15520
+ return { \u5E45: c.width, \u9AD8\u3055: c.height };
15521
+ }
15501
15522
  var MIN_NODE_W = 80;
15502
15523
  var MIN_NODE_H = 40;
15503
15524
  var ROW_FORMAT = /^[^:]+:\s*.+$/;
@@ -15969,7 +15990,16 @@ function visualValidateLaid(laid, diag, opts) {
15969
15990
  violations.push({ axis, diagramId: safeDiagramId(diag), detail, severity });
15970
15991
  counts[axis]++;
15971
15992
  };
15972
- return visualValidateInner(laid, diag, violations, counts, push, profile, [...skipped]);
15993
+ return visualValidateInner(
15994
+ laid,
15995
+ diag,
15996
+ violations,
15997
+ counts,
15998
+ push,
15999
+ profile,
16000
+ [...skipped],
16001
+ \u5668\u3092\u78BA\u304B\u3081\u308B(opts?.container)
16002
+ );
15973
16003
  }
15974
16004
  function visualValidate(diag, opts) {
15975
16005
  const violations = [];
@@ -16006,7 +16036,16 @@ function visualValidate(diag, opts) {
16006
16036
  } finally {
16007
16037
  console.warn = origWarn;
16008
16038
  }
16009
- return visualValidateInner(laid, safeDiag, violations, counts, push, profile, [...skipped]);
16039
+ return visualValidateInner(
16040
+ laid,
16041
+ safeDiag,
16042
+ violations,
16043
+ counts,
16044
+ push,
16045
+ profile,
16046
+ [...skipped],
16047
+ \u5668\u3092\u78BA\u304B\u3081\u308B(opts?.container)
16048
+ );
16010
16049
  }
16011
16050
  var VALIDATED_ARRAY_FIELDS = [
16012
16051
  ["laid", "lanes"],
@@ -16206,7 +16245,7 @@ function normalizeForValidation(value, problems, owner) {
16206
16245
  }
16207
16246
  return next;
16208
16247
  }
16209
- function visualValidateInner(laid, diag, violations, counts, push, profile, skippedAxes) {
16248
+ function visualValidateInner(laid, diag, violations, counts, push, profile, skippedAxes, \u5668) {
16210
16249
  const problems = findMalformedInput(laid, diag);
16211
16250
  for (const p of problems) push("malformed-input", p.detail, "error");
16212
16251
  if (problems.length > 0) {
@@ -16214,7 +16253,7 @@ function visualValidateInner(laid, diag, violations, counts, push, profile, skip
16214
16253
  diag = normalizeForValidation(diag, problems, "diag");
16215
16254
  }
16216
16255
  try {
16217
- return runAxes(laid, diag, violations, counts, push, profile, skippedAxes);
16256
+ return runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5668);
16218
16257
  } catch (err) {
16219
16258
  const known = counts["malformed-input"] > 0;
16220
16259
  const axis = known ? "malformed-input" : "validation-interrupted";
@@ -16227,7 +16266,7 @@ function visualValidateInner(laid, diag, violations, counts, push, profile, skip
16227
16266
  return { diagramId: safeDiagramId(diag), ok: false, violations, counts, profile, skippedAxes };
16228
16267
  }
16229
16268
  }
16230
- function runAxes(laid, diag, violations, counts, push, profile, skippedAxes) {
16269
+ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5668) {
16231
16270
  const LIFELINE_W_THRESHOLD = 8;
16232
16271
  for (const n of laid.nodes) {
16233
16272
  if (n.w < LIFELINE_W_THRESHOLD) continue;
@@ -16927,14 +16966,8 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes) {
16927
16966
  } catch {
16928
16967
  }
16929
16968
  }
16930
- const RESPONSIVE_REF_FRAME_W_PX = 1200;
16931
- const RESPONSIVE_REF_FRAME_BORDER_PX = 1;
16932
- const RESPONSIVE_REF_FRAME_PAD_PX = 24;
16933
- const RESPONSIVE_REF_CONTAINER_W_PX = RESPONSIVE_REF_FRAME_W_PX - RESPONSIVE_REF_FRAME_BORDER_PX * 2 - RESPONSIVE_REF_FRAME_PAD_PX * 2;
16934
- const RESPONSIVE_REF_VIEWPORT_H_PX = 900;
16935
- const RESPONSIVE_REF_FRAME_H_RATIO = 0.9;
16936
- const RESPONSIVE_REF_CHROME_H_PX = 180;
16937
- const RESPONSIVE_REF_CONTAINER_H_PX = RESPONSIVE_REF_VIEWPORT_H_PX * RESPONSIVE_REF_FRAME_H_RATIO - RESPONSIVE_REF_CHROME_H_PX;
16969
+ const RESPONSIVE_REF_CONTAINER_W_PX = \u5668.\u5E45;
16970
+ const RESPONSIVE_REF_CONTAINER_H_PX = \u5668.\u9AD8\u3055;
16938
16971
  const RESPONSIVE_MIN_ON_SCREEN_FONT_PX = 12;
16939
16972
  const RESPONSIVE_BASE_FONT_WORLD = 22;
16940
16973
  const vbResp = laid.viewBox;
@@ -16946,15 +16979,16 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes) {
16946
16979
  );
16947
16980
  } else {
16948
16981
  const \u6A2A\u306E\u500D\u7387 = RESPONSIVE_REF_CONTAINER_W_PX / vbResp.w;
16949
- const \u7E26\u306E\u500D\u7387 = RESPONSIVE_REF_CONTAINER_H_PX / vbResp.h;
16982
+ const \u7E26\u306E\u500D\u7387 = RESPONSIVE_REF_CONTAINER_H_PX === void 0 ? Number.POSITIVE_INFINITY : RESPONSIVE_REF_CONTAINER_H_PX / vbResp.h;
16950
16983
  const \u500D\u7387 = Math.min(\u6A2A\u306E\u500D\u7387, \u7E26\u306E\u500D\u7387);
16951
16984
  const \u753B\u9762\u4E0A\u306E\u5B57 = RESPONSIVE_BASE_FONT_WORLD * \u500D\u7387;
16952
16985
  if (\u753B\u9762\u4E0A\u306E\u5B57 < RESPONSIVE_MIN_ON_SCREEN_FONT_PX) {
16953
16986
  const \u52B9\u304F\u8FBA = \u6A2A\u306E\u500D\u7387 <= \u7E26\u306E\u500D\u7387 ? "\u6A2A" : "\u7E26";
16954
- const \u53CE\u307E\u308B\u5BF8\u6CD5 = \u52B9\u304F\u8FBA === "\u6A2A" ? `\u5E45 ${(RESPONSIVE_REF_CONTAINER_W_PX * RESPONSIVE_BASE_FONT_WORLD / RESPONSIVE_MIN_ON_SCREEN_FONT_PX).toFixed(0)} \u4EE5\u4E0B` : `\u9AD8\u3055 ${(RESPONSIVE_REF_CONTAINER_H_PX * RESPONSIVE_BASE_FONT_WORLD / RESPONSIVE_MIN_ON_SCREEN_FONT_PX).toFixed(0)} \u4EE5\u4E0B`;
16987
+ const \u53CE\u307E\u308B\u5BF8\u6CD5 = \u52B9\u304F\u8FBA === "\u6A2A" || RESPONSIVE_REF_CONTAINER_H_PX === void 0 ? `\u5E45 ${(RESPONSIVE_REF_CONTAINER_W_PX * RESPONSIVE_BASE_FONT_WORLD / RESPONSIVE_MIN_ON_SCREEN_FONT_PX).toFixed(0)} \u4EE5\u4E0B` : `\u9AD8\u3055 ${(RESPONSIVE_REF_CONTAINER_H_PX * RESPONSIVE_BASE_FONT_WORLD / RESPONSIVE_MIN_ON_SCREEN_FONT_PX).toFixed(0)} \u4EE5\u4E0B`;
16988
+ const \u5668\u306E\u66F8\u304D\u65B9 = RESPONSIVE_REF_CONTAINER_H_PX === void 0 ? `\u5668 \u5E45 ${RESPONSIVE_REF_CONTAINER_W_PX}px (\u9AD8\u3055\u306E\u4E0A\u9650\u306A\u3057)` : `\u5668 ${RESPONSIVE_REF_CONTAINER_W_PX}\xD7${RESPONSIVE_REF_CONTAINER_H_PX}px`;
16955
16989
  push(
16956
16990
  "responsive-viewport",
16957
- `viewBox ${vbResp.w}\xD7${vbResp.h} \u306F\u5668 ${RESPONSIVE_REF_CONTAINER_W_PX}\xD7${RESPONSIVE_REF_CONTAINER_H_PX}px \u3067 ${\u500D\u7387.toFixed(3)} \u500D\u306B\u7E2E\u307F\u3001 \u7BB1\u306E\u984C\u304C ${\u753B\u9762\u4E0A\u306E\u5B57.toFixed(1)}px \u306B\u306A\u308B (\u4E0B\u9650 ${RESPONSIVE_MIN_ON_SCREEN_FONT_PX}px\u3001 \u500D\u7387\u3092\u6C7A\u3081\u305F\u306E\u306F ${\u52B9\u304F\u8FBA}\u3001 ${\u53CE\u307E\u308B\u5BF8\u6CD5}\u306B\u3059\u308B\u3068\u5C4A\u304F)`,
16991
+ `viewBox ${vbResp.w}\xD7${vbResp.h} \u306F${\u5668\u306E\u66F8\u304D\u65B9} \u3067 ${\u500D\u7387.toFixed(3)} \u500D\u306B\u7E2E\u307F\u3001 \u7BB1\u306E\u984C\u304C ${\u753B\u9762\u4E0A\u306E\u5B57.toFixed(1)}px \u306B\u306A\u308B (\u4E0B\u9650 ${RESPONSIVE_MIN_ON_SCREEN_FONT_PX}px\u3001 \u500D\u7387\u3092\u6C7A\u3081\u305F\u306E\u306F ${\u52B9\u304F\u8FBA}\u3001 ${\u53CE\u307E\u308B\u5BF8\u6CD5}\u306B\u3059\u308B\u3068\u5C4A\u304F)`,
16958
16992
  "warn"
16959
16993
  );
16960
16994
  }
@@ -17659,6 +17693,7 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes) {
17659
17693
  };
17660
17694
  }
17661
17695
  function visualValidateAll(diagrams, opts) {
17696
+ \u5668\u3092\u78BA\u304B\u3081\u308B(opts?.container);
17662
17697
  const durations = [];
17663
17698
  const reports = diagrams.map((d) => {
17664
17699
  const start = Date.now();
@@ -18145,6 +18180,9 @@ var LANE_PAD_MIN = 25;
18145
18180
  // src/layout/edges.ts
18146
18181
  var VERTICAL_DETOUR_GAP = 50;
18147
18182
  var VERTICAL_DETOUR_CORNER = 14;
18183
+ function verticalCornerDir(from, to) {
18184
+ return to < from ? -1 : 1;
18185
+ }
18148
18186
  var VERTICAL_DETOUR_EXIT = 45;
18149
18187
  function nearestBoxDistance(anchorX, dir, verticalTop, verticalBottom, boxes) {
18150
18188
  let nearest = Infinity;
@@ -19326,12 +19364,14 @@ function routePath(from, to, fromSide, toSide, obstacles = [], detourSide, _from
19326
19364
  midY2 = retreatBelowMidBlockers(midY2);
19327
19365
  const corner = 14;
19328
19366
  const labelY = midY2 - labelInit;
19367
+ const \u7E26\u306E\u5411\u304DA = verticalCornerDir(A.y, midY2);
19368
+ const \u7E26\u306E\u5411\u304DB = verticalCornerDir(midY2, B.y);
19329
19369
  return {
19330
19370
  d: `M ${A.x} ${A.y}
19331
- L ${A.x} ${midY2 - corner}
19371
+ L ${A.x} ${midY2 - \u7E26\u306E\u5411\u304DA * corner}
19332
19372
  Q ${A.x} ${midY2}, ${A.x + xDir * corner} ${midY2}
19333
19373
  L ${B.x - xDir * corner} ${midY2}
19334
- Q ${B.x} ${midY2}, ${B.x} ${midY2 + corner}
19374
+ Q ${B.x} ${midY2}, ${B.x} ${midY2 + \u7E26\u306E\u5411\u304DB * corner}
19335
19375
  L ${B.x} ${B.y}`,
19336
19376
  labelX: (A.x + B.x) / 2,
19337
19377
  labelY,