@mint-ui/map 1.2.0-test.50 → 1.2.0-test.52

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.
@@ -26,17 +26,43 @@ export interface PolygonStyleContext {
26
26
  isActive: boolean;
27
27
  }
28
28
  /**
29
- * 폴리곤 스타일 함수 타입
29
+ * 폴리곤 스타일 객체
30
30
  *
31
- * item 데이터와 상태 정보를 기반으로 자유롭게 스타일을 결정할 수 있습니다.
31
+ * 상태별 스타일을 정의합니다. 개별 props 방식과 동일한 알고리즘으로 적용됩니다.
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * renderStyle={{
36
+ * base: { fillColor: 'gray', strokeColor: 'black', lineWidth: 2 },
37
+ * selected: { fillColor: 'green', strokeColor: 'darkgreen', lineWidth: 4 },
38
+ * active: { fillColor: 'yellow', strokeColor: 'orange', lineWidth: 5 },
39
+ * hovered: { fillColor: 'blue', strokeColor: 'darkblue', lineWidth: 3 }
40
+ * }}
41
+ * ```
42
+ */
43
+ export interface PolygonStyleObject {
44
+ /** 기본 폴리곤 스타일 (필수) */
45
+ base: PolygonStyle;
46
+ /** 선택된 폴리곤 스타일 */
47
+ selected?: PolygonStyle;
48
+ /** 활성 폴리곤 스타일 (마지막 선택된 항목) */
49
+ active?: PolygonStyle;
50
+ /** 호버된 폴리곤 스타일 */
51
+ hovered?: PolygonStyle;
52
+ }
53
+ /**
54
+ * 폴리곤 스타일 커스터마이징 함수 타입
55
+ *
56
+ * item 데이터와 상태 정보를 기반으로 자유롭게 스타일을 커스터마이징할 수 있습니다.
57
+ * 스타일을 반환하지 않거나 null/undefined를 반환하면 해당 폴리곤을 그리지 않습니다.
32
58
  *
33
59
  * @param item 폴리곤 데이터
34
60
  * @param context 선택/호버/활성 상태 정보
35
- * @returns 폴리곤 스타일
61
+ * @returns 커스터마이징된 폴리곤 스타일 (반환하지 않거나 null/undefined면 그리지 않음)
36
62
  *
37
63
  * @example
38
64
  * ```typescript
39
- * getStyle={(item, context) => {
65
+ * customStyle={(item, context) => {
40
66
  * // item의 속성에 따라 동적으로 스타일 결정
41
67
  * if (item.someProperty > 100) {
42
68
  * return { fillColor: 'red', strokeColor: 'darkred', lineWidth: 3 };
@@ -53,14 +79,13 @@ export interface PolygonStyleContext {
53
79
  * return { fillColor: 'green', strokeColor: 'darkgreen', lineWidth: 4 };
54
80
  * }
55
81
  *
56
- * // 기본 스타일
57
- * return { fillColor: 'gray', strokeColor: 'black', lineWidth: 2 };
82
+ * // 아무것도 반환하지 않으면 그리지 않음 (return null 또는 return undefined도 가능)
58
83
  * }}
59
84
  * ```
60
85
  */
61
- export declare type PolygonStyleFunction<T> = (item: CanvasData<T>, context: PolygonStyleContext) => PolygonStyle;
86
+ export declare type PolygonStyleCustomizer<T> = (item: CanvasData<T>, context: PolygonStyleContext) => PolygonStyle | null | undefined;
62
87
  /**
63
- * 공통 Props ( 방식 모두 공통)
88
+ * 공통 Props (모든 방식 공통)
64
89
  */
65
90
  interface CanvasPolygonLayerBaseProps<T> extends Pick<MarkerOptions, 'zIndex' | 'anchor' | 'visible'> {
66
91
  /** 렌더링할 폴리곤 데이터 배열 */
@@ -112,40 +137,87 @@ interface CanvasPolygonLayerPropsWithIndividualStyles<T> extends CanvasPolygonLa
112
137
  hoveredStrokeColor?: string;
113
138
  /** Hover 시 폴리곤 테두리 두께 */
114
139
  hoveredLineWidth?: number;
115
- /** 함수 방식 props는 사용 불가 */
140
+ /** 다른 방식 props는 사용 불가 */
116
141
  renderStyle?: never;
142
+ customStyle?: never;
117
143
  }
