@g1cloud/bpmn-modeler-next 5.0.0-alpha.99 → 5.0.0-beta.10
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/README.md +4 -2
- package/dist/adapter/i18n.d.ts +38 -6
- package/dist/adapter/i18nBackfill.d.ts +64 -0
- package/dist/agent/agentBatch.d.ts +7 -1
- package/dist/agent/describeProcess.d.ts +34 -3
- package/dist/agent/resolver/documentIndex.d.ts +12 -0
- package/dist/agent/resolver/index.d.ts +14 -2
- package/dist/agent/resolver/issues.d.ts +93 -0
- package/dist/agent/resolver/localeTexts.d.ts +24 -0
- package/dist/agent/resolver/lower.d.ts +9 -0
- package/dist/agent/resolver/routeRepair.d.ts +5 -2
- package/dist/agent/resolver/validate.d.ts +10 -1
- package/dist/agent/symbolicOp.d.ts +23 -3
- package/dist/bpmn-modeler-next.css +1 -1
- package/dist/bpmn-modeler.js +12419 -11448
- package/dist/bpmn-modeler.umd.cjs +77 -77
- package/dist/command/commandSeam.d.ts +2 -1
- package/dist/command/setTranslations.d.ts +42 -0
- package/dist/command/translationCommands.d.ts +11 -0
- package/dist/command/updateTranslation.d.ts +31 -0
- package/dist/core/hints.d.ts +29 -0
- package/dist/core/ir.d.ts +88 -4
- package/dist/editor/controller.d.ts +31 -0
- package/dist/headless/modeler.d.ts +8 -2
- package/dist/index.d.ts +6 -0
- package/dist/view/BpmnDisplayLocaleSwitcher.vue.d.ts +6 -0
- package/dist/view/i18nDisplay.d.ts +80 -0
- package/package.json +2 -1
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 모든 모델 변경은 bpmn-js commandStack 을 경유해야 한다 — 레거시 i18n 이
|
|
5
5
|
* commandStack 을 우회해 businessObject.name 을 직접 변조하다 undo 버그를 만든 것이
|
|
6
|
-
* 반면교사(백로그 B-4
|
|
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 {};
|
package/dist/core/hints.d.ts
CHANGED
|
@@ -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
|
@@ -15,9 +15,14 @@
|
|
|
15
15
|
*
|
|
16
16
|
* ⚠ **이 집합은 `ADDABLE_FLOW_NODE_TYPES` 의 상위집합이다** — 읽을 수 있다고 만들 수 있는 것이
|
|
17
17
|
* 아니다. 승격은 **불투명**이다: subProcess 를 노드로 내되 내부는 열지 않는다(내부 요소는
|
|
18
|
-
* `inside-container` 로 알린다).
|
|
18
|
+
* `inside-container` 로 알린다).
|
|
19
|
+
*
|
|
20
|
+
* 🔴 `intermediateCatchEvent` 는 2026-09-30 **timer 한 변형만** 승격했다(B-87 ⓑ 부분 — 사용자 결정
|
|
21
|
+
* *"일단 timer하나로"*). 사람 코퍼스 26종의 중간 catch 이벤트 **9/9 가 timer** 이고, 다른 변형
|
|
22
|
+
* (message·signal 등)은 여전히 `type-outside-mvp` 로 나간다 — 판정은 타입이 아니라 **타입 +
|
|
23
|
+
* eventDefinition** 이다(`IrNode.eventDefinition`). `intermediateThrowEvent` 는 아직 밖이다.
|
|
19
24
|
*/
|
|
20
|
-
export declare const IR_FLOW_NODE_TYPES: readonly ["startEvent", "endEvent", "userTask", "serviceTask", "task", "sendTask", "receiveTask", "exclusiveGateway", "parallelGateway", "subProcess", "boundaryEvent"];
|
|
25
|
+
export declare const IR_FLOW_NODE_TYPES: readonly ["startEvent", "endEvent", "userTask", "serviceTask", "task", "sendTask", "receiveTask", "exclusiveGateway", "parallelGateway", "subProcess", "boundaryEvent", "intermediateCatchEvent"];
|
|
21
26
|
/**
|
|
22
27
|
* **op 가 새로 만들거나 타입 전환할 수 있는 집합**(write 집합) — 배치 하강이 실증된 것만.
|
|
23
28
|
*
|
|
@@ -26,15 +31,68 @@ export declare const IR_FLOW_NODE_TYPES: readonly ["startEvent", "endEvent", "us
|
|
|
26
31
|
* 좌표계를, `boundaryEvent` 는 `attachedToRef` 좌표 종속을 요구해 배치 축이 새로 생기는데
|
|
27
32
|
* (B-87 미측정 축 ①), 그 축은 이번 승격 범위 밖이다. 스키마 enum 이 1차 방어이고
|
|
28
33
|
* validator 의 `node-type-unsupported` 가 2차 방어다(Defense in Depth).
|
|
34
|
+
*
|
|
35
|
+
* `intermediateCatchEvent` 는 read 와 함께 열었다 — 도형이 start/end 와 같은 36×36 이벤트라
|
|
36
|
+
* 배치가 새 축을 요구하지 않는다(subProcess·boundaryEvent 와 다른 점). 단 **`eventDefinition`
|
|
37
|
+
* 을 반드시 함께 준다**(validator `event-definition-mismatch`) — 정의 없는 중간 catch 이벤트는
|
|
38
|
+
* read 가 표현하지 않는 변형이라, 만들면 describe 에서 사라진다.
|
|
29
39
|
*/
|
|
30
|
-
export declare const ADDABLE_FLOW_NODE_TYPES: readonly ["startEvent", "endEvent", "userTask", "serviceTask", "task", "sendTask", "receiveTask", "exclusiveGateway", "parallelGateway"];
|
|
40
|
+
export declare const ADDABLE_FLOW_NODE_TYPES: readonly ["startEvent", "endEvent", "userTask", "serviceTask", "task", "sendTask", "receiveTask", "exclusiveGateway", "parallelGateway", "intermediateCatchEvent"];
|
|
31
41
|
export type IrFlowNodeType = (typeof IR_FLOW_NODE_TYPES)[number];
|
|
32
42
|
export type AddableFlowNodeType = (typeof ADDABLE_FLOW_NODE_TYPES)[number];
|
|
33
43
|
export declare function isIrFlowNodeType(type: string): type is IrFlowNodeType;
|
|
34
44
|
export declare function isAddableFlowNodeType(type: string): type is AddableFlowNodeType;
|
|
45
|
+
/**
|
|
46
|
+
* **이벤트 정의 어휘**(B-87 ⓑ 부분 · 2026-09-30) — 지금은 `timer` 하나다.
|
|
47
|
+
*
|
|
48
|
+
* 🔴 **2026-09-21 결정(「eventDefinition 어휘는 열지 않는다」)을 좁게 뒤집은 것이다** — 그때의 재평가
|
|
49
|
+
* 트리거는 *"에이전트가 이벤트를 구분해 저작하려는 요구"* 였고, 에이전트가 주문 흐름에서 시한 대기를
|
|
50
|
+
* 게이트웨이 라벨로 근사해 보낸 요청이 그것을 발동시켰다. 범위는 사용자 결정으로 timer 하나다
|
|
51
|
+
* (message catch 는 `receiveTask` 로 대체된다 · error 는 boundaryEvent 전용이라 write 가 없다).
|
|
52
|
+
*
|
|
53
|
+
* ⚠ **이 필드를 쓰는 타입은 `intermediateCatchEvent` 하나다** — boundaryEvent 의 error 정의는 read 에도
|
|
54
|
+
* 내지 않는다(종전 그대로). 시한 값(`timeDuration` 등 표현식)은 싣지 않는다 — 조건 라벨과 같은
|
|
55
|
+
* 판단으로 시한은 `name` 이 말하고(A-5), 표현식은 실행 엔진 도입 트리거에 묶인다.
|
|
56
|
+
*/
|
|
57
|
+
export declare const IR_EVENT_DEFINITIONS: readonly ["timer"];
|
|
58
|
+
export type IrEventDefinition = (typeof IR_EVENT_DEFINITIONS)[number];
|
|
59
|
+
/** IR 이벤트 정의 → bpmn `$type`. read(describe)·write(lower)·색인이 같은 출처를 쓴다. */
|
|
60
|
+
export declare const BPMN_EVENT_DEFINITION_TYPES: Readonly<Record<IrEventDefinition, string>>;
|
|
61
|
+
export declare function isIrEventDefinition(v: unknown): v is IrEventDefinition;
|
|
62
|
+
/**
|
|
63
|
+
* `eventDefinitions` 목록(moddle 요소의 `$type` 배열)을 IR 이벤트 정의로 접는다. **정확히 하나이고
|
|
64
|
+
* 어휘 안의 것일 때만** 값을 낸다 — 다중 정의(BPMN 의 multiple 이벤트)와 어휘 밖 정의는 undefined.
|
|
65
|
+
*/
|
|
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>>;
|
|
35
91
|
export interface IrLane {
|
|
36
92
|
id: string;
|
|
37
93
|
name?: string;
|
|
94
|
+
/** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
|
|
95
|
+
names?: IrLocaleTexts;
|
|
38
96
|
}
|
|
39
97
|
/**
|
|
40
98
|
* 풀(participant). 레인은 풀 정의에 선언하고 노드가 `lane` 인자로 배정된다(A-3) —
|
|
@@ -43,6 +101,8 @@ export interface IrLane {
|
|
|
43
101
|
export interface IrParticipant {
|
|
44
102
|
id: string;
|
|
45
103
|
name?: string;
|
|
104
|
+
/** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
|
|
105
|
+
names?: IrLocaleTexts;
|
|
46
106
|
/** true 면 내부 프로세스 없는 블랙박스 풀 */
|
|
47
107
|
blackBox?: boolean;
|
|
48
108
|
lanes?: IrLane[];
|
|
@@ -51,6 +111,8 @@ export interface IrNode {
|
|
|
51
111
|
id: string;
|
|
52
112
|
type: IrFlowNodeType;
|
|
53
113
|
name?: string;
|
|
114
|
+
/** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
|
|
115
|
+
names?: IrLocaleTexts;
|
|
54
116
|
/** 소속 풀 (협업 문서) */
|
|
55
117
|
participant?: string;
|
|
56
118
|
/** 소속 레인 (A-3) */
|
|
@@ -62,6 +124,11 @@ export interface IrNode {
|
|
|
62
124
|
* 잃는다(실측 = `出荷_BNKR` 의 error 경계 이벤트가 subProcess 에 붙어 탈출 간선을 낸다).
|
|
63
125
|
*/
|
|
64
126
|
attachedTo?: string;
|
|
127
|
+
/**
|
|
128
|
+
* `intermediateCatchEvent` 의 이벤트 정의 (B-87 ⓑ 부분 · 2026-09-30). **그 타입에서만 쓰고 그 타입에서는
|
|
129
|
+
* 필수다** — read 는 이 값이 있는 중간 catch 이벤트만 노드로 내고, write 는 짝이 어긋나면 거부한다.
|
|
130
|
+
*/
|
|
131
|
+
eventDefinition?: IrEventDefinition;
|
|
65
132
|
}
|
|
66
133
|
/**
|
|
67
134
|
* 조건은 게이트웨이가 아닌 플로우에 붙인다.
|
|
@@ -75,6 +142,11 @@ export interface IrSequenceFlow {
|
|
|
75
142
|
source: string;
|
|
76
143
|
target: string;
|
|
77
144
|
name?: string;
|
|
145
|
+
/**
|
|
146
|
+
* 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). 🔴 **다국어 그룹의 조건 라벨도 이것이다** — `condition.label` 은
|
|
147
|
+
* name 채널의 별칭이라(A-5) 평문 하나로는 언어를 못 싣는다. 그 그룹에서 `condition` 을 주면 거부한다.
|
|
148
|
+
*/
|
|
149
|
+
names?: IrLocaleTexts;
|
|
78
150
|
condition?: IrFlowCondition;
|
|
79
151
|
}
|
|
80
152
|
export interface IrMessageFlow {
|
|
@@ -82,10 +154,14 @@ export interface IrMessageFlow {
|
|
|
82
154
|
source: string;
|
|
83
155
|
target: string;
|
|
84
156
|
name?: string;
|
|
157
|
+
/** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
|
|
158
|
+
names?: IrLocaleTexts;
|
|
85
159
|
}
|
|
86
160
|
export interface IrDataStore {
|
|
87
161
|
id: string;
|
|
88
162
|
name?: string;
|
|
163
|
+
/** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
|
|
164
|
+
names?: IrLocaleTexts;
|
|
89
165
|
}
|
|
90
166
|
/** 데이터 입출력 연관 (노드 ↔ 데이터 스토어, 방향 = source→target) */
|
|
91
167
|
export interface IrDataAssociation {
|
|
@@ -96,7 +172,13 @@ export interface IrDataAssociation {
|
|
|
96
172
|
}
|
|
97
173
|
export interface IrTextAnnotation {
|
|
98
174
|
id: string;
|
|
99
|
-
|
|
175
|
+
/**
|
|
176
|
+
* 본문. read 는 늘 낸다(다국어 그룹이면 설계 언어 문구). write 는 이것 또는 `texts` 중 **하나**가 필수다 —
|
|
177
|
+
* 다국어 그룹은 `texts`, 기능이 꺼진 그룹은 `text`(B-4 ④ · 종전엔 늘 필수였다).
|
|
178
|
+
*/
|
|
179
|
+
text?: string;
|
|
180
|
+
/** 다국어 그룹의 본문(B-4 ④ — `IrLocaleTexts`). `text` 와 동시 지정 금지. */
|
|
181
|
+
texts?: IrLocaleTexts;
|
|
100
182
|
}
|
|
101
183
|
/** 연관선 (주석 ↔ 요소) */
|
|
102
184
|
export interface IrAssociation {
|
|
@@ -108,6 +190,8 @@ export interface IrAssociation {
|
|
|
108
190
|
export interface IrGroup {
|
|
109
191
|
id: string;
|
|
110
192
|
name?: string;
|
|
193
|
+
/** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
|
|
194
|
+
names?: IrLocaleTexts;
|
|
111
195
|
members?: string[];
|
|
112
196
|
}
|
|
113
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[];
|
|
@@ -49,6 +68,8 @@ export interface BpmnEditorController extends CommandSeam {
|
|
|
49
68
|
/**
|
|
50
69
|
* 에이전트 배치 적용 — 단일 undo 에피소드. `applied` 의 `xml` 이 호스트 영속 페이로드다
|
|
51
70
|
* (내부적으로 `saveXml()` 경로를 타므로 dirty 도 리셋된다 = "영속 진실로 내보낸 시점").
|
|
71
|
+
* 다국어 설정(`configureI18n`)이 걸려 있으면 그것이 그 문서의 문서 언어다 — op 의 문구는 `names`/`texts` 로
|
|
72
|
+
* 문서 언어 전부를 요구하고 평문은 거부된다(B-4 ④).
|
|
52
73
|
*/
|
|
53
74
|
applyAgentBatch(batch: BpmnOpBatch, currentVersion: number): Promise<ApplyBatchOutcome>;
|
|
54
75
|
/** 사용자 입력 잠금 — 에이전트 턴 시작/종료에서 호출. 프로그램 경로는 영향 없음. */
|
|
@@ -95,6 +116,16 @@ export interface BpmnEditorController extends CommandSeam {
|
|
|
95
116
|
* moddle `$type` 원본만 넘긴다.
|
|
96
117
|
*/
|
|
97
118
|
describeElement(elementId: string): ElementDescription | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* 다국어 설정(B-4 — 설계 언어 · 병기 언어). `undefined` = 기능 끔. 호스트는 그룹 설정을 넘긴다.
|
|
121
|
+
* 🔴 **컨트롤러 세션 상태다** — attach 를 넘어 유지되고 재attach 때 다시 적용된다(잠금과 같은 성격).
|
|
122
|
+
* attach 전에 불러도 된다.
|
|
123
|
+
*/
|
|
124
|
+
configureI18n(config: I18nDisplayConfig | undefined): void;
|
|
125
|
+
/** 표시 언어 전환 — 선택지 밖이면 설계 언어로. 문서를 바꾸지 않는다(dirty · 드래프트 저장 비발동). */
|
|
126
|
+
setDisplayLocale(locale: string): void;
|
|
127
|
+
/** 다국어 표시 상태 — `issues` 와 같은 시점(attach · importXml · 모든 모델 변경)에 갱신된다. */
|
|
128
|
+
readonly i18n: Readonly<Ref<BpmnI18nState | undefined>>;
|
|
98
129
|
}
|
|
99
130
|
/** `describeElement` 의 반환 — 표시 문장을 만들기 위한 최소 단서. */
|
|
100
131
|
export interface ElementDescription {
|
|
@@ -4,10 +4,16 @@ 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
|
+
*/
|
|
8
11
|
export declare const HEADLESS_BPMN_MODULES: readonly [typeof CoreModule, {
|
|
9
12
|
translate: (string | typeof import('diagram-js/lib/i18n/translate/translate').default)[];
|
|
10
|
-
}, typeof ModelingModule, typeof AutoPlaceModule
|
|
13
|
+
}, typeof ModelingModule, typeof AutoPlaceModule, {
|
|
14
|
+
__init__: string[];
|
|
15
|
+
translationCommands: (string | typeof import('..').TranslationCommands)[];
|
|
16
|
+
}];
|
|
11
17
|
export interface HeadlessBpmnModelerOptions {
|
|
12
18
|
/** 추가 모듈(호스트 확장). 기본 셋을 대체하지 않고 덧붙인다. */
|
|
13
19
|
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,12 @@ 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';
|
|
16
20
|
export * from './adapter/extensions';
|
|
17
21
|
export * from './adapter/xml';
|
|
18
22
|
export * from './headless';
|
|
19
23
|
export * from './view/validationDisplay';
|
|
24
|
+
export * from './view/i18nDisplay';
|
|
20
25
|
export { default as BpmnModelerView } from './view/BpmnModelerView.vue';
|
|
21
26
|
export { default as BpmnValidationPanel } from './view/BpmnValidationPanel.vue';
|
|
27
|
+
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;
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
type Any = any;
|
|
31
|
+
export declare class I18nDisplay {
|
|
32
|
+
private elementRegistry;
|
|
33
|
+
private canvas;
|
|
34
|
+
private textRenderer;
|
|
35
|
+
private graphicsFactory;
|
|
36
|
+
static $inject: string[];
|
|
37
|
+
private config;
|
|
38
|
+
private displayLocale;
|
|
39
|
+
constructor(eventBus: Any, elementRegistry: Any, commandStack: Any, bpmnRenderer: Any, labelEditingProvider: Any, canvas: Any, textRenderer: Any, graphicsFactory: Any);
|
|
40
|
+
/** 다국어 설정. `undefined` = 기능 끔. 표시 언어는 설계 언어로 돌아간다. */
|
|
41
|
+
configure(config: I18nDisplayConfig | undefined): void;
|
|
42
|
+
/** 표시 언어 선택지 — 설계 언어가 맨 앞. 미설정이면 빈 배열. */
|
|
43
|
+
locales(): string[];
|
|
44
|
+
/**
|
|
45
|
+
* 표시 언어 전환 — 선택지 밖은 설계 언어로(B-4 「보이는 언어 = 쓰이는 칸」: 목록 밖 화면에서 친
|
|
46
|
+
* 문구가 설계 언어 칸에 들어가는 경로를 막는다). 실제로 적용된 언어를 돌려준다.
|
|
47
|
+
* commandStack 밖이라 `commandStack.changed` 가 없다 → dirty · 드래프트 저장 비발동(C-3).
|
|
48
|
+
*/
|
|
49
|
+
setDisplayLocale(locale: string): string | undefined;
|
|
50
|
+
getDisplayLocale(): string | undefined;
|
|
51
|
+
/** 루트 `<bpmn:definitions xml:lang>` — 번역 칸으로 판정되지 않는 `name` 의 언어. */
|
|
52
|
+
rootLang(): string | undefined;
|
|
53
|
+
/** 표시 판정 — `name` 언어 = 같은 문구의 번역 칸 → 없으면 루트 `xml:lang` → 설계 언어. */
|
|
54
|
+
resolve(element: Any): I18nDisplayResolution | undefined;
|
|
55
|
+
/** 그 언어로 볼 때 미번역인 요소 수(납품 판정 = 설계 언어 미번역 0 · 확인 요청 0). */
|
|
56
|
+
untranslatedCount(locale: string): number;
|
|
57
|
+
/** 그 언어 칸에 확인 요청이 걸린 요소 수. */
|
|
58
|
+
reviewRequestedCount(locale: string): number;
|
|
59
|
+
private countStatus;
|
|
60
|
+
private withDisplayText;
|
|
61
|
+
/** 라벨 요소 폭을 표시 문구 기준으로 잠시 바꾼다. GraphicsFactory 는 drawShape **뒤에** translate 한다. */
|
|
62
|
+
private widen;
|
|
63
|
+
/**
|
|
64
|
+
* 이벤트 없이 다시 그린다. 🔴 `elements.changed` 를 쓰면 안 된다 — 임포트가 외부 라벨 요소 크기를
|
|
65
|
+
* 문구 측정값으로 보정해 두고(DI 엔 안 씀 · `BpmnImporter.addLabel`), `shape.changed` 가 나면
|
|
66
|
+
* `BpmnUpdater` 가 그 보정값을 DI 에 쓴다(upstream). 토글 한 번이 문서 전체 라벨 DI 를 고치는 셈이
|
|
67
|
+
* 된다(스파이크 F2 — 그룹 라벨 폭 36 → 31 · 흐름 라벨 22 → 20).
|
|
68
|
+
*/
|
|
69
|
+
private rerenderAll;
|
|
70
|
+
}
|
|
71
|
+
/** bpmn-js 모듈 — `BpmnModelerView` 가 붙인다. 서비스 이름 = `i18nDisplay`. */
|
|
72
|
+
export declare const I18nDisplayModule: {
|
|
73
|
+
__depends__: {
|
|
74
|
+
__init__: string[];
|
|
75
|
+
translationCommands: (string | typeof import('..').TranslationCommands)[];
|
|
76
|
+
}[];
|
|
77
|
+
__init__: string[];
|
|
78
|
+
i18nDisplay: (string | typeof I18nDisplay)[];
|
|
79
|
+
};
|
|
80
|
+
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-
|
|
4
|
+
"version": "5.0.0-beta.10",
|
|
5
5
|
"description": "Vue 3 BPMN document authoring editor (bpmn-js based) with AI agent authoring",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"vue-tsc": "^2.1.0"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
|
+
"skills:sync": "node scripts/sync-agent-skills.mjs",
|
|
51
52
|
"dev": "vite",
|
|
52
53
|
"build": "vue-tsc --noEmit && vite build",
|
|
53
54
|
"preview": "vite preview",
|