@g1cloud/bpmn-modeler-next 5.0.0-beta.4 → 5.0.0-beta.41

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 (34) hide show
  1. package/dist/adapter/annotationImportDocking.d.ts +28 -0
  2. package/dist/adapter/i18n.d.ts +38 -6
  3. package/dist/adapter/i18nBackfill.d.ts +64 -0
  4. package/dist/adapter/translationLocaleCopy.d.ts +11 -0
  5. package/dist/adapter/translationLocaleRestore.d.ts +86 -0
  6. package/dist/agent/agentBatch.d.ts +7 -1
  7. package/dist/agent/describeProcess.d.ts +29 -2
  8. package/dist/agent/geometryAudit.d.ts +14 -0
  9. package/dist/agent/resolver/documentIndex.d.ts +12 -0
  10. package/dist/agent/resolver/index.d.ts +25 -2
  11. package/dist/agent/resolver/issues.d.ts +53 -0
  12. package/dist/agent/resolver/localeTexts.d.ts +24 -0
  13. package/dist/agent/resolver/lower.d.ts +29 -4
  14. package/dist/agent/resolver/routeRepair.d.ts +64 -0
  15. package/dist/agent/resolver/validate.d.ts +10 -1
  16. package/dist/agent/symbolicOp.d.ts +20 -2
  17. package/dist/bpmn-modeler-next.css +1 -1
  18. package/dist/bpmn-modeler.js +15582 -13471
  19. package/dist/bpmn-modeler.umd.cjs +104 -104
  20. package/dist/command/commandSeam.d.ts +2 -1
  21. package/dist/command/setTranslations.d.ts +42 -0
  22. package/dist/command/translationCommands.d.ts +11 -0
  23. package/dist/command/updateTranslation.d.ts +31 -0
  24. package/dist/core/hints.d.ts +29 -0
  25. package/dist/core/ir.d.ts +48 -1
  26. package/dist/editor/controller.d.ts +33 -1
  27. package/dist/editor/editLock.d.ts +9 -0
  28. package/dist/headless/modeler.d.ts +16 -2
  29. package/dist/index.d.ts +7 -0
  30. package/dist/view/BpmnDisplayLocaleSwitcher.vue.d.ts +6 -0
  31. package/dist/view/BpmnModelerView.vue.d.ts +7 -0
  32. package/dist/view/i18nDisplay.d.ts +87 -0
  33. package/dist/view/minimap.d.ts +25 -0
  34. package/package.json +3 -2
@@ -3,7 +3,8 @@
3
3
  *
4
4
  * 모든 모델 변경은 bpmn-js commandStack 을 경유해야 한다 — 레거시 i18n 이
5
5
  * commandStack 을 우회해 businessObject.name 을 직접 변조하다 undo 버그를 만든 것이
6
- * 반면교사(백로그 B-4). resolver 하강도 modeling API(= commandStack 경유)만 사용한다.
6
+ * 반면교사(백로그 B-4 — 번역 칸 쓰기는 이제 `bwl.updateTranslation` 커맨드다). resolver 하강도
7
+ * modeling API(= commandStack 경유)만 사용한다.
7
8
  */
