@aivex/ui 1.2.0-dev.4 → 1.2.0-dev.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/README.md +68 -0
- package/dist/{Button-CzqDPqUT.js → Button-BrPqDGyO.js} +1502 -3115
- package/dist/Button-BrPqDGyO.js.map +1 -0
- package/dist/Button-EEErevS-.cjs +2 -0
- package/dist/Button-EEErevS-.cjs.map +1 -0
- package/dist/IconButton-CK4en7H6.js +209 -0
- package/dist/IconButton-CK4en7H6.js.map +1 -0
- package/dist/IconButton-DBlsEy3m.cjs +2 -0
- package/dist/IconButton-DBlsEy3m.cjs.map +1 -0
- package/dist/comment.cjs +3 -113
- package/dist/comment.cjs.map +1 -1
- package/dist/comment.js +153 -13491
- package/dist/comment.js.map +1 -1
- package/dist/components/Badge/Badge.d.ts +8 -1
- package/dist/components/Calendar/Calendar.d.ts +38 -0
- package/dist/components/Calendar/Calendar.test.d.ts +1 -0
- package/dist/components/{DatePicker → Calendar}/date.d.ts +4 -3
- package/dist/components/Calendar/date.test.d.ts +1 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Comment/CommentInput.d.ts +6 -1
- package/dist/components/DataGrid/DataGrid.d.ts +38 -71
- package/dist/components/DataGrid/DataGridColumnSettings.d.ts +18 -0
- package/dist/components/DataGrid/DataGridPrimitives.d.ts +79 -0
- package/dist/components/DataGrid/DataGridRows.d.ts +66 -0
- package/dist/components/DataGrid/index.d.ts +6 -2
- package/dist/components/DraggableScroll/DraggableScroll.d.ts +6 -1
- package/dist/components/Drawer/Drawer.d.ts +35 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Icon/index.d.ts +6 -1
- package/dist/components/InputBase/InputBase.d.ts +5 -7
- package/dist/components/Modal/Modal.d.ts +9 -2
- package/dist/components/Modal/ModalBase.d.ts +33 -0
- package/dist/components/Modal/index.d.ts +3 -1
- package/dist/components/ScrollArea/ScrollArea.d.ts +5 -1
- package/dist/components/SelectBox/SelectBox.d.ts +7 -4
- package/dist/components/SelectButton/SelectButton.d.ts +18 -0
- package/dist/components/SelectButton/index.d.ts +2 -0
- package/dist/components/ShapeEditor/ShapeEditor.d.ts +1 -1
- package/dist/components/ShapeEditor/ShapeViewer.d.ts +5 -5
- package/dist/components/ShapeEditor/_components/ImageStateOverlay.d.ts +8 -3
- package/dist/components/ShapeEditor/_components/Minimap.d.ts +13 -11
- package/dist/components/ShapeEditor/_components/MinimapShape.d.ts +2 -2
- package/dist/components/ShapeEditor/_components/SelectionInfo.d.ts +2 -0
- package/dist/components/ShapeEditor/_components/SettingsPanel.d.ts +18 -3
- package/dist/components/ShapeEditor/_constants.d.ts +7 -4
- package/dist/components/ShapeEditor/_model/clipboard.d.ts +22 -0
- package/dist/components/ShapeEditor/_model/clipboard.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_model/cursors.d.ts +5 -0
- package/dist/components/ShapeEditor/_model/cursors.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_model/geometry.d.ts +33 -1
- package/dist/components/ShapeEditor/_model/geometry.evenodd-audit.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_model/geometry.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_model/imageDiagnosis.d.ts +23 -0
- package/dist/components/ShapeEditor/_model/imageDiagnosis.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_model/imageLoad.d.ts +28 -0
- package/dist/components/ShapeEditor/_model/imageLoad.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_model/keymap.d.ts +1 -1
- package/dist/components/ShapeEditor/_model/overlays.d.ts +9 -19
- package/dist/components/ShapeEditor/_model/props.d.ts +100 -33
- package/dist/components/ShapeEditor/_model/strings.d.ts +7 -3
- package/dist/components/ShapeEditor/_model/viewSettings.d.ts +45 -1
- package/dist/components/ShapeEditor/_model/viewSettings.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_model/viewerPatch.d.ts +60 -0
- package/dist/components/ShapeEditor/_model/viewerPatch.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_renderers/KonvaRenderer.d.ts +23 -3
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.d.ts +30 -5
- package/dist/components/ShapeEditor/_renderers/transformSession.d.ts +1 -1
- package/dist/components/ShapeEditor/_renderers/types.d.ts +52 -16
- package/dist/components/ShapeEditor/_state/createInteractionController.d.ts +8 -2
- package/dist/components/ShapeEditor/_state/createInteractionController.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.d.ts +4 -4
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.d.ts +52 -10
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_state/useSelectionActions.d.ts +7 -6
- package/dist/components/ShapeEditor/index.d.ts +3 -2
- package/dist/components/Spinner/Spinner.d.ts +15 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts +2 -1
- package/dist/components/Tagbox/Tagbox.d.ts +1 -4
- package/dist/components/Textarea/Textarea.d.ts +7 -4
- package/dist/components/Textbox/Textbox.d.ts +1 -5
- package/dist/components/Toast/Toast.d.ts +13 -3
- package/dist/components/Toast/index.d.ts +1 -1
- package/dist/index.cjs +1 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +2913 -7061
- package/dist/index.js.map +1 -1
- package/dist/keyboard-BMCakKCv.js +398 -0
- package/dist/keyboard-BMCakKCv.js.map +1 -0
- package/dist/keyboard-DCewgvMV.cjs +2 -0
- package/dist/keyboard-DCewgvMV.cjs.map +1 -0
- package/dist/shape-editor.cjs +1 -1
- package/dist/shape-editor.cjs.map +1 -1
- package/dist/shape-editor.js +3367 -2270
- package/dist/shape-editor.js.map +1 -1
- package/dist/styles.css +3 -2
- package/dist/tokens/tokens.css +613 -611
- package/dist/utils/keyboard.d.ts +3 -0
- package/dist/utils/useModalAutoFocus.d.ts +5 -0
- package/dist/utils.cjs +2 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.js +59 -0
- package/dist/utils.js.map +1 -0
- package/package.json +26 -14
- package/dist/Button-C_GP2mJ-.cjs +0 -2
- package/dist/Button-C_GP2mJ-.cjs.map +0 -1
- package/dist/Button-CzqDPqUT.js.map +0 -1
- package/dist/IconButton-B-MspnYP.cjs +0 -2
- package/dist/IconButton-B-MspnYP.cjs.map +0 -1
- package/dist/IconButton-DTGSfJme.js +0 -560
- package/dist/IconButton-DTGSfJme.js.map +0 -1
- package/dist/Switch-B2irM7Pp.js +0 -2656
- package/dist/Switch-B2irM7Pp.js.map +0 -1
- package/dist/Switch-CMKBdqkX.cjs +0 -42
- package/dist/Switch-CMKBdqkX.cjs.map +0 -1
- package/dist/components/DatePicker/Calendar.d.ts +0 -27
- package/dist/components/DatePicker/DatePicker.d.ts +0 -119
- package/dist/components/DatePicker/index.d.ts +0 -4
- package/dist/components/ShapeEditor/_model/imageFetch.d.ts +0 -9
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ReactNode, Ref } from "react";
|
|
2
|
+
import type { ViewSettingItemKey } from "../_components/SettingsPanel";
|
|
2
3
|
import type { EditorShape, Point, ShapeInteraction, ShapeStyle, Viewport } from "./geometry";
|
|
4
|
+
import type { EditorImageDiagnosis } from "./imageDiagnosis";
|
|
3
5
|
import type { EditorAction, KeymapOverrides } from "./keymap";
|
|
4
|
-
import type {
|
|
6
|
+
import type { PolygonArea, RectArea, RegionMask, RegionOutlineStyle } from "./overlays";
|
|
5
7
|
import type { EditorStringsOverride } from "./strings";
|
|
6
8
|
import type { BrushScalarMode, Tool } from "./tools";
|
|
7
9
|
import type { ViewSettings } from "./viewSettings";
|
|
@@ -44,12 +46,14 @@ export type ContextMenuItem = {
|
|
|
44
46
|
separator: true;
|
|
45
47
|
};
|
|
46
48
|
export interface EditorPointerEvent {
|
|
49
|
+
pointerId?: number;
|
|
47
50
|
button?: number;
|
|
48
51
|
shiftKey?: boolean;
|
|
49
52
|
altKey?: boolean;
|
|
50
53
|
ctrlKey?: boolean;
|
|
51
54
|
metaKey?: boolean;
|
|
52
55
|
global?: Point;
|
|
56
|
+
insideCanvas?: boolean;
|
|
53
57
|
}
|
|
54
58
|
export interface EditorCanvasViewport {
|
|
55
59
|
scale: number;
|
|
@@ -124,25 +128,68 @@ export interface EditorAssistant {
|
|
|
124
128
|
*/
|
|
125
129
|
rectResult?: "rect" | "rotatedRect";
|
|
126
130
|
}
|
|
127
|
-
|
|
131
|
+
/** 편집 문서(시드 계약). id 변경=문서 전환, 같은 id의 URL 변경=화질 스왑. */
|
|
132
|
+
export interface ShapeEditorDocument<TMeta = unknown> {
|
|
133
|
+
/**
|
|
134
|
+
* 문서 identity — 전환/스왑 판정의 유일한 기준. URL은 identity가 아니다
|
|
135
|
+
* (다른 문서가 같은 URL을, 같은 문서가 다른 URL을 가질 수 있음).
|
|
136
|
+
*/
|
|
137
|
+
id: string;
|
|
138
|
+
/** 시드 이미지 URL. 빈 값 = 이미지 없는 문서(도형은 시드, 표시는 이미지 로드까지 보류). */
|
|
128
139
|
imageUrl: string;
|
|
129
140
|
/**
|
|
130
|
-
* 실제로 렌더할
|
|
131
|
-
* imageUrl
|
|
132
|
-
* 리셋되지 않는다(저해상↔고해상 토글). **imageUrl과 같은 픽셀 크기여야 한다.**
|
|
141
|
+
* 실제로 렌더할 URL(화질 스왑). 바꿔도 문서는 리셋되지 않는다.
|
|
142
|
+
* imageUrl과 픽셀 크기가 다르면 coordinateSize로 좌표계를 고정할 것.
|
|
133
143
|
*/
|
|
134
144
|
displayImageUrl?: string;
|
|
145
|
+
/**
|
|
146
|
+
* 도형 좌표계 크기(원본 픽셀). 지정하면 표시 이미지(썸네일 등)를 이 크기로 늘려
|
|
147
|
+
* 그린다 — 이미지 파일 크기와 좌표계가 다를 때(ShapeViewer coordinateSize와 동일
|
|
148
|
+
* 의미). displayImageUrl과 함께 쓰면 화질 변형 간 픽셀 크기가 달라도 좌표계가
|
|
149
|
+
* 고정된다. 미지정 시 로드된 이미지의 실제 픽셀 크기.
|
|
150
|
+
*
|
|
151
|
+
* imageSize: 좌표공간 안에서 이미지가 차지하는 크기(원점 기준). 이미지가
|
|
152
|
+
* 좌표공간의 일부만 덮는 경우에 지정 — 예: 여러 해상도가 원점을 공유하는
|
|
153
|
+
* 좌표계에서 좌표공간은 최대 해상도, 이미지는 선택 해상도. 미지정 시
|
|
154
|
+
* 좌표공간 전체로 늘려 그린다.
|
|
155
|
+
*/
|
|
156
|
+
coordinateSize?: {
|
|
157
|
+
width: number;
|
|
158
|
+
height: number;
|
|
159
|
+
imageSize?: {
|
|
160
|
+
width: number;
|
|
161
|
+
height: number;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
/** 초기 도형(시드). 이후 문서는 에디터가 소유. */
|
|
165
|
+
initialShapes?: EditorShape<TMeta>[];
|
|
166
|
+
/**
|
|
167
|
+
* 시드 시 1회 적용할 초기 선택(도형 id) — 이후 선택은 에디터 소유라 같은
|
|
168
|
+
* 문서에서 값·데이터가 바뀌어도 되돌리지 않는다. 없는 id는 걸러진다.
|
|
169
|
+
*/
|
|
170
|
+
initialSelectedIds?: string[];
|
|
171
|
+
}
|
|
172
|
+
/** 미니맵 패널이 붙는 뷰어 모서리. */
|
|
173
|
+
export type MinimapPosition = "bottom-left" | "bottom-right" | "top-left" | "top-right";
|
|
174
|
+
export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
175
|
+
/** 편집 문서(시드 계약). null = 문서 없음(시드 대기) — 센티널 값 대신 null로. */
|
|
176
|
+
document: ShapeEditorDocument<TMeta> | null;
|
|
177
|
+
/**
|
|
178
|
+
* 시스템 클립보드 공유 범위. 같은 값의 에디터끼리만 도형을 붙여넣을 수 있다.
|
|
179
|
+
* 프로젝트처럼 meta의 의미가 같은 범위의 안정적인 식별자를 전달한다.
|
|
180
|
+
* 미지정 시 현재 문서(identity) 안에서만 공유한다.
|
|
181
|
+
*/
|
|
182
|
+
clipboardScope?: string;
|
|
135
183
|
/**
|
|
136
184
|
* 이미지 로딩/에러 상태 오버레이 커스텀. 미지정 시 기본 스피너/에러 메시지.
|
|
185
|
+
* error일 때 diagnosis에 원인 분류·기술 근거가 실린다(진단 실패 시 null).
|
|
137
186
|
*/
|
|
138
|
-
renderImageState?: (status: "loading" | "error") => ReactNode;
|
|
187
|
+
renderImageState?: (status: "loading" | "error" | "missing", diagnosis?: EditorImageDiagnosis | null) => ReactNode;
|
|
139
188
|
/**
|
|
140
189
|
* true면 이미지를 반투명 검정으로 덮는다(레이블은 위에 밝게). 도메인 무관 —
|
|
141
190
|
* 호스트가 "라벨링 완료/잠금" 등 상태에서 켠다(기존 Editor의 isLabelingCompleted 딤).
|
|
142
191
|
*/
|
|
143
192
|
dimmed?: boolean;
|
|
144
|
-
/** 초기 도형(시드). 이후 문서는 에디터가 소유. imageUrl이 바뀌면 새 시드로 리셋. */
|
|
145
|
-
initialShapes?: EditorShape<TMeta>[];
|
|
146
193
|
/**
|
|
147
194
|
* 렌더 시점 도형 상호작용 오버라이드(도메인 무관). 문서를 바꾸지 않고(undo 안전)
|
|
148
195
|
* 표시/선택/편집 가능 여부를 동적으로 덮어쓴다 — 호스트의 가시성 토글(숨김),
|
|
@@ -164,13 +211,22 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
164
211
|
draftMeta?: TMeta;
|
|
165
212
|
readOnly?: boolean;
|
|
166
213
|
/**
|
|
167
|
-
* 편집 잠금. true면
|
|
168
|
-
*
|
|
169
|
-
*
|
|
214
|
+
* 편집 잠금. true면 문서를 바꾸는 상호작용(그리기/이동/편집/어시스트)을 막고,
|
|
215
|
+
* 편집 시도(그리기 도구·도형 드래그·정점 편집 진입·방향키·삭제·복제·붙여넣기·
|
|
216
|
+
* 잘라내기·핸들의 createShapes/updateShapes/deleteShapes)에는 `onLockedInteraction`을
|
|
217
|
+
* 호출한다. 그 밖의 변경 경로(실행 취소, 겹침 순서, 핸들의 선택 기반 액션 등)는
|
|
218
|
+
* 알림 없이 막는다. 클릭 선택·마퀴·복사·팬·우클릭메뉴·외부도구(코멘트)는 허용.
|
|
219
|
+
* 도메인 무관 — 호스트가 "라벨링 완료" 등에서 켠다.
|
|
170
220
|
*/
|
|
171
221
|
locked?: boolean;
|
|
172
222
|
/** locked 상태에서 편집을 시도했을 때(호스트가 확인 모달 등을 띄운다). */
|
|
173
223
|
onLockedInteraction?: () => void;
|
|
224
|
+
/**
|
|
225
|
+
* 그리기 도구가 활성인데 `draftStyle`이 없어 그리기를 시작할 수 없을 때 호출.
|
|
226
|
+
* 도메인 무관 — 에디터는 "그릴 값이 없다"는 사실만 알리고, 그 의미(예: 호스트가
|
|
227
|
+
* 스타일을 만들 수단을 안내)는 호스트가 해석한다. 없으면 기존처럼 무시된다.
|
|
228
|
+
*/
|
|
229
|
+
onDrawAttemptWithoutDraft?: () => void;
|
|
174
230
|
/**
|
|
175
231
|
* Esc 처리 사슬(어시스트 취소 → 그리기 취소 → 선택 해제)이 전부 해당 없을 때 호출.
|
|
176
232
|
* 호스트가 "툴을 SELECT로 복귀 → 그래도 idle이면 에디터 닫기" 같은 후속 동작을
|
|
@@ -186,13 +242,6 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
186
242
|
decorationShapes?: EditorShape<TMeta>[];
|
|
187
243
|
/** 이미지 위 가림 효과. 제품 의미는 호스트가 해석하고 에디터는 순수 영역만 렌더링한다. */
|
|
188
244
|
regionMask?: RegionMask;
|
|
189
|
-
/**
|
|
190
|
-
* 가이드 마스크 래스터(디코딩된 width/height/indices). maskPalette와 함께 사용.
|
|
191
|
-
* 서버 와이어 포맷(바이너리 헤더 등) 디코딩은 호스트 책임(LabelEditor/guideMask.ts).
|
|
192
|
-
*/
|
|
193
|
-
guideMask?: GuideMaskRaster | null;
|
|
194
|
-
/** 가이드 마스크 팔레트(픽셀 인덱스값 → hex 색). */
|
|
195
|
-
maskPalette?: MaskPalette;
|
|
196
245
|
overlayMarkers?: EditorOverlayMarker<TMarkerMeta>[];
|
|
197
246
|
renderOverlayMarker?: (marker: EditorOverlayMarker<TMarkerMeta>) => ReactNode;
|
|
198
247
|
onOverlayMarkerClick?: (marker: EditorOverlayMarker<TMarkerMeta>) => void;
|
|
@@ -230,25 +279,33 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
230
279
|
* 보기 설정 초깃값(밝기/대비/픽셀화/선 두께/가이드·ROI 표시/줌 유지/휠 줌).
|
|
231
280
|
* 마운트 시 seed로만 쓰이고 이후엔 에디터 내부 설정 팝오버가 소유한다(uncontrolled).
|
|
232
281
|
* 지정하지 않은 키는 DEFAULT_VIEW_SETTINGS를 따른다.
|
|
282
|
+
* 숫자 값은 VIEW_SETTING_RANGES로 클램프된다(예: brightness 2 → 1.5).
|
|
233
283
|
*/
|
|
234
284
|
defaultViewSettings?: Partial<ViewSettings>;
|
|
235
285
|
/**
|
|
236
286
|
* 보기 설정 외부 동기화(선택). 여기 지정한 키의 값이 바뀌면 에디터 내부 설정에
|
|
237
287
|
* 반영된다(호스트 설정 UI → 에디터 방향). 에디터 내부 변경은 onViewSettingsChange로
|
|
238
288
|
* 나간다. 미지정 키는 계속 에디터 내부 소유.
|
|
289
|
+
* 여기 값도 VIEW_SETTING_RANGES로 클램프되므로, 범위 밖 저장값을 그대로 넘겨도
|
|
290
|
+
* 에디터는 범위 안 값으로 동작한다(호스트 저장값은 다음 설정 변경 시 교정된다).
|
|
239
291
|
*/
|
|
240
292
|
viewSettings?: Partial<ViewSettings>;
|
|
241
293
|
/**
|
|
242
|
-
*
|
|
294
|
+
* 미니맵 패널(축소맵+줌바+설정 버튼) 표시 여부(기본 true).
|
|
243
295
|
* 읽기전용 프리뷰 등 크롬이 부담스러운 콜사이트에서 끈다.
|
|
244
296
|
*/
|
|
245
297
|
showMinimap?: boolean;
|
|
298
|
+
/**
|
|
299
|
+
* 미니맵 패널이 붙는 모서리(기본 "bottom-left"). 위쪽 모서리에서는 줌 바가
|
|
300
|
+
* 위에 고정되고 축소맵이 아래로 펼쳐진다.
|
|
301
|
+
*/
|
|
302
|
+
minimapPosition?: MinimapPosition;
|
|
246
303
|
/** 미니맵 패널의 보기설정(기어) 버튼 표시 여부(기본 true). */
|
|
247
304
|
showViewSettings?: boolean;
|
|
248
305
|
/**
|
|
249
306
|
* 우클릭 컨텍스트 메뉴 항목 커스터마이즈. 에디터 기본 항목(defaults: 복제/삭제/
|
|
250
|
-
* z
|
|
251
|
-
* (예: 클래스 변경)을 끼워 넣는 확장 지점. 미지정 시 기본 항목 그대로.
|
|
307
|
+
* z-순서/전체선택 등, readOnly에서는 복사/선택/확대)을 받아 가공(추가·제거·재배열)해
|
|
308
|
+
* 반환한다. 도메인 액션(예: 클래스 변경)을 끼워 넣는 확장 지점. 미지정 시 기본 항목 그대로.
|
|
252
309
|
*/
|
|
253
310
|
getContextMenuItems?: (defaults: ContextMenuItem[], ctx: {
|
|
254
311
|
selectedIds: string[];
|
|
@@ -259,6 +316,12 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
259
316
|
* 기본값은 한국어(DEFAULT_EDITOR_STRINGS). 호스트가 번역 값을 만들어 주입한다.
|
|
260
317
|
*/
|
|
261
318
|
strings?: EditorStringsOverride;
|
|
319
|
+
/**
|
|
320
|
+
* 보기 설정 팝오버의 항목 구성(표시 여부·순서). 제품마다 노출 범위가 다르다 —
|
|
321
|
+
* 예: 아이브데이터는 단순화 강도·픽셀화를 감춘다(6547:201301).
|
|
322
|
+
* 미지정 시 전 항목(기존 순서).
|
|
323
|
+
*/
|
|
324
|
+
viewSettingItems?: ViewSettingItemKey[];
|
|
262
325
|
/**
|
|
263
326
|
* 합치기(우클릭 메뉴) 허용 판정. 선택된 닫힌 도형 2개 이상일 때 호출되며,
|
|
264
327
|
* false면 항목이 비활성화된다. 도메인 제약(예: 같은 클래스끼리만) 주입용.
|
|
@@ -321,9 +384,16 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
321
384
|
id: string;
|
|
322
385
|
points: Point[];
|
|
323
386
|
}[]) => void;
|
|
324
|
-
/**
|
|
387
|
+
/**
|
|
388
|
+
* 그리는 중인 임시 도형. ROI 등 호스트 전용 실시간 오버레이 동기화에 사용한다.
|
|
389
|
+
* 자유선 PATH는 커밋 결과와 동일하게 POLYGON 타입으로 전달된다.
|
|
390
|
+
*/
|
|
325
391
|
onDraftShapeChange?: (shape: Pick<EditorShape<TMeta>, "type" | "points" | "meta"> | null) => void;
|
|
326
|
-
/**
|
|
392
|
+
/**
|
|
393
|
+
* 그리기 세션(붓·폴리곤·패스)의 제어 상태가 바뀔 때 발생한다.
|
|
394
|
+
* 정점·커서 좌표 변화는 포함하지 않으므로, 임시 도형 좌표가 필요한 호스트는
|
|
395
|
+
* onDraftShapeChange를 사용한다.
|
|
396
|
+
*/
|
|
327
397
|
onDrawSessionChange?: (session: DrawSessionChange) => void;
|
|
328
398
|
/** 호스트發 수정/undo·redo/선택 제어용 명령형 핸들. */
|
|
329
399
|
handleRef?: Ref<ShapeEditorHandle<TMeta>>;
|
|
@@ -367,10 +437,11 @@ export interface ShapeEditorHandle<TMeta = unknown> {
|
|
|
367
437
|
/** Enter — 그리기 세션 확정(붓·폴리곤). */
|
|
368
438
|
commitDraftSession: () => boolean;
|
|
369
439
|
setSelection: (ids: string[]) => void;
|
|
370
|
-
/** 호스트發 생성(예: 레이블 어시스턴트 결과). */
|
|
440
|
+
/** 호스트發 생성(예: 레이블 어시스턴트 결과). locked면 적용 없이 onLockedInteraction. */
|
|
371
441
|
createShapes: (shapes: EditorShape<TMeta>[]) => void;
|
|
372
|
-
/** 호스트發 수정(예: 선택 라벨의 클래스/색 변경). */
|
|
442
|
+
/** 호스트發 수정(예: 선택 라벨의 클래스/색 변경). locked면 적용 없이 onLockedInteraction. */
|
|
373
443
|
updateShapes: (shapes: EditorShape<TMeta>[]) => void;
|
|
444
|
+
/** locked면 적용 없이 onLockedInteraction. */
|
|
374
445
|
deleteShapes: (ids: string[]) => void;
|
|
375
446
|
getShapes: () => EditorShape<TMeta>[];
|
|
376
447
|
/** 전체 선택. */
|
|
@@ -379,20 +450,16 @@ export interface ShapeEditorHandle<TMeta = unknown> {
|
|
|
379
450
|
clearSelection: () => void;
|
|
380
451
|
/** 선택 도형 삭제. */
|
|
381
452
|
deleteSelection: () => void;
|
|
382
|
-
/** 선택 도형을
|
|
453
|
+
/** 선택 도형을 시스템 클립보드에 복사. 사용할 수 없으면 같은 탭 메모리로 대체한다. */
|
|
383
454
|
copySelection: () => void;
|
|
384
|
-
/** 클립보드 도형
|
|
385
|
-
paste: () => void;
|
|
455
|
+
/** 시스템/메모리 클립보드 도형 붙여넣기. 좌표 지정 시 중심을 맞추고, 미지정 시 캐스케이드. */
|
|
456
|
+
paste: (at?: Point) => void;
|
|
386
457
|
/** 선택 도형 복제. */
|
|
387
458
|
duplicate: () => void;
|
|
388
459
|
/** 선택 도형 맨 앞으로. */
|
|
389
460
|
bringToFront: () => void;
|
|
390
461
|
/** 선택 도형 맨 뒤로. */
|
|
391
462
|
sendToBack: () => void;
|
|
392
|
-
/** 선택 도형 좌우 반전(bbox 중심). */
|
|
393
|
-
flipHorizontal: () => void;
|
|
394
|
-
/** 선택 도형 상하 반전(bbox 중심). */
|
|
395
|
-
flipVertical: () => void;
|
|
396
463
|
/** 줌: 이미지 전체 맞춤. */
|
|
397
464
|
zoomFit: () => void;
|
|
398
465
|
/** 줌: 100%. */
|
|
@@ -426,4 +493,4 @@ export interface ShapeEditorHandle<TMeta = unknown> {
|
|
|
426
493
|
beginEditFromSelection: () => boolean;
|
|
427
494
|
};
|
|
428
495
|
}
|
|
429
|
-
export type { BrushScalarMode, EditorAction, EditorShape,
|
|
496
|
+
export type { BrushScalarMode, EditorAction, EditorShape, KeymapOverrides, Point, PolygonArea, RectArea, RegionMask, RegionOutlineStyle, ShapeStyle, Tool, Viewport, ViewSettings, };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { EditorImageErrorKind } from "./imageDiagnosis";
|
|
1
2
|
/**
|
|
2
3
|
* 에디터 UI 문자열(도메인 무관). 기본값은 한국어이며, 호스트가 `strings` prop으로
|
|
3
4
|
* 부분 재정의해 i18n/제품별 문구를 주입한다. next-intl 등 프레임워크에 비종속 —
|
|
@@ -11,8 +12,6 @@ export interface EditorStrings {
|
|
|
11
12
|
delete: string;
|
|
12
13
|
bringToFront: string;
|
|
13
14
|
sendToBack: string;
|
|
14
|
-
flipHorizontal: string;
|
|
15
|
-
flipVertical: string;
|
|
16
15
|
editVertices: string;
|
|
17
16
|
merge: string;
|
|
18
17
|
assistExpand: string;
|
|
@@ -32,10 +31,10 @@ export interface EditorStrings {
|
|
|
32
31
|
simplifyStrength: string;
|
|
33
32
|
pixelation: string;
|
|
34
33
|
cursorGuide: string;
|
|
35
|
-
guideMask: string;
|
|
36
34
|
regionMask: string;
|
|
37
35
|
keepZoomOnImageChange: string;
|
|
38
36
|
wheelZoom: string;
|
|
37
|
+
zoomSensitivity: string;
|
|
39
38
|
};
|
|
40
39
|
minimap: {
|
|
41
40
|
zoomIn: string;
|
|
@@ -44,8 +43,13 @@ export interface EditorStrings {
|
|
|
44
43
|
viewSettings: string;
|
|
45
44
|
toggleMinimap: string;
|
|
46
45
|
};
|
|
46
|
+
canvasLabel: string;
|
|
47
47
|
imageLoading: string;
|
|
48
|
+
/** 문서에 이미지가 없을 때(원본 미수신 등) 오버레이 문구. */
|
|
49
|
+
imageMissing: string;
|
|
48
50
|
imageLoadError: string;
|
|
51
|
+
/** 이미지 로드 실패 분류별 안내문(진단 오버레이). */
|
|
52
|
+
imageErrorHints: Record<EditorImageErrorKind, string>;
|
|
49
53
|
}
|
|
50
54
|
export declare const DEFAULT_EDITOR_STRINGS: EditorStrings;
|
|
51
55
|
/** 그룹 단위 부분 재정의(그룹 안 키도 부분 지정 가능). */
|
|
@@ -7,9 +7,53 @@ export interface ViewSettings {
|
|
|
7
7
|
strokeSize: number;
|
|
8
8
|
/** 자유선/붓→폴리곤 단순화 강도(RDP epsilon, 이미지 px). 높을수록 점이 적어짐. */
|
|
9
9
|
simplifyStrength: number;
|
|
10
|
-
showGuide: boolean;
|
|
11
10
|
showRegionMask: boolean;
|
|
12
11
|
keepZoomOnImageChange: boolean;
|
|
13
12
|
wheelZoom: boolean;
|
|
13
|
+
/** 휠/핀치 확대·축소 민감도 배율(1 = 기본). 마우스별 휠 이벤트 밀도 차이 보정용. */
|
|
14
|
+
zoomSensitivity: number;
|
|
14
15
|
}
|
|
15
16
|
export declare const DEFAULT_VIEW_SETTINGS: ViewSettings;
|
|
17
|
+
/** 숫자형 보기 설정의 허용 범위 — 슬라이더와 클램프가 공유하는 단일 출처. */
|
|
18
|
+
export interface ViewSettingRange {
|
|
19
|
+
min: number;
|
|
20
|
+
max: number;
|
|
21
|
+
step: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 밝기/대비는 0에 가까우면 완전 검정·평면 회색이 되어 이미지가 사라지고,
|
|
25
|
+
* 너무 높으면 화이트아웃된다. 사진을 계속 식별할 수 있는 구간으로 묶는다.
|
|
26
|
+
*/
|
|
27
|
+
export declare const VIEW_SETTING_RANGES: {
|
|
28
|
+
readonly brightness: {
|
|
29
|
+
readonly min: 0.5;
|
|
30
|
+
readonly max: 1.5;
|
|
31
|
+
readonly step: 0.05;
|
|
32
|
+
};
|
|
33
|
+
readonly contrast: {
|
|
34
|
+
readonly min: 0.5;
|
|
35
|
+
readonly max: 1.5;
|
|
36
|
+
readonly step: 0.05;
|
|
37
|
+
};
|
|
38
|
+
readonly strokeSize: {
|
|
39
|
+
readonly min: 1;
|
|
40
|
+
readonly max: 10;
|
|
41
|
+
readonly step: 0.5;
|
|
42
|
+
};
|
|
43
|
+
readonly simplifyStrength: {
|
|
44
|
+
readonly min: 0.5;
|
|
45
|
+
readonly max: 5;
|
|
46
|
+
readonly step: 0.5;
|
|
47
|
+
};
|
|
48
|
+
readonly zoomSensitivity: {
|
|
49
|
+
readonly min: 0.2;
|
|
50
|
+
readonly max: 3;
|
|
51
|
+
readonly step: 0.1;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* 범위 밖 값을 허용 구간 안으로 되돌린다(구버전 저장값 마이그레이션 겸용).
|
|
56
|
+
* NaN/Infinity는 기본값으로 되살린다. 지정되지 않은(undefined) 키는 만들어내지 않으므로
|
|
57
|
+
* 부분 패치에도 그대로 쓸 수 있다. 고칠 게 없으면 새 객체를 만들지 않고 입력을 그대로 반환한다.
|
|
58
|
+
*/
|
|
59
|
+
export declare function clampViewSettings<T extends Partial<ViewSettings>>(settings: T): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type Point } from "./geometry";
|
|
2
|
+
export interface Size {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
}
|
|
6
|
+
export interface Rect extends Size {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
}
|
|
10
|
+
/** 이미지 좌표계 → 컨테이너 CSS px 변환(`screen = coord * scale + offset`). */
|
|
11
|
+
export interface ViewerTransform {
|
|
12
|
+
scale: number;
|
|
13
|
+
offsetX: number;
|
|
14
|
+
offsetY: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function computeViewerTransform({ viewport, image, focusPoints, zoomPadding, focusFit, }: {
|
|
17
|
+
viewport: Size;
|
|
18
|
+
image: Size;
|
|
19
|
+
focusPoints?: Point[];
|
|
20
|
+
zoomPadding: number;
|
|
21
|
+
focusFit: "contain" | "cover";
|
|
22
|
+
}): ViewerTransform;
|
|
23
|
+
/** 컨테이너에 보이는 이미지 영역(좌표계 단위, 이미지 경계로 클램프). 보이는 부분이 없으면 null. */
|
|
24
|
+
export declare function getVisibleImageRect(transform: ViewerTransform, viewport: Size, image: Size): Rect | null;
|
|
25
|
+
/**
|
|
26
|
+
* 보이는 영역만 잘라 화면 해상도로 줄인 패치 계획. 원본 픽셀 경계로 정렬하고,
|
|
27
|
+
* 원본보다 확대된 화면에서는 원본 해상도에서 멈춘다(업스케일은 그리기 단계가 한다).
|
|
28
|
+
* `density`는 화면이 요구하는 좌표 1단위당 기기 픽셀 수.
|
|
29
|
+
*/
|
|
30
|
+
export declare function planImagePatch({ visible, image, natural, density, }: {
|
|
31
|
+
visible: Rect;
|
|
32
|
+
image: Size;
|
|
33
|
+
natural: Size;
|
|
34
|
+
density: number;
|
|
35
|
+
}): {
|
|
36
|
+
source: {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
};
|
|
42
|
+
rect: {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
};
|
|
48
|
+
outputWidth: number;
|
|
49
|
+
outputHeight: number;
|
|
50
|
+
};
|
|
51
|
+
/** 기존 패치가 지금 보이는 영역을 요구 해상도 이상으로 덮는지 — 덮으면 원본을 다시 디코딩할 필요가 없다. */
|
|
52
|
+
export declare function patchCovers(patch: {
|
|
53
|
+
rect: Rect;
|
|
54
|
+
outputWidth: number;
|
|
55
|
+
outputHeight: number;
|
|
56
|
+
}, visible: Rect, required: {
|
|
57
|
+
density: number;
|
|
58
|
+
natural: Size;
|
|
59
|
+
image: Size;
|
|
60
|
+
}): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type BBox, type EditorShape, type Point, type ShapeStyle } from "../_model/geometry";
|
|
2
2
|
import { type RegionOverlayData } from "../_model/overlays";
|
|
3
3
|
import type { ScalarMaskRaster } from "../_model/scalarMask";
|
|
4
|
+
import { type ShapeRenderStyleDefaults } from "../_model/shapeRenderStyle";
|
|
4
5
|
import type { EditorRenderer, EditorRendererCallbacks, PreviewKind, Viewport } from "./types";
|
|
5
6
|
/**
|
|
6
7
|
* KonvaRenderer — EditorRenderer의 Konva(canvas2D) 구현(명령형, react-konva 아님).
|
|
@@ -13,6 +14,8 @@ export declare class KonvaRenderer implements EditorRenderer {
|
|
|
13
14
|
private world;
|
|
14
15
|
private bgGroup;
|
|
15
16
|
private overlayGroup;
|
|
17
|
+
private regionOverlayGroup;
|
|
18
|
+
private dimOverlayGroup;
|
|
16
19
|
private shapeGroup;
|
|
17
20
|
private selGroup;
|
|
18
21
|
private previewGroup;
|
|
@@ -38,6 +41,7 @@ export declare class KonvaRenderer implements EditorRenderer {
|
|
|
38
41
|
private ro;
|
|
39
42
|
private activeDrag;
|
|
40
43
|
private midNodes;
|
|
44
|
+
private ghostNode;
|
|
41
45
|
private selectedVertices;
|
|
42
46
|
private vertexPolygonId;
|
|
43
47
|
private editingId;
|
|
@@ -58,15 +62,26 @@ export declare class KonvaRenderer implements EditorRenderer {
|
|
|
58
62
|
private emitCursorHint;
|
|
59
63
|
private emitInteractionMode;
|
|
60
64
|
private applyCursor;
|
|
65
|
+
/** 도형 호버 커서 — 선택된 도형만 grab, 비선택은 힌트로 구분해 소비층이 도구별 해석. */
|
|
66
|
+
private bindShapeCursor;
|
|
61
67
|
private bindCursor;
|
|
62
68
|
private toImage;
|
|
63
69
|
private imgToScreen;
|
|
64
|
-
setImage(url: string
|
|
70
|
+
setImage(url: string, coordinateSize?: {
|
|
71
|
+
width: number;
|
|
72
|
+
height: number;
|
|
73
|
+
}, imageSize?: {
|
|
74
|
+
width: number;
|
|
75
|
+
height: number;
|
|
76
|
+
}): Promise<boolean>;
|
|
65
77
|
clearImage(): void;
|
|
66
78
|
setFilter(brightness: number, contrast: number): void;
|
|
67
|
-
|
|
79
|
+
setRenderDefaults(defaults: Partial<ShapeRenderStyleDefaults>): void;
|
|
80
|
+
/** 편집모드 정점 핸들 반지름 — 선두께에 비례(기본 두께 2에서 기존 크기 5 유지). */
|
|
81
|
+
private vertexHandleRadius;
|
|
68
82
|
setImageSmoothing(smooth: boolean): void;
|
|
69
|
-
setOverlays(
|
|
83
|
+
setOverlays(region: RegionOverlayData | null, dimmed: boolean): void;
|
|
84
|
+
setRegionOverlay(region: RegionOverlayData | null): void;
|
|
70
85
|
get viewport(): Viewport;
|
|
71
86
|
applyViewport(v: Viewport): void;
|
|
72
87
|
fit(): void;
|
|
@@ -76,6 +91,9 @@ export declare class KonvaRenderer implements EditorRenderer {
|
|
|
76
91
|
setSelection(selected: string[]): void;
|
|
77
92
|
/** 폴리곤 정점 편집모드 진입/해제(null이면 해제). */
|
|
78
93
|
setEditing(id: string | null): void;
|
|
94
|
+
getVertexSelection(): number[];
|
|
95
|
+
/** 편집모드 정점 다중선택 교체(마퀴 범위선택). 편집모드가 아니면 무시. */
|
|
96
|
+
setVertexSelection(indices: number[]): void;
|
|
79
97
|
private makeNode;
|
|
80
98
|
liveUpdateShape(id: string, points: Point[]): void;
|
|
81
99
|
private pointRadius;
|
|
@@ -114,5 +132,7 @@ export declare class KonvaRenderer implements EditorRenderer {
|
|
|
114
132
|
private repositionPolygonHandles;
|
|
115
133
|
private commitTransformUpdates;
|
|
116
134
|
private dragTransform;
|
|
135
|
+
/** 진행 중인 드래그를 커밋 없이 취소 — 프리뷰가 옮긴 노드를 확정 좌표로 되돌린다. */
|
|
136
|
+
private cancelTransform;
|
|
117
137
|
private endTransform;
|
|
118
138
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import "pixi.js/unsafe-eval";
|
|
1
2
|
import { Application, ColorMatrixFilter, Container, type FederatedPointerEvent } from "pixi.js";
|
|
2
3
|
import { type EditorShape, type Point, type ShapeStyle } from "../_model/geometry";
|
|
3
|
-
import type
|
|
4
|
+
import { type RegionOverlayData } from "../_model/overlays";
|
|
4
5
|
import { type ScalarMaskRaster } from "../_model/scalarMask";
|
|
6
|
+
import { type ShapeRenderStyleDefaults } from "../_model/shapeRenderStyle";
|
|
5
7
|
import type { EditorRendererCallbacks, Viewport } from "./types";
|
|
6
8
|
export type { Viewport };
|
|
7
9
|
/**
|
|
@@ -13,6 +15,8 @@ export declare class PixiRenderer {
|
|
|
13
15
|
world: Container<import("pixi.js").ContainerChild>;
|
|
14
16
|
bgLayer: Container<import("pixi.js").ContainerChild>;
|
|
15
17
|
overlayLayer: Container<import("pixi.js").ContainerChild>;
|
|
18
|
+
private regionOverlayLayer;
|
|
19
|
+
private dimOverlayLayer;
|
|
16
20
|
shapeLayer: Container<import("pixi.js").ContainerChild>;
|
|
17
21
|
selLayer: Container<import("pixi.js").ContainerChild>;
|
|
18
22
|
previewLayer: Container<import("pixi.js").ContainerChild>;
|
|
@@ -22,8 +26,12 @@ export declare class PixiRenderer {
|
|
|
22
26
|
imageHeight: number;
|
|
23
27
|
private imageTileTextures;
|
|
24
28
|
private imageLoadToken;
|
|
25
|
-
private
|
|
29
|
+
private tileSize;
|
|
26
30
|
private region;
|
|
31
|
+
private regionDimMaskG;
|
|
32
|
+
private regionDimG;
|
|
33
|
+
private regionZoneMaskG;
|
|
34
|
+
private regionZoneG;
|
|
27
35
|
private regionOutlineG;
|
|
28
36
|
private cb;
|
|
29
37
|
private host;
|
|
@@ -43,6 +51,7 @@ export declare class PixiRenderer {
|
|
|
43
51
|
private lastDragImg;
|
|
44
52
|
private activeDrag;
|
|
45
53
|
private midNodes;
|
|
54
|
+
private ghostNode;
|
|
46
55
|
private selectedVertices;
|
|
47
56
|
private vertexPolygonId;
|
|
48
57
|
private editingId;
|
|
@@ -70,14 +79,23 @@ export declare class PixiRenderer {
|
|
|
70
79
|
get dom(): HTMLElement;
|
|
71
80
|
/** 화면 좌표(global) → 이미지 좌표(world local). */
|
|
72
81
|
toImage(e: FederatedPointerEvent): Point;
|
|
73
|
-
setImage(url: string
|
|
82
|
+
setImage(url: string, coordinateSize?: {
|
|
83
|
+
width: number;
|
|
84
|
+
height: number;
|
|
85
|
+
}, imageSize?: {
|
|
86
|
+
width: number;
|
|
87
|
+
height: number;
|
|
88
|
+
}): Promise<boolean>;
|
|
74
89
|
setFilter(brightness: number, contrast: number): void;
|
|
75
|
-
|
|
90
|
+
setRenderDefaults(defaults: Partial<ShapeRenderStyleDefaults>): void;
|
|
91
|
+
/** 편집모드 정점 핸들 반지름 — 선두께에 비례(기본 두께 2에서 기존 크기 5 유지). */
|
|
92
|
+
private vertexHandleRadius;
|
|
76
93
|
private applySpriteFilter;
|
|
77
94
|
clearImage(): void;
|
|
78
95
|
private clearImageTiles;
|
|
79
96
|
setImageSmoothing(smooth: boolean): void;
|
|
80
|
-
setOverlays(
|
|
97
|
+
setOverlays(region: RegionOverlayData | null, dimmed: boolean): void;
|
|
98
|
+
setRegionOverlay(region: RegionOverlayData | null): void;
|
|
81
99
|
get viewport(): Viewport;
|
|
82
100
|
applyViewport(v: Viewport): void;
|
|
83
101
|
fit(): void;
|
|
@@ -88,6 +106,9 @@ export declare class PixiRenderer {
|
|
|
88
106
|
setSelection(selected: string[]): void;
|
|
89
107
|
/** 폴리곤 정점 편집모드 진입/해제(null이면 해제). */
|
|
90
108
|
setEditing(id: string | null): void;
|
|
109
|
+
getVertexSelection(): number[];
|
|
110
|
+
/** 편집모드 정점 다중선택 교체(마퀴 범위선택). 편집모드가 아니면 무시. */
|
|
111
|
+
setVertexSelection(indices: number[]): void;
|
|
91
112
|
/** SELECT 모드 + 비-readOnly일 때만 핸들 표시(호스트가 설정). */
|
|
92
113
|
setTransformEnabled(enabled: boolean): void;
|
|
93
114
|
setPanMode(active: boolean): void;
|
|
@@ -156,8 +177,12 @@ export declare class PixiRenderer {
|
|
|
156
177
|
private repositionOrientedHandles;
|
|
157
178
|
/** 폴리곤/라인 꼭짓점·변 중점 핸들을 이미지 좌표 기준으로 재배치. */
|
|
158
179
|
private repositionPolygonHandles;
|
|
180
|
+
/** 변(이미지 좌표 a→b) 주위 히트 쿼드 — 변 호버/클릭 히트영역(정점 핸들에 비례). */
|
|
181
|
+
private edgeHitQuad;
|
|
159
182
|
private resetMoveOffsets;
|
|
160
183
|
private commitTransformUpdates;
|
|
161
184
|
private dragTransform;
|
|
185
|
+
/** 진행 중인 드래그를 커밋 없이 취소 — 프리뷰가 옮긴 노드를 확정 좌표로 되돌린다. */
|
|
186
|
+
private cancelTransform;
|
|
162
187
|
private endTransform;
|
|
163
188
|
}
|
|
@@ -55,7 +55,7 @@ export declare function makeMoveDrag(shapes: EditorShape[], ids: string[], start
|
|
|
55
55
|
export declare function cloneShapes<TMeta>(shapes: EditorShape<TMeta>[]): EditorShape<TMeta>[];
|
|
56
56
|
/** 선택 중 편집 가능한 도형. */
|
|
57
57
|
export declare function selectEditable(shapes: EditorShape[], selected: string[]): EditorShape[];
|
|
58
|
-
/** 박스와
|
|
58
|
+
/** 박스와 실제 기하가 겹치는 선택 가능 도형 id(마퀴 선택) — bbox 근사 아님. */
|
|
59
59
|
export declare function intersectingShapeIds(shapes: EditorShape[], box: BBox): string[];
|
|
60
60
|
/** 점 도형 화면고정 반경(이미지 좌표) — 도형별 스타일 반영. */
|
|
61
61
|
export declare function pointRadiusFor(shape: EditorShape | undefined, strokeSize: number, scale: number): number;
|