@g1cloud/entity-modeler-next 5.2.40 → 5.2.42

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.
@@ -97,6 +97,18 @@ export declare function translateWaypoints(assocId: ModelId, dx: number, dy: num
97
97
  export declare function clearWaypoints(assocId: ModelId): Command;
98
98
  export declare function addWaypoint(assocId: ModelId, index: number, point: Point): Command;
99
99
  export declare function addNote(note: Note): Command;
100
+ /**
101
+ * 노트 삭제.
102
+ *
103
+ * ★**노트 축의 필드는 «둘»이다** — `layout.notes` 와 그 노트를 든 `GroupLayout.memberNoteRefs`.
104
+ * 종전엔 앞엣것만 지워 그룹에 **죽은 노트 ref** 가 남았다(2026-09-10 프로덕션 실측: 전수 81 중 고아 1 —
105
+ * 사용자가 방금 지운 그 노트였다). 설계 불변식 *「축이 사라지면 그 축의 «모든» 필드를 함께 정리한다」* 의
106
+ * 위반이고, 반대 방향(`removeGroup`)은 groupLayout 을 통째로 지워 고아가 안 생겨 **한쪽만 비대칭**이었다.
107
+ * ⚠️무신호였다 — `validation.ts` 에 `memberNoteRefs` 를 보는 규칙이 없고, 유일한 소비처
108
+ * (`resolve.ts` 의 groupOfNote 맵)는 죽은 키를 조용히 무시해 렌더에도 안 나타난다.
109
+ *
110
+ * cascade 는 `removeEntity` 와 같은 관용구다 — apply 가 계산한 memento 를 emitOps 가 그대로 op 으로 낸다.
111
+ */
100
112
  export declare function removeNote(noteId: ModelId): Command;
101
113
  export declare function moveNote(noteId: ModelId, location: Point): Command;
102
114
  export declare function resizeNote(noteId: ModelId, size: {
@@ -1,7 +1,14 @@
1
1
  import { ModelId } from './types';
2
2
  import { OpShape } from '../command/op';
3
- /** 감사 대상 종류 — 논리 모델의 편집 단위. 레이아웃 축은 대상이 아니다. */
4
- export type OpSubjectKind = 'entity' | 'attribute' | 'operation' | 'index' | 'association' | 'associationEnd' | 'group';
3
+ /**
4
+ * 감사 대상 종류 — 논리 모델의 편집 단위 + **노트**.
5
+ *
6
+ * ★노트만 예외적으로 `layout` 에 사는데 감사 대상이다(2026-09-10 결정) — 노트는 *설계 의도*를 담는
7
+ * 편집 산출물이고, 그것이 언제 사라졌는지 못 보면 이미 동작하는 시점 복원에서 **어느 seq 로 돌릴지
8
+ * 고를 근거가 없다**. 편입 축은 존재·메모·연결 셋뿐이고 기하·스타일은 여전히 범위 밖이다(캔버스에서
9
+ * 가장 자주 바뀌어 이력을 덮는다).
10
+ */
11
+ export type OpSubjectKind = 'entity' | 'attribute' | 'operation' | 'index' | 'association' | 'associationEnd' | 'group' | 'note';
5
12
  /** 무엇이 바뀐 대상인가. `entityRef`는 자식(속성/연산/인덱스)의 부모(이름 조회·복원 스코프). */
6
13
  export interface OpSubject {
7
14
  kind: OpSubjectKind;
@@ -44,7 +51,7 @@ export declare const OP_AUDIT_INVENTORY: Record<string, OpAuditHandling>;
44
51
  export declare function describeOpSubjects(op: OpShape): OpSubjectTouch[];
45
52
  /** 발굴용 top-level 소속 대상. */
46
53
  export interface OpContainer {
47
- kind: 'entity' | 'association' | 'group';
54
+ kind: 'entity' | 'association' | 'group' | 'note';
48
55
  ref: ModelId;
49
56
  }
50
57
  /**
@@ -34,6 +34,7 @@ export interface FieldAuditTarget {
34
34
  indexRef?: ModelId;
35
35
  associationRef?: ModelId;
36
36
  groupRef?: ModelId;
37
+ noteRef?: ModelId;
37
38
  end?: 'end1' | 'end2';
38
39
  /** 단일 필드로 좁힘(생략 시 전 필드). */
39
40
  field?: string;