118
144
  /**
119
- * 함수 Props 방식 (새로운 방식)
145
+ * 객체 Props 방식
146
+ *
147
+ * renderStyle 객체가 있으면 자동으로 객체 방식으로 인식됩니다.
148
+ * 상태별 스타일을 정의하면 개별 props 방식과 동일한 알고리즘으로 적용됩니다.
120
149
  *
121
- * renderStyle 함수가 있으면 자동으로 함수 방식으로 인식됩니다.
150
+ * @example
151
+ * ```typescript
152
+ * renderStyle={{
153
+ * base: { fillColor: 'gray', strokeColor: 'black', lineWidth: 2 },
154
+ * selected: { fillColor: 'green', strokeColor: 'darkgreen', lineWidth: 4 },
155
+ * active: { fillColor: 'yellow', strokeColor: 'orange', lineWidth: 5 },
156
+ * hovered: { fillColor: 'blue', strokeColor: 'darkblue', lineWidth: 3 }
157
+ * }}
158
+ * ```
159
+ */
160
+ interface CanvasPolygonLayerPropsWithObjectStyle<T> extends CanvasPolygonLayerBaseProps<T> {
161
+ /**
162
+ * 폴리곤 스타일 객체
163
+ *
164
+ * 상태별 스타일을 정의합니다. 개별 props 방식과 동일한 알고리즘으로 적용됩니다.
165
+ */
166
+ renderStyle: PolygonStyleObject;
167
+ /** 다른 방식 props는 사용 불가 */
168
+ baseFillColor?: never;
169
+ baseStrokeColor?: never;
170
+ baseLineWidth?: never;
171
+ selectedFillColor?: never;
172
+ selectedStrokeColor?: never;
173
+ selectedLineWidth?: never;
174
+ activeFillColor?: never;
175
+ activeStrokeColor?: never;
176
+ activeLineWidth?: never;
177
+ hoveredFillColor?: never;
178
+ hoveredStrokeColor?: never;
179
+ hoveredLineWidth?: never;
180
+ customStyle?: never;
181
+ }
182
+ /**
183
+ * 함수 Props 방식 (커스터마이징 방식)
184
+ *
185
+ * customStyle 함수가 있으면 자동으로 함수 방식으로 인식됩니다.
122
186
  * item 데이터와 상태 정보를 기반으로 자유롭게 스타일을 커스터마이징할 수 있습니다.
187
+ * 스타일을 반환하지 않거나 null/undefined를 반환하면 해당 폴리곤을 그리지 않습니다.
123
188
  *
124
189
  * @example
125
190
  * ```typescript
126
- * renderStyle={(item, context) => {
191
+ * customStyle={(item, context) => {
127
192
  * // item의 속성에 따라 동적으로 스타일 결정
128
193
  * if (item.someProperty > 100) {
129
194
  * return { fillColor: 'red', strokeColor: 'darkred', lineWidth: 3 };
130
195
  * }
196
+ *
131
197
  * // 상태 정보를 기반으로 스타일 결정
132
198
  * if (context.isActive) {
133
199
  * return { fillColor: 'yellow', strokeColor: 'orange', lineWidth: 5 };
134
200
  * }
135
- * // ...
201
+ * if (context.isHovered) {
202
+ * return { fillColor: 'blue', strokeColor: 'darkblue', lineWidth: 3 };
203
+ * }
204
+ * if (context.isSelected) {
205
+ * return { fillColor: 'green', strokeColor: 'darkgreen', lineWidth: 4 };
206
+ * }
207
+ *
208
+ * // 아무것도 반환하지 않으면 그리지 않음 (return null 또는 return undefined도 가능)
136
209
  * }}
137
210
  * ```
138
211
  */
