@aivex/ui 1.2.0-dev.36 → 1.2.0-dev.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.
- package/dist/components/ShapeEditor/_renderers/types.d.ts +2 -1
- package/dist/components/ShapeEditor/_state/createInteractionController.d.ts +0 -1
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.d.ts +2 -2
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.d.ts +9 -0
- package/dist/shape-editor.cjs +1 -1
- package/dist/shape-editor.cjs.map +1 -1
- package/dist/shape-editor.js +941 -936
- package/dist/shape-editor.js.map +1 -1
- package/package.json +1 -1
|
@@ -15,10 +15,11 @@ export interface Viewport {
|
|
|
15
15
|
interface EditorRendererPointerEventBase {
|
|
16
16
|
pointerId: number;
|
|
17
17
|
global: Point;
|
|
18
|
+
/** 이벤트 시점의 OS 수식키 상태. 키 추적 ref보다 신뢰할 수 있어 그리기 제약에 쓴다. */
|
|
19
|
+
shiftKey: boolean;
|
|
18
20
|
}
|
|
19
21
|
export interface EditorRendererPointerDownEvent extends EditorRendererPointerEventBase {
|
|
20
22
|
button: number;
|
|
21
|
-
shiftKey: boolean;
|
|
22
23
|
altKey: boolean;
|
|
23
24
|
ctrlKey: boolean;
|
|
24
25
|
metaKey: boolean;
|
|
@@ -19,7 +19,6 @@ export interface InteractionControllerCtx<TMeta> {
|
|
|
19
19
|
toolRef: RefObject<Tool>;
|
|
20
20
|
externalToolMapRef: RefObject<Map<string, EditorExternalTool>>;
|
|
21
21
|
spaceRef: RefObject<boolean>;
|
|
22
|
-
shiftRef: RefObject<boolean>;
|
|
23
22
|
docRef: RefObject<EditorDocument<TMeta>>;
|
|
24
23
|
selRef: RefObject<string[]>;
|
|
25
24
|
draftRef: RefObject<ShapeStyle | undefined>;
|
|
@@ -9,7 +9,6 @@ interface EditorHotkeysCtx {
|
|
|
9
9
|
hostRef: RefObject<HTMLElement | null>;
|
|
10
10
|
actions: EditorActionHandlers;
|
|
11
11
|
spaceRef: RefObject<boolean>;
|
|
12
|
-
shiftRef: RefObject<boolean>;
|
|
13
12
|
/** Space 눌림/뗌 시 커서 갱신 등(index 소유). */
|
|
14
13
|
onSpaceDown: () => void;
|
|
15
14
|
onSpaceUp: () => void;
|
|
@@ -18,7 +17,8 @@ interface EditorHotkeysCtx {
|
|
|
18
17
|
}
|
|
19
18
|
/**
|
|
20
19
|
* 에디터 키보드 단축키. 기본 keymap을 내장하되 호스트가 재정의/비활성할 수 있다.
|
|
21
|
-
* Space
|
|
20
|
+
* Space 추적과 방향키 넛지는 고정(재매핑 불가), 그 외 액션은 keymap 기반.
|
|
21
|
+
* Shift 등 수식키는 여기서 추적하지 않는다 — 포인터 이벤트가 실어 오는 값을 쓴다.
|
|
22
22
|
* 최신 keymap/액션을 ref로 읽어 리스너는 1회만 바인딩한다.
|
|
23
23
|
*/
|
|
24
24
|
export declare function useEditorHotkeys(ctx: EditorHotkeysCtx): void;
|
|
@@ -24,6 +24,15 @@ export declare function classifyImageTransition({ currentDocId, documentId, load
|
|
|
24
24
|
loadedUrl: string | null;
|
|
25
25
|
renderedImageUrl: string;
|
|
26
26
|
}): ImageTransition;
|
|
27
|
+
/**
|
|
28
|
+
* 문서 전환 시 이전 뷰포트를 유지할지. "확대 유지"는 이 엔진에 이미 확정된 뷰포트가
|
|
29
|
+
* 있을 때만 의미가 있다 — 렌더러는 첫 applyViewport(fit 포함) 전까지 콘텐츠를 숨기므로,
|
|
30
|
+
* 첫 이미지에서 fit을 건너뛰면 사용자가 팬/줌할 때까지 빈 캔버스만 보인다.
|
|
31
|
+
*/
|
|
32
|
+
export declare function shouldKeepViewportOnDocChange({ keepZoomOnImageChange, viewportSeeded, }: {
|
|
33
|
+
keepZoomOnImageChange: boolean;
|
|
34
|
+
viewportSeeded: boolean;
|
|
35
|
+
}): boolean;
|
|
27
36
|
/**
|
|
28
37
|
* 렌더러 엔진 생명주기 — backend당 1회 생성/파괴, 이미지 전환(문서 전환 vs 화질 스왑),
|
|
29
38
|
* 휠 줌/팬·우클릭 메뉴 네이티브 리스너를 소유한다.
|