@g1cloud/bpmn-modeler-next 5.0.0-beta.8 → 5.0.0-beta.80
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/adapter/annotationImportDocking.d.ts +28 -0
- package/dist/adapter/i18n.d.ts +21 -0
- package/dist/adapter/i18nBackfill.d.ts +11 -3
- package/dist/adapter/translationLocaleCopy.d.ts +11 -0
- package/dist/adapter/translationLocaleRestore.d.ts +86 -0
- package/dist/agent/agentBatch.d.ts +17 -1
- package/dist/agent/agentReplay.d.ts +36 -0
- package/dist/agent/describeProcess.d.ts +29 -2
- package/dist/agent/generatedIds.d.ts +18 -0
- package/dist/agent/geometryAudit.d.ts +46 -1
- package/dist/agent/resolver/annotationSize.d.ts +12 -0
- package/dist/agent/resolver/documentIndex.d.ts +12 -0
- package/dist/agent/resolver/index.d.ts +28 -2
- package/dist/agent/resolver/issues.d.ts +53 -0
- package/dist/agent/resolver/localeTexts.d.ts +24 -0
- package/dist/agent/resolver/lower.d.ts +72 -5
- package/dist/agent/resolver/routeRepair.d.ts +172 -4
- package/dist/agent/resolver/validate.d.ts +10 -1
- package/dist/agent/symbolicOp.d.ts +20 -2
- package/dist/bpmn-modeler-next.css +1 -1
- package/dist/bpmn-modeler.js +16899 -14042
- package/dist/bpmn-modeler.umd.cjs +106 -107
- package/dist/command/annotationExactResize.d.ts +30 -0
- package/dist/command/setTranslations.d.ts +42 -0
- package/dist/command/translationCommands.d.ts +11 -0
- package/dist/command/undoEpisode.d.ts +7 -0
- package/dist/core/ir.d.ts +48 -1
- package/dist/editor/controller.d.ts +14 -1
- package/dist/editor/editLock.d.ts +9 -0
- package/dist/headless/dom.d.ts +2 -0
- package/dist/headless/modeler.d.ts +22 -2
- package/dist/index.d.ts +7 -0
- package/dist/view/BpmnModelerView.vue.d.ts +7 -0
- package/dist/view/headlessReplay.d.ts +63 -0
- package/dist/view/i18nDisplay.d.ts +18 -6
- package/dist/view/minimap.d.ts +25 -0
- package/package.json +3 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 주석 연관선의 가져오기 도킹 원점 (B-139) — 주석 쪽 끝점의 `original` 이 **주석 밖**이면 주석 중심으로 옮긴다.
|
|
3
|
+
*
|
|
4
|
+
* bpmn-js `ImportDockingFix` 는 가져올 때 연결선 끝점마다 `original`(도형이 움직일 때 끝점이 따라갈 기준)을
|
|
5
|
+
* 「끝 구간 연장선 × 도형 중심 십자선」 교점 중 중심에 가까운 쪽으로 잡는다. 납작한 주석(높이 30 안팎)에 얕은
|
|
6
|
+
* 사선 연관이 닿으면 그 교점이 **주석 밖**이고(이관 레거시 연관 끝점 ≈ 25%), 주석이나 앵커를 옮기면 끝점이 그
|
|
7
|
+
* 상대 위치를 따라가 주석 밖에 남는다 = 연관선이 주석에서 떨어진다(`edge-endpoint-detached`).
|
|
8
|
+
*
|
|
9
|
+
* 🔴 **resolver 가 아니라 가져오기에 건다** — 에이전트 하강의 안전망(B-98 재도킹)은 반려될 수 있고, **GUI 이동에는
|
|
10
|
+
* 안전망이 아예 없다**(표본 125 = 도구가 주석을 옮겨 연관이 얕아진 문서를 사람이 GUI 로 옮기다 끊었다). 캔버스 ·
|
|
11
|
+
* 헤드리스 양쪽 가져오기에 등록한다. 중심으로 두면 bpmn-js 의 의도(「중심 쪽 원점 → 앵커를 향한 면에 붙는다」)가
|
|
12
|
+
* 살아난다. 주석 안 원점 · 주석이 아닌 끝 · 연관이 아닌 연결선은 건드리지 않는다. 저장되는 DI 는 바뀌지 않는다
|
|
13
|
+
* (`original` 은 직렬화되지 않는다 — 다음 이동부터 다르다).
|
|
14
|
+
*
|
|
15
|
+
* ⚠ **bpmn-js 내부 이벤트(`bpmnElement.added`)와 `ImportDockingFix` 의 원점 규칙에 기댄다** — pin 상향 게이트 =
|
|
16
|
+
* `annotationImportDocking.browser.test.ts`(`translationLocaleCopy` 와 같은 처지).
|
|
17
|
+
*/
|
|
18
|
+
type Any = any;
|
|
19
|
+
export declare class AnnotationImportDocking {
|
|
20
|
+
static $inject: string[];
|
|
21
|
+
constructor(eventBus: Any);
|
|
22
|
+
}
|
|
23
|
+
/** bpmn-js 모듈 — 서비스 이름 = `annotationImportDocking`. 헤드리스 기본 셋과 `BpmnModelerView` 가 붙인다. */
|
|
24
|
+
export declare const AnnotationImportDockingModule: {
|
|
25
|
+
__init__: string[];
|
|
26
|
+
annotationImportDocking: (string | typeof AnnotationImportDocking)[];
|
|
27
|
+
};
|
|
28
|
+
export {};
|
package/dist/adapter/i18n.d.ts
CHANGED
|
@@ -17,4 +17,25 @@ export declare function translationsOf(bo: Any): Any[];
|
|
|
17
17
|
export declare function translationLocale(t: Any): string | undefined;
|
|
18
18
|
/** 요소의 확인 요청 표식 전부(`bwl:ReviewRequest` — 상태 표식 · C-1). */
|
|
19
19
|
export declare function reviewRequestsOf(bo: Any): Any[];
|
|
20
|
+
/**
|
|
21
|
+
* 문서 언어 설정(B-4) — 설계 언어(고객에게 전달하는 설계 문서의 언어 · `name` 이 따른다) + 병기 언어(함께 최신으로
|
|
22
|
+
* 유지할 언어들). 호스트 그룹 설정(`designLocale` · `companionLocales`)과 같은 이름이라 그대로 넘긴다.
|
|
23
|
+
* 미설정(`undefined`) = 기능 끔.
|
|
24
|
+
*/
|
|
25
|
+
export interface BpmnDocumentLocales {
|
|
26
|
+
designLocale: string;
|
|
27
|
+
companionLocales: string[];
|
|
28
|
+
}
|
|
29
|
+
/** 문서 언어 목록 — 설계 언어가 맨 앞 · 병기 언어에서 설계 언어와 중복은 뺀다. */
|
|
30
|
+
export declare function documentLocalesOf(config: BpmnDocumentLocales): string[];
|
|
31
|
+
/** 루트 `<bpmn:definitions xml:lang>` — 번역 칸으로 판정되지 않는 `name` 의 언어. */
|
|
32
|
+
export declare function rootLangOf(definitions: Any): string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* 요소 라벨의 문서 언어별 문구(B-4 ④) — 표시 판정(`view/i18nDisplay` `resolve`)과 **같은 규칙**이다:
|
|
35
|
+
* `name` 의 언어가 그 언어면 `name` → 아니면 그 언어의 번역 칸(`xml:lang` 있는 칸 · 문구 있음) → 없으면 빠진다
|
|
36
|
+
* (= 미번역). `name` 의 언어 = 같은 문구의 번역 칸 로케일 → 없으면 루트 `xml:lang` → 설계 언어.
|
|
37
|
+
*
|
|
38
|
+
* 에이전트 대면 read(`describeProcess` 의 `names`/`texts`)와 에이전트 쓰기의 「바뀌었나」 판정이 같이 쓴다.
|
|
39
|
+
*/
|
|
40
|
+
export declare function localeTextsOf(bo: Any, config: BpmnDocumentLocales, rootLang?: string): Record<string, string>;
|
|
20
41
|
export {};
|
|
@@ -11,9 +11,17 @@ export declare function inferScriptLocale(text: string): ScriptInference;
|
|
|
11
11
|
/**
|
|
12
12
|
* 루트 판정의 근거.
|
|
13
13
|
* `kept` 이미 있다 · `matched` 번역 칸과 같은 이름들의 공통 언어 · `script` 문자 체계가 한 언어로 모인다 ·
|
|
14
|
-
* `ambiguous` 공통 언어가 여럿이고 문자 체계로도 못 고른다 · `mixed` 근거가 서로 다른 언어 · `no-evidence` 근거 없음
|
|
14
|
+
* `ambiguous` 공통 언어가 여럿이고 문자 체계로도 못 고른다 · `mixed` 근거가 서로 다른 언어 · `no-evidence` 근거 없음 ·
|
|
15
|
+
* `non-design` 근거가 설계 언어 아닌 언어를 가리킨다 — 루트로 쓰지 않는다(그 언어 이름은 요소 칸으로 · B-177)
|
|
15
16
|
*/
|
|
16
|
-
export type RootLocaleReason = 'kept' | 'matched' | 'script' | 'ambiguous' | 'mixed' | 'no-evidence';
|
|
17
|
+
export type RootLocaleReason = 'kept' | 'matched' | 'script' | 'ambiguous' | 'mixed' | 'no-evidence' | 'non-design';
|
|
18
|
+
export interface LocaleBackfillOptions {
|
|
19
|
+
/**
|
|
20
|
+
* 그룹의 설계 언어 — 주면 그와 다른 루트는 쓰지 않는다(`non-design`). 없으면 종전 판정 그대로.
|
|
21
|
+
* 루트가 없으면 표시 판정이 이름을 설계 언어로 읽으므로, 루트는 설계 언어일 때만 말할 것이 있다.
|
|
22
|
+
*/
|
|
23
|
+
designLocale?: string;
|
|
24
|
+
}
|
|
17
25
|
/** 계획 항목이 가리키는 요소 — 미리보기 화면이 사람에게 보여 줄 최소 정보. */
|
|
18
26
|
export interface LocaleBackfillElement {
|
|
19
27
|
id: string;
|
|
@@ -55,7 +63,7 @@ export interface LocaleBackfillPlan {
|
|
|
55
63
|
}>;
|
|
56
64
|
}
|
|
57
65
|
/** 언어 백필 계획 — 문서를 바꾸지 않는다. */
|
|
58
|
-
export declare function planLocaleBackfill(definitions: Any): LocaleBackfillPlan;
|
|
66
|
+
export declare function planLocaleBackfill(definitions: Any, options?: LocaleBackfillOptions): LocaleBackfillPlan;
|
|
59
67
|
/**
|
|
60
68
|
* 계획을 문서에 쓴다 — 바꾼 곳 수를 돌려준다. **멱등**이고 계획 뒤 문서가 바뀌었어도 덮지 않는다:
|
|
61
69
|
* 루트가 이미 있으면 루트를 건너뛰고, 요소는 지금도 「언어 기록 없음 + 이름이 계획 때 그대로」일 때만 쓴다.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Any = any;
|
|
2
|
+
export declare class TranslationLocaleCopy {
|
|
3
|
+
static $inject: string[];
|
|
4
|
+
constructor(eventBus: Any);
|
|
5
|
+
}
|
|
6
|
+
/** bpmn-js 모듈 — 서비스 이름 = `translationLocaleCopy`. 헤드리스 기본 셋과 `BpmnModelerView` 가 붙인다. */
|
|
7
|
+
export declare const TranslationLocaleCopyModule: {
|
|
8
|
+
__init__: string[];
|
|
9
|
+
translationLocaleCopy: (string | typeof TranslationLocaleCopy)[];
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { ScriptKind } from './i18nBackfill';
|
|
2
|
+
type Any = any;
|
|
3
|
+
/** 번역 칸 하나의 상태 — `locale` 없음 = `xml:lang` 이 없는 칸. */
|
|
4
|
+
export interface TranslationCellState {
|
|
5
|
+
locale?: string;
|
|
6
|
+
body: string;
|
|
7
|
+
}
|
|
8
|
+
/** 요소 하나의 번역 칸 상태(문서 순서). */
|
|
9
|
+
export interface TranslationElementState {
|
|
10
|
+
/** moddle 타입(`bpmn:Task` 등). */
|
|
11
|
+
type: string;
|
|
12
|
+
cells: TranslationCellState[];
|
|
13
|
+
}
|
|
14
|
+
/** 문서 한 판본의 번역 칸 상태 — 요소 id → 상태(번역 칸이 있는 DI 평면 요소만). */
|
|
15
|
+
export type TranslationStates = Map<string, TranslationElementState>;
|
|
16
|
+
/** 문서 한 판본의 번역 칸 상태를 뽑는다(문서 무변경). */
|
|
17
|
+
export declare function collectTranslationStates(definitions: Any): TranslationStates;
|
|
18
|
+
interface IndexedState {
|
|
19
|
+
doc: string;
|
|
20
|
+
version: number;
|
|
21
|
+
id: string;
|
|
22
|
+
state: TranslationElementState;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 근거 색인 — 그룹 문서 전부의 판본(현재본 · 이력)을 담는다. 언어 칸이 하나도 없는 상태는 근거가 될 수 없어 담지 않는다.
|
|
26
|
+
* `doc` = 문서 식별자(호스트 문서 id) · `version` = 판본 번호(`history` 단계가 최근 판본부터 본다).
|
|
27
|
+
*/
|
|
28
|
+
export declare class TranslationStateIndex {
|
|
29
|
+
private readonly byId;
|
|
30
|
+
private readonly byBodies;
|
|
31
|
+
add(doc: string, version: number, states: TranslationStates): void;
|
|
32
|
+
/** @internal */
|
|
33
|
+
sameId(id: string): IndexedState[];
|
|
34
|
+
/** @internal */
|
|
35
|
+
sameBodies(cells: TranslationCellState[]): IndexedState[];
|
|
36
|
+
}
|
|
37
|
+
/** 근거 단계 — `history` 같은 문서 이전 판본 · `lineage` 다른 문서 같은 요소 id · `bodies` id 무관 같은 본문 묶음. */
|
|
38
|
+
export type TranslationLocaleRestoreSource = 'history' | 'lineage' | 'bodies';
|
|
39
|
+
/** 계획 항목이 가리키는 요소. */
|
|
40
|
+
export interface TranslationLocaleRestoreTarget {
|
|
41
|
+
id: string;
|
|
42
|
+
/** moddle 타입. */
|
|
43
|
+
type: string;
|
|
44
|
+
}
|
|
45
|
+
export interface TranslationLocaleRestorePlan {
|
|
46
|
+
/** 되살릴 칸 — 적용은 그 본문의 무언어 칸이 남아 있고 요소에 그 언어가 아직 없을 때만 쓴다. */
|
|
47
|
+
restores: Array<TranslationLocaleRestoreTarget & {
|
|
48
|
+
source: TranslationLocaleRestoreSource;
|
|
49
|
+
cells: Array<{
|
|
50
|
+
body: string;
|
|
51
|
+
locale: string;
|
|
52
|
+
}>;
|
|
53
|
+
}>;
|
|
54
|
+
/** 맞는 근거 상태들이 서로 다른 배정을 낸다 — 쓰지 않는다(사람 확인). */
|
|
55
|
+
ambiguous: Array<TranslationLocaleRestoreTarget & {
|
|
56
|
+
source: TranslationLocaleRestoreSource;
|
|
57
|
+
}>;
|
|
58
|
+
/** 근거 언어가 이미 요소에 있다 — 손실 뒤 그 언어를 다시 썼다 · 무언어 칸은 낡은 문구(되살리지 않는다). */
|
|
59
|
+
stale: Array<TranslationLocaleRestoreTarget & {
|
|
60
|
+
body: string;
|
|
61
|
+
locale: string;
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* 후보인데 근거 상태가 없다 — 쓰지 않는다. `script` = 문자 체계(사람 확인 · 문자 판정 쓰기는 범위 밖).
|
|
65
|
+
* 문서에 나오는 언어를 그 요소가 이미 다 가졌으면 되살릴 언어가 없으므로 싣지 않는다(언어 칸 옆의 잔재 칸 — 로컬 실측 7).
|
|
66
|
+
*/
|
|
67
|
+
unresolved: Array<TranslationLocaleRestoreTarget & {
|
|
68
|
+
body: string;
|
|
69
|
+
script: ScriptKind;
|
|
70
|
+
}>;
|
|
71
|
+
}
|
|
72
|
+
export interface TranslationLocaleRestoreContext {
|
|
73
|
+
/** 이 문서의 식별자 — 색인의 `doc` 과 같은 값. */
|
|
74
|
+
doc: string;
|
|
75
|
+
index: TranslationStateIndex;
|
|
76
|
+
/** 문서 이력 첫 판본의 상태 — 그 뒤에 생긴 무언어 칸만 후보다. 없으면 칸 전부가 무언어인 요소만 본다. */
|
|
77
|
+
baseline?: TranslationStates;
|
|
78
|
+
}
|
|
79
|
+
/** 언어 복구 계획 — 문서를 바꾸지 않는다. */
|
|
80
|
+
export declare function planTranslationLocaleRestore(definitions: Any, ctx: TranslationLocaleRestoreContext): TranslationLocaleRestorePlan;
|
|
81
|
+
/**
|
|
82
|
+
* 계획을 문서에 쓴다 — 바꾼 칸 수를 돌려준다. **멱등**이고 계획 뒤 문서가 바뀌었어도 덮지 않는다: 그 본문의 무언어 칸이
|
|
83
|
+
* 남아 있고 요소에 그 언어가 아직 없을 때만 그 칸에 `xml:lang` 을 단다.
|
|
84
|
+
*/
|
|
85
|
+
export declare function applyTranslationLocaleRestore(definitions: Any, plan: TranslationLocaleRestorePlan): number;
|
|
86
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import { BpmnDocumentModelerLike } from '../core/modelerLike';
|
|
|
2
2
|
import { SymbolicOp } from './symbolicOp';
|
|
3
3
|
import { ApplyBpmnOpsResult, ResolveIssue } from './resolver';
|
|
4
4
|
import { GeometryFinding } from './geometryAudit';
|
|
5
|
+
import { BpmnDocumentLocales } from '../adapter/i18n';
|
|
5
6
|
/** op 출처 — 감사·정책 분기용. `gui` = 호스트 채팅 패널, `rest` = 외부 브리지. */
|
|
6
7
|
export type BpmnOpOrigin = 'agent' | 'gui' | 'rest';
|
|
7
8
|
export interface BpmnOpBatch {
|
|
@@ -43,6 +44,11 @@ export type ApplyBatchOutcome =
|
|
|
43
44
|
findings: GeometryFinding[];
|
|
44
45
|
/** 간선 교차 계측(B-14 ⓐ) — 문서 전체, 하강 전/후. finding 이 아니다. */
|
|
45
46
|
stats: ApplyBpmnOpsResult['stats'];
|
|
47
|
+
/**
|
|
48
|
+
* 이 배치가 bpmn-js 에 **무작위로 만들게 한 id** — 생성 순서 그대로(`recordGeneratedIds` 옵션일 때만).
|
|
49
|
+
* 열린 에디터의 턴 끝 재실행(G4 B′ · `replayAgentTurn`)이 같은 순서로 받아 써야 산출이 바이트로 같아진다.
|
|
50
|
+
*/
|
|
51
|
+
generatedIds?: string[];
|
|
46
52
|
} | {
|
|
47
53
|
status: 'conflict';
|
|
48
54
|
baseVersion: number;
|
|
@@ -54,6 +60,16 @@ export type ApplyBatchOutcome =
|
|
|
54
60
|
export interface ApplyBpmnOpBatchOptions {
|
|
55
61
|
/** 적용 시점의 권위 버전 — 호스트(영속 소유자)가 공급한다. */
|
|
56
62
|
currentVersion: number;
|
|
63
|
+
/**
|
|
64
|
+
* 그 문서가 속한 그룹의 문서 언어 설정(B-4 ④) — 호스트가 공급한다(문서에 없다). 있으면 문구는 `names`/`texts`
|
|
65
|
+
* 로 문서 언어 전부를 받고, 없으면 평문만 받는다(`applyBpmnOps` 의 같은 옵션).
|
|
66
|
+
*/
|
|
67
|
+
i18n?: BpmnDocumentLocales;
|
|
68
|
+
/**
|
|
69
|
+
* 생성 id 를 순서대로 기록해 `applied.generatedIds` 로 낸다(G4 B′) — 생성 자체는 바꾸지 않는다(관찰만).
|
|
70
|
+
* 서버 집행 코어가 GUI 채팅 턴의 배치에 켠다. 기본 끔(응답 형태 종전 그대로).
|
|
71
|
+
*/
|
|
72
|
+
recordGeneratedIds?: boolean;
|
|
57
73
|
}
|
|
58
74
|
/**
|
|
59
75
|
* 배치를 캔버스에 적용하고 영속 페이로드를 낸다.
|
|
@@ -64,4 +80,4 @@ export interface ApplyBpmnOpBatchOptions {
|
|
|
64
80
|
* 적용은 단일 undo 에피소드다(`applyBpmnOps` → `command/undoEpisode`) — 배치 수십 op 가
|
|
65
81
|
* 사용자 undo 1회로 되감긴다.
|
|
66
82
|
*/
|
|
67
|
-
export declare function applyBpmnOpBatch(modeler: BpmnDocumentModelerLike, batch: BpmnOpBatch, { currentVersion }: ApplyBpmnOpBatchOptions): Promise<ApplyBatchOutcome>;
|
|
83
|
+
export declare function applyBpmnOpBatch(modeler: BpmnDocumentModelerLike, batch: BpmnOpBatch, { currentVersion, i18n, recordGeneratedIds: record }: ApplyBpmnOpBatchOptions): Promise<ApplyBatchOutcome>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { BpmnDocumentModelerLike } from '../core/modelerLike';
|
|
2
|
+
import { BpmnDocumentLocales } from '../adapter/i18n';
|
|
3
|
+
import { SymbolicOp } from './symbolicOp';
|
|
4
|
+
/** 턴의 배치 하나 — 서버가 커밋한 순서대로. `generatedIds` = 서버 `applied.generatedIds`(`recordGeneratedIds`). */
|
|
5
|
+
export interface BpmnReplayBatch {
|
|
6
|
+
ops: SymbolicOp[];
|
|
7
|
+
generatedIds: string[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 재실행 결과. `diverged` 면 문서는 **재실행 전 상태로 되감겨 있다** — 호스트는 서버 XML 로 reload 한다.
|
|
11
|
+
* - `unsupported` — 이 modeler 에 헤드리스 동등 실행 환경이 없다(`HeadlessReplayModule` 미탑재) · 배치가 없다
|
|
12
|
+
* - `rejected` — 배치가 검증 · 하강에서 거부됐다(서버에서는 통과한 배치다 — 시작 상태가 이미 달랐다)
|
|
13
|
+
* - `ids` — 생성 id 를 다 못 받아 썼다 · 남았다(하강 경로가 서버와 갈렸다)
|
|
14
|
+
* - `xml` — 끝까지 갔지만 바이트가 다르다
|
|
15
|
+
* - `error` — 예외
|
|
16
|
+
* `ms` = 재실행 소요(비교 포함) — 폴백률 · 비용 관측용(결정 §7).
|
|
17
|
+
*/
|
|
18
|
+
export type ReplayAgentTurnOutcome = {
|
|
19
|
+
status: 'replayed';
|
|
20
|
+
ms: number;
|
|
21
|
+
} | {
|
|
22
|
+
status: 'diverged';
|
|
23
|
+
reason: 'unsupported' | 'rejected' | 'ids' | 'xml' | 'error';
|
|
24
|
+
/** 사람이 읽을 단서(거부 issue 요약 · 예외 문장 · id 수). */
|
|
25
|
+
detail?: string;
|
|
26
|
+
ms: number;
|
|
27
|
+
};
|
|
28
|
+
export interface ReplayAgentTurnOptions {
|
|
29
|
+
/** 서버가 이 턴 마지막 배치로 커밋한 XML — 판정 기준. */
|
|
30
|
+
expectedXml: string;
|
|
31
|
+
/** 그룹 문서 언어(B-4 ④) — 서버와 같은 값이어야 같은 검증 · 하강을 탄다. */
|
|
32
|
+
i18n?: BpmnDocumentLocales;
|
|
33
|
+
}
|
|
34
|
+
export declare function replayAgentTurn(modeler: BpmnDocumentModelerLike & {
|
|
35
|
+
get<T>(name: string, strict?: boolean): T;
|
|
36
|
+
}, batches: readonly BpmnReplayBatch[], { expectedXml, i18n }: ReplayAgentTurnOptions): Promise<ReplayAgentTurnOutcome>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ModdleElement, ParseWarning } from '../adapter/xml';
|
|
2
|
+
import { BpmnDocumentLocales } from '../adapter/i18n';
|
|
3
|
+
import { ReviewRequestValue } from '../command/setTranslations';
|
|
2
4
|
import { BwlAfterColumn, BwlBand, BwlPlacement, BwlPoolOrder } from '../core/hints';
|
|
3
5
|
import { IrDefinition } from '../core/ir';
|
|
4
6
|
/** 파생 뷰가 표현하지 못한 요소 — 침묵 폐기 금지(에이전트가 미표현 존재를 알아야 안전). */
|
|
@@ -41,15 +43,40 @@ export interface BwlHintView {
|
|
|
41
43
|
/** 주석 id → 앵커 기준 방위 (앵커 부재분은 필터됨) */
|
|
42
44
|
placements: Record<string, BwlPlacement>;
|
|
43
45
|
}
|
|
46
|
+
/** 확인 요청 표식 한 건(B-4 ④) — `id` 요소의 `locale` 칸에 걸렸다. `sourceLocale` 이 `previous` → 지금 문구로 고쳐졌다. */
|
|
47
|
+
export interface ReviewRequestView extends ReviewRequestValue {
|
|
48
|
+
id: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 다국어 판독 결과(B-4 ④) — 문서 언어 설정이 있을 때만 낸다. IR 밖 채널(위 헤더 「다국어」).
|
|
52
|
+
* 에이전트는 이 값이 있으면 문구를 `names`/`texts` 로 문서 언어 전부를 써야 한다.
|
|
53
|
+
*/
|
|
54
|
+
export interface I18nView {
|
|
55
|
+
designLocale: string;
|
|
56
|
+
/** 병기 언어(설계 언어 제외 · 중복 제거). */
|
|
57
|
+
companionLocales: string[];
|
|
58
|
+
/**
|
|
59
|
+
* 정리할 확인 요청 — 문서 언어 칸에 걸린 것만. `previous`(고치기 전 원문) → 지금 `names[sourceLocale]` 를 대조해
|
|
60
|
+
* 오타 수준이면 `translation.confirm`, 내용이 바뀌었으면 그 요소 update 에 `names` 로 번역을 고친다.
|
|
61
|
+
*/
|
|
62
|
+
reviewRequests: ReviewRequestView[];
|
|
63
|
+
}
|
|
44
64
|
export interface DescribeProcessResult {
|
|
45
65
|
definition: IrDefinition;
|
|
46
66
|
hints: BwlHintView;
|
|
47
67
|
omitted: IrOmission[];
|
|
68
|
+
/** 문서 언어 설정이 있을 때만 있다(B-4 ④). */
|
|
69
|
+
i18n?: I18nView;
|
|
70
|
+
}
|
|
71
|
+
/** 판독 옵션 — 문서 밖에서만 알 수 있는 입력. */
|
|
72
|
+
export interface DescribeProcessOptions {
|
|
73
|
+
/** 그룹의 문서 언어 설정(B-4 ④) — 문서에 없어 호스트가 공급한다. 없으면 다국어 판독을 하지 않는다. */
|
|
74
|
+
i18n?: BpmnDocumentLocales;
|
|
48
75
|
}
|
|
49
76
|
export interface DescribeProcessXmlResult extends DescribeProcessResult {
|
|
50
77
|
/** 입력 XML 파싱 경고 — 실운영 문서는 빈 배열이어야 한다(M1 수용 기준 1). */
|
|
51
78
|
warnings: ParseWarning[];
|
|
52
79
|
}
|
|
53
|
-
export declare function describeProcess(definitions: ModdleElement): DescribeProcessResult;
|
|
80
|
+
export declare function describeProcess(definitions: ModdleElement, options?: DescribeProcessOptions): DescribeProcessResult;
|
|
54
81
|
/** XML 문자열 입력 래퍼 — 헤드리스 read 경로(호스트 `describeProcess` API·테스트). */
|
|
55
|
-
export declare function describeProcessXml(xml: string): Promise<DescribeProcessXmlResult>;
|
|
82
|
+
export declare function describeProcessXml(xml: string, options?: DescribeProcessOptions): Promise<DescribeProcessXmlResult>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BpmnModelerLike } from '../core/modelerLike';
|
|
2
|
+
/** `run` 동안 생성된 id 를 순서대로 모은다 — 생성 자체는 바꾸지 않는다(관찰만). */
|
|
3
|
+
export declare function recordGeneratedIds<T>(modeler: BpmnModelerLike, run: () => T): {
|
|
4
|
+
value: T;
|
|
5
|
+
generatedIds: string[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* `run` 동안 생성을 `generatedIds` 순서로 대신한다. 다음 id 가 없거나 · 접두가 다르거나 · 이미 쓰인 id 면
|
|
9
|
+
* **무작위 생성으로 떨어지고 `missed` 를 센다** — 하강을 멈추지 않는다(판정은 호출자가 바이트 비교로 한다).
|
|
10
|
+
*
|
|
11
|
+
* @returns `fed` = 주입한 수 · `missed` = 떨어진 수 · `remaining` = 쓰지 않고 남은 수(셋 다 0 · 0 · 0 이 아니면 갈렸다)
|
|
12
|
+
*/
|
|
13
|
+
export declare function feedGeneratedIds<T>(modeler: BpmnModelerLike, generatedIds: readonly string[], run: () => T): {
|
|
14
|
+
value: T;
|
|
15
|
+
fed: number;
|
|
16
|
+
missed: number;
|
|
17
|
+
remaining: number;
|
|
18
|
+
};
|
|
@@ -514,6 +514,27 @@ export type GeometryFinding =
|
|
|
514
514
|
edge: string;
|
|
515
515
|
shape: string;
|
|
516
516
|
distance: number;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* 🔴 **다이아몬드 합류가 자기 선행보다 앞(왼쪽)에 그려져 그 선이 거꾸로 든다**(B-213 · 관측 전용). 합류 = 비루프
|
|
520
|
+
* 선행(합류에서 다시 닿지 않는 출발) 둘 이상 · 다이아몬드 = 그 선행들이 공통 조상을 가진다(같은 분기에서 갈라진
|
|
521
|
+
* 경로가 만난다) · 앞 = 합류 중심 x 가 **선행 상자의 왼쪽 끝보다 왼쪽** — 선행에서 합류로 가는 선이 **반드시** 왼쪽으로
|
|
522
|
+
* 간다. ⚠ 중심끼리 비교하면 합류가 선행 바로 위에 조금 비켜 있어 곧은 수직선으로 잇는 자리까지 잡는다(같은 열이다).
|
|
523
|
+
* `edge` = 그 선행에서 합류로 드는 시퀀스.
|
|
524
|
+
*
|
|
525
|
+
* 원인은 2단계 탐욕 배치가 합류를 **처음 처리된 유입의 다음 열**에 세운 것이었다(분기 → 합류 직결 출구를 긴 갈래보다
|
|
526
|
+
* 먼저 선언 — 원격 반품 문서 두 풀). 하강은 B-213 이 고쳤고 이 판정은 그 밖의 경로(사람 편집 · 외부 도구 · 다이아몬드가
|
|
527
|
+
* 아닌 갱신)를 보는 안전망이다.
|
|
528
|
+
*
|
|
529
|
+
* 🔴 **다이아몬드로 좁히는 것이 판별자다**(N20) — 사람 레거시 다이아몬드 합류 **0/133**(갈래 깊이 차 ≥ 2 가 39% 인데도)
|
|
530
|
+
* · 우리 산출 0/69 인데, 다이아몬드가 아닌 합류(메시지로 시작하는 수신 태스크가 왼쪽 합류로 드는 꼴 등)는 사람도
|
|
531
|
+
* 6/41 을 그렇게 둔다. ⚠ **관측 전용인 이유** — 채택 게이트에 넣으면 보정 단계의 제약이 되는데 게이트마다 반사실을
|
|
532
|
+
* 거치지 않았다(모듈 머리 주석).
|
|
533
|
+
*/
|
|
534
|
+
| {
|
|
535
|
+
kind: 'merge-before-predecessor';
|
|
536
|
+
merge: string;
|
|
537
|
+
edge: string;
|
|
517
538
|
};
|
|
518
539
|
/** 발견을 전후 비교(배치가 새로 만든 것 가려내기)할 수 있게 하는 안정 키. */
|
|
519
540
|
export declare function geometryFindingKey(finding: GeometryFinding): string;
|
|
@@ -613,6 +634,8 @@ export declare function segmentShapeClearance(a: GeometryPoint, b: GeometryPoint
|
|
|
613
634
|
/**
|
|
614
635
|
* 한 간선(또는 그 후보 경로)이 다른 간선들과 교차하는 수. **끝점을 공유하는 간선은 제외**한다 —
|
|
615
636
|
* 같은 노드에서 나가는 팬아웃·같은 노드로 드는 합류는 꺾이는 자리가 겹쳐 보여도 교차가 아니다.
|
|
637
|
+
* ⚠ `segmentsCross` 가 이미 접촉을 안 세므로 이 제외가 실제로 막는 것은 **내부 진성 교차**뿐이다(B-146) —
|
|
638
|
+
* 그쪽은 `sharedEndpointCrossingPairsOf` 가 따로 센다. 이 제외를 풀지 말 것: 위에 라우팅 채택 게이트가 선다.
|
|
616
639
|
*/
|
|
617
640
|
export declare function edgeCrossCount(edge: GeometryEdge, others: readonly GeometryEdge[]): number;
|
|
618
641
|
/**
|
|
@@ -625,6 +648,18 @@ export declare function crossingCost(edge: GeometryEdge, others: readonly Geomet
|
|
|
625
648
|
export declare function sceneCrossingCost(scene: GeometryScene): number;
|
|
626
649
|
/** 장면 전체의 교차 쌍(id 오름차순 정렬, 결정론적). 길이가 곧 교차 수다. */
|
|
627
650
|
export declare function edgeCrossingPairsOf(scene: GeometryScene): Array<[string, string]>;
|
|
651
|
+
/**
|
|
652
|
+
* **끝점을 공유하는** 쌍의 진성 교차(B-146 ⓐ′ · 관측 전용) — `edgeCrossingPairsOf` 가 통째로 빼는 쌍 중
|
|
653
|
+
* 간선 **내부**에서 가로지르는 것. 둘을 합치면 장면의 진성 교차 전량이고 겹치는 쌍은 없다.
|
|
654
|
+
*
|
|
655
|
+
* 표본 98 에서 사람이 고친 교차가 이것이었다 — 게이트웨이 → 오류 노드 갈래와 오류 노드 → 상류 되돌아감이
|
|
656
|
+
* 오류 노드를 함께 끝점으로 가져 판정·계수가 모두 침묵했다(사람은 두 간선의 출입 변을 맞바꿨다).
|
|
657
|
+
* 🔴 **라우팅·채택 게이트의 입력이 아니다** — `edgeCrossCount` 의 제외를 바꾸면 그 위의 우회 채택·교차 보정과
|
|
658
|
+
* `--check` 기대값이 함께 움직인다. 이 함수는 보이게만 한다.
|
|
659
|
+
* ⚠ 「공유」는 각 어댑터의 `endpoints` 를 따른다 — 데이터 연관은 두 어댑터가 다르게 담는다(저장본 = 저장소만 ·
|
|
660
|
+
* 캔버스 = 활동 + 저장소).
|
|
661
|
+
*/
|
|
662
|
+
export declare function sharedEndpointCrossingPairsOf(scene: GeometryScene): Array<[string, string]>;
|
|
628
663
|
/**
|
|
629
664
|
* 교차 쌍을 **에이전트가 판단할 수 있는 재료로 분해**한다(B-43). 개수만으로는 "이 정도가 정상인가" 를
|
|
630
665
|
* 가릴 수 없고, 지금까지 세 회차에서 같은 마찰이 났다(표본 34·36 은 재료 없이도 결론이 맞았으나
|
|
@@ -677,6 +712,16 @@ export declare function shapesUnderLabel(label: GeometryLabel, scene: GeometrySc
|
|
|
677
712
|
shape: string;
|
|
678
713
|
depth: number;
|
|
679
714
|
}>;
|
|
715
|
+
/**
|
|
716
|
+
* **B-91 ⓐ — 풀 × 풀 겹침 쌍.** 판정(`pool-overlap`)과 resolver 채택 게이트(B-174 ⓑ — ⓒ 막힌 열)가 **같은 정의**를 쓴다.
|
|
717
|
+
*
|
|
718
|
+
* 🔴 **양을 재지 않는다 — 겹치는가만 본다**(오탐 기저 0/97). 접촉(경계가 닿는 것)은 겹침이 아니다.
|
|
719
|
+
* `contained` = 한쪽이 다른 쪽을 통째로 덮었다.
|
|
720
|
+
*/
|
|
721
|
+
export declare function poolOverlapsOf(shapes: readonly Pick<GeometryShape, 'id' | 'type' | 'x' | 'y' | 'width' | 'height'>[]): Array<{
|
|
722
|
+
pools: [string, string];
|
|
723
|
+
contained: boolean;
|
|
724
|
+
}>;
|
|
680
725
|
/**
|
|
681
726
|
* 기하 판정 (순수). 결과는 **결정론적 순서**로 정렬해 반환한다 — 전후 diff·골든 비교·회귀
|
|
682
727
|
* 고정이 전부 순서에 의존한다.
|
|
@@ -686,7 +731,7 @@ export declare function shapesUnderLabel(label: GeometryLabel, scene: GeometrySc
|
|
|
686
731
|
*/
|
|
687
732
|
export interface AuditGeometryOptions {
|
|
688
733
|
/**
|
|
689
|
-
* **관측 전용 kind** 까지 낸다(현재 = `edge-along-group-boundary` · `label-over-shape`) — 판정 표면(배치 응답 · 문서 전체 ·
|
|
734
|
+
* **관측 전용 kind** 까지 낸다(현재 = `edge-along-group-boundary` · `label-over-shape` · `merge-before-predecessor`) — 판정 표면(배치 응답 · 문서 전체 ·
|
|
690
735
|
* GUI 패널)만 켠다. resolver 채택 게이트는 켜지 않는다(모듈 머리 주석 — 켜면 게이트 제약이 된다).
|
|
691
736
|
*/
|
|
692
737
|
includeObservationOnly?: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** 주석 글자 폭 근사(12px) — 위 ①. */
|
|
2
|
+
export declare function annotationTextWidth(text: string): number;
|
|
3
|
+
/** `maxWidth`(여백을 뺀 글자 칸)에서 diagram-js 가 낼 줄들. */
|
|
4
|
+
export declare function wrapAnnotationText(text: string, maxWidth: number, measure?: (text: string) => number): string[];
|
|
5
|
+
/**
|
|
6
|
+
* 주석 상자 크기 — `texts` = 그 주석이 그려질 문구 전부(다국어 그룹 = 문서 언어마다 · 그 밖 = 평문 하나). 폭은 가장 긴
|
|
7
|
+
* 줄 + 1px(근사가 칸과 같으면 엄격 비교가 줄을 바꾼다) 을 상한까지, 넘으면 줄바꿈 수로 높이를 늘린다.
|
|
8
|
+
*/
|
|
9
|
+
export declare function annotationBoxSize(texts: readonly string[]): {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
@@ -9,6 +9,13 @@ export interface DocumentIndex {
|
|
|
9
9
|
categoryOf(id: string): ElementCategory | undefined;
|
|
10
10
|
/** 참여자에 속한 레인 id 목록 — **y순(위→아래)** 계약. lanes 재선언 diff 의 순서 비교 기준 */
|
|
11
11
|
lanesOf(participantId: string): readonly string[];
|
|
12
|
+
/**
|
|
13
|
+
* 참여자에 속한 레인 id 목록 — **선언순**(laneSet 순서 = `describe` 가 내는 순서 · A-6). lanes 재선언은 이 순서도
|
|
14
|
+
* 받는다(B-153 — 선언순 ≠ y순 풀에서 `describe` 순서를 그대로 쓴 재선언이 거부됐다 · 레거시 레인 풀 19/50).
|
|
15
|
+
* 중첩 레인(`childLaneSet`)은 부모 뒤에 깊이 우선으로 잇는다(`lanesOf` 와 같은 집합).
|
|
16
|
+
* 선택 — 공개 타입이라 외부 구현을 깨지 않으려고 둔다(없으면 y순만 받는 종전 동작).
|
|
17
|
+
*/
|
|
18
|
+
laneDeclarationOrderOf?(participantId: string): readonly string[];
|
|
12
19
|
/** 플로우 노드가 속한 참여자 id (풀 없는 단일 프로세스 문서면 undefined) */
|
|
13
20
|
participantOf(nodeId: string): string | undefined;
|
|
14
21
|
/**
|
|
@@ -26,6 +33,11 @@ export interface DocumentIndex {
|
|
|
26
33
|
* 어휘 밖 정의면 undefined.
|
|
27
34
|
*/
|
|
28
35
|
eventDefinitionOf(nodeId: string): IrEventDefinition | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* 요소에 확인 요청 표식(`bwl:reviewRequest`)이 걸린 언어들 (B-4 ④) — `translation.confirm` 이 없는 표식을
|
|
38
|
+
* 지목하면 거부한다(읽은 뒤 사람이 이미 정리했을 수 있다). 없으면 빈 배열.
|
|
39
|
+
*/
|
|
40
|
+
reviewRequestLocalesOf(id: string): readonly string[];
|
|
29
41
|
}
|
|
30
42
|
/** elementRegistry 어댑터 — 하강 직전 실문서 상태를 대변한다. */
|
|
31
43
|
export declare function buildRegistryIndex(registry: ElementRegistry): DocumentIndex;
|
|
@@ -2,11 +2,12 @@ import { BpmnModelerLike } from '../../core/modelerLike';
|
|
|
2
2
|
import { SymbolicOp } from '../symbolicOp';
|
|
3
3
|
import { ResolveIssue } from './issues';
|
|
4
4
|
import { GeometryFinding } from '../geometryAudit';
|
|
5
|
+
import { BpmnDocumentLocales } from '../../adapter/i18n';
|
|
5
6
|
import { lowerOps } from './lower';
|
|
6
7
|
export type { ResolveIssue } from './issues';
|
|
7
8
|
export type { DocumentIndex, ElementCategory } from './documentIndex';
|
|
8
9
|
export { buildRegistryIndex } from './documentIndex';
|
|
9
|
-
export { validateOps } from './validate';
|
|
10
|
+
export { validateOps, type ValidateOpsOptions } from './validate';
|
|
10
11
|
export { lowerOps, resolverServicesOf, type ResolverServices } from './lower';
|
|
11
12
|
export { forwardThreePointCandidates, planCrossPoolRoute, planEdgeRepair, planLabelLineClearance, planLabelPlacement, planMiddleSegmentShifts, planOppositeOverlapRepair, planSegmentDetours, planBackEdgeBoundaryClearance, repairIntroducedBoundaryHugging, repairIntroducedCrossings, repairIntroducedEdgeCrossings, repairIntroducedFakeMerges, repairIntroducedOppositeOverlaps, repairIntroducedSharedSegmentLabels, followMovedEdgeLabels, redockIntroducedDetachedEndpoints, repairIntroducedLabelLines, repairIntroducedShapeLabelLines, planShapeLabelClearance, rerouteIntroducedCrossPoolEdges, } from './routeRepair';
|
|
12
13
|
export interface ApplyBpmnOpsResult {
|
|
@@ -19,6 +20,9 @@ export interface ApplyBpmnOpsResult {
|
|
|
19
20
|
*
|
|
20
21
|
* **전후 diff 라 선재 결함은 담기지 않는다** — 남의 결함까지 돌려주면 에이전트가 그것을
|
|
21
22
|
* 자기 배치 탓으로 읽고 무한 교정에 빠진다. 문서 전체 감사는 `auditBpmnGeometry`.
|
|
23
|
+
* 🔴 **예외 하나(B-219) — 이 배치가 앵커 대비 옮긴 주석이 가진 판정은 선재 키여도 담는다.** 판정 키에 위치가 없어
|
|
24
|
+
* 옮긴 주석이 같은 이름표 · 같은 주석 위에 남으면 「선재」로 걸러졌다 — 에이전트가 고치려고 옮긴 결과를 응답으로 못 봤다
|
|
25
|
+
* (원격 e92509 = 좌표를 손으로 쟀다 · fixture g12-12 = 두 번 연속 옮겼는데 둘 다 침묵). 그 관계는 이 배치가 만든 것이다.
|
|
22
26
|
*/
|
|
23
27
|
findings: GeometryFinding[];
|
|
24
28
|
/**
|
|
@@ -57,6 +61,28 @@ export interface ApplyBpmnOpsResult {
|
|
|
57
61
|
*/
|
|
58
62
|
crossPoolMessages: number;
|
|
59
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* **끝점을 공유하는** 간선끼리의 내부 진성 교차(B-146 ⓐ′) — 위 `edgeCrossings` 가 세지 않는 쌍이다(둘을 합치면
|
|
66
|
+
* 진성 교차 전량 · 겹치는 쌍 없음). 표본 98 에서 사람이 고친 교차가 이것이었다(게이트웨이 → 오류 노드 갈래 ×
|
|
67
|
+
* 오류 노드 → 상류 되돌아감). **관측 전용** — 보정 단계의 채택 게이트는 이 값을 보지 않는다.
|
|
68
|
+
*/
|
|
69
|
+
sharedEndpointCrossings: {
|
|
70
|
+
before: number;
|
|
71
|
+
after: number;
|
|
72
|
+
/** 하강 뒤 남은 쌍(간선 id, 오름차순). */
|
|
73
|
+
pairs: Array<[string, string]>;
|
|
74
|
+
};
|
|
60
75
|
};
|
|
61
76
|
}
|
|
62
|
-
|
|
77
|
+
/** 배치 적용 옵션 — 문서 밖에서만 알 수 있는 입력. */
|
|
78
|
+
export interface ApplyBpmnOpsOptions {
|
|
79
|
+
/**
|
|
80
|
+
* 그룹의 문서 언어 설정(B-4 ④). 있으면 다국어 그룹이다 — 문구는 `names`/`texts` 로 문서 언어 전부를 받고
|
|
81
|
+
* (평문 거부) 하강 뒤 번역 칸을 같은 undo 에피소드에서 기록한다. 없으면 기능이 꺼진 그룹이다(평문만).
|
|
82
|
+
* 🔴 **문서에는 이 설정이 없다**(루트 `xml:lang` 은 만들 당시의 설계 언어일 뿐이다) — 호스트가 그룹 설정을 공급한다.
|
|
83
|
+
*/
|
|
84
|
+
i18n?: BpmnDocumentLocales;
|
|
85
|
+
/** 테스트 시임 — 롤백 경로를 결정론적으로 검증하기 위한 하강 함수 주입점. 실사용은 기본값. */
|
|
86
|
+
lower?: typeof lowerOps;
|
|
87
|
+
}
|
|
88
|
+
export declare function applyBpmnOps(modeler: BpmnModelerLike, ops: readonly SymbolicOp[], options?: ApplyBpmnOpsOptions): ApplyBpmnOpsResult;
|
|
@@ -167,6 +167,59 @@ export type ResolveIssue =
|
|
|
167
167
|
type: string;
|
|
168
168
|
dropped: string[];
|
|
169
169
|
}
|
|
170
|
+
/** 평문(`name`/`text`)과 로케일 맵(`names`/`texts`)을 함께 줬다 — 어느 쪽이 진실인지 모호하다(🔁 `condition-name-conflict`). */
|
|
171
|
+
| {
|
|
172
|
+
kind: 'locale-texts-conflict';
|
|
173
|
+
opIndex: number;
|
|
174
|
+
id: string;
|
|
175
|
+
field: string;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* 다국어 그룹(문서 언어 설정 있음)에 평문을 줬다 — 언어를 모르는 문구는 설계 언어 칸에 다른 언어가 들어가는 경로다
|
|
179
|
+
* (켠 뒤의 에이전트 배치가 언어 기록 없는 이름 · drift 를 만드는 근인). `names`/`texts` 로 문서 언어 전부를 준다.
|
|
180
|
+
* 🔴 **조건 라벨(`condition`)도 여기다** — name 채널의 별칭(A-5)이라 다국어 그룹에선 그 플로우의 `names` 로 쓴다.
|
|
181
|
+
*/
|
|
182
|
+
| {
|
|
183
|
+
kind: 'locale-texts-required';
|
|
184
|
+
opIndex: number;
|
|
185
|
+
id: string;
|
|
186
|
+
field: string;
|
|
187
|
+
locales: string[];
|
|
188
|
+
}
|
|
189
|
+
/** 기능이 꺼진 그룹(문서 언어 미설정)에 로케일 맵이나 `translation.confirm` 을 줬다 — 평문을 쓴다. */
|
|
190
|
+
| {
|
|
191
|
+
kind: 'locale-texts-not-enabled';
|
|
192
|
+
opIndex: number;
|
|
193
|
+
id: string;
|
|
194
|
+
field: string;
|
|
195
|
+
}
|
|
196
|
+
/** 로케일 맵에 문서 언어가 빠졌다 — 에이전트 쓰기는 문서 언어 **전부**를 함께 쓴다(그래야 표식이 안 생긴다). */
|
|
197
|
+
| {
|
|
198
|
+
kind: 'locale-texts-incomplete';
|
|
199
|
+
opIndex: number;
|
|
200
|
+
id: string;
|
|
201
|
+
field: string;
|
|
202
|
+
missing: string[];
|
|
203
|
+
}
|
|
204
|
+
/** 문서 언어(설계 + 병기) 밖의 언어 — 표시도 판정도 안 하는 칸이라 아무도 못 보고 못 고친다. */
|
|
205
|
+
| {
|
|
206
|
+
kind: 'locale-not-in-document';
|
|
207
|
+
opIndex: number;
|
|
208
|
+
id: string;
|
|
209
|
+
field: string;
|
|
210
|
+
locale: string;
|
|
211
|
+
locales: string[];
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* `translation.confirm` 의 대상 칸에 확인 요청 표식이 없다 — 읽은 뒤 사람이 이미 정리했거나 언어를 잘못 짚었다.
|
|
215
|
+
* 다시 읽어 `i18n.reviewRequests` 를 본다.
|
|
216
|
+
*/
|
|
217
|
+
| {
|
|
218
|
+
kind: 'review-request-missing';
|
|
219
|
+
opIndex: number;
|
|
220
|
+
id: string;
|
|
221
|
+
locale: string;
|
|
222
|
+
}
|
|
170
223
|
/** 하강 실행 중 실패 — 실행분은 롤백됨(원자성 2차 방어) */
|
|
171
224
|
| {
|
|
172
225
|
kind: 'lower-failed';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BpmnDocumentLocales } from '../../adapter/i18n';
|
|
2
|
+
import { SymbolicOp } from '../symbolicOp';
|
|
3
|
+
import { DocumentIndex } from './documentIndex';
|
|
4
|
+
import { ResolveIssue } from './issues';
|
|
5
|
+
/** 하강 뒤 한 요소에 할 번역 쓰기 — 같은 요소를 여러 op 가 건드리면 합친다. */
|
|
6
|
+
export interface LocaleWrite {
|
|
7
|
+
/** 문서 언어 전부의 문구. `null` = 라벨 제거(칸 · 표식 전부). 없으면 문구를 쓰지 않는다. */
|
|
8
|
+
texts?: Record<string, string> | null;
|
|
9
|
+
/** 문구를 바꾸지 않고 해소할 확인 요청의 언어들(`translation.confirm`). */
|
|
10
|
+
confirm?: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 다국어 검증(순수). `config` = 그룹의 문서 언어 설정 — 없으면 기능이 꺼진 그룹이다.
|
|
14
|
+
* 페이로드 shape(맵이 객체인가 · 값이 비지 않은 문자열인가)도 여기서 본다 — 패스 0 은 kind 별 고정 자리만 안다.
|
|
15
|
+
*/
|
|
16
|
+
export declare function validateLocaleTexts(ops: readonly SymbolicOp[], index: DocumentIndex, config: BpmnDocumentLocales | undefined): ResolveIssue[];
|
|
17
|
+
/**
|
|
18
|
+
* 하강 준비 — 검증 통과가 전제다. 반환 `ops` 는 평문만 남은 사본(설계 언어 문구 · `translation.confirm` 제외)이고,
|
|
19
|
+
* `writes` 는 하강 뒤 요소별로 할 번역 쓰기다. `config` 가 없으면(기능 끔) 입력을 그대로 돌려준다.
|
|
20
|
+
*/
|
|
21
|
+
export declare function localizeOps(ops: readonly SymbolicOp[], index: DocumentIndex, config: BpmnDocumentLocales | undefined): {
|
|
22
|
+
ops: SymbolicOp[];
|
|
23
|
+
writes: Map<string, LocaleWrite>;
|
|
24
|
+
};
|