8
9
  export interface CommandSeam {
9
10
  undo(): void;
@@ -0,0 +1,42 @@
1
+ /** 커맨드 이름 — bwl 소유 네임스페이스(`bwl.updateTranslation` 과 같은 소유권 경계). */
2
+ export declare const SET_TRANSLATIONS_COMMAND = "bwl.setTranslations";
3
+ type Any = any;
4
+ /** 확인 요청 표식 한 건의 값 — moddle 객체와 무관한 비교 단위. */
5
+ export interface ReviewRequestValue {
6
+ locale: string;
7
+ sourceLocale?: string;
8
+ previous: string;
9
+ }
10
+ export interface SetTranslationsContext {
11
+ element: Any;
12
+ /**
13
+ * 쓸 문구 — 문서 언어 **전부**(validator 가 보장한다). `undefined` = 문구를 쓰지 않는다(확인만) ·
14
+ * `null` = 라벨 제거(문서 언어 칸과 표식을 전부 걷는다 — `name` 은 하강이 이미 지웠다).
15
+ */
16
+ texts?: Record<string, string> | null;
17
+ /** 문구를 바꾸지 않고 해소할 확인 요청의 언어들(`translation.confirm`). */
18
+ confirm?: string[];
19
+ designLocale: string;
20
+ /** 문서 언어(설계 + 병기). */
21
+ locales: string[];
22
+ /** 루트 `xml:lang`. */
23
+ rootLang?: string;
24
+ /** 배치 직전 상태 — 「바뀌었나」 판정과 표식의 출발점. 새 요소는 둘 다 비어 있다. */
25
+ before: {
26
+ texts: Record<string, string>;
27
+ requests: ReviewRequestValue[];
28
+ };
29
+ }
30
+ interface ExecutedContext extends SetTranslationsContext {
31
+ undo: Array<() => void>;
32
+ }
33
+ export declare class SetTranslationsHandler {
34
+ private moddle;
35
+ static $inject: string[];
36
+ constructor(moddle: Any);
37
+ execute(ctx: ExecutedContext): Any[];
38
+ revert(ctx: ExecutedContext): Any[];
39
+ }
40
+ /** 요소의 확인 요청 표식을 비교 단위 값으로 읽는다(배치 직전 스냅샷용). */
41
+ export declare function reviewRequestValuesOf(bo: Any): ReviewRequestValue[];
42
+ export {};
@@ -0,0 +1,11 @@
1
+ type Any = any;
2
+ export declare class TranslationCommands {
3
+ static $inject: string[];
4
+ constructor(commandStack: Any);
5
+ }
6
+ /** bpmn-js 모듈 — 서비스 이름 = `translationCommands`. 헤드리스 기본 셋(`HEADLESS_BPMN_MODULES`)에 들어 있다. */
7
+ export declare const TranslationCommandsModule: {
8
+ __init__: string[];
9
+ translationCommands: (string | typeof TranslationCommands)[];
10
+ };
11
+ export {};
@@ -0,0 +1,31 @@
1
+ /** 커맨드 이름 — bwl 소유 네임스페이스(`bwl.undoEpisode` 와 같은 소유권 경계). */
2
+ export declare const UPDATE_TRANSLATION_COMMAND = "bwl.updateTranslation";
3
+ type Any = any;
4
+ export interface UpdateTranslationContext {
5
+ /** 라벨 요소가 아니라 주인 요소(`label.labelTarget`). */
6
+ element: Any;
7
+ /**
8
+ * 쓰는 칸의 로케일(= 사람이 보고 있던 표시 언어). 기본 경로 뒤처리에서는 **힌트**다 — 바뀌기 전
9
+ * `name` 의 언어에 이것이 없으면(프로그램 경로의 `updateLabel`) 그 언어로 바로잡는다.
10
+ */
11
+ locale: string;
12
+ text: string;
13
+ designLocale: string;
14
+ /** 문서 언어(설계 + 병기) — 표식 대상의 범위. 목록 밖 칸은 표시도 판정도 안 하므로 건드리지 않는다. */
15
+ locales: string[];
16
+ /** 루트 `xml:lang` — 번역 칸으로 판정되지 않는 `name` 의 언어. */
17
+ rootLang?: string;
18
+ /** 기본 경로가 `name` 을 이미 바꿨다 — 그 직전 문구(`UpdateLabelHandler` 의 `oldLabel`). */
19
+ nameChangedFrom?: string;
20
+ }
21
+ interface ExecutedContext extends UpdateTranslationContext {
22
+ undo: Array<() => void>;
23
+ }
24
+ export declare class UpdateTranslationHandler {
25
+ private moddle;
26
+ static $inject: string[];
27
+ constructor(moddle: Any);
28
+ execute(ctx: ExecutedContext): Any[];
29
+ revert(ctx: ExecutedContext): Any[];
30
+ }
31
+ export {};
@@ -41,6 +41,18 @@ export type BwlBand = number;
41
41
  export type BwlAfterColumn = string;
42
42
  /** 풀 세로 순서 힌트 */
43
43
  export type BwlPoolOrder = number;
44
+ /**
45
+ * 확인 요청 표식(B-4 ③ · 2026-10-01) — 🔴 **힌트가 아니라 상태다**(C-1 「상태 표식」 범주).
46
+ *
47
+ * 정상 칸의 내용을 바꾸면 다른 언어의 정상 칸마다 하나씩 붙는다: `locale` = 확인을 요청받은 칸 ·
48
+ * `sourceLocale` = 수정된 언어 · `previous`(본문) = 수정 **전** 원문 — 에이전트가 이전 → 이후를 대조해
49
+ * 「확인만」/「번역 갱신」을 고르는 재료다.
50
+ *
51
+ * 힌트와 달리 잃으면 **재생성되지 않는다** — 문구는 안전하고(칸은 그대로) 판정만 잃는다. 그래서 쓰는
52
+ * 주체는 라이브러리(사람 편집 경로 · `command/updateTranslation`)뿐이고 에이전트는 해소만 한다.
53
+ * 번역 칸과 같은 `extensionElements` 에 둔다 — 복사·형태 변환에서 번역 칸과 같은 운명을 겪게.
54
+ */
55
+ export declare const BWL_REVIEW_REQUEST_TYPE = "bwl:ReviewRequest";
44
56
  /**
45
57
  * bwl moddle 스키마 (세션 ②-b) — `BPMN_MODDLE_EXTENSIONS`(adapter/extensions.ts)에 등록해
46
58
  * 캔버스·헤드리스 양 경로의 파싱 의미를 일치시킨다(M1-2 원칙). 어휘는 additive-only(불변식 5).
@@ -49,6 +61,7 @@ export type BwlPoolOrder = number;
49
61
  * - 구조 힌트 = extensionElements 자식: `<bwl:placement anchor=".." side=".." offset=".."/>`,
50
62
  * `<bwl:members refs="Id_a Id_b"/>` (공백 구분 id 목록)
51
63
  * - 스칼라 힌트 = 요소 속성(`extends` 확장): `bwl:band`(플로우 노드), `bwl:poolOrder`(참여자)
64
+ * - 상태 표식(힌트 아님 · B-4) = extensionElements 자식: `<bwl:reviewRequest locale=".." sourceLocale="..">이전 문구</bwl:reviewRequest>`
52
65
  * 미등록 도구 왕복 보존은 두 형태 모두 스파이크 게이트 ①에서 실증됨.
53
66
  */
54
67
  export declare const BWL_MODDLE_SCHEMA: {
@@ -106,5 +119,21 @@ export declare const BWL_MODDLE_SCHEMA: {
106
119
  readonly isAttr: true;
107
120
  readonly type: "Integer";
108
121
  }];
122
+ }, {
123
+ readonly name: "ReviewRequest";
124
+ readonly superClass: readonly ["Element"];
125
+ readonly properties: readonly [{
126
+ readonly name: "locale";
127
+ readonly isAttr: true;
128
+ readonly type: "String";
129
+ }, {
130
+ readonly name: "sourceLocale";
131
+ readonly isAttr: true;
132
+ readonly type: "String";
133
+ }, {
134
+ readonly name: "previous";
135
+ readonly isBody: true;
136
+ readonly type: "String";
137
+ }];
109
138
  }];
