@aivex/ui 1.1.0 → 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.
Files changed (70) hide show
  1. package/dist/Switch-DX-FkCbT.cjs +42 -0
  2. package/dist/Switch-DX-FkCbT.cjs.map +1 -0
  3. package/dist/Switch-c8rHebeK.js +11243 -0
  4. package/dist/Switch-c8rHebeK.js.map +1 -0
  5. package/dist/components/Badge/Badge.d.ts +2 -2
  6. package/dist/components/Chips/index.d.ts +19 -2
  7. package/dist/components/DatePicker/Calendar.d.ts +27 -0
  8. package/dist/components/DatePicker/DatePicker.d.ts +119 -0
  9. package/dist/components/DatePicker/date.d.ts +24 -0
  10. package/dist/components/DatePicker/index.d.ts +4 -0
  11. package/dist/components/Icon/index.d.ts +5 -4
  12. package/dist/components/Messagebox/Messagebox.d.ts +3 -1
  13. package/dist/components/Popover/Popover.d.ts +47 -0
  14. package/dist/components/Popover/index.d.ts +2 -0
  15. package/dist/components/ShapeEditor/ShapeEditor.d.ts +9 -0
  16. package/dist/components/ShapeEditor/_components/AssistantOverlay.d.ts +17 -0
  17. package/dist/components/ShapeEditor/_components/ContextMenu.d.ts +13 -0
  18. package/dist/components/ShapeEditor/_components/CursorGuide.d.ts +8 -0
  19. package/dist/components/ShapeEditor/_components/ImageStateOverlay.d.ts +11 -0
  20. package/dist/components/ShapeEditor/_components/Minimap.d.ts +45 -0
  21. package/dist/components/ShapeEditor/_components/MinimapShape.d.ts +6 -0
  22. package/dist/components/ShapeEditor/_components/RoiOverlay.d.ts +21 -0
  23. package/dist/components/ShapeEditor/_components/SelectionInfo.d.ts +12 -0
  24. package/dist/components/ShapeEditor/_components/SettingsPanel.d.ts +15 -0
  25. package/dist/components/ShapeEditor/_constants.d.ts +33 -0
  26. package/dist/components/ShapeEditor/_model/brush.d.ts +3 -0
  27. package/dist/components/ShapeEditor/_model/cursors.d.ts +18 -0
  28. package/dist/components/ShapeEditor/_model/geometry.d.ts +128 -0
  29. package/dist/components/ShapeEditor/_model/imageTiles.d.ts +11 -0
  30. package/dist/components/ShapeEditor/_model/keymap.d.ts +15 -0
  31. package/dist/components/ShapeEditor/_model/konva.d.ts +4 -0
  32. package/dist/components/ShapeEditor/_model/overlays.d.ts +55 -0
  33. package/dist/components/ShapeEditor/_model/pinIcon.d.ts +13 -0
  34. package/dist/components/ShapeEditor/_model/props.d.ts +398 -0
  35. package/dist/components/ShapeEditor/_model/scalarMask.d.ts +21 -0
  36. package/dist/components/ShapeEditor/_model/shapeRenderStyle.d.ts +16 -0
  37. package/dist/components/ShapeEditor/_model/strings.d.ts +55 -0
  38. package/dist/components/ShapeEditor/_model/tools.d.ts +27 -0
  39. package/dist/components/ShapeEditor/_model/viewSettings.d.ts +15 -0
  40. package/dist/components/ShapeEditor/_model/viewport.d.ts +28 -0
  41. package/dist/components/ShapeEditor/_renderers/KonvaRenderer.d.ts +114 -0
  42. package/dist/components/ShapeEditor/_renderers/PixiRenderer.d.ts +159 -0
  43. package/dist/components/ShapeEditor/_renderers/transformSession.d.ts +63 -0
  44. package/dist/components/ShapeEditor/_renderers/types.d.ts +94 -0
  45. package/dist/components/ShapeEditor/_state/createInteractionController.d.ts +52 -0
  46. package/dist/components/ShapeEditor/_state/drawSessionState.d.ts +6 -0
  47. package/dist/components/ShapeEditor/_state/useAssistant.d.ts +48 -0
  48. package/dist/components/ShapeEditor/_state/useDrawSession.d.ts +60 -0
  49. package/dist/components/ShapeEditor/_state/useEditorDocument.d.ts +23 -0
  50. package/dist/components/ShapeEditor/_state/useEditorHotkeys.d.ts +23 -0
  51. package/dist/components/ShapeEditor/_state/useEngineLifecycle.d.ts +48 -0
  52. package/dist/components/ShapeEditor/_state/useMinimapNavigation.d.ts +27 -0
  53. package/dist/components/ShapeEditor/_state/useMinimapSync.d.ts +24 -0
  54. package/dist/components/ShapeEditor/_state/useSelectionActions.d.ts +29 -0
  55. package/dist/components/ShapeEditor/_state/useViewportControls.d.ts +23 -0
  56. package/dist/components/ShapeEditor/index.d.ts +6 -0
  57. package/dist/components/ToggleButton/ToggleButton.d.ts +17 -0
  58. package/dist/components/ToggleButton/index.d.ts +2 -0
  59. package/dist/index.cjs +6 -46
  60. package/dist/index.cjs.map +1 -1
  61. package/dist/index.d.ts +3 -0
  62. package/dist/index.js +4541 -15017
  63. package/dist/index.js.map +1 -1
  64. package/dist/shape-editor.cjs +2 -0
  65. package/dist/shape-editor.cjs.map +1 -0
  66. package/dist/shape-editor.js +5271 -0
  67. package/dist/shape-editor.js.map +1 -0
  68. package/dist/styles.css +1 -1
  69. package/package.json +8 -1
  70. package/dist/components/Chips/Chips.d.ts +0 -17
