@g1cloud/bpmn-modeler-next 5.0.0-alpha.7 → 5.0.0-alpha.9
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/agent/geometryAudit.d.ts +55 -0
- package/dist/agent/resolver/index.d.ts +1 -1
- package/dist/agent/resolver/routeRepair.d.ts +14 -1
- package/dist/bpmn-modeler.js +7657 -7472
- package/dist/bpmn-modeler.umd.cjs +67 -67
- package/package.json +1 -1
|
@@ -23,12 +23,21 @@ export interface GeometryShape {
|
|
|
23
23
|
*/
|
|
24
24
|
parent?: string;
|
|
25
25
|
}
|
|
26
|
+
/** 간선 외부 라벨의 bounds — 라벨은 판정 대상 도형이 아니지만 **어느 간선의 것으로 읽히는가**는 판정한다(B-15). */
|
|
27
|
+
export interface GeometryLabel {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
}
|
|
26
33
|
export interface GeometryEdge {
|
|
27
34
|
id: string;
|
|
28
35
|
type: string;
|
|
29
36
|
waypoints: GeometryPoint[];
|
|
30
37
|
/** 이 간선이 자기 끝점으로 삼는 도형 id 들 — 그 도형과의 교차는 도킹이라 관통이 아니다. */
|
|
31
38
|
endpoints: readonly string[];
|
|
39
|
+
/** 이름이 있는 간선의 외부 라벨 bounds(있을 때만). `label-on-shared-segment` 의 입력. */
|
|
40
|
+
label?: GeometryLabel;
|
|
32
41
|
}
|
|
33
42
|
/** 판정기가 대면하는 최소 입력 — 좌표만 담는다(의미론 없음). */
|
|
34
43
|
export interface GeometryScene {
|
|
@@ -77,9 +86,35 @@ export type GeometryFinding =
|
|
|
77
86
|
edges: [string, string];
|
|
78
87
|
axis: 'h' | 'v';
|
|
79
88
|
length: number;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* 간선의 **라벨이 다른 간선과 공유하는 구간 위**에 놓여 어느 간선의 라벨인지 읽을 수 없다(확정 6
|
|
92
|
+
* 다섯 번째 표본에서 사용자가 지목: "겹치는 선상에 있는 분기 문구가 어느 선에 해당하는지 애매").
|
|
93
|
+
* 전형 = 게이트웨이 팬아웃의 3점 경로(세로 → 가로)는 첫 세로 구간을 갈래끼리 공선 공유하는데,
|
|
94
|
+
* bpmn-js 기본 라벨 위치(중간 구간 중점 = 3점이면 첫 구간)가 정확히 그 공유 구간이라 '승인'·
|
|
95
|
+
* '보완 요청' 이 한 선 위에 나란히 선다. 같은 방향 공선 중첩은 선으로서는 문제가 아니지만
|
|
96
|
+
* (`edge-overlap-opposite` 가 제외한 이유) **라벨 귀속** 축에서는 문제다. `other` = 그 구간을
|
|
97
|
+
* 함께 쓰는 간선(여럿이면 id 최소).
|
|
98
|
+
*/
|
|
99
|
+
| {
|
|
100
|
+
kind: 'label-on-shared-segment';
|
|
101
|
+
edge: string;
|
|
102
|
+
other: string;
|
|
103
|
+
axis: 'h' | 'v';
|
|
80
104
|
};
|
|
81
105
|
/** 발견을 전후 비교(배치가 새로 만든 것 가려내기)할 수 있게 하는 안정 키. */
|
|
82
106
|
export declare function geometryFindingKey(finding: GeometryFinding): string;
|
|
107
|
+
export interface AxisSegment {
|
|
108
|
+
axis: 'h' | 'v';
|
|
109
|
+
/** 고정 좌표(h 면 y, v 면 x). */
|
|
110
|
+
at: number;
|
|
111
|
+
lo: number;
|
|
112
|
+
hi: number;
|
|
113
|
+
/** 진행 방향 부호(+ = 오른쪽/아래). */
|
|
114
|
+
dir: 1 | -1;
|
|
115
|
+
}
|
|
116
|
+
/** 간선의 축 정렬 구간들(웨이포인트 순서). 사선 구간은 뺀다. */
|
|
117
|
+
export declare function axisSegmentsOf(edge: GeometryEdge): AxisSegment[];
|
|
83
118
|
/**
|
|
84
119
|
* 두 간선의 **반대 방향** 공선 중첩 — 가장 긴 겹침의 (축, 길이). 없으면 `null`.
|
|
85
120
|
* 같은 방향 겹침(합류·팬아웃)은 세지 않는다.
|
|
@@ -90,6 +125,26 @@ export declare function oppositeOverlapOf(a: GeometryEdge, b: GeometryEdge): {
|
|
|
90
125
|
} | null;
|
|
91
126
|
/** 한 간선(후보 경로)이 다른 간선들과 만드는 반대 방향 중첩 수. */
|
|
92
127
|
export declare function oppositeOverlapCount(edge: GeometryEdge, others: readonly GeometryEdge[]): number;
|
|
128
|
+
/** bpmn-js `LabelUtil.FLOW_LABEL_INDENT` — 라벨 중심이 선에서 떨어지는 거리(가로 구간은 위, 세로 구간은 오른쪽). */
|
|
129
|
+
export declare const FLOW_LABEL_INDENT = 15;
|
|
130
|
+
/**
|
|
131
|
+
* 갈림점 바로 옆에 붙은 라벨도 모호하다(다섯 번째 표본: 갈림 16px 아래의 '보완 요청' 을 사용자가 더
|
|
132
|
+
* 내렸다) — 공유 구간을 양쪽으로 이만큼 넓혀 본다. 배치(`planLabelPlacement`)도 같은 폭을 뺀다.
|
|
133
|
+
*/
|
|
134
|
+
export declare const LABEL_FORK_MARGIN = 20;
|
|
135
|
+
/**
|
|
136
|
+
* `seg` 가 다른 간선의 구간과 공선 공유하는 부분들(≥ `OVERLAP_MIN_LENGTH`, 방향 무관) — 갈림 여백을
|
|
137
|
+
* 더해 돌려준다. 판정과 배치가 **같은 목록**을 써야 "옮겼는데 여전히 잡힌다"가 나지 않는다.
|
|
138
|
+
*/
|
|
139
|
+
export declare function sharedSpansOf(seg: AxisSegment, otherSegments: readonly AxisSegment[]): Array<[number, number]>;
|
|
140
|
+
/**
|
|
141
|
+
* 이 간선의 라벨이 다른 간선과 **공선 공유하는 구간**(방향 무관, ≥ `OVERLAP_MIN_LENGTH`, 갈림 여백 포함)
|
|
142
|
+
* 위에 놓여 있으면 그 상대(id 최소)와 축을 돌려준다. 라벨이 없거나 고유 구간에 있으면 `null`.
|
|
143
|
+
*/
|
|
144
|
+
export declare function sharedSegmentUnderLabel(edge: GeometryEdge, others: readonly GeometryEdge[]): {
|
|
145
|
+
other: string;
|
|
146
|
+
axis: 'h' | 'v';
|
|
147
|
+
} | null;
|
|
93
148
|
/**
|
|
94
149
|
* 이 간선이 관통하는 도형들(자기 끝점 제외). 판정과 **우회 보정**(routeRepair)이 같은
|
|
95
150
|
* 술어를 써야 "고쳤다는데 판정은 그대로"가 나지 않는다.
|
|
@@ -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 { planCrossPoolRoute, planEdgeRepair, planMiddleSegmentShifts, planOppositeOverlapRepair, planSegmentDetours, repairIntroducedCrossings, repairIntroducedOppositeOverlaps, rerouteIntroducedCrossPoolEdges, } from './routeRepair';
|
|
11
|
+
export { planCrossPoolRoute, planEdgeRepair, planLabelPlacement, planMiddleSegmentShifts, planOppositeOverlapRepair, planSegmentDetours, repairIntroducedCrossings, repairIntroducedOppositeOverlaps, repairIntroducedSharedSegmentLabels, rerouteIntroducedCrossPoolEdges, } from './routeRepair';
|
|
12
12
|
export interface ApplyBpmnOpsResult {
|
|
13
13
|
ok: boolean;
|
|
14
14
|
issues: ResolveIssue[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GeometryEdge, GeometryPoint, GeometryScene, GeometryShape } from '../geometryAudit';
|
|
1
|
+
import { GeometryEdge, GeometryLabel, GeometryPoint, GeometryScene, GeometryShape } from '../geometryAudit';
|
|
2
2
|
import { ResolverServices } from './lower';
|
|
3
3
|
/**
|
|
4
4
|
* 축 정렬 구간이 장애물을 **완전히 가로지를 때** 그것을 우회하는 4점을 만든다(순수).
|
|
@@ -61,3 +61,16 @@ export declare function planOppositeOverlapRepair(edge: GeometryEdge, scene: Geo
|
|
|
61
61
|
* 손댄다(안전 성질 2) — 둘 다 새 것이면 되돌아가는 간선(A 후보가 있는 쪽)부터.
|
|
62
62
|
*/
|
|
63
63
|
export declare function repairIntroducedOppositeOverlaps(services: Pick<ResolverServices, 'elementRegistry' | 'modeling'>, beforeKeys: ReadonlySet<string>, beforeEdgeIds: ReadonlySet<string>): void;
|
|
64
|
+
/**
|
|
65
|
+
* 라벨의 새 bounds(순수). 라벨이 공유 구간 위에 없으면 `null`(옮길 이유가 없다). 고유 구간을 못
|
|
66
|
+
* 찾거나 옮긴 자리가 도형과 겹치면 `null`(손대지 않고 보고에 맡긴다).
|
|
67
|
+
*
|
|
68
|
+
* 구간마다 다른 간선과 공선 공유하는 부분(≥ 20px)을 빼고 남은 **첫 자유 부분** 중 라벨이 들어가는
|
|
69
|
+
* 곳을 고른다 — 부분 공유 구간(갈림점 아래로 이어지는 세로 구간)도 그 아래쪽이 자유 부분이다.
|
|
70
|
+
*/
|
|
71
|
+
export declare function planLabelPlacement(edge: GeometryEdge, scene: GeometryScene): GeometryLabel | null;
|
|
72
|
+
/**
|
|
73
|
+
* 이 배치가 **새로 만든** 간선의 라벨 귀속 문제를 고친다(하강 직후, undo 에피소드 안, 경로 보정들 뒤).
|
|
74
|
+
* 선재 간선의 라벨은 사람이 놓았을 수 있어 손대지 않는다(안전 성질 2).
|
|
75
|
+
*/
|
|
76
|
+
export declare function repairIntroducedSharedSegmentLabels(services: Pick<ResolverServices, 'elementRegistry' | 'modeling'>, beforeKeys: ReadonlySet<string>, beforeEdgeIds: ReadonlySet<string>): void;
|