@cardenelabs/cdl 0.122.0 → 0.123.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/README.md +64 -0
  3. package/dist/index.cjs +1065 -617
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.cts +38 -26
  6. package/dist/index.d.ts +38 -26
  7. package/dist/index.js +1065 -618
  8. package/dist/index.js.map +1 -1
  9. package/dist/react.cjs +834 -403
  10. package/dist/react.cjs.map +1 -1
  11. package/dist/react.d.cts +1 -1
  12. package/dist/react.d.ts +1 -1
  13. package/dist/react.js +834 -403
  14. package/dist/react.js.map +1 -1
  15. package/dist/{render-U_pC-Ksh.d.cts → render-CVczwfRb.d.cts} +20 -2
  16. package/dist/{render-U_pC-Ksh.d.ts → render-CVczwfRb.d.ts} +20 -2
  17. package/package.json +9 -12
  18. package/src/builder.ts +5 -0
  19. package/src/index.ts +2 -0
  20. package/src/kinds/box-lines.ts +17 -4
  21. package/src/kinds/chart-bar.tsx +4 -0
  22. package/src/kinds/chart-gauge.tsx +20 -9
  23. package/src/kinds/chart-pie.tsx +67 -17
  24. package/src/kinds/chart-radial.tsx +7 -2
  25. package/src/kinds/chart-slope.tsx +26 -7
  26. package/src/kinds/chart-stacked-bar.tsx +8 -4
  27. package/src/kinds/chart-stat.tsx +19 -4
  28. package/src/kinds/chart-waffle.tsx +7 -2
  29. package/src/kinds/funnel.tsx +9 -2
  30. package/src/kinds/generic.tsx +5 -2
  31. package/src/kinds/mind-map.tsx +26 -10
  32. package/src/kinds/quadrant.tsx +14 -4
  33. package/src/kinds/row-align.ts +19 -7
  34. package/src/kinds/sequence-board-metrics.ts +13 -3
  35. package/src/kinds/sequence-board.tsx +4 -2
  36. package/src/kinds/shape-basement.tsx +57 -32
  37. package/src/kinds/shape-blockchain.tsx +83 -34
  38. package/src/kinds/shape-commerce.tsx +65 -24
  39. package/src/kinds/shape-finance.tsx +90 -26
  40. package/src/kinds/shape-hardware.tsx +48 -17
  41. package/src/kinds/shape-region.tsx +16 -6
  42. package/src/kinds/shape-software.tsx +30 -8
  43. package/src/kinds/text-width.ts +17 -3
  44. package/src/kinds/tree.tsx +25 -7
  45. package/src/layout/collisions.ts +21 -8
  46. package/src/layout/curve-path.ts +3 -2
  47. package/src/layout/edges.ts +70 -25
  48. package/src/layout/head-label.ts +3 -1
  49. package/src/layout/lanes.ts +3 -2
  50. package/src/layout/metro-path.ts +3 -2
  51. package/src/layout/nodes.ts +14 -6
  52. package/src/layout/predict-bbox.ts +6 -3
  53. package/src/layout/self-loop.ts +10 -4
  54. package/src/layout/spec.ts +20 -6
  55. package/src/layout/text-width.ts +25 -8
  56. package/src/layout.ts +39 -15
  57. package/src/presets.ts +69 -43
  58. package/src/render/edges.tsx +18 -3
  59. package/src/render/interactive-panel.tsx +34 -7
  60. package/src/render/nodes.tsx +97 -48
  61. package/src/render/stage.tsx +3 -0
  62. package/src/text-metrics.ts +9 -0
  63. package/src/types.ts +19 -0
  64. package/src/visual-validate.ts +67 -17
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 EdgeRouting, i as CdlState, j as CdlInputOption, k as CdlEventTarget, l as CdlLang, m as Computed, n as CdlDerivedValue, o as CdlScrollTrigger, L as LaidDiagram, p as CdlDiagramViewProps, q as LaidEdge, r as LaidNode, s as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey, t as TreeNodePayload } from './render-U_pC-Ksh.cjs';
2
- export { u as CdlDiagramView, v as CdlEventBinding, w as CdlEventKind, x as CdlFormula, y as CdlPhase, z as ChartPieForm, A as ChartSlopeForm, D as EDGE_HEADS, F as EDGE_HEAD_DEFAULT, G as EDGE_HEAD_FILLS, H as EDGE_HEAD_FILL_DEFAULT, I as EDGE_REVEALS, K as EDGE_REVEAL_DEFAULT, M as EDGE_STYLES, O as EdgeReveal, P as InteractiveHandlerMap, U as InteractiveSignalsAccessor, V as LaidLane, W as NODE_KINDS, X as RELATION_FOCUSES, Y as RELATION_FOCUS_DEFAULT, Z as RelationFocus, _ as ScrollProgressHandle, $ as TONES, a0 as computeEventBindingKey, a1 as computeFormulaKey, a2 as computeInputSignalKey, a3 as computeScrollTriggerKey, a4 as computed, a5 as createInteractiveSignalsAccessor, a6 as createScrollProgressHandle, a7 as createScrollProgressSignals, a8 as hasInteractivePrimitives, a9 as resolveLang, aa as sequenceBoardMetrics, ab as sequenceStepId, ac as signal } from './render-U_pC-Ksh.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 EdgeRouting, i as CdlState, j as CdlInputOption, k as CdlEventTarget, l as CdlLang, m as CdlTextMetrics, n as Computed, o as CdlDerivedValue, p as CdlScrollTrigger, L as LaidDiagram, q as CdlDiagramViewProps, r as LaidEdge, s as LaidNode, t as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey, u as TreeNodePayload } from './render-CVczwfRb.cjs';
2
+ export { v as CdlDiagramView, w as CdlEventBinding, x as CdlEventKind, y as CdlFormula, z as CdlPhase, A as ChartPieForm, D as ChartSlopeForm, F as EDGE_HEADS, G as EDGE_HEAD_DEFAULT, H as EDGE_HEAD_FILLS, I as EDGE_HEAD_FILL_DEFAULT, K as EDGE_REVEALS, M as EDGE_REVEAL_DEFAULT, O as EDGE_STYLES, P as EdgeReveal, U as InteractiveHandlerMap, V as InteractiveSignalsAccessor, W as LaidLane, X as NODE_KINDS, Y as RELATION_FOCUSES, Z as RELATION_FOCUS_DEFAULT, _ as RelationFocus, $ as ScrollProgressHandle, a0 as TONES, a1 as computeEventBindingKey, a2 as computeFormulaKey, a3 as computeInputSignalKey, a4 as computeScrollTriggerKey, a5 as computed, a6 as createInteractiveSignalsAccessor, a7 as createScrollProgressHandle, a8 as createScrollProgressSignals, a9 as hasInteractivePrimitives, aa as resolveLang, ab as sequenceBoardMetrics, ac as sequenceStepId, ad as signal } from './render-CVczwfRb.cjs';
3
3
  import { JSX } from 'react';
