@aivex/ui 1.2.0-dev.1 → 1.2.0-dev.2
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/Switch-DX-FkCbT.cjs +42 -0
- package/dist/Switch-DX-FkCbT.cjs.map +1 -0
- package/dist/Switch-c8rHebeK.js +11243 -0
- package/dist/Switch-c8rHebeK.js.map +1 -0
- package/dist/components/Icon/index.d.ts +5 -4
- package/dist/components/Messagebox/Messagebox.d.ts +3 -1
- package/dist/components/ShapeEditor/ShapeEditor.d.ts +9 -0
- package/dist/components/ShapeEditor/_components/AssistantOverlay.d.ts +17 -0
- package/dist/components/ShapeEditor/_components/ContextMenu.d.ts +13 -0
- package/dist/components/ShapeEditor/_components/CursorGuide.d.ts +8 -0
- package/dist/components/ShapeEditor/_components/ImageStateOverlay.d.ts +11 -0
- package/dist/components/ShapeEditor/_components/Minimap.d.ts +45 -0
- package/dist/components/ShapeEditor/_components/MinimapShape.d.ts +6 -0
- package/dist/components/ShapeEditor/_components/RoiOverlay.d.ts +21 -0
- package/dist/components/ShapeEditor/_components/SelectionInfo.d.ts +12 -0
- package/dist/components/ShapeEditor/_components/SettingsPanel.d.ts +15 -0
- package/dist/components/ShapeEditor/_constants.d.ts +33 -0
- package/dist/components/ShapeEditor/_model/brush.d.ts +3 -0
- package/dist/components/ShapeEditor/_model/cursors.d.ts +18 -0
- package/dist/components/ShapeEditor/_model/geometry.d.ts +128 -0
- package/dist/components/ShapeEditor/_model/imageTiles.d.ts +11 -0
- package/dist/components/ShapeEditor/_model/keymap.d.ts +15 -0
- package/dist/components/ShapeEditor/_model/konva.d.ts +4 -0
- package/dist/components/ShapeEditor/_model/overlays.d.ts +55 -0
- package/dist/components/ShapeEditor/_model/pinIcon.d.ts +13 -0
- package/dist/components/ShapeEditor/_model/props.d.ts +398 -0
- package/dist/components/ShapeEditor/_model/scalarMask.d.ts +21 -0
- package/dist/components/ShapeEditor/_model/shapeRenderStyle.d.ts +16 -0
- package/dist/components/ShapeEditor/_model/strings.d.ts +55 -0
- package/dist/components/ShapeEditor/_model/tools.d.ts +27 -0
- package/dist/components/ShapeEditor/_model/viewSettings.d.ts +15 -0
- package/dist/components/ShapeEditor/_model/viewport.d.ts +28 -0
- package/dist/components/ShapeEditor/_renderers/KonvaRenderer.d.ts +114 -0
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.d.ts +159 -0
- package/dist/components/ShapeEditor/_renderers/transformSession.d.ts +63 -0
- package/dist/components/ShapeEditor/_renderers/types.d.ts +94 -0
- package/dist/components/ShapeEditor/_state/createInteractionController.d.ts +52 -0
- package/dist/components/ShapeEditor/_state/drawSessionState.d.ts +6 -0
- package/dist/components/ShapeEditor/_state/useAssistant.d.ts +48 -0
- package/dist/components/ShapeEditor/_state/useDrawSession.d.ts +60 -0
- package/dist/components/ShapeEditor/_state/useEditorDocument.d.ts +23 -0
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.d.ts +23 -0
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.d.ts +48 -0
- package/dist/components/ShapeEditor/_state/useMinimapNavigation.d.ts +27 -0
- package/dist/components/ShapeEditor/_state/useMinimapSync.d.ts +24 -0
- package/dist/components/ShapeEditor/_state/useSelectionActions.d.ts +29 -0
- package/dist/components/ShapeEditor/_state/useViewportControls.d.ts +23 -0
- package/dist/components/ShapeEditor/index.d.ts +6 -0
- package/dist/index.cjs +6 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3427 -14617
- package/dist/index.js.map +1 -1
- package/dist/shape-editor.cjs +2 -0
- package/dist/shape-editor.cjs.map +1 -0
- package/dist/shape-editor.js +5271 -0
- package/dist/shape-editor.js.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +8 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import { type EditorShape } from "../_model/geometry";
|
|
3
|
+
import type { EditorDocument } from "./useEditorDocument";
|
|
4
|
+
/**
|
|
5
|
+
* 선택 기반 문서 액션(키보드·컨텍스트메뉴·명령형 핸들 공용) — 복사/붙여넣기/복제/삭제/
|
|
6
|
+
* z순서/반전/합치기/넛지. 클립보드(clipRef)와 붙여넣기 오프셋 카운터를 소유한다.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useSelectionActions<TMeta>({ doc, selRef, effectiveReadOnly, changeSelection, canMergeSelection, }: {
|
|
9
|
+
doc: EditorDocument<TMeta>;
|
|
10
|
+
selRef: RefObject<string[]>;
|
|
11
|
+
effectiveReadOnly: boolean;
|
|
12
|
+
changeSelection: (ids: string[]) => void;
|
|
13
|
+
canMergeSelection?: (shapes: EditorShape<TMeta>[]) => boolean;
|
|
14
|
+
}): {
|
|
15
|
+
selectAll: () => void;
|
|
16
|
+
clearSelection: () => void;
|
|
17
|
+
getEditableSelection: () => EditorShape<TMeta>[];
|
|
18
|
+
deleteSelection: () => void;
|
|
19
|
+
copySelection: () => void;
|
|
20
|
+
canPaste: () => boolean;
|
|
21
|
+
paste: () => void;
|
|
22
|
+
duplicate: () => void;
|
|
23
|
+
bringToFront: () => void;
|
|
24
|
+
sendToBack: () => void;
|
|
25
|
+
flip: (horizontal: boolean) => void;
|
|
26
|
+
nudgeSelection: (dx: number, dy: number) => void;
|
|
27
|
+
getMergeTargets: () => EditorShape<TMeta>[];
|
|
28
|
+
mergeSelection: () => void;
|
|
29
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import { type ZoomBounds } from "../_model/viewport";
|
|
3
|
+
import type { EditorRenderer, Viewport } from "../_renderers/types";
|
|
4
|
+
import type { EditorDocument } from "./useEditorDocument";
|
|
5
|
+
/**
|
|
6
|
+
* 뷰포트 줌 액션(애니메이션 줌·선택/도형/영역 맞춤·중앙 줌) + zoomBound prop 반영.
|
|
7
|
+
* 진행 중 애니메이션 취소 핸들을 소유하고 언마운트 시 정리한다.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useViewportControls<TMeta>({ engineRef, doc, selRef, zoomAnimationDuration, zoomBound, ready, }: {
|
|
10
|
+
engineRef: RefObject<EditorRenderer | null>;
|
|
11
|
+
doc: EditorDocument<TMeta>;
|
|
12
|
+
selRef: RefObject<string[]>;
|
|
13
|
+
zoomAnimationDuration: number;
|
|
14
|
+
zoomBound: ZoomBounds | undefined;
|
|
15
|
+
ready: boolean;
|
|
16
|
+
}): {
|
|
17
|
+
cancelZoomAnimation: () => void;
|
|
18
|
+
runViewportAnimation: (target: Viewport, duration?: number) => void;
|
|
19
|
+
zoomToBounds: (bounds: ZoomBounds, duration?: number) => void;
|
|
20
|
+
zoomToShapes: (ids: string[], duration?: number) => void;
|
|
21
|
+
zoomToSelection: () => void;
|
|
22
|
+
zoomAtCenter: (factor: number) => void;
|
|
23
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { generateId, SHAPE_TYPE, type ShapeType } from "./_model/geometry";
|
|
2
|
+
export type { AssistantPrompt, AssistantPromptPoint, BrushScalarMode, ContextMenuItem, DrawSessionChange, DrawSessionKind, EditorAction, EditorAssistant, EditorCanvasViewport, EditorExternalTool, EditorExternalToolContext, EditorOverlayMarker, EditorPointerEvent, EditorSelectionInfo, EditorShape, ExcludedZone, GuideMaskRaster, KeymapOverrides, MaskPalette, Point, RoiRect, ShapeEditorHandle, ShapeEditorProps, ShapeStyle, Tool, Viewport, ViewSettings, } from "./_model/props";
|
|
3
|
+
export { DEFAULT_EDITOR_STRINGS, type EditorStrings, type EditorStringsOverride, } from "./_model/strings";
|
|
4
|
+
export { type BuiltInTool, TOOL } from "./_model/tools";
|
|
5
|
+
export { DEFAULT_VIEW_SETTINGS } from "./_model/viewSettings";
|
|
6
|
+
export { default, default as ShapeEditor } from "./ShapeEditor";
|