@g1cloud/bpmn-modeler-next 5.0.0-alpha.4 → 5.0.0-alpha.5

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.
@@ -50,6 +50,15 @@ export type GeometryFinding =
50
50
  };
51
51
  /** 발견을 전후 비교(배치가 새로 만든 것 가려내기)할 수 있게 하는 안정 키. */
52
52
  export declare function geometryFindingKey(finding: GeometryFinding): string;
53
+ /**
54
+ * 이 간선이 관통하는 도형들(자기 끝점 제외). 판정과 **우회 보정**(routeRepair)이 같은
55
+ * 술어를 써야 "고쳤다는데 판정은 그대로"가 나지 않는다.
56
+ *
57
+ * `targets` 는 컨테이너를 제외한 도형 목록 — 호출자가 한 번 걸러 넘긴다(반복 호출 비용).
58
+ */
59
+ export declare function crossedShapesOf(edge: GeometryEdge, targets: readonly GeometryShape[]): GeometryShape[];
60
+ /** 컨테이너를 뺀 판정 대상 도형 — 관통·겹침 양쪽의 공통 모집단. */
61
+ export declare const auditTargetsOf: (scene: GeometryScene) => GeometryShape[];
53
62
  /**
54
63
  * 기하 판정 (순수). 결과는 **결정론적 순서**로 정렬해 반환한다 — 전후 diff·골든 비교·회귀
55
64
  * 고정이 전부 순서에 의존한다.
@@ -8,6 +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 { planEdgeRepair, planSegmentDetours, repairIntroducedCrossings } from './routeRepair';
11
12
  export interface ApplyBpmnOpsResult {
12
13
  ok: boolean;
13
14
  issues: ResolveIssue[];
@@ -0,0 +1,34 @@
1
+ import { GeometryEdge, GeometryPoint, GeometryShape } from '../geometryAudit';
2
+ import { ResolverServices } from './lower';
3
+ /**
4
+ * 축 정렬 구간이 장애물을 **완전히 가로지를 때** 그것을 우회하는 4점을 만든다(순수).
5
+ *
6
+ * 반환은 `a`·`b` **사이에 끼워 넣을** 점들이다(양 끝점은 포함하지 않는다). 두 방향(위/아래
7
+ * 또는 좌/우)을 모두 돌려주고 어느 쪽이 나은지는 호출자가 판정기로 고른다.
8
+ *
9
+ * `null` = 이 구간은 다루지 않는다:
10
+ * - 사선 구간(축 정렬이 아님) — 우회 형상이 자명하지 않다
11
+ * - 장애물이 구간 끝에 걸쳐 있음 — 끝점 도킹과 얽혀 잘못 건드리면 연결이 떨어져 보인다
12
+ */
13
+ export declare function planSegmentDetours(a: GeometryPoint, b: GeometryPoint, rect: GeometryShape, margin?: number): [GeometryPoint[], GeometryPoint[]] | null;
14
+ /**
15
+ * 한 간선의 관통을 없애는 웨이포인트를 찾는다(순수). 못 찾으면 `null`.
16
+ *
17
+ * 장애물을 하나씩 처리하며 **매번 두 방향을 다 재보고 관통이 더 적은 쪽**을 고른다.
18
+ * 부모 컨테이너 바운즈를 알면 그 밖으로 나가는 우회를 후순위로 민다 — 풀 밖으로 튀어나간
19
+ * 선은 관통이 없어도 사람 눈에 결함이다(판정기가 못 보는 축이라 여기서 챙긴다).
20
+ */
21
+ export declare function planEdgeRepair(edge: GeometryEdge, targets: readonly GeometryShape[], container?: {
22
+ x: number;
23
+ y: number;
24
+ width: number;
25
+ height: number;
26
+ }): GeometryPoint[] | null;
27
+ /**
28
+ * 이 배치가 **새로 만든** 관통을 고친다(하강 직후, undo 에피소드 안에서 호출된다).
29
+ *
30
+ * `beforeKeys` = 하강 전 판정 키 집합. 거기 없던 관통만 대상이다(안전 성질 2).
31
+ * 완전히 해소되는 우회만 채택하고, 아니면 손대지 않는다(안전 성질 1) — 부분 개선을 받으면
32
+ * "고쳤는데 여전히 깨져 있다"가 되어 보고와 실물이 어긋난다.
33
+ */
34
+ export declare function repairIntroducedCrossings(services: Pick<ResolverServices, 'elementRegistry' | 'modeling'>, beforeKeys: ReadonlySet<string>): void;