@g1cloud/bpmn-modeler-next 5.0.0-beta.66 → 5.0.0-beta.68

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.
@@ -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';
@@ -73,6 +74,15 @@ export interface BpmnEditorController extends CommandSeam {
73
74
  * 문서 언어 전부를 요구하고 평문은 거부된다(B-4 ④).
74
75
  */
75
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>;
76
86
  /** 사용자 입력 잠금 — 에이전트 턴 시작/종료에서 호출. 프로그램 경로는 영향 없음. */
77
87
  setEditable(editable: boolean): void;
78
88
  readonly editable: Readonly<Ref<boolean>>;
package/dist/index.d.ts CHANGED
@@ -14,6 +14,8 @@ 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';
@@ -23,6 +25,8 @@ export * from './adapter/xml';
23
25
  export * from './headless';
24
26
  export * from './view/validationDisplay';
25
27
  export * from './view/i18nDisplay';
28
+ export * from './view/headlessReplay';
29
+ export * from './view/modelerViewModules';
26
30
  export { default as BpmnModelerView } from './view/BpmnModelerView.vue';
27
31
  export { default as BpmnValidationPanel } from './view/BpmnValidationPanel.vue';
28
32
  export { default as BpmnDisplayLocaleSwitcher } from './view/BpmnDisplayLocaleSwitcher.vue';
@@ -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 {};
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.66",
4
+ "version": "5.0.0-beta.68",
5
5
  "description": "Vue 3 BPMN document authoring editor (bpmn-js based) with AI agent authoring",
6
6
  "type": "module",
7
7
  "files": [