@g1cloud/entity-modeler-next 5.2.39 → 5.2.41
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.
- package/dist/command/commands.d.ts +12 -0
- package/dist/editor/commandPlans.d.ts +31 -0
- package/dist/entity-modeler.js +4770 -4710
- package/dist/entity-modeler.umd.cjs +19 -19
- package/package.json +3 -2
|
@@ -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: {
|
|
@@ -70,6 +70,15 @@ export declare function withEntityAttributes(logical: LogicalModel, entityId: Mo
|
|
|
70
70
|
* 트리거를 한 곳에만 두면 되고, 서브명령이 같은 composite에 실려 **undo가 원자적**이다.
|
|
71
71
|
*/
|
|
72
72
|
export declare function cascadeCommands(futureLogical: LogicalModel, parentId: ModelId, removed: RemovedAttributes): Command[];
|
|
73
|
+
/**
|
|
74
|
+
* FK 전파 **단독** — 임베드 슬롯 보충을 «다른 시점»에 계산해야 하는 호출자용.
|
|
75
|
+
*
|
|
76
|
+
* ★필요해진 이유: remove+add 합성 조작(`convertAttributeType`)은 전파를 «삭제 후» 모델로, 보충을
|
|
77
|
+
* «추가 후» 모델로 재야 한다. 둘을 묶어 두면 한쪽이 반드시 틀린 시점을 본다. ⚠️**둘 다 부르면 같은
|
|
78
|
+
* 슬롯 배열을 두 커맨드가 겨냥한다** — 최종 결과는 나중 것이 이겨 맞지만, 같은 배열을 여러 op 가
|
|
79
|
+
* 겨냥하는 형태는 이 리포가 호스트 500 으로 대가를 치른 자리다(`op-interpreter-pull-merge-asymmetry`).
|
|
80
|
+
*/
|
|
81
|
+
export declare function propagationCommands(futureLogical: LogicalModel, parentId: ModelId, removed: RemovedAttributes): Command[];
|
|
73
82
|
/**
|
|
74
83
|
* 임베더블 속성 재정렬이 사용처 슬롯으로 번지는 서브명령(`core/embedSlots.planEmbedSlotReorder`).
|
|
75
84
|
* 재정렬 커맨드와 **같은 composite**에 실어 undo가 원자적이게 한다(보충이 `cascadeCommands`에 실리는
|
|
@@ -90,6 +99,28 @@ export declare function embedSlotReorderCommands(logical: LogicalModel, entityId
|
|
|
90
99
|
* `logical`은 삭제 **전** 상태여야 한다(인덱스 정리 `indexCleanupCommands`와 같은 계약).
|
|
91
100
|
*/
|
|
92
101
|
export declare function embedSlotRemovalCommands(logical: LogicalModel, entityId: ModelId, removedAttributeIds: readonly ModelId[]): Command[];
|
|
102
|
+
/**
|
|
103
|
+
* 위와 같은 계획 + **적용 후 모델**. 삭제 전파 «뒤에» 다른 슬롯 계획기를 이어 붙일 때 필요하다.
|
|
104
|
+
*
|
|
105
|
+
* ⚠️★**투영 없이 이어 붙이면 방금 지운 슬롯이 되살아난다** — 슬롯 계획기들은 patch 가 아니라 **전체
|
|
106
|
+
* `dbAttrs` 배열**을 내므로, 삭제 «전» 모델로 계산한 보충 명령이 나중에 적용되면 삭제분을 포함한
|
|
107
|
+
* 배열로 통째 덮어쓴다. 그래서 이어 붙이는 쪽은 커맨드가 아니라 **모델**을 받아야 한다.
|
|
108
|
+
*/
|
|
109
|
+
export declare function embedSlotRemovalPlan(logical: LogicalModel, entityId: ModelId, removedAttributeIds: readonly ModelId[]): {
|
|
110
|
+
commands: Command[];
|
|
111
|
+
projected: LogicalModel;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* 임베더블 **컬럼 성장** 보충만 떼어낸 서브명령(`cascadeCommands` 와 같은 계획기·같은 계약).
|
|
115
|
+
*
|
|
116
|
+
* ★★**왜 따로 필요한가 — `cascadeCommands` 는 «삭제 후» 모델을 받는다.** remove+add 로 합성되는 조작
|
|
117
|
+
* (`convertAttributeType` = 속성 타입 전환)에서는 그 시점의 선언이 «추가 전»이라 보충이 **원리적으로
|
|
118
|
+
* 발동할 수 없고**(선언 컬럼 수 ≤ 사용처 슬롯 수), 결과적으로 사용처가 미정렬로 남아 **owner DDL 에서
|
|
119
|
+
* 그 컬럼들이 사라진다**(실측: 1→2컬럼 전환 후 `amount`·`currency` 2컬럼 소실 · 다음 임베더블 편집이
|
|
120
|
+
* 우연히 치유). ⇒ **계획 판정 기준은 «계획 적용 후» 상태**(`(기존−remove)∪add`)여야 한다 — 이 리포가
|
|
121
|
+
* FK 전파에서 두 번 대가를 치른 그 축의 세 번째 사본이다.
|
|
122
|
+
*/
|
|
123
|
+
export declare function embedSlotFillCommands(logical: LogicalModel, embeddableRef: ModelId): Command[];
|
|
93
124
|
/**
|
|
94
125
|
* "자식의 FK 집합이 직접 바뀌는" 트리거(관계 삭제·identifying 토글)용 연쇄 서브명령.
|
|
95
126
|
* 1) seed 자식을 직접 reconcile(FK 증감/플립), 2) 그 변화를 적용한 상태로 후손 cascade.
|