4
4
 
5
5
  declare function effect(fn: () => void | (() => void)): () => void;
@@ -1232,12 +1232,20 @@ declare function diagram(id: string, options: {
1232
1232
  * 描画側が書く固定の字の言語 (#847)。 詳しくは `CdlDiagram.lang` の説明を参照。
1233
1233
  */
1234
1234
  lang?: CdlLang;
1235
+ /** 図の字幅を測る規則。詳しくは `CdlDiagram.textMetrics` の説明を参照。 */
1236
+ textMetrics?: CdlTextMetrics;
1235
1237
  /**
1236
1238
  * この図がどの種類か (#645)。 詳しくは `CdlDiagram.type` の説明を参照。
1237
1239
  */
1238
1240
  type?: string;
1239
1241
  }): DiagramBuilder;
1240
1242
 
1243
+ /**
1244
+ * 記法などから届いた値を字幅の測り方へ直す。
1245
+ * 完全一致する `"monospace"` 以外は既定の `"proportional"` に落とす。
1246
+ */
1247
+ declare function resolveTextMetrics(value: unknown): CdlTextMetrics;
1248
+
1241
1249
  /**
1242
1250
  * formula expression の AST 型 (CAR #244)。
1243
1251
  *
@@ -2641,7 +2649,7 @@ declare function requiredNearClearance(kindA: string, kindB: string): number;
2641
2649
  * 上に丸めるのは、 送り幅が小数のため幅が小数になり、 図の座標が読みにくくなるから。 下に
2642
2650
  * 丸めると 1 未満だけ足りない箱ができる。
2643
2651
  */
2644
- declare function requiredRowsWidth(rows: string[] | undefined, kind?: string): number;
2652
+ declare function requiredRowsWidth(rows: string[] | undefined, kind?: string, textMetrics?: CdlTextMetrics): number;
2645
2653
 
2646
2654
  /**
2647
2655
  * chain 伝搬 shift で node-node overlap を解消する (CAR-421 導入)。
@@ -2701,7 +2709,7 @@ declare function resolveOverlapsWithChain(nodes: LaidNode[], minClearance?: numb
2701
2709
  * @param maxIter 収束上限 iter 数 (default 20、 spec.CHAIN_SHIFT_MAX_ITER と同値)
2702
2710
  * @returns shift 済 LaidEdge 列 (input 順序を保持、 label 位置のみ変更、 path d は不変)
2703
2711
  */
2704
- declare function resolveEdgeLabelOverlapsWithChain(edges: LaidEdge[], fixedObstacles: BBox[], minClearance?: number, maxIter?: number): LaidEdge[];
2712
+ declare function resolveEdgeLabelOverlapsWithChain(edges: LaidEdge[], fixedObstacles: BBox[], minClearance?: number, maxIter?: number, textMetrics?: CdlTextMetrics): LaidEdge[];
2705
2713
  /**
2706
2714
  * chain 伝搬 shift の拡張版 (CAR-482 導入、 CAR-485 で edge-path 拡張)。 label だけでなく node /
2707
2715
  * lane-label / edge-path (別 edge) も同方向同量 shift 連鎖。
@@ -2738,7 +2746,7 @@ declare function resolveEdgeLabelOverlapsWithChainAndPropagate(edges: LaidEdge[]
2738
2746
  * (SSOT `LABEL_TO_PATH_CLEARANCE` = 16)、 pair 別 clearance を分離する事で fan-in / fan-out
2739
2747
  * などで label が sibling path 近傍 (LABEL_INIT_CLEARANCE 26) にある正常状態を誤検知しない。
2740
2748
  */
2741
- pathLabelClearance?: number): {
2749
+ pathLabelClearance?: number, textMetrics?: CdlTextMetrics): {
2742
2750
  edges: LaidEdge[];
2743
2751
  nodeShifts: Map<string, {
2744
2752
  dx: number;
@@ -2793,7 +2801,7 @@ pathLabelClearance?: number): {
2793
2801
  * 累積は `CHAIN_SHIFT_MAX_ACCUMULATED` で頭を打つ。 札は自分の線の近くに居ることが
2794
2802
  * 読みの前提で、 離しすぎるとどの線の札か判らなくなる。
2795
2803
  */
2796
- declare function resolveLabelClearanceAfterPathPasses(edges: LaidEdge[], obstacles: BBox[], maxIter?: number): LaidEdge[];
2804
+ declare function resolveLabelClearanceAfterPathPasses(edges: LaidEdge[], obstacles: BBox[], maxIter?: number, textMetrics?: CdlTextMetrics): LaidEdge[];
2797
2805
 
2798
2806
  /**
2799
2807
  * Engine が予測する label / node bbox の world 単位 public API。
@@ -2816,7 +2824,7 @@ declare function resolveLabelClearanceAfterPathPasses(edges: LaidEdge[], obstacl
2816
2824
  * @param edge LaidEdge (labelX, labelY, labelAnchor, label, sub 既確定)
2817
2825
  * @returns { x, y, w, h } の world 座標 bbox (render 実 rect 位置と一致)
2818
2826
  */
2819
- declare function predictLabelBBoxWorld(edge: LaidEdge): {
2827
+ declare function predictLabelBBoxWorld(edge: LaidEdge, textMetrics?: CdlTextMetrics): {
2820
2828
  x: number;
2821
2829
  y: number;
2822
2830
  w: number;
@@ -2874,6 +2882,10 @@ declare function bboxDiffWorld(predicted: {
2874
2882
  max: number;
2875
2883
  };
2876
2884
 
2885
+ type TextMetricsPreset = {
2886
+ /** 図の字幅を測る規則。省略時は `"proportional"` */
2887
+ textMetrics?: CdlTextMetrics;
2888
+ };
2877
2889
  /**
2878
2890
  * 状態を読む書き方 (`{名前}`)。
2879
2891
  *
@@ -2890,7 +2902,7 @@ type BindingRef = `{${名前の頭}${string}}`;
2890
2902
  * - swimlane({ id, topic, lanes: ["送信元", "コントラクト", "出力"] }) で 3 lane 自動配置
2891
2903
  * - flow().step("A", "func").step("B", "storage").build() で sequence diagram 風
2892
2904
  */
2893
- type SwimlanePreset = {
2905
+ type SwimlanePreset = TextMetricsPreset & {
2894
2906
  id: string;
2895
2907
  topic: string;
2896
2908
  /** lane label の配列。 各 lane width は固定 (default 400)、 x は auto-layout */
@@ -2922,7 +2934,7 @@ type FlowStepInput = {
2922
2934
  eyebrow?: string;
2923
2935
  subtitle?: string;
2924
2936
  };
2925
- type FlowPreset = {
2937
+ type FlowPreset = TextMetricsPreset & {
2926
2938
  id: string;
2927
2939
  topic: string;
2928
2940
  /** lane label (1 本のみ、 全 step が縦 stack で並ぶ) */
@@ -3015,7 +3027,7 @@ type SequenceActor = {
3015
3027
  /** 名前の下に置く日本語の呼び名 (例 "画面" / "受付" / "台帳") */
3016
3028
  subtitle?: string;
3017
3029
  };
3018
- type SequencePreset = {
3030
+ type SequencePreset = TextMetricsPreset & {
3019
3031
  id: string;
3020
3032
  topic: string;
3021
3033
  /** actor label の配列 (lifeline、 column 単位)。 呼び名を添えるなら物で書く (#578) */
@@ -3074,7 +3086,7 @@ type TopologyConnection = {
3074
3086
  labelOffsetX?: number;
3075
3087
  labelOffsetY?: number;
3076
3088
  };
3077
- type TopologyPreset = {
3089
+ type TopologyPreset = TextMetricsPreset & {
3078
3090
  id: string;
3079
3091
  topic: string;
3080
3092
  /** group の lane width (default 360) */
@@ -3191,7 +3203,7 @@ type ErRelation = {
3191
3203
  */
3192
3204
  style?: EdgeStyle;
3193
3205
  };
3194
- type ErPreset = {
3206
+ type ErPreset = TextMetricsPreset & {
3195
3207
  id: string;
3196
3208
  topic: string;
3197
3209
  defaultTone?: Tone;
@@ -3305,7 +3317,7 @@ type FsmTransition = {
3305
3317
  */
3306
3318
  head?: EdgeHead;
3307
3319
  };
3308
- type StateMachinePreset = {
3320
+ type StateMachinePreset = TextMetricsPreset & {
3309
3321
  id: string;
3310
3322
  topic: string;
3311
3323
  defaultTone?: Tone;
@@ -3372,7 +3384,7 @@ type InfraConnection = {
3372
3384
  /** label の垂直方向 fine offset (default 0、 preset 交互 ±60 を override) */
3373
3385
  labelOffsetY?: number;
3374
3386
  };
3375
- type InfrastructurePreset = {
3387
+ type InfrastructurePreset = TextMetricsPreset & {
3376
3388
  id: string;
3377
3389
  topic: string;
3378
3390
  /** col あたりの lane width (default 380) */
@@ -3480,7 +3492,7 @@ type UmlRelation = {
3480
3492
  /** 線の種類 (#578)。 書かなければ種類から決まる */
3481
3493
  style?: EdgeStyle;
3482
3494
  };
3483
- type ClassDiagramPreset = {
3495
+ type ClassDiagramPreset = TextMetricsPreset & {
3484
3496
  id: string;
3485
3497
  topic: string;
3486
3498
  defaultTone?: Tone;
@@ -3528,7 +3540,7 @@ type TreeNode = {
3528
3540
  /** 箱の 2 行目に出す補足。 上の小ラベルは木では受けない (#471、 `TreeNodePayload` 参照) */
3529
3541
  subtitle?: string;
3530
3542
  };
3531
- type TreePreset = {
3543
+ type TreePreset = TextMetricsPreset & {
3532
3544
  id: string;
3533
3545
  topic: string;
3534
3546
  /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
@@ -3566,7 +3578,7 @@ type JourneyStep = {
3566
3578
  /** opportunity (改善余地のメモ) */
3567
3579
  opportunity?: string;
3568
3580
  };
3569
- type UserJourneyPreset = {
3581
+ type UserJourneyPreset = TextMetricsPreset & {
3570
3582
  id: string;
3571
3583
  topic: string;
3572
3584
  /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
@@ -3600,7 +3612,7 @@ type MindBranch = {
3600
3612
  tone?: Tone;
3601
3613
  subtitle?: string;
3602
3614
  };
3603
- type MindMapPreset = {
3615
+ type MindMapPreset = TextMetricsPreset & {
3604
3616
  id: string;
3605
3617
  topic: string;
3606
3618
  /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
@@ -3637,7 +3649,7 @@ type FunnelStage = {
3637
3649
  /** stage 詳細 */
3638
3650
  subtitle?: string;
3639
3651
  };
3640
- type FunnelPreset = {
3652
+ type FunnelPreset = TextMetricsPreset & {
3641
3653
  id: string;
3642
3654
  topic: string;
3643
3655
  /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
@@ -3670,7 +3682,7 @@ type QuadrantItem = {
3670
3682
  quadrant: QuadrantQuadrantLabel | BindingRef;
3671
3683
  subtitle?: string;
3672
3684
  };
3673
- type QuadrantPreset = {
3685
+ type QuadrantPreset = TextMetricsPreset & {
3674
3686
  id: string;
3675
3687
  topic: string;
3676
3688
  /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
@@ -3720,7 +3732,7 @@ type ChartDatum = {
3720
3732
  /** 個別 tone (default は preset の defaultTone) */
3721
3733
  tone?: Tone;
3722
3734
  };
3723
- type ChartPreset = {
3735
+ type ChartPreset = TextMetricsPreset & {
3724
3736
  id: string;
3725
3737
  topic: string;
3726
3738
  /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
@@ -3766,7 +3778,7 @@ type GanttTask = {
3766
3778
  /** 依存 task id */
3767
3779
  dependsOn?: string;
3768
3780
  };
3769
- type GanttPreset = {
3781
+ type GanttPreset = TextMetricsPreset & {
3770
3782
  id: string;
3771
3783
  topic: string;
3772
3784
  /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
@@ -3830,7 +3842,7 @@ type FlowchartEdge = {
3830
3842
  * 足りない。
3831
3843
  */
3832
3844
  type FlowchartDirection = "horizontal" | "vertical";
3833
- type FlowchartPreset = {
3845
+ type FlowchartPreset = TextMetricsPreset & {
3834
3846
  id: string;
3835
3847
  topic: string;
3836
3848
  /** swimlane の lane (role) ラベル */
@@ -3863,7 +3875,7 @@ type NetworkLink = {
3863
3875
  protocol?: string;
3864
3876
  tone?: Tone;
3865
3877
  };
3866
- type NetworkPreset = {
3878
+ type NetworkPreset = TextMetricsPreset & {
3867
3879
  id: string;
3868
3880
  topic: string;
3869
3881
  defaultTone?: Tone;
@@ -3909,7 +3921,7 @@ type FsmTransitionExt = {
3909
3921
  action?: string;
3910
3922
  tone?: Tone;
3911
3923
  };
3912
- type StateMachine2Preset = {
3924
+ type StateMachine2Preset = TextMetricsPreset & {
3913
3925
  id: string;
3914
3926
  topic: string;
3915
3927
  defaultTone?: Tone;
@@ -4027,4 +4039,4 @@ declare function computeStateValues(laid: LaidDiagram, phaseIdx: number, progres
4027
4039
  */
4028
4040
  declare function interpolate(template: string, values: Record<string, string>, 名前の表?: 値の名前の表): string;
4029
4041
 
4030
- 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, EdgeRouting, 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 FlowchartDirection, 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, PERF_BUDGET_TOTAL_MS, PERF_SLOWEST_SAMPLE, type PageLike, type PerfClockKind, 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, drawsFigureTitle, 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 関係を持つ線 };
4042
+ 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, CdlTextMetrics, 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, EdgeRouting, 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 FlowchartDirection, 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, PERF_BUDGET_TOTAL_MS, PERF_SLOWEST_SAMPLE, type PageLike, type PerfClockKind, 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, drawsFigureTitle, 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, resolveTextMetrics, 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 EdgeRouting, i as CdlState, j as CdlInputOption, k as CdlEventTarget, l as CdlLang, m as Computed, n as CdlDerivedValue, o as CdlScrollTrigger, L as LaidDiagram, p as CdlDiagramViewProps, q as LaidEdge, r as LaidNode, s as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey, t as TreeNodePayload } from './render-U_pC-Ksh.js';
2
- export { u as CdlDiagramView, v as CdlEventBinding, w as CdlEventKind, x as CdlFormula, y as CdlPhase, z as ChartPieForm, A as ChartSlopeForm, D as EDGE_HEADS, F as EDGE_HEAD_DEFAULT, G as EDGE_HEAD_FILLS, H as EDGE_HEAD_FILL_DEFAULT, I as EDGE_REVEALS, K as EDGE_REVEAL_DEFAULT, M as EDGE_STYLES, O as EdgeReveal, P as InteractiveHandlerMap, U as InteractiveSignalsAccessor, V as LaidLane, W as NODE_KINDS, X as RELATION_FOCUSES, Y as RELATION_FOCUS_DEFAULT, Z as RelationFocus, _ as ScrollProgressHandle, $ as TONES, a0 as computeEventBindingKey, a1 as computeFormulaKey, a2 as computeInputSignalKey, a3 as computeScrollTriggerKey, a4 as computed, a5 as createInteractiveSignalsAccessor, a6 as createScrollProgressHandle, a7 as createScrollProgressSignals, a8 as hasInteractivePrimitives, a9 as resolveLang, aa as sequenceBoardMetrics, ab as sequenceStepId, ac as signal } from './render-U_pC-Ksh.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 EdgeRouting, i as CdlState, j as CdlInputOption, k as CdlEventTarget, l as CdlLang, m as CdlTextMetrics, n as Computed, o as CdlDerivedValue, p as CdlScrollTrigger, L as LaidDiagram, q as CdlDiagramViewProps, r as LaidEdge, s as LaidNode, t as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey, u as TreeNodePayload } from './render-CVczwfRb.js';
2
+ export { v as CdlDiagramView, w as CdlEventBinding, x as CdlEventKind, y as CdlFormula, z as CdlPhase, A as ChartPieForm, D as ChartSlopeForm, F as EDGE_HEADS, G as EDGE_HEAD_DEFAULT, H as EDGE_HEAD_FILLS, I as EDGE_HEAD_FILL_DEFAULT, K as EDGE_REVEALS, M as EDGE_REVEAL_DEFAULT, O as EDGE_STYLES, P as EdgeReveal, U as InteractiveHandlerMap, V as InteractiveSignalsAccessor, W as LaidLane, X as NODE_KINDS, Y as RELATION_FOCUSES, Z as RELATION_FOCUS_DEFAULT, _ as RelationFocus, $ as ScrollProgressHandle, a0 as TONES, a1 as computeEventBindingKey, a2 as computeFormulaKey, a3 as computeInputSignalKey, a4 as computeScrollTriggerKey, a5 as computed, a6 as createInteractiveSignalsAccessor, a7 as createScrollProgressHandle, a8 as createScrollProgressSignals, a9 as hasInteractivePrimitives, aa as resolveLang, ab as sequenceBoardMetrics, ac as sequenceStepId, ad as signal } from './render-CVczwfRb.js';
3
3
  import { JSX } from 'react';
4
4
 
5
5
  declare function effect(fn: () => void | (() => void)): () => void;
@@ -1232,12 +1232,20 @@ declare function diagram(id: string, options: {
1232
1232
  * 描画側が書く固定の字の言語 (#847)。 詳しくは `CdlDiagram.lang` の説明を参照。
1233
1233
  */
1234
1234
  lang?: CdlLang;
1235
+ /** 図の字幅を測る規則。詳しくは `CdlDiagram.textMetrics` の説明を参照。 */
1236
+ textMetrics?: CdlTextMetrics;
1235
1237
  /**
1236
1238
  * この図がどの種類か (#645)。 詳しくは `CdlDiagram.type` の説明を参照。
1237
1239
  */
1238
1240
  type?: string;
1239
1241
  }): DiagramBuilder;
1240
1242
 
1243
+ /**
1244
+ * 記法などから届いた値を字幅の測り方へ直す。
1245
+ * 完全一致する `"monospace"` 以外は既定の `"proportional"` に落とす。
1246
+ */
1247
+ declare function resolveTextMetrics(value: unknown): CdlTextMetrics;
1248
+
1241
1249
  /**
1242
1250
  * formula expression の AST 型 (CAR #244)。
1243
1251
  *
@@ -2641,7 +2649,7 @@ declare function requiredNearClearance(kindA: string, kindB: string): number;
2641
2649
  * 上に丸めるのは、 送り幅が小数のため幅が小数になり、 図の座標が読みにくくなるから。 下に
2642
2650
  * 丸めると 1 未満だけ足りない箱ができる。
2643
2651
  */
2644
- declare function requiredRowsWidth(rows: string[] | undefined, kind?: string): number;
2652
+ declare function requiredRowsWidth(rows: string[] | undefined, kind?: string, textMetrics?: CdlTextMetrics): number;
2645
2653
 
2646
2654
  /**
2647
2655
  * chain 伝搬 shift で node-node overlap を解消する (CAR-421 導入)。
@@ -2701,7 +2709,7 @@ declare function resolveOverlapsWithChain(nodes: LaidNode[], minClearance?: numb
2701
2709
  * @param maxIter 収束上限 iter 数 (default 20、 spec.CHAIN_SHIFT_MAX_ITER と同値)
2702
2710
  * @returns shift 済 LaidEdge 列 (input 順序を保持、 label 位置のみ変更、 path d は不変)
2703
2711
  */
2704
- declare function resolveEdgeLabelOverlapsWithChain(edges: LaidEdge[], fixedObstacles: BBox[], minClearance?: number, maxIter?: number): LaidEdge[];
2712
+ declare function resolveEdgeLabelOverlapsWithChain(edges: LaidEdge[], fixedObstacles: BBox[], minClearance?: number, maxIter?: number, textMetrics?: CdlTextMetrics): LaidEdge[];
2705
2713
  /**
2706
2714
  * chain 伝搬 shift の拡張版 (CAR-482 導入、 CAR-485 で edge-path 拡張)。 label だけでなく node /
2707
2715
  * lane-label / edge-path (別 edge) も同方向同量 shift 連鎖。
@@ -2738,7 +2746,7 @@ declare function resolveEdgeLabelOverlapsWithChainAndPropagate(edges: LaidEdge[]
2738
2746
  * (SSOT `LABEL_TO_PATH_CLEARANCE` = 16)、 pair 別 clearance を分離する事で fan-in / fan-out
2739
2747
  * などで label が sibling path 近傍 (LABEL_INIT_CLEARANCE 26) にある正常状態を誤検知しない。
2740
2748
  */
2741
- pathLabelClearance?: number): {
2749
+ pathLabelClearance?: number, textMetrics?: CdlTextMetrics): {
2742
2750
  edges: LaidEdge[];
2743
2751
  nodeShifts: Map<string, {
2744
2752
  dx: number;
@@ -2793,7 +2801,7 @@ pathLabelClearance?: number): {
2793
2801
  * 累積は `CHAIN_SHIFT_MAX_ACCUMULATED` で頭を打つ。 札は自分の線の近くに居ることが
2794
2802
  * 読みの前提で、 離しすぎるとどの線の札か判らなくなる。
2795
2803
  */
2796
- declare function resolveLabelClearanceAfterPathPasses(edges: LaidEdge[], obstacles: BBox[], maxIter?: number): LaidEdge[];
2804
+ declare function resolveLabelClearanceAfterPathPasses(edges: LaidEdge[], obstacles: BBox[], maxIter?: number, textMetrics?: CdlTextMetrics): LaidEdge[];
2797
2805
 
2798
2806
  /**
2799
2807
  * Engine が予測する label / node bbox の world 単位 public API。
@@ -2816,7 +2824,7 @@ declare function resolveLabelClearanceAfterPathPasses(edges: LaidEdge[], obstacl
2816
2824
  * @param edge LaidEdge (labelX, labelY, labelAnchor, label, sub 既確定)
2817
2825
  * @returns { x, y, w, h } の world 座標 bbox (render 実 rect 位置と一致)
2818
2826
  */
2819
- declare function predictLabelBBoxWorld(edge: LaidEdge): {
2827
+ declare function predictLabelBBoxWorld(edge: LaidEdge, textMetrics?: CdlTextMetrics): {
2820
2828
  x: number;
2821
2829
  y: number;
2822
2830
  w: number;
@@ -2874,6 +2882,10 @@ declare function bboxDiffWorld(predicted: {
2874
2882
  max: number;
2875
2883
  };
2876
2884
 
2885
+ type TextMetricsPreset = {
2886
+ /** 図の字幅を測る規則。省略時は `"proportional"` */
2887
+ textMetrics?: CdlTextMetrics;
2888
+ };
2877
2889
  /**
2878
2890
  * 状態を読む書き方 (`{名前}`)。
2879
2891
  *
@@ -2890,7 +2902,7 @@ type BindingRef = `{${名前の頭}${string}}`;
2890
2902
  * - swimlane({ id, topic, lanes: ["送信元", "コントラクト", "出力"] }) で 3 lane 自動配置
2891
2903
  * - flow().step("A", "func").step("B", "storage").build() で sequence diagram 風
2892
2904
  */
2893
- type SwimlanePreset = {
2905
+ type SwimlanePreset = TextMetricsPreset & {
2894
2906
  id: string;
2895
2907
  topic: string;
2896
2908
  /** lane label の配列。 各 lane width は固定 (default 400)、 x は auto-layout */
@@ -2922,7 +2934,7 @@ type FlowStepInput = {
2922
2934
  eyebrow?: string;
2923
2935
  subtitle?: string;
2924
2936
  };
2925
- type FlowPreset = {
2937
+ type FlowPreset = TextMetricsPreset & {
2926
2938
  id: string;
2927
2939
  topic: string;
2928
2940
  /** lane label (1 本のみ、 全 step が縦 stack で並ぶ) */
@@ -3015,7 +3027,7 @@ type SequenceActor = {
3015
3027
  /** 名前の下に置く日本語の呼び名 (例 "画面" / "受付" / "台帳") */
3016
3028
  subtitle?: string;
3017
3029
  };
3018
- type SequencePreset = {
3030
+ type SequencePreset = TextMetricsPreset & {
3019
3031
  id: string;
3020
3032
  topic: string;
3021
3033
  /** actor label の配列 (lifeline、 column 単位)。 呼び名を添えるなら物で書く (#578) */
@@ -3074,7 +3086,7 @@ type TopologyConnection = {
3074
3086
  labelOffsetX?: number;
3075
3087
  labelOffsetY?: number;
3076
3088
  };
3077
- type TopologyPreset = {
3089
+ type TopologyPreset = TextMetricsPreset & {
3078
3090
  id: string;
3079
3091
  topic: string;
3080
3092
  /** group の lane width (default 360) */
@@ -3191,7 +3203,7 @@ type ErRelation = {
3191
3203
  */
3192
3204
  style?: EdgeStyle;
3193
3205
  };
3194
- type ErPreset = {
3206
+ type ErPreset = TextMetricsPreset & {
3195
3207
  id: string;
3196
3208
  topic: string;
3197
3209
  defaultTone?: Tone;
@@ -3305,7 +3317,7 @@ type FsmTransition = {
3305
3317
  */
3306
3318
  head?: EdgeHead;
3307
3319
  };
3308
- type StateMachinePreset = {
3320
+ type StateMachinePreset = TextMetricsPreset & {
3309
3321
  id: string;
3310
3322
  topic: string;
3311
3323
  defaultTone?: Tone;
@@ -3372,7 +3384,7 @@ type InfraConnection = {
3372
3384
  /** label の垂直方向 fine offset (default 0、 preset 交互 ±60 を override) */
3373
3385
  labelOffsetY?: number;
3374
3386
  };
3375
- type InfrastructurePreset = {
3387
+ type InfrastructurePreset = TextMetricsPreset & {
3376
3388
  id: string;
3377
3389
  topic: string;
3378
3390
  /** col あたりの lane width (default 380) */
@@ -3480,7 +3492,7 @@ type UmlRelation = {
3480
3492
  /** 線の種類 (#578)。 書かなければ種類から決まる */
3481
3493
  style?: EdgeStyle;
3482
3494
  };
3483
- type ClassDiagramPreset = {
3495
+ type ClassDiagramPreset = TextMetricsPreset & {
3484
3496
  id: string;
3485
3497
  topic: string;
3486
3498
  defaultTone?: Tone;
@@ -3528,7 +3540,7 @@ type TreeNode = {
3528
3540
  /** 箱の 2 行目に出す補足。 上の小ラベルは木では受けない (#471、 `TreeNodePayload` 参照) */
3529
3541
  subtitle?: string;
3530
3542
  };
3531
- type TreePreset = {
3543
+ type TreePreset = TextMetricsPreset & {
3532
3544
  id: string;
3533
3545
  topic: string;
3534
3546
  /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
@@ -3566,7 +3578,7 @@ type JourneyStep = {
3566
3578
  /** opportunity (改善余地のメモ) */
3567
3579
  opportunity?: string;
3568
3580
  };
3569
- type UserJourneyPreset = {
3581
+ type UserJourneyPreset = TextMetricsPreset & {
3570
3582
  id: string;
3571
3583
  topic: string;
3572
3584
  /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
@@ -3600,7 +3612,7 @@ type MindBranch = {
3600
3612
  tone?: Tone;
3601
3613
  subtitle?: string;
3602
3614
  };
3603
- type MindMapPreset = {
3615
+ type MindMapPreset = TextMetricsPreset & {
3604
3616
  id: string;
3605
3617
  topic: string;
3606
3618
  /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
@@ -3637,7 +3649,7 @@ type FunnelStage = {
3637
3649
  /** stage 詳細 */
3638
3650
  subtitle?: string;
3639
3651
  };
3640
- type FunnelPreset = {
3652
+ type FunnelPreset = TextMetricsPreset & {
3641
3653
  id: string;
3642
3654
  topic: string;
3643
3655
  /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
@@ -3670,7 +3682,7 @@ type QuadrantItem = {
3670
3682
  quadrant: QuadrantQuadrantLabel | BindingRef;
3671
3683
  subtitle?: string;
3672
3684
  };
3673
- type QuadrantPreset = {
3685
+ type QuadrantPreset = TextMetricsPreset & {
3674
3686
  id: string;
3675
3687
  topic: string;
3676
3688
  /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
@@ -3720,7 +3732,7 @@ type ChartDatum = {
3720
3732
  /** 個別 tone (default は preset の defaultTone) */
3721
3733
  tone?: Tone;
3722
3734
  };
3723
- type ChartPreset = {
3735
+ type ChartPreset = TextMetricsPreset & {
3724
3736
  id: string;
3725
3737
  topic: string;
3726
3738
  /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
@@ -3766,7 +3778,7 @@ type GanttTask = {
3766
3778
  /** 依存 task id */
3767
3779
  dependsOn?: string;
3768
3780
  };
3769
- type GanttPreset = {
3781
+ type GanttPreset = TextMetricsPreset & {
3770
3782
  id: string;
3771
3783
  topic: string;
3772
3784
  /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
@@ -3830,7 +3842,7 @@ type FlowchartEdge = {
3830
3842
  * 足りない。
3831
3843
  */
3832
3844
  type FlowchartDirection = "horizontal" | "vertical";
3833
- type FlowchartPreset = {
3845
+ type FlowchartPreset = TextMetricsPreset & {
3834
3846
  id: string;
3835
3847
  topic: string;
3836
3848
  /** swimlane の lane (role) ラベル */
@@ -3863,7 +3875,7 @@ type NetworkLink = {
3863
3875
  protocol?: string;
3864
3876
  tone?: Tone;
3865
3877
  };
3866
- type NetworkPreset = {
3878
+ type NetworkPreset = TextMetricsPreset & {
3867
3879
  id: string;
3868
3880
  topic: string;
3869
3881
  defaultTone?: Tone;
@@ -3909,7 +3921,7 @@ type FsmTransitionExt = {
3909
3921
  action?: string;
3910
3922
  tone?: Tone;
3911
3923
  };
3912
- type StateMachine2Preset = {
3924
+ type StateMachine2Preset = TextMetricsPreset & {
3913
3925
  id: string;
3914
3926
  topic: string;
3915
3927
  defaultTone?: Tone;
@@ -4027,4 +4039,4 @@ declare function computeStateValues(laid: LaidDiagram, phaseIdx: number, progres
4027
4039
  */
4028
4040
  declare function interpolate(template: string, values: Record<string, string>, 名前の表?: 値の名前の表): string;
4029
4041
 
4030
- 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, EdgeRouting, 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 FlowchartDirection, 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, PERF_BUDGET_TOTAL_MS, PERF_SLOWEST_SAMPLE, type PageLike, type PerfClockKind, 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, drawsFigureTitle, 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 関係を持つ線 };
4042
+ 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, CdlTextMetrics, 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, EdgeRouting, 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 FlowchartDirection, 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, PERF_BUDGET_TOTAL_MS, PERF_SLOWEST_SAMPLE, type PageLike, type PerfClockKind, 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, drawsFigureTitle, 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, resolveTextMetrics, segmentsIntersect, sequence, stateMachine, stateMachine2, swimlane, topology, tree, untrack, userJourney, validate, verifyAllDiagramsDom, verifyAuthorIntent, verifyAuthorIntentAll, verifyDiagramDom, visualValidate, visualValidateAll, visualValidateLaid, withDerivedValues, worldToPx, 木の札の幅, type 関係を持つ線 };