@g1cloud/bpmn-modeler-next 5.0.0-alpha.80 → 5.0.0-alpha.81

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.
@@ -2,6 +2,25 @@ 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 { GeometryFinding } from '../agent/geometryAudit';
6
+ import { SemanticIssue } from '../agent/semanticAudit';
7
+ /**
8
+ * 판정 2종의 **현재 캔버스 결과** — 하단 검증 패널(B-103 ⓑ · B-105 ⓑ)의 단일 출처.
9
+ *
10
+ * 🔴 **두 축을 합치지 않고 원형 그대로 낸다.** 형태가 다르고(`GeometryFinding{kind}` ↔
11
+ * `SemanticIssue{ruleId,severity}`) 심각도 축도 한쪽에만 있다 — 합치려면 매핑이 필요한데
12
+ * 그 매핑은 **표시 결정**이라 뷰 계층 소유다(`view/validationDisplay`). 컨트롤러가 합치면
13
+ * 표시 어휘가 문서 상태 계층으로 새고, 배치 응답 계약(`ApplyBpmnOpsResult.findings`)과도
14
+ * 형태가 갈린다.
15
+ *
16
+ * ⚠ **배치 응답 `findings` 와 지위가 다르다** — 그쪽은 *"이 배치가 새로 만든 것"* 만 내고,
17
+ * 이쪽은 **그 문서에 있는 전부**(선재 포함)다. 패널의 수신자는 사람이고, 사람이 고칠 것에는
18
+ * 자기가 물려받은 base 의 결함이 포함된다(B-103 실측: 고립 노드 17건이 **전부** base 유래).
19
+ */
20
+ export interface BpmnDocumentIssues {
21
+ geometry: GeometryFinding[];
22
+ semantic: SemanticIssue[];
23
+ }
5
24
  export interface ImportXmlResult {
6
25
  /** import 경고(표시용 메시지) — 수용 기준상 실운영 문서는 빈 배열이어야 한다. */
7
26
  warnings: string[];
@@ -37,6 +56,35 @@ export interface BpmnEditorController extends CommandSeam {
37
56
  readonly editable: Readonly<Ref<boolean>>;
38
57
  /** 배치 적용이 진행 중인 구간 — 호스트 UI 의 "AI 반영 중" 표시용. */
39
58
  readonly agentBusy: Readonly<Ref<boolean>>;
59
+ /**
60
+ * 현재 캔버스의 판정 결과 — `attach`·`importXml`·모든 모델 변경 뒤 자동 갱신된다.
61
+ * 🔴 **`editable` 과 무관하게 유지된다** — 조회 전용이어도 경고는 보여야 고친다(시블링 원칙).
62
+ */
63
+ readonly issues: Readonly<Ref<BpmnDocumentIssues>>;
64
+ /** 수동 재판정 — 자동 트리거(커맨드·임포트) 밖에서 상태를 다시 읽어야 할 때. */
65
+ revalidate(): void;
66
+ /**
67
+ * 요소를 화면 중앙으로 끌어오고 선택한다 — 패널 항목 클릭의 착지점.
68
+ * 없는 id(이미 지워진 요소)는 **조용히 무시**한다: 패널은 판정 시점의 스냅샷이라
69
+ * 그 사이 사라질 수 있고, 그것이 예외로 올라오면 클릭 한 번이 화면을 깬다.
70
+ */
71
+ requestFocus(elementId: string): void;
72
+ /**
73
+ * 요소를 사람이 읽을 말로 바꾸기 위한 단서 — 패널이 판정 결과의 id 를 문장으로 풀 때 쓴다.
74
+ *
75
+ * 🔴 **이름만으로는 부족하다** — 실문서(표본 73 base)에서 겹친 두 요소가 **둘 다 무명**이라
76
+ * "이름 없는 요소와 이름 없는 요소가 겹칩니다"가 나왔다(실측 2건). 종류가 함께 와야 문장이
77
+ * 갈린다("게이트웨이와 주석이 겹칩니다"). 종류 **어휘**는 표시 결정이라 뷰가 소유하고, 여기서는
78
+ * moddle `$type` 원본만 넘긴다.
79
+ */
80
+ describeElement(elementId: string): ElementDescription | undefined;
81
+ }
82
+ /** `describeElement` 의 반환 — 표시 문장을 만들기 위한 최소 단서. */
83
+ export interface ElementDescription {
84
+ /** 사람이 붙인 이름. 주석은 `name` 이 아니라 `text` 를 쓰므로 둘을 한 자리로 접는다. */
85
+ name?: string;
86
+ /** moddle 타입 리터럴(`bpmn:ExclusiveGateway` 등). 종류 명사로의 번역은 소비측 몫이다. */
87
+ type: string;
40
88
  }
41
89
  export declare const EDITOR: InjectionKey<BpmnEditorController>;
42
90
  export declare function createBpmnEditorController(): BpmnEditorController;
package/dist/index.d.ts CHANGED
@@ -8,10 +8,13 @@ export * from './agent/schema';
8
8
  export * from './agent/resolver';
9
9
  export * from './agent/describeProcess';
10
10
  export * from './agent/geometryAudit';
11
+ export * from './agent/semanticAudit';
11
12
  export * from './agent/agentBatch';
12
13
  export * from './editor/controller';
13
14
  export * from './adapter/i18n';
14
15
  export * from './adapter/extensions';
15
16
  export * from './adapter/xml';
16
17
  export * from './headless';
18
+ export * from './view/validationDisplay';
17
19
  export { default as BpmnModelerView } from './view/BpmnModelerView.vue';
20
+ export { default as BpmnValidationPanel } from './view/BpmnValidationPanel.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,25 @@
1
+ import { BpmnDocumentIssues, ElementDescription } from '../editor/controller';
2
+ import { IssueSeverity } from '../agent/semanticAudit';
3
+ /** 요소 id → 표시 단서. 없으면 `undefined`(이미 지워진 요소). `controller.describeElement` 를 받는다. */
4
+ export type ElementDescriber = (elementId: string) => ElementDescription | undefined;
5
+ export interface PanelIssue {
6
+ /** 목록 키 겸 중복 판별 — 기하는 `geometryFindingKey`(배치 diff 와 같은 키), 의미론은 규칙+대상. */
7
+ key: string;
8
+ source: 'geometry' | 'semantic';
9
+ /** 원 코드(`kind` 또는 `ruleId`) — 툴팁으로 보존한다(사용자에겐 분류 라벨만 보인다). */
10
+ code: string;
11
+ severity: IssueSeverity;
12
+ /** 포커스 대상 — 첫 항목이 주 대상이다. 빈 배열이면 클릭 불가(문서 전체 이슈). */
13
+ targetRefs: string[];
14
+ category: string;
15
+ message: string;
16
+ }
17
+ /** 정렬 우선순위 — 심각도 순. 같은 심각도 안에서는 판정이 낸 순서를 유지한다(문서 순). */
18
+ export declare const SEVERITY_ORDER: Record<IssueSeverity, number>;
19
+ /**
20
+ * 판정 2종 → 패널 항목. 순수 함수 — `describe` 주입으로 캔버스 의존을 밖에 둔다(테스트 가능).
21
+ * 기하가 앞, 의미론이 뒤이지만 패널이 심각도로 다시 정렬하므로 순서 자체는 계약이 아니다.
22
+ */
23
+ export declare function toPanelIssues(issues: BpmnDocumentIssues, describe: ElementDescriber): PanelIssue[];
24
+ /** 심각도별 건수 — 패널 헤더의 카운트 바(접힘 상태에서도 상시 보인다). */
25
+ export declare function countBySeverity(issues: readonly PanelIssue[]): Record<IssueSeverity, number>;
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-alpha.80",
4
+ "version": "5.0.0-alpha.81",
5
5
  "description": "Vue 3 BPMN document authoring editor (bpmn-js based) with AI agent authoring",
6
6
  "type": "module",
7
7
  "files": [