@g1cloud/entity-modeler-next 5.0.0-beta.37 → 5.0.0-beta.38

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.
@@ -32,7 +32,17 @@ export declare class CommandStack {
32
32
  sealCoalesce(): void;
33
33
  get canUndo(): boolean;
34
34
  get canRedo(): boolean;
35
- /** 저장 시점 표시 — 이후 dirty 판정 기준 */
35
+ /**
36
+ * 저장 시점 표시 — 이후 dirty 판정 기준.
37
+ *
38
+ * ★저장 경계는 곧 **undo 단위 경계**여야 한다. 봉인하지 않으면 직후의 동일 `coalesceKey` 명령이
39
+ * savePoint가 가리키는 스택 top을 **슬롯째 교체**해(execute의 coalesce 분기) savePoint 객체가
40
+ * 스택에서 사라진다 — 그러면 `isDirty`가 다시 false가 될 수 없어 **영구 dirty로 고착**된다.
41
+ * 플래그 문제가 아니라 경계 문제다: 병합된 단위의 invert는 그룹 시작으로 되돌아가므로 저장 지점
42
+ * 상태 자체가 undo로 **도달 불가**해진다. 근거는 op 어댑터의 flush 봉인과 동일하다(영속 경계
43
+ * 이후 동일 키는 새 단위). op-mode에서는 `controller.markSaved`가 `adapter.flush()`로 이미
44
+ * 봉인하지만, 그건 전송 경계라는 다른 이유의 우연한 커버라 여기서 구조적으로 닫는다.
45
+ */
36
46
  markSavePoint(): void;
37
47
  /** 마지막 저장 이후 변경 여부 (undo로 저장 지점에 정확히 돌아오면 clean) */
38
48
  get isDirty(): boolean;
@@ -0,0 +1,54 @@
1
+ import { ModelId } from './types';
2
+ import { OpShape } from '../command/op';
3
+ /** 감사 대상 종류 — 논리 모델의 편집 단위. 레이아웃 축은 대상이 아니다. */
4
+ export type OpSubjectKind = 'entity' | 'attribute' | 'operation' | 'index' | 'association' | 'associationEnd' | 'group';
5
+ /** 무엇이 바뀐 대상인가. `entityRef`는 자식(속성/연산/인덱스)의 부모(이름 조회·복원 스코프). */
6
+ export interface OpSubject {
7
+ kind: OpSubjectKind;
8
+ ref: ModelId;
9
+ entityRef?: ModelId;
10
+ end?: 'end1' | 'end2';
11
+ }
12
+ /** op이 한 대상에 가하는 접촉 — 존재 변화(add/remove) 또는 내용 변경(existence 없음). */
13
+ export interface OpSubjectTouch {
14
+ subject: OpSubject;
15
+ /** 대상의 생성/삭제. 내용 변경(update)·기타는 undefined. */
16
+ existence?: 'add' | 'remove';
17
+ /** `entity.add` value에 인라인돼 태어난 자식(자기 op 없음) — 소비자가 top-level만 볼 때 거른다. */
18
+ inline?: true;
19
+ }
20
+ /** 인벤토리 한 행 — 이 kind를 감사 축이 어떻게 다루는가. */
21
+ export interface OpAuditHandling {
22
+ /** 이 op이 지목하는 대상 종류. `null`=감사 범위 밖(레이아웃 축). */
23
+ subject: OpSubjectKind | null;
24
+ /** 대상의 존재 변화 여부. */
25
+ existence: 'add' | 'remove' | null;
26
+ /** `projectFieldAudit`가 필드 변경(born/patch/tombstone)으로 투영하는가. */
27
+ fieldAudit: boolean;
28
+ /** 범위 밖이거나 예외적인 행의 근거. */
29
+ note?: string;
30
+ }
31
+ /**
32
+ * **전 op 어휘 인벤토리.** lib이 방출하는 kind는 전부 여기 있어야 한다 —
33
+ * `opSubject.coverage.test.ts`가 소스의 `kind:` 리터럴과 대조해 누락을 실패로 만든다.
34
+ * (새 어휘를 추가하면 그 테스트가 깨진다 = "조용히 무시"가 "명시적 결정"으로 바뀌는 지점.)
35
+ */
36
+ export declare const OP_AUDIT_INVENTORY: Record<string, OpAuditHandling>;
37
+ /**
38
+ * op이 건드리는 감사 대상 목록. 인벤토리에 없는(=이 lib이 모르는) kind는 빈 배열 — 발굴은
39
+ * `describeContainer`의 접두 폴백이 계속 덮는다.
40
+ *
41
+ * `entity.add`는 자신 + value에 인라인된 자식(속성/연산/인덱스)을 함께 낸다(`inline: true`).
42
+ * 인라인 자식을 볼지 여부는 소비자가 정한다 — 필드 감사가 이미 필드로 잡는 축이면 거른다.
43
+ */
44
+ export declare function describeOpSubjects(op: OpShape): OpSubjectTouch[];
45
+ /** 발굴용 top-level 소속 대상. */
46
+ export interface OpContainer {
47
+ kind: 'entity' | 'association' | 'group';
48
+ ref: ModelId;
49
+ }
50
+ /**
51
+ * op이 속한 top-level 대상(엔티티/연관/그룹). **접두 매칭**이라 같은 계열의 미지 어휘도 덮는다
52
+ * (모듈 헤더 ★ 참조 — 발굴 누락은 그 seq를 이력에서 통째로 지운다).
53
+ */
54
+ export declare function describeContainer(op: OpShape): OpContainer | null;
@@ -1,14 +1,11 @@
1
- import { ModelId } from './types';
2
1
  import { FieldAuditRecord } from './projectFieldAudit';
3
- import { EntityAuditSubjectKind } from './projectEntityAudit';
4
- export type ActionSubjectKind = EntityAuditSubjectKind | 'association' | 'associationEnd' | 'group';
5
- /** 무엇이 바뀐 대상인가. entityRef는 자식(속성/연산/인덱스) subject의 부모(이름 조회·복원 스코프). */
6
- export interface ActionSubject {
7
- kind: ActionSubjectKind;
8
- ref: ModelId;
9
- entityRef?: ModelId;
10
- end?: 'end1' | 'end2';
11
- }
2
+ import { OpSubject, OpSubjectKind } from './opSubject';
3
+ export type ActionSubjectKind = OpSubjectKind;
4
+ /**
5
+ * 무엇이 바뀐 대상인가. entityRef는 자식(속성/연산/인덱스) subject의 부모(이름 조회·복원 스코프).
6
+ * 정의는 `opSubject`(어휘 해석 단일 출처)가 갖고 여기선 공개 이름만 유지한다.
7
+ */
8
+ export type ActionSubject = OpSubject;
12
9
  /** 한 대상의 한 필드 변경(old→new / tombstone). */
13
10
  export interface ActionFieldChange {
14
11
  field: string;
@@ -49,9 +49,6 @@ export interface ResolvedDiagram {
49
49
  notes: ResolvedNote[];
50
50
  /** 노트 → 대상 엔티티 연결선 (대상이 존재하는 것만; dangling은 prune) */
51
51
  noteConnections: ResolvedNoteConnection[];
52
- /** 레이아웃에만 있던(논리에 없는) 정리 대상 항목 */
53
- prunedEntityRefs: ModelId[];
54
- prunedAssociationRefs: ModelId[];
55
52
  }
56
53
  export interface AutoLayoutOptions {
57
54
  startX: number;