@@ -1,12 +1,12 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
2
  import type { HTMLAttributes, ReactNode, Ref } from "react";
3
3
  type BadgeVariant = "filled" | "outline";
4
- type BadgeColor = "blue" | "gray" | "red" | "green" | "yellow" | "orange" | "lime" | "teal" | "cyan" | "indigo" | "violet" | "pink";
4
+ type BadgeColor = "blue" | "gray" | "red" | "green" | "yellow" | "orange" | "lime" | "teal" | "cyan" | "indigo" | "violet" | "pink" | "brand";
5
5
  declare const badgeVariants: (props?: ({
6
6
  shape?: "pill" | "rect" | null | undefined;
7
7
  treatment?: "filled" | "outline" | null | undefined;
8
8
  size?: "md" | "sm" | "xs" | null | undefined;
9
- color?: "blue" | "cyan" | "gray" | "green" | "indigo" | "lime" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | null | undefined;
9
+ color?: "blue" | "brand" | "cyan" | "gray" | "green" | "indigo" | "lime" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | null | undefined;
10
10
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
11
  export interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, "color"> {
12
12
  variant?: BadgeVariant;
@@ -1,2 +1,19 @@
1
- export type { ChipsProps } from "./Chips";
2
- export { Chips, chipsVariants } from "./Chips";
1
+ import { ToggleButton, type ToggleButtonProps } from "@/components/ToggleButton";
2
+ /**
3
+ * @deprecated `Chips`는 `ToggleButton`으로 이름이 변경되었습니다. `ToggleButton`을 사용하세요.
4
+ * 이 별칭은 하위 호환을 위해 유지되며 이후 메이저 버전에서 제거됩니다.
5
+ */
6
+ export declare const Chips: typeof ToggleButton;
7
+ /**
8
+ * @deprecated `chipsVariants`는 `toggleButtonVariants`로 이름이 변경되었습니다.
9
+ */
10
+ export declare const chipsVariants: (props?: ({
11
+ shape?: "rectangle" | "rounded" | null | undefined;
12
+ size?: "icon-md" | "icon-sm" | "md" | "sm" | null | undefined;
13
+ variant?: "ghost" | "outline" | null | undefined;
14
+ active?: boolean | null | undefined;
15
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
+ /**
17
+ * @deprecated `ChipsProps`는 `ToggleButtonProps`로 이름이 변경되었습니다.
18
+ */
19
+ export type ChipsProps = ToggleButtonProps;
@@ -0,0 +1,27 @@
1
+ export interface CalendarProps {
2
+ /** 표시할 월 (일자는 무시) */
3
+ month: Date;
4
+ /** 단일 선택된 일자 */
5
+ selected?: Date | null;
6
+ /** 범위 시작 일자 */
7
+ rangeStart?: Date | null;
8
+ /** 범위 종료 일자 */
9
+ rangeEnd?: Date | null;
10
+ onSelectDay?: (day: Date) => void;
11
+ /** 점 표시할 일자 목록 (예: 데이터가 있는 날) */
12
+ markedDates?: Date[];
13
+ minDate?: Date;
14
+ maxDate?: Date;
15
+ /** true 를 반환하면 해당 일자 비활성화 */
16
+ disabledDate?: (date: Date) => boolean;
17
+ /** 이전 달 버튼 — 미지정 시 자리만 확보 */
18
+ onPrevMonth?: () => void;
19
+ /** 다음 달 버튼 — 미지정 시 자리만 확보 */
20
+ onNextMonth?: () => void;
21
+ weekdayLabels?: string[];
22
+ formatMonthTitle?: (month: Date) => string;
23
+ className?: string;
24
+ }
25
+ /** 한 달 그리드 캘린더. DatePicker 내부에서 1~2개를 조합해 사용합니다. */
26
+ declare function Calendar({ month, selected, rangeStart, rangeEnd, onSelectDay, markedDates, minDate, maxDate, disabledDate, onPrevMonth, onNextMonth, weekdayLabels, formatMonthTitle, className, }: CalendarProps): import("react/jsx-runtime").JSX.Element;
27
+ export { Calendar };
@@ -0,0 +1,119 @@
1
+ import { type ReactNode } from "react";
2
+ export interface DateRange {
3
+ start: Date;
4
+ end: Date;
5
+ }
6
+ export interface DatePickerPreset<T> {
7
+ label: ReactNode;
8
+ getValue: () => T;
9
+ }
10
+ /** 시간 입력 정밀도 — hour: 시만, minute: 시:분, second: 시:분:초 */
11
+ export type TimePrecision = "hour" | "minute" | "second";
12
+ /** 시각 지정값 (기본 시각 프롭용) — 생략된 단위는 0 */
13
+ export interface TimeInput {
14
+ h: number;
15
+ m?: number;
16
+ s?: number;
17
+ }
18
+ /**
19
+ * 종료 시각 커밋 방식 (범위 계열에서만 의미)
20
+ * - exact: 표시된 시각 그대로 커밋 (기본)
21
+ * - inclusive: 종료 단위 끝까지 포함 (예: 23:59 → 23:59:59.999) — `t <= end` 조회용
22
+ * - exclusive: 다음 경계를 커밋해 끝 미포함 (예: 23:59 → 다음날 00:00:00.000) — `t < end` 반개구간 조회용
23
+ */
24
+ export type EndBoundary = "exact" | "inclusive" | "exclusive";
25
+ interface DatePickerBaseProps {
26
+ /** 시간 입력 정밀도 — 정밀도 밖 단위는 비활성(00)으로 표시되고 0으로 커밋됨 (기본: "second") */
27
+ timePrecision?: TimePrecision;
28
+ /**
29
+ * 종료 시각 커밋 방식 (기본: "exact").
30
+ * date="range" time="single"(공통 시각)에는 적용되지 않음 — 24h 배수 의미 보존
31
+ */
32
+ endBoundary?: EndBoundary;
33
+ /** 표시할 월 개수 (기본: date="range"는 2, 그 외 1) */
34
+ numberOfMonths?: 1 | 2;
35
+ /** 인풋 크기 */
36
+ size?: "sm" | "md";
37
+ placeholder?: string;
38
+ label?: string;
39
+ helperText?: string;
40
+ error?: boolean;
41
+ disabled?: boolean;
42
+ /** 점 표시할 일자 목록 (예: 데이터가 있는 날) */
43
+ markedDates?: Date[];
44
+ minDate?: Date;
45
+ maxDate?: Date;
46
+ /** true 를 반환하면 해당 일자 비활성화 */
47
+ disabledDate?: (date: Date) => boolean;
48
+ /** 시작 시점의 기본 시각 (value/defaultValue가 없을 때, 기본 00:00:00) */
49
+ defaultStartTime?: TimeInput;
50
+ /** 종료 시점의 기본 시각 (value/defaultValue가 없을 때, 기본 하루 끝) */
51
+ defaultEndTime?: TimeInput;
52
+ /** 패널 타이틀 */
53
+ title?: ReactNode;
54
+ startTimeLabel?: ReactNode;
55
+ endTimeLabel?: ReactNode;
56
+ resetLabel?: ReactNode;
57
+ applyLabel?: ReactNode;
58
+ weekdayLabels?: string[];
59
+ formatMonthTitle?: (month: Date) => string;
60
+ /** 팝오버가 처음 열릴 때 표시할 월 (값이 없을 때) */
61
+ defaultMonth?: Date;
62
+ className?: string;
63
+ }
64
+ /**
65
+ * date × time 조합:
66
+ *
67
+ * | date | time | 의미 | value |
68
+ * |--------|--------|----------------------------------|-----------|
69
+ * | single | none | 하루 | Date |
70
+ * | single | single | 하루 + 시각 | Date |
71
+ * | single | range | 하루 내 시간 범위 | DateRange |
72
+ * | range | none | 날짜 범위 (일 단위) | DateRange |
73
+ * | range | single | 날짜 범위 + 공통 시각 (24h 배수) | DateRange |
74
+ * | range | range | 날짜+시간 범위 | DateRange |
75
+ */
76
+ export interface SingleDatePickerProps extends DatePickerBaseProps {
77
+ date?: "single";
78
+ time?: "none" | "single";
79
+ value?: Date | null;
80
+ /** value가 없을 때 패널에 미리 선택되어 있는 기본값 (적용 전까지 onChange 미호출) */
81
+ defaultValue?: Date | null;
82
+ onChange?: (value: Date | null) => void;
83
+ /** 커스텀 프리셋 버튼 (예: 오늘, 어제) */
84
+ presets?: DatePickerPreset<Date>[];
85
+ /** 인풋에 표시될 텍스트 커스텀 */
86
+ formatValue?: (value: Date) => string;
87
+ }
88
+ /** 날짜는 하루, 시간만 범위 — value의 start/end는 같은 일자에 시각만 다름 */
89
+ export interface TimeRangeDatePickerProps extends DatePickerBaseProps {
90
+ date?: "single";
91
+ time: "range";
92
+ value?: DateRange | null;
93
+ /** value가 없을 때 패널에 미리 선택되어 있는 기본값 */
94
+ defaultValue?: DateRange | null;
95
+ onChange?: (value: DateRange | null) => void;
96
+ /** 커스텀 프리셋 버튼 (예: 오전, 오후) */
97
+ presets?: DatePickerPreset<DateRange>[];
98
+ /** 인풋에 표시될 텍스트 커스텀 */
99
+ formatValue?: (value: DateRange) => string;
100
+ }
101
+ /**
102
+ * 날짜 범위. time="single"이면 양 끝점이 같은 시각을 공유해
103
+ * 구간이 24시간의 배수로 맞춰집니다 (예: 교대 시작 시각 기준 조회).
104
+ */
105
+ export interface DateRangeDatePickerProps extends DatePickerBaseProps {
106
+ date: "range";
107
+ time?: "none" | "single" | "range";
108
+ value?: DateRange | null;
109
+ /** value가 없을 때 패널에 미리 선택되어 있는 기본값 */
110
+ defaultValue?: DateRange | null;
111
+ onChange?: (value: DateRange | null) => void;
112
+ /** 커스텀 프리셋 버튼 (예: 이번주, 지난 7일) */
113
+ presets?: DatePickerPreset<DateRange>[];
114
+ /** 인풋에 표시될 텍스트 커스텀 */
115
+ formatValue?: (value: DateRange) => string;
116
+ }
117
+ export type DatePickerProps = SingleDatePickerProps | TimeRangeDatePickerProps | DateRangeDatePickerProps;
118
+ declare function DatePicker(props: DatePickerProps): import("react/jsx-runtime").JSX.Element;
119
+ export { DatePicker };
@@ -0,0 +1,24 @@
1
+ /** DatePicker 내부 날짜 계산 유틸 — 외부 라이브러리 없이 네이티브 Date 사용 */
2
+ export declare function pad2(n: number): string;
3
+ /** 시각을 제거한 자정 기준 Date */
4
+ export declare function startOfDay(date: Date): Date;
5
+ export declare function isSameDay(a: Date, b: Date): boolean;
6
+ /** 일 단위 비교 (a < b) */
7
+ export declare function isBeforeDay(a: Date, b: Date): boolean;
8
+ /** 일 단위 비교 (a > b) */
9
+ export declare function isAfterDay(a: Date, b: Date): boolean;
10
+ /** 해당 월 1일 */
11
+ export declare function startOfMonth(date: Date): Date;
12
+ /** n개월 이동한 월의 1일 */
13
+ export declare function addMonths(date: Date, amount: number): Date;
14
+ /**
15
+ * 월 그리드 생성 — 일요일 시작 주 단위 2차원 배열.
16
+ * 인접 월 자리는 null (디자인상 빈 칸으로 렌더링).
17
+ */
18
+ export declare function getMonthWeeks(month: Date): (Date | null)[][];
19
+ /** date의 일자에 시각(시/분/초)을 결합 */
20
+ export declare function withTime(date: Date, time: {
21
+ h: number;
22
+ m: number;
23
+ s: number;
24
+ }): Date;
@@ -0,0 +1,4 @@
1
+ export type { CalendarProps } from "./Calendar";
2
+ export { Calendar } from "./Calendar";
3
+ export type { DatePickerPreset, DatePickerProps, DateRange, DateRangeDatePickerProps, EndBoundary, SingleDatePickerProps, TimeInput, TimePrecision, TimeRangeDatePickerProps, } from "./DatePicker";
4
+ export { DatePicker } from "./DatePicker";
@@ -206,11 +206,11 @@ export declare const Zoom100Icon: ({ size, color, className, ...props }: IconPro
206
206
  export declare const ZoomInIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
207
207
  export declare const ZoomOutIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
208
208
  export declare const PackageIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
209
- export declare const ControlIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
209
+ export declare const ArrowControlIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
210
210
  export declare const TagIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
211
211
  export declare const TagFilledIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
212
212
  export declare const AtIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
213
- export declare const ReadedMailIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
213
+ export declare const OpenedMailIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
214
214
  export declare const TestIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
215
215
  export declare const MinimizeIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
216
216
  export declare const StorageIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -274,8 +274,6 @@ export declare const HourglassIcon: ({ size, color, className, ...props }: IconP
274
274
  export declare const ThumbsUpIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
275
275
  export declare const ThumbsDownIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
276
276
  export declare const ThumbsDownFilledIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
277
- export declare const PageMinimizeIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
278
- export declare const PageMaximizeIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
279
277
  export declare const PageIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
280
278
  export declare const MinimizeWindowIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
281
279
  export declare const TaskQueueIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -283,4 +281,7 @@ export declare const ShrinkIcon: ({ size, color, className, ...props }: IconProp
283
281
  export declare const ExpandIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
284
282
  export declare const AiVotIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
285
283
  export declare const AiViewIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
284
+ export declare const HeadphonesIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
285
+ export declare const LinkedInIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
286
+ export declare const PhoneIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
286
287
  export {};
@@ -5,8 +5,10 @@ declare const messageboxVariants: (props?: ({
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  export interface MessageboxProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof messageboxVariants> {
7
7
  message: string;
8
+ subText?: ReactNode;
8
9
  children?: ReactNode;
10
+ onClose?: () => void;
9
11
  ref?: Ref<HTMLDivElement>;
10
12
  }
11
- declare function Messagebox({ className, type, message, children, ref, ...props }: MessageboxProps): import("react/jsx-runtime").JSX.Element;
13
+ declare function Messagebox({ className, type, message, subText, children, onClose, ref, ...props }: MessageboxProps): import("react/jsx-runtime").JSX.Element;
12
14
  export { Messagebox, messageboxVariants };
@@ -0,0 +1,47 @@
1
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
2
+ import type { ComponentPropsWithoutRef, ReactNode, Ref } from "react";
3
+ type PopoverRootProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>;
4
+ declare function PopoverRoot(props: PopoverRootProps): import("react/jsx-runtime").JSX.Element;
5
+ type PopoverTriggerProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger> & {
6
+ ref?: Ref<HTMLButtonElement>;
7
+ };
8
+ /** asChild로 ToggleButton 등 임의의 요소를 트리거로 사용할 수 있습니다. */
9
+ declare function PopoverTrigger({ ref, ...props }: PopoverTriggerProps): import("react/jsx-runtime").JSX.Element;
10
+ type PopoverAnchorProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>;
11
+ /** 트리거와 다른 요소를 기준으로 위치를 잡고 싶을 때 사용합니다. */
12
+ declare function PopoverAnchor(props: PopoverAnchorProps): import("react/jsx-runtime").JSX.Element;
13
+ type PopoverCloseProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Close> & {
14
+ ref?: Ref<HTMLButtonElement>;
15
+ };
16
+ /** asChild로 감싸면 하단 버튼 클릭 시 팝오버가 닫힙니다. */
17
+ declare function PopoverClose({ ref, ...props }: PopoverCloseProps): import("react/jsx-runtime").JSX.Element;
18
+ type PopoverContentProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {
19
+ ref?: Ref<HTMLDivElement>;
20
+ };
21
+ declare function PopoverContent({ className, sideOffset, align, ref, ...props }: PopoverContentProps): import("react/jsx-runtime").JSX.Element;
22
+ type PopoverTitleProps = ComponentPropsWithoutRef<"div"> & {
23
+ ref?: Ref<HTMLDivElement>;
24
+ };
25
+ declare function PopoverTitle({ className, ref, ...props }: PopoverTitleProps): import("react/jsx-runtime").JSX.Element;
26
+ type PopoverBodyProps = ComponentPropsWithoutRef<"div"> & {
27
+ ref?: Ref<HTMLDivElement>;
28
+ };
29
+ /** 검색창·목록 등 자유롭게 들어가는 스크롤 영역입니다. */
30
+ declare function PopoverBody({ className, ref, ...props }: PopoverBodyProps): import("react/jsx-runtime").JSX.Element;
31
+ interface PopoverFooterProps extends ComponentPropsWithoutRef<"div"> {
32
+ /** 좌측에 넓게 붙는 영역(예: 옵션 tertiary 버튼). 지정 시 나머지 버튼은 우측 정렬됩니다. */
33
+ start?: ReactNode;
34
+ ref?: Ref<HTMLDivElement>;
35
+ }
36
+ declare function PopoverFooter({ className, start, children, ref, ...props }: PopoverFooterProps): import("react/jsx-runtime").JSX.Element;
37
+ declare const Popover: typeof PopoverRoot & {
38
+ Trigger: typeof PopoverTrigger;
39
+ Anchor: typeof PopoverAnchor;
40
+ Close: typeof PopoverClose;
41
+ Content: typeof PopoverContent;
42
+ Title: typeof PopoverTitle;
43
+ Body: typeof PopoverBody;
44
+ Footer: typeof PopoverFooter;
45
+ };
46
+ export type { PopoverAnchorProps, PopoverBodyProps, PopoverCloseProps, PopoverContentProps, PopoverFooterProps, PopoverRootProps, PopoverTitleProps, PopoverTriggerProps, };
47
+ export { Popover };
@@ -0,0 +1,2 @@
1
+ export type { PopoverAnchorProps, PopoverBodyProps, PopoverCloseProps, PopoverContentProps, PopoverFooterProps, PopoverRootProps, PopoverTitleProps, PopoverTriggerProps, } from "./Popover";
2
+ export { Popover } from "./Popover";
@@ -0,0 +1,9 @@
1
+ import type { ShapeEditorProps } from "./_model/props";
2
+ /**
3
+ * ShapeEditor — renderer backend 기반 도형 에디터. 상호작용/문서/키보드/메뉴는 여기서 소유하고,
4
+ * 그리기·히트테스트·뷰포트는 `EditorRenderer`(Konva/Pixi)에 위임한다. `backend`로 교체.
5
+ * 갭(회전/꼭짓점추가 등)은 여기서 한 번 구현하면 양쪽 렌더러에 적용된다.
6
+ */
7
+ export default function ShapeEditor<TMeta, TMarkerMeta = unknown>({ imageUrl, displayImageUrl, renderImageState, dimmed, initialShapes, selectedIds: controlledSelectedIds, activeTool, draftStyle, draftMeta, readOnly, locked, onLockedInteraction, onIdleEscape, overrideShapeInteraction, defaultViewSettings, viewSettings, onViewSettingsChange, showMinimap, showViewSettings, getContextMenuItems, strings, canMergeSelection, brushSize, zoomBound, zoomAnimationDuration, rois, excludedZones, guideMask, maskPalette, overlayMarkers, renderOverlayMarker, onOverlayMarkerClick, renderImageOverlay, getSelectionLabel, formatSelectionInfo, externalTools, assistant, keymap, handleRef, backend, onActiveToolChange, onSelectionChange, onEditingChange, onShapesCreated, onShapesUpdated, onShapesDeleted, onDrawSessionChange, onViewportChange, }: ShapeEditorProps<TMeta, TMarkerMeta> & {
8
+ backend?: "konva" | "pixi";
9
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import type { AssistantPromptPoint } from "../_model/props";
2
+ import type { AssistantStatus } from "../_state/useAssistant";
3
+ export declare function AssistantOverlay({ image, points, boxes, status, }: {
4
+ image: {
5
+ w: number;
6
+ h: number;
7
+ };
8
+ points: AssistantPromptPoint[];
9
+ /** 진행 중인 박스 프롬프트들(병렬 요청 — 각각 shimmer 표시). */
10
+ boxes: {
11
+ x: number;
12
+ y: number;
13
+ width: number;
14
+ height: number;
15
+ }[];
16
+ status: AssistantStatus;
17
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { ContextMenuItem } from "../_model/props";
2
+ export type { ContextMenuItem };
3
+ /**
4
+ * 캔버스 우클릭 컨텍스트 메뉴(도메인 무관). 항목/위치는 호출부가 결정한다.
5
+ * @aivex/ui Menu(Radix Dropdown)를 커서 위치의 0크기 트리거에 앵커해 띄운다.
6
+ * 바깥 클릭·Escape·스크롤 닫힘은 Radix가 onOpenChange로 처리한다(비모달).
7
+ */
8
+ export declare function ContextMenu({ x, y, items, onClose, }: {
9
+ x: number;
10
+ y: number;
11
+ items: ContextMenuItem[];
12
+ onClose: () => void;
13
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 마우스 위치에 십자 가이드라인을 그리는 오버레이(도메인 무관).
3
+ * 부모(컨테이너)를 채우고 pointer-events 없음 → 캔버스 상호작용 방해 안 함.
4
+ * 고빈도(mousemove)라 React state 없이 line ref를 명령형 갱신.
5
+ */
6
+ export declare function CursorGuide({ color }: {
7
+ color?: string;
8
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from "react";
2
+ /**
3
+ * 이미지 로딩/에러 상태 오버레이. 에디터 영역 전체를 덮는다.
4
+ * 호스트가 renderImageState로 커스텀하지 않으면 기본 스피너/에러 메시지를 그린다.
5
+ */
6
+ export declare function ImageStateOverlay({ status, render, loadingLabel, errorLabel, }: {
7
+ status: "loading" | "error";
8
+ render?: (status: "loading" | "error") => ReactNode;
9
+ loadingLabel?: string;
10
+ errorLabel?: string;
11
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,45 @@
1
+ import type { RefObject } from "react";
2
+ import { type EditorShape } from "../_model/geometry";
3
+ import type { ExcludedZone, RoiRect } from "../_model/overlays";
4
+ import { type EditorStrings } from "../_model/strings";
5
+ import type { ViewSettings } from "../_model/viewSettings";
6
+ import type { MinimapNavigation } from "../_state/useMinimapNavigation";
7
+ /**
8
+ * 미니맵 패널(좌하단) — 축소 이미지 + 가이드마스크/ROI 오버레이 + 도형 미리보기 +
9
+ * 현재 뷰포트 사각형 + 줌 컨트롤 바 + 보기설정 팝오버.
10
+ *
11
+ * 내비게이션 로직(패닝/줌)은 useMinimapNavigation(nav)에, 뷰포트 사각형/줌라벨의 실시간
12
+ * 갱신은 호스트의 syncMinimap이 rectRef/zoomLabelRef로 담당한다. 여긴 순수 표시.
13
+ */
14
+ export declare function Minimap<TMeta>({ image, imageUrl, imageVisible, maskDataUrl, rois, excludedZones, roiMaskId, shapes, view, onChangeView, nav, registerShape, rectRef, zoomLabelRef, onZoom100, open, onToggleOpen, showSettings, settingsOpen, onToggleSettings, onCloseSettings, labels, settingsLabels, }: {
15
+ image: {
16
+ w: number;
17
+ h: number;
18
+ };
19
+ imageUrl: string;
20
+ /** 메인 캔버스와 동기화된 표시 여부 — 전환 시 즉시 숨기고 로드 후 페이드인. */
21
+ imageVisible?: boolean;
22
+ maskDataUrl: string | null;
23
+ rois?: RoiRect[];
24
+ excludedZones?: ExcludedZone[];
25
+ roiMaskId: string;
26
+ shapes: EditorShape<TMeta>[];
27
+ view: ViewSettings;
28
+ onChangeView: (patch: Partial<ViewSettings>) => void;
29
+ nav: MinimapNavigation;
30
+ registerShape: (id: string, el: SVGElement | null) => void;
31
+ rectRef: RefObject<HTMLDivElement | null>;
32
+ zoomLabelRef: RefObject<HTMLSpanElement | null>;
33
+ onZoom100: () => void;
34
+ open: boolean;
35
+ onToggleOpen: () => void;
36
+ /** 보기설정(기어) 버튼 표시 여부(기본 true). */
37
+ showSettings?: boolean;
38
+ settingsOpen: boolean;
39
+ onToggleSettings: () => void;
40
+ onCloseSettings: () => void;
41
+ /** UI 문자열(aria/버튼). 기본 한국어. */
42
+ labels?: EditorStrings["minimap"];
43
+ /** 설정 팝오버 문자열. 기본 한국어. */
44
+ settingsLabels?: EditorStrings["viewSettings"];
45
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { EditorShape } from "../_model/geometry";
2
+ export declare function MinimapShape<TMeta>({ shape, strokeSize, register, }: {
3
+ shape: EditorShape<TMeta>;
4
+ strokeSize?: number;
5
+ register?: (id: string, el: SVGElement | null) => void;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import type { CSSProperties } from "react";
2
+ import type { ExcludedZone, RoiRect } from "../_model/overlays";
3
+ /**
4
+ * ROI(어둡게 처리)/제외영역 오버레이 SVG. 캔버스 오버레이와 미니맵이 공유한다.
5
+ * ROI 밖을 반투명 검정으로 덮고, 제외영역은 다시 뚫으며, 경계선을 점선으로 그린다.
6
+ * 좌표계는 이미지 좌표(viewBox=image), 화면 크기/선 두께는 호출부가 정한다.
7
+ */
8
+ export declare function RoiOverlay({ image, rois, excludedZones, maskId, width, height, strokeWidth, strokeDasharray, style, }: {
9
+ image: {
10
+ w: number;
11
+ h: number;
12
+ };
13
+ rois: RoiRect[];
14
+ excludedZones?: ExcludedZone[];
15
+ maskId: string;
16
+ width: number;
17
+ height: number;
18
+ strokeWidth: number | string;
19
+ strokeDasharray: string;
20
+ style?: CSSProperties;
21
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { type EditorShape, type Point } from "../_model/geometry";
2
+ import type { EditorSelectionInfo } from "../_model/props";
3
+ /** shape + 실제 좌표(points)로 selection info 데이터를 만든다(에디터 계산분). */
4
+ export declare function buildSelectionInfo<TMeta>(shape: EditorShape<TMeta>, points: Point[]): EditorSelectionInfo<TMeta>;
5
+ /** formatSelectionInfo 미지정 시 기본 텍스트. */
6
+ export declare function defaultSelectionInfoText<TMeta>(info: EditorSelectionInfo<TMeta>): string;
7
+ export declare function SelectionInfo<TMeta>({ shapes, getLabel, formatInfo, register, }: {
8
+ shapes: EditorShape<TMeta>[];
9
+ getLabel?: (shape: EditorShape<TMeta>) => string | undefined;
10
+ formatInfo?: (info: EditorSelectionInfo<TMeta>) => string;
11
+ register: (id: string, el: HTMLDivElement | null) => void;
12
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { type EditorStrings } from "../_model/strings";
2
+ import { type ViewSettings } from "../_model/viewSettings";
3
+ export { DEFAULT_VIEW_SETTINGS, type ViewSettings, } from "../_model/viewSettings";
4
+ /**
5
+ * 미니맵 기어 버튼에서 열리는 보기 설정 팝오버(도메인 무관).
6
+ * 바깥 클릭/Esc로 닫힘. 값은 호출부가 소유하고 onChange로 부분 갱신.
7
+ * 컨트롤은 @aivex/ui(Button/Slider/Switch/Divider)로 렌더한다.
8
+ */
9
+ export declare function SettingsPanel({ value, onChange, onClose, labels, }: {
10
+ value: ViewSettings;
11
+ onChange: (patch: Partial<ViewSettings>) => void;
12
+ onClose: () => void;
13
+ /** UI 문자열. 기본 한국어. */
14
+ labels?: EditorStrings["viewSettings"];
15
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ export declare const MIN_SCALE = 0.1;
2
+ export declare const MAX_SCALE = 10;
3
+ export declare const ZOOM_FACTOR = 1.1;
4
+ export declare const POINT_RADIUS = 5;
5
+ export declare const HANDLE_RADIUS = 5;
6
+ export declare const HANDLE_SQUARE = 8;
7
+ export declare const HANDLE_NAME = "v2-handle";
8
+ export declare const FIXED_NAME = "v2-fixed";
9
+ export declare const HANDLE_COLOR = "#1e88e5";
10
+ export declare const POLY_CLOSE_PX = 12;
11
+ export declare const ROTATE_GAP_PX = 28;
12
+ export declare const NUDGE_PX = 1;
13
+ export declare const NUDGE_BIG_PX = 10;
14
+ export declare const DUPLICATE_OFFSET_PX = 12;
15
+ export declare const ROTATE_SNAP_RAD: number;
16
+ export declare const MINIMAP_SIZE = 180;
17
+ export declare const MINIMAP_VP_STROKE = "#00ff00";
18
+ export declare const MINIMAP_VP_FILL = "rgba(0, 255, 0, 0.1)";
19
+ export declare const DEFAULT_COLOR = "#00e5ff";
20
+ export declare const SELECTED_COLOR = "#ffffff";
21
+ export declare const STROKE_SIZE = 2;
22
+ export declare const SELECTION_BORDER_COLOR = "#669DEF";
23
+ export declare const SELECTION_BORDER_PAD = 3;
24
+ export declare const SELECTION_AREA_COLOR = "#669DEF";
25
+ export declare const SELECTION_AREA_FILL_ALPHA = 0.1;
26
+ export declare const FILL_ALPHA_HEX = "20";
27
+ export declare const FILL_ALPHA: number;
28
+ export declare const ROI_BORDER_COLOR = "#ffffff";
29
+ export declare const ROI_BORDER_WIDTH = 2;
30
+ export declare const ROI_BORDER_DASH: [number, number];
31
+ export declare const STRIPED_OPACITY = 0.7;
32
+ export declare const STRIPED_STROKE_SCALE = 2.5;
33
+ export declare const STRIPED_DASH_GAP_SCALE = 2;
@@ -0,0 +1,3 @@
1
+ import type { Point } from "./geometry";
2
+ /** RDP 경로 단순화(이미지 좌표). */
3
+ export declare function simplifyPath(points: Point[], epsilon?: number): Point[];
@@ -0,0 +1,18 @@
1
+ import type { Anchor } from "./geometry";
2
+ import { type Tool } from "./tools";
3
+ export declare function resizeCursorForAnchor(anchor: Anchor, angleRad?: number): string;
4
+ export declare function cursorForTool({ tool, externalToolCursor, isSpacePressed, isPolygonDrawing, }: {
5
+ tool: Tool;
6
+ externalToolCursor?: string;
7
+ isSpacePressed: boolean;
8
+ isPolygonDrawing: boolean;
9
+ }): string;
10
+ export type EditorInteractionMode = "idle" | "drawing" | "marquee" | "moving" | "panning" | "resizing" | "rotating" | "vertexDragging";
11
+ export declare function resolveEditorCursor({ tool, externalToolCursor, isSpacePressed, interactionMode, rendererCursorHint, isPolygonDrawing, }: {
12
+ tool: Tool;
13
+ externalToolCursor?: string;
14
+ isSpacePressed: boolean;
15
+ interactionMode: EditorInteractionMode;
16
+ rendererCursorHint?: string | null;
17
+ isPolygonDrawing: boolean;
18
+ }): string;