@g1cloud/bpmn-modeler-next 5.0.0-beta.7 → 5.0.0-beta.8

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.
@@ -0,0 +1,64 @@
1
+ type Any = any;
2
+ /** 문자 체계 — 판정에 쓰는 것은 한글 · 가나뿐이다. */
3
+ export type ScriptKind = 'hangul' | 'kana' | 'mixed' | 'han' | 'other';
4
+ export interface ScriptInference {
5
+ script: ScriptKind;
6
+ /** 문자 체계로 정해지는 언어 — 한글 = ko · 가나 = ja · 그 밖 = 없음. */
7
+ locale?: 'ko' | 'ja';
8
+ }
9
+ /** 문구의 문자 체계 판정. 한글과 가나가 함께 있으면 `mixed`(판정 불가). */
10
+ export declare function inferScriptLocale(text: string): ScriptInference;
11
+ /**
12
+ * 루트 판정의 근거.
13
+ * `kept` 이미 있다 · `matched` 번역 칸과 같은 이름들의 공통 언어 · `script` 문자 체계가 한 언어로 모인다 ·
14
+ * `ambiguous` 공통 언어가 여럿이고 문자 체계로도 못 고른다 · `mixed` 근거가 서로 다른 언어 · `no-evidence` 근거 없음
15
+ */
16
+ export type RootLocaleReason = 'kept' | 'matched' | 'script' | 'ambiguous' | 'mixed' | 'no-evidence';
17
+ /** 계획 항목이 가리키는 요소 — 미리보기 화면이 사람에게 보여 줄 최소 정보. */
18
+ export interface LocaleBackfillElement {
19
+ id: string;
20
+ /** moddle 타입(`bpmn:Task` 등). */
21
+ type: string;
22
+ /** 계획 시점의 라벨 문구. 적용은 이 문구가 그대로일 때만 쓴다. */
23
+ name: string;
24
+ }
25
+ export interface LocaleBackfillPlan {
26
+ root: {
27
+ /** 지금 루트 `xml:lang`. */
28
+ current?: string;
29
+ /** 새로 쓸 값 — `current` 가 있거나 판정 불가면 없다. */
30
+ proposed?: string;
31
+ reason: RootLocaleReason;
32
+ };
33
+ /** 더할 번역 칸(본문 = 그 요소의 `name`). */
34
+ additions: Array<LocaleBackfillElement & {
35
+ locale: string;
36
+ }>;
37
+ /** 언어 기록이 없고 문자 체계로도 못 가르는 이름 — 루트를 따른다 · 사람 확인 대상. */
38
+ undecided: Array<LocaleBackfillElement & {
39
+ script: ScriptKind;
40
+ }>;
41
+ /** 이름이 언어 있는 칸 어느 것과도 다르다(칸은 있다) — 백필 대상 아님(별도 정리). */
42
+ drift: LocaleBackfillElement[];
43
+ /**
44
+ * 이름이 언어 있는 칸과 같은 요소의 분포 — 키 = 일치한 로케일(정렬 · `+` 연결, 예 `ja` · `ja+ko`).
45
+ * 루트 판정의 근거이고, 판정 불가 문서에서 사람이 루트를 고를 근거다.
46
+ */
47
+ matchedBy: Record<string, number>;
48
+ /**
49
+ * 칸 언어 ↔ 문자 체계 불일치(레거시 복사본 번역 흔적 · F8) — **기록 대상 아님**(별도 정리).
50
+ * `script` = `kana` · `hangul` 은 그 칸 언어가 아닌 문자 · `han` 은 ko 칸이 한자만이고 다른 칸과 같은 문구(참고값 · 사람 판단).
51
+ */
52
+ scriptMismatch: Array<LocaleBackfillElement & {
53
+ locale: string;
54
+ script: ScriptKind;
55
+ }>;
56
+ }
57
+ /** 언어 백필 계획 — 문서를 바꾸지 않는다. */
58
+ export declare function planLocaleBackfill(definitions: Any): LocaleBackfillPlan;
59
+ /**
60
+ * 계획을 문서에 쓴다 — 바꾼 곳 수를 돌려준다. **멱등**이고 계획 뒤 문서가 바뀌었어도 덮지 않는다:
61
+ * 루트가 이미 있으면 루트를 건너뛰고, 요소는 지금도 「언어 기록 없음 + 이름이 계획 때 그대로」일 때만 쓴다.
62
+ */
63
+ export declare function applyLocaleBackfill(definitions: Any, plan: LocaleBackfillPlan): number;
64
+ export {};