110
139
  };
package/dist/core/ir.d.ts CHANGED
@@ -64,9 +64,35 @@ export declare function isIrEventDefinition(v: unknown): v is IrEventDefinition;
64
64
  * 어휘 안의 것일 때만** 값을 낸다 — 다중 정의(BPMN 의 multiple 이벤트)와 어휘 밖 정의는 undefined.
65
65
  */
66
66
  export declare function irEventDefinitionOf(definitionTypes: readonly string[]): IrEventDefinition | undefined;
67
+ /**
68
+ * **문구 로케일 어휘**(B-4 ④ · 2026-10-02) — 다국어 그룹의 op 가 문구마다 붙이는 로케일의 닫힌 집합.
69
+ *
70
+ * 🔴 **열린 맵이 아니라 닫힌 집합인 이유** — op 스키마는 Anthropic 엄격 서브셋을 지킨다(`strictSubset.ts`)는데
71
+ * 그 서브셋은 `additionalProperties` 에 false 밖에 못 쓴다. 로케일을 키로 받는 맵은 **키를 열거해야만** 표현된다.
72
+ * 값은 호스트 그룹 설정의 선택지(`GROUP_DOC_LOCALES` = ko · en · ja · zh)와 같다 — 🔴 **호스트 선택지는 이 집합의
73
+ * 부분집합이어야 한다**(밖의 언어를 문서 언어로 켜면 에이전트가 그 칸을 스키마상 쓸 수 없어 「전 언어 필수」를
74
+ * 영원히 못 채운다). 늘릴 때는 additive 다(불변식 5).
75
+ *
76
+ * 실제로 요구되는 언어는 이 집합이 아니라 **그 그룹의 문서 언어**(설계 + 병기)다 — validator 가 집행한다.
77
+ */
78
+ export declare const IR_TEXT_LOCALES: readonly ["ko", "en", "ja", "zh"];
79
+ export type IrTextLocale = (typeof IR_TEXT_LOCALES)[number];
80
+ export declare function isIrTextLocale(v: unknown): v is IrTextLocale;
81
+ /**
82
+ * 로케일 → 문구 (B-4 ④). 다국어 그룹에서 평문 `name`/`text` 대신 쓰는 짝 필드(`names`/`texts`)의 형태다.
83
+ *
84
+ * - **write** — 그 그룹의 문서 언어(설계 + 병기)를 **전부** 담아야 한다(빠지거나 밖의 언어면 거부). 평문과 함께
85
+ * 주면 모호해 거부한다(🔁 A-5 `condition-name-conflict`). `name` 은 설계 언어 문구로 하강한다.
86
+ * - **read** — 문서 언어 중 **문구가 있는 칸만** 담는다. 빠진 키 = 그 언어로는 미번역이다.
87
+ *
88
+ * 기능이 꺼진 그룹(문서 언어 미설정)은 지금처럼 평문만 쓴다 — 이 필드를 주면 거부한다.
89
+ */
90
+ export type IrLocaleTexts = Partial<Record<IrTextLocale, string>>;
67
91
  export interface IrLane {
68
92
  id: string;
69
93
  name?: string;
94
+ /** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
95
+ names?: IrLocaleTexts;
70
96
  }
71
97
  /**
72
98
  * 풀(participant). 레인은 풀 정의에 선언하고 노드가 `lane` 인자로 배정된다(A-3) —
@@ -75,6 +101,8 @@ export interface IrLane {
75
101
  export interface IrParticipant {
76
102
  id: string;
77
103
  name?: string;
104
+ /** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
105
+ names?: IrLocaleTexts;
78
106
  /** true 면 내부 프로세스 없는 블랙박스 풀 */
79
107
  blackBox?: boolean;
80
108
  lanes?: IrLane[];
@@ -83,6 +111,8 @@ export interface IrNode {
83
111
  id: string;
84
112
  type: IrFlowNodeType;
85
113
  name?: string;
114
+ /** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
115
+ names?: IrLocaleTexts;
86
116
  /** 소속 풀 (협업 문서) */
87
117
  participant?: string;
88
118
  /** 소속 레인 (A-3) */
@@ -112,6 +142,11 @@ export interface IrSequenceFlow {
112
142
  source: string;
113
143
  target: string;
114
144
  name?: string;
145
+ /**
146
+ * 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). 🔴 **다국어 그룹의 조건 라벨도 이것이다** — `condition.label` 은
147
+ * name 채널의 별칭이라(A-5) 평문 하나로는 언어를 못 싣는다. 그 그룹에서 `condition` 을 주면 거부한다.
148
+ */
149
+ names?: IrLocaleTexts;
115
150
  condition?: IrFlowCondition;
116
151
  }
117
152
  export interface IrMessageFlow {
@@ -119,10 +154,14 @@ export interface IrMessageFlow {
119
154
  source: string;
120
155
  target: string;
121
156
  name?: string;
157
+ /** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
158
+ names?: IrLocaleTexts;
122
159
  }
123
160
  export interface IrDataStore {
124
161
  id: string;
125
162
  name?: string;
163
+ /** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
164
+ names?: IrLocaleTexts;
126
165
  }
127
166
  /** 데이터 입출력 연관 (노드 ↔ 데이터 스토어, 방향 = source→target) */
128
167
  export interface IrDataAssociation {
@@ -133,7 +172,13 @@ export interface IrDataAssociation {
133
172
  }
134
173
  export interface IrTextAnnotation {
135
174
  id: string;
136
- text: string;
175
+ /**
176
+ * 본문. read 는 늘 낸다(다국어 그룹이면 설계 언어 문구). write 는 이것 또는 `texts` 중 **하나**가 필수다 —
177
+ * 다국어 그룹은 `texts`, 기능이 꺼진 그룹은 `text`(B-4 ④ · 종전엔 늘 필수였다).
178
+ */
179
+ text?: string;
180
+ /** 다국어 그룹의 본문(B-4 ④ — `IrLocaleTexts`). `text` 와 동시 지정 금지. */
181
+ texts?: IrLocaleTexts;
137
182
  }
138
183
  /** 연관선 (주석 ↔ 요소) */
139
184
  export interface IrAssociation {
@@ -145,6 +190,8 @@ export interface IrAssociation {
145
190
  export interface IrGroup {
146
191
  id: string;
147
192
  name?: string;
193
+ /** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
194
+ names?: IrLocaleTexts;
148
195
  members?: string[];
149
196
  }
150
197
  /** describeProcess 가 반환하는 문서 전체 파생 뷰의 골격 */
@@ -4,6 +4,7 @@ import { CommandSeam } from '../command/commandSeam';
4
4
  import { ApplyBatchOutcome, BpmnOpBatch } from '../agent/agentBatch';
5
5
  import { GeometryFinding } from '../agent/geometryAudit';
6
6
  import { SemanticIssue } from '../agent/semanticAudit';
7
+ import { I18nDisplayConfig } from '../view/i18nDisplay';
7
8
  /**
8
9
  * 판정 2종의 **현재 캔버스 결과** — 하단 검증 패널(B-103 ⓑ · B-105 ⓑ)의 단일 출처.
9
10
  *
@@ -21,6 +22,24 @@ export interface BpmnDocumentIssues {
21
22
  geometry: GeometryFinding[];
22
23
  semantic: SemanticIssue[];
23
24
  }
25
+ /** 한 언어로 볼 때의 상태 수(B-4). */
26
+ export interface BpmnI18nCounts {
27
+ /** 그 언어 칸이 없어 대체 문구로 보이는 요소. */
28
+ untranslated: number;
29
+ /** 그 언어 칸에 확인 요청 표식이 걸린 요소. */
30
+ reviewRequested: number;
31
+ }
32
+ /**
33
+ * 다국어 표시 상태(B-4) — 표시 언어 전환 UI · 납품 판정 배지의 단일 출처. 미설정이면 `undefined`(기능 끔).
34
+ * 납품 판정 = 설계 언어의 두 수가 0 · 동기 완료 = 전 언어의 두 수가 0.
35
+ */
36
+ export interface BpmnI18nState {
37
+ designLocale: string;
38
+ /** 표시 언어 선택지 — 설계 언어가 맨 앞. */
39
+ locales: string[];
40
+ displayLocale: string;
41
+ counts: Record<string, BpmnI18nCounts>;
42
+ }
24
43
  export interface ImportXmlResult {
25
44
  /** import 경고(표시용 메시지) — 수용 기준상 실운영 문서는 빈 배열이어야 한다. */
26
45
  warnings: string[];
@@ -34,9 +53,10 @@ export interface ImportXmlResult {
34
53
  *
35
54
  * **M3-2 에이전트 턴 통합** — 시블링 포크 A·B 대칭:
36
55
  * - 적용은 단일 undo 에피소드(`agent/agentBatch` → `command/undoEpisode`)
37
- * - 턴 중 사용자 편집 잠금은 `setEditable(false)` — 잠금은 **사용자 입력 경로만** 막고
56
+ * - 턴 중 사용자 편집 잠금은 `setEditable(false)` — 잠금은 **사용자 편집 입구만** 막고
38
57
  * 프로그램 경로(modeling API)는 막지 않는다. 그래서 잠긴 상태에서도 배치 적용이 된다
39
58
  * (에이전트가 쓰는 동안 사용자를 막는 것이 목적이므로 우회 장치가 따로 필요 없다).
59
+ * 탐색(선택 · 팬 · 줌 · 미니맵)은 잠금 중에도 된다(B-145 · `editor/editLock`).
40
60
  */
41
61
  export interface BpmnEditorController extends CommandSeam {
42
62
  /** 뷰 마운트 완료(@ready) 후 호출 — dirty 추적 구독의 수명 시작점. */
@@ -49,6 +69,8 @@ export interface BpmnEditorController extends CommandSeam {
49
69
  /**
50
70
  * 에이전트 배치 적용 — 단일 undo 에피소드. `applied` 의 `xml` 이 호스트 영속 페이로드다
51
71
  * (내부적으로 `saveXml()` 경로를 타므로 dirty 도 리셋된다 = "영속 진실로 내보낸 시점").
72
+ * 다국어 설정(`configureI18n`)이 걸려 있으면 그것이 그 문서의 문서 언어다 — op 의 문구는 `names`/`texts` 로
73
+ * 문서 언어 전부를 요구하고 평문은 거부된다(B-4 ④).
52
74
  */
53
75
  applyAgentBatch(batch: BpmnOpBatch, currentVersion: number): Promise<ApplyBatchOutcome>;
54
76
  /** 사용자 입력 잠금 — 에이전트 턴 시작/종료에서 호출. 프로그램 경로는 영향 없음. */
@@ -95,6 +117,16 @@ export interface BpmnEditorController extends CommandSeam {
95
117
  * moddle `$type` 원본만 넘긴다.
96
118
  */
97
119
  describeElement(elementId: string): ElementDescription | undefined;
120
+ /**
121
+ * 다국어 설정(B-4 — 설계 언어 · 병기 언어). `undefined` = 기능 끔. 호스트는 그룹 설정을 넘긴다.
122
+ * 🔴 **컨트롤러 세션 상태다** — attach 를 넘어 유지되고 재attach 때 다시 적용된다(잠금과 같은 성격).
123
+ * attach 전에 불러도 된다.
124
+ */
125
+ configureI18n(config: I18nDisplayConfig | undefined): void;
126
+ /** 표시 언어 전환 — 선택지 밖이면 설계 언어로. 문서를 바꾸지 않는다(dirty · 드래프트 저장 비발동). */
127
+ setDisplayLocale(locale: string): void;
128
+ /** 다국어 표시 상태 — `issues` 와 같은 시점(attach · importXml · 모든 모델 변경)에 갱신된다. */
129
+ readonly i18n: Readonly<Ref<BpmnI18nState | undefined>>;
98
130
  }
99
131
  /** `describeElement` 의 반환 — 표시 문장을 만들기 위한 최소 단서. */
100
132
  export interface ElementDescription {
@@ -0,0 +1,9 @@
1
+ import { default as Modeler } from 'bpmn-js/lib/Modeler';
2
+ /** 잠긴 동안 캔버스 컨테이너에 붙는 클래스 — 뷰가 크기 조절 · 꺾임점 손잡이를 숨긴다(눌러도 안 되는 손잡이를 안 보이게). */
3
+ export declare const EDIT_LOCKED_CLASS = "bwl-edit-locked";
4
+ export interface EditLock {
5
+ readonly locked: boolean;
6
+ set(locked: boolean): void;
7
+ }
8
+ /** 그 modeler 의 잠금 레버 — 처음 부를 때 입구 리스너를 단다. */
9
+ export declare function editLockOf(modeler: Modeler): EditLock;
@@ -4,10 +4,24 @@ import { default as CoreModule } from 'bpmn-js/lib/core';
4
4
  import { default as ModelingModule } from 'bpmn-js/lib/features/modeling';
5
5
  import { default as AutoPlaceModule } from 'bpmn-js/lib/features/auto-place';
6
6
  import { HeadlessDomOptions } from './dom';
7
- /** 헤드리스 하강에 필요한 최소 모듈 셋 — 이 목록이 곧 "에디터 없이 성립하는 표면"의 정의다. */
7
+ /**
8
+ * 헤드리스 하강에 필요한 최소 모듈 셋 — 이 목록이 곧 "에디터 없이 성립하는 표면"의 정의다.
9
+ * `TranslationCommandsModule` = 번역 칸 커맨드(B-4 ④ — 다국어 그룹의 에이전트 op 가 쓴다 · 그래픽스 무관).
10
+ * `TranslationLocaleCopyModule` = 타입 전환이 번역 칸 언어를 잃지 않게(B-156 — `BpmnModelerView` 와 같은 모듈).
11
+ * `AnnotationImportDockingModule` = 주석 연관선의 가져오기 도킹 원점이 주석 밖이면 중심으로(B-139 — `BpmnModelerView` 와 같은 모듈).
12
+ */
8
13
  export declare const HEADLESS_BPMN_MODULES: readonly [typeof CoreModule, {
9
14
  translate: (string | typeof import('diagram-js/lib/i18n/translate/translate').default)[];
10
- }, typeof ModelingModule, typeof AutoPlaceModule];
15
+ }, typeof ModelingModule, typeof AutoPlaceModule, {
16
+ __init__: string[];
17
+ translationCommands: (string | typeof import('..').TranslationCommands)[];
18
+ }, {
19
+ __init__: string[];
20
+ translationLocaleCopy: (string | typeof import('../adapter/translationLocaleCopy').TranslationLocaleCopy)[];
21
+ }, {
22
+ __init__: string[];
23
+ annotationImportDocking: (string | typeof import('../adapter/annotationImportDocking').AnnotationImportDocking)[];
24
+ }];
11
25
  export interface HeadlessBpmnModelerOptions {
12
26
  /** 추가 모듈(호스트 확장). 기본 셋을 대체하지 않고 덧붙인다. */
13
27
  additionalModules?: ModuleDeclaration[];
package/dist/index.d.ts CHANGED
@@ -3,6 +3,9 @@ export * from './core/modelerLike';
3
3
  export * from './core/hints';
4
4
  export * from './command/commandSeam';
5
5
  export * from './command/undoEpisode';
6
+ export * from './command/updateTranslation';
7
+ export * from './command/setTranslations';
8
+ export * from './command/translationCommands';
6
9
  export * from './agent/symbolicOp';
7
10
  export * from './agent/schema';
8
11
  export * from './agent/resolver';
@@ -13,9 +16,13 @@ export * from './agent/elementDiff';
13
16
  export * from './agent/agentBatch';
14
17
  export * from './editor/controller';
15
18
  export * from './adapter/i18n';
19
+ export * from './adapter/i18nBackfill';
20
+ export * from './adapter/translationLocaleRestore';
16
21
  export * from './adapter/extensions';
17
22
  export * from './adapter/xml';
18
23
  export * from './headless';
19
24
  export * from './view/validationDisplay';
25
+ export * from './view/i18nDisplay';
20
26
  export { default as BpmnModelerView } from './view/BpmnModelerView.vue';
21
27
  export { default as BpmnValidationPanel } from './view/BpmnValidationPanel.vue';
28
+ export { default as BpmnDisplayLocaleSwitcher } from './view/BpmnDisplayLocaleSwitcher.vue';
@@ -0,0 +1,6 @@
1
+ import { BpmnEditorController } from '../editor/controller';
2
+ type __VLS_Props = {
3
+ controller: BpmnEditorController;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -1,6 +1,13 @@
1
1
  import { default as Modeler } from 'bpmn-js/lib/Modeler';
2
2
  type __VLS_Props = {
3
3
  xml?: string;
4
+ /**
5
+ * 라벨 폰트(CSS `font-family`) — 줄바꿈을 **재는** 폰트와 **그리는** 폰트를 함께 정한다(bpmn-js `textRenderer`).
6
+ * 마운트 때 한 번 읽는다(bpmn-js 설정은 생성 시점에 고정된다). 미지정 = bpmn-js 기본(`Arial, sans-serif`).
7
+ * 🔴 CSS 로 라벨 폰트만 덮지 말 것 — diagram-js 는 줄 폭을 캔버스 `measureText` 로 재므로 CSS 가 닿지 않아,
8
+ * 잰 폭과 그린 폭이 갈려 라벨이 도형 밖으로 밀린다(B-160 · PDF 인쇄 페이지 실측 ja 0.75 · ko 0.84).
9
+ */
10
+ labelFontFamily?: string;
4
11
  };
5
12
  declare function importXml(xml: string): Promise<{
6
13
  warnings: string[];
@@ -0,0 +1,87 @@
1
+ import { BpmnDocumentLocales } from '../adapter/i18n';
2
+ /**
3
+ * 다국어 표시 설정 — 문서 언어(`designLocale` = 설계 언어 · `name` 이 따른다 · `companionLocales` = 병기 언어 ·
4
+ * 표시 언어 선택지는 설계 언어 + 이것)에 표시 옵션을 더한다.
5
+ */
6
+ export interface I18nDisplayConfig extends BpmnDocumentLocales {
7
+ /**
8
+ * 외부 라벨(이벤트 · 게이트웨이 · 흐름 · 그룹)을 표시 문구 폭으로 그린다 — 기본 켬.
9
+ * 끄면 DI 폭(설계 언어 문구 기준)에서 줄바꿈되어 긴 문구가 세로 기둥이 된다(스파이크 F7 — 폭 19 ·
10
+ * 10줄). ⚠ 대가 — 히트 영역은 DI 크기 그대로 · `geometryAudit` 은 `name` 문구 기준이라 표시 언어
11
+ * 라벨의 겹침은 판정 밖.
12
+ */
13
+ adaptiveExternalLabel?: boolean;
14
+ }
15
+ /**
16
+ * 표시 상태 — `untranslated` = 표시 언어 칸이 없어 대체 문구(`name`)를 그린다 · `reviewRequested` = 그 칸에
17
+ * 확인 요청 표식이 있다(다른 언어가 내용 변경됐다 — 문구는 칸의 현재 문구 그대로 그린다).
18
+ */
19
+ export type I18nDisplayStatus = 'ok' | 'untranslated' | 'reviewRequested';
20
+ export interface I18nDisplayResolution {
21
+ text: string;
22
+ status: I18nDisplayStatus;
23
+ /** true = `name` 자체가 표시 언어다 → 치환 없음 · 편집은 기본 경로(`modeling.updateLabel`). */
24
+ native: boolean;
25
+ }
26
+ /** 미번역 요소의 그래픽(`djs-element`)에 붙는 클래스. */
27
+ export declare const I18N_UNTRANSLATED_CLASS = "i18n-untranslated";
28
+ /** 확인 요청 요소의 그래픽(`djs-element`)에 붙는 클래스. */
29
+ export declare const I18N_REVIEW_REQUESTED_CLASS = "i18n-review-requested";
30
+ /**
31
+ * 표시 문구를 **`elements.changed` 없이** 다시 그린 뒤 내는 이벤트(설정 · 표시 언어 전환). 그래픽을 복제해 들고 있는
32
+ * 소비자(미니맵 — `view/minimap`)는 이것으로 다시 짓는다. 페이로드 없음 — 전량을 다시 그렸다.
33
+ */
34
+ export declare const I18N_DISPLAY_REDRAWN_EVENT = "i18nDisplay.redrawn";
35
+ type Any = any;
36
+ export declare class I18nDisplay {
37
+ private eventBus;
38
+ private elementRegistry;
39
+ private canvas;
40
+ private textRenderer;
41
+ private graphicsFactory;
42
+ static $inject: string[];
43
+ private config;
44
+ private displayLocale;
45
+ constructor(eventBus: Any, elementRegistry: Any, commandStack: Any, bpmnRenderer: Any, labelEditingProvider: Any, canvas: Any, textRenderer: Any, graphicsFactory: Any);
46
+ /** 다국어 설정. `undefined` = 기능 끔. 표시 언어는 설계 언어로 돌아간다. */
47
+ configure(config: I18nDisplayConfig | undefined): void;
48
+ /** 표시 언어 선택지 — 설계 언어가 맨 앞. 미설정이면 빈 배열. */
49
+ locales(): string[];
50
+ /**
51
+ * 표시 언어 전환 — 선택지 밖은 설계 언어로(B-4 「보이는 언어 = 쓰이는 칸」: 목록 밖 화면에서 친
52
+ * 문구가 설계 언어 칸에 들어가는 경로를 막는다). 실제로 적용된 언어를 돌려준다.
53
+ * commandStack 밖이라 `commandStack.changed` 가 없다 → dirty · 드래프트 저장 비발동(C-3).
54
+ */
55
+ setDisplayLocale(locale: string): string | undefined;
56
+ getDisplayLocale(): string | undefined;
57
+ /** 루트 `<bpmn:definitions xml:lang>` — 번역 칸으로 판정되지 않는 `name` 의 언어. */
58
+ rootLang(): string | undefined;
59
+ /** 표시 판정 — `name` 언어 = 같은 문구의 번역 칸 → 없으면 루트 `xml:lang` → 설계 언어. */
60
+ resolve(element: Any): I18nDisplayResolution | undefined;
61
+ /** 그 언어로 볼 때 미번역인 요소 수(납품 판정 = 설계 언어 미번역 0 · 확인 요청 0). */
62
+ untranslatedCount(locale: string): number;
63
+ /** 그 언어 칸에 확인 요청이 걸린 요소 수. */
64
+ reviewRequestedCount(locale: string): number;
65
+ private countStatus;
66
+ private withDisplayText;
67
+ /** 라벨 요소 폭을 표시 문구 기준으로 잠시 바꾼다. GraphicsFactory 는 drawShape **뒤에** translate 한다. */
68
+ private widen;
69
+ /**
70
+ * 이벤트 없이 다시 그린다. 🔴 `elements.changed` 를 쓰면 안 된다 — 임포트가 외부 라벨 요소 크기를
71
+ * 문구 측정값으로 보정해 두고(DI 엔 안 씀 · `BpmnImporter.addLabel`), `shape.changed` 가 나면
72
+ * `BpmnUpdater` 가 그 보정값을 DI 에 쓴다(upstream). 토글 한 번이 문서 전체 라벨 DI 를 고치는 셈이
73
+ * 된다(스파이크 F2 — 그룹 라벨 폭 36 → 31 · 흐름 라벨 22 → 20). 대신 전용 이벤트(`I18N_DISPLAY_REDRAWN_EVENT`)를
74
+ * 끝에 한 번 낸다 — 그래픽 복제 소비자(미니맵)가 옛 문구를 들고 남지 않게.
75
+ */
76
+ private rerenderAll;
77
+ }
78
+ /** bpmn-js 모듈 — `BpmnModelerView` 가 붙인다. 서비스 이름 = `i18nDisplay`. */
79
+ export declare const I18nDisplayModule: {
80
+ __depends__: {
81
+ __init__: string[];
82
+ translationCommands: (string | typeof import('..').TranslationCommands)[];
83
+ }[];
84
+ __init__: string[];
85
+ i18nDisplay: (string | typeof I18nDisplay)[];
86
+ };
87
+ export {};
@@ -0,0 +1,25 @@
1
+ type Any = any;
2
+ /** 토글 문구 — 접힘 = 여는 단추 · 펼침 = 지도 오른쪽 위의 접는 단추. */
3
+ export declare const MINIMAP_TOGGLE_TITLES: {
4
+ readonly closed: "미니맵";
5
+ readonly open: "접기";
6
+ };
7
+ export declare class MinimapI18n {
8
+ private minimap;
9
+ private canvas;
10
+ static $inject: string[];
11
+ constructor(eventBus: Any, minimap: Any, canvas: Any);
12
+ /** 닫혀 있으면 「열 때 다시 짓기」만 걸어 둔다 — 미니맵 자신이 닫힌 동안의 변경을 그렇게 다룬다. */
13
+ private rebuild;
14
+ private retitle;
15
+ }
16
+ /** bpmn-js 모듈 — `BpmnModelerView` 가 붙인다(헤드리스 경로엔 붙이지 않는다). 처음엔 접혀 있다. */
17
+ export declare const BpmnMinimapModule: {
18
+ __depends__: {
19
+ __init__: string[];
20
+ minimap: [string, unknown];
21
+ }[];
22
+ __init__: string[];
23
+ minimapI18n: (string | typeof MinimapI18n)[];
24
+ };
25
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@g1cloud/bpmn-modeler-next",
3
3
  "private": false,
4
- "version": "5.0.0-beta.4",
4
+ "version": "5.0.0-beta.41",
5
5
  "description": "Vue 3 BPMN document authoring editor (bpmn-js based) with AI agent authoring",
6
6
  "type": "module",
7
7
  "files": [
@@ -31,7 +31,8 @@
31
31
  "bpmn-i18n-moddle": "^0.2.0",
32
32
  "bpmn-js": "^18.23.0",
33
33
  "bpmn-moddle": "^10.1.0",
34
- "diagram-js": "^15.23.2"
34
+ "diagram-js": "^15.23.2",
35
+ "diagram-js-minimap": "^5.5.0"
35
36
  },
36
37
  "devDependencies": {
37
38
  "@types/node": "^25.9.2",