139
- interface CanvasPolygonLayerPropsWithFunctionStyle<T> extends CanvasPolygonLayerBaseProps<T> {
212
+ interface CanvasPolygonLayerPropsWithCustomStyle<T> extends CanvasPolygonLayerBaseProps<T> {
140
213
  /**
141
- * 폴리곤 스타일 함수 (item 데이터와 상태 정보를 기반으로 스타일 반환)
214
+ * 폴리곤 스타일 커스터마이징 함수
142
215
  *
143
- * @param item 폴리곤 데이터 (item의 속성을 기반으로 자유롭게 스타일 커스터마이징 가능)
144
- * @param context 선택/호버/활성 상태 정보
145
- * @returns 폴리곤 스타일
216
+ * item 데이터와 상태 정보를 기반으로 자유롭게 스타일을 커스터마이징할 수 있습니다.
217
+ * 스타일을 반환하지 않거나 null/undefined를 반환하면 해당 폴리곤을 그리지 않습니다.
146
218
  */
147
- renderStyle: PolygonStyleFunction<T>;
148
- /** 개별 props는 사용 불가 */
219
+ customStyle: PolygonStyleCustomizer<T>;
220
+ /** 다른 방식 props는 사용 불가 */
149
221
  baseFillColor?: never;
150
222
  baseStrokeColor?: never;
151
223
  baseLineWidth?: never;
@@ -158,26 +230,31 @@ interface CanvasPolygonLayerPropsWithFunctionStyle<T> extends CanvasPolygonLayer
158
230
  hoveredFillColor?: never;
159
231
  hoveredStrokeColor?: never;
160
232
  hoveredLineWidth?: never;
233
+ renderStyle?: never;
161
234
  }
162
235
  /**
163
236
  * CanvasPolygonLayer Props (Discriminated Union)
164
237
  *
165
- * 가지 스타일 지정 방식을 지원:
238
+ * 가지 스타일 지정 방식을 지원:
166
239
  * 1. 개별 props 방식: baseFillColor, baseStrokeColor, baseLineWidth가 있으면 자동으로 개별 props 방식
167
- * 2. 함수 방식: renderStyle 함수가 있으면 자동으로 함수 방식
240
+ * 2. 객체 방식: renderStyle 객체가 있으면 자동으로 객체 방식
241
+ * 3. 함수 방식: customStyle 함수가 있으면 자동으로 함수 방식
168
242
  *
169
- * 방식은 동시에 사용할 수 없습니다 (mutually exclusive).
170
- * styleMode prop은 필요 없으며, renderStyle 또는 baseFillColor의 존재 여부로 자동 판단됩니다.
171
- *
172
- * 함수 방식에서는 item 데이터를 기반으로 자유롭게 스타일을 커스터마이징할 수 있습니다.
243
+ * 방식은 동시에 사용할 수 없습니다 (mutually exclusive).
244
+ * styleMode prop은 필요 없으며, prop의 존재 여부로 자동 판단됩니다.
173
245
  *
174
246
  * @template T 폴리곤 데이터의 추가 속성 타입
175
247
  */
176
- export declare type CanvasPolygonLayerProps<T> = CanvasPolygonLayerPropsWithIndividualStyles<T> | CanvasPolygonLayerPropsWithFunctionStyle<T>;
248
+ export declare type CanvasPolygonLayerProps<T> = CanvasPolygonLayerPropsWithIndividualStyles<T> | CanvasPolygonLayerPropsWithObjectStyle<T> | CanvasPolygonLayerPropsWithCustomStyle<T>;
177
249
  declare const CanvasPolygonLayer: <T>(props: CanvasPolygonLayerProps<T>) => React.ReactPortal;
178
250
  /**
179
251
  * CanvasPolygonLayer - Konva 기반 고성능 폴리곤 렌더링 컴포넌트
180
252
  *
253
+ * 세 가지 스타일 지정 방식을 지원합니다 (mutually exclusive):
254
+ * 1. 개별 props 방식: baseFillColor, baseStrokeColor, baseLineWidth 등 개별 props 사용
255
+ * 2. 객체 방식: renderStyle 객체로 상태별 스타일 정의
256
+ * 3. 함수 방식: customStyle 함수로 완전한 커스터마이징 (스타일을 반환하지 않으면 그리지 않음)
257
+ *
181
258
  * @template T 폴리곤 데이터의 추가 속성 타입
182
259
  */
183
260
  export default CanvasPolygonLayer;
@@ -39,13 +39,16 @@ var CanvasPolygonLayer = function (props) {
39
39
  externalSelectedItem = props.selectedItem,
40
40
  _e = props.disableInteraction,
41
41
  disableInteraction = _e === void 0 ? false : _e,
42
- options = tslib.__rest(props, ["data", "onClick", "enableMultiSelect", "enableViewportCulling", "cullingMargin", "maxCacheSize", "selectedItems", "selectedItem", "disableInteraction"]); // renderStyle이 있으면 함수 방식, baseFillColor가 있으면 개별 props 방식
42
+ options = tslib.__rest(props, ["data", "onClick", "enableMultiSelect", "enableViewportCulling", "cullingMargin", "maxCacheSize", "selectedItems", "selectedItem", "disableInteraction"]); // 가지 방식 하나만 선택: customStyle > renderStyle > 개별 props
43
43
 
44
44
 
45
- var isFunctionMode = 'renderStyle' in props && props.renderStyle !== undefined; // 개별 props 방식일 때만 추출
45
+ var isCustomStyleMode = 'customStyle' in props && props.customStyle !== undefined;
46
+ var isObjectMode = !isCustomStyleMode && 'renderStyle' in props && props.renderStyle !== undefined;
47
+ var isIndividualMode = !isCustomStyleMode && !isObjectMode; // 각 방식별 props 추출
46
48
 
47
- var individualProps = isFunctionMode ? undefined : props;
48
- var functionProps = isFunctionMode ? props : undefined; // --------------------------------------------------------------------------
49
+ var customStyleProps = isCustomStyleMode ? props : undefined;
50
+ var objectProps = isObjectMode ? props : undefined;
51
+ var individualProps = isIndividualMode ? props : undefined; // --------------------------------------------------------------------------
49
52
  // Hooks & Context
50
53
  // --------------------------------------------------------------------------
51
54
 
@@ -152,11 +155,11 @@ var CanvasPolygonLayer = function (props) {
152
155
  }
153
156
  }; // 렌더링 함수 생성 (스타일 지정 방식에 따라 분기)
154
157
 
155
- var renderBase = isFunctionMode && functionProps ? renderer.renderPolygonBaseWithFunction(functionProps.renderStyle) : individualProps ? renderer.renderPolygonBase(individualProps.baseFillColor, individualProps.baseStrokeColor, individualProps.baseLineWidth) : function () {
156
- throw new Error('Invalid props: either renderStyle or individual style props must be provided');
158
+ var renderBase = isCustomStyleMode && customStyleProps ? renderer.renderPolygonBaseWithCustomStyle(customStyleProps.customStyle) : isObjectMode && objectProps ? renderer.renderPolygonBaseWithObject(objectProps.renderStyle) : isIndividualMode && individualProps ? renderer.renderPolygonBase(individualProps.baseFillColor, individualProps.baseStrokeColor, individualProps.baseLineWidth) : function () {
159
+ throw new Error('Invalid props: one of customStyle, renderStyle, or individual style props must be provided');
157
160
  }();
158
- var renderEvent = isFunctionMode && functionProps ? renderer.renderPolygonEventWithFunction(functionProps.renderStyle) : individualProps ? renderer.renderPolygonEvent(individualProps.baseFillColor, individualProps.baseStrokeColor, individualProps.baseLineWidth, individualProps.selectedFillColor, individualProps.selectedStrokeColor, individualProps.selectedLineWidth, individualProps.activeFillColor, individualProps.activeStrokeColor, individualProps.activeLineWidth, individualProps.hoveredFillColor, individualProps.hoveredStrokeColor, individualProps.hoveredLineWidth) : function () {
159
- throw new Error('Invalid props: either renderStyle or individual style props must be provided');
161
+ var renderEvent = isCustomStyleMode && customStyleProps ? renderer.renderPolygonEventWithCustomStyle(customStyleProps.customStyle) : isObjectMode && objectProps ? renderer.renderPolygonEventWithObject(objectProps.renderStyle) : isIndividualMode && individualProps ? renderer.renderPolygonEvent(individualProps.baseFillColor, individualProps.baseStrokeColor, individualProps.baseLineWidth, individualProps.selectedFillColor, individualProps.selectedStrokeColor, individualProps.selectedLineWidth, individualProps.activeFillColor, individualProps.activeStrokeColor, individualProps.activeLineWidth, individualProps.hoveredFillColor, individualProps.hoveredStrokeColor, individualProps.hoveredLineWidth) : function () {
162
+ throw new Error('Invalid props: one of customStyle, renderStyle, or individual style props must be provided');
160
163
  }(); // Base Layer 렌더링 (뷰포트 컬링 적용)
161
164
 
162
165
  var doRenderBase = function () {
@@ -3,9 +3,14 @@
3
3
  *
4
4
  * 이 파일은 폴리곤 렌더링을 위한 헬퍼 함수와 팩토리 함수를 제공합니다.
5
5
  * GeoJSON MultiPolygon 형식을 지원하며, 도넛 폴리곤(구멍이 있는 폴리곤)도 처리할 수 있습니다.
6
+ *
7
+ * 세 가지 스타일 지정 방식을 지원하는 렌더링 함수를 제공합니다:
8
+ * 1. 개별 props 방식: renderPolygonBase, renderPolygonEvent
9
+ * 2. 객체 방식: renderPolygonBaseWithObject, renderPolygonEventWithObject
10
+ * 3. 함수 방식: renderPolygonBaseWithCustomStyle, renderPolygonEventWithCustomStyle
6
11
  */
7
12
  import { CustomRenderBase, CustomRenderEvent } from "../shared/types";
8
- import type { PolygonStyleFunction } from "./CanvasPolygonLayer";
13
+ import type { PolygonStyleObject, PolygonStyleCustomizer } from "./CanvasPolygonLayer";
9
14
  /**
10
15
  * 폴리곤 그리기 파라미터 인터페이스
11
16
  */
@@ -119,13 +124,13 @@ export declare const renderPolygonBase: <T = any>(baseFillColor: string, baseStr
119
124
  */
120
125
  export declare const renderPolygonEvent: <T = any>(baseFillColor: string, baseStrokeColor: string, baseLineWidth: number, selectedFillColor?: string, selectedStrokeColor?: string, selectedLineWidth?: number, activeFillColor?: string, activeStrokeColor?: string, activeLineWidth?: number, hoveredFillColor?: string, hoveredStrokeColor?: string, hoveredLineWidth?: number) => CustomRenderEvent<T>;
121
126
  /**
122
- * 폴리곤 Base 렌더링 함수 팩토리 (함수 방식)
127
+ * 폴리곤 Base 렌더링 함수 팩토리 (객체 방식)
123
128
  *
124
129
  * Base Layer에서 사용할 렌더링 함수를 생성합니다.
125
- * renderStyle 함수를 사용하여 폴리곤의 상태에 따라 스타일을 동적으로 결정합니다.
130
+ * renderStyle 객체를 사용하여 기본 스타일을 적용합니다.
126
131
  *
127
132
  * @template T 폴리곤 데이터의 추가 속성 타입
128
- * @param renderStyle 폴리곤 스타일 함수
133
+ * @param renderStyle 폴리곤 스타일 객체
129
134
  * @returns Base Layer 렌더링 함수
130
135
  *
131
136
  * @remarks
@@ -135,49 +140,103 @@ export declare const renderPolygonEvent: <T = any>(baseFillColor: string, baseSt
135
140
  *
136
141
  * @example
137
142
  * ```typescript
138
- * const renderBase = renderPolygonBaseWithFunction<MyDataType>(
139
- * (item, context) => ({
140
- * fillColor: 'rgba(255, 100, 100, 0.5)',
141
- * strokeColor: 'rgba(200, 50, 50, 0.8)',
142
- * lineWidth: 2
143
- * })
143
+ * const renderBase = renderPolygonBaseWithObject<MyDataType>({
144
+ * base: { fillColor: 'rgba(255, 100, 100, 0.5)', strokeColor: 'rgba(200, 50, 50, 0.8)', lineWidth: 2 }
145
+ * });
146
+ * ```
147
+ */
148
+ export declare const renderPolygonBaseWithObject: <T = any>(renderStyle: PolygonStyleObject) => CustomRenderBase<T>;
149
+ /**
150
+ * 폴리곤 Event 렌더링 함수 팩토리 (객체 방식)
151
+ *
152
+ * Event Layer에서 사용할 렌더링 함수를 생성합니다.
153
+ * renderStyle 객체를 사용하여 개별 props 방식과 동일한 알고리즘으로 스타일을 적용합니다.
154
+ *
155
+ * @template T 폴리곤 데이터의 추가 속성 타입
156
+ * @param renderStyle 폴리곤 스타일 객체
157
+ * @returns Event Layer 렌더링 함수
158
+ *
159
+ * @remarks
160
+ * - **렌더링 순서**: 선택된 항목 → 마지막 선택된 항목 → hover된 항목 (최상단)
161
+ * - **성능**: O(m), m은 선택된 항목 수 + hover된 항목 수
162
+ * - 좌표 변환은 자동으로 캐싱되어 성능 최적화됨
163
+ * - **알고리즘**: 개별 props 방식과 동일
164
+ * - 기본값 설정: selected/active/hovered가 없으면 base 또는 상위 값 사용
165
+ * - 선택된 항목: selected 스타일
166
+ * - 마지막 선택된 항목 (호버 안 됨): active 스타일
167
+ * - 호버된 항목: 선택되어 있으면 active, 아니면 hovered 스타일
168
+ *
169
+ * @example
170
+ * ```typescript
171
+ * const renderEvent = renderPolygonEventWithObject<MyDataType>({
172
+ * base: { fillColor: 'rgba(255, 100, 100, 0.5)', strokeColor: 'rgba(200, 50, 50, 0.8)', lineWidth: 2 },
173
+ * selected: { fillColor: 'rgba(255, 193, 7, 0.7)', strokeColor: 'rgba(255, 152, 0, 1)', lineWidth: 4 },
174
+ * active: { fillColor: 'rgba(255, 152, 0, 0.8)', strokeColor: 'rgba(255, 87, 34, 1)', lineWidth: 5 },
175
+ * hovered: { fillColor: 'rgba(100, 150, 255, 0.8)', strokeColor: 'rgba(0, 100, 200, 1)', lineWidth: 3 }
176
+ * });
177
+ * ```
178
+ */
179
+ export declare const renderPolygonEventWithObject: <T = any>(renderStyle: PolygonStyleObject) => CustomRenderEvent<T>;
180
+ /**
181
+ * 폴리곤 Base 렌더링 함수 팩토리 (커스터마이징 방식)
182
+ *
183
+ * Base Layer에서 사용할 렌더링 함수를 생성합니다.
184
+ * customStyle 함수를 사용하여 각 폴리곤의 스타일을 자유롭게 커스터마이징합니다.
185
+ *
186
+ * @template T 폴리곤 데이터의 추가 속성 타입
187
+ * @param customStyle 폴리곤 스타일 커스터마이징 함수
188
+ * @returns Base Layer 렌더링 함수
189
+ *
190
+ * @remarks
191
+ * - 선택된 항목은 Event Layer에서 그려지므로 Base Layer에서는 스킵
192
+ * - 성능: O(n), n은 렌더링할 폴리곤 개수
193
+ * - 좌표 변환은 자동으로 캐싱되어 성능 최적화됨
194
+ *
195
+ * @example
196
+ * ```typescript
197
+ * const renderBase = renderPolygonBaseWithCustomStyle<MyDataType>(
198
+ * (item, context) => {
199
+ * if (item.someProperty > 100) {
200
+ * return { fillColor: 'red', strokeColor: 'darkred', lineWidth: 3 };
201
+ * }
202
+ * // 아무것도 반환하지 않으면 그리지 않음
203
+ * }
144
204
  * );
145
205
  * ```
146
206
  */
147
- export declare const renderPolygonBaseWithFunction: <T = any>(renderStyle: PolygonStyleFunction<T>) => CustomRenderBase<T>;
207
+ export declare const renderPolygonBaseWithCustomStyle: <T = any>(customStyle: PolygonStyleCustomizer<T>) => CustomRenderBase<T>;
148
208
  /**
149
- * 폴리곤 Event 렌더링 함수 팩토리 (함수 방식)
209
+ * 폴리곤 Event 렌더링 함수 팩토리 (커스터마이징 방식)
150
210
  *
151
211
  * Event Layer에서 사용할 렌더링 함수를 생성합니다.
152
- * renderStyle 함수를 사용하여 각 폴리곤의 상태에 따라 스타일을 동적으로 결정합니다.
212
+ * customStyle 함수를 사용하여 각 폴리곤의 스타일을 자유롭게 커스터마이징합니다.
153
213
  *
154
214
  * @template T 폴리곤 데이터의 추가 속성 타입
155
- * @param renderStyle 폴리곤 스타일 함수
215
+ * @param customStyle 폴리곤 스타일 커스터마이징 함수
156
216
  * @returns Event Layer 렌더링 함수
157
217
  *
158
218
  * @remarks
159
219
  * - **렌더링 순서**: 선택된 항목 → 마지막 선택된 항목 → hover된 항목 (최상단)
160
220
  * - **성능**: O(m), m은 선택된 항목 수 + hover된 항목 수
161
221
  * - 좌표 변환은 자동으로 캐싱되어 성능 최적화됨
162
- * - hover된 항목이 선택되어 있으면 active 스타일 적용
163
222
  *
164
223
  * @example
165
224
  * ```typescript
166
- * const renderEvent = renderPolygonEventWithFunction<MyDataType>(
225
+ * const renderEvent = renderPolygonEventWithCustomStyle<MyDataType>(
167
226
  * (item, context) => {
168
227
  * if (context.isActive) {
169
- * return { fillColor: 'rgba(255, 152, 0, 0.8)', strokeColor: 'rgba(255, 87, 34, 1)', lineWidth: 5 };
228
+ * return { fillColor: 'yellow', strokeColor: 'orange', lineWidth: 5 };
170
229
  * }
171
230
  * if (context.isHovered) {
172
- * return { fillColor: 'rgba(100, 150, 255, 0.8)', strokeColor: 'rgba(0, 100, 200, 1)', lineWidth: 3 };
231
+ * return { fillColor: 'blue', strokeColor: 'darkblue', lineWidth: 3 };
173
232
  * }
174
233
  * if (context.isSelected) {
175
- * return { fillColor: 'rgba(255, 193, 7, 0.7)', strokeColor: 'rgba(255, 152, 0, 1)', lineWidth: 4 };
234
+ * return { fillColor: 'green', strokeColor: 'darkgreen', lineWidth: 4 };
176
235
  * }
177
- * return { fillColor: 'rgba(255, 100, 100, 0.5)', strokeColor: 'rgba(200, 50, 50, 0.8)', lineWidth: 2 };
236
+ * // 아무것도 반환하지 않으면 그리지 않음
178
237
  * }
179
238
  * );
180
239
  * ```
181
240
  */
182
- export declare const renderPolygonEventWithFunction: <T = any>(renderStyle: PolygonStyleFunction<T>) => CustomRenderEvent<T>;
241
+ export declare const renderPolygonEventWithCustomStyle: <T = any>(customStyle: PolygonStyleCustomizer<T>) => CustomRenderEvent<T>;
183
242
  export {};