@g1cloud/bpmn-modeler-next 5.0.0-beta.11 → 5.0.0-beta.110
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 +13 -1
- 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 +11 -1
- package/dist/agent/agentReplay.d.ts +36 -0
- package/dist/agent/describeProcess.d.ts +6 -0
- package/dist/agent/generatedIds.d.ts +18 -0
- package/dist/agent/geometryAudit.d.ts +97 -1
- package/dist/agent/resolver/annotationSize.d.ts +12 -0
- package/dist/agent/resolver/documentIndex.d.ts +7 -0
- package/dist/agent/resolver/index.d.ts +14 -0
- package/dist/agent/resolver/lower.d.ts +113 -11
- package/dist/agent/resolver/routeRepair.d.ts +316 -8
- package/dist/bpmn-modeler-next.css +1 -1
- package/dist/bpmn-modeler.js +17509 -14228
- package/dist/bpmn-modeler.umd.cjs +102 -103
- package/dist/command/annotationExactResize.d.ts +30 -0
- package/dist/command/undoEpisode.d.ts +7 -0
- package/dist/editor/controller.d.ts +12 -1
- package/dist/editor/editLock.d.ts +9 -0
- package/dist/headless/dom.d.ts +2 -0
- package/dist/headless/modeler.d.ts +15 -1
- package/dist/index.d.ts +5 -0
- package/dist/view/BpmnModelerView.vue.d.ts +7 -0
- package/dist/view/headlessReplay.d.ts +63 -0
- package/dist/view/i18nDisplay.d.ts +39 -5
- package/dist/view/minimap.d.ts +25 -0
- package/package.json +3 -2
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 주석 resize 의 정확한 크기 (B-209) — **resolver 가 표시한** `shape.resize` 만 bpmn-js 높이 스냅 뒤에 요청 크기로 되돌린다.
|
|
3
|
+
*
|
|
4
|
+
* bpmn-js 18.23 `TextAnnotationBehavior` 는 주석 하나의 프로그램 resize 마다 높이를 **그 환경의 측정 × 설계 언어 문구**로
|
|
5
|
+
* 다시 맞추고 최소 40(`MIN_TEXT_ANNOTATION_HEIGHT`)으로 둔다 — 우회 힌트(`autoResize`)도 강제로 끈다. 그래서 resolver 의
|
|
6
|
+
* 주석 상자(`agent/resolver/annotationSize` — 문서 언어 전부 · diagram-js 줄바꿈 · 한자 1em)를 `annotation.update` 에서
|
|
7
|
+
* 그대로 쓸 길이 공개 API 에 없었다(폭만 쓰고 높이를 스냅에 맡기면 로컬 말뭉치에서 ja 38 · ko 19 가 넘쳤다 —
|
|
8
|
+
* `ledger/backlog.md` §부록 B-209). 이 모듈이 스냅 **뒤**(우선순위 500)에 요청 크기를 다시 놓는다.
|
|
9
|
+
*
|
|
10
|
+
* 🔴 **힌트(`ANNOTATION_EXACT_BOUNDS_HINT`)가 있는 resize 만** 손댄다 — 사람의 GUI 크기 조절 · 문구 편집과 다른 경로는
|
|
11
|
+
* bpmn-js 그대로다. 힌트 값 = 요청 바운즈(스냅이 `context.newBounds` 를 새 객체로 바꾸므로 원래 값을 힌트에 싣는다).
|
|
12
|
+
* redo 는 preExecute 를 다시 타지 않고 저장된 `newBounds` 로 실행하므로 정확한 크기가 그대로 돌아온다.
|
|
13
|
+
*
|
|
14
|
+
* ⚠ **bpmn-js 내부 동작에 기댄다**(스냅이 `shape.resize` preExecute · 기본 우선순위 1000) — pin 상향 게이트 =
|
|
15
|
+
* `annotationExactResize.test.ts`(스냅이 다른 단계로 옮겨지면 그 테스트가 깨진다). 헤드리스 기본 셋 · `BpmnModelerView`
|
|
16
|
+
* 양쪽에 등록한다 — 턴 끝 재실행(G4 B′)이 서버와 같은 크기를 내야 한다.
|
|
17
|
+
*/
|
|
18
|
+
type Any = any;
|
|
19
|
+
/** `modeling.resizeShape(shape, bounds, undefined, { [ANNOTATION_EXACT_BOUNDS_HINT]: bounds })`. */
|
|
20
|
+
export declare const ANNOTATION_EXACT_BOUNDS_HINT = "bwlExactAnnotationBounds";
|
|
21
|
+
export declare class AnnotationExactResize {
|
|
22
|
+
static $inject: string[];
|
|
23
|
+
constructor(eventBus: Any);
|
|
24
|
+
}
|
|
25
|
+
/** bpmn-js 모듈 — 서비스 이름 = `annotationExactResize`. 헤드리스 기본 셋과 `BpmnModelerView` 가 붙인다. */
|
|
26
|
+
export declare const AnnotationExactResizeModule: {
|
|
27
|
+
__init__: string[];
|
|
28
|
+
annotationExactResize: (string | typeof AnnotationExactResize)[];
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
@@ -8,3 +8,10 @@ export declare const UNDO_EPISODE_COMMAND = "bwl.undoEpisode";
|
|
|
8
8
|
* 호출자(resolver `applyBpmnOps`)의 원자성 2차 방어가 이 경로를 쓴다.
|
|
9
9
|
*/
|
|
10
10
|
export declare function executeAsUndoEpisode(commandStack: CommandStack, run: () => void): void;
|
|
11
|
+
/** 다음에 쌓일 액션의 자리 — 합치기의 시작 표식. */
|
|
12
|
+
export declare function undoStepMark(commandStack: CommandStack): number;
|
|
13
|
+
/**
|
|
14
|
+
* `mark` 이후 **실행된** 액션(지금 `_stackIdx` 까지)을 한 undo 단계로 합친다. 되감긴(redo 쪽) 액션은 건드리지 않는다.
|
|
15
|
+
* @returns 합친 액션 수(0 = 그 사이 실행된 것이 없다)
|
|
16
|
+
*/
|
|
17
|
+
export declare function mergeUndoSteps(commandStack: CommandStack, mark: number): number;
|
|
@@ -2,6 +2,7 @@ import { InjectionKey, Ref } from 'vue';
|
|
|
2
2
|
import { default as Modeler } from 'bpmn-js/lib/Modeler';
|
|
3
3
|
import { CommandSeam } from '../command/commandSeam';
|
|
4
4
|
import { ApplyBatchOutcome, BpmnOpBatch } from '../agent/agentBatch';
|
|
5
|
+
import { BpmnReplayBatch, ReplayAgentTurnOutcome } from '../agent/agentReplay';
|
|
5
6
|
import { GeometryFinding } from '../agent/geometryAudit';
|
|
6
7
|
import { SemanticIssue } from '../agent/semanticAudit';
|
|
7
8
|
import { I18nDisplayConfig } from '../view/i18nDisplay';
|
|
@@ -53,9 +54,10 @@ export interface ImportXmlResult {
|
|
|
53
54
|
*
|
|
54
55
|
* **M3-2 에이전트 턴 통합** — 시블링 포크 A·B 대칭:
|
|
55
56
|
* - 적용은 단일 undo 에피소드(`agent/agentBatch` → `command/undoEpisode`)
|
|
56
|
-
* - 턴 중 사용자 편집 잠금은 `setEditable(false)` — 잠금은 **사용자
|
|
57
|
+
* - 턴 중 사용자 편집 잠금은 `setEditable(false)` — 잠금은 **사용자 편집 입구만** 막고
|
|
57
58
|
* 프로그램 경로(modeling API)는 막지 않는다. 그래서 잠긴 상태에서도 배치 적용이 된다
|
|
58
59
|
* (에이전트가 쓰는 동안 사용자를 막는 것이 목적이므로 우회 장치가 따로 필요 없다).
|
|
60
|
+
* 탐색(선택 · 팬 · 줌 · 미니맵)은 잠금 중에도 된다(B-145 · `editor/editLock`).
|
|
59
61
|
*/
|
|
60
62
|
export interface BpmnEditorController extends CommandSeam {
|
|
61
63
|
/** 뷰 마운트 완료(@ready) 후 호출 — dirty 추적 구독의 수명 시작점. */
|
|
@@ -72,6 +74,15 @@ export interface BpmnEditorController extends CommandSeam {
|
|
|
72
74
|
* 문서 언어 전부를 요구하고 평문은 거부된다(B-4 ④).
|
|
73
75
|
*/
|
|
74
76
|
applyAgentBatch(batch: BpmnOpBatch, currentVersion: number): Promise<ApplyBatchOutcome>;
|
|
77
|
+
/**
|
|
78
|
+
* 턴 끝 재실행(G4 B′ · `agent/agentReplay`) — 서버가 이 턴에 커밋한 배치들을 헤드리스 동등 실행 환경
|
|
79
|
+
* (`view/headlessReplay` · `BpmnModelerView` 가 붙인다)에서 다시 하강해 `expectedXml` 과 **바이트로 같을 때만** 남긴다 —
|
|
80
|
+
* Ctrl+Z 1회 = 턴 전 · 턴 전 사람 undo 이력 보존. `diverged` 면 재실행 전으로 되감겨 있다 → 호스트는
|
|
81
|
+
* `importXml(expectedXml)` 로 떨어진다.
|
|
82
|
+
* 🔴 재실행 동안 `dirty` 를 움직이지 않는다 — 결과는 서버와 같은 문서라 드래프트를 내면 안 된다(빈 쓰기 · 사람 편집으로 찍힌다).
|
|
83
|
+
* 다국어 설정(`configureI18n`)이 곧 그 문서의 문서 언어다(서버와 같은 값이어야 같은 하강을 탄다).
|
|
84
|
+
*/
|
|
85
|
+
replayAgentTurn(batches: readonly BpmnReplayBatch[], expectedXml: string): Promise<ReplayAgentTurnOutcome>;
|
|
75
86
|
/** 사용자 입력 잠금 — 에이전트 턴 시작/종료에서 호출. 프로그램 경로는 영향 없음. */
|
|
76
87
|
setEditable(editable: boolean): void;
|
|
77
88
|
readonly editable: Readonly<Ref<boolean>>;
|
|
@@ -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;
|
package/dist/headless/dom.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export declare const HEADLESS_TEXT_METRICS: {
|
|
|
40
40
|
readonly ascentEm: 0.9;
|
|
41
41
|
readonly descentEm: 0.25;
|
|
42
42
|
};
|
|
43
|
+
/** 위 전각 판정 — 주석 상자 측정(`agent/resolver/annotationSize`)이 같은 문자 클래스를 쓴다. */
|
|
44
|
+
export declare function isFullWidthChar(ch: string): boolean;
|
|
43
45
|
/** 폰트 크기(px)에서 텍스트 폭을 근사한다 — 심의 `measureText` 와 대조 테스트가 공유하는 단일 출처. */
|
|
44
46
|
export declare function approximateTextWidth(text: string, fontSizePx: number): number;
|
|
45
47
|
/**
|
|
@@ -3,16 +3,30 @@ import { ModdleExtensions, ModuleDeclaration } from 'bpmn-js/lib/BaseViewer';
|
|
|
3
3
|
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
|
+
import { default as AutoResizeModule } from 'bpmn-js/lib/features/auto-resize';
|
|
6
7
|
import { HeadlessDomOptions } from './dom';
|
|
7
8
|
/**
|
|
8
9
|
* 헤드리스 하강에 필요한 최소 모듈 셋 — 이 목록이 곧 "에디터 없이 성립하는 표면"의 정의다.
|
|
9
10
|
* `TranslationCommandsModule` = 번역 칸 커맨드(B-4 ④ — 다국어 그룹의 에이전트 op 가 쓴다 · 그래픽스 무관).
|
|
11
|
+
* `TranslationLocaleCopyModule` = 타입 전환이 번역 칸 언어를 잃지 않게(B-156 — `BpmnModelerView` 와 같은 모듈).
|
|
12
|
+
* `AnnotationImportDockingModule` = 주석 연관선의 가져오기 도킹 원점이 주석 밖이면 중심으로(B-139 — `BpmnModelerView` 와 같은 모듈).
|
|
13
|
+
* `AnnotationExactResizeModule` = resolver 가 표시한 주석 resize 를 bpmn-js 높이 스냅 뒤 요청 크기로(B-209 — `BpmnModelerView` 와 같은 모듈).
|
|
14
|
+
* `AutoResizeModule` = 내용이 풀 · 레인 경계를 넘으면 컨테이너를 키운다(B-176 — `Modeler` 에 있는 bpmn-js 모듈 · 위 헤더).
|
|
10
15
|
*/
|
|
11
16
|
export declare const HEADLESS_BPMN_MODULES: readonly [typeof CoreModule, {
|
|
12
17
|
translate: (string | typeof import('diagram-js/lib/i18n/translate/translate').default)[];
|
|
13
|
-
}, typeof ModelingModule, typeof AutoPlaceModule, {
|
|
18
|
+
}, typeof ModelingModule, typeof AutoPlaceModule, typeof AutoResizeModule, {
|
|
14
19
|
__init__: string[];
|
|
15
20
|
translationCommands: (string | typeof import('..').TranslationCommands)[];
|
|
21
|
+
}, {
|
|
22
|
+
__init__: string[];
|
|
23
|
+
translationLocaleCopy: (string | typeof import('../adapter/translationLocaleCopy').TranslationLocaleCopy)[];
|
|
24
|
+
}, {
|
|
25
|
+
__init__: string[];
|
|
26
|
+
annotationImportDocking: (string | typeof import('../adapter/annotationImportDocking').AnnotationImportDocking)[];
|
|
27
|
+
}, {
|
|
28
|
+
__init__: string[];
|
|
29
|
+
annotationExactResize: (string | typeof import('../command/annotationExactResize').AnnotationExactResize)[];
|
|
16
30
|
}];
|
|
17
31
|
export interface HeadlessBpmnModelerOptions {
|
|
18
32
|
/** 추가 모듈(호스트 확장). 기본 셋을 대체하지 않고 덧붙인다. */
|
package/dist/index.d.ts
CHANGED
|
@@ -14,14 +14,19 @@ export * from './agent/geometryAudit';
|
|
|
14
14
|
export * from './agent/semanticAudit';
|
|
15
15
|
export * from './agent/elementDiff';
|
|
16
16
|
export * from './agent/agentBatch';
|
|
17
|
+
export * from './agent/agentReplay';
|
|
18
|
+
export * from './agent/generatedIds';
|
|
17
19
|
export * from './editor/controller';
|
|
18
20
|
export * from './adapter/i18n';
|
|
19
21
|
export * from './adapter/i18nBackfill';
|
|
22
|
+
export * from './adapter/translationLocaleRestore';
|
|
20
23
|
export * from './adapter/extensions';
|
|
21
24
|
export * from './adapter/xml';
|
|
22
25
|
export * from './headless';
|
|
23
26
|
export * from './view/validationDisplay';
|
|
24
27
|
export * from './view/i18nDisplay';
|
|
28
|
+
export * from './view/headlessReplay';
|
|
29
|
+
export * from './view/modelerViewModules';
|
|
25
30
|
export { default as BpmnModelerView } from './view/BpmnModelerView.vue';
|
|
26
31
|
export { default as BpmnValidationPanel } from './view/BpmnValidationPanel.vue';
|
|
27
32
|
export { default as BpmnDisplayLocaleSwitcher } from './view/BpmnDisplayLocaleSwitcher.vue';
|
|
@@ -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,63 @@
|
|
|
1
|
+
type Any = any;
|
|
2
|
+
export declare class HeadlessReplay {
|
|
3
|
+
private eventBus;
|
|
4
|
+
private elementRegistry;
|
|
5
|
+
private textRenderer;
|
|
6
|
+
private graphicsFactory;
|
|
7
|
+
private canvas;
|
|
8
|
+
private bpmnjs;
|
|
9
|
+
static $inject: string[];
|
|
10
|
+
private active;
|
|
11
|
+
/** 재투영 오라클 — 처음 쓸 때 만든다(사람 편집만 하는 화면엔 비용이 없다). */
|
|
12
|
+
private shadow;
|
|
13
|
+
private shadowContainer;
|
|
14
|
+
constructor(eventBus: Any, elementRegistry: Any, textRenderer: Any, graphicsFactory: Any, canvas: Any, bpmnjs: Any);
|
|
15
|
+
/** 창 안인가 — 그리드 스냅 가드가 본다. */
|
|
16
|
+
isActive(): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* `run` 을 창 안에서 돌린다(동기). 열 때 측정 근사 + 재투영, 닫을 때 측정 원복 + 라벨 재측정 + 다시 그리기.
|
|
19
|
+
* 중첩 금지 — 창 안의 창은 측정 원복 순서가 꼬인다.
|
|
20
|
+
*/
|
|
21
|
+
run<T>(run: () => T): T;
|
|
22
|
+
/**
|
|
23
|
+
* 배치 경계 — 서버는 배치마다 저장(`saveXML.start` = DI 정렬)하고 그 XML 을 새로 import 한다. 그 둘을 재현한다.
|
|
24
|
+
* 창 안에서만 부른다. 🔴 앞 배치는 **자기 커맨드를 끝낸 뒤**여야 한다(라벨 DI 가 그때 써진다 — `agent/agentReplay`).
|
|
25
|
+
*/
|
|
26
|
+
atBatchBoundary(): void;
|
|
27
|
+
/** ③ — 그림자 import 의 메모리 상태를 라이브 요소에 옮겨 적는다(의미론 · DI · 커맨드 스택 무변 · 이벤트 없음). */
|
|
28
|
+
private reproject;
|
|
29
|
+
/** import 의 외부 라벨 보정(`BpmnImporter.addLabel`)을 **지금 측정으로** 다시 한다 — 메모리만. */
|
|
30
|
+
private relabel;
|
|
31
|
+
/** 라벨 하나를 지금 측정으로 다시 잰다(메모리만 · 이벤트 없음). @returns 바뀌었는가 */
|
|
32
|
+
private remeasure;
|
|
33
|
+
/** ⑤ — undo · redo 가 바꾼 요소의 외부 라벨을 실폰트로 다시 재고, 바뀐 것만 다시 그린다(`elements.changed` 없이). */
|
|
34
|
+
private remeasureLabelsOf;
|
|
35
|
+
/** SVG 순서(z-order)를 메모리 형제 순서에 맞춘다 — 재투영이 형제 순서를 바꿨다. 메모리는 건드리지 않는다. */
|
|
36
|
+
private syncGraphicsOrder;
|
|
37
|
+
/** 전부 다시 그린다 — 창 안에서 근사 측정으로 그린 문구를 실폰트로. 🔴 `elements.changed` 를 내지 않는다(헤더 ④). */
|
|
38
|
+
private redrawAll;
|
|
39
|
+
private ensureShadow;
|
|
40
|
+
private disposeShadow;
|
|
41
|
+
}
|
|
42
|
+
declare function GuardedGridSnappingAutoPlaceBehavior(this: Any, eventBus: Any, gridSnapping: Any, elementRegistry: Any, headlessReplay: HeadlessReplay): void;
|
|
43
|
+
declare namespace GuardedGridSnappingAutoPlaceBehavior {
|
|
44
|
+
var $inject: string[];
|
|
45
|
+
}
|
|
46
|
+
declare function GuardedGridSnappingLayoutConnectionBehavior(this: Any, eventBus: Any, gridSnapping: Any, modeling: Any, headlessReplay: HeadlessReplay): void;
|
|
47
|
+
declare namespace GuardedGridSnappingLayoutConnectionBehavior {
|
|
48
|
+
var prototype: any;
|
|
49
|
+
var $inject: string[];
|
|
50
|
+
}
|
|
51
|
+
/** 가드를 씌운 원본이 그 이름으로 서 있는가 — 게이트 테스트가 본다(bpmn-js 가 이름을 바꾸면 덮기가 헛돈다). */
|
|
52
|
+
export declare function isGuardedGridSnapping(service: unknown): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* bpmn-js 모듈 — `BpmnModelerView` 가 붙인다. 서비스 이름 = `headlessReplay`. 그리드 스냅 동작 둘을 **같은 이름으로 덮는다**
|
|
55
|
+
* (추가 모듈이 뒤에 실려 이긴다 — bpmn-js 의 `__init__` 이 그 이름으로 우리 정의를 만든다).
|
|
56
|
+
*/
|
|
57
|
+
export declare const HeadlessReplayModule: {
|
|
58
|
+
__init__: string[];
|
|
59
|
+
headlessReplay: (string | typeof HeadlessReplay)[];
|
|
60
|
+
gridSnappingAutoPlaceBehavior: (string | typeof GuardedGridSnappingAutoPlaceBehavior)[];
|
|
61
|
+
gridSnappingLayoutConnectionBehavior: (string | typeof GuardedGridSnappingLayoutConnectionBehavior)[];
|
|
62
|
+
};
|
|
63
|
+
export {};
|
|
@@ -11,10 +11,16 @@ export interface I18nDisplayConfig extends BpmnDocumentLocales {
|
|
|
11
11
|
* 라벨의 겹침은 판정 밖.
|
|
12
12
|
*/
|
|
13
13
|
adaptiveExternalLabel?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 다른 언어 문구를 대신 그릴 때 끝에 그 언어 태그(` [ja]`)를 붙인다 — 기본 켬(B-234). 회색 기울임 표식만으로는
|
|
16
|
+
* 「지운 문구가 남았나」 와 구별이 안 됐다(사용자 판정). 그리는 문구에만 붙고 편집창 · 저장 문구에는 없다.
|
|
17
|
+
* 고객 제출 PDF 처럼 태그가 산출물에 남으면 안 되는 표면은 끈다.
|
|
18
|
+
*/
|
|
19
|
+
fallbackLocaleTag?: boolean;
|
|
14
20
|
}
|
|
15
21
|
/**
|
|
16
|
-
* 표시 상태 — `untranslated` = 표시 언어
|
|
17
|
-
* 확인 요청 표식이 있다(다른 언어가 내용 변경됐다 — 문구는 칸의 현재 문구 그대로 그린다).
|
|
22
|
+
* 표시 상태 — `untranslated` = 표시 언어 문구가 없어 다른 언어 문구(`name` · 다른 문서 언어 칸)를 대신 그린다 ·
|
|
23
|
+
* `reviewRequested` = 그 칸에 확인 요청 표식이 있다(다른 언어가 내용 변경됐다 — 문구는 칸의 현재 문구 그대로 그린다).
|
|
18
24
|
*/
|
|
19
25
|
export type I18nDisplayStatus = 'ok' | 'untranslated' | 'reviewRequested';
|
|
20
26
|
export interface I18nDisplayResolution {
|
|
@@ -22,23 +28,49 @@ export interface I18nDisplayResolution {
|
|
|
22
28
|
status: I18nDisplayStatus;
|
|
23
29
|
/** true = `name` 자체가 표시 언어다 → 치환 없음 · 편집은 기본 경로(`modeling.updateLabel`). */
|
|
24
30
|
native: boolean;
|
|
31
|
+
/** `text` 가 표시 언어 문구가 아닐 때 그 문구의 언어 — 그릴 때 태그(`fallbackLocaleTag`)가 된다. */
|
|
32
|
+
fallbackLocale?: string;
|
|
25
33
|
}
|
|
26
34
|
/** 미번역 요소의 그래픽(`djs-element`)에 붙는 클래스. */
|
|
27
35
|
export declare const I18N_UNTRANSLATED_CLASS = "i18n-untranslated";
|
|
28
36
|
/** 확인 요청 요소의 그래픽(`djs-element`)에 붙는 클래스. */
|
|
29
37
|
export declare const I18N_REVIEW_REQUESTED_CLASS = "i18n-review-requested";
|
|
38
|
+
/**
|
|
39
|
+
* 표시 문구를 **`elements.changed` 없이** 다시 그린 뒤 내는 이벤트(설정 · 표시 언어 전환). 그래픽을 복제해 들고 있는
|
|
40
|
+
* 소비자(미니맵 — `view/minimap`)는 이것으로 다시 짓는다. 페이로드 없음 — 전량을 다시 그렸다.
|
|
41
|
+
*/
|
|
42
|
+
export declare const I18N_DISPLAY_REDRAWN_EVENT = "i18nDisplay.redrawn";
|
|
30
43
|
type Any = any;
|
|
31
44
|
export declare class I18nDisplay {
|
|
45
|
+
private eventBus;
|
|
32
46
|
private elementRegistry;
|
|
33
47
|
private canvas;
|
|
34
48
|
private textRenderer;
|
|
35
49
|
private graphicsFactory;
|
|
50
|
+
private elementFactory;
|
|
36
51
|
static $inject: string[];
|
|
37
52
|
private config;
|
|
38
53
|
private displayLocale;
|
|
39
|
-
|
|
54
|
+
/** 이름이 비어 가져오기가 만들지 않았는데 다른 언어 문구가 남아 이 모듈이 세운 외부 라벨(B-234 C) — 끄면 걷는다. */
|
|
55
|
+
private fallbackLabels;
|
|
56
|
+
/** 사람이 라벨 도형 자체를 지우는 중인 주인 요소 — 그 `updateLabel` 뒤처리는 전 언어 삭제다(B-234 A). */
|
|
57
|
+
private labelDeleteTarget;
|
|
58
|
+
constructor(eventBus: Any, elementRegistry: Any, commandStack: Any, bpmnRenderer: Any, labelEditingProvider: Any, canvas: Any, textRenderer: Any, graphicsFactory: Any, elementFactory: Any);
|
|
40
59
|
/** 다국어 설정. `undefined` = 기능 끔. 표시 언어는 설계 언어로 돌아간다. */
|
|
41
60
|
configure(config: I18nDisplayConfig | undefined): void;
|
|
61
|
+
/**
|
|
62
|
+
* 이름이 비어 가져오기가 외부 라벨 도형을 만들지 않았는데(bpmn-js 는 `name` 으로 정한다) 문서 언어 칸에 문구가
|
|
63
|
+
* 남은 요소에 라벨 도형을 세운다(B-234 C) — commandStack 밖이라 DI · dirty 무변(가져오기 `BpmnImporter.addLabel`
|
|
64
|
+
* 과 같은 방식). 기능을 끄면 걷는다. 🔴 bpmn-js 내부(`elementFactory.createLabel` · `canvas.addShape`)에 기댄다 —
|
|
65
|
+
* pin 상향 전에 `i18nDisplay.browser.test.ts` 를 돌린다.
|
|
66
|
+
*/
|
|
67
|
+
private syncFallbackLabels;
|
|
68
|
+
/** 문서 언어 순(설계 → 병기)으로 문구가 있는 칸. */
|
|
69
|
+
private docTexts;
|
|
70
|
+
/** 표시 언어 칸의 문구(없으면 undefined) — 이 언어로 쓰인 것이 있나. */
|
|
71
|
+
private ownText;
|
|
72
|
+
/** 지금 이름을 비우면 남는 다른 문서 언어 문구(이름의 언어 칸은 그 편집이 비운다). */
|
|
73
|
+
private remainingTextsAfterClear;
|
|
42
74
|
/** 표시 언어 선택지 — 설계 언어가 맨 앞. 미설정이면 빈 배열. */
|
|
43
75
|
locales(): string[];
|
|
44
76
|
/**
|
|
@@ -50,13 +82,14 @@ export declare class I18nDisplay {
|
|
|
50
82
|
getDisplayLocale(): string | undefined;
|
|
51
83
|
/** 루트 `<bpmn:definitions xml:lang>` — 번역 칸으로 판정되지 않는 `name` 의 언어. */
|
|
52
84
|
rootLang(): string | undefined;
|
|
53
|
-
/** 표시 판정 — `name` 언어 = 같은 문구의 번역 칸 →
|
|
85
|
+
/** 표시 판정 — `name` 언어 = `nameLocalesOf`(같은 문구의 번역 칸 → 루트 `xml:lang` → 설계 언어 · 언어 중립 문구). */
|
|
54
86
|
resolve(element: Any): I18nDisplayResolution | undefined;
|
|
55
87
|
/** 그 언어로 볼 때 미번역인 요소 수(납품 판정 = 설계 언어 미번역 0 · 확인 요청 0). */
|
|
56
88
|
untranslatedCount(locale: string): number;
|
|
57
89
|
/** 그 언어 칸에 확인 요청이 걸린 요소 수. */
|
|
58
90
|
reviewRequestedCount(locale: string): number;
|
|
59
91
|
private countStatus;
|
|
92
|
+
/** `draw` = 그리는 경로 — 다른 언어 문구에 언어 태그를 붙인다(편집창 문구 · 「바뀌었나」 기준에는 안 붙는다). */
|
|
60
93
|
private withDisplayText;
|
|
61
94
|
/** 라벨 요소 폭을 표시 문구 기준으로 잠시 바꾼다. GraphicsFactory 는 drawShape **뒤에** translate 한다. */
|
|
62
95
|
private widen;
|
|
@@ -64,7 +97,8 @@ export declare class I18nDisplay {
|
|
|
64
97
|
* 이벤트 없이 다시 그린다. 🔴 `elements.changed` 를 쓰면 안 된다 — 임포트가 외부 라벨 요소 크기를
|
|
65
98
|
* 문구 측정값으로 보정해 두고(DI 엔 안 씀 · `BpmnImporter.addLabel`), `shape.changed` 가 나면
|
|
66
99
|
* `BpmnUpdater` 가 그 보정값을 DI 에 쓴다(upstream). 토글 한 번이 문서 전체 라벨 DI 를 고치는 셈이
|
|
67
|
-
* 된다(스파이크 F2 — 그룹 라벨 폭 36 → 31 · 흐름 라벨 22 → 20).
|
|
100
|
+
* 된다(스파이크 F2 — 그룹 라벨 폭 36 → 31 · 흐름 라벨 22 → 20). 대신 전용 이벤트(`I18N_DISPLAY_REDRAWN_EVENT`)를
|
|
101
|
+
* 끝에 한 번 낸다 — 그래픽 복제 소비자(미니맵)가 옛 문구를 들고 남지 않게.
|
|
68
102
|
*/
|
|
69
103
|
private rerenderAll;
|
|
70
104
|
}
|
|
@@ -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
|
+
"version": "5.0.0-beta.110",
|
|
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",
|