@g1cloud/bpmn-modeler-next 5.0.0-alpha.13 → 5.0.0-alpha.15

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.
@@ -113,6 +113,18 @@ export type GeometryFinding =
113
113
  edge: string;
114
114
  other: string;
115
115
  axis: 'h' | 'v';
116
+ }
117
+ /**
118
+ * 간선 라벨의 상자를 **선이 가로지른다** — 자기 간선(또는 다른 간선)의 축 정렬 구간이 상자 안을 지나거나,
119
+ * 컨테이너(레인·풀) 경계선이 상자를 가른다(열세 번째 표본에서 사용자가 지목: "선에 달린 글자가 선과 겹치거나
120
+ * 레인선상에 걸린다"). 전형 = 세로 2점 메시지플로우의 라벨 — bpmn-js 는 라벨 **중심**을 선 + 15 에 두므로 폭 42
121
+ * 라벨은 6px, 폭 64 는 17px 선 위에 걸친다. 가로 구간의 라벨(중심이 선 위 15, 높이 14)은 걸치지 않는다.
122
+ * `line` = 그 간선 id 또는 컨테이너 id.
123
+ */
124
+ | {
125
+ kind: 'label-over-line';
126
+ edge: string;
127
+ line: string;
116
128
  };
117
129
  /** 발견을 전후 비교(배치가 새로 만든 것 가려내기)할 수 있게 하는 안정 키. */
118
130
  export declare function geometryFindingKey(finding: GeometryFinding): string;
@@ -166,6 +178,14 @@ export declare function sharedSegmentUnderLabel(edge: GeometryEdge, others: read
166
178
  other: string;
167
179
  axis: 'h' | 'v';
168
180
  } | null;
181
+ export declare function lineCrossesLabel(label: GeometryLabel, seg: AxisSegment): boolean;
182
+ /** 컨테이너 도형의 네 변을 축 정렬 구간으로 — 레인·풀 경계선. */
183
+ export declare function containerBoundarySegments(shape: GeometryShape): AxisSegment[];
184
+ /**
185
+ * 이 간선의 라벨을 가로지르는 선 — 자기 간선 구간 → 다른 간선 구간(id 순) → 컨테이너 경계선(id 순). 첫 것의 id.
186
+ * 없으면 `null`. 판정과 보정(routeRepair `planLabelLineClearance`)이 같은 술어를 쓴다.
187
+ */
188
+ export declare function lineThroughLabel(edge: GeometryEdge, scene: GeometryScene): string | null;
169
189
  /**
170
190
  * 이 간선이 관통하는 도형들(자기 끝점 제외). 판정과 **우회 보정**(routeRepair)이 같은
171
191
  * 술어를 써야 "고쳤다는데 판정은 그대로"가 나지 않는다.
@@ -8,7 +8,7 @@ export type { DocumentIndex, ElementCategory } from './documentIndex';
8
8
  export { buildRegistryIndex } from './documentIndex';
9
9
  export { validateOps } from './validate';
10
10
  export { lowerOps, resolverServicesOf, type ResolverServices } from './lower';
11
- export { forwardThreePointCandidates, planCrossPoolRoute, planEdgeRepair, planLabelPlacement, planMiddleSegmentShifts, planOppositeOverlapRepair, planSegmentDetours, repairIntroducedCrossings, repairIntroducedOppositeOverlaps, repairIntroducedSharedSegmentLabels, rerouteIntroducedCrossPoolEdges, } from './routeRepair';
11
+ export { forwardThreePointCandidates, planCrossPoolRoute, planEdgeRepair, planLabelLineClearance, planLabelPlacement, planMiddleSegmentShifts, planOppositeOverlapRepair, planSegmentDetours, repairIntroducedCrossings, repairIntroducedOppositeOverlaps, repairIntroducedSharedSegmentLabels, repairIntroducedLabelLines, rerouteIntroducedCrossPoolEdges, } from './routeRepair';
12
12
  export interface ApplyBpmnOpsResult {
13
13
  ok: boolean;
14
14
  issues: ResolveIssue[];
@@ -92,6 +92,18 @@ export declare function repairIntroducedOppositeOverlaps(services: Pick<Resolver
92
92
  * 곳을 고른다 — 부분 공유 구간(갈림점 아래로 이어지는 세로 구간)도 그 아래쪽이 자유 부분이다.
93
93
  */
94
94
  export declare function planLabelPlacement(edge: GeometryEdge, scene: GeometryScene): GeometryLabel | null;
95
+ /** 라벨 상자와 선 사이 최소 여백(px). 가로 구간 라벨의 bpmn-js 기본(중심 15, 높이 14 → 아랫변 8 위)과 같은 값. */
96
+ export declare const LABEL_LINE_GAP = 8;
97
+ /**
98
+ * 라벨의 새 bounds(순수) — 어떤 선(자기 구간 · 다른 간선 구간 · 컨테이너 경계선)이든 상자를 가로지르면, 라벨이 붙은
99
+ * 구간(중심에 가장 가까운 자기 구간)의 옆자리 후보를 순서대로 시험해 **아무 선도 지나지 않는 첫 자리**로 옮긴다.
100
+ * 순서 = 세로 구간이면 오른쪽 → 왼쪽, 가로 구간이면 위 → 아래; 각각 구간 방향으로 0 · 위/왼쪽 · 아래/오른쪽 · 2단 편이
101
+ * (사용자는 레인 경계에 걸친 라벨을 **위로** 올렸다 — 위/왼쪽 우선). 구간 밖으로는 안 나간다. 전부 막히면 `null`
102
+ * (판정기가 보고한다). 바꿀 것이 없으면 `null`.
103
+ */
104
+ export declare function planLabelLineClearance(edge: GeometryEdge, scene: GeometryScene): GeometryLabel | null;
105
+ /** 이 배치가 **새로 만든** 간선의 라벨을 선·경계선에서 뗀다(맨 마지막 — 라벨 귀속 보정 뒤). 선재 라벨은 불가침. */
106
+ export declare function repairIntroducedLabelLines(services: Pick<ResolverServices, 'elementRegistry' | 'modeling'>, beforeEdgeIds: ReadonlySet<string>): void;
95
107
  /**
96
108
  * 이 배치가 **새로 만든** 간선의 라벨 귀속 문제를 고친다(하강 직후, undo 에피소드 안, 경로 보정들 뒤).
97
109
  * 선재 간선의 라벨은 사람이 놓았을 수 있어 손대지 않는다(안전 성질 2).