@aivex/ui 1.2.0-dev.26 → 1.2.0-dev.27
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/_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 +20 -0
- package/dist/components/ShapeEditor/_renderers/KonvaRenderer.d.ts +2 -0
- package/dist/components/ShapeEditor/_renderers/transformSession.d.ts +1 -1
- package/dist/shape-editor.cjs +1 -1
- package/dist/shape-editor.cjs.map +1 -1
- package/dist/shape-editor.js +1435 -1330
- package/dist/shape-editor.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { Anchor } from "./geometry";
|
|
2
2
|
import { type Tool } from "./tools";
|
|
3
|
+
/**
|
|
4
|
+
* 비선택 도형 호버 힌트(CSS 커서 아님 — 소비층이 도구별로 해석).
|
|
5
|
+
* 선택 도구는 grab으로 표시하고, 박스 그리기 도구는 무시한다(클릭=그리기이므로).
|
|
6
|
+
*/
|
|
7
|
+
export declare const UNSELECTED_HOVER_HINT = "grab-unselected";
|
|
3
8
|
export declare function resizeCursorForAnchor(anchor: Anchor, angleRad?: number): string;
|
|
4
9
|
export declare function cursorForTool({ tool, externalToolCursor, isSpacePressed, isPolygonDrawing, }: {
|
|
5
10
|
tool: Tool;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -147,3 +147,23 @@ export declare function polygonSelfIntersects(points: Point[], maxPoints?: numbe
|
|
|
147
147
|
* 정점이 maxPoints를 넘으면 분해하지 않는다.
|
|
148
148
|
*/
|
|
149
149
|
export declare function splitSelfIntersectingPolygon(points: Point[], maxPoints?: number): Point[][];
|
|
150
|
+
/** 점이 닫힌 다각형 내부인가(ray casting, even-odd). */
|
|
151
|
+
export declare function pointInPolygon(p: Point, polygon: Point[]): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* 도형과 축정렬 박스의 실제 기하 충돌 — 마퀴 선택 판정. bbox 근사와 달리
|
|
154
|
+
* 오목 폴리곤의 빈 구석·타원 모서리·회전 사각형 바깥을 잡지 않는다.
|
|
155
|
+
* 닫힌 도형은 면(영역)으로 본다: 박스가 도형 내부에 완전히 들어간 경우도 충돌.
|
|
156
|
+
*/
|
|
157
|
+
export declare function shapeIntersectsBox(shape: EditorShape, box: BBox): boolean;
|
|
158
|
+
/**
|
|
159
|
+
* 분해된 단순 루프들을 evenodd 의미론으로 면/구멍으로 그룹핑한다 — 짝수 깊이
|
|
160
|
+
* (자신을 포함하는 루프 수) 루프는 면, 홀수 깊이 루프는 바로 바깥 면의 구멍.
|
|
161
|
+
* 도넛형 자기교차 폴리곤에서 구멍이 채워지는 것을 막는다(2D 캔버스 evenodd와
|
|
162
|
+
* 동일한 결과를 earcut 기반 렌더러에서 재현).
|
|
163
|
+
* 대표점은 첫 변의 중점 — 분해 루프끼리는 교차점(정점)만 공유하므로 다른 루프
|
|
164
|
+
* 경계 위에 놓이지 않는다.
|
|
165
|
+
*/
|
|
166
|
+
export declare function groupLoopsEvenOdd(loops: Point[][]): {
|
|
167
|
+
outline: Point[];
|
|
168
|
+
holes: Point[][];
|
|
169
|
+
}[];
|
|
@@ -63,6 +63,8 @@ export declare class KonvaRenderer implements EditorRenderer {
|
|
|
63
63
|
private emitCursorHint;
|
|
64
64
|
private emitInteractionMode;
|
|
65
65
|
private applyCursor;
|
|
66
|
+
/** 도형 호버 커서 — 선택된 도형만 grab, 비선택은 힌트로 구분해 소비층이 도구별 해석. */
|
|
67
|
+
private bindShapeCursor;
|
|
66
68
|
private bindCursor;
|
|
67
69
|
private toImage;
|
|
68
70
|
private imgToScreen;
|
|
@@ -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;
|